Wed, 31 Jan 2018 10:55:15 +0100 streambundlev2: add a new test-file
Boris Feld <boris.feld@octobus.net> [Wed, 31 Jan 2018 10:55:15 +0100] rev 37166
streambundlev2: add a new test-file Add the new test file in a separate changeset before supporting the new format so we better see the differences. Differential Revision: https://phab.mercurial-scm.org/D1953
Fri, 30 Mar 2018 12:43:57 +0200 bundlespec: move computing the bundle contentops in parsebundlespec
Boris Feld <boris.feld@octobus.net> [Fri, 30 Mar 2018 12:43:57 +0200] rev 37165
bundlespec: move computing the bundle contentops in parsebundlespec We will introduce a new bundlespec for stream bundle which will influence the contentops. Differential Revision: https://phab.mercurial-scm.org/D1952
Fri, 30 Mar 2018 12:43:08 +0200 bundlespec: introduce an attr-based class for bundlespec
Boris Feld <boris.feld@octobus.net> [Fri, 30 Mar 2018 12:43:08 +0200] rev 37164
bundlespec: introduce an attr-based class for bundlespec We will add support of contentops in the next patch, introduce a class instead of returning a 4-items tuple. Differential Revision: https://phab.mercurial-scm.org/D2971
Fri, 23 Mar 2018 20:43:55 +0900 templater: factor out unwrapastype() from evalastype()
Yuya Nishihara <yuya@tcha.org> [Fri, 23 Mar 2018 20:43:55 +0900] rev 37163
templater: factor out unwrapastype() from evalastype() So ParseError of unwrapastype() can be caught reliably.
Fri, 23 Mar 2018 20:34:12 +0900 templater: extract unwrapinteger() function from evalinteger()
Yuya Nishihara <yuya@tcha.org> [Fri, 23 Mar 2018 20:34:12 +0900] rev 37162
templater: extract unwrapinteger() function from evalinteger()
Fri, 23 Mar 2018 21:03:21 +0900 templater: extract type conversion from evalfuncarg()
Yuya Nishihara <yuya@tcha.org> [Fri, 23 Mar 2018 21:03:21 +0900] rev 37161
templater: extract type conversion from evalfuncarg() Needed by the subsequent patches.
Fri, 23 Mar 2018 20:23:55 +0900 templater: drop bool support from evalastype()
Yuya Nishihara <yuya@tcha.org> [Fri, 23 Mar 2018 20:23:55 +0900] rev 37160
templater: drop bool support from evalastype() Future patches will split evalastype() into two functions, evalrawexp() and unwrapastype(), so we can catch the exception of type conversion. # evaluating function may bubble up inner ParseError thing = evalrawexp(context, mapping, arg) try: return unwrapastype(context, thing) except ParseError: # add hint and reraise However, evalboolean() can't be factored out in this way since it has to process boolean-like symbols as non keyword. Fortunately, it's unlikely that we'll need a general type converter supporting bool, so this patch drops it from the table.
Sat, 17 Mar 2018 20:13:06 +0900 templater: do not use stringify() to concatenate flattened template output
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Mar 2018 20:13:06 +0900] rev 37159
templater: do not use stringify() to concatenate flattened template output
Sat, 17 Mar 2018 20:04:20 +0900 templateutil: reimplement stringify() using flatten()
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Mar 2018 20:04:20 +0900] rev 37158
templateutil: reimplement stringify() using flatten()
Sat, 17 Mar 2018 20:00:54 +0900 templateutil: move flatten() from templater
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Mar 2018 20:00:54 +0900] rev 37157
templateutil: move flatten() from templater It's the same kind of utility as stringify().
Sun, 01 Apr 2018 01:27:18 -0400 server: ensure the incoming request falls under the prefix value stable 4.5.3
Matt Harbison <matt_harbison@yahoo.com> [Sun, 01 Apr 2018 01:27:18 -0400] rev 37156
server: ensure the incoming request falls under the prefix value Prior to this, the first test asserted in wsgiref.validate.check_environ() saying PATH didn't start with '/', but the second test served up the repo. The assertion was just added in this cycle (though the value of PATH is still wrong without the assertion). Allowing access to the repo at any URL outside of the prefix is a long standing bug. This also affected hgwebdir, at least when used via --subrepo. Paths are not being canonicalized, so accesses to things like 'foo/../bar' will get tossed out here, unless the prefix also matches.
Tue, 27 Mar 2018 11:01:13 -0400 stringutil: move person function from templatefilters
Connor Sheehan <sheehan@mozilla.com> [Tue, 27 Mar 2018 11:01:13 -0400] rev 37155
stringutil: move person function from templatefilters Move the person function from template filters to the stringutil module, so it can be reused in the mailmap template function. Differential Revision: https://phab.mercurial-scm.org/D2960
Thu, 22 Mar 2018 09:48:22 -0400 stringutil: add isauthorwellformed function
Connor Sheehan <sheehan@mozilla.com> [Thu, 22 Mar 2018 09:48:22 -0400] rev 37154
stringutil: add isauthorwellformed function The regular expression for this function formerly lived at https://hg.mozilla.org/hgcustom/version-control-tools/file/tip/hghooks/mozhghooks/author_format.py#l13 Differential Revision: https://phab.mercurial-scm.org/D2959
Sat, 17 Mar 2018 02:37:46 -0400 test-lfs-test-server: add a testcase for `hg serve`
Matt Harbison <matt_harbison@yahoo.com> [Sat, 17 Mar 2018 02:37:46 -0400] rev 37153
test-lfs-test-server: add a testcase for `hg serve` I haven't figured out yet how to make the authentication checks work for a specific list of users, so the 'web.allow-push' list is wildcarded. (It appears that the client doesn't react to a 401 by sending authentication data, which may be caused in part by not having all of the headers in httpbasicauthhandler's http_error_auth_reqed(), compared to a run of test-http.t. But in any case, we should probably have a separate set of tests for various authentication scenarios. As it is, without the wildcard, no push access is granted.) There are several deviations from the `lfs-test-server` case: - `hg serve` emits a Server header. I think Gregory indicated that this isn't easily suppressed. - `hg serve` names the "basic" transfer handler in the Batch API response. Not having to specify it was for backwards compatability, so this seems like the right thing to do. (`lfs-test-server` doesn't name it, whether it was explicitly requested by the client or not.) - PUT status for a newly created file is 201, per RFC-2616 [1]. The Basic Transfer API [2] shows an example upload transcript with a 200 response. It doesn't make much sense to re-upload a file (unless it is corrupt) in an example, but I wouldn't be surprised if some other implementations also expect 200 because of this. But the RFC says MUST use 201 for creation. - The Content-Type for the file transfers is "application/octet-stream", like the sample transcript (though I don't see it explicitly called out in the text elsewhere). Using "text/plain" seems clearly wrong. - `lfs-test-server` isn't removing the action property and sending back an error code like the spec calls out when a file is missing or corrupt. Doing so on the `hg serve` side reveals a bug in our client code when handling the response- it indicates the remote file is missing instead of corrupt around line 452. I'll probably glob over the Content-Length differences once this settles down. Prior to the recent hgweb refactoring, the Batch API response was using chunked encodings instead. Back to the RFC, I have no idea if the python framework handles the "MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not understand or implement and MUST return a 501" for a PUT request. [1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.6 [2] https://github.com/git-lfs/git-lfs/blob/master/docs/api/basic-transfers.md#uploads
Thu, 29 Mar 2018 09:23:39 -0700 push: use "repo['.']" instead of old form "repo['']"
Martin von Zweigbergk <martinvonz@google.com> [Thu, 29 Mar 2018 09:23:39 -0700] rev 37152
push: use "repo['.']" instead of old form "repo['']" Note that this does not conflict with the commit message of my previous patch: I found this after writing the previous patch (besides, I very easily forget things). Differential Revision: https://phab.mercurial-scm.org/D2965
Thu, 29 Mar 2018 09:34:17 -0700 context: change default changeid from old form '' to '.'
Martin von Zweigbergk <martinvonz@google.com> [Thu, 29 Mar 2018 09:34:17 -0700] rev 37151
context: change default changeid from old form '' to '.' I don't think I've seen repo[''] in the codebase at least in the last two years. Differential Revision: https://phab.mercurial-scm.org/D2964
Wed, 21 Mar 2018 23:36:11 +0530 remove: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com> [Wed, 21 Mar 2018 23:36:11 +0530] rev 37150
remove: add dry-run functionality
Sat, 17 Mar 2018 01:53:44 -0400 lfs: add support for serving blob files
Matt Harbison <matt_harbison@yahoo.com> [Sat, 17 Mar 2018 01:53:44 -0400] rev 37149
lfs: add support for serving blob files
Sat, 17 Mar 2018 01:47:57 -0400 lfs: add server side support for the Batch API
Matt Harbison <matt_harbison@yahoo.com> [Sat, 17 Mar 2018 01:47:57 -0400] rev 37148
lfs: add server side support for the Batch API
Sat, 17 Mar 2018 01:23:01 -0400 lfs: add basic routing for the server side wire protocol processing
Matt Harbison <matt_harbison@yahoo.com> [Sat, 17 Mar 2018 01:23:01 -0400] rev 37147
lfs: add basic routing for the server side wire protocol processing The recent hgweb refactoring yielded a clean point to wrap a function that could handle this, so I moved the routing for this out of the core. While not an hg wire protocol, this seems logically close enough. For now, these handlers do nothing other than check permissions. The protocol requires support for PUT requests, so that has been added to the core, and funnels into the same handler as GET and POST. The permission checking code was assuming that anything not checking 'pull' or None ops should be using POST. But that breaks the upload check if it checks 'push'. So I invented a new 'upload' permission, and used it to avoid the mandate to POST. A function wrap point could be added, but security code should probably stay grouped together. Given that anything not 'pull' or None was requiring POST, the comment on hgweb.common.permhooks is probably wrong- there is no 'read'. The rationale for the URIs is that the spec for the Batch API[1] defines the URL as the LFS server url + '/objects/batch'. The default git URLs are: Git remote: https://git-server.com/foo/bar LFS server: https://git-server.com/foo/bar.git/info/lfs Batch API: https://git-server.com/foo/bar.git/info/lfs/objects/batch '.git/' seems like it's not something a user would normally track. If we adhere to how git defines the URLs, then the hg-git extension should be able to talk to a git based server without any additional work. The URI for the transfer requests starts with '.hg/' to ensure that there are no conflicts with tracked files. Since these are handed out by the Batch API, we can change this at any point in the future. (Specifically, it might be a good idea to use something under the proposed /api/ namespace.) In any case, no files are stored at these locations in the repository directory. I started a new module for this because it seems like a good idea to keep all of the security sensitive server side code together. There's also an issue with `hg verify` in that it will want to download *all* blobs in order to run. Sadly, there's no way in the protocol to ask the server to verify the content of a blob it may have. (The verify action is for storing files on a 3rd party server, and then informing the LFS server when that completes.) So we may end up implementing a custom transfer adapter that simply indicates if the blobs are valid, and fall back to basic transfers for non-hg servers. In other words, this code is likely to get bigger before this is made non-experimental. [1] https://github.com/git-lfs/git-lfs/blob/master/docs/api/batch.md
Wed, 14 Mar 2018 23:34:08 -0400 test-lfs: drop trailing ', ' item separators from debug JSON output
Matt Harbison <matt_harbison@yahoo.com> [Wed, 14 Mar 2018 23:34:08 -0400] rev 37146
test-lfs: drop trailing ', ' item separators from debug JSON output The trailing space looks weird when conditionalizing the line. The commas shouldn't be necessary because of the indenting. The `lfs-test-server` isn't sending all of the same items (notably, the "transfer" attribute is missing), so having the commas means more lines need to be conditionalized.
Thu, 22 Feb 2018 23:33:52 -0500 lfs: add a blob verification method to the local store
Matt Harbison <matt_harbison@yahoo.com> [Thu, 22 Feb 2018 23:33:52 -0500] rev 37145
lfs: add a blob verification method to the local store A corrupt blob can be signaled through the Batch API response, without actually transferring the file. A true/false indicator is slightly easier than immediately catching an exception.
Wed, 28 Mar 2018 22:38:01 -0400 tests: conditionalize printed environment variable output in test-alias
Matt Harbison <matt_harbison@yahoo.com> [Wed, 28 Mar 2018 22:38:01 -0400] rev 37144
tests: conditionalize printed environment variable output in test-alias
Wed, 28 Mar 2018 15:31:18 -0700 debugsetparents: avoid using "r1/r2" variable names for nodeids
Martin von Zweigbergk <martinvonz@google.com> [Wed, 28 Mar 2018 15:31:18 -0700] rev 37143
debugsetparents: avoid using "r1/r2" variable names for nodeids Differential Revision: https://phab.mercurial-scm.org/D2963
Wed, 28 Mar 2018 15:29:49 -0700 tag: avoid using "r" variable name for nodeid
Martin von Zweigbergk <martinvonz@google.com> [Wed, 28 Mar 2018 15:29:49 -0700] rev 37142
tag: avoid using "r" variable name for nodeid Differential Revision: https://phab.mercurial-scm.org/D2962
Wed, 28 Mar 2018 15:30:09 -0700 locate: avoid using "rev" variable name for nodeid
Martin von Zweigbergk <martinvonz@google.com> [Wed, 28 Mar 2018 15:30:09 -0700] rev 37141
locate: avoid using "rev" variable name for nodeid Also, drop silly "ctx = repo[ctx.node()]". Differential Revision: https://phab.mercurial-scm.org/D2961
Wed, 28 Mar 2018 22:06:47 +0900 py3: bytes/unicode dance on __doc__ of cmdalias
Yuya Nishihara <yuya@tcha.org> [Wed, 28 Mar 2018 22:06:47 +0900] rev 37140
py3: bytes/unicode dance on __doc__ of cmdalias
Wed, 28 Mar 2018 22:04:45 +0900 alias: reject non-ascii characters in user help/doc strings
Yuya Nishihara <yuya@tcha.org> [Wed, 28 Mar 2018 22:04:45 +0900] rev 37139
alias: reject non-ascii characters in user help/doc strings Since command doc/help texts are passed to i18n.gettext(), they must be ASCII. Otherwise, UnicodeError would be raised.
Mon, 26 Mar 2018 22:18:36 -0400 lfs: respect narrowmatcher when testing to add 'lfs' requirement (issue5794)
Matt Harbison <matt_harbison@yahoo.com> [Mon, 26 Mar 2018 22:18:36 -0400] rev 37138
lfs: respect narrowmatcher when testing to add 'lfs' requirement (issue5794) There's a similar test in lfs.wrapper.convertsink(), but I didn't update that because I don't think that the sink repo in a convert can be narrow. It seems reasonable that a narrow clone of an LFS repo may not necessarily be an LFS repo. The only potential issue is that LFS has a hard requirement for changegroup v3, which that extension enables. The use of treemanifest will enable changegroup v3 in narrow clones, because allsupportedversions() in changegroup.py preserves it when it sees a 'treemanifest' requirement. But I don't see where changegroup v3 is enabled for a flat manifest.
Tue, 20 Mar 2018 18:02:16 -0700 localrepo: make filterpats private (API)
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 20 Mar 2018 18:02:16 -0700] rev 37137
localrepo: make filterpats private (API) I'm not sure why this is available on the public API. AFAICT it isn't used outside of the class. .. api:: localrepo.localrepository.filterpats was renamed to localrepo.localrepository._filterpats. Differential Revision: https://phab.mercurial-scm.org/D2927
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip