Mercurial > hg
view tests/test-encode @ 2309:b2f37c7026ca
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.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Thu, 18 May 2006 13:48:12 -0700 |
parents | 7544700fd931 |
children | c0b449154a90 |
line wrap: on
line source
#!/bin/sh hg init cat > .hg/hgrc <<EOF [encode] *.gz = gunzip [decode] *.gz = gzip EOF echo "this is a test" | gzip > a.gz hg add a.gz hg ci -m "test" -d "1000000 0" echo %% no changes hg status touch a.gz echo %% no changes hg status echo %% uncompressed contents in repo hg debugdata .hg/data/a.gz.d 0 echo %% uncompress our working dir copy gunzip < a.gz rm a.gz hg co echo %% uncompress our new working dir copy gunzip < a.gz