tests/test-keyword.t
branchstable
changeset 1117 8d5052f23e99
parent 1116 e05e9d1589b9
child 1119 5f7f30917a18
equal deleted inserted replaced
1116:e05e9d1589b9 1117:8d5052f23e99
     1   $ "$TESTDIR/hghave" unix-permissions serve || exit 80
       
     2 
       
     3   $ cat <<EOF >> $HGRCPATH
     1   $ cat <<EOF >> $HGRCPATH
     4   > [extensions]
     2   > [extensions]
     5   > keyword =
     3   > keyword =
     6   > mq =
     4   > mq =
     7   > notify =
     5   > notify =
   295 
   293 
   296 Check whether expansion is filewise and file mode is preserved
   294 Check whether expansion is filewise and file mode is preserved
   297 
   295 
   298   $ echo '$Id$' > c
   296   $ echo '$Id$' > c
   299   $ echo 'tests for different changenodes' >> c
   297   $ echo 'tests for different changenodes' >> c
       
   298 #if unix-permissions
   300   $ chmod 600 c
   299   $ chmod 600 c
   301   $ ls -l c | cut -b 1-10
   300   $ ls -l c | cut -b 1-10
   302   -rw-------
   301   -rw-------
       
   302 #endif
   303 
   303 
   304 commit file c
   304 commit file c
   305 
   305 
   306   $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
   306   $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
   307   adding c
   307   adding c
       
   308 #if unix-permissions
   308   $ ls -l c | cut -b 1-10
   309   $ ls -l c | cut -b 1-10
   309   -rw-------
   310   -rw-------
       
   311 #endif
   310 
   312 
   311 force expansion
   313 force expansion
   312 
   314 
   313   $ hg -v kwexpand
   315   $ hg -v kwexpand
   314   overwriting a expanding keywords
   316   overwriting a expanding keywords
   328   $ echo '$Id$' > r
   330   $ echo '$Id$' > r
   329   $ hg add r
   331   $ hg add r
   330 
   332 
   331 record chunk
   333 record chunk
   332 
   334 
   333   >>> lines = open('a').readlines()
   335   >>> lines = open('a', 'rb').readlines()
   334   >>> lines.insert(1, 'foo\n')
   336   >>> lines.insert(1, 'foo\n')
   335   >>> lines.append('bar\n')
   337   >>> lines.append('bar\n')
   336   >>> open('a', 'w').writelines(lines)
   338   >>> open('a', 'wb').writelines(lines)
   337   $ hg record -d '10 1' -m rectest a<<EOF
   339   $ hg record -d '10 1' -m rectest a<<EOF
   338   > y
   340   > y
   339   > y
   341   > y
   340   > n
   342   > n
   341   > EOF
   343   > EOF
   610   $ rm i
   612   $ rm i
   611 
   613 
   612 cp symlink file; hg cp -A symlink file (part1)
   614 cp symlink file; hg cp -A symlink file (part1)
   613 - copied symlink points to kwfile: overwrite
   615 - copied symlink points to kwfile: overwrite
   614 
   616 
       
   617 #if symlink
   615   $ cp sym i
   618   $ cp sym i
   616   $ ls -l i
   619   $ ls -l i
   617   -rw-r--r--* (glob)
   620   -rw-r--r--* (glob)
   618   $ head -1 i
   621   $ head -1 i
   619   expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
   622   expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
   622   overwriting i shrinking keywords
   625   overwriting i shrinking keywords
   623   $ head -1 i
   626   $ head -1 i
   624   expand $Id$
   627   expand $Id$
   625   $ hg forget i
   628   $ hg forget i
   626   $ rm i
   629   $ rm i
       
   630 #endif
   627 
   631 
   628 Test different options of hg kwfiles
   632 Test different options of hg kwfiles
   629 
   633 
   630   $ hg kwfiles
   634   $ hg kwfiles
   631   a
   635   a
   922 
   926 
   923   $ hg kwexpand nonexistent
   927   $ hg kwexpand nonexistent
   924   nonexistent:* (glob)
   928   nonexistent:* (glob)
   925 
   929 
   926 
   930 
       
   931 #if serve
   927 hg serve
   932 hg serve
   928  - expand with hgweb file
   933  - expand with hgweb file
   929  - no expansion with hgweb annotate/changeset/filediff
   934  - no expansion with hgweb annotate/changeset/filediff
   930  - check errors
   935  - check errors
   931 
   936 
   985   
   990   
   986   
   991   
   987   
   992   
   988   
   993   
   989   $ cat errors.log
   994   $ cat errors.log
       
   995 #endif
   990 
   996 
   991 Prepare merge and resolve tests
   997 Prepare merge and resolve tests
   992 
   998 
   993   $ echo '$Id$' > m
   999   $ echo '$Id$' > m
   994   $ hg add m
  1000   $ hg add m