ANN: yasvn2hg -- yet another SVN to HG converter

Eric M. Hopper hopper at omnifarious.org
Thu May 3 09:15:04 CDT 2007


On Tue, 2007-05-01 at 00:10 -0400, Daniel Holth wrote:
> I saw some funny stuff in some of the other scripts "check out
> random-svn-repository at 4503 for a weird case" etc. We can run
> Subversion's own regression tests and tell them not to clean up, but
> we can also generate all the challenging cases (with small files) and
> use "svndump" to provide a convenient, less-than-348-megabyte (The
> Subversion Repository) test corpus. I have my own little test case
> already. There are even some more tricky things that can happen in a
> Subversion repository, but can only be done to it with the API (not
> with working copy manipulations followed by commit).

One thing that stopped me from even attempting to implement copies was
that some Subversion repositories have copies of old versions of a file.
And since Subversion records a copy of a current file as being from the
most recent version in which a file changed, detecting that a copy is
copying an old version is a pain.  So I punted and complain when
converting a version that has any sort of copy and let the user do it by
hand.

Mercurial's data structures are capable of recording a copy of an old
version.  But the command line interface isn't capable of making it
happen.

Another problem that is not on your list of features is merges.  As far
as I can tell there are several different ways merges get recorded in
Subversion.  I don't know if there is any canonical way at this point.

As for a data structure to represent a Subversion history, I just used
an elementtree DOM of the output of svn log --xml.

I thought of using the Subversion API, but it looked too complicated.
Maybe if I pulled code from Trac I could do it.

Have fun (if at all possible),
-- 
The best we can hope for concerning the people at large is that they
be properly armed.  -- Alexander Hamilton
-- Eric Hopper (hopper at omnifarious.org  http://www.omnifarious.org/~hopper) --
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: This is a digitally signed message part
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20070503/02603cb1/attachment.pgp 


More information about the Mercurial-devel mailing list