author | Christian Ebert <blacktrash@gmx.net> |
Wed, 09 Jan 2008 12:52:59 +0100 | |
branch | 0.9.2compat |
changeset 332 | f56004dedc1e |
parent 326 | 225c969e007b |
child 334 | 578317f9e2f0 |
permissions | -rwxr-xr-x |
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
1 |
#!/bin/sh |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
2 |
|
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
3 |
cat <<EOF >> $HGRCPATH |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
4 |
[extensions] |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
5 |
hgext.keyword = |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
6 |
[keyword] |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
7 |
* = |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
8 |
b = ignore |
311
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
9 |
[hooks] |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
10 |
commit= |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
11 |
commit.test=cp a hooktest |
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
12 |
EOF |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
13 |
|
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
14 |
echo % help |
218
d7ddb4e378f3
test: use grep -v instead of sed to delete lines
Christian Ebert <blacktrash@gmx.net>
parents:
215
diff
changeset
|
15 |
# grep for backwards compatibility |
202
e2a2f9ca8271
Make test more adaptive to different Hg versions
Christian Ebert <blacktrash@gmx.net>
parents:
189
diff
changeset
|
16 |
hg help keyword \ |
218
d7ddb4e378f3
test: use grep -v instead of sed to delete lines
Christian Ebert <blacktrash@gmx.net>
parents:
215
diff
changeset
|
17 |
| grep -E -v '^list of commands|hg -v help keyword|^$' |
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
18 |
|
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
19 |
echo % hg kwdemo |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
20 |
hg --quiet kwdemo --default \ |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
21 |
| sed -e 's![^ ][^ ]*demo.txt,v!/TMP/demo.txt,v!' \ |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
22 |
-e 's/,v [a-z0-9][a-z0-9]* /,v xxxxxxxxxxxx /' \ |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
23 |
-e '/[$]Revision/ s/: [a-z0-9][a-z0-9]* /: xxxxxxxxxxxx /' \ |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
24 |
-e 's! 20[0-9][0-9]/[01][0-9]/[0-3][0-9] [0-2][0-9]:[0-6][0-9]:[0-6][0-9]! 2000/00/00 00:00:00!' |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
25 |
|
210
304f9ac35869
kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents:
209
diff
changeset
|
26 |
hg --quiet kwdemo "Branch = {branches}" |
304f9ac35869
kwdemo fixes and tweaks
Christian Ebert <blacktrash@gmx.net>
parents:
209
diff
changeset
|
27 |
|
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
28 |
hg init Test |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
29 |
cd Test |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
30 |
|
250
b28a2832cba4
Reduce verbosity of kwexpand/kwshrink
Christian Ebert <blacktrash@gmx.net>
parents:
249
diff
changeset
|
31 |
echo % kwshrink should exit silently in empty/invalid repo |
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
32 |
hg kwshrink |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
33 |
|
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
34 |
echo 'expand $Id$' > a |
223
65a01675a944
Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents:
218
diff
changeset
|
35 |
echo 'do not process $Id:' >> a |
65a01675a944
Test that pattern does not span more than 1 line
Christian Ebert <blacktrash@gmx.net>
parents:
218
diff
changeset
|
36 |
echo 'xxx $' >> a |
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
37 |
echo 'ignore $Id$' > b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
38 |
echo % cat |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
39 |
cat a b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
40 |
|
311
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
41 |
echo % addremove |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
42 |
hg addremove |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
43 |
echo % status |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
44 |
hg status |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
45 |
|
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
46 |
echo % default keyword expansion including commit hook |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
47 |
#echo % interrupted commit should not change state or run commit hook |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
48 |
#HGEDITOR=false hg --debug commit |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
49 |
#echo % status |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
50 |
#hg status |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
51 |
|
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
52 |
echo % commit |
311
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
53 |
hg --debug commit -mab -d '0 0' -u 'User Name <user@example.com>' |
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
54 |
echo % status |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
55 |
hg status |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
56 |
echo % identify |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
57 |
hg --quiet identify |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
58 |
echo % cat |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
59 |
cat a b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
60 |
echo % hg cat |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
61 |
hg cat a b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
62 |
|
311
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
63 |
echo |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
64 |
echo % diff a hooktest |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
65 |
diff a hooktest |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
66 |
|
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
67 |
echo % removing commit hook from config |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
68 |
sed -e '/\[hooks\]/,$ d' $HGRCPATH > $HGRCPATH.nohook |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
69 |
mv $HGRCPATH.nohook $HGRCPATH |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
70 |
rm hooktest |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
71 |
|
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
72 |
echo % touch |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
73 |
touch a b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
74 |
echo % status |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
75 |
hg status |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
76 |
|
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
77 |
rm a b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
78 |
echo % update |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
79 |
hg update |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
80 |
echo % cat |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
81 |
cat a b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
82 |
|
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
83 |
echo % copy |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
84 |
hg cp a c |
259
76402fc0fb58
Test kwfiles working context
Christian Ebert <blacktrash@gmx.net>
parents:
257
diff
changeset
|
85 |
|
76402fc0fb58
Test kwfiles working context
Christian Ebert <blacktrash@gmx.net>
parents:
257
diff
changeset
|
86 |
echo % kwfiles added |
76402fc0fb58
Test kwfiles working context
Christian Ebert <blacktrash@gmx.net>
parents:
257
diff
changeset
|
87 |
hg kwfiles |
76402fc0fb58
Test kwfiles working context
Christian Ebert <blacktrash@gmx.net>
parents:
257
diff
changeset
|
88 |
|
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
89 |
echo % commit |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
90 |
hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>' |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
91 |
echo % cat a c |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
92 |
cat a c |
249
8df281c5ca8b
Make kwfilelog.cmp test reliable
Christian Ebert <blacktrash@gmx.net>
parents:
247
diff
changeset
|
93 |
echo % touch copied c after 1 second |
8df281c5ca8b
Make kwfilelog.cmp test reliable
Christian Ebert <blacktrash@gmx.net>
parents:
247
diff
changeset
|
94 |
sleep 1 |
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
95 |
touch c |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
96 |
echo % status |
214
b2e63ec251a9
Add forgotten status for touch copy test
Christian Ebert <blacktrash@gmx.net>
parents:
210
diff
changeset
|
97 |
hg status |
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
98 |
|
247 | 99 |
echo % kwfiles |
100 |
hg kwfiles |
|
101 |
||
224
fd98a9bffcbe
Test "hg diff --rev", update _getcmd comment (backwards compatibility)
Christian Ebert <blacktrash@gmx.net>
parents:
223
diff
changeset
|
102 |
echo % diff --rev |
257
1090221301cf
test: use grep instead of grep -F
Christian Ebert <blacktrash@gmx.net>
parents:
256
diff
changeset
|
103 |
hg diff --rev 0 | grep -v 'b/c' |
224
fd98a9bffcbe
Test "hg diff --rev", update _getcmd comment (backwards compatibility)
Christian Ebert <blacktrash@gmx.net>
parents:
223
diff
changeset
|
104 |
|
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
105 |
echo % rollback |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
106 |
hg rollback |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
107 |
echo % status |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
108 |
hg status |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
109 |
echo % update -C |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
110 |
hg update --clean |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
111 |
|
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
112 |
echo % custom keyword expansion |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
113 |
echo % try with kwdemo |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
114 |
hg --quiet kwdemo "Xinfo = {author}: {desc}" |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
115 |
|
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
116 |
cat <<EOF >>$HGRCPATH |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
117 |
[keywordmaps] |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
118 |
Id = {file} {node|short} {date|rfc822date} {author|user} |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
119 |
Xinfo = {author}: {desc} |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
120 |
EOF |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
121 |
|
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
122 |
echo % cat |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
123 |
cat a b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
124 |
echo % hg cat |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
125 |
hg cat a b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
126 |
|
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
127 |
echo '$Xinfo$' >> a |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
128 |
cat <<EOF >> log |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
129 |
firstline |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
130 |
secondline |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
131 |
EOF |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
132 |
|
311
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
133 |
#echo % interrupted commit |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
134 |
## redirection and grep for backwards compatibility |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
135 |
#HGEDITOR=false hg commit 2>&1 | grep -v 'edit failed:' |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
136 |
#echo % status |
6160401f94f2
(0.9.2compat) implement context based changes from default branch
Christian Ebert <blacktrash@gmx.net>
parents:
303
diff
changeset
|
137 |
#hg status |
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
138 |
|
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
139 |
echo % commit |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
140 |
hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>' |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
141 |
rm log |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
142 |
echo % status |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
143 |
hg status |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
144 |
|
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
145 |
echo % cat |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
146 |
cat a b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
147 |
echo % hg cat |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
148 |
hg cat a b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
149 |
|
215 | 150 |
echo % remove |
151 |
hg remove a |
|
152 |
hg --debug commit -m rma |
|
153 |
echo % status |
|
154 |
hg status |
|
155 |
echo % rollback |
|
156 |
hg rollback |
|
157 |
echo % status |
|
158 |
hg status |
|
159 |
echo % revert a |
|
160 |
hg revert --no-backup --rev tip a |
|
161 |
echo % cat a |
|
162 |
cat a |
|
163 |
||
164 |
echo % clone to test incoming |
|
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
165 |
cd .. |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
166 |
hg clone -r0 Test Test-a |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
167 |
cd Test-a |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
168 |
cat <<EOF >> .hg/hgrc |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
169 |
[paths] |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
170 |
default = ../Test |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
171 |
EOF |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
172 |
echo % incoming |
209
430837dbe7f4
Adapt to recent changes in Hg (locks handling, dirstate.update gone)
Christian Ebert <blacktrash@gmx.net>
parents:
208
diff
changeset
|
173 |
# remove path to temp dir for backwards compatibility |
218
d7ddb4e378f3
test: use grep -v instead of sed to delete lines
Christian Ebert <blacktrash@gmx.net>
parents:
215
diff
changeset
|
174 |
hg incoming | grep -v '^comparing with' |
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
175 |
|
324
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
176 |
#sed -i.bak -e 's/Id.*/& rejecttest/' a |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
177 |
#rm a.bak |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
178 |
#echo % commit rejecttest |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
179 |
#hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>' |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
180 |
#echo % export |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
181 |
#hg export -o ../rejecttest.diff tip |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
182 |
|
241
e0a846f9f095
Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents:
224
diff
changeset
|
183 |
cd ../Test |
324
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
184 |
#echo % import |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
185 |
#hg import ../rejecttest.diff |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
186 |
#echo % cat |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
187 |
#cat a b |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
188 |
#echo % rollback |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
189 |
#hg rollback |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
190 |
#echo % clean update |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
191 |
#hg update --clean |
b3abbb5cf61c
(0.9.2compat) add rejecttest as comment, as it is not working in this branch
Christian Ebert <blacktrash@gmx.net>
parents:
311
diff
changeset
|
192 |
|
281
c6314b110e67
Detailed test of kwexpand/kwshrink w/ file arguments
Christian Ebert <blacktrash@gmx.net>
parents:
279
diff
changeset
|
193 |
echo % kwexpand/kwshrink on selected files |
241
e0a846f9f095
Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents:
224
diff
changeset
|
194 |
mkdir x |
281
c6314b110e67
Detailed test of kwexpand/kwshrink w/ file arguments
Christian Ebert <blacktrash@gmx.net>
parents:
279
diff
changeset
|
195 |
echo % copy a x/a |
241
e0a846f9f095
Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents:
224
diff
changeset
|
196 |
hg copy a x/a |
281
c6314b110e67
Detailed test of kwexpand/kwshrink w/ file arguments
Christian Ebert <blacktrash@gmx.net>
parents:
279
diff
changeset
|
197 |
echo % kwexpand a |
c6314b110e67
Detailed test of kwexpand/kwshrink w/ file arguments
Christian Ebert <blacktrash@gmx.net>
parents:
279
diff
changeset
|
198 |
hg --verbose kwexpand a |
c6314b110e67
Detailed test of kwexpand/kwshrink w/ file arguments
Christian Ebert <blacktrash@gmx.net>
parents:
279
diff
changeset
|
199 |
echo % kwexpand x/a should abort |
c6314b110e67
Detailed test of kwexpand/kwshrink w/ file arguments
Christian Ebert <blacktrash@gmx.net>
parents:
279
diff
changeset
|
200 |
hg --verbose kwexpand x/a |
241
e0a846f9f095
Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents:
224
diff
changeset
|
201 |
cd x |
e0a846f9f095
Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents:
224
diff
changeset
|
202 |
hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>' |
e0a846f9f095
Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents:
224
diff
changeset
|
203 |
echo % cat a |
e0a846f9f095
Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents:
224
diff
changeset
|
204 |
cat a |
281
c6314b110e67
Detailed test of kwexpand/kwshrink w/ file arguments
Christian Ebert <blacktrash@gmx.net>
parents:
279
diff
changeset
|
205 |
echo % kwshrink a inside directory x |
241
e0a846f9f095
Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents:
224
diff
changeset
|
206 |
hg --verbose kwshrink a |
e0a846f9f095
Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents:
224
diff
changeset
|
207 |
echo % cat a |
e0a846f9f095
Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents:
224
diff
changeset
|
208 |
cat a |
326
225c969e007b
(0.9.2compat) test: redirect "cd -" output to /dev/null
Christian Ebert <blacktrash@gmx.net>
parents:
324
diff
changeset
|
209 |
cd - > /dev/null 2>&1 |
241
e0a846f9f095
Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents:
224
diff
changeset
|
210 |
|
279
1f00dce8de12
Test if warning about non-existing files is triggered
Christian Ebert <blacktrash@gmx.net>
parents:
267
diff
changeset
|
211 |
echo % kwexpand nonexistent |
1f00dce8de12
Test if warning about non-existing files is triggered
Christian Ebert <blacktrash@gmx.net>
parents:
267
diff
changeset
|
212 |
hg kwexpand nonexistent |
1f00dce8de12
Test if warning about non-existing files is triggered
Christian Ebert <blacktrash@gmx.net>
parents:
267
diff
changeset
|
213 |
|
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
214 |
echo % switch off expansion |
267
4a24c3acd4f2
Tighten condition for kwshrink/kwexpand test
Christian Ebert <blacktrash@gmx.net>
parents:
259
diff
changeset
|
215 |
echo % kwshrink with unknown file u |
4a24c3acd4f2
Tighten condition for kwshrink/kwexpand test
Christian Ebert <blacktrash@gmx.net>
parents:
259
diff
changeset
|
216 |
cp a u |
241
e0a846f9f095
Test kwshrink w/ argument while not in top level directory
Christian Ebert <blacktrash@gmx.net>
parents:
224
diff
changeset
|
217 |
hg --verbose kwshrink |
189
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
218 |
echo % cat |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
219 |
cat a b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
220 |
echo % hg cat |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
221 |
hg cat a b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
222 |
|
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
223 |
rm $HGRCPATH |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
224 |
echo % cat |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
225 |
cat a b |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
226 |
echo % hg cat |
247159261ba5
Add backwards compatible test-suite
Christian Ebert <blacktrash@gmx.net>
parents:
diff
changeset
|
227 |
hg cat a b |