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