- Jun 09, 2017
-
-
Gregory Szorc authored
This seems like a prudent thing to do. As the inline comment says, we may want to make this abort once the functionality is stabilized as part of `hg bundle`. Let's save that debate for another day.
-
Gregory Szorc authored
Previously, a repo containing secret changesets would be served via stream clone, transferring those secret changesets. While secret changesets aren't meant to imply strong security (if you really want to keep them secret, others shouldn't have read access to the repo), we should at least make an effort to protect secret changesets when possible. After this commit, we no longer serve stream clones for repos containing secret changesets by default. This is backwards incompatible behavior. In case anyone is relying on the behavior, we provide a config option to opt into the old behavior. Note that this defense is only beneficial for remote repos accessed via the wire protocol: if a client has access to the files backing a repo, they can get to the raw data and see secret revisions.
-
Yuya Nishihara authored
This bug was introduced in 654e9a1c8a6c. It's okay to escape <>, but is unnecessary for command output.
-
- Apr 23, 2017
-
-
Yuya Nishihara authored
A key must be string per JSON spec, and that's also true for template dicts.
-
- Jun 09, 2017
-
-
Yuya Nishihara authored
I found json() filter doesn't pass formatting options recursively. That's why <> are escaped.
-
Yuya Nishihara authored
-
Gregory Szorc authored
At the time this code was introduced (3a6ddacb7198), the inline comment was true. This changed in e3a928bd1cd4. The proxy is no longer needed.
-
- Jun 07, 2017
-
-
Pierre-Yves David authored
Since we no longer set '_clean = False' during the initialization loop, we can move the attribute assignment earlier in the function for clarity. (no speed improvement expected or measured ;-) )
-
Pierre-Yves David authored
The bmstore '__setitem__' method is setting an extra flag that is not needed during initialization. Skipping the method will allow further cleanup and yield some speedup as a side effect. Before: ! wall 0.009120 comb 0.010000 user 0.010000 sys 0.000000 (best of 312) After: ! wall 0.007874 comb 0.010000 user 0.010000 sys 0.000000 (best of 360)
-
Pierre-Yves David authored
Since we already have an exception context open, for other thing, we can simplify the code a bit and rely on exception handling for invalid lines. Speed is not the main motivation for this changes. However as I'm in the middle of benchmarking things we can see a small positive impact. Before: ! wall 0.009358 comb 0.000000 user 0.000000 sys 0.000000 (best of 303) After: ! wall 0.009173 comb 0.010000 user 0.010000 sys 0.000000 (best of 310)
-
Pierre-Yves David authored
We know the content of the file is supposed to be full hex. So we can do the translation ourselves and directly check if the node is known. As nice side effect we now have proper error handling for invalid node value. Before: ! wall 0.021580 comb 0.020000 user 0.020000 sys 0.000000 (best of 134) After: ! wall 0.009342 comb 0.010000 user 0.010000 sys 0.000000 (best of 302)
-
Pierre-Yves David authored
Skipping the attribute lookup up raise a significant speedup. Example on a repository with about 4000 bookmarks. Before: ! wall 0.026027 comb 0.020000 user 0.020000 sys 0.000000 (best of 112) After: ! wall 0.021580 comb 0.020000 user 0.020000 sys 0.000000 (best of 134) (This is also in its own changeset to clarify the perf win from another coming changesets)
-
Pierre-Yves David authored
A new command dedicated to benchmark of bookmark initialization.
-
- May 23, 2017
-
-
Pierre-Yves David authored
The flag purges all phases data so we'll have to read the file from disk again.
-
- Jun 07, 2017
-
-
Pierre-Yves David authored
There are multiple places where we will want to purge some store cache. So we promote the existing _clearobsstore function to a something reusable.
-
- Jun 09, 2017
-
-
Gregory Szorc authored
This is obviously an instance attribute, not a type attribute. The modern Python style is to use __init__ for defining these. This exposes statichttprepo as inheriting from localrepository without calling its __init__. As a result, its __init__ defines a lot of variables that methods on localrepository's methods need. But factoring the common bits into a separate class is for another day.
-
Gregory Szorc authored
This code has more to do with obsolete.py than localrepo.py. Let's move it there.
-
Martin von Zweigbergk authored
match.match already interprets "!bool(patterns)" as matching everything (but includes and excludes still apply). We might as well allow None, which lets us simplify some callers a bit. I originally wrote this patch while trying to change match.match(patterns=[]) to mean to match no patterns. This patch is one step towards that goal. I'm not sure it'll be worth the effort to go all the way there, but I think this patch still makes sense on its own.
-
- Jun 06, 2017
-
-
Augie Fackler authored
Since we're doing so much clever junk in our setup.py, let's have a test that exercises it. Thanks to Matt Harbison for testing this on Windows and verifying that installenv/*/hg would work as a way to work around bin being called Scripts on Windows.
-
Augie Fackler authored
-
Augie Fackler authored
Since we're filtering out some egg gunk, we need to emulate these flags which disable eggs so that pip still works.
-
Augie Fackler authored
Otherwise users of the patience diff extension will be unable to run anything at all in hg 4.3 until they figure out what's broken.
-
Augie Fackler authored
I intend to fix this, but will do the fix as a separate change to make the behavior change obvious. This was inspired by some users having the patience diff extension, which broke when we moved bdiff.so so thoroughly the users can't even run 'hg debuginstall'.
-
- Jun 08, 2017
-
-
Augie Fackler authored
It makes more sense to put this in core, so other extensions can trivially get access to it without having to rely on importing fsmonitor.
-
- Apr 26, 2017
-
-
Koen Van Hoof authored
For performance reasons we have several repositories where the files in the working directory of 1 repo are hardlinks to the files of the other repo When an update in one repo results in a chmod of a such a file, the hardlink has to be deleted and replaced by a regular file to make sure that the change does not happen in the other repo
-
- Jun 08, 2017
-
-
Siddharth Agarwal authored
-
Siddharth Agarwal authored
There do not appear to be any tests for this, and I've never used either of these options before, but this works.
-
Siddharth Agarwal authored
-
Siddharth Agarwal authored
-
Siddharth Agarwal authored
I'm trying to use run-tests.py on a read-only file system. This series allows that to happen.
-
- Jun 07, 2017
-
-
Siddharth Agarwal authored
The XUnit spec supports skipped tests.
-
Siddharth Agarwal authored
This is closer to what most XUnit consumers can understand.
-
Pierre-Yves David authored
We log the discovery summary, the number of roundtrips and the elapsed time. This is useful to understand where slow push might come from when lloking at the blackbox.
-
Pierre-Yves David authored
Having such date easily available is useful. It also prepare the inclusion of some discovery related data in blackbox.
-
- May 29, 2017
-
-
durin42 authored
In practice this doesn't appear to have been true for some time - we reference Python using the $PYTHON variable in all the tests now (which we have to for PyPy and Python 3), and I've been using ~/.../python.exe to test with tip of the cpython 3.6 release branch while working on manifest tests in Python 3 and everything seems to be just fine. The only real observable difference from this change is that I stop getting a warning about python.exe not being a thing on $PATH, which seems like an improvement.
-
- Jun 05, 2017
-
-
Pierre-Yves David authored
The perf extension needs to be able to reflect this reality too. (eg: 4s vs 60s on a Million-ish revisions repository).
-
- May 29, 2017
-
-
Pierre-Yves David authored
Client has a mechanism for the server to check that nothing changed server side since the client prepared a push. That check is wide and any head changed on the server will lead to an aborted push. We introduce a way for the client to send a less strict checking. That logic will check that no heads impacted by the push have been affected. If other unrelated heads (including named branches heads) have been affected, the push will proceed. This is very helpful for repositories with high developers traffic on different heads, a common setup. That behavior is currently controlled by an experimental option. The config should live in the "server" section but bike-shedding of the name will happen in the next changesets. Servers advertise this capability through a new bundle2 capability 'checkeads', using the value 'related'. The 'test-push-race.t' is updated to check that new capabilities on the documented cases.
-
Pierre-Yves David authored
That information will be useful to detect push race on related part of the history. See next changeset for details.
-
Pierre-Yves David authored
The goal is to have the function directly return something meaningful and useful for the whole pull. Note: we skip adding post-processing in '_oldheadssummary' because if a client is too old for branchmap it will be too old for obsolescence too.
-
Pierre-Yves David authored
Our goal is to be able to perform the post processing directly into the '_headssummary' function. However before this patch the '_headsummary' function only had access to repo, remote, outgoing while the '_postprocessobsolete' function takes a 'pushop' object. Experience shows that having the 'pushop' object helps extensions so we update '_headssummary' to take a pushop object as argument.
-