Move a file in CVS without resetting the revision number

前端 未结 6 709
谎友^
谎友^ 2021-02-08 13:24

Lately I\'ve be moving source files around in our source tree. For example placing a bunch of files into a common assembly. I\'ve been doing this my deleting the file from CVS

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-08 13:27

    It seems to keep the version history you haver to use the -v option when moving see below

    CVS renaming of files is cumbersome. To the repository point of view, you just can delete files or add new ones. So, the usual process is

    mv oldfile.c newfile.c cvs delete oldfile.c cvs add newfile.c

    This does work, but you lose all the change information you care to wrote in commit operations during years of hard development and that is probably not what you want. But there is a way; you must have direct access to the repository. First, go there, find the directory where your project is and do the following:

    cp oldfile.c,v newfile.c,v

    now go to your working directory and do a cvs update ; newfile.c will appear as a new file. Now you can cvs delete oldfile.c and commit.

提交回复
热议问题