Mercurial > hg
changeset 28926:0411b7998d9b
crecord: cleanup the remains of commit confirmation
The confirmation screen is now only used for the 'review' option we simplify
the code and rename the function.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 14 Apr 2016 01:37:29 -0700 |
parents | ee56a86e2782 |
children | 2d433fa7ff44 |
files | mercurial/crecord.py |
diffstat | 1 files changed, 3 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/crecord.py Thu Apr 14 01:27:18 2016 -0700 +++ b/mercurial/crecord.py Thu Apr 14 01:37:29 2016 -0700 @@ -1417,11 +1417,10 @@ return response - def confirmcommit(self, review=False): + def reviewcommit(self): """ask for 'y' to be pressed to confirm selected. return True if confirmed.""" - if review: - confirmtext = ( + confirmtext = ( """if you answer yes to the following, the your currently chosen patch chunks will be loaded into an editor. you may modify the patch from the editor, and save the changes if you wish to change the patch. otherwise, you can just @@ -1432,10 +1431,6 @@ are you sure you want to review/edit and confirm the selected changes [yn]? """) - else: - confirmtext = ( - "are you sure you want to confirm the selected changes [yn]? ") - response = self.confirmationwindow(confirmtext) if response is None: response = "n" @@ -1604,7 +1599,7 @@ elif test and keypressed in ['X']: return True elif keypressed in ["r"]: - if self.confirmcommit(review=True): + if self.reviewcommit(): self.opts['review'] = True return True elif test and keypressed in ['R']: