( )⚙ D12099 destutil: if wdp is obsolete, update to the closest non-obsolete ancestor

This is an archive of the discontinued Mercurial Phabricator instance.

destutil: if wdp is obsolete, update to the closest non-obsolete ancestor
ClosedPublic

Authored by av6 on Jan 28 2022, 12:39 PM.

Details

Summary

As the original comments suggest, using prune as a model here was an existing
idea, and now this patch implements it.

I think it would be even better to do what solveobswdp() from evolve does (in
short, it allows to update to a successor of the closest ancestor even if that
ancestor is obsolete), but that is outside of this series' scope.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

av6 created this revision.Jan 28 2022, 12:39 PM

This looks an improvement.

However maybe we can go further. What about:

Update to the successors of the first non pruned ancestors. (Possibly to successors of obsolete ancestors of pruned successors of obsolete ancestors of the pruned changesets).

marmoute accepted this revision.Jan 31 2022, 12:04 PM
av6 added a comment.Feb 3 2022, 7:12 AM

Update to the successors of the first non pruned ancestors. (Possibly to successors of obsolete ancestors of pruned successors of obsolete ancestors of the pruned changesets).

Yes, I've mentioned it in the commit description together with the reason I'm going the simplest way of handling obsolete wdp in this series. This patch is primarily just to make test-update-branches.t pass.

Also when I had a WIP patch porting evolve's solveobswdp() to core it looked like it could be pretty bikesheddable, which is not a quality I'd like a patch to have while we're not too far away from code freeze.

In D12099#185943, @av6 wrote:

Update to the successors of the first non pruned ancestors. (Possibly to successors of obsolete ancestors of pruned successors of obsolete ancestors of the pruned changesets).

Yes, I've mentioned it in the commit description together with the reason I'm going the simplest way of handling obsolete wdp in this series. This patch is primarily just to make test-update-branches.t pass.

To clarify, I am all good with that.

Alphare accepted this revision.Feb 3 2022, 11:33 AM
This revision is now accepted and ready to land.Feb 3 2022, 11:33 AM