This project is read-only.

Renaming folder across source control

Jan 7, 2011 at 7:08 PM

I'm renaming a few folders to match the project names better. I can only imagine this is going to cause trouble when the outstanding branches are merged. Is there better support for folder renaming that I am overlooking?

Jan 7, 2011 at 7:16 PM

Yes.  When working with mercurial, you want to move the files smartly.  That is, if you use your standard windows directory to cut and paste you will create a new entry in the repository, which takes up much more memory and will lose the history of previous changes.

Step1) Create the new folder structure as you need it to appear.

Step2) Select and right click on the old files in windows explorer.

Step 3) Under the TortoiseHG heading choose "View File Status"

Step 4) Click the Move Button

Step 5) Open up the solution in visual studio (it will report exception from not being able to find the project)

Step 6) remove the old dead link from the project

Step 7) Add and existing project to the solution to add the moved code back into your project.

Ted

 

Jan 7, 2011 at 7:24 PM
I've tried about 3 different variants of this and the move button is not enabled (step 4). Or it throws and error about needing clean files.
Jan 7, 2011 at 7:51 PM

You cannot have local changes before making a move.  Be sure to commit everything first.  Not sure if that is your exception, but we would generally like to keep the history.  Not as critical for something like the Demo project however, so in an emergency you can just move that one manually.

Ted