# HG changeset patch # User Bryan O'Sullivan # Date 1161035677 25200 # Node ID 06383f9e46e42631ad8b677b4d6a0ca21644ea20 # Parent 3f3dd60695cb7b4a8849e9bbd585c7e5b958289a More graphics. diff -r 3f3dd60695cb -r 06383f9e46e4 en/Makefile --- a/en/Makefile Mon Oct 16 11:38:06 2006 -0700 +++ b/en/Makefile Mon Oct 16 14:54:37 2006 -0700 @@ -20,7 +20,9 @@ image-sources := \ mq-stack.svg \ - tour-history.svg + tour-history.svg \ + tour-merge-sep-repos.svg \ + tour-merge-pull.svg example-sources := \ daily.files \ diff -r 3f3dd60695cb -r 06383f9e46e4 en/tour-basic.tex --- a/en/tour-basic.tex Mon Oct 16 11:38:06 2006 -0700 +++ b/en/tour-basic.tex Mon Oct 16 14:54:37 2006 -0700 @@ -182,7 +182,7 @@ The default output printed by \hgcmd{log} is purely a summary; it is missing a lot of detail. -Figure~\ref{fig:tour:history} provides a graphical representation of +Figure~\ref{fig:tour-basic:history} provides a graphical representation of the history of the \dirname{hello} repository, to make it a little easier to see which direction history is ``flowing'' in. We'll be returning to this figure several times in this chapter and the chapter @@ -192,19 +192,19 @@ \centering \grafix{tour-history} \caption{Graphical history of the \dirname{hello} repository} - \label{fig:tour:history} + \label{fig:tour-basic:history} \end{figure} \subsection{Changesets, revisions, and talking to other people} As English is a notoriously sloppy language, and computer science has -a history of terminological confusion, revision control has a variety -of terms that have the same meaning. If you are talking about -Mercurial history with other people, you will find that the word -``changeset'' is often compressed to ``change'' or (when written) -``cset'', and sometimes a changeset is referred to as a ``revision'' -or a ``rev''. +a hallowed history of terminological confusion (why use one term when +four will do?), revision control has a variety of words and phrases +that mean the same thing. If you are talking about Mercurial history +with other people, you will find that the word ``changeset'' is often +compressed to ``change'' or (when written) ``cset'', and sometimes a +changeset is referred to as a ``revision'' or a ``rev''. While it doesn't matter what \emph{word} you use to refer to the concept of ``a~changeset'', the \emph{identifier} that you use to diff -r 3f3dd60695cb -r 06383f9e46e4 en/tour-merge-pull.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/tour-merge-pull.svg Mon Oct 16 14:54:37 2006 -0700 @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + 0: 0a04 + + 1: 82e5 + + 2: 057d + + 3: ff5d + + 4: b57f + + + + + + 5: ae13 + + + 6: d2b5 + + tip (and head) + head + + diff -r 3f3dd60695cb -r 06383f9e46e4 en/tour-merge-sep-repos.svg --- a/en/tour-merge-sep-repos.svg Mon Oct 16 11:38:06 2006 -0700 +++ b/en/tour-merge-sep-repos.svg Mon Oct 16 14:54:37 2006 -0700 @@ -13,7 +13,7 @@ id="svg2" sodipodi:version="0.32" inkscape:version="0.44.1" - sodipodi:docname="tour-merge-repos.svg"> + sodipodi:docname="tour-merge-sep-repos.svg"> differ + common history - common history - - - - - - - - + + + + + head revision(has no children) diff -r 3f3dd60695cb -r 06383f9e46e4 en/tour-merge.tex --- a/en/tour-merge.tex Mon Oct 16 11:38:06 2006 -0700 +++ b/en/tour-merge.tex Mon Oct 16 14:54:37 2006 -0700 @@ -27,17 +27,46 @@ in it. \interaction{tour.merge.clone} We should now have two copies of \filename{hello.c} with different -contents. +contents. The histories of the two repositories have also diverged, +as illustrated in figure~\ref{fig:tour-merge:sep-repos}. \interaction{tour.merge.cat} +\begin{figure}[ht] + \centering + \grafix{tour-merge-sep-repos} + \caption{Divergent recent histories of the \dirname{my-hello} and + \dirname{my-new-hello} repositories} + \label{fig:tour-merge:sep-repos} +\end{figure} + We already know that pulling changes from our \dirname{my-hello} repository will have no effect on the working directory. \interaction{tour.merge.pull} However, the \hgcmd{pull} command says something about ``heads''. -A head is a change that has no descendants. The tip revision is thus -a head, but a repository can contain more than one head. We can view -them using the \hgcmd{heads} command. +A head is a change that has no descendants, or children, as they're +also known. The tip revision is thus a head, because the newest +revision in a repository doesn't have any children, but a repository +can contain more than one head. + +\begin{figure}[ht] + \centering + \grafix{tour-merge-pull} + \caption{Repository contents after pulling from \dirname{my-hello} into + \dirname{my-new-hello}} + \label{fig:tour-merge:pull} +\end{figure} + +In figure~\ref{fig:tour-merge:pull}, you can see the effect of the +pull from \dirname{my-hello} into \dirname{my-new-hello}. The history +that was already present in \dirname{my-new-hello} is untouched, but a +new revision has been added. By referring to +figure~\ref{fig:tour-merge:sep-repos}, we can see that the +\emph{changeset ID} remains the same in the new repository, but the +\emph{revision number} has changed. (This, incidentally, is a fine +example of why it's not safe to use revision numbers when discussing +changesets.) We can view the heads in a repository using the +\hgcmd{heads} command. \interaction{tour.merge.heads} What happens if we try to use the normal \hgcmd{update} command to update to the new tip?