changeset 16607:feb1fd2d13a9 stable

hg-ssh: exit with 255 instead of -1 on error Unix sh would cast -1 to 255 anyway, but on windows -1 become 0. Better be explicit with the 255 everywhere.
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 07 May 2012 00:52:08 +0200
parents 19379226dc67
children 289fdcd4cb47
files contrib/hg-ssh
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/hg-ssh	Mon May 07 00:49:01 2012 +0200
+++ b/contrib/hg-ssh	Mon May 07 00:52:08 2012 +0200
@@ -41,7 +41,7 @@
     cmdargv = shlex.split(orig_cmd)
 except ValueError, e:
     sys.stderr.write('Illegal command "%s": %s\n' % (orig_cmd, e))
-    sys.exit(-1)
+    sys.exit(255)
 
 if cmdargv[:2] == ['hg', '-R'] and cmdargv[3:] == ['serve', '--stdio']:
     path = cmdargv[2]
@@ -50,8 +50,8 @@
         dispatch.dispatch(dispatch.request(['-R', repo, 'serve', '--stdio']))
     else:
         sys.stderr.write('Illegal repository "%s"\n' % repo)
-        sys.exit(-1)
+        sys.exit(255)
 else:
     sys.stderr.write('Illegal command "%s"\n' % orig_cmd)
-    sys.exit(-1)
+    sys.exit(255)