diff contrib/hg-ssh @ 5188:831ebc408ffb

Adjust contrib/hg-ssh for moved dispatch() function.
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 17 Aug 2007 19:11:16 +0200
parents 9a5b778f7e2d
children 55860a45bbf2
line wrap: on
line diff
--- a/contrib/hg-ssh
+++ b/contrib/hg-ssh
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2005, 2006 by Intevation GmbH <intevation@intevation.de>
+# Copyright 2005-2007 by Intevation GmbH <intevation@intevation.de>
 # Author(s):
 # Thomas Arendsen Hein <thomas@intevation.de>
 #
@@ -25,7 +25,7 @@ You can use pattern matching of your nor
 command="cd repos && hg-ssh user/thomas/* projects/{mercurial,foo}"
 """
 
-from mercurial import commands
+from mercurial import dispatch
 
 import sys, os
 
@@ -38,7 +38,7 @@ if orig_cmd.startswith('hg -R ') and ori
     path = orig_cmd[6:-14]
     repo = os.path.normpath(os.path.join(cwd, os.path.expanduser(path)))
     if repo in allowed_paths:
-        commands.dispatch(['-R', repo, 'serve', '--stdio'])
+        dispatch.dispatch(['-R', repo, 'serve', '--stdio'])
     else:
         sys.stderr.write("Illegal repository %r\n" % repo)
         sys.exit(-1)