开发者

Checkout multiple revision of one file in CVS repository

开发者 https://www.devze.com 2022-12-27 20:03 出处:网络
To checkout I use the following command CVSROOT=\"/home/projects/stuff/\" cvs co mywork with the mywork directory I have text files as well as pictures, i.e., looks something

To checkout I use the following command

CVSROOT="/home/projects/stuff/" cvs co mywork

with the mywork directory I have text files as well as pictures, i.e., looks something like this

- paper.tex
- pic1.jpg
- pic2.jpg
etc.

In particular, I am interested in checking out all the version of paper.tex over time. Is there a way how I can check all revisions of this file out at once? Or which command can I use to see when revision have been made to this particular file?

many t开发者_开发知识库hanks for your help, Andrew


With TortoiseSVN, just right-click the file log and select TortoiseSVN/Show Log. That will show only the revisions where the file was modified. Then you can right-click on each revision and select Save revision to...


To see all revision you can use the cvs log command

cd mywork
cvs log paper.tex

To get a list of all commands use:

cvs --help-commands

And to get help on a specific command use -H, eg. for the log command:

cvs -H log

Assuming you have a bash or some other powerful shell, you can check out all revision of one file over time like this:

FN="paper.tex" && for REV in `cvs log $FN | grep "^revision " | cut -c10-`; do cvs co -p -r $REV $FN > "$FN-rev$REV"; done


Seems you need mirror of the repo, then try cvssuck http://freecode.com/projects/cvssuck


You can use this command to display all revisions of a file:

cvs rlog -N mywork/paper.tex

This will display all the versions and the date of each revision of the file. Once you know what revision you want you can use this command to check it out:

cvs co -rX.Y mywork/paper.tex

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号