[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Want to set default "release locks" behavior depending on where WC is pointing

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 08 Aug 2013 19:34:26 +0200

On 06.08.2013 22:50, Ben Fritz wrote:
> My team recently had a server-side hook installed to prevent locking
> an artifact on one branch if it is already locked on another branch,
> or on trunk. The intent is to allow us to branch hard-to-merge files
> with "svn:needs-lock" set and not worry about other people editing it
> on other branches.
>
> This gets us pretty close, but now we need to remember NOT to release
> our lock during commits to the branch, until we finally merge back to
> trunk. I'd like to make this the default behavior. I found the
> "no-unlock" setting in the Subversion config file, but if I leave it
> at "yes" then it would be too easy to forget to release the locks
> after we merge to trunk. So, I want to make this change based on where
> the working copy is pointing.
>
> I created a .bat file to modify %APPDATA%\Subversion\config to toggle
> the miscellany/no-unlock setting on and off depending on whether "svn
> info" shows the WC pointing to somewhere under "branches" or not. The
> script works, I verify it modifes the config file as intended. If I
> run the script manually, then bring up the commit dialog with TSVN,
> the "keep locks" button reflects the modified setting in the config
> file.
>
> But, if I try configuring the .bat file as a client-side "start
> commit" hook, even though I can verify that the script runs, and the
> config file gets modified, the "keep locks" checkbox does NOT get
> updated with the new value. It keeps the previous value. I thought
> this would work, because "start commit" runs before the dialog is
> displayed.

The dialog isn't shown yet, but it is already initialized. Only the
status of all files isn't fetched yet so you can only change the files
in that hook script. Everything else is not changeable by the hook script.

I don't think it's possible to achieve what you want with a hook script.
Or any other way I can think of, sorry.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest interface to (Sub)version control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3062292
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2013-08-08 19:34:37 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.