You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by Apache subversion Wiki <co...@subversion.apache.org> on 2012/08/10 15:01:53 UTC

[Subversion Wiki] Update of "MultiLayerMoveUpdate" by PhilipMartin

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Subversion Wiki" for change notification.

The "MultiLayerMoveUpdate" page has been changed by PhilipMartin:
http://wiki.apache.org/subversion/MultiLayerMoveUpdate

New page:
= The Problem =

A typical move of A/B to X looks like:

|| op-depth || local-relpath || presence     || revision || moved-to || moved-here ||
||    0     ||    A          || normal       ||    6     ||          ||            ||
||    0     ||    A/B        || normal       ||    6     ||          ||            ||
||    0     ||    A/B/C      || normal       ||    6     ||          ||            ||
||    2     ||    A/B        || base-deleted ||          ||     X    ||            ||
||    2     ||    A/B/C      || base-deleted ||          ||          ||            ||
||    1     ||    X          || normal       ||    6     ||          ||    1       ||
||    1     ||    X/C        || normal       ||    6     ||          ||    1       ||
|||||||||||| '''table A1''' ||

If the working copy is updated the base tree changes, say:

|| op-depth || local-relpath || presence     || revision || moved-to || moved-here ||
||    0     ||    A          || normal       ||    8     ||          ||            ||
||    0     ||    A/B        || normal       ||    8     ||          ||            ||
||    0     ||    A/B/C      || normal       ||    8     ||          ||            ||
||    0     ||    A/B/D      || normal       ||          ||          ||            ||
||    2     ||    A/B        || base-deleted ||          ||     X    ||            ||
||    2     ||    A/B/C      || base-deleted ||          ||          ||            ||
||    1     ||    X          || normal       ||    6     ||          ||    1       ||
||    1     ||    X/C        || normal       ||    6     ||          ||    1       ||
|||||||||||| '''table A2''' ||

At present this produces a tree-conflict on A/B since the changes made to A/B are in the deleted tree. It also "breaks" the move since the move source and destination revisions no longer match.  To "fix" the move the destination has to be modified to match the source. This involves changing the revsion of X and X/C, adding new nodes like X/D and removing deleted nodes (none in this example).

|| op-depth || local-relpath || presence     || revision || moved-to || moved-here ||
||    0     ||    A          || normal       ||    8     ||          ||            ||
||    0     ||    A/B        || normal       ||    8     ||          ||            ||
||    0     ||    A/B/C      || normal       ||    8     ||          ||            ||
||    0     ||    A/B/D      || normal       ||          ||          ||            ||
||    2     ||    A/B        || base-deleted ||          ||     X    ||            ||
||    2     ||    A/B/C      || base-deleted ||          ||          ||            ||
||    1     ||    X          || normal       ||    8     ||          ||    1       ||
||    1     ||    X/C        || normal       ||    8     ||          ||    1       ||
||    1     ||    X/D        || normal       ||    8     ||          ||    1       ||
|||||||||||| '''table A3''' ||

We also have to consider updating the working files. File that are unchanged between r6 and r8 need no update. If there are changes between r6 and r8 and the working file is unmodified then the working file can simply be replaced, but if the working file is modified then the r6 to r8 changes need to merged into the working file. Changes to the working file need to be made via the workqueue mechanism so that they happen if and only if the NODES row changes.