##// END OF EJS Templates
findrenames: Optimise "addremove -s100" by matching files by their SHA1 hashes....
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)

File last commit:

r10960:ca739acf default
r11060:e6df0177 default
Show More
test-log.out
457 lines | 9.7 KiB | text/plain | TextLexer
Vadim Gelfer
log: add -f/--follow option, to follow rename/copy
r2741 adding a
changeset: 0:8580ff50825a
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: a
% -f, directory
Brendan Cully
Improved error message for log --follow...
r7404 abort: cannot follow nonexistent file: "dir"
Vadim Gelfer
log: add -f/--follow option, to follow rename/copy
r2741 % -f, but no args
Ronny Pfannschmidt
filelog: sort meta entries, ensure deterministic order
r10490 changeset: 4:66c1345dc4f9
Vadim Gelfer
log: add -f/--follow option, to follow rename/copy
r2741 tag: tip
user: test
date: Thu Jan 01 00:00:05 1970 +0000
summary: e
Ronny Pfannschmidt
filelog: sort meta entries, ensure deterministic order
r10490 changeset: 3:7c6c671bb7cc
Vadim Gelfer
log: add -f/--follow option, to follow rename/copy
r2741 user: test
date: Thu Jan 01 00:00:04 1970 +0000
summary: d
Ronny Pfannschmidt
filelog: sort meta entries, ensure deterministic order
r10490 changeset: 2:41dd4284081e
Vadim Gelfer
log: add -f/--follow option, to follow rename/copy
r2741 user: test
date: Thu Jan 01 00:00:03 1970 +0000
summary: c
Ronny Pfannschmidt
filelog: sort meta entries, ensure deterministic order
r10490 changeset: 1:784de7cef101
Vadim Gelfer
log: add -f/--follow option, to follow rename/copy
r2741 user: test
date: Thu Jan 01 00:00:02 1970 +0000
summary: b
changeset: 0:8580ff50825a
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: a
% one rename
Matt Mackall
Only show long hashes with --debug, not --verbose
r2966 changeset: 0:8580ff50825a
Vadim Gelfer
log: add -f/--follow option, to follow rename/copy
r2741 user: test
date: Thu Jan 01 00:00:01 1970 +0000
files: a
description:
a
% many renames
Ronny Pfannschmidt
filelog: sort meta entries, ensure deterministic order
r10490 changeset: 4:66c1345dc4f9
Vadim Gelfer
log: add -f/--follow option, to follow rename/copy
r2741 tag: tip
user: test
date: Thu Jan 01 00:00:05 1970 +0000
files: dir/b e
description:
e
Ronny Pfannschmidt
filelog: sort meta entries, ensure deterministic order
r10490 changeset: 2:41dd4284081e
Vadim Gelfer
log: add -f/--follow option, to follow rename/copy
r2741 user: test
date: Thu Jan 01 00:00:03 1970 +0000
files: b dir/b
description:
c
Ronny Pfannschmidt
filelog: sort meta entries, ensure deterministic order
r10490 changeset: 1:784de7cef101
Vadim Gelfer
log: add -f/--follow option, to follow rename/copy
r2741 user: test
date: Thu Jan 01 00:00:02 1970 +0000
files: b
description:
b
Matt Mackall
Only show long hashes with --debug, not --verbose
r2966 changeset: 0:8580ff50825a
Vadim Gelfer
log: add -f/--follow option, to follow rename/copy
r2741 user: test
date: Thu Jan 01 00:00:01 1970 +0000
files: a
description:
a
Patrick Mezard
templatekw: change {file_copies} behaviour, add {file_copies_switch}...
r10060 % log copies with --copies
4 e (dir/b)
3 b (a)
2 dir/b (b)
1 b (a)
0
Patrick Mezard
Make {file_copies} usable as a --template key...
r10061 % log copies switch without --copies, with old filecopy template
Patrick Mezard
templatekw: change {file_copies} behaviour, add {file_copies_switch}...
r10060 4
3
2
1
0
% log copies switch with --copies
Brendan Cully
Show copies in hg log....
r3197 4 e (dir/b)
3 b (a)
2 dir/b (b)
1 b (a)
0
Greg Ward
Fix default style so 'log --copies' has a start and an end.
r10776 % log copies with hardcoded style and with --style=default
changeset: 4:66c1345dc4f9
tag: tip
user: test
date: Thu Jan 01 00:00:05 1970 +0000
files: dir/b e
copies: e (dir/b)
description:
e
changeset: 4:66c1345dc4f9
tag: tip
user: test
date: Thu Jan 01 00:00:05 1970 +0000
files: dir/b e
copies: e (dir/b)
description:
e
Brendan Cully
Test case for log --copies on non-linear manifests (issue391)
r3383 % log copies, non-linear manifest
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
adding foo
Dirkjan Ochtman
warn about new heads on commit (issue842)
r6336 created new head
Brendan Cully
Test case for log --copies on non-linear manifests (issue391)
r3383 5 e (dir/b)
Maxim Dounin
Fix copies reporting in log and convert....
r5811 % log copies, execute bit set
6
Matt Mackall
Fix log regression where log -p file showed diffs for other files
r3837 % log -p d
Ronny Pfannschmidt
filelog: sort meta entries, ensure deterministic order
r10490 changeset: 3:7c6c671bb7cc
Matt Mackall
Fix log regression where log -p file showed diffs for other files
r3837 user: test
date: Thu Jan 01 00:00:04 1970 +0000
files: a b d
description:
d
Ronny Pfannschmidt
filelog: sort meta entries, ensure deterministic order
r10490 diff -r 41dd4284081e -r 7c6c671bb7cc d
Matt Mackall
Fix log regression where log -p file showed diffs for other files
r3837 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/d Thu Jan 01 00:00:04 1970 +0000
@@ -0,0 +1,1 @@
+a
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 adding base
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
adding b1
Dirkjan Ochtman
warn about new heads on commit (issue842)
r6336 created new head
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 % log -f
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 3:e62f78d544b4
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 tag: tip
Matt Mackall
Remove dummy branch hack from tests
r4180 parent: 1:3d5bf5654eda
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: b1
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 1:3d5bf5654eda
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: r1
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 0:67e992f2c4f3
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: base
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
adding b2
Dirkjan Ochtman
warn about new heads on commit (issue842)
r6336 created new head
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 % log -f -r 1:tip
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 1:3d5bf5654eda
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: r1
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 2:60c670bf5b30
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: r2
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 3:e62f78d544b4
parent: 1:3d5bf5654eda
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: b1
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
Thomas Arendsen Hein
Issue a warning if "-r ." is used with two working directory parents....
r4510 % log -r . with two parents
changeset: 3:e62f78d544b4
parent: 1:3d5bf5654eda
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: b1
% log -r . with one parent
changeset: 5:302e9dd6890d
tag: tip
parent: 3:e62f78d544b4
parent: 4:ddb82e70d1a1
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: m12
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 % log --follow-first
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 6:2404bbcab562
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 tag: tip
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: b1.1
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 5:302e9dd6890d
parent: 3:e62f78d544b4
parent: 4:ddb82e70d1a1
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: m12
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 3:e62f78d544b4
parent: 1:3d5bf5654eda
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: b1
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 1:3d5bf5654eda
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: r1
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 0:67e992f2c4f3
Brendan Cully
Test suite for log --follow and --follow-first.
r2785 user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: base
Brendan Cully
Test for log --prune.
r2901 % log -P 2
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 6:2404bbcab562
Brendan Cully
Test for log --prune.
r2901 tag: tip
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: b1.1
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 5:302e9dd6890d
parent: 3:e62f78d544b4
parent: 4:ddb82e70d1a1
Brendan Cully
Test for log --prune.
r2901 user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: m12
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 4:ddb82e70d1a1
parent: 0:67e992f2c4f3
Brendan Cully
Test for log --prune.
r2901 user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: b2
Matt Mackall
Remove dummy branch hack from tests
r4180 changeset: 3:e62f78d544b4
parent: 1:3d5bf5654eda
Brendan Cully
Test for log --prune.
r2901 user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: b1
Jim Correia
add --git option to commands supporting --patch (log, incoming, history, tip)...
r7762 % log -r tip -p --git
changeset: 6:2404bbcab562
tag: tip
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: b1.1
diff --git a/b1 b/b1
--- a/b1
+++ b/b1
@@ -1,1 +1,2 @@
b1
+postm
Alexis S. L. Carvalho
fix hg log -r ''
r3718 % log -r ""
Matt Mackall
revlog: report node and file when lookup fails
r6228 abort: 00changelog.i@: ambiguous identifier!
Sune Foldager
provide nicer feedback when an unknown node id is passed to a command...
r7062 % log -r <some unknown node id>
abort: unknown revision '1000000000000000000000000000000000000000'!
Dirkjan Ochtman
log: fix traceback for log -k caused by 1ef630452e0b (issue1805)
r9373 % log -k r1
changeset: 1:3d5bf5654eda
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: r1
Christian Ebert
log: prevent negative date range from displaying entire log (issue1805)
r9421 % log -d -1
Brodie Rao
color: colorize based on output labels instead of parsing output...
r10826 % log -p -l2 --color=always
changeset: 6:2404bbcab562
tag: tip
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: b1.1
diff -r 302e9dd6890d -r 2404bbcab562 b1
--- a/b1 Thu Jan 01 00:00:01 1970 +0000
+++ b/b1 Thu Jan 01 00:00:01 1970 +0000
@@ -1,1 +1,2 @@
b1
+postm
changeset: 5:302e9dd6890d
parent: 3:e62f78d544b4
parent: 4:ddb82e70d1a1
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: m12
diff -r e62f78d544b4 -r 302e9dd6890d b2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/b2 Thu Jan 01 00:00:01 1970 +0000
@@ -0,0 +1,1 @@
+b2
Henrik Stuart
log: fix broken multiple user search...
r8020 adding a
adding b
changeset: 0:29a4c94f1924
user: User One <user1@example.org>
date: Thu Jan 01 00:00:00 1970 +0000
summary: a
changeset: 1:e834b5e69c0e
tag: tip
user: User Two <user2@example.org>
date: Thu Jan 01 00:00:00 1970 +0000
summary: b
changeset: 0:29a4c94f1924
user: User One <user1@example.org>
date: Thu Jan 01 00:00:00 1970 +0000
summary: a
Steve Losh
commands: Add 'hg log --branch' and deprecate 'hg log --only-branch'...
r10957 adding a
marked working directory as branch test
adding b
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
adding c
created new head
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
adding c
% log -b default
changeset: 2:c3a4f03cc9a7
parent: 0:24427303d56f
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on default
changeset: 0:24427303d56f
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on default
% log -b test
changeset: 3:f5d8de11c2e2
branch: test
tag: tip
parent: 1:d32277701ccb
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on test
changeset: 1:d32277701ccb
branch: test
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on test
% log -b dummy
Steve Losh
commands: add more robust support for 'hg log -b' (issue2078)...
r10960 abort: unknown revision 'dummy'!
% log -b .
changeset: 3:f5d8de11c2e2
branch: test
tag: tip
parent: 1:d32277701ccb
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on test
changeset: 1:d32277701ccb
branch: test
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on test
Steve Losh
commands: Add 'hg log --branch' and deprecate 'hg log --only-branch'...
r10957 % log -b default -b test
changeset: 3:f5d8de11c2e2
branch: test
tag: tip
parent: 1:d32277701ccb
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on test
changeset: 2:c3a4f03cc9a7
parent: 0:24427303d56f
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on default
changeset: 1:d32277701ccb
branch: test
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on test
changeset: 0:24427303d56f
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on default
Steve Losh
commands: add more robust support for 'hg log -b' (issue2078)...
r10960 % log -b default -b .
changeset: 3:f5d8de11c2e2
branch: test
tag: tip
parent: 1:d32277701ccb
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on test
changeset: 2:c3a4f03cc9a7
parent: 0:24427303d56f
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on default
changeset: 1:d32277701ccb
branch: test
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on test
changeset: 0:24427303d56f
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on default
% log -b . -b test
changeset: 3:f5d8de11c2e2
branch: test
tag: tip
parent: 1:d32277701ccb
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on test
changeset: 1:d32277701ccb
branch: test
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on test
% log -b 2
changeset: 2:c3a4f03cc9a7
parent: 0:24427303d56f
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on default
changeset: 0:24427303d56f
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: commit on default