diff -r a4a41525180c -r 4d1382fd96ff mercurial/context.py --- a/mercurial/context.py Wed Jul 08 17:01:09 2015 +0900 +++ b/mercurial/context.py Wed Jul 08 17:01:09 2015 +0900 @@ -1316,6 +1316,11 @@ self._repo.dirstate.setparents(node) self._repo.dirstate.endparentchange() + # write changes out explicitly, because nesting wlock at + # runtime may prevent 'wlock.release()' in 'repo.commit()' + # from immediately doing so for subsequent changing files + self._repo.dirstate.write() + class workingctx(committablectx): """A workingctx object makes access to data related to the current working directory convenient.