Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 4686:849f011dbf79
Remember path to 'hg' executable and pass to external tools and hooks as $HG.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sat, 23 Jun 2007 20:21:10 +0200 |
parents | 51ec5e069505 |
children | c135c6cddbec |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Jun 23 12:05:00 2007 +0200 +++ b/mercurial/commands.py Sat Jun 23 20:21:10 2007 +0200 @@ -3090,13 +3090,13 @@ " debugindex debugindexdot debugdate debuginstall") optionalrepo = ("paths serve showconfig") -def dispatch(args): +def dispatch(args, argv0=None): try: u = ui.ui(traceback='--traceback' in args) except util.Abort, inst: sys.stderr.write(_("abort: %s\n") % inst) return -1 - return cmdutil.runcatch(u, args) + return cmdutil.runcatch(u, args, argv0=argv0) def run(): - sys.exit(dispatch(sys.argv[1:])) + sys.exit(dispatch(sys.argv[1:], argv0=sys.argv[0]))