Summary:
Using `testedwith = 'internal'` is not a good habit [1]. Having it
auto-updated in batch would also introduce a lot of churn. This diff makes
them "ships-with-fb-hgext". If we do want to fill the ideal "testedwith"
information, we could put it in a centric place, like a "fbtestedwith"
extension rewriting those "ships-with-fb-hgext" on the fly.
Maybe having in-repo tags for tested Mercurial releases is also a good idea.
[1]: www.mercurial-scm.org/repo/hg/rev/2af1014c2534
Test Plan: `arc lint`
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D4244689
Signature: t1:4244689:1480440027:3dc18d017b48beba1176fbfd120351889259eb4b
Summary:
The old code didn't test if the new commit will become empty correctly, if its
"memworkingcopy" contains changes inherited from its parent. This diff fixes
the problem.
Thanks @stash for discovering the issue!
Test Plan: Added a test case for this issue. Make sure the old code cannot pass.
Reviewers: #mercurial, stash
Reviewed By: stash
Subscribers: mjpieters, stash
Differential Revision: https://phabricator.intern.facebook.com/D4113438
Signature: t1:4113438:1478077373:194104b902bdfe6827858c2916a7f3f0cd83ee6c
Summary:
Previously `absorb` does not care too much about copies or renames and
assumesa file path only exists in every changeset of `stack[k:len(stack)]`,
but does not exist in any of `stack[0:k]`. If this assumption is not true,
absorb will likely crash.
This patch implements copy or rename handling correctly. After this patch,
renames happens to a single file is tracked correctly. Copies are ignored
by default. For the "double move" case, like:
hg cp a a1
hg cp a a2
hg rm a
We only follow the first path (sorted alphabetically). In this case, changes
to "a1" could affect the content of "a" in a previous changeset, while changes
to "a2" couldn't.
Test Plan: Added a new test
Reviewers: durham, #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3941438
Signature: t1:3941438:1475166850:97461174619d469750146e25f6bff16dae19bd3d
Summary:
When diffing a with b, if a is empty, we don't insert a "dummyendline" (see
line 214) because we do not have the last line to copy. In this case, if an
insertion happens, we have no "nearbylinenums" (see line 274) to visit.
The current code assumes "nearbylinenums" have at least one element, which
is wrong in the above case and will crash the program.
The fix is to add a check about whether "annotated" (aka. "a") is empty or
not.
Test Plan: Run `test-absorb-filefixupstate.py`
Reviewers: #sourcecontrol, ttung, rmcelroy
Reviewed By: rmcelroy
Subscribers: durham, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3867686
Tasks: 13371265
Signature: t1:3867686:1474289020:a183e6837e6e0afb8a5d56641689e240e8cd78c9
Summary:
This feature allows the user to choose what lines exist in what changesets
precisely, for example:
HG: editing a
HG: "y" means the line to the right exists in the changeset to the top
HG:
HG: /---- 991104c93ef1 commit 1
HG: |/--- aa7e21df9b0b commit 2
HG: ||/-- 05b39f5d9141 commit 3
HG: |||
yyy : 1
yy : 2
y : 3
The feature can be used to "move" lines among changesets, or generally
editing the contents in a new way. So it's not limited in the "absorb"
use-case. We may want to give it another name in the future.
Test Plan: Added a new test case
Reviewers: #mercurial, rmcelroy, ttung
Reviewed By: rmcelroy
Subscribers: rmcelroy, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3841494
Signature: t1:3841494:1473769708:1bb2a46c010222438ceaae69ea0dca39e37581d2
getfile should return the file mode as (islink, isexec),
but it was returned as (islink, isbinary).
As a result, using 'hg absorb' removed executable mode from
the relevant changeset so the mode change showed up in the working directory.
Issue reported with test case by Thomas De Schampheleire.
Summary:
This seems to be an elegant choice. It does not conflict with other names,
and it does explain the concept to some extent vividly.
Credit goes to [trousers at lobste.rs](https://lobste.rs/s/nws1uj/help_us_name_new_mercurial_feature/comments/u4tsw7#c_u4tsw7).
Test Plan: Run the existing tests.
Reviewers: #sourcecontrol, ttung, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D3763992
Signature: t1:3763992:1472049269:5bb9de3b7b3a0f0dd9587b952151fc38351bc822