Renaming Working Copy Items

Rename items in a working copy using one of the following methods:

  1. Select the item to rename and then single-click the item to start editing the name
  2. Select the item to rename and press the Return (⏎) key.
  3. Confirm the pressing the Return (⏎) key or clicking on another item in the browser.
  4. You can cancel the rename at any time by pressing the Escape (⎋) key.

Subversion implements a rename as a move operation. As a result, the original file is marked for deletion and added to the working copy with the new name.

Undoing a Rename

You can use the Revert function to undo a rename using the following steps:

  1. Select the original file which was scheduled for deletion and revert it to the BASE version using the Revert function. The file is restored to the BASE version and is no longer scheduled for deletion.
  2. Select the file that is scheduled for addition to the repository and remove the file using the Delete function.

Committing a Rename

In order to preserve the rename operation correctly in the repository’s history, it is recommended that you commit both the deleted and added items at the same time.

Repairing a Broken Rename

Generally speaking, a working copy item should always be moved or renamed using a Subversion client such as Cornerstone. This allows Subversion to track the change and ensure that the history of the item is not lost.

However, some tools may automatically rename items in a manner that the user has no control over. Such untracked renames confuse Subversion: it interprets the original item as missing and the new item as unversioned. This applies both to renames and moves (renames are just a special type of move where the original and new locations are in the same folder).

Cornerstone provides the Repair Broken Rename command that can be used to fix broken renames by telling Subversion that a pair of missing and unversioned files should be interpreted as a rename.

To repair a broken rename:

  1. Select both the missing and unversioned files in the working copy. The CHANGED filter can be used to locate these items.
  2. These should be the only files selected.
  3. Select Repair Broken Rename from the Working Copy menu or click the button in the browser's toolbar:

    Repair

The title of the repair command is Repair Broken Move when the missing and unversioned items are located in different folders.