comparison mercurial/cmdutil.py @ 4136:eb5d4fec1487

Fix addremove for symlinks to non-existent files
author Giorgos Keramidas <keramida@ceid.upatras.gr>
date Fri, 05 Jan 2007 21:28:49 +0200
parents 6cb6cfe43c5d
children b5d1eaade333
comparison
equal deleted inserted replaced
4135:6cb6cfe43c5d 4136:eb5d4fec1487
183 if src == 'f' and repo.dirstate.state(abs) == '?': 183 if src == 'f' and repo.dirstate.state(abs) == '?':
184 add.append(abs) 184 add.append(abs)
185 mapping[abs] = rel, exact 185 mapping[abs] = rel, exact
186 if repo.ui.verbose or not exact: 186 if repo.ui.verbose or not exact:
187 repo.ui.status(_('adding %s\n') % ((pats and rel) or abs)) 187 repo.ui.status(_('adding %s\n') % ((pats and rel) or abs))
188 if repo.dirstate.state(abs) != 'r' and not os.path.exists(rel): 188 islink = os.path.islink(rel)
189 if repo.dirstate.state(abs) != 'r' and not islink and not os.path.exists(rel):
189 remove.append(abs) 190 remove.append(abs)
190 mapping[abs] = rel, exact 191 mapping[abs] = rel, exact
191 if repo.ui.verbose or not exact: 192 if repo.ui.verbose or not exact:
192 repo.ui.status(_('removing %s\n') % ((pats and rel) or abs)) 193 repo.ui.status(_('removing %s\n') % ((pats and rel) or abs))
193 if not dry_run: 194 if not dry_run: