runbot/forwardport/tests
Xavier Morel 8f27773f8d [IMP] forwardport: surfacing of modify/delete conflicts
Given branch A, and branch B forked from it. If B removes a file which
a PR to A later modifies, on forward port Git generates a
modify/delete conflict (as in one side modifies a file which the
other deleted).

So far so good, except while it does notify the caller of the issue
the modified file is just dumped as-is into the working copy (or
commit), which essentially resurrects it.

This is an issue, *especially* as the file is already part of a
commit (rather tan just a U local file), if the developer fixes the
conflict "in place" rather than re-doing the forward-port from scratch
it's easy to miss the reincarnated file (and possibly the changes that
were part of it too), which at best leaves parasitic dead code in the
working copy. There is also no easy way for the runbot to check it as
adding unimported standalone files while rare is not unknown
e.g. utility scripts (to say nothing of JS where we can't really track
the usages / imports at all).

To resolve this issue, during conflict generation post-process
modify/delete to insert artificial conflict markers, the file should
be syntactically invalid so linters / checkers should complain, and
the minimal check has a step looking for conflict markers which should
fire and prevent merging the PR.

Fixes #896
2024-09-27 12:37:49 +02:00
..
conftest.py [REM] *: default_crons fixture 2024-08-02 15:14:50 +02:00
test_batches.py [CHG] forwardport: perform forward porting without working copies 2024-07-08 14:37:14 +02:00
test_conflicts.py [IMP] forwardport: surfacing of modify/delete conflicts 2024-09-27 12:37:49 +02:00
test_limit.py [FIX] *: UX around fw=no 2024-09-17 11:31:20 +02:00
test_overrides.py [CHG] *: move forward-porting over to batches 2024-05-24 09:08:56 +02:00
test_simple.py [FIX] *: unnecessary warning on r- of forward port 2024-09-06 13:04:13 +02:00
test_updates.py [CHG] forwardport: perform forward porting without working copies 2024-07-08 14:37:14 +02:00
test_weird.py [IMP] *: modernize TestPRUpdate 2024-09-19 12:17:59 +02:00