hg convert from svn

Patrick Mézard pmezard at gmail.com
Wed Jan 23 23:02:38 UTC 2008


Patrick Mézard a écrit :
> Vadim Lebedev a écrit :
>> How do i know whcih revision is problematic?
> 
> Well, you can look at the last converted revision log with --debug and read the "extra" field, then try to look at the next one in svn log. Or apply:
> 
> diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py
> --- a/hgext/convert/convcmd.py
> +++ b/hgext/convert/convcmd.py
> @@ -253,6 +253,8 @@
>                  # 'utf-8'
>                  desc = desc.decode('utf-8').encode(orig_encoding, 'replace')
>                  self.ui.status("%d %s\n" % (num, desc))
> +                rev = c.decode('utf-8').encode(orig_encoding, 'replace')
> +                self.ui.note(_("source: %s\n" % rev))
>                  self.copy(c)
>  
>              tags = self.source.gettags()
> 
> And run with --verbose.

Sorry, this patch makes debugging easier, but not in your case since the conversion crashes before converting a single revision. Running --debug would have been more useful. The converter is confused by the following rename sequence (I was too):

------------------------------------------------------------------------
r5192 | ncouturier | 2006-04-27 14:59:39 +0200 (Jeu, 27 avr 2006) | 1 line
Changed paths:
   A /wengophone-ng/branches/wifo-plugin (from /wengophone-ng/trunk/wifo:5191)

Creation of new branch for implementing plugins in phapi 
------------------------------------------------------------------------

------------------------------------------------------------------------
r4011 | tanguy_k | 2006-01-26 10:57:41 +0100 (Jeu, 26 jan 2006) | 1 line
Changed paths:
   A /wengophone-ng/trunk/wifo (from /wengophone-ng/wifo:4010)
   D /wengophone-ng/wifo

Moved remotely
------------------------------------------------------------------------

------------------------------------------------------------------------
r4008 | tanguy_k | 2006-01-26 10:56:48 +0100 (Jeu, 26 jan 2006) | 1 line
Changed paths:
   A /wengophone-ng/trunk

Created folder remotely
------------------------------------------------------------------------

------------------------------------------------------------------------
r4007 | tanguy_k | 2006-01-26 10:56:39 +0100 (Jeu, 26 jan 2006) | 1 line
Changed paths:
   D /trunk
   A /wengophone-ng (from /trunk:4006)

Renamed remotely
------------------------------------------------------------------------


I managed to reproduce it in a test script, but it's not solved yet.

--
Patrick Mézard



More information about the Mercurial mailing list