Mercurial > hg
annotate mercurial/help/hgignore.5.txt @ 23167:a3c2d9211294 stable
templater: don't overwrite the keyword mapping in runsymbol() (issue4362)
This keyword remapping was introduced in e06e9fd2d99f as part of converting
generator based iterators into list based iterators, mentioning "undesired
behavior in template" when a generator is exhausted, but doesn't say what and
introduces no tests.
The problem with the remapping was that it corrupted the output for keywords
like 'extras', 'file_copies' and 'file_copies_switch' in templates such as:
$ hg log -r 142b5d5ec9cc --template "{file_copies % ' File: {file_copy}\n'}"
File: mercurial/changelog.py (mercurial/hg.py)
File: mercurial/changelog.py (mercurial/hg.py)
File: mercurial/changelog.py (mercurial/hg.py)
File: mercurial/changelog.py (mercurial/hg.py)
File: mercurial/changelog.py (mercurial/hg.py)
File: mercurial/changelog.py (mercurial/hg.py)
File: mercurial/changelog.py (mercurial/hg.py)
File: mercurial/changelog.py (mercurial/hg.py)
What was happening was that in the first call to runtemplate() inside runmap(),
'lm' mapped the keyword (e.g. file_copies) to the appropriate showxxx() method.
On each subsequent call to runtemplate() in that loop however, the keyword was
mapped to a list of the first item's pieces, e.g.:
'file_copy': ['mercurial/changelog.py', ' (', 'mercurial/hg.py', ')']
Therefore, the dict for the second and any subsequent items were not processed
through the corresponding showxxx() method, and the first item's data was
reused.
The 'extras' keyword regressed in de7e6c489412, and 'file_copies' regressed in
0b241d7a8c62 for other reasons. The common thread of things fixed by this seems
to be when a list of dicts are passed to the templatekw._hybrid class.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 03 Nov 2014 12:08:03 -0500 |
parents | 9c963a43ecfb |
children | 8fe5fc8d7b8e |
rev | line source |
---|---|
9158
d6eecafaf12f
doc: use reStructuredText for man and HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9127
diff
changeset
|
1 ========== |
d6eecafaf12f
doc: use reStructuredText for man and HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9127
diff
changeset
|
2 hgignore |
d6eecafaf12f
doc: use reStructuredText for man and HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9127
diff
changeset
|
3 ========== |
2209
956e329f9e13
document hgignore syntax in new file doc/hgignore.5.txt.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
4 |
9158
d6eecafaf12f
doc: use reStructuredText for man and HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9127
diff
changeset
|
5 --------------------------------- |
d6eecafaf12f
doc: use reStructuredText for man and HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9127
diff
changeset
|
6 syntax for Mercurial ignore files |
d6eecafaf12f
doc: use reStructuredText for man and HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9127
diff
changeset
|
7 --------------------------------- |
d6eecafaf12f
doc: use reStructuredText for man and HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9127
diff
changeset
|
8 |
d6eecafaf12f
doc: use reStructuredText for man and HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9127
diff
changeset
|
9 :Author: Vadim Gelfer <vadim.gelfer@gmail.com> |
d6eecafaf12f
doc: use reStructuredText for man and HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9127
diff
changeset
|
10 :Organization: Mercurial |
d6eecafaf12f
doc: use reStructuredText for man and HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9127
diff
changeset
|
11 :Manual section: 5 |
d6eecafaf12f
doc: use reStructuredText for man and HTML pages
Martin Geisler <mg@lazybytes.net>
parents:
9127
diff
changeset
|
12 :Manual group: Mercurial Manual |
2209
956e329f9e13
document hgignore syntax in new file doc/hgignore.5.txt.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
13 |
19426
e43184680461
doc: make man and html from translated documents
Takumi IINO <trot.thunder@gmail.com>
parents:
17267
diff
changeset
|
14 .. include:: hgignore.5.gendoc.txt |
2209
956e329f9e13
document hgignore syntax in new file doc/hgignore.5.txt.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
15 |
9792
dd1a95ccbe07
doc: use titlecase in man page section titles
Martin Geisler <mg@lazybytes.net>
parents:
9624
diff
changeset
|
16 Author |
17267
979b107eaea2
doc: unify section level between help topics
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16548
diff
changeset
|
17 ====== |
2209
956e329f9e13
document hgignore syntax in new file doc/hgignore.5.txt.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
18 Vadim Gelfer <vadim.gelfer@gmail.com> |
956e329f9e13
document hgignore syntax in new file doc/hgignore.5.txt.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
19 |
956e329f9e13
document hgignore syntax in new file doc/hgignore.5.txt.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
20 Mercurial was written by Matt Mackall <mpm@selenic.com>. |
956e329f9e13
document hgignore syntax in new file doc/hgignore.5.txt.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
21 |
9792
dd1a95ccbe07
doc: use titlecase in man page section titles
Martin Geisler <mg@lazybytes.net>
parents:
9624
diff
changeset
|
22 See Also |
17267
979b107eaea2
doc: unify section level between help topics
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16548
diff
changeset
|
23 ======== |
9162
2399362b3bb0
doc: link man pages to one another
Martin Geisler <mg@lazybytes.net>
parents:
9161
diff
changeset
|
24 |hg(1)|_, |hgrc(5)|_ |
2209
956e329f9e13
document hgignore syntax in new file doc/hgignore.5.txt.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
25 |
9792
dd1a95ccbe07
doc: use titlecase in man page section titles
Martin Geisler <mg@lazybytes.net>
parents:
9624
diff
changeset
|
26 Copying |
17267
979b107eaea2
doc: unify section level between help topics
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
16548
diff
changeset
|
27 ======= |
2209
956e329f9e13
document hgignore syntax in new file doc/hgignore.5.txt.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
28 This manual page is copyright 2006 Vadim Gelfer. |
20227
9c963a43ecfb
doc: bump copyright year
Kevin Bullock <kbullock@ringworld.org>
parents:
19435
diff
changeset
|
29 Mercurial is copyright 2005-2014 Matt Mackall. |
2209
956e329f9e13
document hgignore syntax in new file doc/hgignore.5.txt.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
30 Free use of this software is granted under the terms of the GNU General |
10263 | 31 Public License version 2 or any later version. |
9162
2399362b3bb0
doc: link man pages to one another
Martin Geisler <mg@lazybytes.net>
parents:
9161
diff
changeset
|
32 |
2399362b3bb0
doc: link man pages to one another
Martin Geisler <mg@lazybytes.net>
parents:
9161
diff
changeset
|
33 .. include:: common.txt |
14044
0528b69f8db4
help: move hgignore man page into built-in help (issue2769)
Yun Lee <yun.lee.bj@gmail.com>
parents:
10263
diff
changeset
|
34 |