- Feb 28, 2018
-
-
Martin von Zweigbergk authored
The existing code that picked one or the other seemed very suspicious. This patch makes us intersect the local matcher with the matcher from the remote, which seems better. It fixes one test case and makes another one that used to crash no longer crash, but instead silently succeed with a push that's lossy, so that remains to be fixed. The real reason for doing this now is that I'm going to move narrowrepo.narrowmatch() onto localrepo and then it will always be defined, which would otherwise break this code. Differential Revision: https://phab.mercurial-scm.org/D2490
-
Martin von Zweigbergk authored
We want to move narrowmatch() and others into core, so we need to get rid of the dependence on the "narrow_opts" from the closure in narrowrepo.wraprepo(). We can simply check if the narrow requirement is set. I think that seems like an improvement regardless of moving narrowmatch(). Differential Revision: https://phab.mercurial-scm.org/D2489
-
Martin von Zweigbergk authored
Also document why we need cg3 or higher. Differential Revision: https://phab.mercurial-scm.org/D2488
-
Martin von Zweigbergk authored
My short-term goal is to move narrowrepo.narrowmatch() onto localrepo and this is a necessary step for that. I put the constant in changegroup.py, unlike REVLOGV2_REQUIREMENT, which is in localrepo.py, since we'll need to access it from the changegroup module eventually. Differential Revision: https://phab.mercurial-scm.org/D2487
-
- Feb 21, 2018
-
-
Pulkit Goyal authored
The remotenames class was moved from hgremotenames extension. The class in hgremotenames extension used to extend dict because updating bookmark was done through a dict-like interface or Sean (smf) wanted it to be that way. But now, we can remove the inheritance from the dict class as updating bookmark is not done using a dict-like interface. Thanks to Martin von Zweigbergk for spotting this. Differential Revision: https://phab.mercurial-scm.org/D2361
-
- Feb 25, 2018
-
-
Matt Harbison authored
Spawning a process on Windows is expensive. I've got a version of test-lfs-test-server.t locally which prints the http request/responses that totals 819 lines, with 149 conditional lines, 11 #if tests, and 2 test cases. It takes just under 1 minute with this change to run both cases, vs just over 2 minutes without this change. Worse, when I explored adding ui.debug to the test, it takes 13 minutes due to all of the mismatches and retests, vs less than 1 minute with this change. Overall, the difference when running all tests is negligible- 103 minutes with this change, vs 105 without when using -j9. It also looks like an exit value of 2 from `hghave` is treated specially, but there's nothing preventing 2 missing features from also using this value.
-
- Feb 27, 2018
-
-
Matt Harbison authored
Prior to 93228b2a1fc0, this exception was raised before the diff could be printed. By raising the exception after printing the diff, the location of the failure can be identified, but it is also easier to locate test runs where this occurs. The test bot maintains a list of failed tests, separate from the wall of diff output.
-
Pulkit Goyal authored
print was made a function in Python 3. Differential Revision: https://phab.mercurial-scm.org/D2480
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D2479
-
Pulkit Goyal authored
We are now close to getting this test pass on Python 3. # skip-blame because just b'' prefixes. Differential Revision: https://phab.mercurial-scm.org/D2478
-
Pulkit Goyal authored
os.devnull returns str on Python 3. Differential Revision: https://phab.mercurial-scm.org/D2477
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D2476
-
Pulkit Goyal authored
# skip-blame because we are adding just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D2475
-
- Feb 26, 2018
-
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D2474
-
Gregory Szorc authored
Bookmarks are internally stored as an unsorted dictionary. Let's at least write out the bookmarks file in a deterministic order so it is easier to test, diff, etc. Differential Revision: https://phab.mercurial-scm.org/D2469
-
Gregory Szorc authored
self.phaseroots is a list of sets of binary nodes. Let's sort the nodes before writing so the phaseroots file is written out deterministically. Differential Revision: https://phab.mercurial-scm.org/D2468
-
- Feb 17, 2018
-
-
Gregory Szorc authored
It seems like a good idea to have thorough documentation of the bundle2 data format, including the format of each part and the capabilities. The added documentation is far from complete. For example, we don't fully capture the semantics of each capability and part. But a start is better than nothing, which was pretty much where we were before. Differential Revision: https://phab.mercurial-scm.org/D2298
-
- Feb 26, 2018
-
-
Pulkit Goyal authored
using encoding.strfromlocal because sender is provided from user config or argument. Differential Revision: https://phab.mercurial-scm.org/D2460
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D2459
-
Pulkit Goyal authored
On py2: >>> import email >>> import email.utils as eutil >>> email.Utils.parseaddr is eutil.parseaddr True >>> email.Utils.formatdate is eutil.formatdate True email.Utils is not present on Python 3. Differential Revision: https://phab.mercurial-scm.org/D2453
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D2457
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D2455
-
- Feb 25, 2018
-
-
Yuya Nishihara authored
The current templatekw interface, f(repo, ctx, templ, **args), is horrible because it's quite easy to encounter TypeError, ValueError, etc. It's also bad for Python 3 porting due to the **kwargs issue. This patch introduces a flag to switch to new f(context, mapping) API seen in templater functions. The requirement spec isn't verified (yet) because context.resource() can gracefully raise a ResourceUnavailable exception, but it's planned to be used as a filter in the help, such as "Revision Keywords" (if 'ctx' in requires), "File Keywords" (if 'fctx' in requires), etc. showauthor() is ported to the new API as an example. 20 more follows.
-
Yuya Nishihara authored
See the next patch how it will be used.
-
Yuya Nishihara authored
I'm going to add one more exception type.
-
Yuya Nishihara authored
These keywords can be evaluated without a repo.
-
Yuya Nishihara authored
-
Yuya Nishihara authored
Also removed the second "List of" phrase, which is obvious from the type "List of strings."
-
Yuya Nishihara authored
":<name>:" is automatically added by the registrar.
-
- Feb 26, 2018
-
-
Matt Harbison authored
There are sporadic instances of this on Windows. They seem to happen more frequently after the test machine is rebooted, although the only way to hit it on my laptop is to loop certain tests with -j9 for hours. The problem with masking out the specific failure is that there's no way to know if it's the same line in the test that's failing, or if it is random. The justification for adding this masking in 52e9e63f1495 was that the failures occur regularly, but that's not the case anymore. The port number is still printed, in case that turns out to be useful.
-
Pulkit Goyal authored
Internally we use bytes everywhere, and str on Python 3 is unicodes, so we need to make sure we are doing the right check. Differential Revision: https://phab.mercurial-scm.org/D2458
-
Pulkit Goyal authored
map returns a map object on Python 3 and here we wanted a list instead. Differential Revision: https://phab.mercurial-scm.org/D2456
-
Pulkit Goyal authored
On py2: >>> import email >>> import email.generator as emailgen >>> email.Generator.Generator is emailgen.Generator True email.Generator is not present on Python 3. Differential Revision: https://phab.mercurial-scm.org/D2454
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D2452
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D2451
-
Augie Fackler authored
Fortunately, the exception exists on Python 2 so we don't have to do something weirder than this. Differential Revision: https://phab.mercurial-scm.org/D2450
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D2449
-
Augie Fackler authored
On Python 3 it seems urllib.error.HTTPError doesn't set the .args field of the exception to have any contents, which then breaks our socket.error catch. This works around that issue. Differential Revision: https://phab.mercurial-scm.org/D2448
-
Augie Fackler authored
If we don't do this, the bytes gets repr()ed on Python 3 and we get bogus error strings sent to clients. Ick. Differential Revision: https://phab.mercurial-scm.org/D2447
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D2446
-