AccuRev: How To Replace Entire File Contents?

0 Likes

YouTube Video - Replace Entire File Contents

How To Replace Entire File Contents?

PROBLEM/ABSTRACT:

There's currently a file that's already being managed by AccuRev. You have to put a completely new revision of the file in place, how do I do that?

SOLUTION:

The answer is simple, replace the file's content, two examples are below, then issue and AccuRev keep command.

  1. To replace the entire contents of the file you can open the file in an editor of your choice, select all and delete, then copy/paste from some other file with the updated content.
  2. Or you can simply remove the file with an OS command, then with another OS command move the new file in place of the one just removed.

After either of the above have been done, then a simple AccuRev keep is all that is needed. Using these steps preserves the AccuRev file history, an SCM best practice. This allows anyone to look back, some time in the future,  and see that the entire file's contents was changed and by whom.

If you were to move, defunct and then add a new version of the same file, the AccuRev history becomes disjoint; the old history fades away and the new file's history starts anew. Within any SCM system this is generally not a good practice and should be avoided.

 

Comment List
Anonymous
Related Discussions
Recommended