diff hgext/histedit.py @ 41399:5cb8158a61f7

cleanup: use p1() instead of parents() when we only need the first parent Differential Revision: https://phab.mercurial-scm.org/D5708
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 25 Jan 2019 23:22:23 -0800
parents 0bd56c291359
children 11c076786d56
line wrap: on
line diff
--- a/hgext/histedit.py	Fri Jan 25 23:43:11 2019 -0800
+++ b/hgext/histedit.py	Fri Jan 25 23:22:23 2019 -0800
@@ -1459,7 +1459,7 @@
                 'exactly one common root'))
         root = rr[0].node()
 
-        topmost, empty = repo.dirstate.parents()
+        topmost = repo.dirstate.p1()
         revs = between(repo, root, topmost, keep)
         if not revs:
             raise error.Abort(_('%s is not an ancestor of working directory') %
@@ -1873,7 +1873,7 @@
     cmdutil.checkunfinished(repo)
     cmdutil.bailifchanged(repo)
 
-    topmost, empty = repo.dirstate.parents()
+    topmost = repo.dirstate.p1()
     if outg:
         if freeargs:
             remote = freeargs[0]