Mercurial > hgbook
changeset 195:959357d01607
Merge with myself.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 16 Apr 2007 14:43:23 -0700 |
parents | a8cc7fa833a3 (diff) 08d64601d4bd (current diff) |
children | 4237e45506ee |
files | en/00book.tex en/Makefile |
diffstat | 15 files changed, 93 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/en/00book.tex Thu Apr 05 23:50:42 2007 -0700 +++ b/en/00book.tex Mon Apr 16 14:43:23 2007 -0700 @@ -45,6 +45,7 @@ \include{daily} \include{collab} \include{filenames} +\include{branch} \include{undo} \include{hook} \include{template}
--- a/en/Makefile Thu Apr 05 23:50:42 2007 -0700 +++ b/en/Makefile Mon Apr 16 14:43:23 2007 -0700 @@ -5,6 +5,7 @@ 99book.bib \ 99defs.tex \ build_id.tex \ + branch.tex \ cmdref.tex \ collab.tex \ concepts.tex \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/branch.tex Mon Apr 16 14:43:23 2007 -0700 @@ -0,0 +1,9 @@ +\chapter{Managing branchy development} +\label{chap:branch} + + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "00book" +%%% End:
--- a/en/collab.tex Thu Apr 05 23:50:42 2007 -0700 +++ b/en/collab.tex Mon Apr 16 14:43:23 2007 -0700 @@ -257,6 +257,35 @@ of development is astounding. And yet Linux is a highly successful, well-regarded piece of software. +\subsection{Pull-only versus shared-push collaboration} + +A perpetual source of heat in the open source community is whether a +development model in which people only ever pull changes from others +is ``better than'' one in which multiple people can push changes to a +shared repository. + +Typically, the backers of the shared-push model use tools that +actively enforce this approach. If you're using a centralised +revision control tool such as Subversion, there's no way to make a +choice over which model you'll use: the tool gives you shared-push, +and if you want to do anything else, you'll have to roll your own +approach on top (such as applying a patch by hand). + +A good distributed revision control tool, such as Mercurial, will +support both models. You and your collaborators can then structure +how you work together based on your own needs and preferences, not on +what contortions your tools force you into. + +\subsection{Where collaboration meets branch management} + +Once you and your team set up some shared repositories and start +propagating changes back and forth between local and shared repos, you +begin to face a related, but slightly different challenge: that of +managing the multiple directions in which your team may be moving at +once. Even though this subject is intimately related to how your team +collaborates, it's dense enough to merit treatment of its own, in +chapter~\ref{chap:branch}. + \section{The technical side of sharing} \subsection{Informal sharing with \hgcmd{serve}}
--- a/en/examples/bisect Thu Apr 05 23:50:42 2007 -0700 +++ b/en/examples/bisect Mon Apr 16 14:43:23 2007 -0700 @@ -15,9 +15,9 @@ #$ name: commits -buggy_change=37 +buggy_change=22 -for (( i = 0; i < 50; i++ )); do +for (( i = 0; i < 35; i++ )); do if [[ $i = $buggy_change ]]; then echo 'i have a gub' > myfile$i hg commit -q -A -m 'buggy changeset'
--- a/en/examples/bisect.help.out Thu Apr 05 23:50:42 2007 -0700 +++ b/en/examples/bisect.help.out Mon Apr 16 14:43:23 2007 -0700 @@ -12,3 +12,5 @@ + +
--- a/en/examples/branching Thu Apr 05 23:50:42 2007 -0700 +++ b/en/examples/branching Mon Apr 16 14:43:23 2007 -0700 @@ -39,6 +39,7 @@ cd stable-fix echo 'This is a fix to a boring feature.' > myfile hg commit -m 'Fix a bug' +#$ ignore: /tmp/branching.* hg push #$ name:
--- a/en/examples/filenames.glob.range.out Thu Apr 05 23:50:42 2007 -0700 +++ b/en/examples/filenames.glob.range.out Mon Apr 16 14:43:23 2007 -0700 @@ -1,7 +1,3 @@ $ \textbf{hg status 'glob:**[nr-t]'} -A examples/simple.py ? MANIFEST.in -? examples/performant.py -? src/watcher/_watcher.c -? src/watcher/watcher.py ? src/xyzzy.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/examples/hook.msglen.go.out Mon Apr 16 14:43:23 2007 -0700 @@ -0,0 +1,10 @@ +$ \textbf{cat .hg/hgrc} +[hooks] +pretxncommit.msglen = test `hg tip --template \{desc\} | wc -c` -ge 10 +$ \textbf{echo a > a} +$ \textbf{hg add a} +$ \textbf{hg commit -A -m 'too short'} +abort: pretxncommit.msglen hook exited with status 1 +transaction abort! +rollback completed +$ \textbf{hg commit -A -m 'long enough'}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/examples/mq.id.output.out Mon Apr 16 14:43:23 2007 -0700 @@ -0,0 +1,32 @@ +$ \textbf{hg qapplied} +first.patch +second.patch +$ \textbf{hg log -r qbase:qtip} +changeset: +tag: first.patch +tag: qbase +user: Bryan O'Sullivan <bos@serpentine.com> + +summary: patch queue: first.patch + +changeset: +tag: qtip +tag: second.patch +tag: tip +user: Bryan O'Sullivan <bos@serpentine.com> + +summary: patch queue: second.patch + +$ \textbf{hg export second.patch} +# HG changeset patch +# User Bryan O'Sullivan <bos@serpentine.com> + +# Node ID +# Parent +patch queue: second.patch + +diff -r -r other.c + + +@@ -0,0 +1,1 @@ ++double u;
--- a/en/examples/mq.qinit-help.help.out Thu Apr 05 23:50:42 2007 -0700 +++ b/en/examples/mq.qinit-help.help.out Mon Apr 16 14:43:23 2007 -0700 @@ -11,3 +11,5 @@ options: -c --create-repo create queue repository + +use "hg -v help qinit" to show global options
--- a/en/examples/rename.divergent.merge.out Thu Apr 05 23:50:42 2007 -0700 +++ b/en/examples/rename.divergent.merge.out Mon Apr 16 14:43:23 2007 -0700 @@ -7,7 +7,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files -1 files updated, 0 files merged, 1 files removed, 0 files unresolved +1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ \textbf{hg pull ../bob} pulling from ../bob searching for changes
--- a/en/examples/run-example Thu Apr 05 23:50:42 2007 -0700 +++ b/en/examples/run-example Mon Apr 16 14:43:23 2007 -0700 @@ -59,7 +59,7 @@ ps2 = '__run_example_ps2__ ' pi_re = re.compile(r'#\$\s*(name|ignore):\s*(.*)$') - timeout = 5 + timeout = 10 def __init__(self, name, verbose): self.name = name
--- a/en/examples/tour.help.out Thu Apr 05 23:50:42 2007 -0700 +++ b/en/examples/tour.help.out Mon Apr 16 14:43:23 2007 -0700 @@ -16,3 +16,5 @@ -e --ssh specify ssh command to use --remotecmd specify hg command to run on the remote side + +use "hg -v help init" to show global options
--- a/en/filenames.tex Thu Apr 05 23:50:42 2007 -0700 +++ b/en/filenames.tex Mon Apr 16 14:43:23 2007 -0700 @@ -152,15 +152,6 @@ token. This small example illustrates the difference between the two. \interaction{filenames.glob.star-starstar} -When you're writing a glob pattern, bear in mind that Mercurial will -treat a pattern that matches a directory name as ``match every file -under that directory''. For example, a glob pattern of -``\texttt{**c}'' means \emph{both} ``match files ending in -`\texttt{c}''' ``any file under all directories that end in -`\texttt{c}'''. I personally find this behaviour counterintuitive. -If you need to write a pattern that means ``match \emph{only} files'', -you'll need to express it as a regular expression instead; see below. - \subsection{Regular expression matching with \texttt{re} patterns} Mercurial accepts the same regular expression syntax as the Python