1
How can I vacuum/delete all pristine copies of a working copy from command line?
Use case:
- I have multiple working copies (20+) checked out
(same case for many developers in our firm) - some of those working copies grow large over time
- When disk space is scarce, I need to clean up every working copy by hand as described in this answer (previously checking, which working copies take up most of the disk space)
- Bonus: calculate (estimate?) disk space occupied by pristine copies and only call cleanup, if it will result in ... GBs to be freed up.
This is tedious and error-prone, so I'd like to automate these 20+ cleanups into a vacuum_pristine_copies.XXX
Script, which can be executed in the hour of deepest need.
enclosed label
- It is possible to call
cleanup
from command line (see the docs here).
However, this lacks a/vacuum-pristine
option. (We already use this TortoiseSVN-automation to do batched updates). - We're working on Windows machines, but we're not fixed on
CMD
.
One possible alternative could be Python27.
my problem with the
TortoiseProc.exe /command:cleanup /vacuum ...
is that it opens a dialog for each working directory. I'd prefer the fire-and-forget-script. thesvn cleanup
somehow doesn't reduce the working directory size (>6GB), while running a TortoiseSVN cleanup does (<4GB). – hardmooth – 2016-04-25T12:42:27.173@hardmooth As mentioned in the TSVN automation documentation you've linked you should be able to hide the dialog with
/noui
,/noprogressui
and/or/nodlg
. Regarding the standard SVN client: What I can gather from the 1.9.4 source code is that you must not supply--remove-unversioned
or--remove-ignored
. The term vacuum is used not just regarding the "vacuuming of pristines" but also when referring to removal of unversioned or ignored files which IMHO causes some confusion in the code and seemingly the implementation thereof. Also make sure the path you specify is the WC's root. – dotn3b – 2016-04-30T11:21:04.660First link is broken, perhaps this thread contains the same info. The "no ui" syntax would be something like
– Groo – 2017-12-20T08:56:03.280TortoiseProc.exe /command:cleanup /noui /cleanup /vacuum /externals /refreshshell /noprogressui /path:.
(leave path to.
for current folder or change as needed of course). One thing to note is that this command isn't blocking, i.e. it just starts the process and returns immediately, so running this in a for-loop inside a batch script might create many background processes.