sapling/hgext
Yuya Nishihara 59e8edaa91 bugzilla: do not load style file if template is specified (BC)
This prepares for the API change to support template aliases. I'm going to
extract a factory function of templater that reads a map file:

  # original
  templater(mapfile, ..., cache, ...)
  # new
  templater.frommapfile(mapfile, ...)  # read mapfile to build cache/map
  templater(..., cache, ...)           # use specified cache (= map elements)

This will make it clear to isolate stock styles (i.e. map files) from user
aliases. Template aliases should be applied to command arguments and templates
in hgrc, but not to map files. Otherwise, our stock styles and web templates
could be modified unintentionally.

This patch makes sure that either "tmpl" or "mapfile" is exclusively set. It's
theoretically a behavior change, since you could put new keywords in template
by defining them in a map file before:

  # mapfile
  foo = "{rev}"
  # hgrc
  [bugzilla]
  style = mapfile
  template = {foo}

But the old behavior would be a bug because bugzilla.template is documented
as "overrides style if specified". Also, common log-like templates and
formatter doesn't allow using mapfile-keywords in a separate template. So
I decided to make a BC.

Since there was no test for the bugzilla extension, this adds new test that
covers style/template output.
2016-04-04 22:48:34 +09:00
..
convert convert: keep converted hg parents that are outside convert.hg.revs (BC) 2016-04-13 00:16:21 +02:00
fsmonitor fsmonitor: flag msc_stdint as no-check-code 2016-03-14 21:15:59 -04:00
highlight cleanup: remove superfluous space after space after equals (python) 2015-12-31 08:16:59 +00:00
largefiles pycompat: switch to util.urlreq/util.urlerr for py3 compat 2016-04-06 23:22:12 +00:00
zeroconf zeroconf: remove leftover camelcase identifier 2016-03-11 15:40:58 -08:00
__init__.py hgext: officially turn 'hgext' into a namespace package 2016-02-27 12:56:26 +01:00
acl.py pycompat: switch to util.urlreq/util.urlerr for py3 compat 2016-04-06 23:22:12 +00:00
automv.py automv: use 95 as the default similarity threshold 2016-02-16 15:58:32 +00:00
blackbox.py blackbox: do not assume self._bb{vfs,repo,fp} are set in blackboxui.__init__ 2016-03-15 10:36:02 +00:00
bugzilla.py bugzilla: do not load style file if template is specified (BC) 2016-04-04 22:48:34 +09:00
censor.py censor: make censor acquire locks before processing 2015-12-09 08:28:53 +09:00
chgserver.py chgserver: use relative path at socket.bind 2016-04-04 03:17:59 +01:00
children.py children: use double quotes for arguments 2016-01-06 17:18:18 +00:00
churn.py templater: do not abuse SyntaxError to report errors in template map file 2016-03-26 18:01:04 +09:00
clonebundles.py clonebundles: use absolute_import 2016-02-09 17:51:44 -08:00
color.py ui: add prompt argument to write (issue5154) (API) 2016-03-25 21:51:00 +00:00
eol.py eol: make output stable 2015-12-27 23:55:54 +09:00
extdiff.py extdiff: use @command decorator to set up diff commands 2016-01-01 22:35:34 +09:00
factotum.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
fetch.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
gpg.py with: use context manager for wlock in sign 2016-01-15 13:14:46 -08:00
graphlog.py graphlog: update help with replacement 2016-01-06 17:17:49 +00:00
hgcia.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
hgk.py hgk: tweak doc format for path option 2015-06-25 17:37:14 -05:00
histedit.py histedit: add a hint about enabled dropmissing to histedit edit comment 2016-03-19 11:39:13 -07:00
keyword.py keyword: use templatefilter to mark a function as template filter 2016-03-30 02:10:44 +09:00
logtoprocess.py logtoprocess: new experimental extension 2016-04-05 17:39:59 +01:00
mq.py dispatch: extract function that tests command attributes 2016-03-14 00:14:43 +09:00
notify.py notify: use absolute_import 2016-03-02 21:48:08 +00:00
pager.py pager: skip uisetup if chg is detected 2016-03-14 15:03:19 +00:00
patchbomb.py patchbomb: fix public-is-missing hint 2016-04-14 14:26:37 +00:00
purge.py purge: use absolute_import 2016-03-02 21:39:55 +00:00
rebase.py rebase: fix crash when rebase aborts while rebasing obsolete revisions 2016-03-29 11:50:41 -07:00
record.py record: deprecate the extension 2016-03-28 12:50:56 -07:00
relink.py relink: use absolute_import 2016-03-02 21:36:14 +00:00
schemes.py schemas: use absolute_import 2016-03-02 21:33:55 +00:00
share.py share: pass named arguments 2015-12-12 22:07:40 -05:00
shelve.py shelve: refactor directory name into constant 2016-04-08 23:33:28 -07:00
strip.py strip: use absolute_import 2016-03-02 21:26:36 +00:00
transplant.py hgext: use templatekeyword to mark a function as template keyword 2016-03-13 05:17:06 +09:00
win32mbcs.py win32mbcs: use absolute_import 2016-03-02 21:50:35 +00:00
win32text.py urls: bulk-change primary website URLs 2015-09-30 15:43:49 -05:00