Firefly KB

Q10001 - How to rename a file?

Firefly supports file renaming. Some legacy version control systems implement 'renaming' as a combination of deleting the file and creating a file. That will lost existing versions of the file. Firefly file renaming will increase a version of the file, and does not cause any loss of file history. Existing branch labels that contain the previous versions of this file won't be affected either. To rename a folder, use 'Firefly Move'.

Also it is very easy to perform this operation. For instance, you have a local workspace of project vim under c:\ws\vim, and you want to rename c:\ws\vim\include\sys\config.c to configure.c. Here is how to rename:

Firefly Client GUI

Select the file you want to rename, click menu 'Firefly->Rename', the 'Rename' dialog opens, type the new file name, select a changeset, click 'OK'. You need to submit the changeset to apply this change to parent branch.

Command line

c:\>cd ws\vim\include\sys
c:\ws\vim\include\sys>hff rename config.c configure.c

As a result, you will see that the history of file config.c like this:


figure 1

Just like rename in Unix system, it is a speical move, i.e. moving within a same directory. So in the default comment, you will see Move from include/sys/config.c to include/sys/configure.c instead of a rename.

After a file is renamed and submitted to server, other developers can simply apply this change to their local workspaces by executing Firefly bringover. Firefly has a feature to detect and resolve location conflicts caused by file renaming.

Please note, don't rename the file outside Firefly. If you rename a workspace file in Windows Explorer or dos command shell, Firefly will not be aware of this operation. As a result, you will have a private file and a missing file shown in Firefly Client as figure 2:


figure 2

Applies To

  • Hansky Firefly 3.0