Commits

maugustin  committed bab9809

fix promptchoice call, since it changed in mercurial 2.7 (change c58b6ab4c26f)

  • Participants
  • Parent commits 0f16e11
  • Branches stable

Comments (0)

Files changed (1)

File hgsubversion/svnrepo.py

         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: