From b1f17833c089fca6d8f0c22ee7d13f2c8bc39ab2 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 25 Apr 2012 23:06:25 +0100 Subject: [PATCH] strategy: wip --- strategy.tex | 49 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/strategy.tex b/strategy.tex index 3760941..8c87f91 100644 --- a/strategy.tex +++ b/strategy.tex @@ -1,42 +1,59 @@ \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}$. -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}$. -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$. +\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$. -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 -- 2.30.2