##// END OF EJS Templates
Add localrepo.parents to get parent changectxs.
Matt Mackall -
r3163:1605e336 default
parent child Browse files
Show More
@@ -321,6 +321,17 b' class localrepository(repo.repository):'
321 def changectx(self, changeid=None):
321 def changectx(self, changeid=None):
322 return context.changectx(self, changeid)
322 return context.changectx(self, changeid)
323
323
324 def parents(self, changeid=None):
325 '''
326 get list of changectxs for parents of changeid or working directory
327 '''
328 if changeid is None:
329 pl = self.dirstate.parents()
330 else:
331 n = self.changelog.lookup(changeid)
332 pl = self.changelog.parents(n)
333 return [self.changectx(n) for n in pl if n != nullid]
334
324 def filectx(self, path, changeid=None, fileid=None):
335 def filectx(self, path, changeid=None, fileid=None):
325 """changeid can be a changeset revision, node, or tag.
336 """changeid can be a changeset revision, node, or tag.
326 fileid can be a file revision or node."""
337 fileid can be a file revision or node."""
General Comments 0
You need to be logged in to leave comments. Login now