Sun, 20 Aug 2017 10:55:11 -0700 revset: remove order information from tree (API)
Jun Wu <quark@fb.com> [Sun, 20 Aug 2017 10:55:11 -0700] rev 34011
revset: remove order information from tree (API) Keeping `order` in tree makes AST operation harder. And there could be invalid cases if trees could be generated and compounded freely, like: SetA(order=define) & SetB(order=define) ^^^^^^ couldn't be satisfied This patch changes the code to calculate order on the fly, during tree traversal. Optimization of reordering `and` arguments is preserved by introducing a new internal operation `flipand`. .. api:: revset.stringset() now takes 'order' as the last argument. Differential Revision: https://phab.mercurial-scm.org/D451
Mon, 28 Aug 2017 23:44:47 -0700 revset: drop optimization about reordering "or" set elements
Jun Wu <quark@fb.com> [Mon, 28 Aug 2017 23:44:47 -0700] rev 34010
revset: drop optimization about reordering "or" set elements The reordering optimization is more important for "and" than "or", given the implementation details about "addset" and "filteredset" - reordering "or" may help "__contains__" test but not iteration, reordering "and" could help both. We are going to simplify the tree to remove ordering information. Removing "or" reordering optimization would make things simpler. This effectively reverts c63cb2d10d6d. It tracks back to the "orset" function added by the initial commit of revset (c9ce8ecd6). In the future, we might consider optimization at runtime (ex. do reordering and rewrites inside "orset"). Differential Revision: https://phab.mercurial-scm.org/D561
Tue, 29 Aug 2017 17:51:54 -0700 rebase: use _ctxdesc in one more place
Jun Wu <quark@fb.com> [Tue, 29 Aug 2017 17:51:54 -0700] rev 34009
rebase: use _ctxdesc in one more place This simplifies the code. Differential Revision: https://phab.mercurial-scm.org/D566
Sun, 27 Aug 2017 02:47:47 -0700 rebase: move working parent and bookmark for obsoleted revs (BC)
Jun Wu <quark@fb.com> [Sun, 27 Aug 2017 02:47:47 -0700] rev 34008
rebase: move working parent and bookmark for obsoleted revs (BC) Previously, obsoleted revs with successors in destination are completely ignored. That caused some inconvenience when working copy is obsoleted. Most commands avoid working copy being obsoleted, but `hg pull` is an exception. This patch makes rebase able to move bookmarks or working parent for those obsoleted revs. It does so by keeping the obsoleted revs in `state` and marking them as "skipped, rebased to desired destination" during run-time. This reverts part of the behavior change of 3b7cb3d17137 and D24. Differential Revision: https://phab.mercurial-scm.org/D527
Tue, 29 Aug 2017 17:49:13 -0700 rebase: remove an unnecessary adjustdest in clearrebased
Jun Wu <quark@fb.com> [Tue, 29 Aug 2017 17:49:13 -0700] rev 34007
rebase: remove an unnecessary adjustdest in clearrebased `rev` being "skipped" could currently be caused by moving `rev` does not create a new commit. In this case, `state[rev]` is already changed to `p1`, and is a sane destination for bookmark or working parent movement. Therefore an additional destination adjustment is unnecessary. Differential Revision: https://phab.mercurial-scm.org/D565
Mon, 21 Aug 2017 20:22:07 -0700 rebase: sort destmap topologically
Jun Wu <quark@fb.com> [Mon, 21 Aug 2017 20:22:07 -0700] rev 34006
rebase: sort destmap topologically Previously rebase source and destination could not overlap. But with the multi-destination support, source and destination could reasonably partially overlap. That requires another topological sort on `{sourcerev: destrev}` graph (destmap). This patch implements that. If a revision's destination is itself, the error message gets changed from "source is ancestor of destination" to "source and destination form a cycle". Not marking as BC since automation should depend on exit code, not error message. Differential Revision: https://phab.mercurial-scm.org/D470
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -6 +6 +10 +30 +100 +300 +1000 +3000 +10000 tip