英文:
How to find differences between 2 CVS branches?
问题
CVS是否有一个命令可以列出两个分支之间的差异?差异指的是在一个分支中存在而在另一个分支中不同或不存在的文件列表。如果有的话,能否提供一个示例?
英文:
Is there a command in CVS that can list the differences between 2 branches. By differences I mean a list of files that are different or present in one branch and not the other. If so could you please provider an example?
答案1
得分: 3
诚实地说,CVS项目已经15年没有更新了。因此,投入时间学习如何使用它可能不是一个好主意。
我会忘记直接使用CVS,而是将CVS存储库导入git,git cvsimport -d CVSROOT。
一旦你有了那个git存储库,
git diff branch1 branch2
将会非常好用。
所以,总而言之,
git cvsimport -C baz-module -d :pserver:anonymous@cvs.ancientsoftware.org:/cvs/reallyoldsoftware foo/bar/baz-module
cd baz-module
git diff branch1 branch2
英文:
In all honesty, the CVS project hasn't seen an update in 15 years. So, investing time in learning to use it is probably a bad idea.
I'd forget about wrangling with CVS directly; instead I'd import the CVS repo into git, git cvsimport -d CVSROOT.
Once you have that git repository,
git diff branch1 branch2
will work just beautifully.
So, all in all,
git cvsimport -C baz-module -d :pserver:anonymous@cvs.ancientsoftware.org:/cvs/reallyoldsoftware foo/bar/baz-module
cd baz-module
git diff branch1 branch2
答案2
得分: 2
以下是已翻译的内容:
需要快速完成某事,但对CVS和GIT了解甚少,而且需要处理包含数百个项目的存储库,我执行了以下类似的操作:
export CVSROOT=:pserver:user@cvsserver.com:/path/to/cvsrep
cvs login
cvs export -r HEAD project-name
cvs export -r Branch project-name
一旦我导出了这两个分支,我使用BeyondCompare比较了这两个文件夹。这似乎给了我所需的结果。
英文:
Needed to do something quick and with very limited knowledge of CVS and GIT and having to deal with a repo that contains hundred of projects, did a kludge like the following:
export CVSROOT=:pserver:user@cvsserver.com:/path/to/cvsrep
cvs login
cvs export -r HEAD project-name
cvs export -r Branch project-name
Once I had both branches exported, used BeyondCompare to compare the 2 folders. That seems to be give me what I need.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论