changeset 33848:bc9e075133c9

rebase: remove "state >= revtodo" condition Now the minimal value of state is revtodo, that condition is always true, therefore removed. Differential Revision: https://phab.mercurial-scm.org/D344
author Jun Wu <quark@fb.com>
date Fri, 11 Aug 2017 01:36:59 -0700
parents ddf77c0cc169
children 3ae2eaecb49e
files hgext/rebase.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Fri Aug 11 01:05:47 2017 -0700
+++ b/hgext/rebase.py	Fri Aug 11 01:36:59 2017 -0700
@@ -445,8 +445,7 @@
             else:
                 commitmsg = 'Collapsed revision'
                 for rebased in sorted(self.state):
-                    if rebased not in self.skipped and\
-                       self.state[rebased] >= revtodo:
+                    if rebased not in self.skipped:
                         commitmsg += '\n* %s' % repo[rebased].description()
                 editopt = True
             editor = cmdutil.getcommiteditor(edit=editopt, editform=editform)
@@ -467,8 +466,7 @@
             else:
                 newrev = repo[newnode].rev()
             for oldrev in self.state.iterkeys():
-                if self.state[oldrev] >= revtodo:
-                    self.state[oldrev] = newrev
+                self.state[oldrev] = newrev
 
         if 'qtip' in repo.tags():
             updatemq(repo, self.state, self.skipped, **opts)