chiark / gitweb /
Unwanted dep removal search - difficulties
[topbloke.git] / DESIGN
diff --git a/DESIGN b/DESIGN
index f3c3f828720c5f47c5a4646463950202ba99b009..83465d90eb8f54d170112d74de6b535458b74ae9 100644 (file)
--- a/DESIGN
+++ b/DESIGN
@@ -22,7 +22,7 @@ Basic update algorithm:
 
        Find the (latest) common ancestor.
 
-       Check for unwanted dependency removals.  
+       Check for unwanted dependency removals.
        An unwanted dependency removal is
           A branch in the desired included deps
           Which exists in the common ancestor's actual included deps
@@ -40,6 +40,9 @@ Basic update algorithm:
             stops us looking into the hitory of non-topbloke-controlled
             branches).  This can be done with git-rev-list
             --remove-empty.
+         * It also stops at any point where we meet a commit which
+           does have the dep in the actual included deps.  We have
+           to do this by hand.
           * The the relevant unwanted removal commit for that dep is
             the most recent unwanted removal commit, as defined.
        Select the unwantedly removed dep whose relevant unwanted
@@ -109,7 +112,7 @@ Basic update algorithm:
 The "best order" for merges is in order of recency of common
 ancestor, most recent first, and if that does not distinguish,
 merging from local branches first.
-     
+
 "Recency" refers to the order from git-rev-list --date-order.
 
 Actual included deps:
@@ -222,7 +225,7 @@ OK so here is a plan:
   Check for merge success in the index and compare to exit status
   from git-merge (which is 1 if the merge failed).
   Adjust the metadata.
-  Print appropriate big fat warnings if we have merge conflicts in our 
+  Print appropriate big fat warnings if we have merge conflicts in our
   metadata.
   Commit, adjusting the parents of the new commit to the original
   parents if we made the merge with special massaged parents.
@@ -231,14 +234,74 @@ OK so here is a plan:
 
 Strategies for each metadata file merge:
 
-       in base/tip     same patch's tip        dep -> base     base -> tip
+       in base/tip     same patch & branch     dep -> base     base -> tip
 
  msg            T      textual merge           rm from src     not in src
- deps           T      list merge              rm from src     not in src
+ deps          B       list merge              rm from src     rm from 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
+ topgit-       B       std exist/text merge    rm from src     rm from 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
+
+
+
+
+
+Unwanted removal search subgraphs:
+
+  rm           relevant removal
+  inc
+
+   rm          impossible to undo removal, arrgh, terminates search
+inc  inc..
+/  ???   \
+
+    rm
+inc..  rm..    merge of a removal, search down the rm path
+/  [inc]  \
+
+  inc          ??? call it an inclusion, terminate the search
+  rm
+
+   inc         merge of an inclusion, terminates search
+inc..  rm..
+/  [rm]  \
+
+   inc         ??? call it an inclusion, terminate search
+rm..  rm..
+/  ???    \
+
+
+  rm   inc       inc          rm       irrelevant
+  rm   inc     inc inc..    rm rm..
+
+
+
+                                       proposed                   
+                              /          \                        |
+                            /`---------- \ -----<--------.|
+                            /              |                      |
+                          |               |               |
+               RE-INCLUDE inc             rm REMOVAL      |
+               \          |              /  /             |
+                * REMOVAL rm            /  /              |
+                                  |           inc *               |
+                          rm          /                   |
+                          |          /                    |
+                          rm        /                     |
+                          |        /`--------<-----------.|
+                          inc     /                       |
+                          |      /                        |
+               RE-INCLUDE inc   /                         |
+                       \          |    /                          |
+                * REMOVAL rm  /                           |
+                           |  /                                   |
+                           inc                                    |
+                             \                            |
+                              `------------<-------------.|
+                                                          |
+                                                          |
+                                                         IT