Move a file in CVS without resetting the revision number

前端 未结 6 710
谎友^
谎友^ 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:49

    The generally accepted way to achieve this effect is to perform the following steps. The technical term for this is a repocopy.

    1. Login on the server hosting the CVS repository and copy (don't move) the repository file from the location you want it to the new location.
    2. On the client side cvs delete the file from the old location.
    3. On the client side cvs update the directory contents in the new location (so that the file will appear there).
    4. On the client side perform a forced cvs commit (using the -f flag) of the copied file to log the fact that it was repocopied (add a log comment to that effect).

    This procedure maintains the file history in its new location, and also doesn't break the backward continuity of the repository. If you move back in time, the file will correctly appear in its old location. You can also use the same procedure to rename a file.

提交回复
热议问题