tests/test-merge9
author Mads Kiilerich <mads@kiilerich.com>
Tue, 14 Oct 2008 21:28:49 +0200
changeset 7226 b71a52f101dc
parent 6518 92ccccb55ba3
child 7527 5a14a8f3b909
permissions -rwxr-xr-x
Make it possible to disable filtering for a pattern. Rationale: Apparently there were no way to disable for example win32text extension locally. RFC: Can it already be done another way?
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4682
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     1
#!/bin/sh
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     2
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     3
# test that we don't interrupt the merge session if
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     4
# a file-level merge failed
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     5
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     6
hg init repo
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     7
cd repo
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     8
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     9
echo foo > foo
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    10
echo a > bar
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    11
hg ci -Am 'add foo' -d '0 0'
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    12
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    13
hg mv foo baz
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    14
echo b >> bar
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    15
echo quux > quux1
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    16
hg ci -Am 'mv foo baz' -d '0 0'
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    17
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    18
hg up -qC 0
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    19
echo >> foo
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    20
echo c >> bar
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    21
echo quux > quux2
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    22
hg ci -Am 'change foo' -d '0 0'
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    23
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    24
# test with the rename on the remote side
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    25
HGMERGE=false hg merge
6518
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    26
hg resolve -l
4682
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    27
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    28
# test with the rename on the local side
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    29
hg up -C 1
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    30
HGMERGE=false hg merge
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    31
6518
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    32
echo % show unresolved
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    33
hg resolve -l
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    34
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    35
echo % unmark baz
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    36
hg resolve -u baz
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    37
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    38
echo % show
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    39
hg resolve -l
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    40
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    41
echo % re-resolve baz
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    42
hg resolve baz
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    43
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    44
echo % after
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    45
hg resolve -l
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    46
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    47
echo % resolve all
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    48
hg resolve
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    49
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    50
echo % after
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    51
hg resolve -l
92ccccb55ba3 resolve: new command
Matt Mackall <mpm@selenic.com>
parents: 4682
diff changeset
    52
4682
dc5920ea12f8 merge: fix small bug with a failed merge across a rename
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    53
true