如何在CVS中将整个项目还原为较早的标签? [英] How can I revert a whole project to an earlier tag in CVS?

查看:89
本文介绍了如何在CVS中将整个项目还原为较早的标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含数千个文件的对象。我进行了一些更改,几乎影响了一半的文件。更改包括编辑现有文件以及添加新文件和目录。

I have a poject that has thousands of files. I made some changes that affected almost half of the files. the changes included editing existing files and adding new files and directories.

我需要还原所有这些更改并将项目恢复到原来的状态。在完成所有操作之前,我已经创建了一个标签,但是我不确定如何从标签中还原整个项目

I need to revert all these changes and restore the project to how it was. I have created a tag before doing all this but I am not sure how I can restore the whole project from the tag

推荐答案

这不幸的是CVS尤其不擅长这种事情。

This is unfortunately the kind of thing that CVS is particularly not good at.

我不认为您会丢失大型提交(*)的历史记录,而是想提交与原始更改相反的内容(a 在某些SCM术语中还原

I do not believe that you can lose the history of your big commit (*) but rather you want to commit the reverse of your original changes (a revert in some SCM's terminology).

我建议使用非CVS工具来确定需要执行的操作,然后再执行

I recommend using non-CVS tools to determine what needs to be done and then just do the commits in CVS.


  • 已签出两个工作区。一个签出到分支/ HEAD,另一个签出到标签。

  • 在每个工作区中创建文件列表并进行适当的比较(不是 cvs diff ,只是常规的 diff comm 或您想要的任何东西)即可获得三个列表:现在需要添加和删除的文件。

  • 进行一些比较以找出需要修改的文件。

  • cvs添加需要添加的文件。 (不确定重新添加文件时是否需要 -kb ,但不一定,但是我不确定。)

  • cvs rm 需要删除的文件。

  • 复制需要修改的文件,然后 cvs commit -R

  • Have two workspaces checked out. One checked out to the branch/HEAD and the other checked out to your tag.
  • Create lists of files in each workspace and do the appropriate diffs (not cvs diff, just regular diff or comm or whatever you want for this) to get three lists: files you now need to Add and Delete.
  • Do some diffs to find out what files you need to modify.
  • cvs add the files that need adding. (Not sure if -kb is necessary when re-adding a file, probably not, but I'm not certain.)
  • cvs rm the files that need deleting.
  • Copy over the ones that need modifying and cvs commit -R them all at once.

如果您的日志文件包含原始大提交的详细信息,您还可以使用它来创建添加/删除/修改命令的列表。

If you have a log file that contain the details of your original big commit, you could also use that to create your list of add/delete/modify commands.

(*)嗯,您可能可以一个一个地使用 cvs管理员删除新文件版本,但我认为这根本不建议。

(*) Well, you could probably one-by-one use cvs admin to remove the new file versions, but I do not think that is advisable at all.

这篇关于如何在CVS中将整个项目还原为较早的标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆