mqext: Make compatible with hg-3.0.1+.
authorSteve Fink <sfink@mozilla.com>
Fri, 15 Aug 2014 09:42:19 -0700
changeset 916 728e98cd7f5fa9ebb4fade7349ba4930c53f818c
parent 915 086c1ad25d16633d41e835cc2b5ec4971b276b24
child 917 42b4b8f97dfa9ff7227e99ff52d3dacce0cc65ce
push id128
push usersfink@mozilla.com
push dateFri, 15 Aug 2014 16:42:36 +0000
treeherderversion-control-tools@728e98cd7f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
mqext: Make compatible with hg-3.0.1+.
hgext/mqext/__init__.py
--- a/hgext/mqext/__init__.py
+++ b/hgext/mqext/__init__.py
@@ -83,20 +83,24 @@ import urllib2
 from mercurial.i18n import _
 from mercurial.node import short
 from mercurial import commands, util, cmdutil, mdiff, error, url, patch, extensions, scmutil
 
 from hgext import mq
 from collections import Counter
 
 try:
-    # hg 1.9+
-    from mercurial.scmutil import canonpath
+    # hg 3.0.1+
+    from mercurial.pathutil import canonpath
 except:
-    from mercurial.util import canonpath
+    try:
+        # hg 1.9+
+        from mercurial.scmutil import canonpath
+    except:
+        from mercurial.util import canonpath
 
 bugzilla_jsonrpc_url = "https://bugzilla.mozilla.org/jsonrpc.cgi"
 
 def qshow(ui, repo, patchspec=None, **opts):
     '''display a patch
 
     If no patch is given, the top of the applied stack is shown.'''
     q = repo.mq