hg convert misses files
Raymond Toy
toy.raymond at gmail.com
Sat May 28 21:08:20 UTC 2011
>>>>> "Scott" == Scott Palmer <swpalmer at gmail.com> writes:
Scott> On 2011-05-28, at 8:57 AM, Raymond Toy wrote:
>>
>> I'm tryin to extract a directory from an hg repo and create a new repo
>> from it. I followed the basic info from
>> http://mercurial.selenic.com/wiki/ConvertExtension, and use
>>
>> hg convert --filemap /tmp/map /path/to/repo/subdir /tmp/subdir-repo
>>
>> where /tmp/map contains
>>
>> include subdir
>> rename subdir .
>>
>> It looks like the conversion succeeds. But when I look at the new
>> repo, it's missing many files.
>>
>> What am I doing wrong with the conversion?
Scott> You should use:
Scott> hg convert --filemap /tmp/map /path/to/repo /tmp/subdir-repo
Thanks to a power failure yesterday, I don't know exactly what command
I used. Some I'm starting over since the conversion doesn't take too long.
However, when I use the command you give above, the resulting repo is
still missing files.
For the record, here is exactly what I'm doing.
# Fresh clone into /tmp.
cd /tmp
hg clone http://clocc.hg.sourceforge.net:8000/hgroot/clocc/clocc
# The file clocc/src/f2cl/src/f2cl7.l exists
# The map file
cat /tmp/f2cl.map
include src/f2cl
rename src/f2cl .
# Do the conversion
hg convert --filemap=f2cl.map /tmp/clocc /tmp/f2cl
# When conversion is done, clone the new repo
hg clone /tmp/f2cl f2cl-new
# Now the file f2cl/src/f2cl7.l doesn't exist. But it is in the
# original clocc/src/f2cl/src directory.
Since the clocc repo is itself a conversion from CVS to mercurial, I
guess I can go back to the CVS version and do the conversion of just
the subdirectory tree I want. (Assuming that the CVS repo still has
the same changes as the hg repo has. I'll have to check to be sure.)
Ray
More information about the Mercurial
mailing list