Mercurial > hg-stable
comparison hgext/uncommit.py @ 41419: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 | fe83040400b7 |
children | 83d294c71f1e |
comparison
equal
deleted
inserted
replaced
41418:3461814417f3 | 41419:0bd56c291359 |
---|---|
65 return None | 65 return None |
66 | 66 |
67 files = (initialfiles - exclude) | 67 files = (initialfiles - exclude) |
68 # return the p1 so that we don't create an obsmarker later | 68 # return the p1 so that we don't create an obsmarker later |
69 if not keepcommit: | 69 if not keepcommit: |
70 return ctx.parents()[0].node() | 70 return ctx.p1().node() |
71 | 71 |
72 # Filter copies | 72 # Filter copies |
73 copied = copiesmod.pathcopies(base, ctx) | 73 copied = copiesmod.pathcopies(base, ctx) |
74 copied = dict((dst, src) for dst, src in copied.iteritems() | 74 copied = dict((dst, src) for dst, src in copied.iteritems() |
75 if dst in files) | 75 if dst in files) |