tags:

views:

50

answers:

1

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/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?

A: 

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.
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
...do I have to do anything other the 'hg update' to copy the files over?
AP257
@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.