Mercurial > hg > trac > jungle > src > mercurial-plugin
changeset 11:45f04cd0ada8 0.12
Add support for Mercurial 2.3+ (post- hg:1ac628cd7113)
author | Christian Boos <cboos@edgewall.org> |
---|---|
date | Mon, 17 Sep 2012 11:54:00 +0200 |
parents | dcdc4d05f5fa |
children | 62e59cafa3de 89d0599cbded |
files | setup.cfg setup.py tracext/hg/backend.py |
diffstat | 3 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.cfg Tue Sep 11 14:45:13 2012 +0200 +++ b/setup.cfg Mon Sep 17 11:54:00 2012 +0200 @@ -1,5 +1,5 @@ [egg_info] -tag_build = dev +tag_build = tag_svn_revision = true [extract_messages]
--- a/setup.py Tue Sep 11 14:45:13 2012 +0200 +++ b/setup.py Mon Sep 17 11:54:00 2012 +0200 @@ -39,7 +39,7 @@ install_requires='Trac >=0.12dev-r9125', description='Mercurial plugin for Trac multirepos branch', keywords='trac scm plugin mercurial hg', - version='0.12.0.29', + version='0.12.0.30', url=TracMercurial, license='GPL', author='Christian Boos',
--- a/tracext/hg/backend.py Tue Sep 11 14:45:13 2012 +0200 +++ b/tracext/hg/backend.py Mon Sep 17 11:54:00 2012 +0200 @@ -85,9 +85,12 @@ hg_import_error = "Couldn't import symbols: "+','.join(hg_import_error) # Mercurial versions >= 1.2 won't have mercurial.repo.RepoError anymore - from mercurial.repo import RepoError + try: + from mercurial.repo import RepoError + except ImportError: # Mercurial 2.3.1 doesn't even have mercurial.repo! + RepoError = None from mercurial.revlog import LookupError as HgLookupError - if repr(RepoError) == "<unloaded module 'RepoError'>": + if RepoError is None or repr(RepoError) == "<unloaded module 'RepoError'>": from mercurial.error import RepoError, LookupError as HgLookupError # Force local encoding to be non-lossy (#7217)