1445 workingctx have been committed. For example, it marks |
1445 workingctx have been committed. For example, it marks |
1446 modified and added files as normal in the dirstate. |
1446 modified and added files as normal in the dirstate. |
1447 |
1447 |
1448 """ |
1448 """ |
1449 |
1449 |
1450 self._repo.dirstate.beginparentchange() |
1450 with self._repo.dirstate.parentchange(): |
1451 for f in self.modified() + self.added(): |
1451 for f in self.modified() + self.added(): |
1452 self._repo.dirstate.normal(f) |
1452 self._repo.dirstate.normal(f) |
1453 for f in self.removed(): |
1453 for f in self.removed(): |
1454 self._repo.dirstate.drop(f) |
1454 self._repo.dirstate.drop(f) |
1455 self._repo.dirstate.setparents(node) |
1455 self._repo.dirstate.setparents(node) |
1456 self._repo.dirstate.endparentchange() |
|
1457 |
1456 |
1458 # write changes out explicitly, because nesting wlock at |
1457 # write changes out explicitly, because nesting wlock at |
1459 # runtime may prevent 'wlock.release()' in 'repo.commit()' |
1458 # runtime may prevent 'wlock.release()' in 'repo.commit()' |
1460 # from immediately doing so for subsequent changing files |
1459 # from immediately doing so for subsequent changing files |
1461 self._repo.dirstate.write(self._repo.currenttransaction()) |
1460 self._repo.dirstate.write(self._repo.currenttransaction()) |