Sublime Forum

How to make Sublime SVN plugin keeps locks on commit

#1

I’m using Sublime Text 3 with wbond Sublime SVN plugin, but any time i commit a file, i lose the lock. Is there any option to make the plugin keeps the locks on files after commit?

0 Likes

#2

The following information is provided with the caveat that I don’t use this particular plugin because I don’t use Subversion very much any longer. So if someone that actually uses it (or the awesome developer @wbond that wrote it) comes along, they will likely have better information.

Subversion automatically drops the lock on a locked file when you commit changes to it unless you specifically tell it not to, but there seems to be no obvious arguments you can pass to the command implemented by the plugin that would pass that option when it does the commit nor any setting that would tell it do so on it’s own.

The best workaround that I can see is to use SVN: Custom Command to do your own manual commit operation, specifying the command line option --no-unlock.

Unless you have your subversion set up to launch some GUI program to edit your commit message, you need to also specify a command line option to set the commit message, or subversion will be stuck in the background waiting. Also if your intention is not to check in all modified files, you would need to specify the files to check in on the command line as well.

For example, this checks in all modified files, keeps the lock on any that are locked, and specifies a single line commit message:

commit --no-unlock -m “My commit message goes here”

This one does the same but the commit message comes from a text file (path relative to the root of your repository) that you have previously prepared.:

commit --no-unlock -F PathToFileWIthCommitMessageGoesHere

0 Likes