Show More
@@ -101,6 +101,14 b' class changectx(object):' | |||
|
101 | 101 | """return contexts for each parent changeset""" |
|
102 | 102 | return self._parents |
|
103 | 103 | |
|
104 | def p1(self): | |
|
105 | return self._parents[0] | |
|
106 | ||
|
107 | def p2(self): | |
|
108 | if len(self._parents) == 2: | |
|
109 | return self._parents[1] | |
|
110 | return changectx(self._repo, -1) | |
|
111 | ||
|
104 | 112 | def children(self): |
|
105 | 113 | """return contexts for each child changeset""" |
|
106 | 114 | c = self._repo.changelog.children(self._node) |
@@ -750,6 +758,9 b' class memctx(object):' | |||
|
750 | 758 | def __getitem__(self, key): |
|
751 | 759 | return self.filectx(key) |
|
752 | 760 | |
|
761 | def p1(self): return self._parents[0] | |
|
762 | def p2(self): return self._parents[1] | |
|
763 | ||
|
753 | 764 | def user(self): return self._user or self._repo.ui.username() |
|
754 | 765 | def date(self): return self._date |
|
755 | 766 | def description(self): return self._text |
@@ -800,4 +811,3 b' class memfilectx(object):' | |||
|
800 | 811 | def isexec(self): return 'x' in self._flags |
|
801 | 812 | def islink(self): return 'l' in self._flags |
|
802 | 813 | def renamed(self): return self._copied |
|
803 |
General Comments 0
You need to be logged in to leave comments.
Login now