##// END OF EJS Templates
wireproto: add test for new optional arg missing on server...
Peter Arrenbrecht -
r14048:58e58406 default
parent child Browse files
Show More
@@ -4558,6 +4558,7 b' table = {'
4558 4558 (debugwireargs,
4559 4559 [('', 'three', '', 'three'),
4560 4560 ('', 'four', '', 'four'),
4561 ('', 'five', '', 'five'),
4561 4562 ] + remoteopts,
4562 4563 _('REPO [OPTIONS]... [ONE [TWO]]')),
4563 4564 "^diff":
@@ -1921,9 +1921,9 b' class localrepository(repo.repository):'
1921 1921 def listkeys(self, namespace):
1922 1922 return pushkey.list(self, namespace)
1923 1923
1924 def debugwireargs(self, one, two, three=None, four=None):
1924 def debugwireargs(self, one, two, three=None, four=None, five=None):
1925 1925 '''used to test argument passing over the wire'''
1926 return "%s %s %s %s" % (one, two, three, four)
1926 return "%s %s %s %s %s" % (one, two, three, four, five)
1927 1927
1928 1928 # used to avoid circular references so destructors work
1929 1929 def aftertrans(files):
@@ -159,7 +159,7 b' class wirerepository(repo.repository):'
159 159 self.ui.status(_('remote: '), l)
160 160 return ret
161 161
162 def debugwireargs(self, one, two, three=None, four=None):
162 def debugwireargs(self, one, two, three=None, four=None, five=None):
163 163 # don't pass optional arguments left at their default value
164 164 opts = {}
165 165 if three is not None:
@@ -8,11 +8,13 b' Setup repo:'
8 8 Local:
9 9
10 10 $ hg debugwireargs repo eins zwei --three drei --four vier
11 eins zwei drei vier
11 eins zwei drei vier None
12 12 $ hg debugwireargs repo eins zwei --four vier
13 eins zwei None vier
13 eins zwei None vier None
14 14 $ hg debugwireargs repo eins zwei
15 eins zwei None None
15 eins zwei None None None
16 $ hg debugwireargs repo eins zwei --five fuenf
17 eins zwei None None fuenf
16 18
17 19 HTTP:
18 20
@@ -20,11 +22,13 b' HTTP:'
20 22 $ cat hg1.pid >> $DAEMON_PIDS
21 23
22 24 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois quatre
23 un deux trois quatre
25 un deux trois quatre None
24 26 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --four vier
25 eins zwei None vier
27 eins zwei None vier None
26 28 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei
27 eins zwei None None
29 eins zwei None None None
30 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --five fuenf
31 eins zwei None None None
28 32 $ cat access.log
29 33 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
30 34 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob)
@@ -35,6 +39,9 b' HTTP:'
35 39 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
36 40 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
37 41 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
42 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
43 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
44 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
38 45
39 46 SSH (try to exercise the ssh functionality with a dummy script):
40 47
@@ -52,9 +59,11 b' SSH (try to exercise the ssh functionali'
52 59 > EOF
53 60
54 61 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo uno due tre quattro
55 uno due tre quattro
62 uno due tre quattro None
56 63 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei --four vier
57 eins zwei None vier
64 eins zwei None vier None
58 65 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei
59 eins zwei None None
66 eins zwei None None None
67 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei --five fuenf
68 eins zwei None None None
60 69
General Comments 0
You need to be logged in to leave comments. Login now