<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39728 >
Finally managed to reproduce this real_unit_change_homecity() problem
(seen it every now and then while testing S2_1)
This happens in the middle of the civil war. As comment in
civil_war() states, stack conflicts are not resolved before all the
cities are transfered.
When city is transfered to new owner, supported units outside cities
are teleported back home (move_unit() call in
real_unit_change_homecity()). Now if this unit happens to be
transport, it might have enemy unit on board (unresolved stack
conflict). move_unit() teleports also cargo units, and calls
handle_unit_move_consequences() for them. One such move consequence is
that enemy unit entering city will conquer it. So city is transfered
back to original owner.
This is case at least in S2_1, S2_2 and trunk.
Freeciv-dev mailing list