How can you lock files using an Hg repository hosted by Bitbucket?

Because our project handles a lot of binary files and art assets (game developed in Unity 3D) we really need locking ala SVN to keep our artists from stomping all over eachother. I know there is a locking extension for Hg, but how do I use it with a bitbucket hosted repo? Can I? I'm worried that even if I figure it out, TortoiseHg won't have a graphical hook for locking whch defeats the purpose since it is finicky artists that need the feature and asking them to use the command line is like asking a cat to take a shower.

3 answers

I'm the author of the lock extension (http://mercurial.selenic.com/wiki/LockExtension). You cannot use it with Bitbucket since it must be enabled on both the client- and the server-side (and Bitbucket doesn't allow you to enable extensions on the server-side).

Anna,

Bitbucket doesn't offer any server side hooks configuration options at the moment. In adiditon to that, we don't recommend placing image/binary file data in Mercurial. All your code is fine, but the image data doesn't work well with Mercurial and your repository will grow very fast.

At the moment, I'm not aware of any great tools for this workflow, but perhaps someone else here can make a suggestion.

You can apply a commit policy to your Mercurial repos using the Commit Policy Plugin, and reject the commits that would try to modify the files you wanted to lock. You can lock directories, files or mixed.

Here is the tutorial for implementing commit policies with Bitbucket Cloud.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Featured Groups

Tuesday tips & tricks: What is the Atlassian Community?

It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...

138 views 6 8
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you