This is an archive of the discontinued Mercurial Phabricator instance.

tests: rewrite test-rebase-detach.t using drawdag
ClosedPublic

Authored by martinvonz on Jul 15 2017, 2:13 AM.

Details

Summary

This makes it much clearer because each test case can have exactly the
graph it wants (no extra cruft just because other tests want it).

Diff Detail

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

Event Timeline

martinvonz created this revision.Jul 15 2017, 2:13 AM
quark accepted this revision.Jul 15 2017, 1:55 PM
quark added a subscriber: quark.

Nice rewrite! I have gone through the history of this file, discussion at https://bz.mercurial-scm.org/1950 and all look good.

I think this can be committed as-is.

tests/test-rebase-detach.t
86

This test case seems removable. The --detach option was added by 66d954e76, and removed by 50f434510.

I guess you are aware of this and just wanted the new code to be functionally equivalent to the old code.

215–222

Could be slightly simplified to:

> H
> | G
> |/|
> F E
> |/
> A
martinvonz marked an inline comment as done.Jul 16 2017, 12:46 AM
martinvonz updated this revision to Diff 184.
martinvonz added inline comments.Jul 16 2017, 12:49 AM
tests/test-rebase-detach.t
86

True, it seems like something we test in about 10 other places in rebase tests. It also seems like the first test case in this file can be removed. It seems like that would be covered by the second. But yes, I just wanted to simplify in this patch.

durin42 accepted this revision.Jul 17 2017, 6:18 PM
This revision is now accepted and ready to land.Jul 17 2017, 6:18 PM
This revision was automatically updated to reflect the committed changes.