mercurial/localrepo.py
changeset 3196 1605e336d229
parent 3127 81da3c45aabd
child 3197 ff15ba23c1cf
equal deleted inserted replaced
3163:a9e75b371315 3196:1605e336d229
   318             f = f[1:]
   318             f = f[1:]
   319         return filelog.filelog(self.opener, f, self.revlogversion)
   319         return filelog.filelog(self.opener, f, self.revlogversion)
   320 
   320 
   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 
       
   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]
   323 
   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."""
   327         return context.filectx(self, path, changeid, fileid)
   338         return context.filectx(self, path, changeid, fileid)