tests/test-keyword.out
branchkwmap-templates
changeset 151 5f3856a6ce56
parent 148 c0baa881d90a
child 152 7ca8e7661609
--- a/tests/test-keyword.out	Sat Feb 24 11:19:34 2007 +0100
+++ b/tests/test-keyword.out	Sat Feb 24 11:56:08 2007 +0100
@@ -8,8 +8,10 @@
 Mercurial internally. The mechanism can be regarded as a convenience
 for the current user and may be turned off anytime.
 
-Substitution takes place on every commit and update of the working
-repository.
+The exansion works in 2 modes:
+    1) working mode: substitution takes place on every commit and
+       update of the working repository.
+    2) archive mode: substitution is only triggered by "hg archive".
 
 Caveat: "hg import" might fail if the patches were exported from a
 repo with a different/no keyword setup, whereas "hg unbundle" is
@@ -24,6 +26,10 @@
      # files matching patterns with value 'ignore' are ignored
      **.py =          ## expand keywords in all python files
      x* = ignore      ## but ignore files matching "x*"
+     ** = archive     ## keywords in all textfiles are expanded
+                      ## when creating a distribution
+     y* = noarchive   ## keywords in files matching "y*" are not expanded
+                      ## on archive creation
      ...
      [keywordmaps]
      # custom hg template maps _replace_ the CVS-like default ones
@@ -46,39 +52,53 @@
 no commands defined
 % cat
 expand $Id$
+ignore $Id$
+archive $Id$
 expand $Id$
-ignore $Id$
 % default keyword expansion
 % commit
 adding a
 adding b
+adding c
 adding sym
 a
 b
+c
 sym
 overwriting a expanding keywords
 % status
 % cat
-expand $Id: a,v 126ec311add6 1970/01/01 00:00:00 user $
-expand $Id: a,v 126ec311add6 1970/01/01 00:00:00 user $
+expand $Id: a,v 99e97605039e 1970/01/01 00:00:00 user $
 ignore $Id$
+archive $Id$
+expand $Id: a,v 99e97605039e 1970/01/01 00:00:00 user $
 % hg cat
-expand $Id: a,v 126ec311add6 1970/01/01 00:00:00 user $
+expand $Id: a,v 99e97605039e 1970/01/01 00:00:00 user $
+archive $Id$
 ignore $Id$
 a
 % update
-3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+4 files updated, 0 files merged, 0 files removed, 0 files unresolved
 % cat
-expand $Id: a,v 126ec311add6 1970/01/01 00:00:00 user $
-expand $Id: a,v 126ec311add6 1970/01/01 00:00:00 user $
+expand $Id: a,v 99e97605039e 1970/01/01 00:00:00 user $
 ignore $Id$
+archive $Id$
+expand $Id: a,v 99e97605039e 1970/01/01 00:00:00 user $
+% archive
+% cat
+expand $Id$
+ignore $Id$
+archive $Id: c,v 99e97605039e 1970/01/01 00:00:00 user $
+a
 % custom keyword expansion
 % cat
-expand $Id: a,v 126ec311add6 1970/01/01 00:00:00 user $
-expand $Id: a,v 126ec311add6 1970/01/01 00:00:00 user $
+expand $Id: a,v 99e97605039e 1970/01/01 00:00:00 user $
 ignore $Id$
+archive $Id$
+expand $Id: a,v 99e97605039e 1970/01/01 00:00:00 user $
 % hg cat
-expand $Id: a 126ec311add6 Thu, 01 Jan 1970 00:00:00 +0000 user $
+expand $Id: a 99e97605039e Thu, 01 Jan 1970 00:00:00 +0000 user $
+archive $Id$
 ignore $Id$
 a
 % commit
@@ -86,25 +106,27 @@
 overwriting a expanding keywords
 % status
 % cat
-expand $Id: a 6022c13396d3 Thu, 01 Jan 1970 00:00:01 +0000 user $
-$Xinfo: User Name <user@example.com>: firstline $
-expand $Id: a 6022c13396d3 Thu, 01 Jan 1970 00:00:01 +0000 user $
+expand $Id: a 001dbcdc5258 Thu, 01 Jan 1970 00:00:01 +0000 user $
 $Xinfo: User Name <user@example.com>: firstline $
 ignore $Id$
+archive $Id$
+expand $Id: a 001dbcdc5258 Thu, 01 Jan 1970 00:00:01 +0000 user $
+$Xinfo: User Name <user@example.com>: firstline $
 % hg cat
-expand $Id: a 6022c13396d3 Thu, 01 Jan 1970 00:00:01 +0000 user $
+expand $Id: a 001dbcdc5258 Thu, 01 Jan 1970 00:00:01 +0000 user $
 $Xinfo: User Name <user@example.com>: firstline $
+archive $Id$
 ignore $Id$
 a
 requesting all changes
 adding changesets
 adding manifests
 adding file changes
-added 1 changesets with 3 changes to 3 files
-3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+added 1 changesets with 4 changes to 4 files
+4 files updated, 0 files merged, 0 files removed, 0 files unresolved
 % incoming
 searching for changes
-changeset:   1:6022c13396d3
+changeset:   1:001dbcdc5258
 tag:         tip
 user:        User Name <user@example.com>
 date:        Thu Jan 01 00:00:01 1970 +0000
@@ -112,21 +134,24 @@
 
 % switch off expansion
 % cat
-expand $Id: a 6022c13396d3 Thu, 01 Jan 1970 00:00:01 +0000 user $
-$Xinfo: User Name <user@example.com>: firstline $
-expand $Id: a 6022c13396d3 Thu, 01 Jan 1970 00:00:01 +0000 user $
+expand $Id: a 001dbcdc5258 Thu, 01 Jan 1970 00:00:01 +0000 user $
 $Xinfo: User Name <user@example.com>: firstline $
 ignore $Id$
+archive $Id$
+expand $Id: a 001dbcdc5258 Thu, 01 Jan 1970 00:00:01 +0000 user $
+$Xinfo: User Name <user@example.com>: firstline $
 % hg cat
 expand $Id$
 $Xinfo$
+archive $Id$
+ignore $Id$
+a
+% update
+4 files updated, 0 files merged, 0 files removed, 0 files unresolved
+% cat
+expand $Id$
+$Xinfo$
 ignore $Id$
-a
-% update
-3 files updated, 0 files merged, 0 files removed, 0 files unresolved
-% cat
+archive $Id$
 expand $Id$
 $Xinfo$
-expand $Id$
-$Xinfo$
-ignore $Id$