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.
Example
For example, we have a Java interface
Person.javaand one implementing classPersonImpl.java. As the result of a refactoring, we are getting rid of the interfacePerson.javaand rename the classPersonImpl.javatoPerson.java. This results in a removed filePersonImpl.javaand a modified filePerson.java.When simply committing these changes, this would mean that the class
PersonImpl.javahas been removed and the interfacePerson.javahas been changed to a classPerson.java, 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
Person.javahas been removed and the classPersonImpl.javahas been renamed toPerson.java. At least that was the intention of our refactoring and it would also mean to preserve the history ofPersonImpl.javaforPerson.java.To achieve this, we will use Mark Replaced on
Person.javaand then we will use Move onPerson.javaandPersonImpl.java, performing a ‘post-move’ between both files (for details refer to Move), yielding a removedPersonImpl.javaand a replacedPerson.java, which has its history (Copy From) set toPersonImpl.java.