mercurial/localrepo.py
changeset 44052 b74270da5eee
parent 44043 b958419b6c53
child 44060 a61287a95dc3
equal deleted inserted replaced
44051:436d106de670 44052:b74270da5eee
  1884 
  1884 
  1885     def wjoin(self, f, *insidef):
  1885     def wjoin(self, f, *insidef):
  1886         return self.vfs.reljoin(self.root, f, *insidef)
  1886         return self.vfs.reljoin(self.root, f, *insidef)
  1887 
  1887 
  1888     def setparents(self, p1, p2=nullid):
  1888     def setparents(self, p1, p2=nullid):
  1889         with self.dirstate.parentchange():
  1889         self[None].setparents(p1, p2)
  1890             copies = self.dirstate.setparents(p1, p2)
       
  1891             pctx = self[p1]
       
  1892             if copies:
       
  1893                 # Adjust copy records, the dirstate cannot do it, it
       
  1894                 # requires access to parents manifests. Preserve them
       
  1895                 # only for entries added to first parent.
       
  1896                 for f in copies:
       
  1897                     if f not in pctx and copies[f] in pctx:
       
  1898                         self.dirstate.copy(copies[f], f)
       
  1899             if p2 == nullid:
       
  1900                 for f, s in sorted(self.dirstate.copies().items()):
       
  1901                     if f not in pctx and s not in pctx:
       
  1902                         self.dirstate.copy(None, f)
       
  1903 
  1890 
  1904     def filectx(self, path, changeid=None, fileid=None, changectx=None):
  1891     def filectx(self, path, changeid=None, fileid=None, changectx=None):
  1905         """changeid must be a changeset revision, if specified.
  1892         """changeid must be a changeset revision, if specified.
  1906            fileid can be a file revision or node."""
  1893            fileid can be a file revision or node."""
  1907         return context.filectx(
  1894         return context.filectx(