diff hgext/strip.py @ 41397:0bd56c291359

cleanup: use p1() and p2() instead of parents()[0] and parents()[1] We have had these methods on both contexts and dirstate for a long time now. Differential Revision: https://phab.mercurial-scm.org/D5706
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 25 Jan 2019 23:36:23 -0800
parents 943248e47864
children 8c42b4a3d447
line wrap: on
line diff
--- a/hgext/strip.py	Mon Jan 21 15:29:14 2019 +0000
+++ b/hgext/strip.py	Fri Jan 25 23:36:23 2019 -0800
@@ -39,7 +39,7 @@
     if baserev:
         bctx = repo[baserev]
     else:
-        bctx = wctx.parents()[0]
+        bctx = wctx.p1()
     for s in sorted(wctx.substate):
         wctx.sub(s).bailifchanged(True)
         if s not in bctx.substate or bctx.sub(s).dirty():