Submitter | Simon Heimberg |
---|---|
Date | Jan. 28, 2014, 2:31 a.m. |
Message ID | <9600f3e8da0b9062907e.1390876318@lapsi.heimberg.home> |
Download | mbox | patch |
Permalink | /patch/3416/ |
State | Accepted |
Commit | 9a86b5b8e0d837f0c0bb7f2f1d442f0364089e65 |
Headers | show |
Comments
On Tue, 2014-01-28 at 03:31 +0100, Simon Heimberg wrote: > # HG changeset patch > # User Simon Heimberg <simohe@besonet.ch> > # Date 1390817827 -3600 > # Branch stable > # Node ID 9600f3e8da0b9062907e5db0504b9fff59157980 > # Parent 136fe91ade1d49e1845bb88064198af04e98d9e7 > commands: hg debuginstall checks missing templates (issue4151) Queued for default, thanks.
Patch
diff -r 136fe91ade1d -r 9600f3e8da0b mercurial/commands.py --- a/mercurial/commands.py Fre Jan 17 19:22:31 2014 +0100 +++ b/mercurial/commands.py Mon Jan 27 11:17:07 2014 +0100 @@ -2107,10 +2107,21 @@ import templater p = templater.templatepath() ui.status(_("checking templates (%s)...\n") % ' '.join(p)) - try: - templater.templater(templater.templatepath("map-cmdline.default")) - except Exception, inst: - ui.write(" %s\n" % inst) + if p: + m = templater.templatepath("map-cmdline.default") + if m: + # template found, check if it is working + try: + templater.templater(m) + except Exception, inst: + ui.write(" %s\n" % inst) + p = None + else: + ui.write(_(" template 'default' not found\n")) + p = None + else: + ui.write(_(" no template directories found\n")) + if not p: ui.write(_(" (templates seem to have been installed incorrectly)\n")) problems += 1