equal
deleted
inserted
replaced
1593 |
1593 |
1594 def setparents(self, p1node, p2node=None): |
1594 def setparents(self, p1node, p2node=None): |
1595 if p2node is None: |
1595 if p2node is None: |
1596 p2node = self._repo.nodeconstants.nullid |
1596 p2node = self._repo.nodeconstants.nullid |
1597 dirstate = self._repo.dirstate |
1597 dirstate = self._repo.dirstate |
1598 with dirstate.parentchange(): |
1598 with dirstate.parentchange(self._repo): |
1599 copies = dirstate.setparents(p1node, p2node) |
1599 copies = dirstate.setparents(p1node, p2node) |
1600 pctx = self._repo[p1node] |
1600 pctx = self._repo[p1node] |
1601 if copies: |
1601 if copies: |
1602 # Adjust copy records, the dirstate cannot do it, it |
1602 # Adjust copy records, the dirstate cannot do it, it |
1603 # requires access to parents manifests. Preserve them |
1603 # requires access to parents manifests. Preserve them |
2048 match = self._repo.narrowmatch(match) |
2048 match = self._repo.narrowmatch(match) |
2049 ds = self._repo.dirstate |
2049 ds = self._repo.dirstate |
2050 return sorted(f for f in ds.matches(match) if ds.get_entry(f).tracked) |
2050 return sorted(f for f in ds.matches(match) if ds.get_entry(f).tracked) |
2051 |
2051 |
2052 def markcommitted(self, node): |
2052 def markcommitted(self, node): |
2053 with self._repo.dirstate.parentchange(): |
2053 with self._repo.dirstate.parentchange(self._repo): |
2054 for f in self.modified() + self.added(): |
2054 for f in self.modified() + self.added(): |
2055 self._repo.dirstate.update_file( |
2055 self._repo.dirstate.update_file( |
2056 f, p1_tracked=True, wc_tracked=True |
2056 f, p1_tracked=True, wc_tracked=True |
2057 ) |
2057 ) |
2058 for f in self.removed(): |
2058 for f in self.removed(): |