tests/test-copy2
author bos@serpentine.internal.keyresearch.com
Thu, 01 Sep 2005 09:08:21 -0700
changeset 1191 77a0c7528c2f
parent 1168 235e0effa672
child 1249 a5355fa5e33a
permissions -rwxr-xr-x
Revert changeset 120aa5fc7ced1bf765b4f025f5a3a138cd87f49e. I inadvertantly used "hg import" on a message I saved, expecting it to do the right thing, but instead it made the commit look like I authored it, and filled the description with the email header. Changeset 737f9b90c571b3991f7e35dc846e7ef38a475cfe contains a guard against "hg import" doing this again.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     1
#!/bin/sh
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     2
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     3
hg init
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     4
echo foo > foo
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     5
hg add foo
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     6
hg commit -m1 -d"0 0"
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     7
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     8
echo "# should show copy"
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
     9
cp foo bar
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    10
hg copy foo bar
1168
235e0effa672 Fixed two tests to run with bourne shell.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1127
diff changeset
    11
hg debugstate|grep '^copy'
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    12
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    13
echo "# shouldn't show copy"
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    14
hg commit -m2 -d"0 0"
1168
235e0effa672 Fixed two tests to run with bourne shell.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1127
diff changeset
    15
hg debugstate|grep '^copy'
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    16
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    17
echo "# should match"
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    18
hg debugindex .hg/data/foo.i
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    19
hg debugrename bar
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    20
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    21
echo bleah > foo
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    22
echo quux > bar
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    23
hg commit -m3 -d"0 0"
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    24
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    25
echo "# should not be renamed"
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    26
hg debugrename bar
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    27
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    28
cp foo bar
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    29
hg copy foo bar
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    30
echo "# should show copy"
1168
235e0effa672 Fixed two tests to run with bourne shell.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1127
diff changeset
    31
hg debugstate|grep '^copy'
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    32
hg commit -m3 -d"0 0"
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    33
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    34
echo "# should show no parents for tip"
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    35
hg debugindex .hg/data/bar.i
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    36
echo "# should match"
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    37
hg debugindex .hg/data/foo.i
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    38
hg debugrename bar
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    39
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
    40
echo "# should show no copies"
1168
235e0effa672 Fixed two tests to run with bourne shell.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1127
diff changeset
    41
hg debugstate|grep '^copy'
1127
19b048da4da9 Fixed test-copy2 with only looking at copied files.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1117
diff changeset
    42
19b048da4da9 Fixed test-copy2 with only looking at copied files.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1117
diff changeset
    43
exit 0