tests/fish-merge
author mpm@selenic.com
Tue, 21 Jun 2005 19:31:13 -0800
changeset 419 28511fc21073
parent 28 9f64ee817199
child 544 3d4d5f2aba9a
child 547 4fc63e22b1fe
permissions -rw-r--r--
[PATCH] file seperator handling for the other 'OS' -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH] file seperator handling for the other 'OS' From: K Thananchayan <thananck@yahoo.com> The following patch maintains repo root relative source file names in canonical form (with '/' as file seperator). Mercurial calls os.path.join, os.path.normpath, os.path.walk that use platform's file seperator. This patch does not change seperator in these circumstances (except when the result refer to source files). manifest hash: 2fbb4cb0d3d0bc4f4de5c7c8803fb738072ec6c5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCuNuBywK+sNU5EO8RAhAZAKCV8cz11+rdof9n1tHb0uDScF34GgCeITNi 4aVikToPXqXyReN9kFP5pnY= =xcV5 -----END PGP SIGNATURE-----
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
     1
set -e
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
     2
set -x
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
     3
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
     4
# skip commit logs
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
     5
export HGMERGE=tkmerge
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
     6
export EDITOR=true
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
     7
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
     8
rm -rf m m1 m2
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
     9
mkdir m
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    10
cd m
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    11
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    12
echo "m     this  that"
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    13
echo "this" > a
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    14
echo "that" > b
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    15
hg init
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    16
hg addremove
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    17
hg commit
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    18
echo "a:" `hg dump a` "b:" `hg dump b`
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    19
echo
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    20
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    21
cd ..
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    22
echo "m2    this  that "
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    23
mkdir m2
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    24
cd m2
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    25
hg branch ../m
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    26
hg checkout
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    27
echo "a:" `hg dump a` "b:" `hg dump b`
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    28
echo
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    29
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    30
cd ../m
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    31
echo "m     this1 that "
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    32
echo "this1" > a
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    33
hg commit
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    34
echo "a:" `hg dump a` "b:" `hg dump b`
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    35
echo
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    36
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    37
cd ..
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    38
echo "m1    this1 that "
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    39
mkdir m1
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    40
cd m1
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    41
hg branch ../m
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    42
hg checkout
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    43
echo "a:" `hg dump a` "b:" `hg dump b`
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    44
echo
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    45
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    46
cd ../m1
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    47
echo "m1    this1 that1"
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    48
echo "that1" > b
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    49
hg commit
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    50
echo "a:" `hg dump a` "b:" `hg dump b`
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    51
echo
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    52
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    53
cd ../m2
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    54
echo "m2    this  that2"
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    55
echo "that2" > b
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    56
hg commit
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    57
echo "a:" `hg dump a` "b:" `hg dump b`
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    58
echo
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    59
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    60
cd ../m1
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    61
echo "m1:m2 this1 that1 that2"
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    62
hg merge ../m2 # b should conflict, a should be fine
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    63
echo "a:" `hg dump a` "b:" `hg dump b`
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    64
echo
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    65
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    66
cd ../m2
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    67
echo "m2    this2 that2"
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    68
echo "this2" > a
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    69
hg commit
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    70
echo "a:" `hg dump a` "b:" `hg dump b`
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    71
echo
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    72
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    73
cd ../m2
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    74
echo "m2:m this12 that2"
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    75
hg merge ../m # a should conflict, b should be fine
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    76
echo "a:" `hg dump a` "b:" `hg dump b`
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    77
echo
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    78
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    79
# now here's the interesting bit
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    80
# if we choose ancestor by file, no conflicts
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    81
# otherwise we've got two equally close ancestors, each with a conflict
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    82
# if we go back to the root, we'll have both conflicts again
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    83
echo "m2:m1 this12 that12"
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    84
hg merge ../m1 # should be clean
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    85
echo "a:" `hg dump a` "b:" `hg dump b`
9f64ee817199 Add some tests to the repo
mpm@selenic.com
parents:
diff changeset
    86
echo