# HG changeset patch # User Augie Fackler # Date 1389974878 18000 # Node ID 7635d30effa76969e4f6fd969106cfa6329c96a1 # Parent 4a92eb1484ba054a67af8669d862ff720f0a5731 layouts: add importerror ladder so hgsubversion works as an installed module diff --git a/hgsubversion/layouts/detect.py b/hgsubversion/layouts/detect.py --- a/hgsubversion/layouts/detect.py +++ b/hgsubversion/layouts/detect.py @@ -25,7 +25,10 @@ def layout_from_subversion(svn, revision """ # import late to avoid trouble when running the test suite - from hgext_hgsubversion import svnwrap + try: + from hgext_hgsubversion import svnwrap + except ImportError: + from hgsubversion import svnwrap try: rootlist = svn.list_dir('', revision=revision)