Show More
@@ -1043,6 +1043,22 b' class commitablectx(basectx):' | |||||
1043 | [p.rev() for p in self._parents]): |
|
1043 | [p.rev() for p in self._parents]): | |
1044 | yield changectx(self._repo, a) |
|
1044 | yield changectx(self._repo, a) | |
1045 |
|
1045 | |||
|
1046 | def markcommitted(self, node): | |||
|
1047 | """Perform post-commit cleanup necessary after committing this ctx | |||
|
1048 | ||||
|
1049 | Specifically, this updates backing stores this working context | |||
|
1050 | wraps to reflect the fact that the changes reflected by this | |||
|
1051 | workingctx have been committed. For example, it marks | |||
|
1052 | modified and added files as normal in the dirstate. | |||
|
1053 | ||||
|
1054 | """ | |||
|
1055 | ||||
|
1056 | for f in self.modified() + self.added(): | |||
|
1057 | self._repo.dirstate.normal(f) | |||
|
1058 | for f in self.removed(): | |||
|
1059 | self._repo.dirstate.drop(f) | |||
|
1060 | self._repo.dirstate.setparents(node) | |||
|
1061 | ||||
1046 | class workingctx(commitablectx): |
|
1062 | class workingctx(commitablectx): | |
1047 | """A workingctx object makes access to data related to |
|
1063 | """A workingctx object makes access to data related to | |
1048 | the current working directory convenient. |
|
1064 | the current working directory convenient. | |
@@ -1169,22 +1185,6 b' class workingctx(commitablectx):' | |||||
1169 | finally: |
|
1185 | finally: | |
1170 | wlock.release() |
|
1186 | wlock.release() | |
1171 |
|
1187 | |||
1172 | def markcommitted(self, node): |
|
|||
1173 | """Perform post-commit cleanup necessary after committing this ctx |
|
|||
1174 |
|
||||
1175 | Specifically, this updates backing stores this working context |
|
|||
1176 | wraps to reflect the fact that the changes reflected by this |
|
|||
1177 | workingctx have been committed. For example, it marks |
|
|||
1178 | modified and added files as normal in the dirstate. |
|
|||
1179 |
|
||||
1180 | """ |
|
|||
1181 |
|
||||
1182 | for f in self.modified() + self.added(): |
|
|||
1183 | self._repo.dirstate.normal(f) |
|
|||
1184 | for f in self.removed(): |
|
|||
1185 | self._repo.dirstate.drop(f) |
|
|||
1186 | self._repo.dirstate.setparents(node) |
|
|||
1187 |
|
||||
1188 | def dirs(self): |
|
1188 | def dirs(self): | |
1189 | return self._repo.dirstate.dirs() |
|
1189 | return self._repo.dirstate.dirs() | |
1190 |
|
1190 |
General Comments 0
You need to be logged in to leave comments.
Login now