Mercurial > hg-stable
diff 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 |
line wrap: on
line diff
--- a/hgext/uncommit.py Mon Jan 21 15:29:14 2019 +0000 +++ b/hgext/uncommit.py Fri Jan 25 23:36:23 2019 -0800 @@ -67,7 +67,7 @@ files = (initialfiles - exclude) # return the p1 so that we don't create an obsmarker later if not keepcommit: - return ctx.parents()[0].node() + return ctx.p1().node() # Filter copies copied = copiesmod.pathcopies(base, ctx)