Show More
@@ -1138,6 +1138,22 b' class workingctx(changectx):' | |||||
1138 | finally: |
|
1138 | finally: | |
1139 | wlock.release() |
|
1139 | wlock.release() | |
1140 |
|
1140 | |||
|
1141 | def markcommitted(self, node): | |||
|
1142 | """Perform post-commit cleanup necessary after commiting this workingctx | |||
|
1143 | ||||
|
1144 | Specifically, this updates backing stores this working context | |||
|
1145 | wraps to reflect the fact that the changes reflected by this | |||
|
1146 | workingctx have been committed. For example, it marks | |||
|
1147 | modified and added files as normal in the dirstate. | |||
|
1148 | ||||
|
1149 | """ | |||
|
1150 | ||||
|
1151 | for f in self.modified() + self.added(): | |||
|
1152 | self._repo.dirstate.normal(f) | |||
|
1153 | for f in self.removed(): | |||
|
1154 | self._repo.dirstate.drop(f) | |||
|
1155 | self._repo.dirstate.setparents(node) | |||
|
1156 | ||||
1141 | def dirs(self): |
|
1157 | def dirs(self): | |
1142 | return set(self._repo.dirstate.dirs()) |
|
1158 | return set(self._repo.dirstate.dirs()) | |
1143 |
|
1159 |
@@ -1279,11 +1279,7 b' class localrepository(object):' | |||||
1279 |
|
1279 | |||
1280 | # update bookmarks, dirstate and mergestate |
|
1280 | # update bookmarks, dirstate and mergestate | |
1281 | bookmarks.update(self, [p1, p2], ret) |
|
1281 | bookmarks.update(self, [p1, p2], ret) | |
1282 | for f in changes[0] + changes[1]: |
|
1282 | cctx.markcommitted(ret) | |
1283 | self.dirstate.normal(f) |
|
|||
1284 | for f in changes[2]: |
|
|||
1285 | self.dirstate.drop(f) |
|
|||
1286 | self.dirstate.setparents(ret) |
|
|||
1287 | ms.reset() |
|
1283 | ms.reset() | |
1288 | finally: |
|
1284 | finally: | |
1289 | wlock.release() |
|
1285 | wlock.release() |
General Comments 0
You need to be logged in to leave comments.
Login now