Tue, 13 Mar 2018 18:04:37 -0400 commandserver: prefer first-party selectors module from Python 3 to backport
Augie Fackler <augie@google.com> [Tue, 13 Mar 2018 18:04:37 -0400] rev 36940
commandserver: prefer first-party selectors module from Python 3 to backport Caught by some deprecation warnings on Python 3.7. Differential Revision: https://phab.mercurial-scm.org/D2844
Sat, 10 Mar 2018 12:33:19 +0530 forget: add --dry-run mode
Sushil khanchi <sushilkhanchi97@gmail.com> [Sat, 10 Mar 2018 12:33:19 +0530] rev 36939
forget: add --dry-run mode
Fri, 09 Mar 2018 15:53:41 +0100 push-discovery: extract the bookmark comparison logic in its own function
Boris Feld <boris.feld@octobus.net> [Fri, 09 Mar 2018 15:53:41 +0100] rev 36938
push-discovery: extract the bookmark comparison logic in its own function This will help extensions to alter the behavior as they see fit.
Fri, 09 Mar 2018 16:31:35 +0100 push-discovery: don't turn use generator when comparing bookmarks
Boris Feld <boris.feld@octobus.net> [Fri, 09 Mar 2018 16:31:35 +0100] rev 36937
push-discovery: don't turn use generator when comparing bookmarks We want extensions to be able to implement their own logic. Generators can be consume only once, impractical for this purpose.
Tue, 13 Mar 2018 16:56:13 -0700 xdiff: move stdint.h to xdiff.h
Jun Wu <quark@fb.com> [Tue, 13 Mar 2018 16:56:13 -0700] rev 36936
xdiff: move stdint.h to xdiff.h It's more correct to put it in xdiff.h since that file actually uses int64_t etc and xdiff.h is included by xinclude.h. This should fix the oss-fuzz build. Thanks durin42 for discovering the issue. Test Plan: `make local` and xdiff related tests still work. Differential Revision: https://phab.mercurial-scm.org/D2848
Mon, 12 Mar 2018 20:37:08 +0900 annotate: correct parameter name of decorate() function
Yuya Nishihara <yuya@tcha.org> [Mon, 12 Mar 2018 20:37:08 +0900] rev 36935
annotate: correct parameter name of decorate() function
Tue, 13 Mar 2018 21:22:14 +0900 pycompat: name maplist() and ziplist() for better traceback message
Yuya Nishihara <yuya@tcha.org> [Tue, 13 Mar 2018 21:22:14 +0900] rev 36934
pycompat: name maplist() and ziplist() for better traceback message
Sun, 04 Mar 2018 09:07:06 -0800 rebase: move constant expressions out of inner loop in _performrebase()
Martin von Zweigbergk <martinvonz@google.com> [Sun, 04 Mar 2018 09:07:06 -0800] rev 36933
rebase: move constant expressions out of inner loop in _performrebase() Differential Revision: https://phab.mercurial-scm.org/D2811
Fri, 02 Mar 2018 15:38:20 -0800 rebase: inline _performrebasesubset()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 02 Mar 2018 15:38:20 -0800] rev 36932
rebase: inline _performrebasesubset() Now that most of _performrebasesubset() has been moved into _rebasenode(), it's simple enough that we can inline it. Differential Revision: https://phab.mercurial-scm.org/D2810
Mon, 12 Mar 2018 10:39:42 -0700 rebase: extract function for rebasing a single node
Martin von Zweigbergk <martinvonz@google.com> [Mon, 12 Mar 2018 10:39:42 -0700] rev 36931
rebase: extract function for rebasing a single node We currently have _performrebase() and _performrebasesubset(), but we don't have a method for rebasing a single node (that's inside a loop in _performrebasesubset()). I think it makes sense to have such a method, so that's what this patch does. I think it may simplify future patches I'm working on that have to do with transactions, but I think this patch makes sense on its own whether or not that future work happens. Differential Revision: https://phab.mercurial-scm.org/D2809
Fri, 09 Mar 2018 12:48:00 -0800 rebase: use configoverride context manager for ui.forcemerge
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Mar 2018 12:48:00 -0800] rev 36930
rebase: use configoverride context manager for ui.forcemerge Differential Revision: https://phab.mercurial-scm.org/D2761
Fri, 09 Mar 2018 12:45:50 -0800 rebase: also restore "ui.allowemptycommit" value
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Mar 2018 12:45:50 -0800] rev 36929
rebase: also restore "ui.allowemptycommit" value It looks like this was lost when the code was converted to the ui.configoverride() context manager in f255b1811f5e (rebase: get rid of ui.backupconfig, 2017-03-16). (And then the bad example was duplicated in 228916ca12b5 (rebase: add concludememorynode(), and call it when rebasing in-memory, 2017-12-07).) Differential Revision: https://phab.mercurial-scm.org/D2760
Thu, 08 Mar 2018 14:17:24 -0800 rebase: fix issue 5494 also with --collapse
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Mar 2018 14:17:24 -0800] rev 36928
rebase: fix issue 5494 also with --collapse Differential Revision: https://phab.mercurial-scm.org/D2759
Fri, 09 Mar 2018 10:35:48 -0800 rebase: also include commit of collapsed commits in single transaction
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Mar 2018 10:35:48 -0800] rev 36927
rebase: also include commit of collapsed commits in single transaction When rebase.singletransaction is set, we still used to create a second transaction when committing with --collapse. It's simpler to create a single transaction. Note that in the affected .t file, the test that uses --collapse still appears to create two transactions (it prints "rebase status stored" twice). However, only a single transaction is actually created and the second printout comes from cmdutil.commitforceeditor() that explicitly calls tr.writepending(). Also note the that we now roll back any commits if the user closes the commit message editor with an error code (or leaves the message empty). That might be unfortunate, but it's consistent with how we behave in the --no-collapse case (if the user passed --edit). If we want to change that, I think it should be done consistently in a separate patch. Differential Revision: https://phab.mercurial-scm.org/D2728
Mon, 12 Mar 2018 23:08:47 -0400 lfs: debug print HTTP headers and JSON payload received from the server
Matt Harbison <matt_harbison@yahoo.com> [Mon, 12 Mar 2018 23:08:47 -0400] rev 36926
lfs: debug print HTTP headers and JSON payload received from the server This has been extremely valuable to show divergences between `hg serve` and `lfs-test-server`. Once the `hg serve` code lands, there will be a certain amount of conditionalizing that needs to be done, because `lfs-test-server` doesn't always follow its spec. The $ISO_8601_DATE_TIME$ pattern masks the fact that `lfs-test-serve` is sending out an expires_at value of "0001-01-01T00:00:00Z". `hg serve` will (probably) use current time + 10 minutes or similar. The $HTTP_DATE$ is the current time.
Mon, 12 Mar 2018 22:30:01 -0400 test-lfs: dial up the debugging on commands that interact with the server
Matt Harbison <matt_harbison@yahoo.com> [Mon, 12 Mar 2018 22:30:01 -0400] rev 36925
test-lfs: dial up the debugging on commands that interact with the server This will be useful to let the client print out the HTTP headers and JSON in a future patch, so we can compare native LFS serving against test-lfs-server behavior. There tends to be a lot of debug stuff that we don't care about here in a push, so I was tempted to print this output with a [devel] config. But this will be useful for field debugging too, so just put up with the extra output here. It would have been nice to be able to set ui.debug once, but issue5815 prevents that.
Sat, 24 Feb 2018 15:12:01 -0500 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com> [Sat, 24 Feb 2018 15:12:01 -0500] rev 36924
tests: add a substitution pattern for dates in HTTP headers and LFS payload This will be useful when printing HTTP headers and JSON payload received from an LFS server. The RFC 1123 date masking has uses elsewhere too.
Mon, 12 Mar 2018 21:50:18 -0400 xdiff: fix a hard crash on Windows
Matt Harbison <matt_harbison@yahoo.com> [Mon, 12 Mar 2018 21:50:18 -0400] rev 36923
xdiff: fix a hard crash on Windows The xdiff case of test-diff-antipatience.t started crashing in the C extension with 882657a9f768 (with 6a71a5ba666b backported so it compiles). There are a few more instances of 'long', but this resolves the crashing.
Thu, 08 Mar 2018 22:23:02 +0900 templater: split template functions to new module
Yuya Nishihara <yuya@tcha.org> [Thu, 08 Mar 2018 22:23:02 +0900] rev 36922
templater: split template functions to new module It has grown enough to be a dedicated module.
Thu, 08 Mar 2018 23:15:09 +0900 templater: move hybrid class and functions to templateutil module
Yuya Nishihara <yuya@tcha.org> [Thu, 08 Mar 2018 23:15:09 +0900] rev 36921
templater: move hybrid class and functions to templateutil module And make _hybrid and _mappable classes public. _showlist() is still marked as private since it's weird and third-party codes shouldn't depend on it.
Thu, 08 Mar 2018 23:10:46 +0900 templater: move stringify() to templateutil module
Yuya Nishihara <yuya@tcha.org> [Thu, 08 Mar 2018 23:10:46 +0900] rev 36920
templater: move stringify() to templateutil module As we have a util module, it doesn't make sense to import stringify() from templatefilters.py.
Wed, 28 Feb 2018 15:20:41 -0500 dagop: move lines() out of annotate()
Yuya Nishihara <yuya@tcha.org> [Wed, 28 Feb 2018 15:20:41 -0500] rev 36919
dagop: move lines() out of annotate()
Wed, 28 Feb 2018 15:19:47 -0500 dagop: extract core algorithm of annotate() from context.py
Yuya Nishihara <yuya@tcha.org> [Wed, 28 Feb 2018 15:19:47 -0500] rev 36918
dagop: extract core algorithm of annotate() from context.py See the previous patch for why.
Wed, 28 Feb 2018 15:09:05 -0500 dagop: move annotateline and _annotatepair from context.py
Yuya Nishihara <yuya@tcha.org> [Wed, 28 Feb 2018 15:09:05 -0500] rev 36917
dagop: move annotateline and _annotatepair from context.py The annotate logic is large. Let's move it out of the context module, which is basically an abstraction layer of repository operations.
Fri, 09 Mar 2018 21:59:07 -0500 bdiff: convert more longs to int64_t
Matt Harbison <matt_harbison@yahoo.com> [Fri, 09 Mar 2018 21:59:07 -0500] rev 36916
bdiff: convert more longs to int64_t MSVC previously flagged these where the function is stored in a pointer: bdiff.c(284) : warning C4028: formal parameter 1 different from declaration bdiff.c(284) : warning C4028: formal parameter 2 different from declaration bdiff.c(284) : warning C4028: formal parameter 3 different from declaration bdiff.c(284) : warning C4028: formal parameter 4 different from declaration
Fri, 09 Mar 2018 21:42:33 -0500 xdiff: silence a 32-bit shift warning on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 09 Mar 2018 21:42:33 -0500] rev 36915
xdiff: silence a 32-bit shift warning on Windows It's probably harmless, but: warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) Adding a 'ULL' suffix to 1 also works, but I doubt that's portable.
Fri, 09 Mar 2018 21:31:57 -0500 xdiff: backport int64_t and uint64_t types to Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 09 Mar 2018 21:31:57 -0500] rev 36914
xdiff: backport int64_t and uint64_t types to Windows Sadly, MSVC 2008 lacks stdint.h. These are the only two definitions needed right now.
Thu, 08 Mar 2018 22:33:24 +0900 templater: extract template evaluation utility to new module
Yuya Nishihara <yuya@tcha.org> [Thu, 08 Mar 2018 22:33:24 +0900] rev 36913
templater: extract template evaluation utility to new module Prepares for splitting template functions to new module. All eval* functions were moved to templateutil.py, and run* functions had to be moved as well due to the dependency from eval*s. eval*s were aliased as they are commonly used in codebase. _getdictitem() had to be made public.
Thu, 08 Mar 2018 22:20:36 +0900 templater: move function table to the "context" object
Yuya Nishihara <yuya@tcha.org> [Thu, 08 Mar 2018 22:20:36 +0900] rev 36912
templater: move function table to the "context" object Prepares for splitting template functions from templater.py.
Sun, 11 Mar 2018 16:29:54 -0700 hgweb: remove wsgirequest (API)
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 16:29:54 -0700] rev 36911
hgweb: remove wsgirequest (API) Good riddance. .. api:: The old ``wsgirequest`` class for handling everything WSGI in hgweb has been replaced by separate request and response types. Various high-level functions in the hgweb WSGI applications now receive these new types as arguments instead of the old ``wsgirequest`` type. Differential Revision: https://phab.mercurial-scm.org/D2832
Sat, 10 Mar 2018 15:24:24 +0530 tweakdefaults: add commands.status.verbose to tweakefaults
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 10 Mar 2018 15:24:24 +0530] rev 36910
tweakdefaults: add commands.status.verbose to tweakefaults commands.status,verbose if set to True, shows conflict information in `hg status`. It shows which unresolved state you are in, which are the unresolved files and how to continue the unresolved state. That sounds like a very good candidate for tweakdefaults. bisect is added to commands.status.skipstates because people generally leave unresolved bisect state and we should skip that in morestatus output. Differential Revision: https://phab.mercurial-scm.org/D2806
Sun, 11 Mar 2018 16:19:20 -0700 hgweb: store the raw WSGI environment dict
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 16:19:20 -0700] rev 36909
hgweb: store the raw WSGI environment dict We need this so we can construct a new request instance from the original dict. Differential Revision: https://phab.mercurial-scm.org/D2831
Sun, 11 Mar 2018 15:55:38 -0700 hgweb: remove dead wsgirequest code
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 15:55:38 -0700] rev 36908
hgweb: remove dead wsgirequest code All responses now go through our modern response type. All code related to response handling can be deleted. Differential Revision: https://phab.mercurial-scm.org/D2830
Sun, 11 Mar 2018 15:40:58 -0700 hgweb: port to new response API
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 15:40:58 -0700] rev 36907
hgweb: port to new response API These were the last consumers of wsgirequest.respond() \o/ Differential Revision: https://phab.mercurial-scm.org/D2829
Sun, 11 Mar 2018 15:35:03 -0700 hgweb: pass modern request type into templater()
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 15:35:03 -0700] rev 36906
hgweb: pass modern request type into templater() Only a handful of consumers of wsgirequest remaining in this file... Differential Revision: https://phab.mercurial-scm.org/D2828
Sun, 11 Mar 2018 15:37:59 -0700 hgweb: use modern response type for index generation
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 15:37:59 -0700] rev 36905
hgweb: use modern response type for index generation Differential Revision: https://phab.mercurial-scm.org/D2827
Sun, 11 Mar 2018 15:29:38 -0700 hgweb: don't pass wsgireq to makeindex and other functions
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 15:29:38 -0700] rev 36904
hgweb: don't pass wsgireq to makeindex and other functions We only ever access attributes that are available on our newer request type. So we no longer need this argument. Differential Revision: https://phab.mercurial-scm.org/D2826
Sun, 11 Mar 2018 15:18:29 -0700 hgweb: replace PATH_INFO with dispatchpath
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 15:18:29 -0700] rev 36903
hgweb: replace PATH_INFO with dispatchpath This was the last consumer of wsgireq.env from our WSGI applications! (Although indirect consumers of this attribute exist in wsgirequest.respond().) Differential Revision: https://phab.mercurial-scm.org/D2825
Sun, 11 Mar 2018 15:15:02 -0700 hgweb: rewrite path generation for index entries
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 15:15:02 -0700] rev 36902
hgweb: rewrite path generation for index entries I think this code is easier to read. But the real reason to do this is to eliminate a consumer of wsgirequest. Differential Revision: https://phab.mercurial-scm.org/D2824
Sun, 11 Mar 2018 15:08:36 -0700 hgweb: construct {url} with req.apppath
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 15:08:36 -0700] rev 36901
hgweb: construct {url} with req.apppath This is how the hgweb WSGI application does it. Let's make the behavior consistent. Differential Revision: https://phab.mercurial-scm.org/D2823
Sun, 11 Mar 2018 15:33:56 -0700 hgweb: support constructing URLs from an alternate base URL
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 15:33:56 -0700] rev 36900
hgweb: support constructing URLs from an alternate base URL The web.baseurl config option allows server operators to define a custom URL for hosted content. The way it works today is that hgwebdir parses this config option into URL components then updates the appropriate WSGI environment variables so the request "lies" about its details. For example, SERVER_NAME is updated to reflect the alternate base URL's hostname. The WSGI environment should not be modified because WSGI applications may want to know the original request details (for debugging, etc). This commit teaches our request parser about the existence of an alternate base URL. If defined, the advertised URL and other self-reflected paths will take the alternate base URL into account. The hgweb WSGI application didn't use web.baseurl. But hgwebdir did. We update hgwebdir to alter the environment parsing accordingly. The old code around environment manipulation has been removed. With this change, parserequestfromenv() has grown to a bit unwieldy. Now that practically everyone is using it, it is obvious that there is some unused features that can be trimmed. So look for this in follow-up commits. Differential Revision: https://phab.mercurial-scm.org/D2822
Sun, 11 Mar 2018 13:55:13 -0700 hgweb: clarify that apppath begins with a forward slash
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 13:55:13 -0700] rev 36899
hgweb: clarify that apppath begins with a forward slash Differential Revision: https://phab.mercurial-scm.org/D2821
Sun, 11 Mar 2018 13:38:56 -0700 hgweb: change how dispatch path is reported
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 13:38:56 -0700] rev 36898
hgweb: change how dispatch path is reported When I implemented the new request object, I carried forward some ugly hacks until I could figure out what was happening. One of those was the handling of PATH_INFO to determine how to route hgweb requests. Essentially, if we have PATH_INFO data, we route according to that. But if we don't, we route by the query string. I question if we still need to support query string routing. But that's for another day, I suppose. In this commit, we clean up the ugly "havepathinfo" hack and replace it with a "dispatchpath" attribute that can hold None or empty string to differentiate between the presence of PATH_INFO. This is still a bit hacky. But at least the request parsing and routing code is explicit about the meaning now. Differential Revision: https://phab.mercurial-scm.org/D2820
Sun, 11 Mar 2018 13:11:13 -0700 hgweb: refactor repository name URL parsing
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 13:11:13 -0700] rev 36897
hgweb: refactor repository name URL parsing The hgwebdir WSGI application detects when a requested URL is for a known repository and it effectively forwards the request to the hgweb WSGI application. The hgweb WSGI application needs to route the request based on the base URL for the repository. The way this normally works is SCRIPT_NAME is used to resolve the base URL and PATH_INFO contains the path after the script. But with hgwebdir, SCRIPT_NAME refers to hgwebdir, not the base URL for the repository. So, there was a hacky REPO_NAME environment variable being set to convey the part of the URL that represented the repository so hgweb could ignore this path component for routing purposes. The use of the environment variable for passing internal state is pretty hacky. Plus, it wasn't clear from the perspective of the URL parsing code what was going on. This commit improves matters by making the repository name an explicit argument to the request parser. The logic around handling of this value has been shored up. We add various checks that the argument is used properly - that the repository name does represent the prefix of the PATH_INFO. Differential Revision: https://phab.mercurial-scm.org/D2819
Sun, 11 Mar 2018 12:53:47 -0700 tests: add test coverage for parsing WSGI requests
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 12:53:47 -0700] rev 36896
tests: add test coverage for parsing WSGI requests A subsequent commit will need to make this code more complicated in order to support alternate base URLs. Let's establish some test coverage before we diverge too far from PEP 3333. As part of this, a minor bug related to a missing SCRIPT_NAME key has been squashed. Differential Revision: https://phab.mercurial-scm.org/D2818
Sun, 11 Mar 2018 10:51:14 -0700 hgweb: construct static URL like hgweb does
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 10:51:14 -0700] rev 36895
hgweb: construct static URL like hgweb does hgwebdir has a bit of code for constructing URLs. This reinvents wheels from our parsedrequest instance. And sometimes the behavior varies from what hgweb does. We'll want to converge that behavior. This commit changes hgwebdir so its staticurl template keyword is constructed the same way as hgweb's. There's probably room to factor this into a shared function. But let's solve the problem of divergence first. Differential Revision: https://phab.mercurial-scm.org/D2817
Sun, 11 Mar 2018 10:38:46 -0700 hgweb: remove unused **map argument
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 10:38:46 -0700] rev 36894
hgweb: remove unused **map argument It was unused before the recent code refactoring AFAICT. Differential Revision: https://phab.mercurial-scm.org/D2816
Sun, 11 Mar 2018 10:37:25 -0700 hgweb: extract entries() to standalone function
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 10:37:25 -0700] rev 36893
hgweb: extract entries() to standalone function There was some real wonkiness going on here. Essentially, the inline function was being executed with default arguments because a function reference was passed as-is into the templater. That seemed odd. So now we pass an explicit generator of the function result. Moving this code out of makeindex() makes makeindex() small enough to reason about. This makes it easier to see weird things, like the fact that we're calling self.refresh() twice. Why, I'm not sure. I'm also not sure why we need to call updatereqenv() to possibly update the SERVER_NAME, SERVER_PORT, and SCRIPT_NAME variables as part of rendering an index. I'll dig into these things in subsequent commits. Differential Revision: https://phab.mercurial-scm.org/D2815
Sun, 11 Mar 2018 10:24:46 -0700 hgweb: move rawentries() to a standalone function
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 10:24:46 -0700] rev 36892
hgweb: move rawentries() to a standalone function It was only accessing a few variables from the outer scope. Let's make it standalone so there is better clarity about what the inputs are. Differential Revision: https://phab.mercurial-scm.org/D2814
Sun, 11 Mar 2018 10:17:58 -0700 hgweb: move archivelist to standalone function
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 10:17:58 -0700] rev 36891
hgweb: move archivelist to standalone function This doesn't need to exist as an inline function in a method. Minor formatting changes were made as part of the move. Differential Revision: https://phab.mercurial-scm.org/D2813
Sun, 11 Mar 2018 10:15:33 -0700 hgweb: move readallowed to a standalone function
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 10:15:33 -0700] rev 36890
hgweb: move readallowed to a standalone function hgwebdir s kind of large. Let's make the class smaller by moving things that don't need to be there. Differential Revision: https://phab.mercurial-scm.org/D2812
Sun, 11 Mar 2018 15:51:13 -0700 hgweb: remove some use of wsgireq in hgwebdir
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Mar 2018 15:51:13 -0700] rev 36889
hgweb: remove some use of wsgireq in hgwebdir While we're here, rename a method so abide by our style policy, since otherwise check-commit would complain. Differential Revision: https://phab.mercurial-scm.org/D2805
Sat, 10 Mar 2018 20:54:44 -0800 hgweb: fix a bug due to variable name typo
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 10 Mar 2018 20:54:44 -0800] rev 36888
hgweb: fix a bug due to variable name typo It looks like the "sort" query string parameter was not being honored properly. Differential Revision: https://phab.mercurial-scm.org/D2804
Sat, 10 Mar 2018 20:51:46 -0800 hgweb: stop passing req and tmpl into @webcommand functions (API)
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 10 Mar 2018 20:51:46 -0800] rev 36887
hgweb: stop passing req and tmpl into @webcommand functions (API) We have effectively removed all consumers of the old wsgirequest type. The templater can be accessed on the requestcontext passed into the @webcommand function. For the most part, these arguments are unused. They only exist to provide backwards compatibility. And in the case of wsgirequest, use of that object could actively interfere with the new request object. So let's stop passing these objects to @webcommand functions. With this commit, wsgirequest is practically dead from the hgweb WSGI application. There are still some uses in hgwebdir though... .. api:: @webcommand functions now only receive a single argument. The request and templater instances can be accessed via the ``req`` and ``templater`` attributes of the first argument. Note that the request object is different from previous Mercurial releases and consumers of the previous ``req`` 2nd argument will need updating to use the new API. Differential Revision: https://phab.mercurial-scm.org/D2803
Sat, 10 Mar 2018 19:57:08 -0800 hgweb: pass modern request type into various webutil functions (API)
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 10 Mar 2018 19:57:08 -0800] rev 36886
hgweb: pass modern request type into various webutil functions (API) Our march towards killing wsgirequest continues. .. api:: Various functions in hgweb.webutil now take a modern request object instead of ``wsgirequest``. Differential Revision: https://phab.mercurial-scm.org/D2802
Sat, 10 Mar 2018 19:46:54 -0800 hgweb: don't redundantly pass templater with requestcontext (API)
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 10 Mar 2018 19:46:54 -0800] rev 36885
hgweb: don't redundantly pass templater with requestcontext (API) The requestcontenxt has a ``tmpl`` attribute to access the templater. We don't need to pass the templater explicitly when passing a requestcontext instance. .. api:: Various helper functions in hgweb.webutil no longer accept a templater instance. Access the templater through the ``web`` argument instead. Differential Revision: https://phab.mercurial-scm.org/D2801
Sat, 10 Mar 2018 20:38:28 -0800 hgweb: use templater on requestcontext instance
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 10 Mar 2018 20:38:28 -0800] rev 36884
hgweb: use templater on requestcontext instance After this commit, all @webcommand function no longer use their "tmpl" argument. Instead, they use the templater attached to the requestcontext. This is the same exact object. So there should be no difference in behavior. Differential Revision: https://phab.mercurial-scm.org/D2800
Sat, 10 Mar 2018 19:41:18 -0800 hgweb: add a sendtemplate() helper function
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 10 Mar 2018 19:41:18 -0800] rev 36883
hgweb: add a sendtemplate() helper function This pattern is common. Let's make a helper function to reduce boilerplate. We store the "global" template on the requestcontext instance and use it. The templater used by the helper function is the same templater that's passed in as an argument to the @webcommand functions. It needs to be this way because various commands are accessing and mutating the defaults on the templater instance. Differential Revision: https://phab.mercurial-scm.org/D2799
Sat, 10 Mar 2018 19:11:41 -0800 hgweb: use web.req instead of req.req
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 10 Mar 2018 19:11:41 -0800] rev 36882
hgweb: use web.req instead of req.req We now have access to the modern request type on the requestcontext instance. Let's access it from there. While we're here, remove an unused argument from _search(). Differential Revision: https://phab.mercurial-scm.org/D2798
Sat, 10 Mar 2018 19:08:58 -0800 hgweb: stop setting headers on wsgirequest
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 10 Mar 2018 19:08:58 -0800] rev 36881
hgweb: stop setting headers on wsgirequest All commands now go through the new response API. This is dead code. Differential Revision: https://phab.mercurial-scm.org/D2797
(0) -30000 -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip