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
test-hybridencode: use store._dothybridencode(s)
and compare it with the result of store._hybridencode(s, True)
store: fix _hashencode call in _dothybridencode
Fixes
7840d81a80ec
check-code: catch yield inside try/finally (with tests)
This is not allowed in Python 2.4.