-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}
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$ ]
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,
\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*}
For each such $\p$, after updating $\hasdep$, we recursively make a plan
for $\pc' = \p$.
+
+
\section{Execution phase}
We process commit sets from the bottom up according to the relation
$\hasdep$. For each commit set $\pc$ we construct $\tipfc$ from
$\tipzc$, as planned. By construction, $\hasdep$ has $\patchof{L}$
as its maximum, so this operation will finish by updating
-$\tipfa{\patchof{L}}$.
+$\tipca{\patchof{L}}$ with $\tipfa{\patchof{L}}$.
-After we are done, the result has the following properties:
-\[ \eqn{Tip Inputs}{
+After we are done with each commit set $\pc$, the
+new tip $\tipfc$ has the following properties:
+\[ \eqn{Tip Sources}{
\bigforall_{E_i \in \set E_{\pc}} \tipfc \ge E_i
}\]
\[ \eqn{Tip Dependencies}{
\tipfc \haspatch \p \equiv \pc \hasdep \py
}\]
-For brevity we will write $\tipu$ for $\tipuc$, etc. We will start
+For brevity we will sometimes write $\tipu$ for $\tipuc$, etc. We will start
out with $\tipc = \tipz$, and at each step of the way construct some
$\tipu$ from $\tipc$. The final $\tipu$ becomes $\tipf$.
--- formally, $\tipu = \text{max}(\tipc, 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
+$$
+ \bigforall_{\p \isdep \pc}
+ \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$}
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
Addition Merge Ends: If $\py \isdep \pcn$, we have already
done the execution phase for $\pcn$ and $\py$. By
-Perfect Contents for $\pcn$, $\tipfa \pcn \haspatch \p$.
+Perfect Contents for $\pcn$, $\tipfa \pcn \haspatch \p$ i.e.
+$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$