annotate tests/test-keyword.t @ 16866:91f3ac205816

revlog: ancestors(*revs) becomes ancestors(revs) (API) Accepting a variable number of arguments as the old API did is deeply ugly, particularly as it means the API can't be extended with new arguments. Partly as a result, we have at least three different implementations of the same ancestors algorithm (!?). Most callers were forced to call ancestors(*somelist), adding to both inefficiency and ugliness.
author Bryan O'Sullivan <bryano@fb.com>
date Fri, 01 Jun 2012 12:37:18 -0700
parents 846607ff274f
children 6a997aacba5d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15446
c5c9ca3719f9 tests: use 'hghave serve' to guard tests that requires serve daemon management
Mads Kiilerich <mads@kiilerich.com>
parents: 15443
diff changeset
1 $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80
15441
e0348815e806 tests: use 'hghave symlink' for tests using symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 15198
diff changeset
2
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
3 $ cat <<EOF >> $HGRCPATH
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
4 > [extensions]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
5 > keyword =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
6 > mq =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
7 > notify =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
8 > record =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
9 > transplant =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
10 > [ui]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
11 > interactive = true
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
12 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
13
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
14 Run kwdemo before [keyword] files are set up
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
15 as it would succeed without uisetup otherwise
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
16
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
17 $ hg --quiet kwdemo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
18 [extensions]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
19 keyword =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
20 [keyword]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
21 demo.txt =
13298
f715e6bd8091 keyword: inform user about current keywordset in kwdemo
Christian Ebert <blacktrash@gmx.net>
parents: 13069
diff changeset
22 [keywordset]
f715e6bd8091 keyword: inform user about current keywordset in kwdemo
Christian Ebert <blacktrash@gmx.net>
parents: 13069
diff changeset
23 svn = False
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
24 [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
25 Author = {author|user}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
26 Date = {date|utcdate}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
27 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
28 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
29 RCSFile = {file|basename},v
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
30 RCSfile = {file|basename},v
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
31 Revision = {node|short}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
32 Source = {root}/{file},v
12372
5163e3c8aa52 tests: improve regexes in unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12316
diff changeset
33 $Author: test $
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
34 $Date: ????/??/?? ??:??:?? $ (glob)
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
35 $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
36 $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
12372
5163e3c8aa52 tests: improve regexes in unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12316
diff changeset
37 $RCSFile: demo.txt,v $
5163e3c8aa52 tests: improve regexes in unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12316
diff changeset
38 $RCSfile: demo.txt,v $
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
39 $Revision: ???????????? $ (glob)
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
40 $Source: */demo.txt,v $ (glob)
9462
1f54b1b7122f test-keyword: run kwdemo before setting up [keyword] files
Christian Ebert <blacktrash@gmx.net>
parents: 9306
diff changeset
41
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
42 $ hg --quiet kwdemo "Branch = {branches}"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
43 [extensions]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
44 keyword =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
45 [keyword]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
46 demo.txt =
13298
f715e6bd8091 keyword: inform user about current keywordset in kwdemo
Christian Ebert <blacktrash@gmx.net>
parents: 13069
diff changeset
47 [keywordset]
f715e6bd8091 keyword: inform user about current keywordset in kwdemo
Christian Ebert <blacktrash@gmx.net>
parents: 13069
diff changeset
48 svn = False
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
49 [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
50 Branch = {branches}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
51 $Branch: demobranch $
9462
1f54b1b7122f test-keyword: run kwdemo before setting up [keyword] files
Christian Ebert <blacktrash@gmx.net>
parents: 9306
diff changeset
52
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
53 $ cat <<EOF >> $HGRCPATH
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
54 > [keyword]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
55 > ** =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
56 > b = ignore
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
57 > i = ignore
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
58 > [hooks]
12629
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
59 > EOF
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
60 $ cp $HGRCPATH $HGRCPATH.nohooks
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
61 > cat <<EOF >> $HGRCPATH
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
62 > commit=
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
63 > commit.test=cp a hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
64 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
65
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
66 $ hg init Test-bndl
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
67 $ cd Test-bndl
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
68
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
69 kwshrink should exit silently in empty/invalid repo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
70
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
71 $ hg kwshrink
9462
1f54b1b7122f test-keyword: run kwdemo before setting up [keyword] files
Christian Ebert <blacktrash@gmx.net>
parents: 9306
diff changeset
72
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
73 Symlinks cannot be created on Windows.
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
74 A bundle to test this was made with:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
75 hg init t
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
76 cd t
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
77 echo a > a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
78 ln -s a sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
79 hg add sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
80 hg ci -m addsym -u mercurial
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
81 hg bundle --base null ../test-keyword.hg
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
82
14116
cd3032437064 tests: move test bundles in a bundles/ subdirectory
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13572
diff changeset
83 $ hg pull -u "$TESTDIR"/bundles/test-keyword.hg
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
84 pulling from *test-keyword.hg (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
85 requesting all changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
86 adding changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
87 adding manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
88 adding file changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
89 added 1 changesets with 1 changes to 1 files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
91
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
92 $ echo 'expand $Id$' > a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
93 $ echo 'do not process $Id:' >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
94 $ echo 'xxx $' >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
95 $ echo 'ignore $Id$' > b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
96
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
97 Output files as they were created
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
98
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
99 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
100 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
101 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
102 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
103 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
104
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
105 no kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
106
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
107 $ hg kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
108
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
109 untracked candidates
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
110
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
111 $ hg -v kwfiles --unknown
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
112 k a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
113
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
114 Add files and check status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
115
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
116 $ hg addremove
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
117 adding a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
118 adding b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
119 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
120 A a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
121 A b
6061
de08788511d7 test-keyword: make it run under Windows
Patrick Mezard <pmezard@gmail.com>
parents: 6051
diff changeset
122
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
123
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
124 Default keyword expansion including commit hook
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
125 Interrupted commit should not change state or run commit hook
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
126
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
127 $ hg --debug commit
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
128 abort: empty commit message
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
129 [255]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
130 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
131 A a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
132 A b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
133
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
134 Commit with several checks
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
135
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
136 $ hg --debug commit -mabsym -u 'User Name <user@example.com>'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
137 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
138 b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
139 overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
140 running hook commit.test: cp a hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
141 committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
142 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
143 ? hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
144 $ hg debugrebuildstate
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
145 $ hg --quiet identify
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
146 ef63ca68695b
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
147
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
148 cat files in working directory with keywords expanded
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
149
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
150 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
151 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
152 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
153 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
154 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
155
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
156 hg cat files and symlink, no expansion
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
157
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
158 $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
159 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
160 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
161 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
162 ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
163 a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
164
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
165 $ diff a hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
166
12629
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
167 $ cp $HGRCPATH.nohooks $HGRCPATH
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
168 $ rm hooktest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
169
15871
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
170 hg status of kw-ignored binary file starting with '\1\n'
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
171
16098
c6c9b83a1e8a tests: tighten checks for octal escapes in shell printf.
Jim Hague <jim.hague@acm.org>
parents: 15902
diff changeset
172 >>> open("i", "wb").write("\1\nfoo")
15871
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
173 $ hg -q commit -Am metasep i
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
174 $ hg status
16098
c6c9b83a1e8a tests: tighten checks for octal escapes in shell printf.
Jim Hague <jim.hague@acm.org>
parents: 15902
diff changeset
175 >>> open("i", "wb").write("\1\nbar")
15871
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
176 $ hg status
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
177 M i
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
178 $ hg -q commit -m "modify metasep" i
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
179 $ hg status --rev 2:3
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
180 M i
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
181 $ touch empty
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
182 $ hg -q commit -A -m "another file"
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
183 $ hg status -A --rev 3:4 i
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
184 C i
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
185
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
186 $ hg -q strip -n 2
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
187
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
188 Test hook execution
07893690c435 keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Christian Ebert <blacktrash@gmx.net>
parents: 15615
diff changeset
189
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
190 bundle
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
191
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
192 $ hg bundle --base null ../kw.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
193 2 changesets found
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
194 $ cd ..
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
195 $ hg init Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
196 $ cd Test
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
197
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
198 Notify on pull to check whether keywords stay as is in email
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
199 ie. if patch.diff wrapper acts as it should
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
200
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
201 $ cat <<EOF >> $HGRCPATH
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
202 > [hooks]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
203 > incoming.notify = python:hgext.notify.hook
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
204 > [notify]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
205 > sources = pull
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
206 > diffstat = False
12648
8be2d78460ef test-keyword: ignore subject in notify hook mails
Mads Kiilerich <mads@kiilerich.com>
parents: 12647
diff changeset
207 > maxsubject = 15
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
208 > [reposubs]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
209 > * = Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
210 > EOF
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
211
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
212 Pull from bundle and trigger notify
6051
1038b1458d7a keyword: safeguards against erroneous behaviour or aborts
Christian Ebert <blacktrash@gmx.net>
parents: 5894
diff changeset
213
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
214 $ hg pull -u ../kw.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
215 pulling from ../kw.hg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
216 requesting all changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
217 adding changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
218 adding manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
219 adding file changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
220 added 2 changesets with 3 changes to 3 files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
221 Content-Type: text/plain; charset="us-ascii"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
222 MIME-Version: 1.0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
223 Content-Transfer-Encoding: 7bit
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
224 Date: * (glob)
12648
8be2d78460ef test-keyword: ignore subject in notify hook mails
Mads Kiilerich <mads@kiilerich.com>
parents: 12647
diff changeset
225 Subject: changeset in...
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
226 From: mercurial
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
227 X-Hg-Notification: changeset a2392c293916
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
228 Message-Id: <hg.a2392c293916*> (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
229 To: Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
230
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
231 changeset a2392c293916 in $TESTTMP/Test (glob)
13572
1bb2a56a9d73 tests: use $TESTTMP more and use (glob) less
Martin Geisler <mg@aragost.com>
parents: 13446
diff changeset
232 details: $TESTTMP/Test?cmd=changeset;node=a2392c293916
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
233 description:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
234 addsym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
235
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
236 diffs (6 lines):
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
237
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
238 diff -r 000000000000 -r a2392c293916 sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
239 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
240 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
241 @@ -0,0 +1,1 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
242 +a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
243 \ No newline at end of file
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
244 Content-Type: text/plain; charset="us-ascii"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
245 MIME-Version: 1.0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
246 Content-Transfer-Encoding: 7bit
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
247 Date:* (glob)
12648
8be2d78460ef test-keyword: ignore subject in notify hook mails
Mads Kiilerich <mads@kiilerich.com>
parents: 12647
diff changeset
248 Subject: changeset in...
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
249 From: User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
250 X-Hg-Notification: changeset ef63ca68695b
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
251 Message-Id: <hg.ef63ca68695b*> (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
252 To: Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
253
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
254 changeset ef63ca68695b in $TESTTMP/Test (glob)
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
255 details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
256 description:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
257 absym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
258
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
259 diffs (12 lines):
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
260
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
261 diff -r a2392c293916 -r ef63ca68695b a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
262 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
263 +++ b/a Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
264 @@ -0,0 +1,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
265 +expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
266 +do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
267 +xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
268 diff -r a2392c293916 -r ef63ca68695b b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
269 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
270 +++ b/b Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
271 @@ -0,0 +1,1 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
272 +ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
273 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
6116
e27f39865d7e keyword: add test for patch.diff monkey
Christian Ebert <blacktrash@gmx.net>
parents: 6061
diff changeset
274
12629
c623752b1af5 test-keyword: remove remaining sed calls
Christian Ebert <blacktrash@gmx.net>
parents: 12626
diff changeset
275 $ cp $HGRCPATH.nohooks $HGRCPATH
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
276
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
277 Touch files and check with status
6116
e27f39865d7e keyword: add test for patch.diff monkey
Christian Ebert <blacktrash@gmx.net>
parents: 6061
diff changeset
278
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
279 $ touch a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
280 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
281
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
282 Update and expand
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
283
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
284 $ rm sym a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
285 $ hg update -C
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
286 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
287 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
288 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
289 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
290 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
291 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
292
15070
e4c65158b5e7 keyword: preserve file mode when overwriting
Christian Ebert <blacktrash@gmx.net>
parents: 14162
diff changeset
293 Check whether expansion is filewise and file mode is preserved
6051
1038b1458d7a keyword: safeguards against erroneous behaviour or aborts
Christian Ebert <blacktrash@gmx.net>
parents: 5894
diff changeset
294
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
295 $ echo '$Id$' > c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
296 $ echo 'tests for different changenodes' >> c
15070
e4c65158b5e7 keyword: preserve file mode when overwriting
Christian Ebert <blacktrash@gmx.net>
parents: 14162
diff changeset
297 $ chmod 600 c
e4c65158b5e7 keyword: preserve file mode when overwriting
Christian Ebert <blacktrash@gmx.net>
parents: 14162
diff changeset
298 $ ls -l c | cut -b 1-10
e4c65158b5e7 keyword: preserve file mode when overwriting
Christian Ebert <blacktrash@gmx.net>
parents: 14162
diff changeset
299 -rw-------
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
300
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
301 commit file c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
302
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
303 $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
304 adding c
15070
e4c65158b5e7 keyword: preserve file mode when overwriting
Christian Ebert <blacktrash@gmx.net>
parents: 14162
diff changeset
305 $ ls -l c | cut -b 1-10
e4c65158b5e7 keyword: preserve file mode when overwriting
Christian Ebert <blacktrash@gmx.net>
parents: 14162
diff changeset
306 -rw-------
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
307
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
308 force expansion
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
309
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
310 $ hg -v kwexpand
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
311 overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
312 overwriting c expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
313
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
314 compare changenodes in a and c
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
315
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
316 $ cat a c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
317 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
318 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
319 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
320 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
321 tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
322
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
323 record
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
324
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
325 $ echo '$Id$' > r
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
326 $ hg add r
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
327
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
328 record chunk
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
329
15556
e5804c0f6576 test-keyword: use inline doctest syntax
Christian Ebert <blacktrash@gmx.net>
parents: 15501
diff changeset
330 >>> lines = open('a').readlines()
e5804c0f6576 test-keyword: use inline doctest syntax
Christian Ebert <blacktrash@gmx.net>
parents: 15501
diff changeset
331 >>> lines.insert(1, 'foo\n')
e5804c0f6576 test-keyword: use inline doctest syntax
Christian Ebert <blacktrash@gmx.net>
parents: 15501
diff changeset
332 >>> lines.append('bar\n')
e5804c0f6576 test-keyword: use inline doctest syntax
Christian Ebert <blacktrash@gmx.net>
parents: 15501
diff changeset
333 >>> open('a', 'w').writelines(lines)
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
334 $ hg record -d '1 10' -m rectest a<<EOF
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
335 > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
336 > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
337 > n
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
338 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
339 diff --git a/a b/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
340 2 hunks, 2 lines changed
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16101
diff changeset
341 examine changes to 'a'? [Ynesfdaq?]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
342 @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
343 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
344 +foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
345 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
346 xxx $
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16101
diff changeset
347 record change 1/2 to 'a'? [Ynesfdaq?]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
348 @@ -2,2 +3,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
349 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
350 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
351 +bar
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16101
diff changeset
352 record change 2/2 to 'a'? [Ynesfdaq?]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
353
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
354 $ hg identify
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
355 d17e03c92c97+ tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
356 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
357 M a
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
358 A r
5894
e181665c1c79 keyword: add very simple mq test
Christian Ebert <blacktrash@gmx.net>
parents: 5856
diff changeset
359
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
360 Cat modified file a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
361
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
362 $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
363 expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
364 foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
365 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
366 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
367 bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
368
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
369 Diff remaining chunk
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
370
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
371 $ hg diff a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
372 diff -r d17e03c92c97 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
373 --- a/a Wed Dec 31 23:59:51 1969 -0000
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
374 +++ b/a * (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
375 @@ -2,3 +2,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
376 foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
377 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
378 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
379 +bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
380
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
381 $ hg rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
382 repository tip rolled back to revision 2 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
383 working directory now based on revision 2
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
384
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
385 Record all chunks in file a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
386
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
387 $ echo foo > msg
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
388
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
389 - do not use "hg record -m" here!
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
390
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
391 $ hg record -l msg -d '1 11' a<<EOF
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
392 > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
393 > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
394 > y
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
395 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
396 diff --git a/a b/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
397 2 hunks, 2 lines changed
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16101
diff changeset
398 examine changes to 'a'? [Ynesfdaq?]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
399 @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
400 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
401 +foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
402 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
403 xxx $
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16101
diff changeset
404 record change 1/2 to 'a'? [Ynesfdaq?]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
405 @@ -2,2 +3,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
406 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
407 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
408 +bar
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16101
diff changeset
409 record change 2/2 to 'a'? [Ynesfdaq?]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
410
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
411 File a should be clean
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
412
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
413 $ hg status -A a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
414 C a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
415
12498
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
416 rollback and revert expansion
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
417
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
418 $ cat a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
419 expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
420 foo
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
421 do not process $Id:
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
422 xxx $
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
423 bar
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
424 $ hg --verbose rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
425 repository tip rolled back to revision 2 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
426 working directory now based on revision 2
12498
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
427 overwriting a expanding keywords
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
428 $ hg status a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
429 M a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
430 $ cat a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
431 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
432 foo
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
433 do not process $Id:
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
434 xxx $
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
435 bar
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
436 $ echo '$Id$' > y
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
437 $ echo '$Id$' > z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
438 $ hg add y
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
439 $ hg commit -Am "rollback only" z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
440 $ cat z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
441 $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
442 $ hg --verbose rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
443 repository tip rolled back to revision 2 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
444 working directory now based on revision 2
12498
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
445 overwriting z shrinking keywords
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
446
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
447 Only z should be overwritten
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
448
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
449 $ hg status a y z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
450 M a
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
451 A y
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
452 A z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
453 $ cat z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
454 $Id$
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
455 $ hg forget y z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
456 $ rm y z
4846e8cd9327 keyword: support rollback by restoring expansion to previous values
Christian Ebert <blacktrash@gmx.net>
parents: 12495
diff changeset
457
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
458 record added file alone
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
459
12630
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
460 $ hg -v record -l msg -d '1 12' r<<EOF
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
461 > y
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
462 > EOF
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
463 diff --git a/r b/r
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
464 new file mode 100644
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16101
diff changeset
465 examine changes to 'r'? [Ynesfdaq?]
12630
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
466 r
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
467 committed changeset 3:899491280810
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
468 overwriting r expanding keywords
15075
77325c92db95 keyword: make status test after record and kwexpand/kwshrink reliable
Christian Ebert <blacktrash@gmx.net>
parents: 15070
diff changeset
469 - status call required for dirstate.normallookup() check
77325c92db95 keyword: make status test after record and kwexpand/kwshrink reliable
Christian Ebert <blacktrash@gmx.net>
parents: 15070
diff changeset
470 $ hg status r
12630
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
471 $ hg --verbose rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
472 repository tip rolled back to revision 2 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
473 working directory now based on revision 2
12630
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
474 overwriting r shrinking keywords
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
475 $ hg forget r
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
476 $ rm msg r
12684
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
477 $ hg update -C
8348599c68d7 keyword: fix weeding of expansion candidates when recording
Christian Ebert <blacktrash@gmx.net>
parents: 12648
diff changeset
478 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12630
94926263b7ab keyword: specific regular expressions depending on read mode
Christian Ebert <blacktrash@gmx.net>
parents: 12629
diff changeset
479
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
480 record added keyword ignored file
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
481
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
482 $ echo '$Id$' > i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
483 $ hg add i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
484 $ hg --verbose record -d '1 13' -m recignored<<EOF
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
485 > y
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
486 > EOF
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
487 diff --git a/i b/i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
488 new file mode 100644
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16101
diff changeset
489 examine changes to 'i'? [Ynesfdaq?]
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
490 i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
491 committed changeset 3:5f40fe93bbdc
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
492 $ cat i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
493 $Id$
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
494 $ hg -q rollback
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
495 $ hg forget i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
496 $ rm i
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
497
16810
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
498 amend
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
499
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
500 $ echo amend >> a
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
501 $ echo amend >> b
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
502 $ hg -q commit -d '1 14' -m 'prepare amend'
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
503
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
504 $ hg --debug commit --amend -d '1 15' -m 'amend without changes' | grep keywords
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
505 invalidating branch cache (tip differs)
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
506 overwriting a expanding keywords
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
507 $ hg -q id
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
508 a71343332ea9
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
509 $ head -1 a
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
510 expand $Id: a,v a71343332ea9 1970/01/01 00:00:01 test $
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
511
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
512 $ hg -q strip -n tip
846607ff274f keyword: support commit --amend (issue3471)
Christian Ebert <blacktrash@gmx.net>
parents: 16623
diff changeset
513
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
514 Test patch queue repo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
515
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
516 $ hg init --mq
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
517 $ hg qimport -r tip -n mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
518 $ hg commit --mq -m mqtest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
519
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
520 Keywords should not be expanded in patch
11252
56f306238256 keyword: force dirstate normal when all changes in a file are recorded
Christian Ebert <blacktrash@gmx.net>
parents: 11065
diff changeset
521
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
522 $ cat .hg/patches/mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
523 # HG changeset patch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
524 # User User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
525 # Date 1 0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
526 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
527 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
528 cndiff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
529
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
530 diff -r ef63ca68695b -r 40a904bbbe4c c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
531 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
532 +++ b/c Thu Jan 01 00:00:01 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
533 @@ -0,0 +1,2 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
534 +$Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
535 +tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
536
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
537 $ hg qpop
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
538 popping mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
539 patch queue now empty
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
540
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
541 qgoto, implying qpush, should expand
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
542
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
543 $ hg qgoto mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
544 applying mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
545 now at: mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
546 $ cat c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
547 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
548 tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
549 $ hg cat c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
550 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
551 tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
552
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
553 Keywords should not be expanded in filelog
11046
6e9b9f6c117c keyword: test recording
Christian Ebert <blacktrash@gmx.net>
parents: 11044
diff changeset
554
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
555 $ hg --config 'extensions.keyword=!' cat c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
556 $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
557 tests for different changenodes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
558
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
559 qpop and move on
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
560
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
561 $ hg qpop
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
562 popping mqtest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
563 patch queue now empty
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
564
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
565 Copy and show added kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
566
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
567 $ hg cp a c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
568 $ hg kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
569 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
570 c
5856
85888efbdfff keyword: test that expansion is done filewise
Christian Ebert <blacktrash@gmx.net>
parents: 5855
diff changeset
571
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
572 Commit and show expansion in original and copy
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
573
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
574 $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
575 c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
576 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
16623
def6a19c3b4d repair: no need to call filterunknown() in strip()
Patrick Mezard <patrick@mezard.eu>
parents: 16351
diff changeset
577 removing unknown node 40a904bbbe4c from 1-phase boundary
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
578 overwriting c expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
579 committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
580 $ cat a c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
581 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
582 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
583 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
584 expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
585 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
586 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
587
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
588 Touch copied c and check its status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
589
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
590 $ touch c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
591 $ hg status
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
592
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
593 Copy kwfile to keyword ignored file unexpanding keywords
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
594
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
595 $ hg --verbose copy a i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
596 copying a to i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
597 overwriting i shrinking keywords
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
598 $ head -n 1 i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
599 expand $Id$
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
600 $ hg forget i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
601 $ rm i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
602
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
603 Copy ignored file to ignored file: no overwriting
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
604
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
605 $ hg --verbose copy b i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
606 copying b to i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
607 $ hg forget i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
608 $ rm i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
609
13069
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
610 cp symlink file; hg cp -A symlink file (part1)
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
611 - copied symlink points to kwfile: overwrite
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
612
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
613 $ cp sym i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
614 $ ls -l i
12647
60c7ae35fcbe test-keyword: fix test glob to ACL/SELinux flag
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
615 -rw-r--r--* (glob)
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
616 $ head -1 i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
617 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
618 $ hg copy --after --verbose sym i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
619 copying sym to i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
620 overwriting i shrinking keywords
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
621 $ head -1 i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
622 expand $Id$
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
623 $ hg forget i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
624 $ rm i
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
625
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
626 Test different options of hg kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
627
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
628 $ hg kwfiles
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
629 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
630 c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
631 $ hg -v kwfiles --ignore
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
632 I b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
633 I sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
634 $ hg kwfiles --all
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
635 K a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
636 K c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
637 I b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
638 I sym
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
639
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
640 Diff specific revision
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
641
12102
9aba4ceb654d test-keyword: use regular expressions instead of grepping
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11905
diff changeset
642 $ hg diff --rev 1
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
643 diff -r ef63ca68695b c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
644 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
645 +++ b/c * (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
646 @@ -0,0 +1,3 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
647 +expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
648 +do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
649 +xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
650
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
651 Status after rollback:
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
652
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
653 $ hg rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
654 repository tip rolled back to revision 1 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
655 working directory now based on revision 1
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
656 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
657 A c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
658 $ hg update --clean
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
659 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
660
13069
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
661 cp symlink file; hg cp -A symlink file (part2)
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
662 - copied symlink points to kw ignored file: do not overwrite
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
663
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
664 $ cat a > i
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
665 $ ln -s i symignored
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
666 $ hg commit -Am 'fake expansion in ignored and symlink' i symignored
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
667 $ cp symignored x
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
668 $ hg copy --after --verbose symignored x
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
669 copying symignored to x
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
670 $ head -n 1 x
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
671 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
672 $ hg forget x
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
673 $ rm x
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
674
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
675 $ hg rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
676 repository tip rolled back to revision 1 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
677 working directory now based on revision 1
13069
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
678 $ hg update --clean
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
679 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
680 $ rm i symignored
6aff4f144ad3 keyword: copy: when copied source is a symlink, follow it
Christian Ebert <blacktrash@gmx.net>
parents: 12847
diff changeset
681
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
682 Custom keywordmaps as argument to kwdemo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
683
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
684 $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
685 [extensions]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
686 keyword =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
687 [keyword]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
688 ** =
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
689 b = ignore
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
690 demo.txt =
12626
41df968a54c9 keyword: support copy and rename
Christian Ebert <blacktrash@gmx.net>
parents: 12587
diff changeset
691 i = ignore
13298
f715e6bd8091 keyword: inform user about current keywordset in kwdemo
Christian Ebert <blacktrash@gmx.net>
parents: 13069
diff changeset
692 [keywordset]
f715e6bd8091 keyword: inform user about current keywordset in kwdemo
Christian Ebert <blacktrash@gmx.net>
parents: 13069
diff changeset
693 svn = False
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
694 [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
695 Xinfo = {author}: {desc}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
696 $Xinfo: test: hg keyword configuration and expansion example $
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
697
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
698 Configure custom keywordmaps
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
699
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
700 $ cat <<EOF >>$HGRCPATH
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
701 > [keywordmaps]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
702 > Id = {file} {node|short} {date|rfc822date} {author|user}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
703 > Xinfo = {author}: {desc}
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
704 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
705
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
706 Cat and hg cat files before custom expansion
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
707
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
708 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
709 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
710 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
711 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
712 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
713 $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
714 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
715 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
716 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
717 ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
718 a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
719
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
720 Write custom keyword and prepare multiline commit message
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
721
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
722 $ echo '$Xinfo$' >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
723 $ cat <<EOF >> log
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
724 > firstline
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
725 > secondline
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
726 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
727
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
728 Interrupted commit should not change state
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
729
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
730 $ hg commit
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
731 abort: empty commit message
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
732 [255]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
733 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
734 M a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
735 ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
736 ? log
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
737
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
738 Commit with multiline message and custom expansion
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
739
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
740 $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
741 a
16623
def6a19c3b4d repair: no need to call filterunknown() in strip()
Patrick Mezard <patrick@mezard.eu>
parents: 16351
diff changeset
742 removing unknown node 40a904bbbe4c from 1-phase boundary
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
743 overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
744 committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
745 $ rm log
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
746
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
747 Stat, verify and show custom expansion (firstline)
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
748
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
749 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
750 ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
751 $ hg verify
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
752 checking changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
753 checking manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
754 crosschecking files in changesets and manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
755 checking files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
756 3 files, 3 changesets, 4 total revisions
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
757 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
758 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
759 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
760 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
761 $Xinfo: User Name <user@example.com>: firstline $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
762 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
763 $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
764 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
765 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
766 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
767 $Xinfo: User Name <user@example.com>: firstline $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
768 ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
769 a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
770
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
771 annotate
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
772
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
773 $ hg annotate a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
774 1: expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
775 1: do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
776 1: xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
777 2: $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
778
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
779 remove with status checks
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
780
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
781 $ hg debugrebuildstate
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
782 $ hg remove a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
783 $ hg --debug commit -m rma
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
784 committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
785 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
786 ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
787
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
788 Rollback, revert, and check expansion
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
789
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
790 $ hg rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
791 repository tip rolled back to revision 2 (undo commit)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
792 working directory now based on revision 2
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
793 $ hg status
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
794 R a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
795 ? c
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
796 $ hg revert --no-backup --rev tip a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
797 $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
798 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
799 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
800 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
801 $Xinfo: User Name <user@example.com>: firstline $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
802
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
803 Clone to test global and local configurations
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
804
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
805 $ cd ..
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
806
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
807 Expansion in destinaton with global configuration
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
808
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
809 $ hg --quiet clone Test globalconf
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
810 $ cat globalconf/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
811 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
812 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
813 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
814 $Xinfo: User Name <user@example.com>: firstline $
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
815
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
816 No expansion in destination with local configuration in origin only
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
817
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
818 $ hg --quiet --config 'keyword.**=ignore' clone Test localconf
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
819 $ cat localconf/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
820 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
821 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
822 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
823 $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
824
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
825 Clone to test incoming
11678
f5aa20e177c0 keyword: move collecting of [keyword] patterns to reposetup (issue2303)
Christian Ebert <blacktrash@gmx.net>
parents: 11252
diff changeset
826
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
827 $ hg clone -r1 Test Test-a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
828 adding changesets
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
829 adding manifests
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
830 adding file changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
831 added 2 changesets with 3 changes to 3 files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
832 updating to branch default
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
833 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
834 $ cd Test-a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
835 $ cat <<EOF >> .hg/hgrc
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
836 > [paths]
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
837 > default = ../Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
838 > EOF
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
839 $ hg incoming
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
840 comparing with $TESTTMP/Test (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
841 searching for changes
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
842 changeset: 2:bb948857c743
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
843 tag: tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
844 user: User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
845 date: Thu Jan 01 00:00:02 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
846 summary: firstline
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
847
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
848 Imported patch should not be rejected
11678
f5aa20e177c0 keyword: move collecting of [keyword] patterns to reposetup (issue2303)
Christian Ebert <blacktrash@gmx.net>
parents: 11252
diff changeset
849
15556
e5804c0f6576 test-keyword: use inline doctest syntax
Christian Ebert <blacktrash@gmx.net>
parents: 15501
diff changeset
850 >>> import re
e5804c0f6576 test-keyword: use inline doctest syntax
Christian Ebert <blacktrash@gmx.net>
parents: 15501
diff changeset
851 >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read())
e5804c0f6576 test-keyword: use inline doctest syntax
Christian Ebert <blacktrash@gmx.net>
parents: 15501
diff changeset
852 >>> open('a', 'wb').write(text)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
853 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
854 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
855 overwriting a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
856 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
857 $ hg export -o ../rejecttest.diff tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
858 $ cd ../Test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
859 $ hg import ../rejecttest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
860 applying ../rejecttest.diff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
861 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
862 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
863 do not process $Id: rejecttest
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
864 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
865 $Xinfo: User Name <user@example.com>: rejects? $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
866 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
867
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
868 $ hg rollback
15198
62dc0e7ab092 import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 15075
diff changeset
869 repository tip rolled back to revision 2 (undo import)
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13298
diff changeset
870 working directory now based on revision 2
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
871 $ hg update --clean
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
872 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
873
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
874 kwexpand/kwshrink on selected files
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
875
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
876 $ mkdir x
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
877 $ hg copy a x/a
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
878 $ hg --verbose kwshrink a
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
879 overwriting a shrinking keywords
15075
77325c92db95 keyword: make status test after record and kwexpand/kwshrink reliable
Christian Ebert <blacktrash@gmx.net>
parents: 15070
diff changeset
880 - sleep required for dirstate.normal() check
77325c92db95 keyword: make status test after record and kwexpand/kwshrink reliable
Christian Ebert <blacktrash@gmx.net>
parents: 15070
diff changeset
881 $ sleep 1
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
882 $ hg status a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
883 $ hg --verbose kwexpand a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
884 overwriting a expanding keywords
12844
a1b49b9a0328 keyword: fix regressions introduced in d87f3ff904ba
Christian Ebert <blacktrash@gmx.net>
parents: 12684
diff changeset
885 $ hg status a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
886
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
887 kwexpand x/a should abort
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
888
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
889 $ hg --verbose kwexpand x/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
890 abort: outstanding uncommitted changes
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
891 [255]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
892 $ cd x
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
893 $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
894 x/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
895 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
896 overwriting x/a expanding keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
897 committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
898 $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
899 expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
900 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
901 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
902 $Xinfo: User Name <user@example.com>: xa $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
903
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
904 kwshrink a inside directory x
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
905
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
906 $ hg --verbose kwshrink a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
907 overwriting x/a shrinking keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
908 $ cat a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
909 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
910 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
911 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
912 $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
913 $ cd ..
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
914
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
915 kwexpand nonexistent
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
916
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
917 $ hg kwexpand nonexistent
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
918 nonexistent:* (glob)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
919
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
920
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
921 hg serve
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
922 - expand with hgweb file
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
923 - no expansion with hgweb annotate/changeset/filediff
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
924 - check errors
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
925
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
926 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
927 $ cat hg.pid >> $DAEMON_PIDS
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16101
diff changeset
928 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/a/?style=raw'
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
929 200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
930
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
931 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
932 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
933 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
934 $Xinfo: User Name <user@example.com>: firstline $
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16101
diff changeset
935 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/a/?style=raw'
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
936 200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
937
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
938
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
939 user@1: expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
940 user@1: do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
941 user@1: xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
942 user@2: $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
943
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
944
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
945
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
946
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16101
diff changeset
947 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip/?style=raw'
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
948 200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
949
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
950
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
951 # HG changeset patch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
952 # User User Name <user@example.com>
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
953 # Date 3 0
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
954 # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
955 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
956 xa
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
957
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
958 diff -r bb948857c743 -r b4560182a3f9 x/a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
959 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
960 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
961 @@ -0,0 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
962 +expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
963 +do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
964 +xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
965 +$Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
966
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16101
diff changeset
967 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/bb948857c743/a?style=raw'
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
968 200 Script output follows
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
969
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
970
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
971 diff -r ef63ca68695b -r bb948857c743 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
972 --- a/a Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
973 +++ b/a Thu Jan 01 00:00:02 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
974 @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
975 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
976 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
977 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
978 +$Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
979
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
980
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
981
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
982
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
983 $ cat errors.log
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
984
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
985 Prepare merge and resolve tests
5816
3bd22fd3b750 keyword: add test
Christian Ebert <blacktrash@gmx.net>
parents:
diff changeset
986
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
987 $ echo '$Id$' > m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
988 $ hg add m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
989 $ hg commit -m 4kw
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
990 $ echo foo >> m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
991 $ hg commit -m 5foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
992
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
993 simplemerge
6927
959113c5e1cd keyword: thorough hgweb testing
Christian Ebert <blacktrash@gmx.net>
parents: 6867
diff changeset
994
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
995 $ hg update 4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
996 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
997 $ echo foo >> m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
998 $ hg commit -m 6foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
999 created new head
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1000 $ hg merge
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1001 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1002 (branch merge, don't forget to commit)
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1003 $ hg commit -m simplemerge
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1004 $ cat m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1005 $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1006 foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1007
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1008 conflict: keyword should stay outside conflict zone
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1009
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1010 $ hg update 4
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1011 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1012 $ echo bar >> m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1013 $ hg commit -m 8bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1014 created new head
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1015 $ hg merge
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1016 merging m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1017 warning: conflicts during merge.
15501
2371f4aea665 merge: give a special message for internal:merge failure (issue3105)
Matt Mackall <mpm@selenic.com>
parents: 15447
diff changeset
1018 merging m incomplete! (edit conflicts, then use 'hg resolve --mark')
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1019 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
12314
f2daa6ab514a merge: suggest 'hg up -C .' for discarding changes, not 'hg up -C'
Brodie Rao <brodie@bitheap.org>
parents: 12102
diff changeset
1020 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
1021 [1]
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1022 $ cat m
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1023 $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1024 <<<<<<< local
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1025 bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1026 =======
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1027 foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1028 >>>>>>> other
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1029
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1030 resolve to local
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1031
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1032 $ HGMERGE=internal:local hg resolve -a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1033 $ hg commit -m localresolve
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1034 $ cat m
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14116
diff changeset
1035 $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1036 bar
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1037
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1038 Test restricted mode with transplant -b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1039
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1040 $ hg update 6
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1041 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1042 $ hg branch foo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1043 marked working directory as branch foo
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15198
diff changeset
1044 (branches are permanent and global, did you want a bookmark?)
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1045 $ mv a a.bak
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1046 $ echo foobranch > a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1047 $ cat a.bak >> a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1048 $ rm a.bak
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1049 $ hg commit -m 9foobranch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1050 $ hg update default
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1051 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1052 $ hg -y transplant -b foo tip
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1053 applying 4aa30d025d50
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14116
diff changeset
1054 4aa30d025d50 transplanted to e00abbf63521
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1055
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1056 Expansion in changeset but not in file
6933
17bdcd59b9ad keyword: avoid additional conflicts during merge/resolve
Christian Ebert <blacktrash@gmx.net>
parents: 6927
diff changeset
1057
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1058 $ hg tip -p
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14116
diff changeset
1059 changeset: 11:e00abbf63521
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1060 tag: tip
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14116
diff changeset
1061 parent: 9:800511b3a22d
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1062 user: test
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1063 date: Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1064 summary: 9foobranch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1065
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14116
diff changeset
1066 diff -r 800511b3a22d -r e00abbf63521 a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1067 --- a/a Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1068 +++ b/a Thu Jan 01 00:00:00 1970 +0000
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1069 @@ -1,3 +1,4 @@
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1070 +foobranch
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1071 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1072 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1073 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1074
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1075 $ head -n 2 a
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1076 foobranch
14162
301725c3df9a localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14116
diff changeset
1077 expand $Id: a e00abbf63521 Thu, 01 Jan 1970 00:00:00 +0000 test $
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1078
12495
6401e8547427 test-keyword: fix typo, rephrase
Christian Ebert <blacktrash@gmx.net>
parents: 12376
diff changeset
1079 Turn off expansion
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1080
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1081 $ hg -q rollback
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1082 $ hg -q update -C
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1083
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1084 kwshrink with unknown file u
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1085
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1086 $ cp a u
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1087 $ hg --verbose kwshrink
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1088 overwriting a shrinking keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1089 overwriting m shrinking keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1090 overwriting x/a shrinking keywords
10117
98867145f4b5 keyword: go into restricted mode when transplanting
Christian Ebert <blacktrash@gmx.net>
parents: 9602
diff changeset
1091
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1092 Keywords shrunk in working directory, but not yet disabled
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1093 - cat shows unexpanded keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1094 - hg cat shows expanded keywords
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1095
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1096 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1097 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1098 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1099 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1100 $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1101 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1102 $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1103 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1104 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1105 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1106 $Xinfo: User Name <user@example.com>: firstline $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1107 ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
1108 a
11905
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1109
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1110 Now disable keyword expansion
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1111
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1112 $ rm "$HGRCPATH"
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1113 $ cat a b
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1114 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1115 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1116 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1117 $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1118 ignore $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1119 $ hg cat sym a b && echo
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1120 expand $Id$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1121 do not process $Id:
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1122 xxx $
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1123 $Xinfo$
0b84864d1325 tests: drop big sed from test-keyword.t
Matt Mackall <mpm@selenic.com>
parents: 11678
diff changeset
1124 ignore $Id$
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12638
diff changeset
1125 a