Martin von Zweigbergk <martinvonz@google.com> [Fri, 28 Jul 2017 22:04:27 -0700] rev 33794
exchange: simplify unbundle locking using context managers
Differential Revision: https://phab.mercurial-scm.org/D393
Martin von Zweigbergk <martinvonz@google.com> [Fri, 28 Jul 2017 22:42:10 -0700] rev 33793
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
Martin von Zweigbergk <martinvonz@google.com> [Mon, 14 Aug 2017 16:26:36 -0700] rev 33792
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
Martin von Zweigbergk <martinvonz@google.com> [Mon, 14 Aug 2017 16:14:14 -0700] rev 33791
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
Martin von Zweigbergk <martinvonz@google.com> [Fri, 28 Jul 2017 21:49:44 -0700] rev 33790
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
Jun Wu <quark@fb.com> [Sat, 12 Aug 2017 21:01:06 -0700] rev 33789
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
Jun Wu <quark@fb.com> [Mon, 14 Aug 2017 07:02:38 -0700] rev 33788
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
Jun Wu <quark@fb.com> [Fri, 04 Aug 2017 12:39:29 -0700] rev 33787
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
Jun Wu <quark@fb.com> [Thu, 10 Aug 2017 21:30:31 -0700] rev 33786
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
Jun Wu <quark@fb.com> [Sat, 12 Aug 2017 21:40:48 -0700] rev 33785
phabricator: remove an unnecessary writediffproperties call
This was introduced by D229. Thanks Yuya for finding it!
Differential Revision: https://phab.mercurial-scm.org/D366
Rishabh Madan <rishabhmadan96@gmail.com> [Sat, 12 Aug 2017 09:21:42 +0530] rev 33784
releasenotes: minor bug fix for index error while serializing
Differential Revision: https://phab.mercurial-scm.org/D356
Boris Feld <boris.feld@octobus.net> [Thu, 03 Aug 2017 15:31:54 +0200] rev 33783
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