0

I choose Mercurial as repo. The root of the project is /Myproject and contains folders /MyProject/src, and /MyProject/res; Now I want to add rename folders in the repository to create another hierarchy:

/MyProject/Server/src
/MyProject/Server/res
/MyProject/Client/a
/MyProject/Client/b

How can I do this in MercurialEclipse plugin, without using hg rename commands in terminal?

Philippe Carriere
  • 3,712
  • 4
  • 25
  • 46
gcrav
  • 89
  • 1
  • 3
  • 10

2 Answers2

2

From the command line that's:

hg rename src Server/src
hg rename red Server/res
hg commit -m 'moved res and src into Server'

presumably you can do that in MercurialEclipse too, but maybe it's time to toss the GUI crutches to the side.

Ry4an Brase
  • 78,112
  • 7
  • 148
  • 169
  • ok @Ry4an; sorry for one more question; the following command works without problem? (i'm new on mercury, but is just fear...) hg rename src/A/B/C/*.java (rename all files without lost original names?) – gcrav Jun 12 '11 at 04:41
  • That command won't work without a destination, and it will need to be a directory. Something like `hg rename src/A/B/C/*.java dest/A/B/C` is fine. – Ry4an Brase Jun 13 '11 at 01:44
1

You can just do a Refactor/Rename (Refactor->Rename from a file's context menu, or Alt+Shift+R / +option+R). MercurialEclipse will automatically schedule the relevant changes (removing the old file and adding the new one).

yuji
  • 16,695
  • 4
  • 63
  • 64