subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache subversion Wiki <comm...@subversion.apache.org>
Subject [Subversion Wiki] Update of "MultiLayerMoveUpdate" by JulianFoad
Date Fri, 21 Dec 2012 18:59:03 GMT
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 JulianFoad:
http://wiki.apache.org/subversion/MultiLayerMoveUpdate?action=diff&rev1=4&rev2=6

- = The Problem =
+ Update brings in a *change* to a tree that is locally moved.
  
- A typical move of A/B to X looks like:
+ The starting point is: a local move from (say) A/B to X.
  
+ We design the update editor such that it brings in the new base node tree at A/B and marks
a tree conflict on X.  It does that unconditionally -- even if the changes are "simple". 
The update-move functionality is called later, at the end of the main update.
- || 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 from A@6 to A@8 where something
inside the deleted tree changes:
+ In update-editor, we will not be making any changes in A/B, we will only use that as a source
of information for one side of the diff that we need to perform.
  
- || 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.
- 
- = Mixed Revision Moves =
- 
- A mixed revision copy:
- 
- || op-depth || local-relpath || presence     || revision ||
- ||    0     ||    A          || normal       ||    4     ||
- ||    0     ||    A/B        || normal       ||    6     ||
- ||    1     ||    X          || normal       ||    4     ||
- ||    1     ||    X/B        || not-present  ||          ||
- ||    2     ||    X/B        || normal       ||    6     ||
- |||||||| '''table B1''' ||
- 
- and two nested copies:
- 
- || op-depth || local-relpath || presence     || revision ||
- ||    0     ||    A          || normal       ||    4     ||
- ||    0     ||    A/B        || normal       ||    6     ||
- ||    1     ||    X          || normal       ||    4     ||
- ||    1     ||    X/B        || normal       ||    4     ||
- ||    2     ||    X/B        || normal       ||    6     ||
- |||||||| '''table B2''' ||
- 
- both get committed as two copies:
- 
- ||<style="border:none;"> A /X (from /A:4) ||
- ||<style="border:none;"> A /X/B (from /A/B:6) ||
- 
- If the revisions later than r4 do not affect the /A tree then we can also commit the delete
of /A but the result doesn't look like a mixed-revision move:
- 
- ||<style="border:none;"> D /A ||
- ||<style="border:none;"> A /X (from /A:4) ||
- ||<style="border:none;"> A /X/B (from /A/B:6) ||
- 
- This is a move of /A with an additional copy inside the move destination.
- 
- Moves are essentially single revision in the repository: the same node gets deleted and
copied and the deleted node has to be single-revision.
- 
- = A WORKING Update Editor? =
- 
- We use the difference between source and destination in table A1 to create the workqueue
items. Those workqueue items get installed with the transaction that modifies the corresponding
WORRKING row. Do we have one transaction for all rows or one transaction per row? In what
order do we process the rows in the table A1 difference?  Perhaps we  drive a new working-update
editor? (It might be an EV2 editor.)
- 
- = New Conflicts =
- 
- When the move update needs to add or delete rows from the destination, rather than simply
updating the revision, that may lead to new tree conflicts.  Suppose I start with table A1
and add X/D:
- 
- || 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       ||
- ||    2     ||    X/D        || normal       ||          ||          ||            ||
- |||||||||||| '''table C1''' ||
- 
- After the move destination is updated X/D will be 'R'eplaced:
- 
- || 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       ||
- ||    2     ||    X/D        || normal       ||          ||          ||            ||
- |||||||||||| '''table C2''' ||
- 
- I'm not sure where we store this tree-conflict. Multi-layer move allows multiple layers
of moves, are the tree-conflicts always at the top layer?
- 

Mime
View raw message