tests/test-keyword.t
branchstable
changeset 1116 e05e9d1589b9
parent 1112 3007e5d9eb4e
child 1117 8d5052f23e99
equal deleted inserted replaced
1115:eef22f846b0e 1116:e05e9d1589b9
   332 
   332 
   333   >>> lines = open('a').readlines()
   333   >>> lines = open('a').readlines()
   334   >>> lines.insert(1, 'foo\n')
   334   >>> lines.insert(1, 'foo\n')
   335   >>> lines.append('bar\n')
   335   >>> lines.append('bar\n')
   336   >>> open('a', 'w').writelines(lines)
   336   >>> open('a', 'w').writelines(lines)
   337   $ hg record -d '1 10' -m rectest a<<EOF
   337   $ hg record -d '10 1' -m rectest a<<EOF
   338   > y
   338   > y
   339   > y
   339   > y
   340   > n
   340   > n
   341   > EOF
   341   > EOF
   342   diff --git a/a b/a
   342   diff --git a/a b/a
   353    xxx $
   353    xxx $
   354   +bar
   354   +bar
   355   record change 2/2 to 'a'? [Ynesfdaq?] 
   355   record change 2/2 to 'a'? [Ynesfdaq?] 
   356 
   356 
   357   $ hg identify
   357   $ hg identify
   358   d17e03c92c97+ tip
   358   5f5eb23505c3+ tip
   359   $ hg status
   359   $ hg status
   360   M a
   360   M a
   361   A r
   361   A r
   362 
   362 
   363 Cat modified file a
   363 Cat modified file a
   364 
   364 
   365   $ cat a
   365   $ cat a
   366   expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
   366   expand $Id: a,v 5f5eb23505c3 1970/01/01 00:00:10 test $
   367   foo
   367   foo
   368   do not process $Id:
   368   do not process $Id:
   369   xxx $
   369   xxx $
   370   bar
   370   bar
   371 
   371 
   372 Diff remaining chunk
   372 Diff remaining chunk
   373 
   373 
   374   $ hg diff a
   374   $ hg diff a
   375   diff -r d17e03c92c97 a
   375   diff -r 5f5eb23505c3 a
   376   --- a/a	Wed Dec 31 23:59:51 1969 -0000
   376   --- a/a	Thu Jan 01 00:00:09 1970 -0000
   377   +++ b/a	* (glob)
   377   +++ b/a	* (glob)
   378   @@ -2,3 +2,4 @@
   378   @@ -2,3 +2,4 @@
   379    foo
   379    foo
   380    do not process $Id:
   380    do not process $Id:
   381    xxx $
   381    xxx $
   389 
   389 
   390   $ echo foo > msg
   390   $ echo foo > msg
   391 
   391 
   392  - do not use "hg record -m" here!
   392  - do not use "hg record -m" here!
   393 
   393 
   394   $ hg record -l msg -d '1 11' a<<EOF
   394   $ hg record -l msg -d '11 1' a<<EOF
   395   > y
   395   > y
   396   > y
   396   > y
   397   > y
   397   > y
   398   > EOF
   398   > EOF
   399   diff --git a/a b/a
   399   diff --git a/a b/a
   417   C a
   417   C a
   418 
   418 
   419 rollback and revert expansion
   419 rollback and revert expansion
   420 
   420 
   421   $ cat a
   421   $ cat a
   422   expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $
   422   expand $Id: a,v 78e0a02d76aa 1970/01/01 00:00:11 test $
   423   foo
   423   foo
   424   do not process $Id:
   424   do not process $Id:
   425   xxx $
   425   xxx $
   426   bar
   426   bar
   427   $ hg --verbose rollback
   427   $ hg --verbose rollback
   458   $ hg forget y z
   458   $ hg forget y z
   459   $ rm y z
   459   $ rm y z
   460 
   460 
   461 record added file alone
   461 record added file alone
   462 
   462 
   463   $ hg -v record -l msg -d '1 12' r<<EOF
   463   $ hg -v record -l msg -d '12 2' r<<EOF
   464   > y
   464   > y
   465   > EOF
   465   > EOF
   466   diff --git a/r b/r
   466   diff --git a/r b/r
   467   new file mode 100644
   467   new file mode 100644
   468   examine changes to 'r'? [Ynesfdaq?] 
   468   examine changes to 'r'? [Ynesfdaq?] 
   469   r
   469   r
   470   committed changeset 3:899491280810
   470   committed changeset 3:82a2f715724d
   471   overwriting r expanding keywords
   471   overwriting r expanding keywords
   472  - status call required for dirstate.normallookup() check
   472  - status call required for dirstate.normallookup() check
   473   $ hg status r
   473   $ hg status r
   474   $ hg --verbose rollback
   474   $ hg --verbose rollback
   475   repository tip rolled back to revision 2 (undo commit)
   475   repository tip rolled back to revision 2 (undo commit)
   482 
   482 
   483 record added keyword ignored file
   483 record added keyword ignored file
   484 
   484 
   485   $ echo '$Id$' > i
   485   $ echo '$Id$' > i
   486   $ hg add i
   486   $ hg add i
   487   $ hg --verbose record -d '1 13' -m recignored<<EOF
   487   $ hg --verbose record -d '13 1' -m recignored<<EOF
   488   > y
   488   > y
   489   > EOF
   489   > EOF
   490   diff --git a/i b/i
   490   diff --git a/i b/i
   491   new file mode 100644
   491   new file mode 100644
   492   examine changes to 'i'? [Ynesfdaq?] 
   492   examine changes to 'i'? [Ynesfdaq?] 
   493   i
   493   i
   494   committed changeset 3:5f40fe93bbdc
   494   committed changeset 3:9f40ceb5a072
   495   $ cat i
   495   $ cat i
   496   $Id$
   496   $Id$
   497   $ hg -q rollback
   497   $ hg -q rollback
   498   $ hg forget i
   498   $ hg forget i
   499   $ rm i
   499   $ rm i
   500 
   500 
   501 amend
   501 amend
   502 
   502 
   503   $ echo amend >> a
   503   $ echo amend >> a
   504   $ echo amend >> b
   504   $ echo amend >> b
   505   $ hg -q commit -d '1 14' -m 'prepare amend'
   505   $ hg -q commit -d '14 1' -m 'prepare amend'
   506 
   506 
   507   $ hg --debug commit --amend -d '1 15' -m 'amend without changes' | grep keywords
   507   $ hg --debug commit --amend -d '15 1' -m 'amend without changes' | grep keywords
   508   overwriting a expanding keywords
   508   overwriting a expanding keywords
   509   $ hg -q id
   509   $ hg -q id
   510   a71343332ea9
   510   577e60613a88
   511   $ head -1 a
   511   $ head -1 a
   512   expand $Id: a,v a71343332ea9 1970/01/01 00:00:01 test $
   512   expand $Id: a,v 577e60613a88 1970/01/01 00:00:15 test $
   513 
   513 
   514   $ hg -q strip -n tip
   514   $ hg -q strip -n tip
   515 
   515 
   516 Test patch queue repo
   516 Test patch queue repo
   517 
   517