comparison mercurial/hook.py @ 38723:f9b2d996ffa5

hook: only print the note about native cmd translation if it actually changes This makes it so that it will never occur on a non Windows platform.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 15 Jul 2018 23:51:43 -0400
parents 2009d84f245a
children 24e493ec2229
comparison
equal deleted inserted replaced
38722:2009d84f245a 38723:f9b2d996ffa5
138 if isinstance(v, (dict, list)): 138 if isinstance(v, (dict, list)):
139 v = stringutil.pprint(v) 139 v = stringutil.pprint(v)
140 env['HG_' + k.upper()] = v 140 env['HG_' + k.upper()] = v
141 141
142 if ui.configbool('hooks', 'tonative.%s' % name, False): 142 if ui.configbool('hooks', 'tonative.%s' % name, False):
143 ui.note(_('converting hook "%s" to native\n') % name) 143 oldcmd = cmd
144 cmd = procutil.shelltonative(cmd, env) 144 cmd = procutil.shelltonative(cmd, env)
145 if cmd != oldcmd:
146 ui.note(_('converting hook "%s" to native\n') % name)
145 147
146 ui.note(_("running hook %s: %s\n") % (name, cmd)) 148 ui.note(_("running hook %s: %s\n") % (name, cmd))
147 149
148 if repo: 150 if repo:
149 cwd = repo.root 151 cwd = repo.root