Skip to content
Snippets Groups Projects
Commit 359d9bf9e090 authored by Georges Racinet's avatar Georges Racinet
Browse files

pull-force-topic: avoid divergence in overlapping pulls

As reported in heptapod#226, repeatedly importing the same
changeset rewrites it several time, which is the very
definition of content divergence.

With these changes, we avoid re-pulling a changeset that's
already present, yet obsolete. In the stacked PR use-case,
the end result is that the second topic is orphan, but that's
a much more frequent and easier to solve condition.

We actually already had something for a similar case in the
form of `non_obsolete_revs()`, but at the time the scenario of
stacked PRs had been thought of only a posteriori, at the
time of writing the docstring
for the corresponding `test_already_obsolete()`. We could
have thinked a bit more here.

In truth `non_obsolete_revs()` is probably useless with our
solution which is to take obsolete changesets into account in
the initial assessment of the pull to be made, and that
reflects with it not filtering anything in our existing tests.
Since we are on the eve of a major release, we still keep it
out of caution, only adding a direct test to restore coverage
parent 8344bcbd9667
No related branches found
No related tags found
1 merge request!19pull-force-topic: avoid divergence in overlapping pulls
Pipeline #
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment