Mercurial > hg
view tests/test-status-color.out @ 8849:80cc4b1a62d0
compare grep result between target and its parent
I found that typical case is that grep target is added at (*) revision
in the tree shown below.
+--- 1(*) --- 3
0
+--- 2 ------ 4
Now, I expect 'hg grep --all' to show only rev:1 which is first
appearance of target line.
But 'hg grep --all' will tell:
target line dis-appeared at 3 => 4
target line appeared at 2 => 3
target line dis-appeared at 1 => 2
target line appeared at 0 => 1
because current 'hg grep' implementation compares not between target
revision and its parent, but between neighbor revisions in walkthrough
order.
I checked performance of this patch by "hg grep --follow --all
walkchangerevs" on whole Mercurial repo, and patched version could
complete as fast as un-patched one.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 19 May 2009 16:49:54 +0900 |
parents | 3fb5c142a9f0 |
children | 7b3d837ca60e |
line wrap: on
line source
hg status in repo root: [0;35;1;4m? a/1/in_a_1[0m [0;35;1;4m? a/in_a[0m [0;35;1;4m? b/1/in_b_1[0m [0;35;1;4m? b/2/in_b_2[0m [0;35;1;4m? b/in_b[0m [0;35;1;4m? in_root[0m hg status . in repo root: [0;35;1;4m? a/1/in_a_1[0m [0;35;1;4m? a/in_a[0m [0;35;1;4m? b/1/in_b_1[0m [0;35;1;4m? b/2/in_b_2[0m [0;35;1;4m? b/in_b[0m [0;35;1;4m? in_root[0m hg status in a: [0;35;1;4m? a/1/in_a_1[0m [0;35;1;4m? a/in_a[0m [0;35;1;4m? b/1/in_b_1[0m [0;35;1;4m? b/2/in_b_2[0m [0;35;1;4m? b/in_b[0m [0;35;1;4m? in_root[0m hg status . in a: [0;35;1;4m? 1/in_a_1[0m [0;35;1;4m? in_a[0m hg status .. in a: [0;35;1;4m? 1/in_a_1[0m [0;35;1;4m? in_a[0m [0;35;1;4m? ../b/1/in_b_1[0m [0;35;1;4m? ../b/2/in_b_2[0m [0;35;1;4m? ../b/in_b[0m [0;35;1;4m? ../in_root[0m hg status in b: [0;35;1;4m? a/1/in_a_1[0m [0;35;1;4m? a/in_a[0m [0;35;1;4m? b/1/in_b_1[0m [0;35;1;4m? b/2/in_b_2[0m [0;35;1;4m? b/in_b[0m [0;35;1;4m? in_root[0m hg status . in b: [0;35;1;4m? 1/in_b_1[0m [0;35;1;4m? 2/in_b_2[0m [0;35;1;4m? in_b[0m hg status .. in b: [0;35;1;4m? ../a/1/in_a_1[0m [0;35;1;4m? ../a/in_a[0m [0;35;1;4m? 1/in_b_1[0m [0;35;1;4m? 2/in_b_2[0m [0;35;1;4m? in_b[0m [0;35;1;4m? ../in_root[0m hg status in a/1: [0;35;1;4m? a/1/in_a_1[0m [0;35;1;4m? a/in_a[0m [0;35;1;4m? b/1/in_b_1[0m [0;35;1;4m? b/2/in_b_2[0m [0;35;1;4m? b/in_b[0m [0;35;1;4m? in_root[0m hg status . in a/1: [0;35;1;4m? in_a_1[0m hg status .. in a/1: [0;35;1;4m? in_a_1[0m [0;35;1;4m? ../in_a[0m hg status in b/1: [0;35;1;4m? a/1/in_a_1[0m [0;35;1;4m? a/in_a[0m [0;35;1;4m? b/1/in_b_1[0m [0;35;1;4m? b/2/in_b_2[0m [0;35;1;4m? b/in_b[0m [0;35;1;4m? in_root[0m hg status . in b/1: [0;35;1;4m? in_b_1[0m hg status .. in b/1: [0;35;1;4m? in_b_1[0m [0;35;1;4m? ../2/in_b_2[0m [0;35;1;4m? ../in_b[0m hg status in b/2: [0;35;1;4m? a/1/in_a_1[0m [0;35;1;4m? a/in_a[0m [0;35;1;4m? b/1/in_b_1[0m [0;35;1;4m? b/2/in_b_2[0m [0;35;1;4m? b/in_b[0m [0;35;1;4m? in_root[0m hg status . in b/2: [0;35;1;4m? in_b_2[0m hg status .. in b/2: [0;35;1;4m? ../1/in_b_1[0m [0;35;1;4m? in_b_2[0m [0;35;1;4m? ../in_b[0m adding .hgignore adding deleted adding modified adding removed hg status: [0;32;1mA added[0m [0;31;1mR removed[0m [0;36;1;4m! deleted[0m [0;35;1;4m? unknown[0m hg status modified added removed deleted unknown never-existed ignored: never-existed: No such file or directory [0;32;1mA added[0m [0;31;1mR removed[0m [0;36;1;4m! deleted[0m [0;35;1;4m? unknown[0m hg status -C: [0;32;1mA added[0m [0;32;1mA copied[0m [0;0m modified[0m [0;31;1mR removed[0m [0;36;1;4m! deleted[0m [0;35;1;4m? unknown[0m hg status -A: [0;32;1mA added[0m [0;32;1mA copied[0m [0;0m modified[0m [0;31;1mR removed[0m [0;36;1;4m! deleted[0m [0;35;1;4m? unknown[0m [0;30;1mI ignored[0m [0;0mC .hgignore[0m [0;0mC modified[0m hg status ignoreddir/file: hg status -i ignoreddir/file: [0;30;1mI ignoreddir/file[0m adding .hgignore adding deleted adding modified adding removed