Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
41396:3461814417f3 | 41397:0bd56c291359 |
---|---|
334 prunedactions = {} | 334 prunedactions = {} |
335 | 335 |
336 if branchmerge: | 336 if branchmerge: |
337 # If we're merging, use the wctx filter, since we're merging into | 337 # If we're merging, use the wctx filter, since we're merging into |
338 # the wctx. | 338 # the wctx. |
339 sparsematch = matcher(repo, [wctx.parents()[0].rev()]) | 339 sparsematch = matcher(repo, [wctx.p1().rev()]) |
340 else: | 340 else: |
341 # If we're updating, use the target context's filter, since we're | 341 # If we're updating, use the target context's filter, since we're |
342 # moving to the target context. | 342 # moving to the target context. |
343 sparsematch = matcher(repo, [mctx.rev()]) | 343 sparsematch = matcher(repo, [mctx.rev()]) |
344 | 344 |