changeset 1126:cb4dccc90ff1

Merge with stable.
author Augie Fackler <raf@durin42.com>
date Wed, 12 Feb 2014 09:19:03 -0500
parents 99c503cfcc9c (current diff) bab98093051b (diff)
children eaefb3413b87
files hgsubversion/svnrepo.py
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnrepo.py
+++ b/hgsubversion/svnrepo.py
@@ -282,7 +282,15 @@ class SubversionPrompt(object):
         else:
             msg += '(R)eject or accept (t)emporarily? '
             choices = (('&Reject'), ('&Temporarily'))
-        choice = self.ui.promptchoice(msg, choices, default=0)
+        try:
+            choice = self.ui.promptchoice(msg, choices, default=0)
+        except TypeError:
+            # mercurial version >2.6 use a different syntax and method signature
+            msg += '$$ &Reject $$ &Temporarily '
+            if may_save:
+                msg += '$$ &Permanently '
+            choice = self.ui.promptchoice(msg, default=0)
+
         if choice == 1:
             creds = (failures, False)
         elif may_save and choice == 2: