diff mercurial/sparse.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 54c3b4bd01f2
children ddbebce94665
line wrap: on
line diff
--- a/mercurial/sparse.py	Mon Jan 21 15:29:14 2019 +0000
+++ b/mercurial/sparse.py	Fri Jan 25 23:36:23 2019 -0800
@@ -336,7 +336,7 @@
     if branchmerge:
         # If we're merging, use the wctx filter, since we're merging into
         # the wctx.
-        sparsematch = matcher(repo, [wctx.parents()[0].rev()])
+        sparsematch = matcher(repo, [wctx.p1().rev()])
     else:
         # If we're updating, use the target context's filter, since we're
         # moving to the target context.