Mercurial > hg
changeset 13529:9b62cbe81f44
convert/svn: read trunk name once, use None for default
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Thu, 03 Mar 2011 22:19:28 +0100 |
parents | 73bf872a91d8 |
children | 5f69af0d2fb3 |
files | hgext/convert/subversion.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Thu Mar 03 21:42:15 2011 +0100 +++ b/hgext/convert/subversion.py Thu Mar 03 22:19:28 2011 +0100 @@ -259,6 +259,7 @@ except ValueError: raise util.Abort(_('svn: revision %s is not an integer') % rev) + self.trunkname = self.ui.config('convert', 'svn.trunk', 'trunk').strip('/') self.startrev = self.ui.config('convert', 'svn.startrev', default=0) try: self.startrev = int(self.startrev) @@ -761,9 +762,8 @@ author = author and self.recode(author) or '' try: branch = self.module.split("/")[-1] - trunkname = self.ui.config('convert', 'svn.trunk', 'trunk') - if branch == trunkname.strip('/'): - branch = '' + if branch == self.trunkname: + branch = None except IndexError: branch = None