tests/test-keyword
branch0.9.2compat
changeset 311 6160401f94f2
parent 303 46ccec2f325f
child 324 b3abbb5cf61c
equal deleted inserted replaced
303:46ccec2f325f 311:6160401f94f2
     4 [extensions]
     4 [extensions]
     5 hgext.keyword =
     5 hgext.keyword =
     6 [keyword]
     6 [keyword]
     7 * =
     7 * =
     8 b = ignore
     8 b = ignore
       
     9 [hooks]
       
    10 commit=
       
    11 commit.test=cp a hooktest
     9 EOF
    12 EOF
    10 
    13 
    11 echo % help
    14 echo % help
    12 # grep for backwards compatibility
    15 # grep for backwards compatibility
    13 hg help keyword \
    16 hg help keyword \
    33 echo 'xxx $' >> a
    36 echo 'xxx $' >> a
    34 echo 'ignore $Id$' > b
    37 echo 'ignore $Id$' > b
    35 echo % cat
    38 echo % cat
    36 cat a b
    39 cat a b
    37 
    40 
    38 echo % default keyword expansion
    41 echo % addremove
       
    42 hg addremove
       
    43 echo % status
       
    44 hg status
       
    45 
       
    46 echo % default keyword expansion including commit hook
       
    47 #echo % interrupted commit should not change state or run commit hook
       
    48 #HGEDITOR=false hg --debug commit
       
    49 #echo % status
       
    50 #hg status
       
    51 
    39 echo % commit
    52 echo % commit
    40 hg --debug commit -A -mab -d '0 0' -u 'User Name <user@example.com>'
    53 hg --debug commit -mab -d '0 0' -u 'User Name <user@example.com>'
    41 echo % status
    54 echo % status
    42 hg status
    55 hg status
    43 echo % identify
    56 echo % identify
    44 hg --quiet identify
    57 hg --quiet identify
    45 echo % cat
    58 echo % cat
    46 cat a b
    59 cat a b
    47 echo % hg cat
    60 echo % hg cat
    48 hg cat a b
    61 hg cat a b
       
    62 
       
    63 echo
       
    64 echo % diff a hooktest
       
    65 diff a hooktest
       
    66 
       
    67 echo % removing commit hook from config
       
    68 sed -e '/\[hooks\]/,$ d' $HGRCPATH > $HGRCPATH.nohook
       
    69 mv $HGRCPATH.nohook $HGRCPATH
       
    70 rm hooktest
    49 
    71 
    50 echo % touch
    72 echo % touch
    51 touch a b
    73 touch a b
    52 echo % status
    74 echo % status
    53 hg status
    75 hg status
   106 cat <<EOF >> log
   128 cat <<EOF >> log
   107 firstline
   129 firstline
   108 secondline
   130 secondline
   109 EOF
   131 EOF
   110 
   132 
   111 echo % interrupted commit
   133 #echo % interrupted commit
   112 # redirection and grep for backwards compatibility
   134 ## redirection and grep for backwards compatibility
   113 HGEDITOR=false hg commit 2>&1 | grep -v 'edit failed:'
   135 #HGEDITOR=false hg commit 2>&1 | grep -v 'edit failed:'
   114 echo % status
   136 #echo % status
   115 hg status
   137 #hg status
   116 
   138 
   117 echo % commit
   139 echo % commit
   118 hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
   140 hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
   119 rm log
   141 rm log
   120 echo % status
   142 echo % status