tests/test-bundle-type.out
author David Greenaway <hg-dev@davidgreenaway.com>
Sat, 03 Apr 2010 11:58:16 +1100
changeset 11060 e6df01776e08
parent 6640 d6b53b48943f
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:
6570
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
     1
% bundle w/o type option
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
     2
adding file.txt
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
     3
summary:     a
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
     4
searching for changes
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
     5
1 changesets found
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
     6
pulling from ../b1
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
     7
requesting all changes
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
     8
adding changesets
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
     9
adding manifests
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    10
adding file changes
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    11
added 1 changesets with 1 changes to 1 files
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    12
(run 'hg update' to get a working copy)
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    13
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    14
summary:     a
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    15
% test bundle type None
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    16
searching for changes
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    17
1 changesets found
6640
d6b53b48943f Make test-bundle-type work on MacOS 10.4.11
Christian Ebert <blacktrash@gmx.net>
parents: 6570
diff changeset
    18
HG10UN
d6b53b48943f Make test-bundle-type work on MacOS 10.4.11
Christian Ebert <blacktrash@gmx.net>
parents: 6570
diff changeset
    19
pulling from ../bNone
6570
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    20
requesting all changes
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    21
adding changesets
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    22
adding manifests
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    23
adding file changes
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    24
added 1 changesets with 1 changes to 1 files
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    25
(run 'hg update' to get a working copy)
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    26
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    27
summary:     a
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    28
% test bundle type bzip2
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    29
searching for changes
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    30
1 changesets found
6640
d6b53b48943f Make test-bundle-type work on MacOS 10.4.11
Christian Ebert <blacktrash@gmx.net>
parents: 6570
diff changeset
    31
HG10BZ
d6b53b48943f Make test-bundle-type work on MacOS 10.4.11
Christian Ebert <blacktrash@gmx.net>
parents: 6570
diff changeset
    32
pulling from ../bbzip2
6570
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    33
requesting all changes
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    34
adding changesets
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    35
adding manifests
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    36
adding file changes
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    37
added 1 changesets with 1 changes to 1 files
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    38
(run 'hg update' to get a working copy)
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    39
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    40
summary:     a
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    41
% test bundle type gzip
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    42
searching for changes
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    43
1 changesets found
6640
d6b53b48943f Make test-bundle-type work on MacOS 10.4.11
Christian Ebert <blacktrash@gmx.net>
parents: 6570
diff changeset
    44
HG10GZ
d6b53b48943f Make test-bundle-type work on MacOS 10.4.11
Christian Ebert <blacktrash@gmx.net>
parents: 6570
diff changeset
    45
pulling from ../bgzip
6570
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    46
requesting all changes
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    47
adding changesets
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    48
adding manifests
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    49
adding file changes
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    50
added 1 changesets with 1 changes to 1 files
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    51
(run 'hg update' to get a working copy)
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    52
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    53
summary:     a
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    54
% test garbage file
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    55
abort: ../bgarbage: not a Mercurial bundle file
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    56
% test invalid bundle type
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    57
1 changesets found
626cb86a6523 add compression type type parameter to bundle command
Benoit Allard <benoit@aeteurope.nl>
parents:
diff changeset
    58
abort: unknown bundle type specified with --type