mercurial/localrepo.py
changeset 22404 12bc7f06fc41
parent 22362 c9b32c6a2944
child 22405 6f63c47cbb86
equal deleted inserted replaced
22403:41e9d58ec56f 22404:12bc7f06fc41
  1100         if l is not None and l.held:
  1100         if l is not None and l.held:
  1101             l.lock()
  1101             l.lock()
  1102             return l
  1102             return l
  1103 
  1103 
  1104         def unlock():
  1104         def unlock():
  1105             self.dirstate.write()
  1105             if self.dirstate.pendingparentchange():
       
  1106                 self.dirstate.invalidate()
       
  1107             else:
       
  1108                 self.dirstate.write()
       
  1109 
  1106             self._filecache['dirstate'].refresh()
  1110             self._filecache['dirstate'].refresh()
  1107 
  1111 
  1108         l = self._lock(self.vfs, "wlock", wait, unlock,
  1112         l = self._lock(self.vfs, "wlock", wait, unlock,
  1109                        self.invalidatedirstate, _('working directory of %s') %
  1113                        self.invalidatedirstate, _('working directory of %s') %
  1110                        self.origroot)
  1114                        self.origroot)