comparison mercurial/localrepo.py @ 5205:212de429e000

make hg add of a removed file unremove the file if a file was removed, hg add shouldn't mark the file as added, but as normal see issue683
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 21 Aug 2007 02:13:32 +0200
parents 6a1d2dd96b8e
children 90d9ec0dc69d
comparison
equal deleted inserted replaced
5204:6a1d2dd96b8e 5205:212de429e000
995 if not (stat.S_ISREG(st.st_mode) or stat.S_ISLNK(st.st_mode)): 995 if not (stat.S_ISREG(st.st_mode) or stat.S_ISLNK(st.st_mode)):
996 self.ui.warn(_("%s not added: only files and symlinks " 996 self.ui.warn(_("%s not added: only files and symlinks "
997 "supported currently\n") % f) 997 "supported currently\n") % f)
998 elif self.dirstate[f] in 'amn': 998 elif self.dirstate[f] in 'amn':
999 self.ui.warn(_("%s already tracked!\n") % f) 999 self.ui.warn(_("%s already tracked!\n") % f)
1000 elif self.dirstate[f] == 'r':
1001 self.dirstate.normaldirty(f)
1000 else: 1002 else:
1001 self.dirstate.add(f) 1003 self.dirstate.add(f)
1002 finally: 1004 finally:
1003 del wlock 1005 del wlock
1004 1006