Previous Topic: Remove a PathNext Topic: Rename a Path


Rename an Item

In Visual Studio, you can rename files in the local workspace and their corresponding items in the CA Harvest SCM repository.

Note: A rename item process is required. If the CA Harvest SCM administrator has not defined a rename item process and granted you access to run it, you cannot use Visual Studio to rename a file in the CA Harvest SCM repository. For more information about creating processes, see the Administrator Guide. In Release 12.6, you can rename a file in Online mode also without switching to Late Binding mode.

Follow these steps:

  1. In the Solution Explorer, right-click the file that you want to rename, and select Rename.

    You can edit the file name.

  2. Modify the name, and press Enter.

    In Late Binding Mode, the file (or project) and its associated project (or solution) is edited and pending changes view is updated with the same.

    In Online Mode, the file (or project) is renamed and its associated project (or solution) will get checked-out in local workspace and repository. You can commit or undo the changes.

  3. Right-click the project or solution file and select CA Harvest SCM, Commit.

    The item is renamed using the rename item process that is set for your context.

    (Or)

    Right-click the project or solution file and select CA Harvest SCM, Undo.

    The rename operation is undone and the project file is back the previous state.

    Note: A delete version process is required to perform undo. If the CA Harvest SCM administrator has not defined a delete item process and granted you access to run it, you cannot perform undo of rename.

Example:

  1. In this example, the current version of the following project and item is 0.
    Solution 'SolutionABC'
    
    	Project ClassLibraryProject
    
    		Item Class.cs
    
  2. After you rename the item Class.cs, the item (Class.cs) and the project files (ClassLibraryProject) are checked out in the Solution Explorer. The checkout out item and project files displays with version 1 and R-tag in the Harvest SCM Explorer Versions list view.
  3. When you commit and refresh, the checked out item and project files (Class.cs and ClassLibraryProject) now display with version 1 and N-tag in the Harvest SCM Explorer Versions list view.