##// END OF EJS Templates
remove: rewrite to be ~400x faster, bit more friendly...
remove: rewrite to be ~400x faster, bit more friendly old remove code called localrepo.changes for each file. was very expensive: $ hg --time rm arch>/dev/null Time: real 1066.120 secs (user 1014.450+0.000 sys 18.090+0.000) new code, same files: $ hg --time rm arch>/dev/null Time: real 2.770 secs (user 2.190+0.000 sys 0.580+0.000) also mention "-f" if not removing files. also allow "-f" to forget added files. make test a bit better.

File last commit:

r2186:1092533f default
r2309:b2f37c70 default
Show More
test-backout
51 lines | 760 B | text/plain | TextLexer
#!/bin/sh
echo '# basic operation'
hg init basic
cd basic
echo a > a
hg commit -d '0 0' -A -m a
echo b >> a
hg commit -d '1 0' -m b
hg backout -d '2 0' tip
cat a
echo '# file that was removed is recreated'
cd ..
hg init remove
cd remove
echo content > a
hg commit -d '0 0' -A -m a
hg rm a
hg commit -d '1 0' -m b
hg backout -d '2 0' --merge tip
cat a
echo '# backout of backout is as if nothing happened'
hg backout -d '3 0' --merge tip
cat a 2>/dev/null || echo cat: a: No such file or directory
echo '# backout with merge'
cd ..
hg init merge
cd merge
echo line 1 > a
hg commit -d '0 0' -A -m a
echo line 2 >> a
hg commit -d '1 0' -m b
echo line 3 >> a
hg commit -d '2 0' -m c
hg backout --merge -d '3 0' 1
hg commit -d '4 0' -m d
cat a
exit 0