mercurial/dirstate.py
changeset 47523 b76d54b90dc9
parent 47522 587bb99ea311
child 47524 69a463a4f193
equal deleted inserted replaced
47522:587bb99ea311 47523:b76d54b90dc9
   449         mtime=None,
   449         mtime=None,
   450         from_p2=False,
   450         from_p2=False,
   451         possibly_dirty=False,
   451         possibly_dirty=False,
   452     ):
   452     ):
   453         oldstate = self[f]
   453         oldstate = self[f]
   454         if state == b'a' or oldstate == b'r':
   454         entry = self._map.get(f)
       
   455         if state == b'a' or entry is not None and entry.removed:
   455             scmutil.checkfilename(f)
   456             scmutil.checkfilename(f)
   456             if self._map.hastrackeddir(f):
   457             if self._map.hastrackeddir(f):
   457                 msg = _(b'directory %r already in dirstate')
   458                 msg = _(b'directory %r already in dirstate')
   458                 msg %= pycompat.bytestr(f)
   459                 msg %= pycompat.bytestr(f)
   459                 raise error.Abort(msg)
   460                 raise error.Abort(msg)