1. Martin Geisler
  2. mercurial-talk


mercurial-talk / merging-vendor-branches.tex

Martin Geisler f73da41 

\begin{frame}{Merging Vendor Branches}
  Upgrading from \ext{libfoo} version 1.0 to version 2.0:
    \begin{tikzpicture}[start chain]
      \path[use as bounding box] (-2, -0.1) rectangle (7.5, 2.2);

      \tikzstyle{comment}=[text width=2cm, text badly centered, alert, inner sep=0]
      \tikzstyle{rev}+=[on chain, minimum size=4mm, font=\scriptsize]
      \tikzstyle{libfoo}=[rev, draw=purple!50!black!50, top
        color=white, bottom color=purple!50!black!20]
      \tikzset{node distance=8mm and 14mm, on grid}
      \tikzstyle{join-se}=[out=0, in=180]
      \tikzstyle{join-ne}=[out=0, in=180]

      \node[left=of chain-1, anchor=west, xshift=-5mm] {default:};
      \node[above left=of chain-1, anchor=west, xshift=-5mm] {libfoo:};
      \node[on chain] {\dots};
      \node[rev, join] (a) {};
      \node[rev, join] (b) {};
      \node[rev, join] (c) {};
      \node[rev, join] (d) {};
      \node<8->[rev, join] (e) {};

      \node[on chain, above=of chain-1] {\dots};
      \node[libfoo, join, above=of a] (v1) {1.0};
      \node<4->[libfoo, join, above=of d] (v2) {2.0};

      \draw[->] ([yshift=-0.5mm] v1.east) to[join-se] ([yshift=0.5mm] b.west);
      \draw<8->[->] (v2) to[join-se] ([yshift=0.5mm] e.west);

      \draw<6->[short, ->] (d) ++ (0, -8mm) node[comment, below] {local head} -- (d);
      \draw<6->[short, ->] (v2) ++ (0, 8mm) node[comment, above] {remote head} -- (v2);
      \draw<6->[short, ->] (v1) ++ (0, 8mm) node[comment, above] {common ancestor} -- (v1);
      \path<7-> (v1) -- node[above] {$\Delta$} (v2);
      \path<8-> (d) -- node[below] {$\Delta$} (e);

    \item<2-> \cmd{hg update libfoo}
    \item<3-> unpack and import \ext{libfoo} version 2.0
    \item<4-> \cmd{hg commit -m 'Import of libfoo 2.0'}
    \item<5-> \cmd{hg update default}
    \item<7-> \cmd{hg merge libfoo}
    \item<8-> \cmd{hg commit -m 'Merged with libfoo 2.0'}