##// END OF EJS Templates
Added test for earlygetopt fixes (36d23de02da1 and 79cc512a34ed)
Thomas Arendsen Hein -
r4728:7bb5bcb0 default
parent child Browse files
Show More
@@ -1,72 +1,81 b''
1 1 #!/bin/sh
2 2
3 3 hg init a
4 4 cd a
5 5 echo a > a
6 6 hg ci -A -d'1 0' -m a
7 7
8 8 cd ..
9 9
10 10 hg init b
11 11 cd b
12 12 echo b > b
13 13 hg ci -A -d'1 0' -m b
14 14
15 15 cd ..
16 16
17 17 hg clone a c
18 18 cd c
19 19 hg pull -f ../b
20 20 hg merge
21 21
22 22 cd ..
23 23
24 24 echo %% -R/--repository
25 25 hg -R a tip
26 26 hg --repository b tip
27 27
28 28 echo %% abbrev of long option
29 29 hg --repo c tip
30 30
31 echo "%% earlygetopt with duplicate options (36d23de02da1)"
32 hg --cwd a --cwd b --cwd c tip
33 hg --repo c --repository b -R a tip
34
35 echo "%% earlygetopt short option without spaces (79cc512a34ed)"
36 hg -qR a tip
37 hg -q -Rb tip
38 hg -qRc tip
39
31 40 echo %% --cwd
32 41 hg --cwd a parents
33 42
34 43 echo %% -y/--noninteractive - just be sure it is parsed
35 44 hg --cwd a tip -q --noninteractive
36 45 hg --cwd a tip -q -y
37 46
38 47 echo %% -q/--quiet
39 48 hg -R a -q tip
40 49 hg -R b -q tip
41 50 hg -R c --quiet parents
42 51
43 52 echo %% -v/--verbose
44 53 hg --cwd c head -v
45 54 hg --cwd b tip --verbose
46 55
47 56 echo %% --config
48 57 hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo
49 58 hg --cwd c --config '' tip -q
50 59 hg --cwd c --config a.b tip -q
51 60 hg --cwd c --config a tip -q
52 61 hg --cwd c --config a.= tip -q
53 62 hg --cwd c --config .b= tip -q
54 63
55 64 echo %% --debug
56 65 hg --cwd c log --debug
57 66
58 67 echo %% --traceback
59 68 hg --cwd c --config x --traceback tip 2>&1 | grep -i 'traceback'
60 69
61 70 echo %% --time
62 71 hg --cwd a --time tip 2>&1 | grep '^Time:' | sed 's/[0-9][0-9]*/x/g'
63 72
64 73 echo %% --version
65 74 hg --version -q | sed 's/version [^)]*/version xxx/'
66 75
67 76 echo %% -h/--help
68 77 hg -h
69 78 hg --help
70 79
71 80 echo %% not tested: --debugger
72 81
@@ -1,222 +1,240 b''
1 1 adding a
2 2 adding b
3 3 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
4 4 pulling from ../b
5 5 searching for changes
6 6 warning: repository is unrelated
7 7 adding changesets
8 8 adding manifests
9 9 adding file changes
10 10 added 1 changesets with 1 changes to 1 files (+1 heads)
11 11 (run 'hg heads' to see heads, 'hg merge' to merge)
12 12 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
13 13 (branch merge, don't forget to commit)
14 14 %% -R/--repository
15 15 changeset: 0:8580ff50825a
16 16 tag: tip
17 17 user: test
18 18 date: Thu Jan 01 00:00:01 1970 +0000
19 19 summary: a
20 20
21 21 changeset: 0:b6c483daf290
22 22 tag: tip
23 23 user: test
24 24 date: Thu Jan 01 00:00:01 1970 +0000
25 25 summary: b
26 26
27 27 %% abbrev of long option
28 28 changeset: 1:b6c483daf290
29 29 tag: tip
30 30 parent: -1:000000000000
31 31 user: test
32 32 date: Thu Jan 01 00:00:01 1970 +0000
33 33 summary: b
34 34
35 %% earlygetopt with duplicate options (36d23de02da1)
36 changeset: 1:b6c483daf290
37 tag: tip
38 parent: -1:000000000000
39 user: test
40 date: Thu Jan 01 00:00:01 1970 +0000
41 summary: b
42
43 changeset: 0:8580ff50825a
44 tag: tip
45 user: test
46 date: Thu Jan 01 00:00:01 1970 +0000
47 summary: a
48
49 %% earlygetopt short option without spaces (79cc512a34ed)
50 0:8580ff50825a
51 0:b6c483daf290
52 1:b6c483daf290
35 53 %% --cwd
36 54 changeset: 0:8580ff50825a
37 55 tag: tip
38 56 user: test
39 57 date: Thu Jan 01 00:00:01 1970 +0000
40 58 summary: a
41 59
42 60 %% -y/--noninteractive - just be sure it is parsed
43 61 0:8580ff50825a
44 62 0:8580ff50825a
45 63 %% -q/--quiet
46 64 0:8580ff50825a
47 65 0:b6c483daf290
48 66 0:8580ff50825a
49 67 1:b6c483daf290
50 68 %% -v/--verbose
51 69 changeset: 1:b6c483daf290
52 70 tag: tip
53 71 parent: -1:000000000000
54 72 user: test
55 73 date: Thu Jan 01 00:00:01 1970 +0000
56 74 files: b
57 75 description:
58 76 b
59 77
60 78
61 79 changeset: 0:8580ff50825a
62 80 user: test
63 81 date: Thu Jan 01 00:00:01 1970 +0000
64 82 files: a
65 83 description:
66 84 a
67 85
68 86
69 87 changeset: 0:b6c483daf290
70 88 tag: tip
71 89 user: test
72 90 date: Thu Jan 01 00:00:01 1970 +0000
73 91 files: b
74 92 description:
75 93 b
76 94
77 95
78 96 %% --config
79 97 quuxfoo
80 98 abort: malformed --config option:
81 99 abort: malformed --config option: a.b
82 100 abort: malformed --config option: a
83 101 abort: malformed --config option: a.=
84 102 abort: malformed --config option: .b=
85 103 %% --debug
86 104 changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a
87 105 tag: tip
88 106 parent: -1:0000000000000000000000000000000000000000
89 107 parent: -1:0000000000000000000000000000000000000000
90 108 manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49
91 109 user: test
92 110 date: Thu Jan 01 00:00:01 1970 +0000
93 111 files+: b
94 112 extra: branch=default
95 113 description:
96 114 b
97 115
98 116
99 117 changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
100 118 parent: -1:0000000000000000000000000000000000000000
101 119 parent: -1:0000000000000000000000000000000000000000
102 120 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
103 121 user: test
104 122 date: Thu Jan 01 00:00:01 1970 +0000
105 123 files+: a
106 124 extra: branch=default
107 125 description:
108 126 a
109 127
110 128
111 129 %% --traceback
112 130 Traceback (most recent call last):
113 131 %% --time
114 132 Time: real x.x secs (user x.x+x.x sys x.x+x.x)
115 133 %% --version
116 134 Mercurial Distributed SCM (version xxx)
117 135 %% -h/--help
118 136 Mercurial Distributed SCM
119 137
120 138 list of commands:
121 139
122 140 add add the specified files on the next commit
123 141 addremove add all new files, delete all missing files
124 142 annotate show changeset information per file line
125 143 archive create unversioned archive of a repository revision
126 144 backout reverse effect of earlier changeset
127 145 branch set or show the current branch name
128 146 branches list repository named branches
129 147 bundle create a changegroup file
130 148 cat output the current or given revision of files
131 149 clone make a copy of an existing repository
132 150 commit commit the specified files or all outstanding changes
133 151 copy mark files as copied for the next commit
134 152 diff diff repository (or selected files)
135 153 export dump the header and diffs for one or more changesets
136 154 grep search for a pattern in specified files and revisions
137 155 heads show current repository heads or show branch heads
138 156 help show help for a command, extension, or list of commands
139 157 identify identify the working copy or specified revision
140 158 import import an ordered set of patches
141 159 incoming show new changesets found in source
142 160 init create a new repository in the given directory
143 161 locate locate files matching specific patterns
144 162 log show revision history of entire repository or files
145 163 manifest output the current or given revision of the project manifest
146 164 merge merge working directory with another revision
147 165 outgoing show changesets not found in destination
148 166 parents show the parents of the working dir or revision
149 167 paths show definition of symbolic path names
150 168 pull pull changes from the specified source
151 169 push push changes to the specified destination
152 170 recover roll back an interrupted transaction
153 171 remove remove the specified files on the next commit
154 172 rename rename files; equivalent of copy + remove
155 173 revert revert files or dirs to their states as of some revision
156 174 rollback roll back the last transaction in this repository
157 175 root print the root (top) of the current working dir
158 176 serve export the repository via HTTP
159 177 showconfig show combined config settings from all hgrc files
160 178 status show changed files in the working directory
161 179 tag add a tag for the current or given revision
162 180 tags list repository tags
163 181 tip show the tip revision
164 182 unbundle apply one or more changegroup files
165 183 update update working directory
166 184 verify verify the integrity of the repository
167 185 version output version and copyright information
168 186
169 187 use "hg -v help" to show aliases and global options
170 188 Mercurial Distributed SCM
171 189
172 190 list of commands:
173 191
174 192 add add the specified files on the next commit
175 193 addremove add all new files, delete all missing files
176 194 annotate show changeset information per file line
177 195 archive create unversioned archive of a repository revision
178 196 backout reverse effect of earlier changeset
179 197 branch set or show the current branch name
180 198 branches list repository named branches
181 199 bundle create a changegroup file
182 200 cat output the current or given revision of files
183 201 clone make a copy of an existing repository
184 202 commit commit the specified files or all outstanding changes
185 203 copy mark files as copied for the next commit
186 204 diff diff repository (or selected files)
187 205 export dump the header and diffs for one or more changesets
188 206 grep search for a pattern in specified files and revisions
189 207 heads show current repository heads or show branch heads
190 208 help show help for a command, extension, or list of commands
191 209 identify identify the working copy or specified revision
192 210 import import an ordered set of patches
193 211 incoming show new changesets found in source
194 212 init create a new repository in the given directory
195 213 locate locate files matching specific patterns
196 214 log show revision history of entire repository or files
197 215 manifest output the current or given revision of the project manifest
198 216 merge merge working directory with another revision
199 217 outgoing show changesets not found in destination
200 218 parents show the parents of the working dir or revision
201 219 paths show definition of symbolic path names
202 220 pull pull changes from the specified source
203 221 push push changes to the specified destination
204 222 recover roll back an interrupted transaction
205 223 remove remove the specified files on the next commit
206 224 rename rename files; equivalent of copy + remove
207 225 revert revert files or dirs to their states as of some revision
208 226 rollback roll back the last transaction in this repository
209 227 root print the root (top) of the current working dir
210 228 serve export the repository via HTTP
211 229 showconfig show combined config settings from all hgrc files
212 230 status show changed files in the working directory
213 231 tag add a tag for the current or given revision
214 232 tags list repository tags
215 233 tip show the tip revision
216 234 unbundle apply one or more changegroup files
217 235 update update working directory
218 236 verify verify the integrity of the repository
219 237 version output version and copyright information
220 238
221 239 use "hg -v help" to show aliases and global options
222 240 %% not tested: --debugger
General Comments 0
You need to be logged in to leave comments. Login now