changeset 1338:356460fb01fa

Merge with stable.
author Augie Fackler <raf@durin42.com>
date Wed, 08 Jul 2015 16:11:00 -0400
parents c7d067c174b8 (current diff) 0f1f88e71138 (diff)
children db9d85618d3d
files hgsubversion/wrappers.py
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -516,7 +516,8 @@ def pull(repo, source, heads=[], force=F
     else:
         ui.status("pulled %d revisions\n" % revisions)
 
-def exchangepull(orig, repo, remote, heads=None, force=False, bookmarks=()):
+def exchangepull(orig, repo, remote, heads=None, force=False, bookmarks=(),
+                 opargs=None):
     capable = getattr(remote, 'capable', lambda x: False)
     if capable('subversion'):
         # transaction manager is present in Mercurial >= 3.3
@@ -537,7 +538,13 @@ def exchangepull(orig, repo, remote, hea
             else:
                 pullop.releasetransaction()
     else:
-        return orig(repo, remote, heads, force, bookmarks=bookmarks)
+        if opargs is not None:
+            # hg 3.5
+            return orig(
+                repo, remote, heads, force, bookmarks=bookmarks, opargs=opargs)
+        else:
+            # hg 3.4
+            return orig(repo, remote, heads, force, bookmarks=bookmarks)
 
 def rebase(orig, ui, repo, **opts):
     """rebase current unpushed revisions onto the Subversion head
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -513,8 +513,8 @@ class TestBase(unittest.TestCase):
             i18n._ugettext = self.oldugettext  # Mercurial >= 3.2
         except AttributeError:
             i18n.t = self.oldt
-        rmtree(self.tmpdir)
         os.chdir(self.oldwd)
+        rmtree(self.tmpdir)
         setattr(ui.ui, self.patch[0].func_name, self.patch[0])
 
         _verify_our_modules()