- Apr 01, 2018
-
-
Martin von Zweigbergk authored
revsingle() returns a context object, revpair() returns nodeids, revrange() returns integer revisions (in a revset). I'm going to reduce this inconsistency by making revpair() return context objects. Changing the return type is not nice to extensions, so this patch introduces a nodeid-returning version of revpair() that they can detect and use. Update callers to the new function so we can change revpair() itself and then migrate them back one by one. Differential Revision: https://phab.mercurial-scm.org/D3005
-
Matt Harbison authored
Since the dispatching code only checks the beginning of the string, this enforces that there's only one more path component.
-
Matt Harbison authored
-
- Mar 31, 2018
-
-
Matt Harbison authored
The use case here is the server admin may want to store the blobs elsewhere. As it stands now, the `lfs.url` config on the client side is all that enforces this (the web.allow-* permissions aren't able to block LFS blobs without also blocking normal hg traffic). The real solution to this is to implement the 'verify' action on the client and server, but that's not a near term goal. Whether this is useful in its own right, and should be promoted out of experimental at some point is TBD. Since the other two tests that deal with LFS and `hg serve` are already complex and have #testcases, this seems like a good time to start a new test dedicated to access checks against the server. Instead of conditionally wrapping the wire protocol handler, I put this in the handler because I'd still like to bring the annotations in from the evolve extension in order to set up the wrapping. The 400 status probably isn't great, but that's what it would be for existing `hg serve` instances without support for serving blobs.
-
Connor Sheehan authored
In development the data type used to hold an email/name pair was called a "mailmaptup" since it was implemented as a namedtuple. The implementation has since been changed to use an @attr.s decorated class named mailmapping. This commit changes a comment to reflect this change. Differential Revision: https://phab.mercurial-scm.org/D3004
-
Connor Sheehan authored
The existing check for a bad mailmap file entry fails with inputs like b'>@<'. This commit adds a function to check if a sufficient amount of information has been parsed from a mailmap file entry. At minimum, one email must be found (assumed to be the commit email). If email is not empty and no names are found, then there must be two emails. If there are at least one email and name, the mapping is valid. Differential Revision: https://phab.mercurial-scm.org/D3003
-
Connor Sheehan authored
email and name variables are renamed to emails and names (respectively). This is because the email variable name shadows the email function within the stringutil module. Since we are renaming email, we also rename name for consistency. Differential Revision: https://phab.mercurial-scm.org/D3002
-
Connor Sheehan authored
Differential Revision: https://phab.mercurial-scm.org/D3001
-
- Feb 25, 2018
-
- Feb 26, 2018
-
-
Matt Harbison authored
Two things here. First, the previous message included a snippet of JSON, which tends to be long (and in the case of lfs-test-server, has no error message). Instead, give a concise message where possible, and leave the JSON to a debug output. Second, the server can signal issues other than a missing individual file. This change shows a corrupt file, but I'm debating letting the corrupt file get downloaded, because 1) the error code doesn't really fit, and 2) having it locally makes forensics easier. Maybe need a config knob for that.
-
- Mar 31, 2018
-
-
Matt Harbison authored
Otherwise, this was flagging `... lfs.serve=False -R server ...` in the tests.
-
Pulkit Goyal authored
This patch adds test for `hg pull -r <rev>` when the infinitepush extension is not present on the client side and the server by defaults pushes all the incoming push to bundlestore. As the tests show, if a the changeset was applied to the server, that can be pulled, but if a changeset is in the bundlestore we cannot pull that yet. We should support that. Differential Revision: https://phab.mercurial-scm.org/D2998
-
Pulkit Goyal authored
Previous patches added a soutce attribute to bundle2.bundleoperation class which stores the command which leads to current bundleoperation. Let's use that to decide whether a processing a `hg unbundle` or not instead of hacking on transaction. Differential Revision: https://phab.mercurial-scm.org/D2997
-
Pulkit Goyal authored
Currently all the callers in the core pass the source argument, making it mandatory will help us storing right source value in bundleoperation() class. Differential Revision: https://phab.mercurial-scm.org/D2996
-
Pulkit Goyal authored
We now have a source attribute to the bundle2.bundleoperation class which stores the operation which leads to the current bundling/unbundling. Let's make sure we pass source argument from all the users of the command. Differential Revision: https://phab.mercurial-scm.org/D2995
-
Pulkit Goyal authored
This will help us to pass the source variable to bundleoperation class. Differential Revision: https://phab.mercurial-scm.org/D2994
-
Pulkit Goyal authored
This will help us in easily finding out which command leads to the current operation without hacking on the transaction. Differential Revision: https://phab.mercurial-scm.org/D2993
-
Pulkit Goyal authored
Facebook internally enforces this but looks like we can't force this for pur users. Differential Revision: https://phab.mercurial-scm.org/D2992
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D2991
-
Pulkit Goyal authored
The remotenames.hoist config option was renamed to remotenames.hoistedpeer while moving to core as an extension. Let's start using the config option provided by the in-core extension. Differential Revision: https://phab.mercurial-scm.org/D2990
-
- Mar 18, 2018
-
-
Yuya Nishihara authored
Now all built-in template filters declare input data types or handle type errors by themselves. .. api:: Template filters should declare input data type and/or catch AttributeError, ValueError, TypeError, etc. as needed. See the doc of ``registrar.templatefilters`` for details.
-
Yuya Nishihara authored
This shouldn't happen for any template data types (though I know it does because of some templater bugs.) Let's clarify it is a bug.
-
Yuya Nishihara authored
Prepares for removing the weird exception catcher from runfilter().
-
Yuya Nishihara authored
Dropped redundant dateutil.parsedate(), which is now handled by the templater.
-
Yuya Nishihara authored
I'm not sure if the templateutil.date type can be a thing. Currently it's just a constant.
-
- Mar 20, 2018
-
-
Yuya Nishihara authored
Tests will be added by the next patch.
-
- Mar 18, 2018
-
-
Yuya Nishihara authored
This means date("today") is allowed. Also fixes evaldate() to forcibly use the custom error message if specified.
-
Yuya Nishihara authored
-
Yuya Nishihara authored
Some test outputs changed since input is now coerced to a byte string. I think that's okay. Maybe {date} should have some readable representation?
-
Yuya Nishihara authored
Currently filters take an unwrapped value, which should have no hybrid magic but actually it does because stringify() relies on it. The 'intype' allows us to pre-process the magic by .e.g. evalstring() keeping filter functions as simple as they are now. stringify() is ported as an example. More follow.
-
- Mar 19, 2018
-
-
Yuya Nishihara authored
Prepares for adding 'intype' attribute.
-
- Mar 25, 2018
-
-
Yuya Nishihara authored
The new behavior seems slightly nicer as we can at least read the output. And this is similar to what the sshserver is doing, so we can probably reuse protectstdio() instead of the weird hook.redirect(True) hack.
-
Yuya Nishihara authored
I'll change uout to be redirected to stderr.
-
- Mar 31, 2018
-
-
Martin von Zweigbergk authored
I don't see a reason to support type long. It's pretty much the same type as int. There was some discussion about it on the mailing list around the time of ff2f90503d64 (context: work around `long` not existing on Python 3, 2017-03-11), but I couldn't find a good reason to keep it. There was some mention of hgtk doing "repo[long(rev)]", but that was in 2012. Differential Revision: https://phab.mercurial-scm.org/D2989
-
Matt Harbison authored
-
Matt Harbison authored
Suggested by Yuya after 77f9e95fe3c4, this is mostly using named values for stdio descriptors. The lockfile is also opened in binary mode when reading back content from the child.
-
Matt Harbison authored
-
- Mar 28, 2018
-
-
Gregory Szorc authored
And format the imports so it is cleaner. Differential Revision: https://phab.mercurial-scm.org/D2978
-
- Mar 31, 2018
-
-
Yuya Nishihara authored
-
- Mar 28, 2018
-
-
Matt Harbison authored
There's a recurring problem on Windows where `hg serve -d` will randomly fail to spawn a detached process. The reason for the failure is completely hidden, and it takes hours to get a single failure on my laptop. All this does is redirect stdout/stderr of the child to a file until the lock file is freed, and then the parent dumps it out if it fails to spawn. I chose to put the output into the lock file because that is always cleaned up. There's no way to report errors after that anyway. On Windows, killdaemons.py is roughly `kill -9`, so this ensures that junk won't pile up. This may end up being a case of EADDRINUSE. At least that's what I saw spit out a few times (among other odd errors and missing output on Windows). But I also managed to get the same thing on Fedora 26 by running test-hgwebdir.t with --loop -j10 for several hours. Running `netstat` immediately after killing that run printed a wall of sockets in the TIME_WAIT state, which were gone a couple seconds later. I couldn't match up ports that failed, because --loop doesn't print out the message about the port that was used. So maybe the fix is to rotate the use of HGPORT[12] in the tests. But, let's collect some more data first.
-