Is there a tool for repairing RCS/CVS ,v files? [closed]

不想你离开。 提交于 2019-12-05 08:28:40
Borislav Sabev

I personally do not recommend manual migration as the process is very time-consuming and there is no way to come out of it with a full data/metadata set in the resulting repo.

There is a tool for migrating CVS to SVN and it is called cvs2svn. It "is a tool for migrating a CVS repository to Subversion, git, or Bazaar". You can refer to this how-to for a quick start advice.

Check this out:

CVS was just a front end to RCS, and the *.v files are really RCS files. Just check them out. eg, if you have foo,v just execute:

co foo

and it will checkout foo from the ,v file.

Also there is an RCS to SVN converter and you can try that one too.

I wrote a Python library, editrcs, that parses RCS files into a tree that can be modified and then written out as a new RCS file. It is not designed to cope with invalid RCS files but could be a reasonable starting point if the corruption is only in the data sections or you modify the library to work around any corrupt metadata.

Also relevant to your particular question:

  1. RCS files store the latest revision of the trunk and diffs going backwards on the trunk. So if the diff for a historic revision is irretrievably corrupt then anything before it may be unusable, or at least wrong, unless you can guess what the change was or it doesn't conflict. (Branches are stored as forward diff from their branchpoint, so whole branches from the point of corruption might be problematic.)

  2. It can be valid to have a gap in the revision numbering, if a revision has been removed from the RCS file using "rcs -o". A bunch of nulls If you've got a bunch of nulls where a revision should be then this is For example:

    # Setup
    echo 1 > test
    echo "initial commit" | ci -l test
    echo 2 >> test
    echo "2" | ci -l test
    echo 3 >> test
    echo "3" | ci -l test
    
    # RCS file contains revisions 1.1, 1.2, 1.3
    rlog test
    
    # Remove revision 1.2
    rcs -o1.2 test
    
    # RCS file now contains revisions 1.1, 1.3
    rlog test
    
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!