mercurial/dirstate.py
changeset 47480 f93298a48da1
parent 47479 e6b303eb8f7d
child 47481 612f5f36fcf6
equal deleted inserted replaced
47479:e6b303eb8f7d 47480:f93298a48da1
   431     def _addpath(self, f, state, mode, size, mtime):
   431     def _addpath(self, f, state, mode, size, mtime):
   432         oldstate = self[f]
   432         oldstate = self[f]
   433         if state == b'a' or oldstate == b'r':
   433         if state == b'a' or oldstate == b'r':
   434             scmutil.checkfilename(f)
   434             scmutil.checkfilename(f)
   435             if self._map.hastrackeddir(f):
   435             if self._map.hastrackeddir(f):
   436                 raise error.Abort(
   436                 msg = _(b'directory %r already in dirstate')
   437                     _(b'directory %r already in dirstate') % pycompat.bytestr(f)
   437                 msg %= pycompat.bytestr(f)
   438                 )
   438                 raise error.Abort(msg)
   439             # shadows
   439             # shadows
   440             for d in pathutil.finddirs(f):
   440             for d in pathutil.finddirs(f):
   441                 if self._map.hastrackeddir(d):
   441                 if self._map.hastrackeddir(d):
   442                     break
   442                     break
   443                 entry = self._map.get(d)
   443                 entry = self._map.get(d)