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 contributor the
-commit set $\p$. This is an acyclic relation.
+The patch $\pc$ has as a direct dependency the
+patch $\p$. This is an acyclic relation.
\item[ $\p \hasdep \pq$ ]
-The commit set $\p$ has as direct or indirect contributor the commit
-set $\pq$.
+The patch $\p$ has as direct or indirect dependency the
+patch $\pq$.
Acyclic; the completion of $\hasdirdep$ into a
partial order.
Convenience notation for
$\bigforall_{E \in \pendsof{\set X}{\p}} E \le T$
+\item[ $\Gamma_{\pc}$ ]
+The desired direct dependencies of $\pc$, a set of patches.
+
+\item[ $\allpatches$ ]
+The set of all the patches we are dealing with (constructed
+during the update algorithm).
+
%\item[ $\set E_{\pc}$ ]
%$ \bigcup_i \pendsof{S_{\pc,i}}{\pc} $.
%All the ends of $\pc$ in the sources.
\item[ $h : \pc^{+/-} \mapsto \set H_{\pc^{+/-}}$ ]
Function for getting the existing heads $\set H$ of the branch $\pc^{+/-}$.
+These are the heads which will be merged and used in this update.
This will include the current local and remote git refs, as desired.
\item[ $g : \pc, \Gamma \mapsto \Gamma'$ ]
$\Gamma$ computed as an appropriate merge of the dependencies requested by the
sources and should return the complete actual set $\Gamma'$ of direct
dependencies to use. This allows the specification of any desired
-(acyclic) relation $\hasdirdep$.
+(acyclic) relations $\hasdirdep$ and $\hasdep$.
\end{basedescript}
\item For each $i \ldots 1..n$, update our putative direct
dependencies:
$$
-\Gamma \assign \text{\bf set-merge}\left(\Gamma,
- \left[ \begin{cases}
+\Gamma \assign \text{\bf set-merge}\left[\Gamma,
+ \left( \begin{cases}
M_i \in \pcn : & \depsreqof{M_i} \\
M_i \not\in \pcn : & \{ \}
- \end{cases} \right],
+ \end{cases} \right),
\depsreqof{S_i}
- \right)
+ \right]
$$
+TODO define {\bf set-merge}
+
\item Finalise our putative direct dependencies
$
\Gamma \assign g(\pc, \Gamma)
\end{enumerate}
-The results of the ranking phase are:
+\subsection{Results of the ranking phase}
+
+By the end of the ranking phase, we have recorded the following
+information:
+\begin{itemize}
+\item
$ \allpatches, \hasdirdep $ and hence the completion of $\hasdirdep$
into the partial order $\hasdep$.
-For each $\pc$, the base branch starting point commit $W_{\pcn} = W$,
-the direct dependencies $\Gamma_{\pc}$,
+\item
+For each $\pc \in \allpatches$, the base branch starting point commit $W_{\pcn} = W$.
+
+\item
+For each $\pc$,
+the direct dependencies $\Gamma_{\pc}$.
+
+\item
+For each $\pc$,
the ordered set of base branch sources $\set S_{\pcn} = \set S,
S_{\pcn,i} = S_i$
and corresponding merge bases $M_{\pcn,i} = M_i$.
+\end{itemize}
+
\section{Traversal phase}