Hg convert - attempt to move a directory from one repo to another

So I have a directory called flash . I would like to completely move it from an existing Mercurial repo located in ~/wdm to another existing Mercurial repo located in ~/wdm-js .

I was told that this is possible with hg convert , but I really don't know how this works. I tried the following, but I think something is wrong with me.

Having read the hg envelope for Mercurial documents , I created a map file that reads as follows:

 include flash 

Then I went to ~ / wdm and ran the following command:

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

I saw the output load 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 pretty promising. But when I look at wdm-js, there is no flash directory there. And not one of the flash directory files has moved from the wdm directory. And the hg status both repositories is no different.

Do I need to copy the flash directory manually, and hg add / hg remove all the files manually for both repositories?

Or ... if it was done for me, which means that I ruined something?

+4
source share
2 answers

hg convert does not update the working directory in the target repository (it leaves it in the original zero version), so hg update see the files there. In addition, as you run it, it copies the files; you can either remove them from the original repository using hg forget , or hg remove , or use hg convert again using the file with the line:

 exclude flash 
+4
source

To copy to an existing repository, you first need to copy the flash folder to the new repository, as you did, using the convert command, and then transfer the changes from the new repository to the existing target repository.

-1
source

All Articles