Mercurial > hg > evolve
changeset 7074:2081f14f408a stable
obslog: clean up a condition and reorder its branches
The `is True` check is discouraged, and we move the tiny branch first for
clarity. This precludes a larger cleanup and refactoring.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 22 Sep 2024 12:06:03 +0200 |
parents | 4169f93969c4 |
children | 7a7450fefc1c |
files | hgext3rd/evolve/obshistory.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/obshistory.py +++ b/hgext3rd/evolve/obshistory.py @@ -680,7 +680,9 @@ _patchavailable = patchavailable(node, repo, nodes, successive=successive) - if _patchavailable[0] is True: + if not _patchavailable[0]: + fm.data(nopatchreason=_patchavailable[1]) + else: diffnode = _patchavailable[1] if successive: @@ -728,8 +730,6 @@ linestart = True ui.write(chunk, label=label) fm.data(patch=ui.popbuffer()) - else: - fm.data(nopatchreason=_patchavailable[1]) def _prepare_hunk(hunk): """Drop all information but the username and patch"""