comparison mercurial/commands.py @ 4684: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
comparison
equal deleted inserted replaced
4683:8c3d449ecc63 4684:849f011dbf79
3088 3088
3089 norepo = ("clone init version help debugancestor debugcomplete debugdata" 3089 norepo = ("clone init version help debugancestor debugcomplete debugdata"
3090 " debugindex debugindexdot debugdate debuginstall") 3090 " debugindex debugindexdot debugdate debuginstall")
3091 optionalrepo = ("paths serve showconfig") 3091 optionalrepo = ("paths serve showconfig")
3092 3092
3093 def dispatch(args): 3093 def dispatch(args, argv0=None):
3094 try: 3094 try:
3095 u = ui.ui(traceback='--traceback' in args) 3095 u = ui.ui(traceback='--traceback' in args)
3096 except util.Abort, inst: 3096 except util.Abort, inst:
3097 sys.stderr.write(_("abort: %s\n") % inst) 3097 sys.stderr.write(_("abort: %s\n") % inst)
3098 return -1 3098 return -1
3099 return cmdutil.runcatch(u, args) 3099 return cmdutil.runcatch(u, args, argv0=argv0)
3100 3100
3101 def run(): 3101 def run():
3102 sys.exit(dispatch(sys.argv[1:])) 3102 sys.exit(dispatch(sys.argv[1:], argv0=sys.argv[0]))