![](https://secure.gravatar.com/avatar/395215a635f89ee4fd6d9dfe8453afae.jpg?s=120&d=mm&r=g)
[Mike -- I'll get back to you on this, but wanted make sure I pinged you before I forget ....]
Barry Warsaw writes:
On May 4, 2007, at 2:21 PM, Stephen J. Turnbull wrote:
I'll take svn2hg via Tailor, since that's what I'm using anyway for XEmacs.
Cool thanks. I'd love to see what you come up with.
OK, I'm 20% through (~svn rev 1500) and it's after 1am, and tomorrow's Sunday/family day, so I'm going to jump the gun a bit and hope it does finish and give me a repo. Report:
I'm now a lot less happy with Mercurial than I was a day ago.
Mercurial tracks only files directly, and represents directories in metadata somehow, apparently ad hoc, and buggily. Operations it handles fine with files cause exceptions leading to abort with directories.
This resulted in a situation (at svn rev 745) where the mailman/cgi directory was removed. hg proceeded to throw a mercurial.util.Abort exception when asked to commit the deletion to the repo, the exception propagated back up to tailor, which then does abort.
I worked around by trapping that particular case and assuming that any Abort at that point was due to file not found.
In the process of analyzing and patching, it became apparent that Mercurial basically just terminates on such unexpected conditions, because Abort was the only exception I found in use! (Granted, this is pretty high-level/ui-oriented stuff, the module is called commands.py. In a UI asking the user to try again is not that unreasonable.)
Worse, the Abort exception takes an error message as an attribute, but translates it via gettext *at initialization*! So there's no way to reliably catch these exceptions, differentiating on the error message. :-(
Tailor logs the svn log message, but the Mercurial repo's "short summaries" just cite the svn rev no. It's possible to get the whole commit message with "hg log -v", but this basically makes the short summary useless. More hacking needed ....
Mercurial still seems like a fine dvcs---obviously these problems don't affect ordinary use. But it would seem risky to extensible or embed.
(BTW, it's 1:36 and I'm up to rev 3890, about halfway. Go, Tailor, go!)
¡Buenas noches!