hg log doesn't follow renames for filenames with spaces

Greg Ward greg-hg at gerg.ca
Wed Dec 9 21:18:33 UTC 2009


On Mon, Dec 7, 2009 at 6:46 PM, Mark Ivey <mark at countlessprojects.com> wrote:
> 1. How can I convert my svn repository when it has this sort of revision in
> it?  Am I right that this is a bug in hg convert?

Sounds like it might be.  Could also be the Subversion API, which hg
convert depends on.

> 2. I'm now a little worried I can't trust the conversion process.

Yeah, conversion is hard.  I recommend verifying the conversion: make
sure that what you checkout of Subversion is exactly what you checkout
of Mercurial.  You could do this for every changeset if you have the
time; ISTR that 'hg convert' writes a file mapping svn revnum <-> hg
changeset ID.  Or you could just do it for selected tags and branch
heads to save time.

(cvs2svn ships with a script that does exactly this for
CVS->Subversion conversion.  As part of writing cvs2hg, I extended
that script so it works for CVS->Mercurial and CVS->Git conversions
too.  You could probably save yourself some time by ripping off my
version of the script and hacking it to validate
Subversion->Mercurial:
http://vc.gerg.ca/hg/cvs2svn/file/tip/contrib/verify-cvs2svn.py.)

> What are
> my options if I find more problems after switching to working only in
> mercurial?

I believe the appropriate expression would be "up s*** creek without a paddle".

> Is there any easy way to fix a repository based on a faulty
> convert?  Can I re-do the hg convert and then merge it with my new
> only-in-hg history somehow?

You can do a lot of magical changes with hg->hg conversion.  But if
you don't trust "hg convert", there's a problem.  Worse, that will
change your changeset IDs, so you would have to get everyone to
reclone your new repo.

> Or would this be difficult, implying that I'd
> better be really, really sure I like the results of the conversion before
> starting to use it?

You got it.  Verify, verify, verify.

Greg



More information about the Mercurial mailing list