4

So I have a directory called flash. I'd like to move it totally from an existing Mercurial repo located at ~/wdm to another existing Mercurial repo, located at ~/wdm-js.

I've been told this is possible with hg convert, but I don't really know how this works. I have tried the following, but think I may have got something wrong.

Having read up on the hg convert for Mercurial docs, I've created a filemap, which reads as follows:

include flash

Then I've gone to ~/wdm and run the following command:

$ hg convert . ~/wdm-js --filemap ~/filemap.txt

I've seen a load of output as follows:

scanning source...
sorting...
converting...
413 [doc/design][m]: first stab at a design doc for model (sent to list).
[412 more history items]

So this looks fairly promising. But when I look at wdm-js there is no flash directory there. And none of the flash directory files have moved from the wdm directory. And the hg status of both repos looks no different.

Do I still have to copy the flash directory across manually, and hg add/hg remove all the files manually to both repos?

Or... should this have been done for me, meaning that I have messed up in some way?

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
AP257
  • 89,519
  • 86
  • 202
  • 261

2 Answers2

4

hg convert doesn't update the working directory in the destination repository (it leaves it at the original null revision), so do a hg update there to see the files. Also, the way you ran it, it copies the files; you can either delete them from the original repository via hg forget or hg remove, or use hg convert again using a filemap with the line:

exclude flash
Niall C.
  • 10,878
  • 7
  • 69
  • 61
  • Hm - if I do an 'hg update' in the destination repo, it just says '0 files changed...'. I don't think I ran it right...? – AP257 Sep 08 '10 at 20:15
  • ...do I have to do anything other the 'hg update' to copy the files over? – AP257 Sep 08 '10 at 20:18
  • @AP257: the command line looks OK. Is flash in the root of your repo? If not, you'll need to specify the path to it. – Niall C. Sep 09 '10 at 00:08
0

To copy into existing repository you need first copy flash folder into new repository as you did it with convert command and then push the changes from new repository into existing target repository.

foal
  • 693
  • 7
  • 20