Get all revisions from CVS repository

左心房为你撑大大i 提交于 2019-12-23 22:17:03

问题


I have set the correct CVS Root, within this root I have a repository which contains a number of files. In particular, I am interested in the revisions of one of the files, lets call it test.tex. Now I would like to get ALL different versions of this file, from the repository. Is there somehow a command that I could use to do that?

Or do I need to extract them one after the other?

Many thanks!


回答1:


There is no cvs command to check out all revisions of one file. But with bash (or some other powerful shell) it is very easy to check them out one after the other:

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



回答2:


Try this command:

cvs history -a -c module/test.tex

This will display all the versions of that file.




回答3:


I do not know of a cvs command to get all revisions of a file.

It is simple to create a script to extract all revs, using Perl for example. If you need to get fancy, you might be able to leverage what others have done on CPAN



来源:https://stackoverflow.com/questions/1724020/get-all-revisions-from-cvs-repository

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!