Mercurial > hg-stable
changeset 33902:e5d104c35e51
morestatus: check whether the conflict message is None before printing
There are cases like bisect when the conflict message can be None. So we make
sure that we don't print None in that case.
Thanks to Martin for catching this.
Differential Revision: https://phab.mercurial-scm.org/D461
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 21 Aug 2017 16:43:37 +0530 |
parents | 8d75b9effa07 |
children | 800bb35d891e |
files | mercurial/cmdutil.py tests/test-bisect.t |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Wed Aug 23 01:09:08 2017 +0000 +++ b/mercurial/cmdutil.py Mon Aug 21 16:43:37 2017 +0530 @@ -673,7 +673,8 @@ statemsg = _('The repository is in an unfinished *%s* state.') % state fm.write('statemsg', '%s\n', _commentlines(statemsg), label=label) conmsg = _conflictsmsg(repo) - fm.write('conflictsmsg', '%s\n', conmsg, label=label) + if conmsg: + fm.write('conflictsmsg', '%s\n', conmsg, label=label) if helpfulmsg: helpmsg = helpfulmsg() fm.write('helpmsg', '%s\n', helpmsg, label=label)
--- a/tests/test-bisect.t Wed Aug 23 01:09:08 2017 +0000 +++ b/tests/test-bisect.t Mon Aug 21 16:43:37 2017 +0530 @@ -187,7 +187,6 @@ $ hg status -v # The repository is in an unfinished *bisect* state. - None # To mark the changeset good: hg bisect --good # To mark the changeset bad: hg bisect --bad # To abort: hg bisect --reset