chiark / gitweb /
metadata merging plan
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 29 Jan 2012 20:58:57 +0000 (20:58 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 29 Jan 2012 20:58:57 +0000 (20:58 +0000)
DESIGN
FORMAT

diff --git a/DESIGN b/DESIGN
index 036cbec757ab4ee966798c1fd2ffb9cc36b001fc..a3e5c978d6f3be441bdb38b92bbe104b36bcbb2d 100644 (file)
--- a/DESIGN
+++ b/DESIGN
@@ -220,3 +220,18 @@ OK so here is a plan:
   Commit, adjusting the parents of the new commit to the original
   parents if we made the merge with special massaged parents.
   We may still need to have custom merge drivers for metadata.
+
+
+Strategies for each metadata file merge:
+
+       in base/tip     same patch's tip        dep -> base     base -> tip
+
+ msg            T      textual merge           rm from src     not in src
+ deps           T      list merge              rm from src     not in src
+ deleted        T      std existence merge     rm from src     not in src
+ patch-                BT      must be same            rm from src     must be same
+ topgit-        T      must be same            rm from src     not in src
+ [^+]*-                ??      textual merge           rm from src     rm from src
+ +included     BT      list merge        rm from non-tb src    list merge
+ +*-           ??      textual merge     rm from non-tb src    textual merge
+ *[^-]         ??      die, aborting all ops, if found in any tb src or branch
diff --git a/FORMAT b/FORMAT
index 473946e32f37daec824e4176f2fd924d6a4c029f..7313ab8b2ea228857972ce978e2f5a17d43905f4 100644 (file)
--- a/FORMAT
+++ b/FORMAT
@@ -11,43 +11,52 @@ In-tree, there are metadata files in .topbloke
     or changes from bases or dependencies:
 
        msg             patch "commit message"
-                       ("# not applicable" in bases)
+                       exist only in tip branch
 
        deps            direct dependencies, one per line
                        as either:
                                <topbloke patch name>
                                .f <ref name including refs/heads/>
                                .tg <ref name not including refs/heads/>
-                       (empty in base branches)
+                       exist only in tip branch
 
        deleted         exists (but empty) if branch is deleted
-                       exist in tip only branch
+                       exist only in tip branch
 
        patch-          name of this topbloke patch (plus a newline)
-                       exists in base and tip
+                       exists in base and tip, identical value
 
        topgit-         name of the topgit branch that this was
                        imported from and which we should merge from
-                       (plus a newline); exists in tip only
+                       (plus a newline)
+                       exist only in tip branch
 
        [^+]*-          another property that applies to this patch;
                        if not known to this version of topbloke then it
                        is safe to:
                          - merge this file as text when merging
-                           from base into base or tip into tip
+                           from base into base, or tip into tip,
+                           and perhaps ask user to fix up conflicts
+                           after warning if they feel expert
                          - throw away this file when merging from
-                           base into tip or from dep into base
+                           from dep into base or base into tip
 
     Files which inherit contents and changes from dependencies
     have names starting with "+":
 
        +included       actual included deps, one per line
-                               format as for deps
+                       format as for deps
+                       exists in tip and base branches
 
        +*-             another property that is inherited; it is also
                        safe to:
                         - merge this file as text when merging
-                          from tb deps into bases or bases into tips
+                          from tb dep into base, base into tip
+                          or tip into tip
+
+    Any unknown metadata files not ending in "-" are fatal: tb
+    will refuse to operate on patches either of whose branches
+    have such files.
 
 
 <full-name> has the format: