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

Rua Williams June 27, 2013

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

2 votes
Martin Geisler September 1, 2013

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).

0 votes
Midori
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2016

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.

0 votes
aMarcus
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 28, 2013

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events