Tue, 13 Mar 2018 16:53:21 -0700 wireproto: support /api/* URL space for exposing APIs
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 16:53:21 -0700] rev 37049
wireproto: support /api/* URL space for exposing APIs I will soon be introducing a new version of the HTTP wire protocol. One of the things I want to change with it is the URL routing. I want to rely on URL paths to define endpoints rather than the "cmd" query string argument. That should be pretty straightforward. I was thinking about what URL space to reserve for the new protocol. We /could/ put everything at a top-level path. e.g. /wireproto/* or /http-v2-wireproto/*. However, these constrain us a bit because they assume there will only be 1 API: version 2 of the HTTP wire protocol. I think there is room to grow multiple APIs. For example, there may someday be a proper JSON API to query or even manipulate the repository. And I don't think we should have to create a new top-level URL space for each API nor should we attempt to shoehorn each future API into the same shared URL space: that would just be too chaotic. This commits reserves the /api/* URL space for all our future API needs. Essentially, all requests to /api/* get routed to a new WSGI handler. By default, it 404's the entire URL space unless the "api server" feature is enabled. When enabled, requests to "/api" list available APIs. URLs of the form /api/<name>/* are reserved for a particular named API. Behavior within each API is left up to that API. So, we can grow new APIs easily without worrying about URL space conflicts. APIs can be registered by adding entries to a global dict. This allows extensions to provide their own APIs should they choose to do so. This is probably a premature feature. But IMO the code is easier to read if we're not dealing with API-specific behavior like config option querying inline. To prove it works, we implement a very basic API for version 2 of the HTTP wire protocol. It does nothing of value except facilitate testing of the /api/* URL space. We currently emit plain text responses for all /api/* endpoints. There's definitely room to look at Accept and other request headers to vary the response format. But we have to start somewhere. Differential Revision: https://phab.mercurial-scm.org/D2834
Tue, 13 Mar 2018 10:34:36 -0700 url: support suppressing Accept header
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 10:34:36 -0700] rev 37048
url: support suppressing Accept header Sending this header automatically could interfere with future testing and client behavior. Let's add a knob to disable the behavior. We don't have a control for User-Agent because urllib will send it if we don't set something. I don't feel like hacking into the bowels of urllib to figure out how to suppress that. UA shouldn't be used for anything meaningful. So it shouldn't pose any problems beyond non-determinism (since the header has the Mercurial version in it). Differential Revision: https://phab.mercurial-scm.org/D2843
Tue, 13 Mar 2018 11:20:07 -0700 util: don't log low-level I/O calls for HTTP peer
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 11:20:07 -0700] rev 37047
util: don't log low-level I/O calls for HTTP peer `hg debugwireproto` is useful for testing HTTP interactions. Possibly more useful than `get-with-headers.py`. But one thing that makes it annoying for mid-level tests is that it logs all API calls, such as readline(). This makes output - especially headers - overly verbose. This commit teaches our file and socket observers to not log API calls on functions dealing with data. We change the behavior of `hg debugwireproto` to enable this mode by default. --debug can be added to restore the previous behavior. As the test changes demonstrate, this makes tests much easier to read. As a bonus, it also removes some required (glob) over lengths in system call results. One thing that's lacking is knowing which side sent data. But we can fix this in a follow-up once it becomes a problem. Differential Revision: https://phab.mercurial-scm.org/D2842
Wed, 21 Mar 2018 09:56:41 -0700 rebase: rename conclude[memory]node() to commit[memory]node()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 21 Mar 2018 09:56:41 -0700] rev 37046
rebase: rename conclude[memory]node() to commit[memory]node() The functions do little more than commit at this point. Differential Revision: https://phab.mercurial-scm.org/D2924
Tue, 20 Mar 2018 22:11:10 -0700 rebase: pass in "user" instead of "ctx" to conclude[memory]node()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Mar 2018 22:11:10 -0700] rev 37045
rebase: pass in "user" instead of "ctx" to conclude[memory]node() This was the only remaining part of the context object that was needed. Differential Revision: https://phab.mercurial-scm.org/D2923
Tue, 20 Mar 2018 21:59:04 -0700 rebase: look up default date outside of conclude[memory]node()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Mar 2018 21:59:04 -0700] rev 37044
rebase: look up default date outside of conclude[memory]node() Differential Revision: https://phab.mercurial-scm.org/D2922
Tue, 20 Mar 2018 21:58:32 -0700 rebase: move config override out of conclude[memory]node()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Mar 2018 21:58:32 -0700] rev 37043
rebase: move config override out of conclude[memory]node() Differential Revision: https://phab.mercurial-scm.org/D2921
Tue, 20 Mar 2018 21:53:36 -0700 rebase: pass in entire "overrides" dict to conclude[memory]node()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Mar 2018 21:53:36 -0700] rev 37042
rebase: pass in entire "overrides" dict to conclude[memory]node() As with previous patches, this was done the same way in both functions, so let's make the caller do it instead. Differential Revision: https://phab.mercurial-scm.org/D2920
Tue, 20 Mar 2018 21:49:09 -0700 rebase: pass in "keepbranch" to conclude[memory]node()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Mar 2018 21:49:09 -0700] rev 37041
rebase: pass in "keepbranch" to conclude[memory]node() Both functions calculated the same "keepbranch" value from the "keepbranches" we passed in, so let's make the caller do it instead. Differential Revision: https://phab.mercurial-scm.org/D2919
Tue, 20 Mar 2018 21:45:48 -0700 rebase: inline _makextrafn() now that we have only one caller
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Mar 2018 21:45:48 -0700] rev 37040
rebase: inline _makextrafn() now that we have only one caller Also avoid even creating a function since we just end up calling it right away. Differential Revision: https://phab.mercurial-scm.org/D2918
Tue, 20 Mar 2018 21:41:53 -0700 rebase: pass in "extra" itself into conclude[memory]node()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Mar 2018 21:41:53 -0700] rev 37039
rebase: pass in "extra" itself into conclude[memory]node() We were passing in a function instead for no clear reason (probably historical, but I haven't bothered looking). Differential Revision: https://phab.mercurial-scm.org/D2917
Wed, 21 Mar 2018 11:05:32 -0700 rebase: look up commit message to reuse outside of conclude[memory]node()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 21 Mar 2018 11:05:32 -0700] rev 37038
rebase: look up commit message to reuse outside of conclude[memory]node() This was done the same way in both functions, so let's let the single caller do it. Differential Revision: https://phab.mercurial-scm.org/D2916
Wed, 21 Mar 2018 11:04:13 -0700 rebase: pass in ctx, not rev, to conclude[memory]node()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 21 Mar 2018 11:04:13 -0700] rev 37037
rebase: pass in ctx, not rev, to conclude[memory]node() They both need it and there's no locking that might make the results different, so let's do it in one place. This also lets us move out more common code in the following patches. Differential Revision: https://phab.mercurial-scm.org/D2915
Wed, 21 Mar 2018 11:03:31 -0700 rebase: extract common _concludenode()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 21 Mar 2018 11:03:31 -0700] rev 37036
rebase: extract common _concludenode() _rebasenode() and _finishrebase() had a lot of code in common. This commit extracts some of that. This means we will also have a single caller of concludenode() and concludememorynode(), which gives us a place to put code that is common between those two functions (which is quite a bit). Differential Revision: https://phab.mercurial-scm.org/D2914
Wed, 21 Mar 2018 11:01:19 -0700 rebase: store rebase state after each commit
Martin von Zweigbergk <martinvonz@google.com> [Wed, 21 Mar 2018 11:01:19 -0700] rev 37035
rebase: store rebase state after each commit Before this patch, we stored the rebase state early in the processing of a node, before we updated the rebase state to indicate that the node was processed. This meant that we could redo the working copy merge and run into conflicts. However, this only happened in the --collapse case if the rebase was interrupted while editing the final commit message; in the case earlier interruptions, we would instead detect the in-process revision by finding two dirstate parents. This patch moves the writing of the rebase state to after we have completed the revision completely, and, importantly, after we have updated the rebase state to mark it done. This means we'll realize that all nodes have been rebased in the case mentioned above of editing the final commit message of a --collapse. See change to test case. I also moved the writing outside of the large if/elif block in _rebasenode(). This shouldn't matter much, but seems cleaner. One observable effect is if rebase was interrupted just after ignoring an obsolete node ("not rebasing ####, already in destination"), we used to come up with the same decision after --continue too, but after this patch we'll instead say "already rebased ###". This seems more consistent, since that's what we would do with obsolete nodes that had been marked done earlier in the process (not only just before the interruption). Differential Revision: https://phab.mercurial-scm.org/D2913
Wed, 21 Mar 2018 10:46:00 -0700 rebase: register status file generator only once when using single transaction
Martin von Zweigbergk <martinvonz@google.com> [Wed, 21 Mar 2018 10:46:00 -0700] rev 37034
rebase: register status file generator only once when using single transaction rebase.storestatus() behaved differently depending on whether a transaction is passed to it. If a transaction is passed, it registers a "file generator" that runs when the transaction commits. If no transaction was passed, it writes the rebase state immediately. This imprecise timing of the writing makes it hard to reason about, so let's make it more explicit which behavior we're getting by checking if we have a transaction before calling it. For the single-transaction case, move the call to storestatus(tr) early and do it only once since it's only going to write the file (at most) once anyway. Differential Revision: https://phab.mercurial-scm.org/D2912
Sun, 18 Mar 2018 22:26:23 -0700 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com> [Sun, 18 Mar 2018 22:26:23 -0700] rev 37033
tests: add some more tests to test-rebase-collapse.t Some of these are currently broken. Differential Revision: https://phab.mercurial-scm.org/D2911
Sun, 18 Mar 2018 15:25:23 -0700 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com> [Sun, 18 Mar 2018 15:25:23 -0700] rev 37032
tests: use drawdag in test-rebase-collapse.t This makes the tests shorter (410 lines -> 240 lines), faster (17s -> 12s), and easier to read (the setup for each test case is just before the test, and we can refer to commits by name). Differential Revision: https://phab.mercurial-scm.org/D2910
Tue, 20 Mar 2018 17:25:16 -0700 rebase: remove unused default argument values from conclude[memory]node()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Mar 2018 17:25:16 -0700] rev 37031
rebase: remove unused default argument values from conclude[memory]node() It's only "commitmsg" that we don't always pass. Differential Revision: https://phab.mercurial-scm.org/D2909
Tue, 20 Mar 2018 17:30:08 -0700 rebase: get "inmemory" state directly from rebase runtime
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Mar 2018 17:30:08 -0700] rev 37030
rebase: get "inmemory" state directly from rebase runtime As far as I can tell, rbsrt.inmemory is equivalent to rbsrt.wctx.isinmemory(), so let's use the shorter form. Differential Revision: https://phab.mercurial-scm.org/D2908
Mon, 25 Dec 2017 15:56:07 +0530 commands: use keyword arguments in update function
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 25 Dec 2017 15:56:07 +0530] rev 37029
commands: use keyword arguments in update function This will help us in having a dictionary with the values of all the arguments and we can add more flags without adding an argument to the function. Differential Revision: https://phab.mercurial-scm.org/D2896
Tue, 20 Mar 2018 13:53:02 -0700 rebase: pass "inmemory" directly to _definedestmap()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Mar 2018 13:53:02 -0700] rev 37028
rebase: pass "inmemory" directly to _definedestmap() We no longer reassign rbsrt.inmemory in _definedestmap(), so we don't need to pass the whole rebase runtime instance anymore, thus making it clear that it won't be updated. Differential Revision: https://phab.mercurial-scm.org/D2905
Tue, 20 Mar 2018 14:19:28 +0800 hgweb: explain instabilities of unstable changesets (the rest of the themes)
Anton Shestakov <av6@dwimlabs.net> [Tue, 20 Mar 2018 14:19:28 +0800] rev 37027
hgweb: explain instabilities of unstable changesets (the rest of the themes)
Tue, 20 Mar 2018 21:10:29 -0400 test-merge-tools: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Mar 2018 21:10:29 -0400] rev 37026
test-merge-tools: stabilize for Windows See fe5c4b795999.
Tue, 20 Mar 2018 20:33:37 -0400 test-http-protocol: drop an extraneous glob for Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Mar 2018 20:33:37 -0400] rev 37025
test-http-protocol: drop an extraneous glob for Windows
Mon, 19 Mar 2018 08:07:18 -0700 merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 19 Mar 2018 08:07:18 -0700] rev 37024
merge with stable
Sun, 03 Apr 2016 14:16:47 +0900 hgweb: evaluate the "default" value as template
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Apr 2016 14:16:47 +0900] rev 37023
hgweb: evaluate the "default" value as template Strictly speaking, everything in the map file is a template. So let's not take out an unparsed template string.
Fri, 16 Mar 2018 21:39:32 +0900 templater: use named function to expand template against mapping dict (API)
Yuya Nishihara <yuya@tcha.org> [Fri, 16 Mar 2018 21:39:32 +0900] rev 37022
templater: use named function to expand template against mapping dict (API) And replace __call__(t, **mapping) in favor of generate(t, mapping). I prefer a named function here since the templater isn't a simple function-like object. .. api:: The templater is no longer callable. Use ``templater.generate(t, mapping)`` instead of ``templater(t, **pycompat.strkwargs(mapping))``.
Mon, 19 Mar 2018 21:09:23 +0900 highlight: peek Content-Type header set by hgweb
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 21:09:23 +0900] rev 37021
highlight: peek Content-Type header set by hgweb There should be no need to re-render the mimetype template since it's set before dispatching webcommands.
Tue, 20 Mar 2018 14:12:05 +0800 obsolete: add a note that explains creating aliases for marker flags
Anton Shestakov <av6@dwimlabs.net> [Tue, 20 Mar 2018 14:12:05 +0800] rev 37020
obsolete: add a note that explains creating aliases for marker flags
Sun, 04 Mar 2018 10:34:09 -0500 repair: rename _backup to backupbundle
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 04 Mar 2018 10:34:09 -0500] rev 37019
repair: rename _backup to backupbundle A future commit will introduce a caller from outside the module. The function should have already been public because histedit was calling it. Differential Revision: https://phab.mercurial-scm.org/D2666
Mon, 19 Mar 2018 22:10:40 +0900 templatefuncs: do not stringify result of if*() expression
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 22:10:40 +0900] rev 37018
templatefuncs: do not stringify result of if*() expression Returning a generator means that the result is a byte string. I can't find any reason to make the "if" condition lazy since it is evaluated anyway when {if()} has to be evaluated. So let's simply make if*() return an input expression unmodified.
Mon, 19 Mar 2018 21:55:02 +0900 templater: add brief doc about internal data types
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 21:55:02 +0900] rev 37017
templater: add brief doc about internal data types Hopefully this will help reviewing upcoming my series. Start small.
Tue, 13 Mar 2018 11:17:10 -0700 debugcommands: support sending HTTP requests with debugwireproto
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 11:17:10 -0700] rev 37016
debugcommands: support sending HTTP requests with debugwireproto We implement an action that can issue an HTTP request. We can define headers via arguments and specify a file to use for the HTTP request body. The request uses the HTTP peer's opener, which is already configured for auth, etc. This is both good and bad. Good in that we get some nice behavior out of the box. Bad in that some HTTP request headers are added automatically. Differential Revision: https://phab.mercurial-scm.org/D2841
Tue, 13 Mar 2018 10:02:03 -0700 debugcommands: support connecting to HTTP peers
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 10:02:03 -0700] rev 37015
debugcommands: support connecting to HTTP peers Now that we have the plumbing for logging socket activity, let's hook it up to `hg debugwireproto` so we can collect low-level activity on sockets. The new code is a bit incomplete. But it is better than nothing: `hg debugwireproto` is still heavily evolving. The added test demonstrates some interesting behavior. For example, we're calling socket.makefile() and doing I/O on that. TIL. We're also sending an "Accept-Encoding: identity" request header. Differential Revision: https://phab.mercurial-scm.org/D2726
Mon, 12 Mar 2018 15:43:36 -0700 url: add HTTP handler that uses a proxied socket
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 12 Mar 2018 15:43:36 -0700] rev 37014
url: add HTTP handler that uses a proxied socket Now that we have a socket proxy that can log I/O, we need to teach mechanisms that open URLs how to use it. We invent a custom HTTP handler class that knows how to proxy sockets as soon as they are opened. We teach the high-level opener() to accept logging arguments so a logging HTTP handler can be constructed. We don't yet support intercepting HTTPS sockets because I don't want to go down that rabbit hole. For the record, the urllib API is crazy and it took way too long to figure out at what levels I needed to plug in to modify the socket. # no-check-commit because we must name http_open that way Differential Revision: https://phab.mercurial-scm.org/D2722
Tue, 13 Mar 2018 17:42:00 -0700 util: observable proxy objects for sockets
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 17:42:00 -0700] rev 37013
util: observable proxy objects for sockets We previously introduced proxy objects and observers for file objects to help implement low-level tests for the SSH wire protocol. In this commit, we do the same for sockets in order to help test the HTTP server. We only proxy/observe some socket methods. I didn't feel like implementing all the methods because there are so many of them and implementing them will provide no short term value. We can always implement them later. # no-check-commit because we implement foo_bar methods on stdlib types Differential Revision: https://phab.mercurial-scm.org/D2721
Tue, 13 Mar 2018 09:45:56 -0700 hgweb: allow defining Server response header for HTTP server
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 09:45:56 -0700] rev 37012
hgweb: allow defining Server response header for HTTP server By default, the string contains the Python version. Server operators may want to change this. Because we like deterministic tests, we change the test harness to always set this value to a known string. Various globs over the server header have now been removed. # no-check-commit because we add version_string() Differential Revision: https://phab.mercurial-scm.org/D2840
Tue, 13 Mar 2018 08:58:52 -0700 tests: use $HTTP_DATE$ for Date header
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 08:58:52 -0700] rev 37011
tests: use $HTTP_DATE$ for Date header Support for the $HTTP_DATE$ substitution was recently added. Let's adopt it more widely. We had to tweak the substitution to be case insensitive, since HTTP headers are case insensitive. I also found a minor test issue not globbing over the length of the Server response header. Differential Revision: https://phab.mercurial-scm.org/D2839
Mon, 12 Mar 2018 15:49:02 -0700 debugcommands: introduce actions to perform deterministic reads
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 12 Mar 2018 15:49:02 -0700] rev 37010
debugcommands: introduce actions to perform deterministic reads "readavailable" is useful as a debugging device to see what data is available on a pipe. But the mechanism isn't deterministic because what's available on a pipe is highly conditional on timing, system load, OS behavior, etc. This makes it not suitable for tests. We introduce "ereadline," "read," and "eread" for performing deterministic I/O operations (at least on blocking file descriptors). We stop short of converting existing consumers of "readavailable" in tests because we're working out race conditions and deadlocks on Windows. But the goal is to eventually move tests away from "readavailable" to these new APIs. Differential Revision: https://phab.mercurial-scm.org/D2720
Wed, 07 Mar 2018 20:41:59 -0800 httppeer: refactor how httppeer is created (API)
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 07 Mar 2018 20:41:59 -0800] rev 37009
httppeer: refactor how httppeer is created (API) Previously, we passed a bunch of arguments to httppeer.__init__, validated them, then possibly constructed a valid instance. A short while ago, we refactored sshpeer so all the validation and setup work occurs before the constructor. We introduced a makepeer() to hold most of this logic. This commit gives httppeer the same treatment. As a sign that the previous design was poor, __del__ no longer conditionally checks for the presence of an attribute that may not be defined (it is always defined in the new code). .. api:: httppeer.httppeer.__init__ now takes additional arguments. Instances should be obtained by calling httppeer.instance() or httppeer.makepeer() instead. Differential Revision: https://phab.mercurial-scm.org/D2725
Wed, 31 Jan 2018 09:41:47 +0100 bundle: condition the changegroup part when creating a new bundle
Boris Feld <boris.feld@octobus.net> [Wed, 31 Jan 2018 09:41:47 +0100] rev 37008
bundle: condition the changegroup part when creating a new bundle We will generate stream bundle in the next changesets which doesn't need the changegroup part. Differential Revision: https://phab.mercurial-scm.org/D1951
Fri, 19 Jan 2018 17:29:50 +0100 stack: return a sorted smartrev by default
Boris Feld <boris.feld@octobus.net> [Fri, 19 Jan 2018 17:29:50 +0100] rev 37007
stack: return a sorted smartrev by default Most stack customers will display a list of revisions, sort it by default. Differential Revision: https://phab.mercurial-scm.org/D2399
Fri, 19 Jan 2018 17:09:24 +0100 histedit: use the new stack definition for histedit
Boris Feld <boris.feld@octobus.net> [Fri, 19 Jan 2018 17:09:24 +0100] rev 37006
histedit: use the new stack definition for histedit Now that we have a common stack definition, use it in the hg histedit command. Differential Revision: https://phab.mercurial-scm.org/D2398
Fri, 19 Jan 2018 16:52:56 +0100 show: use the new stack definition for show stack
Boris Feld <boris.feld@octobus.net> [Fri, 19 Jan 2018 16:52:56 +0100] rev 37005
show: use the new stack definition for show stack Now that we have a common stack definition, use it in the hg show stack command. Differential Revision: https://phab.mercurial-scm.org/D2397
Fri, 19 Jan 2018 16:52:02 +0100 stack: import Evolve stack test file
Boris Feld <boris.feld@octobus.net> [Fri, 19 Jan 2018 16:52:02 +0100] rev 37004
stack: import Evolve stack test file Import Evolve stack test file for starting to have good coverage on stack definition. Differential Revision: https://phab.mercurial-scm.org/D2396
Fri, 19 Jan 2018 15:25:06 +0100 stack: add a new module for stack-related commands
Boris Feld <boris.feld@octobus.net> [Fri, 19 Jan 2018 15:25:06 +0100] rev 37003
stack: add a new module for stack-related commands Bootstrap the module with a function that returns the stack for the current revision. The definition of the stack is ihnerited from histedit default revset and used by hg show stack. Differential Revision: https://phab.mercurial-scm.org/D2395
Fri, 19 Jan 2018 19:07:58 -0800 filemerge: use a single temp dir instead of temp files
Kyle Lippincott <spectral@google.com> [Fri, 19 Jan 2018 19:07:58 -0800] rev 37002
filemerge: use a single temp dir instead of temp files This can help to remove the clutter from UIs that display just the filenames; instead of seeing foo~local.C9ru9r.txt and foo~base.2DMV22.txt (in the /tmp directory on most platforms), we create a single new directory and use that, producing filenames like /tmp/hgmerge.C9ru9r/foo~local.txt. Differential Revision: https://phab.mercurial-scm.org/D2888
Fri, 19 Jan 2018 19:14:09 -0800 filemerge: move temp file unlinks to _maketempfiles
Kyle Lippincott <spectral@google.com> [Fri, 19 Jan 2018 19:14:09 -0800] rev 37001
filemerge: move temp file unlinks to _maketempfiles Differential Revision: https://phab.mercurial-scm.org/D2887
Fri, 16 Mar 2018 09:41:21 -0700 hgweb: refactor multirequest to be a dict of lists
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 16 Mar 2018 09:41:21 -0700] rev 37000
hgweb: refactor multirequest to be a dict of lists ... instead of a list of 2-tuples. This makes key lookups faster. The only downside is we lose total ordering of all entries. But we weren't relying on that before, so it's no loss. Differential Revision: https://phab.mercurial-scm.org/D2881
Sun, 04 Mar 2018 22:35:29 +0530 py3: use "%d" % int instead of str(int)
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 04 Mar 2018 22:35:29 +0530] rev 36999
py3: use "%d" % int instead of str(int) We need to use bytes internally. Differential Revision: https://phab.mercurial-scm.org/D2895
Mon, 19 Mar 2018 00:06:10 +0530 py3: use pycompat.bytestr() in dirstate.py
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 19 Mar 2018 00:06:10 +0530] rev 36998
py3: use pycompat.bytestr() in dirstate.py This prevents extra b'' prefixes in output. Differential Revision: https://phab.mercurial-scm.org/D2894
Mon, 19 Mar 2018 00:02:59 +0530 py3: make tests/test-log-linerange.t work on Python 3
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 19 Mar 2018 00:02:59 +0530] rev 36997
py3: make tests/test-log-linerange.t work on Python 3 Made sure we write bytes to file and we suppress the return value of open(). Differential Revision: https://phab.mercurial-scm.org/D2893
Mon, 19 Mar 2018 00:04:38 +0530 py3: use print as a function in tests/test-narrow-clone-non-narrow-server.t
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 19 Mar 2018 00:04:38 +0530] rev 36996
py3: use print as a function in tests/test-narrow-clone-non-narrow-server.t Differential Revision: https://phab.mercurial-scm.org/D2892
Sun, 04 Mar 2018 16:23:03 -0500 tests: stop over-specifying tempfile name
Augie Fackler <augie@google.com> [Sun, 04 Mar 2018 16:23:03 -0500] rev 36995
tests: stop over-specifying tempfile name Python 3 has more random characters in the default template, which is fine. Differential Revision: https://phab.mercurial-scm.org/D2676
Sat, 10 Mar 2018 23:58:01 -0500 wireproto: explicitly flush stdio to prevent stalls on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 10 Mar 2018 23:58:01 -0500] rev 36994
wireproto: explicitly flush stdio to prevent stalls on Windows This is the key to fixing the hangs on Windows in D2720[1]. I put flushes in a bunch of other places that didn't help, but I suspect that's more a lack of test coverage than anything else. Chasing down stuff like this is pretty painful. I'm wondering if we can put a proxy around sys.stderr (and sys.stdout?) on Windows (only when daemonized?) that will flush on every write (or at least every write with a '\n'). [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2018-March/113352.html
(0) -30000 -10000 -3000 -1000 -300 -100 -56 +56 +100 +300 +1000 +3000 +10000 tip