tests/test-bookmarks-current
branchstable
changeset 12795 3cb0559e44d0
parent 12793 469850088fc1
parent 12794 6bf8d48bec8e
child 12796 bc69ba99e34b
equal deleted inserted replaced
12793:469850088fc1 12795:3cb0559e44d0
     1 #!/bin/sh
       
     2 
       
     3 echo "[extensions]" >> $HGRCPATH
       
     4 echo "bookmarks=" >> $HGRCPATH
       
     5 
       
     6 echo "[bookmarks]" >> $HGRCPATH
       
     7 echo "track.current = True" >> $HGRCPATH
       
     8 
       
     9 hg init
       
    10 
       
    11 echo % no bookmarks
       
    12 hg bookmarks
       
    13 
       
    14 echo % set bookmark X
       
    15 hg bookmark X
       
    16 
       
    17 echo % list bookmarks
       
    18 hg bookmark
       
    19 
       
    20 echo % list bookmarks with color
       
    21 hg --config extensions.color= --config color.mode=ansi \
       
    22     bookmark --color=always
       
    23 
       
    24 echo % update to bookmark X
       
    25 hg update X
       
    26 
       
    27 echo % list bookmarks
       
    28 hg bookmarks
       
    29 
       
    30 echo % rename
       
    31 hg bookmark -m X Z
       
    32 
       
    33 echo % list bookmarks
       
    34 hg bookmarks
       
    35 
       
    36 echo % new bookmark Y
       
    37 hg bookmark Y
       
    38 
       
    39 echo % list bookmarks
       
    40 hg bookmark
       
    41 
       
    42 echo % commit
       
    43 echo 'b' > b
       
    44 hg add b
       
    45 hg commit -m'test'
       
    46 
       
    47 echo % list bookmarks
       
    48 hg bookmark
       
    49 
       
    50 echo % delete bookmarks
       
    51 hg bookmark -d Y
       
    52 hg bookmark -d Z
       
    53 
       
    54 echo % list bookmarks
       
    55 hg bookmark
       
    56 
       
    57 echo % update to tip
       
    58 hg update tip
       
    59 
       
    60 echo % set bookmark Y using -r .
       
    61 hg bookmark -r . Y
       
    62 
       
    63 echo % list bookmarks
       
    64 hg bookmark