Wed, 09 Aug 2017 17:01:21 +0200 bundle2: fix transaction availability detection
Boris Feld <boris.feld@octobus.net> [Wed, 09 Aug 2017 17:01:21 +0200] rev 33770
bundle2: fix transaction availability detection Changeset 5fc4ddfbe626 introduce more complex logic around 'bundleoperation.gettransaction'. In that process it turns the old "attribute" into a proper method which breaks the code that detects the "transaction availability". The change was visible in 'test-acl.t', fixing this reverts the test changes. Differential Revision: https://phab.mercurial-scm.org/D303
Thu, 10 Aug 2017 09:37:50 -0700 fsmonitor: correct an error message
Jun Wu <quark@fb.com> [Thu, 10 Aug 2017 09:37:50 -0700] rev 33769
fsmonitor: correct an error message Without the change, the error looks like: warning: Watchman unavailable: "watchman" executable not in PATH (%s), while executing [Errno 2] No such file or directory With the change, it now looks like: warning: Watchman unavailable: "watchman" executable not in PATH ([Errno 2] No such file or directory) Differential Revision: https://phab.mercurial-scm.org/D322
Thu, 10 Aug 2017 20:55:28 -0700 sshpeer: make instance attributes and methods internal
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 10 Aug 2017 20:55:28 -0700] rev 33768
sshpeer: make instance attributes and methods internal Peer types are supposed to conform to a formal interface defined by peer.peerrepository and wireproto.wirepeer. Every "public" attribute on *peer types makes it harder to understand what attributes are part of the interface and what are instance specific. This commit converts a number of "public" instance attributes and methods on sshpeer to internal so they can't be confused to be part of the peer API. The URL-related instance attributes were introduced in 876333a295ff in 2005. AFAICT most of them aren't used and could potentially be removed. But I kept them around anyway. I also reorded some code to make things slightly easier to read. .. api:: Rename attributes on sshpeer to reflect peer API Differential Revision: https://phab.mercurial-scm.org/D331
Wed, 09 Aug 2017 23:35:20 -0700 peer: remove non iterating batcher (API)
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 09 Aug 2017 23:35:20 -0700] rev 33767
peer: remove non iterating batcher (API) The last use of this API was removed in b6e71f8af5b8 in 2016. While not formally deprecated, as of the last commit the code is no longer explicitly tested. I think the new API has existed long enough for people to transition to it. I also have plans to more formalize the peer API and removing batch() makes that work easier. I'm not convinced the current client-side API around batching is great. But it's the best we have at the moment. .. api:: remove peer.batch() Replace with peer.iterbatch(). Differential Revision: https://phab.mercurial-scm.org/D320
Wed, 09 Aug 2017 23:29:30 -0700 wireproto: overhaul iterating batcher code (API)
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 09 Aug 2017 23:29:30 -0700] rev 33766
wireproto: overhaul iterating batcher code (API) The remote batching code is difficult to read. Let's improve it. As part of the refactor, the future returned by method calls on batchiter() instances is now populated. However, you still need to consume the results() generator for the future to be set. But at least now we can stuff the future somewhere and not have to worry about aligning method call order with result order since you can use a future to hold the result. Also as part of the change, we now verify that @batchable generators yield exactly 2 values. In other words, we enforce their API. The non-iter batcher has been unused since b6e71f8af5b8. And to my surprise we had no explicit unit test coverage of it! test-batching.py has been overhauled to use the iterating batcher. Since the iterating batcher doesn't allow non-batchable method calls nor local calls, tests have been updated to reflect reality. The iterating batcher has been used for multiple releases apparently without major issue. So this shouldn't cause alarm. .. api:: @peer.batchable functions must now yield exactly 2 values Differential Revision: https://phab.mercurial-scm.org/D319
Wed, 09 Aug 2017 22:52:05 -0700 wireproto: remove support for local results in @batchable (API)
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 09 Aug 2017 22:52:05 -0700] rev 33765
wireproto: remove support for local results in @batchable (API) @peer.batchable decorated generator functions have two forms: yield value, None and yield args, future yield value These forms have been present since the decorator was introduced. There are currently no in-repo consumers of the first form. So this commit removes support for it. Note that remoteiterbatcher.submit() asserts the 2nd form. And b6e71f8af5b8 removed the last user of remotebatcher, forcing everyone to remoteiterbatcher. So anything relying on this in the wild would have been broken since b6e71f8af5b8. .. api:: @peer.batchable can no longer emit local values Differential Revision: https://phab.mercurial-scm.org/D318
Wed, 09 Aug 2017 21:51:45 -0700 wireproto: properly implement batchable checking
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 09 Aug 2017 21:51:45 -0700] rev 33764
wireproto: properly implement batchable checking remoteiterbatcher (unlike remotebatcher) only supports batchable commands. This claim can be validated by comparing their implementations of submit() and noting how remoteiterbatcher assumes the invoked method has a "batchable" attribute, which is set by @peer.batchable. remoteiterbatcher has a custom __getitem__ that was trying to validate that only batchable methods are called. However, it was only validating that the called method exists, not that it is batchable. This wasn't a big deal since remoteiterbatcher.submit() would raise an AttributeError attempting to `mtd.batchable(...)`. Let's fix the check and convert it to ProgrammingError, which may not have been around when this was originally implemented. Differential Revision: https://phab.mercurial-scm.org/D317
Wed, 09 Aug 2017 21:04:03 -0700 largefiles: remove remotestore.batch()
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 09 Aug 2017 21:04:03 -0700] rev 33763
largefiles: remove remotestore.batch() This method was added in 9e1616307c4c. AFAICT it didn't do anything at inception. If it did, there was no test coverage for it because changing it to raise doesn't fail any tests at that revision. b6e71f8af5b8 later refactored all remote.batch() calls to remote.iterbatch(). So if this was somehow used, it isn't called any more because there are no calls to .batch() remaining in the repo. I suspect the original patch author got confused by the distinction between the peer/remote interface and the largefiles store. The lf store is a gateway to a peer instance. It exposes additional lf-specific methods to execute against a peer. However, it is not a peer and doesn't need to implement batch() because peer itself does that. Differential Revision: https://phab.mercurial-scm.org/D316
Fri, 11 Aug 2017 15:20:41 +0200 histedit: check first changeset for verb "roll" or "fold" (issue5498)
André Klitzing <aklitzing@gmail.com> [Fri, 11 Aug 2017 15:20:41 +0200] rev 33762
histedit: check first changeset for verb "roll" or "fold" (issue5498) If someone changes "pick" to "roll" or "fold" for the first changeset in a histedit rule Mercurial could remove a wrong changeset if the phase is non-public. roll or fold for the first changeset should be invalid.
Mon, 31 Jul 2017 23:13:47 +0900 encoding: drop circular import by proxying through '<policy>.charencode'
Yuya Nishihara <yuya@tcha.org> [Mon, 31 Jul 2017 23:13:47 +0900] rev 33761
encoding: drop circular import by proxying through '<policy>.charencode' I decided not to split charencode.c to new C extension module because it would duplicate binary codes unnecessarily.
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip