Mercurial > hgsubversion
changeset 1567:4442a2f42843
hgsubversion: work around loss of demandimport alias
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sat, 26 May 2018 17:33:10 -0400 |
parents | c28c757ffe16 |
children | 6afe15125065 |
files | hgsubversion/__init__.py |
diffstat | 1 files changed, 17 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/__init__.py +++ b/hgsubversion/__init__.py @@ -32,14 +32,24 @@ from mercurial import help from mercurial import hg from mercurial import localrepo from mercurial import util as hgutil -from mercurial import demandimport -demandimport.ignore.extend([ - 'svn', - 'svn.client', - 'svn.core', - 'svn.delta', - 'svn.ra', +try: + from mercurial import demandimport + demandimport.ignore.extend([ + 'svn', + 'svn.client', + 'svn.core', + 'svn.delta', + 'svn.ra', ]) +except (ImportError, AttributeError): + from hgdemandimport import demandimport + demandimport.ignores |= { + 'svn', + 'svn.client', + 'svn.core', + 'svn.delta', + 'svn.ra', + } from mercurial import revset from mercurial import subrepo