How to checkout a specific Subversion revision from the command line?

后端 未结 10 574
日久生厌
日久生厌 2020-11-28 00:54

I want to checkout a specific revision of a folder in Subversion using the command line.

I don\'t see an option for specifying the revision number in TortoiseP

10条回答
  •  死守一世寂寞
    2020-11-28 01:20

    svn checkout to revision where your repository is on another server

    Use svn log command to find out which revisions are available:

    svn log
    

    Which prints:

    ------------------------------------------------------------------------
    r762 | machines | 2012-12-02 13:00:16 -0500 (Sun, 02 Dec 2012) | 2 lines
    
    ------------------------------------------------------------------------
    r761 | machines | 2012-12-02 12:59:40 -0500 (Sun, 02 Dec 2012) | 2 lines
    

    Note the number r761. Here is the command description:

    svn export http://url-to-your-file@761 /tmp/filename
    

    I used this command specifically:

    svn export svn+ssh://machines@mywebsite.com/home1/oct/calc/calcFeatures.m@761 calcFeatures.m
    

    Which causes calcFeatures.m revision 761 to be checked out to the current directory.

提交回复
热议问题