Fetching Older Repository Snapshots

In addition to all of the previous commands, you can use svn update and svn checkout with the --revision option to take an entire working copy back in time:[7]

$ svn checkout -r 1729 # Checks out a new working copy at r1729
...
$ svn update -r 1729 # Updates an existing working copy to r1729
...

Tip

Many Subversion newcomers attempt to use the preceding svn update example to undo committed changes, but this won’t work as you can’t commit changes that you obtain from backdating a working copy if the changed files have newer revisions. See Resurrecting Deleted Items for a description of how to undo a commit.

Lastly, if you’re building a release and wish to bundle up your files from Subversion but don’t want those pesky .svn directories in the way, you can use svn export to create a local copy of all or part of your repository sans .svn directories. As with svn update and svn checkout, you can also pass the --revision option to svn export:

$ svn export http://svn.example.com/svn/repos1 # Exports latest revision
...
$ svn export http://svn.example.com/svn/repos1 -r 1729
# Exports revision r1729
...


[7] See? We told you that Subversion was a time machine.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.140.249.104