# HG changeset patch # User Gregory Szorc # Date 1520227087 18000 # Node ID 66651ec259eaa7492dcef822ce6a46d073bbd07f # Parent 43815d87c6aad8a9b529706f97813c3993d87a4f commands: don't check for merge.update() truthiness AFAICT ``stats`` is always a tuple in these cases. We don't need to check if the variable has a truthy value. Differential Revision: https://phab.mercurial-scm.org/D2691 diff -r 43815d87c6aa -r 66651ec259ea hgext/rebase.py --- a/hgext/rebase.py Wed Mar 07 19:57:50 2018 -0800 +++ b/hgext/rebase.py Mon Mar 05 00:18:07 2018 -0500 @@ -488,7 +488,7 @@ with ui.configoverride(overrides, 'rebase'): stats = rebasenode(repo, rev, p1, base, self.collapsef, dest, wctx=self.wctx) - if stats and stats[3] > 0: + if stats[3] > 0: if self.wctx.isinmemory(): raise error.InMemoryMergeConflictsError() else: diff -r 43815d87c6aa -r 66651ec259ea mercurial/commands.py --- a/mercurial/commands.py Wed Mar 07 19:57:50 2018 -0800 +++ b/mercurial/commands.py Mon Mar 05 00:18:07 2018 -0500 @@ -2306,7 +2306,7 @@ finally: repo.ui.setconfig('ui', 'forcemerge', '', 'graft') # report any conflicts - if stats and stats[3] > 0: + if stats[3] > 0: # write out state for --continue nodelines = [repo[rev].hex() + "\n" for rev in revs[pos:]] repo.vfs.write('graftstate', ''.join(nodelines))