X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;ds=sidebyside;f=strategy.tex;h=eff0adfd8ca423dd3668b48c386189f352d086cc;hb=f89923e74f62530c7aa6633bf2b13fec8ec1bfc0;hp=a3acc81ec7560dec9a0cd0e9e7b2311ac10a4194;hpb=790de021ff6ec354b1bf53c7b57fef89074ba4f4;p=topbloke-formulae.git diff --git a/strategy.tex b/strategy.tex index a3acc81..eff0adf 100644 --- a/strategy.tex +++ b/strategy.tex @@ -1,7 +1,8 @@ -When we are trying to do a merge of some kind, in general, -we want to merge some source commits $S_0 \ldots S_n$. -We'll write $S_0 = L$. We require that $L$ is the current git ref -for $\patchof{L}$. +When we are trying to do an update of some kind, in general, +for each patch $\pc$ +we want to merge some source commits $S \in \set S_{\pc}$. +We require $\patchof{S} = \pc$, +and $\tipcc \in \set S_{\pc}$. \stdsection{Notation} @@ -14,7 +15,7 @@ The set of direct dependencies (in the form $\py$) requested in the commit $K$ ($K \in \pn$) for the patch $\p$. \item[ $\pc \hasdirdep \p$ ] -The Topbloke commit set $\pc$ has as a direct contributors the +The Topbloke commit set $\pc$ has as a direct contributor the commit set $\p$. This is an acyclic relation. \item[ $\p \hasdep \pq$ ] @@ -23,9 +24,9 @@ set $\pq$. Acyclic; the completion of $\hasdirdep$ into a partial order. -\item[ $\set E_{\pc}$ ] -$ \bigcup_i \pendsof{S_i}{\pc} $. -All the ends of $\pc$ in the sources. +%\item[ $\set E_{\pc}$ ] +%$ \bigcup_i \pendsof{S_{\pc,i}}{\pc} $. +%All the ends of $\pc$ in the sources. \item[ $ \tipzc, \tipcc, \tipuc, \tipfc $ ] The git ref for the Topbloke commit set $\pc$: respectively, @@ -35,10 +36,11 @@ the original, current, updated, and final values. \section{Planning phase} -The planning phase computes: +The results of the planning phase consist of: \begin{itemize*} -\item{ The relation $\hasdirdep$ and hence the ordering $\hasdep$. } -\item{ For each commit set $\pc$, the order in which to merge +\item{ The relation $\hasdirdep$ and hence the partial order $\hasdep$. } +\item{ For each commit set $\pc$, a confirmed set of sources $\set S_{\pc}$. } +\item{ For each commit set $\pc$, the order in which to merge the sources $E_{\pc,j} \in \set E_{\pc}$. } \item{ For each $E_{\pc,j}$ an intended merge base $M_{\pc,j}$. } \end{itemize*} @@ -130,16 +132,16 @@ it is, are we fast forward to $E_i$ and drop $E_i$ from the planned ordering. Then we will merge the direct contributors and the sources' ends. - This generates more commits $\tipuc \in \pc$, but none in any other -commit set. We maintain XXX FIXME IS THIS THE BEST THING? +commit set. We maintain $$ \bigforall_{\p \isdep \pc} - \pancsof{\tipcc}{\p} \subset \left[ - \tipfa \p \cup - \bigcup_{E \in \set E_{\pc}} \pancsof{E}{\p} - \right] + \pancsof{\tipcc}{\p} \subset + \pancsof{\tipfa \p}{\p} $$ +\proof{ + For $\tipcc = \tipzc$, $T$ ...WRONG WE NEED $\tipfa \p$ TO BE IN $\set E$ SOMEHOW +} \subsection{Merge Contributors for $\pcy$} @@ -147,16 +149,18 @@ Merge $\pcn$ into $\tipc$. That is, merge with $L = \tipc, R = \tipfa{\pcn}, M = \baseof{\tipc}$. to construct $\tipu$. -Merge conditions: Ingredients satisfied by construction. +Merge conditions: + +Ingredients satisfied by construction. Tip Merge satisfied by construction. Merge Acyclic follows from Perfect Contents and $\hasdep$ being acyclic. -Removal Merge Ends: For $\p = \pc$, $M \nothaspatch \p$. -For $p \neq \pc$, by Tip Contents, +Removal Merge Ends: For $\p = \pc$, $M \nothaspatch \p$; OK. +For $\p \neq \pc$, by Tip Contents, $M \haspatch \p \equiv L \haspatch \p$, so we need only worry about $X = R, Y = L$; ie $L \haspatch \p$, $M = \baseof{L} \haspatch \p$. -By Tip Contents for $L$, $D \le L \equiv D \le M$. $\qed$ +By Tip Contents for $L$, $D \le L \equiv D \le M$. OK.~~$\qed$ WIP UP TO HERE @@ -167,6 +171,10 @@ $R \haspatch \p$. So we only need to worry about $Y = R = \tipfa \pcn$. By Tip Dependencies $\tipfa \pcn \ge \tipfa \py$. And by Tip Sources $\tipfa \py \ge $ +want to prove $E \le \tipfc$ where $E \in \pendsof{\tipcc}{\py}$ + +$\pancsof{\tipcc}{\py} = $ + computed $\tipfa \py$, and by Perfect Contents for $\py$