Tag Archive for 'svn delete'

Subversion Tip of the Week

Using SVN Move

Apache Subversion’s ‘svn move’ command allows the user to move files and directories and can be applied to both the working copy and the repository. The key difference between this command and ‘svn copy,’ is that ‘svn move’ also deletes the original file. This makes running ‘svn move’ equivalent to performing an ‘svn copy’ followed by ‘svn delete.’

…in the Working Copy

Running this command at the working copy level requires you to specify the file you’re moving and the location you’re moving it to:

svn move (working-copy-path)/item-being-moved (working-copy-path)/new-location

In this example we’re moving the ‘Release2’ item to the ‘Releases’ directory.

svn move

Note, you’ll need to perform a commit to send this change to the repository and share it with the rest of your team.

…in the Repository

It’s also possible to move items inside the repository. As this creates a new revision, you’ll need to supply a log message alongside the command:

svn move (repository-URL)/item-being-moved -m “log message” (repository-URL)/new-location

In this example we’re moving the item ‘Release’ to the ‘Releases’ directory.

svn move 2

Looking for an easy-to-use cross platform Subversion client? Claim your free 30 day trial of SmartSVN Professional by visiting: www.smartsvn.com/download