Commit 646d3fc1 authored by Javier Merino Cacho's avatar Javier Merino Cacho

Fix "some commands (like clone) fail" by adding patch...

Fix "some commands (like clone) fail" by adding patch from_upstream__layouts_fix_crash_when_importing_hgext_hgsubversion.patch (Closes: #742080)
parent 1b953110
hgsubversion (1.6-0.3) UNRELEASED; urgency=medium
* Non-maintainer upload.
* Fix "some commands (like clone) fail" by adding patch
from_upstream__layouts_fix_crash_when_importing_hgext_hgsubversion.patch
(Closes: #742080)
-- Javi Merino <vicho@debian.org> Sat, 22 Mar 2014 15:26:51 +0000
hgsubversion (1.6-0.2) unstable; urgency=medium
* Non-maintainer upload.
......
From: Sean Farley <sean.michael.farley@gmail.com>
Bug: https://bugs.debian.org/742080
Origin: upstream, https://bitbucket.org/durin42/hgsubversion/commits/0f16e11b2c2bccb2f92d5f9a741d031eac344769?at=default
Subject: layouts: fix crash when importing hgext_hgsubversion
This change was introduced in 4a92eb1484ba and fixed importing issues for
mercurial < 2.8. Unfortunately, this broke imports for newer versions of
mercurial that have hgsubversion installed in sys.path.
We now wrap the import in a try-block to catch this ImportError.
diff --git a/hgsubversion/layouts/standard.py b/hgsubversion/layouts/standard.py
--- a/hgsubversion/layouts/standard.py
+++ b/hgsubversion/layouts/standard.py
@@ -57,7 +57,12 @@ class StandardLayout(base.BaseLayout):
def taglocations(self, meta_data_dir):
# import late to avoid trouble when running the test suite
- from hgext_hgsubversion import util
+ try:
+ # newer versions of mercurial >= 2.8 will import this because the
+ # hgext_ logic is already being done in core
+ from hgsubversion import util
+ except ImportError:
+ from hgext_hgsubversion import util
if self._tag_locations is None:
from_upstream__layouts_fix_crash_when_importing_hgext_hgsubversion.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment