tests/test-parents
author Brendan Cully <brendan@kublai.com>
Thu, 14 Jun 2007 10:58:49 -0700
changeset 4586 1fcc076fcb17
child 4894 be5dc5e3ab2d
permissions -rwxr-xr-x
Make parents with a file but not a revision use working directory revision.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4586
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     1
#!/bin/sh
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     2
# test parents command
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     3
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     4
hg init a
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     5
cd a
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     6
echo % no working directory
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     7
hg parents
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     8
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     9
echo a > a
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    10
echo b > b
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    11
hg ci -Amab -d '0 0'
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    12
echo a >> a
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    13
hg ci -Ama -d '1 0'
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    14
echo b >> b
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    15
hg ci -Amb -d '2 0'
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    16
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    17
echo % hg parents
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    18
hg parents
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    19
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    20
echo % hg parents a
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    21
hg parents a
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    22
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    23
echo % hg parents -r 2
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    24
hg parents -r 2
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    25
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    26
echo % hg parents -r 2 a
1fcc076fcb17 Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    27
hg parents -r 2 a