Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 1914:a5bf0030df5f
make --style=compact look for map-cmdline.compact.
change name of key in map file from changelog to changeset.
rename command map files to start with map-cmdline.
rename ui.logmap to ui.style in hgrc.
now --style=foo does this:
tries to open foo as file.
tries as map-cmdline.foo in template path.
tries as foo in template path.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Sat, 04 Mar 2006 15:15:18 -0800 |
parents | 74cf2b2f43d4 |
children | 7f578969f3f6 |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Mar 04 12:40:10 2006 -0800 +++ b/mercurial/commands.py Sat Mar 04 15:15:18 2006 -0800 @@ -349,7 +349,7 @@ def use_template(self, t): '''set template string to use''' - self.t.cache['changelog'] = t + self.t.cache['changeset'] = t def write(self, thing): '''write expanded template. @@ -489,10 +489,10 @@ } try: - if self.ui.verbose and 'changelog_verbose' in self.t: - key = 'changelog_verbose' + if self.ui.verbose and 'changeset_verbose' in self.t: + key = 'changeset_verbose' else: - key = 'changelog' + key = 'changeset' self.write(self.t(key, **props)) except KeyError, inst: raise util.Abort(_("%s: no key named '%s'") % (self.t.mapfile, @@ -578,11 +578,12 @@ else: tmpl = ui.config('ui', 'logtemplate') if tmpl: tmpl = templater.parsestring(tmpl) - mapfile = opts.get('style') or ui.config('ui', 'logmap') + mapfile = opts.get('style') or ui.config('ui', 'style') if tmpl or mapfile: if mapfile: if not os.path.isfile(mapfile): - mapname = templater.templatepath(mapfile) + mapname = templater.templatepath('map-cmdline.' + mapfile) + if not mapname: mapname = templater.templatepath(mapfile) if mapname: mapfile = mapname try: t = changeset_templater(ui, repo, mapfile)