Can I have "keep locks" the default at commit?

462 views
Skip to first unread message

Scott Adams

unread,
Jul 25, 2018, 5:19:47 PM7/25/18
to TortoiseSVN
Is there a way to default to having "keep locks" checkbox checked when the commit dialog comes up?

Kalen Brown

unread,
Jul 26, 2018, 2:57:09 PM7/26/18
to TortoiseSVN
I think it is a SVN configuration file option. I think it is user specific and not on the repo.

%appdata%\Subversion

### Set no-unlock to prevent 'svn commit' from automatically
### releasing locks on files.
no-unlock = no

Let me know if this is incorrect because I have implemented the above but not tested it. I set it to no to explicitly state the default of unlocking upon commit.

Scott Adams

unread,
Jul 26, 2018, 3:10:42 PM7/26/18
to TortoiseSVN
I set it to yes and now the Keep Locks is set in the commit dialog with no way to over ride. That does what I need. Thank-you for pointing out that configuration file. Very useful!

Stefan

unread,
Jul 26, 2018, 5:08:05 PM7/26/18
to TortoiseSVN


On Wednesday, July 25, 2018 at 11:19:47 PM UTC+2, Scott Adams wrote:
Is there a way to default to having "keep locks" checkbox checked when the commit dialog comes up?

Sorry, no.
Because it's very bad practice to keep a lock on a file for too long. A lock should only be kept as long as it's really needed, i.e. as long as you're working on that file and no longer. Having the checkbox checked by default would lead to a lot of locked files which aren't really worked on anymore.

Stefan

Scott Adams

unread,
Jul 26, 2018, 5:25:59 PM7/26/18
to TortoiseSVN
Yes in general I agree with that Stefan.

We have some special case files that are owned by only one master developer. They are not in a standard computer language but one that we use a specially configured Beyond Compare to find our diffs with.

Others can make changes but they do it in their own branches. The master developer then merges those changes and commits them in the trunk.

The reason we are putting locks on them now is we have been used to everyone touching the trunk. This helps remind them to stay in their branches.

The SVN config work around that Kalen mentioned works just fine and I don't see any need to modify tortoise for this feature.

Kalen Brown

unread,
Jul 26, 2018, 7:26:43 PM7/26/18
to TortoiseSVN
Sounds like a job for permissions/hooks/something other than locks because the config is across all files/folders/repos. Good luck!

Niemann, Hartmut

unread,
Jul 27, 2018, 3:51:22 AM7/27/18
to TortoiseSVN on behalf of Scott Adams

Hi!

 

We have used a precommit hook for that that controls write access on a by-username-by-folder base.

 

Mit freundlichen Grüßen
Dr. Hartmut Niemann

Siemens AG
Mobility Division
Rolling Stock
Standardization, Remote Control, Display
MO RS LM EN CCI SRD
Werner-von-Siemens-Str. 67
91052 Erlangen, Deutschland
Mobil: +49 173 5342327
mailto:hartmut...@siemens.com
www.siemens.com/ingenuityforlife
www.siemens.com/ingenuityforlife

Reply all
Reply to author
Forward
0 new messages