SVN: Vacuum/delete pristine copies from command line

command linesvntortoise-svn

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.

Best Answer

For TortoiseSVN the option or parameter is /vacuum as mentioned by the developer in an email. As you've pointed out it is currently missing in the documentation.

SVN 1.8 introduced automatic vacuuming of pristines to the cleanup command and 1.9 made it and other features optional. Source: SVN changelog.

Related Question