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

Re: Break lock with cleanup through command line

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 3 Oct 2016 20:20:37 +0200

On 03.10.2016 17:20, Ragnar Hägg wrote:
> I want to create a bat script that uses TortoiseSVN to update a svn
> repo. It should be able to handle the repo being locked from if
> something went wrong the last update.
> What I tried was this (running 1.9.4):
> START /WAIT TortoiseProc.exe /command:cleanup /path:"c:\svn\repoName"
> /cleanup /noui /nodlg
> START TortoiseProc.exe /command:update /path:"c:\svn\repoName" /closeonend:2
> But the cleanup command doesn't seem to handle breaking locks. When I
> run the cleanup command without /noui I get the cleanup options, where
> "Break locks" is an option, which isn't the case for 1.8.11. In the
> documentation
> (https://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-automation.html)
> it says that the :cleanup command "Cleans up interrupted or aborted
> operations and unlocks the working copy...".

"unlocks the working copy" means getting rid of 'command locks', i.e.
locks that are set to prevent other svn commands from interfering
(similar to thread locks).
And that's what you want. Breaking locks of user locked files is also
possible, but I don't think that's what you're looking for.

Why do you think it doesn't clean the 'command locks' when you run the

> Is it possible that the "Break locks" functionality was removed as a
> default behavior for cleanup when the option was introduced in later
> versions, but no command line option to do it was added? Or is there a
> way of doing this?

Pass the /breaklocks parameter, which will break all locks which were
set with the "get lock" command on files.

other parameters for the cleanup command:

/cleanup : runs cleanup
/revert : also does a revert on the wc
/delunversioned : removes all unversioned files and folders
/delignored : removes all ignored files
/refreshshell : forces a refresh of the explorer overlays
/externals : includes all externals for the specified command(s)
/breaklocks : removes all user file locks
/fixtimestamps : changes the file times according to the last-commit-date
/vacuum : removes unneeded metadata


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest interface to (Sub)version control
    /_/   \_\     http://tortoisesvn.net
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2016-10-03 20:20:49 CEST

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