mercurial/localrepo.py
branchstable
changeset 16551 ebf6d38c9063
parent 16536 63c817ea4a70
child 16624 3f85cef66dcc
child 16679 2950d186a927
equal deleted inserted replaced
16550:0d494a38c586 16551:ebf6d38c9063
   630         return self[changeid]
   630         return self[changeid]
   631 
   631 
   632     def parents(self, changeid=None):
   632     def parents(self, changeid=None):
   633         '''get list of changectxs for parents of changeid'''
   633         '''get list of changectxs for parents of changeid'''
   634         return self[changeid].parents()
   634         return self[changeid].parents()
       
   635 
       
   636     def setparents(self, p1, p2=nullid):
       
   637         copies = self.dirstate.setparents(p1, p2)
       
   638         if copies:
       
   639             # Adjust copy records, the dirstate cannot do it, it
       
   640             # requires access to parents manifests. Preserve them
       
   641             # only for entries added to first parent.
       
   642             pctx = self[p1]
       
   643             for f in copies:
       
   644                 if f not in pctx and copies[f] in pctx:
       
   645                     self.dirstate.copy(copies[f], f)
   635 
   646 
   636     def filectx(self, path, changeid=None, fileid=None):
   647     def filectx(self, path, changeid=None, fileid=None):
   637         """changeid can be a changeset revision, node, or tag.
   648         """changeid can be a changeset revision, node, or tag.
   638            fileid can be a file revision or node."""
   649            fileid can be a file revision or node."""
   639         return context.filectx(self, path, changeid, fileid)
   650         return context.filectx(self, path, changeid, fileid)