##// END OF EJS Templates
hg-ssh: use %s for printing paths in error messages...
Mads Kiilerich -
r16606:19379226 stable
parent child Browse files
Show More
@@ -40,7 +40,7 b" orig_cmd = os.getenv('SSH_ORIGINAL_COMMA"
40 40 try:
41 41 cmdargv = shlex.split(orig_cmd)
42 42 except ValueError, e:
43 sys.stderr.write("Illegal command %r: %s\n" % (orig_cmd, e))
43 sys.stderr.write('Illegal command "%s": %s\n' % (orig_cmd, e))
44 44 sys.exit(-1)
45 45
46 46 if cmdargv[:2] == ['hg', '-R'] and cmdargv[3:] == ['serve', '--stdio']:
@@ -49,9 +49,9 b" if cmdargv[:2] == ['hg', '-R'] and cmdar"
49 49 if repo in allowed_paths:
50 50 dispatch.dispatch(dispatch.request(['-R', repo, 'serve', '--stdio']))
51 51 else:
52 sys.stderr.write("Illegal repository %r\n" % repo)
52 sys.stderr.write('Illegal repository "%s"\n' % repo)
53 53 sys.exit(-1)
54 54 else:
55 sys.stderr.write("Illegal command %r\n" % orig_cmd)
55 sys.stderr.write('Illegal command "%s"\n' % orig_cmd)
56 56 sys.exit(-1)
57 57
@@ -282,10 +282,12 b' Test hg-ssh:'
282 282
283 283 $ SSH_ORIGINAL_COMMAND="'hg' -R 'a repo' serve --stdio" hg id --ssh "python \"$TESTDIR\"/../contrib/hg-ssh \"$TESTTMP/a repo\"" "ssh://user@dummy/a repo"
284 284 3fb238f49e8c
285
285 286 $ SSH_ORIGINAL_COMMAND="'hg' -R 'a repo' serve --stdio" hg id --ssh "python \"$TESTDIR\"/../contrib/hg-ssh \"$TESTTMP\"" "ssh://user@dummy/a repo"
286 remote: Illegal repository '$TESTTMP/a repo' (glob)
287 remote: Illegal repository "$TESTTMP/a repo" (glob)
287 288 abort: no suitable response from remote hg!
288 289 [255]
290
289 291 $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" hg id --ssh "python \"$TESTDIR\"/../contrib/hg-ssh \"$TESTTMP\"" "ssh://user@dummy/a repo"
290 292 remote: Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation
291 293 abort: no suitable response from remote hg!
General Comments 0
You need to be logged in to leave comments. Login now