Context:
I'm working on a big UE4 project. Currently we're using SVN as our VCS, but I've always been a git developer and having a local repo, local branches, and stashes are things I'm not willing to loose.
So, I've started using SubGit to work on a git version of the repo, while subgit does the git to svn conversion. So far I love it, aside from the fact that I'm forced to use rebase instead of merge, everything else is like normal git.
EDIT 1: My subgit repo is bare local one, as I don't have access to the remote SVN repo. This means tools like svnadmin or svnlook don't work for me.
Question:
Now, my team works by locking the binary files they work on in SVN. I want an automatic way to join that workflow. So I thought about a pre-commit hook to check if the files I'm about to commit are locked. If not, then lock them immediately. If they are though, check if I'm the lock owner. If I'm not, abort the commit.
Does anyone have any clues of how to achieve something like this?
Regarding locking, you can use "What is the best way to see what files are locked in Subversion?", meaning
svnadmin lslockswhich does list locked files and their owner. (also, locally,svn status --show-updates)Compare it, in your pre-commit hook, to the list given by
git diff --cached --name-status.For any file not locked, a
svn proplist -vwould display its owner.