[PATCH] [issue2653] Invalid branch names after converting from svn with non-standard trunk name
Kevin Bullock
kbullock+mercurial at ringworld.org
Fri Feb 25 03:40:09 UTC 2011
Whoops, you've got it already. Ignore me. Just caught up on all related threads.
pacem in terris / mir / shanti / salaam / heiwa
Kevin R. Bullock
On 24 Feb 2011, at 9:38 PM, Kevin Bullock wrote:
> On 24 Feb 2011, at 8:53 AM, Pavel Boldin wrote:
>
>> # HG changeset patch
>> # User Pavel Boldin <boldin.pavel at gmail.com>
>> # Date 1298558829 -10800
>> # Node ID e924d9ea5bd6bbb66f38a357decdcd3040d10c4b
>> # Parent 643b8212813e631b5525049fc4321a34a4def105
>> fix for issue2653
>> check if branch is equals to trunk name specified in config.svn.trunk
>
> The format you're looking for is:
>
> convert: check if branch matches trunk name specified in config.svn.trunk (issue2653)
>
> Or perhaps more descriptively, something like:
>
> convert: translate non-standard svn trunk name to 'default' (issue2653)
>
>> diff -r 643b8212813e -r e924d9ea5bd6 hgext/convert/subversion.py
>> --- a/hgext/convert/subversion.py Wed Feb 16 15:02:30 2011 +0100
>> +++ b/hgext/convert/subversion.py Thu Feb 24 17:47:09 2011 +0300
>> @@ -761,7 +761,9 @@
>> author = author and self.recode(author) or ''
>> try:
>> branch = self.module.split("/")[-1]
>> - if branch == 'trunk':
>> + trunkname = self.ui.config('convert', 'svn.trunk') or 'trunk'
>> + trunkname = trunkname.strip('/')
>
> As Augie noted, I believe the better way of calling this is:
>
> trunkname = self.ui.config('convert', 'svn.trunk', 'trunk').strip('/')
>
> pacem in terris / mir / shanti / salaam / heiwa
> Kevin R. Bullock
>
More information about the Mercurial-devel
mailing list