tests/test-parents
changeset 11831 00fee6394daf
parent 11829 3152c978496a
parent 11823 f1c2de22b8a8
child 11832 7fa36341e7a0
equal deleted inserted replaced
11829:3152c978496a 11831:00fee6394daf
     1 #!/bin/sh
       
     2 # test parents command
       
     3 
       
     4 hg init repo
       
     5 cd repo
       
     6 echo % no working directory
       
     7 hg parents
       
     8 
       
     9 echo a > a
       
    10 echo b > b
       
    11 hg ci -Amab -d '0 0'
       
    12 echo a >> a
       
    13 hg ci -Ama -d '1 0'
       
    14 echo b >> b
       
    15 hg ci -Amb -d '2 0'
       
    16 echo c > c
       
    17 hg ci -Amc -d '3 0'
       
    18 hg up -C 1
       
    19 echo d > c
       
    20 hg ci -Amc2 -d '4 0'
       
    21 hg up -C 3
       
    22 
       
    23 echo % hg parents
       
    24 hg parents
       
    25 
       
    26 echo % hg parents a
       
    27 hg parents a
       
    28 
       
    29 echo % hg parents c, single revision
       
    30 hg parents c
       
    31 
       
    32 echo % hg parents -r 3 c
       
    33 hg parents -r 3 c
       
    34 
       
    35 echo % hg parents -r 2
       
    36 hg parents -r 2
       
    37 
       
    38 echo % hg parents -r 2 a
       
    39 hg parents -r 2 a
       
    40 
       
    41 echo % hg parents -r 2 ../a
       
    42 hg parents -r 2 ../a
       
    43 
       
    44 echo '% cd dir; hg parents -r 2 ../a'
       
    45 mkdir dir
       
    46 cd dir
       
    47 hg parents -r 2 ../a
       
    48 
       
    49 echo '% hg parents -r 2 path:a'
       
    50 hg parents -r 2 path:a
       
    51 
       
    52 echo '% hg parents -r 2 glob:a'
       
    53 cd ..
       
    54 hg parents -r 2 glob:a
       
    55 
       
    56 echo % merge working dir with 2 parents, hg parents c
       
    57 HGMERGE=true hg merge
       
    58 hg parents c
       
    59 
       
    60 echo % merge working dir with 1 parent, hg parents
       
    61 hg up -C 2
       
    62 HGMERGE=true hg merge -r 4
       
    63 hg parents
       
    64 echo % merge working dir with 1 parent, hg parents c
       
    65 hg parents c
       
    66 
       
    67 true