--- a/src/hg-ssh Mon Apr 18 13:26:05 2011 +0100
+++ b/src/hg-ssh Thu Jul 28 19:59:00 2011 +0100
@@ -19,6 +19,11 @@
from mercurial import dispatch
+try:
+ from dispatch import request
+except ImportError:
+ request = list
+
import sys, os, os.path
import base64
from mercurialserver import config, ruleset
@@ -83,7 +88,7 @@
repo = getrepo("read", cmd[6:-14])
if not os.path.isdir(repo + "/.hg"):
fail("no such repository %s" % repo)
- dispatch.dispatch(['-R', repo, 'serve', '--stdio'])
+ dispatch.dispatch(request(['-R', repo, 'serve', '--stdio']))
elif cmd.startswith('hg init '):
repo = getrepo("init", cmd[8:])
if os.path.exists(repo):
@@ -91,6 +96,6 @@
d = os.path.dirname(repo)
if d != "" and not os.path.isdir(d):
os.makedirs(d)
- dispatch.dispatch(['init', repo])
+ dispatch.dispatch(request(['init', repo]))
else:
fail("illegal command %r" % cmd)