##// END OF EJS Templates
basectx: move p1 from changectx
Sean Farley -
r19557:9f57ebf0 default
parent child Browse files
Show More
@@ -84,6 +84,9 class basectx(object):
84 """return contexts for each parent changeset"""
84 """return contexts for each parent changeset"""
85 return self._parents
85 return self._parents
86
86
87 def p1(self):
88 return self._parents[0]
89
87 class changectx(basectx):
90 class changectx(basectx):
88 """A changecontext object makes access to data related to a particular
91 """A changecontext object makes access to data related to a particular
89 changeset convenient. It represents a read-only context already presnt in
92 changeset convenient. It represents a read-only context already presnt in
@@ -245,9 +248,6 class changectx(basectx):
245 def hidden(self):
248 def hidden(self):
246 return self._rev in repoview.filterrevs(self._repo, 'visible')
249 return self._rev in repoview.filterrevs(self._repo, 'visible')
247
250
248 def p1(self):
249 return self._parents[0]
250
251 def p2(self):
251 def p2(self):
252 if len(self._parents) == 2:
252 if len(self._parents) == 2:
253 return self._parents[1]
253 return self._parents[1]
General Comments 0
You need to be logged in to leave comments. Login now