FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 18 Sep 2012 19:46:15 +0900] rev 17628
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>".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 18 Sep 2012 21:39:12 +0900] rev 17627
bookmarks: use "changectx.descendant()" for efficient descendant examination
This patch uses "old.descendant(new)" expression instead of
"new in old.descendants()" for efficiency.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 18 Sep 2012 21:39:12 +0900] rev 17626
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.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 18 Sep 2012 21:39:12 +0900] rev 17625
bookmarks: avoid redundant creation/assignment of "validdests" in "validdest()"
Adrian Buehlmann <adrian@cadifra.com> [Wed, 19 Sep 2012 14:00:23 +0200] rev 17624
store: add a fallback _pathencode Python function
which does the equivalent of parsers.pathencode, so it can be used as a
default
Adrian Buehlmann <adrian@cadifra.com> [Wed, 19 Sep 2012 13:58:51 +0200] rev 17623
store: move _plainhybridencode and _dothybridencode higher up in the file
no functional change
Adrian Buehlmann <adrian@cadifra.com> [Wed, 19 Sep 2012 11:39:18 +0200] rev 17622
test-hybridencode: use store._dothybridencode(s)
and compare it with the result of store._hybridencode(s, True)
Adrian Buehlmann <adrian@cadifra.com> [Wed, 19 Sep 2012 11:39:07 +0200] rev 17621
store: fix _hashencode call in _dothybridencode
Fixes
7840d81a80ec
Thomas Arendsen Hein <thomas@intevation.de> [Wed, 19 Sep 2012 12:29:12 +0200] rev 17620
check-code: catch yield inside try/finally (with tests)
This is not allowed in Python 2.4.
Bryan O'Sullivan <bryano@fb.com> [Tue, 18 Sep 2012 16:30:21 -0700] rev 17619
Merge with mpm
Bryan O'Sullivan <bryano@fb.com> [Tue, 18 Sep 2012 16:25:20 -0700] rev 17618
store: use native fncache encoding function if available
This currently falls back to Python for hashed encoding.
Bryan O'Sullivan <bryano@fb.com> [Tue, 18 Sep 2012 16:09:02 -0700] rev 17617
tests: run test-hybridencode.py over both Python and C encoders
This ensures that the two always give the same answers.
Bryan O'Sullivan <bryano@fb.com> [Tue, 18 Sep 2012 15:42:19 -0700] rev 17616
store: implement fncache basic path encoding in C
(This is not yet enabled; it will be turned on in a followup patch.)
The path encoding performed by fncache is complex and (perhaps
surprisingly) slow enough to negatively affect the overall performance
of Mercurial.
For a short path (< 120 bytes), the Python code can be reduced to a fairly
tractable state machine that either determines that nothing needs to be
done in a single pass, or performs the encoding in a second pass.
For longer paths, we avoid the more complicated hashed encoding scheme
for now, and fall back to Python.
Raw performance: I measured in a repo containing 150,000 files in its tip
manifest, with a median path name length of 57 bytes, and 95th percentile
of 96 bytes.
In this repo, the Python code takes 3.1 seconds to encode all path
names, while the hybrid C-and-Python code (called from Python) takes
0.21 seconds, for a speedup of about 14.
Across several other large repositories, I've measured the speedup from
the C code at between 26x and 40x.
For path names above 120 bytes where we must fall back to Python for
hashed encoding, the speedup is about 1.7x. Thus absolute performance
will depend strongly on the characteristics of a particular repository.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 18 Sep 2012 23:32:42 +0200] rev 17615
rebase: ensure rebase does not revive extinct revision
Here, we exclude hidden changesets from a rebase operation. If we
don't, a rewritten version of the hidden changesets will be created
by rebase. Those rewritten versions won't be hidden and will likely
conflict with other rewriting or revive pruned changeset. Moreover,
rewriting hidden revisions will surprise the user.
This change would not be necessary if changelog filtering were
already in core. But it's fairly cheap and helps to increase the
test-suite for such filtering.
Once changelog level filtering is added, hidden changes will be
automatically excluded or included according to the global --hidden
flags. Plain ignoring them is good enough for now.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 18 Sep 2012 23:29:05 +0200] rev 17614
rebase: remove useless list around repo.revs
As repo.revs already returns a list.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 18 Sep 2012 23:42:27 +0200] rev 17613
rebase: properly handle --collapse when creating obsolescence marker
In collapse mode, that content of state is not suitable to compute obsolescence
markers. We explicitly pass the resulting revision instead and use it as the
successors for all elements of the rebased set.