Show More
@@ -87,6 +87,11 b' class basectx(object):' | |||||
87 | def p1(self): |
|
87 | def p1(self): | |
88 | return self._parents[0] |
|
88 | return self._parents[0] | |
89 |
|
89 | |||
|
90 | def p2(self): | |||
|
91 | if len(self._parents) == 2: | |||
|
92 | return self._parents[1] | |||
|
93 | return changectx(self._repo, -1) | |||
|
94 | ||||
90 | class changectx(basectx): |
|
95 | class changectx(basectx): | |
91 | """A changecontext object makes access to data related to a particular |
|
96 | """A changecontext object makes access to data related to a particular | |
92 | changeset convenient. It represents a read-only context already presnt in |
|
97 | changeset convenient. It represents a read-only context already presnt in | |
@@ -248,11 +253,6 b' class changectx(basectx):' | |||||
248 | def hidden(self): |
|
253 | def hidden(self): | |
249 | return self._rev in repoview.filterrevs(self._repo, 'visible') |
|
254 | return self._rev in repoview.filterrevs(self._repo, 'visible') | |
250 |
|
255 | |||
251 | def p2(self): |
|
|||
252 | if len(self._parents) == 2: |
|
|||
253 | return self._parents[1] |
|
|||
254 | return changectx(self._repo, -1) |
|
|||
255 |
|
||||
256 | def children(self): |
|
256 | def children(self): | |
257 | """return contexts for each child changeset""" |
|
257 | """return contexts for each child changeset""" | |
258 | c = self._repo.changelog.children(self._node) |
|
258 | c = self._repo.changelog.children(self._node) |
General Comments 0
You need to be logged in to leave comments.
Login now