chiark / gitweb /
strategy: wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 25 Apr 2012 22:06:25 +0000 (23:06 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 25 Apr 2012 22:06:25 +0000 (23:06 +0100)
strategy.tex

index 3760941afd1c8b4707132d6b97cbdf9d6a155d61..8c87f918141929d2c4bf36ff28ebc32b14a19ffe 100644 (file)
@@ -1,42 +1,59 @@
 \section{Strategy}
 
 \section{Strategy}
 
-We start with some commits $S_0 \ldots S_n$
-(where $S_0 = L$ and is the current git ref for $\pl$).
+When we are trying to do a merge of some kind, in general,
+we want to merge some commits $S_0 \ldots S_n$.
+We'll write $S_0 = L$.  We require that $L$ is the current git ref
+for $\patchof{L}$.
 
 %Let $\set E_{\pc} = \bigcup_i \pendsof{S_i}{\pc}$.
 
 
 %Let $\set E_{\pc} = \bigcup_i \pendsof{S_i}{\pc}$.
 
-Invoke Plan $\patchof \pl$ where the algorithm Plan $\pc$ is as
-follows:
+\subsection{Notation}
 
 
+\begin{basedescript}{
+\desclabelwidth{5em}
+\desclabelstyle{\nextlinelabel}
+}
+\item[ $\depsreqof{K}$ ]
+The set of direct dependencies (in the form $\py$)
+requested in the commit $K$ ($K \in \pn$) for the patch $\p$.
 
 
-Notation:
+\item[ $\pc \succ_1 \{ \p, \pq \ldots \}$ ]
+The Topbloke commit set $\pc$ has as direct contributors
+(see below) exactly $\p, \pq, \ldots$.  This is an acyclic relation.
 
 
- $\pc \succ_1 \{ \p, \pq \ldots \}$ 
- the Topbloke commit set $py$ has as direct contributors exactly
- $\p, \pq, \ldots$.  This is an acyclic relation.
+\item[ $\p \succ \pq$ ]
+The commit set $\p$ has as direct or indirect contributor the commit
+set $\pq$.
+This is an acyclic relation, and is the completion of $\succ_1$ into a
+partial order.
 
 
- Extend this into the partial order $\succ$.
+\end{basedescript}
 
 
-$\py \succ \pq$ 
+\subsection{Planning phase}
 
 
+We use a recursive planning algorith, recursing over Topbloke commit
+sets (ie, sets $\py$ or $\pn$).  We'll call the commit set we're
+processing at each step $\pc$.  We start with $\pc = \pl$
+where $\pl = \patchof{L}$.
 
 
-We intend to merge all $\set E_{\pc} = \{ E_{\pc,j \ldots} \}$
+At each recursive step 
+we intend to merge all $\set E_{\pc} = \{ E_{\pc,j \ldots} \}$
 and all the direct contributors of $\pc$ (as determined below)
 into the existing git ref for $\pc$, to make $T_{\pc}$.
 and all the direct contributors of $\pc$ (as determined below)
 into the existing git ref for $\pc$, to make $T_{\pc}$.
-The direct contributors of $\pcn$ are the topbloke commit sets
+The direct contributors of $\pcn$ are the Topbloke commit sets
 corresponding to the tip branches for the direct dependencies of
 $\pc$.
 The sole direct contributor of $\pcy$ is $\pcn$.
 
 corresponding to the tip branches for the direct dependencies of
 $\pc$.
 The sole direct contributor of $\pcy$ is $\pcn$.
 
+\subsubsection{Planning step for $\pc = \pcn$.}
 
 
-For $\pc = \pcn$, choose an (arbitrary, but ideally somehow optimal in
+FIXME DEFINE $\set E$
+
+Choose an (arbitrary, but ideally somehow optimal in
 a way not discussed here) ordering of $\set E_{\pc}$, $E_j$ (for
 $j = 1 \ldots m$).  Remove from that set (and ordering) any $E_j$ which
 are $\le$ and $\neq$ some other $E_k$.
 
 a way not discussed here) ordering of $\set E_{\pc}$, $E_j$ (for
 $j = 1 \ldots m$).  Remove from that set (and ordering) any $E_j$ which
 are $\le$ and $\neq$ some other $E_k$.
 
-Notation: write $\depsreqof{K}$ to mean the direct dependencies
-(in the form $\py$) requested in the commit $K$.
-
 Initially let $T_{\pc,0}$ be the git ref for $\pcn$.  And let
 $\set D_0 = \depsreqof{T_{\pc,0}}$.
 For each $E_j$ starting with $j=1$ choose a corresponding intended
 Initially let $T_{\pc,0}$ be the git ref for $\pcn$.  And let
 $\set D_0 = \depsreqof{T_{\pc,0}}$.
 For each $E_j$ starting with $j=1$ choose a corresponding intended