7

Possible Duplicate:
Checkout a specific revision from Subversion from the command line

How can I check out a particular version of code from SVN (Subversion)?

Community
  • 1
  • 1
SunnyShah
  • 28,934
  • 30
  • 90
  • 137

3 Answers3

25

What client are you using?

svn checkout svn://repository/path@123

or

svn checkout -r 123 url://repository/path

or

TortoiseProc.exe /command:checkout /rev:1234

ajma
  • 12,106
  • 12
  • 71
  • 90
  • also works with existing checkout after the fact, using "svn update"; for reference, [svn update](http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.update.html): "if no revision is given, it brings your working copy up to date with the HEAD revision. Otherwise, it synchronizes the working copy to the revision given by the --revision (-r) option."; and see also how to [specify revisions](http://svnbook.red-bean.com/en/1.7/svn.ref.svn.html#svn.ref.svn.sw.revision) "You can provide revision numbers, keywords, or dates (in curly braces) as arguments to the revision option." – michael Feb 10 '13 at 08:58
4
svn update -r NBR

It might also work with svn up, depending of your version of Subversion.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • assumes the source has already been checked out (see orig question); but otherwise, yes (see also my comment on the accepted answer). For no particular reason, I do prefer this way, probably only because I've internalized the git way of doing things (where git co {tag|branch} is done after a clone.) – michael Feb 10 '13 at 09:03
2
svn checkout URL[@REV]... [PATH]

Example for rev 2004:

svn checkout file:///tmp/repos/test@2004 mine

Documentation.

atp
  • 30,132
  • 47
  • 125
  • 187