Mercurial > hgsubversion
changeset 1125:bab98093051b stable
fix promptchoice call, since it changed in mercurial 2.7 (change c58b6ab4c26f)
author | Michael Augustin <maugustin@gmx.net> |
---|---|
date | Tue, 04 Feb 2014 22:38:54 +0100 |
parents | 0f16e11b2c2b |
children | cb4dccc90ff1 61d4fb78370b |
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 @@ -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: