tests/test-keyword
changeset 290 b05795ad5632
parent 281 c6314b110e67
child 294 343c5dd8dcda
equal deleted inserted replaced
288:80a300088654 290:b05795ad5632
     7 * =
     7 * =
     8 b = ignore
     8 b = ignore
     9 EOF
     9 EOF
    10 
    10 
    11 echo % help
    11 echo % help
    12 # grep for backwards compatibility
    12 hg help keyword
    13 hg help keyword \
       
    14 | grep -E -v '^list of commands|hg -v help keyword|^$'
       
    15 
    13 
    16 echo % hg kwdemo
    14 echo % hg kwdemo
    17 hg --quiet kwdemo --default \
    15 hg --quiet kwdemo --default \
    18 | sed -e 's![^ ][^ ]*demo.txt,v!/TMP/demo.txt,v!' \
    16 | sed -e 's![^ ][^ ]*demo.txt,v!/TMP/demo.txt,v!' \
    19  -e 's/,v [a-z0-9][a-z0-9]* /,v xxxxxxxxxxxx /' \
    17  -e 's/,v [a-z0-9][a-z0-9]* /,v xxxxxxxxxxxx /' \
    33 
    31 
    34 echo 'expand $Id$' > a
    32 echo 'expand $Id$' > a
    35 echo 'do not process $Id:' >> a
    33 echo 'do not process $Id:' >> a
    36 echo 'xxx $' >> a
    34 echo 'xxx $' >> a
    37 echo 'ignore $Id$' > b
    35 echo 'ignore $Id$' > b
       
    36 ln -s a sym
    38 echo % cat
    37 echo % cat
    39 cat a b
    38 cat sym a b
    40 
    39 
    41 echo % default keyword expansion
    40 echo % default keyword expansion
    42 echo % commit
    41 echo % commit
    43 hg --debug commit -A -mab -d '0 0' -u 'User Name <user@example.com>'
    42 hg --debug commit -A -mabsym -d '0 0' -u 'User Name <user@example.com>'
    44 echo % status
    43 echo % status
    45 hg status
    44 hg status
    46 echo % identify
    45 echo % identify
    47 hg --quiet identify
    46 hg --quiet identify
    48 echo % cat
    47 echo % cat
    49 cat a b
    48 cat sym a b
    50 echo % hg cat
    49 echo % hg cat
    51 hg cat a b
    50 hg cat sym a b
    52 
    51 
       
    52 echo
    53 echo % touch
    53 echo % touch
    54 touch a b
    54 touch a b
    55 echo % status
    55 echo % status
    56 hg status
    56 hg status
    57 
    57 
    58 rm a b
    58 rm sym a b
    59 echo % update
    59 echo % update
    60 hg update
    60 hg update
    61 echo % cat
    61 echo % cat
    62 cat a b
    62 cat sym a b
    63 
    63 
    64 echo % copy
    64 echo % copy
    65 hg cp a c
    65 hg cp a c
    66 
    66 
    67 echo % kwfiles added
    67 echo % kwfiles added
    99 Id = {file} {node|short} {date|rfc822date} {author|user}
    99 Id = {file} {node|short} {date|rfc822date} {author|user}
   100 Xinfo = {author}: {desc}
   100 Xinfo = {author}: {desc}
   101 EOF
   101 EOF
   102 
   102 
   103 echo % cat
   103 echo % cat
   104 cat a b
   104 cat sym a b
   105 echo % hg cat
   105 echo % hg cat
   106 hg cat a b
   106 hg cat sym a b
   107 
   107 
       
   108 echo
   108 echo '$Xinfo$' >> a
   109 echo '$Xinfo$' >> a
   109 cat <<EOF >> log
   110 cat <<EOF >> log
   110 firstline
   111 firstline
   111 secondline
   112 secondline
   112 EOF
   113 EOF
   113 
   114 
   114 echo % interrupted commit
   115 echo % interrupted commit
   115 # redirection and grep for backwards compatibility
   116 HGEDITOR=false hg commit
   116 HGEDITOR=false hg commit 2>&1 | grep -v 'edit failed:'
       
   117 echo % status
   117 echo % status
   118 hg status
   118 hg status
   119 
   119 
   120 echo % commit
   120 echo % commit
   121 hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
   121 hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
   122 rm log
   122 rm log
   123 echo % status
   123 echo % status
   124 hg status
   124 hg status
   125 
   125 
   126 echo % cat
   126 echo % cat
   127 cat a b
   127 cat sym a b
   128 echo % hg cat
   128 echo % hg cat
   129 hg cat a b
   129 hg cat sym a b
       
   130 echo
   130 
   131 
   131 echo % remove
   132 echo % remove
   132 hg remove a
   133 hg remove a
   133 hg --debug commit -m rma
   134 hg --debug commit -m rma
   134 echo % status
   135 echo % status
   149 cat <<EOF >> .hg/hgrc
   150 cat <<EOF >> .hg/hgrc
   150 [paths]
   151 [paths]
   151 default = ../Test
   152 default = ../Test
   152 EOF
   153 EOF
   153 echo % incoming
   154 echo % incoming
   154 # remove path to temp dir for backwards compatibility
   155 # remove path to temp dir
   155 hg incoming | grep -v '^comparing with'
   156 hg incoming | sed -e 's/^\(comparing with \).*\(test-keyword.*\)/\1\2/'
   156 
   157 
   157 cd ../Test
   158 cd ../Test
   158 echo % kwexpand/kwshrink on selected files
   159 echo % kwexpand/kwshrink on selected files
   159 mkdir x
   160 mkdir x
   160 echo % copy a x/a
   161 echo % copy a x/a
   179 echo % switch off expansion
   180 echo % switch off expansion
   180 echo % kwshrink with unknown file u
   181 echo % kwshrink with unknown file u
   181 cp a u
   182 cp a u
   182 hg --verbose kwshrink
   183 hg --verbose kwshrink
   183 echo % cat
   184 echo % cat
   184 cat a b
   185 cat sym a b
   185 echo % hg cat
   186 echo % hg cat
   186 hg cat a b
   187 hg cat sym a b
   187 
   188 echo
   188 rm $HGRCPATH
   189 rm $HGRCPATH
   189 echo % cat
   190 echo % cat
   190 cat a b
   191 cat sym a b
   191 echo % hg cat
   192 echo % hg cat
   192 hg cat a b
   193 hg cat sym a b
       
   194 echo