chiark / gitweb /
strategy: wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 24 Apr 2012 00:41:07 +0000 (01:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 24 Apr 2012 00:41:07 +0000 (01:41 +0100)
article.tex
strategy.tex [new file with mode: 0644]

index 9cdd0d2fc4265123a503a43a8eea598faa9c295d..740a2bc406c37588e03e7e676611d57ce7c8a8d7 100644 (file)
 
 \newcommand{\patch}{{\mathcal P}}
 \newcommand{\base}{{\mathcal B}}
 
 \newcommand{\patch}{{\mathcal P}}
 \newcommand{\base}{{\mathcal B}}
+\newcommand{\depsreq}{{\mathcal D}}
 
 \newcommand{\patchof}[1]{\patch ( #1 ) }
 \newcommand{\baseof}[1]{\base ( #1 ) }
 
 \newcommand{\patchof}[1]{\patch ( #1 ) }
 \newcommand{\baseof}[1]{\base ( #1 ) }
+\newcommand{\depsreqof}[1]{\depsreq ( #1 ) }
 
 \newcommand{\eqntag}[2]{ #2 \tag*{\mbox{#1}} }
 \newcommand{\eqn}[2]{ #2 \tag*{\mbox{\bf #1}} }
 
 \newcommand{\eqntag}[2]{ #2 \tag*{\mbox{#1}} }
 \newcommand{\eqn}[2]{ #2 \tag*{\mbox{\bf #1}} }
 \input{create-tip.tex}
 \input{anticommit.tex}
 \input{merge.tex}
 \input{create-tip.tex}
 \input{anticommit.tex}
 \input{merge.tex}
+\input{strategy.tex}
 
 \end{document}
 
 \end{document}
diff --git a/strategy.tex b/strategy.tex
new file mode 100644 (file)
index 0000000..ca31c32
--- /dev/null
@@ -0,0 +1,72 @@
+\section{Strategy}
+
+We start with some commits $S_0 \ldots S_n$
+(where $S_0 = L$ and is the current git ref for $\pl$).
+
+%Let $\set E_{\pc} = \bigcup_i \pendsof{S_i}{\pc}$.
+
+Invoke Plan $\patchof \pl$ where the algorithm Plan $\pc$ is as
+follows:
+
+Notation:
+
+ $\pc \succ_1 \{ \p, \pq \ldots \}$ 
+ the Topbloke commit set $py$ has as direct contributors exactly
+ $\p, \pq, \ldots$.  This is an acyclic relation.
+
+ Extend this into the partial order $\succ$.
+
+$\py \succ \pq$ 
+
+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
+corresponding to the tip branches for the direct dependencies of
+$\pc$.
+The sole direct contributor of $\pcy$ is $\pcn$.
+
+
+For $\pc = \pcn$, 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
+merge base $M_j$ such that $M_j \le E_j \land M_j \le T_{\pc,j-1}$.
+Calculate $D_j$ as the 3-way merge of the sets $D_{j-1}$ and
+$\depsreqof{E_j}$ using as a base $\depsreqof{M_j}$.  This will
+generate $D_m$ as the putative direct contributors for $\pcn$.
+
+However, the invocation may specify that certain direct dependencies
+are definitely to be included, or excluded.  As a result the set
+of actual direct contributors is some arbitrary set of patches.
+
+
+
+
+
+
+Imagine that we will merge the direct 
+
+with $M=M_j, L=T_{\pc,j-1}, R=E_j$,
+and calculate what the resulting desired direct dependencies file
+(ie, the set of patches $\set D_j$)
+would be.  Eventually we 
+
+So, formally, we select somehow an order of sources $S_i$.  For each 
+
+
+Make use of the following recursive algorithm, Plan 
+
+
+
+
+ recursively make a plan to merge all $E = \pends$
+
+Specifically, in