Mercurial > hg
changeset 13876:10c7d92ac482
dirstate: add p1/p2 convenience methods
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 04 Apr 2011 15:52:55 -0500 |
parents | ff3c683eb8ff |
children | 653121e6941f |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Mon Apr 04 15:30:54 2011 -0500 +++ b/mercurial/dirstate.py Mon Apr 04 15:52:55 2011 -0500 @@ -203,6 +203,12 @@ def parents(self): return [self._validate(p) for p in self._pl] + def p1(self): + return self._validate(self._pl[0]) + + def p2(self): + return self._validate(self._pl[1]) + def branch(self): return encoding.tolocal(self._branch)