Martin von Zweigbergk <martinvonz@gmail.com> [Sun, 12 Oct 2014 00:00:13 -0700] rev 23238
context.status: move manifest caching trick to _buildstatus()
In basectx._buildstatus(), we read the manifests for the two revisions
being compared. For "caching reasons" unknown to me, it is better to
read the earlier manifest first, which basectx._prestatus() takes care
of. However, if the 'self' context is a committablectx and the 'other'
context is the parent of the working directory (as in the very common
case of plain "hg status"), there is no need to read any manifests at
all -- all that's needed is the dirstate status. To avoid reading the
manifests, _prestatus() is overridden in committablectx and avoids
calling its super method, and _buildstatus() calls its super method
only if the 'other' context is not the parent of the working
directory.
It seems easier to follow what's happening if we move the pre-fetching
to _buildstatus() just before the place where the manifests are
fetched. We just need to add an extra check that the revision is not
None to handle the case that was previously handled by subclass
overriding. That also makes it safe for committablectx._prestatus() to
call its parent, although the latter now becomes empty, so we won't
bother.
Martin von Zweigbergk <martinvonz@gmail.com> [Sat, 11 Oct 2014 23:18:53 -0700] rev 23237
context.status: remove unused arguments from _matchstatus()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Oct 2014 13:43:20 -0700] rev 23236
context.status: remove overriding in workingctx
The workingctx method simply calls the super method. The only effect
it has is that it uses a different default argument for the 'other'
argument. The only in-tree caller is patch.diff, which always passes
an argument to the method, so it should be safe to remove the
overriding. Having the default argument depend on the type seems
rather dangerous anyway.
Mike Edgar <adgar@google.com> [Mon, 20 Oct 2014 14:20:43 -0400] rev 23235
synthrepo: when adding files, ensure new path is not a directory
Mike Edgar <adgar@google.com> [Mon, 20 Oct 2014 13:59:13 -0400] rev 23234
synthrepo: synthesized dates must be positive, fit in 32-bit signed ints
Mads Kiilerich <madski@unity3d.com> [Thu, 06 Nov 2014 01:48:29 +0100] rev 23233
discovery: test coverage for
issue4438 /
86c35b7ae300 /
73cfaa348650
The randomness in the discovery protocol made this problem hard to reproduce.
The test mocks random.sample to make sure we hit the problem every time. The
set iteration order also made the output unstable ... but with the issue fixed,
it is stable.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 Nov 2014 21:33:45 -0500] rev 23232
hgweb: fix a crash when using web.archivesubrepos
A matcher is required when enabling the subrepo option on archival.archive(),
because that calls match.narrowmatcher(), which accesses fields on the object.
It's therefore probably a bad idea to default the matcher to None on archive(),
but that's a fix for default.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 Nov 2014 20:31:58 -0500] rev 23231
tests: introduce a subrepository to test-archive.t
This will be used in an upcoming patch to add coverage for web.archivesubrepos.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Nov 2014 21:45:26 -0800] rev 23230
test-status-rev: add tests for plain dirstate and inter-revision status
We have tests for the status across from '.^' to the working copy. It
makes sense to have the similar tests for the inter-revision status
between '.^' and '.' and for the dirstate status in the same
place.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Nov 2014 21:22:46 -0800] rev 23229
test-status-rev: remove unnecessary initial commit
The initial commit was there when we had a group of tests that
compared against an empty base, but since those tests no longer exist,
we can drop the empty commit.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Nov 2014 16:10:20 -0800] rev 23228
test-status-rev: use one glob for each expected status
It's getting a little hard to read the ~30 calls to 'hg status' with
one per file. Instead, let's use one glob for each expected
status. For example, modified files can be listed with
'glob:content1_*_content[23]-tracked'. That also nicely becomes an
explanation for why each status is expected.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Nov 2014 15:36:35 -0800] rev 23227
test-status-rev: remove duplicate tests
The second group of tests in test-status-rev compare to an empty
revision. The first group of tests that compare to the first commit
should be testing all the same states with the missing_* files, so
drop the second group of tests.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 Nov 2014 22:48:20 -0800] rev 23226
changegroup: sparsely populate fnodes
Previously, fnodes had a key and empty dict value for every element in
changedfiles. This is somewhat wasteful. Empty dicts in CPython consume
a lot more memory than you would expect - 280 bytes.
On mozilla-central, which has ~190,000 files/fnodes keys, the previous
loop populating fnodes allocated 91,924 KB of memory, most of that for
the empty dicts.
With this patch in place, our peak RSS during mozilla-central clone
drops:
before: 364,356 KB
after: 326,008 KB
delta: -38,348 KB
When combined with the previous patch, total peak RSS decrease is now
190,116 KB.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 Nov 2014 22:33:48 -0800] rev 23225
changegroup: don't store unused value on fnodes (
issue4443)
The contents of fnodes are only accessed once per key. It is wasteful to
cache the value since nobody will use it.
Before this patch, the caching of unused data in fnodes was effectively
causing a memory leak during the file streaming part of bundle creation.
On mozilla-central (which has ~190,000 entries in fnodes), this patch
has a significant impact on RSS at the end of generate():
before: 516,124 KB
after: 364,356 KB
delta: -151,768 KB
The origin of this code can be traced back to
627cd7842e5d and has been
with us since the 2.7 release.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 Nov 2014 20:57:12 -0800] rev 23224
changegroup: don't define lookupmf() until it is needed
lookupmf() is currently defined earlier than when it is needed. Future
patches further refactoring this code will be easier to read when
lookupmf() is in its new home.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 05 Nov 2014 18:31:39 +0000] rev 23223
mail: actually use the verifycert config value
The mail module only verifies the smtp ssl certificate if 'verifycert' is enabled
(the default). The 'verifycert' can take three possible values:
- 'strict'
- 'loose'
- any "False" value, eg: 'false' or '0'
We tested the validity of the third value, but never converted it to actual
falseness, making 'False' an equivalent for 'loose'.
This changeset fixes it.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 28 Oct 2014 14:58:36 +0100] rev 23222
exchange: use the postclose API on transaction
As with changegroup, we should wait for the transaction to be really closed
before scheduling hook execution.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 28 Oct 2014 15:44:23 +0100] rev 23221
changegroup: use the 'postclose' API on transaction
The post-transaction hooks run after the lock release (because hooks may want to
touch the repository), but they must only run if the transaction is successfully
closed.
We use the new 'addpostclose' method on transaction to register a callback
installing this post-lock-release call.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 28 Oct 2014 14:24:43 +0100] rev 23220
transaction: allow registering a post-close callback
The addchangegroup code considers the transaction done after a 'tr.close()' call
and schedules the hook's execution for after lock release. In the nested transaction
case, the transaction is not yet committed and we must delay this scheduling.
We add an 'addpostclose' method (like the 'addpending' and 'addfinalize' ones) that
registers code to be run if the transaction is successfully committed.
Mike Edgar <adgar@google.com> [Fri, 24 Oct 2014 15:58:46 -0400] rev 23219
exchange: swap "push" for "pull" in pulloperation docstring
Mike Edgar <adgar@google.com> [Wed, 29 Oct 2014 12:46:08 -0400] rev 23218
exchange: prepare kwargs for bundle2 part generation exactly once
Mike Edgar <adgar@google.com> [Sat, 25 Oct 2014 00:40:51 -0400] rev 23217
exchange: fix indentation in _pullchangeset
Mike Edgar <adgar@google.com> [Fri, 24 Oct 2014 16:26:44 -0400] rev 23216
dagutil: fix id/ix typos in docstrings
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 06 Nov 2014 11:55:37 +0000] rev 23215
patchbomb: extract 'getpatchmsgs' closure into its own function
Keep marching toward the promised land of simplification!
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 06 Nov 2014 11:57:48 +0000] rev 23214
patchbomb: extract 'makeintro' closure into its own function
Keep marching toward the promised land of simplification!
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 04 Nov 2014 21:48:23 +0000] rev 23213
patchbomb: extract 'getbundlemsgs' closure in its own function
Keep marching toward the promised land of simplification!
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 04 Nov 2014 21:41:35 +0000] rev 23212
patchbomb: extract 'getdescription' closure in its own function
Keep marching toward the promised land of simplification!
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 04 Nov 2014 21:33:57 +0000] rev 23211
patchbomb: extract 'getbundle' closure in its own function
Keep marching toward the promised land of simplification!
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 04 Nov 2014 21:28:57 +0000] rev 23210
patchbomb: extract 'getpatches' closure in its own function
Keep marching toward the promised land of simplification!
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 04 Nov 2014 21:22:59 +0000] rev 23209
patchbomb: extract 'getoutgoing' closure into its own function
The patchbomb command is a gigantic 300 line function full of closures. As a
first step to simplify it in smaller bits, I'm extracting the closures into full
featured functions. The first victim is 'getoutgoing'. It gains a docstring in
the process.