tests/test-keyword.out
author Christian Ebert <blacktrash@gmx.net>
Fri, 21 Sep 2007 20:22:21 +0100
changeset 249 8df281c5ca8b
parent 247 fc091591de7e
child 250 b28a2832cba4
permissions -rw-r--r--
Make kwfilelog.cmp test reliable
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
     1
% help
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
     2
keyword extension - keyword expansion in local repositories
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
     3
This extension expands RCS/CVS-like or self-customized $Keywords$
208
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
     4
in tracked text files selected by your configuration.
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
     5
Keywords are only expanded in local repositories and not stored in
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
     6
the change history. The mechanism can be regarded as a convenience
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
     7
for the current user or for archive distribution.
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
     8
Configuration is done in the [keyword] and [keywordmaps] sections
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
     9
of hgrc files.
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    10
Example:
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    11
    [keyword]
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    12
    # expand keywords in every python file except those matching "x*"
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    13
    **.py =
208
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
    14
    x*    = ignore
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
    15
Note: the more specific you are in your filename patterns
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    16
      the less you lose speed in huge repos.
208
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
    17
For [keywordmaps] template mapping and expansion demonstration and
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
    18
control run "hg kwdemo".
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    19
An additional date template filter {date|utcdate} is provided.
208
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
    20
The default template mappings (view with "hg kwdemo -d") can be replaced
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
    21
with customized keywords and templates.
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    22
Again, run "hg kwdemo" to control the results of your config changes.
208
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
    23
Before changing/disabling active keywords, run "hg kwshrink" to avoid
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
    24
the risk of inadvertedly storing expanded keywords in the change history.
211
110c76a94d1c help: no need for kwexpand after import, but after config change
Christian Ebert <blacktrash@gmx.net>
parents: 210
diff changeset
    25
To force expansion after enabling it, or a configuration change, run
110c76a94d1c help: no need for kwexpand after import, but after config change
Christian Ebert <blacktrash@gmx.net>
parents: 210
diff changeset
    26
"hg kwexpand".
208
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
    27
Expansions spanning more than one line and incremental expansions,
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
    28
like CVS' $Log$, are not supported. A keyword template map
201
e826c3cdc52d Make sure there are no newlines in expansion
Christian Ebert <blacktrash@gmx.net>
parents: 189
diff changeset
    29
"Log = {desc}" expands to the first line of the changeset description.
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    30
Caveat: "hg import" fails if the patch context contains an active
211
110c76a94d1c help: no need for kwexpand after import, but after config change
Christian Ebert <blacktrash@gmx.net>
parents: 210
diff changeset
    31
        keyword. In that case run "hg kwshrink", and then reimport.
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    32
        Or, better, use bundle/unbundle to share changes.
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    33
 kwdemo     print [keywordmaps] configuration and an expansion example
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    34
 kwexpand   expand keywords in working directory
247
fc091591de7e Test kwfiles command
Christian Ebert <blacktrash@gmx.net>
parents: 241
diff changeset
    35
 kwfiles    print files currently configured for keyword expansion
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    36
 kwshrink   revert expanded keywords in working directory
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    37
% hg kwdemo
208
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
    38
[extensions]
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
    39
hgext.keyword = 
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    40
[keyword]
210
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
    41
* = 
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
    42
b = ignore
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
    43
demo.txt = 
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    44
[keywordmaps]
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    45
RCSFile = {file|basename},v
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    46
Author = {author|user}
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    47
Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    48
Source = {root}/{file},v
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    49
Date = {date|utcdate}
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    50
Id = {file|basename},v {node|short} {date|utcdate} {author|user}
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    51
Revision = {node|short}
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    52
$RCSFile: demo.txt,v $
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    53
$Author: test $
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    54
$Header: /TMP/demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    55
$Source: /TMP/demo.txt,v $
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    56
$Date: 2000/00/00 00:00:00 $
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    57
$Id: demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    58
$Revision: xxxxxxxxxxxx $
210
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
    59
[extensions]
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
    60
hgext.keyword = 
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
    61
[keyword]
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
    62
* = 
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
    63
b = ignore
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
    64
demo.txt = 
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
    65
[keywordmaps]
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
    66
Branch = {branches}
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
    67
$Branch: demobranch $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    68
% kwshrink should abort in empty/invalid repo
203
20eaa6147391 Clean up logic and messages for overwrite
Christian Ebert <blacktrash@gmx.net>
parents: 202
diff changeset
    69
abort: no revision checked out!
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    70
% cat
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    71
expand $Id$
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
    72
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
    73
xxx $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    74
ignore $Id$
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    75
% default keyword expansion
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    76
% commit
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    77
adding a
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    78
adding b
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    79
a
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    80
b
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    81
overwriting a expanding keywords
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    82
% status
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    83
% identify
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
    84
7f0665a496fd
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    85
% cat
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
    86
expand $Id: a,v 7f0665a496fd 1970/01/01 00:00:00 user $
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
    87
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
    88
xxx $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    89
ignore $Id$
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    90
% hg cat
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
    91
expand $Id: a,v 7f0665a496fd 1970/01/01 00:00:00 user $
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
    92
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
    93
xxx $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    94
ignore $Id$
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    95
% touch
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    96
% status
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    97
% update
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    98
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
    99
% cat
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   100
expand $Id: a,v 7f0665a496fd 1970/01/01 00:00:00 user $
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   101
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   102
xxx $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   103
ignore $Id$
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   104
% copy
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   105
% commit
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   106
c
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   107
 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   108
overwriting c expanding keywords
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   109
% cat a c
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   110
expand $Id: a,v 7f0665a496fd 1970/01/01 00:00:00 user $
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   111
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   112
xxx $
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   113
expand $Id: c,v 6a127771f5db 1970/01/01 00:00:01 user $
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   114
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   115
xxx $
249
8df281c5ca8b Make kwfilelog.cmp test reliable
Christian Ebert <blacktrash@gmx.net>
parents: 247
diff changeset
   116
% touch copied c after 1 second
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   117
% status
247
fc091591de7e Test kwfiles command
Christian Ebert <blacktrash@gmx.net>
parents: 241
diff changeset
   118
% kwfiles
fc091591de7e Test kwfiles command
Christian Ebert <blacktrash@gmx.net>
parents: 241
diff changeset
   119
a
fc091591de7e Test kwfiles command
Christian Ebert <blacktrash@gmx.net>
parents: 241
diff changeset
   120
c
224
fd98a9bffcbe Test "hg diff --rev", update _getcmd comment (backwards compatibility)
Christian Ebert <blacktrash@gmx.net>
parents: 223
diff changeset
   121
% diff --rev
fd98a9bffcbe Test "hg diff --rev", update _getcmd comment (backwards compatibility)
Christian Ebert <blacktrash@gmx.net>
parents: 223
diff changeset
   122
diff -r 7f0665a496fd c
fd98a9bffcbe Test "hg diff --rev", update _getcmd comment (backwards compatibility)
Christian Ebert <blacktrash@gmx.net>
parents: 223
diff changeset
   123
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
fd98a9bffcbe Test "hg diff --rev", update _getcmd comment (backwards compatibility)
Christian Ebert <blacktrash@gmx.net>
parents: 223
diff changeset
   124
@@ -0,0 +1,3 @@
fd98a9bffcbe Test "hg diff --rev", update _getcmd comment (backwards compatibility)
Christian Ebert <blacktrash@gmx.net>
parents: 223
diff changeset
   125
+expand $Id: c,v 6a127771f5db 1970/01/01 00:00:01 user $
fd98a9bffcbe Test "hg diff --rev", update _getcmd comment (backwards compatibility)
Christian Ebert <blacktrash@gmx.net>
parents: 223
diff changeset
   126
+do not process $Id:
fd98a9bffcbe Test "hg diff --rev", update _getcmd comment (backwards compatibility)
Christian Ebert <blacktrash@gmx.net>
parents: 223
diff changeset
   127
+xxx $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   128
% rollback
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   129
rolling back last transaction
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   130
% status
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   131
A c
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   132
% update -C
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   133
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   134
% custom keyword expansion
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   135
% try with kwdemo
208
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
   136
[extensions]
5afdcec8a01f Show extension in kwdemo; flag helpers; rephrase doc
Christian Ebert <blacktrash@gmx.net>
parents: 203
diff changeset
   137
hgext.keyword = 
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   138
[keyword]
210
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
   139
* = 
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
   140
b = ignore
304f9ac35869 kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents: 209
diff changeset
   141
demo.txt = 
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   142
[keywordmaps]
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   143
Xinfo = {author}: {desc}
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   144
$Xinfo: test: hg keyword config and expansion example $
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   145
% cat
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   146
expand $Id: a,v 7f0665a496fd 1970/01/01 00:00:00 user $
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   147
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   148
xxx $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   149
ignore $Id$
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   150
% hg cat
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   151
expand $Id: a 7f0665a496fd Thu, 01 Jan 1970 00:00:00 +0000 user $
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   152
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   153
xxx $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   154
ignore $Id$
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   155
% interrupted commit
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   156
transaction abort!
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   157
rollback completed
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   158
% status
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   159
M a
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   160
? log
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   161
% commit
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   162
a
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   163
overwriting a expanding keywords
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   164
% status
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   165
% cat
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   166
expand $Id: a 576a35651b0a Thu, 01 Jan 1970 00:00:02 +0000 user $
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   167
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   168
xxx $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   169
$Xinfo: User Name <user@example.com>: firstline $
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   170
ignore $Id$
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   171
% hg cat
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   172
expand $Id: a 576a35651b0a Thu, 01 Jan 1970 00:00:02 +0000 user $
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   173
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   174
xxx $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   175
$Xinfo: User Name <user@example.com>: firstline $
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   176
ignore $Id$
215
ff719fcc10a3 Test remove
Christian Ebert <blacktrash@gmx.net>
parents: 211
diff changeset
   177
% remove
ff719fcc10a3 Test remove
Christian Ebert <blacktrash@gmx.net>
parents: 211
diff changeset
   178
% status
ff719fcc10a3 Test remove
Christian Ebert <blacktrash@gmx.net>
parents: 211
diff changeset
   179
% rollback
ff719fcc10a3 Test remove
Christian Ebert <blacktrash@gmx.net>
parents: 211
diff changeset
   180
rolling back last transaction
ff719fcc10a3 Test remove
Christian Ebert <blacktrash@gmx.net>
parents: 211
diff changeset
   181
% status
ff719fcc10a3 Test remove
Christian Ebert <blacktrash@gmx.net>
parents: 211
diff changeset
   182
R a
ff719fcc10a3 Test remove
Christian Ebert <blacktrash@gmx.net>
parents: 211
diff changeset
   183
% revert a
ff719fcc10a3 Test remove
Christian Ebert <blacktrash@gmx.net>
parents: 211
diff changeset
   184
% cat a
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   185
expand $Id: a 576a35651b0a Thu, 01 Jan 1970 00:00:02 +0000 user $
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   186
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   187
xxx $
215
ff719fcc10a3 Test remove
Christian Ebert <blacktrash@gmx.net>
parents: 211
diff changeset
   188
$Xinfo: User Name <user@example.com>: firstline $
ff719fcc10a3 Test remove
Christian Ebert <blacktrash@gmx.net>
parents: 211
diff changeset
   189
% clone to test incoming
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   190
requesting all changes
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   191
adding changesets
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   192
adding manifests
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   193
adding file changes
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   194
added 1 changesets with 2 changes to 2 files
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   195
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   196
% incoming
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   197
searching for changes
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   198
changeset:   1:576a35651b0a
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   199
tag:         tip
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   200
user:        User Name <user@example.com>
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   201
date:        Thu Jan 01 00:00:02 1970 +0000
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   202
summary:     firstline
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   203
241
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   204
% canonpath for kwexpand/kwshrink
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   205
% copy
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   206
x/a
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   207
 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   208
overwriting x/a expanding keywords
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   209
% cat a
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   210
expand $Id: x/a 2d19a72f00da Thu, 01 Jan 1970 00:00:03 +0000 user $
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   211
do not process $Id:
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   212
xxx $
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   213
$Xinfo: User Name <user@example.com>: xa $
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   214
% kwshrink a
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   215
overwriting x/a shrinking keywords
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   216
% cat a
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   217
expand $Id$
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   218
do not process $Id:
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   219
xxx $
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   220
$Xinfo$
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   221
% switch off expansion
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   222
% kwshrink
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   223
overwriting a shrinking keywords
241
e0a846f9f095 Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents: 224
diff changeset
   224
overwriting x/a shrinking keywords
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   225
% cat
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   226
expand $Id$
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   227
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   228
xxx $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   229
$Xinfo$
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   230
ignore $Id$
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   231
% hg cat
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   232
expand $Id: a 576a35651b0a Thu, 01 Jan 1970 00:00:02 +0000 user $
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   233
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   234
xxx $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   235
$Xinfo: User Name <user@example.com>: firstline $
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   236
ignore $Id$
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   237
% cat
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   238
expand $Id$
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   239
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   240
xxx $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   241
$Xinfo$
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   242
ignore $Id$
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   243
% hg cat
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   244
expand $Id$
223
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   245
do not process $Id:
65a01675a944 Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents: 215
diff changeset
   246
xxx $
189
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   247
$Xinfo$
247159261ba5 Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
   248
ignore $Id$