tests/test-keyword
branchstable
changeset 738 abd249e1db3c
parent 737 dc8fe24c628e
child 743 f2e3829bfbf0
equal deleted inserted replaced
732:0ff5881bc04b 738:abd249e1db3c
     3 cat <<EOF >> $HGRCPATH
     3 cat <<EOF >> $HGRCPATH
     4 [extensions]
     4 [extensions]
     5 keyword =
     5 keyword =
     6 mq =
     6 mq =
     7 notify =
     7 notify =
       
     8 record =
     8 transplant =
     9 transplant =
       
    10 [ui]
       
    11 interactive = true
     9 EOF
    12 EOF
    10 
    13 
    11 # demo before [keyword] files are set up
    14 # demo before [keyword] files are set up
    12 # would succeed without uisetup otherwise
    15 # would succeed without uisetup otherwise
    13 echo % hg kwdemo
    16 echo % hg kwdemo
    19 
    22 
    20 hg --quiet kwdemo "Branch = {branches}"
    23 hg --quiet kwdemo "Branch = {branches}"
    21 
    24 
    22 cat <<EOF >> $HGRCPATH
    25 cat <<EOF >> $HGRCPATH
    23 [keyword]
    26 [keyword]
    24 * =
    27 ** =
    25 b = ignore
    28 b = ignore
    26 [hooks]
    29 [hooks]
    27 commit=
    30 commit=
    28 commit.test=cp a hooktest
    31 commit.test=cp a hooktest
    29 EOF
    32 EOF
   137 echo % force expansion
   140 echo % force expansion
   138 hg -v kwexpand
   141 hg -v kwexpand
   139 echo % compare changenodes in a c
   142 echo % compare changenodes in a c
   140 cat a c
   143 cat a c
   141 
   144 
   142 echo % qinit -c
   145 echo % record
   143 hg qinit -c
   146 cp "$HGRCPATH" $HGRCPATH.bak
       
   147 sed -e '1 a \foo' a > a.tmp
       
   148 mv a.tmp a
       
   149 echo bar >> a
       
   150 hg record -d '1 10' -m rectest<<EOF
       
   151 y
       
   152 y
       
   153 n
       
   154 EOF
       
   155 echo
       
   156 hg identify
       
   157 hg status
       
   158 echo % cat modified file
       
   159 cat a
       
   160 hg diff | grep -v 'b/a'
       
   161 hg rollback
       
   162 hg update -C
       
   163 
       
   164 echo % init --mq
       
   165 hg init --mq
   144 echo % qimport
   166 echo % qimport
   145 hg qimport -r tip -n mqtest.diff
   167 hg qimport -r tip -n mqtest.diff
   146 echo % qcommit
   168 echo % commit --mq
   147 hg qcommit -mqtest
   169 hg commit --mq -m mqtest
   148 echo % keywords should not be expanded in patch
   170 echo % keywords should not be expanded in patch
   149 cat .hg/patches/mqtest.diff
   171 cat .hg/patches/mqtest.diff
   150 echo % qpop
   172 echo % qpop
   151 hg qpop
   173 hg qpop
   152 echo % qgoto - should imply qpush
   174 echo % qgoto - should imply qpush
   153 hg qgoto mqtest.diff
   175 hg qgoto mqtest.diff
   154 echo % cat
   176 echo % cat
   155 cat c
   177 cat c
       
   178 echo % hg cat
       
   179 hg cat c
       
   180 echo % keyword should not be expanded in filelog
       
   181 hg --config 'extensions.keyword=!' cat c
   156 echo % qpop and move on
   182 echo % qpop and move on
   157 hg qpop
   183 hg qpop
   158 
   184 
   159 echo % copy
   185 echo % copy
   160 hg cp a c
   186 hg cp a c