tests/test-rename-dir-merge.out
author David Greenaway <hg-dev@davidgreenaway.com>
Sat, 03 Apr 2010 11:58:16 +1100
changeset 11060 e6df01776e08
parent 10490 f2618cacb485
child 11716 db426935fa94
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:
3735
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     1
adding a/a
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     2
adding a/b
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     3
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
5610
2493a478f395 copy: handle rename internally
Matt Mackall <mpm@selenic.com>
parents: 5567
diff changeset
     4
moving a/a to b/a
2493a478f395 copy: handle rename internally
Matt Mackall <mpm@selenic.com>
parents: 5567
diff changeset
     5
moving a/b to b/b
3735
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     6
2 files updated, 0 files merged, 2 files removed, 0 files unresolved
6336
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 5610
diff changeset
     7
created new head
5371
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
     8
  searching for copies back to rev 1
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
     9
  unmatched files in local:
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    10
   a/c
5567
56e9f7b2d8fa rename: add test for moving untracked files in directories
Matt Mackall <mpm@selenic.com>
parents: 5371
diff changeset
    11
   a/d
5371
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    12
  unmatched files in other:
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    13
   b/a
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    14
   b/b
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    15
  all copies found (* = to merge, ! = divergent):
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    16
   b/a -> a/a 
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    17
   b/b -> a/b 
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    18
  checking for directory renames
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    19
  dir a/ -> b/
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    20
  file a/c -> b/c
5567
56e9f7b2d8fa rename: add test for moving untracked files in directories
Matt Mackall <mpm@selenic.com>
parents: 5371
diff changeset
    21
  file a/d -> b/d
8753
af5f099d932b merge: refactor manifestmerge init to better report effective ancestor
Matt Mackall <mpm@selenic.com>
parents: 6336
diff changeset
    22
resolving manifests
af5f099d932b merge: refactor manifestmerge init to better report effective ancestor
Matt Mackall <mpm@selenic.com>
parents: 6336
diff changeset
    23
 overwrite None partial False
10490
f2618cacb485 filelog: sort meta entries, ensure deterministic order
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents: 10431
diff changeset
    24
 ancestor f9b20c0d4c51 local ce36d17b18fb+ remote 397f8b00a740
5567
56e9f7b2d8fa rename: add test for moving untracked files in directories
Matt Mackall <mpm@selenic.com>
parents: 5371
diff changeset
    25
 a/d: remote renamed directory to b/d -> d
3735
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    26
 a/c: remote renamed directory to b/c -> d
4416
bb1800a7d7e1 merge: fix spurious merges for copies in linear updates
Matt Mackall <mpm@selenic.com>
parents: 4304
diff changeset
    27
 a/b: other deleted -> r
bb1800a7d7e1 merge: fix spurious merges for copies in linear updates
Matt Mackall <mpm@selenic.com>
parents: 4304
diff changeset
    28
 a/a: other deleted -> r
bb1800a7d7e1 merge: fix spurious merges for copies in linear updates
Matt Mackall <mpm@selenic.com>
parents: 4304
diff changeset
    29
 b/a: remote created -> g
bb1800a7d7e1 merge: fix spurious merges for copies in linear updates
Matt Mackall <mpm@selenic.com>
parents: 4304
diff changeset
    30
 b/b: remote created -> g
10431
ba5e508b5e92 update: make calls to ui.progress()
Augie Fackler <durin42@gmail.com>
parents: 8753
diff changeset
    31
update: a/a 1/6 files (16.67%)
3735
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    32
removing a/a
10431
ba5e508b5e92 update: make calls to ui.progress()
Augie Fackler <durin42@gmail.com>
parents: 8753
diff changeset
    33
update: a/b 2/6 files (33.33%)
3735
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    34
removing a/b
10431
ba5e508b5e92 update: make calls to ui.progress()
Augie Fackler <durin42@gmail.com>
parents: 8753
diff changeset
    35
update: a/c 3/6 files (50.00%)
3735
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    36
moving a/c to b/c
10431
ba5e508b5e92 update: make calls to ui.progress()
Augie Fackler <durin42@gmail.com>
parents: 8753
diff changeset
    37
update: a/d 4/6 files (66.67%)
5567
56e9f7b2d8fa rename: add test for moving untracked files in directories
Matt Mackall <mpm@selenic.com>
parents: 5371
diff changeset
    38
moving a/d to b/d
10431
ba5e508b5e92 update: make calls to ui.progress()
Augie Fackler <durin42@gmail.com>
parents: 8753
diff changeset
    39
update: b/a 5/6 files (83.33%)
4416
bb1800a7d7e1 merge: fix spurious merges for copies in linear updates
Matt Mackall <mpm@selenic.com>
parents: 4304
diff changeset
    40
getting b/a
10431
ba5e508b5e92 update: make calls to ui.progress()
Augie Fackler <durin42@gmail.com>
parents: 8753
diff changeset
    41
update: b/b 6/6 files (100.00%)
4416
bb1800a7d7e1 merge: fix spurious merges for copies in linear updates
Matt Mackall <mpm@selenic.com>
parents: 4304
diff changeset
    42
getting b/b
5567
56e9f7b2d8fa rename: add test for moving untracked files in directories
Matt Mackall <mpm@selenic.com>
parents: 5371
diff changeset
    43
4 files updated, 0 files merged, 2 files removed, 0 files unresolved
3735
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    44
(branch merge, don't forget to commit)
5567
56e9f7b2d8fa rename: add test for moving untracked files in directories
Matt Mackall <mpm@selenic.com>
parents: 5371
diff changeset
    45
a/* b/a b/b b/c b/d
3735
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    46
M b/a
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    47
M b/b
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    48
A b/c
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    49
  a/c
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    50
R a/a
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    51
R a/b
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    52
R a/c
5567
56e9f7b2d8fa rename: add test for moving untracked files in directories
Matt Mackall <mpm@selenic.com>
parents: 5371
diff changeset
    53
? b/d
5229
dee573ba79f1 correctly record file-level history when the local side renames a directory
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4416
diff changeset
    54
b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88
4416
bb1800a7d7e1 merge: fix spurious merges for copies in linear updates
Matt Mackall <mpm@selenic.com>
parents: 4304
diff changeset
    55
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5371
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    56
  searching for copies back to rev 1
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    57
  unmatched files in local:
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    58
   b/a
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    59
   b/b
5567
56e9f7b2d8fa rename: add test for moving untracked files in directories
Matt Mackall <mpm@selenic.com>
parents: 5371
diff changeset
    60
   b/d
5371
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    61
  unmatched files in other:
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    62
   a/c
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    63
  all copies found (* = to merge, ! = divergent):
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    64
   b/a -> a/a 
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    65
   b/b -> a/b 
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    66
  checking for directory renames
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    67
  dir a/ -> b/
17ed9b9a0d03 merge: add debug diagnostics for findcopies
Matt Mackall <mpm@selenic.com>
parents: 5229
diff changeset
    68
  file a/c -> b/c
8753
af5f099d932b merge: refactor manifestmerge init to better report effective ancestor
Matt Mackall <mpm@selenic.com>
parents: 6336
diff changeset
    69
resolving manifests
af5f099d932b merge: refactor manifestmerge init to better report effective ancestor
Matt Mackall <mpm@selenic.com>
parents: 6336
diff changeset
    70
 overwrite None partial False
10490
f2618cacb485 filelog: sort meta entries, ensure deterministic order
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents: 10431
diff changeset
    71
 ancestor f9b20c0d4c51 local 397f8b00a740+ remote ce36d17b18fb
3735
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    72
 None: local renamed directory to b/c -> d
10431
ba5e508b5e92 update: make calls to ui.progress()
Augie Fackler <durin42@gmail.com>
parents: 8753
diff changeset
    73
update:None 1/1 files (100.00%)
3735
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    74
getting a/c to b/c
4416
bb1800a7d7e1 merge: fix spurious merges for copies in linear updates
Matt Mackall <mpm@selenic.com>
parents: 4304
diff changeset
    75
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3735
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    76
(branch merge, don't forget to commit)
5567
56e9f7b2d8fa rename: add test for moving untracked files in directories
Matt Mackall <mpm@selenic.com>
parents: 5371
diff changeset
    77
a/* b/a b/b b/c b/d
3735
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    78
A b/c
205f0fd4a4a1 Add missing test output
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    79
  a/c
5567
56e9f7b2d8fa rename: add test for moving untracked files in directories
Matt Mackall <mpm@selenic.com>
parents: 5371
diff changeset
    80
? b/d
6336
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 5610
diff changeset
    81
created new head
5229
dee573ba79f1 correctly record file-level history when the local side renames a directory
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4416
diff changeset
    82
b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88