# HG changeset patch # User Thomas Arendsen Hein # Date 1186473381 -7200 # Node ID 792c1d979097b16dd689d1688b1e127c2a5d74e3 # Parent 18abf13064cbcd756f53572b84d8e5b02381c8a5 Replace _ with inst for catching exceptions to not shadow gettext. And removed one _(...) because mercurial.i18n is not yet imported in convert/subversion.py. diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -77,7 +77,7 @@ def get_log_child(fp, url, paths, start, discover_changed_paths, strict_node_history, receiver) - except SubversionException, (_, num): + except SubversionException, (inst, num): pickle.dump(num, fp, protocol) else: pickle.dump(None, fp, protocol) @@ -190,8 +190,7 @@ class convert_svn(converter_source): self.ui.note('found branch %s at %d\n' % (branch, brevnum)) self.heads.append(brev) elif cfgtrunk or cfgbranches: - raise util.Abort(_('trunk/branch layout expected, ' - 'but not found')) + raise util.Abort('trunk/branch layout expected, but not found') else: self.ui.note('working with one branch\n') self.heads = [self.head] @@ -269,7 +268,7 @@ class convert_svn(converter_source): rev = ent.copyfrom_rev tag = path.split('/', 2)[2] tags[tag] = self.revid(rev, module=source) - except SubversionException, (_, num): + except SubversionException, (inst, num): self.ui.note('no tags found at revision %d\n' % start) return tags @@ -607,7 +606,7 @@ class convert_svn(converter_source): self.ui.debug('revision %d has no entries\n' % revnum) continue parselogentry(orig_paths, revnum, author, date, message) - except SubversionException, (_, num): + except SubversionException, (inst, num): if num == svn.core.SVN_ERR_FS_NO_SUCH_REVISION: raise NoSuchRevision(branch=self, revision="Revision number %d" % to_revnum) diff --git a/hgext/convert/transport.py b/hgext/convert/transport.py --- a/hgext/convert/transport.py +++ b/hgext/convert/transport.py @@ -81,7 +81,7 @@ class SvnRaTransport(object): self.ra = svn.client.open_ra_session( self.svn_url.encode('utf8'), self.client, self.pool) - except SubversionException, (_, num): + except SubversionException, (inst, num): if num in (svn.core.SVN_ERR_RA_ILLEGAL_URL, svn.core.SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED, svn.core.SVN_ERR_BAD_URL):