mercurial/localrepo.py
changeset 27291 a18328aad48c
parent 27278 42aa0e570eaa
child 27319 b64b6fdc5c9b
--- a/mercurial/localrepo.py	Wed Dec 09 08:28:53 2015 +0900
+++ b/mercurial/localrepo.py	Wed Dec 09 08:28:53 2015 +0900
@@ -1471,6 +1471,8 @@
         wlock = lock = tr = None
         try:
             wlock = self.wlock()
+            lock = self.lock() # for recent changelog (see issue4368)
+
             wctx = self[None]
             merge = len(wctx.parents()) > 1
 
@@ -1598,7 +1600,6 @@
                 subrepo.writestate(self, newstate)
 
             p1, p2 = self.dirstate.parents()
-            lock = self.lock()
             hookp1, hookp2 = hex(p1), (p2 != nullid and hex(p2) or '')
             try:
                 self.hook("precommit", throw=True, parent1=hookp1,