Fri, 28 Jul 2017 22:42:10 -0700 util: add base class for transactional context managers
Martin von Zweigbergk <martinvonz@google.com> [Fri, 28 Jul 2017 22:42:10 -0700] rev 33814
util: add base class for transactional context managers We have at least three types with a close() and a release() method where the close() method is supposed to be called on success and the release() method is supposed to be called last, whether successful or not. Two of them (transaction and dirstateguard) already have identical implementations of __enter__ and __exit__. Let's extract a base class for this, so we reuse the code and so the third type (transactionmanager) can also be used as a context manager. Differential Revision: https://phab.mercurial-scm.org/D392
Mon, 14 Aug 2017 16:26:36 -0700 exchange: remove need for "locked" variable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 14 Aug 2017 16:26:36 -0700] rev 33813
exchange: remove need for "locked" variable The transactionmanager() constructor just assigned a few variables and cannot fail, so it's safe to move it inside the earlier try/except. Differential Revision: https://phab.mercurial-scm.org/D391
Mon, 14 Aug 2017 16:14:14 -0700 exchange: drop now-unnecessary "local" from lock name variables
Martin von Zweigbergk <martinvonz@google.com> [Mon, 14 Aug 2017 16:14:14 -0700] rev 33812
exchange: drop now-unnecessary "local" from lock name variables Since fda0867cfe03 (exchange: drop support for lock-based unbundling (BC), 2017-08-06), there is no more remote locking. Differential Revision: https://phab.mercurial-scm.org/D390
Fri, 28 Jul 2017 21:49:44 -0700 exchange: remove 'locallocked' member from pushop object
Martin von Zweigbergk <martinvonz@google.com> [Fri, 28 Jul 2017 21:49:44 -0700] rev 33811
exchange: remove 'locallocked' member from pushop object The variable has been used only within a single function since 94e2862dbcfb (push: elevate phase transaction to cover entire operation, 2014-11-21), so there's no need to keep it on the pushop object. Differential Revision: https://phab.mercurial-scm.org/D389
Sat, 12 Aug 2017 21:01:06 -0700 rebase: change "result would have 3 parent" error message (BC)
Jun Wu <quark@fb.com> [Sat, 12 Aug 2017 21:01:06 -0700] rev 33810
rebase: change "result would have 3 parent" error message (BC) The old error message "cannot use revision REV as base, result would have 3 parents" is confusing - why use REV as base? why add a new parent?. This patch changes it to "cannot move parent", which seems better. Differential Revision: https://phab.mercurial-scm.org/D342
Mon, 14 Aug 2017 07:02:38 -0700 drawdag: allow override file contents via comments
Jun Wu <quark@fb.com> [Mon, 14 Aug 2017 07:02:38 -0700] rev 33809
drawdag: allow override file contents via comments This makes drawdag more flexible, and allow us to create non-clean merges in test cases. Differential Revision: https://phab.mercurial-scm.org/D385
Fri, 04 Aug 2017 12:39:29 -0700 phabricator: add --amend option to phabsend
Jun Wu <quark@fb.com> [Fri, 04 Aug 2017 12:39:29 -0700] rev 33808
phabricator: add --amend option to phabsend Previously `hg phabsend` was imitating `hg email` and won't mutate changesets. That works fine with reviewer-push workflow, reviewers run `phabread`, `import`. However, it does not work well with author-push workflow. Namely, the author needs to run extra commands to get the right commit message, and remove the local tag after push. This patch solves those issues by adding the `--amend` option, so local changesets will have the right commit message, and tags become unnecessary. Test Plan: Given the following DAG: o 17 o 16 | o 15 | @ 14 |/ o 13 o 12 Run `hg phabsend '(13::)-17' --amend`, check the new DAG looks like: o 21 | o 20 | @ 19 |/ o 18 | o 17 | x 16 | x 13 |/ o 12 And commit messages are updated to contain the `Differential Revision` lines. Use `phabread` to make sure Phabricator has the amended node recorded. Also check `phabsend .` followed by a `phabsend . --amend`, the commit message will be updated and the tag will be removed. Differential Revision: https://phab.mercurial-scm.org/D122
Thu, 10 Aug 2017 21:30:31 -0700 rebase: rewrite core algorithm (issue5578) (issue5630)
Jun Wu <quark@fb.com> [Thu, 10 Aug 2017 21:30:31 -0700] rev 33807
rebase: rewrite core algorithm (issue5578) (issue5630) "defineparents" is the core algorithm of rebase. The old code has too many tech debts (like outdated comments, confusing assertions, etc) and is very error-prone to be improved. This patch rewrites "defineparents" to make the code easier to reason about, and solve a bunch of issues, including: - Assertion error: no base found (demonstrated by D212, issue5578) - Asymmetric result (demonstrated by D211, "F with one parent") - Wrong new parent (demonstrated by D262, "C':A'A'") - "revlog index out of range" (demonstrated by D262, issue5630) - "nothing to merge" (demonstrated by D262) As a side effect, merge base decision has been made more solid - rebase now prints out explicitly what could go wrong when it cannot find a unique suitable merge base. .. fix:: Issue 5578, Issue 5630 Core rebase algorithm has been rewritten to be more robust. Differential Revision: https://phab.mercurial-scm.org/D21
Sat, 12 Aug 2017 21:40:48 -0700 phabricator: remove an unnecessary writediffproperties call
Jun Wu <quark@fb.com> [Sat, 12 Aug 2017 21:40:48 -0700] rev 33806
phabricator: remove an unnecessary writediffproperties call This was introduced by D229. Thanks Yuya for finding it! Differential Revision: https://phab.mercurial-scm.org/D366
Sat, 12 Aug 2017 09:21:42 +0530 releasenotes: minor bug fix for index error while serializing
Rishabh Madan <rishabhmadan96@gmail.com> [Sat, 12 Aug 2017 09:21:42 +0530] rev 33805
releasenotes: minor bug fix for index error while serializing Differential Revision: https://phab.mercurial-scm.org/D356
Thu, 03 Aug 2017 15:31:54 +0200 label: rename log.trouble into log.instability
Boris Feld <boris.feld@octobus.net> [Thu, 03 Aug 2017 15:31:54 +0200] rev 33804
label: rename log.trouble into log.instability The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D259
Thu, 03 Aug 2017 15:30:41 +0200 label: rename trouble.X into instability.X
Boris Feld <boris.feld@octobus.net> [Thu, 03 Aug 2017 15:30:41 +0200] rev 33803
label: rename trouble.X into instability.X The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D258
Thu, 03 Aug 2017 14:32:50 +0200 label: rename changeset.troubled into changeset.unstable
Boris Feld <boris.feld@octobus.net> [Thu, 03 Aug 2017 14:32:50 +0200] rev 33802
label: rename changeset.troubled into changeset.unstable The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D257
Thu, 03 Aug 2017 14:16:54 +0200 test: add a test for stabilization related labels
Boris Feld <boris.feld@octobus.net> [Thu, 03 Aug 2017 14:16:54 +0200] rev 33801
test: add a test for stabilization related labels Differential Revision: https://phab.mercurial-scm.org/D256
Fri, 04 Aug 2017 19:39:34 +0200 obsolete: rename bumped volatile set into phasedivergent volatile set
Boris Feld <boris.feld@octobus.net> [Fri, 04 Aug 2017 19:39:34 +0200] rev 33800
obsolete: rename bumped volatile set into phasedivergent volatile set The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D255
Fri, 04 Aug 2017 19:36:27 +0200 obsolete: rename divergent volatile set into contentdivergent volatile set
Boris Feld <boris.feld@octobus.net> [Fri, 04 Aug 2017 19:36:27 +0200] rev 33799
obsolete: rename divergent volatile set into contentdivergent volatile set The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D254
Fri, 04 Aug 2017 19:27:39 +0200 obsolete: rename unstable volatile set into orphan volatile set
Boris Feld <boris.feld@octobus.net> [Fri, 04 Aug 2017 19:27:39 +0200] rev 33798
obsolete: rename unstable volatile set into orphan volatile set The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D253
Thu, 03 Aug 2017 14:08:39 +0200 revset: rename bumped into phasedivergent
Boris Feld <boris.feld@octobus.net> [Thu, 03 Aug 2017 14:08:39 +0200] rev 33797
revset: rename bumped into phasedivergent Don't touch bumped volatile set name, only the revset name. The volatile set name will be updated in a later patch. The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D252
Thu, 03 Aug 2017 14:01:51 +0200 revset: remane divergent into contentdivergent
Boris Feld <boris.feld@octobus.net> [Thu, 03 Aug 2017 14:01:51 +0200] rev 33796
revset: remane divergent into contentdivergent Don't touch divergent volatile set name, only the revset name. The volatile set name will be updated in a later patch. The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D251
Thu, 03 Aug 2017 13:48:39 +0200 revset: rename unstable into orphan
Boris Feld <boris.feld@octobus.net> [Thu, 03 Aug 2017 13:48:39 +0200] rev 33795
revset: rename unstable into orphan Don't touch unstable volatile set name, only the revset name. The volatile set name will be updated in a later patch. The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D250
Fri, 04 Aug 2017 18:41:16 +0200 test: update evolution config
Boris Feld <boris.feld@octobus.net> [Fri, 04 Aug 2017 18:41:16 +0200] rev 33794
test: update evolution config evolution* config has been rewritten in stabilization* in the previous patch, update tests file to use the new names. Differential Revision: https://phab.mercurial-scm.org/D249
Thu, 03 Aug 2017 11:38:22 +0200 config: rename evolution config into stabilization
Boris Feld <boris.feld@octobus.net> [Thu, 03 Aug 2017 11:38:22 +0200] rev 33793
config: rename evolution config into stabilization Use aliases for backward-compatibility. Though I'm not sure how to emit compatibility warnings with aliases. Test configuration are updated in the next patch. The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D248
Thu, 03 Aug 2017 05:12:35 +0530 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 03 Aug 2017 05:12:35 +0530] rev 33792
morestatus: move fb extension to core by plugging to `hg status --verbose` morestatus extension in fbext use to show more context about the state of the repo like the repository is in a unfinished merge state, or a rebase is going on, or histedit is going on, listing the files which need to be resolved and also suggesting ways to handle the situation. This patch moves the extension directly to core by plugging it into the --verbose flag of the status command. So now if you are in any unfinished state and you do hg status -v, it will show you details and help related to the state. The extension in fbext also shows context about unfinished update state which is not ported to core as that plug in hooks to update command which need to be tackled somewhat differently. The following configuration will turn the behaviour on by default [commands] status.verbose = 1 You can also skip considering some states like bisect as follows: [commands] status.skipstates=bisect This patch also adds test for the feature. .. feature:: ``hg status -v`` can now show unfinished state. For example, when in an unfinished rebase state, ``hg status -v`` might show:: # The repository is in an unfinished *rebase* state. # No unresolved merge conflicts. # To continue: hg rebase --continue # To abort: hg rebase --abort Differential Revision: https://phab.mercurial-scm.org/D219
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 33791
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 33790
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 33789
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 33788
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 33787
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 33786
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 33785
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
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip