- Nov 06, 2014
-
-
Mateusz Kwapich authored
The current heuristic for deciding between storing delta and full texts is based on ratio of (sizeofdeltas)/(sizeoffulltext). In some cases (for example a manifest for ahuge repo) this approach can result in extremely long delta chains (~30,000) which are very slow to read. (In the case of a manifest ~500ms are added to every hg command because of that). This commit introduces "revlog.maxchainlength" configuration variable that will limit delta chain length.
-
Mateusz Kwapich authored
The chain length was computed correctly only when generaldelta feature was enabled. Now it's fixed. When generaldelta is disabled the base revision in revlog index is not the revision we have delta against - it's always previous revision. Instead of incorrect chainbaseandlen in command.py we are now using two single-responsibility functions in revlog.py: - chainbase(rev) - chainlen(rev) Only chainlen(rev) was missing so it was written to mimic the way the chain of deltas is actually found during file reconstruction.
-
- Nov 05, 2014
-
-
Pierre-Yves David authored
The addition is done in two different places but differs slightly. We factorise this addition to ensure it is consistent in all places.
-
Pierre-Yves David authored
-
Pierre-Yves David authored
The `startgroup` and `endgroup` methods are used in a very specific context to wrap a very specific operation (revlog truncation). It does not make sense to perform any other operations during such a "group" (eg:file backup). There is currently no user of backupfile during a "group" so we drop the group-specific code and restrict authorized operations during "group".
-
Pierre-Yves David authored
These enigmatic methods are only used in repair. We document them to clarify there purpose and user.
-
Pierre-Yves David authored
As the transaction is gaining more functions and attributes, it is important to clarify what is part of the public API.
-
Pierre-Yves David authored
Now that all items are known we can document it.
-
Pierre-Yves David authored
This third item is always None and never used.
-
- Nov 10, 2014
-
-
Matt Mackall authored
-
- Nov 08, 2014
-
-
Siddharth Agarwal authored
This lets extensions insert themselves in the class hierarchy.
-
- Oct 24, 2014
-
-
Martin von Zweigbergk authored
We don't care about filtering out symlinks that have already been committed with full content, only those that have been accidentally resolved in the working directory.
-
- Oct 23, 2014
-
-
Martin von Zweigbergk authored
By inlining _poststatus() into _buildstatus(), it becomes clearer that it is only called for the workingctx.
-
- Oct 12, 2014
-
-
Martin von Zweigbergk authored
-
Martin von Zweigbergk authored
By making the call to _dirstatestatus() within _buildstatus(), it becomes clearer that it's called only for the workingctx.
-
Martin von Zweigbergk authored
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 authored
-
- Oct 23, 2014
-
-
Martin von Zweigbergk authored
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.
-
- Oct 20, 2014
-
-
Mike Edgar authored
-
Mike Edgar authored
-
- Nov 06, 2014
-
-
Mads Kiilerich authored
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 authored
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 authored
This will be used in an upcoming patch to add coverage for web.archivesubrepos.
-
- Nov 05, 2014
-
-
Martin von Zweigbergk authored
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 authored
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 authored
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.
-
- Nov 04, 2014
-
-
Martin von Zweigbergk authored
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.
-
- Nov 07, 2014
-
-
Gregory Szorc authored
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 authored
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 authored
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.
-
- Nov 05, 2014
-
-
Pierre-Yves David authored
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.
-
- Oct 28, 2014
-
-
Pierre-Yves David authored
As with changegroup, we should wait for the transaction to be really closed before scheduling hook execution.
-
Pierre-Yves David authored
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 authored
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.
-
- Oct 24, 2014
-
-
Mike Edgar authored
-
- Oct 29, 2014
-
-
Mike Edgar authored
-
- Oct 25, 2014
-
-
Mike Edgar authored
-
- Oct 24, 2014
-
-
Mike Edgar authored
-
- Nov 06, 2014
-
-
Pierre-Yves David authored
Keep marching toward the promised land of simplification!
-
Pierre-Yves David authored
Keep marching toward the promised land of simplification!
-