Dear Wiki user,

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

The "MergeCodeImprovements" page has been changed by JulianFoad:
http://wiki.apache.org/subversion/MergeCodeImprovements?action=diff&rev1=6&rev2=7

Comment:
Add: Location History of a Node

+ === Location History of a Node ===
+ The merge code frequently deals with the location history of a node (a branch 
root, typically).  At the moment it mainly uses ''svn_mergeinfo_t'' to 
represent the location history.  But ''svn_mergeinfo_t'' isn't ideally suited 
for this task:
+ 
+  * It includes a '''non-inheritable''' flag on each revision range, which is 
meaningless in this context.
+  * Because of the '''non-inheritable''' flags, all the algebra functions 
require the caller to choose what to do about inheritability, and this option 
is hard to understand.  Since inheritability is irrelevant in this context, 
this just makes it hard to choose the right option.
+  * It requires an additional '''has_revision_zero_history''' flag to fully 
capture an arbitrary path's history.  Branches used in merging are very 
unlikely  to extend to revision zero in real life, so any code intended to make 
 use of this flag probably isn't being tested and may not work.
+  * It doesn't identify the repository; that information has to be carried 
externally.
+ 
+ So we should introduce a new data structure that captures the location 
history of a node.  I have made a start on such a thing by introducing a 
'''branch_history_t''' structure and some functions:
+ 
+  * ''branch_history_t''
+  * ''location_on_branch_at_rev''(branch_history, rev) => pathrev
+  * ''branch_history_intersect_range''(branch_history, oldest_rev, 
youngest_rev) => branch_history
+  * ''branch_history_get_endpoints''(branch_history) => oldest_pathrev, 
youngest_pathrev
+ 
+ At present it uses ''svn_mergeinfo_t'' (and additional information) 
internally, but it might be better to change it to use an array of 
''svn_repos_location_t'' or something else instead.  At least it's wrapped a 
bit better for now.
+ 
  === Prototype new merge code in Python ===
  It would be extremely handy to be able to write new client-layer merge code 
in Python.  The easiest way to start doing this would probably be to write a 
Python command-line program that implements the equivalent of "svn merge" and 
uses either the swig-Python bindings or the ctypes-Python bindings to access 
Subversion library APIs.  (In particular, don't try to embed a Python merge 
module inside the 'svn' C program, unless somebody can show us how to do that 
quickly and easily.)
  

Reply via email to