Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

What is proper method for renaming files or folder in Source Tree - Mercurial - Windows 7?

Noel Dubey September 20, 2013

Currently I rename all files then in Source Tree, it shows all of the old named files as being removed and shows all the new named files. I know on my Apple computer there is a move option on my right click menu. What is the current best practice for renaming folders and files using Mercurial on Windows 7?

4 answers

1 accepted

3 votes
Answer accepted
Noel Dubey September 23, 2013

If there are any changes internal to the files or folders, Source Tree will assume that you have deleted the previous files and are adding new files (that have a different name or different folder name). This causes these renamed files or the files under the renamed folder to lose the revision history linked to that file.

I discovered that as long as you do not have any content changes in the files or folder for a commit, you can rename them with Source Tree understanding that these are the same file by clicking on Add/Remove. It will then show these files as "moved" and retain the history of this file properly.

0 votes
alecazam August 19, 2018

Why is this disabled for multiple select.  This makes renaming folders with lots of items in them very difficult.

0 votes
mitchell_buckley September 3, 2017

There is now a MOVE command that will solve this problem. You can right-click on the file, select Move..., and then choose a new name.

jwwalker September 2, 2019

I don't see a Move command on the right-click menu.

0 votes
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 22, 2013

Same. Just rename the file in the windows explorer. hg or Git will pick it up as a deleted and an add.

Juan December 7, 2018

but then it will think they are different files and won't track it's changes from earlier versions.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events