Commit Graph

9 Commits

Author SHA1 Message Date
Jun Wu
14d1ae5689 amend: do not rebase obsoleted commits for next --rebase
Summary:
I hit this when editing the dag stack. This resolves a "BUG" in the
test-amend-nextrebase.t test.

Reviewed By: singhsrb

Differential Revision: D17357387

fbshipit-source-id: 309efe34dee71180abdbdb5a9fe2e7b731230051
2019-09-12 20:00:28 -07:00
Mark Thomas
013aa19333 mutation: don't allow divergence when rebasing
Summary:
In general, mutation tracking doesn't care about divergence.  However, in the
case of rebase, it doesn't make sense to allow divergence to occur if we can
avoid it by omitting some of the commits to rebase.

This makes rebase behaviour more like old obsmarker-based behaviour.  This
breaks a test for mutation copying markers, so update those to use metaedit,
which has the copying behaviour for both obsmarkers and mutation.  At some
point we should make rebase behave better in these cases.

Reviewed By: quark-zju

Differential Revision: D17136480

fbshipit-source-id: 9e465b7fc8bda33e7a746e4df68410713e2be37e
2019-09-02 03:13:51 -07:00
Mark Thomas
ebe5c4ae68 mutation: convert test-amend-nextrebase to mutation and visibility
Summary:
Convert the test case `test-amend-nextrebase` to use new mutation and visibility tracking.

In doing so, reveals a bug where `hg next --rebase` can rebase obsolete commits.

Reviewed By: quark-zju

Differential Revision: D17136483

fbshipit-source-id: dcda88d1e8c1f435d6211cf5b76791c5a76ee343
2019-09-02 03:13:50 -07:00
Mark Thomas
efe45b4a08 amend: add a test for next --rebase with visible predecessors
Summary:
Add a new test for `hg next --rebase` for when a predecessor of the commit
being rebased is also visible.  The predecessor should not be rebased.

Reviewed By: quark-zju

Differential Revision: D17136482

fbshipit-source-id: fa2c91ebc14c72f6a8c13c4549447809090489b3
2019-09-02 03:13:50 -07:00
Mark Thomas
540f1f0828 amend: use commit hashes rather than revision numbers for moverelative
Summary:
Use of revision number is being deprecated.  Change the moverelative commands
(`next`, `previous`, ...) to use nodes internally.

Reviewed By: mitrandir77

Differential Revision: D16898856

fbshipit-source-id: 71f6fc32776e2912795f086d11897d36b942b608
2019-08-20 11:45:23 -07:00
Mateusz Kwapich
75c069b199 heurestics to resolve a obs/non-obs ambiguity
Summary:
This particular situation happens in the wild when the amend doesn't rebase
because of conflicts and users work on their stack using `hg prev` and `hg next
--rebase`. In this case when there's non-obsolete child that's always the child
we want to choose.

We're verbose about what we're doing so it's not confusing to the users.

Reviewed By: quark-zju

Differential Revision: D14560584

fbshipit-source-id: a453c0301a5156eea0d19ceb40d9a64e80b7fca7
2019-03-22 03:38:52 -07:00
Mateusz Kwapich
0034b0d018 test the "hg next" behaviour in case of obs/non-obs ambiguity
Summary: The next commit introduces a heurestic to resolve those.

Reviewed By: zertosh

Differential Revision: D14560585

fbshipit-source-id: b62b59e4b254e59e88cfc7859aa21feffc360b05
2019-03-22 03:38:52 -07:00
Phil Cohen
3e592b81ae filemerge: add number of textual conflicts in each file to error message
Summary:
When you get an error, let's print the number of conflicts in each file. This will give the user some sense of how much work they have to do.

The code change is entirely in `filemerge.py`, and `tests/test-merge-conflict-count.t` adds a new test.

Reviewed By: quark-zju

Differential Revision: D9815243

fbshipit-source-id: 1b73a1db293902ac7242997a7d6ae09478344068
2018-10-22 12:47:41 -07:00
Saurabh Singh
6317ba0ca2 amend: replace with the fbamend extension
Summary:
The functionality we care about is provided by the `fbamend`
extension. Therefore, lets replace the `amend` extension with the `fbamend`
extension.

Reviewed By: farnz

Differential Revision: D10320739

fbshipit-source-id: 5700d39f488777fcc4033f60ce0a51cda15ef2ad
2018-10-11 06:59:23 -07:00