This is an archive of the discontinued Mercurial Phabricator instance.

test-restack: add a case demonstrating restack rebase a single commit twice
ClosedPublic

Authored by quark on Jul 21 2017, 1:11 AM.
Tags
None
Subscribers
None

Details

Summary

The test shows that rebase moves "D" twice while it could have moved it only
once. It is a side effect when I spent 1.5 hours on investigating a user
report that a commit was duplicated with amend --rebase somehow. I didn't
have conclusion about that report (maybe it's because old inhibit was
used?), but thought it's nice to have this interesting test case added.

If hg rebase -r C -d B2 -q were moved after hg commit --amend -m B3,
then restack will move "D" only once.

It can be solved by using another topo sort, which was planned in the
multi-dest series [1].

[1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-June/100247.html

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

quark created this revision.Jul 21 2017, 1:11 AM
Herald added a reviewer: Restricted Project. · View Herald TranscriptJul 21 2017, 1:11 AM
quark edited the summary of this revision. (Show Details)Jul 21 2017, 1:14 AM
kulshrax accepted this revision.Jul 21 2017, 1:14 AM
This revision is now accepted and ready to land.Jul 21 2017, 1:14 AM
This revision was automatically updated to reflect the committed changes.