D2691: commands: don't check for merge.update() truthiness

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Mon Mar 12 18:29:23 EDT 2018


indygreg updated this revision to Diff 6968.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2691?vs=6651&id=6968

REVISION DETAIL
  https://phab.mercurial-scm.org/D2691

AFFECTED FILES
  hgext/rebase.py
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2301,7 +2301,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))
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -486,7 +486,7 @@
                                      '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:



To: indygreg, #hg-reviewers, durin42
Cc: durin42, mercurial-devel


More information about the Mercurial-devel mailing list