tests/test-manifest.out
author David Greenaway <hg-dev@davidgreenaway.com>
Sat, 03 Apr 2010 11:58:16 +1100
changeset 11060 e6df01776e08
parent 6737 7239e06e58e9
permissions -rw-r--r--
findrenames: Optimise "addremove -s100" by matching files by their SHA1 hashes. We speed up 'findrenames' for the usecase when a user specifies they want a similarity of 100% by matching files by their exact SHA1 hash value. This reduces the number of comparisons required to find exact matches from O(n^2) to O(n). While it would be nice if we could just use mercurial's pre-calculated SHA1 hash for existing files, this hash includes the file's ancestor information making it unsuitable for our purposes. Instead, we calculate the hash of old content from scratch. The following benchmarks were taken on the current head of crew: addremove 100% similarity: rm -rf *; hg up -C; mv tests tests.new hg --time addremove -s100 --dry-run before: real 176.350 secs (user 128.890+0.000 sys 47.430+0.000) after: real 2.130 secs (user 1.890+0.000 sys 0.240+0.000) addremove 75% similarity: rm -rf *; hg up -C; mv tests tests.new; \ for i in tests.new/*; do echo x >> $i; done hg --time addremove -s75 --dry-run before: real 264.560 secs (user 215.130+0.000 sys 49.410+0.000) after: real 218.710 secs (user 172.790+0.000 sys 45.870+0.000)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6737
7239e06e58e9 context: consistently return p1 context for None
Matt Mackall <mpm@selenic.com>
parents: 5406
diff changeset
     1
% should be empty
7239e06e58e9 context: consistently return p1 context for None
Matt Mackall <mpm@selenic.com>
parents: 5406
diff changeset
     2
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
5155
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     3
a
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     4
b/a
5406
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5405
diff changeset
     5
l
5405
8feb33c2d153 Display symlink or executable bit with manifest -v
Patrick Mezard <pmezard@gmail.com>
parents: 5155
diff changeset
     6
644   a
5406
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5405
diff changeset
     7
755 * b/a
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5405
diff changeset
     8
644 @ l
5405
8feb33c2d153 Display symlink or executable bit with manifest -v
Patrick Mezard <pmezard@gmail.com>
parents: 5155
diff changeset
     9
b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644   a
5406
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5405
diff changeset
    10
b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 755 * b/a
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5405
diff changeset
    11
047b75c6d7a3ef6a2243bd0e99f94f6ea6683597 644 @ l
5155
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    12
a
5406
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5405
diff changeset
    13
l
5155
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    14
a
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    15
b/a
5406
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5405
diff changeset
    16
l
5155
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    17
a
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    18
b/a
5406
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5405
diff changeset
    19
l
5155
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    20
% should fail
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    21
abort: unknown revision '2'!
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    22
abort: please specify just one revision
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    23
a
13d23d66a6cd manifest: accept -r for rev specification
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    24
b/a
5406
f11554a097c8 test-manifest: test symlink and exec bit display
Patrick Mezard <pmezard@gmail.com>
parents: 5405
diff changeset
    25
l