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

login
register
mail settings
Submitter phabricator
Date March 15, 2018, 4:55 p.m.
Message ID <c8143855092702b86aca494623dbe118@localhost.localdomain>
Download mbox | patch
Permalink /patch/29547/
State Not Applicable
Headers show

Comments

phabricator - March 15, 2018, 4:55 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2d29e976366a: commands: don&#039;t check for merge.update() truthiness (authored by indygreg, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D2691?vs=6968&id=7069#toc

REPOSITORY
  rHG Mercurial

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

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

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

CHANGE DETAILS




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

Patch

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