Fix performance regression in addremove command.
When I rewrote addremove, I lazily put a call to repo.changes in,
which was unnecessary and slow. This is a new rewrite, preserving the
file name behaviour, but replacing the call to repo.changes with a walk,
which is much cheaper, and avoids calls to os.stat on all but files that
have probably been deleted.
+ mkdir t
+ cd t
+ hg init
+ echo This is file a1
+ echo This is file b1
+ hg add a b
+ hg commit -m 'commit #0' -d '0 0'
+ echo This is file b22
+ hg commit '-mcomment #1' -d '0 0'
+ hg update 0
+ rm b
+ hg commit -A '-mcomment #2' -d '0 0'
removing b
+ yes k
+ hg update 1
this update spans a branch affecting the following files:
b
aborting update spanning branches!
(use update -m to perform a branch merge)
+ exit 0