comparison mercurial/commands.py @ 3186:a6d0cd63068c

Make "hg log --style=changelog > changelog" work (issue338) Style files in templates/ now take precedence over current directory. This can be overridden with --style=./changelog if really neeeded. Added test for issue338.
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 29 Sep 2006 21:24:15 +0200
parents f2ed26736dfa
children 182bdd589cbe
comparison
equal deleted inserted replaced
3185:f2ed26736dfa 3186:a6d0cd63068c
397 else: 397 else:
398 mapfile = ui.config('ui', 'style') 398 mapfile = ui.config('ui', 'style')
399 399
400 if tmpl or mapfile: 400 if tmpl or mapfile:
401 if mapfile: 401 if mapfile:
402 if not os.path.isfile(mapfile): 402 if not os.path.split(mapfile)[0]:
403 mapname = templater.templatepath('map-cmdline.' + mapfile) 403 mapname = (templater.templatepath('map-cmdline.' + mapfile)
404 if not mapname: mapname = templater.templatepath(mapfile) 404 or templater.templatepath(mapfile))
405 if mapname: mapfile = mapname 405 if mapname: mapfile = mapname
406 try: 406 try:
407 t = templater.changeset_templater(ui, repo, mapfile) 407 t = templater.changeset_templater(ui, repo, mapfile)
408 except SyntaxError, inst: 408 except SyntaxError, inst:
409 raise util.Abort(inst.args[0]) 409 raise util.Abort(inst.args[0])