templater: factor out runtemplate method
As a side-effect, this makes the output of runmap non-flattened
formatter: improve implementation of data method
This alternate syntax was proposed by Bryan O'Sullivan in a review of
772b3764d3e8. I haven't been able to measure any particular performance
difference, but the new syntax is more concise and easier to read.
archival: add "extended-timestamp" extra block for zip archives (
issue3600)
Before this patch, zip archives created by "hg archive" are extracted
with unexpected timestamp, if TZ is not configured as GMT.
This patch adds "extended-timestamp" extra block to zip archives, and
unzip will extract such archives with timestamp specified in added
extra block, even though TZ is not configured as GMT.
Please see documents below for detail about specification of zip file
format and "extended-timestamp" extra block:
http://www.pkware.com/documents/casestudies/APPNOTE.TXT
http://www.opensource.apple.com/source/zip/zip-6/unzip/unzip/proginfo/extra.fld
Original implementation of this patch was suggested by "Jun Omae
<jun66j5@gmail.com>".
bookmarks: use "changectx.descendant()" for efficient descendant examination
This patch uses "old.descendant(new)" expression instead of
"new in old.descendants()" for efficiency.
context: add "descendant()" to changectx for efficient descendant examination
This patch adds "descendant()", which uses "revlog.descendant()" for
descendant examination, to changectx.
This implementation is more efficient than "new in old.descendants()"
expression, because:
- "changectx.descendants()" creates temporary "changectx" objects,
but "revlog.descendant()" doesn't
"revlog.descendant()" checks only revision numbers of descendants.
- "revlog.descendant()" stops scanning, when scanning of all
revisions less than one of examination target is finished
this can avoid useless scanning in "not descendant" case.
bookmarks: avoid redundant creation/assignment of "validdests" in "validdest()"
store: add a fallback _pathencode Python function
which does the equivalent of parsers.pathencode, so it can be used as a
default
store: move _plainhybridencode and _dothybridencode higher up in the file
no functional change