tests/test-keyword.t
changeset 817 cd834b4035ec
parent 814 0588121c815b
child 818 b742a071ad9c
equal deleted inserted replaced
816:00570f650792 817:cd834b4035ec
    48   > [keyword]
    48   > [keyword]
    49   > ** =
    49   > ** =
    50   > b = ignore
    50   > b = ignore
    51   > i = ignore
    51   > i = ignore
    52   > [hooks]
    52   > [hooks]
       
    53   > EOF
       
    54   $ cp $HGRCPATH $HGRCPATH.nohooks
       
    55   > cat <<EOF >> $HGRCPATH
    53   > commit=
    56   > commit=
    54   > commit.test=cp a hooktest
    57   > commit.test=cp a hooktest
    55   > EOF
    58   > EOF
    56 
    59 
    57   $ hg init Test-bndl
    60   $ hg init Test-bndl
   155 
   158 
   156 Test hook execution
   159 Test hook execution
   157 
   160 
   158   $ diff a hooktest
   161   $ diff a hooktest
   159 
   162 
   160 Removing commit hook from config
   163   $ cp $HGRCPATH.nohooks $HGRCPATH
   161 
       
   162   $ sed -e '/\[hooks\]/,$ d' "$HGRCPATH" > $HGRCPATH.nohook
       
   163   $ mv "$HGRCPATH".nohook "$HGRCPATH"
       
   164   $ rm hooktest
   164   $ rm hooktest
   165 
   165 
   166 bundle
   166 bundle
   167 
   167 
   168   $ hg bundle --base null ../kw.hg
   168   $ hg bundle --base null ../kw.hg
   245   +++ b/b	Thu Jan 01 00:00:00 1970 +0000
   245   +++ b/b	Thu Jan 01 00:00:00 1970 +0000
   246   @@ -0,0 +1,1 @@
   246   @@ -0,0 +1,1 @@
   247   +ignore $Id$
   247   +ignore $Id$
   248   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   248   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   249 
   249 
   250 Remove notify config
   250   $ cp $HGRCPATH.nohooks $HGRCPATH
   251 
       
   252   $ sed -e '/\[hooks\]/,$ d' "$HGRCPATH" > $HGRCPATH.nonotify
       
   253   $ mv "$HGRCPATH".nonotify "$HGRCPATH"
       
   254 
   251 
   255 Touch files and check with status
   252 Touch files and check with status
   256 
   253 
   257   $ touch a b
   254   $ touch a b
   258   $ hg status
   255   $ hg status
   728   date:        Thu Jan 01 00:00:02 1970 +0000
   725   date:        Thu Jan 01 00:00:02 1970 +0000
   729   summary:     firstline
   726   summary:     firstline
   730   
   727   
   731 Imported patch should not be rejected
   728 Imported patch should not be rejected
   732 
   729 
   733   $ sed -e 's/Id.*/& rejecttest/' a > a.new
   730   $ python -c \
   734   $ mv a.new a
   731   > 'import re; s=re.sub("(Id.*)","\\1 rejecttest",open("a").read()); open("a","wb").write(s);'
   735   $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
   732   $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
   736   a
   733   a
   737   overwriting a expanding keywords
   734   overwriting a expanding keywords
   738   committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
   735   committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
   739   $ hg export -o ../rejecttest.diff tip
   736   $ hg export -o ../rejecttest.diff tip