diff -r dee573ba79f1 -r bfd73b567b3d mercurial/commands.py --- a/mercurial/commands.py Mon Aug 27 14:21:04 2007 -0300 +++ b/mercurial/commands.py Wed Aug 29 16:15:23 2007 -0700 @@ -2338,6 +2338,14 @@ changes = repo.status(match=names.has_key, wlock=wlock)[:5] modified, added, removed, deleted, unknown = map(dict.fromkeys, changes) + # if f is a rename, also revert the source + cwd = repo.getcwd() + for f in added: + src = repo.dirstate.copied(f) + if src and src not in names and repo.dirstate[src][0] == 'r': + removed[src] = None + names[src] = (repo.pathto(src, cwd), True) + revert = ([], _('reverting %s\n')) add = ([], _('adding %s\n')) remove = ([], _('removing %s\n'))