# HG changeset patch # User Michael Augustin # Date 1391549934 -3600 # Node ID bab98093051b32095ae20663adf507dc859af77b # Parent 0f16e11b2c2bccb2f92d5f9a741d031eac344769 fix promptchoice call, since it changed in mercurial 2.7 (change c58b6ab4c26f) diff --git a/hgsubversion/svnrepo.py b/hgsubversion/svnrepo.py --- a/hgsubversion/svnrepo.py +++ b/hgsubversion/svnrepo.py @@ -286,7 +286,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: