tests/test-keyword.out
changeset 378 0683aaf458d8
parent 376 f44fb15a0f30
parent 362 3ea0cbaf3535
child 381 17e94f77de6a
equal deleted inserted replaced
377:ce5eb725d0c6 378:0683aaf458d8
    44 like CVS' $Log$, are not supported. A keyword template map
    44 like CVS' $Log$, are not supported. A keyword template map
    45 "Log = {desc}" expands to the first line of the changeset description.
    45 "Log = {desc}" expands to the first line of the changeset description.
    46 
    46 
    47 list of commands:
    47 list of commands:
    48 
    48 
    49  kwcat      output the current or given revision of files expanding keywords
       
    50  kwdemo     print [keywordmaps] configuration and an expansion example
    49  kwdemo     print [keywordmaps] configuration and an expansion example
    51  kwexpand   expand keywords in working directory
    50  kwexpand   expand keywords in working directory
    52  kwfiles    print files currently configured for keyword expansion
    51  kwfiles    print files currently configured for keyword expansion
    53  kwshrink   revert expanded keywords in working directory
    52  kwshrink   revert expanded keywords in working directory
    54 
    53 
    83 demo.txt = 
    82 demo.txt = 
    84 [keywordmaps]
    83 [keywordmaps]
    85 Branch = {branches}
    84 Branch = {branches}
    86 $Branch: demobranch $
    85 $Branch: demobranch $
    87 % kwshrink should exit silently in empty/invalid repo
    86 % kwshrink should exit silently in empty/invalid repo
    88 % symlink nonexisting file
       
    89 % commit hook must fail with missing file
       
    90 cp: a: No such file or directory
       
    91 adding sym
       
    92 sym
       
    93 running hook commit.test: cp a hooktest
       
    94 warning: commit.test hook exited with status 1
       
    95 % bundle null revision containing empty symlink
       
    96 1 changesets found
       
    97 % pull from bundle
       
    98 pulling from ../test-keyword.hg
       
    99 requesting all changes
       
   100 adding changesets
       
   101 adding manifests
       
   102 adding file changes
       
   103 added 1 changesets with 1 changes to 1 files
       
   104 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   105 % cat
    87 % cat
   106 expand $Id$
    88 expand $Id$
   107 do not process $Id:
    89 do not process $Id:
   108 xxx $
    90 xxx $
   109 expand $Id$
    91 expand $Id$
   111 xxx $
    93 xxx $
   112 ignore $Id$
    94 ignore $Id$
   113 % addremove
    95 % addremove
   114 adding a
    96 adding a
   115 adding b
    97 adding b
       
    98 adding sym
   116 % status
    99 % status
   117 A a
   100 A a
   118 A b
   101 A b
       
   102 A sym
   119 % default keyword expansion including commit hook
   103 % default keyword expansion including commit hook
   120 % interrupted commit should not change state or run commit hook
   104 % interrupted commit should not change state or run commit hook
   121 a
   105 a
   122 b
   106 b
       
   107 sym
   123 transaction abort!
   108 transaction abort!
   124 rollback completed
   109 rollback completed
   125 abort: empty commit message
   110 abort: empty commit message
   126 % status
   111 % status
   127 A a
   112 A a
   128 A b
   113 A b
       
   114 A sym
   129 % commit
   115 % commit
   130 a
   116 a
   131 b
   117 b
       
   118 sym
   132 overwriting a expanding keywords
   119 overwriting a expanding keywords
   133 running hook commit.test: cp a hooktest
   120 running hook commit.test: cp a hooktest
   134 % status
   121 % status
   135 ? hooktest
   122 ? hooktest
   136 % identify
   123 % identify
   137 cecf1e2cc3d3
   124 f782df5f9602
   138 % cat
   125 % cat
   139 expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
   126 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
   140 do not process $Id:
   127 do not process $Id:
   141 xxx $
   128 xxx $
   142 expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
   129 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
   143 do not process $Id:
   130 do not process $Id:
   144 xxx $
   131 xxx $
   145 ignore $Id$
   132 ignore $Id$
   146 % hg kwcat
   133 % hg cat
   147 expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
   134 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
   148 do not process $Id:
   135 do not process $Id:
   149 xxx $
   136 xxx $
   150 ignore $Id$
   137 ignore $Id$
   151 a
   138 a
   152 % diff a hooktest
   139 % diff a hooktest
   154 % touch
   141 % touch
   155 % status
   142 % status
   156 % update
   143 % update
   157 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   144 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   158 % cat
   145 % cat
   159 expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
   146 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
   160 do not process $Id:
   147 do not process $Id:
   161 xxx $
   148 xxx $
   162 expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
   149 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
   163 do not process $Id:
   150 do not process $Id:
   164 xxx $
   151 xxx $
   165 ignore $Id$
   152 ignore $Id$
   166 % check whether expansion is filewise
   153 % check whether expansion is filewise
   167 % commit c
   154 % commit c
   168 adding c
   155 adding c
   169 % force expansion
   156 % force expansion
   170 overwriting a expanding keywords
   157 overwriting a expanding keywords
   171 overwriting c expanding keywords
   158 overwriting c expanding keywords
   172 % compare changenodes in a c
   159 % compare changenodes in a c
   173 expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
   160 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
   174 do not process $Id:
   161 do not process $Id:
   175 xxx $
   162 xxx $
   176 $Id: c,v c033759cd8fd 1970/01/01 00:00:02 user $
   163 $Id: c,v ba4426d1938e 1970/01/01 00:00:01 user $
   177 tests for different changenodes
   164 tests for different changenodes
   178 % qinit -c
       
   179 % qimport
   165 % qimport
   180 % qcommit
       
   181 % keywords should not be expanded in patch
   166 % keywords should not be expanded in patch
   182 # HG changeset patch
   167 # HG changeset patch
   183 # User User Name <user@example.com>
   168 # User User Name <user@example.com>
   184 # Date 2 0
   169 # Date 1 0
   185 # Node ID c033759cd8fd162b7863dc4e5d1eea433603880f
   170 # Node ID ba4426d1938ec9673e03ab274d88c44e24618f7f
   186 # Parent  cecf1e2cc3d3447fcc20dd4eac5c4faa8a615df3
   171 # Parent  f782df5f9602483b4e51c31a12315f353bba380c
   187 cndiff
   172 cndiff
   188 
   173 
   189 diff -r cecf1e2cc3d3 -r c033759cd8fd c
   174 diff -r f782df5f9602 -r ba4426d1938e c
   190 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   175 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   191 +++ b/c	Thu Jan 01 00:00:02 1970 +0000
   176 +++ b/c	Thu Jan 01 00:00:01 1970 +0000
   192 @@ -0,0 +1,2 @@
   177 @@ -0,0 +1,2 @@
   193 +$Id$
   178 +$Id$
   194 +tests for different changenodes
   179 +tests for different changenodes
   195 % qpop
   180 % qpop
   196 Patch queue now empty
   181 Patch queue now empty
   197 % qgoto - should imply qpush
   182 % qgoto - should imply qpush
   198 applying mqtest.diff
   183 applying mqtest.diff
   199 Now at: mqtest.diff
   184 Now at: mqtest.diff
   200 % cat
   185 % cat
   201 $Id: c,v c033759cd8fd 1970/01/01 00:00:02 user $
   186 $Id: c,v ba4426d1938e 1970/01/01 00:00:01 user $
   202 tests for different changenodes
   187 tests for different changenodes
   203 % qpop and move on
   188 % qpop and move on
   204 Patch queue now empty
   189 Patch queue now empty
   205 % copy
   190 % copy
   206 % kwfiles added
   191 % kwfiles added
   209 % commit
   194 % commit
   210 c
   195 c
   211  c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
   196  c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
   212 overwriting c expanding keywords
   197 overwriting c expanding keywords
   213 % cat a c
   198 % cat a c
   214 expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
   199 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
   215 do not process $Id:
   200 do not process $Id:
   216 xxx $
   201 xxx $
   217 expand $Id: c,v 1fed52d26fd0 1970/01/01 00:00:02 user $
   202 expand $Id: c,v 0ba462c0f077 1970/01/01 00:00:01 user $
   218 do not process $Id:
   203 do not process $Id:
   219 xxx $
   204 xxx $
   220 % touch copied c after 1 second
   205 % touch copied c after 1 second
   221 % status
   206 % status
   222 % kwfiles
   207 % kwfiles
   223 a
   208 a
   224 c
   209 c
   225 % diff --rev
   210 % diff --rev
   226 diff -r cecf1e2cc3d3 c
   211 diff -r f782df5f9602 c
   227 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   212 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   228 @@ -0,0 +1,3 @@
   213 @@ -0,0 +1,3 @@
   229 +expand $Id$
   214 +expand $Id$
   230 +do not process $Id:
   215 +do not process $Id:
   231 +xxx $
   216 +xxx $
   245 demo.txt = 
   230 demo.txt = 
   246 [keywordmaps]
   231 [keywordmaps]
   247 Xinfo = {author}: {desc}
   232 Xinfo = {author}: {desc}
   248 $Xinfo: test: hg keyword config and expansion example $
   233 $Xinfo: test: hg keyword config and expansion example $
   249 % cat
   234 % cat
   250 expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
   235 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
   251 do not process $Id:
   236 do not process $Id:
   252 xxx $
   237 xxx $
   253 expand $Id: a,v cecf1e2cc3d3 1970/01/01 00:00:01 user $
   238 expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
   254 do not process $Id:
   239 do not process $Id:
   255 xxx $
   240 xxx $
   256 ignore $Id$
   241 ignore $Id$
   257 % hg kwcat
   242 % hg cat
   258 expand $Id: a cecf1e2cc3d3 Thu, 01 Jan 1970 00:00:01 +0000 user $
   243 expand $Id: a f782df5f9602 Thu, 01 Jan 1970 00:00:00 +0000 user $
   259 do not process $Id:
   244 do not process $Id:
   260 xxx $
   245 xxx $
   261 ignore $Id$
   246 ignore $Id$
   262 a
   247 a
   263 % interrupted commit should not change state
   248 % interrupted commit should not change state
   270 % commit
   255 % commit
   271 a
   256 a
   272 overwriting a expanding keywords
   257 overwriting a expanding keywords
   273 % status
   258 % status
   274 % cat
   259 % cat
   275 expand $Id: a a576e5647736 Thu, 01 Jan 1970 00:00:03 +0000 user $
   260 expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
   276 do not process $Id:
   261 do not process $Id:
   277 xxx $
   262 xxx $
   278 $Xinfo: User Name <user@example.com>: firstline $
   263 $Xinfo: User Name <user@example.com>: firstline $
   279 expand $Id: a a576e5647736 Thu, 01 Jan 1970 00:00:03 +0000 user $
   264 expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
   280 do not process $Id:
   265 do not process $Id:
   281 xxx $
   266 xxx $
   282 $Xinfo: User Name <user@example.com>: firstline $
   267 $Xinfo: User Name <user@example.com>: firstline $
   283 ignore $Id$
   268 ignore $Id$
   284 % hg kwcat
   269 % hg cat
   285 expand $Id: a a576e5647736 Thu, 01 Jan 1970 00:00:03 +0000 user $
   270 expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
   286 do not process $Id:
   271 do not process $Id:
   287 xxx $
   272 xxx $
   288 $Xinfo: User Name <user@example.com>: firstline $
   273 $Xinfo: User Name <user@example.com>: firstline $
   289 ignore $Id$
   274 ignore $Id$
   290 a
   275 a
   294 rolling back last transaction
   279 rolling back last transaction
   295 % status
   280 % status
   296 R a
   281 R a
   297 % revert a
   282 % revert a
   298 % cat a
   283 % cat a
   299 expand $Id: a a576e5647736 Thu, 01 Jan 1970 00:00:03 +0000 user $
   284 expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
   300 do not process $Id:
   285 do not process $Id:
   301 xxx $
   286 xxx $
   302 $Xinfo: User Name <user@example.com>: firstline $
   287 $Xinfo: User Name <user@example.com>: firstline $
   303 % clone to test incoming
   288 % clone to test incoming
   304 requesting all changes
   289 requesting all changes
   305 adding changesets
   290 adding changesets
   306 adding manifests
   291 adding manifests
   307 adding file changes
   292 adding file changes
   308 added 2 changesets with 3 changes to 3 files
   293 added 1 changesets with 3 changes to 3 files
   309 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   294 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   310 % incoming
   295 % incoming
   311 comparing with test-keyword/Test
   296 comparing with test-keyword/Test
   312 searching for changes
   297 searching for changes
   313 changeset:   2:a576e5647736
   298 changeset:   1:0729690beff6
   314 tag:         tip
   299 tag:         tip
   315 user:        User Name <user@example.com>
   300 user:        User Name <user@example.com>
   316 date:        Thu Jan 01 00:00:03 1970 +0000
   301 date:        Thu Jan 01 00:00:02 1970 +0000
   317 summary:     firstline
   302 summary:     firstline
   318 
   303 
   319 % commit rejecttest
   304 % commit rejecttest
   320 a
   305 a
   321 overwriting a expanding keywords
   306 overwriting a expanding keywords
   322 % export
   307 % export
   323 % import
   308 % import
   324 applying ../rejecttest.diff
   309 applying ../rejecttest.diff
   325 % cat
   310 % cat
   326 expand $Id: a 97b8d4afd122 Thu, 01 Jan 1970 00:00:04 +0000 user $ rejecttest
   311 expand $Id: a 82983f13f138 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
   327 do not process $Id: rejecttest
   312 do not process $Id: rejecttest
   328 xxx $
   313 xxx $
   329 $Xinfo: User Name <user@example.com>: rejects? $
   314 $Xinfo: User Name <user@example.com>: rejects? $
   330 expand $Id: a 97b8d4afd122 Thu, 01 Jan 1970 00:00:04 +0000 user $ rejecttest
   315 expand $Id: a 82983f13f138 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
   331 do not process $Id: rejecttest
   316 do not process $Id: rejecttest
   332 xxx $
   317 xxx $
   333 $Xinfo: User Name <user@example.com>: rejects? $
   318 $Xinfo: User Name <user@example.com>: rejects? $
   334 ignore $Id$
   319 ignore $Id$
   335 
   320 
   345 abort: outstanding uncommitted changes in given files
   330 abort: outstanding uncommitted changes in given files
   346 x/a
   331 x/a
   347  x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
   332  x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
   348 overwriting x/a expanding keywords
   333 overwriting x/a expanding keywords
   349 % cat a
   334 % cat a
   350 expand $Id: x/a 6ae8e7fbf16c Thu, 01 Jan 1970 00:00:04 +0000 user $
   335 expand $Id: x/a f27c134d2d9b Thu, 01 Jan 1970 00:00:03 +0000 user $
   351 do not process $Id:
   336 do not process $Id:
   352 xxx $
   337 xxx $
   353 $Xinfo: User Name <user@example.com>: xa $
   338 $Xinfo: User Name <user@example.com>: xa $
   354 % kwshrink a inside directory x
   339 % kwshrink a inside directory x
   355 overwriting x/a shrinking keywords
   340 overwriting x/a shrinking keywords
   358 do not process $Id:
   343 do not process $Id:
   359 xxx $
   344 xxx $
   360 $Xinfo$
   345 $Xinfo$
   361 % kwexpand nonexistent
   346 % kwexpand nonexistent
   362 nonexistent: No such file or directory
   347 nonexistent: No such file or directory
       
   348 % switch off expansion
   363 % kwshrink with unknown file u
   349 % kwshrink with unknown file u
   364 overwriting a shrinking keywords
   350 overwriting a shrinking keywords
   365 overwriting x/a shrinking keywords
   351 overwriting x/a shrinking keywords
   366 % cat
   352 % cat
   367 expand $Id$
   353 expand $Id$
   371 expand $Id$
   357 expand $Id$
   372 do not process $Id:
   358 do not process $Id:
   373 xxx $
   359 xxx $
   374 $Xinfo$
   360 $Xinfo$
   375 ignore $Id$
   361 ignore $Id$
   376 % hg kwcat
   362 % hg cat
   377 expand $Id: a a576e5647736 Thu, 01 Jan 1970 00:00:03 +0000 user $
   363 expand $Id: a 0729690beff6 Thu, 01 Jan 1970 00:00:02 +0000 user $
   378 do not process $Id:
   364 do not process $Id:
   379 xxx $
   365 xxx $
   380 $Xinfo: User Name <user@example.com>: firstline $
   366 $Xinfo: User Name <user@example.com>: firstline $
   381 ignore $Id$
   367 ignore $Id$
   382 a
   368 a
       
   369 % cat
       
   370 expand $Id$
       
   371 do not process $Id:
       
   372 xxx $
       
   373 $Xinfo$
       
   374 expand $Id$
       
   375 do not process $Id:
       
   376 xxx $
       
   377 $Xinfo$
       
   378 ignore $Id$
       
   379 % hg cat
       
   380 expand $Id$
       
   381 do not process $Id:
       
   382 xxx $
       
   383 $Xinfo$
       
   384 ignore $Id$
       
   385 a