Mercurial > hg
view contrib/wix/README.txt @ 25596:c1975809a6b5
templater: take any string literals as template, but not for rawstring (BC)
This patch series is intended to unify the interpretation of string literals.
It is breaking change that boldly assumes
a. string literal "..." never contains template-like fragment or it is
intended to be a template
b. we tend to use raw string literal r"..." for regexp pattern in which "{"
should have different meaning
Currently, we don't have a comprehensible rule how string literals are
evaluated in template functions. For example, fill() takes "initialindent"
and "hangindent" as templates, but not for "text", whereas "text" is a
template in pad() function.
date(date, fmt)
diff(includepattern, excludepattern)
fill(text, width, initialident: T, hangindent: T)
get(dict, key)
if(expr, then: T, else: T)
ifcontains(search, thing, then: T, else: T)
ifeq(expr1, expr2, then: T, else: T)
indent(text, indentchars, firstline)
join(list, sep)
label(label: T, expr: T)
pad(text: T, width, fillchar, right)
revset(query, formatargs...])
rstdoc(text, style)
shortest(node, minlength)
startswith(pattern, text)
strip(text, chars)
sub(pattern, replacement, expression: T)
word(number, text, separator)
expr % template: T
T: interpret "string" or r"rawstring" as template
This patch series adjusts the rule as follows:
a. string literal, '' or "", starts template processing (BC)
b. raw string literal, r'' or r"", disables both \-escape and template
processing (BC, done by subsequent patches)
c. fragment not surrounded by {} is non-templated string
"ccc{'aaa'}{r'bbb'}"
------------------ *: template
--- c: string
--- a: template
--- b: rawstring
Because this can eliminate the compilation of template arguments from the
evaluation phase, "hg log -Tdefault" gets faster.
% cd mozilla-central
% LANG=C HGRCPATH=/dev/null hg log -Tdefault -r0:10000 --time > /dev/null
before: real 4.870 secs (user 4.860+0.000 sys 0.010+0.000)
after: real 3.480 secs (user 3.440+0.000 sys 0.030+0.000)
Also, this will allow us to parse nested templates at once for better error
indication.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 13 Jun 2015 19:49:54 +0900 |
parents | 98166640b356 |
children | 765f836a9484 |
line wrap: on
line source
WiX installer source files ========================== The files in this folder are used by the thg-winbuild [1] package building architecture to create a Mercurial MSI installer. These files are versioned within the Mercurial source tree because the WXS files must kept up to date with distribution changes within their branch. In other words, the default branch WXS files are expected to diverge from the stable branch WXS files. Storing them within the same repository is the only sane way to keep the source tree and the installer in sync. The MSI installer builder uses only the mercurial.ini file from the contrib/win32 folder, the contents of which have been historically used to create an InnoSetup based installer. The rest of the files there are ignored. The MSI packages built by thg-winbuild require elevated (admin) privileges to be installed due to the installation of MSVC CRT libraries under the C:\WINDOWS\WinSxS folder. Thus the InnoSetup installers may still be useful to some users. To build your own MSI packages, clone the thg-winbuild [1] repository and follow the README.txt [2] instructions closely. There are fewer prerequisites for a WiX [3] installer than an InnoSetup installer, but they are more specific. Direct questions or comments to Steve Borho <steve@borho.org> [1] http://bitbucket.org/tortoisehg/thg-winbuild [2] http://bitbucket.org/tortoisehg/thg-winbuild/src/tip/README.txt [3] http://wix.sourceforge.net/