tests/test-rollback.out
author David Greenaway <hg-dev@davidgreenaway.com>
Sat, 03 Apr 2010 11:58:16 +1100
changeset 11060 e6df01776e08
parent 10893 468876bc3885
child 11175 39e7f14a8286
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:
336
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
     1
checking changesets
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
     2
checking manifests
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
     3
crosschecking files in changesets and manifests
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
     4
checking files
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
     5
1 files, 1 changesets, 1 total revisions
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 981
diff changeset
     6
changeset:   0:0acdaf898367
388
398737777644 Fixed tests for displaying tags in hg history and hg parents.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 382
diff changeset
     7
tag:         tip
336
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
     8
user:        test
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 981
diff changeset
     9
date:        Mon Jan 12 13:46:40 1970 +0000
336
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
    10
summary:     test
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
    11
10893
468876bc3885 rollback: improve message
Matt Mackall <mpm@selenic.com>
parents: 10882
diff changeset
    12
rolling back to revision 0 (undo commit)
336
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
    13
checking changesets
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
    14
checking manifests
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
    15
crosschecking files in changesets and manifests
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
    16
checking files
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
    17
0 files, 0 changesets, 0 total revisions
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
    18
A a
6058
88b4d726332a Do not abort rollback if undo.branch isn't available, but warn.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5814
diff changeset
    19
% Test issue 902
5814
dd5a501cb97f restore branch after rollback (issue 902)
Alexandre Vassalotti <mercurial-bugs@selenic.com>
parents: 2227
diff changeset
    20
marked working directory as branch test
10893
468876bc3885 rollback: improve message
Matt Mackall <mpm@selenic.com>
parents: 10882
diff changeset
    21
rolling back to revision 0 (undo commit)
5814
dd5a501cb97f restore branch after rollback (issue 902)
Alexandre Vassalotti <mercurial-bugs@selenic.com>
parents: 2227
diff changeset
    22
default
9934
720f70b720d3 commit: save commit message so it's not destroyed by rollback.
Greg Ward <greg-hg@gerg.ca>
parents: 6058
diff changeset
    23
% Test issue 1635 (commit message saved)
720f70b720d3 commit: save commit message so it's not destroyed by rollback.
Greg Ward <greg-hg@gerg.ca>
parents: 6058
diff changeset
    24
.hg/last-message.txt:
720f70b720d3 commit: save commit message so it's not destroyed by rollback.
Greg Ward <greg-hg@gerg.ca>
parents: 6058
diff changeset
    25
test2
6058
88b4d726332a Do not abort rollback if undo.branch isn't available, but warn.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5814
diff changeset
    26
% Test rollback of hg before issue 902 was fixed
88b4d726332a Do not abort rollback if undo.branch isn't available, but warn.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5814
diff changeset
    27
marked working directory as branch test
10893
468876bc3885 rollback: improve message
Matt Mackall <mpm@selenic.com>
parents: 10882
diff changeset
    28
rolling back to revision 0 (undo commit)
6058
88b4d726332a Do not abort rollback if undo.branch isn't available, but warn.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5814
diff changeset
    29
Named branch could not be reset, current branch still is: test
88b4d726332a Do not abort rollback if undo.branch isn't available, but warn.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5814
diff changeset
    30
test
9934
720f70b720d3 commit: save commit message so it's not destroyed by rollback.
Greg Ward <greg-hg@gerg.ca>
parents: 6058
diff changeset
    31
% rollback by pretxncommit saves commit message (issue 1635)
720f70b720d3 commit: save commit message so it's not destroyed by rollback.
Greg Ward <greg-hg@gerg.ca>
parents: 6058
diff changeset
    32
transaction abort!
720f70b720d3 commit: save commit message so it's not destroyed by rollback.
Greg Ward <greg-hg@gerg.ca>
parents: 6058
diff changeset
    33
rollback completed
10081
a5f3f9b1c42a test-rollback: Ignore hook exit code
Mads Kiilerich <mads@kiilerich.com>
parents: 9935
diff changeset
    34
abort: pretxncommit hook exited ...
9934
720f70b720d3 commit: save commit message so it's not destroyed by rollback.
Greg Ward <greg-hg@gerg.ca>
parents: 6058
diff changeset
    35
.hg/last-message.txt:
720f70b720d3 commit: save commit message so it's not destroyed by rollback.
Greg Ward <greg-hg@gerg.ca>
parents: 6058
diff changeset
    36
precious commit message
9935
48b81d9bca8d commit: if relevant, tell user their commit message was saved.
Greg Ward <greg-hg@gerg.ca>
parents: 9934
diff changeset
    37
% same thing, but run $EDITOR
48b81d9bca8d commit: if relevant, tell user their commit message was saved.
Greg Ward <greg-hg@gerg.ca>
parents: 9934
diff changeset
    38
transaction abort!
48b81d9bca8d commit: if relevant, tell user their commit message was saved.
Greg Ward <greg-hg@gerg.ca>
parents: 9934
diff changeset
    39
rollback completed
48b81d9bca8d commit: if relevant, tell user their commit message was saved.
Greg Ward <greg-hg@gerg.ca>
parents: 9934
diff changeset
    40
note: commit message saved in .hg/last-message.txt
10081
a5f3f9b1c42a test-rollback: Ignore hook exit code
Mads Kiilerich <mads@kiilerich.com>
parents: 9935
diff changeset
    41
abort: pretxncommit hook exited ...
9935
48b81d9bca8d commit: if relevant, tell user their commit message was saved.
Greg Ward <greg-hg@gerg.ca>
parents: 9934
diff changeset
    42
.hg/last-message.txt:
48b81d9bca8d commit: if relevant, tell user their commit message was saved.
Greg Ward <greg-hg@gerg.ca>
parents: 9934
diff changeset
    43
another precious commit message