Mark Replaced

Use Modify|Mark Replaced to mark modified files or a directory as replaced, see Common Primary File States for details.

Marking modified files or a directory as replaced does not affect the contents of the files or directories, but only the meaning of the commit and the history of the directory/files. This can be useful to express that the content of a directory/files is not related to its previous revision. The Log of such a directory/files will not go beyond the replacement revision, meaning that the directory/files has been created at that revision.


For example, we have a Java interface and one implementing class As the result of a refactoring, we are getting rid of the interface and rename the class to This results in a removed file and a modified file

When simply committing these changes, this would mean that the class has been removed and the interface has been changed to a class, with no history except of that one of the interface.

Taking a closer look at this situation, it would be better to do a commit meaning that the interface has been removed and the class has been renamed to At least that was the intention of our refactoring and it would also mean to preserve the history of for

To achieve this, we will use Mark Replaced on and then we will use Move on and, performing a ‘post-move’ between both files (for details refer to Move), yielding a removed and a replaced, which has its history (Copy From) set to