tests/test-copy2.out
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
Mon, 16 Apr 2007 20:17:39 -0300
changeset 4359 2e3c54fb79a3
parent 3659 f4dece0f7016
child 4374 de612b5f8d59
permissions -rw-r--r--
actually port simplemerge to hg - use bdiff instead of patiencediff; this is a larger change, since bdiff works on 2 multi-line strings, while patiencediff works on 2 lists; - rename the main class from Merge3 to Merge3Text and add a Merge3 class that derives from Merge3Text. This new Merge3 class has the same interface from the original class, so that the tests still work; - Merge3 uses util.binary to detect binary data and raises util.Abort instead of a specific exception; - don't use the @decorator syntax, to keep python2.3 compatibility; - the test uses unittest, which likes to print how long it took to run. This obviously doesn't play too well with hg's test suite, so we override time.time to fool unittest; - one test has a different (but still valid) output because of the different diff algorithm used; - the TestCase class used by bzr has some extras to help debugging. test-merge3.py used 2 of them: - log method to log some data - assertEqualDiff method to ease viewing diffs of diffs We add a dummy log method and use regular assertEquals instead of assertEqualDiff. - make simplemerge executable and add "#!/usr/bin/env python" header
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     1
# should show copy
1127
19b048da4da9 Fixed test-copy2 with only looking at copied files.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1117
diff changeset
     2
copy: foo -> bar
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     3
# shouldn't show copy
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     4
# should match
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     5
   rev    offset  length   base linkrev nodeid       p1           p2
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     6
     0         0       5      0       0 2ed2a3912a0b 000000000000 000000000000
3659
f4dece0f7016 refactor debugrenamed
Matt Mackall <mpm@selenic.com>
parents: 1127
diff changeset
     7
bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     8
# should not be renamed
3659
f4dece0f7016 refactor debugrenamed
Matt Mackall <mpm@selenic.com>
parents: 1127
diff changeset
     9
bar not renamed
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    10
# should show copy
1127
19b048da4da9 Fixed test-copy2 with only looking at copied files.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1117
diff changeset
    11
copy: foo -> bar
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    12
# should show no parents for tip
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    13
   rev    offset  length   base linkrev nodeid       p1           p2
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    14
     0         0      69      0       1 6ca237634e1f 000000000000 000000000000
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    15
     1        69       6      1       2 7a1ff8e75f5b 6ca237634e1f 000000000000
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    16
     2        75      82      1       3 243dfe60f3d9 000000000000 000000000000
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    17
# should match
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    18
   rev    offset  length   base linkrev nodeid       p1           p2
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    19
     0         0       5      0       0 2ed2a3912a0b 000000000000 000000000000
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    20
     1         5       7      1       2 dd12c926cf16 2ed2a3912a0b 000000000000
3659
f4dece0f7016 refactor debugrenamed
Matt Mackall <mpm@selenic.com>
parents: 1127
diff changeset
    21
bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    22
# should show no copies