hgbook

changeset 963:1dd00abb3fa9

merge with bryan - it's been a while but everything seems ok
author Romain PELISSE <belaran@gmail.com>
date Sun Aug 16 03:41:39 2009 +0200 (2009-08-16)
parents bac1c207c76d eca3a16c0114
children 6b680d569bb4
files en/00book.tex en/99book.bib en/99defs.tex en/bookhtml.cfg en/branch.tex en/ch02-tour-basic.xml en/cmdref.tex en/collab.tex en/concepts.tex en/daily.tex en/examples/backout.init.out en/examples/backout.manual.backout.out en/examples/backout.manual.cat.out en/examples/backout.manual.clone.out en/examples/backout.manual.heads.out en/examples/backout.manual.log.out en/examples/backout.manual.merge.out en/examples/backout.manual.parents.out en/examples/backout.non-tip.backout.out en/examples/backout.non-tip.cat.out en/examples/backout.non-tip.clone.out en/examples/backout.simple.log.out en/examples/backout.simple.out en/examples/bisect.commits.out en/examples/bisect.help.out en/examples/bisect.init.out en/examples/bisect.search.bad-init.out en/examples/bisect.search.good-init.out en/examples/bisect.search.init.out en/examples/bisect.search.mytest.out en/examples/bisect.search.reset.out en/examples/bisect.search.rest.out en/examples/bisect.search.step1.out en/examples/bisect.search.step2.out en/examples/branch-named.branch.out en/examples/branch-named.branches.out en/examples/branch-named.commit.out en/examples/branch-named.create.out en/examples/branch-named.foo-commit.out en/examples/branch-named.merge.out en/examples/branch-named.parents.out en/examples/branch-named.rebranch.out en/examples/branch-named.status.out en/examples/branch-named.update-bar.out en/examples/branch-named.update-foo.out en/examples/branch-named.update-nothing.out en/examples/branch-named.update-switchy.out en/examples/branch-named.update.out en/examples/branch-repo.bugfix.out en/examples/branch-repo.clone.out en/examples/branch-repo.merge.out en/examples/branch-repo.new.out en/examples/branch-repo.pull.out en/examples/branch-repo.tag.out en/examples/branching.clone.out en/examples/branching.init.out en/examples/branching.main.out en/examples/branching.merge.out en/examples/branching.stable.out en/examples/branching.tag.out en/examples/branching.update.out en/examples/cmdref.diff-p.out en/examples/daily.copy.after.out en/examples/daily.copy.cat.out en/examples/daily.copy.clone.out en/examples/daily.copy.copy.out en/examples/daily.copy.dir-dest.out en/examples/daily.copy.dir-src-dest.out en/examples/daily.copy.dir-src.out en/examples/daily.copy.init.out en/examples/daily.copy.merge.out en/examples/daily.copy.other.out en/examples/daily.copy.simple.out en/examples/daily.copy.status-copy.out en/examples/daily.copy.status.out en/examples/daily.files.add-dir.out en/examples/daily.files.add.out en/examples/daily.files.addremove.out en/examples/daily.files.commit-addremove.out en/examples/daily.files.hidden.out en/examples/daily.files.missing.out en/examples/daily.files.recover-missing.out en/examples/daily.files.remove-after.out en/examples/daily.files.remove.out en/examples/daily.rename.rename.out en/examples/daily.rename.status-copy.out en/examples/daily.rename.status.out en/examples/daily.revert.add.out en/examples/daily.revert.copy.out en/examples/daily.revert.missing.out en/examples/daily.revert.modify.out en/examples/daily.revert.remove.out en/examples/daily.revert.rename-orig.out en/examples/daily.revert.rename.out en/examples/daily.revert.status.out en/examples/daily.revert.unmodify.out en/examples/data/check_whitespace.py en/examples/extdiff.diff.out en/examples/extdiff.extdiff-ctx.out en/examples/extdiff.extdiff.out en/examples/filenames.dirs.out en/examples/filenames.files.out en/examples/filenames.filter.exclude.out en/examples/filenames.filter.include.out en/examples/filenames.glob.group.out en/examples/filenames.glob.question.out en/examples/filenames.glob.range.out en/examples/filenames.glob.star-starstar.out en/examples/filenames.glob.star.out en/examples/filenames.glob.starstar.out en/examples/filenames.wdir-relname.out en/examples/filenames.wdir-subdir.out en/examples/hook.msglen.go.out en/examples/hook.msglen.run.out en/examples/hook.simple.ext.out en/examples/hook.simple.init.out en/examples/hook.simple.pretxncommit.out en/examples/hook.ws en/examples/hook.ws.better.out en/examples/hook.ws.simple.out en/examples/issue29.go.out en/examples/mq.dodiff.diff.out en/examples/mq.guards.init.out en/examples/mq.guards.qguard.neg.out en/examples/mq.guards.qguard.out en/examples/mq.guards.qguard.pos.out en/examples/mq.guards.qselect.cat.out en/examples/mq.guards.qselect.error.out en/examples/mq.guards.qselect.foo.out en/examples/mq.guards.qselect.foobar.out en/examples/mq.guards.qselect.qpush.out en/examples/mq.guards.qselect.quux.out en/examples/mq.guards.series.out en/examples/mq.id.out.out en/examples/mq.id.output.out en/examples/mq.qinit-help.help.out en/examples/mq.tarball.download.out en/examples/mq.tarball.newsource.out en/examples/mq.tarball.qinit.out en/examples/mq.tarball.repush.out en/examples/mq.tools.lsdiff.out en/examples/mq.tools.tools.out en/examples/mq.tutorial.add.out en/examples/mq.tutorial.qinit.out en/examples/mq.tutorial.qnew.out en/examples/mq.tutorial.qnew2.out en/examples/mq.tutorial.qpop.out en/examples/mq.tutorial.qpush-a.out en/examples/mq.tutorial.qrefresh.out en/examples/mq.tutorial.qrefresh2.out en/examples/mq.tutorial.qseries.out en/examples/rename.divergent.clone.out en/examples/rename.divergent.merge.out en/examples/rename.divergent.rename.anne.out en/examples/rename.divergent.rename.bob.out en/examples/rollback.add.out en/examples/rollback.commit.out en/examples/rollback.rollback.out en/examples/rollback.status.out en/examples/rollback.tip.out en/examples/rollback.twice.out en/examples/tag.init.out en/examples/tag.log.out en/examples/tag.log.v1.0.out en/examples/tag.remove.out en/examples/tag.replace.out en/examples/tag.tag.out en/examples/tag.tags.out en/examples/tag.tip.out en/examples/template.simple.changelog.out en/examples/template.simple.combine.out en/examples/template.simple.compact.out en/examples/template.simple.datekeyword.out en/examples/template.simple.keywords.out en/examples/template.simple.manyfilters.out en/examples/template.simple.normal.out en/examples/template.simple.rev.out en/examples/template.simple.simplest.out en/examples/template.simple.simplesub.out en/examples/template.svnstyle.id.out en/examples/template.svnstyle.result.out en/examples/template.svnstyle.short.out en/examples/template.svnstyle.simplest.out en/examples/template.svnstyle.style.out en/examples/template.svnstyle.syntax.error.out en/examples/template.svnstyle.syntax.input.out en/examples/template.svnstyle.template.out en/examples/tour-merge-conflict.commit.out en/examples/tour-merge-conflict.cousin.out en/examples/tour-merge-conflict.merge.out en/examples/tour-merge-conflict.pull.out en/examples/tour-merge-conflict.son.out en/examples/tour-merge-conflict.wife.out en/examples/tour.clone-pull.out en/examples/tour.clone-push.out en/examples/tour.clone.out en/examples/tour.commit.out en/examples/tour.diff.out en/examples/tour.help.out en/examples/tour.incoming.out en/examples/tour.log-r.out en/examples/tour.log-v.out en/examples/tour.log-vp.out en/examples/tour.log.out en/examples/tour.log.range.out en/examples/tour.ls-a.out en/examples/tour.ls.out en/examples/tour.merge.cat.out en/examples/tour.merge.clone.out en/examples/tour.merge.commit.out en/examples/tour.merge.heads.out en/examples/tour.merge.merge.out en/examples/tour.merge.parents.out en/examples/tour.merge.pull.out en/examples/tour.merge.tip.out en/examples/tour.merge.update.out en/examples/tour.older.out en/examples/tour.outgoing.net.out en/examples/tour.outgoing.out en/examples/tour.parents.out en/examples/tour.pull.out en/examples/tour.push.net.out en/examples/tour.push.nothing.out en/examples/tour.push.out en/examples/tour.reclone.out en/examples/tour.sed.out en/examples/tour.status.out en/examples/tour.tip.out en/examples/tour.update.out en/examples/tour.version.out en/feature-branches.dot en/filelog.svg en/filenames.tex en/fixhtml.py en/hgbook.css en/hgext.tex en/hook.tex en/htlatex.book en/intro.tex en/kdiff3.png en/license.tex en/metadata.svg en/mq-collab.tex en/mq-ref.tex en/mq-stack.svg en/mq.tex en/note.png en/preface.tex en/revlog.svg en/snapshot.svg en/srcinstall.tex en/template.tex en/tour-basic.tex en/tour-history.svg en/tour-merge-conflict.svg en/tour-merge-merge.svg en/tour-merge-pull.svg en/tour-merge-sep-repos.svg en/tour-merge.tex en/undo-manual-merge.dot en/undo-manual.dot en/undo-non-tip.dot en/undo-simple.dot en/undo.tex en/wdir-after-commit.svg en/wdir-branch.svg en/wdir-merge.svg en/wdir-pre-branch.svg en/wdir.svg es/99book.bib es/bookhtml.cfg es/fixhtml.py es/hgbook.css es/htlatex.book examples/hg-interdiff examples/hg-replay fr/Makefile fr/examples/backout fr/examples/bisect fr/examples/daily.copy fr/examples/daily.files fr/examples/mq.guards fr/examples/rename.divergent fr/examples/run-example fr/examples/template.svnstyle fr/examples/tour fr/examples/tour-merge-conflict html/hgicon.png html/index.en.html html/index.es.html html/index.html.var sillybench/sillybench.py
line diff
     1.1 --- a/.hgignore	Thu Mar 26 08:57:10 2009 +0100
     1.2 +++ b/.hgignore	Sun Aug 16 03:41:39 2009 +0200
     1.3 @@ -1,37 +1,33 @@
     1.4 -[^/]+/auto/
     1.5 -[^/]+/dist/
     1.6 -[^/]+/html/
     1.7 +[^/]+/htdocs/
     1.8  
     1.9  syntax: glob
    1.10  
    1.11 -beta/*.tex
    1.12 -build_id.tex
    1.13 -hg_id.tex
    1.14 -*.4[ct][ct]
    1.15 -*.aux
    1.16 -*.bbl
    1.17 -*.bib
    1.18 -*.blg
    1.19 -*.dvi
    1.20 -*.eps
    1.21 +*-tmp.*
    1.22  *.err
    1.23 -*.idx
    1.24 -*.ilg
    1.25 -*.ind
    1.26 -*.lg
    1.27 -*.lo[fgt]
    1.28  *.lxo
    1.29 +*.mo
    1.30  *.orig
    1.31  *.out
    1.32 -*.pdf
    1.33 +*.bb
    1.34  *.png
    1.35 -*.ps
    1.36 +*.pyc
    1.37  *.rej
    1.38  *.run
    1.39 -*.tmp
    1.40 -*.toc
    1.41 -*.xref
    1.42  *~
    1.43 -.*.swp
    1.44 +.*.sw[op]
    1.45  .\#*
    1.46  .run
    1.47 +.validated-00book.xml
    1.48 +Makefile.vars
    1.49 +build
    1.50 +en/all-ids.dat
    1.51 +en/complete.xml
    1.52 +en/examples/results
    1.53 +en/html
    1.54 +en/svn
    1.55 +stylesheets/system-xsl
    1.56 +tools
    1.57 +web/hgbook/.database.sqlite3
    1.58 +web/hgbook/secrets.py
    1.59 +web/index-read.html.in
    1.60 +xsl/system-xsl
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/.hgtags	Sun Aug 16 03:41:39 2009 +0200
     2.3 @@ -0,0 +1,1 @@
     2.4 +18131160f7ee3b81bf39ce2c58f762b8d671cef3 submitted
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/Makefile	Sun Aug 16 03:41:39 2009 +0200
     3.3 @@ -0,0 +1,254 @@
     3.4 +#
     3.5 +# Makefile for the hgbook, top-level
     3.6 +#
     3.7 +include Makefile.vars
     3.8 +
     3.9 +FORMATS=html html-single pdf epub
    3.10 +
    3.11 +PO_LANGUAGES := zh
    3.12 +DBK_LANGUAGES := en
    3.13 +LANGUAGES := $(DBK_LANGUAGES) $(PO_LANGUAGES)
    3.14 +
    3.15 +UPDATEPO = PERLLIB=$(PO4A_LIB) $(PO4A_HOME)/po4a-updatepo -M UTF-8 \
    3.16 +	   -f docbook -o doctype=docbook -o includeexternal \
    3.17 +	   -o nodefault="<programlisting> <screen>" \
    3.18 +	   -o untranslated="<programlisting> <screen>"
    3.19 +TRANSLATE = PERLLIB=$(PO4A_LIB) $(PO4A_HOME)/po4a-translate -M UTF-8 \
    3.20 +	   -f docbook -o doctype=docbook -o includeexternal \
    3.21 +	   -o nodefault="<programlisting> <screen>" \
    3.22 +	   -o untranslated="<programlisting> <screen>" \
    3.23 +	   -k 0
    3.24 +
    3.25 +#rev_id = $(shell hg parents --template '{node|short} ({date|isodate})')
    3.26 +rev_id = $(shell hg parents --template '{node|short} ({date|shortdate})')
    3.27 +
    3.28 +images := \
    3.29 +	en/figs/bad-merge-1.png \
    3.30 +	en/figs/bad-merge-2.png \
    3.31 +	en/figs/bad-merge-3.png \
    3.32 +	en/figs/bad-merge-4.png \
    3.33 +	en/figs/bad-merge-5.png \
    3.34 +	en/figs/feature-branches.png \
    3.35 +	en/figs/filelog.png \
    3.36 +	en/figs/metadata.png \
    3.37 +	en/figs/mq-stack.png \
    3.38 +	en/figs/revlog.png \
    3.39 +	en/figs/snapshot.png \
    3.40 +	en/figs/tour-history.png \
    3.41 +	en/figs/tour-merge-conflict.png \
    3.42 +	en/figs/tour-merge-merge.png \
    3.43 +	en/figs/tour-merge-pull.png \
    3.44 +	en/figs/tour-merge-sep-repos.png \
    3.45 +	en/figs/undo-manual-merge.png \
    3.46 +	en/figs/undo-manual.png \
    3.47 +	en/figs/undo-non-tip.png \
    3.48 +	en/figs/undo-simple.png \
    3.49 +	en/figs/wdir-after-commit.png \
    3.50 +	en/figs/wdir-branch.png \
    3.51 +	en/figs/wdir-merge.png \
    3.52 +	en/figs/wdir.png \
    3.53 +	en/figs/wdir-pre-branch.png
    3.54 +
    3.55 +help:
    3.56 +	@echo "  make epub         [LINGUA=en|zh|...]"
    3.57 +	@echo "  make html         [LINGUA=en|zh|...]"
    3.58 +	@echo "  make html-single  [LINGUA=en|zh|...]"
    3.59 +	@echo "  make pdf          [LINGUA=en|zh|...]"
    3.60 +	@echo "  make validate     [LINGUA=en|zh|...] # always before commit!"
    3.61 +	@echo "  make tidypo       [LINGUA=zh|...]    # always before commit!"
    3.62 +	@echo "  make updatepo     [LINGUA=zh|...]    # update po files."
    3.63 +	@echo "  make all          [LINGUA=en|zh|...]"
    3.64 +	@echo "  make stat         # print statistics about po files."
    3.65 +	@echo "  make clean        # Remove the build files."
    3.66 +
    3.67 +clean:
    3.68 +	@rm -fr build po/*.mo hello en/hello en/html en/.validated-00book.xml en/examples/.run en/examples/results \
    3.69 +          stylesheets/system-xsl en/figs/*-tmp.svg \
    3.70 +          web/index-read.html.in \
    3.71 +          en/figs/bad-merge-1.png \
    3.72 +          en/figs/bad-merge-2.png \
    3.73 +          en/figs/bad-merge-3.png \
    3.74 +          en/figs/bad-merge-4.png \
    3.75 +          en/figs/bad-merge-5.png \
    3.76 +          en/figs/feature-branches.png \
    3.77 +          en/figs/filelog.png \
    3.78 +          en/figs/feature-branches.png \
    3.79 +          en/figs/filelog.png \
    3.80 +          en/figs/metadata.png \
    3.81 +          en/figs/mq-stack.png \
    3.82 +          en/figs/revlog.png \
    3.83 +          en/figs/snapshot.png \
    3.84 +          en/figs/tour-history.png \
    3.85 +          en/figs/tour-merge-conflict.png \
    3.86 +          en/figs/tour-merge-merge.png \
    3.87 +          en/figs/tour-merge-pull.png \
    3.88 +          en/figs/tour-merge-sep-repos.png \
    3.89 +          en/figs/undo-manual-merge.png \
    3.90 +          en/figs/undo-manual.png \
    3.91 +          en/figs/undo-non-tip.png \
    3.92 +          en/figs/undo-simple.png \
    3.93 +          en/figs/wdir-after-commit.png \
    3.94 +          en/figs/wdir-branch.png \
    3.95 +          en/figs/wdir-merge.png \
    3.96 +          en/figs/wdir-pre-branch.png \
    3.97 +          en/figs/wdir.png
    3.98 +
    3.99 +all:
   3.100 +ifdef LINGUA
   3.101 +	for f in $(FORMATS); do \
   3.102 +	  $(MAKE) LINGUA=$(LINGUA) $$f; \
   3.103 +	done
   3.104 +else
   3.105 +	for l in $(LANGUAGES); do \
   3.106 +	    for f in $(FORMATS); do \
   3.107 +		$(MAKE) LINGUA=$$l $$f; \
   3.108 +	    done; \
   3.109 +	done
   3.110 +endif
   3.111 +
   3.112 +stat:
   3.113 +	@( \
   3.114 +	LANG=C; export LANG; cd po; \
   3.115 +	for f in *.po; do \
   3.116 +	    printf "%s\t" $$f; \
   3.117 +	    msgfmt --statistics -c $$f; \
   3.118 +	done; \
   3.119 +	)
   3.120 +
   3.121 +tidypo:
   3.122 +ifdef LINGUA
   3.123 +	msgcat --sort-by-file --width=80 po/$(LINGUA).po > po/$(LINGUA).tmp && \
   3.124 +	    mv po/$(LINGUA).tmp po/$(LINGUA).po;
   3.125 +else
   3.126 +	for po in $(wildcard po/*.po); do \
   3.127 +	    msgcat --sort-by-file --width=80 $$po > $$po.tmp && mv $$po.tmp $$po; \
   3.128 +	done
   3.129 +endif
   3.130 +
   3.131 +ifndef LINGUA
   3.132 +updatepo:
   3.133 +	for l in $(PO_LANGUAGES); do \
   3.134 +	    $(MAKE) $@ LINGUA=$$l; \
   3.135 +	done
   3.136 +else
   3.137 +updatepo:
   3.138 +ifneq "$(findstring $(LINGUA),$(PO_LANGUAGES))" ""
   3.139 +	(cd po; \
   3.140 +	$(UPDATEPO) -m ../en/00book.xml -p $(LINGUA).po; \
   3.141 +	)
   3.142 +	$(MAKE) tidypo LINGUA=$(LINGUA)
   3.143 +endif
   3.144 +endif
   3.145 +
   3.146 +ifndef LINGUA
   3.147 +validate:
   3.148 +	for l in $(LANGUAGES); do \
   3.149 +	    $(MAKE) $@ LINGUA=$$l; \
   3.150 +	done
   3.151 +else
   3.152 +validate: build/$(LINGUA)/source/hgbook.xml
   3.153 +	xmllint --nonet --noout --postvalid --xinclude $<
   3.154 +
   3.155 +ifneq "$(findstring $(LINGUA),$(DBK_LANGUAGES))" ""
   3.156 +$(LINGUA)/examples/.run:
   3.157 +	(cd $(LINGUA)/examples; ./run-example -v -a)
   3.158 +
   3.159 +build/$(LINGUA)/source/hgbook.xml: $(wildcard $(LINGUA)/*.xml) $(images) $(LINGUA)/examples/.run
   3.160 +	mkdir -p build/$(LINGUA)/source/figs
   3.161 +	cp $(LINGUA)/figs/*.png build/$(LINGUA)/source/figs
   3.162 +	cp stylesheets/hgbook.css build/$(LINGUA)/source
   3.163 +	(cd $(LINGUA); xmllint --nonet --noent --xinclude --postvalid --output ../$@.tmp 00book.xml)
   3.164 +	cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@
   3.165 +else
   3.166 +en/examples/.run:
   3.167 +	(cd en/examples; ./run-example -v -a)
   3.168 +
   3.169 +build/en/source/hgbook.xml:
   3.170 +	${MAKE} LINGUA=en $@
   3.171 +
   3.172 +build/$(LINGUA)/source/hgbook.xml: $(wildcard en/*.xml) po/$(LINGUA).po $(images)
   3.173 +	mkdir -p build/$(LINGUA)/source/figs
   3.174 +	cp en/figs/*.png build/$(LINGUA)/source/figs
   3.175 +	cp stylesheets/hgbook.css build/$(LINGUA)/source
   3.176 +	$(TRANSLATE) -m en/00book.xml -p po/$(LINGUA).po -l en/hgbook.xml.$(LINGUA)
   3.177 +	xmllint --nonet --noent --xinclude --postvalid --output $@.tmp en/hgbook.xml.$(LINGUA)
   3.178 +	cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@
   3.179 +	mv en/hgbook.xml.$(LINGUA) build/$(LINGUA)/source
   3.180 +endif
   3.181 +
   3.182 +endif
   3.183 +
   3.184 +ifndef LINGUA
   3.185 +epub:
   3.186 +	for l in $(LANGUAGES); do \
   3.187 +	    $(MAKE) $@ LINGUA=$$l; \
   3.188 +	done
   3.189 +else
   3.190 +epub: build/$(LINGUA)/epub/hgbook.epub
   3.191 +
   3.192 +build/$(LINGUA)/epub/hgbook.epub: build/$(LINGUA)/source/hgbook.xml
   3.193 +	mkdir -p build/$(LINGUA)/epub
   3.194 +	(cd build/$(LINGUA)/source; $(DB2EPUB) -c hgbook.css -v hgbook.xml; mv hgbook.epub ../epub)
   3.195 +endif
   3.196 +
   3.197 +ifndef LINGUA
   3.198 +html:
   3.199 +	for l in $(LANGUAGES); do \
   3.200 +	    $(MAKE) $@ LINGUA=$$l; \
   3.201 +	done
   3.202 +else
   3.203 +html: build/$(LINGUA)/html/index.html
   3.204 +
   3.205 +build/$(LINGUA)/html/index.html: build/$(LINGUA)/source/hgbook.xml stylesheets/html.xsl stylesheets/$(LINGUA)/html.xsl
   3.206 +	mkdir -p build/$(LINGUA)/html/figs
   3.207 +	cp en/figs/*.png build/$(LINGUA)/html/figs
   3.208 +	cp stylesheets/hgbook.css build/$(LINGUA)/html
   3.209 +	xsltproc --output build/$(LINGUA)/html/ \
   3.210 +	    stylesheets/$(LINGUA)/html.xsl build/$(LINGUA)/source/hgbook.xml
   3.211 +endif
   3.212 +
   3.213 +ifndef LINGUA
   3.214 +html-single:
   3.215 +	for l in $(LANGUAGES); do \
   3.216 +	    $(MAKE) $@ LINGUA=$$l; \
   3.217 +	done
   3.218 +else
   3.219 +html-single: build/$(LINGUA)/html-single/hgbook.html
   3.220 +
   3.221 +build/$(LINGUA)/html-single/hgbook.html: build/$(LINGUA)/source/hgbook.xml stylesheets/html-single.xsl stylesheets/$(LINGUA)/html-single.xsl
   3.222 +	mkdir -p build/$(LINGUA)/html-single/figs
   3.223 +	cp en/figs/*.png build/$(LINGUA)/html-single/figs
   3.224 +	cp stylesheets/hgbook.css build/$(LINGUA)/html-single
   3.225 +	xsltproc --output build/$(LINGUA)/html-single/hgbook.html \
   3.226 +	    stylesheets/$(LINGUA)/html-single.xsl build/$(LINGUA)/source/hgbook.xml
   3.227 +endif
   3.228 +
   3.229 +ifndef LINGUA
   3.230 +pdf:
   3.231 +	for l in $(LANGUAGES); do \
   3.232 +	    $(MAKE) $@ LINGUA=$$l; \
   3.233 +	done
   3.234 +else
   3.235 +pdf: build/$(LINGUA)/pdf/hgbook.pdf
   3.236 +
   3.237 +build/$(LINGUA)/pdf/hgbook.pdf: build/$(LINGUA)/source/hgbook.xml stylesheets/fo.xsl stylesheets/$(LINGUA)/fo.xsl
   3.238 +	mkdir -p build/$(LINGUA)/pdf
   3.239 +	java -classpath $(JAVA_LIB)/saxon65.jar:$(JAVA_LIB)/saxon65-dbxsl.jar:$(JAVA_LIB)/xml-commons-resolver-1.2.jar:$(JAVA_LIB) \
   3.240 +	    com.icl.saxon.StyleSheet \
   3.241 +	    -x org.apache.xml.resolver.tools.ResolvingXMLReader \
   3.242 +	    -y org.apache.xml.resolver.tools.ResolvingXMLReader \
   3.243 +	    -r org.apache.xml.resolver.tools.CatalogResolver \
   3.244 +	    -o build/$(LINGUA)/source/hgbook.fo \
   3.245 +	    build/$(LINGUA)/source/hgbook.xml \
   3.246 +	    stylesheets/$(LINGUA)/fo.xsl \
   3.247 +	    fop1.extensions=1
   3.248 +
   3.249 +	(cd build/$(LINGUA)/source && $(FOP_HOME)/fop.sh -c $(FOP_HOME)/conf/userconfig.xml hgbook.fo ../pdf/hgbook.pdf)
   3.250 +endif
   3.251 +
   3.252 +en/figs/%.png: en/figs/%.svg en/fixsvg
   3.253 +	en/fixsvg $<
   3.254 +	inkscape -D -d 120 -e $@ $<-tmp.svg
   3.255 +
   3.256 +en/figs/%.svg: en/figs/%.dot
   3.257 +	dot -Tsvg -o $@ $<
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/Makefile.vars.tmpl	Sun Aug 16 03:41:39 2009 +0200
     4.3 @@ -0,0 +1,20 @@
     4.4 +#
     4.5 +# Please create your Makefile.vars file from this template file.
     4.6 +#
     4.7 +# Please use absolute path, DO NOT use relative path !
     4.8 +#
     4.9 +
    4.10 +# po4a (>= 0.36.1): Only for PO based Makefile !
    4.11 +# po4A_HOME=/usr/bin
    4.12 +# PO4A_LIB=/usr/share/perl5
    4.13 +PO4A_HOME=/home/dongsheng/var/svn/i18n-zh/trunk/lib/po4a
    4.14 +PO4A_LIB=$(PO4A_HOME)/lib
    4.15 +
    4.16 +# saxon65.jar, saxon65-dbxsl.jar, xml-commons-resolver-1.2.jar: Only for pdf format !
    4.17 +JAVA_LIB=/home/dongsheng/var/svn/i18n-zh/trunk/lib/share/java
    4.18 +
    4.19 +# fop (>= 0.9.6): Only for pdf format !
    4.20 +FOP_HOME=/home/dongsheng/var/svn/i18n-zh/trunk/lib/fop
    4.21 +
    4.22 +# docbook-xsl (>= 1.74.3): Only for ePub format !
    4.23 +DB2EPUB=/home/dongsheng/var/svn/i18n-zh/trunk/lib/docbook/docbook-xsl/epub/bin/dbtoepub
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/README	Sun Aug 16 03:41:39 2009 +0200
     5.3 @@ -0,0 +1,16 @@
     5.4 +Mercurial: The Definitive Guide
     5.5 +-------------------------------
     5.6 +
     5.7 +Welcome to the source code for the book.  You can clone the definitive
     5.8 +copy of the source tree using Mercurial as follows:
     5.9 +
    5.10 +  hg clone http://hg.serpentine.com/mercurial/book
    5.11 +
    5.12 +Here's a top-level tour of interesting directories:
    5.13 +
    5.14 +en        English-language content
    5.15 +es        Spanish-language content
    5.16 +examples  Miscellaneous example scripts
    5.17 +tools     Old, largely unused conversion scripts
    5.18 +web       Content and comment system for http://hgbook.red-bean.com/
    5.19 +xsl       XSLT scripts for generating HTML
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/README.BUILD	Sun Aug 16 03:41:39 2009 +0200
     6.3 @@ -0,0 +1,99 @@
     6.4 +HOW-TO:  Compiling the Mercurial Book
     6.5 +======================================
     6.6 +
     6.7 +This Mercurial Book is written in DocBook 4.5.
     6.8 +
     6.9 +The goal of this document is to give simple instructions to anyone who
    6.10 +wants to compile this book into a useful format, like HTML or PDF.  It
    6.11 +should state *exactly* which tools to use, and how to invoke them, in
    6.12 +simplest terms.
    6.13 +
    6.14 +Table of Contents:
    6.15 +
    6.16 +  I. PRIMER
    6.17 + II. COMPILING THE DOCS
    6.18 +III. HACKING ON THE DOCS
    6.19 +
    6.20 +I. PRIMER
    6.21 +
    6.22 +  DocBook has a tortured, confusing history.  Before you do anything,
    6.23 +  take a look at Eric Raymond's excellent "DocBook Demystification HOWTO":
    6.24 +
    6.25 +      http://tldp.org/HOWTO/DocBook-Demystification-HOWTO/
    6.26 +
    6.27 +  It's very short and clears up many things.
    6.28 +
    6.29 +
    6.30 +II. COMPILING THE DOCS
    6.31 +
    6.32 +
    6.33 +1. Install XML DTD and XSL stylesheets for DocBook
    6.34 +
    6.35 +      % sudo apt-get install docbook-xml docbook-xsl
    6.36 +
    6.37 +2. Install libxml2-utils
    6.38 +
    6.39 +      % sudo apt-get install libxml2-utils
    6.40 +
    6.41 +3. Install graph drawing tools
    6.42 +
    6.43 +      % sudo apt-get install graphviz inkscape
    6.44 +
    6.45 +4. Install pdf support
    6.46 +
    6.47 +      % sudo apt-get install openjdk-6-jdk docbook-xsl-saxon libsaxon-java fop
    6.48 +
    6.49 +  The Makefile will actually invoke tools/fop/fop.sh, you should do
    6.50 +  some trick, let fop's CLASSPATH include saxon.jar and docbook-xsl-saxon.jar .
    6.51 +
    6.52 +5. Make
    6.53 +  Run 'make' for more details, for example:
    6.54 +
    6.55 +  * make all document(pdf, html and html-single for all languages)
    6.56 +      % make all
    6.57 +
    6.58 +  * make english document(pdf, html and html-single for all languages)
    6.59 +      % make LINGUA=en all
    6.60 +
    6.61 +  * make Chinese document(pdf, html and html-single for all languages)
    6.62 +      % make LINGUA=zh all
    6.63 +
    6.64 +  * make Chinese pdf document
    6.65 +      % make LINGUA=zh pdf
    6.66 +
    6.67 +III. HACKING ON THE DOCS
    6.68 +
    6.69 +In addition to everything in section II:
    6.70 +
    6.71 +
    6.72 +1. Get a nice editing environment for SGML/XML.
    6.73 +
    6.74 +  This isn't strictly required, but it's nice when your editor
    6.75 +  colorizes things, understands the DTD, tells you what tags you can
    6.76 +  insert, etc.
    6.77 +
    6.78 +  If you use emacs, we recommend the PSGML major-mode.  Most free
    6.79 +  operating systems package it, or its home page is here:
    6.80 +
    6.81 +      http://www.lysator.liu.se/projects/about_psgml.html
    6.82 +
    6.83 +  If you use vim, you might check out xmledit, at:
    6.84 +
    6.85 +      http://www.vim.org/scripts/script.php?script_id=301
    6.86 +
    6.87 +
    6.88 +2. Get a validating parser.
    6.89 +
    6.90 +  Actually, if you have what you need to compile the documentation,
    6.91 +  then you almost certainly have an XML validator installed already -
    6.92 +  it is called xmllint, and comes as part of libxml2.
    6.93 +
    6.94 +  The makefile is preconfigured with a suitable invocation of it,
    6.95 +  so simply run:
    6.96 +
    6.97 +      $ make validate
    6.98 +
    6.99 +3. Read about DocBook.
   6.100 +
   6.101 +  You'll want to get real intimate with a DocBook reference, such as
   6.102 +  can be found at:  http://www.docbook.org/tdg/en/html/
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/contrib/hg-interdiff	Sun Aug 16 03:41:39 2009 +0200
     7.3 @@ -0,0 +1,45 @@
     7.4 +#!/usr/bin/env python
     7.5 +#
     7.6 +# Adapter for using interdiff with mercurial's extdiff extension.
     7.7 +#
     7.8 +# Copyright 2006 Bryan O'Sullivan <bos@serpentine.com>
     7.9 +#
    7.10 +# This software may be used and distributed according to the terms of
    7.11 +# the GNU General Public License, incorporated herein by reference.
    7.12 +
    7.13 +import os, sys
    7.14 +
    7.15 +def walk(base):
    7.16 +    # yield all non-directories below the base path.
    7.17 +    for root, dirs, files in os.walk(base):
    7.18 +        for f in files:
    7.19 +            path = os.path.join(root, f)
    7.20 +            yield path[len(base)+1:], path
    7.21 +    else:
    7.22 +        if os.path.isfile(base):
    7.23 +            yield '', base
    7.24 +
    7.25 +# create list of unique file names under both directories.
    7.26 +files = dict(walk(sys.argv[1]))
    7.27 +files.update(walk(sys.argv[2]))
    7.28 +files = files.keys()
    7.29 +files.sort()
    7.30 +
    7.31 +def name(base, f):
    7.32 +    if f:
    7.33 +        path = os.path.join(base, f)
    7.34 +    else:
    7.35 +        path = base
    7.36 +    # interdiff requires two files; use /dev/null if one is missing.
    7.37 +    if os.path.exists(path):
    7.38 +        return path
    7.39 +    return '/dev/null'
    7.40 +
    7.41 +ret = 0
    7.42 +
    7.43 +for f in files:
    7.44 +    if os.system('interdiff "%s" "%s"' % (name(sys.argv[1], f),
    7.45 +                                          name(sys.argv[2], f))):
    7.46 +        ret = 1
    7.47 +
    7.48 +sys.exit(ret)
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/contrib/hg-package	Sun Aug 16 03:41:39 2009 +0200
     8.3 @@ -0,0 +1,80 @@
     8.4 +#!/bin/sh
     8.5 +
     8.6 +build_dir=`dirname "$0"`/../build
     8.7 +rev_id=`hg parents --template '{date|shortdate}' | sed 's/-//g'`
     8.8 +
     8.9 +for l in en zh; do
    8.10 +  (
    8.11 +  if [ ! -d "${build_dir}/${l}" ] ; then
    8.12 +    continue
    8.13 +  fi
    8.14 +
    8.15 +  cd ${build_dir}/${l};
    8.16 +
    8.17 +  f='html'
    8.18 +  if [ -f "${f}/index.html" ] ; then
    8.19 +     d=hgbook-${l}-${f}
    8.20 +     rm -fr ${d} && cp -r ${f} ${d} && tar czf ../${d}-${rev_id}.tar.gz ${d}
    8.21 +  fi
    8.22 +
    8.23 +  f='html-single'
    8.24 +  if [ -f "${f}/hgbook.html" ] ; then
    8.25 +     d=hgbook-${l}-${f}
    8.26 +     rm -fr ${d} && cp -r ${f} ${d} && tar czf ../${d}-${rev_id}.tar.gz ${d}
    8.27 +  fi
    8.28 +
    8.29 +  if [ -f "pdf/hgbook.pdf" ] ; then
    8.30 +     cp pdf/hgbook.pdf ../hgbook-${l}-${rev_id}.pdf
    8.31 +     gzip -f9 ../hgbook-${l}-${rev_id}.pdf
    8.32 +  fi
    8.33 +
    8.34 +  if [ -f "epub/hgbook.epub" ] ; then
    8.35 +     cp epub/hgbook.epub ../hgbook-${l}-${rev_id}.epub
    8.36 +  fi
    8.37 +  )
    8.38 +done
    8.39 +
    8.40 +upload_pass=$1
    8.41 +upload_user=$2
    8.42 +
    8.43 +# echo "upload_pass: ${upload_pass}"
    8.44 +# echo "upload_user: ${upload_user}"
    8.45 +
    8.46 +if [ "${upload_user}x" == "x" ]; then
    8.47 +  upload_user="dongsheng.song"
    8.48 +fi
    8.49 +
    8.50 +if [ "${upload_pass}x" != "x" ]; then
    8.51 +  (
    8.52 +  cd ${build_dir}
    8.53 +  curl -s -O http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py
    8.54 +  if [[ "0" != $? ]]; then
    8.55 +    exit 1
    8.56 +  fi
    8.57 +
    8.58 +  for l in en zh; do
    8.59 +    if [ -f "hgbook-${l}-${rev_id}.epub" ] ; then
    8.60 +      python googlecode_upload.py --user="${upload_user}" --password="${upload_pass}" \
    8.61 +          -p "i18n-zh" -l "Type-Docs,book,hgbook,hg,mercurial,ebook" \
    8.62 +          -s "Distributed revision control with Mercurial - ${l} - ePub" \
    8.63 +          hgbook-${l}-${rev_id}.epub
    8.64 +    fi
    8.65 +
    8.66 +    if [ -f "hgbook-${l}-${rev_id}.pdf.gz" ] ; then
    8.67 +      python googlecode_upload.py --user="${upload_user}" --password="${upload_pass}" \
    8.68 +          -p "i18n-zh" -l "Type-Docs,book,hgbook,hg,mercurial" \
    8.69 +          -s "Distributed revision control with Mercurial - ${l} - pdf" \
    8.70 +          hgbook-${l}-${rev_id}.pdf.gz
    8.71 +    fi
    8.72 +
    8.73 +    for f in html html-single; do
    8.74 +      if [ -f "hgbook-${l}-${f}-${rev_id}.tar.gz" ] ; then
    8.75 +        python googlecode_upload.py --user="${upload_user}" --password="${upload_pass}" \
    8.76 +            -p "i18n-zh" -l "Type-Docs,book,hgbook,hg,mercurial" \
    8.77 +            -s "Distributed revision control with Mercurial - ${l} - ${f}" \
    8.78 +            hgbook-${l}-${f}-${rev_id}.tar.gz
    8.79 +      fi
    8.80 +    done
    8.81 +  done
    8.82 +  )
    8.83 +fi
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/contrib/hg-replay	Sun Aug 16 03:41:39 2009 +0200
     9.3 @@ -0,0 +1,107 @@
     9.4 +#!/usr/bin/env python
     9.5 +#
     9.6 +# Adapter for using interdiff with mercurial's extdiff extension.
     9.7 +#
     9.8 +# Copyright 2006 Bryan O'Sullivan <bos@serpentine.com>
     9.9 +#
    9.10 +# This software may be used and distributed according to the terms of
    9.11 +# the GNU General Public License, incorporated herein by reference.
    9.12 +
    9.13 +import os
    9.14 +import shutil
    9.15 +import sys
    9.16 +import tempfile
    9.17 +
    9.18 +if len(sys.argv) < 4:
    9.19 +    print >> sys.stderr, ('usage: %s srcrepo destrepo cset-to-omit [...]' %
    9.20 +                          os.path.basename(sys.argv[0]))
    9.21 +    sys.exit(1)
    9.22 +
    9.23 +srcrepo, destrepo = sys.argv[1], sys.argv[2]
    9.24 +omit = sys.argv[3:]
    9.25 +    
    9.26 +changemap = {}
    9.27 +revs = []
    9.28 +
    9.29 +parent = None
    9.30 +
    9.31 +sys.stdout.write('gathering history...')
    9.32 +sys.stdout.flush()
    9.33 +
    9.34 +for line in os.popen("hg --cwd %r log -r0:tip --template '{rev}:{node} {parents}\n'" % srcrepo):
    9.35 +    changes = line.split()
    9.36 +    cset = changes[0].split(':')[1]
    9.37 +    rev = len(revs)
    9.38 +    changemap[cset] = rev
    9.39 +    if len(changes) >= 2:
    9.40 +        p1 = int(changes[1].split(':', 1)[0])
    9.41 +    if len(changes) == 3:
    9.42 +        p2 = int(changes[2].split(':', 1)[0])
    9.43 +    else:
    9.44 +        p2 = None
    9.45 +    if len(changes) == 1:
    9.46 +        p1 = parent
    9.47 +    revs.append((cset, p1, p2))
    9.48 +    parent = rev
    9.49 +
    9.50 +sys.stdout.write(' %d revs\n' % len(revs))
    9.51 +
    9.52 +def findrev(r):
    9.53 +    try:
    9.54 +        i = int(r)
    9.55 +        if str(i) == r:
    9.56 +            rev = i
    9.57 +        if rev < 0:
    9.58 +            rev += len(revs)
    9.59 +        if rev < 0 or rev > len(revs):
    9.60 +            print >> sys.stderr, 'bad changeset: %r' % r
    9.61 +            sys.exit(1)
    9.62 +        cset = revs[rev][0]
    9.63 +    except ValueError:
    9.64 +        cset = r
    9.65 +        matches = [changemap[c] for c in changemap if c.startswith(cset)]
    9.66 +        if len(matches) != 1:
    9.67 +            print >> sys.stderr, 'bad changeset: %r' % r
    9.68 +            sys.exit(1)
    9.69 +        rev = matches[0]
    9.70 +    return rev
    9.71 +
    9.72 +def run(cmd):
    9.73 +    print cmd
    9.74 +    ret = os.system(cmd)
    9.75 +    if ret:
    9.76 +        print >> sys.stderr, 'failure:', cmd
    9.77 +        sys.exit(1)
    9.78 +
    9.79 +omit = map(findrev, omit)
    9.80 +omit.sort()
    9.81 +newrevs = revs[:omit[0]]
    9.82 +tip = len(newrevs) - 1
    9.83 +run('hg clone -q -r%s %r %r' % (tip, srcrepo, destrepo))
    9.84 +    
    9.85 +os.environ['HGMERGE'] = 'true'
    9.86 +
    9.87 +patchdir = tempfile.mkdtemp(prefix='replay.')
    9.88 +try:
    9.89 +    run('hg --cwd %r export --git -o %r%s%%R %d:tip' %
    9.90 +        (srcrepo, patchdir, os.sep, omit[0]+1))
    9.91 +    for rev in xrange(omit[0], len(revs)):
    9.92 +        if rev in omit:
    9.93 +            print 'omit', rev
    9.94 +            newrevs.append((None, revs[rev][1], None))
    9.95 +            continue
    9.96 +        _, p1, p2 = revs[rev]
    9.97 +        np1 = newrevs[p1][1]
    9.98 +        if tip != np1:
    9.99 +            run('hg --cwd %r update -q -C %s' % (destrepo, np1))
   9.100 +        np2 = None
   9.101 +        if p2:
   9.102 +            np2 = newrevs[p2][1]
   9.103 +            run('hg --cwd %r merge -q %s' % (destrepo, np2))
   9.104 +            print >> sys.stderr, 'XXX - cannot handle merges properly yet'
   9.105 +        run('hg --cwd %r import -q -f %r%s%d' % (destrepo, patchdir, os.sep, rev))
   9.106 +        tip = len(newrevs) - 1
   9.107 +        newrevs.append((None, tip, np2))
   9.108 +finally:
   9.109 +    print 'cleaning up ...'
   9.110 +    #shutil.rmtree(patchdir)
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/contrib/latex-to-docbook	Sun Aug 16 03:41:39 2009 +0200
    10.3 @@ -0,0 +1,198 @@
    10.4 +#!/usr/bin/python
    10.5 +#
    10.6 +# This is the most horrible of hacks. Pretend you're not looking.</para>
    10.7 +
    10.8 +import cStringIO as StringIO
    10.9 +import re, sys
   10.10 +
   10.11 +sections = {
   10.12 +    'chapter': 'chapter',
   10.13 +    'section': 'sect1',
   10.14 +    'subsection': 'sect2',
   10.15 +    'subsubsection': 'sect3',
   10.16 +    }
   10.17 +
   10.18 +envs = {
   10.19 +    'codesample2': 'programlisting',
   10.20 +    'codesample4': 'programlisting',
   10.21 +    'enumerate': 'orderedlist',
   10.22 +    'figure': 'informalfigure',
   10.23 +    'itemize': 'itemizedlist',
   10.24 +    'note': 'note',
   10.25 +    'quote': 'blockquote',
   10.26 +    }
   10.27 +
   10.28 +def process(ifp, ofp):
   10.29 +    print >> ofp, '<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->\n'
   10.30 +    stack = []
   10.31 +    para = True
   10.32 +    inlist = 0
   10.33 +    for line in ifp:
   10.34 +        if line.startswith('%%% Local Variables:'):
   10.35 +            break
   10.36 +        line = (line.rstrip()
   10.37 +                .replace('~', ' ')
   10.38 +                .replace('&', '&amp;')
   10.39 +                .replace('---', '&emdash;')
   10.40 +                .replace('\_', '_')
   10.41 +                .replace('\{', '{')
   10.42 +                .replace('\}', '}')
   10.43 +                .replace('\$', '$')
   10.44 +                .replace('\%', '%')
   10.45 +                .replace('\#', '#')
   10.46 +                .replace('<', '&lt;')
   10.47 +                .replace('>', '&gt;')
   10.48 +                .replace('``', '<quote>')
   10.49 +                .replace("''", '</quote>')
   10.50 +                .replace('\\', '\\'))
   10.51 +        line = re.sub(r'\s*\\(?:centering|small)\b\s*', '', line)
   10.52 +        line = re.sub(r'\\(?:hgrc\\|hgrc)\b',
   10.53 +                      r'<filename role="special"> /.hgrc</filename>', line)
   10.54 +        line = re.sub(r'\\item\[(?P<key>[^]]+)\]', r'\item \g<key>:', line)
   10.55 +        line = re.sub(r'\\bug{(?P<id>\d+)}',
   10.56 +                      r'<ulink role="hg-bug" url="http://www.selenic.com/mercurial/bts/issue\g<id>">issue \g<id></ulink>', line)
   10.57 +        line = re.sub(r'\\cite{([^}]+)}', r'<citation>\1</citation>', line)
   10.58 +        line = re.sub(r'\\hggopt{(?P<opt>[^}]+)}',
   10.59 +                      r'<option role="hg-opt-global">\g<opt></option>', line)
   10.60 +        line = re.sub(r'\\hgxopt{(?P<ext>[^}]+)}{(?P<cmd>[^}]+)}{(?P<opt>[^}]+)}',
   10.61 +                      r'<option role="hg-ext-\g<ext>-cmd-\g<cmd>-opt">\g<opt></option>', line)
   10.62 +        line = re.sub(r'\\hgxcmd{(?P<ext>[^}]+)}{(?P<cmd>[^}]+)}',
   10.63 +                      r'<command role="hg-ext-\g<ext>">\g<cmd></command>', line)
   10.64 +        line = re.sub(r'\\hgext{(?P<ext>[^}]+)}',
   10.65 +                      r'<literal role="hg-ext">\g<ext></literal>', line)
   10.66 +        line = re.sub(r'\\hgopt{(?P<cmd>[^}]+)}{(?P<opt>[^}]+)}',
   10.67 +                      r'<option role="hg-opt-\g<cmd>">\g<opt></option>',
   10.68 +                      line)
   10.69 +        line = re.sub(r'\\cmdopt{(?P<cmd>[^}]+)}{(?P<opt>[^}]+)}',
   10.70 +                      r'<option role="cmd-opt-\g<cmd>">\g<opt></option>',
   10.71 +                      line)
   10.72 +        line = re.sub(r'\\hgcmd{(?P<cmd>[^}]+)}',
   10.73 +                      r'<command role="hg-cmd">hg \g<cmd></command>', line)
   10.74 +        line = re.sub(r'\\caption{(?P<text>[^}]+?)}',
   10.75 +                      r'<caption><para>\g<text></para></caption>', line)
   10.76 +        line = re.sub(r'\\grafix{(?P<name>[^}]+)}',
   10.77 +                      r'<mediaobject><imageobject><imagedata fileref="\g<name>"/></imageobject><textobject><phrase>XXX add text</phrase></textobject></mediaobject>', line)
   10.78 +        line = re.sub(r'\\envar{(?P<name>[^}]+)}',
   10.79 +                      r'<envar>\g<name></envar>', line)
   10.80 +        line = re.sub(r'\\rcsection{(?P<sect>[^}]+)}',
   10.81 +                      r'<literal role="rc-\g<sect>">\g<sect></literal>', line)
   10.82 +        line = re.sub(r'\\rcitem{(?P<sect>[^}]+)}{(?P<name>[^}]+)}',
   10.83 +                      r'<envar role="rc-item-\g<sect>">\g<name></envar>', line)
   10.84 +        line = re.sub(r'\\dirname{(?P<dir>[^}]+?)}',
   10.85 +                      r'<filename class="directory">\g<dir></filename>', line)
   10.86 +        line = re.sub(r'\\filename{(?P<file>[^}]+?)}',
   10.87 +                      r'<filename>\g<file></filename>', line)
   10.88 +        line = re.sub(r'\\tildefile{(?P<file>[^}]+)}',
   10.89 +                      r'<filename role="home">~/\g<file></filename>', line)
   10.90 +        line = re.sub(r'\\sfilename{(?P<file>[^}]+)}',
   10.91 +                      r'<filename role="special">\g<file></filename>', line)
   10.92 +        line = re.sub(r'\\sdirname{(?P<dir>[^}]+)}',
   10.93 +                      r'<filename role="special" class="directory">\g<dir></filename>', line)
   10.94 +        line = re.sub(r'\\interaction{(?P<id>[^}]+)}',
   10.95 +                      r'<!-- &interaction.\g<id>; -->', line)
   10.96 +        line = re.sub(r'\\excode{(?P<id>[^}]+)}',
   10.97 +                      r'<!-- &example.\g<id>; -->', line)
   10.98 +        line = re.sub(r'\\pymod{(?P<mod>[^}]+)}',
   10.99 +                      r'<literal role="py-mod">\g<mod></literal>', line)
  10.100 +        line = re.sub(r'\\pymodclass{(?P<mod>[^}]+)}{(?P<class>[^}]+)}',
  10.101 +                      r'<literal role="py-mod-\g<mod>">\g<class></literal>', line)
  10.102 +        line = re.sub(r'\\url{(?P<url>[^}]+)}',
  10.103 +                      r'<ulink url="\g<url>">\g<url></ulink>', line)
  10.104 +        line = re.sub(r'\\href{(?P<url>[^}]+)}{(?P<text>[^}]+)}',
  10.105 +                      r'<ulink url="\g<url>">\g<text></ulink>', line)
  10.106 +        line = re.sub(r'\\command{(?P<cmd>[^}]+)}',
  10.107 +                      r'<command>\g<cmd></command>', line)
  10.108 +        line = re.sub(r'\\option{(?P<opt>[^}]+)}',
  10.109 +                      r'<option>\g<opt></option>', line)
  10.110 +        line = re.sub(r'\\ref{(?P<id>[^}]+)}', r'<xref linkend="\g<id>"/>', line)
  10.111 +        line = re.sub(r'\\emph{(?P<txt>[^}]+)}',
  10.112 +                      r'<emphasis>\g<txt></emphasis>', line)
  10.113 +        line = re.sub(r'\\texttt{(?P<txt>[^}]+)}',
  10.114 +                      r'<literal>\g<txt></literal>', line)
  10.115 +        line = re.sub(r'\\textbf{(?P<txt>[^}]+)}',
  10.116 +                      r'<emphasis role="bold">\g<txt></emphasis>', line)
  10.117 +        line = re.sub(r'\\hook{(?P<name>[^}]+)}',
  10.118 +                      r'<literal role="hook">\g<name></literal>', line)
  10.119 +        line = re.sub(r'\\tplfilter{(?P<name>[^}]+)}',
  10.120 +                      r'<literal role="template-filter">\g<name></literal>', line)
  10.121 +        line = re.sub(r'\\tplkword{(?P<name>[^}]+)}',
  10.122 +                      r'<literal role="template-keyword">\g<name></literal>', line)
  10.123 +        line = re.sub(r'\\tplkwfilt{(?P<tpl>[^}]+)}{(?P<name>[^}]+)}',
  10.124 +                      r'<literal role="template-kw-filt-\g<tpl>">\g<name></literal>', line)
  10.125 +        line = re.sub(r'\\[vV]erb(.)(?P<txt>[^\1]+?)\1',
  10.126 +                      r'<literal>\g<txt></literal>', line)
  10.127 +        line = re.sub(r'\\package{(?P<name>[^}]+)}',
  10.128 +                      r'<literal role="package">\g<name></literal>', line)
  10.129 +        line = re.sub(r'\\hgcmdargs{(?P<cmd>[^}]+)}{(?P<args>[^}]+)}',
  10.130 +                      r'<command role="hg-cmd">hg \g<cmd> \g<args></command>',
  10.131 +                      line)
  10.132 +        line = re.sub(r'\\cmdargs{(?P<cmd>[^}]+)}{(?P<args>[^}]+)}',
  10.133 +                      r'<command>\g<cmd> \g<args></command>',
  10.134 +                      line)
  10.135 +        m = re.match(r'\\(chapter|section|subsection|subsubsection){(.*)}', line)
  10.136 +        if m:
  10.137 +            kind, content = m.groups()
  10.138 +            sec = sections[kind]
  10.139 +            while stack and stack[-1] >= sec:
  10.140 +                close = stack.pop()
  10.141 +                print >> ofp, '</%s>' % close
  10.142 +            stack.append(sec)
  10.143 +            print >> ofp, '<%s>\n<title>%s</title>' % (sec, content)
  10.144 +        else:
  10.145 +            m = re.match(r'\s*\\(begin|end){(?P<sect>[^}]+)}', line)
  10.146 +            if m:
  10.147 +                if not para:
  10.148 +                    print >> ofp, '</para>'
  10.149 +                    if inlist:
  10.150 +                        ofp.write('</listitem>')
  10.151 +                    para = True
  10.152 +                state, env = m.groups()
  10.153 +                env = envs[env]
  10.154 +                if state == 'begin':
  10.155 +                    ofp.write('<')
  10.156 +                    if env in ('itemizedlist', 'orderedlist'):
  10.157 +                        inlist = 1
  10.158 +                else:
  10.159 +                    ofp.write('</')
  10.160 +                    if env in ('itemizedlist', 'orderedlist'):
  10.161 +                        inlist = 0
  10.162 +                print >> ofp, env + '>'
  10.163 +            else:
  10.164 +                if line.startswith('\\item '):
  10.165 +                    if inlist > 1:
  10.166 +                        print >> ofp, '</para>'
  10.167 +                        print >> ofp, '</listitem>'
  10.168 +                    else:
  10.169 +                        inlist = 2
  10.170 +                    para = True
  10.171 +                    line = line[6:]
  10.172 +                if line and para:
  10.173 +                    if inlist:
  10.174 +                        ofp.write('<listitem>')
  10.175 +                    ofp.write('<para>')
  10.176 +                    para = False
  10.177 +                if not line and not para:
  10.178 +                    print >> ofp, '</para>'
  10.179 +                    if inlist:
  10.180 +                        ofp.write('</listitem>')
  10.181 +                    para = True
  10.182 +                print >> ofp, line
  10.183 +    while stack:
  10.184 +        print >> ofp, '</%s>' % stack.pop()
  10.185 +    ofp.write('\n'.join(['\n<!--',
  10.186 +                         'local variables: ',
  10.187 +                         'sgml-parent-document: ("00book.xml" "book" "chapter")',
  10.188 +                         'end:',
  10.189 +                         '-->']))
  10.190 +
  10.191 +
  10.192 +if __name__ == '__main__':
  10.193 +    for name in sys.argv[1:]:
  10.194 +        if not name.endswith('.tex'):
  10.195 +            continue
  10.196 +        newname = name[:-3] + 'xml'
  10.197 +        ofp = StringIO.StringIO()
  10.198 +        process(open(name), ofp)
  10.199 +        s = ofp.getvalue()
  10.200 +        s = re.sub('\n+</para>', '</para>', s, re.M)
  10.201 +        open(newname, 'w').write(s)
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/contrib/sillybench.py	Sun Aug 16 03:41:39 2009 +0200
    11.3 @@ -0,0 +1,177 @@
    11.4 +#!/usr/bin/python
    11.5 +#
    11.6 +# Silly benchmarking program, to give a vague idea of how fast a few
    11.7 +# tools are on a handful of common operations.
    11.8 +#
    11.9 +# Use a fairly big and real source tarball to test with: Firefox
   11.10 +# 2.0.0.3 (37622 files, 5374 directories, 343MB unpacked onto
   11.11 +# 4KB-blocksize ext3).
   11.12 +
   11.13 +import csv
   11.14 +import os
   11.15 +import shutil
   11.16 +import sys
   11.17 +import tempfile
   11.18 +import time
   11.19 +import urllib2
   11.20 +
   11.21 +url = 'ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/2.0.0.3/source/firefox-2.0.0.3-source.tar.bz2'
   11.22 +
   11.23 +class CommandFailure(Exception):
   11.24 +    pass
   11.25 +
   11.26 +class rcs(object):
   11.27 +    def __init__(self):
   11.28 +        self.logfp = open(self.__class__.__name__ + '.csv', 'w')
   11.29 +        self.csv = csv.writer(self.logfp)
   11.30 +
   11.31 +    def download(self):
   11.32 +        name = url[url.rfind('/')+1:]
   11.33 +        path = os.path.join(os.environ['HOME'], name)
   11.34 +        if not os.path.isfile(path):
   11.35 +            ofp = open(path + '.part', 'wb')
   11.36 +            try:
   11.37 +                ifp = urllib2.urlopen(url)
   11.38 +                nbytes = ifp.info()['content-length']
   11.39 +                sys.stdout.write('%s: %s bytes ' % (name, nbytes))
   11.40 +                sys.stdout.flush()
   11.41 +                while True:
   11.42 +                    data = ifp.read(131072)
   11.43 +                    if not data: break
   11.44 +                    sys.stdout.write('.')
   11.45 +                    sys.stdout.flush()
   11.46 +                    ofp.write(data)
   11.47 +                del ofp
   11.48 +                os.rename(path + '.part', path)
   11.49 +            except:
   11.50 +                if os.path.exists(path + '.part'):
   11.51 +                    os.unlink(path + '.part')
   11.52 +                if os.path.exists(path):
   11.53 +                    os.unlink(path)
   11.54 +                raise
   11.55 +        return path
   11.56 +
   11.57 +    def run(self, args, mustsucceed=True):
   11.58 +        ret = os.spawnvp(os.P_WAIT, args[0], args)
   11.59 +        if ret < 0:
   11.60 +            msg = 'killed by signal %d' % (-ret)
   11.61 +        if ret > 0:
   11.62 +            msg = 'exited with status %d' % (ret)
   11.63 +        if ret:
   11.64 +            if mustsucceed:
   11.65 +                raise CommandFailure('%s: %s' % (msg, ' '.join(args)))
   11.66 +            print >> sys.stderr, 'WARNING: %s: %s' % (msg, ' '.join(args))
   11.67 +
   11.68 +    def time(self, *args, **kwargs):
   11.69 +        start = time.time()
   11.70 +        self.run(*args, **kwargs)
   11.71 +        end = time.time()
   11.72 +        return end - start
   11.73 +        
   11.74 +    def logtime(self, name, elapsed, rest=[]):
   11.75 +        self.log('time:' + name, '%.3f' % elapsed, rest)
   11.76 +
   11.77 +    def log(self, name, value, rest=[]):
   11.78 +        item = (name, value, repr(rest))
   11.79 +        print ' '.join(item)
   11.80 +        self.csv.writerow(item)
   11.81 +        self.logfp.flush()
   11.82 +
   11.83 +    def unpack(self):
   11.84 +        tarball = self.download()
   11.85 +        t = self.time(['tar', '-C', self.wdir, '-jxf', tarball])
   11.86 +        self.logtime('internal:untar', t)
   11.87 +        for name in os.listdir(os.path.join(self.wdir, 'mozilla')):
   11.88 +            os.rename(os.path.join(self.wdir, 'mozilla', name),
   11.89 +                      os.path.join(self.wdir, name))
   11.90 +
   11.91 +    def cleanup(self):
   11.92 +        pass
   11.93 +
   11.94 +    def add(self, paths):
   11.95 +        pass
   11.96 +
   11.97 +    def commit(self, msg, paths):
   11.98 +        pass
   11.99 +
  11.100 +    def status(self, path):
  11.101 +        pass
  11.102 +
  11.103 +    def remove(self, path):
  11.104 +        pass
  11.105 +
  11.106 +
  11.107 +class subversion(rcs):
  11.108 +    def __init__(self, root):
  11.109 +        rcs.__init__(self)
  11.110 +        self.repo = os.path.join(root, 'repo')
  11.111 +        self.wdir = os.path.join(root, 'wc')
  11.112 +        create = self.time(['svnadmin', 'create', '--fs-type=fsfs', self.repo])
  11.113 +        self.logtime('svn:create', create)
  11.114 +        co = self.time(['svn', 'co', 'file://' + self.repo, self.wdir])
  11.115 +        self.logtime('svn:co', co)
  11.116 +        self.logtime('init', create + co)
  11.117 +        os.chdir(self.wdir)
  11.118 +
  11.119 +    def dropmeta(self, names):
  11.120 +        return [n for n in names if os.path.basename(n) != '.svn']
  11.121 +
  11.122 +    def add(self, paths):
  11.123 +        t = self.time(['svn', 'add', '-q'] + paths)
  11.124 +        self.logtime('add %r' % paths, t)
  11.125 +
  11.126 +    def commit(self, msg, paths=[]):
  11.127 +        if paths:
  11.128 +            t = self.time(['svn', 'ci', '-q', '-m', msg] + paths)
  11.129 +        else:
  11.130 +            t = self.time(['svn', 'ci', '-q', '-m', msg])
  11.131 +        self.logtime('commit %r' % paths, t)
  11.132 +
  11.133 +
  11.134 +class mercurial(rcs):
  11.135 +    def __init__(self, root):
  11.136 +        rcs.__init__(self)
  11.137 +        self.repo = os.path.join(root, 'repo')
  11.138 +        self.wdir = self.repo
  11.139 +        init = self.time(['hg', 'init', self.repo])
  11.140 +        self.logtime('init', init)
  11.141 +        os.chdir(self.wdir)
  11.142 +
  11.143 +    def dropmeta(self, names):
  11.144 +        return [n for n in names if os.path.basename(n) != '.hg']
  11.145 +
  11.146 +    def add(self, paths):
  11.147 +        t = self.time(['hg', 'add', '-q'] + paths)
  11.148 +        self.logtime('add %r' % paths, t)
  11.149 +
  11.150 +    def commit(self, msg, paths=[]):
  11.151 +        if paths:
  11.152 +            t = self.time(['hg', 'ci', '-q', '-m', msg] + paths)
  11.153 +        else:
  11.154 +            t = self.time(['hg', 'ci', '-q', '-m', msg])
  11.155 +        self.logtime('commit %r' % paths, t)
  11.156 +
  11.157 +def benchmark(cls):
  11.158 +    oldcwd = os.getcwd()
  11.159 +    root = tempfile.mkdtemp(prefix='sillybench.')
  11.160 +    try:
  11.161 +        print 'root', root
  11.162 +        inst = cls(root)
  11.163 +        inst.unpack()
  11.164 +        names = inst.dropmeta(os.listdir('.'))
  11.165 +        dirs = [n for n in names if os.path.isdir(n)]
  11.166 +        nondirs = [n for n in names if not os.path.isdir(n)]
  11.167 +        dirs.sort(key=hash)
  11.168 +        names.sort(key=hash)
  11.169 +        for d in dirs[:len(dirs)/2]:
  11.170 +            inst.add([d])
  11.171 +            inst.commit('Add %r' % d, [d])
  11.172 +        inst.add(dirs[len(dirs)/2:] + names)
  11.173 +        inst.commit('Add remaining dirs and files')
  11.174 +    finally:
  11.175 +        print >> sys.stderr, '[cleaning up...]'
  11.176 +        shutil.rmtree(root)
  11.177 +        os.chdir(oldcwd)
  11.178 +
  11.179 +benchmark(mercurial)
  11.180 +#benchmark(subversion)
    12.1 --- a/en/00book.tex	Thu Mar 26 08:57:10 2009 +0100
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,76 +0,0 @@
    12.4 -% The use of oneside here is a temporary hack; \marginpar entries
    12.5 -% don't show up on odd pages of PDF output without it.  Sigh.
    12.6 -\documentclass[oneside]{book}
    12.7 -\usepackage{enumerate}
    12.8 -\usepackage{fullpage}
    12.9 -\usepackage{makeidx}
   12.10 -\usepackage{ifpdf}
   12.11 -\usepackage{graphicx}
   12.12 -\usepackage{pslatex}
   12.13 -\usepackage{fancyvrb}
   12.14 -% leave hyperref until last
   12.15 -\usepackage[colorlinks=true,bookmarks=true,pdftitle={Distributed
   12.16 -  revision control with Mercurial},pdfsubject={Revision
   12.17 -  control},pdfkeywords={Mercurial, Revision control, Distributed
   12.18 -  revision control},pdfauthor={Bryan O'Sullivan}]{hyperref}
   12.19 -
   12.20 -\include{99defs}
   12.21 -
   12.22 -\title{Distributed revision control with Mercurial} \author{Bryan
   12.23 -  O'Sullivan}
   12.24 -\date{Copyright \copyright\ 2006, 2007 Bryan O'Sullivan.\\
   12.25 -  This material may be distributed only subject to the terms and
   12.26 -  conditions set forth in version 1.0 of the Open Publication License.
   12.27 -  Please refer to Appendix~\ref{cha:opl} for the license text.\\
   12.28 -  This book was prepared from
   12.29 -  \href{http://hg.serpentine.com/mercurial/book/}{rev~\input{build_id}}
   12.30 -  using \href{http://www.selenic.com/hg/}{rev~\input{hg_id}} of Mercurial.}
   12.31 -
   12.32 -\makeindex
   12.33 -
   12.34 -\begin{document}
   12.35 -
   12.36 -\maketitle
   12.37 -
   12.38 -\addcontentsline{toc}{chapter}{Contents}
   12.39 -\pagenumbering{roman}
   12.40 -\tableofcontents
   12.41 -\listoffigures
   12.42 -%\listoftables
   12.43 -
   12.44 -\pagenumbering{arabic}
   12.45 -
   12.46 -\include{preface}
   12.47 -\include{intro}
   12.48 -\include{tour-basic}
   12.49 -\include{tour-merge}
   12.50 -\include{concepts}
   12.51 -\include{daily}
   12.52 -\include{collab}
   12.53 -\include{filenames}
   12.54 -\include{branch}
   12.55 -\include{undo}
   12.56 -\include{hook}
   12.57 -\include{template}
   12.58 -\include{mq}
   12.59 -\include{mq-collab}
   12.60 -\include{hgext}
   12.61 -
   12.62 -\appendix
   12.63 -\include{cmdref}
   12.64 -\include{mq-ref}
   12.65 -\include{srcinstall}
   12.66 -\include{license}
   12.67 -\addcontentsline{toc}{chapter}{Bibliography}
   12.68 -\bibliographystyle{alpha}
   12.69 -\bibliography{99book}
   12.70 -
   12.71 -\addcontentsline{toc}{chapter}{Index}
   12.72 -\printindex
   12.73 -
   12.74 -\end{document}
   12.75 -
   12.76 -%%% Local Variables: 
   12.77 -%%% mode: latex
   12.78 -%%% TeX-master: t
   12.79 -%%% End: 
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/en/00book.xml	Sun Aug 16 03:41:39 2009 +0200
    13.3 @@ -0,0 +1,110 @@
    13.4 +<?xml version="1.0" encoding="UTF-8"?>
    13.5 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    13.6 +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
    13.7 + "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
    13.8 +[
    13.9 +<!-- Below are references to files in this directory. -->
   13.10 +
   13.11 +<!-- Chapters. -->
   13.12 +
   13.13 +<!ENTITY ch00     SYSTEM "ch00-preface.xml">
   13.14 +<!ENTITY ch01     SYSTEM "ch01-intro.xml">
   13.15 +<!ENTITY ch02     SYSTEM "ch02-tour-basic.xml">
   13.16 +<!ENTITY ch03     SYSTEM "ch03-tour-merge.xml">
   13.17 +<!ENTITY ch04     SYSTEM "ch04-concepts.xml">
   13.18 +<!ENTITY ch05     SYSTEM "ch05-daily.xml">
   13.19 +<!ENTITY ch06     SYSTEM "ch06-collab.xml">
   13.20 +<!ENTITY ch07     SYSTEM "ch07-filenames.xml">
   13.21 +<!ENTITY ch08     SYSTEM "ch08-branch.xml">
   13.22 +<!ENTITY ch09     SYSTEM "ch09-undo.xml">
   13.23 +<!ENTITY ch10     SYSTEM "ch10-hook.xml">
   13.24 +<!ENTITY ch11     SYSTEM "ch11-template.xml">
   13.25 +<!ENTITY ch12     SYSTEM "ch12-mq.xml">
   13.26 +<!ENTITY ch13     SYSTEM "ch13-mq-collab.xml">
   13.27 +<!ENTITY ch14     SYSTEM "ch14-hgext.xml">
   13.28 +<!ENTITY appA     SYSTEM "appA-svn.xml">
   13.29 +<!ENTITY appB     SYSTEM "appB-mq-ref.xml">
   13.30 +<!ENTITY appC     SYSTEM "appC-srcinstall.xml">
   13.31 +<!ENTITY appD     SYSTEM "appD-license.xml">
   13.32 +
   13.33 +<!-- Include our standard shortcuts. -->
   13.34 +
   13.35 +<!ENTITY % SHORTCUTS SYSTEM "book-shortcuts.xml">
   13.36 +%SHORTCUTS;
   13.37 +
   13.38 +<!-- Include automatically and manually generated code snippets. -->
   13.39 +
   13.40 +<!ENTITY % AUTOSNIPPETS SYSTEM "examples/auto-snippets.xml">
   13.41 +%AUTOSNIPPETS;
   13.42 +]>
   13.43 +
   13.44 +<book id="hg">
   13.45 +  <title>Mercurial: The Definitive Guide</title>
   13.46 +  
   13.47 +  <!-- hg parents &#x2d;&#x2d;template '{node|short} ({date|shortdate})' 
   13.48 +  <subtitle>Compiled from 8a1d3f1aff17 (2009-03-10)</subtitle>
   13.49 +  -->
   13.50 +  <subtitle>Compiled from $rev_id$</subtitle>
   13.51 +  <bookinfo>
   13.52 +    <edition>1</edition>
   13.53 +    <isbn>9780596800673</isbn>
   13.54 +    <authorgroup>
   13.55 +      <author>
   13.56 +        <firstname>Bryan</firstname>
   13.57 +        <surname>O'Sullivan</surname>
   13.58 +      </author>
   13.59 +    </authorgroup>
   13.60 +
   13.61 +    <editor>
   13.62 +      <firstname>Mike</firstname>
   13.63 +      <surname>Loukides</surname>
   13.64 +    </editor>
   13.65 +
   13.66 +    <copyright>
   13.67 +      <year>2006</year>
   13.68 +      <year>2007</year>
   13.69 +      <year>2008</year>
   13.70 +      <year>2009</year>
   13.71 +      <holder>Bryan O'Sullivan</holder>
   13.72 +    </copyright>
   13.73 +  </bookinfo>
   13.74 +
   13.75 +  <!-- BEGIN ch00 -->
   13.76 +  &ch00;
   13.77 +  <!-- BEGIN ch01 -->
   13.78 +  &ch01;
   13.79 +  <!-- BEGIN ch02 -->
   13.80 +  &ch02;
   13.81 +  <!-- BEGIN ch03 -->
   13.82 +  &ch03;
   13.83 +  <!-- BEGIN ch04 -->
   13.84 +  &ch04;
   13.85 +  <!-- BEGIN ch05 -->
   13.86 +  &ch05;
   13.87 +  <!-- BEGIN ch06 -->
   13.88 +  &ch06;
   13.89 +  <!-- BEGIN ch07 -->
   13.90 +  &ch07;
   13.91 +  <!-- BEGIN ch08 -->
   13.92 +  &ch08;
   13.93 +  <!-- BEGIN ch09 -->
   13.94 +  &ch09;
   13.95 +  <!-- BEGIN ch10 -->
   13.96 +  &ch10;
   13.97 +  <!-- BEGIN ch11 -->
   13.98 +  &ch11;
   13.99 +  <!-- BEGIN ch12 -->
  13.100 +  &ch12;
  13.101 +  <!-- BEGIN ch13 -->
  13.102 +  &ch13;
  13.103 +  <!-- BEGIN ch14 -->
  13.104 +  &ch14;
  13.105 +  <!-- BEGIN appA -->
  13.106 +  &appA;
  13.107 +  <!-- BEGIN appB -->
  13.108 +  &appB;
  13.109 +  <!-- BEGIN appC -->
  13.110 +  &appC;
  13.111 +  <!-- BEGIN appD -->
  13.112 +  &appD;
  13.113 +</book>
    14.1 --- a/en/99book.bib	Thu Mar 26 08:57:10 2009 +0100
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,76 +0,0 @@
    14.4 -@Unpublished{gruenbacher:2005,
    14.5 -  author = 	 {Andreas Gruenbacher},
    14.6 -  title = 	 {How To Survive With Many Patches (Introduction to \texttt{quilt})},
    14.7 -  year = 	 {2005},
    14.8 -  month = 	 {June},
    14.9 -  note =         {\url{http://www.suse.de/~agruen/quilt.pdf}},
   14.10 -}
   14.11 -
   14.12 -@InProceedings{web:europython,
   14.13 -  author = 	 {Bryan O'Sullivan},
   14.14 -  title = 	 {Achieving High Performance in Mercurial},
   14.15 -  booktitle = 	 {EuroPython Conference},
   14.16 -  year = 	 {2006},
   14.17 -  month = 	 {July},
   14.18 -  note = 	 {\url{XXX}},
   14.19 -}
   14.20 -
   14.21 -@Misc{web:diffstat,
   14.22 -  author = 	 {Thomas Dickey},
   14.23 -  title = 	 {\texttt{diffstat}--make a histogram of \texttt{diff} output},
   14.24 -  note = 	 {\url{http://dickey.his.com/diffstat/diffstat.html}},
   14.25 -}
   14.26 -
   14.27 -@Misc{web:quilt,
   14.28 -  author = 	 {Andreas Gruenbacher, Martin Quinson, Jean Delvare},
   14.29 -  title = 	 {Patchwork Quilt},
   14.30 -  note = 	 {\url{http://savannah.nongnu.org/projects/quilt}},
   14.31 -}
   14.32 -
   14.33 -@Misc{web:patchutils,
   14.34 -  author = 	 {Tim Waugh},
   14.35 -  title = 	 {\texttt{patchutils}--programs that operate on patch files},
   14.36 -  note = 	 {\url{http://cyberelk.net/tim/patchutils/}},
   14.37 -}
   14.38 -
   14.39 -@Misc{web:mpatch,
   14.40 -  author = 	 {Chris Mason},
   14.41 -  title = 	 {\texttt{mpatch}--help solve patch rejects},
   14.42 -  note = 	 {\url{http://oss.oracle.com/~mason/mpatch/}},
   14.43 -}
   14.44 -
   14.45 -@Misc{web:wiggle,
   14.46 -  author = 	 {Neil Brown},
   14.47 -  title = 	 {\texttt{wiggle}--apply conflicting patches},
   14.48 -  note = 	 {\url{http://cgi.cse.unsw.edu.au/~neilb/source/wiggle/}},
   14.49 -}
   14.50 -
   14.51 -@Misc{web:mysql-python,
   14.52 -  author =	 {Andy Dustman},
   14.53 -  title =	 {MySQL for Python},
   14.54 -  note =	 {\url{http://sourceforge.net/projects/mysql-python}},
   14.55 -}
   14.56 -
   14.57 -@Misc{web:changelog,
   14.58 -  author =	 {Richard Stallman, GNU Project volunteers},
   14.59 -  title =	 {GNU Coding Standards---Change Logs},
   14.60 -  note =	 {\url{http://www.gnu.org/prep/standards/html_node/Change-Logs.html}},
   14.61 -}
   14.62 -
   14.63 -@Misc{web:macpython,
   14.64 -  author =	 {Bob Ippolito, Ronald Oussoren},
   14.65 -  title =	 {Universal MacPython},
   14.66 -  note =	 {\url{http://bob.pythonmac.org/archives/2006/04/10/python-and-universal-binaries-on-mac-os-x/}},
   14.67 -}
   14.68 -
   14.69 -@Misc{web:putty,
   14.70 -  author =	 {Simon Tatham},
   14.71 -  title =	 {PuTTY---open source ssh client for Windows},
   14.72 -  note =	 {\url{http://www.chiark.greenend.org.uk/~sgtatham/putty/}},
   14.73 -}
   14.74 -
   14.75 -@Misc{web:configparser,
   14.76 -  author =       {Python.org},
   14.77 -  title =	 {\texttt{ConfigParser}---Configuration file parser},
   14.78 -  note =	 {\url{http://docs.python.org/lib/module-ConfigParser.html}},
   14.79 -}
    15.1 --- a/en/99defs.tex	Thu Mar 26 08:57:10 2009 +0100
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,146 +0,0 @@
    15.4 -% Bug ID.
    15.5 -\newcommand{\bug}[1]{\index{Mercurial bug
    15.6 -    database!\href{http://www.selenic.com/mercurial/bts/issue#1}{bug
    15.7 -      ~#1}}\href{http://www.selenic.com/mercurial/bts/issue#1}{Mercurial
    15.8 -    bug no.~#1}}
    15.9 -
   15.10 -% File name in the user's home directory.
   15.11 -\newcommand{\tildefile}[1]{\texttt{\~{}/#1}}
   15.12 -
   15.13 -% File name.
   15.14 -\newcommand{\filename}[1]{\texttt{#1}}
   15.15 -
   15.16 -% Directory name.
   15.17 -\newcommand{\dirname}[1]{\texttt{#1}}
   15.18 -
   15.19 -% File name, with index entry.
   15.20 -% The ``s'' prefix comes from ``special''.
   15.21 -\newcommand{\sfilename}[1]{\index{\texttt{#1} file}\texttt{#1}}
   15.22 -
   15.23 -% Directory name, with index entry.
   15.24 -\newcommand{\sdirname}[1]{\index{\texttt{#1} directory}\texttt{#1}}
   15.25 -
   15.26 -% Mercurial extension.
   15.27 -\newcommand{\hgext}[1]{\index{\texttt{#1} extension}\texttt{#1}}
   15.28 -
   15.29 -% Command provided by a Mercurial extension.
   15.30 -\newcommand{\hgxcmd}[2]{\index{\texttt{#2} command (\texttt{#1}
   15.31 -      extension)}\index{\texttt{#1} extension!\texttt{#2} command}``\texttt{hg #2}''}
   15.32 -
   15.33 -% Mercurial command.
   15.34 -\newcommand{\hgcmd}[1]{\index{\texttt{#1} command}``\texttt{hg #1}''}
   15.35 -
   15.36 -% Mercurial command, with arguments.
   15.37 -\newcommand{\hgcmdargs}[2]{\index{\texttt{#1} command}``\texttt{hg #1 #2}''}
   15.38 -
   15.39 -\newcommand{\tplkword}[1]{\index{\texttt{#1} template keyword}\index{template keywords!\texttt{#1}}\texttt{#1}}
   15.40 -
   15.41 -\newcommand{\tplkwfilt}[2]{\index{\texttt{#1} template keyword!\texttt{#2}
   15.42 -    filter}\index{template filters!\texttt{#2}}\index{\texttt{#2}
   15.43 -    template filter}\texttt{#2}}
   15.44 -
   15.45 -\newcommand{\tplfilter}[1]{\index{template
   15.46 -    filters!\texttt{#1}}\index{\texttt{#1} template
   15.47 -    filter}\texttt{#1}}
   15.48 -
   15.49 -% Shell/system command.
   15.50 -\newcommand{\command}[1]{\index{\texttt{#1} system command}\texttt{#1}}
   15.51 -
   15.52 -% Shell/system command, with arguments.
   15.53 -\newcommand{\cmdargs}[2]{\index{\texttt{#1} system command}``\texttt{#1 #2}''}
   15.54 -
   15.55 -% Mercurial command option.
   15.56 -\newcommand{\hgopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}}
   15.57 -
   15.58 -% Mercurial command option, provided by an extension command.
   15.59 -\newcommand{\hgxopt}[3]{\index{\texttt{#2} command (\texttt{#1} extension)!\texttt{#3} option}\index{\texttt{#1} extension!\texttt{#2} command!\texttt{#3} option}\texttt{#3}}
   15.60 -
   15.61 -% Mercurial global option.
   15.62 -\newcommand{\hggopt}[1]{\index{global options!\texttt{#1} option}\texttt{#1}}
   15.63 -
   15.64 -% Shell/system command option.
   15.65 -\newcommand{\cmdopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}}
   15.66 -
   15.67 -% Command option.
   15.68 -\newcommand{\option}[1]{\texttt{#1}}
   15.69 -
   15.70 -% Software package.
   15.71 -\newcommand{\package}[1]{\index{\texttt{#1} package}\texttt{#1}}
   15.72 -
   15.73 -% Section name from a hgrc file.
   15.74 -\newcommand{\rcsection}[1]{\index{\texttt{hgrc} file!\texttt{#1} section}\texttt{[#1]}}
   15.75 -
   15.76 -% Named item in a hgrc file section.
   15.77 -\newcommand{\rcitem}[2]{\index{\texttt{hgrc} file!\texttt{#1}
   15.78 -    section!\texttt{#2} entry}\texttt{#2}}
   15.79 -
   15.80 -% hgrc file.
   15.81 -\newcommand{\hgrc}{\index{configuration file!\texttt{hgrc}
   15.82 -    (Linux/Unix)}\index{\texttt{hgrc} configuration file}\texttt{hgrc}}
   15.83 -
   15.84 -% Mercurial.ini file.
   15.85 -\newcommand{\hgini}{\index{configuration file!\texttt{Mercurial.ini}
   15.86 -    (Windows)}\index{\texttt{Mercurial.ini} configuration file}\texttt{Mercurial.ini}}
   15.87 -
   15.88 -% Hook name.
   15.89 -\newcommand{\hook}[1]{\index{\texttt{#1} hook}\index{hooks!\texttt{#1}}\texttt{#1}}
   15.90 -
   15.91 -% Environment variable.
   15.92 -\newcommand{\envar}[1]{\index{\texttt{#1} environment
   15.93 -    variable}\index{environment variables!\texttt{#1}}\texttt{#1}}
   15.94 -
   15.95 -% Python module.
   15.96 -\newcommand{\pymod}[1]{\index{\texttt{#1} module}\texttt{#1}}
   15.97 -
   15.98 -% Python class in a module.
   15.99 -\newcommand{\pymodclass}[2]{\index{\texttt{#1} module!\texttt{#2}
  15.100 -    class}\texttt{#1.#2}}
  15.101 -
  15.102 -% Python function in a module.
  15.103 -\newcommand{\pymodfunc}[2]{\index{\texttt{#1} module!\texttt{#2}
  15.104 -    function}\texttt{#1.#2}}
  15.105 -
  15.106 -% Note: blah blah.
  15.107 -\newsavebox{\notebox}
  15.108 -\newenvironment{note}%
  15.109 -  {\begin{lrbox}{\notebox}\begin{minipage}{0.7\textwidth}\textbf{Note:}\space}%
  15.110 -  {\end{minipage}\end{lrbox}\fbox{\usebox{\notebox}}}
  15.111 -\newenvironment{caution}%
  15.112 -  {\begin{lrbox}{\notebox}\begin{minipage}{0.7\textwidth}\textbf{Caution:}\space}%
  15.113 -  {\end{minipage}\end{lrbox}\fbox{\usebox{\notebox}}}
  15.114 -
  15.115 -% Code sample, eating 4 characters of leading space.
  15.116 -\DefineVerbatimEnvironment{codesample4}{Verbatim}{frame=single,gobble=4,numbers=left,commandchars=\\\{\}}
  15.117 -
  15.118 -% Code sample, eating 2 characters of leading space.
  15.119 -\DefineVerbatimEnvironment{codesample2}{Verbatim}{frame=single,gobble=2,numbers=left,commandchars=\\\{\}}
  15.120 -
  15.121 -% Interaction from the examples directory.
  15.122 -\newcommand{\interaction}[1]{\VerbatimInput[frame=single,numbers=left,commandchars=\\\{\}]{examples/#1.lxo}}
  15.123 -% Example code from the examples directory.
  15.124 -\newcommand{\excode}[1]{\VerbatimInput[frame=single,numbers=left,commandchars=\\\{\}]{../examples/#1}}
  15.125 -
  15.126 -% Graphics inclusion.
  15.127 -\ifpdf
  15.128 -  \newcommand{\grafix}[1]{\includegraphics{#1}}
  15.129 -\else
  15.130 -  \newcommand{\grafix}[1]{\includegraphics{#1.png}}
  15.131 -\fi
  15.132 -
  15.133 -% Reference entry for a command.
  15.134 -\newcommand{\cmdref}[2]{\section{\hgcmd{#1}---#2}\label{cmdref:#1}\index{\texttt{#1} command}}
  15.135 -
  15.136 -% Reference entry for a command option with long and short forms.
  15.137 -\newcommand{\optref}[3]{\subsubsection{\hgopt{#1}{--#3}, also \hgopt{#1}{-#2}}}
  15.138 -
  15.139 -% Reference entry for a command option with only long form.
  15.140 -\newcommand{\loptref}[2]{\subsubsection{\hgopt{#1}{--#2} option}}
  15.141 -
  15.142 -% command to generate a footnote to be used as a translator's note
  15.143 -\newcommand{\ndt}[1]{\footnote{\textbf{N. del T.} #1}}
  15.144 -
  15.145 -
  15.146 -%%% Local Variables: 
  15.147 -%%% mode: latex
  15.148 -%%% TeX-master: "00book"
  15.149 -%%% End: 
    16.1 --- a/en/Makefile	Thu Mar 26 08:57:10 2009 +0100
    16.2 +++ b/en/Makefile	Sun Aug 16 03:41:39 2009 +0200
    16.3 @@ -1,62 +1,26 @@
    16.4  # This makefile requires GNU make.
    16.5  
    16.6 -sources := \
    16.7 -	00book.tex \
    16.8 -	99book.bib \
    16.9 -	99defs.tex \
   16.10 -	build_id.tex \
   16.11 -	branch.tex \
   16.12 -	cmdref.tex \
   16.13 -	collab.tex \
   16.14 -	concepts.tex \
   16.15 -	daily.tex \
   16.16 -	filenames.tex \
   16.17 -	hg_id.tex \
   16.18 -	hgext.tex \
   16.19 -	hook.tex \
   16.20 -	intro.tex \
   16.21 -	mq.tex \
   16.22 -	mq-collab.tex \
   16.23 -	mq-ref.tex \
   16.24 -	preface.tex \
   16.25 -	srcinstall.tex \
   16.26 -	template.tex \
   16.27 -	tour-basic.tex \
   16.28 -	tour-merge.tex \
   16.29 -	undo.tex
   16.30 -
   16.31 -image-sources := \
   16.32 -	feature-branches.dot \
   16.33 -	filelog.svg \
   16.34 -	kdiff3.png \
   16.35 -	metadata.svg \
   16.36 -	mq-stack.svg \
   16.37 -	note.png \
   16.38 -	revlog.svg \
   16.39 -	snapshot.svg \
   16.40 -	tour-history.svg \
   16.41 -	tour-merge-conflict.svg \
   16.42 -	tour-merge-merge.svg \
   16.43 -	tour-merge-pull.svg \
   16.44 -	tour-merge-sep-repos.svg \
   16.45 -	undo-manual.dot \
   16.46 -	undo-manual-merge.dot \
   16.47 -	undo-non-tip.dot \
   16.48 -	undo-simple.dot \
   16.49 -	wdir.svg \
   16.50 -	wdir-after-commit.svg \
   16.51 -	wdir-branch.svg \
   16.52 -	wdir-merge.svg \
   16.53 -	wdir-pre-branch.svg
   16.54 +image-sources := $(wildcard figs/*.dot figs/*.gif figs/*.png figs/*.svg)
   16.55 +
   16.56 +xml-src-files := \
   16.57 +	00book.xml \
   16.58 +	app*.xml \
   16.59 +	ch*.xml
   16.60  
   16.61  image-dot := $(filter %.dot,$(image-sources))
   16.62  image-svg := $(filter %.svg,$(image-sources))
   16.63 -image-png := $(filter %.png,$(image-sources))
   16.64 -
   16.65 -image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png)
   16.66 -image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png)
   16.67 -
   16.68 -example-sources := \
   16.69 +image-oth := $(filter %.gif %.png,$(image-sources))
   16.70 +
   16.71 +obj-web := html
   16.72 +obj-websup := $(obj-web)/support
   16.73 +obj-web-read := $(obj-web)/read
   16.74 +
   16.75 +image-web := \
   16.76 +	$(image-dot:%.dot=$(obj-web-read)/%.png) \
   16.77 +	$(image-svg:%.svg=$(obj-web-read)/%.png) \
   16.78 +	$(image-oth:%=$(obj-web-read)/%)
   16.79 +
   16.80 +example-sources-by-name := \
   16.81  	backout \
   16.82  	bisect \
   16.83  	branching \
   16.84 @@ -71,7 +35,6 @@
   16.85  	filenames \
   16.86  	hook.msglen \
   16.87  	hook.simple \
   16.88 -	hook.ws \
   16.89  	issue29 \
   16.90  	mq.guards \
   16.91  	mq.qinit-help \
   16.92 @@ -88,6 +51,49 @@
   16.93  	tour \
   16.94  	tour-merge-conflict
   16.95  
   16.96 +example-sources := \
   16.97 +	$(example-sources-by-name:%=examples/%) \
   16.98 +	$(wildcard examples/ch*/*)
   16.99 +
  16.100 +extras-web-base := \
  16.101 +	$(obj-web)/index.html \
  16.102 +	$(obj-web)/robots.txt \
  16.103 +	$(obj-websup)/form-min.js \
  16.104 +	$(obj-websup)/form.js \
  16.105 +	$(obj-websup)/hsbook.js \
  16.106 +	$(obj-websup)/jquery-min.js \
  16.107 +	$(obj-websup)/jquery.js \
  16.108 +	$(obj-websup)/styles.css
  16.109 +
  16.110 +extras-web := $(extras-web-base) $(extras-web-base:%=%.gz)
  16.111 +
  16.112 +xsltproc := xsltproc
  16.113 +xsltproc-opts := --nonet --xinclude --path '$(xml-path)'
  16.114 +
  16.115 +xmllint := xmllint
  16.116 +xmllint-opts := --noout --nonet --valid
  16.117 +
  16.118 +system-xsl-dir := $(firstword $(wildcard \
  16.119 +	/usr/share/sgml/docbook/xsl-stylesheets \
  16.120 +	/usr/share/xml/docbook/stylesheet/nwalsh \
  16.121 +	))
  16.122 +
  16.123 +# Bletcherousness.
  16.124 +
  16.125 +ifneq ($(wildcard /usr/share/sgml/docbook/xml-dtd-4.4-*),)
  16.126 +dtd-dir := $(wildcard /usr/share/sgml/docbook/xml-dtd-4.4-*)
  16.127 +else
  16.128 +ifneq ($(wildcard /usr/share/xml/docbook/schema/dtd/4.4),)
  16.129 +dtd-dir := $(wildcard /usr/share/xml/docbook/schema/dtd/4.4)
  16.130 +else
  16.131 +$(error Do not know where to look for DocBook XML 4.4 DTD)
  16.132 +endif
  16.133 +endif
  16.134 +
  16.135 +ifeq ($(system-xsl-dir),)
  16.136 +$(error add a suitable directory to system-xsl-dir)
  16.137 +endif
  16.138 +
  16.139  example-prereqs := \
  16.140  	/usr/bin/merge
  16.141  
  16.142 @@ -96,11 +102,6 @@
  16.143  	../html/index.html.var \
  16.144  	../html/index.en.html
  16.145  
  16.146 -latex-options = \
  16.147 -	-interaction batchmode \
  16.148 -	-output-directory $(dir $(1)) \
  16.149 -	-jobname $(basename $(notdir $(1)))
  16.150 -
  16.151  hg = $(shell which hg)
  16.152  
  16.153  hg-id = $(shell hg parents --template '{node|short}, dated {date|isodate},\n')
  16.154 @@ -108,113 +109,111 @@
  16.155  hg-version = $(shell hg version -q | \
  16.156  		     sed 's,.*(version \(unknown\|[a-f0-9+]*\)),\1,')
  16.157  
  16.158 -all: pdf html
  16.159 -
  16.160 -pdf: pdf/hgbook.pdf
  16.161 -
  16.162 -define pdf
  16.163 +all: web complete.xml
  16.164 +
  16.165 +../stylesheets/system-xsl: $(system-xsl-dir)
  16.166 +	ln -s $< $@
  16.167 +
  16.168 +web: ../stylesheets/system-xsl websup html
  16.169 +
  16.170 +html: $(obj-web-read)/index.html
  16.171 +
  16.172 +../web/index-read.html.in: ../web/genindex.py $(xml-src-files)
  16.173 +	cd ../web && ./genindex.py
  16.174 +
  16.175 +$(obj-web-read)/index.html: ../stylesheets/system-xsl .validated-00book.xml ../web/index-read.html.in
  16.176 +	xsltproc $(xsltproc-opts) -o $(obj-web-read)/x ../stylesheets/chunk-stylesheet.xsl 00book.xml
  16.177 +	python ../web/texpand.py ../web/index-read.html.in html/read/index.html
  16.178 +	for i in $(obj-web-read)/*.html; do \
  16.179 +	  gzip -9 -c $$i > $$i.gz; \
  16.180 +	done
  16.181 +
  16.182 +websup: $(extras-web) $(image-web)
  16.183 +	mkdir -p $(obj-websup)/figs $(obj-web-read)/figs
  16.184 +	cp ../stylesheets/system-xsl/images/*.png $(obj-websup)/figs
  16.185 +	cp -f ../web/icons/*.png $(obj-websup)/figs
  16.186 +
  16.187 +complete.xml: .validated-00book.xml
  16.188 +	$(xsltproc) $(xsltproc-opts) -o $@ ../stylesheets/dtd-profile.xsl 00book.xml
  16.189 +
  16.190 +all-ids.dat: ../stylesheets/all-ids.xsl $(xml-src-files)
  16.191 +	$(xsltproc) $(xsltproc-opts) -o $@ ../stylesheets/all-ids.xsl 00book.xml
  16.192 +
  16.193 +web: websup
  16.194 +
  16.195 +valid: .validated-00book.xml
  16.196 +
  16.197 +.validated-00book.xml: $(xml-src-files) examples/.run
  16.198 +	$(xmllint) --path '$(dtd-dir):$(xml-path)' $(xmllint-opts) $<
  16.199 +	touch $@
  16.200 +
  16.201 +# Produce 90dpi PNGs for the web.
  16.202 +
  16.203 +$(obj-web-read)/figs/%.png: $(obj-web-read)/figs/%.svg fixsvg
  16.204  	mkdir -p $(dir $@)
  16.205 -	TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
  16.206 -	cp 99book.bib $(dir $@)
  16.207 -	cd $(dir $@) && bibtex $(basename $(notdir $@))
  16.208 -	cd $(dir $@) && makeindex $(basename $(notdir $@))
  16.209 -	TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
  16.210 -	TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
  16.211 -	if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi
  16.212 -endef
  16.213 -
  16.214 -pdf/hgbook.pdf: $(sources) examples $(image-pdf)
  16.215 -	$(call pdf)
  16.216 -
  16.217 -html: onepage split
  16.218 -
  16.219 -onepage: $(htlatex) html/onepage/hgbook.html html/onepage/hgbook.css $(image-html:%=html/onepage/%)
  16.220 -
  16.221 -html/onepage/%: %
  16.222 -	cp $< $@
  16.223 -
  16.224 -split: $(htlatex) html/split/hgbook.html html/split/hgbook.css $(image-html:%=html/split/%)
  16.225 -
  16.226 -html/split/%: %
  16.227 -	cp $< $@
  16.228 -
  16.229 -# This is a horrible hack to work around the fact that the htlatex
  16.230 -# command in tex4ht is itself a horrible hack.  I really don't want to
  16.231 -# include verbatim the big wad of TeX that is repeated in that script,
  16.232 -# but I've given up and run a hacked copy as htlatex.book here.
  16.233 -
  16.234 -define htlatex
  16.235 -	mkdir -p $(dir $(1))
  16.236 -	cp 99book.bib $(dir $(1))
  16.237 -	TEXINPUTS=$(dir $(2)): ./htlatex.book $(2) "bookhtml,html4-uni,$(3)" " -cunihtf -utf8" "$(dir $(1))" "$(call latex-options,$(1))" || (rm -f $(1); exit 1)
  16.238 -	cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf
  16.239 -	cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1)))
  16.240 -	./fixhtml.py $(dir $(1))/*.html
  16.241 -	rm $(dir $(1))/hgbook.css
  16.242 -endef
  16.243 -
  16.244 -html/onepage/hgbook.html: $(sources) examples $(image-html) bookhtml.cfg
  16.245 -	$(call htlatex,$@,$<)
  16.246 -
  16.247 -html/split/hgbook.html: $(sources) examples bookhtml.cfg
  16.248 -	$(call htlatex,$@,$<,2)
  16.249 -
  16.250 -# Produce 90dpi PNGs for the web.
  16.251 -
  16.252 -%.png: %.svg fixsvg
  16.253  	./fixsvg $<
  16.254  	inkscape -D -e $@ $<-tmp.svg
  16.255  	rm $<-tmp.svg
  16.256  
  16.257 -%.svg: %.dot
  16.258 +$(obj-web-read)/figs/%.png: figs/%.svg fixsvg
  16.259 +	mkdir -p $(dir $@)
  16.260 +	./fixsvg $<
  16.261 +	inkscape -D -e $@ $<-tmp.svg
  16.262 +	rm $<-tmp.svg
  16.263 +
  16.264 +$(obj-web-read)/figs/%.gif: figs/%.gif
  16.265 +	cp $< $@
  16.266 +
  16.267 +$(obj-web-read)/figs/%.png: figs/%.png
  16.268 +	cp $< $@
  16.269 +
  16.270 +$(obj-web-read)/figs/%.svg: figs/%.dot
  16.271 +	mkdir -p $(dir $@)
  16.272  	dot -Tsvg -o $@ $<
  16.273  
  16.274 -# Produce eps & pdf for the pdf
  16.275 -
  16.276 -%.pdf: %.eps
  16.277 -	epstopdf $<
  16.278 -
  16.279 -%.eps: %.svg
  16.280 -	./fixsvg $<
  16.281 -	inkscape -E $@ $<-tmp.svg
  16.282 -	rm $<-tmp.svg
  16.283 -
  16.284 -%.eps: %.dot
  16.285 -	dot -Tps -o $@ $<
  16.286 -
  16.287  examples: $(example-prereqs) examples/.run
  16.288  
  16.289 -examples/.run: $(example-sources:%=examples/%.run)
  16.290 -	touch examples/.run
  16.291 +examples/.run: $(example-sources)
  16.292 +	cd examples && ./run-example -a
  16.293  
  16.294  examples/%.run: examples/% examples/run-example
  16.295 -	cd examples && ./run-example $(notdir $<)
  16.296 -
  16.297 -changelog := $(wildcard ../.hg/store/00changelog.[id])
  16.298 -ifeq ($(changelog),)
  16.299 -changelog := $(wildcard ../.hg/00changelog.[id])
  16.300 -endif
  16.301 -
  16.302 -build_id.tex: $(changelog)
  16.303 -	echo -n '$(hg-id)' > build_id.tex
  16.304 -
  16.305 -hg_id.tex: $(hg)
  16.306 -	echo -n '$(hg-version)' > hg_id.tex
  16.307  
  16.308  clean:
  16.309 -	rm -rf dist html pdf \
  16.310 -		$(image-dot:%.dot=%.pdf) \
  16.311 -		$(image-dot:%.dot=%.png) \
  16.312 -		$(image-svg:%.svg=%.pdf) \
  16.313 -		$(image-svg:%.svg=%.png) \
  16.314 -		examples/*.{lxo,run} examples/.run build_id.tex hg_id.tex
  16.315 -
  16.316 -install: pdf split $(dist-sources)
  16.317 +	-rm -rf dist html $(image-dot:%.dot=%.pdf) $(image-dot:%.dot=%.png) \
  16.318 +	  $(image-svg:%.svg=%.png) examples/*.{lxo,run} examples/.run
  16.319 +
  16.320 +install: html $(dist-sources)
  16.321  	rm -rf dist
  16.322  	mkdir -p dist
  16.323 -	cp pdf/hgbook.pdf dist
  16.324 -	cp html/split/*.{css,html,png} dist
  16.325 +	cp html/*.{css,html,png} dist
  16.326  	cp $(dist-sources) dist
  16.327  
  16.328  rsync: install
  16.329  	rsync -avz --delete dist sp.red-bean.com:public_html/hgbook
  16.330 +
  16.331 +vpath %.css ../web
  16.332 +vpath %.html.in ../web
  16.333 +vpath %.js ../web/javascript
  16.334 +
  16.335 +$(obj-websup)/%.css: %.css
  16.336 +	@mkdir -p $(dir $@)
  16.337 +	cp $< $@
  16.338 +
  16.339 +$(obj-websup)/%.jpg: %.jpg
  16.340 +	@mkdir -p $(dir $@)
  16.341 +	cp $< $@
  16.342 +
  16.343 +$(obj-websup)/%.js: %.js
  16.344 +	@mkdir -p $(dir $@)
  16.345 +	cp $< $@
  16.346 +
  16.347 +$(obj-web)/%: ../web/%
  16.348 +	@mkdir -p $(dir $@)
  16.349 +	cp $< $@
  16.350 +
  16.351 +$(obj-web)/%.html: %.html.in
  16.352 +	@mkdir -p $(dir $@)
  16.353 +	python ../web/texpand.py $< $@
  16.354 +
  16.355 +%.gz: %
  16.356 +	gzip -9 -c $< > $@
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/en/appA-svn.xml	Sun Aug 16 03:41:39 2009 +0200
    17.3 @@ -0,0 +1,540 @@
    17.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    17.5 +
    17.6 +<appendix id="svn">
    17.7 +  <?dbhtml filename="migrating-to-mercurial.html"?>
    17.8 +<title>Migrating to Mercurial</title>
    17.9 +
   17.10 +  <para id="x_6e1">A common way to test the waters with a new revision control
   17.11 +    tool is to experiment with switching an existing project, rather
   17.12 +    than starting a new project from scratch.</para>
   17.13 +
   17.14 +  <para id="x_6e2">In this appendix, we discuss how to import a project's history
   17.15 +    into Mercurial, and what to look out for if you are used to a
   17.16 +    different revision control system.</para>
   17.17 +
   17.18 +  <sect1>
   17.19 +    <title>Importing history from another system</title>
   17.20 +
   17.21 +    <para id="x_6e3">Mercurial ships with an extension named
   17.22 +      <literal>convert</literal>, which can import project history
   17.23 +      from most popular revision control systems.  At the time this
   17.24 +      book was written, it could import history from the following
   17.25 +      systems:</para>
   17.26 +    <itemizedlist>
   17.27 +      <listitem>
   17.28 +	<para id="x_6e4">Subversion</para>
   17.29 +      </listitem>
   17.30 +      <listitem>
   17.31 +	<para id="x_6e5">CVS</para>
   17.32 +      </listitem>
   17.33 +      <listitem>
   17.34 +	<para id="x_6e6">git</para>
   17.35 +      </listitem>
   17.36 +      <listitem>
   17.37 +	<para id="x_6e7">Darcs</para>
   17.38 +      </listitem>
   17.39 +      <listitem>
   17.40 +	<para id="x_6e8">Bazaar</para>
   17.41 +      </listitem>
   17.42 +      <listitem>
   17.43 +	<para id="x_6e9">Monotone</para>
   17.44 +      </listitem>
   17.45 +      <listitem>
   17.46 +	<para id="x_6ea">GNU Arch</para>
   17.47 +      </listitem>
   17.48 +      <listitem>
   17.49 +	<para id="x_6eb">Mercurial</para>
   17.50 +      </listitem>
   17.51 +    </itemizedlist>
   17.52 +
   17.53 +    <para id="x_6ec">(To see why Mercurial itself is supported as a source, see
   17.54 +      <xref linkend="svn.filemap"/>.)</para>
   17.55 +
   17.56 +    <para id="x_6ed">You can enable the extension in the usual way, by editing
   17.57 +      your <filename>~/.hgrc</filename> file.</para>
   17.58 +
   17.59 +    <programlisting>[extensions]
   17.60 +convert =</programlisting>
   17.61 +
   17.62 +    <para id="x_6ee">This will make a <command>hg convert</command> command
   17.63 +      available.  The command is easy to use.  For instance, this
   17.64 +      command will import the Subversion history for the Nose unit
   17.65 +      testing framework into Mercurial.</para>
   17.66 +
   17.67 +    <screen><prompt>$</prompt> <userinput>hg convert http://python-nose.googlecode.com/svn/trunk</userinput></screen>
   17.68 +
   17.69 +    <para id="x_6ef">The <literal>convert</literal> extension operates
   17.70 +      incrementally.  In other words, after you have run <command>hg
   17.71 +	convert</command> once, running it again will import any new
   17.72 +      revisions committed after the first run began.  Incremental
   17.73 +      conversion will only work if you run <command>hg
   17.74 +	convert</command> in the same Mercurial repository that you
   17.75 +      originally used, because the <literal>convert</literal>
   17.76 +      extension saves some private metadata in a
   17.77 +      non-revision-controlled file named
   17.78 +      <filename>.hg/shamap</filename> inside the target
   17.79 +      repository.</para>
   17.80 +
   17.81 +    <para id="x_707">When you want to start making changes using Mercurial, it's
   17.82 +      best to clone the tree in which you are doing your conversions,
   17.83 +      and leave the original tree for future incremental conversions.
   17.84 +      This is the safest way to let you pull and merge future commits
   17.85 +      from the source revision control system into your newly active
   17.86 +      Mercurial project.</para>
   17.87 +
   17.88 +    <sect2>
   17.89 +      <title>Converting multiple branches</title>
   17.90 +
   17.91 +      <para id="x_708">The <command>hg convert</command> command given above
   17.92 +	converts only the history of the <literal>trunk</literal>
   17.93 +	branch of the Subversion repository.  If we instead use the
   17.94 +	URL <literal>http://python-nose.googlecode.com/svn</literal>,
   17.95 +	Mercurial will automatically detect the
   17.96 +	<literal>trunk</literal>, <literal>tags</literal> and
   17.97 +	<literal>branches</literal> layout that Subversion projects
   17.98 +	usually use, and it will import each as a separate Mercurial
   17.99 +	branch.</para>
  17.100 +
  17.101 +      <para id="x_709">By default, each Subversion branch imported into Mercurial
  17.102 +	is given a branch name.  After the conversion completes, you
  17.103 +	can get a list of the active branch names in the Mercurial
  17.104 +	repository using <command>hg branches -a</command>. If you
  17.105 +	would prefer to import the Subversion branches without names,
  17.106 +	pass the <option>--config
  17.107 +	  convert.hg.usebranchnames=false</option> option to
  17.108 +	<command>hg convert</command>.</para>
  17.109 +
  17.110 +      <para id="x_70a">Once you have converted your tree, if you want to follow
  17.111 +	the usual Mercurial practice of working in a tree that
  17.112 +	contains a single branch, you can clone that single branch
  17.113 +	using <command>hg clone -r mybranchname</command>.</para>
  17.114 +    </sect2>
  17.115 +
  17.116 +    <sect2>
  17.117 +      <title>Mapping user names</title>
  17.118 +
  17.119 +      <para id="x_6f0">Some revision control tools save only short usernames with
  17.120 +	commits, and these can be difficult to interpret.  The norm
  17.121 +	with Mercurial is to save a committer's name and email
  17.122 +	address, which is much more useful for talking to them after
  17.123 +	the fact.</para>
  17.124 +
  17.125 +      <para id="x_6f1">If you are converting a tree from a revision control
  17.126 +	system that uses short names, you can map those names to
  17.127 +	longer equivalents by passing a <option>--authors</option>
  17.128 +	option to <command>hg convert</command>.  This option accepts
  17.129 +	a file name that should contain entries of the following
  17.130 +	form.</para>
  17.131 +
  17.132 +      <programlisting>arist = Aristotle &lt;aristotle@phil.example.gr&gt;
  17.133 +soc = Socrates &lt;socrates@phil.example.gr&gt;</programlisting>
  17.134 +
  17.135 +      <para id="x_6f2">Whenever <literal>convert</literal> encounters a commit
  17.136 +	with the username <literal>arist</literal> in the source
  17.137 +	repository, it will use the name <literal>Aristotle
  17.138 +	  &lt;aristotle@phil.example.gr&gt;</literal> in the converted
  17.139 +	Mercurial revision.  If no match is found for a name, it is
  17.140 +	used verbatim.</para>
  17.141 +    </sect2>
  17.142 +
  17.143 +    <sect2 id="svn.filemap">
  17.144 +      <title>Tidying up the tree</title>
  17.145 +
  17.146 +      <para id="x_6f3">Not all projects have pristine history.  There may be a
  17.147 +	directory that should never have been checked in, a file that
  17.148 +	is too big, or a whole hierarchy that needs to be
  17.149 +	refactored.</para>
  17.150 +
  17.151 +      <para id="x_6f4">The <literal>convert</literal> extension supports the idea
  17.152 +	of a <quote>file map</quote> that can reorganize the files and
  17.153 +	directories in a project as it imports the project's history.
  17.154 +	This is useful not only when importing history from other
  17.155 +	revision control systems, but also to prune or refactor a
  17.156 +	Mercurial tree.</para>
  17.157 +
  17.158 +      <para id="x_6f5">To specify a file map, use the <option>--filemap</option>
  17.159 +	option and supply a file name.  A file map contains lines of the
  17.160 +	following forms.</para>
  17.161 +
  17.162 +      <programlisting># This is a comment.
  17.163 +# Empty lines are ignored.	
  17.164 +
  17.165 +include path/to/file
  17.166 +
  17.167 +exclude path/to/file
  17.168 +
  17.169 +rename from/some/path to/some/other/place
  17.170 +</programlisting>
  17.171 +
  17.172 +      <para id="x_6f6">The <literal>include</literal> directive causes a file, or
  17.173 +	all files under a directory, to be included in the destination
  17.174 +	repository.  This also excludes all other files and dirs not
  17.175 +	explicitely included.  The <literal>exclude</literal>
  17.176 +	directive causes files or directories to be omitted, and
  17.177 +	others not explicitly mentioned to be included.</para>
  17.178 +
  17.179 +      <para id="x_6f7">To move a file or directory from one location to another,
  17.180 +	use the <literal>rename</literal> directive.  If you need to
  17.181 +	move a file or directory from a subdirectory into the root of
  17.182 +	the repository, use <literal>.</literal> as the second
  17.183 +	argument to the <literal>rename</literal> directive.</para>
  17.184 +    </sect2>
  17.185 +
  17.186 +    <sect2>
  17.187 +      <title>Improving Subversion conversion performance</title>
  17.188 +
  17.189 +      <para id="x_70b">You will often need several attempts before you hit the
  17.190 +	perfect combination of user map, file map, and other
  17.191 +	conversion parameters.  Converting a Subversion repository
  17.192 +	over an access protocol like <literal>ssh</literal> or
  17.193 +	<literal>http</literal> can proceed thousands of times more
  17.194 +	slowly than Mercurial is capable of actually operating, due to
  17.195 +	network delays.  This can make tuning that perfect conversion
  17.196 +	recipe very painful.</para>
  17.197 +
  17.198 +      <para id="x_70c">The <ulink
  17.199 +	  url="http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt"><command>svnsync</command></ulink> 
  17.200 +	command can greatly speed up the conversion of a Subversion
  17.201 +	repository.  It is a read-only mirroring program for
  17.202 +	Subversion repositories.  The idea is that you create a local
  17.203 +	mirror of your Subversion tree, then convert the mirror into a
  17.204 +	Mercurial repository.</para>
  17.205 +
  17.206 +      <para id="x_70d">Suppose we want to convert the Subversion repository for
  17.207 +	the popular Memcached project into a Mercurial tree.  First,
  17.208 +	we create a local Subversion repository.</para>
  17.209 +
  17.210 +      <screen><prompt>$</prompt> <userinput>svnadmin create memcached-mirror</userinput></screen>
  17.211 +
  17.212 +      <para id="x_70e">Next, we set up a Subversion hook that
  17.213 +	<command>svnsync</command> needs.</para>
  17.214 +
  17.215 +      <screen><prompt>$</prompt> <userinput>echo '#!/bin/sh' > memcached-mirror/hooks/pre-revprop-change</userinput>
  17.216 +<prompt>$</prompt> <userinput>chmod +x memcached-mirror/hooks/pre-revprop-change</userinput></screen>
  17.217 +
  17.218 +      <para id="x_70f">We then initialize <command>svnsync</command> in this
  17.219 +	repository.</para>
  17.220 +
  17.221 +      <screen><prompt>$</prompt> <userinput>svnsync --init file://`pwd`/memcached-mirror \
  17.222 +  http://code.sixapart.com/svn/memcached</userinput></screen>
  17.223 +
  17.224 +      <para id="x_710">Our next step is to begin the <command>svnsync</command>
  17.225 +	mirroring process.</para>
  17.226 +
  17.227 +      <screen><prompt>$</prompt> <userinput>svnsync sync file://`pwd`/memcached-mirror</userinput></screen>
  17.228 +
  17.229 +      <para id="x_711">Finally, we import the history of our local Subversion
  17.230 +	mirror into Mercurial.</para>
  17.231 +
  17.232 +      <screen><prompt>$</prompt> <userinput>hg convert memcached-mirror</userinput></screen>
  17.233 +      
  17.234 +      <para id="x_712">We can use this process incrementally if the Subversion
  17.235 +	repository is still in use.  We run <command>svnsync</command>
  17.236 +	to pull new changes into our mirror, then <command>hg
  17.237 +	  convert</command> to import them into our Mercurial
  17.238 +	tree.</para>
  17.239 +
  17.240 +      <para id="x_713">There are two advantages to doing a two-stage import with
  17.241 +	<command>svnsync</command>.  The first is that it uses more
  17.242 +	efficient Subversion network syncing code than <command>hg
  17.243 +	  convert</command>, so it transfers less data over the
  17.244 +	network.  The second is that the import from a local
  17.245 +	Subversion tree is so fast that you can tweak your conversion
  17.246 +	setup repeatedly without having to sit through a painfully
  17.247 +	slow network-based conversion process each time.</para>
  17.248 +    </sect2>
  17.249 +  </sect1>
  17.250 +
  17.251 +  <sect1>
  17.252 +    <title>Migrating from Subversion</title>
  17.253 +
  17.254 +    <para id="x_6f8">Subversion is currently the most popular open source
  17.255 +      revision control system. Although there are many differences
  17.256 +      between Mercurial and Subversion, making the transition from
  17.257 +      Subversion to Mercurial is not particularly difficult.  The two
  17.258 +      have similar command sets and generally uniform
  17.259 +      interfaces.</para>
  17.260 +
  17.261 +    <sect2>
  17.262 +      <title>Philosophical differences</title>
  17.263 +
  17.264 +      <para id="x_6f9">The fundamental difference between Subversion and
  17.265 +	Mercurial is of course that Subversion is centralized, while
  17.266 +	Mercurial is distributed.  Since Mercurial stores all of a
  17.267 +	project's history on your local drive, it only needs to
  17.268 +	perform a network access when you want to explicitly
  17.269 +	communicate with another repository. In contrast, Subversion
  17.270 +	stores very little information locally, and the client must
  17.271 +	thus contact its server for many common operations.</para>
  17.272 +
  17.273 +      <para id="x_6fa">Subversion more or less gets away without a well-defined
  17.274 +	notion of a branch: which portion of a server's namespace
  17.275 +	qualifies as a branch is a matter of convention, with the
  17.276 +	software providing no enforcement.  Mercurial treats a
  17.277 +	repository as the unit of branch management.</para>
  17.278 +
  17.279 +      <sect3>
  17.280 +	<title>Scope of commands</title>
  17.281 +
  17.282 +	<para id="x_6fb">Since Subversion doesn't know what parts of its
  17.283 +	  namespace are really branches, it treats most commands as
  17.284 +	  requests to operate at and below whatever directory you are
  17.285 +	  currently visiting.  For instance, if you run <command>svn
  17.286 +	    log</command>, you'll get the history of whatever part of
  17.287 +	  the tree you're looking at, not the tree as a whole.</para>
  17.288 +
  17.289 +	<para id="x_6fc">Mercurial's commands behave differently, by defaulting
  17.290 +	  to operating over an entire repository.  Run <command>hg
  17.291 +	    log</command> and it will tell you the history of the
  17.292 +	  entire tree, no matter what part of the working directory
  17.293 +	  you're visiting at the time.  If you want the history of
  17.294 +	  just a particular file or directory, simply supply it by
  17.295 +	  name, e.g. <command>hg log src</command>.</para>
  17.296 +
  17.297 +	<para id="x_6fd">From my own experience, this difference in default
  17.298 +	  behaviors is probably the most likely to trip you up if you
  17.299 +	  have to switch back and forth frequently between the two
  17.300 +	  tools.</para>
  17.301 +      </sect3>
  17.302 +
  17.303 +      <sect3>
  17.304 +	<title>Multi-user operation and safety</title>
  17.305 +
  17.306 +	<para id="x_6fe">With Subversion, it is normal (though slightly frowned
  17.307 +	  upon) for multiple people to collaborate in a single branch.
  17.308 +	  If Alice and Bob are working together, and Alice commits
  17.309 +	  some changes to their shared branch, Bob must update his
  17.310 +	  client's view of the branch before he can commit.  Since at
  17.311 +	  this time he has no permanent record of the changes he has
  17.312 +	  made, he can corrupt or lose his modifications during and
  17.313 +	  after his update.</para>
  17.314 +
  17.315 +	<para id="x_6ff">Mercurial encourages a commit-then-merge model instead.
  17.316 +	  Bob commits his changes locally before pulling changes from,
  17.317 +	  or pushing them to, the server that he shares with Alice.
  17.318 +	  If Alice pushed her changes before Bob tries to push his, he
  17.319 +	  will not be able to push his changes until he pulls hers,
  17.320 +	  merges with them, and commits the result of the merge.  If
  17.321 +	  he makes a mistake during the merge, he still has the option
  17.322 +	  of reverting to the commit that recorded his changes.</para>
  17.323 +
  17.324 +	<para id="x_700">It is worth emphasizing that these are the common ways
  17.325 +	  of working with these tools. Subversion supports a safer
  17.326 +	  work-in-your-own-branch model, but it is cumbersome enough
  17.327 +	  in practice to not be widely used.  Mercurial can support
  17.328 +	  the less safe mode of allowing changes to be pulled in and
  17.329 +	  merged on top of uncommitted edits, but this is considered
  17.330 +	  highly unusual.</para>
  17.331 +      </sect3>
  17.332 +
  17.333 +      <sect3>
  17.334 +	<title>Published vs local changes</title>
  17.335 +
  17.336 +	<para id="x_701">A Subversion <command>svn commit</command> command
  17.337 +	  immediately publishes changes to a server, where they can be
  17.338 +	  seen by everyone who has read access.</para>
  17.339 +
  17.340 +	<para id="x_702">With Mercurial, commits are always local, and must be
  17.341 +	  published via a <command>hg push</command> command
  17.342 +	  afterwards.</para>
  17.343 +
  17.344 +	<para id="x_703">Each approach has its advantages and disadvantages.  The
  17.345 +	  Subversion model means that changes are published, and hence
  17.346 +	  reviewable and usable, immediately.  On the other hand, this
  17.347 +	  means that a user must have commit access to a repository in
  17.348 +	  order to use the software in a normal way, and commit access
  17.349 +	  is not lightly given out by most open source
  17.350 +	  projects.</para>
  17.351 +
  17.352 +	<para id="x_704">The Mercurial approach allows anyone who can clone a
  17.353 +	  repository to commit changes without the need for someone
  17.354 +	  else's permission, and they can then publish their changes
  17.355 +	  and continue to participate however they see fit.  The
  17.356 +	  distinction between committing and pushing does open up the
  17.357 +	  possibility of someone committing changes to their laptop
  17.358 +	  and walking away for a few days having forgotten to push
  17.359 +	  them, which in rare cases might leave collaborators
  17.360 +	  temporarily stuck.</para>
  17.361 +      </sect3>
  17.362 +    </sect2>
  17.363 +
  17.364 +    <sect2>
  17.365 +      <title>Quick reference</title>
  17.366 +
  17.367 +      <table>
  17.368 +	<title>Subversion commands and Mercurial equivalents</title>
  17.369 +	<tgroup cols="3">
  17.370 +	  <thead>
  17.371 +	    <row>
  17.372 +	      <entry>Subversion</entry>
  17.373 +	      <entry>Mercurial</entry>
  17.374 +	      <entry>Notes</entry>
  17.375 +	    </row>
  17.376 +	  </thead>
  17.377 +	  <tbody>
  17.378 +	    <row>
  17.379 +	      <entry><command>svn add</command></entry>
  17.380 +	      <entry><command>hg add</command></entry>
  17.381 +	      <entry></entry>
  17.382 +	    </row>
  17.383 +	    <row>
  17.384 +	      <entry><command>svn blame</command></entry>
  17.385 +	      <entry><command>hg annotate</command></entry>
  17.386 +	      <entry></entry>
  17.387 +	    </row>
  17.388 +	    <row>
  17.389 +	      <entry><command>svn cat</command></entry>
  17.390 +	      <entry><command>hg cat</command></entry>
  17.391 +	      <entry></entry>
  17.392 +	    </row>
  17.393 +	    <row>
  17.394 +	      <entry><command>svn checkout</command></entry>
  17.395 +	      <entry><command>hg clone</command></entry>
  17.396 +	      <entry></entry>
  17.397 +	    </row>
  17.398 +	    <row>
  17.399 +	      <entry><command>svn cleanup</command></entry>
  17.400 +	      <entry>n/a</entry>
  17.401 +	      <entry>No cleanup needed</entry>
  17.402 +	    </row>
  17.403 +	    <row>
  17.404 +	      <entry><command>svn commit</command></entry>
  17.405 +	      <entry><command>hg commit</command>; <command>hg
  17.406 +		  push</command></entry>
  17.407 +	      <entry><command>hg push</command> publishes after
  17.408 +		commit</entry>
  17.409 +	    </row>
  17.410 +	    <row>
  17.411 +	      <entry><command>svn copy</command></entry>
  17.412 +	      <entry><command>hg clone</command></entry>
  17.413 +	      <entry>To create a new branch</entry>
  17.414 +	    </row>
  17.415 +	    <row>
  17.416 +	      <entry><command>svn copy</command></entry>
  17.417 +	      <entry><command>hg copy</command></entry>
  17.418 +	      <entry>To copy files or directories</entry>
  17.419 +	    </row>
  17.420 +	    <row>
  17.421 +	      <entry><command>svn delete</command> (<command>svn
  17.422 +		  remove</command>)</entry>
  17.423 +	      <entry><command>hg remove</command></entry>
  17.424 +	      <entry></entry>
  17.425 +	    </row>
  17.426 +	    <row>
  17.427 +	      <entry><command>svn diff</command></entry>
  17.428 +	      <entry><command>hg diff</command></entry>
  17.429 +	      <entry></entry>
  17.430 +	    </row>
  17.431 +	    <row>
  17.432 +	      <entry><command>svn export</command></entry>
  17.433 +	      <entry><command>hg archive</command></entry>
  17.434 +	      <entry></entry>
  17.435 +	    </row>
  17.436 +	    <row>
  17.437 +	      <entry><command>svn help</command></entry>
  17.438 +	      <entry><command>hg help</command></entry>
  17.439 +	      <entry></entry>
  17.440 +	    </row>
  17.441 +	    <row>
  17.442 +	      <entry><command>svn import</command></entry>
  17.443 +	      <entry><command>hg addremove</command>; <command>hg
  17.444 +		  commit</command></entry>
  17.445 +	      <entry></entry>
  17.446 +	    </row>
  17.447 +	    <row>
  17.448 +	      <entry><command>svn info</command></entry>
  17.449 +	      <entry><command>hg parents</command></entry>
  17.450 +	      <entry>Shows what revision is checked out</entry>
  17.451 +	    </row>
  17.452 +	    <row>
  17.453 +	      <entry><command>svn info</command></entry>
  17.454 +	      <entry><command>hg showconfig
  17.455 +		  paths.parent</command></entry>
  17.456 +	      <entry>Shows what URL is checked out</entry>
  17.457 +	    </row>
  17.458 +	    <row>
  17.459 +	      <entry><command>svn list</command></entry>
  17.460 +	      <entry><command>hg manifest</command></entry>
  17.461 +	      <entry></entry>
  17.462 +	    </row>
  17.463 +	    <row>
  17.464 +	      <entry><command>svn log</command></entry>
  17.465 +	      <entry><command>hg log</command></entry>
  17.466 +	      <entry></entry>
  17.467 +	    </row>
  17.468 +	    <row>
  17.469 +	      <entry><command>svn merge</command></entry>
  17.470 +	      <entry><command>hg merge</command></entry>
  17.471 +	      <entry></entry>
  17.472 +	    </row>
  17.473 +	    <row>
  17.474 +	      <entry><command>svn mkdir</command></entry>
  17.475 +	      <entry>n/a</entry>
  17.476 +	      <entry>Mercurial does not track directories</entry>
  17.477 +	    </row>
  17.478 +	    <row>
  17.479 +	      <entry><command>svn move</command> (<command>svn
  17.480 +		  rename</command>)</entry>
  17.481 +	      <entry><command>hg rename</command></entry>
  17.482 +	      <entry></entry>
  17.483 +	    </row>
  17.484 +	    <row>
  17.485 +	      <entry><command>svn resolved</command></entry>
  17.486 +	      <entry><command>hg resolve -m</command></entry>
  17.487 +	      <entry></entry>
  17.488 +	    </row>
  17.489 +	    <row>
  17.490 +	      <entry><command>svn revert</command></entry>
  17.491 +	      <entry><command>hg revert</command></entry>
  17.492 +	      <entry></entry>
  17.493 +	    </row>
  17.494 +	    <row>
  17.495 +	      <entry><command>svn status</command></entry>
  17.496 +	      <entry><command>hg status</command></entry>
  17.497 +	      <entry></entry>
  17.498 +	    </row>
  17.499 +	    <row>
  17.500 +	      <entry><command>svn update</command></entry>
  17.501 +	      <entry><command>hg pull -u</command></entry>
  17.502 +	      <entry></entry>
  17.503 +	    </row>
  17.504 +	  </tbody>
  17.505 +	</tgroup>
  17.506 +      </table>
  17.507 +    </sect2>
  17.508 +  </sect1>
  17.509 +
  17.510 +  <sect1>
  17.511 +    <title>Useful tips for newcomers</title>
  17.512 +
  17.513 +    <para id="x_705">Under some revision control systems, printing a diff for a
  17.514 +      single committed revision can be painful. For instance, with
  17.515 +      Subversion, to see what changed in revision 104654, you must
  17.516 +      type <command>svn diff -r104653:104654</command>. Mercurial
  17.517 +      eliminates the need to type the revision ID twice in this common
  17.518 +      case. For a plain diff, <command>hg export 104654</command>. For
  17.519 +      a log message followed by a diff, <command>hg log -r104654
  17.520 +	-p</command>.</para>
  17.521 +
  17.522 +    <para id="x_706">When you run <command>hg status</command> without any
  17.523 +      arguments, it prints the status of the entire tree, with paths
  17.524 +      relative to the root of the repository.  This makes it tricky to
  17.525 +      copy a file name from the output of <command>hg status</command>
  17.526 +      into the command line.  If you supply a file or directory name
  17.527 +      to <command>hg status</command>, it will print paths relative to
  17.528 +      your current location instead.  So to get tree-wide status from
  17.529 +      <command>hg status</command>, with paths that are relative to
  17.530 +      your current directory and not the root of the repository, feed
  17.531 +      the output of <command>hg root</command> into <command>hg
  17.532 +	status</command>.  You can easily do this as follows on a
  17.533 +      Unix-like system:</para>
  17.534 +
  17.535 +    <screen><prompt>$</prompt> <userinput>hg status `hg root`</userinput></screen>
  17.536 +  </sect1>
  17.537 +</appendix>
  17.538 +
  17.539 +<!--
  17.540 +local variables: 
  17.541 +sgml-parent-document: ("00book.xml" "book" "appendix")
  17.542 +end:
  17.543 +-->
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/en/appB-mq-ref.xml	Sun Aug 16 03:41:39 2009 +0200
    18.3 @@ -0,0 +1,563 @@
    18.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    18.5 +
    18.6 +<appendix id="chap:mqref">
    18.7 +  <?dbhtml filename="mercurial-queues-reference.html"?>
    18.8 +  <title>Mercurial Queues reference</title>
    18.9 +
   18.10 +  <sect1 id="sec:mqref:cmdref">
   18.11 +    <title>MQ command reference</title>
   18.12 +
   18.13 +    <para id="x_5e8">For an overview of the commands provided by MQ, use the
   18.14 +      command <command role="hg-cmd">hg help mq</command>.</para>
   18.15 +
   18.16 +    <sect2>
   18.17 +      <title><command role="hg-ext-mq">qapplied</command>&emdash;print
   18.18 +	applied patches</title>
   18.19 +
   18.20 +      <para id="x_5e9">The <command role="hg-ext-mq">qapplied</command> command
   18.21 +	prints the current stack of applied patches.  Patches are
   18.22 +	printed in oldest-to-newest order, so the last patch in the
   18.23 +	list is the <quote>top</quote> patch.</para>
   18.24 +
   18.25 +    </sect2>
   18.26 +    <sect2>
   18.27 +      <title><command role="hg-ext-mq">qcommit</command>&emdash;commit
   18.28 +	changes in the queue repository</title>
   18.29 +
   18.30 +      <para id="x_5ea">The <command role="hg-ext-mq">qcommit</command> command
   18.31 +	commits any outstanding changes in the <filename
   18.32 +	  role="special" class="directory">.hg/patches</filename>
   18.33 +	repository.  This command only works if the <filename
   18.34 +	  role="special" class="directory">.hg/patches</filename>
   18.35 +	directory is a repository, i.e. you created the directory
   18.36 +	using <command role="hg-cmd">hg qinit <option
   18.37 +	    role="hg-ext-mq-cmd-qinit-opt">-c</option></command> or
   18.38 +	ran <command role="hg-cmd">hg init</command> in the directory
   18.39 +	after running <command
   18.40 +	  role="hg-ext-mq">qinit</command>.</para>
   18.41 +
   18.42 +      <para id="x_5eb">This command is shorthand for <command role="hg-cmd">hg
   18.43 +	  commit --cwd .hg/patches</command>.</para>
   18.44 +    </sect2>
   18.45 +    <sect2>
   18.46 +	<title><command
   18.47 +	  role="hg-ext-mq">qdelete</command>&emdash;delete a patch
   18.48 +	from the <filename role="special">series</filename>
   18.49 +	file</title>
   18.50 +
   18.51 +      <para id="x_5ec">The <command role="hg-ext-mq">qdelete</command> command
   18.52 +	removes the entry for a patch from the <filename
   18.53 +	  role="special">series</filename> file in the <filename
   18.54 +	  role="special" class="directory">.hg/patches</filename>
   18.55 +	directory.  It does not pop the patch if the patch is already
   18.56 +	applied.  By default, it does not delete the patch file; use
   18.57 +	the <option role="hg-ext-mq-cmd-qdel-opt">-f</option> option
   18.58 +	to do that.</para>
   18.59 +
   18.60 +      <para id="x_5ed">Options:</para>
   18.61 +      <itemizedlist>
   18.62 +	<listitem><para id="x_5ee"><option
   18.63 +	      role="hg-ext-mq-cmd-qdel-opt">-f</option>: Delete the
   18.64 +	    patch file.</para>
   18.65 +	</listitem></itemizedlist>
   18.66 +
   18.67 +    </sect2>
   18.68 +    <sect2>
   18.69 +      <title><command role="hg-ext-mq">qdiff</command>&emdash;print a
   18.70 +	diff of the topmost applied patch</title>
   18.71 +
   18.72 +      <para id="x_5ef">The <command role="hg-ext-mq">qdiff</command> command
   18.73 +	prints a diff of the topmost applied patch. It is equivalent
   18.74 +	to <command role="hg-cmd">hg diff -r-2:-1</command>.</para>
   18.75 +
   18.76 +    </sect2>
   18.77 +    <sect2>
   18.78 +      <title><command role="hg-ext-mq">qfold</command>&emdash;move
   18.79 +	applied patches into repository history</title>
   18.80 +
   18.81 +      <para id="x_72d">The <command>hg qfinish</command> command converts the
   18.82 +	specified applied patches into permanent changes by moving
   18.83 +	them out of MQ's control so that they will be treated as
   18.84 +	normal repository history.</para>
   18.85 +    </sect2>
   18.86 +
   18.87 +    <sect2>
   18.88 +      <title><command role="hg-ext-mq">qfold</command>&emdash;merge
   18.89 +	(<quote>fold</quote>) several patches into one</title>
   18.90 +
   18.91 +      <para id="x_5f0">The <command role="hg-ext-mq">qfold</command> command
   18.92 +	merges multiple patches into the topmost applied patch, so
   18.93 +	that the topmost applied patch makes the union of all of the
   18.94 +	changes in the patches in question.</para>
   18.95 +
   18.96 +      <para id="x_5f1">The patches to fold must not be applied; <command
   18.97 +	  role="hg-ext-mq">qfold</command> will exit with an error if
   18.98 +	any is.  The order in which patches are folded is significant;
   18.99 +	<command role="hg-cmd">hg qfold a b</command> means
  18.100 +	<quote>apply the current topmost patch, followed by
  18.101 +	  <literal>a</literal>, followed by
  18.102 +	  <literal>b</literal></quote>.</para>
  18.103 +
  18.104 +      <para id="x_5f2">The comments from the folded patches are appended to the
  18.105 +	comments of the destination patch, with each block of comments
  18.106 +	separated by three asterisk
  18.107 +	(<quote><literal>*</literal></quote>) characters.  Use the
  18.108 +	<option role="hg-ext-mq-cmd-qfold-opt">-e</option> option to
  18.109 +	edit the commit message for the combined patch/changeset after
  18.110 +	the folding has completed.</para>
  18.111 +
  18.112 +      <para id="x_5f3">Options:</para>
  18.113 +      <itemizedlist>
  18.114 +	<listitem><para id="x_5f4"><option
  18.115 +	      role="hg-ext-mq-cmd-qfold-opt">-e</option>: Edit the
  18.116 +	    commit message and patch description for the newly folded
  18.117 +	    patch.</para>
  18.118 +	</listitem>
  18.119 +	<listitem><para id="x_5f5"><option
  18.120 +	      role="hg-ext-mq-cmd-qfold-opt">-l</option>: Use the
  18.121 +	    contents of the given file as the new commit message and
  18.122 +	    patch description for the folded patch.</para>
  18.123 +	</listitem>
  18.124 +	<listitem><para id="x_5f6"><option
  18.125 +	      role="hg-ext-mq-cmd-qfold-opt">-m</option>: Use the
  18.126 +	    given text as the new commit message and patch description
  18.127 +	    for the folded patch.</para>
  18.128 +	</listitem></itemizedlist>
  18.129 +
  18.130 +    </sect2>
  18.131 +    <sect2>
  18.132 +      <title><command
  18.133 +	  role="hg-ext-mq">qheader</command>&emdash;display the
  18.134 +	header/description of a patch</title>
  18.135 +
  18.136 +      <para id="x_5f7">The <command role="hg-ext-mq">qheader</command> command
  18.137 +	prints the header, or description, of a patch.  By default, it
  18.138 +	prints the header of the topmost applied patch. Given an
  18.139 +	argument, it prints the header of the named patch.</para>
  18.140 +
  18.141 +    </sect2>
  18.142 +    <sect2>
  18.143 +      <title><command role="hg-ext-mq">qimport</command>&emdash;import
  18.144 +	a third-party patch into the queue</title>
  18.145 +
  18.146 +      <para id="x_5f8">The <command role="hg-ext-mq">qimport</command> command
  18.147 +	adds an entry for an external patch to the <filename
  18.148 +	  role="special">series</filename> file, and copies the patch
  18.149 +	into the <filename role="special"
  18.150 +	  class="directory">.hg/patches</filename> directory.  It adds
  18.151 +	the entry immediately after the topmost applied patch, but
  18.152 +	does not push the patch.</para>
  18.153 +
  18.154 +      <para id="x_5f9">If the <filename role="special"
  18.155 +	  class="directory">.hg/patches</filename> directory is a
  18.156 +	repository, <command role="hg-ext-mq">qimport</command>
  18.157 +	automatically does an <command role="hg-cmd">hg add</command>
  18.158 +	of the imported patch.</para>
  18.159 +
  18.160 +    </sect2>
  18.161 +    <sect2>
  18.162 +      <title><command role="hg-ext-mq">qinit</command>&emdash;prepare
  18.163 +	a repository to work with MQ</title>
  18.164 +
  18.165 +      <para id="x_5fa">The <command role="hg-ext-mq">qinit</command> command
  18.166 +	prepares a repository to work with MQ.  It creates a directory
  18.167 +	called <filename role="special"
  18.168 +	  class="directory">.hg/patches</filename>.</para>
  18.169 +
  18.170 +      <para id="x_5fb">Options:</para>
  18.171 +      <itemizedlist>
  18.172 +	<listitem><para id="x_5fc"><option
  18.173 +	      role="hg-ext-mq-cmd-qinit-opt">-c</option>: Create
  18.174 +	    <filename role="special"
  18.175 +	      class="directory">.hg/patches</filename> as a repository
  18.176 +	    in its own right.  Also creates a <filename
  18.177 +	      role="special">.hgignore</filename> file that will
  18.178 +	    ignore the <filename role="special">status</filename>
  18.179 +	    file.</para>
  18.180 +	</listitem></itemizedlist>
  18.181 +
  18.182 +      <para id="x_5fd">When the <filename role="special"
  18.183 +	  class="directory">.hg/patches</filename> directory is a
  18.184 +	repository, the <command role="hg-ext-mq">qimport</command>
  18.185 +	and <command role="hg-ext-mq">qnew</command> commands
  18.186 +	automatically <command role="hg-cmd">hg add</command> new
  18.187 +	patches.</para>
  18.188 +
  18.189 +    </sect2>
  18.190 +    <sect2>
  18.191 +      <title><command role="hg-ext-mq">qnew</command>&emdash;create a
  18.192 +	new patch</title>
  18.193 +
  18.194 +      <para id="x_5fe">The <command role="hg-ext-mq">qnew</command> command
  18.195 +	creates a new patch.  It takes one mandatory argument, the
  18.196 +	name to use for the patch file.  The newly created patch is
  18.197 +	created empty by default.  It is added to the <filename
  18.198 +	  role="special">series</filename> file after the current
  18.199 +	topmost applied patch, and is immediately pushed on top of
  18.200 +	that patch.</para>
  18.201 +
  18.202 +      <para id="x_5ff">If <command role="hg-ext-mq">qnew</command> finds modified
  18.203 +	files in the working directory, it will refuse to create a new
  18.204 +	patch unless the <option
  18.205 +	  role="hg-ext-mq-cmd-qnew-opt">-f</option> option is used
  18.206 +	(see below).  This behavior allows you to <command
  18.207 +	  role="hg-ext-mq">qrefresh</command> your topmost applied
  18.208 +	patch before you apply a new patch on top of it.</para>
  18.209 +
  18.210 +      <para id="x_600">Options:</para>
  18.211 +      <itemizedlist>
  18.212 +	<listitem><para id="x_601"><option
  18.213 +	      role="hg-ext-mq-cmd-qnew-opt">-f</option>: Create a new
  18.214 +	    patch if the contents of the working directory are
  18.215 +	    modified.  Any outstanding modifications are added to the
  18.216 +	    newly created patch, so after this command completes, the
  18.217 +	    working directory will no longer be modified.</para>
  18.218 +	</listitem>
  18.219 +	<listitem><para id="x_602"><option
  18.220 +	      role="hg-ext-mq-cmd-qnew-opt">-m</option>: Use the given
  18.221 +	    text as the commit message. This text will be stored at
  18.222 +	    the beginning of the patch file, before the patch
  18.223 +	    data.</para>
  18.224 +	</listitem></itemizedlist>
  18.225 +
  18.226 +    </sect2>
  18.227 +    <sect2>
  18.228 +      <title><command role="hg-ext-mq">qnext</command>&emdash;print
  18.229 +	the name of the next patch</title>
  18.230 +
  18.231 +      <para id="x_603">The <command role="hg-ext-mq">qnext</command> command
  18.232 +	prints the name name of the next patch in the <filename
  18.233 +	  role="special">series</filename> file after the topmost
  18.234 +	applied patch.  This patch will become the topmost applied
  18.235 +	patch if you run <command
  18.236 +	  role="hg-ext-mq">qpush</command>.</para>
  18.237 +
  18.238 +    </sect2>
  18.239 +    <sect2>
  18.240 +      <title><command role="hg-ext-mq">qpop</command>&emdash;pop
  18.241 +	patches off the stack</title>
  18.242 +
  18.243 +      <para id="x_604">The <command role="hg-ext-mq">qpop</command> command
  18.244 +	removes applied patches from the top of the stack of applied
  18.245 +	patches.  By default, it removes only one patch.</para>
  18.246 +
  18.247 +      <para id="x_605">This command removes the changesets that represent the
  18.248 +	popped patches from the repository, and updates the working
  18.249 +	directory to undo the effects of the patches.</para>
  18.250 +
  18.251 +      <para id="x_606">This command takes an optional argument, which it uses as
  18.252 +	the name or index of the patch to pop to.  If given a name, it
  18.253 +	will pop patches until the named patch is the topmost applied
  18.254 +	patch.  If given a number, <command
  18.255 +	  role="hg-ext-mq">qpop</command> treats the number as an
  18.256 +	index into the entries in the series file, counting from zero
  18.257 +	(empty lines and lines containing only comments do not count).
  18.258 +	It pops patches until the patch identified by the given index
  18.259 +	is the topmost applied patch.</para>
  18.260 +
  18.261 +      <para id="x_607">The <command role="hg-ext-mq">qpop</command> command does
  18.262 +	not read or write patches or the <filename
  18.263 +	  role="special">series</filename> file.  It is thus safe to
  18.264 +	<command role="hg-ext-mq">qpop</command> a patch that you have
  18.265 +	removed from the <filename role="special">series</filename>
  18.266 +	file, or a patch that you have renamed or deleted entirely.
  18.267 +	In the latter two cases, use the name of the patch as it was
  18.268 +	when you applied it.</para>
  18.269 +
  18.270 +      <para id="x_608">By default, the <command role="hg-ext-mq">qpop</command>
  18.271 +	command will not pop any patches if the working directory has
  18.272 +	been modified.  You can override this behavior using the
  18.273 +	<option role="hg-ext-mq-cmd-qpop-opt">-f</option> option,
  18.274 +	which reverts all modifications in the working
  18.275 +	directory.</para>
  18.276 +
  18.277 +      <para id="x_609">Options:</para>
  18.278 +      <itemizedlist>
  18.279 +	<listitem><para id="x_60a"><option
  18.280 +	      role="hg-ext-mq-cmd-qpop-opt">-a</option>: Pop all
  18.281 +	    applied patches.  This returns the repository to its state
  18.282 +	    before you applied any patches.</para>
  18.283 +	</listitem>
  18.284 +	<listitem><para id="x_60b"><option
  18.285 +	      role="hg-ext-mq-cmd-qpop-opt">-f</option>: Forcibly
  18.286 +	    revert any modifications to the working directory when
  18.287 +	    popping.</para>
  18.288 +	</listitem>
  18.289 +	<listitem><para id="x_60c"><option
  18.290 +	      role="hg-ext-mq-cmd-qpop-opt">-n</option>: Pop a patch
  18.291 +	    from the named queue.</para>
  18.292 +	</listitem></itemizedlist>
  18.293 +
  18.294 +      <para id="x_60d">The <command role="hg-ext-mq">qpop</command> command
  18.295 +	removes one line from the end of the <filename
  18.296 +	  role="special">status</filename> file for each patch that it
  18.297 +	pops.</para>
  18.298 +
  18.299 +    </sect2>
  18.300 +    <sect2>
  18.301 +      <title><command role="hg-ext-mq">qprev</command>&emdash;print
  18.302 +	the name of the previous patch</title>
  18.303 +
  18.304 +      <para id="x_60e">The <command role="hg-ext-mq">qprev</command> command
  18.305 +	prints the name of the patch in the <filename
  18.306 +	  role="special">series</filename> file that comes before the
  18.307 +	topmost applied patch. This will become the topmost applied
  18.308 +	patch if you run <command
  18.309 +	  role="hg-ext-mq">qpop</command>.</para>
  18.310 +
  18.311 +    </sect2>
  18.312 +    <sect2 id="sec:mqref:cmd:qpush">
  18.313 +      <title><command role="hg-ext-mq">qpush</command>&emdash;push
  18.314 +	patches onto the stack</title>
  18.315 +
  18.316 +      <para id="x_60f">The <command role="hg-ext-mq">qpush</command> command adds
  18.317 +	patches onto the applied stack.  By default, it adds only one
  18.318 +	patch.</para>
  18.319 +
  18.320 +      <para id="x_610">This command creates a new changeset to represent each
  18.321 +	applied patch, and updates the working directory to apply the
  18.322 +	effects of the patches.</para>
  18.323 +
  18.324 +      <para id="x_611">The default data used when creating a changeset are as
  18.325 +	follows:</para>
  18.326 +      <itemizedlist>
  18.327 +	<listitem><para id="x_612">The commit date and time zone are the current
  18.328 +	    date and time zone.  Because these data are used to
  18.329 +	    compute the identity of a changeset, this means that if
  18.330 +	    you <command role="hg-ext-mq">qpop</command> a patch and
  18.331 +	    <command role="hg-ext-mq">qpush</command> it again, the
  18.332 +	    changeset that you push will have a different identity
  18.333 +	    than the changeset you popped.</para>
  18.334 +	</listitem>
  18.335 +	<listitem><para id="x_613">The author is the same as the default used by
  18.336 +	    the <command role="hg-cmd">hg commit</command>
  18.337 +	    command.</para>
  18.338 +	</listitem>
  18.339 +	<listitem><para id="x_614">The commit message is any text from the patch
  18.340 +	    file that comes before the first diff header.  If there is
  18.341 +	    no such text, a default commit message is used that
  18.342 +	    identifies the name of the patch.</para>
  18.343 +	</listitem></itemizedlist>
  18.344 +      <para id="x_615">If a patch contains a Mercurial patch header,
  18.345 +	the information in the patch header overrides these
  18.346 +	defaults.</para>
  18.347 +
  18.348 +      <para id="x_616">Options:</para>
  18.349 +      <itemizedlist>
  18.350 +	<listitem><para id="x_617"><option
  18.351 +	      role="hg-ext-mq-cmd-qpush-opt">-a</option>: Push all
  18.352 +	    unapplied patches from the <filename
  18.353 +	      role="special">series</filename> file until there are
  18.354 +	    none left to push.</para>
  18.355 +	</listitem>
  18.356 +	<listitem><para id="x_618"><option
  18.357 +	      role="hg-ext-mq-cmd-qpush-opt">-l</option>: Add the name
  18.358 +	    of the patch to the end of the commit message.</para>
  18.359 +	</listitem>
  18.360 +	<listitem><para id="x_619"><option
  18.361 +	      role="hg-ext-mq-cmd-qpush-opt">-m</option>: If a patch
  18.362 +	    fails to apply cleanly, use the entry for the patch in
  18.363 +	    another saved queue to compute the parameters for a
  18.364 +	    three-way merge, and perform a three-way merge using the
  18.365 +	    normal Mercurial merge machinery.  Use the resolution of
  18.366 +	    the merge as the new patch content.</para>
  18.367 +	</listitem>
  18.368 +	<listitem><para id="x_61a"><option
  18.369 +	      role="hg-ext-mq-cmd-qpush-opt">-n</option>: Use the
  18.370 +	    named queue if merging while pushing.</para>
  18.371 +	</listitem></itemizedlist>
  18.372 +
  18.373 +      <para id="x_61b">The <command role="hg-ext-mq">qpush</command> command
  18.374 +	reads, but does not modify, the <filename
  18.375 +	  role="special">series</filename> file.  It appends one line
  18.376 +	to the <command role="hg-cmd">hg status</command> file for
  18.377 +	each patch that it pushes.</para>
  18.378 +
  18.379 +    </sect2>
  18.380 +    <sect2>
  18.381 +      <title><command
  18.382 +	  role="hg-ext-mq">qrefresh</command>&emdash;update the
  18.383 +	topmost applied patch</title>
  18.384 +
  18.385 +      <para id="x_61c">The <command role="hg-ext-mq">qrefresh</command> command
  18.386 +	updates the topmost applied patch.  It modifies the patch,
  18.387 +	removes the old changeset that represented the patch, and
  18.388 +	creates a new changeset to represent the modified
  18.389 +	patch.</para>
  18.390 +
  18.391 +      <para id="x_61d">The <command role="hg-ext-mq">qrefresh</command> command
  18.392 +	looks for the following modifications:</para>
  18.393 +      <itemizedlist>
  18.394 +	<listitem><para id="x_61e">Changes to the commit message, i.e. the text
  18.395 +	    before the first diff header in the patch file, are
  18.396 +	    reflected in the new changeset that represents the
  18.397 +	    patch.</para>
  18.398 +	</listitem>
  18.399 +	<listitem><para id="x_61f">Modifications to tracked files in the working
  18.400 +	    directory are added to the patch.</para>
  18.401 +	</listitem>
  18.402 +	<listitem><para id="x_620">Changes to the files tracked using <command
  18.403 +	      role="hg-cmd">hg add</command>, <command
  18.404 +	      role="hg-cmd">hg copy</command>, <command
  18.405 +	      role="hg-cmd">hg remove</command>, or <command
  18.406 +	      role="hg-cmd">hg rename</command>.  Added files and copy
  18.407 +	    and rename destinations are added to the patch, while
  18.408 +	    removed files and rename sources are removed.</para>
  18.409 +	</listitem></itemizedlist>
  18.410 +
  18.411 +      <para id="x_621">Even if <command role="hg-ext-mq">qrefresh</command>
  18.412 +	detects no changes, it still recreates the changeset that
  18.413 +	represents the patch.  This causes the identity of the
  18.414 +	changeset to differ from the previous changeset that
  18.415 +	identified the patch.</para>
  18.416 +
  18.417 +      <para id="x_622">Options:</para>
  18.418 +      <itemizedlist>
  18.419 +	<listitem><para id="x_623"><option
  18.420 +	      role="hg-ext-mq-cmd-qrefresh-opt">-e</option>: Modify
  18.421 +	    the commit and patch description, using the preferred text
  18.422 +	    editor.</para>
  18.423 +	</listitem>
  18.424 +	<listitem><para id="x_624"><option
  18.425 +	      role="hg-ext-mq-cmd-qrefresh-opt">-m</option>: Modify
  18.426 +	    the commit message and patch description, using the given
  18.427 +	    text.</para>
  18.428 +	</listitem>
  18.429 +	<listitem><para id="x_625"><option
  18.430 +	      role="hg-ext-mq-cmd-qrefresh-opt">-l</option>: Modify
  18.431 +	    the commit message and patch description, using text from
  18.432 +	    the given file.</para>
  18.433 +	</listitem></itemizedlist>
  18.434 +
  18.435 +    </sect2>
  18.436 +    <sect2>
  18.437 +      <title><command role="hg-ext-mq">qrename</command>&emdash;rename
  18.438 +	a patch</title>
  18.439 +
  18.440 +      <para id="x_626">The <command role="hg-ext-mq">qrename</command> command
  18.441 +	renames a patch, and changes the entry for the patch in the
  18.442 +	<filename role="special">series</filename> file.</para>
  18.443 +
  18.444 +      <para id="x_627">With a single argument, <command
  18.445 +	  role="hg-ext-mq">qrename</command> renames the topmost
  18.446 +	applied patch.  With two arguments, it renames its first
  18.447 +	argument to its second.</para>
  18.448 +
  18.449 +    </sect2>
  18.450 +    <sect2>
  18.451 +      <title><command role="hg-ext-mq">qseries</command>&emdash;print
  18.452 +	the entire patch series</title>
  18.453 +
  18.454 +      <para id="x_62a">The <command role="hg-ext-mq">qseries</command> command
  18.455 +	prints the entire patch series from the <filename
  18.456 +	  role="special">series</filename> file.  It prints only patch
  18.457 +	names, not empty lines or comments.  It prints in order from
  18.458 +	first to be applied to last.</para>
  18.459 +
  18.460 +    </sect2>
  18.461 +    <sect2>
  18.462 +      <title><command role="hg-ext-mq">qtop</command>&emdash;print the
  18.463 +	name of the current patch</title>
  18.464 +
  18.465 +      <para id="x_62b">The <command role="hg-ext-mq">qtop</command> prints the
  18.466 +	name of the topmost currently applied patch.</para>
  18.467 +
  18.468 +    </sect2>
  18.469 +    <sect2>
  18.470 +      <title><command
  18.471 +	  role="hg-ext-mq">qunapplied</command>&emdash;print patches
  18.472 +	not yet applied</title>
  18.473 +
  18.474 +      <para id="x_62c">The <command role="hg-ext-mq">qunapplied</command> command
  18.475 +	prints the names of patches from the <filename
  18.476 +	  role="special">series</filename> file that are not yet
  18.477 +	applied.  It prints them in order from the next patch that
  18.478 +	will be pushed to the last.</para>
  18.479 +
  18.480 +    </sect2>
  18.481 +    <sect2>
  18.482 +      <title><command role="hg-cmd">hg strip</command>&emdash;remove a
  18.483 +	revision and descendants</title>
  18.484 +
  18.485 +      <para id="x_62d">The <command role="hg-cmd">hg strip</command> command
  18.486 +	removes a revision, and all of its descendants, from the
  18.487 +	repository.  It undoes the effects of the removed revisions
  18.488 +	from the repository, and updates the working directory to the
  18.489 +	first parent of the removed revision.</para>
  18.490 +
  18.491 +      <para id="x_62e">The <command role="hg-cmd">hg strip</command> command
  18.492 +	saves a backup of the removed changesets in a bundle, so that
  18.493 +	they can be reapplied if removed in error.</para>
  18.494 +
  18.495 +      <para id="x_62f">Options:</para>
  18.496 +      <itemizedlist>
  18.497 +	<listitem><para id="x_630"><option role="hg-opt-strip">-b</option>: Save
  18.498 +	    unrelated changesets that are intermixed with the stripped
  18.499 +	    changesets in the backup bundle.</para>
  18.500 +	</listitem>
  18.501 +	<listitem><para id="x_631"><option role="hg-opt-strip">-f</option>: If a
  18.502 +	    branch has multiple heads, remove all heads.</para>
  18.503 +	</listitem>
  18.504 +	<listitem><para id="x_632"><option role="hg-opt-strip">-n</option>: Do
  18.505 +	    not save a backup bundle.</para>
  18.506 +	</listitem></itemizedlist>
  18.507 +
  18.508 +    </sect2>
  18.509 +  </sect1>
  18.510 +  <sect1>
  18.511 +    <title>MQ file reference</title>
  18.512 +
  18.513 +    <sect2>
  18.514 +      <title>The <filename role="special">series</filename>
  18.515 +	file</title>
  18.516 +
  18.517 +      <para id="x_633">The <filename role="special">series</filename> file
  18.518 +	contains a list of the names of all patches that MQ can apply.
  18.519 +	It is represented as a list of names, with one name saved per
  18.520 +	line.  Leading and trailing white space in each line are
  18.521 +	ignored.</para>
  18.522 +
  18.523 +      <para id="x_634">Lines may contain comments.  A comment begins with the
  18.524 +	<quote><literal>#</literal></quote> character, and extends to
  18.525 +	the end of the line.  Empty lines, and lines that contain only
  18.526 +	comments, are ignored.</para>
  18.527 +
  18.528 +      <para id="x_635">You will often need to edit the <filename
  18.529 +	  role="special">series</filename> file by hand, hence the
  18.530 +	support for comments and empty lines noted above.  For
  18.531 +	example, you can comment out a patch temporarily, and <command
  18.532 +	  role="hg-ext-mq">qpush</command> will skip over that patch
  18.533 +	when applying patches.  You can also change the order in which
  18.534 +	patches are applied by reordering their entries in the
  18.535 +	<filename role="special">series</filename> file.</para>
  18.536 +
  18.537 +      <para id="x_636">Placing the <filename role="special">series</filename>
  18.538 +	file under revision control is also supported; it is a good
  18.539 +	idea to place all of the patches that it refers to under
  18.540 +	revision control, as well.  If you create a patch directory
  18.541 +	using the <option role="hg-ext-mq-cmd-qinit-opt">-c</option>
  18.542 +	option to <command role="hg-ext-mq">qinit</command>, this will
  18.543 +	be done for you automatically.</para>
  18.544 +
  18.545 +    </sect2>
  18.546 +    <sect2>
  18.547 +      <title>The <filename role="special">status</filename>
  18.548 +	file</title>
  18.549 +
  18.550 +      <para id="x_637">The <filename role="special">status</filename> file
  18.551 +	contains the names and changeset hashes of all patches that MQ
  18.552 +	currently has applied.  Unlike the <filename
  18.553 +	  role="special">series</filename> file, this file is not
  18.554 +	intended for editing.  You should not place this file under
  18.555 +	revision control, or modify it in any way.  It is used by MQ
  18.556 +	strictly for internal book-keeping.</para>
  18.557 +
  18.558 +    </sect2>
  18.559 +  </sect1>
  18.560 +</appendix>
  18.561 +
  18.562 +<!--
  18.563 +local variables: 
  18.564 +sgml-parent-document: ("00book.xml" "book" "appendix")
  18.565 +end:
  18.566 +-->
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/en/appC-srcinstall.xml	Sun Aug 16 03:41:39 2009 +0200
    19.3 @@ -0,0 +1,66 @@
    19.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    19.5 +
    19.6 +<appendix id="chap:srcinstall">
    19.7 +  <?dbhtml filename="installing-mercurial-from-source.html"?>
    19.8 +  <title>Installing Mercurial from source</title>
    19.9 +
   19.10 +  <sect1 id="sec:srcinstall:unixlike">
   19.11 +    <title>On a Unix-like system</title>
   19.12 +
   19.13 +    <para id="x_5e0">If you are using a Unix-like system that has a sufficiently
   19.14 +      recent version of Python (2.3 or newer) available, it is easy to
   19.15 +      install Mercurial from source.</para>
   19.16 +    <orderedlist>
   19.17 +      <listitem><para id="x_5e1">Download a recent source tarball from <ulink
   19.18 +	    url="http://www.selenic.com/mercurial/download">http://www.selenic.com/mercurial/download</ulink>.</para>
   19.19 +      </listitem>
   19.20 +      <listitem><para id="x_5e2">Unpack the tarball:</para>
   19.21 +	<programlisting>gzip -dc mercurial-MYVERSION.tar.gz | tar xf -</programlisting>
   19.22 +      </listitem>
   19.23 +      <listitem><para id="x_5e3">Go into the source directory and run the
   19.24 +	  installer script.  This will build Mercurial and install it
   19.25 +	  in your home directory.</para>
   19.26 +	<programlisting>cd mercurial-MYVERSION
   19.27 +python setup.py install --force --home=$HOME</programlisting>
   19.28 +      </listitem>
   19.29 +    </orderedlist>
   19.30 +    <para id="x_5e4">Once the install finishes, Mercurial will be in the
   19.31 +      <literal>bin</literal> subdirectory of your home directory.
   19.32 +      Don't forget to make sure that this directory is present in your
   19.33 +      shell's search path.</para>
   19.34 +
   19.35 +    <para id="x_5e5">You will probably need to set the <envar>PYTHONPATH</envar>
   19.36 +      environment variable so that the Mercurial executable can find
   19.37 +      the rest of the Mercurial packages.  For example, on my laptop,
   19.38 +      I have set it to <literal>/home/bos/lib/python</literal>.  The
   19.39 +      exact path that you will need to use depends on how Python was
   19.40 +      built for your system, but should be easy to figure out.  If
   19.41 +      you're uncertain, look through the output of the installer
   19.42 +      script above, and see where the contents of the
   19.43 +      <literal>mercurial</literal> directory were installed to.</para>
   19.44 +
   19.45 +  </sect1>
   19.46 +  <sect1>
   19.47 +    <title>On Windows</title>
   19.48 +
   19.49 +    <para id="x_5e6">Building and installing Mercurial on Windows requires a
   19.50 +      variety of tools, a fair amount of technical knowledge, and
   19.51 +      considerable patience.  I very much <emphasis>do not
   19.52 +	recommend</emphasis> this route if you are a <quote>casual
   19.53 +	user</quote>.  Unless you intend to hack on Mercurial, I
   19.54 +      strongly suggest that you use a binary package instead.</para>
   19.55 +
   19.56 +    <para id="x_5e7">If you are intent on building Mercurial from source on
   19.57 +      Windows, follow the <quote>hard way</quote> directions on the
   19.58 +      Mercurial wiki at <ulink
   19.59 +	url="http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall">http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall</ulink>, 
   19.60 +      and expect the process to involve a lot of fiddly work.</para>
   19.61 +
   19.62 +  </sect1>
   19.63 +</appendix>
   19.64 +
   19.65 +<!--
   19.66 +local variables: 
   19.67 +sgml-parent-document: ("00book.xml" "book" "appendix")
   19.68 +end:
   19.69 +-->
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/en/appD-license.xml	Sun Aug 16 03:41:39 2009 +0200
    20.3 @@ -0,0 +1,179 @@
    20.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    20.5 +
    20.6 +<appendix id="cha:opl">
    20.7 +  <?dbhtml filename="open-publication-license.html"?>
    20.8 +  <title>Open Publication License</title>
    20.9 +
   20.10 +  <para id="x_638">Version 1.0, 8 June 1999</para>
   20.11 +
   20.12 +  <sect1>
   20.13 +    <title>Requirements on both unmodified and modified
   20.14 +      versions</title>
   20.15 +
   20.16 +    <para id="x_639">The Open Publication works may be reproduced and distributed
   20.17 +      in whole or in part, in any medium physical or electronic,
   20.18 +      provided that the terms of this license are adhered to, and that
   20.19 +      this license or an incorporation of it by reference (with any
   20.20 +      options elected by the author(s) and/or publisher) is displayed
   20.21 +      in the reproduction.</para>
   20.22 +
   20.23 +    <para id="x_63a">Proper form for an incorporation by reference is as
   20.24 +      follows:</para>
   20.25 +
   20.26 +    <blockquote>
   20.27 +      <para id="x_63b">  Copyright (c) <emphasis>year</emphasis> by
   20.28 +	<emphasis>author's name or designee</emphasis>. This material
   20.29 +	may be distributed only subject to the terms and conditions
   20.30 +	set forth in the Open Publication License,
   20.31 +	v<emphasis>x.y</emphasis> or later (the latest version is
   20.32 +	presently available at <ulink
   20.33 +	  url="http://www.opencontent.org/openpub/">http://www.opencontent.org/openpub/</ulink>).</para>
   20.34 +    </blockquote>
   20.35 +
   20.36 +    <para id="x_63c">The reference must be immediately followed with any options
   20.37 +      elected by the author(s) and/or publisher of the document (see
   20.38 +      <xref linkend="sec:opl:options"/>).</para>
   20.39 +
   20.40 +    <para id="x_63d">Commercial redistribution of Open Publication-licensed
   20.41 +      material is permitted.</para>
   20.42 +
   20.43 +    <para id="x_63e">Any publication in standard (paper) book form shall require
   20.44 +      the citation of the original publisher and author. The publisher
   20.45 +      and author's names shall appear on all outer surfaces of the
   20.46 +      book. On all outer surfaces of the book the original publisher's
   20.47 +      name shall be as large as the title of the work and cited as
   20.48 +      possessive with respect to the title.</para>
   20.49 +
   20.50 +  </sect1>
   20.51 +  <sect1>
   20.52 +    <title>Copyright</title>
   20.53 +
   20.54 +    <para id="x_63f">The copyright to each Open Publication is owned by its
   20.55 +      author(s) or designee.</para>
   20.56 +
   20.57 +  </sect1>
   20.58 +  <sect1>
   20.59 +    <title>Scope of license</title>
   20.60 +
   20.61 +    <para id="x_640">The following license terms apply to all Open Publication
   20.62 +      works, unless otherwise explicitly stated in the
   20.63 +      document.</para>
   20.64 +
   20.65 +    <para id="x_641">Mere aggregation of Open Publication works or a portion of
   20.66 +      an Open Publication work with other works or programs on the
   20.67 +      same media shall not cause this license to apply to those other
   20.68 +      works. The aggregate work shall contain a notice specifying the
   20.69 +      inclusion of the Open Publication material and appropriate
   20.70 +      copyright notice.</para>
   20.71 +
   20.72 +    <para id="x_642"><emphasis role="bold">Severability</emphasis>. If any part
   20.73 +      of this license is found to be unenforceable in any
   20.74 +      jurisdiction, the remaining portions of the license remain in
   20.75 +      force.</para>
   20.76 +
   20.77 +    <para id="x_643"><emphasis role="bold">No warranty</emphasis>. Open
   20.78 +      Publication works are licensed and provided <quote>as is</quote>
   20.79 +      without warranty of any kind, express or implied, including, but
   20.80 +      not limited to, the implied warranties of merchantability and
   20.81 +      fitness for a particular purpose or a warranty of
   20.82 +      non-infringement.</para>
   20.83 +
   20.84 +  </sect1>
   20.85 +  <sect1>
   20.86 +    <title>Requirements on modified works</title>
   20.87 +
   20.88 +    <para id="x_644">All modified versions of documents covered by this license,
   20.89 +      including translations, anthologies, compilations and partial
   20.90 +      documents, must meet the following requirements:</para>
   20.91 +
   20.92 +    <orderedlist>
   20.93 +      <listitem><para id="x_645">The modified version must be labeled as
   20.94 +	  such.</para>
   20.95 +      </listitem>
   20.96 +      <listitem><para id="x_646">The person making the modifications must be
   20.97 +	  identified and the modifications dated.</para>
   20.98 +      </listitem>
   20.99 +      <listitem><para id="x_647">Acknowledgement of the original author and
  20.100 +	  publisher if applicable must be retained according to normal
  20.101 +	  academic citation practices.</para>
  20.102 +      </listitem>
  20.103 +      <listitem><para id="x_648">The location of the original unmodified document
  20.104 +	  must be identified.</para>
  20.105 +      </listitem>
  20.106 +      <listitem><para id="x_649">The original author's (or authors') name(s) may
  20.107 +	  not be used to assert or imply endorsement of the resulting
  20.108 +	  document without the original author's (or authors')
  20.109 +	  permission.</para>
  20.110 +      </listitem></orderedlist>
  20.111 +
  20.112 +  </sect1>
  20.113 +  <sect1>
  20.114 +    <title>Good-practice recommendations</title>
  20.115 +
  20.116 +    <para id="x_64a">In addition to the requirements of this license, it is
  20.117 +      requested from and strongly recommended of redistributors
  20.118 +      that:</para>
  20.119 +
  20.120 +    <orderedlist>
  20.121 +      <listitem><para id="x_64b">If you are distributing Open Publication works
  20.122 +	  on hardcopy or CD-ROM, you provide email notification to the
  20.123 +	  authors of your intent to redistribute at least thirty days
  20.124 +	  before your manuscript or media freeze, to give the authors
  20.125 +	  time to provide updated documents. This notification should
  20.126 +	  describe modifications, if any, made to the document.</para>
  20.127 +      </listitem>
  20.128 +      <listitem><para id="x_64c">All substantive modifications (including
  20.129 +	  deletions) be either clearly marked up in the document or
  20.130 +	  else described in an attachment to the document.</para>
  20.131 +      </listitem>
  20.132 +      <listitem><para id="x_64d">Finally, while it is not mandatory under this
  20.133 +	  license, it is considered good form to offer a free copy of
  20.134 +	  any hardcopy and CD-ROM expression of an Open
  20.135 +	  Publication-licensed work to its author(s).</para>
  20.136 +      </listitem></orderedlist>
  20.137 +
  20.138 +  </sect1>
  20.139 +  <sect1 id="sec:opl:options">
  20.140 +    <title>License options</title>
  20.141 +
  20.142 +    <para id="x_64e">The author(s) and/or publisher of an Open
  20.143 +      Publication-licensed document may elect certain options by
  20.144 +      appending language to the reference to or copy of the license.
  20.145 +      These options are considered part of the license instance and
  20.146 +      must be included with the license (or its incorporation by
  20.147 +      reference) in derived works.</para>
  20.148 +
  20.149 +    <orderedlist>
  20.150 +      <listitem><para id="x_64f">To prohibit distribution of substantively
  20.151 +	  modified versions without the explicit permission of the
  20.152 +	  author(s). <quote>Substantive modification</quote> is
  20.153 +	  defined as a change to the semantic content of the document,
  20.154 +	  and excludes mere changes in format or typographical
  20.155 +	  corrections.</para>
  20.156 +      </listitem>
  20.157 +      <listitem><para id="x_650">  To accomplish this, add the phrase
  20.158 +	  <quote>Distribution of substantively modified versions of
  20.159 +	    this document is prohibited without the explicit
  20.160 +	    permission of the copyright holder.</quote> to the license
  20.161 +	  reference or copy.</para>
  20.162 +      </listitem>
  20.163 +      <listitem><para id="x_651">To prohibit any publication of this work or
  20.164 +	  derivative works in whole or in part in standard (paper)
  20.165 +	  book form for commercial purposes is prohibited unless prior
  20.166 +	  permission is obtained from the copyright holder.</para>
  20.167 +      </listitem>
  20.168 +      <listitem><para id="x_652">To accomplish this, add the phrase
  20.169 +	  <quote>Distribution of the work or derivative of the work in
  20.170 +	    any standard (paper) book form is prohibited unless prior
  20.171 +	    permission is obtained from the copyright holder.</quote>
  20.172 +	  to the license reference or copy.</para>
  20.173 +      </listitem></orderedlist>
  20.174 +
  20.175 +  </sect1>
  20.176 +</appendix>
  20.177 +
  20.178 +<!--
  20.179 +local variables: 
  20.180 +sgml-parent-document: ("00book.xml" "book" "appendix")
  20.181 +end:
  20.182 +-->
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/en/autoid.py	Sun Aug 16 03:41:39 2009 +0200
    21.3 @@ -0,0 +1,47 @@
    21.4 +#!/usr/bin/env python
    21.5 +#
    21.6 +# Add unique ID attributes to para tags.  This script should only be
    21.7 +# run by one person, since otherwise it introduces the possibility of
    21.8 +# chaotic conflicts among tags.
    21.9 +
   21.10 +import glob, os, re, sys
   21.11 +
   21.12 +tagged = re.compile('<para[^>]* id="x_([0-9a-f]+)"[^>]*>', re.M)
   21.13 +untagged = re.compile('<para>')
   21.14 +
   21.15 +names = glob.glob('ch*.xml') + glob.glob('app*.xml')
   21.16 +
   21.17 +# First pass: find the highest-numbered paragraph ID.
   21.18 +
   21.19 +biggest_id = 0
   21.20 +seen = set()
   21.21 +errs = 0
   21.22 +
   21.23 +for name in names:
   21.24 +    for m in tagged.finditer(open(name).read()):
   21.25 +        i = int(m.group(1),16)
   21.26 +        if i in seen:
   21.27 +            print >> sys.stderr, '%s: duplication of ID %s' % (name, i)
   21.28 +            errs += 1
   21.29 +        seen.add(i)
   21.30 +        if i > biggest_id:
   21.31 +            biggest_id = i
   21.32 +
   21.33 +def retag(s):
   21.34 +    global biggest_id
   21.35 +    biggest_id += 1
   21.36 +    return '<para id="x_%x">' % biggest_id
   21.37 +
   21.38 +# Second pass: add IDs to paragraphs that currently lack them.
   21.39 +
   21.40 +for name in names:
   21.41 +    f = open(name).read()
   21.42 +    f1 = untagged.sub(retag, f)
   21.43 +    if f1 != f:
   21.44 +        tmpname = name + '.tmp'
   21.45 +        fp = open(tmpname, 'w')
   21.46 +        fp.write(f1)
   21.47 +        fp.close()
   21.48 +        os.rename(tmpname, name)
   21.49 +
   21.50 +sys.exit(errs)
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/en/book-shortcuts.xml	Sun Aug 16 03:41:39 2009 +0200
    22.3 @@ -0,0 +1,3 @@
    22.4 +<!-- Please keep the contents of this file sorted. -->
    22.5 +
    22.6 +<!ENTITY emdash "&#8212;">
    23.1 --- a/en/bookhtml.cfg	Thu Mar 26 08:57:10 2009 +0100
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,18 +0,0 @@
    23.4 -% -*- latex -*-
    23.5 -
    23.6 -\Preamble{xhtml}
    23.7 -
    23.8 -% Tex4ht's default definition of lists is complete crap.
    23.9 -% Unfortunately, it can't distinguish between "ul" and "dl" lists.
   23.10 -
   23.11 -\ConfigureList{itemize}%
   23.12 -   {\EndP\HCode{<ul>}\let\endItem=\empty}
   23.13 -   {\ifvmode \IgnorePar\fi
   23.14 -    \EndP\HCode{</li></ul>}\ShowPar}
   23.15 -   {\endItem \def\endItem{\EndP\Tg</span>}\HCode{<li><span class="dt">}}
   23.16 -   {\HCode{</span><span class="dd">}}
   23.17 -\def\textbullet{}
   23.18 -
   23.19 -\begin{document}
   23.20 -
   23.21 -\EndPreamble
    24.1 --- a/en/branch.tex	Thu Mar 26 08:57:10 2009 +0100
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,392 +0,0 @@
    24.4 -\chapter{Managing releases and branchy development}
    24.5 -\label{chap:branch}
    24.6 -
    24.7 -Mercurial provides several mechanisms for you to manage a project that
    24.8 -is making progress on multiple fronts at once.  To understand these
    24.9 -mechanisms, let's first take a brief look at a fairly normal software
   24.10 -project structure.
   24.11 -
   24.12 -Many software projects issue periodic ``major'' releases that contain
   24.13 -substantial new features.  In parallel, they may issue ``minor''
   24.14 -releases.  These are usually identical to the major releases off which
   24.15 -they're based, but with a few bugs fixed.
   24.16 -
   24.17 -In this chapter, we'll start by talking about how to keep records of
   24.18 -project milestones such as releases.  We'll then continue on to talk
   24.19 -about the flow of work between different phases of a project, and how
   24.20 -Mercurial can help you to isolate and manage this work.
   24.21 -
   24.22 -\section{Giving a persistent name to a revision}
   24.23 -
   24.24 -Once you decide that you'd like to call a particular revision a
   24.25 -``release'', it's a good idea to record the identity of that revision.
   24.26 -This will let you reproduce that release at a later date, for whatever
   24.27 -purpose you might need at the time (reproducing a bug, porting to a
   24.28 -new platform, etc).
   24.29 -\interaction{tag.init}
   24.30 -
   24.31 -Mercurial lets you give a permanent name to any revision using the
   24.32 -\hgcmd{tag} command.  Not surprisingly, these names are called
   24.33 -``tags''.
   24.34 -\interaction{tag.tag}
   24.35 -
   24.36 -A tag is nothing more than a ``symbolic name'' for a revision.  Tags
   24.37 -exist purely for your convenience, so that you have a handy permanent
   24.38 -way to refer to a revision; Mercurial doesn't interpret the tag names
   24.39 -you use in any way.  Neither does Mercurial place any restrictions on
   24.40 -the name of a tag, beyond a few that are necessary to ensure that a
   24.41 -tag can be parsed unambiguously.  A tag name cannot contain any of the
   24.42 -following characters:
   24.43 -\begin{itemize}
   24.44 -\item Colon (ASCII 58, ``\texttt{:}'')
   24.45 -\item Carriage return (ASCII 13, ``\Verb+\r+'')
   24.46 -\item Newline (ASCII 10, ``\Verb+\n+'')
   24.47 -\end{itemize}
   24.48 -
   24.49 -You can use the \hgcmd{tags} command to display the tags present in
   24.50 -your repository.  In the output, each tagged revision is identified
   24.51 -first by its name, then by revision number, and finally by the unique
   24.52 -hash of the revision.  
   24.53 -\interaction{tag.tags}
   24.54 -Notice that \texttt{tip} is listed in the output of \hgcmd{tags}.  The
   24.55 -\texttt{tip} tag is a special ``floating'' tag, which always
   24.56 -identifies the newest revision in the repository.
   24.57 -
   24.58 -In the output of the \hgcmd{tags} command, tags are listed in reverse
   24.59 -order, by revision number.  This usually means that recent tags are
   24.60 -listed before older tags.  It also means that \texttt{tip} is always
   24.61 -going to be the first tag listed in the output of \hgcmd{tags}.
   24.62 -
   24.63 -When you run \hgcmd{log}, if it displays a revision that has tags
   24.64 -associated with it, it will print those tags.
   24.65 -\interaction{tag.log}
   24.66 -
   24.67 -Any time you need to provide a revision~ID to a Mercurial command, the
   24.68 -command will accept a tag name in its place.  Internally, Mercurial
   24.69 -will translate your tag name into the corresponding revision~ID, then
   24.70 -use that.
   24.71 -\interaction{tag.log.v1.0}
   24.72 -
   24.73 -There's no limit on the number of tags you can have in a repository,
   24.74 -or on the number of tags that a single revision can have.  As a
   24.75 -practical matter, it's not a great idea to have ``too many'' (a number
   24.76 -which will vary from project to project), simply because tags are
   24.77 -supposed to help you to find revisions.  If you have lots of tags, the
   24.78 -ease of using them to identify revisions diminishes rapidly.
   24.79 -
   24.80 -For example, if your project has milestones as frequent as every few
   24.81 -days, it's perfectly reasonable to tag each one of those.  But if you
   24.82 -have a continuous build system that makes sure every revision can be
   24.83 -built cleanly, you'd be introducing a lot of noise if you were to tag
   24.84 -every clean build.  Instead, you could tag failed builds (on the
   24.85 -assumption that they're rare!), or simply not use tags to track
   24.86 -buildability.
   24.87 -
   24.88 -If you want to remove a tag that you no longer want, use
   24.89 -\hgcmdargs{tag}{--remove}.  
   24.90 -\interaction{tag.remove}
   24.91 -You can also modify a tag at any time, so that it identifies a
   24.92 -different revision, by simply issuing a new \hgcmd{tag} command.
   24.93 -You'll have to use the \hgopt{tag}{-f} option to tell Mercurial that
   24.94 -you \emph{really} want to update the tag.
   24.95 -\interaction{tag.replace}
   24.96 -There will still be a permanent record of the previous identity of the
   24.97 -tag, but Mercurial will no longer use it.  There's thus no penalty to
   24.98 -tagging the wrong revision; all you have to do is turn around and tag
   24.99 -the correct revision once you discover your error.
  24.100 -
  24.101 -Mercurial stores tags in a normal revision-controlled file in your
  24.102 -repository.  If you've created any tags, you'll find them in a file
  24.103 -named \sfilename{.hgtags}.  When you run the \hgcmd{tag} command,
  24.104 -Mercurial modifies this file, then automatically commits the change to
  24.105 -it.  This means that every time you run \hgcmd{tag}, you'll see a
  24.106 -corresponding changeset in the output of \hgcmd{log}.
  24.107 -\interaction{tag.tip}
  24.108 -
  24.109 -\subsection{Handling tag conflicts during a merge}
  24.110 -
  24.111 -You won't often need to care about the \sfilename{.hgtags} file, but
  24.112 -it sometimes makes its presence known during a merge.  The format of
  24.113 -the file is simple: it consists of a series of lines.  Each line
  24.114 -starts with a changeset hash, followed by a space, followed by the
  24.115 -name of a tag.
  24.116 -
  24.117 -If you're resolving a conflict in the \sfilename{.hgtags} file during
  24.118 -a merge, there's one twist to modifying the \sfilename{.hgtags} file:
  24.119 -when Mercurial is parsing the tags in a repository, it \emph{never}
  24.120 -reads the working copy of the \sfilename{.hgtags} file.  Instead, it
  24.121 -reads the \emph{most recently committed} revision of the file.
  24.122 -
  24.123 -An unfortunate consequence of this design is that you can't actually
  24.124 -verify that your merged \sfilename{.hgtags} file is correct until
  24.125 -\emph{after} you've committed a change.  So if you find yourself
  24.126 -resolving a conflict on \sfilename{.hgtags} during a merge, be sure to
  24.127 -run \hgcmd{tags} after you commit.  If it finds an error in the
  24.128 -\sfilename{.hgtags} file, it will report the location of the error,
  24.129 -which you can then fix and commit.  You should then run \hgcmd{tags}
  24.130 -again, just to be sure that your fix is correct.
  24.131 -
  24.132 -\subsection{Tags and cloning}
  24.133 -
  24.134 -You may have noticed that the \hgcmd{clone} command has a
  24.135 -\hgopt{clone}{-r} option that lets you clone an exact copy of the
  24.136 -repository as of a particular changeset.  The new clone will not
  24.137 -contain any project history that comes after the revision you
  24.138 -specified.  This has an interaction with tags that can surprise the
  24.139 -unwary.
  24.140 -
  24.141 -Recall that a tag is stored as a revision to the \sfilename{.hgtags}
  24.142 -file, so that when you create a tag, the changeset in which it's
  24.143 -recorded necessarily refers to an older changeset.  When you run
  24.144 -\hgcmdargs{clone}{-r foo} to clone a repository as of tag
  24.145 -\texttt{foo}, the new clone \emph{will not contain the history that
  24.146 -  created the tag} that you used to clone the repository.  The result
  24.147 -is that you'll get exactly the right subset of the project's history
  24.148 -in the new repository, but \emph{not} the tag you might have expected.
  24.149 -
  24.150 -\subsection{When permanent tags are too much}
  24.151 -
  24.152 -Since Mercurial's tags are revision controlled and carried around with
  24.153 -a project's history, everyone you work with will see the tags you
  24.154 -create.  But giving names to revisions has uses beyond simply noting
  24.155 -that revision \texttt{4237e45506ee} is really \texttt{v2.0.2}.  If
  24.156 -you're trying to track down a subtle bug, you might want a tag to
  24.157 -remind you of something like ``Anne saw the symptoms with this
  24.158 -revision''.
  24.159 -
  24.160 -For cases like this, what you might want to use are \emph{local} tags.
  24.161 -You can create a local tag with the \hgopt{tag}{-l} option to the
  24.162 -\hgcmd{tag} command.  This will store the tag in a file called
  24.163 -\sfilename{.hg/localtags}.  Unlike \sfilename{.hgtags},
  24.164 -\sfilename{.hg/localtags} is not revision controlled.  Any tags you
  24.165 -create using \hgopt{tag}{-l} remain strictly local to the repository
  24.166 -you're currently working in.
  24.167 -
  24.168 -\section{The flow of changes---big picture vs. little}
  24.169 -
  24.170 -To return to the outline I sketched at the beginning of a chapter,
  24.171 -let's think about a project that has multiple concurrent pieces of
  24.172 -work under development at once.
  24.173 -
  24.174 -There might be a push for a new ``main'' release; a new minor bugfix
  24.175 -release to the last main release; and an unexpected ``hot fix'' to an
  24.176 -old release that is now in maintenance mode.
  24.177 -
  24.178 -The usual way people refer to these different concurrent directions of
  24.179 -development is as ``branches''.  However, we've already seen numerous
  24.180 -times that Mercurial treats \emph{all of history} as a series of
  24.181 -branches and merges.  Really, what we have here is two ideas that are
  24.182 -peripherally related, but which happen to share a name.
  24.183 -\begin{itemize}
  24.184 -\item ``Big picture'' branches represent the sweep of a project's
  24.185 -  evolution; people give them names, and talk about them in
  24.186 -  conversation.
  24.187 -\item ``Little picture'' branches are artefacts of the day-to-day
  24.188 -  activity of developing and merging changes.  They expose the
  24.189 -  narrative of how the code was developed.
  24.190 -\end{itemize}
  24.191 -
  24.192 -\section{Managing big-picture branches in repositories}
  24.193 -
  24.194 -The easiest way to isolate a ``big picture'' branch in Mercurial is in
  24.195 -a dedicated repository.  If you have an existing shared
  24.196 -repository---let's call it \texttt{myproject}---that reaches a ``1.0''
  24.197 -milestone, you can start to prepare for future maintenance releases on
  24.198 -top of version~1.0 by tagging the revision from which you prepared
  24.199 -the~1.0 release.
  24.200 -\interaction{branch-repo.tag}
  24.201 -You can then clone a new shared \texttt{myproject-1.0.1} repository as
  24.202 -of that tag.
  24.203 -\interaction{branch-repo.clone}
  24.204 -
  24.205 -Afterwards, if someone needs to work on a bug fix that ought to go
  24.206 -into an upcoming~1.0.1 minor release, they clone the
  24.207 -\texttt{myproject-1.0.1} repository, make their changes, and push them
  24.208 -back.
  24.209 -\interaction{branch-repo.bugfix}
  24.210 -Meanwhile, development for the next major release can continue,
  24.211 -isolated and unabated, in the \texttt{myproject} repository.
  24.212 -\interaction{branch-repo.new}
  24.213 -
  24.214 -\section{Don't repeat yourself: merging across branches}
  24.215 -
  24.216 -In many cases, if you have a bug to fix on a maintenance branch, the
  24.217 -chances are good that the bug exists on your project's main branch
  24.218 -(and possibly other maintenance branches, too).  It's a rare developer
  24.219 -who wants to fix the same bug multiple times, so let's look at a few
  24.220 -ways that Mercurial can help you to manage these bugfixes without
  24.221 -duplicating your work.
  24.222 -
  24.223 -In the simplest instance, all you need to do is pull changes from your
  24.224 -maintenance branch into your local clone of the target branch.
  24.225 -\interaction{branch-repo.pull}
  24.226 -You'll then need to merge the heads of the two branches, and push back
  24.227 -to the main branch.
  24.228 -\interaction{branch-repo.merge}
  24.229 -
  24.230 -\section{Naming branches within one repository}
  24.231 -
  24.232 -In most instances, isolating branches in repositories is the right
  24.233 -approach.  Its simplicity makes it easy to understand; and so it's
  24.234 -hard to make mistakes.  There's a one-to-one relationship between
  24.235 -branches you're working in and directories on your system.  This lets
  24.236 -you use normal (non-Mercurial-aware) tools to work on files within a
  24.237 -branch/repository.
  24.238 -
  24.239 -If you're more in the ``power user'' category (\emph{and} your
  24.240 -collaborators are too), there is an alternative way of handling
  24.241 -branches that you can consider.  I've already mentioned the
  24.242 -human-level distinction between ``small picture'' and ``big picture''
  24.243 -branches.  While Mercurial works with multiple ``small picture''
  24.244 -branches in a repository all the time (for example after you pull
  24.245 -changes in, but before you merge them), it can \emph{also} work with
  24.246 -multiple ``big picture'' branches.
  24.247 -
  24.248 -The key to working this way is that Mercurial lets you assign a
  24.249 -persistent \emph{name} to a branch.  There always exists a branch
  24.250 -named \texttt{default}.  Even before you start naming branches
  24.251 -yourself, you can find traces of the \texttt{default} branch if you
  24.252 -look for them.
  24.253 -
  24.254 -As an example, when you run the \hgcmd{commit} command, and it pops up
  24.255 -your editor so that you can enter a commit message, look for a line
  24.256 -that contains the text ``\texttt{HG: branch default}'' at the bottom.
  24.257 -This is telling you that your commit will occur on the branch named
  24.258 -\texttt{default}.
  24.259 -
  24.260 -To start working with named branches, use the \hgcmd{branches}
  24.261 -command.  This command lists the named branches already present in
  24.262 -your repository, telling you which changeset is the tip of each.
  24.263 -\interaction{branch-named.branches}
  24.264 -Since you haven't created any named branches yet, the only one that
  24.265 -exists is \texttt{default}.
  24.266 -
  24.267 -To find out what the ``current'' branch is, run the \hgcmd{branch}
  24.268 -command, giving it no arguments.  This tells you what branch the
  24.269 -parent of the current changeset is on.
  24.270 -\interaction{branch-named.branch}
  24.271 -
  24.272 -To create a new branch, run the \hgcmd{branch} command again.  This
  24.273 -time, give it one argument: the name of the branch you want to create.
  24.274 -\interaction{branch-named.create}
  24.275 -
  24.276 -After you've created a branch, you might wonder what effect the
  24.277 -\hgcmd{branch} command has had.  What do the \hgcmd{status} and
  24.278 -\hgcmd{tip} commands report?
  24.279 -\interaction{branch-named.status}
  24.280 -Nothing has changed in the working directory, and there's been no new
  24.281 -history created.  As this suggests, running the \hgcmd{branch} command
  24.282 -has no permanent effect; it only tells Mercurial what branch name to
  24.283 -use the \emph{next} time you commit a changeset.
  24.284 -
  24.285 -When you commit a change, Mercurial records the name of the branch on
  24.286 -which you committed.  Once you've switched from the \texttt{default}
  24.287 -branch to another and committed, you'll see the name of the new branch
  24.288 -show up in the output of \hgcmd{log}, \hgcmd{tip}, and other commands
  24.289 -that display the same kind of output.
  24.290 -\interaction{branch-named.commit}
  24.291 -The \hgcmd{log}-like commands will print the branch name of every
  24.292 -changeset that's not on the \texttt{default} branch.  As a result, if
  24.293 -you never use named branches, you'll never see this information.
  24.294 -
  24.295 -Once you've named a branch and committed a change with that name,
  24.296 -every subsequent commit that descends from that change will inherit
  24.297 -the same branch name.  You can change the name of a branch at any
  24.298 -time, using the \hgcmd{branch} command.  
  24.299 -\interaction{branch-named.rebranch}
  24.300 -In practice, this is something you won't do very often, as branch
  24.301 -names tend to have fairly long lifetimes.  (This isn't a rule, just an
  24.302 -observation.)
  24.303 -
  24.304 -\section{Dealing with multiple named branches in a repository}
  24.305 -
  24.306 -If you have more than one named branch in a repository, Mercurial will
  24.307 -remember the branch that your working directory on when you start a
  24.308 -command like \hgcmd{update} or \hgcmdargs{pull}{-u}.  It will update
  24.309 -the working directory to the tip of this branch, no matter what the
  24.310 -``repo-wide'' tip is.  To update to a revision that's on a different
  24.311 -named branch, you may need to use the \hgopt{update}{-C} option to
  24.312 -\hgcmd{update}.
  24.313 -
  24.314 -This behaviour is a little subtle, so let's see it in action.  First,
  24.315 -let's remind ourselves what branch we're currently on, and what
  24.316 -branches are in our repository.
  24.317 -\interaction{branch-named.parents}
  24.318 -We're on the \texttt{bar} branch, but there also exists an older
  24.319 -\hgcmd{foo} branch.
  24.320 -
  24.321 -We can \hgcmd{update} back and forth between the tips of the
  24.322 -\texttt{foo} and \texttt{bar} branches without needing to use the
  24.323 -\hgopt{update}{-C} option, because this only involves going backwards
  24.324 -and forwards linearly through our change history.
  24.325 -\interaction{branch-named.update-switchy}
  24.326 -
  24.327 -If we go back to the \texttt{foo} branch and then run \hgcmd{update},
  24.328 -it will keep us on \texttt{foo}, not move us to the tip of
  24.329 -\texttt{bar}.
  24.330 -\interaction{branch-named.update-nothing}
  24.331 -
  24.332 -Committing a new change on the \texttt{foo} branch introduces a new
  24.333 -head.
  24.334 -\interaction{branch-named.foo-commit}
  24.335 -
  24.336 -\section{Branch names and merging}
  24.337 -
  24.338 -As you've probably noticed, merges in Mercurial are not symmetrical.
  24.339 -Let's say our repository has two heads, 17 and 23.  If I
  24.340 -\hgcmd{update} to 17 and then \hgcmd{merge} with 23, Mercurial records
  24.341 -17 as the first parent of the merge, and 23 as the second.  Whereas if
  24.342 -I \hgcmd{update} to 23 and then \hgcmd{merge} with 17, it records 23
  24.343 -as the first parent, and 17 as the second.
  24.344 -
  24.345 -This affects Mercurial's choice of branch name when you merge.  After
  24.346 -a merge, Mercurial will retain the branch name of the first parent
  24.347 -when you commit the result of the merge.  If your first parent's
  24.348 -branch name is \texttt{foo}, and you merge with \texttt{bar}, the
  24.349 -branch name will still be \texttt{foo} after you merge.
  24.350 -
  24.351 -It's not unusual for a repository to contain multiple heads, each with
  24.352 -the same branch name.  Let's say I'm working on the \texttt{foo}
  24.353 -branch, and so are you.  We commit different changes; I pull your
  24.354 -changes; I now have two heads, each claiming to be on the \texttt{foo}
  24.355 -branch.  The result of a merge will be a single head on the
  24.356 -\texttt{foo} branch, as you might hope.
  24.357 -
  24.358 -But if I'm working on the \texttt{bar} branch, and I merge work from
  24.359 -the \texttt{foo} branch, the result will remain on the \texttt{bar}
  24.360 -branch.
  24.361 -\interaction{branch-named.merge}
  24.362 -
  24.363 -To give a more concrete example, if I'm working on the
  24.364 -\texttt{bleeding-edge} branch, and I want to bring in the latest fixes
  24.365 -from the \texttt{stable} branch, Mercurial will choose the ``right''
  24.366 -(\texttt{bleeding-edge}) branch name when I pull and merge from
  24.367 -\texttt{stable}.
  24.368 -
  24.369 -\section{Branch naming is generally useful}
  24.370 -
  24.371 -You shouldn't think of named branches as applicable only to situations
  24.372 -where you have multiple long-lived branches cohabiting in a single
  24.373 -repository.  They're very useful even in the one-branch-per-repository
  24.374 -case.  
  24.375 -
  24.376 -In the simplest case, giving a name to each branch gives you a
  24.377 -permanent record of which branch a changeset originated on.  This
  24.378 -gives you more context when you're trying to follow the history of a
  24.379 -long-lived branchy project.
  24.380 -
  24.381 -If you're working with shared repositories, you can set up a
  24.382 -\hook{pretxnchangegroup} hook on each that will block incoming changes
  24.383 -that have the ``wrong'' branch name.  This provides a simple, but
  24.384 -effective, defence against people accidentally pushing changes from a
  24.385 -``bleeding edge'' branch to a ``stable'' branch.  Such a hook might
  24.386 -look like this inside the shared repo's \hgrc.
  24.387 -\begin{codesample2}
  24.388 -  [hooks]
  24.389 -  pretxnchangegroup.branch = hg heads --template '{branches} ' | grep mybranch
  24.390 -\end{codesample2}
  24.391 -
  24.392 -%%% Local Variables: 
  24.393 -%%% mode: latex
  24.394 -%%% TeX-master: "00book"
  24.395 -%%% End: 
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/en/ch00-preface.xml	Sun Aug 16 03:41:39 2009 +0200
    25.3 @@ -0,0 +1,262 @@
    25.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    25.5 +
    25.6 +<preface id="chap:preface">
    25.7 +  <?dbhtml filename="preface.html"?>
    25.8 +  <title>Preface</title>
    25.9 +
   25.10 +  <sect1>
   25.11 +    <title>Technical storytelling</title>
   25.12 +
   25.13 +    <para id="x_72e">A few years ago, when I wanted to explain why I believed
   25.14 +      that distributed revision control is important, the field was
   25.15 +      then so new that there was almost no published literature to
   25.16 +      refer people to.</para>
   25.17 +
   25.18 +    <para id="x_72f">Although at that time I spent some time working on the
   25.19 +      internals of Mercurial itself, I switched to writing this book
   25.20 +      because that seemed like the most effective way to help the
   25.21 +      software to reach a wide audience, along with the idea that
   25.22 +      revision control ought to be distributed in nature.  I publish
   25.23 +      the book online under a liberal license for the same
   25.24 +      reason: to get the word out.</para>
   25.25 +
   25.26 +    <para id="x_730">There's a familiar rhythm to a good software book that
   25.27 +      closely resembles telling a story: What is this thing?  Why does
   25.28 +      it matter?  How will it help me?  How do I use it?  In this
   25.29 +      book, I try to answer those questions for distributed revision
   25.30 +      control in general, and for Mercurial in particular.</para>
   25.31 +  </sect1>
   25.32 +    
   25.33 +  <sect1>
   25.34 +    <title>Thank you for supporting Mercurial</title>
   25.35 +
   25.36 +    <para id="x_731">By purchasing a copy of this book, you are supporting the
   25.37 +      continued development and freedom of Mercurial in particular,
   25.38 +      and of open source and free software in general. O'Reilly Media
   25.39 +      and I are donating my royalties on the sales of this book to the
   25.40 +      Software Freedom Conservancy (<ulink
   25.41 +	url="http://www.softwarefreedom.org/">http://www.softwarefreedom.org/</ulink>) 
   25.42 +      which provides clerical and legal support to Mercurial and a
   25.43 +      number of other prominent and worthy open source software
   25.44 +      projects.</para>
   25.45 +  </sect1>
   25.46 +
   25.47 +  <sect1>
   25.48 +    <title>Acknowledgments</title>
   25.49 +
   25.50 +    <para id="x_732">This book would not exist were it not for the efforts of
   25.51 +      Matt Mackall, the author and project lead of Mercurial.  He is
   25.52 +      ably assisted by hundreds of volunteer contributors across the
   25.53 +      world.</para>
   25.54 +
   25.55 +    <para id="x_733">My children, Cian and Ruairi, always stood ready to help me
   25.56 +      to unwind with wonderful, madcap little-boy games.  I'd also
   25.57 +      like to thank my ex-wife, Shannon, for her support.</para>
   25.58 +
   25.59 +    <para id="x_734">My colleagues and friends provided help and support in
   25.60 +      innumerable ways.  This list of people is necessarily very
   25.61 +      incomplete: Stephen Hahn, Karyn Ritter, Bonnie Corwin, James
   25.62 +      Vasile, Matt Norwood, Eben Moglen, Bradley Kuhn, Robert Walsh,
   25.63 +      Jeremy Fitzhardinge, Rachel Chalmers.</para>
   25.64 +
   25.65 +    <para id="x_735">I developed this book in the open, posting drafts of
   25.66 +      chapters to the book web site as I completed them.  Readers then
   25.67 +      submitted feedback using a web application that I developed.  By
   25.68 +      the time I finished writing the book, more than 100 people had
   25.69 +      submitted comments, an amazing number considering that the
   25.70 +      comment system was live for only about two months towards the
   25.71 +      end of the writing process.</para>
   25.72 +
   25.73 +    <para id="x_736">I would particularly like to recognize the following people,
   25.74 +      who between them contributed over a third of the total number of
   25.75 +      comments.  I would like to thank them for their care and effort
   25.76 +      in providing so much detailed feedback.</para>
   25.77 +
   25.78 +    <para id="x_737">Martin Geisler, Damien Cassou, Alexey Bakhirkin, Till Plewe,
   25.79 +      Dan Himes, Paul Sargent, Gokberk Hamurcu, Matthijs van der
   25.80 +      Vleuten, Michael Chermside, John Mulligan, Jordi Fita, Jon
   25.81 +      Parise.</para>
   25.82 +
   25.83 +    <para id="x_738">I also want to acknowledge the help of the many people who
   25.84 +      caught errors and provided helpful suggestions throughout the
   25.85 +      book.</para>
   25.86 +
   25.87 +    <para id="x_739">Jeremy W. Sherman, Brian Mearns, Vincent Furia, Iwan
   25.88 +      Luijks, Billy Edwards, Andreas Sliwka, Paweł Sołyga, Eric
   25.89 +      Hanchrow, Steve Nicolai, Michał Masłowski, Kevin Fitch, Johan
   25.90 +      Holmberg, Hal Wine, Volker Simonis, Thomas P Jakobsen, Ted
   25.91 +      Stresen-Reuter, Stephen Rasku, Raphael Das Gupta, Ned
   25.92 +      Batchelder, Lou Keeble, Li Linxiao, Kao Cardoso Félix, Joseph
   25.93 +      Wecker, Jon Prescot, Jon Maken, John Yeary, Jason Harris,
   25.94 +      Geoffrey Zheng, Fredrik Jonson, Ed Davies, David Zumbrunnen,
   25.95 +      David Mercer, David Cabana, Ben Karel, Alan Franzoni, Yousry
   25.96 +      Abdallah, Whitney Young, Vinay Sajip, Tom Towle, Tim Ottinger,
   25.97 +      Thomas Schraitle, Tero Saarni, Ted Mielczarek, Svetoslav
   25.98 +      Agafonkin, Shaun Rowland, Rocco Rutte, Polo-Francois Poli,
   25.99 +      Philip Jenvey, Petr Tesałék, Peter R. Annema, Paul Bonser,
  25.100 +      Olivier Scherler, Olivier Fournier, Nick Parker, Nick Fabry,
  25.101 +      Nicholas Guarracino, Mike Driscoll, Mike Coleman, Mietek Bák,
  25.102 +      Michael Maloney, László Nagy, Kent Johnson, Julio Nobrega, Jord
  25.103 +      Fita, Jonathan March, Jonas Nockert, Jim Tittsler, Jeduan
  25.104 +      Cornejo Legorreta, Jan Larres, James Murphy, Henri Wiechers,
  25.105 +      Hagen Möbius, Gábor Farkas, Fabien Engels, Evert Rol, Evan
  25.106 +      Willms, Eduardo Felipe Castegnaro, Dennis Decker Jensen, Deniz
  25.107 +      Dogan, David Smith, Daed Lee, Christine Slotty, Charles Merriam,
  25.108 +      Guillaume Catto, Brian Dorsey, Bob Nystrom, Benoit Boissinot,
  25.109 +      Avi Rosenschein, Andrew Watts, Andrew Donkin, Alexey Rodriguez,
  25.110 +      Ahmed Chaudhary.</para>
  25.111 +  </sect1>
  25.112 +
  25.113 +  <sect1>
  25.114 +    <title>Conventions Used in This Book</title>
  25.115 +
  25.116 +    <para id="x_73a">The following typographical conventions are used in this
  25.117 +      book:</para>
  25.118 +
  25.119 +    <variablelist>
  25.120 +      <varlistentry>
  25.121 +        <term>Italic</term>
  25.122 +
  25.123 +        <listitem>
  25.124 +          <para id="x_73b">Indicates new terms, URLs, email addresses, filenames,
  25.125 +	    and file extensions.</para>
  25.126 +        </listitem>
  25.127 +      </varlistentry>
  25.128 +
  25.129 +      <varlistentry>
  25.130 +        <term><literal>Constant width</literal></term>
  25.131 +
  25.132 +        <listitem>
  25.133 +          <para id="x_73c">Used for program listings, as well as within
  25.134 +	    paragraphs to refer to program elements such as variable
  25.135 +	    or function names, databases, data types, environment
  25.136 +	    variables, statements, and keywords.</para>
  25.137 +        </listitem>
  25.138 +      </varlistentry>
  25.139 +
  25.140 +      <varlistentry>
  25.141 +        <term><userinput>Constant width bold</userinput></term>
  25.142 +
  25.143 +        <listitem>
  25.144 +          <para id="x_73d">Shows commands or other text that should be typed
  25.145 +	    literally by the user.</para>
  25.146 +        </listitem>
  25.147 +      </varlistentry>
  25.148 +
  25.149 +      <varlistentry>
  25.150 +        <term><replaceable>Constant width italic</replaceable></term>
  25.151 +
  25.152 +        <listitem>
  25.153 +          <para id="x_73e">Shows text that should be replaced with user-supplied
  25.154 +	    values or by values determined by context.</para>
  25.155 +        </listitem>
  25.156 +      </varlistentry>
  25.157 +    </variablelist>
  25.158 +
  25.159 +    <tip>
  25.160 +      <para id="x_73f">This icon signifies a tip, suggestion, or general
  25.161 +	note.</para>
  25.162 +    </tip>
  25.163 +
  25.164 +    <caution>
  25.165 +      <para id="x_740">This icon indicates a warning or caution.</para>
  25.166 +    </caution>
  25.167 +  </sect1>
  25.168 +
  25.169 +  <sect1>
  25.170 +    <title>Using Code Examples</title>
  25.171 +
  25.172 +    <para id="x_741">This book is here to help you get your job done. In general,
  25.173 +      you may use the code in this book in your programs and
  25.174 +      documentation. You do not need to contact us for permission
  25.175 +      unless you’re reproducing a significant portion of the code. For
  25.176 +      example, writing a program that uses several chunks of code from
  25.177 +      this book does not require permission. Selling or distributing a
  25.178 +      CD-ROM of examples from O’Reilly books does require permission.
  25.179 +      Answering a question by citing this book and quoting example
  25.180 +      code does not require permission. Incorporating a significant
  25.181 +      amount of example code from this book into your product’s
  25.182 +      documentation does require permission.</para>
  25.183 +
  25.184 +    <para id="x_742">We appreciate, but do not require, attribution. An
  25.185 +      attribution usually includes the title, author, publisher, and
  25.186 +      ISBN. For example: “<emphasis>Book Title</emphasis> by Some
  25.187 +      Author. Copyright 2008 O’Reilly Media, Inc.,
  25.188 +      978-0-596-xxxx-x.”</para>
  25.189 +
  25.190 +    <para id="x_743">If you feel your use of code examples falls outside fair use
  25.191 +      or the permission given above, feel free to contact us at
  25.192 +      <email>permissions@oreilly.com</email>.</para>
  25.193 +  </sect1>
  25.194 +
  25.195 +  <sect1>
  25.196 +    <title>Safari® Books Online</title>
  25.197 +
  25.198 +    <note role="safarienabled">
  25.199 +      <para id="x_744">When you see a Safari® Books Online icon on the cover of
  25.200 +	your favorite technology book, that means the book is
  25.201 +	available online through the O’Reilly Network Safari
  25.202 +	Bookshelf.</para>
  25.203 +    </note>
  25.204 +
  25.205 +    <para id="x_745">Safari offers a solution that’s better than e-books. It’s a
  25.206 +      virtual library that lets you easily search thousands of top
  25.207 +      tech books, cut and paste code samples, download chapters, and
  25.208 +      find quick answers when you need the most accurate, current
  25.209 +      information. Try it for free at <ulink role="orm:hideurl:ital"
  25.210 +	url="http://my.safaribooksonline.com/?portal=oreilly">http://my.safaribooksonline.com</ulink>.</para>
  25.211 +  </sect1>
  25.212 +
  25.213 +  <sect1>
  25.214 +    <title>How to Contact Us</title>
  25.215 +
  25.216 +    <para id="x_746">Please address comments and questions concerning this book
  25.217 +      to the publisher:</para>
  25.218 +
  25.219 +    <simplelist type="vert">
  25.220 +      <member>O’Reilly Media, Inc.</member>
  25.221 +
  25.222 +      <member>1005 Gravenstein Highway North</member>
  25.223 +
  25.224 +      <member>Sebastopol, CA 95472</member>
  25.225 +
  25.226 +      <member>800-998-9938 (in the United States or Canada)</member>
  25.227 +
  25.228 +      <member>707-829-0515 (international or local)</member>
  25.229 +
  25.230 +      <member>707 829-0104 (fax)</member>
  25.231 +    </simplelist>
  25.232 +
  25.233 +    <para id="x_747">We have a web page for this book, where we list errata,
  25.234 +      examples, and any additional information. You can access this
  25.235 +      page at:</para>
  25.236 +
  25.237 +    <simplelist type="vert">
  25.238 +      <member><ulink url="http://www.oreilly.com/catalog/&lt;catalog
  25.239 +	  page&gt;"></ulink></member>
  25.240 +    </simplelist>
  25.241 +
  25.242 +    <remark>Don’t forget to update the &lt;url&gt; attribute,
  25.243 +      too.</remark>
  25.244 +
  25.245 +    <para id="x_748">To comment or ask technical questions about this book, send
  25.246 +      email to:</para>
  25.247 +
  25.248 +    <simplelist type="vert">
  25.249 +      <member><email>bookquestions@oreilly.com</email></member>
  25.250 +    </simplelist>
  25.251 +
  25.252 +    <para id="x_749">For more information about our books, conferences, Resource
  25.253 +      Centers, and the O’Reilly Network, see our web site at:</para>
  25.254 +
  25.255 +    <simplelist type="vert">
  25.256 +      <member><ulink url="http://www.oreilly.com"></ulink></member>
  25.257 +    </simplelist>
  25.258 +  </sect1>
  25.259 +</preface>
  25.260 +
  25.261 +<!--
  25.262 +local variables: 
  25.263 +sgml-parent-document: ("00book.xml" "book" "preface")
  25.264 +end:
  25.265 +-->
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/en/ch01-intro.xml	Sun Aug 16 03:41:39 2009 +0200
    26.3 @@ -0,0 +1,734 @@
    26.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    26.5 +
    26.6 +<chapter id="chap:intro">
    26.7 +  <?dbhtml filename="how-did-we-get-here.html"?>
    26.8 +  <title>How did we get here?</title>
    26.9 +
   26.10 +  <sect1>
   26.11 +    <title>Why revision control? Why Mercurial?</title>
   26.12 +
   26.13 +    <para id="x_6d">Revision control is the process of managing multiple
   26.14 +      versions of a piece of information.  In its simplest form, this
   26.15 +      is something that many people do by hand: every time you modify
   26.16 +      a file, save it under a new name that contains a number, each
   26.17 +      one higher than the number of the preceding version.</para>
   26.18 +
   26.19 +    <para id="x_6e">Manually managing multiple versions of even a single file is
   26.20 +      an error-prone task, though, so software tools to help automate
   26.21 +      this process have long been available.  The earliest automated
   26.22 +      revision control tools were intended to help a single user to
   26.23 +      manage revisions of a single file.  Over the past few decades,
   26.24 +      the scope of revision control tools has expanded greatly; they
   26.25 +      now manage multiple files, and help multiple people to work
   26.26 +      together.  The best modern revision control tools have no
   26.27 +      problem coping with thousands of people working together on
   26.28 +      projects that consist of hundreds of thousands of files.</para>
   26.29 +
   26.30 +    <para id="x_6f">The arrival of distributed revision control is relatively
   26.31 +      recent, and so far this new field has grown due to people's
   26.32 +      willingness to explore ill-charted territory.</para>
   26.33 +
   26.34 +    <para id="x_70">I am writing a book about distributed revision control
   26.35 +      because I believe that it is an important subject that deserves
   26.36 +      a field guide. I chose to write about Mercurial because it is
   26.37 +      the easiest tool to learn the terrain with, and yet it scales to
   26.38 +      the demands of real, challenging environments where many other
   26.39 +      revision control tools buckle.</para>
   26.40 +
   26.41 +    <sect2>
   26.42 +      <title>Why use revision control?</title>
   26.43 +
   26.44 +      <para id="x_71">There are a number of reasons why you or your team might
   26.45 +	want to use an automated revision control tool for a
   26.46 +	project.</para>
   26.47 +
   26.48 +      <itemizedlist>
   26.49 +	<listitem><para id="x_72">It will track the history and evolution of
   26.50 +	    your project, so you don't have to.  For every change,
   26.51 +	    you'll have a log of <emphasis>who</emphasis> made it;
   26.52 +	    <emphasis>why</emphasis> they made it;
   26.53 +	    <emphasis>when</emphasis> they made it; and
   26.54 +	    <emphasis>what</emphasis> the change
   26.55 +	    was.</para></listitem>
   26.56 +	<listitem><para id="x_73">When you're working with other people,
   26.57 +	    revision control software makes it easier for you to
   26.58 +	    collaborate.  For example, when people more or less
   26.59 +	    simultaneously make potentially incompatible changes, the
   26.60 +	    software will help you to identify and resolve those
   26.61 +	    conflicts.</para></listitem>
   26.62 +	<listitem><para id="x_74">It can help you to recover from mistakes.  If
   26.63 +	    you make a change that later turns out to be in error, you
   26.64 +	    can revert to an earlier version of one or more files.  In
   26.65 +	    fact, a <emphasis>really</emphasis> good revision control
   26.66 +	    tool will even help you to efficiently figure out exactly
   26.67 +	    when a problem was introduced (see <xref
   26.68 +	      linkend="sec:undo:bisect"/> for details).</para></listitem>
   26.69 +	<listitem><para id="x_75">It will help you to work simultaneously on,
   26.70 +	    and manage the drift between, multiple versions of your
   26.71 +	    project.</para></listitem>
   26.72 +      </itemizedlist>
   26.73 +
   26.74 +      <para id="x_76">Most of these reasons are equally
   26.75 +	valid&emdash;at least in theory&emdash;whether you're working
   26.76 +	on a project by yourself, or with a hundred other
   26.77 +	people.</para>
   26.78 +
   26.79 +      <para id="x_77">A key question about the practicality of revision control
   26.80 +	at these two different scales (<quote>lone hacker</quote> and
   26.81 +	<quote>huge team</quote>) is how its
   26.82 +	<emphasis>benefits</emphasis> compare to its
   26.83 +	<emphasis>costs</emphasis>.  A revision control tool that's
   26.84 +	difficult to understand or use is going to impose a high
   26.85 +	cost.</para>
   26.86 +
   26.87 +      <para id="x_78">A five-hundred-person project is likely to collapse under
   26.88 +	its own weight almost immediately without a revision control
   26.89 +	tool and process. In this case, the cost of using revision
   26.90 +	control might hardly seem worth considering, since
   26.91 +	<emphasis>without</emphasis> it, failure is almost
   26.92 +	guaranteed.</para>
   26.93 +
   26.94 +      <para id="x_79">On the other hand, a one-person <quote>quick hack</quote>
   26.95 +	might seem like a poor place to use a revision control tool,
   26.96 +	because surely the cost of using one must be close to the
   26.97 +	overall cost of the project.  Right?</para>
   26.98 +
   26.99 +      <para id="x_7a">Mercurial uniquely supports <emphasis>both</emphasis> of
  26.100 +	these scales of development.  You can learn the basics in just
  26.101 +	a few minutes, and due to its low overhead, you can apply
  26.102 +	revision control to the smallest of projects with ease.  Its
  26.103 +	simplicity means you won't have a lot of abstruse concepts or
  26.104 +	command sequences competing for mental space with whatever
  26.105 +	you're <emphasis>really</emphasis> trying to do.  At the same
  26.106 +	time, Mercurial's high performance and peer-to-peer nature let
  26.107 +	you scale painlessly to handle large projects.</para>
  26.108 +
  26.109 +      <para id="x_7b">No revision control tool can rescue a poorly run project,
  26.110 +	but a good choice of tools can make a huge difference to the
  26.111 +	fluidity with which you can work on a project.</para>
  26.112 +
  26.113 +    </sect2>
  26.114 +
  26.115 +    <sect2>
  26.116 +      <title>The many names of revision control</title>
  26.117 +
  26.118 +      <para id="x_7c">Revision control is a diverse field, so much so that it is
  26.119 +	referred to by many names and acronyms.  Here are a few of the
  26.120 +	more common variations you'll encounter:</para>
  26.121 +      <itemizedlist>
  26.122 +	<listitem><para id="x_7d">Revision control (RCS)</para></listitem>
  26.123 +	<listitem><para id="x_7e">Software configuration management (SCM), or
  26.124 +	    configuration management</para></listitem>
  26.125 +	<listitem><para id="x_7f">Source code management</para></listitem>
  26.126 +	<listitem><para id="x_80">Source code control, or source
  26.127 +	    control</para></listitem>
  26.128 +	<listitem><para id="x_81">Version control
  26.129 +	    (VCS)</para></listitem></itemizedlist>
  26.130 +      <para id="x_82">Some people claim that these terms actually have different
  26.131 +	meanings, but in practice they overlap so much that there's no
  26.132 +	agreed or even useful way to tease them apart.</para>
  26.133 +
  26.134 +    </sect2>
  26.135 +  </sect1>
  26.136 +
  26.137 +  <sect1>
  26.138 +    <title>About the examples in this book</title>
  26.139 +
  26.140 +    <para id="x_84">This book takes an unusual approach to code samples.  Every
  26.141 +      example is <quote>live</quote>&emdash;each one is actually the result
  26.142 +      of a shell script that executes the Mercurial commands you see.
  26.143 +      Every time an image of the book is built from its sources, all
  26.144 +      the example scripts are automatically run, and their current
  26.145 +      results compared against their expected results.</para>
  26.146 +
  26.147 +    <para id="x_85">The advantage of this approach is that the examples are
  26.148 +      always accurate; they describe <emphasis>exactly</emphasis> the
  26.149 +      behavior of the version of Mercurial that's mentioned at the
  26.150 +      front of the book.  If I update the version of Mercurial that
  26.151 +      I'm documenting, and the output of some command changes, the
  26.152 +      build fails.</para>
  26.153 +
  26.154 +    <para id="x_86">There is a small disadvantage to this approach, which is
  26.155 +      that the dates and times you'll see in examples tend to be
  26.156 +      <quote>squashed</quote> together in a way that they wouldn't be
  26.157 +      if the same commands were being typed by a human.  Where a human
  26.158 +      can issue no more than one command every few seconds, with any
  26.159 +      resulting timestamps correspondingly spread out, my automated
  26.160 +      example scripts run many commands in one second.</para>
  26.161 +
  26.162 +    <para id="x_87">As an instance of this, several consecutive commits in an
  26.163 +      example can show up as having occurred during the same second.
  26.164 +      You can see this occur in the <literal
  26.165 +	role="hg-ext">bisect</literal> example in <xref
  26.166 +	linkend="sec:undo:bisect"/>, for instance.</para>
  26.167 +
  26.168 +    <para id="x_88">So when you're reading examples, don't place too much weight
  26.169 +      on the dates or times you see in the output of commands.  But
  26.170 +      <emphasis>do</emphasis> be confident that the behavior you're
  26.171 +      seeing is consistent and reproducible.</para>
  26.172 +
  26.173 +  </sect1>
  26.174 +
  26.175 +  <sect1>
  26.176 +    <title>Trends in the field</title>
  26.177 +
  26.178 +    <para id="x_89">There has been an unmistakable trend in the development and
  26.179 +      use of revision control tools over the past four decades, as
  26.180 +      people have become familiar with the capabilities of their tools
  26.181 +      and constrained by their limitations.</para>
  26.182 +
  26.183 +    <para id="x_8a">The first generation began by managing single files on
  26.184 +      individual computers.  Although these tools represented a huge
  26.185 +      advance over ad-hoc manual revision control, their locking model
  26.186 +      and reliance on a single computer limited them to small,
  26.187 +      tightly-knit teams.</para>
  26.188 +
  26.189 +    <para id="x_8b">The second generation loosened these constraints by moving
  26.190 +      to network-centered architectures, and managing entire projects
  26.191 +      at a time.  As projects grew larger, they ran into new problems.
  26.192 +      With clients needing to talk to servers very frequently, server
  26.193 +      scaling became an issue for large projects.  An unreliable
  26.194 +      network connection could prevent remote users from being able to
  26.195 +      talk to the server at all.  As open source projects started
  26.196 +      making read-only access available anonymously to anyone, people
  26.197 +      without commit privileges found that they could not use the
  26.198 +      tools to interact with a project in a natural way, as they could
  26.199 +      not record their changes.</para>
  26.200 +
  26.201 +    <para id="x_8c">The current generation of revision control tools is
  26.202 +      peer-to-peer in nature.  All of these systems have dropped the
  26.203 +      dependency on a single central server, and allow people to
  26.204 +      distribute their revision control data to where it's actually
  26.205 +      needed.  Collaboration over the Internet has moved from
  26.206 +      constrained by technology to a matter of choice and consensus.
  26.207 +      Modern tools can operate offline indefinitely and autonomously,
  26.208 +      with a network connection only needed when syncing changes with
  26.209 +      another repository.</para>
  26.210 +
  26.211 +  </sect1>
  26.212 +  <sect1>
  26.213 +    <title>A few of the advantages of distributed revision
  26.214 +      control</title>
  26.215 +
  26.216 +    <para id="x_8d">Even though distributed revision control tools have for
  26.217 +      several years been as robust and usable as their
  26.218 +      previous-generation counterparts, people using older tools have
  26.219 +      not yet necessarily woken up to their advantages.  There are a
  26.220 +      number of ways in which distributed tools shine relative to
  26.221 +      centralised ones.</para>
  26.222 +
  26.223 +    <para id="x_8e">For an individual developer, distributed tools are almost
  26.224 +      always much faster than centralised tools.  This is for a simple
  26.225 +      reason: a centralised tool needs to talk over the network for
  26.226 +      many common operations, because most metadata is stored in a
  26.227 +      single copy on the central server.  A distributed tool stores
  26.228 +      all of its metadata locally.  All else being equal, talking over
  26.229 +      the network adds overhead to a centralised tool.  Don't
  26.230 +      underestimate the value of a snappy, responsive tool: you're
  26.231 +      going to spend a lot of time interacting with your revision
  26.232 +      control software.</para>
  26.233 +
  26.234 +    <para id="x_8f">Distributed tools are indifferent to the vagaries of your
  26.235 +      server infrastructure, again because they replicate metadata to
  26.236 +      so many locations.  If you use a centralised system and your
  26.237 +      server catches fire, you'd better hope that your backup media
  26.238 +      are reliable, and that your last backup was recent and actually
  26.239 +      worked.  With a distributed tool, you have many backups
  26.240 +      available on every contributor's computer.</para>
  26.241 +
  26.242 +    <para id="x_90">The reliability of your network will affect distributed
  26.243 +      tools far less than it will centralised tools.  You can't even
  26.244 +      use a centralised tool without a network connection, except for
  26.245 +      a few highly constrained commands.  With a distributed tool, if
  26.246 +      your network connection goes down while you're working, you may
  26.247 +      not even notice.  The only thing you won't be able to do is talk
  26.248 +      to repositories on other computers, something that is relatively
  26.249 +      rare compared with local operations.  If you have a far-flung
  26.250 +      team of collaborators, this may be significant.</para>
  26.251 +
  26.252 +    <sect2>
  26.253 +      <title>Advantages for open source projects</title>
  26.254 +
  26.255 +      <para id="x_91">If you take a shine to an open source project and decide
  26.256 +	that you would like to start hacking on it, and that project
  26.257 +	uses a distributed revision control tool, you are at once a
  26.258 +	peer with the people who consider themselves the
  26.259 +	<quote>core</quote> of that project.  If they publish their
  26.260 +	repositories, you can immediately copy their project history,
  26.261 +	start making changes, and record your work, using the same
  26.262 +	tools in the same ways as insiders.  By contrast, with a
  26.263 +	centralised tool, you must use the software in a <quote>read
  26.264 +	  only</quote> mode unless someone grants you permission to
  26.265 +	commit changes to their central server.  Until then, you won't
  26.266 +	be able to record changes, and your local modifications will
  26.267 +	be at risk of corruption any time you try to update your
  26.268 +	client's view of the repository.</para>
  26.269 +
  26.270 +      <sect3>
  26.271 +	<title>The forking non-problem</title>
  26.272 +
  26.273 +	<para id="x_92">It has been suggested that distributed revision control
  26.274 +	  tools pose some sort of risk to open source projects because
  26.275 +	  they make it easy to <quote>fork</quote> the development of
  26.276 +	  a project.  A fork happens when there are differences in
  26.277 +	  opinion or attitude between groups of developers that cause
  26.278 +	  them to decide that they can't work together any longer.
  26.279 +	  Each side takes a more or less complete copy of the
  26.280 +	  project's source code, and goes off in its own
  26.281 +	  direction.</para>
  26.282 +
  26.283 +	<para id="x_93">Sometimes the camps in a fork decide to reconcile their
  26.284 +	  differences. With a centralised revision control system, the
  26.285 +	  <emphasis>technical</emphasis> process of reconciliation is
  26.286 +	  painful, and has to be performed largely by hand.  You have
  26.287 +	  to decide whose revision history is going to
  26.288 +	  <quote>win</quote>, and graft the other team's changes into
  26.289 +	  the tree somehow. This usually loses some or all of one
  26.290 +	  side's revision history.</para>
  26.291 +
  26.292 +	<para id="x_94">What distributed tools do with respect to forking is
  26.293 +	  they make forking the <emphasis>only</emphasis> way to
  26.294 +	  develop a project.  Every single change that you make is
  26.295 +	  potentially a fork point.  The great strength of this
  26.296 +	  approach is that a distributed revision control tool has to
  26.297 +	  be really good at <emphasis>merging</emphasis> forks,
  26.298 +	  because forks are absolutely fundamental: they happen all
  26.299 +	  the time.</para>
  26.300 +
  26.301 +	<para id="x_95">If every piece of work that everybody does, all the
  26.302 +	  time, is framed in terms of forking and merging, then what
  26.303 +	  the open source world refers to as a <quote>fork</quote>
  26.304 +	  becomes <emphasis>purely</emphasis> a social issue.  If
  26.305 +	  anything, distributed tools <emphasis>lower</emphasis> the
  26.306 +	  likelihood of a fork:</para>
  26.307 +	<itemizedlist>
  26.308 +	  <listitem><para id="x_96">They eliminate the social distinction that
  26.309 +	      centralised tools impose: that between insiders (people
  26.310 +	      with commit access) and outsiders (people
  26.311 +	      without).</para></listitem>
  26.312 +	  <listitem><para id="x_97">They make it easier to reconcile after a
  26.313 +	      social fork, because all that's involved from the
  26.314 +	      perspective of the revision control software is just
  26.315 +	      another merge.</para></listitem></itemizedlist>
  26.316 +
  26.317 +	<para id="x_98">Some people resist distributed tools because they want
  26.318 +	  to retain tight control over their projects, and they
  26.319 +	  believe that centralised tools give them this control.
  26.320 +	  However, if you're of this belief, and you publish your CVS
  26.321 +	  or Subversion repositories publicly, there are plenty of
  26.322 +	  tools available that can pull out your entire project's
  26.323 +	  history (albeit slowly) and recreate it somewhere that you
  26.324 +	  don't control.  So while your control in this case is
  26.325 +	  illusory, you are forgoing the ability to fluidly
  26.326 +	  collaborate with whatever people feel compelled to mirror
  26.327 +	  and fork your history.</para>
  26.328 +
  26.329 +      </sect3>
  26.330 +    </sect2>
  26.331 +    <sect2>
  26.332 +      <title>Advantages for commercial projects</title>
  26.333 +
  26.334 +      <para id="x_99">Many commercial projects are undertaken by teams that are
  26.335 +	scattered across the globe.  Contributors who are far from a
  26.336 +	central server will see slower command execution and perhaps
  26.337 +	less reliability.  Commercial revision control systems attempt
  26.338 +	to ameliorate these problems with remote-site replication
  26.339 +	add-ons that are typically expensive to buy and cantankerous
  26.340 +	to administer.  A distributed system doesn't suffer from these
  26.341 +	problems in the first place.  Better yet, you can easily set
  26.342 +	up multiple authoritative servers, say one per site, so that
  26.343 +	there's no redundant communication between repositories over
  26.344 +	expensive long-haul network links.</para>
  26.345 +
  26.346 +      <para id="x_9a">Centralised revision control systems tend to have
  26.347 +	relatively low scalability.  It's not unusual for an expensive
  26.348 +	centralised system to fall over under the combined load of
  26.349 +	just a few dozen concurrent users.  Once again, the typical
  26.350 +	response tends to be an expensive and clunky replication
  26.351 +	facility.  Since the load on a central server&emdash;if you have
  26.352 +	one at all&emdash;is many times lower with a distributed tool
  26.353 +	(because all of the data is replicated everywhere), a single
  26.354 +	cheap server can handle the needs of a much larger team, and
  26.355 +	replication to balance load becomes a simple matter of
  26.356 +	scripting.</para>
  26.357 +
  26.358 +      <para id="x_9b">If you have an employee in the field, troubleshooting a
  26.359 +	problem at a customer's site, they'll benefit from distributed
  26.360 +	revision control. The tool will let them generate custom
  26.361 +	builds, try different fixes in isolation from each other, and
  26.362 +	search efficiently through history for the sources of bugs and
  26.363 +	regressions in the customer's environment, all without needing
  26.364 +	to connect to your company's network.</para>
  26.365 +
  26.366 +    </sect2>
  26.367 +  </sect1>
  26.368 +  <sect1>
  26.369 +    <title>Why choose Mercurial?</title>
  26.370 +
  26.371 +    <para id="x_9c">Mercurial has a unique set of properties that make it a
  26.372 +      particularly good choice as a revision control system.</para>
  26.373 +    <itemizedlist>
  26.374 +      <listitem><para id="x_9d">It is easy to learn and use.</para></listitem>
  26.375 +      <listitem><para id="x_9e">It is lightweight.</para></listitem>
  26.376 +      <listitem><para id="x_9f">It scales excellently.</para></listitem>
  26.377 +      <listitem><para id="x_a0">It is easy to
  26.378 +	  customise.</para></listitem></itemizedlist>
  26.379 +
  26.380 +    <para id="x_a1">If you are at all familiar with revision control systems,
  26.381 +      you should be able to get up and running with Mercurial in less
  26.382 +      than five minutes.  Even if not, it will take no more than a few
  26.383 +      minutes longer.  Mercurial's command and feature sets are
  26.384 +      generally uniform and consistent, so you can keep track of a few
  26.385 +      general rules instead of a host of exceptions.</para>
  26.386 +
  26.387 +    <para id="x_a2">On a small project, you can start working with Mercurial in
  26.388 +      moments. Creating new changes and branches; transferring changes
  26.389 +      around (whether locally or over a network); and history and
  26.390 +      status operations are all fast.  Mercurial attempts to stay
  26.391 +      nimble and largely out of your way by combining low cognitive
  26.392 +      overhead with blazingly fast operations.</para>
  26.393 +
  26.394 +    <para id="x_a3">The usefulness of Mercurial is not limited to small
  26.395 +      projects: it is used by projects with hundreds to thousands of
  26.396 +      contributors, each containing tens of thousands of files and
  26.397 +      hundreds of megabytes of source code.</para>
  26.398 +
  26.399 +    <para id="x_a4">If the core functionality of Mercurial is not enough for
  26.400 +      you, it's easy to build on.  Mercurial is well suited to
  26.401 +      scripting tasks, and its clean internals and implementation in
  26.402 +      Python make it easy to add features in the form of extensions.
  26.403 +      There are a number of popular and useful extensions already
  26.404 +      available, ranging from helping to identify bugs to improving
  26.405 +      performance.</para>
  26.406 +
  26.407 +  </sect1>
  26.408 +  <sect1>
  26.409 +    <title>Mercurial compared with other tools</title>
  26.410 +
  26.411 +    <para id="x_a5">Before you read on, please understand that this section
  26.412 +      necessarily reflects my own experiences, interests, and (dare I
  26.413 +      say it) biases.  I have used every one of the revision control
  26.414 +      tools listed below, in most cases for several years at a
  26.415 +      time.</para>
  26.416 +
  26.417 +
  26.418 +    <sect2>
  26.419 +      <title>Subversion</title>
  26.420 +
  26.421 +      <para id="x_a6">Subversion is a popular revision control tool, developed
  26.422 +	to replace CVS.  It has a centralised client/server
  26.423 +	architecture.</para>
  26.424 +
  26.425 +      <para id="x_a7">Subversion and Mercurial have similarly named commands for
  26.426 +	performing the same operations, so if you're familiar with
  26.427 +	one, it is easy to learn to use the other.  Both tools are
  26.428 +	portable to all popular operating systems.</para>
  26.429 +
  26.430 +      <para id="x_a8">Prior to version 1.5, Subversion had no useful support for
  26.431 +	merges. At the time of writing, its merge tracking capability
  26.432 +	is new, and known to be <ulink
  26.433 +	  url="http://svnbook.red-bean.com/nightly/en/svn.branchmerge.advanced.html#svn.branchmerge.advanced.finalword">complicated 
  26.434 +	  and buggy</ulink>.</para>
  26.435 +
  26.436 +      <para id="x_a9">Mercurial has a substantial performance advantage over
  26.437 +	Subversion on every revision control operation I have
  26.438 +	benchmarked.  I have measured its advantage as ranging from a
  26.439 +	factor of two to a factor of six when compared with Subversion
  26.440 +	1.4.3's <emphasis>ra_local</emphasis> file store, which is the
  26.441 +	fastest access method available.  In more realistic
  26.442 +	deployments involving a network-based store, Subversion will
  26.443 +	be at a substantially larger disadvantage.  Because many
  26.444 +	Subversion commands must talk to the server and Subversion
  26.445 +	does not have useful replication facilities, server capacity
  26.446 +	and network bandwidth become bottlenecks for modestly large
  26.447 +	projects.</para>
  26.448 +
  26.449 +      <para id="x_aa">Additionally, Subversion incurs substantial storage
  26.450 +	overhead to avoid network transactions for a few common
  26.451 +	operations, such as finding modified files
  26.452 +	(<literal>status</literal>) and displaying modifications
  26.453 +	against the current revision (<literal>diff</literal>).  As a
  26.454 +	result, a Subversion working copy is often the same size as,
  26.455 +	or larger than, a Mercurial repository and working directory,
  26.456 +	even though the Mercurial repository contains a complete
  26.457 +	history of the project.</para>
  26.458 +
  26.459 +      <para id="x_ab">Subversion is widely supported by third party tools.
  26.460 +	Mercurial currently lags considerably in this area.  This gap
  26.461 +	is closing, however, and indeed some of Mercurial's GUI tools
  26.462 +	now outshine their Subversion equivalents.  Like Mercurial,
  26.463 +	Subversion has an excellent user manual.</para>
  26.464 +
  26.465 +      <para id="x_ac">Because Subversion doesn't store revision history on the
  26.466 +	client, it is well suited to managing projects that deal with
  26.467 +	lots of large, opaque binary files.  If you check in fifty
  26.468 +	revisions to an incompressible 10MB file, Subversion's
  26.469 +	client-side space usage stays constant The space used by any
  26.470 +	distributed SCM will grow rapidly in proportion to the number
  26.471 +	of revisions, because the differences between each revision
  26.472 +	are large.</para>
  26.473 +
  26.474 +      <para id="x_ad">In addition, it's often difficult or, more usually,
  26.475 +	impossible to merge different versions of a binary file.
  26.476 +	Subversion's ability to let a user lock a file, so that they
  26.477 +	temporarily have the exclusive right to commit changes to it,
  26.478 +	can be a significant advantage to a project where binary files
  26.479 +	are widely used.</para>
  26.480 +
  26.481 +      <para id="x_ae">Mercurial can import revision history from a Subversion
  26.482 +	repository. It can also export revision history to a
  26.483 +	Subversion repository.  This makes it easy to <quote>test the
  26.484 +	  waters</quote> and use Mercurial and Subversion in parallel
  26.485 +	before deciding to switch.  History conversion is incremental,
  26.486 +	so you can perform an initial conversion, then small
  26.487 +	additional conversions afterwards to bring in new
  26.488 +	changes.</para>
  26.489 +
  26.490 +
  26.491 +    </sect2>
  26.492 +    <sect2>
  26.493 +      <title>Git</title>
  26.494 +
  26.495 +      <para id="x_af">Git is a distributed revision control tool that was
  26.496 +	developed for managing the Linux kernel source tree.  Like
  26.497 +	Mercurial, its early design was somewhat influenced by
  26.498 +	Monotone.</para>
  26.499 +
  26.500 +      <para id="x_b0">Git has a very large command set, with version 1.5.0
  26.501 +	providing 139 individual commands.  It has something of a
  26.502 +	reputation for being difficult to learn.  Compared to Git,
  26.503 +	Mercurial has a strong focus on simplicity.</para>
  26.504 +
  26.505 +      <para id="x_b1">In terms of performance, Git is extremely fast.  In
  26.506 +	several cases, it is faster than Mercurial, at least on Linux,
  26.507 +	while Mercurial performs better on other operations.  However,
  26.508 +	on Windows, the performance and general level of support that
  26.509 +	Git provides is, at the time of writing, far behind that of
  26.510 +	Mercurial.</para>
  26.511 +
  26.512 +      <para id="x_b2">While a Mercurial repository needs no maintenance, a Git
  26.513 +	repository requires frequent manual <quote>repacks</quote> of
  26.514 +	its metadata.  Without these, performance degrades, while
  26.515 +	space usage grows rapidly.  A server that contains many Git
  26.516 +	repositories that are not rigorously and frequently repacked
  26.517 +	will become heavily disk-bound during backups, and there have
  26.518 +	been instances of daily backups taking far longer than 24
  26.519 +	hours as a result.  A freshly packed Git repository is
  26.520 +	slightly smaller than a Mercurial repository, but an unpacked
  26.521 +	repository is several orders of magnitude larger.</para>
  26.522 +
  26.523 +      <para id="x_b3">The core of Git is written in C.  Many Git commands are
  26.524 +	implemented as shell or Perl scripts, and the quality of these
  26.525 +	scripts varies widely. I have encountered several instances
  26.526 +	where scripts charged along blindly in the presence of errors
  26.527 +	that should have been fatal.</para>
  26.528 +
  26.529 +      <para id="x_b4">Mercurial can import revision history from a Git
  26.530 +	repository.</para>
  26.531 +
  26.532 +
  26.533 +    </sect2>
  26.534 +    <sect2>
  26.535 +      <title>CVS</title>
  26.536 +
  26.537 +      <para id="x_b5">CVS is probably the most widely used revision control tool
  26.538 +	in the world.  Due to its age and internal untidiness, it has
  26.539 +	been only lightly maintained for many years.</para>
  26.540 +
  26.541 +      <para id="x_b6">It has a centralised client/server architecture.  It does
  26.542 +	not group related file changes into atomic commits, making it
  26.543 +	easy for people to <quote>break the build</quote>: one person
  26.544 +	can successfully commit part of a change and then be blocked
  26.545 +	by the need for a merge, causing other people to see only a
  26.546 +	portion of the work they intended to do.  This also affects
  26.547 +	how you work with project history.  If you want to see all of
  26.548 +	the modifications someone made as part of a task, you will
  26.549 +	need to manually inspect the descriptions and timestamps of
  26.550 +	the changes made to each file involved (if you even know what
  26.551 +	those files were).</para>
  26.552 +
  26.553 +      <para id="x_b7">CVS has a muddled notion of tags and branches that I will
  26.554 +	not attempt to even describe.  It does not support renaming of
  26.555 +	files or directories well, making it easy to corrupt a
  26.556 +	repository.  It has almost no internal consistency checking
  26.557 +	capabilities, so it is usually not even possible to tell
  26.558 +	whether or how a repository is corrupt.  I would not recommend
  26.559 +	CVS for any project, existing or new.</para>
  26.560 +
  26.561 +      <para id="x_b8">Mercurial can import CVS revision history.  However, there
  26.562 +	are a few caveats that apply; these are true of every other
  26.563 +	revision control tool's CVS importer, too.  Due to CVS's lack
  26.564 +	of atomic changes and unversioned filesystem hierarchy, it is
  26.565 +	not possible to reconstruct CVS history completely accurately;
  26.566 +	some guesswork is involved, and renames will usually not show
  26.567 +	up.  Because a lot of advanced CVS administration has to be
  26.568 +	done by hand and is hence error-prone, it's common for CVS
  26.569 +	importers to run into multiple problems with corrupted
  26.570 +	repositories (completely bogus revision timestamps and files
  26.571 +	that have remained locked for over a decade are just two of
  26.572 +	the less interesting problems I can recall from personal
  26.573 +	experience).</para>
  26.574 +
  26.575 +      <para id="x_b9">Mercurial can import revision history from a CVS
  26.576 +	repository.</para>
  26.577 +
  26.578 +
  26.579 +    </sect2>
  26.580 +    <sect2>
  26.581 +      <title>Commercial tools</title>
  26.582 +
  26.583 +      <para id="x_ba">Perforce has a centralised client/server architecture,
  26.584 +	with no client-side caching of any data.  Unlike modern
  26.585 +	revision control tools, Perforce requires that a user run a
  26.586 +	command to inform the server about every file they intend to
  26.587 +	edit.</para>
  26.588 +
  26.589 +      <para id="x_bb">The performance of Perforce is quite good for small teams,
  26.590 +	but it falls off rapidly as the number of users grows beyond a
  26.591 +	few dozen. Modestly large Perforce installations require the
  26.592 +	deployment of proxies to cope with the load their users
  26.593 +	generate.</para>
  26.594 +
  26.595 +
  26.596 +    </sect2>
  26.597 +    <sect2>
  26.598 +      <title>Choosing a revision control tool</title>
  26.599 +
  26.600 +      <para id="x_bc">With the exception of CVS, all of the tools listed above
  26.601 +	have unique strengths that suit them to particular styles of
  26.602 +	work.  There is no single revision control tool that is best
  26.603 +	in all situations.</para>
  26.604 +
  26.605 +      <para id="x_bd">As an example, Subversion is a good choice for working
  26.606 +	with frequently edited binary files, due to its centralised
  26.607 +	nature and support for file locking.</para>
  26.608 +
  26.609 +      <para id="x_be">I personally find Mercurial's properties of simplicity,
  26.610 +	performance, and good merge support to be a compelling
  26.611 +	combination that has served me well for several years.</para>
  26.612 +
  26.613 +
  26.614 +    </sect2>
  26.615 +  </sect1>
  26.616 +  <sect1>
  26.617 +    <title>Switching from another tool to Mercurial</title>
  26.618 +
  26.619 +    <para id="x_bf">Mercurial is bundled with an extension named <literal
  26.620 +	role="hg-ext">convert</literal>, which can incrementally
  26.621 +      import revision history from several other revision control
  26.622 +      tools.  By <quote>incremental</quote>, I mean that you can
  26.623 +      convert all of a project's history to date in one go, then rerun
  26.624 +      the conversion later to obtain new changes that happened after
  26.625 +      the initial conversion.</para>
  26.626 +
  26.627 +    <para id="x_c0">The revision control tools supported by <literal
  26.628 +	role="hg-ext">convert</literal> are as follows:</para>
  26.629 +    <itemizedlist>
  26.630 +      <listitem><para id="x_c1">Subversion</para></listitem>
  26.631 +      <listitem><para id="x_c2">CVS</para></listitem>
  26.632 +      <listitem><para id="x_c3">Git</para></listitem>
  26.633 +      <listitem><para id="x_c4">Darcs</para></listitem></itemizedlist>
  26.634 +
  26.635 +    <para id="x_c5">In addition, <literal role="hg-ext">convert</literal> can
  26.636 +      export changes from Mercurial to Subversion.  This makes it
  26.637 +      possible to try Subversion and Mercurial in parallel before
  26.638 +      committing to a switchover, without risking the loss of any
  26.639 +      work.</para>
  26.640 +
  26.641 +    <para id="x_c6">The <command role="hg-ext-convert">convert</command> command
  26.642 +      is easy to use.  Simply point it at the path or URL of the
  26.643 +      source repository, optionally give it the name of the
  26.644 +      destination repository, and it will start working.  After the
  26.645 +      initial conversion, just run the same command again to import
  26.646 +      new changes.</para>
  26.647 +  </sect1>
  26.648 +
  26.649 +  <sect1>
  26.650 +    <title>A short history of revision control</title>
  26.651 +
  26.652 +    <para id="x_c7">The best known of the old-time revision control tools is
  26.653 +      SCCS (Source Code Control System), which Marc Rochkind wrote at
  26.654 +      Bell Labs, in the early 1970s.  SCCS operated on individual
  26.655 +      files, and required every person working on a project to have
  26.656 +      access to a shared workspace on a single system.  Only one
  26.657 +      person could modify a file at any time; arbitration for access
  26.658 +      to files was via locks.  It was common for people to lock files,
  26.659 +      and later forget to unlock them, preventing anyone else from
  26.660 +      modifying those files without the help of an
  26.661 +      administrator.</para>
  26.662 +
  26.663 +    <para id="x_c8">Walter Tichy developed a free alternative to SCCS in the
  26.664 +      early 1980s; he called his program RCS (Revision Control System).
  26.665 +      Like SCCS, RCS required developers to work in a single shared
  26.666 +      workspace, and to lock files to prevent multiple people from
  26.667 +      modifying them simultaneously.</para>
  26.668 +
  26.669 +    <para id="x_c9">Later in the 1980s, Dick Grune used RCS as a building block
  26.670 +      for a set of shell scripts he initially called cmt, but then
  26.671 +      renamed to CVS (Concurrent Versions System).  The big innovation
  26.672 +      of CVS was that it let developers work simultaneously and
  26.673 +      somewhat independently in their own personal workspaces.  The
  26.674 +      personal workspaces prevented developers from stepping on each
  26.675 +      other's toes all the time, as was common with SCCS and RCS. Each
  26.676 +      developer had a copy of every project file, and could modify
  26.677 +      their copies independently.  They had to merge their edits prior
  26.678 +      to committing changes to the central repository.</para>
  26.679 +
  26.680 +    <para id="x_ca">Brian Berliner took Grune's original scripts and rewrote
  26.681 +      them in C, releasing in 1989 the code that has since developed
  26.682 +      into the modern version of CVS.  CVS subsequently acquired the
  26.683 +      ability to operate over a network connection, giving it a
  26.684 +      client/server architecture.  CVS's architecture is centralised;
  26.685 +      only the server has a copy of the history of the project. Client
  26.686 +      workspaces just contain copies of recent versions of the
  26.687 +      project's files, and a little metadata to tell them where the
  26.688 +      server is.  CVS has been enormously successful; it is probably
  26.689 +      the world's most widely used revision control system.</para>
  26.690 +
  26.691 +    <para id="x_cb">In the early 1990s, Sun Microsystems developed an early
  26.692 +      distributed revision control system, called TeamWare.  A
  26.693 +      TeamWare workspace contains a complete copy of the project's
  26.694 +      history.  TeamWare has no notion of a central repository.  (CVS
  26.695 +      relied upon RCS for its history storage; TeamWare used
  26.696 +      SCCS.)</para>
  26.697 +
  26.698 +    <para id="x_cc">As the 1990s progressed, awareness grew of a number of
  26.699 +      problems with CVS.  It records simultaneous changes to multiple
  26.700 +      files individually, instead of grouping them together as a
  26.701 +      single logically atomic operation.  It does not manage its file
  26.702 +      hierarchy well; it is easy to make a mess of a repository by
  26.703 +      renaming files and directories.  Worse, its source code is
  26.704 +      difficult to read and maintain, which made the <quote>pain
  26.705 +	level</quote> of fixing these architectural problems
  26.706 +      prohibitive.</para>
  26.707 +
  26.708 +    <para id="x_cd">In 2001, Jim Blandy and Karl Fogel, two developers who had
  26.709 +      worked on CVS, started a project to replace it with a tool that
  26.710 +      would have a better architecture and cleaner code.  The result,
  26.711 +      Subversion, does not stray from CVS's centralised client/server
  26.712 +      model, but it adds multi-file atomic commits, better namespace
  26.713 +      management, and a number of other features that make it a
  26.714 +      generally better tool than CVS. Since its initial release, it
  26.715 +      has rapidly grown in popularity.</para>
  26.716 +
  26.717 +    <para id="x_ce">More or less simultaneously, Graydon Hoare began working on
  26.718 +      an ambitious distributed revision control system that he named
  26.719 +      Monotone. While Monotone addresses many of CVS's design flaws
  26.720 +      and has a peer-to-peer architecture, it goes beyond earlier (and
  26.721 +      subsequent) revision control tools in a number of innovative
  26.722 +      ways.  It uses cryptographic hashes as identifiers, and has an
  26.723 +      integral notion of <quote>trust</quote> for code from different
  26.724 +      sources.</para>
  26.725 +
  26.726 +    <para id="x_cf">Mercurial began life in 2005.  While a few aspects of its
  26.727 +      design are influenced by Monotone, Mercurial focuses on ease of
  26.728 +      use, high performance, and scalability to very large
  26.729 +      projects.</para>
  26.730 +  </sect1>
  26.731 +</chapter>
  26.732 +
  26.733 +<!--
  26.734 +local variables: 
  26.735 +sgml-parent-document: ("00book.xml" "book" "chapter")
  26.736 +end:
  26.737 +-->
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/en/ch02-tour-basic.xml	Sun Aug 16 03:41:39 2009 +0200
    27.3 @@ -0,0 +1,624 @@
    27.4 +\chapter{A tour of Mercurial: the basics}
    27.5 +\label{chap:tour-basic}
    27.6 +
    27.7 +\section{Installing Mercurial on your system}
    27.8 +\label{sec:tour:install}
    27.9 +
   27.10 +Prebuilt binary packages of Mercurial are available for every popular
   27.11 +operating system.  These make it easy to start using Mercurial on your
   27.12 +computer immediately.
   27.13 +
   27.14 +\subsection{Linux}
   27.15 +
   27.16 +Because each Linux distribution has its own packaging tools, policies,
   27.17 +and rate of development, it's difficult to give a comprehensive set of
   27.18 +instructions on how to install Mercurial binaries.  The version of
   27.19 +Mercurial that you will end up with can vary depending on how active
   27.20 +the person is who maintains the package for your distribution.
   27.21 +
   27.22 +To keep things simple, I will focus on installing Mercurial from the
   27.23 +command line under the most popular Linux distributions.  Most of
   27.24 +these distributions provide graphical package managers that will let
   27.25 +you install Mercurial with a single click; the package name to look
   27.26 +for is \texttt{mercurial}.
   27.27 +
   27.28 +\begin{itemize}
   27.29 +\item[Debian]
   27.30 +  \begin{codesample4}
   27.31 +    apt-get install mercurial
   27.32 +  \end{codesample4}
   27.33 +
   27.34 +\item[Fedora Core]
   27.35 +  \begin{codesample4}
   27.36 +    yum install mercurial
   27.37 +  \end{codesample4}
   27.38 +
   27.39 +\item[Gentoo]
   27.40 +  \begin{codesample4}
   27.41 +    emerge mercurial
   27.42 +  \end{codesample4}
   27.43 +
   27.44 +\item[OpenSUSE]
   27.45 +  \begin{codesample4}
   27.46 +    yum install mercurial
   27.47 +  \end{codesample4}
   27.48 +
   27.49 +\item[Ubuntu] Ubuntu's Mercurial package is based on Debian's.  To
   27.50 +  install it, run the following command.
   27.51 +  \begin{codesample4}
   27.52 +    apt-get install mercurial
   27.53 +  \end{codesample4}
   27.54 +  The Ubuntu package for Mercurial tends to lag behind the Debian
   27.55 +  version by a considerable time margin (at the time of writing, seven
   27.56 +  months), which in some cases will mean that on Ubuntu, you may run
   27.57 +  into problems that have since been fixed in the Debian package.
   27.58 +\end{itemize}
   27.59 +
   27.60 +\subsection{Solaris}
   27.61 +
   27.62 +SunFreeWare, at \url{http://www.sunfreeware.com}, is a good source for a
   27.63 +large number of pre-built Solaris packages for 32 and 64 bit Intel and
   27.64 +Sparc architectures, including current versions of Mercurial.
   27.65 +
   27.66 +\subsection{Mac OS X}
   27.67 +
   27.68 +Lee Cantey publishes an installer of Mercurial for Mac OS~X at
   27.69 +\url{http://mercurial.berkwood.com}.  This package works on both
   27.70 +Intel-~and Power-based Macs.  Before you can use it, you must install
   27.71 +a compatible version of Universal MacPython~\cite{web:macpython}.  This
   27.72 +is easy to do; simply follow the instructions on Lee's site.
   27.73 +
   27.74 +It's also possible to install Mercurial using Fink or MacPorts,
   27.75 +two popular free package managers for Mac OS X.  If you have Fink,
   27.76 +use \command{sudo fink install mercurial-py25}.  If MacPorts,
   27.77 +\command{sudo port install mercurial}.
   27.78 +
   27.79 +\subsection{Windows}
   27.80 +
   27.81 +Lee Cantey publishes an installer of Mercurial for Windows at
   27.82 +\url{http://mercurial.berkwood.com}.  This package has no external
   27.83 +dependencies; it ``just works''.
   27.84 +
   27.85 +\begin{note}
   27.86 +  The Windows version of Mercurial does not automatically convert line
   27.87 +  endings between Windows and Unix styles.  If you want to share work
   27.88 +  with Unix users, you must do a little additional configuration
   27.89 +  work. XXX Flesh this out.
   27.90 +\end{note}
   27.91 +
   27.92 +\section{Getting started}
   27.93 +
   27.94 +To begin, we'll use the \hgcmd{version} command to find out whether
   27.95 +Mercurial is actually installed properly.  The actual version
   27.96 +information that it prints isn't so important; it's whether it prints
   27.97 +anything at all that we care about.
   27.98 +\interaction{tour.version}
   27.99 +
  27.100 +\subsection{Built-in help}
  27.101 +
  27.102 +Mercurial provides a built-in help system.  This is invaluable for those
  27.103 +times when you find yourself stuck trying to remember how to run a
  27.104 +command.  If you are completely stuck, simply run \hgcmd{help}; it
  27.105 +will print a brief list of commands, along with a description of what
  27.106 +each does.  If you ask for help on a specific command (as below), it
  27.107 +prints more detailed information.
  27.108 +\interaction{tour.help}
  27.109 +For a more impressive level of detail (which you won't usually need)
  27.110 +run \hgcmdargs{help}{\hggopt{-v}}.  The \hggopt{-v} option is short
  27.111 +for \hggopt{--verbose}, and tells Mercurial to print more information
  27.112 +than it usually would.
  27.113 +
  27.114 +\section{Working with a repository}
  27.115 +
  27.116 +In Mercurial, everything happens inside a \emph{repository}.  The
  27.117 +repository for a project contains all of the files that ``belong to''
  27.118 +that project, along with a historical record of the project's files.
  27.119 +
  27.120 +There's nothing particularly magical about a repository; it is simply
  27.121 +a directory tree in your filesystem that Mercurial treats as special.
  27.122 +You can rename or delete a repository any time you like, using either the
  27.123 +command line or your file browser.
  27.124 +
  27.125 +\subsection{Making a local copy of a repository}
  27.126 +
  27.127 +\emph{Copying} a repository is just a little bit special.  While you
  27.128 +could use a normal file copying command to make a copy of a
  27.129 +repository, it's best to use a built-in command that Mercurial
  27.130 +provides.  This command is called \hgcmd{clone}, because it creates an
  27.131 +identical copy of an existing repository.
  27.132 +\interaction{tour.clone}
  27.133 +If our clone succeeded, we should now have a local directory called
  27.134 +\dirname{hello}.  This directory will contain some files.
  27.135 +\interaction{tour.ls}
  27.136 +These files have the same contents and history in our repository as
  27.137 +they do in the repository we cloned.
  27.138 +
  27.139 +Every Mercurial repository is complete, self-contained, and
  27.140 +independent.  It contains its own private copy of a project's files
  27.141 +and history.  A cloned repository remembers the location of the
  27.142 +repository it was cloned from, but it does not communicate with that
  27.143 +repository, or any other, unless you tell it to.
  27.144 +
  27.145 +What this means for now is that we're free to experiment with our
  27.146 +repository, safe in the knowledge that it's a private ``sandbox'' that
  27.147 +won't affect anyone else.
  27.148 +
  27.149 +\subsection{What's in a repository?}
  27.150 +
  27.151 +When we take a more detailed look inside a repository, we can see that
  27.152 +it contains a directory named \dirname{.hg}.  This is where Mercurial
  27.153 +keeps all of its metadata for the repository.
  27.154 +\interaction{tour.ls-a}
  27.155 +
  27.156 +The contents of the \dirname{.hg} directory and its subdirectories are
  27.157 +private to Mercurial.  Every other file and directory in the
  27.158 +repository is yours to do with as you please.
  27.159 +
  27.160 +To introduce a little terminology, the \dirname{.hg} directory is the
  27.161 +``real'' repository, and all of the files and directories that coexist
  27.162 +with it are said to live in the \emph{working directory}.  An easy way
  27.163 +to remember the distinction is that the \emph{repository} contains the
  27.164 +\emph{history} of your project, while the \emph{working directory}
  27.165 +contains a \emph{snapshot} of your project at a particular point in
  27.166 +history.
  27.167 +
  27.168 +\section{A tour through history}
  27.169 +
  27.170 +One of the first things we might want to do with a new, unfamiliar
  27.171 +repository is understand its history.  The \hgcmd{log} command gives
  27.172 +us a view of history.
  27.173 +\interaction{tour.log}
  27.174 +By default, this command prints a brief paragraph of output for each
  27.175 +change to the project that was recorded.  In Mercurial terminology, we
  27.176 +call each of these recorded events a \emph{changeset}, because it can
  27.177 +contain a record of changes to several files.
  27.178 +
  27.179 +The fields in a record of output from \hgcmd{log} are as follows.
  27.180 +\begin{itemize}
  27.181 +\item[\texttt{changeset}] This field has the format of a number,
  27.182 +  followed by a colon, followed by a hexadecimal string.  These are
  27.183 +  \emph{identifiers} for the changeset.  There are two identifiers
  27.184 +  because the number is shorter and easier to type than the hex
  27.185 +  string.
  27.186 +\item[\texttt{user}] The identity of the person who created the
  27.187 +  changeset.  This is a free-form field, but it most often contains a
  27.188 +  person's name and email address.
  27.189 +\item[\texttt{date}] The date and time on which the changeset was
  27.190 +  created, and the timezone in which it was created.  (The date and
  27.191 +  time are local to that timezone; they display what time and date it
  27.192 +  was for the person who created the changeset.)
  27.193 +\item[\texttt{summary}] The first line of the text message that the
  27.194 +  creator of the changeset entered to describe the changeset.
  27.195 +\end{itemize}
  27.196 +The default output printed by \hgcmd{log} is purely a summary; it is
  27.197 +missing a lot of detail.
  27.198 +
  27.199 +Figure~\ref{fig:tour-basic:history} provides a graphical representation of
  27.200 +the history of the \dirname{hello} repository, to make it a little
  27.201 +easier to see which direction history is ``flowing'' in.  We'll be
  27.202 +returning to this figure several times in this chapter and the chapter
  27.203 +that follows.
  27.204 +
  27.205 +\begin{figure}[ht]
  27.206 +  \centering
  27.207 +  \grafix{tour-history}
  27.208 +  \caption{Graphical history of the \dirname{hello} repository}
  27.209 +  \label{fig:tour-basic:history}
  27.210 +\end{figure}
  27.211 +
  27.212 +\subsection{Changesets, revisions, and talking to other 
  27.213 +  people}
  27.214 +
  27.215 +As English is a notoriously sloppy language, and computer science has
  27.216 +a hallowed history of terminological confusion (why use one term when
  27.217 +four will do?), revision control has a variety of words and phrases
  27.218 +that mean the same thing.  If you are talking about Mercurial history
  27.219 +with other people, you will find that the word ``changeset'' is often
  27.220 +compressed to ``change'' or (when written) ``cset'', and sometimes a
  27.221 +changeset is referred to as a ``revision'' or a ``rev''.
  27.222 +
  27.223 +While it doesn't matter what \emph{word} you use to refer to the
  27.224 +concept of ``a~changeset'', the \emph{identifier} that you use to
  27.225 +refer to ``a~\emph{specific} changeset'' is of great importance.
  27.226 +Recall that the \texttt{changeset} field in the output from
  27.227 +\hgcmd{log} identifies a changeset using both a number and a
  27.228 +hexadecimal string.
  27.229 +\begin{itemize}
  27.230 +\item The revision number is \emph{only valid in that repository},
  27.231 +\item while the hex string is the \emph{permanent, unchanging
  27.232 +    identifier} that will always identify that exact changeset in
  27.233 +  \emph{every} copy of the repository.
  27.234 +\end{itemize}
  27.235 +This distinction is important.  If you send someone an email talking
  27.236 +about ``revision~33'', there's a high likelihood that their
  27.237 +revision~33 will \emph{not be the same} as yours.  The reason for this
  27.238 +is that a revision number depends on the order in which changes
  27.239 +arrived in a repository, and there is no guarantee that the same
  27.240 +changes will happen in the same order in different repositories.
  27.241 +Three changes $a,b,c$ can easily appear in one repository as $0,1,2$,
  27.242 +while in another as $1,0,2$.
  27.243 +
  27.244 +Mercurial uses revision numbers purely as a convenient shorthand.  If
  27.245 +you need to discuss a changeset with someone, or make a record of a
  27.246 +changeset for some other reason (for example, in a bug report), use
  27.247 +the hexadecimal identifier.
  27.248 +
  27.249 +\subsection{Viewing specific revisions}
  27.250 +
  27.251 +To narrow the output of \hgcmd{log} down to a single revision, use the
  27.252 +\hgopt{log}{-r} (or \hgopt{log}{--rev}) option.  You can use either a
  27.253 +revision number or a long-form changeset identifier, and you can
  27.254 +provide as many revisions as you want.  \interaction{tour.log-r}
  27.255 +
  27.256 +If you want to see the history of several revisions without having to
  27.257 +list each one, you can use \emph{range notation}; this lets you
  27.258 +express the idea ``I want all revisions between $a$ and $b$,
  27.259 +inclusive''.
  27.260 +\interaction{tour.log.range}
  27.261 +Mercurial also honours the order in which you specify revisions, so
  27.262 +\hgcmdargs{log}{-r 2:4} prints $2,3,4$ while \hgcmdargs{log}{-r 4:2}
  27.263 +prints $4,3,2$.
  27.264 +
  27.265 +\subsection{More detailed information}
  27.266 +
  27.267 +While the summary information printed by \hgcmd{log} is useful if you
  27.268 +already know what you're looking for, you may need to see a complete
  27.269 +description of the change, or a list of the files changed, if you're
  27.270 +trying to decide whether a changeset is the one you're looking for.
  27.271 +The \hgcmd{log} command's \hggopt{-v} (or \hggopt{--verbose})
  27.272 +option gives you this extra detail.
  27.273 +\interaction{tour.log-v}
  27.274 +
  27.275 +If you want to see both the description and content of a change, add
  27.276 +the \hgopt{log}{-p} (or \hgopt{log}{--patch}) option.  This displays
  27.277 +the content of a change as a \emph{unified diff} (if you've never seen
  27.278 +a unified diff before, see section~\ref{sec:mq:patch} for an overview).
  27.279 +\interaction{tour.log-vp}
  27.280 +
  27.281 +\section{All about command options}
  27.282 +
  27.283 +Let's take a brief break from exploring Mercurial commands to discuss
  27.284 +a pattern in the way that they work; you may find this useful to keep
  27.285 +in mind as we continue our tour.
  27.286 +
  27.287 +Mercurial has a consistent and straightforward approach to dealing
  27.288 +with the options that you can pass to commands.  It follows the
  27.289 +conventions for options that are common to modern Linux and Unix
  27.290 +systems.
  27.291 +\begin{itemize}
  27.292 +\item Every option has a long name.  For example, as we've already
  27.293 +  seen, the \hgcmd{log} command accepts a \hgopt{log}{--rev} option.
  27.294 +\item Most options have short names, too.  Instead of
  27.295 +  \hgopt{log}{--rev}, we can use \hgopt{log}{-r}.  (The reason that
  27.296 +  some options don't have short names is that the options in question
  27.297 +  are rarely used.)
  27.298 +\item Long options start with two dashes (e.g.~\hgopt{log}{--rev}),
  27.299 +  while short options start with one (e.g.~\hgopt{log}{-r}).
  27.300 +\item Option naming and usage is consistent across commands.  For
  27.301 +  example, every command that lets you specify a changeset~ID or
  27.302 +  revision number accepts both \hgopt{log}{-r} and \hgopt{log}{--rev}
  27.303 +  arguments.
  27.304 +\end{itemize}
  27.305 +In the examples throughout this book, I use short options instead of
  27.306 +long.  This just reflects my own preference, so don't read anything
  27.307 +significant into it.
  27.308 +
  27.309 +Most commands that print output of some kind will print more output
  27.310 +when passed a \hggopt{-v} (or \hggopt{--verbose}) option, and less
  27.311 +when passed \hggopt{-q} (or \hggopt{--quiet}).
  27.312 +
  27.313 +\section{Making and reviewing changes}
  27.314 +
  27.315 +Now that we have a grasp of viewing history in Mercurial, let's take a
  27.316 +look at making some changes and examining them.
  27.317 +
  27.318 +The first thing we'll do is isolate our experiment in a repository of
  27.319 +its own.  We use the \hgcmd{clone} command, but we don't need to
  27.320 +clone a copy of the remote repository.  Since we already have a copy
  27.321 +of it locally, we can just clone that instead.  This is much faster
  27.322 +than cloning over the network, and cloning a local repository uses
  27.323 +less disk space in most cases, too.
  27.324 +\interaction{tour.reclone}
  27.325 +As an aside, it's often good practice to keep a ``pristine'' copy of a
  27.326 +remote repository around, which you can then make temporary clones of
  27.327 +to create sandboxes for each task you want to work on.  This lets you
  27.328 +work on multiple tasks in parallel, each isolated from the others
  27.329 +until it's complete and you're ready to integrate it back.  Because
  27.330 +local clones are so cheap, there's almost no overhead to cloning and
  27.331 +destroying repositories whenever you want.
  27.332 +
  27.333 +In our \dirname{my-hello} repository, we have a file
  27.334 +\filename{hello.c} that contains the classic ``hello, world'' program.
  27.335 +Let's use the ancient and venerable \command{sed} command to edit this
  27.336 +file so that it prints a second line of output.  (I'm only using
  27.337 +\command{sed} to do this because it's easy to write a scripted example
  27.338 +this way.  Since you're not under the same constraint, you probably
  27.339 +won't want to use \command{sed}; simply use your preferred text editor to
  27.340 +do the same thing.)
  27.341 +\interaction{tour.sed}
  27.342 +
  27.343 +Mercurial's \hgcmd{status} command will tell us what Mercurial knows
  27.344 +about the files in the repository.
  27.345 +\interaction{tour.status}
  27.346 +The \hgcmd{status} command prints no output for some files, but a line
  27.347 +starting with ``\texttt{M}'' for \filename{hello.c}.  Unless you tell
  27.348 +it to, \hgcmd{status} will not print any output for files that have
  27.349 +not been modified.  
  27.350 +
  27.351 +The ``\texttt{M}'' indicates that Mercurial has noticed that we
  27.352 +modified \filename{hello.c}.  We didn't need to \emph{inform}
  27.353 +Mercurial that we were going to modify the file before we started, or
  27.354 +that we had modified the file after we were done; it was able to
  27.355 +figure this out itself.
  27.356 +
  27.357 +It's a little bit helpful to know that we've modified
  27.358 +\filename{hello.c}, but we might prefer to know exactly \emph{what}
  27.359 +changes we've made to it.  To do this, we use the \hgcmd{diff}
  27.360 +command.
  27.361 +\interaction{tour.diff}
  27.362 +
  27.363 +\section{Recording changes in a new changeset}
  27.364 +
  27.365 +We can modify files, build and test our changes, and use
  27.366 +\hgcmd{status} and \hgcmd{diff} to review our changes, until we're
  27.367 +satisfied with what we've done and arrive at a natural stopping point
  27.368 +where we want to record our work in a new changeset.
  27.369 +
  27.370 +The \hgcmd{commit} command lets us create a new changeset; we'll
  27.371 +usually refer to this as ``making a commit'' or ``committing''.  
  27.372 +
  27.373 +\subsection{Setting up a username}
  27.374 +
  27.375 +When you try to run \hgcmd{commit} for the first time, it is not
  27.376 +guaranteed to succeed.  Mercurial records your name and address with
  27.377 +each change that you commit, so that you and others will later be able
  27.378 +to tell who made each change.  Mercurial tries to automatically figure
  27.379 +out a sensible username to commit the change with.  It will attempt
  27.380 +each of the following methods, in order:
  27.381 +\begin{enumerate}
  27.382 +\item If you specify a \hgopt{commit}{-u} option to the \hgcmd{commit}
  27.383 +  command on the command line, followed by a username, this is always
  27.384 +  given the highest precedence.
  27.385 +\item If you have set the \envar{HGUSER} environment variable, this is
  27.386 +  checked next.
  27.387 +\item If you create a file in your home directory called
  27.388 +  \sfilename{.hgrc}, with a \rcitem{ui}{username} entry, that will be
  27.389 +  used next.  To see what the contents of this file should look like,
  27.390 +  refer to section~\ref{sec:tour-basic:username} below.
  27.391 +\item If you have set the \envar{EMAIL} environment variable, this
  27.392 +  will be used next.
  27.393 +\item Mercurial will query your system to find out your local user
  27.394 +  name and host name, and construct a username from these components.
  27.395 +  Since this often results in a username that is not very useful, it
  27.396 +  will print a warning if it has to do this.
  27.397 +\end{enumerate}
  27.398 +If all of these mechanisms fail, Mercurial will fail, printing an
  27.399 +error message.  In this case, it will not let you commit until you set
  27.400 +up a username.
  27.401 +
  27.402 +You should think of the \envar{HGUSER} environment variable and the
  27.403 +\hgopt{commit}{-u} option to the \hgcmd{commit} command as ways to
  27.404 +\emph{override} Mercurial's default selection of username.  For normal
  27.405 +use, the simplest and most robust way to set a username for yourself
  27.406 +is by creating a \sfilename{.hgrc} file; see below for details.
  27.407 +
  27.408 +\subsubsection{Creating a Mercurial configuration file}
  27.409 +\label{sec:tour-basic:username}
  27.410 +
  27.411 +To set a user name, use your favourite editor to create a file called
  27.412 +\sfilename{.hgrc} in your home directory.  Mercurial will use this
  27.413 +file to look up your personalised configuration settings.  The initial
  27.414 +contents of your \sfilename{.hgrc} should look like this.
  27.415 +\begin{codesample2}
  27.416 +  # This is a Mercurial configuration file.
  27.417 +  [ui]
  27.418 +  username = Firstname Lastname <email.address@domain.net>
  27.419 +\end{codesample2}
  27.420 +The ``\texttt{[ui]}'' line begins a \emph{section} of the config file,
  27.421 +so you can read the ``\texttt{username = ...}'' line as meaning ``set
  27.422 +the value of the \texttt{username} item in the \texttt{ui} section''.
  27.423 +A section continues until a new section begins, or the end of the
  27.424 +file.  Mercurial ignores empty lines and treats any text from
  27.425 +``\texttt{\#}'' to the end of a line as a comment.
  27.426 +
  27.427 +\subsubsection{Choosing a user name}
  27.428 +
  27.429 +You can use any text you like as the value of the \texttt{username}
  27.430 +config item, since this information is for reading by other people,
  27.431 +but for interpreting by Mercurial.  The convention that most people
  27.432 +follow is to use their name and email address, as in the example
  27.433 +above.
  27.434 +
  27.435 +\begin{note}
  27.436 +  Mercurial's built-in web server obfuscates email addresses, to make
  27.437 +  it more difficult for the email harvesting tools that spammers use.
  27.438 +  This reduces the likelihood that you'll start receiving more junk
  27.439 +  email if you publish a Mercurial repository on the web.
  27.440 +\end{note}
  27.441 +
  27.442 +\subsection{Writing a commit message}
  27.443 +
  27.444 +When we commit a change, Mercurial drops us into a text editor, to
  27.445 +enter a message that will describe the modifications we've made in
  27.446 +this changeset.  This is called the \emph{commit message}.  It will be
  27.447 +a record for readers of what we did and why, and it will be printed by
  27.448 +\hgcmd{log} after we've finished committing.
  27.449 +\interaction{tour.commit}
  27.450 +
  27.451 +The editor that the \hgcmd{commit} command drops us into will contain
  27.452 +an empty line, followed by a number of lines starting with
  27.453 +``\texttt{HG:}''.
  27.454 +\begin{codesample2}
  27.455 +  \emph{empty line}
  27.456 +  HG: changed hello.c
  27.457 +\end{codesample2}
  27.458 +Mercurial ignores the lines that start with ``\texttt{HG:}''; it uses
  27.459 +them only to tell us which files it's recording changes to.  Modifying
  27.460 +or deleting these lines has no effect.
  27.461 +
  27.462 +\subsection{Writing a good commit message}
  27.463 +
  27.464 +Since \hgcmd{log} only prints the first line of a commit message by
  27.465 +default, it's best to write a commit message whose first line stands
  27.466 +alone.  Here's a real example of a commit message that \emph{doesn't}
  27.467 +follow this guideline, and hence has a summary that is not readable.
  27.468 +\begin{codesample2}
  27.469 +  changeset:   73:584af0e231be
  27.470 +  user:        Censored Person <censored.person@example.org>
  27.471 +  date:        Tue Sep 26 21:37:07 2006 -0700
  27.472 +  summary:     include buildmeister/commondefs.   Add an exports and install
  27.473 +\end{codesample2}
  27.474 +
  27.475 +As far as the remainder of the contents of the commit message are
  27.476 +concerned, there are no hard-and-fast rules.  Mercurial itself doesn't
  27.477 +interpret or care about the contents of the commit message, though
  27.478 +your project may have policies that dictate a certain kind of
  27.479 +formatting.
  27.480 +
  27.481 +My personal preference is for short, but informative, commit messages
  27.482 +that tell me something that I can't figure out with a quick glance at
  27.483 +the output of \hgcmdargs{log}{--patch}.
  27.484 +
  27.485 +\subsection{Aborting a commit}
  27.486 +
  27.487 +If you decide that you don't want to commit while in the middle of
  27.488 +editing a commit message, simply exit from your editor without saving
  27.489 +the file that it's editing.  This will cause nothing to happen to
  27.490 +either the repository or the working directory.
  27.491 +
  27.492 +If we run the \hgcmd{commit} command without any arguments, it records
  27.493 +all of the changes we've made, as reported by \hgcmd{status} and
  27.494 +\hgcmd{diff}.
  27.495 +
  27.496 +\subsection{Admiring our new handiwork}
  27.497 +
  27.498 +Once we've finished the commit, we can use the \hgcmd{tip} command to
  27.499 +display the changeset we just created.  This command produces output
  27.500 +that is identical to \hgcmd{log}, but it only displays the newest
  27.501 +revision in the repository.
  27.502 +\interaction{tour.tip}
  27.503 +We refer to the newest revision in the repository as the tip revision,
  27.504 +or simply the tip.
  27.505 +
  27.506 +\section{Sharing changes}
  27.507 +
  27.508 +We mentioned earlier that repositories in Mercurial are
  27.509 +self-contained.  This means that the changeset we just created exists
  27.510 +only in our \dirname{my-hello} repository.  Let's look at a few ways
  27.511 +that we can propagate this change into other repositories.
  27.512 +
  27.513 +\subsection{Pulling changes from another repository}
  27.514 +\label{sec:tour:pull}
  27.515 +
  27.516 +To get started, let's clone our original \dirname{hello} repository,
  27.517 +which does not contain the change we just committed.  We'll call our
  27.518 +temporary repository \dirname{hello-pull}.
  27.519 +\interaction{tour.clone-pull}
  27.520 +
  27.521 +We'll use the \hgcmd{pull} command to bring changes from
  27.522 +\dirname{my-hello} into \dirname{hello-pull}.  However, blindly
  27.523 +pulling unknown changes into a repository is a somewhat scary
  27.524 +prospect.  Mercurial provides the \hgcmd{incoming} command to tell us
  27.525 +what changes the \hgcmd{pull} command \emph{would} pull into the
  27.526 +repository, without actually pulling the changes in.
  27.527 +\interaction{tour.incoming}
  27.528 +(Of course, someone could cause more changesets to appear in the
  27.529 +repository that we ran \hgcmd{incoming} in, before we get a chance to
  27.530 +\hgcmd{pull} the changes, so that we could end up pulling changes that we
  27.531 +didn't expect.)
  27.532 +
  27.533 +Bringing changes into a repository is a simple matter of running the
  27.534 +\hgcmd{pull} command, and telling it which repository to pull from.
  27.535 +\interaction{tour.pull}
  27.536 +As you can see from the before-and-after output of \hgcmd{tip}, we
  27.537 +have successfully pulled changes into our repository.  There remains
  27.538 +one step before we can see these changes in the working directory.
  27.539 +
  27.540 +\subsection{Updating the working directory}
  27.541 +
  27.542 +We have so far glossed over the relationship between a repository and
  27.543 +its working directory.  The \hgcmd{pull} command that we ran in
  27.544 +section~\ref{sec:tour:pull} brought changes into the repository, but
  27.545 +if we check, there's no sign of those changes in the working
  27.546 +directory.  This is because \hgcmd{pull} does not (by default) touch
  27.547 +the working directory.  Instead, we use the \hgcmd{update} command to
  27.548 +do this.
  27.549 +\interaction{tour.update}
  27.550 +
  27.551 +It might seem a bit strange that \hgcmd{pull} doesn't update the
  27.552 +working directory automatically.  There's actually a good reason for
  27.553 +this: you can use \hgcmd{update} to update the working directory to
  27.554 +the state it was in at \emph{any revision} in the history of the
  27.555 +repository.  If you had the working directory updated to an old
  27.556 +revision---to hunt down the origin of a bug, say---and ran a
  27.557 +\hgcmd{pull} which automatically updated the working directory to a
  27.558 +new revision, you might not be terribly happy.
  27.559 +
  27.560 +However, since pull-then-update is such a common thing to do,
  27.561 +Mercurial lets you combine the two by passing the \hgopt{pull}{-u}
  27.562 +option to \hgcmd{pull}.
  27.563 +\begin{codesample2}
  27.564 +  hg pull -u
  27.565 +\end{codesample2}
  27.566 +If you look back at the output of \hgcmd{pull} in
  27.567 +section~\ref{sec:tour:pull} when we ran it without \hgopt{pull}{-u},
  27.568 +you can see that it printed a helpful reminder that we'd have to take
  27.569 +an explicit step to update the working directory:
  27.570 +\begin{codesample2}
  27.571 +  (run 'hg update' to get a working copy)
  27.572 +\end{codesample2}
  27.573 +
  27.574 +To find out what revision the working directory is at, use the
  27.575 +\hgcmd{parents} command.
  27.576 +\interaction{tour.parents}
  27.577 +If you look back at figure~\ref{fig:tour-basic:history}, you'll see
  27.578 +arrows connecting each changeset.  The node that the arrow leads
  27.579 +\emph{from} in each case is a parent, and the node that the arrow
  27.580 +leads \emph{to} is its child.  The working directory has a parent in
  27.581 +just the same way; this is the changeset that the working directory
  27.582 +currently contains.
  27.583 +
  27.584 +To update the working directory to a particular revision, give a
  27.585 +revision number or changeset~ID to the \hgcmd{update} command.
  27.586 +\interaction{tour.older}
  27.587 +If you omit an explicit revision, \hgcmd{update} will update to the
  27.588 +tip revision, as shown by the second call to \hgcmd{update} in the
  27.589 +example above.
  27.590 +
  27.591 +\subsection{Pushing changes to another repository}
  27.592 +
  27.593 +Mercurial lets us push changes to another repository, from the
  27.594 +repository we're currently visiting.  As with the example of
  27.595 +\hgcmd{pull} above, we'll create a temporary repository to push our
  27.596 +changes into.
  27.597 +\interaction{tour.clone-push}
  27.598 +The \hgcmd{outgoing} command tells us what changes would be pushed
  27.599 +into another repository.
  27.600 +\interaction{tour.outgoing}
  27.601 +And the \hgcmd{push} command does the actual push.
  27.602 +\interaction{tour.push}
  27.603 +As with \hgcmd{pull}, the \hgcmd{push} command does not update the
  27.604 +working directory in the repository that it's pushing changes into.
  27.605 +(Unlike \hgcmd{pull}, \hgcmd{push} does not provide a \texttt{-u}
  27.606 +option that updates the other repository's working directory.)
  27.607 +
  27.608 +What happens if we try to pull or push changes and the receiving
  27.609 +repository already has those changes?  Nothing too exciting.
  27.610 +\interaction{tour.push.nothing}
  27.611 +
  27.612 +\subsection{Sharing changes over a network}
  27.613 +
  27.614 +The commands we have covered in the previous few sections are not
  27.615 +limited to working with local repositories.  Each works in exactly the
  27.616 +same fashion over a network connection; simply pass in a URL instead
  27.617 +of a local path.
  27.618 +\interaction{tour.outgoing.net}
  27.619 +In this example, we can see what changes we could push to the remote
  27.620 +repository, but the repository is understandably not set up to let
  27.621 +anonymous users push to it.
  27.622 +\interaction{tour.push.net}
  27.623 +
  27.624 +%%% Local Variables: 
  27.625 +%%% mode: latex
  27.626 +%%% TeX-master: "00book"
  27.627 +%%% End: 
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/en/ch03-tour-merge.xml	Sun Aug 16 03:41:39 2009 +0200
    28.3 @@ -0,0 +1,454 @@
    28.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    28.5 +
    28.6 +<chapter id="chap:tour-merge">
    28.7 +  <?dbhtml filename="a-tour-of-mercurial-merging-work.html"?>
    28.8 +  <title>A tour of Mercurial: merging work</title>
    28.9 +
   28.10 +  <para id="x_338">We've now covered cloning a repository, making changes in a
   28.11 +    repository, and pulling or pushing changes from one repository
   28.12 +    into another.  Our next step is <emphasis>merging</emphasis>
   28.13 +    changes from separate repositories.</para>
   28.14 +
   28.15 +  <sect1>
   28.16 +    <title>Merging streams of work</title>
   28.17 +
   28.18 +    <para id="x_339">Merging is a fundamental part of working with a distributed
   28.19 +      revision control tool.  Here are a few cases in which the need
   28.20 +      to merge work arises.</para>
   28.21 +    <itemizedlist>
   28.22 +      <listitem>
   28.23 +	<para id="x_33a">Alice and Bob each have a personal copy of a
   28.24 +	  repository for a project they're collaborating on.  Alice
   28.25 +	  fixes a bug in her repository; Bob adds a new feature in
   28.26 +	  his.  They want the shared repository to contain both the
   28.27 +	  bug fix and the new feature.</para>
   28.28 +      </listitem>
   28.29 +      <listitem>
   28.30 +	<para id="x_33b">Cynthia frequently works on several different
   28.31 +	  tasks for a single project at once, each safely isolated in
   28.32 +	  its own repository. Working this way means that she often
   28.33 +	  needs to merge one piece of her own work with
   28.34 +	  another.</para>
   28.35 +      </listitem>
   28.36 +    </itemizedlist>
   28.37 +
   28.38 +    <para id="x_33c">Because we need to merge often, Mercurial makes
   28.39 +      the process easy.  Let's walk through a merge.  We'll begin by
   28.40 +      cloning yet another repository (see how often they spring up?)
   28.41 +      and making a change in it.</para>
   28.42 +
   28.43 +    &interaction.tour.merge.clone;
   28.44 +
   28.45 +    <para id="x_33d">We should now have two copies of
   28.46 +      <filename>hello.c</filename> with different contents.  The
   28.47 +      histories of the two repositories have also diverged, as
   28.48 +      illustrated in <xref
   28.49 +	linkend="fig:tour-merge:sep-repos"/>.  Here is a copy of our
   28.50 +      file from one repository.</para>
   28.51 +
   28.52 +    &interaction.tour.merge.cat1;
   28.53 +
   28.54 +    <para id="x_722">And here is our slightly different version from the other
   28.55 +      repository.</para>
   28.56 +
   28.57 +    &interaction.tour.merge.cat2;
   28.58 +
   28.59 +    <figure id="fig:tour-merge:sep-repos">
   28.60 +      <title>Divergent recent histories of the <filename
   28.61 +	  class="directory">my-hello</filename> and <filename
   28.62 +	  class="directory">my-new-hello</filename>
   28.63 +	repositories</title>
   28.64 +      <mediaobject>
   28.65 +	<imageobject><imagedata fileref="figs/tour-merge-sep-repos.png"/></imageobject>
   28.66 +	<textobject><phrase>XXX add text</phrase></textobject>
   28.67 +      </mediaobject>
   28.68 +    </figure>
   28.69 +
   28.70 +    <para id="x_33f">We already know that pulling changes from our <filename
   28.71 +	class="directory">my-hello</filename> repository will have no
   28.72 +      effect on the working directory.</para>
   28.73 +
   28.74 +    &interaction.tour.merge.pull;
   28.75 +
   28.76 +    <para id="x_340">However, the <command role="hg-cmd">hg pull</command>
   28.77 +      command says something about <quote>heads</quote>.</para>
   28.78 +
   28.79 +    <sect2>
   28.80 +      <title>Head changesets</title>
   28.81 +
   28.82 +      <para id="x_341">Remember that Mercurial records what the parent
   28.83 +	of each change is.  If a change has a parent, we call it a
   28.84 +	child or descendant of the parent.  A head is a change that
   28.85 +	has no children.  The tip revision is thus a head, because the
   28.86 +	newest revision in a repository doesn't have any children.
   28.87 +	There are times when a repository can contain more than one
   28.88 +	head.</para>
   28.89 +
   28.90 +      <figure id="fig:tour-merge:pull">
   28.91 +	<title>Repository contents after pulling from <filename
   28.92 +	    class="directory">my-hello</filename> into <filename
   28.93 +	    class="directory">my-new-hello</filename></title>
   28.94 +	<mediaobject>
   28.95 +	  <imageobject>
   28.96 +	    <imagedata fileref="figs/tour-merge-pull.png"/>
   28.97 +	  </imageobject>
   28.98 +	  <textobject><phrase>XXX add text</phrase></textobject>
   28.99 +	</mediaobject>
  28.100 +      </figure>
  28.101 +
  28.102 +      <para id="x_343">In <xref linkend="fig:tour-merge:pull"/>, you can
  28.103 +	see the effect of the pull from <filename
  28.104 +	  class="directory">my-hello</filename> into <filename
  28.105 +	  class="directory">my-new-hello</filename>.  The history that
  28.106 +	was already present in <filename
  28.107 +	  class="directory">my-new-hello</filename> is untouched, but
  28.108 +	a new revision has been added.  By referring to <xref
  28.109 +	  linkend="fig:tour-merge:sep-repos"/>, we can see that the
  28.110 +	<emphasis>changeset ID</emphasis> remains the same in the new
  28.111 +	repository, but the <emphasis>revision number</emphasis> has
  28.112 +	changed.  (This, incidentally, is a fine example of why it's
  28.113 +	not safe to use revision numbers when discussing changesets.)
  28.114 +	We can view the heads in a repository using the <command
  28.115 +	  role="hg-cmd">hg heads</command> command.</para>
  28.116 +
  28.117 +      &interaction.tour.merge.heads;
  28.118 +    </sect2>
  28.119 +
  28.120 +    <sect2>
  28.121 +      <title>Performing the merge</title>
  28.122 +
  28.123 +      <para id="x_344">What happens if we try to use the normal <command
  28.124 +	  role="hg-cmd">hg update</command> command to update to the
  28.125 +	new tip?</para>
  28.126 +
  28.127 +      &interaction.tour.merge.update;
  28.128 +
  28.129 +      <para id="x_345">Mercurial is telling us that the <command
  28.130 +	  role="hg-cmd">hg update</command> command won't do a merge;
  28.131 +	it won't update the working directory when it thinks we might
  28.132 +	want to do a merge, unless we force it to do so.
  28.133 +	(Incidentally, forcing the update with <command>hg update
  28.134 +	  -C</command> would revert any uncommitted changes in the
  28.135 +	working directory.)</para>
  28.136 +
  28.137 +      <para id="x_723">To start a merge between the two heads, we use the
  28.138 +	<command role="hg-cmd">hg merge</command> command.</para>
  28.139 +
  28.140 +      &interaction.tour.merge.merge;
  28.141 +
  28.142 +      <para id="x_347">We resolve the contents of <filename>hello.c</filename>
  28.143 +
  28.144 +This updates the working directory so that it
  28.145 +	contains changes from <emphasis>both</emphasis> heads, which
  28.146 +	is reflected in both the output of <command role="hg-cmd">hg
  28.147 +	  parents</command> and the contents of
  28.148 +	<filename>hello.c</filename>.</para>
  28.149 +
  28.150 +      &interaction.tour.merge.parents;
  28.151 +    </sect2>
  28.152 +
  28.153 +    <sect2>
  28.154 +      <title>Committing the results of the merge</title>
  28.155 +
  28.156 +      <para id="x_348">Whenever we've done a merge, <command role="hg-cmd">hg
  28.157 +	  parents</command> will display two parents until we <command
  28.158 +	  role="hg-cmd">hg commit</command> the results of the
  28.159 +	  merge.</para>
  28.160 +
  28.161 +	&interaction.tour.merge.commit;
  28.162 +
  28.163 +      <para id="x_349">We now have a new tip revision; notice that it has
  28.164 +	<emphasis>both</emphasis> of our former heads as its parents.
  28.165 +	These are the same revisions that were previously displayed by
  28.166 +	<command role="hg-cmd">hg parents</command>.</para>
  28.167 +
  28.168 +      &interaction.tour.merge.tip;
  28.169 +
  28.170 +      <para id="x_34a">In <xref
  28.171 +	  linkend="fig:tour-merge:merge"/>, you can see a
  28.172 +	representation of what happens to the working directory during
  28.173 +	the merge, and how this affects the repository when the commit
  28.174 +	happens.  During the merge, the working directory has two
  28.175 +	parent changesets, and these become the parents of the new
  28.176 +	changeset.</para>
  28.177 +
  28.178 +      <figure id="fig:tour-merge:merge">
  28.179 +	<title>Working directory and repository during merge, and
  28.180 +	  following commit</title>
  28.181 +	<mediaobject>
  28.182 +	  <imageobject>
  28.183 +	    <imagedata fileref="figs/tour-merge-merge.png"/>
  28.184 +	  </imageobject>
  28.185 +	  <textobject><phrase>XXX add text</phrase></textobject>
  28.186 +	</mediaobject>
  28.187 +      </figure>
  28.188 +
  28.189 +      <para id="x_69c">We sometimes talk about a merge having
  28.190 +	<emphasis>sides</emphasis>: the left side is the first parent
  28.191 +	in the output of <command role="hg-cmd">hg parents</command>,
  28.192 +	and the right side is the second.  If the working directory
  28.193 +	was at e.g. revision 5 before we began a merge, that revision
  28.194 +	will become the left side of the merge.</para>
  28.195 +    </sect2>
  28.196 +  </sect1>
  28.197 +
  28.198 +  <sect1>
  28.199 +    <title>Merging conflicting changes</title>
  28.200 +
  28.201 +    <para id="x_34b">Most merges are simple affairs, but sometimes you'll find
  28.202 +      yourself merging changes where each side modifies the same portions
  28.203 +      of the same files.  Unless both modifications are identical,
  28.204 +      this results in a <emphasis>conflict</emphasis>, where you have
  28.205 +      to decide how to reconcile the different changes into something
  28.206 +      coherent.</para>
  28.207 +
  28.208 +    <figure id="fig:tour-merge:conflict">
  28.209 +      <title>Conflicting changes to a document</title>
  28.210 +      <mediaobject>
  28.211 +	<imageobject><imagedata fileref="figs/tour-merge-conflict.png"/></imageobject>
  28.212 +	<textobject><phrase>XXX add text</phrase></textobject>
  28.213 +      </mediaobject>
  28.214 +    </figure>
  28.215 +
  28.216 +    <para id="x_34d"><xref linkend="fig:tour-merge:conflict"/> illustrates
  28.217 +      an instance of two conflicting changes to a document.  We
  28.218 +      started with a single version of the file; then we made some
  28.219 +      changes; while someone else made different changes to the same
  28.220 +      text.  Our task in resolving the conflicting changes is to
  28.221 +      decide what the file should look like.</para>
  28.222 +
  28.223 +    <para id="x_34e">Mercurial doesn't have a built-in facility for handling
  28.224 +      conflicts. Instead, it runs an external program, usually one
  28.225 +      that displays some kind of graphical conflict resolution
  28.226 +      interface.  By default, Mercurial tries to find one of several
  28.227 +      different merging tools that are likely to be installed on your
  28.228 +      system.  It first tries a few fully automatic merging tools; if
  28.229 +      these don't succeed (because the resolution process requires
  28.230 +      human guidance) or aren't present, it tries a few
  28.231 +      different graphical merging tools.</para>
  28.232 +
  28.233 +    <para id="x_34f">It's also possible to get Mercurial to run a
  28.234 +      specific program or script, by setting the
  28.235 +      <envar>HGMERGE</envar> environment variable to the name of your
  28.236 +      preferred program.</para>
  28.237 +
  28.238 +    <sect2>
  28.239 +      <title>Using a graphical merge tool</title>
  28.240 +
  28.241 +      <para id="x_350">My preferred graphical merge tool is
  28.242 +	<command>kdiff3</command>, which I'll use to describe the
  28.243 +	features that are common to graphical file merging tools.  You
  28.244 +	can see a screenshot of <command>kdiff3</command> in action in
  28.245 +	<xref linkend="fig:tour-merge:kdiff3"/>.  The kind of
  28.246 +	merge it is performing is called a <emphasis>three-way
  28.247 +	  merge</emphasis>, because there are three different versions
  28.248 +	of the file of interest to us.  The tool thus splits the upper
  28.249 +	portion of the window into three panes:</para>
  28.250 +      <itemizedlist>
  28.251 +	<listitem><para id="x_351">At the left is the <emphasis>base</emphasis>
  28.252 +	    version of the file, i.e. the most recent version from
  28.253 +	    which the two versions we're trying to merge are
  28.254 +	    descended.</para>
  28.255 +	</listitem>
  28.256 +	<listitem><para id="x_352">In the middle is <quote>our</quote> version of
  28.257 +	    the file, with the contents that we modified.</para>
  28.258 +	</listitem>
  28.259 +	<listitem><para id="x_353">On the right is <quote>their</quote> version
  28.260 +	    of the file, the one that from the changeset that we're
  28.261 +	    trying to merge with.</para>
  28.262 +	</listitem></itemizedlist>
  28.263 +      <para id="x_354">In the pane below these is the current
  28.264 +	<emphasis>result</emphasis> of the merge. Our task is to
  28.265 +	replace all of the red text, which indicates unresolved
  28.266 +	conflicts, with some sensible merger of the
  28.267 +	<quote>ours</quote> and <quote>theirs</quote> versions of the
  28.268 +	file.</para>
  28.269 +
  28.270 +      <para id="x_355">All four of these panes are <emphasis>locked
  28.271 +	  together</emphasis>; if we scroll vertically or horizontally
  28.272 +	in any of them, the others are updated to display the
  28.273 +	corresponding sections of their respective files.</para>
  28.274 +
  28.275 +      <figure id="fig:tour-merge:kdiff3">
  28.276 +	<title>Using <command>kdiff3</command> to merge versions of a
  28.277 +	  file</title>
  28.278 +	<mediaobject>
  28.279 +	  <imageobject>
  28.280 +	    <imagedata width="100%" fileref="figs/kdiff3.png"/></imageobject>
  28.281 +	  <textobject>
  28.282 +	    <phrase>XXX add text</phrase>
  28.283 +	  </textobject>
  28.284 +	</mediaobject>
  28.285 +      </figure>
  28.286 +
  28.287 +      <para id="x_357">For each conflicting portion of the file, we can choose to
  28.288 +	resolve the conflict using some combination of text from the
  28.289 +	base version, ours, or theirs.  We can also manually edit the
  28.290 +	merged file at any time, in case we need to make further
  28.291 +	modifications.</para>
  28.292 +
  28.293 +      <para id="x_358">There are <emphasis>many</emphasis> file merging tools
  28.294 +	available, too many to cover here.  They vary in which
  28.295 +	platforms they are available for, and in their particular
  28.296 +	strengths and weaknesses.  Most are tuned for merging files
  28.297 +	containing plain text, while a few are aimed at specialised
  28.298 +	file formats (generally XML).</para>
  28.299 +    </sect2>
  28.300 +
  28.301 +    <sect2>
  28.302 +      <title>A worked example</title>
  28.303 +
  28.304 +      <para id="x_359">In this example, we will reproduce the file modification
  28.305 +	history of <xref linkend="fig:tour-merge:conflict"/>
  28.306 +	above.  Let's begin by creating a repository with a base
  28.307 +	version of our document.</para>
  28.308 +
  28.309 +      &interaction.tour-merge-conflict.wife;
  28.310 +
  28.311 +      <para id="x_35a">We'll clone the repository and make a change to the
  28.312 +	file.</para>
  28.313 +
  28.314 +      &interaction.tour-merge-conflict.cousin;
  28.315 +
  28.316 +      <para id="x_35b">And another clone, to simulate someone else making a
  28.317 +	change to the file. (This hints at the idea that it's not all
  28.318 +	that unusual to merge with yourself when you isolate tasks in
  28.319 +	separate repositories, and indeed to find and resolve
  28.320 +	conflicts while doing so.)</para>
  28.321 +
  28.322 +      &interaction.tour-merge-conflict.son;
  28.323 +
  28.324 +      <para id="x_35c">Having created two
  28.325 +	different versions of the file, we'll set up an environment
  28.326 +	suitable for running our merge.</para>
  28.327 +
  28.328 +      &interaction.tour-merge-conflict.pull;
  28.329 +
  28.330 +      <para id="x_35d">In this example, I'll set
  28.331 +	<envar>HGMERGE</envar> to tell Mercurial to use the
  28.332 +	non-interactive <command>merge</command> command.  This is
  28.333 +	bundled with many Unix-like systems. (If you're following this
  28.334 +	example on your computer, don't bother setting
  28.335 +	<envar>HGMERGE</envar>.  You'll get dropped into a GUI file
  28.336 +	merge tool instead, which is much preferable.)</para>
  28.337 +
  28.338 +      &interaction.tour-merge-conflict.merge;
  28.339 +
  28.340 +      <para id="x_35f">Because <command>merge</command> can't resolve the
  28.341 +	conflicting changes, it leaves <emphasis>merge
  28.342 +	  markers</emphasis> inside the file that has conflicts,
  28.343 +	indicating which lines have conflicts, and whether they came
  28.344 +	from our version of the file or theirs.</para>
  28.345 +
  28.346 +      <para id="x_360">Mercurial can tell from the way <command>merge</command>
  28.347 +	exits that it wasn't able to merge successfully, so it tells
  28.348 +	us what commands we'll need to run if we want to redo the
  28.349 +	merging operation.  This could be useful if, for example, we
  28.350 +	were running a graphical merge tool and quit because we were
  28.351 +	confused or realised we had made a mistake.</para>
  28.352 +
  28.353 +      <para id="x_361">If automatic or manual merges fail, there's nothing to
  28.354 +	prevent us from <quote>fixing up</quote> the affected files
  28.355 +	ourselves, and committing the results of our merge:</para>
  28.356 +
  28.357 +      &interaction.tour-merge-conflict.commit;
  28.358 +
  28.359 +      <note>
  28.360 +	<title>Where is the <command>hg resolve</command> command?</title>
  28.361 +
  28.362 +	<para id="x_724">The <command>hg resolve</command> command was introduced
  28.363 +	  in Mercurial 1.1, which was released in December 2008. If
  28.364 +	  you are using an older version of Mercurial (run <command>hg
  28.365 +	    version</command> to see), this command will not be
  28.366 +	  present.  If your version of Mercurial is older than 1.1,
  28.367 +	  you should strongly consider upgrading to a newer version
  28.368 +	  before trying to tackle complicated merges.</para>
  28.369 +      </note>
  28.370 +    </sect2>
  28.371 +  </sect1>
  28.372 +
  28.373 +  <sect1 id="sec:tour-merge:fetch">
  28.374 +    <title>Simplifying the pull-merge-commit sequence</title>
  28.375 +
  28.376 +    <para id="x_362">The process of merging changes as outlined above is
  28.377 +      straightforward, but requires running three commands in
  28.378 +      sequence.</para>
  28.379 +    <programlisting>hg pull -u
  28.380 +hg merge
  28.381 +hg commit -m 'Merged remote changes'</programlisting>
  28.382 +    <para id="x_363">In the case of the final commit, you also need to enter a
  28.383 +      commit message, which is almost always going to be a piece of
  28.384 +      uninteresting <quote>boilerplate</quote> text.</para>
  28.385 +
  28.386 +    <para id="x_364">It would be nice to reduce the number of steps needed, if
  28.387 +      this were possible.  Indeed, Mercurial is distributed with an
  28.388 +      extension called <literal role="hg-ext">fetch</literal> that
  28.389 +      does just this.</para>
  28.390 +
  28.391 +    <para id="x_365">Mercurial provides a flexible extension mechanism that lets
  28.392 +      people extend its functionality, while keeping the core of
  28.393 +      Mercurial small and easy to deal with.  Some extensions add new
  28.394 +      commands that you can use from the command line, while others
  28.395 +      work <quote>behind the scenes,</quote> for example adding
  28.396 +      capabilities to Mercurial's built-in server mode.</para>
  28.397 +
  28.398 +    <para id="x_366">The <literal role="hg-ext">fetch</literal>
  28.399 +      extension adds a new command called, not surprisingly, <command
  28.400 +	role="hg-cmd">hg fetch</command>.  This extension acts as a
  28.401 +      combination of <command role="hg-cmd">hg pull -u</command>,
  28.402 +      <command role="hg-cmd">hg merge</command> and <command
  28.403 +	role="hg-cmd">hg commit</command>.  It begins by pulling
  28.404 +      changes from another repository into the current repository.  If
  28.405 +      it finds that the changes added a new head to the repository, it
  28.406 +      updates to the new head, begins a merge, then (if the merge
  28.407 +      succeeded) commits the result of the merge with an
  28.408 +      automatically-generated commit message.  If no new heads were
  28.409 +      added, it updates the working directory to the new tip
  28.410 +      changeset.</para>
  28.411 +
  28.412 +    <para id="x_367">Enabling the <literal
  28.413 +	role="hg-ext">fetch</literal> extension is easy.  Edit the
  28.414 +      <filename role="special">.hgrc</filename> file in your home
  28.415 +      directory, and either go to the <literal
  28.416 +	role="rc-extensions">extensions</literal> section or create an
  28.417 +      <literal role="rc-extensions">extensions</literal> section. Then
  28.418 +      add a line that simply reads
  28.419 +      <quote><literal>fetch=</literal></quote>.</para>
  28.420 +
  28.421 +    <programlisting>[extensions]
  28.422 +fetch =</programlisting>
  28.423 +
  28.424 +    <para id="x_368">(Normally, the right-hand side of the
  28.425 +      <quote><literal>=</literal></quote> would indicate where to find
  28.426 +      the extension, but since the <literal
  28.427 +	role="hg-ext">fetch</literal> extension is in the standard
  28.428 +      distribution, Mercurial knows where to search for it.)</para>
  28.429 +  </sect1>
  28.430 +
  28.431 +  <sect1>
  28.432 +    <title>Renaming, copying, and merging</title>
  28.433 +
  28.434 +    <para id="x_729">During the life of a project, we will often want to change
  28.435 +      the layout of its files and directories. This can be as simple
  28.436 +      as renaming a single file, or as complex as restructuring the
  28.437 +      entire hierarchy of files within the project.</para>
  28.438 +
  28.439 +    <para id="x_72a">Mercurial supports these kinds of complex changes fluently,
  28.440 +      provided we tell it what we're doing.  If we want to rename a
  28.441 +      file, we should use the <command>hg rename</command><footnote>
  28.442 +	<para id="x_72b">If you're a Unix user, you'll be glad to know that the
  28.443 +	  <command>hg rename</command> command can be abbreviated as
  28.444 +	  <command>hg mv</command>.</para>
  28.445 +      </footnote> command to rename it, so that Mercurial can do the
  28.446 +      right thing later when we merge.</para>
  28.447 +
  28.448 +    <para id="x_72c">We will cover the use of these commands in more detail in
  28.449 +      <xref linkend="chap:daily.copy"/>.</para>
  28.450 +  </sect1>
  28.451 +</chapter>
  28.452 +
  28.453 +<!--
  28.454 +local variables: 
  28.455 +sgml-parent-document: ("00book.xml" "book" "chapter")
  28.456 +end:
  28.457 +-->
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/en/ch04-concepts.xml	Sun Aug 16 03:41:39 2009 +0200
    29.3 @@ -0,0 +1,778 @@
    29.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    29.5 +
    29.6 +<chapter id="chap:concepts">
    29.7 +  <?dbhtml filename="behind-the-scenes.html"?>
    29.8 +  <title>Behind the scenes</title>
    29.9 +
   29.10 +  <para id="x_2e8">Unlike many revision control systems, the concepts
   29.11 +    upon which Mercurial is built are simple enough that it's easy to
   29.12 +    understand how the software really works.  Knowing these details
   29.13 +    certainly isn't necessary, so it is certainly safe to skip this
   29.14 +    chapter.  However, I think you will get more out of the software
   29.15 +    with a <quote>mental model</quote> of what's going on.</para>
   29.16 +
   29.17 +  <para id="x_2e9">Being able to understand what's going on behind the
   29.18 +    scenes gives me confidence that Mercurial has been carefully
   29.19 +    designed to be both <emphasis>safe</emphasis> and
   29.20 +    <emphasis>efficient</emphasis>.  And just as importantly, if it's
   29.21 +    easy for me to retain a good idea of what the software is doing
   29.22 +    when I perform a revision control task, I'm less likely to be
   29.23 +    surprised by its behavior.</para>
   29.24 +
   29.25 +  <para id="x_2ea">In this chapter, we'll initially cover the core concepts
   29.26 +    behind Mercurial's design, then continue to discuss some of the
   29.27 +    interesting details of its implementation.</para>
   29.28 +
   29.29 +  <sect1>
   29.30 +    <title>Mercurial's historical record</title>
   29.31 +
   29.32 +    <sect2>
   29.33 +      <title>Tracking the history of a single file</title>
   29.34 +
   29.35 +      <para id="x_2eb">When Mercurial tracks modifications to a file, it stores
   29.36 +	the history of that file in a metadata object called a
   29.37 +	<emphasis>filelog</emphasis>.  Each entry in the filelog
   29.38 +	contains enough information to reconstruct one revision of the
   29.39 +	file that is being tracked.  Filelogs are stored as files in
   29.40 +	the <filename role="special"
   29.41 +	  class="directory">.hg/store/data</filename> directory.  A
   29.42 +	filelog contains two kinds of information: revision data, and
   29.43 +	an index to help Mercurial to find a revision
   29.44 +	efficiently.</para>
   29.45 +
   29.46 +      <para id="x_2ec">A file that is large, or has a lot of history, has its
   29.47 +	filelog stored in separate data
   29.48 +	(<quote><literal>.d</literal></quote> suffix) and index
   29.49 +	(<quote><literal>.i</literal></quote> suffix) files.  For
   29.50 +	small files without much history, the revision data and index
   29.51 +	are combined in a single <quote><literal>.i</literal></quote>
   29.52 +	file.  The correspondence between a file in the working
   29.53 +	directory and the filelog that tracks its history in the
   29.54 +	repository is illustrated in <xref
   29.55 +	  linkend="fig:concepts:filelog"/>.</para>
   29.56 +
   29.57 +      <figure id="fig:concepts:filelog">
   29.58 +	<title>Relationships between files in working directory and
   29.59 +	  filelogs in repository</title>
   29.60 +	<mediaobject>
   29.61 +	  <imageobject><imagedata fileref="figs/filelog.png"/></imageobject>
   29.62 +	  <textobject><phrase>XXX add text</phrase></textobject>
   29.63 +	</mediaobject>
   29.64 +      </figure>
   29.65 +
   29.66 +    </sect2>
   29.67 +    <sect2>
   29.68 +      <title>Managing tracked files</title>
   29.69 +
   29.70 +      <para id="x_2ee">Mercurial uses a structure called a
   29.71 +	<emphasis>manifest</emphasis> to collect together information
   29.72 +	about the files that it tracks.  Each entry in the manifest
   29.73 +	contains information about the files present in a single
   29.74 +	changeset.  An entry records which files are present in the
   29.75 +	changeset, the revision of each file, and a few other pieces
   29.76 +	of file metadata.</para>
   29.77 +
   29.78 +    </sect2>
   29.79 +    <sect2>
   29.80 +      <title>Recording changeset information</title>
   29.81 +
   29.82 +      <para id="x_2ef">The <emphasis>changelog</emphasis> contains information
   29.83 +	about each changeset.  Each revision records who committed a
   29.84 +	change, the changeset comment, other pieces of
   29.85 +	changeset-related information, and the revision of the
   29.86 +	manifest to use.</para>
   29.87 +
   29.88 +    </sect2>
   29.89 +    <sect2>
   29.90 +      <title>Relationships between revisions</title>
   29.91 +
   29.92 +      <para id="x_2f0">Within a changelog, a manifest, or a filelog, each
   29.93 +	revision stores a pointer to its immediate parent (or to its
   29.94 +	two parents, if it's a merge revision).  As I mentioned above,
   29.95 +	there are also relationships between revisions
   29.96 +	<emphasis>across</emphasis> these structures, and they are
   29.97 +	hierarchical in nature.</para>
   29.98 +
   29.99 +      <para id="x_2f1">For every changeset in a repository, there is exactly one
  29.100 +	revision stored in the changelog.  Each revision of the
  29.101 +	changelog contains a pointer to a single revision of the
  29.102 +	manifest.  A revision of the manifest stores a pointer to a
  29.103 +	single revision of each filelog tracked when that changeset
  29.104 +	was created.  These relationships are illustrated in
  29.105 +	<xref linkend="fig:concepts:metadata"/>.</para>
  29.106 +
  29.107 +      <figure id="fig:concepts:metadata">
  29.108 +	<title>Metadata relationships</title>
  29.109 +	<mediaobject>
  29.110 +	  <imageobject><imagedata fileref="figs/metadata.png"/></imageobject>
  29.111 +	  <textobject><phrase>XXX add text</phrase></textobject>
  29.112 +	</mediaobject>
  29.113 +      </figure>
  29.114 +
  29.115 +      <para id="x_2f3">As the illustration shows, there is
  29.116 +	<emphasis>not</emphasis> a <quote>one to one</quote>
  29.117 +	relationship between revisions in the changelog, manifest, or
  29.118 +	filelog. If a file that
  29.119 +	Mercurial tracks hasn't changed between two changesets, the
  29.120 +	entry for that file in the two revisions of the manifest will
  29.121 +	point to the same revision of its filelog<footnote>
  29.122 +	  <para id="x_725">It is possible (though unusual) for the manifest to
  29.123 +	    remain the same between two changesets, in which case the
  29.124 +	    changelog entries for those changesets will point to the
  29.125 +	    same revision of the manifest.</para>
  29.126 +	</footnote>.</para>
  29.127 +
  29.128 +    </sect2>
  29.129 +  </sect1>
  29.130 +  <sect1>
  29.131 +    <title>Safe, efficient storage</title>
  29.132 +
  29.133 +    <para id="x_2f4">The underpinnings of changelogs, manifests, and filelogs are
  29.134 +      provided by a single structure called the
  29.135 +      <emphasis>revlog</emphasis>.</para>
  29.136 +
  29.137 +    <sect2>
  29.138 +      <title>Efficient storage</title>
  29.139 +
  29.140 +      <para id="x_2f5">The revlog provides efficient storage of revisions using a
  29.141 +	<emphasis>delta</emphasis> mechanism.  Instead of storing a
  29.142 +	complete copy of a file for each revision, it stores the
  29.143 +	changes needed to transform an older revision into the new
  29.144 +	revision.  For many kinds of file data, these deltas are
  29.145 +	typically a fraction of a percent of the size of a full copy
  29.146 +	of a file.</para>
  29.147 +
  29.148 +      <para id="x_2f6">Some obsolete revision control systems can only work with
  29.149 +	deltas of text files.  They must either store binary files as
  29.150 +	complete snapshots or encoded into a text representation, both
  29.151 +	of which are wasteful approaches.  Mercurial can efficiently
  29.152 +	handle deltas of files with arbitrary binary contents; it
  29.153 +	doesn't need to treat text as special.</para>
  29.154 +
  29.155 +    </sect2>
  29.156 +    <sect2 id="sec:concepts:txn">
  29.157 +      <title>Safe operation</title>
  29.158 +
  29.159 +      <para id="x_2f7">Mercurial only ever <emphasis>appends</emphasis> data to
  29.160 +	the end of a revlog file. It never modifies a section of a
  29.161 +	file after it has written it.  This is both more robust and
  29.162 +	efficient than schemes that need to modify or rewrite
  29.163 +	data.</para>
  29.164 +
  29.165 +      <para id="x_2f8">In addition, Mercurial treats every write as part of a
  29.166 +	<emphasis>transaction</emphasis> that can span a number of
  29.167 +	files.  A transaction is <emphasis>atomic</emphasis>: either
  29.168 +	the entire transaction succeeds and its effects are all
  29.169 +	visible to readers in one go, or the whole thing is undone.
  29.170 +	This guarantee of atomicity means that if you're running two
  29.171 +	copies of Mercurial, where one is reading data and one is
  29.172 +	writing it, the reader will never see a partially written
  29.173 +	result that might confuse it.</para>
  29.174 +
  29.175 +      <para id="x_2f9">The fact that Mercurial only appends to files makes it
  29.176 +	easier to provide this transactional guarantee.  The easier it
  29.177 +	is to do stuff like this, the more confident you should be
  29.178 +	that it's done correctly.</para>
  29.179 +
  29.180 +    </sect2>
  29.181 +    <sect2>
  29.182 +      <title>Fast retrieval</title>
  29.183 +
  29.184 +      <para id="x_2fa">Mercurial cleverly avoids a pitfall common to
  29.185 +	all earlier revision control systems: the problem of
  29.186 +	<emphasis>inefficient retrieval</emphasis>. Most revision
  29.187 +	control systems store the contents of a revision as an
  29.188 +	incremental series of modifications against a
  29.189 +	<quote>snapshot</quote>.  (Some base the snapshot on the
  29.190 +	oldest revision, others on the newest.)  To reconstruct a
  29.191 +	specific revision, you must first read the snapshot, and then
  29.192 +	every one of the revisions between the snapshot and your
  29.193 +	target revision.  The more history that a file accumulates,
  29.194 +	the more revisions you must read, hence the longer it takes to
  29.195 +	reconstruct a particular revision.</para>
  29.196 +
  29.197 +      <figure id="fig:concepts:snapshot">
  29.198 +	<title>Snapshot of a revlog, with incremental deltas</title>
  29.199 +	<mediaobject>
  29.200 +	  <imageobject><imagedata fileref="figs/snapshot.png"/></imageobject>
  29.201 +	  <textobject><phrase>XXX add text</phrase></textobject>
  29.202 +	</mediaobject>
  29.203 +      </figure>
  29.204 +
  29.205 +      <para id="x_2fc">The innovation that Mercurial applies to this problem is
  29.206 +	simple but effective.  Once the cumulative amount of delta
  29.207 +	information stored since the last snapshot exceeds a fixed
  29.208 +	threshold, it stores a new snapshot (compressed, of course),
  29.209 +	instead of another delta.  This makes it possible to
  29.210 +	reconstruct <emphasis>any</emphasis> revision of a file
  29.211 +	quickly.  This approach works so well that it has since been
  29.212 +	copied by several other revision control systems.</para>
  29.213 +
  29.214 +      <para id="x_2fd"><xref linkend="fig:concepts:snapshot"/> illustrates
  29.215 +	the idea.  In an entry in a revlog's index file, Mercurial
  29.216 +	stores the range of entries from the data file that it must
  29.217 +	read to reconstruct a particular revision.</para>
  29.218 +
  29.219 +      <sect3>
  29.220 +	<title>Aside: the influence of video compression</title>
  29.221 +
  29.222 +	<para id="x_2fe">If you're familiar with video compression or
  29.223 +	  have ever watched a TV feed through a digital cable or
  29.224 +	  satellite service, you may know that most video compression
  29.225 +	  schemes store each frame of video as a delta against its
  29.226 +	  predecessor frame.</para>
  29.227 +
  29.228 +	<para id="x_2ff">Mercurial borrows this idea to make it
  29.229 +	  possible to reconstruct a revision from a snapshot and a
  29.230 +	  small number of deltas.</para>
  29.231 +
  29.232 +      </sect3>
  29.233 +    </sect2>
  29.234 +    <sect2>
  29.235 +      <title>Identification and strong integrity</title>
  29.236 +
  29.237 +      <para id="x_300">Along with delta or snapshot information, a revlog entry
  29.238 +	contains a cryptographic hash of the data that it represents.
  29.239 +	This makes it difficult to forge the contents of a revision,
  29.240 +	and easy to detect accidental corruption.</para>
  29.241 +
  29.242 +      <para id="x_301">Hashes provide more than a mere check against corruption;
  29.243 +	they are used as the identifiers for revisions.  The changeset
  29.244 +	identification hashes that you see as an end user are from
  29.245 +	revisions of the changelog.  Although filelogs and the
  29.246 +	manifest also use hashes, Mercurial only uses these behind the
  29.247 +	scenes.</para>
  29.248 +
  29.249 +      <para id="x_302">Mercurial verifies that hashes are correct when it
  29.250 +	retrieves file revisions and when it pulls changes from
  29.251 +	another repository.  If it encounters an integrity problem, it
  29.252 +	will complain and stop whatever it's doing.</para>
  29.253 +
  29.254 +      <para id="x_303">In addition to the effect it has on retrieval efficiency,
  29.255 +	Mercurial's use of periodic snapshots makes it more robust
  29.256 +	against partial data corruption.  If a revlog becomes partly
  29.257 +	corrupted due to a hardware error or system bug, it's often
  29.258 +	possible to reconstruct some or most revisions from the
  29.259 +	uncorrupted sections of the revlog, both before and after the
  29.260 +	corrupted section.  This would not be possible with a
  29.261 +	delta-only storage model.</para>
  29.262 +    </sect2>
  29.263 +  </sect1>
  29.264 +
  29.265 +  <sect1>
  29.266 +    <title>Revision history, branching, and merging</title>
  29.267 +
  29.268 +    <para id="x_304">Every entry in a Mercurial revlog knows the identity of its
  29.269 +      immediate ancestor revision, usually referred to as its
  29.270 +      <emphasis>parent</emphasis>.  In fact, a revision contains room
  29.271 +      for not one parent, but two.  Mercurial uses a special hash,
  29.272 +      called the <quote>null ID</quote>, to represent the idea
  29.273 +      <quote>there is no parent here</quote>.  This hash is simply a
  29.274 +      string of zeroes.</para>
  29.275 +
  29.276 +    <para id="x_305">In <xref linkend="fig:concepts:revlog"/>, you can see
  29.277 +      an example of the conceptual structure of a revlog.  Filelogs,
  29.278 +      manifests, and changelogs all have this same structure; they
  29.279 +      differ only in the kind of data stored in each delta or
  29.280 +      snapshot.</para>
  29.281 +
  29.282 +    <para id="x_306">The first revision in a revlog (at the bottom of the image)
  29.283 +      has the null ID in both of its parent slots.  For a
  29.284 +      <quote>normal</quote> revision, its first parent slot contains
  29.285 +      the ID of its parent revision, and its second contains the null
  29.286 +      ID, indicating that the revision has only one real parent.  Any
  29.287 +      two revisions that have the same parent ID are branches.  A
  29.288 +      revision that represents a merge between branches has two normal
  29.289 +      revision IDs in its parent slots.</para>
  29.290 +
  29.291 +    <figure id="fig:concepts:revlog">
  29.292 +      <title>The conceptual structure of a revlog</title>
  29.293 +      <mediaobject>
  29.294 +	<imageobject><imagedata fileref="figs/revlog.png"/></imageobject>
  29.295 +	<textobject><phrase>XXX add text</phrase></textobject>
  29.296 +      </mediaobject>
  29.297 +    </figure>
  29.298 +
  29.299 +  </sect1>
  29.300 +  <sect1>
  29.301 +    <title>The working directory</title>
  29.302 +
  29.303 +    <para id="x_307">In the working directory, Mercurial stores a snapshot of the
  29.304 +      files from the repository as of a particular changeset.</para>
  29.305 +
  29.306 +    <para id="x_308">The working directory <quote>knows</quote> which changeset
  29.307 +      it contains.  When you update the working directory to contain a
  29.308 +      particular changeset, Mercurial looks up the appropriate
  29.309 +      revision of the manifest to find out which files it was tracking
  29.310 +      at the time that changeset was committed, and which revision of
  29.311 +      each file was then current.  It then recreates a copy of each of
  29.312 +      those files, with the same contents it had when the changeset
  29.313 +      was committed.</para>
  29.314 +
  29.315 +    <para id="x_309">The <emphasis>dirstate</emphasis> is a special
  29.316 +      structure that contains Mercurial's knowledge of the working
  29.317 +      directory.  It is maintained as a file named
  29.318 +      <filename>.hg/dirstate</filename> inside a repository.  The
  29.319 +      dirstate details which changeset the working directory is
  29.320 +      updated to, and all of the files that Mercurial is tracking in
  29.321 +      the working directory. It also lets Mercurial quickly notice
  29.322 +      changed files, by recording their checkout times and
  29.323 +      sizes.</para>
  29.324 +
  29.325 +    <para id="x_30a">Just as a revision of a revlog has room for two parents, so
  29.326 +      that it can represent either a normal revision (with one parent)
  29.327 +      or a merge of two earlier revisions, the dirstate has slots for
  29.328 +      two parents.  When you use the <command role="hg-cmd">hg
  29.329 +	update</command> command, the changeset that you update to is
  29.330 +      stored in the <quote>first parent</quote> slot, and the null ID
  29.331 +      in the second. When you <command role="hg-cmd">hg
  29.332 +	merge</command> with another changeset, the first parent
  29.333 +      remains unchanged, and the second parent is filled in with the
  29.334 +      changeset you're merging with.  The <command role="hg-cmd">hg
  29.335 +	parents</command> command tells you what the parents of the
  29.336 +      dirstate are.</para>
  29.337 +
  29.338 +    <sect2>
  29.339 +      <title>What happens when you commit</title>
  29.340 +
  29.341 +      <para id="x_30b">The dirstate stores parent information for more than just
  29.342 +	book-keeping purposes.  Mercurial uses the parents of the
  29.343 +	dirstate as <emphasis>the parents of a new
  29.344 +	  changeset</emphasis> when you perform a commit.</para>
  29.345 +
  29.346 +      <figure id="fig:concepts:wdir">
  29.347 +	<title>The working directory can have two parents</title>
  29.348 +	<mediaobject>
  29.349 +	  <imageobject><imagedata fileref="figs/wdir.png"/></imageobject>
  29.350 +	  <textobject><phrase>XXX add text</phrase></textobject>
  29.351 +	</mediaobject>
  29.352 +      </figure>
  29.353 +
  29.354 +      <para id="x_30d"><xref linkend="fig:concepts:wdir"/> shows the
  29.355 +	normal state of the working directory, where it has a single
  29.356 +	changeset as parent.  That changeset is the
  29.357 +	<emphasis>tip</emphasis>, the newest changeset in the
  29.358 +	repository that has no children.</para>
  29.359 +
  29.360 +      <figure id="fig:concepts:wdir-after-commit">
  29.361 +	<title>The working directory gains new parents after a
  29.362 +	  commit</title>
  29.363 +	<mediaobject>
  29.364 +	  <imageobject><imagedata fileref="figs/wdir-after-commit.png"/></imageobject>
  29.365 +	  <textobject><phrase>XXX add text</phrase></textobject>
  29.366 +	</mediaobject>
  29.367 +      </figure>
  29.368 +
  29.369 +      <para id="x_30f">It's useful to think of the working directory as
  29.370 +	<quote>the changeset I'm about to commit</quote>.  Any files
  29.371 +	that you tell Mercurial that you've added, removed, renamed,
  29.372 +	or copied will be reflected in that changeset, as will
  29.373 +	modifications to any files that Mercurial is already tracking;
  29.374 +	the new changeset will have the parents of the working
  29.375 +	directory as its parents.</para>
  29.376 +
  29.377 +      <para id="x_310">After a commit, Mercurial will update the
  29.378 +	parents of the working directory, so that the first parent is
  29.379 +	the ID of the new changeset, and the second is the null ID.
  29.380 +	This is shown in <xref
  29.381 +	  linkend="fig:concepts:wdir-after-commit"/>. Mercurial
  29.382 +	doesn't touch any of the files in the working directory when
  29.383 +	you commit; it just modifies the dirstate to note its new
  29.384 +	parents.</para>
  29.385 +
  29.386 +    </sect2>
  29.387 +    <sect2>
  29.388 +      <title>Creating a new head</title>
  29.389 +
  29.390 +      <para id="x_311">It's perfectly normal to update the working directory to a
  29.391 +	changeset other than the current tip.  For example, you might
  29.392 +	want to know what your project looked like last Tuesday, or
  29.393 +	you could be looking through changesets to see which one
  29.394 +	introduced a bug.  In cases like this, the natural thing to do
  29.395 +	is update the working directory to the changeset you're
  29.396 +	interested in, and then examine the files in the working
  29.397 +	directory directly to see their contents as they were when you
  29.398 +	committed that changeset.  The effect of this is shown in
  29.399 +	<xref linkend="fig:concepts:wdir-pre-branch"/>.</para>
  29.400 +
  29.401 +      <figure id="fig:concepts:wdir-pre-branch">
  29.402 +	<title>The working directory, updated to an older
  29.403 +	  changeset</title>
  29.404 +	<mediaobject>
  29.405 +	  <imageobject><imagedata fileref="figs/wdir-pre-branch.png"/></imageobject>
  29.406 +	  <textobject><phrase>XXX add text</phrase></textobject>
  29.407 +	</mediaobject>
  29.408 +      </figure>
  29.409 +
  29.410 +      <para id="x_313">Having updated the working directory to an
  29.411 +	older changeset, what happens if you make some changes, and
  29.412 +	then commit?  Mercurial behaves in the same way as I outlined
  29.413 +	above.  The parents of the working directory become the
  29.414 +	parents of the new changeset.  This new changeset has no
  29.415 +	children, so it becomes the new tip.  And the repository now
  29.416 +	contains two changesets that have no children; we call these
  29.417 +	<emphasis>heads</emphasis>.  You can see the structure that
  29.418 +	this creates in <xref
  29.419 +	  linkend="fig:concepts:wdir-branch"/>.</para>
  29.420 +
  29.421 +      <figure id="fig:concepts:wdir-branch">
  29.422 +	<title>After a commit made while synced to an older
  29.423 +	  changeset</title>
  29.424 +	<mediaobject>
  29.425 +	  <imageobject><imagedata fileref="figs/wdir-branch.png"/></imageobject>
  29.426 +	  <textobject><phrase>XXX add text</phrase></textobject>
  29.427 +	</mediaobject>
  29.428 +      </figure>
  29.429 +
  29.430 +      <note>
  29.431 +	<para id="x_315">If you're new to Mercurial, you should keep
  29.432 +	  in mind a common <quote>error</quote>, which is to use the
  29.433 +	  <command role="hg-cmd">hg pull</command> command without any
  29.434 +	  options.  By default, the <command role="hg-cmd">hg
  29.435 +	    pull</command> command <emphasis>does not</emphasis>
  29.436 +	  update the working directory, so you'll bring new changesets
  29.437 +	  into your repository, but the working directory will stay
  29.438 +	  synced at the same changeset as before the pull.  If you
  29.439 +	  make some changes and commit afterwards, you'll thus create
  29.440 +	  a new head, because your working directory isn't synced to
  29.441 +	  whatever the current tip is.  To combine the operation of a
  29.442 +	  pull, followed by an update, run <command>hg pull
  29.443 +	    -u</command>.</para>
  29.444 +
  29.445 +	<para id="x_316">I put the word <quote>error</quote> in quotes
  29.446 +	  because all that you need to do to rectify the situation
  29.447 +	  where you created a new head by accident is
  29.448 +	  <command role="hg-cmd">hg merge</command>, then <command
  29.449 +	    role="hg-cmd">hg commit</command>.  In other words, this
  29.450 +	  almost never has negative consequences; it's just something
  29.451 +	  of a surprise for newcomers.  I'll discuss other ways to
  29.452 +	  avoid this behavior, and why Mercurial behaves in this
  29.453 +	  initially surprising way, later on.</para>
  29.454 +      </note>
  29.455 +
  29.456 +    </sect2>
  29.457 +    <sect2>
  29.458 +      <title>Merging changes</title>
  29.459 +
  29.460 +      <para id="x_317">When you run the <command role="hg-cmd">hg
  29.461 +	  merge</command> command, Mercurial leaves the first parent
  29.462 +	of the working directory unchanged, and sets the second parent
  29.463 +	to the changeset you're merging with, as shown in <xref
  29.464 +	  linkend="fig:concepts:wdir-merge"/>.</para>
  29.465 +
  29.466 +      <figure id="fig:concepts:wdir-merge">
  29.467 +	<title>Merging two heads</title>
  29.468 +	<mediaobject>
  29.469 +	  <imageobject>
  29.470 +	    <imagedata fileref="figs/wdir-merge.png"/>
  29.471 +	  </imageobject>
  29.472 +	  <textobject><phrase>XXX add text</phrase></textobject>
  29.473 +	</mediaobject>
  29.474 +      </figure>
  29.475 +
  29.476 +      <para id="x_319">Mercurial also has to modify the working directory, to
  29.477 +	merge the files managed in the two changesets.  Simplified a
  29.478 +	little, the merging process goes like this, for every file in
  29.479 +	the manifests of both changesets.</para>
  29.480 +      <itemizedlist>
  29.481 +	<listitem><para id="x_31a">If neither changeset has modified a file, do
  29.482 +	    nothing with that file.</para>
  29.483 +	</listitem>
  29.484 +	<listitem><para id="x_31b">If one changeset has modified a file, and the
  29.485 +	    other hasn't, create the modified copy of the file in the
  29.486 +	    working directory.</para>
  29.487 +	</listitem>
  29.488 +	<listitem><para id="x_31c">If one changeset has removed a file, and the
  29.489 +	    other hasn't (or has also deleted it), delete the file
  29.490 +	    from the working directory.</para>
  29.491 +	</listitem>
  29.492 +	<listitem><para id="x_31d">If one changeset has removed a file, but the
  29.493 +	    other has modified the file, ask the user what to do: keep
  29.494 +	    the modified file, or remove it?</para>
  29.495 +	</listitem>
  29.496 +	<listitem><para id="x_31e">If both changesets have modified a file,
  29.497 +	    invoke an external merge program to choose the new
  29.498 +	    contents for the merged file.  This may require input from
  29.499 +	    the user.</para>
  29.500 +	</listitem>
  29.501 +	<listitem><para id="x_31f">If one changeset has modified a file, and the
  29.502 +	    other has renamed or copied the file, make sure that the
  29.503 +	    changes follow the new name of the file.</para>
  29.504 +	</listitem></itemizedlist>
  29.505 +      <para id="x_320">There are more details&emdash;merging has plenty of corner
  29.506 +	cases&emdash;but these are the most common choices that are
  29.507 +	involved in a merge.  As you can see, most cases are
  29.508 +	completely automatic, and indeed most merges finish
  29.509 +	automatically, without requiring your input to resolve any
  29.510 +	conflicts.</para>
  29.511 +
  29.512 +      <para id="x_321">When you're thinking about what happens when you commit
  29.513 +	after a merge, once again the working directory is <quote>the
  29.514 +	  changeset I'm about to commit</quote>.  After the <command
  29.515 +	  role="hg-cmd">hg merge</command> command completes, the
  29.516 +	working directory has two parents; these will become the
  29.517 +	parents of the new changeset.</para>
  29.518 +
  29.519 +      <para id="x_322">Mercurial lets you perform multiple merges, but
  29.520 +	you must commit the results of each individual merge as you
  29.521 +	go.  This is necessary because Mercurial only tracks two
  29.522 +	parents for both revisions and the working directory.  While
  29.523 +	it would be technically feasible to merge multiple changesets
  29.524 +	at once, Mercurial avoids this for simplicity.  With multi-way
  29.525 +	merges, the risks of user confusion, nasty conflict
  29.526 +	resolution, and making a terrible mess of a merge would grow
  29.527 +	intolerable.</para>
  29.528 +
  29.529 +    </sect2>
  29.530 +
  29.531 +    <sect2>
  29.532 +      <title>Merging and renames</title>
  29.533 +
  29.534 +      <para id="x_69a">A surprising number of revision control systems pay little
  29.535 +	or no attention to a file's <emphasis>name</emphasis> over
  29.536 +	time.  For instance, it used to be common that if a file got
  29.537 +	renamed on one side of a merge, the changes from the other
  29.538 +	side would be silently dropped.</para>
  29.539 +
  29.540 +      <para id="x_69b">Mercurial records metadata when you tell it to perform a
  29.541 +	rename or copy. It uses this metadata during a merge to do the
  29.542 +	right thing in the case of a merge.  For instance, if I rename
  29.543 +	a file, and you edit it without renaming it, when we merge our
  29.544 +	work the file will be renamed and have your edits
  29.545 +	applied.</para>
  29.546 +    </sect2>
  29.547 +  </sect1>
  29.548 +
  29.549 +  <sect1>
  29.550 +    <title>Other interesting design features</title>
  29.551 +
  29.552 +    <para id="x_323">In the sections above, I've tried to highlight some of the
  29.553 +      most important aspects of Mercurial's design, to illustrate that
  29.554 +      it pays careful attention to reliability and performance.
  29.555 +      However, the attention to detail doesn't stop there.  There are
  29.556 +      a number of other aspects of Mercurial's construction that I
  29.557 +      personally find interesting.  I'll detail a few of them here,
  29.558 +      separate from the <quote>big ticket</quote> items above, so that
  29.559 +      if you're interested, you can gain a better idea of the amount
  29.560 +      of thinking that goes into a well-designed system.</para>
  29.561 +
  29.562 +    <sect2>
  29.563 +      <title>Clever compression</title>
  29.564 +
  29.565 +      <para id="x_324">When appropriate, Mercurial will store both snapshots and
  29.566 +	deltas in compressed form.  It does this by always
  29.567 +	<emphasis>trying to</emphasis> compress a snapshot or delta,
  29.568 +	but only storing the compressed version if it's smaller than
  29.569 +	the uncompressed version.</para>
  29.570 +
  29.571 +      <para id="x_325">This means that Mercurial does <quote>the right
  29.572 +	  thing</quote> when storing a file whose native form is
  29.573 +	compressed, such as a <literal>zip</literal> archive or a JPEG
  29.574 +	image.  When these types of files are compressed a second
  29.575 +	time, the resulting file is usually bigger than the
  29.576 +	once-compressed form, and so Mercurial will store the plain
  29.577 +	<literal>zip</literal> or JPEG.</para>
  29.578 +
  29.579 +      <para id="x_326">Deltas between revisions of a compressed file are usually
  29.580 +	larger than snapshots of the file, and Mercurial again does
  29.581 +	<quote>the right thing</quote> in these cases.  It finds that
  29.582 +	such a delta exceeds the threshold at which it should store a
  29.583 +	complete snapshot of the file, so it stores the snapshot,
  29.584 +	again saving space compared to a naive delta-only
  29.585 +	approach.</para>
  29.586 +
  29.587 +      <sect3>
  29.588 +	<title>Network recompression</title>
  29.589 +
  29.590 +	<para id="x_327">When storing revisions on disk, Mercurial uses the
  29.591 +	  <quote>deflate</quote> compression algorithm (the same one
  29.592 +	  used by the popular <literal>zip</literal> archive format),
  29.593 +	  which balances good speed with a respectable compression
  29.594 +	  ratio.  However, when transmitting revision data over a
  29.595 +	  network connection, Mercurial uncompresses the compressed
  29.596 +	  revision data.</para>
  29.597 +
  29.598 +	<para id="x_328">If the connection is over HTTP, Mercurial recompresses
  29.599 +	  the entire stream of data using a compression algorithm that
  29.600 +	  gives a better compression ratio (the Burrows-Wheeler
  29.601 +	  algorithm from the widely used <literal>bzip2</literal>
  29.602 +	  compression package).  This combination of algorithm and
  29.603 +	  compression of the entire stream (instead of a revision at a
  29.604 +	  time) substantially reduces the number of bytes to be
  29.605 +	  transferred, yielding better network performance over most
  29.606 +	  kinds of network.</para>
  29.607 +
  29.608 +	<para id="x_329">If the connection is over
  29.609 +	  <command>ssh</command>, Mercurial
  29.610 +	  <emphasis>doesn't</emphasis> recompress the stream, because
  29.611 +	  <command>ssh</command> can already do this itself.  You can
  29.612 +	  tell Mercurial to always use <command>ssh</command>'s
  29.613 +	  compression feature by editing the
  29.614 +	  <filename>.hgrc</filename> file in your home directory as
  29.615 +	  follows.</para>
  29.616 +
  29.617 +	<programlisting>[ui]
  29.618 +ssh = ssh -C</programlisting>
  29.619 +
  29.620 +      </sect3>
  29.621 +    </sect2>
  29.622 +    <sect2>
  29.623 +      <title>Read/write ordering and atomicity</title>
  29.624 +
  29.625 +      <para id="x_32a">Appending to files isn't the whole story when
  29.626 +	it comes to guaranteeing that a reader won't see a partial
  29.627 +	write.  If you recall <xref linkend="fig:concepts:metadata"/>,
  29.628 +	revisions in the changelog point to revisions in the manifest,
  29.629 +	and revisions in the manifest point to revisions in filelogs.
  29.630 +	This hierarchy is deliberate.</para>
  29.631 +
  29.632 +      <para id="x_32b">A writer starts a transaction by writing filelog and
  29.633 +	manifest data, and doesn't write any changelog data until
  29.634 +	those are finished.  A reader starts by reading changelog
  29.635 +	data, then manifest data, followed by filelog data.</para>
  29.636 +
  29.637 +      <para id="x_32c">Since the writer has always finished writing filelog and
  29.638 +	manifest data before it writes to the changelog, a reader will
  29.639 +	never read a pointer to a partially written manifest revision
  29.640 +	from the changelog, and it will never read a pointer to a
  29.641 +	partially written filelog revision from the manifest.</para>
  29.642 +
  29.643 +    </sect2>
  29.644 +    <sect2>
  29.645 +      <title>Concurrent access</title>
  29.646 +
  29.647 +      <para id="x_32d">The read/write ordering and atomicity guarantees mean that
  29.648 +	Mercurial never needs to <emphasis>lock</emphasis> a
  29.649 +	repository when it's reading data, even if the repository is
  29.650 +	being written to while the read is occurring. This has a big
  29.651 +	effect on scalability; you can have an arbitrary number of
  29.652 +	Mercurial processes safely reading data from a repository
  29.653 +	all at once, no matter whether it's being written to or
  29.654 +	not.</para>
  29.655 +
  29.656 +      <para id="x_32e">The lockless nature of reading means that if you're
  29.657 +	sharing a repository on a multi-user system, you don't need to
  29.658 +	grant other local users permission to
  29.659 +	<emphasis>write</emphasis> to your repository in order for
  29.660 +	them to be able to clone it or pull changes from it; they only
  29.661 +	need <emphasis>read</emphasis> permission.  (This is
  29.662 +	<emphasis>not</emphasis> a common feature among revision
  29.663 +	control systems, so don't take it for granted!  Most require
  29.664 +	readers to be able to lock a repository to access it safely,
  29.665 +	and this requires write permission on at least one directory,
  29.666 +	which of course makes for all kinds of nasty and annoying
  29.667 +	security and administrative problems.)</para>
  29.668 +
  29.669 +      <para id="x_32f">Mercurial uses locks to ensure that only one process can
  29.670 +	write to a repository at a time (the locking mechanism is safe
  29.671 +	even over filesystems that are notoriously hostile to locking,
  29.672 +	such as NFS).  If a repository is locked, a writer will wait
  29.673 +	for a while to retry if the repository becomes unlocked, but
  29.674 +	if the repository remains locked for too long, the process
  29.675 +	attempting to write will time out after a while. This means
  29.676 +	that your daily automated scripts won't get stuck forever and
  29.677 +	pile up if a system crashes unnoticed, for example.  (Yes, the
  29.678 +	timeout is configurable, from zero to infinity.)</para>
  29.679 +
  29.680 +      <sect3>
  29.681 +	<title>Safe dirstate access</title>
  29.682 +
  29.683 +	<para id="x_330">As with revision data, Mercurial doesn't take a lock to
  29.684 +	  read the dirstate file; it does acquire a lock to write it.
  29.685 +	  To avoid the possibility of reading a partially written copy
  29.686 +	  of the dirstate file, Mercurial writes to a file with a
  29.687 +	  unique name in the same directory as the dirstate file, then
  29.688 +	  renames the temporary file atomically to
  29.689 +	  <filename>dirstate</filename>.  The file named
  29.690 +	  <filename>dirstate</filename> is thus guaranteed to be
  29.691 +	  complete, not partially written.</para>
  29.692 +
  29.693 +      </sect3>
  29.694 +    </sect2>
  29.695 +    <sect2>
  29.696 +      <title>Avoiding seeks</title>
  29.697 +
  29.698 +      <para id="x_331">Critical to Mercurial's performance is the avoidance of
  29.699 +	seeks of the disk head, since any seek is far more expensive
  29.700 +	than even a comparatively large read operation.</para>
  29.701 +
  29.702 +      <para id="x_332">This is why, for example, the dirstate is stored in a
  29.703 +	single file.  If there were a dirstate file per directory that
  29.704 +	Mercurial tracked, the disk would seek once per directory.
  29.705 +	Instead, Mercurial reads the entire single dirstate file in
  29.706 +	one step.</para>
  29.707 +
  29.708 +      <para id="x_333">Mercurial also uses a <quote>copy on write</quote> scheme
  29.709 +	when cloning a repository on local storage.  Instead of
  29.710 +	copying every revlog file from the old repository into the new
  29.711 +	repository, it makes a <quote>hard link</quote>, which is a
  29.712 +	shorthand way to say <quote>these two names point to the same
  29.713 +	  file</quote>.  When Mercurial is about to write to one of a
  29.714 +	revlog's files, it checks to see if the number of names
  29.715 +	pointing at the file is greater than one.  If it is, more than
  29.716 +	one repository is using the file, so Mercurial makes a new
  29.717 +	copy of the file that is private to this repository.</para>
  29.718 +
  29.719 +      <para id="x_334">A few revision control developers have pointed out that
  29.720 +	this idea of making a complete private copy of a file is not
  29.721 +	very efficient in its use of storage.  While this is true,
  29.722 +	storage is cheap, and this method gives the highest
  29.723 +	performance while deferring most book-keeping to the operating
  29.724 +	system.  An alternative scheme would most likely reduce
  29.725 +	performance and increase the complexity of the software, but
  29.726 +	speed and simplicity are key to the <quote>feel</quote> of
  29.727 +	day-to-day use.</para>
  29.728 +
  29.729 +    </sect2>
  29.730 +    <sect2>
  29.731 +      <title>Other contents of the dirstate</title>
  29.732 +
  29.733 +      <para id="x_335">Because Mercurial doesn't force you to tell it when you're
  29.734 +	modifying a file, it uses the dirstate to store some extra
  29.735 +	information so it can determine efficiently whether you have
  29.736 +	modified a file.  For each file in the working directory, it
  29.737 +	stores the time that it last modified the file itself, and the
  29.738 +	size of the file at that time.</para>
  29.739 +
  29.740 +      <para id="x_336">When you explicitly <command role="hg-cmd">hg
  29.741 +	  add</command>, <command role="hg-cmd">hg remove</command>,
  29.742 +	<command role="hg-cmd">hg rename</command> or <command
  29.743 +	  role="hg-cmd">hg copy</command> files, Mercurial updates the
  29.744 +	dirstate so that it knows what to do with those files when you
  29.745 +	commit.</para>
  29.746 +
  29.747 +      <para id="x_337">The dirstate helps Mercurial to efficiently
  29.748 +	  check the status of files in a repository.</para>
  29.749 +
  29.750 +      <itemizedlist>
  29.751 +	<listitem>
  29.752 +	  <para id="x_726">When Mercurial checks the state of a file in the
  29.753 +	    working directory, it first checks a file's modification
  29.754 +	    time against the time in the dirstate that records when
  29.755 +	    Mercurial last wrote the file. If the last modified time
  29.756 +	    is the same as the time when Mercurial wrote the file, the
  29.757 +	    file must not have been modified, so Mercurial does not
  29.758 +	    need to check any further.</para>
  29.759 +	</listitem>
  29.760 +	<listitem>
  29.761 +	  <para id="x_727">If the file's size has changed, the file must have
  29.762 +	    been modified.  If the modification time has changed, but
  29.763 +	    the size has not, only then does Mercurial need to
  29.764 +	    actually read the contents of the file to see if it has
  29.765 +	    changed.</para>
  29.766 +	</listitem>
  29.767 +      </itemizedlist>
  29.768 +
  29.769 +      <para id="x_728">Storing the modification time and size dramatically
  29.770 +	reduces the number of read operations that Mercurial needs to
  29.771 +	perform when we run commands like <command>hg status</command>.
  29.772 +	This results in large performance improvements.</para>
  29.773 +    </sect2>
  29.774 +  </sect1>
  29.775 +</chapter>
  29.776 +
  29.777 +<!--
  29.778 +local variables: 
  29.779 +sgml-parent-document: ("00book.xml" "book" "chapter")
  29.780 +end:
  29.781 +-->
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/en/ch05-daily.xml	Sun Aug 16 03:41:39 2009 +0200
    30.3 @@ -0,0 +1,840 @@
    30.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    30.5 +
    30.6 +<chapter id="chap:daily">
    30.7 +  <?dbhtml filename="mercurial-in-daily-use.html"?>
    30.8 +  <title>Mercurial in daily use</title>
    30.9 +
   30.10 +  <sect1>
   30.11 +    <title>Telling Mercurial which files to track</title>
   30.12 +
   30.13 +    <para id="x_1a3">Mercurial does not work with files in your repository unless
   30.14 +      you tell it to manage them.  The <command role="hg-cmd">hg
   30.15 +	status</command> command will tell you which files Mercurial
   30.16 +      doesn't know about; it uses a
   30.17 +      <quote><literal>?</literal></quote> to display such
   30.18 +      files.</para>
   30.19 +
   30.20 +    <para id="x_1a4">To tell Mercurial to track a file, use the <command
   30.21 +	role="hg-cmd">hg add</command> command.  Once you have added a
   30.22 +      file, the entry in the output of <command role="hg-cmd">hg
   30.23 +	status</command> for that file changes from
   30.24 +      <quote><literal>?</literal></quote> to
   30.25 +      <quote><literal>A</literal></quote>.</para>
   30.26 +
   30.27 +      &interaction.daily.files.add;
   30.28 +
   30.29 +    <para id="x_1a5">After you run a <command role="hg-cmd">hg commit</command>,
   30.30 +      the files that you added before the commit will no longer be
   30.31 +      listed in the output of <command role="hg-cmd">hg
   30.32 +	status</command>.  The reason for this is that by default, <command
   30.33 +	role="hg-cmd">hg status</command> only tells you about
   30.34 +      <quote>interesting</quote> files&emdash;those that you have (for
   30.35 +      example) modified, removed, or renamed.  If you have a repository
   30.36 +      that contains thousands of files, you will rarely want to know
   30.37 +      about files that Mercurial is tracking, but that have not
   30.38 +      changed.  (You can still get this information; we'll return to
   30.39 +      this later.)</para>
   30.40 +
   30.41 +    <para id="x_1a6">Once you add a file, Mercurial doesn't do anything with it
   30.42 +      immediately.  Instead, it will take a snapshot of the file's
   30.43 +      state the next time you perform a commit.  It will then continue
   30.44 +      to track the changes you make to the file every time you commit,
   30.45 +      until you remove the file.</para>
   30.46 +
   30.47 +    <sect2>
   30.48 +      <title>Explicit versus implicit file naming</title>
   30.49 +
   30.50 +      <para id="x_1a7">A useful behavior that Mercurial has is that if you pass
   30.51 +	the name of a directory to a command, every Mercurial command
   30.52 +	will treat this as <quote>I want to operate on every file in
   30.53 +	  this directory and its subdirectories</quote>.</para>
   30.54 +
   30.55 +      &interaction.daily.files.add-dir;
   30.56 +
   30.57 +      <para id="x_1a8">Notice in this example that Mercurial printed
   30.58 +	the names of the files it added, whereas it didn't do so when
   30.59 +	we added the file named <filename>myfile.txt</filename> in the
   30.60 +	earlier example.</para>
   30.61 +
   30.62 +      <para id="x_1a9">What's going on is that in the former case, we explicitly
   30.63 +	named the file to add on the command line.  The assumption
   30.64 +	that Mercurial makes in such cases is that we know what we
   30.65 +	are doing, and it doesn't print any output.</para>
   30.66 +
   30.67 +      <para id="x_1aa">However, when we <emphasis>imply</emphasis> the names of
   30.68 +	files by giving the name of a directory, Mercurial takes the
   30.69 +	extra step of printing the name of each file that it does
   30.70 +	something with.  This makes it more clear what is happening,
   30.71 +	and reduces the likelihood of a silent and nasty surprise.
   30.72 +	This behavior is common to most Mercurial commands.</para>
   30.73 +    </sect2>
   30.74 +
   30.75 +    <sect2>
   30.76 +      <title>Mercurial tracks files, not directories</title>
   30.77 +
   30.78 +      <para id="x_1ab">Mercurial does not track directory information.  Instead,
   30.79 +	it tracks the path to a file.  Before creating a file, it
   30.80 +	first creates any missing directory components of the path.
   30.81 +	After it deletes a file, it then deletes any empty directories
   30.82 +	that were in the deleted file's path.  This sounds like a
   30.83 +	trivial distinction, but it has one minor practical
   30.84 +	consequence: it is not possible to represent a completely
   30.85 +	empty directory in Mercurial.</para>
   30.86 +
   30.87 +      <para id="x_1ac">Empty directories are rarely useful, and there are
   30.88 +	unintrusive workarounds that you can use to achieve an
   30.89 +	appropriate effect.  The developers of Mercurial thus felt
   30.90 +	that the complexity that would be required to manage empty
   30.91 +	directories was not worth the limited benefit this feature
   30.92 +	would bring.</para>
   30.93 +
   30.94 +      <para id="x_1ad">If you need an empty directory in your repository, there
   30.95 +	are a few ways to achieve this. One is to create a directory,
   30.96 +	then <command role="hg-cmd">hg add</command> a
   30.97 +	<quote>hidden</quote> file to that directory.  On Unix-like
   30.98 +	systems, any file name that begins with a period
   30.99 +	(<quote><literal>.</literal></quote>) is treated as hidden by
  30.100 +	most commands and GUI tools.  This approach is illustrated
  30.101 +	below.</para>
  30.102 +
  30.103 +&interaction.daily.files.hidden;
  30.104 +
  30.105 +      <para id="x_1ae">Another way to tackle a need for an empty directory is to
  30.106 +	simply create one in your automated build scripts before they
  30.107 +	will need it.</para>
  30.108 +    </sect2>
  30.109 +  </sect1>
  30.110 +
  30.111 +  <sect1>
  30.112 +    <title>How to stop tracking a file</title>
  30.113 +
  30.114 +    <para id="x_1af">Once you decide that a file no longer belongs in
  30.115 +      your repository, use the <command role="hg-cmd">hg
  30.116 +	remove</command> command. This deletes the file, and tells
  30.117 +      Mercurial to stop tracking it (which will occur at the next
  30.118 +      commit).  A removed file is represented in the output of
  30.119 +      <command role="hg-cmd">hg status</command> with a
  30.120 +      <quote><literal>R</literal></quote>.</para>
  30.121 +
  30.122 +    &interaction.daily.files.remove;
  30.123 +
  30.124 +    <para id="x_1b0">After you <command role="hg-cmd">hg remove</command> a file,
  30.125 +      Mercurial will no longer track changes to that file, even if you
  30.126 +      recreate a file with the same name in your working directory.
  30.127 +      If you do recreate a file with the same name and want Mercurial
  30.128 +      to track the new file, simply <command role="hg-cmd">hg
  30.129 +	add</command> it. Mercurial will know that the newly added
  30.130 +      file is not related to the old file of the same name.</para>
  30.131 +
  30.132 +    <sect2>
  30.133 +      <title>Removing a file does not affect its history</title>
  30.134 +
  30.135 +      <para id="x_1b1">It is important to understand that removing a file has
  30.136 +	only two effects.</para>
  30.137 +      <itemizedlist>
  30.138 +	<listitem><para id="x_1b2">It removes the current version of the file
  30.139 +	    from the working directory.</para>
  30.140 +	</listitem>
  30.141 +	<listitem><para id="x_1b3">It stops Mercurial from tracking changes to
  30.142 +	    the file, from the time of the next commit.</para>
  30.143 +	</listitem></itemizedlist>
  30.144 +      <para id="x_1b4">Removing a file <emphasis>does not</emphasis> in any way
  30.145 +	alter the <emphasis>history</emphasis> of the file.</para>
  30.146 +
  30.147 +      <para id="x_1b5">If you update the working directory to a
  30.148 +	changeset that was committed when it was still tracking a file
  30.149 +	that you later removed, the file will reappear in the working
  30.150 +	directory, with the contents it had when you committed that
  30.151 +	changeset.  If you then update the working directory to a
  30.152 +	later changeset, in which the file had been removed, Mercurial
  30.153 +	will once again remove the file from the working
  30.154 +	directory.</para>
  30.155 +    </sect2>
  30.156 +
  30.157 +    <sect2>
  30.158 +      <title>Missing files</title>
  30.159 +
  30.160 +      <para id="x_1b6">Mercurial considers a file that you have deleted, but not
  30.161 +	used <command role="hg-cmd">hg remove</command> to delete, to
  30.162 +	be <emphasis>missing</emphasis>.  A missing file is
  30.163 +	represented with <quote><literal>!</literal></quote> in the
  30.164 +	output of <command role="hg-cmd">hg status</command>.
  30.165 +	Mercurial commands will not generally do anything with missing
  30.166 +	files.</para>
  30.167 +
  30.168 +      &interaction.daily.files.missing;
  30.169 +
  30.170 +      <para id="x_1b7">If your repository contains a file that <command
  30.171 +	  role="hg-cmd">hg status</command> reports as missing, and
  30.172 +	you want the file to stay gone, you can run <command
  30.173 +	  role="hg-cmd">hg remove <option
  30.174 +	    role="hg-opt-remove">--after</option></command> at any
  30.175 +	time later on, to tell Mercurial that you really did mean to
  30.176 +	remove the file.</para>
  30.177 +
  30.178 +      &interaction.daily.files.remove-after;
  30.179 +
  30.180 +      <para id="x_1b8">On the other hand, if you deleted the missing file by
  30.181 +	accident, give <command role="hg-cmd">hg revert</command> the
  30.182 +	name of the file to recover.  It will reappear, in unmodified
  30.183 +	form.</para>
  30.184 +
  30.185 +      &interaction.daily.files.recover-missing;
  30.186 +    </sect2>
  30.187 +
  30.188 +    <sect2>
  30.189 +      <title>Aside: why tell Mercurial explicitly to remove a
  30.190 +	file?</title>
  30.191 +
  30.192 +      <para id="x_1b9">You might wonder why Mercurial requires you to explicitly
  30.193 +	tell it that you are deleting a file.  Early during the
  30.194 +	development of Mercurial, it let you delete a file however you
  30.195 +	pleased; Mercurial would notice the absence of the file
  30.196 +	automatically when you next ran a <command role="hg-cmd">hg
  30.197 +	  commit</command>, and stop tracking the file.  In practice,
  30.198 +	this made it too easy to accidentally remove a file without
  30.199 +	noticing.</para>
  30.200 +    </sect2>
  30.201 +
  30.202 +    <sect2>
  30.203 +      <title>Useful shorthand&emdash;adding and removing files in one
  30.204 +	step</title>
  30.205 +
  30.206 +      <para id="x_1ba">Mercurial offers a combination command, <command
  30.207 +	  role="hg-cmd">hg addremove</command>, that adds untracked
  30.208 +	files and marks missing files as removed.</para>
  30.209 +
  30.210 +      &interaction.daily.files.addremove;
  30.211 +
  30.212 +      <para id="x_1bb">The <command role="hg-cmd">hg commit</command> command
  30.213 +	also provides a <option role="hg-opt-commit">-A</option>
  30.214 +	option that performs this same add-and-remove, immediately
  30.215 +	followed by a commit.</para>
  30.216 +
  30.217 +      &interaction.daily.files.commit-addremove;
  30.218 +    </sect2>
  30.219 +  </sect1>
  30.220 +
  30.221 +  <sect1 id="chap:daily.copy">
  30.222 +    <title>Copying files</title>
  30.223 +
  30.224 +    <para id="x_1bc">Mercurial provides a <command role="hg-cmd">hg
  30.225 +	copy</command> command that lets you make a new copy of a
  30.226 +      file.  When you copy a file using this command, Mercurial makes
  30.227 +      a record of the fact that the new file is a copy of the original
  30.228 +      file.  It treats these copied files specially when you merge
  30.229 +      your work with someone else's.</para>
  30.230 +
  30.231 +    <sect2>
  30.232 +      <title>The results of copying during a merge</title>
  30.233 +
  30.234 +      <para id="x_1bd">What happens during a merge is that changes
  30.235 +	<quote>follow</quote> a copy.  To best illustrate what this
  30.236 +	means, let's create an example.  We'll start with the usual
  30.237 +	tiny repository that contains a single file.</para>
  30.238 +
  30.239 +      &interaction.daily.copy.init;
  30.240 +
  30.241 +      <para id="x_1be">We need to do some work in
  30.242 +	parallel, so that we'll have something to merge.  So let's
  30.243 +	clone our repository.</para>
  30.244 +
  30.245 +      &interaction.daily.copy.clone;
  30.246 +
  30.247 +      <para id="x_1bf">Back in our initial repository, let's use the <command
  30.248 +	  role="hg-cmd">hg copy</command> command to make a copy of
  30.249 +	the first file we created.</para>
  30.250 +
  30.251 +      &interaction.daily.copy.copy;
  30.252 +
  30.253 +      <para id="x_1c0">If we look at the output of the <command role="hg-cmd">hg
  30.254 +	  status</command> command afterwards, the copied file looks
  30.255 +	just like a normal added file.</para>
  30.256 +
  30.257 +      &interaction.daily.copy.status;
  30.258 +
  30.259 +      <para id="x_1c1">But if we pass the <option
  30.260 +	  role="hg-opt-status">-C</option> option to <command
  30.261 +	  role="hg-cmd">hg status</command>, it prints another line of
  30.262 +	output: this is the file that our newly-added file was copied
  30.263 +	<emphasis>from</emphasis>.</para>
  30.264 +
  30.265 +      &interaction.daily.copy.status-copy;
  30.266 +
  30.267 +      <para id="x_1c2">Now, back in the repository we cloned, let's make a change
  30.268 +	in parallel.  We'll add a line of content to the original file
  30.269 +	that we created.</para>
  30.270 +
  30.271 +      &interaction.daily.copy.other;
  30.272 +
  30.273 +      <para id="x_1c3">Now we have a modified <filename>file</filename> in this
  30.274 +	repository.  When we pull the changes from the first
  30.275 +	repository, and merge the two heads, Mercurial will propagate
  30.276 +	the changes that we made locally to <filename>file</filename>
  30.277 +	into its copy, <filename>new-file</filename>.</para>
  30.278 +
  30.279 +      &interaction.daily.copy.merge;
  30.280 +    </sect2>
  30.281 +
  30.282 +    <sect2 id="sec:daily:why-copy">
  30.283 +      <title>Why should changes follow copies?</title>
  30.284 +
  30.285 +      <para id="x_1c4">This behavior&emdash;of changes to a file
  30.286 +	propagating out to copies of the file&emdash;might seem
  30.287 +	esoteric, but in most cases it's highly desirable.</para>
  30.288 +
  30.289 +      <para id="x_1c5">First of all, remember that this propagation
  30.290 +	<emphasis>only</emphasis> happens when you merge.  So if you
  30.291 +	<command role="hg-cmd">hg copy</command> a file, and
  30.292 +	subsequently modify the original file during the normal course
  30.293 +	of your work, nothing will happen.</para>
  30.294 +
  30.295 +      <para id="x_1c6">The second thing to know is that modifications will only
  30.296 +	propagate across a copy as long as the changeset that you're
  30.297 +	merging changes from <emphasis>hasn't yet seen</emphasis> 
  30.298 +	the copy.</para>
  30.299 +
  30.300 +      <para id="x_1c7">The reason that Mercurial does this is as follows.  Let's
  30.301 +	say I make an important bug fix in a source file, and commit
  30.302 +	my changes. Meanwhile, you've decided to <command
  30.303 +	  role="hg-cmd">hg copy</command> the file in your repository,
  30.304 +	without knowing about the bug or having seen the fix, and you
  30.305 +	have started hacking on your copy of the file.</para>
  30.306 +
  30.307 +      <para id="x_1c8">If you pulled and merged my changes, and Mercurial
  30.308 +	<emphasis>didn't</emphasis> propagate changes across copies,
  30.309 +	your new source file would now contain the bug, and unless you
  30.310 +	knew to propagate the bug fix by hand, the bug would
  30.311 +	<emphasis>remain</emphasis> in your copy of the file.</para>
  30.312 +
  30.313 +      <para id="x_1c9">By automatically propagating the change that fixed the bug
  30.314 +	from the original file to the copy, Mercurial prevents this
  30.315 +	class of problem. To my knowledge, Mercurial is the
  30.316 +	<emphasis>only</emphasis> revision control system that
  30.317 +	propagates changes across copies like this.</para>
  30.318 +
  30.319 +      <para id="x_1ca">Once your change history has a record that the copy and
  30.320 +	subsequent merge occurred, there's usually no further need to
  30.321 +	propagate changes from the original file to the copied file,
  30.322 +	and that's why Mercurial only propagates changes across copies
  30.323 +	at the first merge, and not afterwards.</para>
  30.324 +    </sect2>
  30.325 +
  30.326 +    <sect2>
  30.327 +      <title>How to make changes <emphasis>not</emphasis> follow a
  30.328 +	copy</title>
  30.329 +
  30.330 +      <para id="x_1cb">If, for some reason, you decide that this business of
  30.331 +	automatically propagating changes across copies is not for
  30.332 +	you, simply use your system's normal file copy command (on
  30.333 +	Unix-like systems, that's <command>cp</command>) to make a
  30.334 +	copy of a file, then <command role="hg-cmd">hg add</command>
  30.335 +	the new copy by hand.  Before you do so, though, please do
  30.336 +	reread <xref linkend="sec:daily:why-copy"/>, and make
  30.337 +	an informed
  30.338 +	decision that this behavior is not appropriate to your
  30.339 +	specific case.</para>
  30.340 +
  30.341 +    </sect2>
  30.342 +    <sect2>
  30.343 +      <title>Behavior of the <command role="hg-cmd">hg copy</command>
  30.344 +	command</title>
  30.345 +
  30.346 +      <para id="x_1cc">When you use the <command role="hg-cmd">hg copy</command>
  30.347 +	command, Mercurial makes a copy of each source file as it
  30.348 +	currently stands in the working directory.  This means that if
  30.349 +	you make some modifications to a file, then <command
  30.350 +	  role="hg-cmd">hg copy</command> it without first having
  30.351 +	committed those changes, the new copy will also contain the
  30.352 +	modifications you have made up until that point.  (I find this
  30.353 +	behavior a little counterintuitive, which is why I mention it
  30.354 +	here.)</para>
  30.355 +
  30.356 +      <para id="x_1cd">The <command role="hg-cmd">hg copy</command>
  30.357 +	command acts similarly to the Unix <command>cp</command>
  30.358 +	command (you can use the <command role="hg-cmd">hg
  30.359 +	  cp</command> alias if you prefer).  We must supply two or
  30.360 +	more arguments, of which the last is treated as the
  30.361 +	<emphasis>destination</emphasis>, and all others are
  30.362 +	<emphasis>sources</emphasis>.</para>
  30.363 +
  30.364 +      <para id="x_685">If you pass <command role="hg-cmd">hg copy</command> a
  30.365 +	single file as the source, and the destination does not exist,
  30.366 +	it creates a new file with that name.</para>
  30.367 +
  30.368 +      &interaction.daily.copy.simple;
  30.369 +      
  30.370 +      <para id="x_1ce">If the destination is a directory, Mercurial copies its
  30.371 +	sources into that directory.</para>
  30.372 +
  30.373 +      &interaction.daily.copy.dir-dest;
  30.374 +
  30.375 +      <para id="x_1cf">Copying a directory is
  30.376 +	recursive, and preserves the directory structure of the
  30.377 +	source.</para>
  30.378 +
  30.379 +      &interaction.daily.copy.dir-src;
  30.380 +
  30.381 +      <para id="x_1d0">If the source and destination are both directories, the
  30.382 +	source tree is recreated in the destination directory.</para>
  30.383 +
  30.384 +	&interaction.daily.copy.dir-src-dest;
  30.385 +
  30.386 +      <para id="x_1d1">As with the <command role="hg-cmd">hg remove</command>
  30.387 +	command, if you copy a file manually and then want Mercurial
  30.388 +	to know that you've copied the file, simply use the <option
  30.389 +	  role="hg-opt-copy">--after</option> option to <command
  30.390 +	  role="hg-cmd">hg copy</command>.</para>
  30.391 +
  30.392 +      &interaction.daily.copy.after;
  30.393 +    </sect2>
  30.394 +  </sect1>
  30.395 +
  30.396 +  <sect1>
  30.397 +    <title>Renaming files</title>
  30.398 +
  30.399 +    <para id="x_1d2">It's rather more common to need to rename a file than to
  30.400 +      make a copy of it.  The reason I discussed the <command
  30.401 +	role="hg-cmd">hg copy</command> command before talking about
  30.402 +      renaming files is that Mercurial treats a rename in essentially
  30.403 +      the same way as a copy.  Therefore, knowing what Mercurial does
  30.404 +      when you copy a file tells you what to expect when you rename a
  30.405 +      file.</para>
  30.406 +
  30.407 +    <para id="x_1d3">When you use the <command role="hg-cmd">hg rename</command>
  30.408 +      command, Mercurial makes a copy of each source file, then
  30.409 +      deletes it and marks the file as removed.</para>
  30.410 +
  30.411 +      &interaction.daily.rename.rename;
  30.412 +
  30.413 +    <para id="x_1d4">The <command role="hg-cmd">hg status</command> command shows
  30.414 +      the newly copied file as added, and the copied-from file as
  30.415 +      removed.</para>
  30.416 +
  30.417 +    &interaction.daily.rename.status;
  30.418 +
  30.419 +    <para id="x_1d5">As with the results of a <command role="hg-cmd">hg
  30.420 +	copy</command>, we must use the <option
  30.421 +	role="hg-opt-status">-C</option> option to <command
  30.422 +	role="hg-cmd">hg status</command> to see that the added file
  30.423 +      is really being tracked by Mercurial as a copy of the original,
  30.424 +      now removed, file.</para>
  30.425 +
  30.426 +    &interaction.daily.rename.status-copy;
  30.427 +
  30.428 +    <para id="x_1d6">As with <command role="hg-cmd">hg remove</command> and
  30.429 +      <command role="hg-cmd">hg copy</command>, you can tell Mercurial
  30.430 +      about a rename after the fact using the <option
  30.431 +	role="hg-opt-rename">--after</option> option.  In most other
  30.432 +      respects, the behavior of the <command role="hg-cmd">hg
  30.433 +	rename</command> command, and the options it accepts, are
  30.434 +      similar to the <command role="hg-cmd">hg copy</command>
  30.435 +      command.</para>
  30.436 +
  30.437 +    <para id="x_686">If you're familiar with the Unix command line, you'll be
  30.438 +      glad to know that <command role="hg-cmd">hg rename</command>
  30.439 +      command can be invoked as <command role="hg-cmd">hg
  30.440 +	mv</command>.</para>
  30.441 +
  30.442 +    <sect2>
  30.443 +      <title>Renaming files and merging changes</title>
  30.444 +
  30.445 +      <para id="x_1d7">Since Mercurial's rename is implemented as
  30.446 +	copy-and-remove, the same propagation of changes happens when
  30.447 +	you merge after a rename as after a copy.</para>
  30.448 +
  30.449 +      <para id="x_1d8">If I modify a file, and you rename it to a new name, and
  30.450 +	then we merge our respective changes, my modifications to the
  30.451 +	file under its original name will be propagated into the file
  30.452 +	under its new name. (This is something you might expect to
  30.453 +	<quote>simply work,</quote> but not all revision control
  30.454 +	systems actually do this.)</para>
  30.455 +
  30.456 +      <para id="x_1d9">Whereas having changes follow a copy is a feature where
  30.457 +	you can perhaps nod and say <quote>yes, that might be
  30.458 +	  useful,</quote> it should be clear that having them follow a
  30.459 +	rename is definitely important.  Without this facility, it
  30.460 +	would simply be too easy for changes to become orphaned when
  30.461 +	files are renamed.</para>
  30.462 +    </sect2>
  30.463 +
  30.464 +    <sect2>
  30.465 +      <title>Divergent renames and merging</title>
  30.466 +
  30.467 +      <para id="x_1da">The case of diverging names occurs when two developers
  30.468 +	start with a file&emdash;let's call it
  30.469 +	<filename>foo</filename>&emdash;in their respective
  30.470 +	repositories.</para>
  30.471 +
  30.472 +      &interaction.rename.divergent.clone;
  30.473 +
  30.474 +      <para id="x_1db">Anne renames the file to <filename>bar</filename>.</para>
  30.475 +
  30.476 +      &interaction.rename.divergent.rename.anne;
  30.477 +
  30.478 +      <para id="x_1dc">Meanwhile, Bob renames it to
  30.479 +	<filename>quux</filename>. (Remember that <command
  30.480 +	  role="hg-cmd">hg mv</command> is an alias for <command
  30.481 +	  role="hg-cmd">hg rename</command>.)</para>
  30.482 +
  30.483 +	&interaction.rename.divergent.rename.bob;
  30.484 +
  30.485 +      <para id="x_1dd">I like to think of this as a conflict because each
  30.486 +	developer has expressed different intentions about what the
  30.487 +	file ought to be named.</para>
  30.488 +
  30.489 +      <para id="x_1de">What do you think should happen when they merge their
  30.490 +	work? Mercurial's actual behavior is that it always preserves
  30.491 +	<emphasis>both</emphasis> names when it merges changesets that
  30.492 +	contain divergent renames.</para>
  30.493 +
  30.494 +      &interaction.rename.divergent.merge;
  30.495 +
  30.496 +      <para id="x_1df">Notice that while Mercurial warns about the divergent
  30.497 +	renames, it leaves it up to you to do something about the
  30.498 +	divergence after the merge.</para>
  30.499 +    </sect2>
  30.500 +
  30.501 +    <sect2>
  30.502 +      <title>Convergent renames and merging</title>
  30.503 +
  30.504 +      <para id="x_1e0">Another kind of rename conflict occurs when two people
  30.505 +	choose to rename different <emphasis>source</emphasis> files
  30.506 +	to the same <emphasis>destination</emphasis>. In this case,
  30.507 +	Mercurial runs its normal merge machinery, and lets you guide
  30.508 +	it to a suitable resolution.</para>
  30.509 +    </sect2>
  30.510 +
  30.511 +    <sect2>
  30.512 +      <title>Other name-related corner cases</title>
  30.513 +
  30.514 +      <para id="x_1e1">Mercurial has a longstanding bug in which it fails to
  30.515 +	handle a merge where one side has a file with a given name,
  30.516 +	while another has a directory with the same name.  This is
  30.517 +	documented as <ulink role="hg-bug"
  30.518 +	  url="http://www.selenic.com/mercurial/bts/issue29">issue
  30.519 +	  29</ulink>.</para>
  30.520 +
  30.521 +      &interaction.issue29.go;
  30.522 +
  30.523 +    </sect2>
  30.524 +  </sect1>
  30.525 +
  30.526 +  <sect1>
  30.527 +    <title>Recovering from mistakes</title>
  30.528 +
  30.529 +    <para id="x_1e2">Mercurial has some useful commands that will help you to
  30.530 +      recover from some common mistakes.</para>
  30.531 +
  30.532 +    <para id="x_1e3">The <command role="hg-cmd">hg revert</command> command lets
  30.533 +      you undo changes that you have made to your working directory.
  30.534 +      For example, if you <command role="hg-cmd">hg add</command> a
  30.535 +      file by accident, just run <command role="hg-cmd">hg
  30.536 +	revert</command> with the name of the file you added, and
  30.537 +      while the file won't be touched in any way, it won't be tracked
  30.538 +      for adding by Mercurial any longer, either.  You can also use
  30.539 +      <command role="hg-cmd">hg revert</command> to get rid of
  30.540 +      erroneous changes to a file.</para>
  30.541 +
  30.542 +    <para id="x_1e4">It is helpful to remember that the <command
  30.543 +	role="hg-cmd">hg revert</command> command is useful for
  30.544 +      changes that you have not yet committed.  Once you've committed
  30.545 +      a change, if you decide it was a mistake, you can still do
  30.546 +      something about it, though your options may be more
  30.547 +      limited.</para>
  30.548 +
  30.549 +    <para id="x_1e5">For more information about the <command
  30.550 +	role="hg-cmd">hg revert</command> command, and details about
  30.551 +      how to deal with changes you have already committed, see <xref
  30.552 +	linkend="chap:undo"/>.</para>
  30.553 +  </sect1>
  30.554 +
  30.555 +  <sect1>
  30.556 +    <title>Dealing with tricky merges</title>
  30.557 +
  30.558 +    <para id="x_687">In a complicated or large project, it's not unusual for a
  30.559 +      merge of two changesets to result in some headaches.  Suppose
  30.560 +      there's a big source file that's been extensively edited by each
  30.561 +      side of a merge: this is almost inevitably going to result in
  30.562 +      conflicts, some of which can take a few tries to sort
  30.563 +      out.</para>
  30.564 +
  30.565 +    <para id="x_688">Let's develop a simple case of this and see how to deal with
  30.566 +      it.  We'll start off with a repository containing one file, and
  30.567 +      clone it twice.</para>
  30.568 +
  30.569 +    &interaction.ch04-resolve.init;
  30.570 +
  30.571 +    <para id="x_689">In one clone, we'll modify the file in one way.</para>
  30.572 +
  30.573 +    &interaction.ch04-resolve.left;
  30.574 +
  30.575 +    <para id="x_68a">In another, we'll modify the file differently.</para>
  30.576 +
  30.577 +    &interaction.ch04-resolve.right;
  30.578 +
  30.579 +    <para id="x_68b">Next, we'll pull each set of changes into our original
  30.580 +      repo.</para>
  30.581 +
  30.582 +    &interaction.ch04-resolve.pull;
  30.583 +
  30.584 +    <para id="x_68c">We expect our repository to now contain two heads.</para>
  30.585 +
  30.586 +    &interaction.ch04-resolve.heads;
  30.587 +
  30.588 +    <para id="x_68d">Normally, if we run <command role="hg-cmd">hg
  30.589 +	merge</command> at this point, it will drop us into a GUI that
  30.590 +      will let us manually resolve the conflicting edits to
  30.591 +      <filename>myfile.txt</filename>.  However, to simplify things
  30.592 +      for presentation here, we'd like the merge to fail immediately
  30.593 +      instead.  Here's one way we can do so.</para>
  30.594 +
  30.595 +    &interaction.ch04-resolve.export;
  30.596 +
  30.597 +    <para id="x_68e">We've told Mercurial's merge machinery to run the command
  30.598 +      <command>false</command> (which, as we desire, fails
  30.599 +      immediately) if it detects a merge that it can't sort out
  30.600 +      automatically.</para>
  30.601 +
  30.602 +    <para id="x_68f">If we now fire up <command role="hg-cmd">hg
  30.603 +	merge</command>, it should grind to a halt and report a
  30.604 +	failure.</para>
  30.605 +
  30.606 +    &interaction.ch04-resolve.merge;
  30.607 +
  30.608 +    <para id="x_690">Even if we don't notice that the merge failed, Mercurial
  30.609 +      will prevent us from accidentally committing the result of a
  30.610 +      failed merge.</para>
  30.611 +
  30.612 +    &interaction.ch04-resolve.cifail;
  30.613 +
  30.614 +    <para id="x_691">When <command role="hg-cmd">hg commit</command> fails in
  30.615 +      this case, it suggests that we use the unfamiliar <command
  30.616 +	role="hg-cmd">hg resolve</command> command.  As usual,
  30.617 +	<command role="hg-cmd">hg help resolve</command> will print a
  30.618 +      helpful synopsis.</para>
  30.619 +
  30.620 +    <sect2>
  30.621 +      <title>File resolution states</title>
  30.622 +
  30.623 +      <para id="x_692">When a merge occurs, most files will usually remain
  30.624 +	unmodified.  For each file where Mercurial has to do
  30.625 +	something, it tracks the state of the file.</para>
  30.626 +
  30.627 +      <itemizedlist>
  30.628 +	<listitem>
  30.629 +	  <para id="x_693">A <emphasis>resolved</emphasis> file has been
  30.630 +	    successfully merged, either automatically by Mercurial or
  30.631 +	    manually with human intervention.</para>
  30.632 +	</listitem>
  30.633 +	<listitem>
  30.634 +	  <para id="x_694">An <emphasis>unresolved</emphasis> file was not merged
  30.635 +	    successfully, and needs more attention.</para>
  30.636 +	</listitem>
  30.637 +      </itemizedlist>
  30.638 +
  30.639 +      <para id="x_695">If Mercurial sees <emphasis>any</emphasis> file in the
  30.640 +	unresolved state after a merge, it considers the merge to have
  30.641 +	failed.  Fortunately, we do not need to restart the entire
  30.642 +	merge from scratch.</para>
  30.643 +
  30.644 +      <para id="x_696">The <option role="hg-opt-resolve">--list</option> or
  30.645 +	<option role="hg-opt-resolve">-l</option> option to <command
  30.646 +	  role="hg-cmd">hg resolve</command> prints out the state of
  30.647 +	each merged file.</para>
  30.648 +
  30.649 +      &interaction.ch04-resolve.list;
  30.650 +
  30.651 +      <para id="x_697">In the output from <command role="hg-cmd">hg
  30.652 +	  resolve</command>, a resolved file is marked with
  30.653 +	<literal>R</literal>, while an unresolved file is marked with
  30.654 +	<literal>U</literal>.  If any files are listed with
  30.655 +	<literal>U</literal>, we know that an attempt to commit the
  30.656 +	results of the merge will fail.</para>
  30.657 +    </sect2>
  30.658 +
  30.659 +    <sect2>
  30.660 +      <title>Resolving a file merge</title>
  30.661 +
  30.662 +      <para id="x_698">We have several options to move a file from the unresolved
  30.663 +	into the resolved state.  By far the most common is to rerun
  30.664 +	<command role="hg-cmd">hg resolve</command>.  If we pass the
  30.665 +	names of individual files or directories, it will retry the
  30.666 +	merges of any unresolved files present in those locations. We
  30.667 +	can also pass the <option role="hg-opt-resolve">--all</option>
  30.668 +	or <option role="hg-opt-resolve">-a</option> option, which
  30.669 +	will retry the merges of <emphasis>all</emphasis> unresolved
  30.670 +	files.</para>
  30.671 +
  30.672 +      <para id="x_699">Mercurial also lets us modify the resolution state of a
  30.673 +	file directly.  We can manually mark a file as resolved using
  30.674 +	the <option role="hg-opt-resolve">--mark</option> option, or
  30.675 +	as unresolved using the <option
  30.676 +	  role="hg-opt-resolve">--unmark</option> option.  This allows
  30.677 +	us to clean up a particularly messy merge by hand, and to keep
  30.678 +	track of our progress with each file as we go.</para>
  30.679 +    </sect2>
  30.680 +  </sect1>
  30.681 +
  30.682 +  <sect1>
  30.683 +    <title>More useful diffs</title>
  30.684 +
  30.685 +    <para id="x_6c7">The default output of the <command role="hg-cmd">hg
  30.686 +	diff</command> command is backwards compatible with the
  30.687 +      regular <command>diff</command> command, but this has some
  30.688 +      drawbacks.</para>
  30.689 +
  30.690 +    <para id="x_6c8">Consider the case where we use <command role="hg-cmd">hg
  30.691 +	rename</command> to rename a file.</para>
  30.692 +
  30.693 +    &interaction.ch04-diff.rename.basic;
  30.694 +
  30.695 +    <para id="x_6c9">The output of <command role="hg-cmd">hg diff</command> above
  30.696 +      obscures the fact that we simply renamed a file.  The <command
  30.697 +	role="hg-cmd">hg diff</command> command accepts an option,
  30.698 +      <option>--git</option> or <option>-g</option>, to use a newer
  30.699 +      diff format that displays such information in a more readable
  30.700 +      form.</para>
  30.701 +
  30.702 +    &interaction.ch04-diff.rename.git;
  30.703 +
  30.704 +    <para id="x_6ca">This option also helps with a case that can otherwise be
  30.705 +      confusing: a file that appears to be modified according to
  30.706 +      <command role="hg-cmd">hg status</command>, but for which
  30.707 +      <command role="hg-cmd">hg diff</command> prints nothing. This
  30.708 +      situation can arise if we change the file's execute
  30.709 +      permissions.</para>
  30.710 +
  30.711 +    &interaction.ch04-diff.chmod;
  30.712 +
  30.713 +    <para id="x_6cb">The normal <command>diff</command> command pays no attention
  30.714 +      to file permissions, which is why <command role="hg-cmd">hg
  30.715 +	diff</command> prints nothing by default.  If we supply it
  30.716 +      with the <option>-g</option> option, it tells us what really
  30.717 +      happened.</para>
  30.718 +
  30.719 +    &interaction.ch04-diff.chmod.git;
  30.720 +  </sect1>
  30.721 +
  30.722 +  <sect1>
  30.723 +    <title>Which files to manage, and which to avoid</title>
  30.724 +
  30.725 +    <para id="x_6cc">Revision control systems are generally best at managing text
  30.726 +      files that are written by humans, such as source code, where the
  30.727 +      files do not change much from one revision to the next.  Some
  30.728 +      centralized revision control systems can also deal tolerably
  30.729 +      well with binary files, such as bitmap images.</para>
  30.730 +
  30.731 +    <para id="x_6cd">For instance, a game development team will typically manage
  30.732 +      both its source code and all of its binary assets (e.g. geometry
  30.733 +      data, textures, map layouts) in a revision control
  30.734 +      system.</para>
  30.735 +
  30.736 +    <para id="x_6ce">Because it is usually impossible to merge two conflicting
  30.737 +      modifications to a binary file, centralized systems often
  30.738 +      provide a file locking mechanism that allow a user to say
  30.739 +      <quote>I am the only person who can edit this
  30.740 +	file</quote>.</para>
  30.741 +
  30.742 +    <para id="x_6cf">Compared to a centralized system, a distributed revision
  30.743 +      control system changes some of the factors that guide decisions
  30.744 +      over which files to manage and how.</para>
  30.745 +
  30.746 +    <para id="x_6d0">For instance, a distributed revision control system cannot,
  30.747 +      by its nature, offer a file locking facility.  There is thus no
  30.748 +      built-in mechanism to prevent two people from making conflicting
  30.749 +      changes to a binary file.  If you have a team where several
  30.750 +      people may be editing binary files frequently, it may not be a
  30.751 +      good idea to use Mercurial&emdash;or any other distributed
  30.752 +      revision control system&emdash;to manage those files.</para>
  30.753 +
  30.754 +    <para id="x_6d1">When storing modifications to a file, Mercurial usually
  30.755 +      saves only the differences between the previous and current
  30.756 +      versions of the file.  For most text files, this is extremely
  30.757 +      efficient. However, some files (particularly binary files) are
  30.758 +      laid out in such a way that even a small change to a file's
  30.759 +      logical content results in many or most of the bytes inside the
  30.760 +      file changing.  For instance, compressed files are particularly
  30.761 +      susceptible to this. If the differences between each successive
  30.762 +      version of a file are always large, Mercurial will not be able
  30.763 +      to store the file's revision history very efficiently.  This can
  30.764 +      affect both local storage needs and the amount of time it takes
  30.765 +      to clone a repository.</para>
  30.766 +
  30.767 +    <para id="x_6d2">To get an idea of how this could affect you in practice,
  30.768 +      suppose you want to use Mercurial to manage an OpenOffice
  30.769 +      document.  OpenOffice stores documents on disk as compressed zip
  30.770 +      files. Edit even a single letter of your document in OpenOffice,
  30.771 +      and almost every byte in the entire file will change when you
  30.772 +      save it. Now suppose that file is 2MB in size.  Because most of
  30.773 +      the file changes every time you save, Mercurial will have to
  30.774 +      store all 2MB of the file every time you commit, even though
  30.775 +      from your perspective, perhaps only a few words are changing
  30.776 +      each time.  A single frequently-edited file that is not friendly
  30.777 +      to Mercurial's storage assumptions can easily have an outsized
  30.778 +      effect on the size of the repository.</para>
  30.779 +
  30.780 +    <para id="x_6d3">Even worse, if both you and someone else edit the OpenOffice
  30.781 +      document you're working on, there is no useful way to merge your
  30.782 +      work. In fact, there isn't even a good way to tell what the
  30.783 +      differences are between your respective changes.</para>
  30.784 +
  30.785 +    <para id="x_6d4">There are thus a few clear recommendations about specific
  30.786 +      kinds of files to be very careful with.</para>
  30.787 +
  30.788 +    <itemizedlist>
  30.789 +      <listitem>
  30.790 +	<para id="x_6d5">Files that are very large and incompressible, e.g. ISO
  30.791 +	  CD-ROM images, will by virtue of sheer size make clones over
  30.792 +	  a network very slow.</para>
  30.793 +      </listitem>
  30.794 +      <listitem>
  30.795 +	<para id="x_6d6">Files that change a lot from one revision to the next
  30.796 +	  may be expensive to store if you edit them frequently, and
  30.797 +	  conflicts due to concurrent edits may be difficult to
  30.798 +	  resolve.</para>
  30.799 +      </listitem>
  30.800 +    </itemizedlist>
  30.801 +  </sect1>
  30.802 +
  30.803 +  <sect1>
  30.804 +    <title>Backups and mirroring</title>
  30.805 +
  30.806 +    <para id="x_6d7">Since Mercurial maintains a complete copy of history in each
  30.807 +      clone, everyone who uses Mercurial to collaborate on a project
  30.808 +      can potentially act as a source of backups in the event of a
  30.809 +      catastrophe.  If a central repository becomes unavailable, you
  30.810 +      can construct a replacement simply by cloning a copy of the
  30.811 +      repository from one contributor, and pulling any changes they
  30.812 +      may not have seen from others.</para>
  30.813 +
  30.814 +    <para id="x_6d8">It is simple to use Mercurial to perform off-site backups
  30.815 +      and remote mirrors.  Set up a periodic job (e.g. via the
  30.816 +      <command>cron</command> command) on a remote server to pull
  30.817 +      changes from your master repositories every hour.  This will
  30.818 +      only be tricky in the unlikely case that the number of master
  30.819 +      repositories you maintain changes frequently, in which case
  30.820 +      you'll need to do a little scripting to refresh the list of
  30.821 +      repositories to back up.</para>
  30.822 +
  30.823 +    <para id="x_6d9">If you perform traditional backups of your master
  30.824 +      repositories to tape or disk, and you want to back up a
  30.825 +      repository named <filename>myrepo</filename>, use <command>hg
  30.826 +	clone -U myrepo myrepo.bak</command> to create a
  30.827 +      clone of <filename>myrepo</filename> before you start your
  30.828 +      backups.  The <option>-U</option> option doesn't check out a
  30.829 +      working directory after the clone completes, since that would be
  30.830 +      superfluous and make the backup take longer.</para>
  30.831 +
  30.832 +    <para id="x_6da">If you then back up <filename>myrepo.bak</filename> instead
  30.833 +      of <filename>myrepo</filename>, you will be guaranteed to have a
  30.834 +      consistent snapshot of your repository that won't be pushed to
  30.835 +      by an insomniac developer in mid-backup.</para>
  30.836 +  </sect1>
  30.837 +</chapter>
  30.838 +
  30.839 +<!--
  30.840 +local variables: 
  30.841 +sgml-parent-document: ("00book.xml" "book" "chapter")
  30.842 +end:
  30.843 +-->
    31.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.2 +++ b/en/ch06-collab.xml	Sun Aug 16 03:41:39 2009 +0200
    31.3 @@ -0,0 +1,1565 @@
    31.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    31.5 +
    31.6 +<chapter id="cha:collab">
    31.7 +  <?dbhtml filename="collaborating-with-other-people.html"?>
    31.8 +  <title>Collaborating with other people</title>
    31.9 +
   31.10 +  <para id="x_44a">As a completely decentralised tool, Mercurial doesn't impose
   31.11 +    any policy on how people ought to work with each other.  However,
   31.12 +    if you're new to distributed revision control, it helps to have
   31.13 +    some tools and examples in mind when you're thinking about
   31.14 +    possible workflow models.</para>
   31.15 +
   31.16 +  <sect1>
   31.17 +    <title>Mercurial's web interface</title>
   31.18 +
   31.19 +    <para id="x_44b">Mercurial has a powerful web interface that provides several
   31.20 +      useful capabilities.</para>
   31.21 +
   31.22 +    <para id="x_44c">For interactive use, the web interface lets you browse a
   31.23 +      single repository or a collection of repositories.  You can view
   31.24 +      the history of a repository, examine each change (comments and
   31.25 +      diffs), and view the contents of each directory and file.  You
   31.26 +      can even get a view of history that gives a graphical view of
   31.27 +      the relationships between individual changes and merges.</para>
   31.28 +
   31.29 +    <para id="x_44d">Also for human consumption, the web interface provides
   31.30 +      Atom and RSS feeds of the changes in a repository.  This lets you
   31.31 +      <quote>subscribe</quote> to a repository using your favorite
   31.32 +      feed reader, and be automatically notified of activity in that
   31.33 +      repository as soon as it happens.  I find this capability much
   31.34 +      more convenient than the model of subscribing to a mailing list
   31.35 +      to which notifications are sent, as it requires no additional
   31.36 +      configuration on the part of whoever is serving the
   31.37 +      repository.</para>
   31.38 +
   31.39 +    <para id="x_44e">The web interface also lets remote users clone a repository,
   31.40 +      pull changes from it, and (when the server is configured to
   31.41 +      permit it) push changes back to it.  Mercurial's HTTP tunneling
   31.42 +      protocol aggressively compresses data, so that it works
   31.43 +      efficiently even over low-bandwidth network connections.</para>
   31.44 +
   31.45 +    <para id="x_44f">The easiest way to get started with the web interface is to
   31.46 +      use your web browser to visit an existing repository, such as
   31.47 +      the master Mercurial repository at <ulink
   31.48 +	url="http://www.selenic.com/repo/hg">http://www.selenic.com/repo/hg</ulink>.</para>
   31.49 +
   31.50 +    <para id="x_450">If you're interested in providing a web interface
   31.51 +      to your own repositories, there are several good ways to do
   31.52 +      this.</para>
   31.53 +
   31.54 +    <para id="x_69d">The easiest and fastest way to get started in an informal
   31.55 +      environment is to use the <command role="hg-cmd">hg
   31.56 +	serve</command> command, which is best suited to short-term
   31.57 +      <quote>lightweight</quote> serving.  See <xref
   31.58 +	linkend="sec:collab:serve"/> below for details of how to use
   31.59 +      this command.</para>
   31.60 +
   31.61 +    <para id="x_69e">For longer-lived repositories that you'd like to
   31.62 +      have permanently available, there are several public hosting
   31.63 +      services available.  Some are free to open source projects,
   31.64 +      while others offer paid commercial hosting.  An up-to-date list
   31.65 +      is available at <ulink
   31.66 +	url="http://www.selenic.com/mercurial/wiki/index.cgi/MercurialHosting">http://www.selenic.com/mercurial/wiki/index.cgi/MercurialHosting</ulink>.</para>
   31.67 +
   31.68 +    <para id="x_6a0">If you would prefer to host your own repositories, Mercurial
   31.69 +      has built-in support for several popular hosting technologies,
   31.70 +      most notably CGI (Common Gateway Interface), and WSGI (Web
   31.71 +      Services Gateway Interface).  See <xref
   31.72 +	linkend="sec:collab:cgi"/> for details of CGI and WSGI
   31.73 +      configuration.</para>
   31.74 +  </sect1>
   31.75 +
   31.76 +  <sect1>
   31.77 +    <title>Collaboration models</title>
   31.78 +
   31.79 +    <para id="x_451">With a suitably flexible tool, making decisions about
   31.80 +      workflow is much more of a social engineering challenge than a
   31.81 +      technical one. Mercurial imposes few limitations on how you can
   31.82 +      structure the flow of work in a project, so it's up to you and
   31.83 +      your group to set up and live with a model that matches your own
   31.84 +      particular needs.</para>
   31.85 +
   31.86 +    <sect2>
   31.87 +      <title>Factors to keep in mind</title>
   31.88 +
   31.89 +      <para id="x_452">The most important aspect of any model that you must keep
   31.90 +	in mind is how well it matches the needs and capabilities of
   31.91 +	the people who will be using it.  This might seem
   31.92 +	self-evident; even so, you still can't afford to forget it for
   31.93 +	a moment.</para>
   31.94 +
   31.95 +      <para id="x_453">I once put together a workflow model that seemed to make
   31.96 +	perfect sense to me, but that caused a considerable amount of
   31.97 +	consternation and strife within my development team.  In spite
   31.98 +	of my attempts to explain why we needed a complex set of
   31.99 +	branches, and how changes ought to flow between them, a few
  31.100 +	team members revolted.  Even though they were smart people,
  31.101 +	they didn't want to pay attention to the constraints we were
  31.102 +	operating under, or face the consequences of those constraints
  31.103 +	in the details of the model that I was advocating.</para>
  31.104 +
  31.105 +      <para id="x_454">Don't sweep foreseeable social or technical problems under
  31.106 +	the rug. Whatever scheme you put into effect, you should plan
  31.107 +	for mistakes and problem scenarios.  Consider adding automated
  31.108 +	machinery to prevent, or quickly recover from, trouble that
  31.109 +	you can anticipate.  As an example, if you intend to have a
  31.110 +	branch with not-for-release changes in it, you'd do well to
  31.111 +	think early about the possibility that someone might
  31.112 +	accidentally merge those changes into a release branch.  You
  31.113 +	could avoid this particular problem by writing a hook that
  31.114 +	prevents changes from being merged from an inappropriate
  31.115 +	branch.</para>
  31.116 +    </sect2>
  31.117 +
  31.118 +    <sect2>
  31.119 +      <title>Informal anarchy</title>
  31.120 +
  31.121 +      <para id="x_455">I wouldn't suggest an <quote>anything goes</quote>
  31.122 +	approach as something sustainable, but it's a model that's
  31.123 +	easy to grasp, and it works perfectly well in a few unusual
  31.124 +	situations.</para>
  31.125 +
  31.126 +      <para id="x_456">As one example, many projects have a loose-knit group of
  31.127 +	collaborators who rarely physically meet each other.  Some
  31.128 +	groups like to overcome the isolation of working at a distance
  31.129 +	by organizing occasional <quote>sprints</quote>.  In a sprint,
  31.130 +	a number of people get together in a single location (a
  31.131 +	company's conference room, a hotel meeting room, that kind of
  31.132 +	place) and spend several days more or less locked in there,
  31.133 +	hacking intensely on a handful of projects.</para>
  31.134 +
  31.135 +      <para id="x_457">A sprint or a hacking session in a coffee shop are the perfect places to use the
  31.136 +	<command role="hg-cmd">hg serve</command> command, since
  31.137 +	<command role="hg-cmd">hg serve</command> does not require any
  31.138 +	fancy server infrastructure.  You can get started with
  31.139 +	<command role="hg-cmd">hg serve</command> in moments, by
  31.140 +	reading <xref linkend="sec:collab:serve"/> below.  Then simply
  31.141 +	tell the person next to you that you're running a server, send
  31.142 +	the URL to them in an instant message, and you immediately
  31.143 +	have a quick-turnaround way to work together.  They can type
  31.144 +	your URL into their web browser and quickly review your
  31.145 +	changes; or they can pull a bugfix from you and verify it; or
  31.146 +	they can clone a branch containing a new feature and try it
  31.147 +	out.</para>
  31.148 +
  31.149 +      <para id="x_458">The charm, and the problem, with doing things
  31.150 +	in an ad hoc fashion like this is that only people who know
  31.151 +	about your changes, and where they are, can see them.  Such an
  31.152 +	informal approach simply doesn't scale beyond a handful
  31.153 +	people, because each individual needs to know about
  31.154 +	<emphasis>n</emphasis> different repositories to pull
  31.155 +	from.</para>
  31.156 +    </sect2>
  31.157 +
  31.158 +    <sect2>
  31.159 +      <title>A single central repository</title>
  31.160 +
  31.161 +      <para id="x_459">For smaller projects migrating from a centralised revision
  31.162 +	control tool, perhaps the easiest way to get started is to
  31.163 +	have changes flow through a single shared central repository.
  31.164 +	This is also the most common <quote>building block</quote> for
  31.165 +	more ambitious workflow schemes.</para>
  31.166 +
  31.167 +      <para id="x_45a">Contributors start by cloning a copy of this repository.
  31.168 +	They can pull changes from it whenever they need to, and some
  31.169 +	(perhaps all) developers have permission to push a change back
  31.170 +	when they're ready for other people to see it.</para>
  31.171 +
  31.172 +      <para id="x_45b">Under this model, it can still often make sense for people
  31.173 +	to pull changes directly from each other, without going
  31.174 +	through the central repository.  Consider a case in which I
  31.175 +	have a tentative bug fix, but I am worried that if I were to
  31.176 +	publish it to the central repository, it might subsequently
  31.177 +	break everyone else's trees as they pull it.  To reduce the
  31.178 +	potential for damage, I can ask you to clone my repository
  31.179 +	into a temporary repository of your own and test it.  This
  31.180 +	lets us put off publishing the potentially unsafe change until
  31.181 +	it has had a little testing.</para>
  31.182 +
  31.183 +      <para id="x_45c">If a team is hosting its own repository in this
  31.184 +	kind of scenario, people will usually use the
  31.185 +	<command>ssh</command> protocol to securely push changes to
  31.186 +	the central repository, as documented in <xref
  31.187 +	  linkend="sec:collab:ssh"/>.  It's also usual to publish a
  31.188 +	read-only copy of the repository over HTTP, as in
  31.189 +	<xref linkend="sec:collab:cgi"/>. Publishing over HTTP
  31.190 +	satisfies the needs of people who don't have push access, and
  31.191 +	those who want to use web browsers to browse the repository's
  31.192 +	history.</para>
  31.193 +    </sect2>
  31.194 +
  31.195 +    <sect2>
  31.196 +      <title>A hosted central repository</title>
  31.197 +
  31.198 +      <para id="x_6a1">A wonderful thing about public hosting services like
  31.199 +	<ulink url="http://bitbucket.org/">Bitbucket</ulink> is that
  31.200 +	not only do they handle the fiddly server configuration
  31.201 +	details, such as user accounts, authentication, and secure
  31.202 +	wire protocols, they provide additional infrastructure to make
  31.203 +	this model work well.</para>
  31.204 +
  31.205 +      <para id="x_6a2">For instance, a well-engineered hosting service will let
  31.206 +	people clone their own copies of a repository with a single
  31.207 +	click.  This lets people work in separate spaces and share
  31.208 +	their changes when they're ready.</para>
  31.209 +
  31.210 +      <para id="x_6a3">In addition, a good hosting service will let people
  31.211 +	communicate with each other, for instance to say <quote>there
  31.212 +	  are changes ready for you to review in this
  31.213 +	  tree</quote>.</para>
  31.214 +    </sect2>
  31.215 +
  31.216 +    <sect2>
  31.217 +      <title>Working with multiple branches</title>
  31.218 +
  31.219 +      <para id="x_45d">Projects of any significant size naturally tend to make
  31.220 +	progress on several fronts simultaneously.  In the case of
  31.221 +	software, it's common for a project to go through periodic
  31.222 +	official releases.  A release might then go into
  31.223 +	<quote>maintenance mode</quote> for a while after its first
  31.224 +	publication; maintenance releases tend to contain only bug
  31.225 +	fixes, not new features.  In parallel with these maintenance
  31.226 +	releases, one or more future releases may be under
  31.227 +	development.  People normally use the word
  31.228 +	<quote>branch</quote> to refer to one of these many slightly
  31.229 +	different directions in which development is
  31.230 +	proceeding.</para>
  31.231 +
  31.232 +      <para id="x_45e">Mercurial is particularly well suited to managing a number
  31.233 +	of simultaneous, but not identical, branches.  Each
  31.234 +	<quote>development direction</quote> can live in its own
  31.235 +	central repository, and you can merge changes from one to
  31.236 +	another as the need arises.  Because repositories are
  31.237 +	independent of each other, unstable changes in a development
  31.238 +	branch will never affect a stable branch unless someone
  31.239 +	explicitly merges those changes into the stable branch.</para>
  31.240 +
  31.241 +      <para id="x_45f">Here's an example of how this can work in practice.  Let's
  31.242 +	say you have one <quote>main branch</quote> on a central
  31.243 +	server.</para>
  31.244 +
  31.245 +      &interaction.branching.init;
  31.246 +
  31.247 +      <para id="x_460">People clone it, make changes locally, test them, and push
  31.248 +	them back.</para>
  31.249 +
  31.250 +      <para id="x_461">Once the main branch reaches a release milestone, you can
  31.251 +	use the <command role="hg-cmd">hg tag</command> command to
  31.252 +	give a permanent name to the milestone revision.</para>
  31.253 +
  31.254 +	&interaction.branching.tag;
  31.255 +
  31.256 +      <para id="x_462">Let's say some ongoing
  31.257 +	development occurs on the main branch.</para>
  31.258 +
  31.259 +      &interaction.branching.main;
  31.260 +
  31.261 +      <para id="x_463">Using the tag that was recorded at the milestone, people
  31.262 +	who clone that repository at any time in the future can use
  31.263 +	<command role="hg-cmd">hg update</command> to get a copy of
  31.264 +	the working directory exactly as it was when that tagged
  31.265 +	revision was committed.</para>
  31.266 +
  31.267 +      &interaction.branching.update;
  31.268 +
  31.269 +      <para id="x_464">In addition, immediately after the main branch is tagged,
  31.270 +	we can then clone the main branch on the server to a new
  31.271 +	<quote>stable</quote> branch, also on the server.</para>
  31.272 +
  31.273 +      &interaction.branching.clone;
  31.274 +
  31.275 +      <para id="x_465">If we need to make a change to the stable
  31.276 +	branch, we can then clone <emphasis>that</emphasis>
  31.277 +	repository, make our changes, commit, and push our changes
  31.278 +	back there.</para>
  31.279 +
  31.280 +      &interaction.branching.stable;
  31.281 +
  31.282 +      <para id="x_466">Because Mercurial repositories are independent, and
  31.283 +	Mercurial doesn't move changes around automatically, the
  31.284 +	stable and main branches are <emphasis>isolated</emphasis>
  31.285 +	from each other.  The changes that we made on the main branch
  31.286 +	don't <quote>leak</quote> to the stable branch, and vice
  31.287 +	versa.</para>
  31.288 +
  31.289 +      <para id="x_467">We'll often want all of our bugfixes on the stable
  31.290 +	branch to show up on the main branch, too.  Rather than
  31.291 +	rewrite a bugfix on the main branch, we can simply pull and
  31.292 +	merge changes from the stable to the main branch, and
  31.293 +	Mercurial will bring those bugfixes in for us.</para>
  31.294 +
  31.295 +      &interaction.branching.merge;
  31.296 +
  31.297 +      <para id="x_468">The main branch will still contain changes that
  31.298 +	are not on the stable branch, but it will also contain all of
  31.299 +	the bugfixes from the stable branch.  The stable branch
  31.300 +	remains unaffected by these changes, since changes are only
  31.301 +	flowing from the stable to the main branch, and not the other
  31.302 +	way.</para>
  31.303 +    </sect2>
  31.304 +
  31.305 +    <sect2>
  31.306 +      <title>Feature branches</title>
  31.307 +
  31.308 +      <para id="x_469">For larger projects, an effective way to manage change is
  31.309 +	to break up a team into smaller groups.  Each group has a
  31.310 +	shared branch of its own, cloned from a single
  31.311 +	<quote>master</quote> branch used by the entire project.
  31.312 +	People working on an individual branch are typically quite
  31.313 +	isolated from developments on other branches.</para>
  31.314 +
  31.315 +      <figure id="fig:collab:feature-branches">
  31.316 +	<title>Feature branches</title>
  31.317 +	<mediaobject>
  31.318 +	  <imageobject><imagedata width="100%" fileref="figs/feature-branches.png"/></imageobject>
  31.319 +	  <textobject><phrase>XXX add text</phrase></textobject>
  31.320 +	</mediaobject>
  31.321 +      </figure>
  31.322 +
  31.323 +      <para id="x_46b">When a particular feature is deemed to be in suitable
  31.324 +	shape, someone on that feature team pulls and merges from the
  31.325 +	master branch into the feature branch, then pushes back up to
  31.326 +	the master branch.</para>
  31.327 +    </sect2>
  31.328 +
  31.329 +    <sect2>
  31.330 +      <title>The release train</title>
  31.331 +
  31.332 +      <para id="x_46c">Some projects are organized on a <quote>train</quote>
  31.333 +	basis: a release is scheduled to happen every few months, and
  31.334 +	whatever features are ready when the <quote>train</quote> is
  31.335 +	ready to leave are allowed in.</para>
  31.336 +
  31.337 +      <para id="x_46d">This model resembles working with feature branches.  The
  31.338 +	difference is that when a feature branch misses a train,
  31.339 +	someone on the feature team pulls and merges the changes that
  31.340 +	went out on that train release into the feature branch, and
  31.341 +	the team continues its work on top of that release so that
  31.342 +	their feature can make the next release.</para>
  31.343 +    </sect2>
  31.344 +
  31.345 +    <sect2>
  31.346 +      <title>The Linux kernel model</title>
  31.347 +
  31.348 +      <para id="x_46e">The development of the Linux kernel has a shallow
  31.349 +	hierarchical structure, surrounded by a cloud of apparent
  31.350 +	chaos.  Because most Linux developers use
  31.351 +	<command>git</command>, a distributed revision control tool
  31.352 +	with capabilities similar to Mercurial, it's useful to
  31.353 +	describe the way work flows in that environment; if you like
  31.354 +	the ideas, the approach translates well across tools.</para>
  31.355 +
  31.356 +      <para id="x_46f">At the center of the community sits Linus Torvalds, the
  31.357 +	creator of Linux.  He publishes a single source repository
  31.358 +	that is considered the <quote>authoritative</quote> current
  31.359 +	tree by the entire developer community. Anyone can clone
  31.360 +	Linus's tree, but he is very choosy about whose trees he pulls
  31.361 +	from.</para>
  31.362 +
  31.363 +      <para id="x_470">Linus has a number of <quote>trusted lieutenants</quote>.
  31.364 +	As a general rule, he pulls whatever changes they publish, in
  31.365 +	most cases without even reviewing those changes.  Some of
  31.366 +	those lieutenants are generally agreed to be
  31.367 +	<quote>maintainers</quote>, responsible for specific
  31.368 +	subsystems within the kernel.  If a random kernel hacker wants
  31.369 +	to make a change to a subsystem that they want to end up in
  31.370 +	Linus's tree, they must find out who the subsystem's
  31.371 +	maintainer is, and ask that maintainer to take their change.
  31.372 +	If the maintainer reviews their changes and agrees to take
  31.373 +	them, they'll pass them along to Linus in due course.</para>
  31.374 +
  31.375 +      <para id="x_471">Individual lieutenants have their own approaches to
  31.376 +	reviewing, accepting, and publishing changes; and for deciding
  31.377 +	when to feed them to Linus.  In addition, there are several
  31.378 +	well known branches that people use for different purposes.
  31.379 +	For example, a few people maintain <quote>stable</quote>
  31.380 +	repositories of older versions of the kernel, to which they
  31.381 +	apply critical fixes as needed.  Some maintainers publish
  31.382 +	multiple trees: one for experimental changes; one for changes
  31.383 +	that they are about to feed upstream; and so on.  Others just
  31.384 +	publish a single tree.</para>
  31.385 +
  31.386 +      <para id="x_472">This model has two notable features.  The first is that
  31.387 +	it's <quote>pull only</quote>.  You have to ask, convince, or
  31.388 +	beg another developer to take a change from you, because there
  31.389 +	are almost no trees to which more than one person can push,
  31.390 +	and there's no way to push changes into a tree that someone
  31.391 +	else controls.</para>
  31.392 +
  31.393 +      <para id="x_473">The second is that it's based on reputation and acclaim.
  31.394 +	If you're an unknown, Linus will probably ignore changes from
  31.395 +	you without even responding.  But a subsystem maintainer will
  31.396 +	probably review them, and will likely take them if they pass
  31.397 +	their criteria for suitability. The more <quote>good</quote>
  31.398 +	changes you contribute to a maintainer, the more likely they
  31.399 +	are to trust your judgment and accept your changes.  If you're
  31.400 +	well-known and maintain a long-lived branch for something
  31.401 +	Linus hasn't yet accepted, people with similar interests may
  31.402 +	pull your changes regularly to keep up with your work.</para>
  31.403 +
  31.404 +      <para id="x_474">Reputation and acclaim don't necessarily cross subsystem
  31.405 +	or <quote>people</quote> boundaries.  If you're a respected
  31.406 +	but specialised storage hacker, and you try to fix a
  31.407 +	networking bug, that change will receive a level of scrutiny
  31.408 +	from a network maintainer comparable to a change from a
  31.409 +	complete stranger.</para>
  31.410 +
  31.411 +      <para id="x_475">To people who come from more orderly project backgrounds,
  31.412 +	the comparatively chaotic Linux kernel development process
  31.413 +	often seems completely insane.  It's subject to the whims of
  31.414 +	individuals; people make sweeping changes whenever they deem
  31.415 +	it appropriate; and the pace of development is astounding.
  31.416 +	And yet Linux is a highly successful, well-regarded piece of
  31.417 +	software.</para>
  31.418 +    </sect2>
  31.419 +
  31.420 +    <sect2>
  31.421 +      <title>Pull-only versus shared-push collaboration</title>
  31.422 +
  31.423 +      <para id="x_476">A perpetual source of heat in the open source community is
  31.424 +	whether a development model in which people only ever pull
  31.425 +	changes from others is <quote>better than</quote> one in which
  31.426 +	multiple people can push changes to a shared
  31.427 +	repository.</para>
  31.428 +
  31.429 +      <para id="x_477">Typically, the backers of the shared-push model use tools
  31.430 +	that actively enforce this approach.  If you're using a
  31.431 +	centralised revision control tool such as Subversion, there's
  31.432 +	no way to make a choice over which model you'll use: the tool
  31.433 +	gives you shared-push, and if you want to do anything else,
  31.434 +	you'll have to roll your own approach on top (such as applying
  31.435 +	a patch by hand).</para>
  31.436 +
  31.437 +      <para id="x_478">A good distributed revision control tool will
  31.438 +	support both models.  You and your collaborators can then
  31.439 +	structure how you work together based on your own needs and
  31.440 +	preferences, not on what contortions your tools force you
  31.441 +	into.</para>
  31.442 +    </sect2>
  31.443 +    <sect2>
  31.444 +      <title>Where collaboration meets branch management</title>
  31.445 +
  31.446 +      <para id="x_479">Once you and your team set up some shared
  31.447 +	repositories and start propagating changes back and forth
  31.448 +	between local and shared repos, you begin to face a related,
  31.449 +	but slightly different challenge: that of managing the
  31.450 +	multiple directions in which your team may be moving at once.
  31.451 +	Even though this subject is intimately related to how your
  31.452 +	team collaborates, it's dense enough to merit treatment of its
  31.453 +	own, in <xref linkend="chap:branch"/>.</para>
  31.454 +    </sect2>
  31.455 +  </sect1>
  31.456 +
  31.457 +  <sect1>
  31.458 +    <title>The technical side of sharing</title>
  31.459 +
  31.460 +    <para id="x_47a">The remainder of this chapter is devoted to the question of
  31.461 +      sharing changes with your collaborators.</para>
  31.462 +  </sect1>
  31.463 +
  31.464 +  <sect1 id="sec:collab:serve">
  31.465 +    <title>Informal sharing with <command role="hg-cmd">hg
  31.466 +	serve</command></title>
  31.467 +
  31.468 +    <para id="x_47b">Mercurial's <command role="hg-cmd">hg serve</command>
  31.469 +      command is wonderfully suited to small, tight-knit, and
  31.470 +      fast-paced group environments.  It also provides a great way to
  31.471 +      get a feel for using Mercurial commands over a network.</para>
  31.472 +
  31.473 +    <para id="x_47c">Run <command role="hg-cmd">hg serve</command> inside a
  31.474 +      repository, and in under a second it will bring up a specialised
  31.475 +      HTTP server; this will accept connections from any client, and
  31.476 +      serve up data for that repository until you terminate it.
  31.477 +      Anyone who knows the URL of the server you just started, and can
  31.478 +      talk to your computer over the network, can then use a web
  31.479 +      browser or Mercurial to read data from that repository.  A URL
  31.480 +      for a <command role="hg-cmd">hg serve</command> instance running
  31.481 +      on a laptop is likely to look something like
  31.482 +      <literal>http://my-laptop.local:8000/</literal>.</para>
  31.483 +
  31.484 +    <para id="x_47d">The <command role="hg-cmd">hg serve</command> command is
  31.485 +      <emphasis>not</emphasis> a general-purpose web server. It can do
  31.486 +      only two things:</para>
  31.487 +    <itemizedlist>
  31.488 +      <listitem><para id="x_47e">Allow people to browse the history of the
  31.489 +	  repository it's serving, from their normal web
  31.490 +	  browsers.</para>
  31.491 +      </listitem>
  31.492 +      <listitem><para id="x_47f">Speak Mercurial's wire protocol, so that people
  31.493 +	  can <command role="hg-cmd">hg clone</command> or <command
  31.494 +	    role="hg-cmd">hg pull</command> changes from that
  31.495 +	  repository.</para>
  31.496 +      </listitem></itemizedlist>
  31.497 +    <para id="x_480">In particular, <command role="hg-cmd">hg serve</command>
  31.498 +      won't allow remote users to <emphasis>modify</emphasis> your
  31.499 +      repository.  It's intended for read-only use.</para>
  31.500 +
  31.501 +    <para id="x_481">If you're getting started with Mercurial, there's nothing to
  31.502 +      prevent you from using <command role="hg-cmd">hg serve</command>
  31.503 +      to serve up a repository on your own computer, then use commands
  31.504 +      like <command role="hg-cmd">hg clone</command>, <command
  31.505 +	role="hg-cmd">hg incoming</command>, and so on to talk to that
  31.506 +      server as if the repository was hosted remotely. This can help
  31.507 +      you to quickly get acquainted with using commands on
  31.508 +      network-hosted repositories.</para>
  31.509 +
  31.510 +    <sect2>
  31.511 +      <title>A few things to keep in mind</title>
  31.512 +
  31.513 +      <para id="x_482">Because it provides unauthenticated read access to all
  31.514 +	clients, you should only use <command role="hg-cmd">hg
  31.515 +	  serve</command> in an environment where you either don't
  31.516 +	care, or have complete control over, who can access your
  31.517 +	network and pull data from your repository.</para>
  31.518 +
  31.519 +      <para id="x_483">The <command role="hg-cmd">hg serve</command> command
  31.520 +	knows nothing about any firewall software you might have
  31.521 +	installed on your system or network.  It cannot detect or
  31.522 +	control your firewall software.  If other people are unable to
  31.523 +	talk to a running <command role="hg-cmd">hg serve</command>
  31.524 +	instance, the second thing you should do
  31.525 +	(<emphasis>after</emphasis> you make sure that they're using
  31.526 +	the correct URL) is check your firewall configuration.</para>
  31.527 +
  31.528 +      <para id="x_484">By default, <command role="hg-cmd">hg serve</command>
  31.529 +	listens for incoming connections on port 8000.  If another
  31.530 +	process is already listening on the port you want to use, you
  31.531 +	can specify a different port to listen on using the <option
  31.532 +	  role="hg-opt-serve">-p</option> option.</para>
  31.533 +
  31.534 +      <para id="x_485">Normally, when <command role="hg-cmd">hg serve</command>
  31.535 +	starts, it prints no output, which can be a bit unnerving.  If
  31.536 +	you'd like to confirm that it is indeed running correctly, and
  31.537 +	find out what URL you should send to your collaborators, start
  31.538 +	it with the <option role="hg-opt-global">-v</option>
  31.539 +	option.</para>
  31.540 +    </sect2>
  31.541 +  </sect1>
  31.542 +
  31.543 +  <sect1 id="sec:collab:ssh">
  31.544 +    <title>Using the Secure Shell (ssh) protocol</title>
  31.545 +
  31.546 +    <para id="x_486">You can pull and push changes securely over a network
  31.547 +      connection using the Secure Shell (<literal>ssh</literal>)
  31.548 +      protocol.  To use this successfully, you may have to do a little
  31.549 +      bit of configuration on the client or server sides.</para>
  31.550 +
  31.551 +    <para id="x_487">If you're not familiar with ssh, it's the name of
  31.552 +      both a command and a network protocol that let you securely
  31.553 +      communicate with another computer.  To use it with Mercurial,
  31.554 +      you'll be setting up one or more user accounts on a server so
  31.555 +      that remote users can log in and execute commands.</para>
  31.556 +
  31.557 +    <para id="x_488">(If you <emphasis>are</emphasis> familiar with ssh, you'll
  31.558 +      probably find some of the material that follows to be elementary
  31.559 +      in nature.)</para>
  31.560 +
  31.561 +    <sect2>
  31.562 +      <title>How to read and write ssh URLs</title>
  31.563 +
  31.564 +      <para id="x_489">An ssh URL tends to look like this:</para>
  31.565 +      <programlisting>ssh://bos@hg.serpentine.com:22/hg/hgbook</programlisting>
  31.566 +      <orderedlist>
  31.567 +	<listitem><para id="x_48a">The <quote><literal>ssh://</literal></quote>
  31.568 +	    part tells Mercurial to use the ssh protocol.</para>
  31.569 +	</listitem>
  31.570 +	<listitem><para id="x_48b">The <quote><literal>bos@</literal></quote>
  31.571 +	    component indicates what username to log into the server
  31.572 +	    as.  You can leave this out if the remote username is the
  31.573 +	    same as your local username.</para>
  31.574 +	</listitem>
  31.575 +	<listitem><para id="x_48c">The
  31.576 +	    <quote><literal>hg.serpentine.com</literal></quote> gives
  31.577 +	    the hostname of the server to log into.</para>
  31.578 +	</listitem>
  31.579 +	<listitem><para id="x_48d">The <quote>:22</quote> identifies the port
  31.580 +	    number to connect to the server on.  The default port is
  31.581 +	    22, so you only need to specify a colon and port number if
  31.582 +	    you're <emphasis>not</emphasis> using port 22.</para>
  31.583 +	</listitem>
  31.584 +	<listitem><para id="x_48e">The remainder of the URL is the local path to
  31.585 +	    the repository on the server.</para>
  31.586 +	</listitem></orderedlist>
  31.587 +
  31.588 +      <para id="x_48f">There's plenty of scope for confusion with the path
  31.589 +	component of ssh URLs, as there is no standard way for tools
  31.590 +	to interpret it.  Some programs behave differently than others
  31.591 +	when dealing with these paths. This isn't an ideal situation,
  31.592 +	but it's unlikely to change.  Please read the following
  31.593 +	paragraphs carefully.</para>
  31.594 +
  31.595 +      <para id="x_490">Mercurial treats the path to a repository on the server as
  31.596 +	relative to the remote user's home directory.  For example, if
  31.597 +	user <literal>foo</literal> on the server has a home directory
  31.598 +	of <filename class="directory">/home/foo</filename>, then an
  31.599 +	ssh URL that contains a path component of <filename
  31.600 +	  class="directory">bar</filename> <emphasis>really</emphasis>
  31.601 +	refers to the directory <filename
  31.602 +	  class="directory">/home/foo/bar</filename>.</para>
  31.603 +
  31.604 +      <para id="x_491">If you want to specify a path relative to another user's
  31.605 +	home directory, you can use a path that starts with a tilde
  31.606 +	character followed by the user's name (let's call them
  31.607 +	<literal>otheruser</literal>), like this.</para>
  31.608 +      <programlisting>ssh://server/~otheruser/hg/repo</programlisting>
  31.609 +
  31.610 +      <para id="x_492">And if you really want to specify an
  31.611 +	<emphasis>absolute</emphasis> path on the server, begin the
  31.612 +	path component with two slashes, as in this example.</para>
  31.613 +      <programlisting>ssh://server//absolute/path</programlisting>
  31.614 +    </sect2>
  31.615 +
  31.616 +    <sect2>
  31.617 +      <title>Finding an ssh client for your system</title>
  31.618 +
  31.619 +      <para id="x_493">Almost every Unix-like system comes with OpenSSH
  31.620 +	preinstalled.  If you're using such a system, run
  31.621 +	<literal>which ssh</literal> to find out if the
  31.622 +	<command>ssh</command> command is installed (it's usually in
  31.623 +	<filename class="directory">/usr/bin</filename>).  In the
  31.624 +	unlikely event that it isn't present, take a look at your
  31.625 +	system documentation to figure out how to install it.</para>
  31.626 +
  31.627 +      <para id="x_494">On Windows, the TortoiseHg package is bundled
  31.628 +	with a version of Simon Tatham's excellent
  31.629 +	<command>plink</command> command, and you should not need to
  31.630 +	do any further configuration.</para>
  31.631 +    </sect2>
  31.632 +
  31.633 +    <sect2>
  31.634 +      <title>Generating a key pair</title>
  31.635 +
  31.636 +      <para id="x_499">To avoid the need to repetitively type a
  31.637 +	password every time you need to use your ssh client, I
  31.638 +	recommend generating a key pair.</para>
  31.639 +
  31.640 +      <tip>
  31.641 +	<title>Key pairs are not mandatory</title>
  31.642 +
  31.643 +	<para id="x_6a4">Mercurial knows nothing about ssh authentication or key
  31.644 +	  pairs.  You can, if you like, safely ignore this section and
  31.645 +	  the one that follows until you grow tired of repeatedly
  31.646 +	  typing ssh passwords.</para>
  31.647 +      </tip>
  31.648 +
  31.649 +      <itemizedlist>
  31.650 +	<listitem>
  31.651 +	  <para id="x_6a5">On a Unix-like system, the
  31.652 +	    <command>ssh-keygen</command> command will do the
  31.653 +	    trick.</para>
  31.654 +	  <para id="x_6a6">On Windows, if you're using TortoiseHg, you may need
  31.655 +	    to download a command named <command>puttygen</command>
  31.656 +	    from <ulink
  31.657 +	      url="http://www.chiark.greenend.org.uk/~sgtatham/putty">the 
  31.658 +	      PuTTY web site</ulink> to generate a key pair.  See
  31.659 +	    <ulink
  31.660 +	      url="http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter8.html#pubkey-puttygen">the 
  31.661 +	      <command>puttygen</command> documentation</ulink> for
  31.662 +	    details of how use the command.</para>
  31.663 +	</listitem>
  31.664 +      </itemizedlist>
  31.665 +
  31.666 +      <para id="x_49a">When you generate a key pair, it's usually
  31.667 +	<emphasis>highly</emphasis> advisable to protect it with a
  31.668 +	passphrase.  (The only time that you might not want to do this
  31.669 +	is when you're using the ssh protocol for automated tasks on a
  31.670 +	secure network.)</para>
  31.671 +
  31.672 +      <para id="x_49b">Simply generating a key pair isn't enough, however.
  31.673 +	You'll need to add the public key to the set of authorised
  31.674 +	keys for whatever user you're logging in remotely as.  For
  31.675 +	servers using OpenSSH (the vast majority), this will mean
  31.676 +	adding the public key to a list in a file called <filename
  31.677 +	  role="special">authorized_keys</filename> in their <filename
  31.678 +	  role="special" class="directory">.ssh</filename>
  31.679 +	directory.</para>
  31.680 +
  31.681 +      <para id="x_49c">On a Unix-like system, your public key will have a
  31.682 +	<filename>.pub</filename> extension.  If you're using
  31.683 +	<command>puttygen</command> on Windows, you can save the
  31.684 +	public key to a file of your choosing, or paste it from the
  31.685 +	window it's displayed in straight into the <filename
  31.686 +	  role="special">authorized_keys</filename> file.</para>
  31.687 +    </sect2>
  31.688 +    <sect2>
  31.689 +      <title>Using an authentication agent</title>
  31.690 +
  31.691 +      <para id="x_49d">An authentication agent is a daemon that stores
  31.692 +	passphrases in memory (so it will forget passphrases if you
  31.693 +	log out and log back in again). An ssh client will notice if
  31.694 +	it's running, and query it for a passphrase.  If there's no
  31.695 +	authentication agent running, or the agent doesn't store the
  31.696 +	necessary passphrase, you'll have to type your passphrase
  31.697 +	every time Mercurial tries to communicate with a server on
  31.698 +	your behalf (e.g. whenever you pull or push changes).</para>
  31.699 +
  31.700 +      <para id="x_49e">The downside of storing passphrases in an agent is that
  31.701 +	it's possible for a well-prepared attacker to recover the
  31.702 +	plain text of your passphrases, in some cases even if your
  31.703 +	system has been power-cycled. You should make your own
  31.704 +	judgment as to whether this is an acceptable risk.  It
  31.705 +	certainly saves a lot of repeated typing.</para>
  31.706 +
  31.707 +      <itemizedlist>
  31.708 +	<listitem>
  31.709 +	  <para id="x_49f">On Unix-like systems, the agent is called
  31.710 +	    <command>ssh-agent</command>, and it's often run
  31.711 +	    automatically for you when you log in.  You'll need to use
  31.712 +	    the <command>ssh-add</command> command to add passphrases
  31.713 +	    to the agent's store.</para>
  31.714 +	</listitem>
  31.715 +	<listitem>
  31.716 +	  <para id="x_6a7">On Windows, if you're using TortoiseHg, the
  31.717 +	    <command>pageant</command> command acts as the agent.  As
  31.718 +	    with <command>puttygen</command>, you'll need to <ulink
  31.719 +	      url="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html">download 
  31.720 +	      <command>pageant</command></ulink> from the PuTTY web
  31.721 +	    site and read <ulink
  31.722 +	      url="http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter9.html#pageant">its 
  31.723 +	      documentation</ulink>.  The <command>pageant</command>
  31.724 +	    command adds an icon to your system tray that will let you
  31.725 +	    manage stored passphrases.</para>
  31.726 +	</listitem>
  31.727 +      </itemizedlist>
  31.728 +    </sect2>
  31.729 +
  31.730 +    <sect2>
  31.731 +      <title>Configuring the server side properly</title>
  31.732 +
  31.733 +      <para id="x_4a0">Because ssh can be fiddly to set up if you're new to it,
  31.734 +	a variety of things can go wrong.  Add Mercurial
  31.735 +	on top, and there's plenty more scope for head-scratching.
  31.736 +	Most of these potential problems occur on the server side, not
  31.737 +	the client side.  The good news is that once you've gotten a
  31.738 +	configuration working, it will usually continue to work
  31.739 +	indefinitely.</para>
  31.740 +
  31.741 +      <para id="x_4a1">Before you try using Mercurial to talk to an ssh server,
  31.742 +	it's best to make sure that you can use the normal
  31.743 +	<command>ssh</command> or <command>putty</command> command to
  31.744 +	talk to the server first.  If you run into problems with using
  31.745 +	these commands directly, Mercurial surely won't work.  Worse,
  31.746 +	it will obscure the underlying problem.  Any time you want to
  31.747 +	debug ssh-related Mercurial problems, you should drop back to
  31.748 +	making sure that plain ssh client commands work first,
  31.749 +	<emphasis>before</emphasis> you worry about whether there's a
  31.750 +	problem with Mercurial.</para>
  31.751 +
  31.752 +      <para id="x_4a2">The first thing to be sure of on the server side is that
  31.753 +	you can actually log in from another machine at all.  If you
  31.754 +	can't use <command>ssh</command> or <command>putty</command>
  31.755 +	to log in, the error message you get may give you a few hints
  31.756 +	as to what's wrong.  The most common problems are as
  31.757 +	follows.</para>
  31.758 +      <itemizedlist>
  31.759 +	<listitem><para id="x_4a3">If you get a <quote>connection refused</quote>
  31.760 +	    error, either there isn't an SSH daemon running on the
  31.761 +	    server at all, or it's inaccessible due to firewall
  31.762 +	    configuration.</para>
  31.763 +	</listitem>
  31.764 +	<listitem><para id="x_4a4">If you get a <quote>no route to host</quote>
  31.765 +	    error, you either have an incorrect address for the server
  31.766 +	    or a seriously locked down firewall that won't admit its
  31.767 +	    existence at all.</para>
  31.768 +	</listitem>
  31.769 +	<listitem><para id="x_4a5">If you get a <quote>permission denied</quote>
  31.770 +	    error, you may have mistyped the username on the server,
  31.771 +	    or you could have mistyped your key's passphrase or the
  31.772 +	    remote user's password.</para>
  31.773 +	</listitem></itemizedlist>
  31.774 +      <para id="x_4a6">In summary, if you're having trouble talking to the
  31.775 +	server's ssh daemon, first make sure that one is running at
  31.776 +	all.  On many systems it will be installed, but disabled, by
  31.777 +	default.  Once you're done with this step, you should then
  31.778 +	check that the server's firewall is configured to allow
  31.779 +	incoming connections on the port the ssh daemon is listening
  31.780 +	on (usually 22).  Don't worry about more exotic possibilities
  31.781 +	for misconfiguration until you've checked these two
  31.782 +	first.</para>
  31.783 +
  31.784 +      <para id="x_4a7">If you're using an authentication agent on the client side
  31.785 +	to store passphrases for your keys, you ought to be able to
  31.786 +	log into the server without being prompted for a passphrase or
  31.787 +	a password.  If you're prompted for a passphrase, there are a
  31.788 +	few possible culprits.</para>
  31.789 +      <itemizedlist>
  31.790 +	<listitem><para id="x_4a8">You might have forgotten to use
  31.791 +	    <command>ssh-add</command> or <command>pageant</command>
  31.792 +	    to store the passphrase.</para>
  31.793 +	</listitem>
  31.794 +	<listitem><para id="x_4a9">You might have stored the passphrase for the
  31.795 +	    wrong key.</para>
  31.796 +	</listitem></itemizedlist>
  31.797 +      <para id="x_4aa">If you're being prompted for the remote user's password,
  31.798 +	there are another few possible problems to check.</para>
  31.799 +      <itemizedlist>
  31.800 +	<listitem><para id="x_4ab">Either the user's home directory or their
  31.801 +	    <filename role="special" class="directory">.ssh</filename>
  31.802 +	    directory might have excessively liberal permissions.  As
  31.803 +	    a result, the ssh daemon will not trust or read their
  31.804 +	    <filename role="special">authorized_keys</filename> file.
  31.805 +	    For example, a group-writable home or <filename
  31.806 +	      role="special" class="directory">.ssh</filename>
  31.807 +	    directory will often cause this symptom.</para>
  31.808 +	</listitem>
  31.809 +	<listitem><para id="x_4ac">The user's <filename
  31.810 +	      role="special">authorized_keys</filename> file may have
  31.811 +	    a problem. If anyone other than the user owns or can write
  31.812 +	    to that file, the ssh daemon will not trust or read
  31.813 +	    it.</para>
  31.814 +	</listitem></itemizedlist>
  31.815 +
  31.816 +      <para id="x_4ad">In the ideal world, you should be able to run the
  31.817 +	following command successfully, and it should print exactly
  31.818 +	one line of output, the current date and time.</para>
  31.819 +      <programlisting>ssh myserver date</programlisting>
  31.820 +
  31.821 +      <para id="x_4ae">If, on your server, you have login scripts that print
  31.822 +	banners or other junk even when running non-interactive
  31.823 +	commands like this, you should fix them before you continue,
  31.824 +	so that they only print output if they're run interactively.
  31.825 +	Otherwise these banners will at least clutter up Mercurial's
  31.826 +	output.  Worse, they could potentially cause problems with
  31.827 +	running Mercurial commands remotely.  Mercurial tries to
  31.828 +	detect and ignore banners in non-interactive
  31.829 +	<command>ssh</command> sessions, but it is not foolproof.  (If
  31.830 +	you're editing your login scripts on your server, the usual
  31.831 +	way to see if a login script is running in an interactive
  31.832 +	shell is to check the return code from the command
  31.833 +	<literal>tty -s</literal>.)</para>
  31.834 +
  31.835 +      <para id="x_4af">Once you've verified that plain old ssh is working with
  31.836 +	your server, the next step is to ensure that Mercurial runs on
  31.837 +	the server.  The following command should run
  31.838 +	successfully:</para>
  31.839 +
  31.840 +      <programlisting>ssh myserver hg version</programlisting>
  31.841 +
  31.842 +      <para id="x_4b0">If you see an error message instead of normal <command
  31.843 +	  role="hg-cmd">hg version</command> output, this is usually
  31.844 +	because you haven't installed Mercurial to <filename
  31.845 +	  class="directory">/usr/bin</filename>.  Don't worry if this
  31.846 +	is the case; you don't need to do that.  But you should check
  31.847 +	for a few possible problems.</para>
  31.848 +      <itemizedlist>
  31.849 +	<listitem><para id="x_4b1">Is Mercurial really installed on the server at
  31.850 +	    all?  I know this sounds trivial, but it's worth
  31.851 +	    checking!</para>
  31.852 +	</listitem>
  31.853 +	<listitem><para id="x_4b2">Maybe your shell's search path (usually set
  31.854 +	    via the <envar>PATH</envar> environment variable) is
  31.855 +	    simply misconfigured.</para>
  31.856 +	</listitem>
  31.857 +	<listitem><para id="x_4b3">Perhaps your <envar>PATH</envar> environment
  31.858 +	    variable is only being set to point to the location of the
  31.859 +	    <command>hg</command> executable if the login session is
  31.860 +	    interactive.  This can happen if you're setting the path
  31.861 +	    in the wrong shell login script.  See your shell's
  31.862 +	    documentation for details.</para>
  31.863 +	</listitem>
  31.864 +	<listitem><para id="x_4b4">The <envar>PYTHONPATH</envar> environment
  31.865 +	    variable may need to contain the path to the Mercurial
  31.866 +	    Python modules.  It might not be set at all; it could be
  31.867 +	    incorrect; or it may be set only if the login is
  31.868 +	    interactive.</para>
  31.869 +	</listitem></itemizedlist>
  31.870 +
  31.871 +      <para id="x_4b5">If you can run <command role="hg-cmd">hg version</command>
  31.872 +	over an ssh connection, well done! You've got the server and
  31.873 +	client sorted out.  You should now be able to use Mercurial to
  31.874 +	access repositories hosted by that username on that server.
  31.875 +	If you run into problems with Mercurial and ssh at this point,
  31.876 +	try using the <option role="hg-opt-global">--debug</option>
  31.877 +	option to get a clearer picture of what's going on.</para>
  31.878 +    </sect2>
  31.879 +    <sect2>
  31.880 +      <title>Using compression with ssh</title>
  31.881 +
  31.882 +      <para id="x_4b6">Mercurial does not compress data when it uses the ssh
  31.883 +	protocol, because the ssh protocol can transparently compress
  31.884 +	data.  However, the default behavior of ssh clients is
  31.885 +	<emphasis>not</emphasis> to request compression.</para>
  31.886 +
  31.887 +      <para id="x_4b7">Over any network other than a fast LAN (even a wireless
  31.888 +	network), using compression is likely to significantly speed
  31.889 +	up Mercurial's network operations.  For example, over a WAN,
  31.890 +	someone measured compression as reducing the amount of time
  31.891 +	required to clone a particularly large repository from 51
  31.892 +	minutes to 17 minutes.</para>
  31.893 +
  31.894 +      <para id="x_4b8">Both <command>ssh</command> and <command>plink</command>
  31.895 +	accept a <option role="cmd-opt-ssh">-C</option> option which
  31.896 +	turns on compression.  You can easily edit your <filename
  31.897 +	  role="special">~/.hgrc</filename> to enable compression for
  31.898 +	all of Mercurial's uses of the ssh protocol.  Here is how to
  31.899 +	do so for regular <command>ssh</command> on Unix-like systems,
  31.900 +	for example.</para>
  31.901 +      <programlisting>[ui]
  31.902 +ssh = ssh -C</programlisting>
  31.903 +
  31.904 +      <para id="x_4b9">If you use <command>ssh</command> on a
  31.905 +	Unix-like system, you can configure it to always use
  31.906 +	compression when talking to your server.  To do this, edit
  31.907 +	your <filename role="special">.ssh/config</filename> file
  31.908 +	(which may not yet exist), as follows.</para>
  31.909 +
  31.910 +      <programlisting>Host hg
  31.911 +  Compression yes
  31.912 +  HostName hg.example.com</programlisting>
  31.913 +
  31.914 +      <para id="x_4ba">This defines a hostname alias,
  31.915 +	<literal>hg</literal>.  When you use that hostname on the
  31.916 +	<command>ssh</command> command line or in a Mercurial
  31.917 +	<literal>ssh</literal>-protocol URL, it will cause
  31.918 +	<command>ssh</command> to connect to
  31.919 +	<literal>hg.example.com</literal> and use compression.  This
  31.920 +	gives you both a shorter name to type and compression, each of
  31.921 +	which is a good thing in its own right.</para>
  31.922 +    </sect2>
  31.923 +  </sect1>
  31.924 +
  31.925 +  <sect1 id="sec:collab:cgi">
  31.926 +    <title>Serving over HTTP using CGI</title>
  31.927 +
  31.928 +    <para id="x_6a8">The simplest way to host one or more repositories in a
  31.929 +      permanent way is to use a web server and Mercurial's CGI
  31.930 +      support.</para>
  31.931 +
  31.932 +    <para id="x_4bb">Depending on how ambitious you are, configuring Mercurial's
  31.933 +      CGI interface can take anything from a few moments to several
  31.934 +      hours.</para>
  31.935 +
  31.936 +    <para id="x_4bc">We'll begin with the simplest of examples, and work our way
  31.937 +      towards a more complex configuration.  Even for the most basic
  31.938 +      case, you're almost certainly going to need to read and modify
  31.939 +      your web server's configuration.</para>
  31.940 +
  31.941 +    <note>
  31.942 +      <title>High pain tolerance required</title>
  31.943 +
  31.944 +      <para id="x_4bd">Configuring a web server is a complex, fiddly,
  31.945 +	and highly system-dependent activity.  I can't possibly give
  31.946 +	you instructions that will cover anything like all of the
  31.947 +	cases you will encounter. Please use your discretion and
  31.948 +	judgment in following the sections below.  Be prepared to make
  31.949 +	plenty of mistakes, and to spend a lot of time reading your
  31.950 +	server's error logs.</para>
  31.951 +
  31.952 +      <para id="x_6a9">If you don't have a strong stomach for tweaking
  31.953 +	configurations over and over, or a compelling need to host
  31.954 +	your own services, you might want to try one of the public
  31.955 +	hosting services that I mentioned earlier.</para>
  31.956 +    </note>
  31.957 +
  31.958 +    <sect2>
  31.959 +      <title>Web server configuration checklist</title>
  31.960 +
  31.961 +      <para id="x_4be">Before you continue, do take a few moments to check a few
  31.962 +	aspects of your system's setup.</para>
  31.963 +
  31.964 +      <orderedlist>
  31.965 +	<listitem><para id="x_4bf">Do you have a web server installed
  31.966 +	    at all? Mac OS X and some Linux distributions ship with
  31.967 +	    Apache, but many other systems may not have a web server
  31.968 +	    installed.</para>
  31.969 +	</listitem>
  31.970 +	<listitem><para id="x_4c0">If you have a web server installed, is it
  31.971 +	    actually running?  On most systems, even if one is
  31.972 +	    present, it will be disabled by default.</para>
  31.973 +	</listitem>
  31.974 +	<listitem><para id="x_4c1">Is your server configured to allow you to run
  31.975 +	    CGI programs in the directory where you plan to do so?
  31.976 +	    Most servers default to explicitly disabling the ability
  31.977 +	    to run CGI programs.</para>
  31.978 +	</listitem></orderedlist>
  31.979 +
  31.980 +      <para id="x_4c2">If you don't have a web server installed, and don't have
  31.981 +	substantial experience configuring Apache, you should consider
  31.982 +	using the <literal>lighttpd</literal> web server instead of
  31.983 +	Apache.  Apache has a well-deserved reputation for baroque and
  31.984 +	confusing configuration. While <literal>lighttpd</literal> is
  31.985 +	less capable in some ways than Apache, most of these
  31.986 +	capabilities are not relevant to serving Mercurial
  31.987 +	repositories.  And <literal>lighttpd</literal> is undeniably
  31.988 +	<emphasis>much</emphasis> easier to get started with than
  31.989 +	Apache.</para>
  31.990 +    </sect2>
  31.991 +
  31.992 +    <sect2>
  31.993 +      <title>Basic CGI configuration</title>
  31.994 +
  31.995 +      <para id="x_4c3">On Unix-like systems, it's common for users to have a
  31.996 +	subdirectory named something like <filename
  31.997 +	  class="directory">public_html</filename> in their home
  31.998 +	directory, from which they can serve up web pages.  A file
  31.999 +	named <filename>foo</filename> in this directory will be
 31.1000 +	accessible at a URL of the form
 31.1001 +	<literal>http://www.example.com/username/foo</literal>.</para>
 31.1002 +
 31.1003 +      <para id="x_4c4">To get started, find the <filename
 31.1004 +	  role="special">hgweb.cgi</filename> script that should be
 31.1005 +	present in your Mercurial installation.  If you can't quickly
 31.1006 +	find a local copy on your system, simply download one from the
 31.1007 +	master Mercurial repository at <ulink
 31.1008 +	  url="http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi">http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi</ulink>.</para>
 31.1009 +
 31.1010 +      <para id="x_4c5">You'll need to copy this script into your <filename
 31.1011 +	  class="directory">public_html</filename> directory, and
 31.1012 +	ensure that it's executable.</para>
 31.1013 +      <programlisting>cp .../hgweb.cgi ~/public_html
 31.1014 +chmod 755 ~/public_html/hgweb.cgi</programlisting>
 31.1015 +      <para id="x_4c6">The <literal>755</literal> argument to
 31.1016 +	<command>chmod</command> is a little more general than just
 31.1017 +	making the script executable: it ensures that the script is
 31.1018 +	executable by anyone, and that <quote>group</quote> and
 31.1019 +	<quote>other</quote> write permissions are
 31.1020 +	<emphasis>not</emphasis> set.  If you were to leave those
 31.1021 +	write permissions enabled, Apache's <literal>suexec</literal>
 31.1022 +	subsystem would likely refuse to execute the script.  In fact,
 31.1023 +	<literal>suexec</literal> also insists that the
 31.1024 +	<emphasis>directory</emphasis> in which the script resides
 31.1025 +	must not be writable by others.</para>
 31.1026 +      <programlisting>chmod 755 ~/public_html</programlisting>
 31.1027 +
 31.1028 +      <sect3 id="sec:collab:wtf">
 31.1029 +	<title>What could <emphasis>possibly</emphasis> go
 31.1030 +	  wrong?</title>
 31.1031 +
 31.1032 +	<para id="x_4c7">Once you've copied the CGI script into place,
 31.1033 +	  go into a web browser, and try to open the URL
 31.1034 +	  <literal>http://myhostname/~myuser/hgweb.cgi</literal>,
 31.1035 +	  <emphasis>but</emphasis> brace yourself for instant failure.
 31.1036 +	  There's a high probability that trying to visit this URL
 31.1037 +	  will fail, and there are many possible reasons for this.  In
 31.1038 +	  fact, you're likely to stumble over almost every one of the
 31.1039 +	  possible errors below, so please read carefully.  The
 31.1040 +	  following are all of the problems I ran into on a system
 31.1041 +	  running Fedora 7, with a fresh installation of Apache, and a
 31.1042 +	  user account that I created specially to perform this
 31.1043 +	  exercise.</para>
 31.1044 +
 31.1045 +	<para id="x_4c8">Your web server may have per-user directories disabled.
 31.1046 +	  If you're using Apache, search your config file for a
 31.1047 +	  <literal>UserDir</literal> directive.  If there's none
 31.1048 +	  present, per-user directories will be disabled.  If one
 31.1049 +	  exists, but its value is <literal>disabled</literal>, then
 31.1050 +	  per-user directories will be disabled.  Otherwise, the
 31.1051 +	  string after <literal>UserDir</literal> gives the name of
 31.1052 +	  the subdirectory that Apache will look in under your home
 31.1053 +	  directory, for example <filename
 31.1054 +	    class="directory">public_html</filename>.</para>
 31.1055 +
 31.1056 +	<para id="x_4c9">Your file access permissions may be too restrictive.
 31.1057 +	  The web server must be able to traverse your home directory
 31.1058 +	  and directories under your <filename
 31.1059 +	    class="directory">public_html</filename> directory, and
 31.1060 +	  read files under the latter too.  Here's a quick recipe to
 31.1061 +	  help you to make your permissions more appropriate.</para>
 31.1062 +	<programlisting>chmod 755 ~
 31.1063 +find ~/public_html -type d -print0 | xargs -0r chmod 755
 31.1064 +find ~/public_html -type f -print0 | xargs -0r chmod 644</programlisting>
 31.1065 +
 31.1066 +	<para id="x_4ca">The other possibility with permissions is that you might
 31.1067 +	  get a completely empty window when you try to load the
 31.1068 +	  script.  In this case, it's likely that your access
 31.1069 +	  permissions are <emphasis>too permissive</emphasis>.  Apache's
 31.1070 +	  <literal>suexec</literal> subsystem won't execute a script
 31.1071 +	  that's group- or world-writable, for example.</para>
 31.1072 +
 31.1073 +	<para id="x_4cb">Your web server may be configured to disallow execution
 31.1074 +	  of CGI programs in your per-user web directory.  Here's
 31.1075 +	  Apache's default per-user configuration from my Fedora
 31.1076 +	  system.</para>
 31.1077 +
 31.1078 +	&ch06-apache-config.lst;
 31.1079 +
 31.1080 +	<para id="x_4cc">If you find a similar-looking
 31.1081 +	  <literal>Directory</literal> group in your Apache
 31.1082 +	  configuration, the directive to look at inside it is
 31.1083 +	  <literal>Options</literal>. Add <literal>ExecCGI</literal>
 31.1084 +	  to the end of this list if it's missing, and restart the web
 31.1085 +	  server.</para>
 31.1086 +
 31.1087 +	<para id="x_4cd">If you find that Apache serves you the text of the CGI
 31.1088 +	  script instead of executing it, you may need to either
 31.1089 +	  uncomment (if already present) or add a directive like
 31.1090 +	  this.</para>
 31.1091 +	<programlisting>AddHandler cgi-script .cgi</programlisting>
 31.1092 +
 31.1093 +	<para id="x_4ce">The next possibility is that you might be served with a
 31.1094 +	  colourful Python backtrace claiming that it can't import a
 31.1095 +	  <literal>mercurial</literal>-related module.  This is
 31.1096 +	  actually progress!  The server is now capable of executing
 31.1097 +	  your CGI script.  This error is only likely to occur if
 31.1098 +	  you're running a private installation of Mercurial, instead
 31.1099 +	  of a system-wide version.  Remember that the web server runs
 31.1100 +	  the CGI program without any of the environment variables
 31.1101 +	  that you take for granted in an interactive session.  If
 31.1102 +	  this error happens to you, edit your copy of <filename
 31.1103 +	    role="special">hgweb.cgi</filename> and follow the
 31.1104 +	  directions inside it to correctly set your
 31.1105 +	  <envar>PYTHONPATH</envar> environment variable.</para>
 31.1106 +
 31.1107 +	<para id="x_4cf">Finally, you are <emphasis>certain</emphasis> to be
 31.1108 +	  served with another colourful Python backtrace: this one
 31.1109 +	  will complain that it can't find <filename
 31.1110 +	    class="directory">/path/to/repository</filename>.  Edit
 31.1111 +	  your <filename role="special">hgweb.cgi</filename> script
 31.1112 +	  and replace the <filename
 31.1113 +	    class="directory">/path/to/repository</filename> string
 31.1114 +	  with the complete path to the repository you want to serve
 31.1115 +	  up.</para>
 31.1116 +
 31.1117 +	<para id="x_4d0">At this point, when you try to reload the page, you
 31.1118 +	  should be presented with a nice HTML view of your
 31.1119 +	  repository's history.  Whew!</para>
 31.1120 +      </sect3>
 31.1121 +
 31.1122 +      <sect3>
 31.1123 +	<title>Configuring lighttpd</title>
 31.1124 +
 31.1125 +	<para id="x_4d1">To be exhaustive in my experiments, I tried configuring
 31.1126 +	  the increasingly popular <literal>lighttpd</literal> web
 31.1127 +	  server to serve the same repository as I described with
 31.1128 +	  Apache above.  I had already overcome all of the problems I
 31.1129 +	  outlined with Apache, many of which are not server-specific.
 31.1130 +	  As a result, I was fairly sure that my file and directory
 31.1131 +	  permissions were good, and that my <filename
 31.1132 +	    role="special">hgweb.cgi</filename> script was properly
 31.1133 +	  edited.</para>
 31.1134 +
 31.1135 +	<para id="x_4d2">Once I had Apache running, getting
 31.1136 +	  <literal>lighttpd</literal> to serve the repository was a
 31.1137 +	  snap (in other words, even if you're trying to use
 31.1138 +	  <literal>lighttpd</literal>, you should read the Apache
 31.1139 +	  section).  I first had to edit the
 31.1140 +	  <literal>mod_access</literal> section of its config file to
 31.1141 +	  enable <literal>mod_cgi</literal> and
 31.1142 +	  <literal>mod_userdir</literal>, both of which were disabled
 31.1143 +	  by default on my system.  I then added a few lines to the
 31.1144 +	  end of the config file, to configure these modules.</para>
 31.1145 +	<programlisting>userdir.path = "public_html"
 31.1146 +cgi.assign = (".cgi" =&gt; "" )</programlisting>
 31.1147 +	<para id="x_4d3">With this done, <literal>lighttpd</literal> ran
 31.1148 +	  immediately for me.  If I had configured
 31.1149 +	  <literal>lighttpd</literal> before Apache, I'd almost
 31.1150 +	  certainly have run into many of the same system-level
 31.1151 +	  configuration problems as I did with Apache.  However, I
 31.1152 +	  found <literal>lighttpd</literal> to be noticeably easier to
 31.1153 +	  configure than Apache, even though I've used Apache for over
 31.1154 +	  a decade, and this was my first exposure to
 31.1155 +	  <literal>lighttpd</literal>.</para>
 31.1156 +      </sect3>
 31.1157 +    </sect2>
 31.1158 +
 31.1159 +    <sect2>
 31.1160 +      <title>Sharing multiple repositories with one CGI script</title>
 31.1161 +
 31.1162 +      <para id="x_4d4">The <filename role="special">hgweb.cgi</filename> script
 31.1163 +	only lets you publish a single repository, which is an
 31.1164 +	annoying restriction.  If you want to publish more than one
 31.1165 +	without wracking yourself with multiple copies of the same
 31.1166 +	script, each with different names, a better choice is to use
 31.1167 +	the <filename role="special">hgwebdir.cgi</filename>
 31.1168 +	script.</para>
 31.1169 +
 31.1170 +      <para id="x_4d5">The procedure to configure <filename
 31.1171 +	  role="special">hgwebdir.cgi</filename> is only a little more
 31.1172 +	involved than for <filename
 31.1173 +	  role="special">hgweb.cgi</filename>.  First, you must obtain
 31.1174 +	a copy of the script.  If you don't have one handy, you can
 31.1175 +	download a copy from the master Mercurial repository at <ulink
 31.1176 +	  url="http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi">http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi</ulink>.</para>
 31.1177 +
 31.1178 +      <para id="x_4d6">You'll need to copy this script into your <filename
 31.1179 +	  class="directory">public_html</filename> directory, and
 31.1180 +	ensure that it's executable.</para>
 31.1181 +
 31.1182 +      <programlisting>cp .../hgwebdir.cgi ~/public_html
 31.1183 +chmod 755 ~/public_html ~/public_html/hgwebdir.cgi</programlisting>
 31.1184 +
 31.1185 +      <para id="x_4d7">With basic configuration out of the way, try to
 31.1186 +	visit <literal>http://myhostname/~myuser/hgwebdir.cgi</literal>
 31.1187 +	in your	browser.  It should
 31.1188 +	display an empty list of repositories.  If you get a blank
 31.1189 +	window or error message, try walking through the list of
 31.1190 +	potential problems in <xref
 31.1191 +	  linkend="sec:collab:wtf"/>.</para>
 31.1192 +
 31.1193 +      <para id="x_4d8">The <filename role="special">hgwebdir.cgi</filename>
 31.1194 +	script relies on an external configuration file.  By default,
 31.1195 +	it searches for a file named <filename
 31.1196 +	  role="special">hgweb.config</filename> in the same directory
 31.1197 +	as itself.  You'll need to create this file, and make it
 31.1198 +	world-readable.  The format of the file is similar to a
 31.1199 +	Windows <quote>ini</quote> file, as understood by Python's
 31.1200 +	<literal>ConfigParser</literal>
 31.1201 +	<citation>web:configparser</citation> module.</para>
 31.1202 +
 31.1203 +      <para id="x_4d9">The easiest way to configure <filename
 31.1204 +	  role="special">hgwebdir.cgi</filename> is with a section
 31.1205 +	named <literal>collections</literal>.  This will automatically
 31.1206 +	publish <emphasis>every</emphasis> repository under the
 31.1207 +	directories you name.  The section should look like
 31.1208 +	this:</para>
 31.1209 +      <programlisting>[collections]
 31.1210 +/my/root = /my/root</programlisting>
 31.1211 +      <para id="x_4da">Mercurial interprets this by looking at the directory name
 31.1212 +	on the <emphasis>right</emphasis> hand side of the
 31.1213 +	<quote><literal>=</literal></quote> sign; finding repositories
 31.1214 +	in that directory hierarchy; and using the text on the
 31.1215 +	<emphasis>left</emphasis> to strip off matching text from the
 31.1216 +	names it will actually list in the web interface.  The
 31.1217 +	remaining component of a path after this stripping has
 31.1218 +	occurred is called a <quote>virtual path</quote>.</para>
 31.1219 +
 31.1220 +      <para id="x_4db">Given the example above, if we have a
 31.1221 +	repository whose local path is <filename
 31.1222 +	  class="directory">/my/root/this/repo</filename>, the CGI
 31.1223 +	script will strip the leading <filename
 31.1224 +	  class="directory">/my/root</filename> from the name, and
 31.1225 +	publish the repository with a virtual path of <filename
 31.1226 +	  class="directory">this/repo</filename>.  If the base URL for
 31.1227 +	our CGI script is
 31.1228 +	<literal>http://myhostname/~myuser/hgwebdir.cgi</literal>, the
 31.1229 +	complete URL for that repository will be
 31.1230 +	<literal>http://myhostname/~myuser/hgwebdir.cgi/this/repo</literal>.</para>
 31.1231 +
 31.1232 +      <para id="x_4dc">If we replace <filename
 31.1233 +	  class="directory">/my/root</filename> on the left hand side
 31.1234 +	of this example with <filename
 31.1235 +	  class="directory">/my</filename>, then <filename
 31.1236 +	  role="special">hgwebdir.cgi</filename> will only strip off
 31.1237 +	<filename class="directory">/my</filename> from the repository
 31.1238 +	name, and will give us a virtual path of <filename
 31.1239 +	  class="directory">root/this/repo</filename> instead of
 31.1240 +	<filename class="directory">this/repo</filename>.</para>
 31.1241 +
 31.1242 +      <para id="x_4dd">The <filename role="special">hgwebdir.cgi</filename>
 31.1243 +	script will recursively search each directory listed in the
 31.1244 +	<literal>collections</literal> section of its configuration
 31.1245 +	file, but it will <literal>not</literal> recurse into the
 31.1246 +	repositories it finds.</para>
 31.1247 +
 31.1248 +      <para id="x_4de">The <literal>collections</literal> mechanism makes it easy
 31.1249 +	to publish many repositories in a <quote>fire and
 31.1250 +	  forget</quote> manner.  You only need to set up the CGI
 31.1251 +	script and configuration file one time.  Afterwards, you can
 31.1252 +	publish or unpublish a repository at any time by simply moving
 31.1253 +	it into, or out of, the directory hierarchy in which you've
 31.1254 +	configured <filename role="special">hgwebdir.cgi</filename> to
 31.1255 +	look.</para>
 31.1256 +
 31.1257 +      <sect3>
 31.1258 +	<title>Explicitly specifying which repositories to
 31.1259 +	  publish</title>
 31.1260 +
 31.1261 +	<para id="x_4df">In addition to the <literal>collections</literal>
 31.1262 +	  mechanism, the <filename
 31.1263 +	    role="special">hgwebdir.cgi</filename> script allows you
 31.1264 +	  to publish a specific list of repositories.  To do so,
 31.1265 +	  create a <literal>paths</literal> section, with contents of
 31.1266 +	  the following form.</para>
 31.1267 +	<programlisting>[paths]
 31.1268 +repo1 = /my/path/to/some/repo
 31.1269 +repo2 = /some/path/to/another</programlisting>
 31.1270 +	<para id="x_4e0">In this case, the virtual path (the component that will
 31.1271 +	  appear in a URL) is on the left hand side of each
 31.1272 +	  definition, while the path to the repository is on the
 31.1273 +	  right.  Notice that there does not need to be any
 31.1274 +	  relationship between the virtual path you choose and the
 31.1275 +	  location of a repository in your filesystem.</para>
 31.1276 +
 31.1277 +	<para id="x_4e1">If you wish, you can use both the
 31.1278 +	  <literal>collections</literal> and <literal>paths</literal>
 31.1279 +	  mechanisms simultaneously in a single configuration
 31.1280 +	  file.</para>
 31.1281 +
 31.1282 +	<note>
 31.1283 +	  <title>Beware duplicate virtual paths</title>
 31.1284 +
 31.1285 +	  <para id="x_4e2">  If several repositories have the same
 31.1286 +	    virtual path, <filename
 31.1287 +	      role="special">hgwebdir.cgi</filename> will not report
 31.1288 +	    an error.  Instead, it will behave unpredictably.</para>
 31.1289 +	</note>
 31.1290 +      </sect3>
 31.1291 +    </sect2>
 31.1292 +
 31.1293 +    <sect2>
 31.1294 +      <title>Downloading source archives</title>
 31.1295 +
 31.1296 +      <para id="x_4e3">Mercurial's web interface lets users download an archive
 31.1297 +	of any revision.  This archive will contain a snapshot of the
 31.1298 +	working directory as of that revision, but it will not contain
 31.1299 +	a copy of the repository data.</para>
 31.1300 +
 31.1301 +      <para id="x_4e4">By default, this feature is not enabled.  To enable it,
 31.1302 +	you'll need to add an <envar
 31.1303 +	  role="rc-item-web">allow_archive</envar> item to the
 31.1304 +	<literal role="rc-web">web</literal> section of your <filename
 31.1305 +	  role="special">~/.hgrc</filename>; see below for details.</para>
 31.1306 +    </sect2>
 31.1307 +    <sect2>
 31.1308 +      <title>Web configuration options</title>
 31.1309 +
 31.1310 +      <para id="x_4e5">Mercurial's web interfaces (the <command role="hg-cmd">hg
 31.1311 +	  serve</command> command, and the <filename
 31.1312 +	  role="special">hgweb.cgi</filename> and <filename
 31.1313 +	  role="special">hgwebdir.cgi</filename> scripts) have a
 31.1314 +	number of configuration options that you can set.  These
 31.1315 +	belong in a section named <literal
 31.1316 +	  role="rc-web">web</literal>.</para>
 31.1317 +      <itemizedlist>
 31.1318 +	<listitem><para id="x_4e6"><envar
 31.1319 +	      role="rc-item-web">allow_archive</envar>: Determines
 31.1320 +	    which (if any) archive download mechanisms Mercurial
 31.1321 +	    supports.  If you enable this feature, users of the web
 31.1322 +	    interface will be able to download an archive of whatever
 31.1323 +	    revision of a repository they are viewing. To enable the
 31.1324 +	    archive feature, this item must take the form of a
 31.1325 +	    sequence of words drawn from the list below.</para>
 31.1326 +	  <itemizedlist>
 31.1327 +	    <listitem><para id="x_4e7"><literal>bz2</literal>: A
 31.1328 +		<command>tar</command> archive, compressed using
 31.1329 +		<literal>bzip2</literal> compression.  This has the
 31.1330 +		best compression ratio, but uses the most CPU time on
 31.1331 +		the server.</para>
 31.1332 +	    </listitem>
 31.1333 +	    <listitem><para id="x_4e8"><literal>gz</literal>: A
 31.1334 +		<command>tar</command> archive, compressed using
 31.1335 +		<literal>gzip</literal> compression.</para>
 31.1336 +	    </listitem>
 31.1337 +	    <listitem><para id="x_4e9"><literal>zip</literal>: A
 31.1338 +		<command>zip</command> archive, compressed using LZW
 31.1339 +		compression.  This format has the worst compression
 31.1340 +		ratio, but is widely used in the Windows world.</para>
 31.1341 +	    </listitem>
 31.1342 +	  </itemizedlist>
 31.1343 +	  <para id="x_4ea">  If you provide an empty list, or don't have an
 31.1344 +	    <envar role="rc-item-web">allow_archive</envar> entry at
 31.1345 +	    all, this feature will be disabled.  Here is an example of
 31.1346 +	    how to enable all three supported formats.</para>
 31.1347 +	  <programlisting>[web]
 31.1348 +allow_archive = bz2 gz zip</programlisting>
 31.1349 +	</listitem>
 31.1350 +	<listitem><para id="x_4eb"><envar role="rc-item-web">allowpull</envar>:
 31.1351 +	    Boolean.  Determines whether the web interface allows
 31.1352 +	    remote users to <command role="hg-cmd">hg pull</command>
 31.1353 +	    and <command role="hg-cmd">hg clone</command> this
 31.1354 +	    repository over HTTP.  If set to <literal>no</literal> or
 31.1355 +	    <literal>false</literal>, only the
 31.1356 +	    <quote>human-oriented</quote> portion of the web interface
 31.1357 +	    is available.</para>
 31.1358 +	</listitem>
 31.1359 +	<listitem><para id="x_4ec"><envar role="rc-item-web">contact</envar>:
 31.1360 +	    String.  A free-form (but preferably brief) string
 31.1361 +	    identifying the person or group in charge of the
 31.1362 +	    repository.  This often contains the name and email
 31.1363 +	    address of a person or mailing list.  It often makes sense
 31.1364 +	    to place this entry in a repository's own <filename
 31.1365 +	      role="special">.hg/hgrc</filename> file, but it can make
 31.1366 +	    sense to use in a global <filename
 31.1367 +	      role="special">~/.hgrc</filename> if every repository
 31.1368 +	    has a single maintainer.</para>
 31.1369 +	</listitem>
 31.1370 +	<listitem><para id="x_4ed"><envar role="rc-item-web">maxchanges</envar>:
 31.1371 +	    Integer.  The default maximum number of changesets to
 31.1372 +	    display in a single page of output.</para>
 31.1373 +	</listitem>
 31.1374 +	<listitem><para id="x_4ee"><envar role="rc-item-web">maxfiles</envar>:
 31.1375 +	    Integer.  The default maximum number of modified files to
 31.1376 +	    display in a single page of output.</para>
 31.1377 +	</listitem>
 31.1378 +	<listitem><para id="x_4ef"><envar role="rc-item-web">stripes</envar>:
 31.1379 +	    Integer.  If the web interface displays alternating
 31.1380 +	    <quote>stripes</quote> to make it easier to visually align
 31.1381 +	    rows when you are looking at a table, this number controls
 31.1382 +	    the number of rows in each stripe.</para>
 31.1383 +	</listitem>
 31.1384 +	<listitem><para id="x_4f0"><envar
 31.1385 +	      role="rc-item-web">style</envar>: Controls the template
 31.1386 +	    Mercurial uses to display the web interface.  Mercurial
 31.1387 +	    ships with several web templates.</para>
 31.1388 +	  <itemizedlist>
 31.1389 +	    <listitem>
 31.1390 +	      <para id="x_6aa"><literal>coal</literal> is monochromatic.</para>
 31.1391 +	    </listitem>
 31.1392 +	    <listitem>
 31.1393 +	      <para id="x_6ab"><literal>gitweb</literal> emulates the visual
 31.1394 +		style of git's web interface.</para>
 31.1395 +	    </listitem>
 31.1396 +	    <listitem>
 31.1397 +	      <para id="x_6ac"><literal>monoblue</literal> uses solid blues and
 31.1398 +		greys.</para>
 31.1399 +	    </listitem>
 31.1400 +	    <listitem>
 31.1401 +	      <para id="x_6ad"><literal>paper</literal> is the default.</para>
 31.1402 +	    </listitem>
 31.1403 +	    <listitem>
 31.1404 +	      <para id="x_6ae"><literal>spartan</literal> was the default for a
 31.1405 +		long time.</para>
 31.1406 +	    </listitem>
 31.1407 +	  </itemizedlist>
 31.1408 +	  <para id="x_6af">You can
 31.1409 +	    also specify a custom template of your own; see 
 31.1410 +	    <xref linkend="chap:template"/> for details. Here, you can
 31.1411 +	    see how to enable the <literal>gitweb</literal>
 31.1412 +	    style.</para>
 31.1413 +	  <programlisting>[web]
 31.1414 +style = gitweb</programlisting>
 31.1415 +	</listitem>
 31.1416 +	<listitem><para id="x_4f1"><envar role="rc-item-web">templates</envar>:
 31.1417 +	    Path.  The directory in which to search for template
 31.1418 +	    files.  By default, Mercurial searches in the directory in
 31.1419 +	    which it was installed.</para>
 31.1420 +	</listitem></itemizedlist>
 31.1421 +      <para id="x_4f2">If you are using <filename
 31.1422 +	  role="special">hgwebdir.cgi</filename>, you can place a few
 31.1423 +	configuration items in a <literal role="rc-web">web</literal>
 31.1424 +	section of the <filename
 31.1425 +	  role="special">hgweb.config</filename> file instead of a
 31.1426 +	<filename role="special">~/.hgrc</filename> file, for
 31.1427 +	convenience.  These items are <envar
 31.1428 +	  role="rc-item-web">motd</envar> and <envar
 31.1429 +	  role="rc-item-web">style</envar>.</para>
 31.1430 +
 31.1431 +      <sect3>
 31.1432 +	<title>Options specific to an individual repository</title>
 31.1433 +
 31.1434 +	<para id="x_4f3">A few <literal role="rc-web">web</literal> configuration
 31.1435 +	  items ought to be placed in a repository's local <filename
 31.1436 +	    role="special">.hg/hgrc</filename>, rather than a user's
 31.1437 +	  or global <filename role="special">~/.hgrc</filename>.</para>
 31.1438 +	<itemizedlist>
 31.1439 +	  <listitem><para id="x_4f4"><envar
 31.1440 +		role="rc-item-web">description</envar>: String.  A
 31.1441 +	      free-form (but preferably brief) string that describes
 31.1442 +	      the contents or purpose of the repository.</para>
 31.1443 +	  </listitem>
 31.1444 +	  <listitem><para id="x_4f5"><envar role="rc-item-web">name</envar>:
 31.1445 +	      String.  The name to use for the repository in the web
 31.1446 +	      interface.  This overrides the default name, which is
 31.1447 +	      the last component of the repository's path.</para>
 31.1448 +	  </listitem></itemizedlist>
 31.1449 +      </sect3>
 31.1450 +
 31.1451 +      <sect3>
 31.1452 +	<title>Options specific to the <command role="hg-cmd">hg
 31.1453 +	    serve</command> command</title>
 31.1454 +
 31.1455 +	<para id="x_4f6">Some of the items in the <literal
 31.1456 +	    role="rc-web">web</literal> section of a <filename
 31.1457 +	    role="special">~/.hgrc</filename> file are only for use
 31.1458 +	  with the <command role="hg-cmd">hg serve</command>
 31.1459 +	  command.</para>
 31.1460 +	<itemizedlist>
 31.1461 +	  <listitem><para id="x_4f7"><envar role="rc-item-web">accesslog</envar>:
 31.1462 +	      Path.  The name of a file into which to write an access
 31.1463 +	      log.  By default, the <command role="hg-cmd">hg
 31.1464 +		serve</command> command writes this information to
 31.1465 +	      standard output, not to a file.  Log entries are written
 31.1466 +	      in the standard <quote>combined</quote> file format used
 31.1467 +	      by almost all web servers.</para>
 31.1468 +	  </listitem>
 31.1469 +	  <listitem><para id="x_4f8"><envar role="rc-item-web">address</envar>:
 31.1470 +	      String.  The local address on which the server should
 31.1471 +	      listen for incoming connections.  By default, the server
 31.1472 +	      listens on all addresses.</para>
 31.1473 +	  </listitem>
 31.1474 +	  <listitem><para id="x_4f9"><envar role="rc-item-web">errorlog</envar>:
 31.1475 +	      Path.  The name of a file into which to write an error
 31.1476 +	      log.  By default, the <command role="hg-cmd">hg
 31.1477 +		serve</command> command writes this information to
 31.1478 +	      standard error, not to a file.</para>
 31.1479 +	  </listitem>
 31.1480 +	  <listitem><para id="x_4fa"><envar role="rc-item-web">ipv6</envar>:
 31.1481 +	      Boolean.  Whether to use the IPv6 protocol. By default,
 31.1482 +	      IPv6 is not used.</para>
 31.1483 +	  </listitem>
 31.1484 +	  <listitem><para id="x_4fb"><envar role="rc-item-web">port</envar>:
 31.1485 +	      Integer.  The TCP port number on which the server should
 31.1486 +	      listen.  The default port number used is 8000.</para>
 31.1487 +	  </listitem></itemizedlist>
 31.1488 +      </sect3>
 31.1489 +
 31.1490 +      <sect3>
 31.1491 +	<title>Choosing the right <filename
 31.1492 +	    role="special">~/.hgrc</filename> file to add <literal
 31.1493 +	    role="rc-web">web</literal> items to</title>
 31.1494 +
 31.1495 +	<para id="x_4fc">It is important to remember that a web server like
 31.1496 +	  Apache or <literal>lighttpd</literal> will run under a user
 31.1497 +	  ID that is different to yours. CGI scripts run by your
 31.1498 +	  server, such as <filename
 31.1499 +	    role="special">hgweb.cgi</filename>, will usually also run
 31.1500 +	  under that user ID.</para>
 31.1501 +
 31.1502 +	<para id="x_4fd">If you add <literal role="rc-web">web</literal> items to
 31.1503 +	  your own personal <filename role="special">~/.hgrc</filename> file, CGI scripts won't read that
 31.1504 +	  <filename role="special">~/.hgrc</filename> file.  Those
 31.1505 +	  settings will thus only affect the behavior of the <command
 31.1506 +	    role="hg-cmd">hg serve</command> command when you run it.
 31.1507 +	  To cause CGI scripts to see your settings, either create a
 31.1508 +	  <filename role="special">~/.hgrc</filename> file in the
 31.1509 +	  home directory of the user ID that runs your web server, or
 31.1510 +	  add those settings to a system-wide <filename
 31.1511 +	    role="special">hgrc</filename> file.</para>
 31.1512 +      </sect3>
 31.1513 +    </sect2>
 31.1514 +  </sect1>
 31.1515 +
 31.1516 +  <sect1>
 31.1517 +    <title>System-wide configuration</title>
 31.1518 +
 31.1519 +    <para id="x_6b0">On Unix-like systems shared by multiple users (such as a
 31.1520 +      server to which people publish changes), it often makes sense to
 31.1521 +      set up some global default behaviors, such as what theme to use
 31.1522 +      in web interfaces.</para>
 31.1523 +
 31.1524 +    <para id="x_6b1">If a file named <filename>/etc/mercurial/hgrc</filename>
 31.1525 +      exists, Mercurial will read it at startup time and apply any
 31.1526 +      configuration settings it finds in that file.  It will also look
 31.1527 +      for files ending in a <literal>.rc</literal> extension in a
 31.1528 +      directory named <filename>/etc/mercurial/hgrc.d</filename>, and
 31.1529 +      apply any configuration settings it finds in each of those
 31.1530 +      files.</para>
 31.1531 +
 31.1532 +    <sect2>
 31.1533 +      <title>Making Mercurial more trusting</title>
 31.1534 +
 31.1535 +      <para id="x_6b2">One situation in which a global <filename>hgrc</filename>
 31.1536 +	can be useful is if users are pulling changes owned by other
 31.1537 +	users.  By default, Mercurial will not trust most of the
 31.1538 +	configuration items in a <filename>.hg/hgrc</filename> file
 31.1539 +	inside a repository that is owned by a different user. If we
 31.1540 +	clone or pull changes from such a repository, Mercurial will
 31.1541 +	print a warning stating that it does not trust their
 31.1542 +	<filename>.hg/hgrc</filename>.</para>
 31.1543 +
 31.1544 +      <para id="x_6b3">If everyone in a particular Unix group is on the same team
 31.1545 +	and <emphasis>should</emphasis> trust each other's
 31.1546 +	configuration settings, or we want to trust particular users,
 31.1547 +	we can override Mercurial's skeptical defaults by creating a
 31.1548 +	system-wide <filename>hgrc</filename> file such as the
 31.1549 +	following:</para>
 31.1550 +
 31.1551 +    <programlisting># Save this as e.g. /etc/mercurial/hgrc.d/trust.rc
 31.1552 +[trusted]
 31.1553 +# Trust all entries in any hgrc file owned by the "editors" or
 31.1554 +# "www-data" groups.
 31.1555 +groups = editors, www-data
 31.1556 +
 31.1557 +# Trust entries in hgrc files owned by the following users.
 31.1558 +users = apache, bobo
 31.1559 +</programlisting>
 31.1560 +    </sect2>
 31.1561 +  </sect1>
 31.1562 +</chapter>
 31.1563 +
 31.1564 +<!--
 31.1565 +local variables: 
 31.1566 +sgml-parent-document: ("00book.xml" "book" "chapter")
 31.1567 +end:
 31.1568 +-->
    32.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.2 +++ b/en/ch07-filenames.xml	Sun Aug 16 03:41:39 2009 +0200
    32.3 @@ -0,0 +1,451 @@
    32.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    32.5 +
    32.6 +<chapter id="chap:names">
    32.7 +  <?dbhtml filename="file-names-and-pattern-matching.html"?>
    32.8 +  <title>File names and pattern matching</title>
    32.9 +
   32.10 +  <para id="x_543">Mercurial provides mechanisms that let you work with file
   32.11 +    names in a consistent and expressive way.</para>
   32.12 +
   32.13 +  <sect1>
   32.14 +    <title>Simple file naming</title>
   32.15 +
   32.16 +    <para id="x_544">Mercurial uses a unified piece of machinery <quote>under the
   32.17 +	hood</quote> to handle file names.  Every command behaves
   32.18 +      uniformly with respect to file names.  The way in which commands
   32.19 +      work with file names is as follows.</para>
   32.20 +
   32.21 +    <para id="x_545">If you explicitly name real files on the command line,
   32.22 +      Mercurial works with exactly those files, as you would expect.
   32.23 +      &interaction.filenames.files;</para>
   32.24 +
   32.25 +    <para id="x_546">When you provide a directory name, Mercurial will interpret
   32.26 +      this as <quote>operate on every file in this directory and its
   32.27 +	subdirectories</quote>. Mercurial traverses the files and
   32.28 +      subdirectories in a directory in alphabetical order.  When it
   32.29 +      encounters a subdirectory, it will traverse that subdirectory
   32.30 +      before continuing with the current directory.</para>
   32.31 +
   32.32 +      &interaction.filenames.dirs;
   32.33 +  </sect1>
   32.34 +
   32.35 +  <sect1>
   32.36 +    <title>Running commands without any file names</title>
   32.37 +
   32.38 +    <para id="x_547">Mercurial's commands that work with file names have useful
   32.39 +      default behaviors when you invoke them without providing any
   32.40 +      file names or patterns.  What kind of behavior you should
   32.41 +      expect depends on what the command does.  Here are a few rules
   32.42 +      of thumb you can use to predict what a command is likely to do
   32.43 +      if you don't give it any names to work with.</para>
   32.44 +    <itemizedlist>
   32.45 +      <listitem><para id="x_548">Most commands will operate on the entire working
   32.46 +	  directory. This is what the <command role="hg-cmd">hg
   32.47 +	    add</command> command does, for example.</para>
   32.48 +      </listitem>
   32.49 +      <listitem><para id="x_549">If the command has effects that are difficult or
   32.50 +	  impossible to reverse, it will force you to explicitly
   32.51 +	  provide at least one name or pattern (see below).  This
   32.52 +	  protects you from accidentally deleting files by running
   32.53 +	  <command role="hg-cmd">hg remove</command> with no
   32.54 +	  arguments, for example.</para>
   32.55 +      </listitem></itemizedlist>
   32.56 +
   32.57 +    <para id="x_54a">It's easy to work around these default behaviors if they
   32.58 +      don't suit you.  If a command normally operates on the whole
   32.59 +      working directory, you can invoke it on just the current
   32.60 +      directory and its subdirectories by giving it the name
   32.61 +      <quote><filename class="directory">.</filename></quote>.</para>
   32.62 +
   32.63 +    &interaction.filenames.wdir-subdir;
   32.64 +
   32.65 +    <para id="x_54b">Along the same lines, some commands normally print file
   32.66 +      names relative to the root of the repository, even if you're
   32.67 +      invoking them from a subdirectory.  Such a command will print
   32.68 +      file names relative to your subdirectory if you give it explicit
   32.69 +      names.  Here, we're going to run <command role="hg-cmd">hg
   32.70 +	status</command> from a subdirectory, and get it to operate on
   32.71 +      the entire working directory while printing file names relative
   32.72 +      to our subdirectory, by passing it the output of the <command
   32.73 +	role="hg-cmd">hg root</command> command.</para>
   32.74 +
   32.75 +      &interaction.filenames.wdir-relname;
   32.76 +  </sect1>
   32.77 +
   32.78 +  <sect1>
   32.79 +    <title>Telling you what's going on</title>
   32.80 +
   32.81 +    <para id="x_54c">The <command role="hg-cmd">hg add</command> example in the
   32.82 +      preceding section illustrates something else that's helpful
   32.83 +      about Mercurial commands.  If a command operates on a file that
   32.84 +      you didn't name explicitly on the command line, it will usually
   32.85 +      print the name of the file, so that you will not be surprised
   32.86 +      what's going on.</para>
   32.87 +
   32.88 +    <para id="x_54d">The principle here is of <emphasis>least
   32.89 +	surprise</emphasis>.  If you've exactly named a file on the
   32.90 +      command line, there's no point in repeating it back at you.  If
   32.91 +      Mercurial is acting on a file <emphasis>implicitly</emphasis>, e.g.
   32.92 +      because you provided no names, or a directory, or a pattern (see
   32.93 +      below), it is safest to tell you what files it's operating on.</para>
   32.94 +
   32.95 +    <para id="x_54e">For commands that behave this way, you can silence them
   32.96 +      using the <option role="hg-opt-global">-q</option> option.  You
   32.97 +      can also get them to print the name of every file, even those
   32.98 +      you've named explicitly, using the <option
   32.99 +	role="hg-opt-global">-v</option> option.</para>
  32.100 +  </sect1>
  32.101 +
  32.102 +  <sect1>
  32.103 +    <title>Using patterns to identify files</title>
  32.104 +
  32.105 +    <para id="x_54f">In addition to working with file and directory names,
  32.106 +      Mercurial lets you use <emphasis>patterns</emphasis> to identify
  32.107 +      files.  Mercurial's pattern handling is expressive.</para>
  32.108 +
  32.109 +    <para id="x_550">On Unix-like systems (Linux, MacOS, etc.), the job of
  32.110 +      matching file names to patterns normally falls to the shell.  On
  32.111 +      these systems, you must explicitly tell Mercurial that a name is
  32.112 +      a pattern.  On Windows, the shell does not expand patterns, so
  32.113 +      Mercurial will automatically identify names that are patterns,
  32.114 +      and expand them for you.</para>
  32.115 +
  32.116 +    <para id="x_551">To provide a pattern in place of a regular name on the
  32.117 +      command line, the mechanism is simple:</para>
  32.118 +    <programlisting>syntax:patternbody</programlisting>
  32.119 +    <para id="x_552">That is, a pattern is identified by a short text string that
  32.120 +      says what kind of pattern this is, followed by a colon, followed
  32.121 +      by the actual pattern.</para>
  32.122 +
  32.123 +    <para id="x_553">Mercurial supports two kinds of pattern syntax.  The most
  32.124 +      frequently used is called <literal>glob</literal>; this is the
  32.125 +      same kind of pattern matching used by the Unix shell, and should
  32.126 +      be familiar to Windows command prompt users, too.</para>
  32.127 +
  32.128 +    <para id="x_554">When Mercurial does automatic pattern matching on Windows,
  32.129 +      it uses <literal>glob</literal> syntax.  You can thus omit the
  32.130 +      <quote><literal>glob:</literal></quote> prefix on Windows, but
  32.131 +      it's safe to use it, too.</para>
  32.132 +
  32.133 +    <para id="x_555">The <literal>re</literal> syntax is more powerful; it lets
  32.134 +      you specify patterns using regular expressions, also known as
  32.135 +      regexps.</para>
  32.136 +
  32.137 +    <para id="x_556">By the way, in the examples that follow, notice that I'm
  32.138 +      careful to wrap all of my patterns in quote characters, so that
  32.139 +      they won't get expanded by the shell before Mercurial sees
  32.140 +      them.</para>
  32.141 +
  32.142 +    <sect2>
  32.143 +      <title>Shell-style <literal>glob</literal> patterns</title>
  32.144 +
  32.145 +      <para id="x_557">This is an overview of the kinds of patterns you can use
  32.146 +	when you're matching on glob patterns.</para>
  32.147 +
  32.148 +      <para id="x_558">The <quote><literal>*</literal></quote> character matches
  32.149 +	any string, within a single directory.</para>
  32.150 +
  32.151 +      &interaction.filenames.glob.star;
  32.152 +
  32.153 +      <para id="x_559">The <quote><literal>**</literal></quote> pattern matches
  32.154 +	any string, and crosses directory boundaries.  It's not a
  32.155 +	standard Unix glob token, but it's accepted by several popular
  32.156 +	Unix shells, and is very useful.</para>
  32.157 +
  32.158 +      &interaction.filenames.glob.starstar;
  32.159 +
  32.160 +      <para id="x_55a">The <quote><literal>?</literal></quote> pattern matches
  32.161 +	any single character.</para>
  32.162 +
  32.163 +      &interaction.filenames.glob.question;
  32.164 +
  32.165 +      <para id="x_55b">The <quote><literal>[</literal></quote> character begins a
  32.166 +	<emphasis>character class</emphasis>.  This matches any single
  32.167 +	character within the class.  The class ends with a
  32.168 +	<quote><literal>]</literal></quote> character.  A class may
  32.169 +	contain multiple <emphasis>range</emphasis>s of the form
  32.170 +	<quote><literal>a-f</literal></quote>, which is shorthand for
  32.171 +	<quote><literal>abcdef</literal></quote>.</para>
  32.172 +
  32.173 +	&interaction.filenames.glob.range;
  32.174 +
  32.175 +      <para id="x_55c">If the first character after the
  32.176 +	<quote><literal>[</literal></quote> in a character class is a
  32.177 +	<quote><literal>!</literal></quote>, it
  32.178 +	<emphasis>negates</emphasis> the class, making it match any
  32.179 +	single character not in the class.</para>
  32.180 +
  32.181 +      <para id="x_55d">A <quote><literal>{</literal></quote> begins a group of
  32.182 +	subpatterns, where the whole group matches if any subpattern
  32.183 +	in the group matches.  The <quote><literal>,</literal></quote>
  32.184 +	character separates subpatterns, and
  32.185 +	<quote><literal>}</literal></quote> ends the group.</para>
  32.186 +
  32.187 +      &interaction.filenames.glob.group;
  32.188 +
  32.189 +      <sect3>
  32.190 +	<title>Watch out!</title>
  32.191 +
  32.192 +	<para id="x_55e">Don't forget that if you want to match a pattern in any
  32.193 +	  directory, you should not be using the
  32.194 +	  <quote><literal>*</literal></quote> match-any token, as this
  32.195 +	  will only match within one directory.  Instead, use the
  32.196 +	  <quote><literal>**</literal></quote> token.  This small
  32.197 +	  example illustrates the difference between the two.</para>
  32.198 +
  32.199 +	  &interaction.filenames.glob.star-starstar;
  32.200 +      </sect3>
  32.201 +    </sect2>
  32.202 +
  32.203 +    <sect2>
  32.204 +      <title>Regular expression matching with <literal>re</literal>
  32.205 +	patterns</title>
  32.206 +
  32.207 +      <para id="x_55f">Mercurial accepts the same regular expression syntax as
  32.208 +	the Python programming language (it uses Python's regexp
  32.209 +	engine internally). This is based on the Perl language's
  32.210 +	regexp syntax, which is the most popular dialect in use (it's
  32.211 +	also used in Java, for example).</para>
  32.212 +
  32.213 +      <para id="x_560">I won't discuss Mercurial's regexp dialect in any detail
  32.214 +	here, as regexps are not often used.  Perl-style regexps are
  32.215 +	in any case already exhaustively documented on a multitude of
  32.216 +	web sites, and in many books.  Instead, I will focus here on a
  32.217 +	few things you should know if you find yourself needing to use
  32.218 +	regexps with Mercurial.</para>
  32.219 +
  32.220 +      <para id="x_561">A regexp is matched against an entire file name, relative
  32.221 +	to the root of the repository.  In other words, even if you're
  32.222 +	already in subbdirectory <filename
  32.223 +	  class="directory">foo</filename>, if you want to match files
  32.224 +	under this directory, your pattern must start with
  32.225 +	<quote><literal>foo/</literal></quote>.</para>
  32.226 +
  32.227 +      <para id="x_562">One thing to note, if you're familiar with Perl-style
  32.228 +	regexps, is that Mercurial's are <emphasis>rooted</emphasis>.
  32.229 +	That is, a regexp starts matching against the beginning of a
  32.230 +	string; it doesn't look for a match anywhere within the
  32.231 +	string.  To match anywhere in a string, start your pattern
  32.232 +	with <quote><literal>.*</literal></quote>.</para>
  32.233 +    </sect2>
  32.234 +  </sect1>
  32.235 +
  32.236 +  <sect1>
  32.237 +    <title>Filtering files</title>
  32.238 +
  32.239 +    <para id="x_563">Not only does Mercurial give you a variety of ways to
  32.240 +      specify files; it lets you further winnow those files using
  32.241 +      <emphasis>filters</emphasis>.  Commands that work with file
  32.242 +      names accept two filtering options.</para>
  32.243 +    <itemizedlist>
  32.244 +      <listitem><para id="x_564"><option role="hg-opt-global">-I</option>, or
  32.245 +	  <option role="hg-opt-global">--include</option>, lets you
  32.246 +	  specify a pattern that file names must match in order to be
  32.247 +	  processed.</para>
  32.248 +      </listitem>
  32.249 +      <listitem><para id="x_565"><option role="hg-opt-global">-X</option>, or
  32.250 +	  <option role="hg-opt-global">--exclude</option>, gives you a
  32.251 +	  way to <emphasis>avoid</emphasis> processing files, if they
  32.252 +	  match this pattern.</para>
  32.253 +      </listitem></itemizedlist>
  32.254 +    <para id="x_566">You can provide multiple <option
  32.255 +	role="hg-opt-global">-I</option> and <option
  32.256 +	role="hg-opt-global">-X</option> options on the command line,
  32.257 +      and intermix them as you please.  Mercurial interprets the
  32.258 +      patterns you provide using glob syntax by default (but you can
  32.259 +      use regexps if you need to).</para>
  32.260 +
  32.261 +    <para id="x_567">You can read a <option role="hg-opt-global">-I</option>
  32.262 +      filter as <quote>process only the files that match this
  32.263 +	filter</quote>.</para>
  32.264 +
  32.265 +    &interaction.filenames.filter.include;
  32.266 +
  32.267 +    <para id="x_568">The <option role="hg-opt-global">-X</option> filter is best
  32.268 +      read as <quote>process only the files that don't match this
  32.269 +	pattern</quote>.</para>
  32.270 +
  32.271 +    &interaction.filenames.filter.exclude;
  32.272 +  </sect1>
  32.273 +
  32.274 +  <sect1>
  32.275 +    <title>Permanently ignoring unwanted files and directories</title>
  32.276 +
  32.277 +    <para id="x_569">When you create a new repository, the chances are
  32.278 +      that over time it will grow to contain files that ought to
  32.279 +      <emphasis>not</emphasis> be managed by Mercurial, but which you
  32.280 +      don't want to see listed every time you run <command>hg
  32.281 +	status</command>.  For instance, <quote>build products</quote>
  32.282 +      are files that are created as part of a build but which should
  32.283 +      not be managed by a revision control system.  The most common
  32.284 +      build products are output files produced by software tools such
  32.285 +      as compilers.  As another example, many text editors litter a
  32.286 +      directory with lock files, temporary working files, and backup
  32.287 +      files, which it also makes no sense to manage.</para>
  32.288 +
  32.289 +    <para id="x_6b4">To have Mercurial permanently ignore such files, create a
  32.290 +      file named <filename>.hgignore</filename> in the root of your
  32.291 +      repository.  You <emphasis>should</emphasis> <command>hg
  32.292 +      add</command> this file so that it gets tracked with the rest of
  32.293 +      your repository contents, since your collaborators will probably
  32.294 +      find it useful too.</para>
  32.295 +
  32.296 +    <para id="x_6b5">By default, the <filename>.hgignore</filename> file should
  32.297 +      contain a list of regular expressions, one per line.  Empty
  32.298 +      lines are skipped. Most people prefer to describe the files they
  32.299 +      want to ignore using the <quote>glob</quote> syntax that we
  32.300 +      described above, so a typical <filename>.hgignore</filename>
  32.301 +      file will start with this directive:</para>
  32.302 +
  32.303 +    <programlisting>syntax: glob</programlisting>
  32.304 +
  32.305 +    <para id="x_6b6">This tells Mercurial to interpret the lines that follow as
  32.306 +      glob patterns, not regular expressions.</para>
  32.307 +
  32.308 +    <para id="x_6b7">Here is a typical-looking <filename>.hgignore</filename>
  32.309 +      file.</para>
  32.310 +
  32.311 +    <programlisting>syntax: glob
  32.312 +# This line is a comment, and will be skipped.
  32.313 +# Empty lines are skipped too.
  32.314 +
  32.315 +# Backup files left behind by the Emacs editor.
  32.316 +*~
  32.317 +
  32.318 +# Lock files used by the Emacs editor.
  32.319 +# Notice that the "#" character is quoted with a backslash.
  32.320 +# This prevents it from being interpreted as starting a comment.
  32.321 +.\#*
  32.322 +
  32.323 +# Temporary files used by the vim editor.
  32.324 +.*.swp
  32.325 +
  32.326 +# A hidden file created by the Mac OS X Finder.
  32.327 +.DS_Store
  32.328 +</programlisting>
  32.329 +  </sect1>
  32.330 +
  32.331 +  <sect1 id="sec:names:case">
  32.332 +    <title>Case sensitivity</title>
  32.333 +
  32.334 +    <para id="x_56a">If you're working in a mixed development environment that
  32.335 +      contains both Linux (or other Unix) systems and Macs or Windows
  32.336 +      systems, you should keep in the back of your mind the knowledge
  32.337 +      that they treat the case (<quote>N</quote> versus
  32.338 +      <quote>n</quote>) of file names in incompatible ways.  This is
  32.339 +      not very likely to affect you, and it's easy to deal with if it
  32.340 +      does, but it could surprise you if you don't know about
  32.341 +      it.</para>
  32.342 +
  32.343 +    <para id="x_56b">Operating systems and filesystems differ in the way they
  32.344 +      handle the <emphasis>case</emphasis> of characters in file and
  32.345 +      directory names.  There are three common ways to handle case in
  32.346 +      names.</para>
  32.347 +    <itemizedlist>
  32.348 +      <listitem><para id="x_56c">Completely case insensitive.  Uppercase and
  32.349 +	  lowercase versions of a letter are treated as identical,
  32.350 +	  both when creating a file and during subsequent accesses.
  32.351 +	  This is common on older DOS-based systems.</para>
  32.352 +      </listitem>
  32.353 +      <listitem><para id="x_56d">Case preserving, but insensitive.  When a file
  32.354 +	  or directory is created, the case of its name is stored, and
  32.355 +	  can be retrieved and displayed by the operating system.
  32.356 +	  When an existing file is being looked up, its case is
  32.357 +	  ignored.  This is the standard arrangement on Windows and
  32.358 +	  MacOS.  The names <filename>foo</filename> and
  32.359 +	  <filename>FoO</filename> identify the same file.  This
  32.360 +	  treatment of uppercase and lowercase letters as
  32.361 +	  interchangeable is also referred to as <emphasis>case
  32.362 +	    folding</emphasis>.</para>
  32.363 +      </listitem>
  32.364 +      <listitem><para id="x_56e">Case sensitive.  The case of a name
  32.365 +	  is significant at all times. The names
  32.366 +	  <filename>foo</filename> and <filename>FoO</filename>
  32.367 +	  identify different files.  This is the way Linux and Unix
  32.368 +	  systems normally work.</para>
  32.369 +      </listitem></itemizedlist>
  32.370 +
  32.371 +    <para id="x_56f">On Unix-like systems, it is possible to have any or all of
  32.372 +      the above ways of handling case in action at once.  For example,
  32.373 +      if you use a USB thumb drive formatted with a FAT32 filesystem
  32.374 +      on a Linux system, Linux will handle names on that filesystem in
  32.375 +      a case preserving, but insensitive, way.</para>
  32.376 +
  32.377 +    <sect2>
  32.378 +      <title>Safe, portable repository storage</title>
  32.379 +
  32.380 +      <para id="x_570">Mercurial's repository storage mechanism is <emphasis>case
  32.381 +	  safe</emphasis>.  It translates file names so that they can
  32.382 +	be safely stored on both case sensitive and case insensitive
  32.383 +	filesystems.  This means that you can use normal file copying
  32.384 +	tools to transfer a Mercurial repository onto, for example, a
  32.385 +	USB thumb drive, and safely move that drive and repository
  32.386 +	back and forth between a Mac, a PC running Windows, and a
  32.387 +	Linux box.</para>
  32.388 +
  32.389 +    </sect2>
  32.390 +    <sect2>
  32.391 +      <title>Detecting case conflicts</title>
  32.392 +
  32.393 +      <para id="x_571">When operating in the working directory, Mercurial honours
  32.394 +	the naming policy of the filesystem where the working
  32.395 +	directory is located.  If the filesystem is case preserving,
  32.396 +	but insensitive, Mercurial will treat names that differ only
  32.397 +	in case as the same.</para>
  32.398 +
  32.399 +      <para id="x_572">An important aspect of this approach is that it is
  32.400 +	possible to commit a changeset on a case sensitive (typically
  32.401 +	Linux or Unix) filesystem that will cause trouble for users on
  32.402 +	case insensitive (usually Windows and MacOS) users.  If a
  32.403 +	Linux user commits changes to two files, one named
  32.404 +	<filename>myfile.c</filename> and the other named
  32.405 +	<filename>MyFile.C</filename>, they will be stored correctly
  32.406 +	in the repository.  And in the working directories of other
  32.407 +	Linux users, they will be correctly represented as separate
  32.408 +	files.</para>
  32.409 +
  32.410 +      <para id="x_573">If a Windows or Mac user pulls this change, they will not
  32.411 +	initially have a problem, because Mercurial's repository
  32.412 +	storage mechanism is case safe.  However, once they try to
  32.413 +	<command role="hg-cmd">hg update</command> the working
  32.414 +	directory to that changeset, or <command role="hg-cmd">hg
  32.415 +	  merge</command> with that changeset, Mercurial will spot the
  32.416 +	conflict between the two file names that the filesystem would
  32.417 +	treat as the same, and forbid the update or merge from
  32.418 +	occurring.</para>
  32.419 +    </sect2>
  32.420 +
  32.421 +    <sect2>
  32.422 +      <title>Fixing a case conflict</title>
  32.423 +
  32.424 +      <para id="x_574">If you are using Windows or a Mac in a mixed environment
  32.425 +	where some of your collaborators are using Linux or Unix, and
  32.426 +	Mercurial reports a case folding conflict when you try to
  32.427 +	<command role="hg-cmd">hg update</command> or <command
  32.428 +	  role="hg-cmd">hg merge</command>, the procedure to fix the
  32.429 +	problem is simple.</para>
  32.430 +
  32.431 +      <para id="x_575">Just find a nearby Linux or Unix box, clone the problem
  32.432 +	repository onto it, and use Mercurial's <command
  32.433 +	  role="hg-cmd">hg rename</command> command to change the
  32.434 +	names of any offending files or directories so that they will
  32.435 +	no longer cause case folding conflicts.  Commit this change,
  32.436 +	<command role="hg-cmd">hg pull</command> or <command
  32.437 +	  role="hg-cmd">hg push</command> it across to your Windows or
  32.438 +	MacOS system, and <command role="hg-cmd">hg update</command>
  32.439 +	to the revision with the non-conflicting names.</para>
  32.440 +
  32.441 +      <para id="x_576">The changeset with case-conflicting names will remain in
  32.442 +	your project's history, and you still won't be able to
  32.443 +	<command role="hg-cmd">hg update</command> your working
  32.444 +	directory to that changeset on a Windows or MacOS system, but
  32.445 +	you can continue development unimpeded.</para>
  32.446 +    </sect2>
  32.447 +  </sect1>
  32.448 +</chapter>
  32.449 +
  32.450 +<!--
  32.451 +local variables: 
  32.452 +sgml-parent-document: ("00book.xml" "book" "chapter")
  32.453 +end:
  32.454 +-->
    33.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.2 +++ b/en/ch08-branch.xml	Sun Aug 16 03:41:39 2009 +0200
    33.3 @@ -0,0 +1,533 @@
    33.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    33.5 +
    33.6 +<chapter id="chap:branch">
    33.7 +  <?dbhtml filename="managing-releases-and-branchy-development.html"?>
    33.8 +  <title>Managing releases and branchy development</title>
    33.9 +
   33.10 +  <para id="x_369">Mercurial provides several mechanisms for you to manage a
   33.11 +    project that is making progress on multiple fronts at once.  To
   33.12 +    understand these mechanisms, let's first take a brief look at a
   33.13 +    fairly normal software project structure.</para>
   33.14 +
   33.15 +  <para id="x_36a">Many software projects issue periodic <quote>major</quote>
   33.16 +    releases that contain substantial new features.  In parallel, they
   33.17 +    may issue <quote>minor</quote> releases.  These are usually
   33.18 +    identical to the major releases off which they're based, but with
   33.19 +    a few bugs fixed.</para>
   33.20 +
   33.21 +  <para id="x_36b">In this chapter, we'll start by talking about how to keep
   33.22 +    records of project milestones such as releases.  We'll then
   33.23 +    continue on to talk about the flow of work between different
   33.24 +    phases of a project, and how Mercurial can help you to isolate and
   33.25 +    manage this work.</para>
   33.26 +
   33.27 +  <sect1>
   33.28 +    <title>Giving a persistent name to a revision</title>
   33.29 +
   33.30 +    <para id="x_36c">Once you decide that you'd like to call a particular
   33.31 +      revision a <quote>release</quote>, it's a good idea to record
   33.32 +      the identity of that revision. This will let you reproduce that
   33.33 +      release at a later date, for whatever purpose you might need at
   33.34 +      the time (reproducing a bug, porting to a new platform, etc).
   33.35 +      &interaction.tag.init;</para>
   33.36 +
   33.37 +    <para id="x_36d">Mercurial lets you give a permanent name to any revision
   33.38 +      using the <command role="hg-cmd">hg tag</command> command.  Not
   33.39 +      surprisingly, these names are called <quote>tags</quote>.</para>
   33.40 +
   33.41 +    &interaction.tag.tag;
   33.42 +
   33.43 +    <para id="x_36e">A tag is nothing more than a <quote>symbolic name</quote>
   33.44 +      for a revision.  Tags exist purely for your convenience, so that
   33.45 +      you have a handy permanent way to refer to a revision; Mercurial
   33.46 +      doesn't interpret the tag names you use in any way.  Neither
   33.47 +      does Mercurial place any restrictions on the name of a tag,
   33.48 +      beyond a few that are necessary to ensure that a tag can be
   33.49 +      parsed unambiguously.  A tag name cannot contain any of the
   33.50 +      following characters:</para>
   33.51 +    <itemizedlist>
   33.52 +      <listitem><para id="x_36f">Colon (ASCII 58,
   33.53 +	  <quote><literal>:</literal></quote>)</para>
   33.54 +      </listitem>
   33.55 +      <listitem><para id="x_370">Carriage return (ASCII 13,
   33.56 +	  <quote><literal>\r</literal></quote>)</para>
   33.57 +      </listitem>
   33.58 +      <listitem><para id="x_371">Newline (ASCII 10,
   33.59 +	  <quote><literal>\n</literal></quote>)</para>
   33.60 +      </listitem></itemizedlist>
   33.61 +
   33.62 +    <para id="x_372">You can use the <command role="hg-cmd">hg tags</command>
   33.63 +      command to display the tags present in your repository.  In the
   33.64 +      output, each tagged revision is identified first by its name,
   33.65 +      then by revision number, and finally by the unique hash of the
   33.66 +      revision.</para>
   33.67 +
   33.68 +    &interaction.tag.tags;
   33.69 +
   33.70 +    <para id="x_373">Notice that <literal>tip</literal> is listed in the output
   33.71 +      of <command role="hg-cmd">hg tags</command>.  The
   33.72 +      <literal>tip</literal> tag is a special <quote>floating</quote>
   33.73 +      tag, which always identifies the newest revision in the
   33.74 +      repository.</para>
   33.75 +
   33.76 +    <para id="x_374">In the output of the <command role="hg-cmd">hg
   33.77 +	tags</command> command, tags are listed in reverse order, by
   33.78 +      revision number.  This usually means that recent tags are listed
   33.79 +      before older tags.  It also means that <literal>tip</literal> is
   33.80 +      always going to be the first tag listed in the output of
   33.81 +      <command role="hg-cmd">hg tags</command>.</para>
   33.82 +
   33.83 +    <para id="x_375">When you run <command role="hg-cmd">hg log</command>, if it
   33.84 +      displays a revision that has tags associated with it, it will
   33.85 +      print those tags.</para>
   33.86 +
   33.87 +    &interaction.tag.log;
   33.88 +
   33.89 +    <para id="x_376">Any time you need to provide a revision ID to a Mercurial
   33.90 +      command, the command will accept a tag name in its place.
   33.91 +      Internally, Mercurial will translate your tag name into the
   33.92 +      corresponding revision ID, then use that.</para>
   33.93 +
   33.94 +    &interaction.tag.log.v1.0;
   33.95 +
   33.96 +    <para id="x_377">There's no limit on the number of tags you can have in a
   33.97 +      repository, or on the number of tags that a single revision can
   33.98 +      have.  As a practical matter, it's not a great idea to have
   33.99 +      <quote>too many</quote> (a number which will vary from project
  33.100 +      to project), simply because tags are supposed to help you to
  33.101 +      find revisions.  If you have lots of tags, the ease of using
  33.102 +      them to identify revisions diminishes rapidly.</para>
  33.103 +
  33.104 +    <para id="x_378">For example, if your project has milestones as frequent as
  33.105 +      every few days, it's perfectly reasonable to tag each one of
  33.106 +      those.  But if you have a continuous build system that makes
  33.107 +      sure every revision can be built cleanly, you'd be introducing a
  33.108 +      lot of noise if you were to tag every clean build.  Instead, you
  33.109 +      could tag failed builds (on the assumption that they're rare!),
  33.110 +      or simply not use tags to track buildability.</para>
  33.111 +
  33.112 +    <para id="x_379">If you want to remove a tag that you no longer want, use
  33.113 +      <command role="hg-cmd">hg tag --remove</command>.</para>
  33.114 +
  33.115 +    &interaction.tag.remove;
  33.116 +
  33.117 +    <para id="x_37a">You can also modify a tag at any time, so that it identifies
  33.118 +      a different revision, by simply issuing a new <command
  33.119 +	role="hg-cmd">hg tag</command> command. You'll have to use the
  33.120 +      <option role="hg-opt-tag">-f</option> option to tell Mercurial
  33.121 +      that you <emphasis>really</emphasis> want to update the
  33.122 +      tag.</para>
  33.123 +
  33.124 +    &interaction.tag.replace;
  33.125 +
  33.126 +    <para id="x_37b">There will still be a permanent record of the previous
  33.127 +      identity of the tag, but Mercurial will no longer use it.
  33.128 +      There's thus no penalty to tagging the wrong revision; all you
  33.129 +      have to do is turn around and tag the correct revision once you
  33.130 +      discover your error.</para>
  33.131 +
  33.132 +    <para id="x_37c">Mercurial stores tags in a normal revision-controlled file
  33.133 +      in your repository.  If you've created any tags, you'll find
  33.134 +      them in a file in the root of your repository named <filename
  33.135 +	role="special">.hgtags</filename>.  When you run the <command
  33.136 +	role="hg-cmd">hg tag</command> command, Mercurial modifies
  33.137 +      this file, then automatically commits the change to it.  This
  33.138 +      means that every time you run <command role="hg-cmd">hg
  33.139 +	tag</command>, you'll see a corresponding changeset in the
  33.140 +      output of <command role="hg-cmd">hg log</command>.</para>
  33.141 +
  33.142 +    &interaction.tag.tip;
  33.143 +
  33.144 +    <sect2>
  33.145 +      <title>Handling tag conflicts during a merge</title>
  33.146 +
  33.147 +      <para id="x_37d">You won't often need to care about the <filename
  33.148 +	  role="special">.hgtags</filename> file, but it sometimes
  33.149 +	makes its presence known during a merge.  The format of the
  33.150 +	file is simple: it consists of a series of lines.  Each line
  33.151 +	starts with a changeset hash, followed by a space, followed by
  33.152 +	the name of a tag.</para>
  33.153 +
  33.154 +      <para id="x_37e">If you're resolving a conflict in the <filename
  33.155 +	  role="special">.hgtags</filename> file during a merge,
  33.156 +	there's one twist to modifying the <filename
  33.157 +	  role="special">.hgtags</filename> file: when Mercurial is
  33.158 +	parsing the tags in a repository, it
  33.159 +	<emphasis>never</emphasis> reads the working copy of the
  33.160 +	<filename role="special">.hgtags</filename> file.  Instead, it
  33.161 +	reads the <emphasis>most recently committed</emphasis>
  33.162 +	revision of the file.</para>
  33.163 +
  33.164 +      <para id="x_37f">An unfortunate consequence of this design is that you
  33.165 +	can't actually verify that your merged <filename
  33.166 +	  role="special">.hgtags</filename> file is correct until
  33.167 +	<emphasis>after</emphasis> you've committed a change.  So if
  33.168 +	you find yourself resolving a conflict on <filename
  33.169 +	  role="special">.hgtags</filename> during a merge, be sure to
  33.170 +	run <command role="hg-cmd">hg tags</command> after you commit.
  33.171 +	If it finds an error in the <filename
  33.172 +	  role="special">.hgtags</filename> file, it will report the
  33.173 +	location of the error, which you can then fix and commit.  You
  33.174 +	should then run <command role="hg-cmd">hg tags</command>
  33.175 +	again, just to be sure that your fix is correct.</para>
  33.176 +    </sect2>
  33.177 +
  33.178 +    <sect2>
  33.179 +      <title>Tags and cloning</title>
  33.180 +
  33.181 +      <para id="x_380">You may have noticed that the <command role="hg-cmd">hg
  33.182 +	  clone</command> command has a <option
  33.183 +	  role="hg-opt-clone">-r</option> option that lets you clone
  33.184 +	an exact copy of the repository as of a particular changeset.
  33.185 +	The new clone will not contain any project history that comes
  33.186 +	after the revision you specified.  This has an interaction
  33.187 +	with tags that can surprise the unwary.</para>
  33.188 +
  33.189 +      <para id="x_381">Recall that a tag is stored as a revision to
  33.190 +	the <filename role="special">.hgtags</filename> file. When you
  33.191 +	create a tag, the changeset in which its recorded refers to an
  33.192 +	older changeset.  When you run <command role="hg-cmd">hg clone
  33.193 +	  -r foo</command> to clone a repository as of tag
  33.194 +	<literal>foo</literal>, the new clone <emphasis>will not
  33.195 +	  contain any revision newer than the one the tag refers to,
  33.196 +	  including the revision where the tag was created</emphasis>.
  33.197 +	The result is that you'll get exactly the right subset of the
  33.198 +	project's history in the new repository, but
  33.199 +	<emphasis>not</emphasis> the tag you might have
  33.200 +	expected.</para>
  33.201 +    </sect2>
  33.202 +
  33.203 +    <sect2>
  33.204 +      <title>When permanent tags are too much</title>
  33.205 +
  33.206 +      <para id="x_382">Since Mercurial's tags are revision controlled and carried
  33.207 +	around with a project's history, everyone you work with will
  33.208 +	see the tags you create.  But giving names to revisions has
  33.209 +	uses beyond simply noting that revision
  33.210 +	<literal>4237e45506ee</literal> is really
  33.211 +	<literal>v2.0.2</literal>.  If you're trying to track down a
  33.212 +	subtle bug, you might want a tag to remind you of something
  33.213 +	like <quote>Anne saw the symptoms with this
  33.214 +	  revision</quote>.</para>
  33.215 +
  33.216 +      <para id="x_383">For cases like this, what you might want to use are
  33.217 +	<emphasis>local</emphasis> tags. You can create a local tag
  33.218 +	with the <option role="hg-opt-tag">-l</option> option to the
  33.219 +	<command role="hg-cmd">hg tag</command> command.  This will
  33.220 +	store the tag in a file called <filename
  33.221 +	  role="special">.hg/localtags</filename>.  Unlike <filename
  33.222 +	  role="special">.hgtags</filename>, <filename
  33.223 +	  role="special">.hg/localtags</filename> is not revision
  33.224 +	controlled.  Any tags you create using <option
  33.225 +	  role="hg-opt-tag">-l</option> remain strictly local to the
  33.226 +	repository you're currently working in.</para>
  33.227 +    </sect2>
  33.228 +  </sect1>
  33.229 +
  33.230 +  <sect1>
  33.231 +    <title>The flow of changes&emdash;big picture vs. little</title>
  33.232 +
  33.233 +    <para id="x_384">To return to the outline I sketched at the
  33.234 +      beginning of the chapter, let's think about a project that has
  33.235 +      multiple concurrent pieces of work under development at
  33.236 +      once.</para>
  33.237 +
  33.238 +    <para id="x_385">There might be a push for a new <quote>main</quote> release;
  33.239 +      a new minor bugfix release to the last main release; and an
  33.240 +      unexpected <quote>hot fix</quote> to an old release that is now
  33.241 +      in maintenance mode.</para>
  33.242 +
  33.243 +    <para id="x_386">The usual way people refer to these different concurrent
  33.244 +      directions of development is as <quote>branches</quote>.
  33.245 +      However, we've already seen numerous times that Mercurial treats
  33.246 +      <emphasis>all of history</emphasis> as a series of branches and
  33.247 +      merges.  Really, what we have here is two ideas that are
  33.248 +      peripherally related, but which happen to share a name.</para>
  33.249 +    <itemizedlist>
  33.250 +      <listitem><para id="x_387"><quote>Big picture</quote> branches represent
  33.251 +	  the sweep of a project's evolution; people give them names,
  33.252 +	  and talk about them in conversation.</para>
  33.253 +      </listitem>
  33.254 +      <listitem><para id="x_388"><quote>Little picture</quote> branches are
  33.255 +	  artefacts of the day-to-day activity of developing and
  33.256 +	  merging changes.  They expose the narrative of how the code
  33.257 +	  was developed.</para>
  33.258 +      </listitem></itemizedlist>
  33.259 +  </sect1>
  33.260 +
  33.261 +  <sect1>
  33.262 +    <title>Managing big-picture branches in repositories</title>
  33.263 +
  33.264 +    <para id="x_389">The easiest way to isolate a <quote>big picture</quote>
  33.265 +      branch in Mercurial is in a dedicated repository.  If you have
  33.266 +      an existing shared repository&emdash;let's call it
  33.267 +      <literal>myproject</literal>&emdash;that reaches a
  33.268 +      <quote>1.0</quote> milestone, you can start to prepare for
  33.269 +      future maintenance releases on top of version 1.0 by tagging the
  33.270 +      revision from which you prepared the 1.0 release.</para>
  33.271 +
  33.272 +    &interaction.branch-repo.tag;
  33.273 +
  33.274 +    <para id="x_38a">You can then clone a new shared
  33.275 +      <literal>myproject-1.0.1</literal> repository as of that
  33.276 +      tag.</para>
  33.277 +
  33.278 +    &interaction.branch-repo.clone;
  33.279 +
  33.280 +    <para id="x_38b">Afterwards, if someone needs to work on a bug fix that ought
  33.281 +      to go into an upcoming 1.0.1 minor release, they clone the
  33.282 +      <literal>myproject-1.0.1</literal> repository, make their
  33.283 +      changes, and push them back.</para>
  33.284 +
  33.285 +    &interaction.branch-repo.bugfix;
  33.286 +
  33.287 +    <para id="x_38c">Meanwhile, development for
  33.288 +      the next major release can continue, isolated and unabated, in
  33.289 +      the <literal>myproject</literal> repository.</para>
  33.290 +
  33.291 +    &interaction.branch-repo.new;
  33.292 +  </sect1>
  33.293 +
  33.294 +  <sect1>
  33.295 +    <title>Don't repeat yourself: merging across branches</title>
  33.296 +
  33.297 +    <para id="x_38d">In many cases, if you have a bug to fix on a maintenance
  33.298 +      branch, the chances are good that the bug exists on your
  33.299 +      project's main branch (and possibly other maintenance branches,
  33.300 +      too).  It's a rare developer who wants to fix the same bug
  33.301 +      multiple times, so let's look at a few ways that Mercurial can
  33.302 +      help you to manage these bugfixes without duplicating your
  33.303 +      work.</para>
  33.304 +
  33.305 +    <para id="x_38e">In the simplest instance, all you need to do is pull changes
  33.306 +      from your maintenance branch into your local clone of the target
  33.307 +      branch.</para>
  33.308 +
  33.309 +    &interaction.branch-repo.pull;
  33.310 +
  33.311 +    <para id="x_38f">You'll then need to merge the heads of the two branches, and
  33.312 +      push back to the main branch.</para>
  33.313 +
  33.314 +    &interaction.branch-repo.merge;
  33.315 +  </sect1>
  33.316 +
  33.317 +  <sect1>
  33.318 +    <title>Naming branches within one repository</title>
  33.319 +
  33.320 +    <para id="x_390">In most instances, isolating branches in repositories is the
  33.321 +      right approach.  Its simplicity makes it easy to understand; and
  33.322 +      so it's hard to make mistakes.  There's a one-to-one
  33.323 +      relationship between branches you're working in and directories
  33.324 +      on your system.  This lets you use normal (non-Mercurial-aware)
  33.325 +      tools to work on files within a branch/repository.</para>
  33.326 +
  33.327 +    <para id="x_391">If you're more in the <quote>power user</quote> category
  33.328 +      (<emphasis>and</emphasis> your collaborators are too), there is
  33.329 +      an alternative way of handling branches that you can consider.
  33.330 +      I've already mentioned the human-level distinction between
  33.331 +      <quote>small picture</quote> and <quote>big picture</quote>
  33.332 +      branches.  While Mercurial works with multiple <quote>small
  33.333 +	picture</quote> branches in a repository all the time (for
  33.334 +      example after you pull changes in, but before you merge them),
  33.335 +      it can <emphasis>also</emphasis> work with multiple <quote>big
  33.336 +	picture</quote> branches.</para>
  33.337 +
  33.338 +    <para id="x_392">The key to working this way is that Mercurial lets you
  33.339 +      assign a persistent <emphasis>name</emphasis> to a branch.
  33.340 +      There always exists a branch named <literal>default</literal>.
  33.341 +      Even before you start naming branches yourself, you can find
  33.342 +      traces of the <literal>default</literal> branch if you look for
  33.343 +      them.</para>
  33.344 +
  33.345 +    <para id="x_393">As an example, when you run the <command role="hg-cmd">hg
  33.346 +	commit</command> command, and it pops up your editor so that
  33.347 +      you can enter a commit message, look for a line that contains
  33.348 +      the text <quote><literal>HG: branch default</literal></quote> at
  33.349 +      the bottom. This is telling you that your commit will occur on
  33.350 +      the branch named <literal>default</literal>.</para>
  33.351 +
  33.352 +    <para id="x_394">To start working with named branches, use the <command
  33.353 +	role="hg-cmd">hg branches</command> command.  This command
  33.354 +      lists the named branches already present in your repository,
  33.355 +      telling you which changeset is the tip of each.</para>
  33.356 +
  33.357 +    &interaction.branch-named.branches;
  33.358 +
  33.359 +    <para id="x_395">Since you haven't created any named branches yet, the only
  33.360 +      one that exists is <literal>default</literal>.</para>
  33.361 +
  33.362 +    <para id="x_396">To find out what the <quote>current</quote> branch is, run
  33.363 +      the <command role="hg-cmd">hg branch</command> command, giving
  33.364 +      it no arguments.  This tells you what branch the parent of the
  33.365 +      current changeset is on.</para>
  33.366 +
  33.367 +    &interaction.branch-named.branch;
  33.368 +
  33.369 +    <para id="x_397">To create a new branch, run the <command role="hg-cmd">hg
  33.370 +	branch</command> command again.  This time, give it one
  33.371 +      argument: the name of the branch you want to create.</para>
  33.372 +
  33.373 +    &interaction.branch-named.create;
  33.374 +
  33.375 +    <para id="x_398">After you've created a branch, you might wonder what effect
  33.376 +      the <command role="hg-cmd">hg branch</command> command has had.
  33.377 +      What do the <command role="hg-cmd">hg status</command> and
  33.378 +      <command role="hg-cmd">hg tip</command> commands report?</para>
  33.379 +
  33.380 +    &interaction.branch-named.status;
  33.381 +
  33.382 +    <para id="x_399">Nothing has changed in the
  33.383 +      working directory, and there's been no new history created.  As
  33.384 +      this suggests, running the <command role="hg-cmd">hg
  33.385 +	branch</command> command has no permanent effect; it only
  33.386 +      tells Mercurial what branch name to use the
  33.387 +      <emphasis>next</emphasis> time you commit a changeset.</para>
  33.388 +
  33.389 +    <para id="x_39a">When you commit a change, Mercurial records the name of the
  33.390 +      branch on which you committed.  Once you've switched from the
  33.391 +      <literal>default</literal> branch to another and committed,
  33.392 +      you'll see the name of the new branch show up in the output of
  33.393 +      <command role="hg-cmd">hg log</command>, <command
  33.394 +	role="hg-cmd">hg tip</command>, and other commands that
  33.395 +      display the same kind of output.</para>
  33.396 +
  33.397 +    &interaction.branch-named.commit;
  33.398 +
  33.399 +    <para id="x_39b">The <command role="hg-cmd">hg log</command>-like commands
  33.400 +      will print the branch name of every changeset that's not on the
  33.401 +      <literal>default</literal> branch.  As a result, if you never
  33.402 +      use named branches, you'll never see this information.</para>
  33.403 +
  33.404 +    <para id="x_39c">Once you've named a branch and committed a change with that
  33.405 +      name, every subsequent commit that descends from that change
  33.406 +      will inherit the same branch name.  You can change the name of a
  33.407 +      branch at any time, using the <command role="hg-cmd">hg
  33.408 +	branch</command> command.</para>
  33.409 +
  33.410 +    &interaction.branch-named.rebranch;
  33.411 +
  33.412 +    <para id="x_39d">In practice, this is something you won't do very often, as
  33.413 +      branch names tend to have fairly long lifetimes.  (This isn't a
  33.414 +      rule, just an observation.)</para>
  33.415 +  </sect1>
  33.416 +
  33.417 +  <sect1>
  33.418 +    <title>Dealing with multiple named branches in a
  33.419 +      repository</title>
  33.420 +
  33.421 +    <para id="x_39e">If you have more than one named branch in a repository,
  33.422 +      Mercurial will remember the branch that your working directory
  33.423 +      is on when you start a command like <command role="hg-cmd">hg
  33.424 +	update</command> or <command role="hg-cmd">hg pull
  33.425 +	-u</command>.  It will update the working directory to the tip
  33.426 +      of this branch, no matter what the <quote>repo-wide</quote> tip
  33.427 +      is.  To update to a revision that's on a different named branch,
  33.428 +      you may need to use the <option role="hg-opt-update">-C</option>
  33.429 +      option to <command role="hg-cmd">hg update</command>.</para>
  33.430 +
  33.431 +    <para id="x_39f">This behavior is a little subtle, so let's see it in
  33.432 +      action.  First, let's remind ourselves what branch we're
  33.433 +      currently on, and what branches are in our repository.</para>
  33.434 +
  33.435 +    &interaction.branch-named.parents;
  33.436 +
  33.437 +    <para id="x_3a0">We're on the <literal>bar</literal> branch, but there also
  33.438 +      exists an older <command role="hg-cmd">hg foo</command>
  33.439 +      branch.</para>
  33.440 +
  33.441 +    <para id="x_3a1">We can <command role="hg-cmd">hg update</command> back and
  33.442 +      forth between the tips of the <literal>foo</literal> and
  33.443 +      <literal>bar</literal> branches without needing to use the
  33.444 +      <option role="hg-opt-update">-C</option> option, because this
  33.445 +      only involves going backwards and forwards linearly through our
  33.446 +      change history.</para>
  33.447 +
  33.448 +    &interaction.branch-named.update-switchy;
  33.449 +
  33.450 +    <para id="x_3a2">If we go back to the <literal>foo</literal> branch and then
  33.451 +      run <command role="hg-cmd">hg update</command>, it will keep us
  33.452 +      on <literal>foo</literal>, not move us to the tip of
  33.453 +      <literal>bar</literal>.</para>
  33.454 +
  33.455 +    &interaction.branch-named.update-nothing;
  33.456 +
  33.457 +    <para id="x_3a3">Committing a new change on the <literal>foo</literal> branch
  33.458 +      introduces a new head.</para>
  33.459 +
  33.460 +    &interaction.branch-named.foo-commit;
  33.461 +  </sect1>
  33.462 +
  33.463 +  <sect1>
  33.464 +    <title>Branch names and merging</title>
  33.465 +
  33.466 +    <para id="x_3a4">As you've probably noticed, merges in Mercurial are not
  33.467 +      symmetrical. Let's say our repository has two heads, 17 and 23.
  33.468 +      If I <command role="hg-cmd">hg update</command> to 17 and then
  33.469 +      <command role="hg-cmd">hg merge</command> with 23, Mercurial
  33.470 +      records 17 as the first parent of the merge, and 23 as the
  33.471 +      second.  Whereas if I <command role="hg-cmd">hg update</command>
  33.472 +      to 23 and then <command role="hg-cmd">hg merge</command> with
  33.473 +      17, it records 23 as the first parent, and 17 as the
  33.474 +      second.</para>
  33.475 +
  33.476 +    <para id="x_3a5">This affects Mercurial's choice of branch name when you
  33.477 +      merge.  After a merge, Mercurial will retain the branch name of
  33.478 +      the first parent when you commit the result of the merge.  If
  33.479 +      your first parent's branch name is <literal>foo</literal>, and
  33.480 +      you merge with <literal>bar</literal>, the branch name will
  33.481 +      still be <literal>foo</literal> after you merge.</para>
  33.482 +
  33.483 +    <para id="x_3a6">It's not unusual for a repository to contain multiple heads,
  33.484 +      each with the same branch name.  Let's say I'm working on the
  33.485 +      <literal>foo</literal> branch, and so are you.  We commit
  33.486 +      different changes; I pull your changes; I now have two heads,
  33.487 +      each claiming to be on the <literal>foo</literal> branch.  The
  33.488 +      result of a merge will be a single head on the
  33.489 +      <literal>foo</literal> branch, as you might hope.</para>
  33.490 +
  33.491 +    <para id="x_3a7">But if I'm working on the <literal>bar</literal> branch, and
  33.492 +      I merge work from the <literal>foo</literal> branch, the result
  33.493 +      will remain on the <literal>bar</literal> branch.</para>
  33.494 +
  33.495 +    &interaction.branch-named.merge;
  33.496 +
  33.497 +    <para id="x_3a8">To give a more concrete example, if I'm working on the
  33.498 +      <literal>bleeding-edge</literal> branch, and I want to bring in
  33.499 +      the latest fixes from the <literal>stable</literal> branch,
  33.500 +      Mercurial will choose the <quote>right</quote>
  33.501 +      (<literal>bleeding-edge</literal>) branch name when I pull and
  33.502 +      merge from <literal>stable</literal>.</para>
  33.503 +  </sect1>
  33.504 +
  33.505 +  <sect1>
  33.506 +    <title>Branch naming is generally useful</title>
  33.507 +
  33.508 +    <para id="x_3a9">You shouldn't think of named branches as applicable only to
  33.509 +      situations where you have multiple long-lived branches
  33.510 +      cohabiting in a single repository.  They're very useful even in
  33.511 +      the one-branch-per-repository case.</para>
  33.512 +
  33.513 +    <para id="x_3aa">In the simplest case, giving a name to each branch gives you
  33.514 +      a permanent record of which branch a changeset originated on.
  33.515 +      This gives you more context when you're trying to follow the
  33.516 +      history of a long-lived branchy project.</para>
  33.517 +
  33.518 +    <para id="x_3ab">If you're working with shared repositories, you can set up a
  33.519 +      <literal role="hook">pretxnchangegroup</literal> hook on each
  33.520 +      that will block incoming changes that have the
  33.521 +      <quote>wrong</quote> branch name.  This provides a simple, but
  33.522 +      effective, defence against people accidentally pushing changes
  33.523 +      from a <quote>bleeding edge</quote> branch to a
  33.524 +      <quote>stable</quote> branch.  Such a hook might look like this
  33.525 +      inside the shared repo's <filename role="special">
  33.526 +	/.hgrc</filename>.</para>
  33.527 +    <programlisting>[hooks]
  33.528 +pretxnchangegroup.branch = hg heads --template '{branches} ' | grep mybranch</programlisting>
  33.529 +  </sect1>
  33.530 +</chapter>
  33.531 +
  33.532 +<!--
  33.533 +local variables: 
  33.534 +sgml-parent-document: ("00book.xml" "book" "chapter")
  33.535 +end:
  33.536 +-->
    34.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.2 +++ b/en/ch09-undo.xml	Sun Aug 16 03:41:39 2009 +0200
    34.3 @@ -0,0 +1,1201 @@
    34.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    34.5 +
    34.6 +<chapter id="chap:undo">
    34.7 +  <?dbhtml filename="finding-and-fixing-mistakes.html"?>
    34.8 +  <title>Finding and fixing mistakes</title>
    34.9 +
   34.10 +  <para id="x_d2">To err might be human, but to really handle the consequences
   34.11 +    well takes a top-notch revision control system.  In this chapter,
   34.12 +    we'll discuss some of the techniques you can use when you find
   34.13 +    that a problem has crept into your project.  Mercurial has some
   34.14 +    highly capable features that will help you to isolate the sources
   34.15 +    of problems, and to handle them appropriately.</para>
   34.16 +
   34.17 +  <sect1>
   34.18 +    <title>Erasing local history</title>
   34.19 +
   34.20 +    <sect2>
   34.21 +      <title>The accidental commit</title>
   34.22 +
   34.23 +      <para id="x_d3">I have the occasional but persistent problem of typing
   34.24 +	rather more quickly than I can think, which sometimes results
   34.25 +	in me committing a changeset that is either incomplete or
   34.26 +	plain wrong.  In my case, the usual kind of incomplete
   34.27 +	changeset is one in which I've created a new source file, but
   34.28 +	forgotten to <command role="hg-cmd">hg add</command> it.  A
   34.29 +	<quote>plain wrong</quote> changeset is not as common, but no
   34.30 +	less annoying.</para>
   34.31 +
   34.32 +    </sect2>
   34.33 +    <sect2 id="sec:undo:rollback">
   34.34 +      <title>Rolling back a transaction</title>
   34.35 +
   34.36 +      <para id="x_d4">In <xref linkend="sec:concepts:txn"/>, I
   34.37 +	mentioned that Mercurial treats each modification of a
   34.38 +	repository as a <emphasis>transaction</emphasis>.  Every time
   34.39 +	you commit a changeset or pull changes from another
   34.40 +	repository, Mercurial remembers what you did.  You can undo,
   34.41 +	or <emphasis>roll back</emphasis>, exactly one of these
   34.42 +	actions using the <command role="hg-cmd">hg rollback</command>
   34.43 +	command.  (See <xref linkend="sec:undo:rollback-after-push"/>
   34.44 +	for an important caveat about the use of this command.)</para>
   34.45 +
   34.46 +      <para id="x_d5">Here's a mistake that I often find myself making:
   34.47 +	committing a change in which I've created a new file, but
   34.48 +	forgotten to <command role="hg-cmd">hg add</command>
   34.49 +	it.</para>
   34.50 +
   34.51 +      &interaction.rollback.commit;
   34.52 +
   34.53 +      <para id="x_d6">Looking at the output of <command role="hg-cmd">hg
   34.54 +	  status</command> after the commit immediately confirms the
   34.55 +	error.</para>
   34.56 +
   34.57 +      &interaction.rollback.status;
   34.58 +
   34.59 +      <para id="x_d7">The commit captured the changes to the file
   34.60 +	<filename>a</filename>, but not the new file
   34.61 +	<filename>b</filename>.  If I were to push this changeset to a
   34.62 +	repository that I shared with a colleague, the chances are
   34.63 +	high that something in <filename>a</filename> would refer to
   34.64 +	<filename>b</filename>, which would not be present in their
   34.65 +	repository when they pulled my changes.  I would thus become
   34.66 +	the object of some indignation.</para>
   34.67 +
   34.68 +      <para id="x_d8">However, luck is with me&emdash;I've caught my error
   34.69 +	before I pushed the changeset.  I use the <command
   34.70 +	  role="hg-cmd">hg rollback</command> command, and Mercurial
   34.71 +	makes that last changeset vanish.</para>
   34.72 +
   34.73 +      &interaction.rollback.rollback;
   34.74 +
   34.75 +      <para id="x_d9">Notice that the changeset is no longer present in the
   34.76 +	repository's history, and the working directory once again
   34.77 +	thinks that the file <filename>a</filename> is modified.  The
   34.78 +	commit and rollback have left the working directory exactly as
   34.79 +	it was prior to the commit; the changeset has been completely
   34.80 +	erased.  I can now safely <command role="hg-cmd">hg
   34.81 +	  add</command> the file <filename>b</filename>, and rerun my
   34.82 +	commit.</para>
   34.83 +
   34.84 +      &interaction.rollback.add;
   34.85 +
   34.86 +    </sect2>
   34.87 +    <sect2>
   34.88 +      <title>The erroneous pull</title>
   34.89 +
   34.90 +      <para id="x_da">It's common practice with Mercurial to maintain separate
   34.91 +	development branches of a project in different repositories.
   34.92 +	Your development team might have one shared repository for
   34.93 +	your project's <quote>0.9</quote> release, and another,
   34.94 +	containing different changes, for the <quote>1.0</quote>
   34.95 +	release.</para>
   34.96 +
   34.97 +      <para id="x_db">Given this, you can imagine that the consequences could be
   34.98 +	messy if you had a local <quote>0.9</quote> repository, and
   34.99 +	accidentally pulled changes from the shared <quote>1.0</quote>
  34.100 +	repository into it.  At worst, you could be paying
  34.101 +	insufficient attention, and push those changes into the shared
  34.102 +	<quote>0.9</quote> tree, confusing your entire team (but don't
  34.103 +	worry, we'll return to this horror scenario later).  However,
  34.104 +	it's more likely that you'll notice immediately, because
  34.105 +	Mercurial will display the URL it's pulling from, or you will
  34.106 +	see it pull a suspiciously large number of changes into the
  34.107 +	repository.</para>
  34.108 +
  34.109 +      <para id="x_dc">The <command role="hg-cmd">hg rollback</command> command
  34.110 +	will work nicely to expunge all of the changesets that you
  34.111 +	just pulled.  Mercurial groups all changes from one <command
  34.112 +	  role="hg-cmd">hg pull</command> into a single transaction,
  34.113 +	so one <command role="hg-cmd">hg rollback</command> is all you
  34.114 +	need to undo this mistake.</para>
  34.115 +
  34.116 +    </sect2>
  34.117 +    <sect2 id="sec:undo:rollback-after-push">
  34.118 +      <title>Rolling back is useless once you've pushed</title>
  34.119 +
  34.120 +      <para id="x_dd">The value of the <command role="hg-cmd">hg
  34.121 +	  rollback</command> command drops to zero once you've pushed
  34.122 +	your changes to another repository.  Rolling back a change
  34.123 +	makes it disappear entirely, but <emphasis>only</emphasis> in
  34.124 +	the repository in which you perform the <command
  34.125 +	  role="hg-cmd">hg rollback</command>.  Because a rollback
  34.126 +	eliminates history, there's no way for the disappearance of a
  34.127 +	change to propagate between repositories.</para>
  34.128 +
  34.129 +      <para id="x_de">If you've pushed a change to another
  34.130 +	repository&emdash;particularly if it's a shared
  34.131 +	repository&emdash;it has essentially <quote>escaped into the
  34.132 +	  wild,</quote> and you'll have to recover from your mistake
  34.133 +	in a different way.  If you push a changeset somewhere, then
  34.134 +	roll it back, then pull from the repository you pushed to, the
  34.135 +	changeset you thought you'd gotten rid of will simply reappear
  34.136 +	in your repository.</para>
  34.137 +
  34.138 +      <para id="x_df">(If you absolutely know for sure that the change
  34.139 +	you want to roll back is the most recent change in the
  34.140 +	repository that you pushed to, <emphasis>and</emphasis> you
  34.141 +	know that nobody else could have pulled it from that
  34.142 +	repository, you can roll back the changeset there, too, but
  34.143 +	you really should not expect this to work reliably.  Sooner or
  34.144 +	later a change really will make it into a repository that you
  34.145 +	don't directly control (or have forgotten about), and come
  34.146 +	back to bite you.)</para>
  34.147 +
  34.148 +    </sect2>
  34.149 +    <sect2>
  34.150 +      <title>You can only roll back once</title>
  34.151 +
  34.152 +      <para id="x_e0">Mercurial stores exactly one transaction in its
  34.153 +	transaction log; that transaction is the most recent one that
  34.154 +	occurred in the repository. This means that you can only roll
  34.155 +	back one transaction.  If you expect to be able to roll back
  34.156 +	one transaction, then its predecessor, this is not the
  34.157 +	behavior you will get.</para>
  34.158 +
  34.159 +      &interaction.rollback.twice;
  34.160 +
  34.161 +      <para id="x_e1">Once you've rolled back one transaction in a repository,
  34.162 +	you can't roll back again in that repository until you perform
  34.163 +	another commit or pull.</para>
  34.164 +
  34.165 +    </sect2>
  34.166 +  </sect1>
  34.167 +  <sect1>
  34.168 +    <title>Reverting the mistaken change</title>
  34.169 +
  34.170 +    <para id="x_e2">If you make a modification to a file, and decide that you
  34.171 +      really didn't want to change the file at all, and you haven't
  34.172 +      yet committed your changes, the <command role="hg-cmd">hg
  34.173 +	revert</command> command is the one you'll need.  It looks at
  34.174 +      the changeset that's the parent of the working directory, and
  34.175 +      restores the contents of the file to their state as of that
  34.176 +      changeset. (That's a long-winded way of saying that, in the
  34.177 +      normal case, it undoes your modifications.)</para>
  34.178 +
  34.179 +    <para id="x_e3">Let's illustrate how the <command role="hg-cmd">hg
  34.180 +	revert</command> command works with yet another small example.
  34.181 +      We'll begin by modifying a file that Mercurial is already
  34.182 +      tracking.</para>
  34.183 +
  34.184 +    &interaction.daily.revert.modify;
  34.185 +
  34.186 +    <para id="x_e4">If we don't
  34.187 +      want that change, we can simply <command role="hg-cmd">hg
  34.188 +	revert</command> the file.</para>
  34.189 +
  34.190 +      &interaction.daily.revert.unmodify;
  34.191 +
  34.192 +    <para id="x_e5">The <command role="hg-cmd">hg revert</command> command
  34.193 +      provides us with an extra degree of safety by saving our
  34.194 +      modified file with a <filename>.orig</filename>
  34.195 +      extension.</para>
  34.196 +
  34.197 +    &interaction.daily.revert.status;
  34.198 +
  34.199 +    <tip>
  34.200 +      <title>Be careful with <filename>.orig</filename> files</title>
  34.201 +
  34.202 +      <para id="x_6b8">It's extremely unlikely that you are either using
  34.203 +	Mercurial to manage files with <filename>.orig</filename>
  34.204 +	extensions or that you even care about the contents of such
  34.205 +	files.  Just in case, though, it's useful to remember that
  34.206 +	<command role="hg-cmd">hg revert</command> will
  34.207 +	unconditionally overwrite an existing file with a
  34.208 +	<filename>.orig</filename> extension. For instance, if you
  34.209 +	already have a file named <filename>foo.orig</filename> when
  34.210 +	you revert <filename>foo</filename>, the contents of
  34.211 +	<filename>foo.orig</filename> will be clobbered.</para>
  34.212 +    </tip>
  34.213 +
  34.214 +    <para id="x_e6">Here is a summary of the cases that the <command
  34.215 +	role="hg-cmd">hg revert</command> command can deal with.  We
  34.216 +      will describe each of these in more detail in the section that
  34.217 +      follows.</para>
  34.218 +    <itemizedlist>
  34.219 +      <listitem><para id="x_e7">If you modify a file, it will restore the file
  34.220 +	  to its unmodified state.</para>
  34.221 +      </listitem>
  34.222 +      <listitem><para id="x_e8">If you <command role="hg-cmd">hg add</command> a
  34.223 +	  file, it will undo the <quote>added</quote> state of the
  34.224 +	  file, but leave the file itself untouched.</para>
  34.225 +      </listitem>
  34.226 +      <listitem><para id="x_e9">If you delete a file without telling Mercurial,
  34.227 +	  it will restore the file to its unmodified contents.</para>
  34.228 +      </listitem>
  34.229 +      <listitem><para id="x_ea">If you use the <command role="hg-cmd">hg
  34.230 +	    remove</command> command to remove a file, it will undo
  34.231 +	  the <quote>removed</quote> state of the file, and restore
  34.232 +	  the file to its unmodified contents.</para>
  34.233 +      </listitem></itemizedlist>
  34.234 +
  34.235 +    <sect2 id="sec:undo:mgmt">
  34.236 +      <title>File management errors</title>
  34.237 +
  34.238 +      <para id="x_eb">The <command role="hg-cmd">hg revert</command> command is
  34.239 +	useful for more than just modified files.  It lets you reverse
  34.240 +	the results of all of Mercurial's file management
  34.241 +	commands&emdash;<command role="hg-cmd">hg add</command>,
  34.242 +	<command role="hg-cmd">hg remove</command>, and so on.</para>
  34.243 +
  34.244 +      <para id="x_ec">If you <command role="hg-cmd">hg add</command> a file,
  34.245 +	then decide that in fact you don't want Mercurial to track it,
  34.246 +	use <command role="hg-cmd">hg revert</command> to undo the
  34.247 +	add.  Don't worry; Mercurial will not modify the file in any
  34.248 +	way.  It will just <quote>unmark</quote> the file.</para>
  34.249 +
  34.250 +      &interaction.daily.revert.add;
  34.251 +
  34.252 +      <para id="x_ed">Similarly, if you ask Mercurial to <command
  34.253 +	  role="hg-cmd">hg remove</command> a file, you can use
  34.254 +	<command role="hg-cmd">hg revert</command> to restore it to
  34.255 +	the contents it had as of the parent of the working directory.
  34.256 +	&interaction.daily.revert.remove; This works just as
  34.257 +	well for a file that you deleted by hand, without telling
  34.258 +	Mercurial (recall that in Mercurial terminology, this kind of
  34.259 +	file is called <quote>missing</quote>).</para>
  34.260 +
  34.261 +      &interaction.daily.revert.missing;
  34.262 +
  34.263 +      <para id="x_ee">If you revert a <command role="hg-cmd">hg copy</command>,
  34.264 +	the copied-to file remains in your working directory
  34.265 +	afterwards, untracked.  Since a copy doesn't affect the
  34.266 +	copied-from file in any way, Mercurial doesn't do anything
  34.267 +	with the copied-from file.</para>
  34.268 +
  34.269 +      &interaction.daily.revert.copy;
  34.270 +    </sect2>
  34.271 +  </sect1>
  34.272 +
  34.273 +  <sect1>
  34.274 +    <title>Dealing with committed changes</title>
  34.275 +
  34.276 +    <para id="x_f5">Consider a case where you have committed a change
  34.277 +      <emphasis>a</emphasis>, and another change
  34.278 +      <emphasis>b</emphasis> on top of it; you then realise that
  34.279 +      change <emphasis>a</emphasis> was incorrect.  Mercurial lets you
  34.280 +      <quote>back out</quote> an entire changeset automatically, and
  34.281 +      building blocks that let you reverse part of a changeset by
  34.282 +      hand.</para>
  34.283 +
  34.284 +    <para id="x_f6">Before you read this section, here's something to
  34.285 +      keep in mind: the <command role="hg-cmd">hg backout</command>
  34.286 +      command undoes the effect of a change by
  34.287 +      <emphasis>adding</emphasis> to your repository's history, not by
  34.288 +      modifying or erasing it.  It's the right tool to use if you're
  34.289 +      fixing bugs, but not if you're trying to undo some change that
  34.290 +      has catastrophic consequences.  To deal with those, see
  34.291 +      <xref linkend="sec:undo:aaaiiieee"/>.</para>
  34.292 +
  34.293 +    <sect2>
  34.294 +      <title>Backing out a changeset</title>
  34.295 +
  34.296 +      <para id="x_f7">The <command role="hg-cmd">hg backout</command> command
  34.297 +	lets you <quote>undo</quote> the effects of an entire
  34.298 +	changeset in an automated fashion.  Because Mercurial's
  34.299 +	history is immutable, this command <emphasis>does
  34.300 +	  not</emphasis> get rid of the changeset you want to undo.
  34.301 +	Instead, it creates a new changeset that
  34.302 +	<emphasis>reverses</emphasis> the effect of the to-be-undone
  34.303 +	changeset.</para>
  34.304 +
  34.305 +      <para id="x_f8">The operation of the <command role="hg-cmd">hg
  34.306 +	  backout</command> command is a little intricate, so let's
  34.307 +	illustrate it with some examples.  First, we'll create a
  34.308 +	repository with some simple changes.</para>
  34.309 +
  34.310 +      &interaction.backout.init;
  34.311 +
  34.312 +      <para id="x_f9">The <command role="hg-cmd">hg backout</command> command
  34.313 +	takes a single changeset ID as its argument; this is the
  34.314 +	changeset to back out.  Normally, <command role="hg-cmd">hg
  34.315 +	  backout</command> will drop you into a text editor to write
  34.316 +	a commit message, so you can record why you're backing the
  34.317 +	change out.  In this example, we provide a commit message on
  34.318 +	the command line using the <option
  34.319 +	  role="hg-opt-backout">-m</option> option.</para>
  34.320 +
  34.321 +    </sect2>
  34.322 +    <sect2>
  34.323 +      <title>Backing out the tip changeset</title>
  34.324 +
  34.325 +      <para id="x_fa">We're going to start by backing out the last changeset we
  34.326 +	committed.</para>
  34.327 +
  34.328 +      &interaction.backout.simple;
  34.329 +
  34.330 +      <para id="x_fb">You can see that the second line from
  34.331 +	<filename>myfile</filename> is no longer present.  Taking a
  34.332 +	look at the output of <command role="hg-cmd">hg log</command>
  34.333 +	gives us an idea of what the <command role="hg-cmd">hg
  34.334 +	  backout</command> command has done.
  34.335 +	&interaction.backout.simple.log; Notice that the new changeset
  34.336 +	that <command role="hg-cmd">hg backout</command> has created
  34.337 +	is a child of the changeset we backed out.  It's easier to see
  34.338 +	this in <xref linkend="fig:undo:backout"/>, which presents a
  34.339 +	graphical view of the change history.  As you can see, the
  34.340 +	history is nice and linear.</para>
  34.341 +
  34.342 +      <figure id="fig:undo:backout">
  34.343 +	<title>Backing out a change using the <command
  34.344 +	    role="hg-cmd">hg backout</command> command</title>
  34.345 +	<mediaobject>
  34.346 +	  <imageobject><imagedata fileref="figs/undo-simple.png"/></imageobject>
  34.347 +	  <textobject><phrase>XXX add text</phrase></textobject>
  34.348 +	</mediaobject>
  34.349 +      </figure>
  34.350 +
  34.351 +    </sect2>
  34.352 +    <sect2>
  34.353 +      <title>Backing out a non-tip change</title>
  34.354 +
  34.355 +      <para id="x_fd">If you want to back out a change other than the last one
  34.356 +	you committed, pass the <option
  34.357 +	  role="hg-opt-backout">--merge</option> option to the
  34.358 +	<command role="hg-cmd">hg backout</command> command.</para>
  34.359 +
  34.360 +      &interaction.backout.non-tip.clone;
  34.361 +
  34.362 +      <para id="x_fe">This makes backing out any changeset a
  34.363 +	<quote>one-shot</quote> operation that's usually simple and
  34.364 +	fast.</para>
  34.365 +
  34.366 +      &interaction.backout.non-tip.backout;
  34.367 +
  34.368 +      <para id="x_ff">If you take a look at the contents of
  34.369 +	<filename>myfile</filename> after the backout finishes, you'll
  34.370 +	see that the first and third changes are present, but not the
  34.371 +	second.</para>
  34.372 +
  34.373 +      &interaction.backout.non-tip.cat;
  34.374 +
  34.375 +      <para id="x_100">As the graphical history in <xref
  34.376 +	  linkend="fig:undo:backout-non-tip"/> illustrates, Mercurial
  34.377 +	still commits one change in this kind of situation (the
  34.378 +	box-shaped node is the ones that Mercurial commits
  34.379 +	automatically), but the revision graph now looks different.
  34.380 +	Before Mercurial begins the backout process, it first
  34.381 +	remembers what the current parent of the working directory is.
  34.382 +	It then backs out the target changeset, and commits that as a
  34.383 +	changeset.  Finally, it merges back to the previous parent of
  34.384 +	the working directory, but notice that it <emphasis>does not
  34.385 +	  commit</emphasis> the result of the merge.  The repository
  34.386 +	now contains two heads, and the working directory is in a
  34.387 +	merge state.</para>
  34.388 +
  34.389 +      <figure id="fig:undo:backout-non-tip">
  34.390 +	<title>Automated backout of a non-tip change using the
  34.391 +	  <command role="hg-cmd">hg backout</command> command</title>
  34.392 +	<mediaobject>
  34.393 +	  <imageobject><imagedata fileref="figs/undo-non-tip.png"/></imageobject>
  34.394 +	  <textobject><phrase>XXX add text</phrase></textobject>
  34.395 +	</mediaobject>
  34.396 +      </figure>
  34.397 +
  34.398 +      <para id="x_103">The result is that you end up <quote>back where you
  34.399 +	  were</quote>, only with some extra history that undoes the
  34.400 +	effect of the changeset you wanted to back out.</para>
  34.401 +
  34.402 +      <para id="x_6b9">You might wonder why Mercurial does not commit the result
  34.403 +	of the merge that it performed.  The reason lies in Mercurial
  34.404 +	behaving conservatively: a merge naturally has more scope for
  34.405 +	error than simply undoing the effect of the tip changeset,
  34.406 +	so your work will be safest if you first inspect (and test!)
  34.407 +	the result of the merge, <emphasis>then</emphasis> commit
  34.408 +	it.</para>
  34.409 +
  34.410 +      <sect3>
  34.411 +	<title>Always use the <option
  34.412 +	    role="hg-opt-backout">--merge</option> option</title>
  34.413 +
  34.414 +	<para id="x_104">In fact, since the <option
  34.415 +	    role="hg-opt-backout">--merge</option> option will do the
  34.416 +	  <quote>right thing</quote> whether or not the changeset
  34.417 +	  you're backing out is the tip (i.e. it won't try to merge if
  34.418 +	  it's backing out the tip, since there's no need), you should
  34.419 +	  <emphasis>always</emphasis> use this option when you run the
  34.420 +	  <command role="hg-cmd">hg backout</command> command.</para>
  34.421 +
  34.422 +      </sect3>
  34.423 +    </sect2>
  34.424 +    <sect2>
  34.425 +      <title>Gaining more control of the backout process</title>
  34.426 +
  34.427 +      <para id="x_105">While I've recommended that you always use the <option
  34.428 +	  role="hg-opt-backout">--merge</option> option when backing
  34.429 +	out a change, the <command role="hg-cmd">hg backout</command>
  34.430 +	command lets you decide how to merge a backout changeset.
  34.431 +	Taking control of the backout process by hand is something you
  34.432 +	will rarely need to do, but it can be useful to understand
  34.433 +	what the <command role="hg-cmd">hg backout</command> command
  34.434 +	is doing for you automatically.  To illustrate this, let's
  34.435 +	clone our first repository, but omit the backout change that
  34.436 +	it contains.</para>
  34.437 +
  34.438 +      &interaction.backout.manual.clone;
  34.439 +
  34.440 +      <para id="x_106">As with our
  34.441 +	earlier example, We'll commit a third changeset, then back out
  34.442 +	its parent, and see what happens.</para>
  34.443 +
  34.444 +      &interaction.backout.manual.backout;
  34.445 +
  34.446 +      <para id="x_107">Our new changeset is again a descendant of the changeset
  34.447 +	we backout out; it's thus a new head, <emphasis>not</emphasis>
  34.448 +	a descendant of the changeset that was the tip.  The <command
  34.449 +	  role="hg-cmd">hg backout</command> command was quite
  34.450 +	explicit in telling us this.</para>
  34.451 +
  34.452 +      &interaction.backout.manual.log;
  34.453 +
  34.454 +      <para id="x_108">Again, it's easier to see what has happened by looking at
  34.455 +	a graph of the revision history, in <xref
  34.456 +	  linkend="fig:undo:backout-manual"/>.  This makes it clear
  34.457 +	that when we use <command role="hg-cmd">hg backout</command>
  34.458 +	to back out a change other than the tip, Mercurial adds a new
  34.459 +	head to the repository (the change it committed is
  34.460 +	box-shaped).</para>
  34.461 +
  34.462 +      <figure id="fig:undo:backout-manual">
  34.463 +	<title>Backing out a change using the <command
  34.464 +	    role="hg-cmd">hg backout</command> command</title>
  34.465 +	<mediaobject>
  34.466 +	  <imageobject><imagedata fileref="figs/undo-manual.png"/></imageobject>
  34.467 +	  <textobject><phrase>XXX add text</phrase></textobject>
  34.468 +	</mediaobject>
  34.469 +      </figure>
  34.470 +
  34.471 +      <para id="x_10a">After the <command role="hg-cmd">hg backout</command>
  34.472 +	command has completed, it leaves the new
  34.473 +	<quote>backout</quote> changeset as the parent of the working
  34.474 +	directory.</para>
  34.475 +
  34.476 +      &interaction.backout.manual.parents;
  34.477 +
  34.478 +      <para id="x_10b">Now we have two isolated sets of changes.</para>
  34.479 +
  34.480 +      &interaction.backout.manual.heads;
  34.481 +
  34.482 +      <para id="x_10c">Let's think about what we expect to see as the contents of
  34.483 +	<filename>myfile</filename> now.  The first change should be
  34.484 +	present, because we've never backed it out.  The second change
  34.485 +	should be missing, as that's the change we backed out.  Since
  34.486 +	the history graph shows the third change as a separate head,
  34.487 +	we <emphasis>don't</emphasis> expect to see the third change
  34.488 +	present in <filename>myfile</filename>.</para>
  34.489 +
  34.490 +      &interaction.backout.manual.cat;
  34.491 +
  34.492 +      <para id="x_10d">To get the third change back into the file, we just do a
  34.493 +	normal merge of our two heads.</para>
  34.494 +
  34.495 +      &interaction.backout.manual.merge;
  34.496 +
  34.497 +      <para id="x_10e">Afterwards, the graphical history of our
  34.498 +	repository looks like
  34.499 +	<xref linkend="fig:undo:backout-manual-merge"/>.</para>
  34.500 +
  34.501 +      <figure id="fig:undo:backout-manual-merge">
  34.502 +	<title>Manually merging a backout change</title>
  34.503 +	<mediaobject>
  34.504 +	  <imageobject><imagedata fileref="figs/undo-manual-merge.png"/></imageobject>
  34.505 +	  <textobject><phrase>XXX add text</phrase></textobject>
  34.506 +	</mediaobject>
  34.507 +      </figure>
  34.508 +
  34.509 +    </sect2>
  34.510 +    <sect2>
  34.511 +      <title>Why <command role="hg-cmd">hg backout</command> works as
  34.512 +	it does</title>
  34.513 +
  34.514 +      <para id="x_110">Here's a brief description of how the <command
  34.515 +	  role="hg-cmd">hg backout</command> command works.</para>
  34.516 +      <orderedlist>
  34.517 +	<listitem><para id="x_111">It ensures that the working directory is
  34.518 +	    <quote>clean</quote>, i.e. that the output of <command
  34.519 +	      role="hg-cmd">hg status</command> would be empty.</para>
  34.520 +	</listitem>
  34.521 +	<listitem><para id="x_112">It remembers the current parent of the working
  34.522 +	    directory.  Let's call this changeset
  34.523 +	    <literal>orig</literal>.</para>
  34.524 +	</listitem>
  34.525 +	<listitem><para id="x_113">It does the equivalent of a <command
  34.526 +	      role="hg-cmd">hg update</command> to sync the working
  34.527 +	    directory to the changeset you want to back out.  Let's
  34.528 +	    call this changeset <literal>backout</literal>.</para>
  34.529 +	</listitem>
  34.530 +	<listitem><para id="x_114">It finds the parent of that changeset.  Let's
  34.531 +	    call that changeset <literal>parent</literal>.</para>
  34.532 +	</listitem>
  34.533 +	<listitem><para id="x_115">For each file that the
  34.534 +	    <literal>backout</literal> changeset affected, it does the
  34.535 +	    equivalent of a <command role="hg-cmd">hg revert -r
  34.536 +	      parent</command> on that file, to restore it to the
  34.537 +	    contents it had before that changeset was
  34.538 +	    committed.</para>
  34.539 +	</listitem>
  34.540 +	<listitem><para id="x_116">It commits the result as a new changeset.
  34.541 +	    This changeset has <literal>backout</literal> as its
  34.542 +	    parent.</para>
  34.543 +	</listitem>
  34.544 +	<listitem><para id="x_117">If you specify <option
  34.545 +	      role="hg-opt-backout">--merge</option> on the command
  34.546 +	    line, it merges with <literal>orig</literal>, and commits
  34.547 +	    the result of the merge.</para>
  34.548 +	</listitem></orderedlist>
  34.549 +
  34.550 +      <para id="x_118">An alternative way to implement the <command
  34.551 +	  role="hg-cmd">hg backout</command> command would be to
  34.552 +	<command role="hg-cmd">hg export</command> the
  34.553 +	to-be-backed-out changeset as a diff, then use the <option
  34.554 +	  role="cmd-opt-patch">--reverse</option> option to the
  34.555 +	<command>patch</command> command to reverse the effect of the
  34.556 +	change without fiddling with the working directory.  This
  34.557 +	sounds much simpler, but it would not work nearly as
  34.558 +	well.</para>
  34.559 +
  34.560 +      <para id="x_119">The reason that <command role="hg-cmd">hg
  34.561 +	  backout</command> does an update, a commit, a merge, and
  34.562 +	another commit is to give the merge machinery the best chance
  34.563 +	to do a good job when dealing with all the changes
  34.564 +	<emphasis>between</emphasis> the change you're backing out and
  34.565 +	the current tip.</para>
  34.566 +
  34.567 +      <para id="x_11a">If you're backing out a changeset that's 100 revisions
  34.568 +	back in your project's history, the chances that the
  34.569 +	<command>patch</command> command will be able to apply a
  34.570 +	reverse diff cleanly are not good, because intervening changes
  34.571 +	are likely to have <quote>broken the context</quote> that
  34.572 +	<command>patch</command> uses to determine whether it can
  34.573 +	apply a patch (if this sounds like gibberish, see <xref
  34.574 +	  linkend="sec:mq:patch"/> for a
  34.575 +	discussion of the <command>patch</command> command).  Also,
  34.576 +	Mercurial's merge machinery will handle files and directories
  34.577 +	being renamed, permission changes, and modifications to binary
  34.578 +	files, none of which <command>patch</command> can deal
  34.579 +	with.</para>
  34.580 +
  34.581 +    </sect2>
  34.582 +  </sect1>
  34.583 +  <sect1 id="sec:undo:aaaiiieee">
  34.584 +    <title>Changes that should never have been</title>
  34.585 +
  34.586 +    <para id="x_11b">Most of the time, the <command role="hg-cmd">hg
  34.587 +	backout</command> command is exactly what you need if you want
  34.588 +      to undo the effects of a change.  It leaves a permanent record
  34.589 +      of exactly what you did, both when committing the original
  34.590 +      changeset and when you cleaned up after it.</para>
  34.591 +
  34.592 +    <para id="x_11c">On rare occasions, though, you may find that you've
  34.593 +      committed a change that really should not be present in the
  34.594 +      repository at all.  For example, it would be very unusual, and
  34.595 +      usually considered a mistake, to commit a software project's
  34.596 +      object files as well as its source files.  Object files have
  34.597 +      almost no intrinsic value, and they're <emphasis>big</emphasis>,
  34.598 +      so they increase the size of the repository and the amount of
  34.599 +      time it takes to clone or pull changes.</para>
  34.600 +
  34.601 +    <para id="x_11d">Before I discuss the options that you have if you commit a
  34.602 +      <quote>brown paper bag</quote> change (the kind that's so bad
  34.603 +      that you want to pull a brown paper bag over your head), let me
  34.604 +      first discuss some approaches that probably won't work.</para>
  34.605 +
  34.606 +    <para id="x_11e">Since Mercurial treats history as
  34.607 +      accumulative&emdash;every change builds on top of all changes
  34.608 +      that preceded it&emdash;you generally can't just make disastrous
  34.609 +      changes disappear.  The one exception is when you've just
  34.610 +      committed a change, and it hasn't been pushed or pulled into
  34.611 +      another repository.  That's when you can safely use the <command
  34.612 +	role="hg-cmd">hg rollback</command> command, as I detailed in
  34.613 +      <xref linkend="sec:undo:rollback"/>.</para>
  34.614 +
  34.615 +    <para id="x_11f">After you've pushed a bad change to another repository, you
  34.616 +      <emphasis>could</emphasis> still use <command role="hg-cmd">hg
  34.617 +	rollback</command> to make your local copy of the change
  34.618 +      disappear, but it won't have the consequences you want.  The
  34.619 +      change will still be present in the remote repository, so it
  34.620 +      will reappear in your local repository the next time you
  34.621 +      pull.</para>
  34.622 +
  34.623 +    <para id="x_120">If a situation like this arises, and you know which
  34.624 +      repositories your bad change has propagated into, you can
  34.625 +      <emphasis>try</emphasis> to get rid of the change from
  34.626 +      <emphasis>every</emphasis> one of those repositories.  This is,
  34.627 +      of course, not a satisfactory solution: if you miss even a
  34.628 +      single repository while you're expunging, the change is still
  34.629 +      <quote>in the wild</quote>, and could propagate further.</para>
  34.630 +
  34.631 +    <para id="x_121">If you've committed one or more changes
  34.632 +      <emphasis>after</emphasis> the change that you'd like to see
  34.633 +      disappear, your options are further reduced. Mercurial doesn't
  34.634 +      provide a way to <quote>punch a hole</quote> in history, leaving
  34.635 +      changesets intact.</para>
  34.636 +
  34.637 +    <sect2>
  34.638 +      <title>Backing out a merge</title>
  34.639 +
  34.640 +      <para id="x_6ba">Since merges are often complicated, it is not unheard of
  34.641 +	for a merge to be mangled badly, but committed erroneously.
  34.642 +	Mercurial provides an important safeguard against bad merges
  34.643 +	by refusing to commit unresolved files, but human ingenuity
  34.644 +	guarantees that it is still possible to mess a merge up and
  34.645 +	commit it.</para>
  34.646 +
  34.647 +      <para id="x_6bb">Given a bad merge that has been committed, usually the
  34.648 +	best way to approach it is to simply try to repair the damage
  34.649 +	by hand.  A complete disaster that cannot be easily fixed up
  34.650 +	by hand ought to be very rare, but the <command
  34.651 +	  role="hg-cmd">hg backout</command> command may help in
  34.652 +	making the cleanup easier. It offers a <option
  34.653 +	  role="hg-opt-backout">--parent</option> option, which lets
  34.654 +	you specify which parent to revert to when backing out a
  34.655 +	merge.</para>
  34.656 +
  34.657 +      <figure id="fig:undo:bad-merge-1">
  34.658 +	<title>A bad merge</title>
  34.659 +	<mediaobject>
  34.660 +	  <imageobject><imagedata fileref="figs/bad-merge-1.png"/></imageobject>
  34.661 +	  <textobject><phrase>XXX add text</phrase></textobject>
  34.662 +	</mediaobject>
  34.663 +      </figure>
  34.664 +
  34.665 +      <para id="x_6bc">Suppose we have a revision graph like that in <xref
  34.666 +	  linkend="fig:undo:bad-merge-1"/>.  What we'd like is to
  34.667 +	<emphasis>redo</emphasis> the merge of revisions 2 and
  34.668 +	3.</para>
  34.669 +
  34.670 +      <para id="x_6bd">One way to do so would be as follows.</para>
  34.671 +
  34.672 +      <orderedlist>
  34.673 +	<listitem>
  34.674 +	  <para id="x_6be">Call <command role="hg-cmd">hg backout --rev=4
  34.675 +	      --parent=2</command>.  This tells <command
  34.676 +	      role="hg-cmd">hg backout</command> to back out revision
  34.677 +	    4, which is the bad merge, and to when deciding which
  34.678 +	    revision to prefer, to choose parent 2, one of the parents
  34.679 +	    of the merge.  The effect can be seen in <xref
  34.680 +	      linkend="fig:undo:bad-merge-2"/>.</para>
  34.681 +	  <figure id="fig:undo:bad-merge-2">
  34.682 +	    <title>Backing out the merge, favoring one parent</title>
  34.683 +	    <mediaobject>
  34.684 +	      <imageobject><imagedata fileref="figs/bad-merge-2.png"/></imageobject>
  34.685 +	      <textobject><phrase>XXX add text</phrase></textobject>
  34.686 +	    </mediaobject>
  34.687 +	  </figure>
  34.688 +	</listitem>
  34.689 +
  34.690 +	<listitem>
  34.691 +	  <para id="x_6bf">Call <command role="hg-cmd">hg backout --rev=4
  34.692 +	      --parent=3</command>.  This tells <command
  34.693 +	      role="hg-cmd">hg backout</command> to back out revision
  34.694 +	    4 again, but this time to choose parent 3, the other
  34.695 +	    parent of the merge.  The result is visible in <xref
  34.696 +	    linkend="fig:undo:bad-merge-3"/>, in which the repository
  34.697 +	    now contains three heads.</para>
  34.698 +	  <figure id="fig:undo:bad-merge-3">
  34.699 +	    <title>Backing out the merge, favoring the other
  34.700 +	      parent</title>
  34.701 +	    <mediaobject>
  34.702 +	      <imageobject><imagedata fileref="figs/bad-merge-3.png"/></imageobject>
  34.703 +	      <textobject><phrase>XXX add text</phrase></textobject>
  34.704 +	    </mediaobject>
  34.705 +	  </figure>
  34.706 +	</listitem>
  34.707 +
  34.708 +	<listitem>
  34.709 +	  <para id="x_6c0">Redo the bad merge by merging the two backout heads,
  34.710 +	    which reduces the number of heads in the repository to
  34.711 +	    two, as can be seen in <xref
  34.712 +	      linkend="fig:undo:bad-merge-4"/>.</para>
  34.713 +	  <figure id="fig:undo:bad-merge-4">
  34.714 +	    <title>Merging the backouts</title>
  34.715 +	    <mediaobject>
  34.716 +	      <imageobject><imagedata fileref="figs/bad-merge-4.png"/></imageobject>
  34.717 +	      <textobject><phrase>XXX add text</phrase></textobject>
  34.718 +	    </mediaobject>
  34.719 +	  </figure>
  34.720 +	</listitem>
  34.721 +
  34.722 +	<listitem>
  34.723 +	  <para id="x_6c1">Merge with the commit that was made after the bad
  34.724 +	    merge, as shown in <xref
  34.725 +	      linkend="fig:undo:bad-merge-5"/>.</para>
  34.726 +	  <figure id="fig:undo:bad-merge-5">
  34.727 +	    <title>Merging the backouts</title>
  34.728 +	    <mediaobject>
  34.729 +	      <imageobject><imagedata fileref="figs/bad-merge-5.png"/></imageobject>
  34.730 +	      <textobject><phrase>XXX add text</phrase></textobject>
  34.731 +	    </mediaobject>
  34.732 +	  </figure>
  34.733 +	</listitem>
  34.734 +      </orderedlist>
  34.735 +    </sect2>
  34.736 +
  34.737 +    <sect2>
  34.738 +      <title>Protect yourself from <quote>escaped</quote>
  34.739 +	changes</title>
  34.740 +
  34.741 +      <para id="x_123">If you've committed some changes to your local repository
  34.742 +	and they've been pushed or pulled somewhere else, this isn't
  34.743 +	necessarily a disaster.  You can protect yourself ahead of
  34.744 +	time against some classes of bad changeset.  This is
  34.745 +	particularly easy if your team usually pulls changes from a
  34.746 +	central repository.</para>
  34.747 +
  34.748 +      <para id="x_124">By configuring some hooks on that repository to validate
  34.749 +	incoming changesets (see chapter <xref linkend="chap:hook"/>),
  34.750 +	you can
  34.751 +	automatically prevent some kinds of bad changeset from being
  34.752 +	pushed to the central repository at all.  With such a
  34.753 +	configuration in place, some kinds of bad changeset will
  34.754 +	naturally tend to <quote>die out</quote> because they can't
  34.755 +	propagate into the central repository.  Better yet, this
  34.756 +	happens without any need for explicit intervention.</para>
  34.757 +
  34.758 +      <para id="x_125">For instance, an incoming change hook that
  34.759 +	verifies that a changeset will actually compile can prevent
  34.760 +	people from inadvertently <quote>breaking the
  34.761 +	  build</quote>.</para>
  34.762 +    </sect2>
  34.763 +
  34.764 +    <sect2>
  34.765 +      <title>What to do about sensitive changes that escape</title>
  34.766 +
  34.767 +      <para id="x_6c2">Even a carefully run project can suffer an unfortunate
  34.768 +	event such as the committing and uncontrolled propagation of a
  34.769 +	file that contains important passwords.</para>
  34.770 +
  34.771 +      <para id="x_6c3">If something like this happens to you, and the information
  34.772 +	that gets accidentally propagated is truly sensitive, your
  34.773 +	first step should be to mitigate the effect of the leak
  34.774 +	without trying to control the leak itself. If you are not 100%
  34.775 +	certain that you know exactly who could have seen the changes,
  34.776 +	you should immediately change passwords, cancel credit cards,
  34.777 +	or find some other way to make sure that the information that
  34.778 +	has leaked is no longer useful.  In other words, assume that
  34.779 +	the change has propagated far and wide, and that there's
  34.780 +	nothing more you can do.</para>
  34.781 +
  34.782 +      <para id="x_6c4">You might hope that there would be mechanisms you could
  34.783 +	use to either figure out who has seen a change or to erase the
  34.784 +	change permanently everywhere, but there are good reasons why
  34.785 +	these are not possible.</para>
  34.786 +
  34.787 +      <para id="x_6c5">Mercurial does not provide an audit trail of who has
  34.788 +	pulled changes from a repository, because it is usually either
  34.789 +	impossible to record such information or trivial to spoof it.
  34.790 +	In a multi-user or networked environment, you should thus be
  34.791 +	extremely skeptical of yourself if you think that you have
  34.792 +	identified every place that a sensitive changeset has
  34.793 +	propagated to.  Don't forget that people can and will send
  34.794 +	bundles by email, have their backup software save data
  34.795 +	offsite, carry repositories on USB sticks, and find other
  34.796 +	completely innocent ways to confound your attempts to track
  34.797 +	down every copy of a problematic change.</para>
  34.798 +
  34.799 +      <para id="x_6c6">Mercurial also does not provide a way to make a file or
  34.800 +	changeset completely disappear from history, because there is
  34.801 +	no way to enforce its disappearance; someone could easily
  34.802 +	modify their copy of Mercurial to ignore such directives. In
  34.803 +	addition, even if Mercurial provided such a capability,
  34.804 +	someone who simply hadn't pulled a <quote>make this file
  34.805 +	  disappear</quote> changeset wouldn't be affected by it, nor
  34.806 +	would web crawlers visiting at the wrong time, disk backups,
  34.807 +	or other mechanisms.  Indeed, no distributed revision control
  34.808 +	system can make data reliably vanish. Providing the illusion
  34.809 +	of such control could easily give a false sense of security,
  34.810 +	and be worse than not providing it at all.</para>
  34.811 +    </sect2>
  34.812 +  </sect1>
  34.813 +
  34.814 +  <sect1 id="sec:undo:bisect">
  34.815 +    <title>Finding the source of a bug</title>
  34.816 +
  34.817 +    <para id="x_126">While it's all very well to be able to back out a changeset
  34.818 +      that introduced a bug, this requires that you know which
  34.819 +      changeset to back out.  Mercurial provides an invaluable
  34.820 +      command, called <command role="hg-cmd">hg bisect</command>, that
  34.821 +      helps you to automate this process and accomplish it very
  34.822 +      efficiently.</para>
  34.823 +
  34.824 +    <para id="x_127">The idea behind the <command role="hg-cmd">hg
  34.825 +	bisect</command> command is that a changeset has introduced
  34.826 +      some change of behavior that you can identify with a simple
  34.827 +      pass/fail test.  You don't know which piece of code introduced the
  34.828 +      change, but you know how to test for the presence of the bug.
  34.829 +      The <command role="hg-cmd">hg bisect</command> command uses your
  34.830 +      test to direct its search for the changeset that introduced the
  34.831 +      code that caused the bug.</para>
  34.832 +
  34.833 +    <para id="x_128">Here are a few scenarios to help you understand how you
  34.834 +      might apply this command.</para>
  34.835 +    <itemizedlist>
  34.836 +      <listitem><para id="x_129">The most recent version of your software has a
  34.837 +	  bug that you remember wasn't present a few weeks ago, but
  34.838 +	  you don't know when it was introduced.  Here, your binary
  34.839 +	  test checks for the presence of that bug.</para>
  34.840 +      </listitem>
  34.841 +      <listitem><para id="x_12a">You fixed a bug in a rush, and now it's time to
  34.842 +	  close the entry in your team's bug database.  The bug
  34.843 +	  database requires a changeset ID when you close an entry,
  34.844 +	  but you don't remember which changeset you fixed the bug in.
  34.845 +	  Once again, your binary test checks for the presence of the
  34.846 +	  bug.</para>
  34.847 +      </listitem>
  34.848 +      <listitem><para id="x_12b">Your software works correctly, but runs 15%
  34.849 +	  slower than the last time you measured it.  You want to know
  34.850 +	  which changeset introduced the performance regression.  In
  34.851 +	  this case, your binary test measures the performance of your
  34.852 +	  software, to see whether it's <quote>fast</quote> or
  34.853 +	  <quote>slow</quote>.</para>
  34.854 +      </listitem>
  34.855 +      <listitem><para id="x_12c">The sizes of the components of your project that
  34.856 +	  you ship exploded recently, and you suspect that something
  34.857 +	  changed in the way you build your project.</para>
  34.858 +      </listitem></itemizedlist>
  34.859 +
  34.860 +    <para id="x_12d">From these examples, it should be clear that the <command
  34.861 +	role="hg-cmd">hg bisect</command> command is not useful only
  34.862 +      for finding the sources of bugs.  You can use it to find any
  34.863 +      <quote>emergent property</quote> of a repository (anything that
  34.864 +      you can't find from a simple text search of the files in the
  34.865 +      tree) for which you can write a binary test.</para>
  34.866 +
  34.867 +    <para id="x_12e">We'll introduce a little bit of terminology here, just to
  34.868 +      make it clear which parts of the search process are your
  34.869 +      responsibility, and which are Mercurial's.  A
  34.870 +      <emphasis>test</emphasis> is something that
  34.871 +      <emphasis>you</emphasis> run when <command role="hg-cmd">hg
  34.872 +	bisect</command> chooses a changeset.  A
  34.873 +      <emphasis>probe</emphasis> is what <command role="hg-cmd">hg
  34.874 +	bisect</command> runs to tell whether a revision is good.
  34.875 +      Finally, we'll use the word <quote>bisect</quote>, as both a
  34.876 +      noun and a verb, to stand in for the phrase <quote>search using
  34.877 +	the <command role="hg-cmd">hg bisect</command>
  34.878 +	command</quote>.</para>
  34.879 +
  34.880 +    <para id="x_12f">One simple way to automate the searching process would be
  34.881 +      simply to probe every changeset.  However, this scales poorly.
  34.882 +      If it took ten minutes to test a single changeset, and you had
  34.883 +      10,000 changesets in your repository, the exhaustive approach
  34.884 +      would take on average 35 <emphasis>days</emphasis> to find the
  34.885 +      changeset that introduced a bug.  Even if you knew that the bug
  34.886 +      was introduced by one of the last 500 changesets, and limited
  34.887 +      your search to those, you'd still be looking at over 40 hours to
  34.888 +      find the changeset that introduced your bug.</para>
  34.889 +
  34.890 +    <para id="x_130">What the <command role="hg-cmd">hg bisect</command> command
  34.891 +      does is use its knowledge of the <quote>shape</quote> of your
  34.892 +      project's revision history to perform a search in time
  34.893 +      proportional to the <emphasis>logarithm</emphasis> of the number
  34.894 +      of changesets to check (the kind of search it performs is called
  34.895 +      a dichotomic search).  With this approach, searching through
  34.896 +      10,000 changesets will take less than three hours, even at ten
  34.897 +      minutes per test (the search will require about 14 tests).
  34.898 +      Limit your search to the last hundred changesets, and it will
  34.899 +      take only about an hour (roughly seven tests).</para>
  34.900 +
  34.901 +    <para id="x_131">The <command role="hg-cmd">hg bisect</command> command is
  34.902 +      aware of the <quote>branchy</quote> nature of a Mercurial
  34.903 +      project's revision history, so it has no problems dealing with
  34.904 +      branches, merges, or multiple heads in a repository.  It can
  34.905 +      prune entire branches of history with a single probe, which is
  34.906 +      how it operates so efficiently.</para>
  34.907 +
  34.908 +    <sect2>
  34.909 +      <title>Using the <command role="hg-cmd">hg bisect</command>
  34.910 +	command</title>
  34.911 +
  34.912 +      <para id="x_132">Here's an example of <command role="hg-cmd">hg
  34.913 +	  bisect</command> in action.</para>
  34.914 +
  34.915 +      <note>
  34.916 +	<para id="x_133">  In versions 0.9.5 and earlier of Mercurial, <command
  34.917 +	    role="hg-cmd">hg bisect</command> was not a core command:
  34.918 +	  it was distributed with Mercurial as an extension. This
  34.919 +	  section describes the built-in command, not the old
  34.920 +	  extension.</para>
  34.921 +      </note>
  34.922 +
  34.923 +      <para id="x_134">Now let's create a repository, so that we can try out the
  34.924 +	<command role="hg-cmd">hg bisect</command> command in
  34.925 +	isolation.</para>
  34.926 +
  34.927 +      &interaction.bisect.init;
  34.928 +
  34.929 +      <para id="x_135">We'll simulate a project that has a bug in it in a
  34.930 +	simple-minded way: create trivial changes in a loop, and
  34.931 +	nominate one specific change that will have the
  34.932 +	<quote>bug</quote>.  This loop creates 35 changesets, each
  34.933 +	adding a single file to the repository. We'll represent our
  34.934 +	<quote>bug</quote> with a file that contains the text <quote>i
  34.935 +	  have a gub</quote>.</para>
  34.936 +
  34.937 +      &interaction.bisect.commits;
  34.938 +
  34.939 +      <para id="x_136">The next thing that we'd like to do is figure out how to
  34.940 +	use the <command role="hg-cmd">hg bisect</command> command.
  34.941 +	We can use Mercurial's normal built-in help mechanism for
  34.942 +	this.</para>
  34.943 +
  34.944 +      &interaction.bisect.help;
  34.945 +
  34.946 +      <para id="x_137">The <command role="hg-cmd">hg bisect</command> command
  34.947 +	works in steps.  Each step proceeds as follows.</para>
  34.948 +      <orderedlist>
  34.949 +	<listitem><para id="x_138">You run your binary test.</para>
  34.950 +	  <itemizedlist>
  34.951 +	    <listitem><para id="x_139">If the test succeeded, you tell <command
  34.952 +		  role="hg-cmd">hg bisect</command> by running the
  34.953 +		<command role="hg-cmd">hg bisect --good</command>
  34.954 +		command.</para>
  34.955 +	    </listitem>
  34.956 +	    <listitem><para id="x_13a">If it failed, run the <command
  34.957 +		  role="hg-cmd">hg bisect --bad</command>
  34.958 +		command.</para></listitem></itemizedlist>
  34.959 +	</listitem>
  34.960 +	<listitem><para id="x_13b">The command uses your information to decide
  34.961 +	    which changeset to test next.</para>
  34.962 +	</listitem>
  34.963 +	<listitem><para id="x_13c">It updates the working directory to that
  34.964 +	    changeset, and the process begins again.</para>
  34.965 +	</listitem></orderedlist>
  34.966 +      <para id="x_13d">The process ends when <command role="hg-cmd">hg
  34.967 +	  bisect</command> identifies a unique changeset that marks
  34.968 +	the point where your test transitioned from
  34.969 +	<quote>succeeding</quote> to <quote>failing</quote>.</para>
  34.970 +
  34.971 +      <para id="x_13e">To start the search, we must run the <command
  34.972 +	  role="hg-cmd">hg bisect --reset</command> command.</para>
  34.973 +
  34.974 +      &interaction.bisect.search.init;
  34.975 +
  34.976 +      <para id="x_13f">In our case, the binary test we use is simple: we check to
  34.977 +	see if any file in the repository contains the string <quote>i
  34.978 +	  have a gub</quote>.  If it does, this changeset contains the
  34.979 +	change that <quote>caused the bug</quote>.  By convention, a
  34.980 +	changeset that has the property we're searching for is
  34.981 +	<quote>bad</quote>, while one that doesn't is
  34.982 +	<quote>good</quote>.</para>
  34.983 +
  34.984 +      <para id="x_140">Most of the time, the revision to which the working
  34.985 +	directory is synced (usually the tip) already exhibits the
  34.986 +	problem introduced by the buggy change, so we'll mark it as
  34.987 +	<quote>bad</quote>.</para>
  34.988 +
  34.989 +      &interaction.bisect.search.bad-init;
  34.990 +
  34.991 +      <para id="x_141">Our next task is to nominate a changeset that we know
  34.992 +	<emphasis>doesn't</emphasis> have the bug; the <command
  34.993 +	  role="hg-cmd">hg bisect</command> command will
  34.994 +	<quote>bracket</quote> its search between the first pair of
  34.995 +	good and bad changesets.  In our case, we know that revision
  34.996 +	10 didn't have the bug.  (I'll have more words about choosing
  34.997 +	the first <quote>good</quote> changeset later.)</para>
  34.998 +
  34.999 +      &interaction.bisect.search.good-init;
 34.1000 +
 34.1001 +      <para id="x_142">Notice that this command printed some output.</para>
 34.1002 +      <itemizedlist>
 34.1003 +	<listitem><para id="x_143">It told us how many changesets it must
 34.1004 +	    consider before it can identify the one that introduced
 34.1005 +	    the bug, and how many tests that will require.</para>
 34.1006 +	</listitem>
 34.1007 +	<listitem><para id="x_144">It updated the working directory to the next
 34.1008 +	    changeset to test, and told us which changeset it's
 34.1009 +	    testing.</para>
 34.1010 +	</listitem></itemizedlist>
 34.1011 +
 34.1012 +      <para id="x_145">We now run our test in the working directory.  We use the
 34.1013 +	<command>grep</command> command to see if our
 34.1014 +	<quote>bad</quote> file is present in the working directory.
 34.1015 +	If it is, this revision is bad; if not, this revision is good.
 34.1016 +	&interaction.bisect.search.step1;</para>
 34.1017 +
 34.1018 +      <para id="x_146">This test looks like a perfect candidate for automation,
 34.1019 +	so let's turn it into a shell function.</para>
 34.1020 +      &interaction.bisect.search.mytest;
 34.1021 +
 34.1022 +      <para id="x_147">We can now run an entire test step with a single command,
 34.1023 +	<literal>mytest</literal>.</para>
 34.1024 +
 34.1025 +      &interaction.bisect.search.step2;
 34.1026 +
 34.1027 +      <para id="x_148">A few more invocations of our canned test step command,
 34.1028 +	and we're done.</para>
 34.1029 +
 34.1030 +      &interaction.bisect.search.rest;
 34.1031 +
 34.1032 +      <para id="x_149">Even though we had 40 changesets to search through, the
 34.1033 +	<command role="hg-cmd">hg bisect</command> command let us find
 34.1034 +	the changeset that introduced our <quote>bug</quote> with only
 34.1035 +	five tests.  Because the number of tests that the <command
 34.1036 +	  role="hg-cmd">hg bisect</command> command performs grows
 34.1037 +	logarithmically with the number of changesets to search, the
 34.1038 +	advantage that it has over the <quote>brute force</quote>
 34.1039 +	search approach increases with every changeset you add.</para>
 34.1040 +
 34.1041 +    </sect2>
 34.1042 +    <sect2>
 34.1043 +      <title>Cleaning up after your search</title>
 34.1044 +
 34.1045 +      <para id="x_14a">When you're finished using the <command role="hg-cmd">hg
 34.1046 +	  bisect</command> command in a repository, you can use the
 34.1047 +	<command role="hg-cmd">hg bisect --reset</command> command to
 34.1048 +	drop the information it was using to drive your search.  The
 34.1049 +	command doesn't use much space, so it doesn't matter if you
 34.1050 +	forget to run this command.  However, <command
 34.1051 +	  role="hg-cmd">hg bisect</command> won't let you start a new
 34.1052 +	search in that repository until you do a <command
 34.1053 +	  role="hg-cmd">hg bisect --reset</command>.</para>
 34.1054 +
 34.1055 +      &interaction.bisect.search.reset;
 34.1056 +
 34.1057 +    </sect2>
 34.1058 +  </sect1>
 34.1059 +  <sect1>
 34.1060 +    <title>Tips for finding bugs effectively</title>
 34.1061 +
 34.1062 +    <sect2>
 34.1063 +      <title>Give consistent input</title>
 34.1064 +
 34.1065 +      <para id="x_14b">The <command role="hg-cmd">hg bisect</command> command
 34.1066 +	requires that you correctly report the result of every test
 34.1067 +	you perform.  If you tell it that a test failed when it really
 34.1068 +	succeeded, it <emphasis>might</emphasis> be able to detect the
 34.1069 +	inconsistency.  If it can identify an inconsistency in your
 34.1070 +	reports, it will tell you that a particular changeset is both
 34.1071 +	good and bad. However, it can't do this perfectly; it's about
 34.1072 +	as likely to report the wrong changeset as the source of the
 34.1073 +	bug.</para>
 34.1074 +
 34.1075 +    </sect2>
 34.1076 +    <sect2>
 34.1077 +      <title>Automate as much as possible</title>
 34.1078 +
 34.1079 +      <para id="x_14c">When I started using the <command role="hg-cmd">hg
 34.1080 +	  bisect</command> command, I tried a few times to run my
 34.1081 +	tests by hand, on the command line.  This is an approach that
 34.1082 +	I, at least, am not suited to.  After a few tries, I found
 34.1083 +	that I was making enough mistakes that I was having to restart
 34.1084 +	my searches several times before finally getting correct
 34.1085 +	results.</para>
 34.1086 +
 34.1087 +      <para id="x_14d">My initial problems with driving the <command
 34.1088 +	  role="hg-cmd">hg bisect</command> command by hand occurred
 34.1089 +	even with simple searches on small repositories; if the
 34.1090 +	problem you're looking for is more subtle, or the number of
 34.1091 +	tests that <command role="hg-cmd">hg bisect</command> must
 34.1092 +	perform increases, the likelihood of operator error ruining
 34.1093 +	the search is much higher.  Once I started automating my
 34.1094 +	tests, I had much better results.</para>
 34.1095 +
 34.1096 +      <para id="x_14e">The key to automated testing is twofold:</para>
 34.1097 +      <itemizedlist>
 34.1098 +	<listitem><para id="x_14f">always test for the same symptom, and</para>
 34.1099 +	</listitem>
 34.1100 +	<listitem><para id="x_150">always feed consistent input to the <command
 34.1101 +	      role="hg-cmd">hg bisect</command> command.</para>
 34.1102 +	</listitem></itemizedlist>
 34.1103 +      <para id="x_151">In my tutorial example above, the <command>grep</command>
 34.1104 +	command tests for the symptom, and the <literal>if</literal>
 34.1105 +	statement takes the result of this check and ensures that we
 34.1106 +	always feed the same input to the <command role="hg-cmd">hg
 34.1107 +	  bisect</command> command.  The <literal>mytest</literal>
 34.1108 +	function marries these together in a reproducible way, so that
 34.1109 +	every test is uniform and consistent.</para>
 34.1110 +
 34.1111 +    </sect2>
 34.1112 +    <sect2>
 34.1113 +      <title>Check your results</title>
 34.1114 +
 34.1115 +      <para id="x_152">Because the output of a <command role="hg-cmd">hg
 34.1116 +	  bisect</command> search is only as good as the input you
 34.1117 +	give it, don't take the changeset it reports as the absolute
 34.1118 +	truth.  A simple way to cross-check its report is to manually
 34.1119 +	run your test at each of the following changesets:</para>
 34.1120 +      <itemizedlist>
 34.1121 +	<listitem><para id="x_153">The changeset that it reports as the first bad
 34.1122 +	    revision.  Your test should still report this as
 34.1123 +	    bad.</para>
 34.1124 +	</listitem>
 34.1125 +	<listitem><para id="x_154">The parent of that changeset (either parent,
 34.1126 +	    if it's a merge). Your test should report this changeset
 34.1127 +	    as good.</para>
 34.1128 +	</listitem>
 34.1129 +	<listitem><para id="x_155">A child of that changeset.  Your test should
 34.1130 +	    report this changeset as bad.</para>
 34.1131 +	</listitem></itemizedlist>
 34.1132 +
 34.1133 +    </sect2>
 34.1134 +    <sect2>
 34.1135 +      <title>Beware interference between bugs</title>
 34.1136 +
 34.1137 +      <para id="x_156">It's possible that your search for one bug could be
 34.1138 +	disrupted by the presence of another.  For example, let's say
 34.1139 +	your software crashes at revision 100, and worked correctly at
 34.1140 +	revision 50.  Unknown to you, someone else introduced a
 34.1141 +	different crashing bug at revision 60, and fixed it at
 34.1142 +	revision 80.  This could distort your results in one of
 34.1143 +	several ways.</para>
 34.1144 +
 34.1145 +      <para id="x_157">It is possible that this other bug completely
 34.1146 +	<quote>masks</quote> yours, which is to say that it occurs
 34.1147 +	before your bug has a chance to manifest itself.  If you can't
 34.1148 +	avoid that other bug (for example, it prevents your project
 34.1149 +	from building), and so can't tell whether your bug is present
 34.1150 +	in a particular changeset, the <command role="hg-cmd">hg
 34.1151 +	  bisect</command> command cannot help you directly.  Instead,
 34.1152 +	you can mark a changeset as untested by running <command
 34.1153 +	  role="hg-cmd">hg bisect --skip</command>.</para>
 34.1154 +
 34.1155 +      <para id="x_158">A different problem could arise if your test for a bug's
 34.1156 +	presence is not specific enough.  If you check for <quote>my
 34.1157 +	  program crashes</quote>, then both your crashing bug and an
 34.1158 +	unrelated crashing bug that masks it will look like the same
 34.1159 +	thing, and mislead <command role="hg-cmd">hg
 34.1160 +	  bisect</command>.</para>
 34.1161 +
 34.1162 +      <para id="x_159">Another useful situation in which to use <command
 34.1163 +	  role="hg-cmd">hg bisect --skip</command> is if you can't
 34.1164 +	test a revision because your project was in a broken and hence
 34.1165 +	untestable state at that revision, perhaps because someone
 34.1166 +	checked in a change that prevented the project from
 34.1167 +	building.</para>
 34.1168 +
 34.1169 +    </sect2>
 34.1170 +    <sect2>
 34.1171 +      <title>Bracket your search lazily</title>
 34.1172 +
 34.1173 +      <para id="x_15a">Choosing the first <quote>good</quote> and
 34.1174 +	<quote>bad</quote> changesets that will mark the end points of
 34.1175 +	your search is often easy, but it bears a little discussion
 34.1176 +	nevertheless.  From the perspective of <command
 34.1177 +	  role="hg-cmd">hg bisect</command>, the <quote>newest</quote>
 34.1178 +	changeset is conventionally <quote>bad</quote>, and the older
 34.1179 +	changeset is <quote>good</quote>.</para>
 34.1180 +
 34.1181 +      <para id="x_15b">If you're having trouble remembering when a suitable
 34.1182 +	<quote>good</quote> change was, so that you can tell <command
 34.1183 +	  role="hg-cmd">hg bisect</command>, you could do worse than
 34.1184 +	testing changesets at random.  Just remember to eliminate
 34.1185 +	contenders that can't possibly exhibit the bug (perhaps
 34.1186 +	because the feature with the bug isn't present yet) and those
 34.1187 +	where another problem masks the bug (as I discussed
 34.1188 +	above).</para>
 34.1189 +
 34.1190 +      <para id="x_15c">Even if you end up <quote>early</quote> by thousands of
 34.1191 +	changesets or months of history, you will only add a handful
 34.1192 +	of tests to the total number that <command role="hg-cmd">hg
 34.1193 +	  bisect</command> must perform, thanks to its logarithmic
 34.1194 +	behavior.</para>
 34.1195 +
 34.1196 +    </sect2>
 34.1197 +  </sect1>
 34.1198 +</chapter>
 34.1199 +
 34.1200 +<!--
 34.1201 +local variables: 
 34.1202 +sgml-parent-document: ("00book.xml" "book" "chapter")
 34.1203 +end:
 34.1204 +-->
    35.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.2 +++ b/en/ch10-hook.xml	Sun Aug 16 03:41:39 2009 +0200
    35.3 @@ -0,0 +1,1928 @@
    35.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    35.5 +
    35.6 +<chapter id="chap:hook">
    35.7 +  <?dbhtml filename="handling-repository-events-with-hooks.html"?>
    35.8 +  <title>Handling repository events with hooks</title>
    35.9 +
   35.10 +  <para id="x_1e6">Mercurial offers a powerful mechanism to let you perform
   35.11 +    automated actions in response to events that occur in a
   35.12 +    repository.  In some cases, you can even control Mercurial's
   35.13 +    response to those events.</para>
   35.14 +
   35.15 +  <para id="x_1e7">The name Mercurial uses for one of these actions is a
   35.16 +    <emphasis>hook</emphasis>. Hooks are called
   35.17 +    <quote>triggers</quote> in some revision control systems, but the
   35.18 +    two names refer to the same idea.</para>
   35.19 +
   35.20 +  <sect1>
   35.21 +    <title>An overview of hooks in Mercurial</title>
   35.22 +
   35.23 +    <para id="x_1e8">Here is a brief list of the hooks that Mercurial
   35.24 +      supports. We will revisit each of these hooks in more detail
   35.25 +      later, in <xref linkend="sec:hook:ref"/>.</para>
   35.26 +
   35.27 +    <para id="x_1f6">Each of the hooks whose description begins with the word
   35.28 +      <quote>Controlling</quote> has the ability to determine whether
   35.29 +      an activity can proceed.  If the hook succeeds, the activity may
   35.30 +      proceed; if it fails, the activity is either not permitted or
   35.31 +      undone, depending on the hook.</para>
   35.32 +
   35.33 +    <itemizedlist>
   35.34 +      <listitem><para id="x_1e9"><literal role="hook">changegroup</literal>: This
   35.35 +	  is run after a group of changesets has been brought into the
   35.36 +	  repository from elsewhere.</para>
   35.37 +      </listitem>
   35.38 +      <listitem><para id="x_1ea"><literal role="hook">commit</literal>: This is
   35.39 +	  run after a new changeset has been created in the local
   35.40 +	  repository.</para>
   35.41 +      </listitem>
   35.42 +      <listitem><para id="x_1eb"><literal role="hook">incoming</literal>: This is
   35.43 +	  run once for each new changeset that is brought into the
   35.44 +	  repository from elsewhere.  Notice the difference from
   35.45 +	  <literal role="hook">changegroup</literal>, which is run
   35.46 +	  once per <emphasis>group</emphasis> of changesets brought
   35.47 +	  in.</para>
   35.48 +      </listitem>
   35.49 +      <listitem><para id="x_1ec"><literal role="hook">outgoing</literal>: This is
   35.50 +	  run after a group of changesets has been transmitted from
   35.51 +	  this repository.</para>
   35.52 +      </listitem>
   35.53 +      <listitem><para id="x_1ed"><literal role="hook">prechangegroup</literal>:
   35.54 +	  This is run before starting to bring a group of changesets
   35.55 +	  into the repository.
   35.56 +	</para>
   35.57 +      </listitem>
   35.58 +      <listitem><para id="x_1ee"><literal role="hook">precommit</literal>:
   35.59 +	  Controlling. This is run before starting a commit.
   35.60 +	</para>
   35.61 +      </listitem>
   35.62 +      <listitem><para id="x_1ef"><literal role="hook">preoutgoing</literal>:
   35.63 +	  Controlling. This is run before starting to transmit a group
   35.64 +	  of changesets from this repository.
   35.65 +	</para>
   35.66 +      </listitem>
   35.67 +      <listitem><para id="x_1f0"><literal role="hook">pretag</literal>:
   35.68 +	  Controlling. This is run before creating a tag.
   35.69 +	</para>
   35.70 +      </listitem>
   35.71 +      <listitem><para id="x_1f1"><literal
   35.72 +	    role="hook">pretxnchangegroup</literal>: Controlling. This
   35.73 +	  is run after a group of changesets has been brought into the
   35.74 +	  local repository from another, but before the transaction
   35.75 +	  completes that will make the changes permanent in the
   35.76 +	  repository.
   35.77 +	</para>
   35.78 +      </listitem>
   35.79 +      <listitem><para id="x_1f2"><literal role="hook">pretxncommit</literal>:
   35.80 +	  Controlling. This is run after a new changeset has been
   35.81 +	  created in the local repository, but before the transaction
   35.82 +	  completes that will make it permanent.
   35.83 +	</para>
   35.84 +      </listitem>
   35.85 +      <listitem><para id="x_1f3"><literal role="hook">preupdate</literal>:
   35.86 +	  Controlling. This is run before starting an update or merge
   35.87 +	  of the working directory.
   35.88 +	</para>
   35.89 +      </listitem>
   35.90 +      <listitem><para id="x_1f4"><literal role="hook">tag</literal>: This is run
   35.91 +	  after a tag is created.
   35.92 +	</para>
   35.93 +      </listitem>
   35.94 +      <listitem><para id="x_1f5"><literal role="hook">update</literal>: This is
   35.95 +	  run after an update or merge of the working directory has
   35.96 +	  finished.
   35.97 +	</para>
   35.98 +      </listitem></itemizedlist>
   35.99 +
  35.100 +  </sect1>
  35.101 +  <sect1>
  35.102 +    <title>Hooks and security</title>
  35.103 +
  35.104 +    <sect2>
  35.105 +      <title>Hooks are run with your privileges</title>
  35.106 +
  35.107 +      <para id="x_1f7">When you run a Mercurial command in a repository, and the
  35.108 +	command causes a hook to run, that hook runs on
  35.109 +	<emphasis>your</emphasis> system, under
  35.110 +	<emphasis>your</emphasis> user account, with
  35.111 +	<emphasis>your</emphasis> privilege level.  Since hooks are
  35.112 +	arbitrary pieces of executable code, you should treat them
  35.113 +	with an appropriate level of suspicion.  Do not install a hook
  35.114 +	unless you are confident that you know who created it and what
  35.115 +	it does.
  35.116 +      </para>
  35.117 +
  35.118 +      <para id="x_1f8">In some cases, you may be exposed to hooks that you did
  35.119 +	not install yourself.  If you work with Mercurial on an
  35.120 +	unfamiliar system, Mercurial will run hooks defined in that
  35.121 +	system's global <filename role="special">~/.hgrc</filename>
  35.122 +	file.
  35.123 +      </para>
  35.124 +
  35.125 +      <para id="x_1f9">If you are working with a repository owned by another
  35.126 +	user, Mercurial can run hooks defined in that user's
  35.127 +	repository, but it will still run them as <quote>you</quote>.
  35.128 +	For example, if you <command role="hg-cmd">hg pull</command>
  35.129 +	from that repository, and its <filename
  35.130 +	  role="special">.hg/hgrc</filename> defines a local <literal
  35.131 +	  role="hook">outgoing</literal> hook, that hook will run
  35.132 +	under your user account, even though you don't own that
  35.133 +	repository.
  35.134 +      </para>
  35.135 +
  35.136 +      <note>
  35.137 +	<para id="x_1fa">  This only applies if you are pulling from a repository
  35.138 +	  on a local or network filesystem.  If you're pulling over
  35.139 +	  http or ssh, any <literal role="hook">outgoing</literal>
  35.140 +	  hook will run under whatever account is executing the server
  35.141 +	  process, on the server.
  35.142 +	</para>
  35.143 +      </note>
  35.144 +
  35.145 +      <para id="x_1fb">To see what hooks are defined in a repository,
  35.146 +	use the <command role="hg-cmd">hg showconfig hooks</command>
  35.147 +	command.  If you are working in one repository, but talking to
  35.148 +	another that you do not own (e.g. using <command
  35.149 +	  role="hg-cmd">hg pull</command> or <command role="hg-cmd">hg
  35.150 +	  incoming</command>), remember that it is the other
  35.151 +	repository's hooks you should be checking, not your own.
  35.152 +      </para>
  35.153 +    </sect2>
  35.154 +
  35.155 +    <sect2>
  35.156 +      <title>Hooks do not propagate</title>
  35.157 +
  35.158 +      <para id="x_1fc">In Mercurial, hooks are not revision controlled, and do
  35.159 +	not propagate when you clone, or pull from, a repository.  The
  35.160 +	reason for this is simple: a hook is a completely arbitrary
  35.161 +	piece of executable code.  It runs under your user identity,
  35.162 +	with your privilege level, on your machine.
  35.163 +      </para>
  35.164 +
  35.165 +      <para id="x_1fd">It would be extremely reckless for any distributed
  35.166 +	revision control system to implement revision-controlled
  35.167 +	hooks, as this would offer an easily exploitable way to
  35.168 +	subvert the accounts of users of the revision control system.
  35.169 +      </para>
  35.170 +
  35.171 +      <para id="x_1fe">Since Mercurial does not propagate hooks, if you are
  35.172 +	collaborating with other people on a common project, you
  35.173 +	should not assume that they are using the same Mercurial hooks
  35.174 +	as you are, or that theirs are correctly configured.  You
  35.175 +	should document the hooks you expect people to use.
  35.176 +      </para>
  35.177 +
  35.178 +      <para id="x_1ff">In a corporate intranet, this is somewhat easier to
  35.179 +	control, as you can for example provide a
  35.180 +	<quote>standard</quote> installation of Mercurial on an NFS
  35.181 +	filesystem, and use a site-wide <filename role="special">~/.hgrc</filename> file to define hooks that all users will
  35.182 +	see.  However, this too has its limits; see below.
  35.183 +      </para>
  35.184 +    </sect2>
  35.185 +
  35.186 +    <sect2>
  35.187 +      <title>Hooks can be overridden</title>
  35.188 +
  35.189 +      <para id="x_200">Mercurial allows you to override a hook definition by
  35.190 +	redefining the hook.  You can disable it by setting its value
  35.191 +	to the empty string, or change its behavior as you wish.
  35.192 +      </para>
  35.193 +
  35.194 +      <para id="x_201">If you deploy a system- or site-wide <filename
  35.195 +	  role="special">~/.hgrc</filename> file that defines some
  35.196 +	hooks, you should thus understand that your users can disable
  35.197 +	or override those hooks.
  35.198 +      </para>
  35.199 +    </sect2>
  35.200 +
  35.201 +    <sect2>
  35.202 +      <title>Ensuring that critical hooks are run</title>
  35.203 +
  35.204 +      <para id="x_202">Sometimes you may want to enforce a policy that you do not
  35.205 +	want others to be able to work around.  For example, you may
  35.206 +	have a requirement that every changeset must pass a rigorous
  35.207 +	set of tests.  Defining this requirement via a hook in a
  35.208 +	site-wide <filename role="special">~/.hgrc</filename> won't
  35.209 +	work for remote users on laptops, and of course local users
  35.210 +	can subvert it at will by overriding the hook.
  35.211 +      </para>
  35.212 +
  35.213 +      <para id="x_203">Instead, you can set up your policies for use of Mercurial
  35.214 +	so that people are expected to propagate changes through a
  35.215 +	well-known <quote>canonical</quote> server that you have
  35.216 +	locked down and configured appropriately.
  35.217 +      </para>
  35.218 +
  35.219 +      <para id="x_204">One way to do this is via a combination of social
  35.220 +	engineering and technology.  Set up a restricted-access
  35.221 +	account; users can push changes over the network to
  35.222 +	repositories managed by this account, but they cannot log into
  35.223 +	the account and run normal shell commands.  In this scenario,
  35.224 +	a user can commit a changeset that contains any old garbage
  35.225 +	they want.
  35.226 +      </para>
  35.227 +
  35.228 +      <para id="x_205">When someone pushes a changeset to the server that
  35.229 +	everyone pulls from, the server will test the changeset before
  35.230 +	it accepts it as permanent, and reject it if it fails to pass
  35.231 +	the test suite.  If people only pull changes from this
  35.232 +	filtering server, it will serve to ensure that all changes
  35.233 +	that people pull have been automatically vetted.
  35.234 +      </para>
  35.235 +
  35.236 +    </sect2>
  35.237 +  </sect1>
  35.238 +
  35.239 +  <sect1 id="sec:hook:simple">
  35.240 +    <title>A short tutorial on using hooks</title>
  35.241 +
  35.242 +    <para id="x_212">It is easy to write a Mercurial hook.  Let's start with a
  35.243 +      hook that runs when you finish a <command role="hg-cmd">hg
  35.244 +	commit</command>, and simply prints the hash of the changeset
  35.245 +      you just created.  The hook is called <literal
  35.246 +	role="hook">commit</literal>.
  35.247 +    </para>
  35.248 +
  35.249 +    <para id="x_213">All hooks follow the pattern in this example.</para>
  35.250 +
  35.251 +&interaction.hook.simple.init;
  35.252 +
  35.253 +    <para id="x_214">You add an entry to the <literal
  35.254 +	role="rc-hooks">hooks</literal> section of your <filename
  35.255 +	role="special">~/.hgrc</filename>.  On the left is the name of
  35.256 +      the event to trigger on; on the right is the action to take.  As
  35.257 +      you can see, you can run an arbitrary shell command in a hook.
  35.258 +      Mercurial passes extra information to the hook using environment
  35.259 +      variables (look for <envar>HG_NODE</envar> in the example).
  35.260 +    </para>
  35.261 +
  35.262 +    <sect2>
  35.263 +      <title>Performing multiple actions per event</title>
  35.264 +
  35.265 +      <para id="x_215">Quite often, you will want to define more than one hook
  35.266 +	for a particular kind of event, as shown below.</para>
  35.267 +
  35.268 +&interaction.hook.simple.ext;
  35.269 +
  35.270 +      <para id="x_216">Mercurial lets you do this by adding an
  35.271 +	<emphasis>extension</emphasis> to the end of a hook's name.
  35.272 +	You extend a hook's name by giving the name of the hook,
  35.273 +	followed by a full stop (the
  35.274 +	<quote><literal>.</literal></quote> character), followed by
  35.275 +	some more text of your choosing.  For example, Mercurial will
  35.276 +	run both <literal>commit.foo</literal> and
  35.277 +	<literal>commit.bar</literal> when the
  35.278 +	<literal>commit</literal> event occurs.
  35.279 +      </para>
  35.280 +
  35.281 +      <para id="x_217">To give a well-defined order of execution when there are
  35.282 +	multiple hooks defined for an event, Mercurial sorts hooks by
  35.283 +	extension, and executes the hook commands in this sorted
  35.284 +	order.  In the above example, it will execute
  35.285 +	<literal>commit.bar</literal> before
  35.286 +	<literal>commit.foo</literal>, and <literal>commit</literal>
  35.287 +	before both.
  35.288 +      </para>
  35.289 +
  35.290 +      <para id="x_218">It is a good idea to use a somewhat descriptive
  35.291 +	extension when you define a new hook.  This will help you to
  35.292 +	remember what the hook was for.  If the hook fails, you'll get
  35.293 +	an error message that contains the hook name and extension, so
  35.294 +	using a descriptive extension could give you an immediate hint
  35.295 +	as to why the hook failed (see <xref
  35.296 +	  linkend="sec:hook:perm"/> for an example).
  35.297 +      </para>
  35.298 +
  35.299 +    </sect2>
  35.300 +    <sect2 id="sec:hook:perm">
  35.301 +      <title>Controlling whether an activity can proceed</title>
  35.302 +
  35.303 +      <para id="x_219">In our earlier examples, we used the <literal
  35.304 +	  role="hook">commit</literal> hook, which is run after a
  35.305 +	commit has completed.  This is one of several Mercurial hooks
  35.306 +	that run after an activity finishes.  Such hooks have no way
  35.307 +	of influencing the activity itself.
  35.308 +      </para>
  35.309 +
  35.310 +      <para id="x_21a">Mercurial defines a number of events that occur before an
  35.311 +	activity starts; or after it starts, but before it finishes.
  35.312 +	Hooks that trigger on these events have the added ability to
  35.313 +	choose whether the activity can continue, or will abort.
  35.314 +      </para>
  35.315 +
  35.316 +      <para id="x_21b">The <literal role="hook">pretxncommit</literal> hook runs
  35.317 +	after a commit has all but completed.  In other words, the
  35.318 +	metadata representing the changeset has been written out to
  35.319 +	disk, but the transaction has not yet been allowed to
  35.320 +	complete.  The <literal role="hook">pretxncommit</literal>
  35.321 +	hook has the ability to decide whether the transaction can
  35.322 +	complete, or must be rolled back.
  35.323 +      </para>
  35.324 +
  35.325 +      <para id="x_21c">If the <literal role="hook">pretxncommit</literal> hook
  35.326 +	exits with a status code of zero, the transaction is allowed
  35.327 +	to complete; the commit finishes; and the <literal
  35.328 +	  role="hook">commit</literal> hook is run.  If the <literal
  35.329 +	  role="hook">pretxncommit</literal> hook exits with a
  35.330 +	non-zero status code, the transaction is rolled back; the
  35.331 +	metadata representing the changeset is erased; and the
  35.332 +	<literal role="hook">commit</literal> hook is not run.
  35.333 +      </para>
  35.334 +
  35.335 +&interaction.hook.simple.pretxncommit;
  35.336 +
  35.337 +      <para id="x_21d">The hook in the example above checks that a commit comment
  35.338 +	contains a bug ID.  If it does, the commit can complete.  If
  35.339 +	not, the commit is rolled back.
  35.340 +      </para>
  35.341 +
  35.342 +    </sect2>
  35.343 +  </sect1>
  35.344 +  <sect1>
  35.345 +    <title>Writing your own hooks</title>
  35.346 +
  35.347 +    <para id="x_21e">When you are writing a hook, you might find it useful to run
  35.348 +      Mercurial either with the <option
  35.349 +	role="hg-opt-global">-v</option> option, or the <envar
  35.350 +	role="rc-item-ui">verbose</envar> config item set to
  35.351 +      <quote>true</quote>.  When you do so, Mercurial will print a
  35.352 +      message before it calls each hook.
  35.353 +    </para>
  35.354 +
  35.355 +    <sect2 id="sec:hook:lang">
  35.356 +      <title>Choosing how your hook should run</title>
  35.357 +
  35.358 +      <para id="x_21f">You can write a hook either as a normal
  35.359 +	program&emdash;typically a shell script&emdash;or as a Python
  35.360 +	function that is executed within the Mercurial process.
  35.361 +      </para>
  35.362 +
  35.363 +      <para id="x_220">Writing a hook as an external program has the advantage
  35.364 +	that it requires no knowledge of Mercurial's internals.  You
  35.365 +	can call normal Mercurial commands to get any added
  35.366 +	information you need.  The trade-off is that external hooks
  35.367 +	are slower than in-process hooks.
  35.368 +      </para>
  35.369 +
  35.370 +      <para id="x_221">An in-process Python hook has complete access to the
  35.371 +	Mercurial API, and does not <quote>shell out</quote> to
  35.372 +	another process, so it is inherently faster than an external
  35.373 +	hook.  It is also easier to obtain much of the information
  35.374 +	that a hook requires by using the Mercurial API than by
  35.375 +	running Mercurial commands.
  35.376 +      </para>
  35.377 +
  35.378 +      <para id="x_222">If you are comfortable with Python, or require high
  35.379 +	performance, writing your hooks in Python may be a good
  35.380 +	choice.  However, when you have a straightforward hook to
  35.381 +	write and you don't need to care about performance (probably
  35.382 +	the majority of hooks), a shell script is perfectly fine.
  35.383 +      </para>
  35.384 +
  35.385 +    </sect2>
  35.386 +    <sect2 id="sec:hook:param">
  35.387 +      <title>Hook parameters</title>
  35.388 +
  35.389 +      <para id="x_223">Mercurial calls each hook with a set of well-defined
  35.390 +	parameters.  In Python, a parameter is passed as a keyword
  35.391 +	argument to your hook function.  For an external program, a
  35.392 +	parameter is passed as an environment variable.
  35.393 +      </para>
  35.394 +
  35.395 +      <para id="x_224">Whether your hook is written in Python or as a shell
  35.396 +	script, the hook-specific parameter names and values will be
  35.397 +	the same.  A boolean parameter will be represented as a
  35.398 +	boolean value in Python, but as the number 1 (for
  35.399 +	<quote>true</quote>) or 0 (for <quote>false</quote>) as an
  35.400 +	environment variable for an external hook.  If a hook
  35.401 +	parameter is named <literal>foo</literal>, the keyword
  35.402 +	argument for a Python hook will also be named
  35.403 +	<literal>foo</literal>, while the environment variable for an
  35.404 +	external hook will be named <literal>HG_FOO</literal>.
  35.405 +      </para>
  35.406 +    </sect2>
  35.407 +
  35.408 +    <sect2>
  35.409 +      <title>Hook return values and activity control</title>
  35.410 +
  35.411 +      <para id="x_225">A hook that executes successfully must exit with a status
  35.412 +	of zero if external, or return boolean <quote>false</quote> if
  35.413 +	in-process.  Failure is indicated with a non-zero exit status
  35.414 +	from an external hook, or an in-process hook returning boolean
  35.415 +	<quote>true</quote>.  If an in-process hook raises an
  35.416 +	exception, the hook is considered to have failed.
  35.417 +      </para>
  35.418 +
  35.419 +      <para id="x_226">For a hook that controls whether an activity can proceed,
  35.420 +	zero/false means <quote>allow</quote>, while
  35.421 +	non-zero/true/exception means <quote>deny</quote>.
  35.422 +      </para>
  35.423 +    </sect2>
  35.424 +
  35.425 +    <sect2>
  35.426 +      <title>Writing an external hook</title>
  35.427 +
  35.428 +      <para id="x_227">When you define an external hook in your <filename
  35.429 +	  role="special">~/.hgrc</filename> and the hook is run, its
  35.430 +	value is passed to your shell, which interprets it.  This
  35.431 +	means that you can use normal shell constructs in the body of
  35.432 +	the hook.
  35.433 +      </para>
  35.434 +
  35.435 +      <para id="x_228">An executable hook is always run with its current
  35.436 +	directory set to a repository's root directory.
  35.437 +      </para>
  35.438 +
  35.439 +      <para id="x_229">Each hook parameter is passed in as an environment
  35.440 +	variable; the name is upper-cased, and prefixed with the
  35.441 +	string <quote><literal>HG_</literal></quote>.
  35.442 +      </para>
  35.443 +
  35.444 +      <para id="x_22a">With the exception of hook parameters, Mercurial does not
  35.445 +	set or modify any environment variables when running a hook.
  35.446 +	This is useful to remember if you are writing a site-wide hook
  35.447 +	that may be run by a number of different users with differing
  35.448 +	environment variables set. In multi-user situations, you
  35.449 +	should not rely on environment variables being set to the
  35.450 +	values you have in your environment when testing the hook.
  35.451 +      </para>
  35.452 +    </sect2>
  35.453 +
  35.454 +    <sect2>
  35.455 +      <title>Telling Mercurial to use an in-process hook</title>
  35.456 +
  35.457 +      <para id="x_22b">The <filename role="special">~/.hgrc</filename> syntax
  35.458 +	for defining an in-process hook is slightly different than for
  35.459 +	an executable hook.  The value of the hook must start with the
  35.460 +	text <quote><literal>python:</literal></quote>, and continue
  35.461 +	with the fully-qualified name of a callable object to use as
  35.462 +	the hook's value.
  35.463 +      </para>
  35.464 +
  35.465 +      <para id="x_22c">The module in which a hook lives is automatically imported
  35.466 +	when a hook is run.  So long as you have the module name and
  35.467 +	<envar>PYTHONPATH</envar> right, it should <quote>just
  35.468 +	  work</quote>.
  35.469 +      </para>
  35.470 +
  35.471 +      <para id="x_22d">The following <filename role="special">~/.hgrc</filename>
  35.472 +	example snippet illustrates the syntax and meaning of the
  35.473 +	notions we just described.
  35.474 +      </para>
  35.475 +      <programlisting>[hooks]
  35.476 +commit.example = python:mymodule.submodule.myhook</programlisting>
  35.477 +      <para id="x_22e">When Mercurial runs the <literal>commit.example</literal>
  35.478 +	hook, it imports <literal>mymodule.submodule</literal>, looks
  35.479 +	for the callable object named <literal>myhook</literal>, and
  35.480 +	calls it.
  35.481 +      </para>
  35.482 +    </sect2>
  35.483 +
  35.484 +    <sect2>
  35.485 +      <title>Writing an in-process hook</title>
  35.486 +
  35.487 +      <para id="x_22f">The simplest in-process hook does nothing, but illustrates
  35.488 +	the basic shape of the hook API:
  35.489 +      </para>
  35.490 +      <programlisting>def myhook(ui, repo, **kwargs):
  35.491 +    pass</programlisting>
  35.492 +      <para id="x_230">The first argument to a Python hook is always a <literal
  35.493 +	  role="py-mod-mercurial.ui">ui</literal> object.  The second
  35.494 +	is a repository object; at the moment, it is always an
  35.495 +	instance of <literal
  35.496 +	  role="py-mod-mercurial.localrepo">localrepository</literal>.
  35.497 +	Following these two arguments are other keyword arguments.
  35.498 +	Which ones are passed in depends on the hook being called, but
  35.499 +	a hook can ignore arguments it doesn't care about by dropping
  35.500 +	them into a keyword argument dict, as with
  35.501 +	<literal>**kwargs</literal> above.
  35.502 +      </para>
  35.503 +
  35.504 +    </sect2>
  35.505 +  </sect1>
  35.506 +  <sect1>
  35.507 +    <title>Some hook examples</title>
  35.508 +
  35.509 +    <sect2>
  35.510 +      <title>Writing meaningful commit messages</title>
  35.511 +
  35.512 +      <para id="x_231">It's hard to imagine a useful commit message being very
  35.513 +	short. The simple <literal role="hook">pretxncommit</literal>
  35.514 +	hook of the example below will prevent you from committing a
  35.515 +	changeset with a message that is less than ten bytes long.
  35.516 +      </para>
  35.517 +
  35.518 +&interaction.hook.msglen.go;
  35.519 +    </sect2>
  35.520 +
  35.521 +    <sect2>
  35.522 +      <title>Checking for trailing whitespace</title>
  35.523 +
  35.524 +      <para id="x_232">An interesting use of a commit-related hook is to help you
  35.525 +	to write cleaner code.  A simple example of <quote>cleaner
  35.526 +	  code</quote> is the dictum that a change should not add any
  35.527 +	new lines of text that contain <quote>trailing
  35.528 +	  whitespace</quote>.  Trailing whitespace is a series of
  35.529 +	space and tab characters at the end of a line of text.  In
  35.530 +	most cases, trailing whitespace is unnecessary, invisible
  35.531 +	noise, but it is occasionally problematic, and people often
  35.532 +	prefer to get rid of it.
  35.533 +      </para>
  35.534 +
  35.535 +      <para id="x_233">You can use either the <literal
  35.536 +	  role="hook">precommit</literal> or <literal
  35.537 +	  role="hook">pretxncommit</literal> hook to tell whether you
  35.538 +	have a trailing whitespace problem.  If you use the <literal
  35.539 +	  role="hook">precommit</literal> hook, the hook will not know
  35.540 +	which files you are committing, so it will have to check every
  35.541 +	modified file in the repository for trailing white space.  If
  35.542 +	you want to commit a change to just the file
  35.543 +	<filename>foo</filename>, but the file
  35.544 +	<filename>bar</filename> contains trailing whitespace, doing a
  35.545 +	check in the <literal role="hook">precommit</literal> hook
  35.546 +	will prevent you from committing <filename>foo</filename> due
  35.547 +	to the problem with <filename>bar</filename>.  This doesn't
  35.548 +	seem right.
  35.549 +      </para>
  35.550 +
  35.551 +      <para id="x_234">Should you choose the <literal
  35.552 +	  role="hook">pretxncommit</literal> hook, the check won't
  35.553 +	occur until just before the transaction for the commit
  35.554 +	completes.  This will allow you to check for problems only the
  35.555 +	exact files that are being committed.  However, if you entered
  35.556 +	the commit message interactively and the hook fails, the
  35.557 +	transaction will roll back; you'll have to re-enter the commit
  35.558 +	message after you fix the trailing whitespace and run <command
  35.559 +	  role="hg-cmd">hg commit</command> again.
  35.560 +      </para>
  35.561 +
  35.562 +      &interaction.ch09-hook.ws.simple;
  35.563 +
  35.564 +      <para id="x_235">In this example, we introduce a simple <literal
  35.565 +	  role="hook">pretxncommit</literal> hook that checks for
  35.566 +	trailing whitespace.  This hook is short, but not very
  35.567 +	helpful.  It exits with an error status if a change adds a
  35.568 +	line with trailing whitespace to any file, but does not print
  35.569 +	any information that might help us to identify the offending
  35.570 +	file or line.  It also has the nice property of not paying
  35.571 +	attention to unmodified lines; only lines that introduce new
  35.572 +	trailing whitespace cause problems.
  35.573 +      </para>
  35.574 +
  35.575 +      &ch09-check_whitespace.py.lst;
  35.576 +
  35.577 +      <para id="x_236">The above version is much more complex, but also more
  35.578 +	useful.  It parses a unified diff to see if any lines add
  35.579 +	trailing whitespace, and prints the name of the file and the
  35.580 +	line number of each such occurrence.  Even better, if the
  35.581 +	change adds trailing whitespace, this hook saves the commit
  35.582 +	comment and prints the name of the save file before exiting
  35.583 +	and telling Mercurial to roll the transaction back, so you can
  35.584 +	use the <option role="hg-opt-commit">-l filename</option>
  35.585 +	option to <command role="hg-cmd">hg commit</command> to reuse
  35.586 +	the saved commit message once you've corrected the problem.
  35.587 +      </para>
  35.588 +
  35.589 +      &interaction.ch09-hook.ws.better;
  35.590 +
  35.591 +      <para id="x_237">As a final aside, note in the example above the
  35.592 +	use of <command>sed</command>'s in-place editing feature to
  35.593 +	get rid of trailing whitespace from a file.  This is concise
  35.594 +	and useful enough that I will reproduce it here (using
  35.595 +	<command>perl</command> for good measure).</para>
  35.596 +      <programlisting>perl -pi -e 's,\s+$,,' filename</programlisting>
  35.597 +
  35.598 +    </sect2>
  35.599 +  </sect1>
  35.600 +  <sect1>
  35.601 +    <title>Bundled hooks</title>
  35.602 +
  35.603 +    <para id="x_238">Mercurial ships with several bundled hooks.  You can find
  35.604 +      them in the <filename class="directory">hgext</filename>
  35.605 +      directory of a Mercurial source tree.  If you are using a
  35.606 +      Mercurial binary package, the hooks will be located in the
  35.607 +      <filename class="directory">hgext</filename> directory of
  35.608 +      wherever your package installer put Mercurial.
  35.609 +    </para>
  35.610 +
  35.611 +    <sect2>
  35.612 +      <title><literal role="hg-ext">acl</literal>&emdash;access
  35.613 +	control for parts of a repository</title>
  35.614 +
  35.615 +      <para id="x_239">The <literal role="hg-ext">acl</literal> extension lets
  35.616 +	you control which remote users are allowed to push changesets
  35.617 +	to a networked server.  You can protect any portion of a
  35.618 +	repository (including the entire repo), so that a specific
  35.619 +	remote user can push changes that do not affect the protected
  35.620 +	portion.
  35.621 +      </para>
  35.622 +
  35.623 +      <para id="x_23a">This extension implements access control based on the
  35.624 +	identity of the user performing a push,
  35.625 +	<emphasis>not</emphasis> on who committed the changesets
  35.626 +	they're pushing.  It makes sense to use this hook only if you
  35.627 +	have a locked-down server environment that authenticates
  35.628 +	remote users, and you want to be sure that only specific users
  35.629 +	are allowed to push changes to that server.
  35.630 +      </para>
  35.631 +
  35.632 +      <sect3>
  35.633 +	<title>Configuring the <literal role="hook">acl</literal>
  35.634 +	  hook</title>
  35.635 +
  35.636 +	<para id="x_23b">In order to manage incoming changesets, the <literal
  35.637 +	    role="hg-ext">acl</literal> hook must be used as a
  35.638 +	  <literal role="hook">pretxnchangegroup</literal> hook.  This
  35.639 +	  lets it see which files are modified by each incoming
  35.640 +	  changeset, and roll back a group of changesets if they
  35.641 +	  modify <quote>forbidden</quote> files.  Example:
  35.642 +	</para>
  35.643 +	<programlisting>[hooks]
  35.644 +pretxnchangegroup.acl = python:hgext.acl.hook</programlisting>
  35.645 +
  35.646 +	<para id="x_23c">The <literal role="hg-ext">acl</literal> extension is
  35.647 +	  configured using three sections.
  35.648 +	</para>
  35.649 +
  35.650 +	<para id="x_23d">The <literal role="rc-acl">acl</literal> section has
  35.651 +	  only one entry, <envar role="rc-item-acl">sources</envar>,
  35.652 +	  which lists the sources of incoming changesets that the hook
  35.653 +	  should pay attention to.  You don't normally need to
  35.654 +	  configure this section.
  35.655 +	</para>
  35.656 +	<itemizedlist>
  35.657 +	  <listitem><para id="x_23e"><envar role="rc-item-acl">serve</envar>:
  35.658 +	      Control incoming changesets that are arriving from a
  35.659 +	      remote repository over http or ssh.  This is the default
  35.660 +	      value of <envar role="rc-item-acl">sources</envar>, and
  35.661 +	      usually the only setting you'll need for this
  35.662 +	      configuration item.
  35.663 +	    </para>
  35.664 +	  </listitem>
  35.665 +	  <listitem><para id="x_23f"><envar role="rc-item-acl">pull</envar>:
  35.666 +	      Control incoming changesets that are arriving via a pull
  35.667 +	      from a local repository.
  35.668 +	    </para>
  35.669 +	  </listitem>
  35.670 +	  <listitem><para id="x_240"><envar role="rc-item-acl">push</envar>:
  35.671 +	      Control incoming changesets that are arriving via a push
  35.672 +	      from a local repository.
  35.673 +	    </para>
  35.674 +	  </listitem>
  35.675 +	  <listitem><para id="x_241"><envar role="rc-item-acl">bundle</envar>:
  35.676 +	      Control incoming changesets that are arriving from
  35.677 +	      another repository via a bundle.
  35.678 +	    </para>
  35.679 +	  </listitem></itemizedlist>
  35.680 +
  35.681 +	<para id="x_242">The <literal role="rc-acl.allow">acl.allow</literal>
  35.682 +	  section controls the users that are allowed to add
  35.683 +	  changesets to the repository.  If this section is not
  35.684 +	  present, all users that are not explicitly denied are
  35.685 +	  allowed.  If this section is present, all users that are not
  35.686 +	  explicitly allowed are denied (so an empty section means
  35.687 +	  that all users are denied).
  35.688 +	</para>
  35.689 +
  35.690 +	<para id="x_243">The <literal role="rc-acl.deny">acl.deny</literal>
  35.691 +	  section determines which users are denied from adding
  35.692 +	  changesets to the repository.  If this section is not
  35.693 +	  present or is empty, no users are denied.
  35.694 +	</para>
  35.695 +
  35.696 +	<para id="x_244">The syntaxes for the <literal
  35.697 +	    role="rc-acl.allow">acl.allow</literal> and <literal
  35.698 +	    role="rc-acl.deny">acl.deny</literal> sections are
  35.699 +	  identical.  On the left of each entry is a glob pattern that
  35.700 +	  matches files or directories, relative to the root of the
  35.701 +	  repository; on the right, a user name.
  35.702 +	</para>
  35.703 +
  35.704 +	<para id="x_245">In the following example, the user
  35.705 +	  <literal>docwriter</literal> can only push changes to the
  35.706 +	  <filename class="directory">docs</filename> subtree of the
  35.707 +	  repository, while <literal>intern</literal> can push changes
  35.708 +	  to any file or directory except <filename
  35.709 +	    class="directory">source/sensitive</filename>.
  35.710 +	</para>
  35.711 +	<programlisting>[acl.allow]
  35.712 +docs/** = docwriter
  35.713 +[acl.deny]
  35.714 +source/sensitive/** = intern</programlisting>
  35.715 +
  35.716 +      </sect3>
  35.717 +      <sect3>
  35.718 +	<title>Testing and troubleshooting</title>
  35.719 +
  35.720 +	<para id="x_246">If you want to test the <literal
  35.721 +	    role="hg-ext">acl</literal> hook, run it with Mercurial's
  35.722 +	  debugging output enabled.  Since you'll probably be running
  35.723 +	  it on a server where it's not convenient (or sometimes
  35.724 +	  possible) to pass in the <option
  35.725 +	    role="hg-opt-global">--debug</option> option, don't forget
  35.726 +	  that you can enable debugging output in your <filename
  35.727 +	    role="special">~/.hgrc</filename>:
  35.728 +	</para>
  35.729 +	<programlisting>[ui]
  35.730 +debug = true</programlisting>
  35.731 +	<para id="x_247">With this enabled, the <literal
  35.732 +	    role="hg-ext">acl</literal> hook will print enough
  35.733 +	  information to let you figure out why it is allowing or
  35.734 +	  forbidding pushes from specific users.
  35.735 +	</para>
  35.736 +
  35.737 +      </sect3>    </sect2>
  35.738 +
  35.739 +    <sect2>
  35.740 +      <title><literal
  35.741 +	  role="hg-ext">bugzilla</literal>&emdash;integration with
  35.742 +	Bugzilla</title>
  35.743 +
  35.744 +      <para id="x_248">The <literal role="hg-ext">bugzilla</literal> extension
  35.745 +	adds a comment to a Bugzilla bug whenever it finds a reference
  35.746 +	to that bug ID in a commit comment.  You can install this hook
  35.747 +	on a shared server, so that any time a remote user pushes
  35.748 +	changes to this server, the hook gets run.
  35.749 +      </para>
  35.750 +
  35.751 +      <para id="x_249">It adds a comment to the bug that looks like this (you can
  35.752 +	configure the contents of the comment&emdash;see below):
  35.753 +      </para>
  35.754 +      <programlisting>Changeset aad8b264143a, made by Joe User
  35.755 +	&lt;joe.user@domain.com&gt; in the frobnitz repository, refers
  35.756 +	to this bug. For complete details, see
  35.757 +	http://hg.domain.com/frobnitz?cmd=changeset;node=aad8b264143a
  35.758 +	Changeset description: Fix bug 10483 by guarding against some
  35.759 +	NULL pointers</programlisting>
  35.760 +      <para id="x_24a">The value of this hook is that it automates the process of
  35.761 +	updating a bug any time a changeset refers to it.  If you
  35.762 +	configure the hook properly, it makes it easy for people to
  35.763 +	browse straight from a Bugzilla bug to a changeset that refers
  35.764 +	to that bug.
  35.765 +      </para>
  35.766 +
  35.767 +      <para id="x_24b">You can use the code in this hook as a starting point for
  35.768 +	some more exotic Bugzilla integration recipes.  Here are a few
  35.769 +	possibilities:
  35.770 +      </para>
  35.771 +      <itemizedlist>
  35.772 +	<listitem><para id="x_24c">Require that every changeset pushed to the
  35.773 +	    server have a valid bug ID in its commit comment.  In this
  35.774 +	    case, you'd want to configure the hook as a <literal
  35.775 +	      role="hook">pretxncommit</literal> hook.  This would
  35.776 +	    allow the hook to reject changes that didn't contain bug
  35.777 +	    IDs.
  35.778 +	  </para>
  35.779 +	</listitem>
  35.780 +	<listitem><para id="x_24d">Allow incoming changesets to automatically
  35.781 +	    modify the <emphasis>state</emphasis> of a bug, as well as
  35.782 +	    simply adding a comment.  For example, the hook could
  35.783 +	    recognise the string <quote>fixed bug 31337</quote> as
  35.784 +	    indicating that it should update the state of bug 31337 to
  35.785 +	    <quote>requires testing</quote>.
  35.786 +	  </para>
  35.787 +	</listitem></itemizedlist>
  35.788 +
  35.789 +      <sect3 id="sec:hook:bugzilla:config">
  35.790 +	<title>Configuring the <literal role="hook">bugzilla</literal>
  35.791 +	  hook</title>
  35.792 +
  35.793 +	<para id="x_24e">You should configure this hook in your server's
  35.794 +	  <filename role="special">~/.hgrc</filename> as an <literal
  35.795 +	    role="hook">incoming</literal> hook, for example as
  35.796 +	  follows:
  35.797 +	</para>
  35.798 +	<programlisting>[hooks]
  35.799 +incoming.bugzilla = python:hgext.bugzilla.hook</programlisting>
  35.800 +
  35.801 +	<para id="x_24f">Because of the specialised nature of this hook, and
  35.802 +	  because Bugzilla was not written with this kind of
  35.803 +	  integration in mind, configuring this hook is a somewhat
  35.804 +	  involved process.
  35.805 +	</para>
  35.806 +
  35.807 +	<para id="x_250">Before you begin, you must install the MySQL bindings
  35.808 +	  for Python on the host(s) where you'll be running the hook.
  35.809 +	  If this is not available as a binary package for your
  35.810 +	  system, you can download it from
  35.811 +	  <citation>web:mysql-python</citation>.
  35.812 +	</para>
  35.813 +
  35.814 +	<para id="x_251">Configuration information for this hook lives in the
  35.815 +	  <literal role="rc-bugzilla">bugzilla</literal> section of
  35.816 +	  your <filename role="special">~/.hgrc</filename>.
  35.817 +	</para>
  35.818 +	<itemizedlist>
  35.819 +	  <listitem><para id="x_252"><envar
  35.820 +		role="rc-item-bugzilla">version</envar>: The version
  35.821 +	      of Bugzilla installed on the server.  The database
  35.822 +	      schema that Bugzilla uses changes occasionally, so this
  35.823 +	      hook has to know exactly which schema to use.</para>
  35.824 +	  </listitem>
  35.825 +	  <listitem><para id="x_253"><envar role="rc-item-bugzilla">host</envar>:
  35.826 +	      The hostname of the MySQL server that stores your
  35.827 +	      Bugzilla data.  The database must be configured to allow
  35.828 +	      connections from whatever host you are running the
  35.829 +	      <literal role="hook">bugzilla</literal> hook on.
  35.830 +	    </para>
  35.831 +	  </listitem>
  35.832 +	  <listitem><para id="x_254"><envar role="rc-item-bugzilla">user</envar>:
  35.833 +	      The username with which to connect to the MySQL server.
  35.834 +	      The database must be configured to allow this user to
  35.835 +	      connect from whatever host you are running the <literal
  35.836 +		role="hook">bugzilla</literal> hook on.  This user
  35.837 +	      must be able to access and modify Bugzilla tables.  The
  35.838 +	      default value of this item is <literal>bugs</literal>,
  35.839 +	      which is the standard name of the Bugzilla user in a
  35.840 +	      MySQL database.
  35.841 +	    </para>
  35.842 +	  </listitem>
  35.843 +	  <listitem><para id="x_255"><envar
  35.844 +		role="rc-item-bugzilla">password</envar>: The MySQL
  35.845 +	      password for the user you configured above.  This is
  35.846 +	      stored as plain text, so you should make sure that
  35.847 +	      unauthorised users cannot read the <filename
  35.848 +		role="special">~/.hgrc</filename> file where you
  35.849 +	      store this information.
  35.850 +	    </para>
  35.851 +	  </listitem>
  35.852 +	  <listitem><para id="x_256"><envar role="rc-item-bugzilla">db</envar>:
  35.853 +	      The name of the Bugzilla database on the MySQL server.
  35.854 +	      The default value of this item is
  35.855 +	      <literal>bugs</literal>, which is the standard name of
  35.856 +	      the MySQL database where Bugzilla stores its data.
  35.857 +	    </para>
  35.858 +	  </listitem>
  35.859 +	  <listitem><para id="x_257"><envar
  35.860 +		role="rc-item-bugzilla">notify</envar>: If you want
  35.861 +	      Bugzilla to send out a notification email to subscribers
  35.862 +	      after this hook has added a comment to a bug, you will
  35.863 +	      need this hook to run a command whenever it updates the
  35.864 +	      database.  The command to run depends on where you have
  35.865 +	      installed Bugzilla, but it will typically look something
  35.866 +	      like this, if you have Bugzilla installed in <filename
  35.867 +		class="directory">/var/www/html/bugzilla</filename>:
  35.868 +	    </para>
  35.869 +	    <programlisting>cd /var/www/html/bugzilla &amp;&amp;
  35.870 +	      ./processmail %s nobody@nowhere.com</programlisting>
  35.871 +	  </listitem>
  35.872 +	  <listitem><para id="x_258">  The Bugzilla
  35.873 +	      <literal>processmail</literal> program expects to be
  35.874 +	      given a bug ID (the hook replaces
  35.875 +	      <quote><literal>%s</literal></quote> with the bug ID)
  35.876 +	      and an email address.  It also expects to be able to
  35.877 +	      write to some files in the directory that it runs in.
  35.878 +	      If Bugzilla and this hook are not installed on the same
  35.879 +	      machine, you will need to find a way to run
  35.880 +	      <literal>processmail</literal> on the server where
  35.881 +	      Bugzilla is installed.
  35.882 +	    </para>
  35.883 +	  </listitem></itemizedlist>
  35.884 +
  35.885 +      </sect3>
  35.886 +      <sect3>
  35.887 +	<title>Mapping committer names to Bugzilla user names</title>
  35.888 +
  35.889 +	<para id="x_259">By default, the <literal
  35.890 +	    role="hg-ext">bugzilla</literal> hook tries to use the
  35.891 +	  email address of a changeset's committer as the Bugzilla
  35.892 +	  user name with which to update a bug.  If this does not suit
  35.893 +	  your needs, you can map committer email addresses to
  35.894 +	  Bugzilla user names using a <literal
  35.895 +	    role="rc-usermap">usermap</literal> section.
  35.896 +	</para>
  35.897 +
  35.898 +	<para id="x_25a">Each item in the <literal
  35.899 +	    role="rc-usermap">usermap</literal> section contains an
  35.900 +	  email address on the left, and a Bugzilla user name on the
  35.901 +	  right.
  35.902 +	</para>
  35.903 +	<programlisting>[usermap]
  35.904 +jane.user@example.com = jane</programlisting>
  35.905 +	<para id="x_25b">You can either keep the <literal
  35.906 +	    role="rc-usermap">usermap</literal> data in a normal
  35.907 +	  <filename role="special">~/.hgrc</filename>, or tell the
  35.908 +	  <literal role="hg-ext">bugzilla</literal> hook to read the
  35.909 +	  information from an external <filename>usermap</filename>
  35.910 +	  file.  In the latter case, you can store
  35.911 +	  <filename>usermap</filename> data by itself in (for example)
  35.912 +	  a user-modifiable repository.  This makes it possible to let
  35.913 +	  your users maintain their own <envar
  35.914 +	    role="rc-item-bugzilla">usermap</envar> entries.  The main
  35.915 +	  <filename role="special">~/.hgrc</filename> file might look
  35.916 +	  like this:
  35.917 +	</para>
  35.918 +	<programlisting># regular hgrc file refers to external usermap file
  35.919 +[bugzilla]
  35.920 +usermap = /home/hg/repos/userdata/bugzilla-usermap.conf</programlisting>
  35.921 +	<para id="x_25c">While the <filename>usermap</filename> file that it
  35.922 +	  refers to might look like this:
  35.923 +	</para>
  35.924 +	<programlisting># bugzilla-usermap.conf - inside a hg repository
  35.925 +[usermap] stephanie@example.com = steph</programlisting>
  35.926 +
  35.927 +      </sect3>
  35.928 +      <sect3>
  35.929 +	<title>Configuring the text that gets added to a bug</title>
  35.930 +
  35.931 +	<para id="x_25d">You can configure the text that this hook adds as a
  35.932 +	  comment; you specify it in the form of a Mercurial template.
  35.933 +	  Several <filename role="special">~/.hgrc</filename> entries
  35.934 +	  (still in the <literal role="rc-bugzilla">bugzilla</literal>
  35.935 +	  section) control this behavior.
  35.936 +	</para>
  35.937 +	<itemizedlist>
  35.938 +	  <listitem><para id="x_25e"><literal>strip</literal>: The number of
  35.939 +	      leading path elements to strip from a repository's path
  35.940 +	      name to construct a partial path for a URL. For example,
  35.941 +	      if the repositories on your server live under <filename
  35.942 +		class="directory">/home/hg/repos</filename>, and you
  35.943 +	      have a repository whose path is <filename
  35.944 +		class="directory">/home/hg/repos/app/tests</filename>,
  35.945 +	      then setting <literal>strip</literal> to
  35.946 +	      <literal>4</literal> will give a partial path of
  35.947 +	      <filename class="directory">app/tests</filename>.  The
  35.948 +	      hook will make this partial path available when
  35.949 +	      expanding a template, as <literal>webroot</literal>.
  35.950 +	    </para>
  35.951 +	  </listitem>
  35.952 +	  <listitem><para id="x_25f"><literal>template</literal>: The text of the
  35.953 +	      template to use.  In addition to the usual
  35.954 +	      changeset-related variables, this template can use
  35.955 +	      <literal>hgweb</literal> (the value of the
  35.956 +	      <literal>hgweb</literal> configuration item above) and
  35.957 +	      <literal>webroot</literal> (the path constructed using
  35.958 +	      <literal>strip</literal> above).
  35.959 +	    </para>
  35.960 +	  </listitem></itemizedlist>
  35.961 +
  35.962 +	<para id="x_260">In addition, you can add a <envar
  35.963 +	    role="rc-item-web">baseurl</envar> item to the <literal
  35.964 +	    role="rc-web">web</literal> section of your <filename
  35.965 +	    role="special">~/.hgrc</filename>.  The <literal
  35.966 +	    role="hg-ext">bugzilla</literal> hook will make this
  35.967 +	  available when expanding a template, as the base string to
  35.968 +	  use when constructing a URL that will let users browse from
  35.969 +	  a Bugzilla comment to view a changeset.  Example:
  35.970 +	</para>
  35.971 +	<programlisting>[web]
  35.972 +baseurl = http://hg.domain.com/</programlisting>
  35.973 +
  35.974 +	<para id="x_261">Here is an example set of <literal
  35.975 +	    role="hg-ext">bugzilla</literal> hook config information.
  35.976 +	</para>
  35.977 +
  35.978 +	&ch10-bugzilla-config.lst;
  35.979 +
  35.980 +      </sect3>
  35.981 +      <sect3>
  35.982 +	<title>Testing and troubleshooting</title>
  35.983 +
  35.984 +	<para id="x_262">The most common problems with configuring the <literal
  35.985 +	    role="hg-ext">bugzilla</literal> hook relate to running
  35.986 +	  Bugzilla's <filename>processmail</filename> script and
  35.987 +	  mapping committer names to user names.
  35.988 +	</para>
  35.989 +
  35.990 +	<para id="x_263">Recall from <xref
  35.991 +	    linkend="sec:hook:bugzilla:config"/> above that the user
  35.992 +	  that runs the Mercurial process on the server is also the
  35.993 +	  one that will run the <filename>processmail</filename>
  35.994 +	  script.  The <filename>processmail</filename> script
  35.995 +	  sometimes causes Bugzilla to write to files in its
  35.996 +	  configuration directory, and Bugzilla's configuration files
  35.997 +	  are usually owned by the user that your web server runs
  35.998 +	  under.
  35.999 +	</para>
 35.1000 +
 35.1001 +	<para id="x_264">You can cause <filename>processmail</filename> to be run
 35.1002 +	  with the suitable user's identity using the
 35.1003 +	  <command>sudo</command> command.  Here is an example entry
 35.1004 +	  for a <filename>sudoers</filename> file.
 35.1005 +	</para>
 35.1006 +	<programlisting>hg_user = (httpd_user)
 35.1007 +NOPASSWD: /var/www/html/bugzilla/processmail-wrapper %s</programlisting>
 35.1008 +	<para id="x_265">This allows the <literal>hg_user</literal> user to run a
 35.1009 +	  <filename>processmail-wrapper</filename> program under the
 35.1010 +	  identity of <literal>httpd_user</literal>.
 35.1011 +	</para>
 35.1012 +
 35.1013 +	<para id="x_266">This indirection through a wrapper script is necessary,
 35.1014 +	  because <filename>processmail</filename> expects to be run
 35.1015 +	  with its current directory set to wherever you installed
 35.1016 +	  Bugzilla; you can't specify that kind of constraint in a
 35.1017 +	  <filename>sudoers</filename> file.  The contents of the
 35.1018 +	  wrapper script are simple:
 35.1019 +	</para>
 35.1020 +	<programlisting>#!/bin/sh
 35.1021 +cd `dirname $0` &amp;&amp; ./processmail "$1" nobody@example.com</programlisting>
 35.1022 +	<para id="x_267">It doesn't seem to matter what email address you pass to
 35.1023 +	  <filename>processmail</filename>.
 35.1024 +	</para>
 35.1025 +
 35.1026 +	<para id="x_268">If your <literal role="rc-usermap">usermap</literal> is
 35.1027 +	  not set up correctly, users will see an error message from
 35.1028 +	  the <literal role="hg-ext">bugzilla</literal> hook when they
 35.1029 +	  push changes to the server.  The error message will look
 35.1030 +	  like this:
 35.1031 +	</para>
 35.1032 +	<programlisting>cannot find bugzilla user id for john.q.public@example.com</programlisting>
 35.1033 +	<para id="x_269">What this means is that the committer's address,
 35.1034 +	  <literal>john.q.public@example.com</literal>, is not a valid
 35.1035 +	  Bugzilla user name, nor does it have an entry in your
 35.1036 +	  <literal role="rc-usermap">usermap</literal> that maps it to
 35.1037 +	  a valid Bugzilla user name.
 35.1038 +	</para>
 35.1039 +
 35.1040 +      </sect3>    </sect2>
 35.1041 +
 35.1042 +    <sect2>
 35.1043 +      <title><literal role="hg-ext">notify</literal>&emdash;send email
 35.1044 +	notifications</title>
 35.1045 +
 35.1046 +      <para id="x_26a">Although Mercurial's built-in web server provides RSS
 35.1047 +	feeds of changes in every repository, many people prefer to
 35.1048 +	receive change notifications via email.  The <literal
 35.1049 +	  role="hg-ext">notify</literal> hook lets you send out
 35.1050 +	notifications to a set of email addresses whenever changesets
 35.1051 +	arrive that those subscribers are interested in.
 35.1052 +      </para>
 35.1053 +
 35.1054 +      <para id="x_26b">As with the <literal role="hg-ext">bugzilla</literal>
 35.1055 +	hook, the <literal role="hg-ext">notify</literal> hook is
 35.1056 +	template-driven, so you can customise the contents of the
 35.1057 +	notification messages that it sends.
 35.1058 +      </para>
 35.1059 +
 35.1060 +      <para id="x_26c">By default, the <literal role="hg-ext">notify</literal>
 35.1061 +	hook includes a diff of every changeset that it sends out; you
 35.1062 +	can limit the size of the diff, or turn this feature off
 35.1063 +	entirely.  It is useful for letting subscribers review changes
 35.1064 +	immediately, rather than clicking to follow a URL.
 35.1065 +      </para>
 35.1066 +
 35.1067 +      <sect3>
 35.1068 +	<title>Configuring the <literal role="hg-ext">notify</literal>
 35.1069 +	  hook</title>
 35.1070 +
 35.1071 +	<para id="x_26d">You can set up the <literal
 35.1072 +	    role="hg-ext">notify</literal> hook to send one email
 35.1073 +	  message per incoming changeset, or one per incoming group of
 35.1074 +	  changesets (all those that arrived in a single pull or
 35.1075 +	  push).
 35.1076 +	</para>
 35.1077 +	<programlisting>[hooks]
 35.1078 +# send one email per group of changes
 35.1079 +changegroup.notify = python:hgext.notify.hook
 35.1080 +# send one email per change
 35.1081 +incoming.notify = python:hgext.notify.hook</programlisting>
 35.1082 +
 35.1083 +	<para id="x_26e">Configuration information for this hook lives in the
 35.1084 +	  <literal role="rc-notify">notify</literal> section of a
 35.1085 +	  <filename role="special">~/.hgrc</filename> file.
 35.1086 +	</para>
 35.1087 +	<itemizedlist>
 35.1088 +	  <listitem><para id="x_26f"><envar role="rc-item-notify">test</envar>:
 35.1089 +	      By default, this hook does not send out email at all;
 35.1090 +	      instead, it prints the message that it
 35.1091 +	      <emphasis>would</emphasis> send.  Set this item to
 35.1092 +	      <literal>false</literal> to allow email to be sent. The
 35.1093 +	      reason that sending of email is turned off by default is
 35.1094 +	      that it takes several tries to configure this extension
 35.1095 +	      exactly as you would like, and it would be bad form to
 35.1096 +	      spam subscribers with a number of <quote>broken</quote>
 35.1097 +	      notifications while you debug your configuration.
 35.1098 +	    </para>
 35.1099 +	  </listitem>
 35.1100 +	  <listitem><para id="x_270"><envar role="rc-item-notify">config</envar>:
 35.1101 +	      The path to a configuration file that contains
 35.1102 +	      subscription information.  This is kept separate from
 35.1103 +	      the main <filename role="special">~/.hgrc</filename> so
 35.1104 +	      that you can maintain it in a repository of its own.
 35.1105 +	      People can then clone that repository, update their
 35.1106 +	      subscriptions, and push the changes back to your server.
 35.1107 +	    </para>
 35.1108 +	  </listitem>
 35.1109 +	  <listitem><para id="x_271"><envar role="rc-item-notify">strip</envar>:
 35.1110 +	      The number of leading path separator characters to strip
 35.1111 +	      from a repository's path, when deciding whether a
 35.1112 +	      repository has subscribers.  For example, if the
 35.1113 +	      repositories on your server live in <filename
 35.1114 +		class="directory">/home/hg/repos</filename>, and
 35.1115 +	      <literal role="hg-ext">notify</literal> is considering a
 35.1116 +	      repository named <filename
 35.1117 +		class="directory">/home/hg/repos/shared/test</filename>, 
 35.1118 +	      setting <envar role="rc-item-notify">strip</envar> to
 35.1119 +	      <literal>4</literal> will cause <literal
 35.1120 +		role="hg-ext">notify</literal> to trim the path it
 35.1121 +	      considers down to <filename
 35.1122 +		class="directory">shared/test</filename>, and it will
 35.1123 +	      match subscribers against that.
 35.1124 +	    </para>
 35.1125 +	  </listitem>
 35.1126 +	  <listitem><para id="x_272"><envar
 35.1127 +		role="rc-item-notify">template</envar>: The template
 35.1128 +	      text to use when sending messages.  This specifies both
 35.1129 +	      the contents of the message header and its body.
 35.1130 +	    </para>
 35.1131 +	  </listitem>
 35.1132 +	  <listitem><para id="x_273"><envar
 35.1133 +		role="rc-item-notify">maxdiff</envar>: The maximum
 35.1134 +	      number of lines of diff data to append to the end of a
 35.1135 +	      message.  If a diff is longer than this, it is
 35.1136 +	      truncated.  By default, this is set to 300.  Set this to
 35.1137 +	      <literal>0</literal> to omit diffs from notification
 35.1138 +	      emails.
 35.1139 +	    </para>
 35.1140 +	  </listitem>
 35.1141 +	  <listitem><para id="x_274"><envar
 35.1142 +		role="rc-item-notify">sources</envar>: A list of
 35.1143 +	      sources of changesets to consider.  This lets you limit
 35.1144 +	      <literal role="hg-ext">notify</literal> to only sending
 35.1145 +	      out email about changes that remote users pushed into
 35.1146 +	      this repository via a server, for example.  See 
 35.1147 +	      <xref linkend="sec:hook:sources"/> for the sources you
 35.1148 +	      can specify here.
 35.1149 +	    </para>
 35.1150 +	  </listitem></itemizedlist>
 35.1151 +
 35.1152 +	<para id="x_275">If you set the <envar role="rc-item-web">baseurl</envar>
 35.1153 +	  item in the <literal role="rc-web">web</literal> section,
 35.1154 +	  you can use it in a template; it will be available as
 35.1155 +	  <literal>webroot</literal>.
 35.1156 +	</para>
 35.1157 +
 35.1158 +	<para id="x_276">Here is an example set of <literal
 35.1159 +	    role="hg-ext">notify</literal> configuration information.
 35.1160 +	</para>
 35.1161 +
 35.1162 +	&ch10-notify-config.lst;
 35.1163 +
 35.1164 +	<para id="x_277">This will produce a message that looks like the
 35.1165 +	  following:
 35.1166 +	</para>
 35.1167 +
 35.1168 +	&ch10-notify-config-mail.lst;
 35.1169 +
 35.1170 +      </sect3>
 35.1171 +      <sect3>
 35.1172 +	<title>Testing and troubleshooting</title>
 35.1173 +
 35.1174 +	<para id="x_278">Do not forget that by default, the <literal
 35.1175 +		role="hg-ext">notify</literal> extension <emphasis>will not
 35.1176 +	  send any mail</emphasis> until you explicitly configure it to do so,
 35.1177 +	  by setting <envar role="rc-item-notify">test</envar> to
 35.1178 +	  <literal>false</literal>.  Until you do that, it simply
 35.1179 +	  prints the message it <emphasis>would</emphasis> send.
 35.1180 +	</para>
 35.1181 +
 35.1182 +      </sect3>
 35.1183 +    </sect2>
 35.1184 +  </sect1>
 35.1185 +  <sect1 id="sec:hook:ref">
 35.1186 +    <title>Information for writers of hooks</title>
 35.1187 +
 35.1188 +    <sect2>
 35.1189 +      <title>In-process hook execution</title>
 35.1190 +
 35.1191 +      <para id="x_279">An in-process hook is called with arguments of the
 35.1192 +	following form:
 35.1193 +      </para>
 35.1194 +      <programlisting>def myhook(ui, repo, **kwargs): pass</programlisting>
 35.1195 +      <para id="x_27a">The <literal>ui</literal> parameter is a <literal
 35.1196 +	  role="py-mod-mercurial.ui">ui</literal> object. The
 35.1197 +	<literal>repo</literal> parameter is a <literal
 35.1198 +	  role="py-mod-mercurial.localrepo">localrepository</literal>
 35.1199 +	object.  The names and values of the
 35.1200 +	<literal>**kwargs</literal> parameters depend on the hook
 35.1201 +	being invoked, with the following common features:
 35.1202 +      </para>
 35.1203 +      <itemizedlist>
 35.1204 +	<listitem><para id="x_27b">If a parameter is named
 35.1205 +	    <literal>node</literal> or <literal>parentN</literal>, it
 35.1206 +	    will contain a hexadecimal changeset ID. The empty string
 35.1207 +	    is used to represent <quote>null changeset ID</quote>
 35.1208 +	    instead of a string of zeroes.
 35.1209 +	  </para>
 35.1210 +	</listitem>
 35.1211 +	<listitem><para id="x_27c">If a parameter is named
 35.1212 +	    <literal>url</literal>, it will contain the URL of a
 35.1213 +	    remote repository, if that can be determined.
 35.1214 +	  </para>
 35.1215 +	</listitem>
 35.1216 +	<listitem><para id="x_27d">Boolean-valued parameters are represented as
 35.1217 +	    Python <literal>bool</literal> objects.
 35.1218 +	  </para>
 35.1219 +	</listitem></itemizedlist>
 35.1220 +
 35.1221 +      <para id="x_27e">An in-process hook is called without a change to the
 35.1222 +	process's working directory (unlike external hooks, which are
 35.1223 +	run in the root of the repository).  It must not change the
 35.1224 +	process's working directory, or it will cause any calls it
 35.1225 +	makes into the Mercurial API to fail.
 35.1226 +      </para>
 35.1227 +
 35.1228 +      <para id="x_27f">If a hook returns a boolean <quote>false</quote> value, it
 35.1229 +	is considered to have succeeded.  If it returns a boolean
 35.1230 +	<quote>true</quote> value or raises an exception, it is
 35.1231 +	considered to have failed.  A useful way to think of the
 35.1232 +	calling convention is <quote>tell me if you fail</quote>.
 35.1233 +      </para>
 35.1234 +
 35.1235 +      <para id="x_280">Note that changeset IDs are passed into Python hooks as
 35.1236 +	hexadecimal strings, not the binary hashes that Mercurial's
 35.1237 +	APIs normally use.  To convert a hash from hex to binary, use
 35.1238 +	the <literal>bin</literal> function.
 35.1239 +      </para>
 35.1240 +    </sect2>
 35.1241 +
 35.1242 +    <sect2>
 35.1243 +      <title>External hook execution</title>
 35.1244 +
 35.1245 +      <para id="x_281">An external hook is passed to the shell of the user
 35.1246 +	running Mercurial. Features of that shell, such as variable
 35.1247 +	substitution and command redirection, are available.  The hook
 35.1248 +	is run in the root directory of the repository (unlike
 35.1249 +	in-process hooks, which are run in the same directory that
 35.1250 +	Mercurial was run in).
 35.1251 +      </para>
 35.1252 +
 35.1253 +      <para id="x_282">Hook parameters are passed to the hook as environment
 35.1254 +	variables.  Each environment variable's name is converted in
 35.1255 +	upper case and prefixed with the string
 35.1256 +	<quote><literal>HG_</literal></quote>.  For example, if the
 35.1257 +	name of a parameter is <quote><literal>node</literal></quote>,
 35.1258 +	the name of the environment variable representing that
 35.1259 +	parameter will be <quote><literal>HG_NODE</literal></quote>.
 35.1260 +      </para>
 35.1261 +
 35.1262 +      <para id="x_283">A boolean parameter is represented as the string
 35.1263 +	<quote><literal>1</literal></quote> for <quote>true</quote>,
 35.1264 +	<quote><literal>0</literal></quote> for <quote>false</quote>.
 35.1265 +	If an environment variable is named <envar>HG_NODE</envar>,
 35.1266 +	<envar>HG_PARENT1</envar> or <envar>HG_PARENT2</envar>, it
 35.1267 +	contains a changeset ID represented as a hexadecimal string.
 35.1268 +	The empty string is used to represent <quote>null changeset
 35.1269 +	  ID</quote> instead of a string of zeroes.  If an environment
 35.1270 +	variable is named <envar>HG_URL</envar>, it will contain the
 35.1271 +	URL of a remote repository, if that can be determined.
 35.1272 +      </para>
 35.1273 +
 35.1274 +      <para id="x_284">If a hook exits with a status of zero, it is considered to
 35.1275 +	have succeeded.  If it exits with a non-zero status, it is
 35.1276 +	considered to have failed.
 35.1277 +      </para>
 35.1278 +    </sect2>
 35.1279 +
 35.1280 +    <sect2>
 35.1281 +      <title>Finding out where changesets come from</title>
 35.1282 +
 35.1283 +      <para id="x_285">A hook that involves the transfer of changesets between a
 35.1284 +	local repository and another may be able to find out
 35.1285 +	information about the <quote>far side</quote>.  Mercurial
 35.1286 +	knows <emphasis>how</emphasis> changes are being transferred,
 35.1287 +	and in many cases <emphasis>where</emphasis> they are being
 35.1288 +	transferred to or from.
 35.1289 +      </para>
 35.1290 +
 35.1291 +      <sect3 id="sec:hook:sources">
 35.1292 +	<title>Sources of changesets</title>
 35.1293 +
 35.1294 +	<para id="x_286">Mercurial will tell a hook what means are, or were, used
 35.1295 +	  to transfer changesets between repositories.  This is
 35.1296 +	  provided by Mercurial in a Python parameter named
 35.1297 +	  <literal>source</literal>, or an environment variable named
 35.1298 +	  <envar>HG_SOURCE</envar>.
 35.1299 +	</para>
 35.1300 +
 35.1301 +	<itemizedlist>
 35.1302 +	  <listitem><para id="x_287"><literal>serve</literal>: Changesets are
 35.1303 +	      transferred to or from a remote repository over http or
 35.1304 +	      ssh.
 35.1305 +	    </para>
 35.1306 +	  </listitem>
 35.1307 +	  <listitem><para id="x_288"><literal>pull</literal>: Changesets are
 35.1308 +	      being transferred via a pull from one repository into
 35.1309 +	      another.
 35.1310 +	    </para>
 35.1311 +	  </listitem>
 35.1312 +	  <listitem><para id="x_289"><literal>push</literal>: Changesets are
 35.1313 +	      being transferred via a push from one repository into
 35.1314 +	      another.
 35.1315 +	    </para>
 35.1316 +	  </listitem>
 35.1317 +	  <listitem><para id="x_28a"><literal>bundle</literal>: Changesets are
 35.1318 +	      being transferred to or from a bundle.
 35.1319 +	    </para>
 35.1320 +	  </listitem></itemizedlist>
 35.1321 +      </sect3>
 35.1322 +
 35.1323 +      <sect3 id="sec:hook:url">
 35.1324 +	<title>Where changes are going&emdash;remote repository
 35.1325 +	  URLs</title>
 35.1326 +
 35.1327 +	<para id="x_28b">When possible, Mercurial will tell a hook the location
 35.1328 +	  of the <quote>far side</quote> of an activity that transfers
 35.1329 +	  changeset data between repositories.  This is provided by
 35.1330 +	  Mercurial in a Python parameter named
 35.1331 +	  <literal>url</literal>, or an environment variable named
 35.1332 +	  <envar>HG_URL</envar>.
 35.1333 +	</para>
 35.1334 +
 35.1335 +	<para id="x_28c">This information is not always known.  If a hook is
 35.1336 +	  invoked in a repository that is being served via http or
 35.1337 +	  ssh, Mercurial cannot tell where the remote repository is,
 35.1338 +	  but it may know where the client is connecting from.  In
 35.1339 +	  such cases, the URL will take one of the following forms:
 35.1340 +	</para>
 35.1341 +	<itemizedlist>
 35.1342 +	  <listitem><para id="x_28d"><literal>remote:ssh:1.2.3.4</literal>&emdash;remote 
 35.1343 +	      ssh client, at the IP address
 35.1344 +	      <literal>1.2.3.4</literal>.
 35.1345 +	    </para>
 35.1346 +	  </listitem>
 35.1347 +	  <listitem><para id="x_28e"><literal>remote:http:1.2.3.4</literal>&emdash;remote 
 35.1348 +	      http client, at the IP address
 35.1349 +	      <literal>1.2.3.4</literal>.  If the client is using SSL,
 35.1350 +	      this will be of the form
 35.1351 +	      <literal>remote:https:1.2.3.4</literal>.
 35.1352 +	    </para>
 35.1353 +	  </listitem>
 35.1354 +	  <listitem><para id="x_28f">Empty&emdash;no information could be
 35.1355 +	      discovered about the remote client.
 35.1356 +	    </para>
 35.1357 +	  </listitem></itemizedlist>
 35.1358 +      </sect3>
 35.1359 +    </sect2>
 35.1360 +  </sect1>
 35.1361 +  <sect1>
 35.1362 +    <title>Hook reference</title>
 35.1363 +
 35.1364 +    <sect2 id="sec:hook:changegroup">
 35.1365 +      <title><literal role="hook">changegroup</literal>&emdash;after
 35.1366 +	remote changesets added</title>
 35.1367 +
 35.1368 +      <para id="x_290">This hook is run after a group of pre-existing changesets
 35.1369 +	has been added to the repository, for example via a <command
 35.1370 +	  role="hg-cmd">hg pull</command> or <command role="hg-cmd">hg
 35.1371 +	  unbundle</command>.  This hook is run once per operation
 35.1372 +	that added one or more changesets.  This is in contrast to the
 35.1373 +	<literal role="hook">incoming</literal> hook, which is run
 35.1374 +	once per changeset, regardless of whether the changesets
 35.1375 +	arrive in a group.
 35.1376 +      </para>
 35.1377 +
 35.1378 +      <para id="x_291">Some possible uses for this hook include kicking off an
 35.1379 +	automated build or test of the added changesets, updating a
 35.1380 +	bug database, or notifying subscribers that a repository
 35.1381 +	contains new changes.
 35.1382 +      </para>
 35.1383 +
 35.1384 +      <para id="x_292">Parameters to this hook:
 35.1385 +      </para>
 35.1386 +      <itemizedlist>
 35.1387 +	<listitem><para id="x_293"><literal>node</literal>: A changeset ID.  The
 35.1388 +	    changeset ID of the first changeset in the group that was
 35.1389 +	    added.  All changesets between this and
 35.1390 +	    <literal role="tag">tip</literal>, inclusive, were added by a single
 35.1391 +	    <command role="hg-cmd">hg pull</command>, <command
 35.1392 +	      role="hg-cmd">hg push</command> or <command
 35.1393 +	      role="hg-cmd">hg unbundle</command>.
 35.1394 +	  </para>
 35.1395 +	</listitem>
 35.1396 +	<listitem><para id="x_294"><literal>source</literal>: A
 35.1397 +	    string.  The source of these changes.  See <xref
 35.1398 +	      linkend="sec:hook:sources"/> for details.
 35.1399 +	  </para>
 35.1400 +	</listitem>
 35.1401 +	<listitem><para id="x_295"><literal>url</literal>: A URL.  The
 35.1402 +	    location of the remote repository, if known.  See <xref
 35.1403 +	      linkend="sec:hook:url"/> for more information.
 35.1404 +	  </para>
 35.1405 +	</listitem></itemizedlist>
 35.1406 +
 35.1407 +      <para id="x_296">See also: <literal
 35.1408 +	  role="hook">incoming</literal> (<xref
 35.1409 +	  linkend="sec:hook:incoming"/>), <literal
 35.1410 +	  role="hook">prechangegroup</literal> (<xref
 35.1411 +	  linkend="sec:hook:prechangegroup"/>), <literal
 35.1412 +	  role="hook">pretxnchangegroup</literal> (<xref
 35.1413 +	  linkend="sec:hook:pretxnchangegroup"/>)
 35.1414 +      </para>
 35.1415 +    </sect2>
 35.1416 +
 35.1417 +    <sect2 id="sec:hook:commit">
 35.1418 +      <title><literal role="hook">commit</literal>&emdash;after a new
 35.1419 +	changeset is created</title>
 35.1420 +
 35.1421 +      <para id="x_297">This hook is run after a new changeset has been created.
 35.1422 +      </para>
 35.1423 +
 35.1424 +      <para id="x_298">Parameters to this hook:
 35.1425 +      </para>
 35.1426 +      <itemizedlist>
 35.1427 +	<listitem><para id="x_299"><literal>node</literal>: A changeset ID.  The
 35.1428 +	    changeset ID of the newly committed changeset.
 35.1429 +	  </para>
 35.1430 +	</listitem>
 35.1431 +	<listitem><para id="x_29a"><literal>parent1</literal>: A changeset ID.
 35.1432 +	    The changeset ID of the first parent of the newly
 35.1433 +	    committed changeset.
 35.1434 +	  </para>
 35.1435 +	</listitem>
 35.1436 +	<listitem><para id="x_29b"><literal>parent2</literal>: A changeset ID.
 35.1437 +	    The changeset ID of the second parent of the newly
 35.1438 +	    committed changeset.
 35.1439 +	  </para>
 35.1440 +	</listitem></itemizedlist>
 35.1441 +
 35.1442 +      <para id="x_29c">See also: <literal
 35.1443 +	  role="hook">precommit</literal> (<xref
 35.1444 +	  linkend="sec:hook:precommit"/>), <literal
 35.1445 +	  role="hook">pretxncommit</literal> (<xref
 35.1446 +	  linkend="sec:hook:pretxncommit"/>)
 35.1447 +      </para>
 35.1448 +    </sect2>
 35.1449 +
 35.1450 +    <sect2 id="sec:hook:incoming">
 35.1451 +      <title><literal role="hook">incoming</literal>&emdash;after one
 35.1452 +	remote changeset is added</title>
 35.1453 +
 35.1454 +      <para id="x_29d">This hook is run after a pre-existing changeset has been
 35.1455 +	added to the repository, for example via a <command
 35.1456 +	  role="hg-cmd">hg push</command>.  If a group of changesets
 35.1457 +	was added in a single operation, this hook is called once for
 35.1458 +	each added changeset.
 35.1459 +      </para>
 35.1460 +
 35.1461 +      <para id="x_29e">You can use this hook for the same purposes as
 35.1462 +	the <literal role="hook">changegroup</literal> hook (<xref
 35.1463 +	  linkend="sec:hook:changegroup"/>); it's simply more
 35.1464 +	convenient sometimes to run a hook once per group of
 35.1465 +	changesets, while other times it's handier once per changeset.
 35.1466 +      </para>
 35.1467 +
 35.1468 +      <para id="x_29f">Parameters to this hook:
 35.1469 +      </para>
 35.1470 +      <itemizedlist>
 35.1471 +	<listitem><para id="x_2a0"><literal>node</literal>: A changeset ID.  The
 35.1472 +	    ID of the newly added changeset.
 35.1473 +	  </para>
 35.1474 +	</listitem>
 35.1475 +	<listitem><para id="x_2a1"><literal>source</literal>: A
 35.1476 +	    string.  The source of these changes.  See <xref
 35.1477 +	      linkend="sec:hook:sources"/> for details.
 35.1478 +	  </para>
 35.1479 +	</listitem>
 35.1480 +	<listitem><para id="x_2a2"><literal>url</literal>: A URL.  The
 35.1481 +	    location of the remote repository, if known.  See <xref
 35.1482 +	      linkend="sec:hook:url"/> for more information.
 35.1483 +	  </para>
 35.1484 +	</listitem></itemizedlist>
 35.1485 +
 35.1486 +      <para id="x_2a3">See also: <literal
 35.1487 +	  role="hook">changegroup</literal> (<xref
 35.1488 +	  linkend="sec:hook:changegroup"/>) <literal
 35.1489 +	  role="hook">prechangegroup</literal> (<xref
 35.1490 +	  linkend="sec:hook:prechangegroup"/>), <literal
 35.1491 +	  role="hook">pretxnchangegroup</literal> (<xref
 35.1492 +	  linkend="sec:hook:pretxnchangegroup"/>)
 35.1493 +      </para>
 35.1494 +    </sect2>
 35.1495 +
 35.1496 +    <sect2 id="sec:hook:outgoing">
 35.1497 +      <title><literal role="hook">outgoing</literal>&emdash;after
 35.1498 +	changesets are propagated</title>
 35.1499 +
 35.1500 +      <para id="x_2a4">This hook is run after a group of changesets has been
 35.1501 +	propagated out of this repository, for example by a <command
 35.1502 +	  role="hg-cmd">hg push</command> or <command role="hg-cmd">hg
 35.1503 +	  bundle</command> command.
 35.1504 +      </para>
 35.1505 +
 35.1506 +      <para id="x_2a5">One possible use for this hook is to notify administrators
 35.1507 +	that changes have been pulled.
 35.1508 +      </para>
 35.1509 +
 35.1510 +      <para id="x_2a6">Parameters to this hook:
 35.1511 +      </para>
 35.1512 +      <itemizedlist>
 35.1513 +	<listitem><para id="x_2a7"><literal>node</literal>: A changeset ID.  The
 35.1514 +	    changeset ID of the first changeset of the group that was
 35.1515 +	    sent.
 35.1516 +	  </para>
 35.1517 +	</listitem>
 35.1518 +	<listitem><para id="x_2a8"><literal>source</literal>: A string.  The
 35.1519 +	    source of the of the operation (see <xref
 35.1520 +	      linkend="sec:hook:sources"/>).  If a remote
 35.1521 +	    client pulled changes from this repository,
 35.1522 +	    <literal>source</literal> will be
 35.1523 +	    <literal>serve</literal>.  If the client that obtained
 35.1524 +	    changes from this repository was local,
 35.1525 +	    <literal>source</literal> will be
 35.1526 +	    <literal>bundle</literal>, <literal>pull</literal>, or
 35.1527 +	    <literal>push</literal>, depending on the operation the
 35.1528 +	    client performed.
 35.1529 +	  </para>
 35.1530 +	</listitem>
 35.1531 +	<listitem><para id="x_2a9"><literal>url</literal>: A URL.  The
 35.1532 +	    location of the remote repository, if known.  See <xref
 35.1533 +	      linkend="sec:hook:url"/> for more information.
 35.1534 +	  </para>
 35.1535 +	</listitem></itemizedlist>
 35.1536 +
 35.1537 +      <para id="x_2aa">See also: <literal
 35.1538 +	  role="hook">preoutgoing</literal> (<xref
 35.1539 +	  linkend="sec:hook:preoutgoing"/>)
 35.1540 +      </para>
 35.1541 +    </sect2>
 35.1542 +
 35.1543 +    <sect2 id="sec:hook:prechangegroup">
 35.1544 +      <title><literal
 35.1545 +	  role="hook">prechangegroup</literal>&emdash;before starting
 35.1546 +	to add remote changesets</title>
 35.1547 +
 35.1548 +      <para id="x_2ab">This controlling hook is run before Mercurial begins to
 35.1549 +	add a group of changesets from another repository.
 35.1550 +      </para>
 35.1551 +
 35.1552 +      <para id="x_2ac">This hook does not have any information about the
 35.1553 +	changesets to be added, because it is run before transmission
 35.1554 +	of those changesets is allowed to begin.  If this hook fails,
 35.1555 +	the changesets will not be transmitted.
 35.1556 +      </para>
 35.1557 +
 35.1558 +      <para id="x_2ad">One use for this hook is to prevent external changes from
 35.1559 +	being added to a repository.  For example, you could use this
 35.1560 +	to <quote>freeze</quote> a server-hosted branch temporarily or
 35.1561 +	permanently so that users cannot push to it, while still
 35.1562 +	allowing a local administrator to modify the repository.
 35.1563 +      </para>
 35.1564 +
 35.1565 +      <para id="x_2ae">Parameters to this hook:
 35.1566 +      </para>
 35.1567 +      <itemizedlist>
 35.1568 +	<listitem><para id="x_2af"><literal>source</literal>: A string.  The
 35.1569 +	    source of these changes.  See <xref
 35.1570 +	      linkend="sec:hook:sources"/> for details.
 35.1571 +	  </para>
 35.1572 +	</listitem>
 35.1573 +	<listitem><para id="x_2b0"><literal>url</literal>: A URL.  The
 35.1574 +	    location of the remote repository, if known.  See <xref
 35.1575 +	      linkend="sec:hook:url"/> for more information.
 35.1576 +	  </para>
 35.1577 +	</listitem></itemizedlist>
 35.1578 +
 35.1579 +      <para id="x_2b1">See also: <literal
 35.1580 +	  role="hook">changegroup</literal> (<xref
 35.1581 +	  linkend="sec:hook:changegroup"/>), <literal
 35.1582 +	  role="hook">incoming</literal> (<xref
 35.1583 +	  linkend="sec:hook:incoming"/>), <literal
 35.1584 +	  role="hook">pretxnchangegroup</literal> (<xref
 35.1585 +	  linkend="sec:hook:pretxnchangegroup"/>)
 35.1586 +      </para>
 35.1587 +    </sect2>
 35.1588 +
 35.1589 +    <sect2 id="sec:hook:precommit">
 35.1590 +      <title><literal role="hook">precommit</literal>&emdash;before
 35.1591 +	starting to commit a changeset</title>
 35.1592 +
 35.1593 +      <para id="x_2b2">This hook is run before Mercurial begins to commit a new
 35.1594 +	changeset. It is run before Mercurial has any of the metadata
 35.1595 +	for the commit, such as the files to be committed, the commit
 35.1596 +	message, or the commit date.
 35.1597 +      </para>
 35.1598 +
 35.1599 +      <para id="x_2b3">One use for this hook is to disable the ability to commit
 35.1600 +	new changesets, while still allowing incoming changesets.
 35.1601 +	Another is to run a build or test, and only allow the commit
 35.1602 +	to begin if the build or test succeeds.
 35.1603 +      </para>
 35.1604 +
 35.1605 +      <para id="x_2b4">Parameters to this hook:
 35.1606 +      </para>
 35.1607 +      <itemizedlist>
 35.1608 +	<listitem><para id="x_2b5"><literal>parent1</literal>: A changeset ID.
 35.1609 +	    The changeset ID of the first parent of the working
 35.1610 +	    directory.
 35.1611 +	  </para>
 35.1612 +	</listitem>
 35.1613 +	<listitem><para id="x_2b6"><literal>parent2</literal>: A changeset ID.
 35.1614 +	    The changeset ID of the second parent of the working
 35.1615 +	    directory.
 35.1616 +	  </para>
 35.1617 +	</listitem></itemizedlist>
 35.1618 +      <para id="x_2b7">If the commit proceeds, the parents of the working
 35.1619 +	directory will become the parents of the new changeset.
 35.1620 +      </para>
 35.1621 +
 35.1622 +      <para id="x_2b8">See also: <literal role="hook">commit</literal>
 35.1623 +	(<xref linkend="sec:hook:commit"/>), <literal
 35.1624 +	  role="hook">pretxncommit</literal> (<xref
 35.1625 +	  linkend="sec:hook:pretxncommit"/>)
 35.1626 +      </para>
 35.1627 +    </sect2>
 35.1628 +
 35.1629 +    <sect2 id="sec:hook:preoutgoing">
 35.1630 +      <title><literal role="hook">preoutgoing</literal>&emdash;before
 35.1631 +	starting to propagate changesets</title>
 35.1632 +
 35.1633 +      <para id="x_2b9">This hook is invoked before Mercurial knows the identities
 35.1634 +	of the changesets to be transmitted.
 35.1635 +      </para>
 35.1636 +
 35.1637 +      <para id="x_2ba">One use for this hook is to prevent changes from being
 35.1638 +	transmitted to another repository.
 35.1639 +      </para>
 35.1640 +
 35.1641 +      <para id="x_2bb">Parameters to this hook:
 35.1642 +      </para>
 35.1643 +      <itemizedlist>
 35.1644 +	<listitem><para id="x_2bc"><literal>source</literal>: A
 35.1645 +	    string.  The source of the operation that is attempting to
 35.1646 +	    obtain changes from this repository (see <xref
 35.1647 +	      linkend="sec:hook:sources"/>).  See the documentation
 35.1648 +	    for the <literal>source</literal> parameter to the
 35.1649 +	    <literal role="hook">outgoing</literal> hook, in
 35.1650 +	    <xref linkend="sec:hook:outgoing"/>, for possible values
 35.1651 +	    of this parameter.
 35.1652 +	  </para>
 35.1653 +	</listitem>
 35.1654 +	<listitem><para id="x_2bd"><literal>url</literal>: A URL.  The
 35.1655 +	    location of the remote repository, if known.  See <xref
 35.1656 +	      linkend="sec:hook:url"/> for more information.
 35.1657 +	  </para>
 35.1658 +	</listitem></itemizedlist>
 35.1659 +
 35.1660 +      <para id="x_2be">See also: <literal
 35.1661 +	  role="hook">outgoing</literal> (<xref
 35.1662 +	  linkend="sec:hook:outgoing"/>)
 35.1663 +      </para>
 35.1664 +    </sect2>
 35.1665 +
 35.1666 +    <sect2 id="sec:hook:pretag">
 35.1667 +      <title><literal role="hook">pretag</literal>&emdash;before
 35.1668 +	tagging a changeset</title>
 35.1669 +
 35.1670 +      <para id="x_2bf">This controlling hook is run before a tag is created.  If
 35.1671 +	the hook succeeds, creation of the tag proceeds.  If the hook
 35.1672 +	fails, the tag is not created.
 35.1673 +      </para>
 35.1674 +
 35.1675 +      <para id="x_2c0">Parameters to this hook:
 35.1676 +      </para>
 35.1677 +      <itemizedlist>
 35.1678 +	<listitem><para id="x_2c1"><literal>local</literal>: A boolean.  Whether
 35.1679 +	    the tag is local to this repository instance (i.e. stored
 35.1680 +	    in <filename role="special">.hg/localtags</filename>) or
 35.1681 +	    managed by Mercurial (stored in <filename
 35.1682 +	      role="special">.hgtags</filename>).
 35.1683 +	  </para>
 35.1684 +	</listitem>
 35.1685 +	<listitem><para id="x_2c2"><literal>node</literal>: A changeset ID.  The
 35.1686 +	    ID of the changeset to be tagged.
 35.1687 +	  </para>
 35.1688 +	</listitem>
 35.1689 +	<listitem><para id="x_2c3"><literal>tag</literal>: A string.  The name of
 35.1690 +	    the tag to be created.
 35.1691 +	  </para>
 35.1692 +	</listitem></itemizedlist>
 35.1693 +
 35.1694 +      <para id="x_2c4">If the tag to be created is
 35.1695 +	revision-controlled, the <literal
 35.1696 +	  role="hook">precommit</literal> and <literal
 35.1697 +	  role="hook">pretxncommit</literal> hooks (<xref
 35.1698 +	  linkend="sec:hook:commit"/> and <xref
 35.1699 +	  linkend="sec:hook:pretxncommit"/>) will also be run.
 35.1700 +      </para>
 35.1701 +
 35.1702 +      <para id="x_2c5">See also: <literal role="hook">tag</literal>
 35.1703 +	(<xref linkend="sec:hook:tag"/>)
 35.1704 +      </para>
 35.1705 +    </sect2>
 35.1706 +
 35.1707 +    <sect2 id="sec:hook:pretxnchangegroup">
 35.1708 +      <title><literal
 35.1709 +	  role="hook">pretxnchangegroup</literal>&emdash;before
 35.1710 +	completing addition of remote changesets</title>
 35.1711 +
 35.1712 +      <para id="x_2c6">This controlling hook is run before a
 35.1713 +	transaction&emdash;that manages the addition of a group of new
 35.1714 +	changesets from outside the repository&emdash;completes.  If
 35.1715 +	the hook succeeds, the transaction completes, and all of the
 35.1716 +	changesets become permanent within this repository.  If the
 35.1717 +	hook fails, the transaction is rolled back, and the data for
 35.1718 +	the changesets is erased.
 35.1719 +      </para>
 35.1720 +
 35.1721 +      <para id="x_2c7">This hook can access the metadata associated with the
 35.1722 +	almost-added changesets, but it should not do anything
 35.1723 +	permanent with this data. It must also not modify the working
 35.1724 +	directory.
 35.1725 +      </para>
 35.1726 +
 35.1727 +      <para id="x_2c8">While this hook is running, if other Mercurial processes
 35.1728 +	access this repository, they will be able to see the
 35.1729 +	almost-added changesets as if they are permanent.  This may
 35.1730 +	lead to race conditions if you do not take steps to avoid
 35.1731 +	them.
 35.1732 +      </para>
 35.1733 +
 35.1734 +      <para id="x_2c9">This hook can be used to automatically vet a group of
 35.1735 +	changesets.  If the hook fails, all of the changesets are
 35.1736 +	<quote>rejected</quote> when the transaction rolls back.
 35.1737 +      </para>
 35.1738 +
 35.1739 +      <para id="x_2ca">Parameters to this hook:
 35.1740 +      </para>
 35.1741 +      <itemizedlist>
 35.1742 +	<listitem><para id="x_2cb"><literal>node</literal>: A changeset ID.  The
 35.1743 +	    changeset ID of the first changeset in the group that was
 35.1744 +	    added.  All changesets between this and
 35.1745 +	    <literal role="tag">tip</literal>,
 35.1746 +	    inclusive, were added by a single <command
 35.1747 +	      role="hg-cmd">hg pull</command>, <command
 35.1748 +	      role="hg-cmd">hg push</command> or <command
 35.1749 +	      role="hg-cmd">hg unbundle</command>.
 35.1750 +	  </para>
 35.1751 +	</listitem>
 35.1752 +	<listitem><para id="x_2cc"><literal>source</literal>: A
 35.1753 +	    string.  The source of these changes.  See <xref
 35.1754 +	      linkend="sec:hook:sources"/> for details.
 35.1755 +	  </para>
 35.1756 +	</listitem>
 35.1757 +	<listitem><para id="x_2cd"><literal>url</literal>: A URL.  The
 35.1758 +	    location of the remote repository, if known.  See <xref
 35.1759 +	      linkend="sec:hook:url"/> for more information.
 35.1760 +	  </para>
 35.1761 +	</listitem></itemizedlist>
 35.1762 +
 35.1763 +      <para id="x_2ce">See also: <literal
 35.1764 +	  role="hook">changegroup</literal> (<xref
 35.1765 +	  linkend="sec:hook:changegroup"/>), <literal
 35.1766 +	  role="hook">incoming</literal> (<xref
 35.1767 +	  linkend="sec:hook:incoming"/>), <literal
 35.1768 +	  role="hook">prechangegroup</literal> (<xref
 35.1769 +	  linkend="sec:hook:prechangegroup"/>)
 35.1770 +      </para>
 35.1771 +    </sect2>
 35.1772 +
 35.1773 +    <sect2 id="sec:hook:pretxncommit">
 35.1774 +      <title><literal role="hook">pretxncommit</literal>&emdash;before
 35.1775 +	completing commit of new changeset</title>
 35.1776 +
 35.1777 +      <para id="x_2cf">This controlling hook is run before a
 35.1778 +	transaction&emdash;that manages a new commit&emdash;completes.
 35.1779 +	If the hook succeeds, the transaction completes and the
 35.1780 +	changeset becomes permanent within this repository.  If the
 35.1781 +	hook fails, the transaction is rolled back, and the commit
 35.1782 +	data is erased.
 35.1783 +      </para>
 35.1784 +
 35.1785 +      <para id="x_2d0">This hook can access the metadata associated with the
 35.1786 +	almost-new changeset, but it should not do anything permanent
 35.1787 +	with this data.  It must also not modify the working
 35.1788 +	directory.
 35.1789 +      </para>
 35.1790 +
 35.1791 +      <para id="x_2d1">While this hook is running, if other Mercurial processes
 35.1792 +	access this repository, they will be able to see the
 35.1793 +	almost-new changeset as if it is permanent.  This may lead to
 35.1794 +	race conditions if you do not take steps to avoid them.
 35.1795 +      </para>
 35.1796 +
 35.1797 +      <para id="x_2d2">Parameters to this hook:</para>
 35.1798 +
 35.1799 +      <itemizedlist>
 35.1800 +	<listitem><para id="x_2d3"><literal>node</literal>: A changeset ID.  The
 35.1801 +	    changeset ID of the newly committed changeset.
 35.1802 +	  </para>
 35.1803 +	</listitem>
 35.1804 +	<listitem><para id="x_2d4"><literal>parent1</literal>: A changeset ID.
 35.1805 +	    The changeset ID of the first parent of the newly
 35.1806 +	    committed changeset.
 35.1807 +	  </para>
 35.1808 +	</listitem>
 35.1809 +	<listitem><para id="x_2d5"><literal>parent2</literal>: A changeset ID.
 35.1810 +	    The changeset ID of the second parent of the newly
 35.1811 +	    committed changeset.
 35.1812 +	  </para>
 35.1813 +	</listitem></itemizedlist>
 35.1814 +
 35.1815 +      <para id="x_2d6">See also: <literal
 35.1816 +	  role="hook">precommit</literal> (<xref
 35.1817 +	  linkend="sec:hook:precommit"/>)
 35.1818 +      </para>
 35.1819 +    </sect2>
 35.1820 +
 35.1821 +    <sect2 id="sec:hook:preupdate">
 35.1822 +      <title><literal role="hook">preupdate</literal>&emdash;before
 35.1823 +	updating or merging working directory</title>
 35.1824 +
 35.1825 +      <para id="x_2d7">This controlling hook is run before an update
 35.1826 +	or merge of the working directory begins.  It is run only if
 35.1827 +	Mercurial's normal pre-update checks determine that the update
 35.1828 +	or merge can proceed.  If the hook succeeds, the update or
 35.1829 +	merge may proceed; if it fails, the update or merge does not
 35.1830 +	start.
 35.1831 +      </para>
 35.1832 +
 35.1833 +      <para id="x_2d8">Parameters to this hook:
 35.1834 +      </para>
 35.1835 +      <itemizedlist>
 35.1836 +	<listitem><para id="x_2d9"><literal>parent1</literal>: A
 35.1837 +	    changeset ID. The ID of the parent that the working
 35.1838 +	    directory is to be updated to.  If the working directory
 35.1839 +	    is being merged, it will not change this parent.
 35.1840 +	  </para>
 35.1841 +	</listitem>
 35.1842 +	<listitem><para id="x_2da"><literal>parent2</literal>: A
 35.1843 +	    changeset ID. Only set if the working directory is being
 35.1844 +	    merged.  The ID of the revision that the working directory
 35.1845 +	    is being merged with.
 35.1846 +	  </para>
 35.1847 +	</listitem></itemizedlist>
 35.1848 +
 35.1849 +      <para id="x_2db">See also: <literal role="hook">update</literal>
 35.1850 +	(<xref linkend="sec:hook:update"/>)</para>
 35.1851 +    </sect2>
 35.1852 +
 35.1853 +    <sect2 id="sec:hook:tag">
 35.1854 +      <title><literal role="hook">tag</literal>&emdash;after tagging a
 35.1855 +	changeset</title>
 35.1856 +
 35.1857 +      <para id="x_2dc">This hook is run after a tag has been created.
 35.1858 +      </para>
 35.1859 +
 35.1860 +      <para id="x_2dd">Parameters to this hook:
 35.1861 +      </para>
 35.1862 +      <itemizedlist>
 35.1863 +	<listitem><para id="x_2de"><literal>local</literal>: A boolean.  Whether
 35.1864 +	    the new tag is local to this repository instance (i.e.
 35.1865 +	    stored in <filename
 35.1866 +	      role="special">.hg/localtags</filename>) or managed by
 35.1867 +	    Mercurial (stored in <filename
 35.1868 +	      role="special">.hgtags</filename>).
 35.1869 +	  </para>
 35.1870 +	</listitem>
 35.1871 +	<listitem><para id="x_2df"><literal>node</literal>: A changeset ID.  The
 35.1872 +	    ID of the changeset that was tagged.
 35.1873 +	  </para>
 35.1874 +	</listitem>
 35.1875 +	<listitem><para id="x_2e0"><literal>tag</literal>: A string.  The name of
 35.1876 +	    the tag that was created.
 35.1877 +	  </para>
 35.1878 +	</listitem></itemizedlist>
 35.1879 +
 35.1880 +      <para id="x_2e1">If the created tag is revision-controlled, the <literal
 35.1881 +	  role="hook">commit</literal> hook (section <xref
 35.1882 +	  linkend="sec:hook:commit"/>) is run before this hook.
 35.1883 +      </para>
 35.1884 +
 35.1885 +      <para id="x_2e2">See also: <literal role="hook">pretag</literal>
 35.1886 +	(<xref linkend="sec:hook:pretag"/>)
 35.1887 +      </para>
 35.1888 +    </sect2>
 35.1889 +
 35.1890 +    <sect2 id="sec:hook:update">
 35.1891 +      <title><literal role="hook">update</literal>&emdash;after
 35.1892 +	updating or merging working directory</title>
 35.1893 +
 35.1894 +      <para id="x_2e3">This hook is run after an update or merge of the working
 35.1895 +	directory completes.  Since a merge can fail (if the external
 35.1896 +	<command>hgmerge</command> command fails to resolve conflicts
 35.1897 +	in a file), this hook communicates whether the update or merge
 35.1898 +	completed cleanly.
 35.1899 +      </para>
 35.1900 +
 35.1901 +      <itemizedlist>
 35.1902 +	<listitem><para id="x_2e4"><literal>error</literal>: A boolean.
 35.1903 +	    Indicates whether the update or merge completed
 35.1904 +	    successfully.
 35.1905 +	  </para>
 35.1906 +	</listitem>
 35.1907 +	<listitem><para id="x_2e5"><literal>parent1</literal>: A changeset ID.
 35.1908 +	    The ID of the parent that the working directory was
 35.1909 +	    updated to.  If the working directory was merged, it will
 35.1910 +	    not have changed this parent.
 35.1911 +	  </para>
 35.1912 +	</listitem>
 35.1913 +	<listitem><para id="x_2e6"><literal>parent2</literal>: A changeset ID.
 35.1914 +	    Only set if the working directory was merged.  The ID of
 35.1915 +	    the revision that the working directory was merged with.
 35.1916 +	  </para>
 35.1917 +	</listitem></itemizedlist>
 35.1918 +
 35.1919 +      <para id="x_2e7">See also: <literal role="hook">preupdate</literal>
 35.1920 +	(<xref linkend="sec:hook:preupdate"/>)
 35.1921 +      </para>
 35.1922 +
 35.1923 +    </sect2>
 35.1924 +  </sect1>
 35.1925 +</chapter>
 35.1926 +
 35.1927 +<!--
 35.1928 +local variables: 
 35.1929 +sgml-parent-document: ("00book.xml" "book" "chapter")
 35.1930 +end:
 35.1931 +-->
    36.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.2 +++ b/en/ch11-template.xml	Sun Aug 16 03:41:39 2009 +0200
    36.3 @@ -0,0 +1,685 @@
    36.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    36.5 +
    36.6 +<chapter id="chap:template">
    36.7 +  <?dbhtml filename="customizing-the-output-of-mercurial.html"?>
    36.8 +  <title>Customizing the output of Mercurial</title>
    36.9 +
   36.10 +  <para id="x_578">Mercurial provides a powerful mechanism to let you control how
   36.11 +    it displays information.  The mechanism is based on templates.
   36.12 +    You can use templates to generate specific output for a single
   36.13 +    command, or to customize the entire appearance of the built-in web
   36.14 +    interface.</para>
   36.15 +
   36.16 +  <sect1 id="sec:style">
   36.17 +    <title>Using precanned output styles</title>
   36.18 +
   36.19 +    <para id="x_579">Packaged with Mercurial are some output styles that you can
   36.20 +      use immediately.  A style is simply a precanned template that
   36.21 +      someone wrote and installed somewhere that Mercurial can
   36.22 +      find.</para>
   36.23 +
   36.24 +    <para id="x_57a">Before we take a look at Mercurial's bundled styles, let's
   36.25 +      review its normal output.</para>
   36.26 +
   36.27 +    &interaction.template.simple.normal;
   36.28 +
   36.29 +    <para id="x_57b">This is somewhat informative, but it takes up a lot of
   36.30 +      space&emdash;five lines of output per changeset.  The
   36.31 +      <literal>compact</literal> style reduces this to three lines,
   36.32 +      presented in a sparse manner.</para>
   36.33 +
   36.34 +    &interaction.template.simple.compact;
   36.35 +
   36.36 +    <para id="x_57c">The <literal>changelog</literal> style hints at the
   36.37 +      expressive power of Mercurial's templating engine.  This style
   36.38 +      attempts to follow the GNU Project's changelog
   36.39 +      guidelines<citation>web:changelog</citation>.</para>
   36.40 +
   36.41 +    &interaction.template.simple.changelog;
   36.42 +
   36.43 +    <para id="x_57d">You will not be shocked to learn that Mercurial's default
   36.44 +      output style is named <literal>default</literal>.</para>
   36.45 +
   36.46 +    <sect2>
   36.47 +      <title>Setting a default style</title>
   36.48 +
   36.49 +      <para id="x_57e">You can modify the output style that Mercurial will use
   36.50 +	for every command by editing your <filename
   36.51 +	  role="special">~/.hgrc</filename> file, naming the style
   36.52 +	you would prefer to use.</para>
   36.53 +
   36.54 +      <programlisting>[ui]
   36.55 +style = compact</programlisting>
   36.56 +
   36.57 +      <para id="x_57f">If you write a style of your own, you can use it by either
   36.58 +	providing the path to your style file, or copying your style
   36.59 +	file into a location where Mercurial can find it (typically
   36.60 +	the <literal>templates</literal> subdirectory of your
   36.61 +	Mercurial install directory).</para>
   36.62 +    </sect2>
   36.63 +  </sect1>
   36.64 +
   36.65 +  <sect1>
   36.66 +    <title>Commands that support styles and templates</title>
   36.67 +
   36.68 +    <para id="x_580">All of Mercurial's
   36.69 +      <quote><literal>log</literal>-like</quote> commands let you use
   36.70 +      styles and templates: <command role="hg-cmd">hg
   36.71 +	incoming</command>, <command role="hg-cmd">hg log</command>,
   36.72 +      <command role="hg-cmd">hg outgoing</command>, and <command
   36.73 +	role="hg-cmd">hg tip</command>.</para>
   36.74 +
   36.75 +    <para id="x_581">As I write this manual, these are so far the only commands
   36.76 +      that support styles and templates.  Since these are the most
   36.77 +      important commands that need customizable output, there has been
   36.78 +      little pressure from the Mercurial user community to add style
   36.79 +      and template support to other commands.</para>
   36.80 +  </sect1>
   36.81 +
   36.82 +  <sect1>
   36.83 +    <title>The basics of templating</title>
   36.84 +
   36.85 +    <para id="x_582">At its simplest, a Mercurial template is a piece of text.
   36.86 +      Some of the text never changes, while other parts are
   36.87 +      <emphasis>expanded</emphasis>, or replaced with new text, when
   36.88 +      necessary.</para>
   36.89 +
   36.90 +    <para id="x_583">Before we continue, let's look again at a simple example of
   36.91 +      Mercurial's normal output.</para>
   36.92 +
   36.93 +    &interaction.template.simple.normal;
   36.94 +
   36.95 +    <para id="x_584">Now, let's run the same command, but using a template to
   36.96 +      change its output.</para>
   36.97 +
   36.98 +    &interaction.template.simple.simplest;
   36.99 +
  36.100 +    <para id="x_585">The example above illustrates the simplest possible
  36.101 +      template; it's just a piece of static text, printed once for
  36.102 +      each changeset.  The <option
  36.103 +	role="hg-opt-log">--template</option> option to the <command
  36.104 +	role="hg-cmd">hg log</command> command tells Mercurial to use
  36.105 +      the given text as the template when printing each
  36.106 +      changeset.</para>
  36.107 +
  36.108 +    <para id="x_586">Notice that the template string above ends with the text
  36.109 +      <quote><literal>\n</literal></quote>.  This is an
  36.110 +      <emphasis>escape sequence</emphasis>, telling Mercurial to print
  36.111 +      a newline at the end of each template item.  If you omit this
  36.112 +      newline, Mercurial will run each piece of output together.  See
  36.113 +      <xref linkend="sec:template:escape"/> for more details
  36.114 +      of escape sequences.</para>
  36.115 +
  36.116 +    <para id="x_587">A template that prints a fixed string of text all the time
  36.117 +      isn't very useful; let's try something a bit more
  36.118 +      complex.</para>
  36.119 +
  36.120 +    &interaction.template.simple.simplesub;
  36.121 +
  36.122 +    <para id="x_588">As you can see, the string
  36.123 +      <quote><literal>{desc}</literal></quote> in the template has
  36.124 +      been replaced in the output with the description of each
  36.125 +      changeset.  Every time Mercurial finds text enclosed in curly
  36.126 +      braces (<quote><literal>{</literal></quote> and
  36.127 +      <quote><literal>}</literal></quote>), it will try to replace the
  36.128 +      braces and text with the expansion of whatever is inside.  To
  36.129 +      print a literal curly brace, you must escape it, as described in
  36.130 +      <xref linkend="sec:template:escape"/>.</para>
  36.131 +  </sect1>
  36.132 +
  36.133 +  <sect1 id="sec:template:keyword">
  36.134 +    <title>Common template keywords</title>
  36.135 +
  36.136 +    <para id="x_589">You can start writing simple templates immediately using the
  36.137 +      keywords below.</para>
  36.138 +
  36.139 +    <itemizedlist>
  36.140 +      <listitem><para id="x_58a"><literal
  36.141 +	    role="template-keyword">author</literal>: String.  The
  36.142 +	  unmodified author of the changeset.</para>
  36.143 +      </listitem>
  36.144 +      <listitem><para id="x_58b"><literal
  36.145 +	    role="template-keyword">branches</literal>: String.  The
  36.146 +	  name of the branch on which the changeset was committed.
  36.147 +	  Will be empty if the branch name was
  36.148 +	  <literal>default</literal>.</para>
  36.149 +      </listitem>
  36.150 +      <listitem><para id="x_58c"><literal role="template-keyword">date</literal>:
  36.151 +	  Date information.  The date when the changeset was
  36.152 +	  committed.  This is <emphasis>not</emphasis> human-readable;
  36.153 +	  you must pass it through a filter that will render it
  36.154 +	  appropriately.  See <xref
  36.155 +	    linkend="sec:template:filter"/> for more information
  36.156 +	  on filters. The date is expressed as a pair of numbers.  The
  36.157 +	  first number is a Unix UTC timestamp (seconds since January
  36.158 +	  1, 1970); the second is the offset of the committer's
  36.159 +	  timezone from UTC, in seconds.</para>
  36.160 +      </listitem>
  36.161 +      <listitem><para id="x_58d"><literal role="template-keyword">desc</literal>:
  36.162 +	  String.  The text of the changeset description.</para>
  36.163 +      </listitem>
  36.164 +      <listitem><para id="x_58e"><literal
  36.165 +	    role="template-keyword">files</literal>: List of strings.
  36.166 +	  All files modified, added, or removed by this
  36.167 +	  changeset.</para>
  36.168 +      </listitem>
  36.169 +      <listitem><para id="x_58f"><literal
  36.170 +	    role="template-keyword">file_adds</literal>: List of
  36.171 +	  strings.  Files added by this changeset.</para>
  36.172 +      </listitem>
  36.173 +      <listitem><para id="x_590"><literal
  36.174 +	    role="template-keyword">file_dels</literal>: List of
  36.175 +	  strings.  Files removed by this changeset.</para>
  36.176 +      </listitem>
  36.177 +      <listitem><para id="x_591"><literal role="template-keyword">node</literal>:
  36.178 +	  String.  The changeset identification hash, as a
  36.179 +	  40-character hexadecimal string.</para>
  36.180 +      </listitem>
  36.181 +      <listitem><para id="x_592"><literal
  36.182 +	    role="template-keyword">parents</literal>: List of
  36.183 +	  strings.  The parents of the changeset.</para>
  36.184 +      </listitem>
  36.185 +      <listitem><para id="x_593"><literal role="template-keyword">rev</literal>:
  36.186 +	  Integer.  The repository-local changeset revision
  36.187 +	  number.</para>
  36.188 +      </listitem>
  36.189 +      <listitem><para id="x_594"><literal role="template-keyword">tags</literal>:
  36.190 +	  List of strings.  Any tags associated with the
  36.191 +	  changeset.</para>
  36.192 +      </listitem>
  36.193 +    </itemizedlist>
  36.194 +
  36.195 +    <para id="x_595">A few simple experiments will show us what to expect when we
  36.196 +      use these keywords; you can see the results below.</para>
  36.197 +
  36.198 +    &interaction.template.simple.keywords;
  36.199 +
  36.200 +    <para id="x_596">As we noted above, the date keyword does not produce
  36.201 +      human-readable output, so we must treat it specially.  This
  36.202 +      involves using a <emphasis>filter</emphasis>, about which more
  36.203 +      in <xref linkend="sec:template:filter"/>.</para>
  36.204 +
  36.205 +    &interaction.template.simple.datekeyword;
  36.206 +  </sect1>
  36.207 +
  36.208 +  <sect1 id="sec:template:escape">
  36.209 +    <title>Escape sequences</title>
  36.210 +
  36.211 +    <para id="x_597">Mercurial's templating engine recognises the most commonly
  36.212 +      used escape sequences in strings.  When it sees a backslash
  36.213 +      (<quote><literal>\</literal></quote>) character, it looks at the
  36.214 +      following character and substitutes the two characters with a
  36.215 +      single replacement, as described below.</para>
  36.216 +
  36.217 +    <itemizedlist>
  36.218 +      <listitem><para id="x_598"><literal>\</literal>:
  36.219 +	  Backslash, <quote><literal>\</literal></quote>, ASCII
  36.220 +	  134.</para>
  36.221 +      </listitem>
  36.222 +      <listitem><para id="x_599"><literal>\n</literal>: Newline,
  36.223 +	  ASCII 12.</para>
  36.224 +      </listitem>
  36.225 +      <listitem><para id="x_59a"><literal>\r</literal>: Carriage
  36.226 +	  return, ASCII 15.</para>
  36.227 +      </listitem>
  36.228 +      <listitem><para id="x_59b"><literal>\t</literal>: Tab, ASCII
  36.229 +	  11.</para>
  36.230 +      </listitem>
  36.231 +      <listitem><para id="x_59c"><literal>\v</literal>: Vertical
  36.232 +	  tab, ASCII 13.</para>
  36.233 +      </listitem>
  36.234 +      <listitem><para id="x_59d"><literal>\{</literal>: Open curly
  36.235 +	  brace, <quote><literal>{</literal></quote>, ASCII
  36.236 +	  173.</para>
  36.237 +      </listitem>
  36.238 +      <listitem><para id="x_59e"><literal>\}</literal>: Close curly
  36.239 +	  brace, <quote><literal>}</literal></quote>, ASCII
  36.240 +	  175.</para>
  36.241 +      </listitem></itemizedlist>
  36.242 +
  36.243 +    <para id="x_59f">As indicated above, if you want the expansion of a template
  36.244 +      to contain a literal <quote><literal>\</literal></quote>,
  36.245 +      <quote><literal>{</literal></quote>, or
  36.246 +      <quote><literal>{</literal></quote> character, you must escape
  36.247 +      it.</para>
  36.248 +  </sect1>
  36.249 +
  36.250 +  <sect1 id="sec:template:filter">
  36.251 +    <title>Filtering keywords to change their results</title>
  36.252 +
  36.253 +    <para id="x_5a0">Some of the results of template expansion are not
  36.254 +      immediately easy to use.  Mercurial lets you specify an optional
  36.255 +      chain of <emphasis>filters</emphasis> to modify the result of
  36.256 +      expanding a keyword.  You have already seen a common filter,
  36.257 +      <literal role="template-kw-filt-date">isodate</literal>, in
  36.258 +      action above, to make a date readable.</para>
  36.259 +
  36.260 +    <para id="x_5a1">Below is a list of the most commonly used filters that
  36.261 +      Mercurial supports.  While some filters can be applied to any
  36.262 +      text, others can only be used in specific circumstances.  The
  36.263 +      name of each filter is followed first by an indication of where
  36.264 +      it can be used, then a description of its effect.</para>
  36.265 +
  36.266 +    <itemizedlist>
  36.267 +      <listitem><para id="x_5a2"><literal
  36.268 +	    role="template-filter">addbreaks</literal>: Any text. Add
  36.269 +	  an XHTML <quote><literal>&lt;br/&gt;</literal></quote> tag
  36.270 +	  before the end of every line except the last.  For example,
  36.271 +	  <quote><literal>foo\nbar</literal></quote> becomes
  36.272 +	  <quote><literal>foo&lt;br/&gt;\nbar</literal></quote>.</para>
  36.273 +      </listitem>
  36.274 +      <listitem><para id="x_5a3"><literal
  36.275 +	    role="template-kw-filt-date">age</literal>: <literal
  36.276 +	    role="template-keyword">date</literal> keyword.  Render
  36.277 +	  the age of the date, relative to the current time.  Yields a
  36.278 +	  string like <quote><literal>10
  36.279 +	      minutes</literal></quote>.</para>
  36.280 +      </listitem>
  36.281 +      <listitem><para id="x_5a4"><literal
  36.282 +	    role="template-filter">basename</literal>: Any text, but
  36.283 +	  most useful for the <literal
  36.284 +	    role="template-keyword">files</literal> keyword and its
  36.285 +	  relatives.  Treat the text as a path, and return the
  36.286 +	  basename. For example,
  36.287 +	  <quote><literal>foo/bar/baz</literal></quote> becomes
  36.288 +	  <quote><literal>baz</literal></quote>.</para>
  36.289 +      </listitem>
  36.290 +      <listitem><para id="x_5a5"><literal
  36.291 +	    role="template-kw-filt-date">date</literal>: <literal
  36.292 +	    role="template-keyword">date</literal> keyword.  Render a
  36.293 +	  date in a similar format to the Unix <literal
  36.294 +	    role="template-keyword">date</literal> command, but with
  36.295 +	  timezone included.  Yields a string like <quote><literal>Mon
  36.296 +	      Sep 04 15:13:13 2006 -0700</literal></quote>.</para>
  36.297 +      </listitem>
  36.298 +      <listitem><para id="x_5a6"><literal
  36.299 +	    role="template-kw-filt-author">domain</literal>: Any text,
  36.300 +	  but most useful for the <literal
  36.301 +	    role="template-keyword">author</literal> keyword.  Finds
  36.302 +	  the first string that looks like an email address, and
  36.303 +	  extract just the domain component.  For example,
  36.304 +	  <quote><literal>Bryan O'Sullivan
  36.305 +	      &lt;bos@serpentine.com&gt;</literal></quote> becomes
  36.306 +	  <quote><literal>serpentine.com</literal></quote>.</para>
  36.307 +      </listitem>
  36.308 +      <listitem><para id="x_5a7"><literal
  36.309 +	    role="template-kw-filt-author">email</literal>: Any text,
  36.310 +	  but most useful for the <literal
  36.311 +	    role="template-keyword">author</literal> keyword.  Extract
  36.312 +	  the first string that looks like an email address.  For
  36.313 +	  example, <quote><literal>Bryan O'Sullivan
  36.314 +	      &lt;bos@serpentine.com&gt;</literal></quote> becomes
  36.315 +	  <quote><literal>bos@serpentine.com</literal></quote>.</para>
  36.316 +      </listitem>
  36.317 +      <listitem><para id="x_5a8"><literal
  36.318 +	    role="template-filter">escape</literal>: Any text.
  36.319 +	  Replace the special XML/XHTML characters
  36.320 +	  <quote><literal>&amp;</literal></quote>,
  36.321 +	  <quote><literal>&lt;</literal></quote> and
  36.322 +	  <quote><literal>&gt;</literal></quote> with XML
  36.323 +	  entities.</para>
  36.324 +      </listitem>
  36.325 +      <listitem><para id="x_5a9"><literal
  36.326 +	    role="template-filter">fill68</literal>: Any text.  Wrap
  36.327 +	  the text to fit in 68 columns.  This is useful before you
  36.328 +	  pass text through the <literal
  36.329 +	    role="template-filter">tabindent</literal> filter, and
  36.330 +	  still want it to fit in an 80-column fixed-font
  36.331 +	  window.</para>
  36.332 +      </listitem>
  36.333 +      <listitem><para id="x_5aa"><literal
  36.334 +	    role="template-filter">fill76</literal>: Any text.  Wrap
  36.335 +	  the text to fit in 76 columns.</para>
  36.336 +      </listitem>
  36.337 +      <listitem><para id="x_5ab"><literal
  36.338 +	    role="template-filter">firstline</literal>: Any text.
  36.339 +	  Yield the first line of text, without any trailing
  36.340 +	  newlines.</para>
  36.341 +      </listitem>
  36.342 +      <listitem><para id="x_5ac"><literal
  36.343 +	    role="template-kw-filt-date">hgdate</literal>: <literal
  36.344 +	    role="template-keyword">date</literal> keyword.  Render
  36.345 +	  the date as a pair of readable numbers.  Yields a string
  36.346 +	  like <quote><literal>1157407993
  36.347 +	      25200</literal></quote>.</para>
  36.348 +      </listitem>
  36.349 +      <listitem><para id="x_5ad"><literal
  36.350 +	    role="template-kw-filt-date">isodate</literal>: <literal
  36.351 +	    role="template-keyword">date</literal> keyword.  Render
  36.352 +	  the date as a text string in ISO 8601 format.  Yields a
  36.353 +	  string like <quote><literal>2006-09-04 15:13:13
  36.354 +	      -0700</literal></quote>.</para>
  36.355 +      </listitem>
  36.356 +      <listitem><para id="x_5ae"><literal
  36.357 +	    role="template-filter">obfuscate</literal>: Any text, but
  36.358 +	  most useful for the <literal
  36.359 +	    role="template-keyword">author</literal> keyword.  Yield
  36.360 +	  the input text rendered as a sequence of XML entities.  This
  36.361 +	  helps to defeat some particularly stupid screen-scraping
  36.362 +	  email harvesting spambots.</para>
  36.363 +      </listitem>
  36.364 +      <listitem><para id="x_5af"><literal
  36.365 +	    role="template-kw-filt-author">person</literal>: Any text,
  36.366 +	  but most useful for the <literal
  36.367 +	    role="template-keyword">author</literal> keyword.  Yield
  36.368 +	  the text before an email address. For example,
  36.369 +	  <quote><literal>Bryan O'Sullivan
  36.370 +	      &lt;bos@serpentine.com&gt;</literal></quote> becomes
  36.371 +	  <quote><literal>Bryan O'Sullivan</literal></quote>.</para>
  36.372 +      </listitem>
  36.373 +      <listitem><para id="x_5b0"><literal
  36.374 +	    role="template-kw-filt-date">rfc822date</literal>:
  36.375 +	  <literal role="template-keyword">date</literal> keyword.
  36.376 +	  Render a date using the same format used in email headers.
  36.377 +	  Yields a string like <quote><literal>Mon, 04 Sep 2006
  36.378 +	      15:13:13 -0700</literal></quote>.</para>
  36.379 +      </listitem>
  36.380 +      <listitem><para id="x_5b1"><literal
  36.381 +	    role="template-kw-filt-node">short</literal>: Changeset
  36.382 +	  hash.  Yield the short form of a changeset hash, i.e. a
  36.383 +	  12-character hexadecimal string.</para>
  36.384 +      </listitem>
  36.385 +      <listitem><para id="x_5b2"><literal
  36.386 +	    role="template-kw-filt-date">shortdate</literal>: <literal
  36.387 +	    role="template-keyword">date</literal> keyword.  Render
  36.388 +	  the year, month, and day of the date.  Yields a string like
  36.389 +	  <quote><literal>2006-09-04</literal></quote>.</para>
  36.390 +      </listitem>
  36.391 +      <listitem><para id="x_5b3"><literal role="template-filter">strip</literal>:
  36.392 +	  Any text.  Strip all leading and trailing whitespace from
  36.393 +	  the string.</para>
  36.394 +      </listitem>
  36.395 +      <listitem><para id="x_5b4"><literal
  36.396 +	    role="template-filter">tabindent</literal>: Any text.
  36.397 +	  Yield the text, with every line except the first starting
  36.398 +	  with a tab character.</para>
  36.399 +      </listitem>
  36.400 +      <listitem><para id="x_5b5"><literal
  36.401 +	    role="template-filter">urlescape</literal>: Any text.
  36.402 +	  Escape all characters that are considered
  36.403 +	  <quote>special</quote> by URL parsers.  For example,
  36.404 +	  <literal>foo bar</literal> becomes
  36.405 +	  <literal>foo%20bar</literal>.</para>
  36.406 +      </listitem>
  36.407 +      <listitem><para id="x_5b6"><literal
  36.408 +	    role="template-kw-filt-author">user</literal>: Any text,
  36.409 +	  but most useful for the <literal
  36.410 +	    role="template-keyword">author</literal> keyword.  Return
  36.411 +	  the <quote>user</quote> portion of an email address.  For
  36.412 +	  example, <quote><literal>Bryan O'Sullivan
  36.413 +	      &lt;bos@serpentine.com&gt;</literal></quote> becomes
  36.414 +	  <quote><literal>bos</literal></quote>.</para>
  36.415 +      </listitem>
  36.416 +    </itemizedlist>
  36.417 +
  36.418 +    &interaction.template.simple.manyfilters;
  36.419 +
  36.420 +    <note>
  36.421 +      <para id="x_5b7">  If you try to apply a filter to a piece of data that it
  36.422 +	cannot process, Mercurial will fail and print a Python
  36.423 +	exception.  For example, trying to run the output of the
  36.424 +	<literal role="template-keyword">desc</literal> keyword into
  36.425 +	the <literal role="template-kw-filt-date">isodate</literal>
  36.426 +	filter is not a good idea.</para>
  36.427 +    </note>
  36.428 +
  36.429 +    <sect2>
  36.430 +      <title>Combining filters</title>
  36.431 +
  36.432 +      <para id="x_5b8">It is easy to combine filters to yield output in the form
  36.433 +	you would like.  The following chain of filters tidies up a
  36.434 +	description, then makes sure that it fits cleanly into 68
  36.435 +	columns, then indents it by a further 8 characters (at least
  36.436 +	on Unix-like systems, where a tab is conventionally 8
  36.437 +	characters wide).</para>
  36.438 +
  36.439 +      &interaction.template.simple.combine;
  36.440 +
  36.441 +      <para id="x_5b9">Note the use of <quote><literal>\t</literal></quote> (a
  36.442 +	tab character) in the template to force the first line to be
  36.443 +	indented; this is necessary since <literal
  36.444 +	  role="template-keyword">tabindent</literal> indents all
  36.445 +	lines <emphasis>except</emphasis> the first.</para>
  36.446 +
  36.447 +      <para id="x_5ba">Keep in mind that the order of filters in a chain is
  36.448 +	significant.  The first filter is applied to the result of the
  36.449 +	keyword; the second to the result of the first filter; and so
  36.450 +	on.  For example, using <literal>fill68|tabindent</literal>
  36.451 +	gives very different results from
  36.452 +	<literal>tabindent|fill68</literal>.</para>
  36.453 +    </sect2>
  36.454 +  </sect1>
  36.455 +
  36.456 +  <sect1>
  36.457 +    <title>From templates to styles</title>
  36.458 +
  36.459 +    <para id="x_5bb">A command line template provides a quick and simple way to
  36.460 +      format some output.  Templates can become verbose, though, and
  36.461 +      it's useful to be able to give a template a name.  A style file
  36.462 +      is a template with a name, stored in a file.</para>
  36.463 +
  36.464 +    <para id="x_5bc">More than that, using a style file unlocks the power of
  36.465 +      Mercurial's templating engine in ways that are not possible
  36.466 +      using the command line <option
  36.467 +	role="hg-opt-log">--template</option> option.</para>
  36.468 +
  36.469 +    <sect2>
  36.470 +      <title>The simplest of style files</title>
  36.471 +
  36.472 +      <para id="x_5bd">Our simple style file contains just one line:</para>
  36.473 +
  36.474 +      &interaction.template.simple.rev;
  36.475 +
  36.476 +      <para id="x_5be">This tells Mercurial, <quote>if you're printing a
  36.477 +	  changeset, use the text on the right as the
  36.478 +	  template</quote>.</para>
  36.479 +    </sect2>
  36.480 +
  36.481 +    <sect2>
  36.482 +      <title>Style file syntax</title>
  36.483 +
  36.484 +      <para id="x_5bf">The syntax rules for a style file are simple.</para>
  36.485 +
  36.486 +      <itemizedlist>
  36.487 +	<listitem><para id="x_5c0">The file is processed one line at a
  36.488 +	    time.</para>
  36.489 +	</listitem>
  36.490 +	<listitem><para id="x_5c1">Leading and trailing white space are
  36.491 +	    ignored.</para>
  36.492 +	</listitem>
  36.493 +	<listitem><para id="x_5c2">Empty lines are skipped.</para>
  36.494 +	</listitem>
  36.495 +	<listitem><para id="x_5c3">If a line starts with either of the characters
  36.496 +	    <quote><literal>#</literal></quote> or
  36.497 +	    <quote><literal>;</literal></quote>, the entire line is
  36.498 +	    treated as a comment, and skipped as if empty.</para>
  36.499 +	</listitem>
  36.500 +	<listitem><para id="x_5c4">A line starts with a keyword.  This must start
  36.501 +	    with an alphabetic character or underscore, and can
  36.502 +	    subsequently contain any alphanumeric character or
  36.503 +	    underscore.  (In regexp notation, a keyword must match
  36.504 +	    <literal>[A-Za-z_][A-Za-z0-9_]*</literal>.)</para>
  36.505 +	</listitem>
  36.506 +	<listitem><para id="x_5c5">The next element must be an
  36.507 +	    <quote><literal>=</literal></quote> character, which can
  36.508 +	    be preceded or followed by an arbitrary amount of white
  36.509 +	    space.</para>
  36.510 +	</listitem>
  36.511 +	<listitem><para id="x_5c6">If the rest of the line starts and ends with
  36.512 +	    matching quote characters (either single or double quote),
  36.513 +	    it is treated as a template body.</para>
  36.514 +	</listitem>
  36.515 +	<listitem><para id="x_5c7">If the rest of the line <emphasis>does
  36.516 +	      not</emphasis> start with a quote character, it is
  36.517 +	    treated as the name of a file; the contents of this file
  36.518 +	    will be read and used as a template body.</para>
  36.519 +	</listitem></itemizedlist>
  36.520 +    </sect2>
  36.521 +  </sect1>
  36.522 +
  36.523 +  <sect1>
  36.524 +    <title>Style files by example</title>
  36.525 +
  36.526 +    <para id="x_5c8">To illustrate how to write a style file, we will construct a
  36.527 +      few by example.  Rather than provide a complete style file and
  36.528 +      walk through it, we'll mirror the usual process of developing a
  36.529 +      style file by starting with something very simple, and walking
  36.530 +      through a series of successively more complete examples.</para>
  36.531 +
  36.532 +    <sect2>
  36.533 +      <title>Identifying mistakes in style files</title>
  36.534 +
  36.535 +      <para id="x_5c9">If Mercurial encounters a problem in a style file you are
  36.536 +	working on, it prints a terse error message that, once you
  36.537 +	figure out what it means, is actually quite useful.</para>
  36.538 +
  36.539 +&interaction.template.svnstyle.syntax.input;
  36.540 +
  36.541 +      <para id="x_5ca">Notice that <filename>broken.style</filename> attempts to
  36.542 +	define a <literal>changeset</literal> keyword, but forgets to
  36.543 +	give any content for it. When instructed to use this style
  36.544 +	file, Mercurial promptly complains.</para>
  36.545 +
  36.546 +      &interaction.template.svnstyle.syntax.error;
  36.547 +
  36.548 +      <para id="x_5cb">This error message looks intimidating, but it is not too
  36.549 +	hard to follow.</para>
  36.550 +
  36.551 +      <itemizedlist>
  36.552 +	<listitem><para id="x_5cc">The first component is simply Mercurial's way
  36.553 +	    of saying <quote>I am giving up</quote>.</para>
  36.554 +	  <programlisting>___abort___: broken.style:1: parse error</programlisting>
  36.555 +	</listitem>
  36.556 +	<listitem><para id="x_5cd">Next comes the name of the style file that
  36.557 +	    contains the error.</para>
  36.558 +	  <programlisting>abort: ___broken.style___:1: parse error</programlisting>
  36.559 +	</listitem>
  36.560 +	<listitem><para id="x_5ce">Following the file name is the line number
  36.561 +	    where the error was encountered.</para>
  36.562 +	  <programlisting>abort: broken.style:___1___: parse error</programlisting>
  36.563 +	</listitem>
  36.564 +	<listitem><para id="x_5cf">Finally, a description of what went
  36.565 +	    wrong.</para>
  36.566 +	  <programlisting>abort: broken.style:1: ___parse error___</programlisting>
  36.567 +	</listitem>
  36.568 +	<listitem><para id="x_5d0">The description of the problem is not always
  36.569 +	    clear (as in this case), but even when it is cryptic, it
  36.570 +	    is almost always trivial to visually inspect the offending
  36.571 +	    line in the style file and see what is wrong.</para>
  36.572 +	</listitem>
  36.573 +      </itemizedlist>
  36.574 +    </sect2>
  36.575 +
  36.576 +    <sect2>
  36.577 +      <title>Uniquely identifying a repository</title>
  36.578 +
  36.579 +      <para id="x_5d1">If you would like to be able to identify a Mercurial
  36.580 +	repository <quote>fairly uniquely</quote> using a short string
  36.581 +	as an identifier, you can use the first revision in the
  36.582 +	repository.</para>
  36.583 +
  36.584 +      &interaction.template.svnstyle.id;
  36.585 +
  36.586 +      <para id="x_5d2">This is likely to be unique, and so it is
  36.587 +	useful in many cases.  There are a few caveats.</para>
  36.588 +      <itemizedlist>
  36.589 +	<listitem><para id="x_5d3">It will not work in a completely empty
  36.590 +	    repository, because such a repository does not have a
  36.591 +	    revision zero.</para>
  36.592 +	</listitem>
  36.593 +	<listitem><para id="x_5d4">Neither will it work in the (extremely rare)
  36.594 +	    case where a repository is a merge of two or more formerly
  36.595 +	    independent repositories, and you still have those
  36.596 +	    repositories around.</para>
  36.597 +	</listitem></itemizedlist>
  36.598 +      <para id="x_5d5">Here are some uses to which you could put this
  36.599 +	identifier:</para>
  36.600 +      <itemizedlist>
  36.601 +	<listitem><para id="x_5d6">As a key into a table for a database that
  36.602 +	    manages repositories on a server.</para>
  36.603 +	</listitem>
  36.604 +	<listitem><para id="x_5d7">As half of a {<emphasis>repository
  36.605 +	      ID</emphasis>, <emphasis>revision ID</emphasis>} tuple.
  36.606 +	    Save this information away when you run an automated build
  36.607 +	    or other activity, so that you can <quote>replay</quote>
  36.608 +	    the build later if necessary.</para>
  36.609 +	</listitem>
  36.610 +      </itemizedlist>
  36.611 +    </sect2>
  36.612 +
  36.613 +    <sect2>
  36.614 +      <title>Listing files on multiple lines</title>
  36.615 +
  36.616 +      <para id="x_714">Suppose we want to list the files changed by a changeset,
  36.617 +	one per line, with a little indentation before each file
  36.618 +	name.</para>
  36.619 +
  36.620 +      &interaction.ch10-multiline.go;
  36.621 +    </sect2>
  36.622 +
  36.623 +    <sect2>
  36.624 +      <title>Mimicking Subversion's output</title>
  36.625 +
  36.626 +      <para id="x_5d8">Let's try to emulate the default output format used by
  36.627 +	another revision control tool, Subversion.</para>
  36.628 +
  36.629 +      &interaction.template.svnstyle.short;
  36.630 +
  36.631 +      <para id="x_5d9">Since Subversion's output style is fairly simple, it is
  36.632 +	easy to copy-and-paste a hunk of its output into a file, and
  36.633 +	replace the text produced above by Subversion with the
  36.634 +	template values we'd like to see expanded.</para>
  36.635 +
  36.636 +      &interaction.template.svnstyle.template;
  36.637 +
  36.638 +      <para id="x_5da">There are a few small ways in which this template deviates
  36.639 +	from the output produced by Subversion.</para>
  36.640 +      <itemizedlist>
  36.641 +	<listitem><para id="x_5db">Subversion prints a <quote>readable</quote>
  36.642 +	    date (the <quote><literal>Wed, 27 Sep 2006</literal></quote> in the
  36.643 +	    example output above) in parentheses.  Mercurial's
  36.644 +	    templating engine does not provide a way to display a date
  36.645 +	    in this format without also printing the time and time
  36.646 +	    zone.</para>
  36.647 +	</listitem>
  36.648 +	<listitem><para id="x_5dc">We emulate Subversion's printing of
  36.649 +	    <quote>separator</quote> lines full of
  36.650 +	    <quote><literal>-</literal></quote> characters by ending
  36.651 +	    the template with such a line. We use the templating
  36.652 +	    engine's <literal role="template-keyword">header</literal>
  36.653 +	    keyword to print a separator line as the first line of
  36.654 +	    output (see below), thus achieving similar output to
  36.655 +	    Subversion.</para>
  36.656 +	</listitem>
  36.657 +	<listitem><para id="x_5dd">Subversion's output includes a count in the
  36.658 +	    header of the number of lines in the commit message.  We
  36.659 +	    cannot replicate this in Mercurial; the templating engine
  36.660 +	    does not currently provide a filter that counts the number
  36.661 +	    of lines the template generates.</para>
  36.662 +	</listitem></itemizedlist>
  36.663 +      <para id="x_5de">It took me no more than a minute or two of work to replace
  36.664 +	literal text from an example of Subversion's output with some
  36.665 +	keywords and filters to give the template above.  The style
  36.666 +	file simply refers to the template.</para>
  36.667 +
  36.668 +      &interaction.template.svnstyle.style;
  36.669 +
  36.670 +      <para id="x_5df">We could have included the text of the template file
  36.671 +	directly in the style file by enclosing it in quotes and
  36.672 +	replacing the newlines with
  36.673 +	<quote><literal>\n</literal></quote> sequences, but it would
  36.674 +	have made the style file too difficult to read.  Readability
  36.675 +	is a good guide when you're trying to decide whether some text
  36.676 +	belongs in a style file, or in a template file that the style
  36.677 +	file points to.  If the style file will look too big or
  36.678 +	cluttered if you insert a literal piece of text, drop it into
  36.679 +	a template instead.</para>
  36.680 +    </sect2>
  36.681 +  </sect1>
  36.682 +</chapter>
  36.683 +
  36.684 +<!--
  36.685 +local variables: 
  36.686 +sgml-parent-document: ("00book.xml" "book" "chapter")
  36.687 +end:
  36.688 +-->
    37.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.2 +++ b/en/ch12-mq.xml	Sun Aug 16 03:41:39 2009 +0200
    37.3 @@ -0,0 +1,1368 @@
    37.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    37.5 +
    37.6 +<chapter id="chap:mq">
    37.7 +  <?dbhtml filename="managing-change-with-mercurial-queues.html"?>
    37.8 +  <title>Managing change with Mercurial Queues</title>
    37.9 +
   37.10 +  <sect1 id="sec:mq:patch-mgmt">
   37.11 +    <title>The patch management problem</title>
   37.12 +
   37.13 +    <para id="x_3ac">Here is a common scenario: you need to install a software
   37.14 +      package from source, but you find a bug that you must fix in the
   37.15 +      source before you can start using the package.  You make your
   37.16 +      changes, forget about the package for a while, and a few months
   37.17 +      later you need to upgrade to a newer version of the package.  If
   37.18 +      the newer version of the package still has the bug, you must
   37.19 +      extract your fix from the older source tree and apply it against
   37.20 +      the newer version.  This is a tedious task, and it's easy to
   37.21 +      make mistakes.</para>
   37.22 +
   37.23 +    <para id="x_3ad">This is a simple case of the <quote>patch management</quote>
   37.24 +      problem.  You have an <quote>upstream</quote> source tree that
   37.25 +      you can't change; you need to make some local changes on top of
   37.26 +      the upstream tree; and you'd like to be able to keep those
   37.27 +      changes separate, so that you can apply them to newer versions
   37.28 +      of the upstream source.</para>
   37.29 +
   37.30 +    <para id="x_3ae">The patch management problem arises in many situations.
   37.31 +      Probably the most visible is that a user of an open source
   37.32 +      software project will contribute a bug fix or new feature to the
   37.33 +      project's maintainers in the form of a patch.</para>
   37.34 +
   37.35 +    <para id="x_3af">Distributors of operating systems that include open source
   37.36 +      software often need to make changes to the packages they
   37.37 +      distribute so that they will build properly in their
   37.38 +      environments.</para>
   37.39 +
   37.40 +    <para id="x_3b0">When you have few changes to maintain, it is easy to manage
   37.41 +      a single patch using the standard <command>diff</command> and
   37.42 +      <command>patch</command> programs (see <xref
   37.43 +	linkend="sec:mq:patch"/> for a discussion of these
   37.44 +      tools). Once the number of changes grows, it starts to make
   37.45 +      sense to maintain patches as discrete <quote>chunks of
   37.46 +	work,</quote> so that for example a single patch will contain
   37.47 +      only one bug fix (the patch might modify several files, but it's
   37.48 +      doing <quote>only one thing</quote>), and you may have a number
   37.49 +      of such patches for different bugs you need fixed and local
   37.50 +      changes you require.  In this situation, if you submit a bug fix
   37.51 +      patch to the upstream maintainers of a package and they include
   37.52 +      your fix in a subsequent release, you can simply drop that
   37.53 +      single patch when you're updating to the newer release.</para>
   37.54 +
   37.55 +    <para id="x_3b1">Maintaining a single patch against an upstream tree is a
   37.56 +      little tedious and error-prone, but not difficult.  However, the
   37.57 +      complexity of the problem grows rapidly as the number of patches
   37.58 +      you have to maintain increases.  With more than a tiny number of
   37.59 +      patches in hand, understanding which ones you have applied and
   37.60 +      maintaining them moves from messy to overwhelming.</para>
   37.61 +
   37.62 +    <para id="x_3b2">Fortunately, Mercurial includes a powerful extension,
   37.63 +      Mercurial Queues (or simply <quote>MQ</quote>), that massively
   37.64 +      simplifies the patch management problem.</para>
   37.65 +
   37.66 +  </sect1>
   37.67 +  <sect1 id="sec:mq:history">
   37.68 +    <title>The prehistory of Mercurial Queues</title>
   37.69 +
   37.70 +    <para id="x_3b3">During the late 1990s, several Linux kernel developers
   37.71 +      started to maintain <quote>patch series</quote> that modified
   37.72 +      the behavior of the Linux kernel.  Some of these series were
   37.73 +      focused on stability, some on feature coverage, and others were
   37.74 +      more speculative.</para>
   37.75 +
   37.76 +    <para id="x_3b4">The sizes of these patch series grew rapidly.  In 2002,
   37.77 +      Andrew Morton published some shell scripts he had been using to
   37.78 +      automate the task of managing his patch queues.  Andrew was
   37.79 +      successfully using these scripts to manage hundreds (sometimes
   37.80 +      thousands) of patches on top of the Linux kernel.</para>
   37.81 +
   37.82 +    <sect2 id="sec:mq:quilt">
   37.83 +      <title>A patchwork quilt</title>
   37.84 +
   37.85 +      <para id="x_3b5">In early 2003, Andreas Gruenbacher and Martin Quinson
   37.86 +	borrowed the approach of Andrew's scripts and published a tool
   37.87 +	called <quote>patchwork quilt</quote>
   37.88 +	<citation>web:quilt</citation>, or simply <quote>quilt</quote>
   37.89 +	(see <citation>gruenbacher:2005</citation> for a paper
   37.90 +	describing it).  Because quilt substantially automated patch
   37.91 +	management, it rapidly gained a large following among open
   37.92 +	source software developers.</para>
   37.93 +
   37.94 +      <para id="x_3b6">Quilt manages a <emphasis>stack of patches</emphasis> on
   37.95 +	top of a directory tree. To begin, you tell quilt to manage a
   37.96 +	directory tree, and tell it which files you want to manage; it
   37.97 +	stores away the names and contents of those files.  To fix a
   37.98 +	bug, you create a new patch (using a single command), edit the
   37.99 +	files you need to fix, then <quote>refresh</quote> the
  37.100 +	patch.</para>
  37.101 +
  37.102 +      <para id="x_3b7">The refresh step causes quilt to scan the directory tree;
  37.103 +	it updates the patch with all of the changes you have made.
  37.104 +	You can create another patch on top of the first, which will
  37.105 +	track the changes required to modify the tree from <quote>tree
  37.106 +	  with one patch applied</quote> to <quote>tree with two
  37.107 +	  patches applied</quote>.</para>
  37.108 +
  37.109 +      <para id="x_3b8">You can <emphasis>change</emphasis> which patches are
  37.110 +	applied to the tree.  If you <quote>pop</quote> a patch, the
  37.111 +	changes made by that patch will vanish from the directory
  37.112 +	tree.  Quilt remembers which patches you have popped, though,
  37.113 +	so you can <quote>push</quote> a popped patch again, and the
  37.114 +	directory tree will be restored to contain the modifications
  37.115 +	in the patch.  Most importantly, you can run the
  37.116 +	<quote>refresh</quote> command at any time, and the topmost
  37.117 +	applied patch will be updated.  This means that you can, at
  37.118 +	any time, change both which patches are applied and what
  37.119 +	modifications those patches make.</para>
  37.120 +
  37.121 +      <para id="x_3b9">Quilt knows nothing about revision control tools, so it
  37.122 +	works equally well on top of an unpacked tarball or a
  37.123 +	Subversion working copy.</para>
  37.124 +    </sect2>
  37.125 +
  37.126 +    <sect2 id="sec:mq:quilt-mq">
  37.127 +      <title>From patchwork quilt to Mercurial Queues</title>
  37.128 +
  37.129 +      <para id="x_3ba">In mid-2005, Chris Mason took the features of quilt and
  37.130 +	wrote an extension that he called Mercurial Queues, which
  37.131 +	added quilt-like behavior to Mercurial.</para>
  37.132 +
  37.133 +      <para id="x_3bb">The key difference between quilt and MQ is that quilt
  37.134 +	knows nothing about revision control systems, while MQ is
  37.135 +	<emphasis>integrated</emphasis> into Mercurial.  Each patch
  37.136 +	that you push is represented as a Mercurial changeset.  Pop a
  37.137 +	patch, and the changeset goes away.</para>
  37.138 +
  37.139 +      <para id="x_3bc">Because quilt does not care about revision control tools,
  37.140 +	it is still a tremendously useful piece of software to know
  37.141 +	about for situations where you cannot use Mercurial and
  37.142 +	MQ.</para>
  37.143 +
  37.144 +    </sect2>
  37.145 +  </sect1>
  37.146 +  <sect1>
  37.147 +    <title>The huge advantage of MQ</title>
  37.148 +
  37.149 +    <para id="x_3bd">I cannot overstate the value that MQ offers through the
  37.150 +      unification of patches and revision control.</para>
  37.151 +
  37.152 +    <para id="x_3be">A major reason that patches have persisted in the free
  37.153 +      software and open source world&emdash;in spite of the
  37.154 +      availability of increasingly capable revision control tools over
  37.155 +      the years&emdash;is the <emphasis>agility</emphasis> they
  37.156 +      offer.</para>
  37.157 +
  37.158 +    <para id="x_3bf">Traditional revision control tools make a permanent,
  37.159 +      irreversible record of everything that you do.  While this has
  37.160 +      great value, it's also somewhat stifling.  If you want to
  37.161 +      perform a wild-eyed experiment, you have to be careful in how
  37.162 +      you go about it, or you risk leaving unneeded&emdash;or worse,
  37.163 +      misleading or destabilising&emdash;traces of your missteps and
  37.164 +      errors in the permanent revision record.</para>
  37.165 +
  37.166 +    <para id="x_3c0">By contrast, MQ's marriage of distributed revision control
  37.167 +      with patches makes it much easier to isolate your work.  Your
  37.168 +      patches live on top of normal revision history, and you can make
  37.169 +      them disappear or reappear at will.  If you don't like a patch,
  37.170 +      you can drop it.  If a patch isn't quite as you want it to be,
  37.171 +      simply fix it&emdash;as many times as you need to, until you
  37.172 +      have refined it into the form you desire.</para>
  37.173 +
  37.174 +    <para id="x_3c1">As an example, the integration of patches with revision
  37.175 +      control makes understanding patches and debugging their
  37.176 +      effects&emdash;and their interplay with the code they're based
  37.177 +      on&emdash;<emphasis>enormously</emphasis> easier. Since every
  37.178 +      applied patch has an associated changeset, you can give <command
  37.179 +	role="hg-cmd">hg log</command> a file name to see which
  37.180 +      changesets and patches affected the file.  You can use the
  37.181 +      <command role="hg-cmd">hg bisect</command> command to
  37.182 +      binary-search through all changesets and applied patches to see
  37.183 +      where a bug got introduced or fixed.  You can use the <command
  37.184 +	role="hg-cmd">hg annotate</command> command to see which
  37.185 +      changeset or patch modified a particular line of a source file.
  37.186 +      And so on.</para>
  37.187 +  </sect1>
  37.188 +
  37.189 +  <sect1 id="sec:mq:patch">
  37.190 +    <title>Understanding patches</title>
  37.191 +
  37.192 +    <para id="x_3c2">Because MQ doesn't hide its patch-oriented nature, it is
  37.193 +      helpful to understand what patches are, and a little about the
  37.194 +      tools that work with them.</para>
  37.195 +
  37.196 +    <para id="x_3c3">The traditional Unix <command>diff</command> command
  37.197 +      compares two files, and prints a list of differences between
  37.198 +      them. The <command>patch</command> command understands these
  37.199 +      differences as <emphasis>modifications</emphasis> to make to a
  37.200 +      file.  Take a look below for a simple example of these commands
  37.201 +      in action.</para>
  37.202 +
  37.203 +      &interaction.mq.dodiff.diff;
  37.204 +
  37.205 +    <para id="x_3c4">The type of file that <command>diff</command> generates (and
  37.206 +      <command>patch</command> takes as input) is called a
  37.207 +      <quote>patch</quote> or a <quote>diff</quote>; there is no
  37.208 +      difference between a patch and a diff.  (We'll use the term
  37.209 +      <quote>patch</quote>, since it's more commonly used.)</para>
  37.210 +
  37.211 +    <para id="x_3c5">A patch file can start with arbitrary text; the
  37.212 +      <command>patch</command> command ignores this text, but MQ uses
  37.213 +      it as the commit message when creating changesets.  To find the
  37.214 +      beginning of the patch content, <command>patch</command>
  37.215 +      searches for the first line that starts with the string
  37.216 +      <quote><literal>diff -</literal></quote>.</para>
  37.217 +
  37.218 +    <para id="x_3c6">MQ works with <emphasis>unified</emphasis> diffs
  37.219 +      (<command>patch</command> can accept several other diff formats,
  37.220 +      but MQ doesn't).  A unified diff contains two kinds of header.
  37.221 +      The <emphasis>file header</emphasis> describes the file being
  37.222 +      modified; it contains the name of the file to modify.  When
  37.223 +      <command>patch</command> sees a new file header, it looks for a
  37.224 +      file with that name to start modifying.</para>
  37.225 +
  37.226 +    <para id="x_3c7">After the file header comes a series of
  37.227 +      <emphasis>hunks</emphasis>.  Each hunk starts with a header;
  37.228 +      this identifies the range of line numbers within the file that
  37.229 +      the hunk should modify.  Following the header, a hunk starts and
  37.230 +      ends with a few (usually three) lines of text from the
  37.231 +      unmodified file; these are called the
  37.232 +      <emphasis>context</emphasis> for the hunk.  If there's only a
  37.233 +      small amount of context between successive hunks,
  37.234 +      <command>diff</command> doesn't print a new hunk header; it just
  37.235 +      runs the hunks together, with a few lines of context between
  37.236 +      modifications.</para>
  37.237 +
  37.238 +    <para id="x_3c8">Each line of context begins with a space character.  Within
  37.239 +      the hunk, a line that begins with
  37.240 +      <quote><literal>-</literal></quote> means <quote>remove this
  37.241 +	line,</quote> while a line that begins with
  37.242 +      <quote><literal>+</literal></quote> means <quote>insert this
  37.243 +	line.</quote>  For example, a line that is modified is
  37.244 +      represented by one deletion and one insertion.</para>
  37.245 +
  37.246 +    <para id="x_3c9">We will return to some of the more subtle aspects of patches
  37.247 +      later (in <xref linkend="sec:mq:adv-patch"/>), but you
  37.248 +      should have
  37.249 +      enough information now to use MQ.</para>
  37.250 +  </sect1>
  37.251 +
  37.252 +  <sect1 id="sec:mq:start">
  37.253 +    <title>Getting started with Mercurial Queues</title>
  37.254 +
  37.255 +    <para id="x_3ca">Because MQ is implemented as an extension, you must
  37.256 +      explicitly enable before you can use it.  (You don't need to
  37.257 +      download anything; MQ ships with the standard Mercurial
  37.258 +      distribution.)  To enable MQ, edit your <filename
  37.259 +	role="home">~/.hgrc</filename> file, and add the lines
  37.260 +      below.</para>
  37.261 +
  37.262 +    <programlisting>[extensions]
  37.263 +hgext.mq =</programlisting>
  37.264 +
  37.265 +    <para id="x_3cb">Once the extension is enabled, it will make a number of new
  37.266 +      commands available.  To verify that the extension is working,
  37.267 +      you can use <command role="hg-cmd">hg help</command> to see if
  37.268 +      the <command role="hg-ext-mq">qinit</command> command is now
  37.269 +      available.</para>
  37.270 +
  37.271 +    &interaction.mq.qinit-help.help;
  37.272 +
  37.273 +    <para id="x_3cc">You can use MQ with <emphasis>any</emphasis> Mercurial
  37.274 +      repository, and its commands only operate within that
  37.275 +      repository.  To get started, simply prepare the repository using
  37.276 +      the <command role="hg-ext-mq">qinit</command> command.</para>
  37.277 +
  37.278 +    &interaction.mq.tutorial.qinit;
  37.279 +
  37.280 +    <para id="x_3cd">This command creates an empty directory called <filename
  37.281 +	role="special" class="directory">.hg/patches</filename>, where
  37.282 +      MQ will keep its metadata.  As with many Mercurial commands, the
  37.283 +      <command role="hg-ext-mq">qinit</command> command prints nothing
  37.284 +      if it succeeds.</para>
  37.285 +
  37.286 +    <sect2>
  37.287 +      <title>Creating a new patch</title>
  37.288 +
  37.289 +      <para id="x_3ce">To begin work on a new patch, use the <command
  37.290 +	  role="hg-ext-mq">qnew</command> command.  This command takes
  37.291 +	one argument, the name of the patch to create.</para>
  37.292 +
  37.293 +      <para id="x_3cf">MQ will use this as the name of an actual file in the
  37.294 +	<filename role="special"
  37.295 +	  class="directory">.hg/patches</filename> directory, as you
  37.296 +	can see below.</para>
  37.297 +
  37.298 +      &interaction.mq.tutorial.qnew;
  37.299 +
  37.300 +      <para id="x_3d0">Also newly present in the <filename role="special"
  37.301 +	  class="directory">.hg/patches</filename> directory are two
  37.302 +	other files, <filename role="special">series</filename> and
  37.303 +	<filename role="special">status</filename>.  The <filename
  37.304 +	  role="special">series</filename> file lists all of the
  37.305 +	patches that MQ knows about for this repository, with one
  37.306 +	patch per line.  Mercurial uses the <filename
  37.307 +	  role="special">status</filename> file for internal
  37.308 +	book-keeping; it tracks all of the patches that MQ has
  37.309 +	<emphasis>applied</emphasis> in this repository.</para>
  37.310 +
  37.311 +      <note>
  37.312 +	<para id="x_3d1">  You may sometimes want to edit the <filename
  37.313 +	    role="special">series</filename> file by hand; for
  37.314 +	  example, to change the sequence in which some patches are
  37.315 +	  applied.  However, manually editing the <filename
  37.316 +	    role="special">status</filename> file is almost always a
  37.317 +	  bad idea, as it's easy to corrupt MQ's idea of what is
  37.318 +	  happening.</para>
  37.319 +      </note>
  37.320 +
  37.321 +      <para id="x_3d2">Once you have created your new patch, you can edit files
  37.322 +	in the working directory as you usually would.  All of the
  37.323 +	normal Mercurial commands, such as <command role="hg-cmd">hg
  37.324 +	  diff</command> and <command role="hg-cmd">hg
  37.325 +	  annotate</command>, work exactly as they did before.</para>
  37.326 +    </sect2>
  37.327 +
  37.328 +    <sect2>
  37.329 +      <title>Refreshing a patch</title>
  37.330 +
  37.331 +      <para id="x_3d3">When you reach a point where you want to save your work,
  37.332 +	use the <command role="hg-ext-mq">qrefresh</command> command
  37.333 +	to update the patch you are working on.</para>
  37.334 +
  37.335 +      &interaction.mq.tutorial.qrefresh;
  37.336 +
  37.337 +      <para id="x_3d4">This command folds the changes you have made in the
  37.338 +	working directory into your patch, and updates its
  37.339 +	corresponding changeset to contain those changes.</para>
  37.340 +
  37.341 +      <para id="x_3d5">You can run <command role="hg-ext-mq">qrefresh</command>
  37.342 +	as often as you like, so it's a good way to
  37.343 +	<quote>checkpoint</quote> your work.  Refresh your patch at an
  37.344 +	opportune time; try an experiment; and if the experiment
  37.345 +	doesn't work out, <command role="hg-cmd">hg revert</command>
  37.346 +	your modifications back to the last time you refreshed.</para>
  37.347 +
  37.348 +      &interaction.mq.tutorial.qrefresh2;
  37.349 +    </sect2>
  37.350 +
  37.351 +    <sect2>
  37.352 +      <title>Stacking and tracking patches</title>
  37.353 +
  37.354 +      <para id="x_3d6">Once you have finished working on a patch, or need to work
  37.355 +	on another, you can use the <command
  37.356 +	  role="hg-ext-mq">qnew</command> command again to create a
  37.357 +	new patch. Mercurial will apply this patch on top of your
  37.358 +	existing patch.</para>
  37.359 +
  37.360 +      &interaction.mq.tutorial.qnew2;
  37.361 +
  37.362 +      <para id="x_3d7">Notice that the patch contains the changes in our prior
  37.363 +	patch as part of its context (you can see this more clearly in
  37.364 +	the output of <command role="hg-cmd">hg
  37.365 +	  annotate</command>).</para>
  37.366 +
  37.367 +      <para id="x_3d8">So far, with the exception of <command
  37.368 +	  role="hg-ext-mq">qnew</command> and <command
  37.369 +	  role="hg-ext-mq">qrefresh</command>, we've been careful to
  37.370 +	only use regular Mercurial commands.  However, MQ provides
  37.371 +	many commands that are easier to use when you are thinking
  37.372 +	about patches, as illustrated below.</para>
  37.373 +
  37.374 +      &interaction.mq.tutorial.qseries;
  37.375 +
  37.376 +      <itemizedlist>
  37.377 +	<listitem><para id="x_3d9">The <command
  37.378 +	      role="hg-ext-mq">qseries</command> command lists every
  37.379 +	    patch that MQ knows about in this repository, from oldest
  37.380 +	    to newest (most recently
  37.381 +	    <emphasis>created</emphasis>).</para>
  37.382 +	</listitem>
  37.383 +	<listitem><para id="x_3da">The <command
  37.384 +	      role="hg-ext-mq">qapplied</command> command lists every
  37.385 +	    patch that MQ has <emphasis>applied</emphasis> in this
  37.386 +	    repository, again from oldest to newest (most recently
  37.387 +	    applied).</para>
  37.388 +	</listitem></itemizedlist>
  37.389 +    </sect2>
  37.390 +
  37.391 +    <sect2>
  37.392 +      <title>Manipulating the patch stack</title>
  37.393 +
  37.394 +      <para id="x_3db">The previous discussion implied that there must be a
  37.395 +	difference between <quote>known</quote> and
  37.396 +	<quote>applied</quote> patches, and there is.  MQ can manage a
  37.397 +	patch without it being applied in the repository.</para>
  37.398 +
  37.399 +      <para id="x_3dc">An <emphasis>applied</emphasis> patch has a corresponding
  37.400 +	changeset in the repository, and the effects of the patch and
  37.401 +	changeset are visible in the working directory.  You can undo
  37.402 +	the application of a patch using the <command
  37.403 +	  role="hg-ext-mq">qpop</command> command.  MQ still
  37.404 +	<emphasis>knows about</emphasis>, or manages, a popped patch,
  37.405 +	but the patch no longer has a corresponding changeset in the
  37.406 +	repository, and the working directory does not contain the
  37.407 +	changes made by the patch.  <xref
  37.408 +	  linkend="fig:mq:stack"/> illustrates
  37.409 +	the difference between applied and tracked patches.</para>
  37.410 +
  37.411 +      <figure id="fig:mq:stack">
  37.412 +	<title>Applied and unapplied patches in the MQ patch
  37.413 +	  stack</title>
  37.414 +	<mediaobject>
  37.415 +	  <imageobject><imagedata fileref="figs/mq-stack.png"/></imageobject>
  37.416 +	  <textobject><phrase>XXX add text</phrase></textobject>
  37.417 +	</mediaobject>
  37.418 +      </figure>
  37.419 +
  37.420 +      <para id="x_3de">You can reapply an unapplied, or popped, patch using the
  37.421 +	<command role="hg-ext-mq">qpush</command> command.  This
  37.422 +	creates a new changeset to correspond to the patch, and the
  37.423 +	patch's changes once again become present in the working
  37.424 +	directory.  See below for examples of <command
  37.425 +	  role="hg-ext-mq">qpop</command> and <command
  37.426 +	  role="hg-ext-mq">qpush</command> in action.</para>
  37.427 +
  37.428 +      &interaction.mq.tutorial.qpop;
  37.429 +
  37.430 +      <para id="x_3df">Notice that once we have popped a patch or two patches,
  37.431 +	the output of <command role="hg-ext-mq">qseries</command>
  37.432 +	remains the same, while that of <command
  37.433 +	  role="hg-ext-mq">qapplied</command> has changed.</para>
  37.434 +
  37.435 +    </sect2>
  37.436 +
  37.437 +    <sect2>
  37.438 +      <title>Pushing and popping many patches</title>
  37.439 +
  37.440 +      <para id="x_3e0">While <command role="hg-ext-mq">qpush</command> and
  37.441 +	<command role="hg-ext-mq">qpop</command> each operate on a
  37.442 +	single patch at a time by default, you can push and pop many
  37.443 +	patches in one go.  The <option
  37.444 +	  role="hg-ext-mq-cmd-qpush-opt">hg -a</option> option to
  37.445 +	<command role="hg-ext-mq">qpush</command> causes it to push
  37.446 +	all unapplied patches, while the <option
  37.447 +	  role="hg-ext-mq-cmd-qpop-opt">-a</option> option to <command
  37.448 +	  role="hg-ext-mq">qpop</command> causes it to pop all applied
  37.449 +	patches.  (For some more ways to push and pop many patches,
  37.450 +	see <xref linkend="sec:mq:perf"/> below.)</para>
  37.451 +
  37.452 +      &interaction.mq.tutorial.qpush-a;
  37.453 +    </sect2>
  37.454 +
  37.455 +    <sect2>
  37.456 +      <title>Safety checks, and overriding them</title>
  37.457 +
  37.458 +      <para id="x_3e1">Several MQ commands check the working directory before
  37.459 +	they do anything, and fail if they find any modifications.
  37.460 +	They do this to ensure that you won't lose any changes that
  37.461 +	you have made, but not yet incorporated into a patch.  The
  37.462 +	example below illustrates this; the <command
  37.463 +	  role="hg-ext-mq">qnew</command> command will not create a
  37.464 +	new patch if there are outstanding changes, caused in this
  37.465 +	case by the <command role="hg-cmd">hg add</command> of
  37.466 +	<filename>file3</filename>.</para>
  37.467 +
  37.468 +      &interaction.mq.tutorial.add;
  37.469 +
  37.470 +      <para id="x_3e2">Commands that check the working directory all take an
  37.471 +	<quote>I know what I'm doing</quote> option, which is always
  37.472 +	named <option>-f</option>.  The exact meaning of
  37.473 +	<option>-f</option> depends on the command.  For example,
  37.474 +	<command role="hg-cmd">hg qnew <option
  37.475 +	    role="hg-ext-mq-cmd-qnew-opt">hg -f</option></command>
  37.476 +	will incorporate any outstanding changes into the new patch it
  37.477 +	creates, but <command role="hg-cmd">hg qpop <option
  37.478 +	    role="hg-ext-mq-cmd-qpop-opt">hg -f</option></command>
  37.479 +	will revert modifications to any files affected by the patch
  37.480 +	that it is popping.  Be sure to read the documentation for a
  37.481 +	command's <option>-f</option> option before you use it!</para>
  37.482 +    </sect2>
  37.483 +
  37.484 +    <sect2>
  37.485 +      <title>Working on several patches at once</title>
  37.486 +
  37.487 +      <para id="x_3e3">The <command role="hg-ext-mq">qrefresh</command> command
  37.488 +	always refreshes the <emphasis>topmost</emphasis> applied
  37.489 +	patch.  This means that you can suspend work on one patch (by
  37.490 +	refreshing it), pop or push to make a different patch the top,
  37.491 +	and work on <emphasis>that</emphasis> patch for a
  37.492 +	while.</para>
  37.493 +
  37.494 +      <para id="x_3e4">Here's an example that illustrates how you can use this
  37.495 +	ability. Let's say you're developing a new feature as two
  37.496 +	patches.  The first is a change to the core of your software,
  37.497 +	and the second&emdash;layered on top of the
  37.498 +	first&emdash;changes the user interface to use the code you
  37.499 +	just added to the core.  If you notice a bug in the core while
  37.500 +	you're working on the UI patch, it's easy to fix the core.
  37.501 +	Simply <command role="hg-ext-mq">qrefresh</command> the UI
  37.502 +	patch to save your in-progress changes, and <command
  37.503 +	  role="hg-ext-mq">qpop</command> down to the core patch.  Fix
  37.504 +	the core bug, <command role="hg-ext-mq">qrefresh</command> the
  37.505 +	core patch, and <command role="hg-ext-mq">qpush</command> back
  37.506 +	to the UI patch to continue where you left off.</para>
  37.507 +    </sect2>
  37.508 +  </sect1>
  37.509 +
  37.510 +  <sect1 id="sec:mq:adv-patch">
  37.511 +    <title>More about patches</title>
  37.512 +
  37.513 +    <para id="x_3e5">MQ uses the GNU <command>patch</command> command to apply
  37.514 +      patches, so it's helpful to know a few more detailed aspects of
  37.515 +      how <command>patch</command> works, and about patches
  37.516 +      themselves.</para>
  37.517 +
  37.518 +    <sect2>
  37.519 +      <title>The strip count</title>
  37.520 +
  37.521 +      <para id="x_3e6">If you look at the file headers in a patch, you will
  37.522 +	notice that the pathnames usually have an extra component on
  37.523 +	the front that isn't present in the actual path name.  This is
  37.524 +	a holdover from the way that people used to generate patches
  37.525 +	(people still do this, but it's somewhat rare with modern
  37.526 +	revision control tools).</para>
  37.527 +
  37.528 +      <para id="x_3e7">Alice would unpack a tarball, edit her files, then decide
  37.529 +	that she wanted to create a patch.  So she'd rename her
  37.530 +	working directory, unpack the tarball again (hence the need
  37.531 +	for the rename), and use the <option
  37.532 +	  role="cmd-opt-diff">-r</option> and <option
  37.533 +	  role="cmd-opt-diff">-N</option> options to
  37.534 +	<command>diff</command> to recursively generate a patch
  37.535 +	between the unmodified directory and the modified one.  The
  37.536 +	result would be that the name of the unmodified directory
  37.537 +	would be at the front of the left-hand path in every file
  37.538 +	header, and the name of the modified directory would be at the
  37.539 +	front of the right-hand path.</para>
  37.540 +
  37.541 +      <para id="x_3e8">Since someone receiving a patch from the Alices of the net
  37.542 +	would be unlikely to have unmodified and modified directories
  37.543 +	with exactly the same names, the <command>patch</command>
  37.544 +	command has a <option role="cmd-opt-patch">-p</option> option
  37.545 +	that indicates the number of leading path name components to
  37.546 +	strip when trying to apply a patch.  This number is called the
  37.547 +	<emphasis>strip count</emphasis>.</para>
  37.548 +
  37.549 +      <para id="x_3e9">An option of <quote><literal>-p1</literal></quote> means
  37.550 +	<quote>use a strip count of one</quote>.  If
  37.551 +	<command>patch</command> sees a file name
  37.552 +	<filename>foo/bar/baz</filename> in a file header, it will
  37.553 +	strip <filename>foo</filename> and try to patch a file named
  37.554 +	<filename>bar/baz</filename>.  (Strictly speaking, the strip
  37.555 +	count refers to the number of <emphasis>path
  37.556 +	  separators</emphasis> (and the components that go with them
  37.557 +	) to strip.  A strip count of one will turn
  37.558 +	<filename>foo/bar</filename> into <filename>bar</filename>,
  37.559 +	but <filename>/foo/bar</filename> (notice the extra leading
  37.560 +	slash) into <filename>foo/bar</filename>.)</para>
  37.561 +
  37.562 +      <para id="x_3ea">The <quote>standard</quote> strip count for patches is
  37.563 +	one; almost all patches contain one leading path name
  37.564 +	component that needs to be stripped. Mercurial's <command
  37.565 +	  role="hg-cmd">hg diff</command> command generates path names
  37.566 +	in this form, and the <command role="hg-cmd">hg
  37.567 +	  import</command> command and MQ expect patches to have a
  37.568 +	strip count of one.</para>
  37.569 +
  37.570 +      <para id="x_3eb">If you receive a patch from someone that you want to add
  37.571 +	to your patch queue, and the patch needs a strip count other
  37.572 +	than one, you cannot just <command
  37.573 +	  role="hg-ext-mq">qimport</command> the patch, because
  37.574 +	<command role="hg-ext-mq">qimport</command> does not yet have
  37.575 +	a <literal>-p</literal> option (see <ulink role="hg-bug"
  37.576 +	  url="http://www.selenic.com/mercurial/bts/issue311">issue
  37.577 +	  311</ulink>).  Your best bet is to <command
  37.578 +	  role="hg-ext-mq">qnew</command> a patch of your own, then
  37.579 +	use <command>patch -pN</command> to apply their patch,
  37.580 +	followed by <command role="hg-cmd">hg addremove</command> to
  37.581 +	pick up any files added or removed by the patch, followed by
  37.582 +	<command role="hg-ext-mq">hg qrefresh</command>. This
  37.583 +	complexity may become unnecessary; see <ulink role="hg-bug"
  37.584 +	  url="http://www.selenic.com/mercurial/bts/issue311">issue
  37.585 +	  311</ulink> for details.
  37.586 +      </para>
  37.587 +    </sect2>
  37.588 +
  37.589 +    <sect2>
  37.590 +      <title>Strategies for applying a patch</title>
  37.591 +
  37.592 +      <para id="x_3ec">When <command>patch</command> applies a hunk, it tries a
  37.593 +	handful of successively less accurate strategies to try to
  37.594 +	make the hunk apply. This falling-back technique often makes
  37.595 +	it possible to take a patch that was generated against an old
  37.596 +	version of a file, and apply it against a newer version of
  37.597 +	that file.</para>
  37.598 +
  37.599 +      <para id="x_3ed">First, <command>patch</command> tries an exact match,
  37.600 +	where the line numbers, the context, and the text to be
  37.601 +	modified must apply exactly.  If it cannot make an exact
  37.602 +	match, it tries to find an exact match for the context,
  37.603 +	without honouring the line numbering information.  If this
  37.604 +	succeeds, it prints a line of output saying that the hunk was
  37.605 +	applied, but at some <emphasis>offset</emphasis> from the
  37.606 +	original line number.</para>
  37.607 +
  37.608 +      <para id="x_3ee">If a context-only match fails, <command>patch</command>
  37.609 +	removes the first and last lines of the context, and tries a
  37.610 +	<emphasis>reduced</emphasis> context-only match.  If the hunk
  37.611 +	with reduced context succeeds, it prints a message saying that
  37.612 +	it applied the hunk with a <emphasis>fuzz factor</emphasis>
  37.613 +	(the number after the fuzz factor indicates how many lines of
  37.614 +	context <command>patch</command> had to trim before the patch
  37.615 +	applied).</para>
  37.616 +
  37.617 +      <para id="x_3ef">When neither of these techniques works,
  37.618 +	<command>patch</command> prints a message saying that the hunk
  37.619 +	in question was rejected.  It saves rejected hunks (also
  37.620 +	simply called <quote>rejects</quote>) to a file with the same
  37.621 +	name, and an added <filename role="special">.rej</filename>
  37.622 +	extension.  It also saves an unmodified copy of the file with
  37.623 +	a <filename role="special">.orig</filename> extension; the
  37.624 +	copy of the file without any extensions will contain any
  37.625 +	changes made by hunks that <emphasis>did</emphasis> apply
  37.626 +	cleanly.  If you have a patch that modifies
  37.627 +	<filename>foo</filename> with six hunks, and one of them fails
  37.628 +	to apply, you will have: an unmodified
  37.629 +	<filename>foo.orig</filename>, a <filename>foo.rej</filename>
  37.630 +	containing one hunk, and <filename>foo</filename>, containing
  37.631 +	the changes made by the five successful hunks.</para>
  37.632 +    </sect2>
  37.633 +
  37.634 +    <sect2>
  37.635 +      <title>Some quirks of patch representation</title>
  37.636 +
  37.637 +      <para id="x_3f0">There are a few useful things to know about how
  37.638 +	<command>patch</command> works with files.</para>
  37.639 +      <itemizedlist>
  37.640 +	<listitem><para id="x_3f1">This should already be obvious, but
  37.641 +	    <command>patch</command> cannot handle binary
  37.642 +	    files.</para>
  37.643 +	</listitem>
  37.644 +	<listitem><para id="x_3f2">Neither does it care about the executable bit;
  37.645 +	    it creates new files as readable, but not
  37.646 +	    executable.</para>
  37.647 +	</listitem>
  37.648 +	<listitem><para id="x_3f3"><command>patch</command> treats the removal of
  37.649 +	    a file as a diff between the file to be removed and the
  37.650 +	    empty file.  So your idea of <quote>I deleted this
  37.651 +	      file</quote> looks like <quote>every line of this file
  37.652 +	      was deleted</quote> in a patch.</para>
  37.653 +	</listitem>
  37.654 +	<listitem><para id="x_3f4">It treats the addition of a file as a diff
  37.655 +	    between the empty file and the file to be added.  So in a
  37.656 +	    patch, your idea of <quote>I added this file</quote> looks
  37.657 +	    like <quote>every line of this file was
  37.658 +	      added</quote>.</para>
  37.659 +	</listitem>
  37.660 +	<listitem><para id="x_3f5">It treats a renamed file as the removal of the
  37.661 +	    old name, and the addition of the new name.  This means
  37.662 +	    that renamed files have a big footprint in patches.  (Note
  37.663 +	    also that Mercurial does not currently try to infer when
  37.664 +	    files have been renamed or copied in a patch.)</para>
  37.665 +	</listitem>
  37.666 +	<listitem><para id="x_3f6"><command>patch</command> cannot represent
  37.667 +	    empty files, so you cannot use a patch to represent the
  37.668 +	    notion <quote>I added this empty file to the
  37.669 +	      tree</quote>.</para>
  37.670 +	</listitem></itemizedlist>
  37.671 +    </sect2>
  37.672 +
  37.673 +    <sect2>
  37.674 +      <title>Beware the fuzz</title>
  37.675 +
  37.676 +      <para id="x_3f7">While applying a hunk at an offset, or with a fuzz factor,
  37.677 +	will often be completely successful, these inexact techniques
  37.678 +	naturally leave open the possibility of corrupting the patched
  37.679 +	file.  The most common cases typically involve applying a
  37.680 +	patch twice, or at an incorrect location in the file.  If
  37.681 +	<command>patch</command> or <command
  37.682 +	  role="hg-ext-mq">qpush</command> ever mentions an offset or
  37.683 +	fuzz factor, you should make sure that the modified files are
  37.684 +	correct afterwards.</para>
  37.685 +
  37.686 +      <para id="x_3f8">It's often a good idea to refresh a patch that has applied
  37.687 +	with an offset or fuzz factor; refreshing the patch generates
  37.688 +	new context information that will make it apply cleanly.  I
  37.689 +	say <quote>often,</quote> not <quote>always,</quote> because
  37.690 +	sometimes refreshing a patch will make it fail to apply
  37.691 +	against a different revision of the underlying files.  In some
  37.692 +	cases, such as when you're maintaining a patch that must sit
  37.693 +	on top of multiple versions of a source tree, it's acceptable
  37.694 +	to have a patch apply with some fuzz, provided you've verified
  37.695 +	the results of the patching process in such cases.</para>
  37.696 +    </sect2>
  37.697 +
  37.698 +    <sect2>
  37.699 +      <title>Handling rejection</title>
  37.700 +
  37.701 +      <para id="x_3f9">If <command role="hg-ext-mq">qpush</command> fails to
  37.702 +	apply a patch, it will print an error message and exit.  If it
  37.703 +	has left <filename role="special">.rej</filename> files
  37.704 +	behind, it is usually best to fix up the rejected hunks before
  37.705 +	you push more patches or do any further work.</para>
  37.706 +
  37.707 +      <para id="x_3fa">If your patch <emphasis>used to</emphasis> apply cleanly,
  37.708 +	and no longer does because you've changed the underlying code
  37.709 +	that your patches are based on, Mercurial Queues can help; see
  37.710 +	<xref linkend="sec:mq:merge"/> for details.</para>
  37.711 +
  37.712 +      <para id="x_3fb">Unfortunately, there aren't any great techniques for
  37.713 +	dealing with rejected hunks.  Most often, you'll need to view
  37.714 +	the <filename role="special">.rej</filename> file and edit the
  37.715 +	target file, applying the rejected hunks by hand.</para>
  37.716 +
  37.717 +      <para id="x_3fd">A Linux kernel hacker, Chris Mason (the author
  37.718 +	of Mercurial Queues), wrote a tool called
  37.719 +	<command>mpatch</command> (<ulink
  37.720 +	  url="http://oss.oracle.com/~mason/mpatch/">http://oss.oracle.com/~mason/mpatch/</ulink>), 
  37.721 +	which takes a simple approach to automating the application of
  37.722 +	hunks rejected by <command>patch</command>.  The
  37.723 +	<command>mpatch</command> command can help with four common
  37.724 +	reasons that a hunk may be rejected:</para>
  37.725 +
  37.726 +      <itemizedlist>
  37.727 +	<listitem><para id="x_3fe">The context in the middle of a hunk has
  37.728 +	    changed.</para>
  37.729 +	</listitem>
  37.730 +	<listitem><para id="x_3ff">A hunk is missing some context at the
  37.731 +	    beginning or end.</para>
  37.732 +	</listitem>
  37.733 +	<listitem><para id="x_400">A large hunk might apply better&emdash;either
  37.734 +	    entirely or in part&emdash;if it was broken up into
  37.735 +	    smaller hunks.</para>
  37.736 +	</listitem>
  37.737 +	<listitem><para id="x_401">A hunk removes lines with slightly different
  37.738 +	    content than those currently present in the file.</para>
  37.739 +	</listitem></itemizedlist>
  37.740 +
  37.741 +      <para id="x_402">If you use <command>mpatch</command>, you
  37.742 +	should be doubly careful to check your results when you're
  37.743 +	done.  In fact, <command>mpatch</command> enforces this method
  37.744 +	of double-checking the tool's output, by automatically
  37.745 +	dropping you into a merge program when it has done its job, so
  37.746 +	that you can verify its work and finish off any remaining
  37.747 +	merges.</para>
  37.748 +    </sect2>
  37.749 +  </sect1>
  37.750 +
  37.751 +  <sect1>
  37.752 +    <title>More on patch management</title>
  37.753 +
  37.754 +    <para id="x_6db">As you grow familiar with MQ, you will find yourself wanting
  37.755 +      to perform other kinds of patch management operations.</para>
  37.756 +
  37.757 +    <sect2>
  37.758 +      <title>Deleting unwanted patches</title>
  37.759 +
  37.760 +      <para id="x_6dc">If you want to get rid of a patch, use the <command
  37.761 +	  role="hg-ext-mq">hg qdelete</command> command to delete the
  37.762 +	patch file and remove its entry from the patch series.  If you
  37.763 +	try to delete a patch that is still applied, <command
  37.764 +	  role="hg-ext-mq">hg qdelete</command> will refuse.</para>
  37.765 +
  37.766 +      &interaction.ch11-qdelete.go;
  37.767 +    </sect2>
  37.768 +
  37.769 +    <sect2>
  37.770 +      <title>Converting to and from permanent revisions</title>
  37.771 +
  37.772 +      <para id="x_6dd">Once you're done working on a patch and want to
  37.773 +      turn it into a permanent changeset, use the <command
  37.774 +      role="hg-ext-mq">hg qfinish</command> command. Pass a revision
  37.775 +      to the command to identify the patch that you want to turn into
  37.776 +      a regular changeset; this patch must already be applied.</para>
  37.777 +
  37.778 +      &interaction.ch11-qdelete.convert;
  37.779 +
  37.780 +      <para id="x_6e0">The <command role="hg-ext-mq">hg qfinish</command> command
  37.781 +        accepts an <option>--all</option> or <option>-a</option>
  37.782 +        option, which turns all applied patches into regular
  37.783 +        changesets.</para>
  37.784 +
  37.785 +      <para id="x_6de">It is also possible to turn an existing changeset into a
  37.786 +	patch, by passing the <option>-r</option> option to <command
  37.787 +	  role="hg-ext-mq">hg qimport</command>.</para>
  37.788 +
  37.789 +      &interaction.ch11-qdelete.import;
  37.790 +
  37.791 +      <para id="x_6df">Note that it only makes sense to convert a changeset into
  37.792 +	a patch if you have not propagated that changeset into any
  37.793 +	other repositories.  The imported changeset's ID will change
  37.794 +	every time you refresh the patch, which will make Mercurial
  37.795 +	treat it as unrelated to the original changeset if you have
  37.796 +	pushed it somewhere else.</para>
  37.797 +    </sect2>
  37.798 +  </sect1>
  37.799 +
  37.800 +  <sect1 id="sec:mq:perf">
  37.801 +    <title>Getting the best performance out of MQ</title>
  37.802 +
  37.803 +    <para id="x_403">MQ is very efficient at handling a large number
  37.804 +      of patches. I ran some performance experiments in mid-2006 for a
  37.805 +      talk that I gave at the 2006 EuroPython conference (on modern
  37.806 +      hardware, you should expect better performance than you'll see
  37.807 +      below).  I used as my data set the Linux 2.6.17-mm1 patch
  37.808 +      series, which consists of 1,738 patches. I applied these on top
  37.809 +      of a Linux kernel repository containing all 27,472 revisions
  37.810 +      between Linux 2.6.12-rc2 and Linux 2.6.17.</para>
  37.811 +
  37.812 +    <para id="x_404">On my old, slow laptop, I was able to <command
  37.813 +	role="hg-cmd">hg qpush <option
  37.814 +	  role="hg-ext-mq-cmd-qpush-opt">hg -a</option></command> all
  37.815 +      1,738 patches in 3.5 minutes, and <command role="hg-cmd">hg qpop
  37.816 +	<option role="hg-ext-mq-cmd-qpop-opt">hg -a</option></command>
  37.817 +      them all in 30 seconds.  (On a newer laptop, the time to push
  37.818 +      all patches dropped to two minutes.)  I could <command
  37.819 +	role="hg-ext-mq">qrefresh</command> one of the biggest patches
  37.820 +      (which made 22,779 lines of changes to 287 files) in 6.6
  37.821 +      seconds.</para>
  37.822 +
  37.823 +    <para id="x_405">Clearly, MQ is well suited to working in large trees, but
  37.824 +      there are a few tricks you can use to get the best performance
  37.825 +      of it.</para>
  37.826 +
  37.827 +    <para id="x_406">First of all, try to <quote>batch</quote> operations
  37.828 +      together.  Every time you run <command
  37.829 +	role="hg-ext-mq">qpush</command> or <command
  37.830 +	role="hg-ext-mq">qpop</command>, these commands scan the
  37.831 +      working directory once to make sure you haven't made some
  37.832 +      changes and then forgotten to run <command
  37.833 +	role="hg-ext-mq">qrefresh</command>.  On a small tree, the
  37.834 +      time that this scan takes is unnoticeable.  However, on a
  37.835 +      medium-sized tree (containing tens of thousands of files), it
  37.836 +      can take a second or more.</para>
  37.837 +
  37.838 +    <para id="x_407">The <command role="hg-ext-mq">qpush</command> and <command
  37.839 +	role="hg-ext-mq">qpop</command> commands allow you to push and
  37.840 +      pop multiple patches at a time.  You can identify the
  37.841 +      <quote>destination patch</quote> that you want to end up at.
  37.842 +      When you <command role="hg-ext-mq">qpush</command> with a
  37.843 +      destination specified, it will push patches until that patch is
  37.844 +      at the top of the applied stack.  When you <command
  37.845 +	role="hg-ext-mq">qpop</command> to a destination, MQ will pop
  37.846 +      patches until the destination patch is at the top.</para>
  37.847 +
  37.848 +    <para id="x_408">You can identify a destination patch using either the name
  37.849 +      of the patch, or by number.  If you use numeric addressing,
  37.850 +      patches are counted from zero; this means that the first patch
  37.851 +      is zero, the second is one, and so on.</para>
  37.852 +  </sect1>
  37.853 +
  37.854 +  <sect1 id="sec:mq:merge">
  37.855 +    <title>Updating your patches when the underlying code
  37.856 +      changes</title>
  37.857 +
  37.858 +    <para id="x_409">It's common to have a stack of patches on top of an
  37.859 +      underlying repository that you don't modify directly.  If you're
  37.860 +      working on changes to third-party code, or on a feature that is
  37.861 +      taking longer to develop than the rate of change of the code
  37.862 +      beneath, you will often need to sync up with the underlying
  37.863 +      code, and fix up any hunks in your patches that no longer apply.
  37.864 +      This is called <emphasis>rebasing</emphasis> your patch
  37.865 +      series.</para>
  37.866 +
  37.867 +    <para id="x_40a">The simplest way to do this is to <command role="hg-cmd">hg
  37.868 +	qpop <option role="hg-ext-mq-cmd-qpop-opt">hg
  37.869 +	  -a</option></command> your patches, then <command
  37.870 +	role="hg-cmd">hg pull</command> changes into the underlying
  37.871 +      repository, and finally <command role="hg-cmd">hg qpush <option
  37.872 +	  role="hg-ext-mq-cmd-qpop-opt">hg -a</option></command> your
  37.873 +      patches again.  MQ will stop pushing any time it runs across a
  37.874 +      patch that fails to apply during conflicts, allowing you to fix
  37.875 +      your conflicts, <command role="hg-ext-mq">qrefresh</command> the
  37.876 +      affected patch, and continue pushing until you have fixed your
  37.877 +      entire stack.</para>
  37.878 +
  37.879 +    <para id="x_40b">This approach is easy to use and works well if you don't
  37.880 +      expect changes to the underlying code to affect how well your
  37.881 +      patches apply. If your patch stack touches code that is modified
  37.882 +      frequently or invasively in the underlying repository, however,
  37.883 +      fixing up rejected hunks by hand quickly becomes
  37.884 +      tiresome.</para>
  37.885 +
  37.886 +    <para id="x_40c">It's possible to partially automate the rebasing process.
  37.887 +      If your patches apply cleanly against some revision of the
  37.888 +      underlying repo, MQ can use this information to help you to
  37.889 +      resolve conflicts between your patches and a different
  37.890 +      revision.</para>
  37.891 +
  37.892 +    <para id="x_40d">The process is a little involved.</para>
  37.893 +    <orderedlist>
  37.894 +      <listitem><para id="x_40e">To begin, <command role="hg-cmd">hg qpush
  37.895 +	    -a</command> all of your patches on top of the revision
  37.896 +	  where you know that they apply cleanly.</para>
  37.897 +      </listitem>
  37.898 +      <listitem><para id="x_40f">Save a backup copy of your patch directory using
  37.899 +	  <command role="hg-cmd">hg qsave <option
  37.900 +	      role="hg-ext-mq-cmd-qsave-opt">hg -e</option> <option
  37.901 +	      role="hg-ext-mq-cmd-qsave-opt">hg -c</option></command>.
  37.902 +	  This prints the name of the directory that it has saved the
  37.903 +	  patches in.  It will save the patches to a directory called
  37.904 +	  <filename role="special"
  37.905 +	    class="directory">.hg/patches.N</filename>, where
  37.906 +	  <literal>N</literal> is a small integer.  It also commits a
  37.907 +	  <quote>save changeset</quote> on top of your applied
  37.908 +	  patches; this is for internal book-keeping, and records the
  37.909 +	  states of the <filename role="special">series</filename> and
  37.910 +	  <filename role="special">status</filename> files.</para>
  37.911 +      </listitem>
  37.912 +      <listitem><para id="x_410">Use <command role="hg-cmd">hg pull</command> to
  37.913 +	  bring new changes into the underlying repository.  (Don't
  37.914 +	  run <command role="hg-cmd">hg pull -u</command>; see below
  37.915 +	  for why.)</para>
  37.916 +      </listitem>
  37.917 +      <listitem><para id="x_411">Update to the new tip revision, using <command
  37.918 +	    role="hg-cmd">hg update <option
  37.919 +	      role="hg-opt-update">-C</option></command> to override
  37.920 +	  the patches you have pushed.</para>
  37.921 +      </listitem>
  37.922 +      <listitem><para id="x_412">Merge all patches using <command>hg qpush -m
  37.923 +	    -a</command>.  The <option
  37.924 +	    role="hg-ext-mq-cmd-qpush-opt">-m</option> option to
  37.925 +	  <command role="hg-ext-mq">qpush</command> tells MQ to
  37.926 +	  perform a three-way merge if the patch fails to
  37.927 +	  apply.</para>
  37.928 +      </listitem></orderedlist>
  37.929 +
  37.930 +    <para id="x_413">During the <command role="hg-cmd">hg qpush <option
  37.931 +	  role="hg-ext-mq-cmd-qpush-opt">hg -m</option></command>,
  37.932 +      each patch in the <filename role="special">series</filename>
  37.933 +      file is applied normally.  If a patch applies with fuzz or
  37.934 +      rejects, MQ looks at the queue you <command
  37.935 +	role="hg-ext-mq">qsave</command>d, and performs a three-way
  37.936 +      merge with the corresponding changeset.  This merge uses
  37.937 +      Mercurial's normal merge machinery, so it may pop up a GUI merge
  37.938 +      tool to help you to resolve problems.</para>
  37.939 +
  37.940 +    <para id="x_414">When you finish resolving the effects of a patch, MQ
  37.941 +      refreshes your patch based on the result of the merge.</para>
  37.942 +
  37.943 +    <para id="x_415">At the end of this process, your repository will have one
  37.944 +      extra head from the old patch queue, and a copy of the old patch
  37.945 +      queue will be in <filename role="special"
  37.946 +	class="directory">.hg/patches.N</filename>. You can remove the
  37.947 +      extra head using <command role="hg-cmd">hg qpop -a -n
  37.948 +	patches.N</command> or <command role="hg-cmd">hg
  37.949 +	strip</command>.  You can delete <filename role="special"
  37.950 +	class="directory">.hg/patches.N</filename> once you are sure
  37.951 +      that you no longer need it as a backup.</para>
  37.952 +  </sect1>
  37.953 +
  37.954 +  <sect1>
  37.955 +    <title>Identifying patches</title>
  37.956 +
  37.957 +    <para id="x_416">MQ commands that work with patches let you refer to a patch
  37.958 +      either by using its name or by a number.  By name is obvious
  37.959 +      enough; pass the name <filename>foo.patch</filename> to <command
  37.960 +	role="hg-ext-mq">qpush</command>, for example, and it will
  37.961 +      push patches until <filename>foo.patch</filename> is
  37.962 +      applied.</para>
  37.963 +
  37.964 +    <para id="x_417">As a shortcut, you can refer to a patch using both a name
  37.965 +      and a numeric offset; <literal>foo.patch-2</literal> means
  37.966 +      <quote>two patches before <literal>foo.patch</literal></quote>,
  37.967 +      while <literal>bar.patch+4</literal> means <quote>four patches
  37.968 +	after <literal>bar.patch</literal></quote>.</para>
  37.969 +
  37.970 +    <para id="x_418">Referring to a patch by index isn't much different.  The
  37.971 +      first patch printed in the output of <command
  37.972 +	role="hg-ext-mq">qseries</command> is patch zero (yes, it's
  37.973 +      one of those start-at-zero counting systems); the second is
  37.974 +      patch one; and so on.</para>
  37.975 +
  37.976 +    <para id="x_419">MQ also makes it easy to work with patches when you are
  37.977 +      using normal Mercurial commands.  Every command that accepts a
  37.978 +      changeset ID will also accept the name of an applied patch.  MQ
  37.979 +      augments the tags normally in the repository with an eponymous
  37.980 +      one for each applied patch.  In addition, the special tags
  37.981 +      <literal role="tag">qbase</literal> and
  37.982 +      <literal role="tag">qtip</literal> identify
  37.983 +      the <quote>bottom-most</quote> and topmost applied patches,
  37.984 +      respectively.</para>
  37.985 +
  37.986 +    <para id="x_41a">These additions to Mercurial's normal tagging capabilities
  37.987 +      make dealing with patches even more of a breeze.</para>
  37.988 +    <itemizedlist>
  37.989 +      <listitem><para id="x_41b">Want to patchbomb a mailing list with your
  37.990 +	  latest series of changes?</para>
  37.991 +	<programlisting>hg email qbase:qtip</programlisting>
  37.992 +	<para id="x_41c">  (Don't know what <quote>patchbombing</quote> is?  See
  37.993 +	  <xref linkend="sec:hgext:patchbomb"/>.)</para>
  37.994 +      </listitem>
  37.995 +      <listitem><para id="x_41d">Need to see all of the patches since
  37.996 +	  <literal>foo.patch</literal> that have touched files in a
  37.997 +	  subdirectory of your tree?</para>
  37.998 +	<programlisting>hg log -r foo.patch:qtip subdir</programlisting>
  37.999 +      </listitem>
 37.1000 +    </itemizedlist>
 37.1001 +
 37.1002 +    <para id="x_41e">Because MQ makes the names of patches available to the rest
 37.1003 +      of Mercurial through its normal internal tag machinery, you
 37.1004 +      don't need to type in the entire name of a patch when you want
 37.1005 +      to identify it by name.</para>
 37.1006 +
 37.1007 +    <para id="x_41f">Another nice consequence of representing patch names as tags
 37.1008 +      is that when you run the <command role="hg-cmd">hg log</command>
 37.1009 +      command, it will display a patch's name as a tag, simply as part
 37.1010 +      of its normal output.  This makes it easy to visually
 37.1011 +      distinguish applied patches from underlying
 37.1012 +      <quote>normal</quote> revisions.  The following example shows a
 37.1013 +      few normal Mercurial commands in use with applied
 37.1014 +      patches.</para>
 37.1015 +
 37.1016 +    &interaction.mq.id.output;
 37.1017 +  </sect1>
 37.1018 +
 37.1019 +  <sect1>
 37.1020 +    <title>Useful things to know about</title>
 37.1021 +
 37.1022 +    <para id="x_420">There are a number of aspects of MQ usage that don't fit
 37.1023 +      tidily into sections of their own, but that are good to know.
 37.1024 +      Here they are, in one place.</para>
 37.1025 +
 37.1026 +    <itemizedlist>
 37.1027 +      <listitem><para id="x_421">Normally, when you <command
 37.1028 +	    role="hg-ext-mq">qpop</command> a patch and <command
 37.1029 +	    role="hg-ext-mq">qpush</command> it again, the changeset
 37.1030 +	  that represents the patch after the pop/push will have a
 37.1031 +	  <emphasis>different identity</emphasis> than the changeset
 37.1032 +	  that represented the hash beforehand.  See <xref
 37.1033 +	    linkend="sec:mqref:cmd:qpush"/> for
 37.1034 +	  information as to why this is.</para>
 37.1035 +      </listitem>
 37.1036 +      <listitem><para id="x_422">It's not a good idea to <command
 37.1037 +	    role="hg-cmd">hg merge</command> changes from another
 37.1038 +	  branch with a patch changeset, at least if you want to
 37.1039 +	  maintain the <quote>patchiness</quote> of that changeset and
 37.1040 +	  changesets below it on the patch stack.  If you try to do
 37.1041 +	  this, it will appear to succeed, but MQ will become
 37.1042 +	  confused.</para>
 37.1043 +      </listitem></itemizedlist>
 37.1044 +  </sect1>
 37.1045 +
 37.1046 +  <sect1 id="sec:mq:repo">
 37.1047 +    <title>Managing patches in a repository</title>
 37.1048 +
 37.1049 +    <para id="x_423">Because MQ's <filename role="special"
 37.1050 +	class="directory">.hg/patches</filename> directory resides
 37.1051 +      outside a Mercurial repository's working directory, the
 37.1052 +      <quote>underlying</quote> Mercurial repository knows nothing
 37.1053 +      about the management or presence of patches.</para>
 37.1054 +
 37.1055 +    <para id="x_424">This presents the interesting possibility of managing the
 37.1056 +      contents of the patch directory as a Mercurial repository in its
 37.1057 +      own right.  This can be a useful way to work.  For example, you
 37.1058 +      can work on a patch for a while, <command
 37.1059 +	role="hg-ext-mq">qrefresh</command> it, then <command
 37.1060 +	role="hg-cmd">hg commit</command> the current state of the
 37.1061 +      patch.  This lets you <quote>roll back</quote> to that version
 37.1062 +      of the patch later on.</para>
 37.1063 +
 37.1064 +    <para id="x_425">You can then share different versions of the same patch
 37.1065 +      stack among multiple underlying repositories.  I use this when I
 37.1066 +      am developing a Linux kernel feature.  I have a pristine copy of
 37.1067 +      my kernel sources for each of several CPU architectures, and a
 37.1068 +      cloned repository under each that contains the patches I am
 37.1069 +      working on.  When I want to test a change on a different
 37.1070 +      architecture, I push my current patches to the patch repository
 37.1071 +      associated with that kernel tree, pop and push all of my
 37.1072 +      patches, and build and test that kernel.</para>
 37.1073 +
 37.1074 +    <para id="x_426">Managing patches in a repository makes it possible for
 37.1075 +      multiple developers to work on the same patch series without
 37.1076 +      colliding with each other, all on top of an underlying source
 37.1077 +      base that they may or may not control.</para>
 37.1078 +
 37.1079 +    <sect2>
 37.1080 +      <title>MQ support for patch repositories</title>
 37.1081 +
 37.1082 +      <para id="x_427">MQ helps you to work with the <filename role="special"
 37.1083 +	  class="directory">.hg/patches</filename> directory as a
 37.1084 +	repository; when you prepare a repository for working with
 37.1085 +	patches using <command role="hg-ext-mq">qinit</command>, you
 37.1086 +	can pass the <option role="hg-ext-mq-cmd-qinit-opt">hg
 37.1087 +	  -c</option> option to create the <filename role="special"
 37.1088 +	  class="directory">.hg/patches</filename> directory as a
 37.1089 +	Mercurial repository.</para>
 37.1090 +
 37.1091 +      <note>
 37.1092 +	<para id="x_428">  If you forget to use the <option
 37.1093 +	    role="hg-ext-mq-cmd-qinit-opt">hg -c</option> option, you
 37.1094 +	  can simply go into the <filename role="special"
 37.1095 +	    class="directory">.hg/patches</filename> directory at any
 37.1096 +	  time and run <command role="hg-cmd">hg init</command>.
 37.1097 +	  Don't forget to add an entry for the <filename
 37.1098 +	    role="special">status</filename> file to the <filename
 37.1099 +	    role="special">.hgignore</filename> file, though</para>
 37.1100 +
 37.1101 +	<para id="x_429">  (<command role="hg-cmd">hg qinit <option
 37.1102 +	      role="hg-ext-mq-cmd-qinit-opt">hg -c</option></command>
 37.1103 +	  does this for you automatically); you
 37.1104 +	  <emphasis>really</emphasis> don't want to manage the
 37.1105 +	  <filename role="special">status</filename> file.</para>
 37.1106 +      </note>
 37.1107 +
 37.1108 +      <para id="x_42a">As a convenience, if MQ notices that the <filename
 37.1109 +	  class="directory">.hg/patches</filename> directory is a
 37.1110 +	repository, it will automatically <command role="hg-cmd">hg
 37.1111 +	  add</command> every patch that you create and import.</para>
 37.1112 +
 37.1113 +      <para id="x_42b">MQ provides a shortcut command, <command
 37.1114 +	  role="hg-ext-mq">qcommit</command>, that runs <command
 37.1115 +	  role="hg-cmd">hg commit</command> in the <filename
 37.1116 +	  role="special" class="directory">.hg/patches</filename>
 37.1117 +	directory.  This saves some bothersome typing.</para>
 37.1118 +
 37.1119 +      <para id="x_42c">Finally, as a convenience to manage the patch directory,
 37.1120 +	you can define the alias <command>mq</command> on Unix
 37.1121 +	systems. For example, on Linux systems using the
 37.1122 +	<command>bash</command> shell, you can include the following
 37.1123 +	snippet in your <filename
 37.1124 +	  role="home">~/.bashrc</filename>.</para>
 37.1125 +
 37.1126 +      <programlisting>alias mq=`hg -R $(hg root)/.hg/patches'</programlisting>
 37.1127 +
 37.1128 +      <para id="x_42d">You can then issue commands of the form <command>mq
 37.1129 +	  pull</command> from the main repository.</para>
 37.1130 +    </sect2>
 37.1131 +
 37.1132 +    <sect2>
 37.1133 +      <title>A few things to watch out for</title>
 37.1134 +
 37.1135 +      <para id="x_42e">MQ's support for working with a repository full of patches
 37.1136 +	is limited in a few small respects.</para>
 37.1137 +
 37.1138 +      <para id="x_42f">MQ cannot automatically detect changes that you make to
 37.1139 +	the patch directory.  If you <command role="hg-cmd">hg
 37.1140 +	  pull</command>, manually edit, or <command role="hg-cmd">hg
 37.1141 +	  update</command> changes to patches or the <filename
 37.1142 +	  role="special">series</filename> file, you will have to
 37.1143 +	<command role="hg-cmd">hg qpop <option
 37.1144 +	    role="hg-ext-mq-cmd-qpop-opt">hg -a</option></command> and
 37.1145 +	then <command role="hg-cmd">hg qpush <option
 37.1146 +	    role="hg-ext-mq-cmd-qpush-opt">hg -a</option></command> in
 37.1147 +	the underlying repository to see those changes show up there.
 37.1148 +	If you forget to do this, you can confuse MQ's idea of which
 37.1149 +	patches are applied.</para>
 37.1150 +
 37.1151 +    </sect2>
 37.1152 +  </sect1>
 37.1153 +  <sect1 id="sec:mq:tools">
 37.1154 +    <title>Third party tools for working with patches</title>
 37.1155 +
 37.1156 +    <para id="x_430">Once you've been working with patches for a while, you'll
 37.1157 +      find yourself hungry for tools that will help you to understand
 37.1158 +      and manipulate the patches you're dealing with.</para>
 37.1159 +
 37.1160 +    <para id="x_431">The <command>diffstat</command> command
 37.1161 +      <citation>web:diffstat</citation> generates a histogram of the
 37.1162 +      modifications made to each file in a patch.  It provides a good
 37.1163 +      way to <quote>get a sense of</quote> a patch&emdash;which files
 37.1164 +      it affects, and how much change it introduces to each file and
 37.1165 +      as a whole.  (I find that it's a good idea to use
 37.1166 +      <command>diffstat</command>'s <option
 37.1167 +	role="cmd-opt-diffstat">-p</option> option as a matter of
 37.1168 +      course, as otherwise it will try to do clever things with
 37.1169 +      prefixes of file names that inevitably confuse at least
 37.1170 +      me.)</para>
 37.1171 +
 37.1172 +&interaction.mq.tools.tools;
 37.1173 +
 37.1174 +    <para id="x_432">The <literal role="package">patchutils</literal> package
 37.1175 +      <citation>web:patchutils</citation> is invaluable. It provides a
 37.1176 +      set of small utilities that follow the <quote>Unix
 37.1177 +	philosophy;</quote> each does one useful thing with a patch.
 37.1178 +      The <literal role="package">patchutils</literal> command I use
 37.1179 +      most is <command>filterdiff</command>, which extracts subsets
 37.1180 +      from a patch file.  For example, given a patch that modifies
 37.1181 +      hundreds of files across dozens of directories, a single
 37.1182 +      invocation of <command>filterdiff</command> can generate a
 37.1183 +      smaller patch that only touches files whose names match a
 37.1184 +      particular glob pattern.  See <xref
 37.1185 +	linkend="mq-collab:tips:interdiff"/> for another
 37.1186 +      example.</para>
 37.1187 +
 37.1188 +  </sect1>
 37.1189 +  <sect1>
 37.1190 +    <title>Good ways to work with patches</title>
 37.1191 +
 37.1192 +    <para id="x_433">Whether you are working on a patch series to submit to a
 37.1193 +      free software or open source project, or a series that you
 37.1194 +      intend to treat as a sequence of regular changesets when you're
 37.1195 +      done, you can use some simple techniques to keep your work well
 37.1196 +      organized.</para>
 37.1197 +
 37.1198 +    <para id="x_434">Give your patches descriptive names.  A good name for a
 37.1199 +      patch might be <filename>rework-device-alloc.patch</filename>,
 37.1200 +      because it will immediately give you a hint what the purpose of
 37.1201 +      the patch is.  Long names shouldn't be a problem; you won't be
 37.1202 +      typing the names often, but you <emphasis>will</emphasis> be
 37.1203 +      running commands like <command
 37.1204 +	role="hg-ext-mq">qapplied</command> and <command
 37.1205 +	role="hg-ext-mq">qtop</command> over and over. Good naming
 37.1206 +      becomes especially important when you have a number of patches
 37.1207 +      to work with, or if you are juggling a number of different tasks
 37.1208 +      and your patches only get a fraction of your attention.</para>
 37.1209 +
 37.1210 +    <para id="x_435">Be aware of what patch you're working on.  Use the <command
 37.1211 +	role="hg-ext-mq">qtop</command> command and skim over the text
 37.1212 +      of your patches frequently&emdash;for example, using <command
 37.1213 +	role="hg-cmd">hg tip <option
 37.1214 +	  role="hg-opt-tip">-p</option></command>)&emdash;to be sure
 37.1215 +      of where you stand.  I have several times worked on and <command
 37.1216 +	role="hg-ext-mq">qrefresh</command>ed a patch other than the
 37.1217 +      one I intended, and it's often tricky to migrate changes into
 37.1218 +      the right patch after making them in the wrong one.</para>
 37.1219 +
 37.1220 +    <para id="x_436">For this reason, it is very much worth investing a little
 37.1221 +      time to learn how to use some of the third-party tools I
 37.1222 +      described in <xref linkend="sec:mq:tools"/>,
 37.1223 +      particularly
 37.1224 +      <command>diffstat</command> and <command>filterdiff</command>.
 37.1225 +      The former will give you a quick idea of what changes your patch
 37.1226 +      is making, while the latter makes it easy to splice hunks
 37.1227 +      selectively out of one patch and into another.</para>
 37.1228 +
 37.1229 +  </sect1>
 37.1230 +  <sect1>
 37.1231 +    <title>MQ cookbook</title>
 37.1232 +
 37.1233 +    <sect2>
 37.1234 +      <title>Manage <quote>trivial</quote> patches</title>
 37.1235 +
 37.1236 +      <para id="x_437">Because the overhead of dropping files into a new
 37.1237 +	Mercurial repository is so low, it makes a lot of sense to
 37.1238 +	manage patches this way even if you simply want to make a few
 37.1239 +	changes to a source tarball that you downloaded.</para>
 37.1240 +
 37.1241 +      <para id="x_438">Begin by downloading and unpacking the source tarball, and
 37.1242 +	turning it into a Mercurial repository.</para>
 37.1243 +
 37.1244 +      &interaction.mq.tarball.download;
 37.1245 +
 37.1246 +      <para id="x_439">Continue by creating a patch stack and making your
 37.1247 +	changes.</para>
 37.1248 +
 37.1249 +      &interaction.mq.tarball.qinit;
 37.1250 +
 37.1251 +      <para id="x_43a">Let's say a few weeks or months pass, and your package
 37.1252 +	author releases a new version.  First, bring their changes
 37.1253 +	into the repository.</para>
 37.1254 +
 37.1255 +      &interaction.mq.tarball.newsource;
 37.1256 +
 37.1257 +      <para id="x_43b">The pipeline starting with <command role="hg-cmd">hg
 37.1258 +	  locate</command> above deletes all files in the working
 37.1259 +	directory, so that <command role="hg-cmd">hg
 37.1260 +	  commit</command>'s <option
 37.1261 +	  role="hg-opt-commit">--addremove</option> option can
 37.1262 +	actually tell which files have really been removed in the
 37.1263 +	newer version of the source.</para>
 37.1264 +
 37.1265 +      <para id="x_43c">Finally, you can apply your patches on top of the new
 37.1266 +	tree.</para>
 37.1267 +
 37.1268 +      &interaction.mq.tarball.repush;
 37.1269 +    </sect2>
 37.1270 +
 37.1271 +    <sect2 id="sec:mq:combine">
 37.1272 +      <title>Combining entire patches</title>
 37.1273 +
 37.1274 +      <para id="x_43d">MQ provides a command, <command
 37.1275 +	  role="hg-ext-mq">qfold</command> that lets you combine
 37.1276 +	entire patches.  This <quote>folds</quote> the patches you
 37.1277 +	name, in the order you name them, into the topmost applied
 37.1278 +	patch, and concatenates their descriptions onto the end of its
 37.1279 +	description.  The patches that you fold must be unapplied
 37.1280 +	before you fold them.</para>
 37.1281 +
 37.1282 +      <para id="x_43e">The order in which you fold patches matters.  If your
 37.1283 +	topmost applied patch is <literal>foo</literal>, and you
 37.1284 +	<command role="hg-ext-mq">qfold</command>
 37.1285 +	<literal>bar</literal> and <literal>quux</literal> into it,
 37.1286 +	you will end up with a patch that has the same effect as if
 37.1287 +	you applied first <literal>foo</literal>, then
 37.1288 +	<literal>bar</literal>, followed by
 37.1289 +	<literal>quux</literal>.</para>
 37.1290 +    </sect2>
 37.1291 +
 37.1292 +    <sect2>
 37.1293 +      <title>Merging part of one patch into another</title>
 37.1294 +
 37.1295 +      <para id="x_43f">Merging <emphasis>part</emphasis> of one patch into
 37.1296 +	another is more difficult than combining entire
 37.1297 +	patches.</para>
 37.1298 +
 37.1299 +      <para id="x_440">If you want to move changes to entire files, you can use
 37.1300 +	<command>filterdiff</command>'s <option
 37.1301 +	  role="cmd-opt-filterdiff">-i</option> and <option
 37.1302 +	  role="cmd-opt-filterdiff">-x</option> options to choose the
 37.1303 +	modifications to snip out of one patch, concatenating its
 37.1304 +	output onto the end of the patch you want to merge into.  You
 37.1305 +	usually won't need to modify the patch you've merged the
 37.1306 +	changes from.  Instead, MQ will report some rejected hunks
 37.1307 +	when you <command role="hg-ext-mq">qpush</command> it (from
 37.1308 +	the hunks you moved into the other patch), and you can simply
 37.1309 +	<command role="hg-ext-mq">qrefresh</command> the patch to drop
 37.1310 +	the duplicate hunks.</para>
 37.1311 +
 37.1312 +      <para id="x_441">If you have a patch that has multiple hunks modifying a
 37.1313 +	file, and you only want to move a few of those hunks, the job
 37.1314 +	becomes more messy, but you can still partly automate it.  Use
 37.1315 +	<command>lsdiff -nvv</command> to print some metadata about
 37.1316 +	the patch.</para>
 37.1317 +
 37.1318 +      &interaction.mq.tools.lsdiff;
 37.1319 +
 37.1320 +      <para id="x_442">This command prints three different kinds of
 37.1321 +	number:</para>
 37.1322 +      <itemizedlist>
 37.1323 +	<listitem><para id="x_443">(in the first column) a <emphasis>file
 37.1324 +	      number</emphasis> to identify each file modified in the
 37.1325 +	    patch;</para>
 37.1326 +	</listitem>
 37.1327 +	<listitem><para id="x_444">(on the next line, indented) the line number
 37.1328 +	    within a modified file where a hunk starts; and</para>
 37.1329 +	</listitem>
 37.1330 +	<listitem><para id="x_445">(on the same line) a <emphasis>hunk
 37.1331 +	      number</emphasis> to identify that hunk.</para>
 37.1332 +	</listitem></itemizedlist>
 37.1333 +
 37.1334 +      <para id="x_446">You'll have to use some visual inspection, and reading of
 37.1335 +	the patch, to identify the file and hunk numbers you'll want,
 37.1336 +	but you can then pass them to to
 37.1337 +	<command>filterdiff</command>'s <option
 37.1338 +	  role="cmd-opt-filterdiff">--files</option> and <option
 37.1339 +	  role="cmd-opt-filterdiff">--hunks</option> options, to
 37.1340 +	select exactly the file and hunk you want to extract.</para>
 37.1341 +
 37.1342 +      <para id="x_447">Once you have this hunk, you can concatenate it onto the
 37.1343 +	end of your destination patch and continue with the remainder
 37.1344 +	of <xref linkend="sec:mq:combine"/>.</para>
 37.1345 +
 37.1346 +    </sect2>
 37.1347 +  </sect1>
 37.1348 +  <sect1>
 37.1349 +    <title>Differences between quilt and MQ</title>
 37.1350 +
 37.1351 +    <para id="x_448">If you are already familiar with quilt, MQ provides a
 37.1352 +      similar command set.  There are a few differences in the way
 37.1353 +      that it works.</para>
 37.1354 +
 37.1355 +    <para id="x_449">You will already have noticed that most quilt commands have
 37.1356 +      MQ counterparts that simply begin with a
 37.1357 +      <quote><literal>q</literal></quote>.  The exceptions are quilt's
 37.1358 +      <literal>add</literal> and <literal>remove</literal> commands,
 37.1359 +      the counterparts for which are the normal Mercurial <command
 37.1360 +	role="hg-cmd">hg add</command> and <command role="hg-cmd">hg
 37.1361 +	remove</command> commands.  There is no MQ equivalent of the
 37.1362 +      quilt <literal>edit</literal> command.</para>
 37.1363 +
 37.1364 +  </sect1>
 37.1365 +</chapter>
 37.1366 +
 37.1367 +<!--
 37.1368 +local variables: 
 37.1369 +sgml-parent-document: ("00book.xml" "book" "chapter")
 37.1370 +end:
 37.1371 +-->
    38.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.2 +++ b/en/ch13-mq-collab.xml	Sun Aug 16 03:41:39 2009 +0200
    38.3 @@ -0,0 +1,525 @@
    38.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    38.5 +
    38.6 +<chapter id="chap:mq-collab">
    38.7 +  <?dbhtml filename="advanced-uses-of-mercurial-queues.html"?>
    38.8 +  <title>Advanced uses of Mercurial Queues</title>
    38.9 +
   38.10 +  <para id="x_15d">While it's easy to pick up straightforward uses of Mercurial
   38.11 +    Queues, use of a little discipline and some of MQ's less
   38.12 +    frequently used capabilities makes it possible to work in
   38.13 +    complicated development environments.</para>
   38.14 +
   38.15 +  <para id="x_15e">In this chapter, I will use as an example a technique I have
   38.16 +    used to manage the development of an Infiniband device driver for
   38.17 +    the Linux kernel.  The driver in question is large (at least as
   38.18 +    drivers go), with 25,000 lines of code spread across 35 source
   38.19 +    files.  It is maintained by a small team of developers.</para>
   38.20 +
   38.21 +  <para id="x_15f">While much of the material in this chapter is specific to
   38.22 +    Linux, the same principles apply to any code base for which you're
   38.23 +    not the primary owner, and upon which you need to do a lot of
   38.24 +    development.</para>
   38.25 +
   38.26 +  <sect1>
   38.27 +    <title>The problem of many targets</title>
   38.28 +
   38.29 +    <para id="x_160">The Linux kernel changes rapidly, and has never been
   38.30 +      internally stable; developers frequently make drastic changes
   38.31 +      between releases. This means that a version of the driver that
   38.32 +      works well with a particular released version of the kernel will
   38.33 +      not even <emphasis>compile</emphasis> correctly against,
   38.34 +      typically, any other version.</para>
   38.35 +
   38.36 +    <para id="x_161">To maintain a driver, we have to keep a number of distinct
   38.37 +      versions of Linux in mind.</para>
   38.38 +    <itemizedlist>
   38.39 +      <listitem><para id="x_162">One target is the main Linux kernel development
   38.40 +	  tree. Maintenance of the code is in this case partly shared
   38.41 +	  by other developers in the kernel community, who make
   38.42 +	  <quote>drive-by</quote> modifications to the driver as they
   38.43 +	  develop and refine kernel subsystems.</para>
   38.44 +      </listitem>
   38.45 +      <listitem><para id="x_163">We also maintain a number of
   38.46 +	  <quote>backports</quote> to older versions of the Linux
   38.47 +	  kernel, to support the needs of customers who are running
   38.48 +	  older Linux distributions that do not incorporate our
   38.49 +	  drivers.  (To <emphasis>backport</emphasis> a piece of code
   38.50 +	  is to modify it to work in an older version of its target
   38.51 +	  environment than the version it was developed for.)</para>
   38.52 +      </listitem>
   38.53 +      <listitem><para id="x_164">Finally, we make software releases on a schedule
   38.54 +	  that is necessarily not aligned with those used by Linux
   38.55 +	  distributors and kernel developers, so that we can deliver
   38.56 +	  new features to customers without forcing them to upgrade
   38.57 +	  their entire kernels or distributions.</para>
   38.58 +      </listitem></itemizedlist>
   38.59 +
   38.60 +    <sect2>
   38.61 +      <title>Tempting approaches that don't work well</title>
   38.62 +
   38.63 +      <para id="x_165">There are two <quote>standard</quote> ways to maintain a
   38.64 +	piece of software that has to target many different
   38.65 +	environments.</para>
   38.66 +
   38.67 +      <para id="x_166">The first is to maintain a number of branches, each
   38.68 +	intended for a single target.  The trouble with this approach
   38.69 +	is that you must maintain iron discipline in the flow of
   38.70 +	changes between repositories. A new feature or bug fix must
   38.71 +	start life in a <quote>pristine</quote> repository, then
   38.72 +	percolate out to every backport repository.  Backport changes
   38.73 +	are more limited in the branches they should propagate to; a
   38.74 +	backport change that is applied to a branch where it doesn't
   38.75 +	belong will probably stop the driver from compiling.</para>
   38.76 +
   38.77 +      <para id="x_167">The second is to maintain a single source tree filled with
   38.78 +	conditional statements that turn chunks of code on or off
   38.79 +	depending on the intended target.  Because these
   38.80 +	<quote>ifdefs</quote> are not allowed in the Linux kernel
   38.81 +	tree, a manual or automatic process must be followed to strip
   38.82 +	them out and yield a clean tree.  A code base maintained in
   38.83 +	this fashion rapidly becomes a rat's nest of conditional
   38.84 +	blocks that are difficult to understand and maintain.</para>
   38.85 +
   38.86 +      <para id="x_168">Neither of these approaches is well suited to a situation
   38.87 +	where you don't <quote>own</quote> the canonical copy of a
   38.88 +	source tree.  In the case of a Linux driver that is
   38.89 +	distributed with the standard kernel, Linus's tree contains
   38.90 +	the copy of the code that will be treated by the world as
   38.91 +	canonical.  The upstream version of <quote>my</quote> driver
   38.92 +	can be modified by people I don't know, without me even
   38.93 +	finding out about it until after the changes show up in
   38.94 +	Linus's tree.</para>
   38.95 +
   38.96 +      <para id="x_169">These approaches have the added weakness of making it
   38.97 +	difficult to generate well-formed patches to submit
   38.98 +	upstream.</para>
   38.99 +
  38.100 +      <para id="x_16a">In principle, Mercurial Queues seems like a good candidate
  38.101 +	to manage a development scenario such as the above.  While
  38.102 +	this is indeed the case, MQ contains a few added features that
  38.103 +	make the job more pleasant.</para>
  38.104 +
  38.105 +    </sect2>
  38.106 +  </sect1>
  38.107 +  <sect1>
  38.108 +    <title>Conditionally applying patches with guards</title>
  38.109 +
  38.110 +    <para id="x_16b">Perhaps the best way to maintain sanity with so many targets
  38.111 +      is to be able to choose specific patches to apply for a given
  38.112 +      situation.  MQ provides a feature called <quote>guards</quote>
  38.113 +      (which originates with quilt's <literal>guards</literal>
  38.114 +      command) that does just this.  To start off, let's create a
  38.115 +      simple repository for experimenting in.</para>
  38.116 +
  38.117 +    &interaction.mq.guards.init;
  38.118 +
  38.119 +    <para id="x_16c">This gives us a tiny repository that contains two patches
  38.120 +      that don't have any dependencies on each other, because they
  38.121 +      touch different files.</para>
  38.122 +
  38.123 +    <para id="x_16d">The idea behind conditional application is that you can
  38.124 +      <quote>tag</quote> a patch with a <emphasis>guard</emphasis>,
  38.125 +      which is simply a text string of your choosing, then tell MQ to
  38.126 +      select specific guards to use when applying patches.  MQ will
  38.127 +      then either apply, or skip over, a guarded patch, depending on
  38.128 +      the guards that you have selected.</para>
  38.129 +
  38.130 +    <para id="x_16e">A patch can have an arbitrary number of guards; each one is
  38.131 +      <emphasis>positive</emphasis> (<quote>apply this patch if this
  38.132 +	guard is selected</quote>) or <emphasis>negative</emphasis>
  38.133 +      (<quote>skip this patch if this guard is selected</quote>).  A
  38.134 +      patch with no guards is always applied.</para>
  38.135 +
  38.136 +  </sect1>
  38.137 +  <sect1>
  38.138 +    <title>Controlling the guards on a patch</title>
  38.139 +
  38.140 +    <para id="x_16f">The <command role="hg-ext-mq">qguard</command> command lets
  38.141 +      you determine which guards should apply to a patch, or display
  38.142 +      the guards that are already in effect. Without any arguments, it
  38.143 +      displays the guards on the current topmost patch.</para>
  38.144 +
  38.145 +      &interaction.mq.guards.qguard;
  38.146 +
  38.147 +    <para id="x_170">To set a positive guard on a patch, prefix the name of the
  38.148 +      guard with a <quote><literal>+</literal></quote>.</para>
  38.149 +
  38.150 +      &interaction.mq.guards.qguard.pos;
  38.151 +
  38.152 +    <para id="x_171">To set a negative guard
  38.153 +      on a patch, prefix the name of the guard with a
  38.154 +      <quote><literal>-</literal></quote>.</para>
  38.155 +
  38.156 +    &interaction.mq.guards.qguard.neg;
  38.157 +
  38.158 +    <para id="x_74a">Notice that we prefixed the arguments to the <command>hg
  38.159 +	qguard</command> command with a <literal>--</literal> here, so
  38.160 +      that Mercurial would not interpret the text
  38.161 +      <literal>-quux</literal> as an option.</para>
  38.162 +
  38.163 +    <note>
  38.164 +      <title>Setting vs. modifying</title>
  38.165 +
  38.166 +      <para id="x_172">  The <command role="hg-ext-mq">qguard</command> command
  38.167 +	<emphasis>sets</emphasis> the guards on a patch; it doesn't
  38.168 +	<emphasis>modify</emphasis> them.  What this means is that if
  38.169 +	you run <command role="hg-cmd">hg qguard +a +b</command> on a
  38.170 +	patch, then <command role="hg-cmd">hg qguard +c</command> on
  38.171 +	the same patch, the <emphasis>only</emphasis> guard that will
  38.172 +	be set on it afterwards is <literal>+c</literal>.</para>
  38.173 +    </note>
  38.174 +
  38.175 +    <para id="x_173">Mercurial stores guards in the <filename
  38.176 +	role="special">series</filename> file; the form in which they
  38.177 +      are stored is easy both to understand and to edit by hand. (In
  38.178 +      other words, you don't have to use the <command
  38.179 +	role="hg-ext-mq">qguard</command> command if you don't want
  38.180 +      to; it's okay to simply edit the <filename
  38.181 +	role="special">series</filename> file.)</para>
  38.182 +
  38.183 +    &interaction.mq.guards.series;
  38.184 +
  38.185 +  </sect1>
  38.186 +  <sect1>
  38.187 +    <title>Selecting the guards to use</title>
  38.188 +
  38.189 +    <para id="x_174">The <command role="hg-ext-mq">qselect</command> command
  38.190 +      determines which guards are active at a given time.  The effect
  38.191 +      of this is to determine which patches MQ will apply the next
  38.192 +      time you run <command role="hg-ext-mq">qpush</command>.  It has
  38.193 +      no other effect; in particular, it doesn't do anything to
  38.194 +      patches that are already applied.</para>
  38.195 +
  38.196 +    <para id="x_175">With no arguments, the <command
  38.197 +	role="hg-ext-mq">qselect</command> command lists the guards
  38.198 +      currently in effect, one per line of output.  Each argument is
  38.199 +      treated as the name of a guard to apply.</para>
  38.200 +
  38.201 +      &interaction.mq.guards.qselect.foo;
  38.202 +
  38.203 +    <para id="x_176">In case you're interested, the currently selected guards are
  38.204 +      stored in the <filename role="special">guards</filename> file.</para>
  38.205 +
  38.206 +    &interaction.mq.guards.qselect.cat;
  38.207 +
  38.208 +    <para id="x_177">We can see the effect the selected guards have when we run
  38.209 +      <command role="hg-ext-mq">qpush</command>.</para>
  38.210 +
  38.211 +    &interaction.mq.guards.qselect.qpush;
  38.212 +
  38.213 +    <para id="x_178">A guard cannot start with a
  38.214 +      <quote><literal>+</literal></quote> or
  38.215 +      <quote><literal>-</literal></quote> character.  The name of a
  38.216 +      guard must not contain white space, but most other characters
  38.217 +      are acceptable.  If you try to use a guard with an invalid name,
  38.218 +      MQ will complain:</para>
  38.219 +
  38.220 +    &interaction.mq.guards.qselect.error;
  38.221 +      
  38.222 +    <para id="x_179">Changing the selected guards changes the patches that are
  38.223 +      applied.</para>
  38.224 +
  38.225 +    &interaction.mq.guards.qselect.quux;
  38.226 +
  38.227 +    <para id="x_17a">You can see in the example below that negative guards take
  38.228 +      precedence over positive guards.</para>
  38.229 +
  38.230 +    &interaction.mq.guards.qselect.foobar;
  38.231 +
  38.232 +  </sect1>
  38.233 +  <sect1>
  38.234 +    <title>MQ's rules for applying patches</title>
  38.235 +
  38.236 +    <para id="x_17b">The rules that MQ uses when deciding whether to apply a
  38.237 +      patch are as follows.</para>
  38.238 +    <itemizedlist>
  38.239 +      <listitem><para id="x_17c">A patch that has no guards is always
  38.240 +	  applied.</para>
  38.241 +      </listitem>
  38.242 +      <listitem><para id="x_17d">If the patch has any negative guard that matches
  38.243 +	  any currently selected guard, the patch is skipped.</para>
  38.244 +      </listitem>
  38.245 +      <listitem><para id="x_17e">If the patch has any positive guard that matches
  38.246 +	  any currently selected guard, the patch is applied.</para>
  38.247 +      </listitem>
  38.248 +      <listitem><para id="x_17f">If the patch has positive or negative guards,
  38.249 +	  but none matches any currently selected guard, the patch is
  38.250 +	  skipped.</para>
  38.251 +      </listitem></itemizedlist>
  38.252 +
  38.253 +  </sect1>
  38.254 +  <sect1>
  38.255 +    <title>Trimming the work environment</title>
  38.256 +
  38.257 +    <para id="x_180">In working on the device driver I mentioned earlier, I don't
  38.258 +      apply the patches to a normal Linux kernel tree.  Instead, I use
  38.259 +      a repository that contains only a snapshot of the source files
  38.260 +      and headers that are relevant to Infiniband development.  This
  38.261 +      repository is 1% the size of a kernel repository, so it's easier
  38.262 +      to work with.</para>
  38.263 +
  38.264 +    <para id="x_181">I then choose a <quote>base</quote> version on top of which
  38.265 +      the patches are applied.  This is a snapshot of the Linux kernel
  38.266 +      tree as of a revision of my choosing.  When I take the snapshot,
  38.267 +      I record the changeset ID from the kernel repository in the
  38.268 +      commit message.  Since the snapshot preserves the
  38.269 +      <quote>shape</quote> and content of the relevant parts of the
  38.270 +      kernel tree, I can apply my patches on top of either my tiny
  38.271 +      repository or a normal kernel tree.</para>
  38.272 +
  38.273 +    <para id="x_182">Normally, the base tree atop which the patches apply should
  38.274 +      be a snapshot of a very recent upstream tree.  This best
  38.275 +      facilitates the development of patches that can easily be
  38.276 +      submitted upstream with few or no modifications.</para>
  38.277 +
  38.278 +  </sect1>
  38.279 +  <sect1>
  38.280 +    <title>Dividing up the <filename role="special">series</filename>
  38.281 +      file</title>
  38.282 +
  38.283 +    <para id="x_183">I categorise the patches in the <filename
  38.284 +	role="special">series</filename> file into a number of logical
  38.285 +      groups.  Each section of like patches begins with a block of
  38.286 +      comments that describes the purpose of the patches that
  38.287 +      follow.</para>
  38.288 +
  38.289 +    <para id="x_184">The sequence of patch groups that I maintain follows.  The
  38.290 +      ordering of these groups is important; I'll describe why after I
  38.291 +      introduce the groups.</para>
  38.292 +    <itemizedlist>
  38.293 +      <listitem><para id="x_185">The <quote>accepted</quote> group.  Patches that
  38.294 +	  the development team has submitted to the maintainer of the
  38.295 +	  Infiniband subsystem, and which he has accepted, but which
  38.296 +	  are not present in the snapshot that the tiny repository is
  38.297 +	  based on.  These are <quote>read only</quote> patches,
  38.298 +	  present only to transform the tree into a similar state as
  38.299 +	  it is in the upstream maintainer's repository.</para>
  38.300 +      </listitem>
  38.301 +      <listitem><para id="x_186">The <quote>rework</quote> group.  Patches that I
  38.302 +	  have submitted, but that the upstream maintainer has
  38.303 +	  requested modifications to before he will accept
  38.304 +	  them.</para>
  38.305 +      </listitem>
  38.306 +      <listitem><para id="x_187">The <quote>pending</quote> group.  Patches that
  38.307 +	  I have not yet submitted to the upstream maintainer, but
  38.308 +	  which we have finished working on. These will be <quote>read
  38.309 +	    only</quote> for a while.  If the upstream maintainer
  38.310 +	  accepts them upon submission, I'll move them to the end of
  38.311 +	  the <quote>accepted</quote> group.  If he requests that I
  38.312 +	  modify any, I'll move them to the beginning of the
  38.313 +	  <quote>rework</quote> group.</para>
  38.314 +      </listitem>
  38.315 +      <listitem><para id="x_188">The <quote>in progress</quote> group.  Patches
  38.316 +	  that are actively being developed, and should not be
  38.317 +	  submitted anywhere yet.</para>
  38.318 +      </listitem>
  38.319 +      <listitem><para id="x_189">The <quote>backport</quote> group.  Patches that
  38.320 +	  adapt the source tree to older versions of the kernel
  38.321 +	  tree.</para>
  38.322 +      </listitem>
  38.323 +      <listitem><para id="x_18a">The <quote>do not ship</quote> group.  Patches
  38.324 +	  that for some reason should never be submitted upstream.
  38.325 +	  For example, one such patch might change embedded driver
  38.326 +	  identification strings to make it easier to distinguish, in
  38.327 +	  the field, between an out-of-tree version of the driver and
  38.328 +	  a version shipped by a distribution vendor.</para>
  38.329 +      </listitem></itemizedlist>
  38.330 +
  38.331 +    <para id="x_18b">Now to return to the reasons for ordering groups of patches
  38.332 +      in this way.  We would like the lowest patches in the stack to
  38.333 +      be as stable as possible, so that we will not need to rework
  38.334 +      higher patches due to changes in context.  Putting patches that
  38.335 +      will never be changed first in the <filename
  38.336 +	role="special">series</filename> file serves this
  38.337 +      purpose.</para>
  38.338 +
  38.339 +    <para id="x_18c">We would also like the patches that we know we'll need to
  38.340 +      modify to be applied on top of a source tree that resembles the
  38.341 +      upstream tree as closely as possible.  This is why we keep
  38.342 +      accepted patches around for a while.</para>
  38.343 +
  38.344 +    <para id="x_18d">The <quote>backport</quote> and <quote>do not ship</quote>
  38.345 +      patches float at the end of the <filename
  38.346 +	role="special">series</filename> file.  The backport patches
  38.347 +      must be applied on top of all other patches, and the <quote>do
  38.348 +	not ship</quote> patches might as well stay out of harm's
  38.349 +      way.</para>
  38.350 +
  38.351 +  </sect1>
  38.352 +  <sect1>
  38.353 +    <title>Maintaining the patch series</title>
  38.354 +
  38.355 +    <para id="x_18e">In my work, I use a number of guards to control which
  38.356 +      patches are to be applied.</para>
  38.357 +
  38.358 +    <itemizedlist>
  38.359 +      <listitem><para id="x_18f"><quote>Accepted</quote> patches are guarded with
  38.360 +	  <literal>accepted</literal>.  I enable this guard most of
  38.361 +	  the time.  When I'm applying the patches on top of a tree
  38.362 +	  where the patches are already present, I can turn this patch
  38.363 +	  off, and the patches that follow it will apply
  38.364 +	  cleanly.</para>
  38.365 +      </listitem>
  38.366 +      <listitem><para id="x_190">Patches that are <quote>finished</quote>, but
  38.367 +	  not yet submitted, have no guards.  If I'm applying the
  38.368 +	  patch stack to a copy of the upstream tree, I don't need to
  38.369 +	  enable any guards in order to get a reasonably safe source
  38.370 +	  tree.</para>
  38.371 +      </listitem>
  38.372 +      <listitem><para id="x_191">Those patches that need reworking before being
  38.373 +	  resubmitted are guarded with
  38.374 +	  <literal>rework</literal>.</para>
  38.375 +      </listitem>
  38.376 +      <listitem><para id="x_192">For those patches that are still under
  38.377 +	  development, I use <literal>devel</literal>.</para>
  38.378 +      </listitem>
  38.379 +      <listitem><para id="x_193">A backport patch may have several guards, one
  38.380 +	  for each version of the kernel to which it applies.  For
  38.381 +	  example, a patch that backports a piece of code to 2.6.9
  38.382 +	  will have a <literal>2.6.9</literal> guard.</para>
  38.383 +      </listitem></itemizedlist>
  38.384 +    <para id="x_194">This variety of guards gives me considerable flexibility in
  38.385 +      determining what kind of source tree I want to end up with.  For
  38.386 +      most situations, the selection of appropriate guards is
  38.387 +      automated during the build process, but I can manually tune the
  38.388 +      guards to use for less common circumstances.</para>
  38.389 +
  38.390 +    <sect2>
  38.391 +      <title>The art of writing backport patches</title>
  38.392 +
  38.393 +      <para id="x_195">Using MQ, writing a backport patch is a simple process.
  38.394 +	All such a patch has to do is modify a piece of code that uses
  38.395 +	a kernel feature not present in the older version of the
  38.396 +	kernel, so that the driver continues to work correctly under
  38.397 +	that older version.</para>
  38.398 +
  38.399 +      <para id="x_196">A useful goal when writing a good backport patch is to
  38.400 +	make your code look as if it was written for the older version
  38.401 +	of the kernel you're targeting.  The less obtrusive the patch,
  38.402 +	the easier it will be to understand and maintain.  If you're
  38.403 +	writing a collection of backport patches to avoid the
  38.404 +	<quote>rat's nest</quote> effect of lots of
  38.405 +	<literal>#ifdef</literal>s (hunks of source code that are only
  38.406 +	used conditionally) in your code, don't introduce
  38.407 +	version-dependent <literal>#ifdef</literal>s into the patches.
  38.408 +	Instead, write several patches, each of which makes
  38.409 +	unconditional changes, and control their application using
  38.410 +	guards.</para>
  38.411 +
  38.412 +      <para id="x_197">There are two reasons to divide backport patches into a
  38.413 +	distinct group, away from the <quote>regular</quote> patches
  38.414 +	whose effects they modify. The first is that intermingling the
  38.415 +	two makes it more difficult to use a tool like the <literal
  38.416 +	  role="hg-ext">patchbomb</literal> extension to automate the
  38.417 +	process of submitting the patches to an upstream maintainer.
  38.418 +	The second is that a backport patch could perturb the context
  38.419 +	in which a subsequent regular patch is applied, making it
  38.420 +	impossible to apply the regular patch cleanly
  38.421 +	<emphasis>without</emphasis> the earlier backport patch
  38.422 +	already being applied.</para>
  38.423 +
  38.424 +    </sect2>
  38.425 +  </sect1>
  38.426 +  <sect1>
  38.427 +    <title>Useful tips for developing with MQ</title>
  38.428 +
  38.429 +    <sect2>
  38.430 +      <title>Organising patches in directories</title>
  38.431 +
  38.432 +      <para id="x_198">If you're working on a substantial project with MQ, it's
  38.433 +	not difficult to accumulate a large number of patches.  For
  38.434 +	example, I have one patch repository that contains over 250
  38.435 +	patches.</para>
  38.436 +
  38.437 +      <para id="x_199">If you can group these patches into separate logical
  38.438 +	categories, you can if you like store them in different
  38.439 +	directories; MQ has no problems with patch names that contain
  38.440 +	path separators.</para>
  38.441 +
  38.442 +    </sect2>
  38.443 +    <sect2 id="mq-collab:tips:interdiff">
  38.444 +      <title>Viewing the history of a patch</title>
  38.445 +
  38.446 +      <para id="x_19a">If you're developing a set of patches over a long time,
  38.447 +	it's a good idea to maintain them in a repository, as
  38.448 +	discussed in <xref linkend="sec:mq:repo"/>.  If you do
  38.449 +	so, you'll quickly
  38.450 +	discover that using the <command role="hg-cmd">hg
  38.451 +	  diff</command> command to look at the history of changes to
  38.452 +	a patch is unworkable.  This is in part because you're looking
  38.453 +	at the second derivative of the real code (a diff of a diff),
  38.454 +	but also because MQ adds noise to the process by modifying
  38.455 +	time stamps and directory names when it updates a
  38.456 +	patch.</para>
  38.457 +
  38.458 +      <para id="x_19b">However, you can use the <literal
  38.459 +	  role="hg-ext">extdiff</literal> extension, which is bundled
  38.460 +	with Mercurial, to turn a diff of two versions of a patch into
  38.461 +	something readable.  To do this, you will need a third-party
  38.462 +	package called <literal role="package">patchutils</literal>
  38.463 +	<citation>web:patchutils</citation>.  This provides a command
  38.464 +	named <command>interdiff</command>, which shows the
  38.465 +	differences between two diffs as a diff.  Used on two versions
  38.466 +	of the same diff, it generates a diff that represents the diff
  38.467 +	from the first to the second version.</para>
  38.468 +
  38.469 +      <para id="x_19c">You can enable the <literal
  38.470 +	  role="hg-ext">extdiff</literal> extension in the usual way,
  38.471 +	by adding a line to the <literal
  38.472 +	  role="rc-extensions">extensions</literal> section of your
  38.473 +	<filename role="special">~/.hgrc</filename>.</para>
  38.474 +      <programlisting>[extensions]
  38.475 +extdiff =</programlisting>
  38.476 +      <para id="x_19d">The <command>interdiff</command> command expects to be
  38.477 +	passed the names of two files, but the <literal
  38.478 +	  role="hg-ext">extdiff</literal> extension passes the program
  38.479 +	it runs a pair of directories, each of which can contain an
  38.480 +	arbitrary number of files.  We thus need a small program that
  38.481 +	will run <command>interdiff</command> on each pair of files in
  38.482 +	these two directories.  This program is available as <filename
  38.483 +	  role="special">hg-interdiff</filename> in the <filename
  38.484 +	  class="directory">examples</filename> directory of the
  38.485 +	source code repository that accompanies this book. <!--
  38.486 +	&example.hg-interdiff; --></para>
  38.487 +
  38.488 +      <para id="x_19e">With the <filename role="special">hg-interdiff</filename>
  38.489 +	program in your shell's search path, you can run it as
  38.490 +	follows, from inside an MQ patch directory:</para>
  38.491 +      <programlisting>hg extdiff -p hg-interdiff -r A:B my-change.patch</programlisting>
  38.492 +      <para id="x_19f">Since you'll probably want to use this long-winded command
  38.493 +	a lot, you can get <literal role="hg-ext">hgext</literal> to
  38.494 +	make it available as a normal Mercurial command, again by
  38.495 +	editing your <filename
  38.496 +	  role="special">~/.hgrc</filename>.</para>
  38.497 +      <programlisting>[extdiff]
  38.498 +cmd.interdiff = hg-interdiff</programlisting>
  38.499 +      <para id="x_1a0">This directs <literal role="hg-ext">hgext</literal> to
  38.500 +	make an <literal>interdiff</literal> command available, so you
  38.501 +	can now shorten the previous invocation of <command
  38.502 +	  role="hg-ext-extdiff">extdiff</command> to something a
  38.503 +	little more wieldy.</para>
  38.504 +      <programlisting>hg interdiff -r A:B my-change.patch</programlisting>
  38.505 +
  38.506 +      <note>
  38.507 +	<para id="x_1a1">  The <command>interdiff</command> command works well
  38.508 +	  only if the underlying files against which versions of a
  38.509 +	  patch are generated remain the same.  If you create a patch,
  38.510 +	  modify the underlying files, and then regenerate the patch,
  38.511 +	  <command>interdiff</command> may not produce useful
  38.512 +	  output.</para>
  38.513 +      </note>
  38.514 +
  38.515 +      <para id="x_1a2">The <literal role="hg-ext">extdiff</literal> extension is
  38.516 +	useful for more than merely improving the presentation of MQ
  38.517 +	patches.  To read more about it, go to <xref
  38.518 +	  linkend="sec:hgext:extdiff"/>.</para>
  38.519 +
  38.520 +    </sect2>
  38.521 +  </sect1>
  38.522 +</chapter>
  38.523 +
  38.524 +<!--
  38.525 +local variables: 
  38.526 +sgml-parent-document: ("00book.xml" "book" "chapter")
  38.527 +end:
  38.528 +-->
    39.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.2 +++ b/en/ch14-hgext.xml	Sun Aug 16 03:41:39 2009 +0200
    39.3 @@ -0,0 +1,554 @@
    39.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
    39.5 +
    39.6 +<chapter id="chap:hgext">
    39.7 +  <?dbhtml filename="adding-functionality-with-extensions.html"?>
    39.8 +  <title>Adding functionality with extensions</title>
    39.9 +
   39.10 +  <para id="x_4fe">While the core of Mercurial is quite complete from a
   39.11 +    functionality standpoint, it's deliberately shorn of fancy
   39.12 +    features.  This approach of preserving simplicity keeps the
   39.13 +    software easy to deal with for both maintainers and users.</para>
   39.14 +
   39.15 +  <para id="x_4ff">However, Mercurial doesn't box you in with an inflexible
   39.16 +    command set: you can add features to it as
   39.17 +    <emphasis>extensions</emphasis> (sometimes known as
   39.18 +    <emphasis>plugins</emphasis>).  We've already discussed a few of
   39.19 +    these extensions in earlier chapters.</para>
   39.20 +  <itemizedlist>
   39.21 +    <listitem><para id="x_500"><xref linkend="sec:tour-merge:fetch"/>
   39.22 +	covers the <literal role="hg-ext">fetch</literal> extension;
   39.23 +	this combines pulling new changes and merging them with local
   39.24 +	changes into a single command, <command
   39.25 +	  role="hg-ext-fetch">fetch</command>.</para>
   39.26 +    </listitem>
   39.27 +    <listitem><para id="x_501">In <xref linkend="chap:hook"/>, we covered
   39.28 +	several extensions that are useful for hook-related
   39.29 +	functionality: <literal role="hg-ext">acl</literal> adds
   39.30 +	access control lists; <literal
   39.31 +	  role="hg-ext">bugzilla</literal> adds integration with the
   39.32 +	Bugzilla bug tracking system; and <literal
   39.33 +	  role="hg-ext">notify</literal> sends notification emails on
   39.34 +	new changes.</para>
   39.35 +    </listitem>
   39.36 +    <listitem><para id="x_502">The Mercurial Queues patch management extension is
   39.37 +	so invaluable that it merits two chapters and an appendix all
   39.38 +	to itself. <xref linkend="chap:mq"/> covers the
   39.39 +	basics; <xref
   39.40 +	  linkend="chap:mq-collab"/> discusses advanced topics;
   39.41 +	and <xref linkend="chap:mqref"/> goes into detail on
   39.42 +	each
   39.43 +	command.</para>
   39.44 +    </listitem></itemizedlist>
   39.45 +
   39.46 +  <para id="x_503">In this chapter, we'll cover some of the other extensions that
   39.47 +    are available for Mercurial, and briefly touch on some of the
   39.48 +    machinery you'll need to know about if you want to write an
   39.49 +    extension of your own.</para>
   39.50 +  <itemizedlist>
   39.51 +    <listitem><para id="x_504">In <xref linkend="sec:hgext:inotify"/>,
   39.52 +	we'll discuss the possibility of <emphasis>huge</emphasis>
   39.53 +	performance improvements using the <literal
   39.54 +	  role="hg-ext">inotify</literal> extension.</para>
   39.55 +    </listitem></itemizedlist>
   39.56 +
   39.57 +  <sect1 id="sec:hgext:inotify">
   39.58 +    <title>Improve performance with the <literal
   39.59 +	role="hg-ext">inotify</literal> extension</title>
   39.60 +
   39.61 +    <para id="x_505">Are you interested in having some of the most common
   39.62 +      Mercurial operations run as much as a hundred times faster?
   39.63 +      Read on!</para>
   39.64 +
   39.65 +    <para id="x_506">Mercurial has great performance under normal circumstances.
   39.66 +      For example, when you run the <command role="hg-cmd">hg
   39.67 +	status</command> command, Mercurial has to scan almost every
   39.68 +      directory and file in your repository so that it can display
   39.69 +      file status.  Many other Mercurial commands need to do the same
   39.70 +      work behind the scenes; for example, the <command
   39.71 +	role="hg-cmd">hg diff</command> command uses the status
   39.72 +      machinery to avoid doing an expensive comparison operation on
   39.73 +      files that obviously haven't changed.</para>
   39.74 +
   39.75 +    <para id="x_507">Because obtaining file status is crucial to good
   39.76 +      performance, the authors of Mercurial have optimised this code
   39.77 +      to within an inch of its life.  However, there's no avoiding the
   39.78 +      fact that when you run <command role="hg-cmd">hg
   39.79 +	status</command>, Mercurial is going to have to perform at
   39.80 +      least one expensive system call for each managed file to
   39.81 +      determine whether it's changed since the last time Mercurial
   39.82 +      checked.  For a sufficiently large repository, this can take a
   39.83 +      long time.</para>
   39.84 +
   39.85 +    <para id="x_508">To put a number on the magnitude of this effect, I created a
   39.86 +      repository containing 150,000 managed files.  I timed <command
   39.87 +	role="hg-cmd">hg status</command> as taking ten seconds to
   39.88 +      run, even when <emphasis>none</emphasis> of those files had been
   39.89 +      modified.</para>
   39.90 +
   39.91 +    <para id="x_509">Many modern operating systems contain a file notification
   39.92 +      facility. If a program signs up to an appropriate service, the
   39.93 +      operating system will notify it every time a file of interest is
   39.94 +      created, modified, or deleted.  On Linux systems, the kernel
   39.95 +      component that does this is called
   39.96 +      <literal>inotify</literal>.</para>
   39.97 +
   39.98 +    <para id="x_50a">Mercurial's <literal role="hg-ext">inotify</literal>
   39.99 +      extension talks to the kernel's <literal>inotify</literal>
  39.100 +      component to optimise <command role="hg-cmd">hg status</command>
  39.101 +      commands.  The extension has two components.  A daemon sits in
  39.102 +      the background and receives notifications from the
  39.103 +      <literal>inotify</literal> subsystem.  It also listens for
  39.104 +      connections from a regular Mercurial command.  The extension
  39.105 +      modifies Mercurial's behavior so that instead of scanning the
  39.106 +      filesystem, it queries the daemon.  Since the daemon has perfect
  39.107 +      information about the state of the repository, it can respond
  39.108 +      with a result instantaneously, avoiding the need to scan every
  39.109 +      directory and file in the repository.</para>
  39.110 +
  39.111 +    <para id="x_50b">Recall the ten seconds that I measured plain Mercurial as
  39.112 +      taking to run <command role="hg-cmd">hg status</command> on a
  39.113 +      150,000 file repository.  With the <literal
  39.114 +	role="hg-ext">inotify</literal> extension enabled, the time
  39.115 +      dropped to 0.1 seconds, a factor of <emphasis>one
  39.116 +	hundred</emphasis> faster.</para>
  39.117 +
  39.118 +    <para id="x_50c">Before we continue, please pay attention to some
  39.119 +      caveats.</para>
  39.120 +    <itemizedlist>
  39.121 +      <listitem><para id="x_50d">The <literal role="hg-ext">inotify</literal>
  39.122 +	  extension is Linux-specific.  Because it interfaces directly
  39.123 +	  to the Linux kernel's <literal>inotify</literal> subsystem,
  39.124 +	  it does not work on other operating systems.</para>
  39.125 +      </listitem>
  39.126 +      <listitem><para id="x_50e">It should work on any Linux distribution that
  39.127 +	  was released after early 2005.  Older distributions are
  39.128 +	  likely to have a kernel that lacks
  39.129 +	  <literal>inotify</literal>, or a version of
  39.130 +	  <literal>glibc</literal> that does not have the necessary
  39.131 +	  interfacing support.</para>
  39.132 +      </listitem>
  39.133 +      <listitem><para id="x_50f">Not all filesystems are suitable for use with
  39.134 +	  the <literal role="hg-ext">inotify</literal> extension.
  39.135 +	  Network filesystems such as NFS are a non-starter, for
  39.136 +	  example, particularly if you're running Mercurial on several
  39.137 +	  systems, all mounting the same network filesystem.  The
  39.138 +	  kernel's <literal>inotify</literal> system has no way of
  39.139 +	  knowing about changes made on another system.  Most local
  39.140 +	  filesystems (e.g. ext3, XFS, ReiserFS) should work
  39.141 +	  fine.</para>
  39.142 +      </listitem></itemizedlist>
  39.143 +
  39.144 +    <para id="x_510">The <literal role="hg-ext">inotify</literal> extension is
  39.145 +      not yet shipped with Mercurial as of May 2007, so it's a little
  39.146 +      more involved to set up than other extensions.  But the
  39.147 +      performance improvement is worth it!</para>
  39.148 +
  39.149 +    <para id="x_511">The extension currently comes in two parts: a set of patches
  39.150 +      to the Mercurial source code, and a library of Python bindings
  39.151 +      to the <literal>inotify</literal> subsystem.</para>
  39.152 +    <note>
  39.153 +      <para id="x_512">  There are <emphasis>two</emphasis> Python
  39.154 +	<literal>inotify</literal> binding libraries.  One of them is
  39.155 +	called <literal>pyinotify</literal>, and is packaged by some
  39.156 +	Linux distributions as <literal>python-inotify</literal>.
  39.157 +	This is <emphasis>not</emphasis> the one you'll need, as it is
  39.158 +	too buggy and inefficient to be practical.</para>
  39.159 +    </note>
  39.160 +    <para id="x_513">To get going, it's best to already have a functioning copy
  39.161 +      of Mercurial installed.</para>
  39.162 +    <note>
  39.163 +      <para id="x_514">  If you follow the instructions below, you'll be
  39.164 +	<emphasis>replacing</emphasis> and overwriting any existing
  39.165 +	installation of Mercurial that you might already have, using
  39.166 +	the latest <quote>bleeding edge</quote> Mercurial code. Don't
  39.167 +	say you weren't warned!</para>
  39.168 +    </note>
  39.169 +    <orderedlist>
  39.170 +      <listitem><para id="x_515">Clone the Python <literal>inotify</literal>
  39.171 +	  binding repository.  Build and install it.</para>
  39.172 +	<programlisting>hg clone http://hg.kublai.com/python/inotify
  39.173 +cd inotify
  39.174 +python setup.py build --force
  39.175 +sudo python setup.py install --skip-build</programlisting>
  39.176 +      </listitem>
  39.177 +      <listitem><para id="x_516">Clone the <filename
  39.178 +	    class="directory">crew</filename> Mercurial repository.
  39.179 +	  Clone the <literal role="hg-ext">inotify</literal> patch
  39.180 +	  repository so that Mercurial Queues will be able to apply
  39.181 +	  patches to your cope of the <filename
  39.182 +	    class="directory">crew</filename> repository.</para>
  39.183 +	<programlisting>hg clone http://hg.intevation.org/mercurial/crew
  39.184 +hg clone crew inotify
  39.185 +hg clone http://hg.kublai.com/mercurial/patches/inotify inotify/.hg/patches</programlisting>
  39.186 +      </listitem>
  39.187 +      <listitem><para id="x_517">Make sure that you have the Mercurial Queues
  39.188 +	  extension, <literal role="hg-ext">mq</literal>, enabled.  If
  39.189 +	  you've never used MQ, read <xref
  39.190 +	    linkend="sec:mq:start"/> to get started
  39.191 +	  quickly.</para>
  39.192 +      </listitem>
  39.193 +      <listitem><para id="x_518">Go into the <filename
  39.194 +	    class="directory">inotify</filename> repo, and apply all
  39.195 +	  of the <literal role="hg-ext">inotify</literal> patches
  39.196 +	  using the <option role="hg-ext-mq-cmd-qpush-opt">hg
  39.197 +	    -a</option> option to the <command
  39.198 +	    role="hg-ext-mq">qpush</command> command.</para>
  39.199 +	<programlisting>cd inotify
  39.200 +hg qpush -a</programlisting>
  39.201 +      </listitem>
  39.202 +      <listitem><para id="x_519">  If you get an error message from <command
  39.203 +	    role="hg-ext-mq">qpush</command>, you should not continue.
  39.204 +	  Instead, ask for help.</para>
  39.205 +      </listitem>
  39.206 +      <listitem><para id="x_51a">Build and install the patched version of
  39.207 +	  Mercurial.</para>
  39.208 +	<programlisting>python setup.py build --force
  39.209 +sudo python setup.py install --skip-build</programlisting>
  39.210 +      </listitem>
  39.211 +    </orderedlist>
  39.212 +    <para id="x_51b">Once you've build a suitably patched version of Mercurial,
  39.213 +      all you need to do to enable the <literal
  39.214 +	role="hg-ext">inotify</literal> extension is add an entry to
  39.215 +      your <filename role="special">~/.hgrc</filename>.</para>
  39.216 +    <programlisting>[extensions] inotify =</programlisting>
  39.217 +    <para id="x_51c">When the <literal role="hg-ext">inotify</literal> extension
  39.218 +      is enabled, Mercurial will automatically and transparently start
  39.219 +      the status daemon the first time you run a command that needs
  39.220 +      status in a repository.  It runs one status daemon per
  39.221 +      repository.</para>
  39.222 +
  39.223 +    <para id="x_51d">The status daemon is started silently, and runs in the
  39.224 +      background.  If you look at a list of running processes after
  39.225 +      you've enabled the <literal role="hg-ext">inotify</literal>
  39.226 +      extension and run a few commands in different repositories,
  39.227 +      you'll thus see a few <literal>hg</literal> processes sitting
  39.228 +      around, waiting for updates from the kernel and queries from
  39.229 +      Mercurial.</para>
  39.230 +
  39.231 +    <para id="x_51e">The first time you run a Mercurial command in a repository
  39.232 +      when you have the <literal role="hg-ext">inotify</literal>
  39.233 +      extension enabled, it will run with about the same performance
  39.234 +      as a normal Mercurial command.  This is because the status
  39.235 +      daemon needs to perform a normal status scan so that it has a
  39.236 +      baseline against which to apply later updates from the kernel.
  39.237 +      However, <emphasis>every</emphasis> subsequent command that does
  39.238 +      any kind of status check should be noticeably faster on
  39.239 +      repositories of even fairly modest size.  Better yet, the bigger
  39.240 +      your repository is, the greater a performance advantage you'll
  39.241 +      see.  The <literal role="hg-ext">inotify</literal> daemon makes
  39.242 +      status operations almost instantaneous on repositories of all
  39.243 +      sizes!</para>
  39.244 +
  39.245 +    <para id="x_51f">If you like, you can manually start a status daemon using
  39.246 +      the <command role="hg-ext-inotify">inserve</command> command.
  39.247 +      This gives you slightly finer control over how the daemon ought
  39.248 +      to run.  This command will of course only be available when the
  39.249 +      <literal role="hg-ext">inotify</literal> extension is
  39.250 +      enabled.</para>
  39.251 +
  39.252 +    <para id="x_520">When you're using the <literal
  39.253 +	role="hg-ext">inotify</literal> extension, you should notice
  39.254 +      <emphasis>no difference at all</emphasis> in Mercurial's
  39.255 +      behavior, with the sole exception of status-related commands
  39.256 +      running a whole lot faster than they used to.  You should
  39.257 +      specifically expect that commands will not print different
  39.258 +      output; neither should they give different results. If either of
  39.259 +      these situations occurs, please report a bug.</para>
  39.260 +
  39.261 +  </sect1>
  39.262 +  <sect1 id="sec:hgext:extdiff">
  39.263 +    <title>Flexible diff support with the <literal
  39.264 +	role="hg-ext">extdiff</literal> extension</title>
  39.265 +
  39.266 +    <para id="x_521">Mercurial's built-in <command role="hg-cmd">hg
  39.267 +	diff</command> command outputs plaintext unified diffs.</para>
  39.268 +
  39.269 +    &interaction.extdiff.diff;
  39.270 +
  39.271 +    <para id="x_522">If you would like to use an external tool to display
  39.272 +      modifications, you'll want to use the <literal
  39.273 +	role="hg-ext">extdiff</literal> extension.  This will let you
  39.274 +      use, for example, a graphical diff tool.</para>
  39.275 +
  39.276 +    <para id="x_523">The <literal role="hg-ext">extdiff</literal> extension is
  39.277 +      bundled with Mercurial, so it's easy to set up.  In the <literal
  39.278 +	role="rc-extensions">extensions</literal> section of your
  39.279 +      <filename role="special">~/.hgrc</filename>, simply add a
  39.280 +      one-line entry to enable the extension.</para>
  39.281 +    <programlisting>[extensions]
  39.282 +extdiff =</programlisting>
  39.283 +    <para id="x_524">This introduces a command named <command
  39.284 +	role="hg-ext-extdiff">extdiff</command>, which by default uses
  39.285 +      your system's <command>diff</command> command to generate a
  39.286 +      unified diff in the same form as the built-in <command
  39.287 +	role="hg-cmd">hg diff</command> command.</para>
  39.288 +    
  39.289 +    &interaction.extdiff.extdiff;
  39.290 +
  39.291 +    <para id="x_525">The result won't be exactly the same as with the built-in
  39.292 +      <command role="hg-cmd">hg diff</command> variations, because the
  39.293 +      output of <command>diff</command> varies from one system to
  39.294 +      another, even when passed the same options.</para>
  39.295 +
  39.296 +    <para id="x_526">As the <quote><literal>making snapshot</literal></quote>
  39.297 +      lines of output above imply, the <command
  39.298 +	role="hg-ext-extdiff">extdiff</command> command works by
  39.299 +      creating two snapshots of your source tree.  The first snapshot
  39.300 +      is of the source revision; the second, of the target revision or
  39.301 +      working directory.  The <command
  39.302 +	role="hg-ext-extdiff">extdiff</command> command generates
  39.303 +      these snapshots in a temporary directory, passes the name of
  39.304 +      each directory to an external diff viewer, then deletes the
  39.305 +      temporary directory.  For efficiency, it only snapshots the
  39.306 +      directories and files that have changed between the two
  39.307 +      revisions.</para>
  39.308 +
  39.309 +    <para id="x_527">Snapshot directory names have the same base name as your
  39.310 +      repository. If your repository path is <filename
  39.311 +	class="directory">/quux/bar/foo</filename>, then <filename
  39.312 +	class="directory">foo</filename> will be the name of each
  39.313 +      snapshot directory.  Each snapshot directory name has its
  39.314 +      changeset ID appended, if appropriate.  If a snapshot is of
  39.315 +      revision <literal>a631aca1083f</literal>, the directory will be
  39.316 +      named <filename class="directory">foo.a631aca1083f</filename>.
  39.317 +      A snapshot of the working directory won't have a changeset ID
  39.318 +      appended, so it would just be <filename
  39.319 +	class="directory">foo</filename> in this example.  To see what
  39.320 +      this looks like in practice, look again at the <command
  39.321 +	role="hg-ext-extdiff">extdiff</command> example above.  Notice
  39.322 +      that the diff has the snapshot directory names embedded in its
  39.323 +      header.</para>
  39.324 +
  39.325 +    <para id="x_528">The <command role="hg-ext-extdiff">extdiff</command> command
  39.326 +      accepts two important options. The <option
  39.327 +	role="hg-ext-extdiff-cmd-extdiff-opt">hg -p</option> option
  39.328 +      lets you choose a program to view differences with, instead of
  39.329 +      <command>diff</command>.  With the <option
  39.330 +	role="hg-ext-extdiff-cmd-extdiff-opt">hg -o</option> option,
  39.331 +      you can change the options that <command
  39.332 +	role="hg-ext-extdiff">extdiff</command> passes to the program
  39.333 +      (by default, these options are
  39.334 +      <quote><literal>-Npru</literal></quote>, which only make sense
  39.335 +      if you're running <command>diff</command>).  In other respects,
  39.336 +      the <command role="hg-ext-extdiff">extdiff</command> command
  39.337 +      acts similarly to the built-in <command role="hg-cmd">hg
  39.338 +	diff</command> command: you use the same option names, syntax,
  39.339 +      and arguments to specify the revisions you want, the files you
  39.340 +      want, and so on.</para>
  39.341 +
  39.342 +    <para id="x_529">As an example, here's how to run the normal system
  39.343 +      <command>diff</command> command, getting it to generate context
  39.344 +      diffs (using the <option role="cmd-opt-diff">-c</option> option)
  39.345 +      instead of unified diffs, and five lines of context instead of
  39.346 +      the default three (passing <literal>5</literal> as the argument
  39.347 +      to the <option role="cmd-opt-diff">-C</option> option).</para>
  39.348 +
  39.349 +      &interaction.extdiff.extdiff-ctx;
  39.350 +
  39.351 +    <para id="x_52a">Launching a visual diff tool is just as easy.  Here's how to
  39.352 +      launch the <command>kdiff3</command> viewer.</para>
  39.353 +    <programlisting>hg extdiff -p kdiff3 -o</programlisting>
  39.354 +
  39.355 +    <para id="x_52b">If your diff viewing command can't deal with directories,
  39.356 +      you can easily work around this with a little scripting.  For an
  39.357 +      example of such scripting in action with the <literal
  39.358 +	role="hg-ext">mq</literal> extension and the
  39.359 +      <command>interdiff</command> command, see <xref
  39.360 +	linkend="mq-collab:tips:interdiff"/>.</para>
  39.361 +
  39.362 +    <sect2>
  39.363 +      <title>Defining command aliases</title>
  39.364 +
  39.365 +      <para id="x_52c">It can be cumbersome to remember the options to both the
  39.366 +	<command role="hg-ext-extdiff">extdiff</command> command and
  39.367 +	the diff viewer you want to use, so the <literal
  39.368 +	  role="hg-ext">extdiff</literal> extension lets you define
  39.369 +	<emphasis>new</emphasis> commands that will invoke your diff
  39.370 +	viewer with exactly the right options.</para>
  39.371 +
  39.372 +      <para id="x_52d">All you need to do is edit your <filename
  39.373 +	  role="special">~/.hgrc</filename>, and add a section named
  39.374 +	<literal role="rc-extdiff">extdiff</literal>.  Inside this
  39.375 +	section, you can define multiple commands.  Here's how to add
  39.376 +	a <literal>kdiff3</literal> command.  Once you've defined
  39.377 +	this, you can type <quote><literal>hg kdiff3</literal></quote>
  39.378 +	and the <literal role="hg-ext">extdiff</literal> extension
  39.379 +	will run <command>kdiff3</command> for you.</para>
  39.380 +      <programlisting>[extdiff]
  39.381 +cmd.kdiff3 =</programlisting>
  39.382 +      <para id="x_52e">If you leave the right hand side of the definition empty,
  39.383 +	as above, the <literal role="hg-ext">extdiff</literal>
  39.384 +	extension uses the name of the command you defined as the name
  39.385 +	of the external program to run.  But these names don't have to
  39.386 +	be the same.  Here, we define a command named
  39.387 +	<quote><literal>hg wibble</literal></quote>, which runs
  39.388 +	<command>kdiff3</command>.</para>
  39.389 +      <programlisting>[extdiff]
  39.390 + cmd.wibble = kdiff3</programlisting>
  39.391 +
  39.392 +      <para id="x_52f">You can also specify the default options that you want to
  39.393 +	invoke your diff viewing program with.  The prefix to use is
  39.394 +	<quote><literal>opts.</literal></quote>, followed by the name
  39.395 +	of the command to which the options apply.  This example
  39.396 +	defines a <quote><literal>hg vimdiff</literal></quote> command
  39.397 +	that runs the <command>vim</command> editor's
  39.398 +	<literal>DirDiff</literal> extension.</para>
  39.399 +      <programlisting>[extdiff]
  39.400 + cmd.vimdiff = vim
  39.401 +opts.vimdiff = -f '+next' '+execute "DirDiff" argv(0) argv(1)'</programlisting>
  39.402 +
  39.403 +    </sect2>
  39.404 +  </sect1>
  39.405 +  <sect1 id="sec:hgext:transplant">
  39.406 +    <title>Cherrypicking changes with the <literal
  39.407 +	role="hg-ext">transplant</literal> extension</title>
  39.408 +
  39.409 +    <para id="x_530">Need to have a long chat with Brendan about this.</para>
  39.410 +
  39.411 +  </sect1>
  39.412 +  <sect1 id="sec:hgext:patchbomb">
  39.413 +    <title>Send changes via email with the <literal
  39.414 +	role="hg-ext">patchbomb</literal> extension</title>
  39.415 +
  39.416 +    <para id="x_531">Many projects have a culture of <quote>change
  39.417 +	review</quote>, in which people send their modifications to a
  39.418 +      mailing list for others to read and comment on before they
  39.419 +      commit the final version to a shared repository.  Some projects
  39.420 +      have people who act as gatekeepers; they apply changes from
  39.421 +      other people to a repository to which those others don't have
  39.422 +      access.</para>
  39.423 +
  39.424 +    <para id="x_532">Mercurial makes it easy to send changes over email for
  39.425 +      review or application, via its <literal
  39.426 +	role="hg-ext">patchbomb</literal> extension.  The extension is
  39.427 +      so named because changes are formatted as patches, and it's usual
  39.428 +      to send one changeset per email message.  Sending a long series
  39.429 +      of changes by email is thus much like <quote>bombing</quote> the
  39.430 +      recipient's inbox, hence <quote>patchbomb</quote>.</para>
  39.431 +
  39.432 +    <para id="x_533">As usual, the basic configuration of the <literal
  39.433 +	role="hg-ext">patchbomb</literal> extension takes just one or
  39.434 +      two lines in your <filename role="special">
  39.435 +	/.hgrc</filename>.</para>
  39.436 +    <programlisting>[extensions]
  39.437 +patchbomb =</programlisting>
  39.438 +    <para id="x_534">Once you've enabled the extension, you will have a new
  39.439 +      command available, named <command
  39.440 +	role="hg-ext-patchbomb">email</command>.</para>
  39.441 +
  39.442 +    <para id="x_535">The safest and best way to invoke the <command
  39.443 +	role="hg-ext-patchbomb">email</command> command is to
  39.444 +      <emphasis>always</emphasis> run it first with the <option
  39.445 +	role="hg-ext-patchbomb-cmd-email-opt">hg -n</option> option.
  39.446 +      This will show you what the command <emphasis>would</emphasis>
  39.447 +      send, without actually sending anything.  Once you've had a
  39.448 +      quick glance over the changes and verified that you are sending
  39.449 +      the right ones, you can rerun the same command, with the <option
  39.450 +	role="hg-ext-patchbomb-cmd-email-opt">hg -n</option> option
  39.451 +      removed.</para>
  39.452 +
  39.453 +    <para id="x_536">The <command role="hg-ext-patchbomb">email</command> command
  39.454 +      accepts the same kind of revision syntax as every other
  39.455 +      Mercurial command.  For example, this command will send every
  39.456 +      revision between 7 and <literal>tip</literal>, inclusive.</para>
  39.457 +    <programlisting>hg email -n 7:tip</programlisting>
  39.458 +    <para id="x_537">You can also specify a <emphasis>repository</emphasis> to
  39.459 +      compare with.  If you provide a repository but no revisions, the
  39.460 +      <command role="hg-ext-patchbomb">email</command> command will
  39.461 +      send all revisions in the local repository that are not present
  39.462 +      in the remote repository.  If you additionally specify revisions
  39.463 +      or a branch name (the latter using the <option
  39.464 +	role="hg-ext-patchbomb-cmd-email-opt">hg -b</option> option),
  39.465 +      this will constrain the revisions sent.</para>
  39.466 +
  39.467 +    <para id="x_538">It's perfectly safe to run the <command
  39.468 +	role="hg-ext-patchbomb">email</command> command without the
  39.469 +      names of the people you want to send to: if you do this, it will
  39.470 +      just prompt you for those values interactively.  (If you're
  39.471 +      using a Linux or Unix-like system, you should have enhanced
  39.472 +      <literal>readline</literal>-style editing capabilities when
  39.473 +      entering those headers, too, which is useful.)</para>
  39.474 +
  39.475 +    <para id="x_539">When you are sending just one revision, the <command
  39.476 +	role="hg-ext-patchbomb">email</command> command will by
  39.477 +      default use the first line of the changeset description as the
  39.478 +      subject of the single email message it sends.</para>
  39.479 +
  39.480 +    <para id="x_53a">If you send multiple revisions, the <command
  39.481 +	role="hg-ext-patchbomb">email</command> command will usually
  39.482 +      send one message per changeset.  It will preface the series with
  39.483 +      an introductory message, in which you should describe the
  39.484 +      purpose of the series of changes you're sending.</para>
  39.485 +
  39.486 +    <sect2>
  39.487 +      <title>Changing the behavior of patchbombs</title>
  39.488 +
  39.489 +      <para id="x_53b">Not every project has exactly the same conventions for
  39.490 +	sending changes in email; the <literal
  39.491 +	  role="hg-ext">patchbomb</literal> extension tries to
  39.492 +	accommodate a number of variations through command line
  39.493 +	options.</para>
  39.494 +      <itemizedlist>
  39.495 +	<listitem><para id="x_53c">You can write a subject for the introductory
  39.496 +	    message on the command line using the <option
  39.497 +	      role="hg-ext-patchbomb-cmd-email-opt">hg -s</option>
  39.498 +	    option.  This takes one argument, the text of the subject
  39.499 +	    to use.</para>
  39.500 +	</listitem>
  39.501 +	<listitem><para id="x_53d">To change the email address from which the
  39.502 +	    messages originate, use the <option
  39.503 +	      role="hg-ext-patchbomb-cmd-email-opt">hg -f</option>
  39.504 +	    option.  This takes one argument, the email address to
  39.505 +	    use.</para>
  39.506 +	</listitem>
  39.507 +	<listitem><para id="x_53e">The default behavior is to send unified diffs
  39.508 +	    (see <xref linkend="sec:mq:patch"/> for a
  39.509 +	    description of the
  39.510 +	    format), one per message.  You can send a binary bundle
  39.511 +	    instead with the <option
  39.512 +	      role="hg-ext-patchbomb-cmd-email-opt">hg -b</option>
  39.513 +	    option.</para>
  39.514 +	</listitem>
  39.515 +	<listitem><para id="x_53f">Unified diffs are normally prefaced with a
  39.516 +	    metadata header.  You can omit this, and send unadorned
  39.517 +	    diffs, with the <option
  39.518 +	      role="hg-ext-patchbomb-cmd-email-opt">hg
  39.519 +	      --plain</option> option.</para>
  39.520 +	</listitem>
  39.521 +	<listitem><para id="x_540">Diffs are normally sent <quote>inline</quote>,
  39.522 +	    in the same body part as the description of a patch.  This
  39.523 +	    makes it easiest for the largest number of readers to
  39.524 +	    quote and respond to parts of a diff, as some mail clients
  39.525 +	    will only quote the first MIME body part in a message. If
  39.526 +	    you'd prefer to send the description and the diff in
  39.527 +	    separate body parts, use the <option
  39.528 +	      role="hg-ext-patchbomb-cmd-email-opt">hg -a</option>
  39.529 +	    option.</para>
  39.530 +	</listitem>
  39.531 +	<listitem><para id="x_541">Instead of sending mail messages, you can
  39.532 +	    write them to an <literal>mbox</literal>-format mail
  39.533 +	    folder using the <option
  39.534 +	      role="hg-ext-patchbomb-cmd-email-opt">hg -m</option>
  39.535 +	    option.  That option takes one argument, the name of the
  39.536 +	    file to write to.</para>
  39.537 +	</listitem>
  39.538 +	<listitem><para id="x_542">If you would like to add a
  39.539 +	    <command>diffstat</command>-format summary to each patch,
  39.540 +	    and one to the introductory message, use the <option
  39.541 +	      role="hg-ext-patchbomb-cmd-email-opt">hg -d</option>
  39.542 +	    option.  The <command>diffstat</command> command displays
  39.543 +	    a table containing the name of each file patched, the
  39.544 +	    number of lines affected, and a histogram showing how much
  39.545 +	    each file is modified.  This gives readers a qualitative
  39.546 +	    glance at how complex a patch is.</para>
  39.547 +	</listitem></itemizedlist>
  39.548 +
  39.549 +    </sect2>
  39.550 +  </sect1>
  39.551 +</chapter>
  39.552 +
  39.553 +<!--
  39.554 +local variables: 
  39.555 +sgml-parent-document: ("00book.xml" "book" "chapter")
  39.556 +end:
  39.557 +-->
    40.1 --- a/en/cmdref.tex	Thu Mar 26 08:57:10 2009 +0100
    40.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.3 @@ -1,176 +0,0 @@
    40.4 -\chapter{Command reference}
    40.5 -\label{cmdref}
    40.6 -
    40.7 -\cmdref{add}{add files at the next commit}
    40.8 -\optref{add}{I}{include}
    40.9 -\optref{add}{X}{exclude}
   40.10 -\optref{add}{n}{dry-run}
   40.11 -
   40.12 -\cmdref{diff}{print changes in history or working directory}
   40.13 -
   40.14 -Show differences between revisions for the specified files or
   40.15 -directories, using the unified diff format.  For a description of the
   40.16 -unified diff format, see section~\ref{sec:mq:patch}.
   40.17 -
   40.18 -By default, this command does not print diffs for files that Mercurial
   40.19 -considers to contain binary data.  To control this behaviour, see the
   40.20 -\hgopt{diff}{-a} and \hgopt{diff}{--git} options.
   40.21 -
   40.22 -\subsection{Options}
   40.23 -
   40.24 -\loptref{diff}{nodates}
   40.25 -
   40.26 -Omit date and time information when printing diff headers.
   40.27 -
   40.28 -\optref{diff}{B}{ignore-blank-lines}
   40.29 -
   40.30 -Do not print changes that only insert or delete blank lines.  A line
   40.31 -that contains only whitespace is not considered blank.
   40.32 -
   40.33 -\optref{diff}{I}{include}
   40.34 -
   40.35 -Include files and directories whose names match the given patterns.
   40.36 -
   40.37 -\optref{diff}{X}{exclude}
   40.38 -
   40.39 -Exclude files and directories whose names match the given patterns.
   40.40 -
   40.41 -\optref{diff}{a}{text}
   40.42 -
   40.43 -If this option is not specified, \hgcmd{diff} will refuse to print
   40.44 -diffs for files that it detects as binary. Specifying \hgopt{diff}{-a}
   40.45 -forces \hgcmd{diff} to treat all files as text, and generate diffs for
   40.46 -all of them.
   40.47 -
   40.48 -This option is useful for files that are ``mostly text'' but have a
   40.49 -few embedded NUL characters.  If you use it on files that contain a
   40.50 -lot of binary data, its output will be incomprehensible.
   40.51 -
   40.52 -\optref{diff}{b}{ignore-space-change}
   40.53 -
   40.54 -Do not print a line if the only change to that line is in the amount
   40.55 -of white space it contains.
   40.56 -
   40.57 -\optref{diff}{g}{git}
   40.58 -
   40.59 -Print \command{git}-compatible diffs.  XXX reference a format
   40.60 -description.
   40.61 -
   40.62 -\optref{diff}{p}{show-function}
   40.63 -
   40.64 -Display the name of the enclosing function in a hunk header, using a
   40.65 -simple heuristic.  This functionality is enabled by default, so the
   40.66 -\hgopt{diff}{-p} option has no effect unless you change the value of
   40.67 -the \rcitem{diff}{showfunc} config item, as in the following example.
   40.68 -\interaction{cmdref.diff-p}
   40.69 -
   40.70 -\optref{diff}{r}{rev}
   40.71 -
   40.72 -Specify one or more revisions to compare.  The \hgcmd{diff} command
   40.73 -accepts up to two \hgopt{diff}{-r} options to specify the revisions to
   40.74 -compare.
   40.75 -
   40.76 -\begin{enumerate}
   40.77 -\setcounter{enumi}{0}
   40.78 -\item Display the differences between the parent revision of the
   40.79 -  working directory and the working directory.
   40.80 -\item Display the differences between the specified changeset and the
   40.81 -  working directory.
   40.82 -\item Display the differences between the two specified changesets.
   40.83 -\end{enumerate}
   40.84 -
   40.85 -You can specify two revisions using either two \hgopt{diff}{-r}
   40.86 -options or revision range notation.  For example, the two revision
   40.87 -specifications below are equivalent.
   40.88 -\begin{codesample2}
   40.89 -  hg diff -r 10 -r 20
   40.90 -  hg diff -r10:20
   40.91 -\end{codesample2}
   40.92 -
   40.93 -When you provide two revisions, Mercurial treats the order of those
   40.94 -revisions as significant.  Thus, \hgcmdargs{diff}{-r10:20} will
   40.95 -produce a diff that will transform files from their contents as of
   40.96 -revision~10 to their contents as of revision~20, while
   40.97 -\hgcmdargs{diff}{-r20:10} means the opposite: the diff that will
   40.98 -transform files from their revision~20 contents to their revision~10
   40.99 -contents.  You cannot reverse the ordering in this way if you are
  40.100 -diffing against the working directory.
  40.101 -
  40.102 -\optref{diff}{w}{ignore-all-space}
  40.103 -
  40.104 -\cmdref{version}{print version and copyright information}
  40.105 -
  40.106 -This command displays the version of Mercurial you are running, and
  40.107 -its copyright license.  There are four kinds of version string that
  40.108 -you may see.
  40.109 -\begin{itemize}
  40.110 -\item The string ``\texttt{unknown}''. This version of Mercurial was
  40.111 -  not built in a Mercurial repository, and cannot determine its own
  40.112 -  version.
  40.113 -\item A short numeric string, such as ``\texttt{1.1}''. This is a
  40.114 -  build of a revision of Mercurial that was identified by a specific
  40.115 -  tag in the repository where it was built.  (This doesn't necessarily
  40.116 -  mean that you're running an official release; someone else could
  40.117 -  have added that tag to any revision in the repository where they
  40.118 -  built Mercurial.)
  40.119 -\item A hexadecimal string, such as ``\texttt{875489e31abe}''.  This
  40.120 -  is a build of the given revision of Mercurial.
  40.121 -\item A hexadecimal string followed by a date, such as
  40.122 -  ``\texttt{875489e31abe+20070205}''.  This is a build of the given
  40.123 -  revision of Mercurial, where the build repository contained some
  40.124 -  local changes that had not been committed.
  40.125 -\end{itemize}
  40.126 -
  40.127 -\subsection{Tips and tricks}
  40.128 -
  40.129 -\subsubsection{Why do the results of \hgcmd{diff} and \hgcmd{status}
  40.130 -  differ?}
  40.131 -\label{cmdref:diff-vs-status}
  40.132 -
  40.133 -When you run the \hgcmd{status} command, you'll see a list of files
  40.134 -that Mercurial will record changes for the next time you perform a
  40.135 -commit.  If you run the \hgcmd{diff} command, you may notice that it
  40.136 -prints diffs for only a \emph{subset} of the files that \hgcmd{status}
  40.137 -listed.  There are two possible reasons for this.
  40.138 -
  40.139 -The first is that \hgcmd{status} prints some kinds of modifications
  40.140 -that \hgcmd{diff} doesn't normally display.  The \hgcmd{diff} command
  40.141 -normally outputs unified diffs, which don't have the ability to
  40.142 -represent some changes that Mercurial can track.  Most notably,
  40.143 -traditional diffs can't represent a change in whether or not a file is
  40.144 -executable, but Mercurial records this information.
  40.145 -
  40.146 -If you use the \hgopt{diff}{--git} option to \hgcmd{diff}, it will
  40.147 -display \command{git}-compatible diffs that \emph{can} display this
  40.148 -extra information.
  40.149 -
  40.150 -The second possible reason that \hgcmd{diff} might be printing diffs
  40.151 -for a subset of the files displayed by \hgcmd{status} is that if you
  40.152 -invoke it without any arguments, \hgcmd{diff} prints diffs against the
  40.153 -first parent of the working directory.  If you have run \hgcmd{merge}
  40.154 -to merge two changesets, but you haven't yet committed the results of
  40.155 -the merge, your working directory has two parents (use \hgcmd{parents}
  40.156 -to see them).  While \hgcmd{status} prints modifications relative to
  40.157 -\emph{both} parents after an uncommitted merge, \hgcmd{diff} still
  40.158 -operates relative only to the first parent.  You can get it to print
  40.159 -diffs relative to the second parent by specifying that parent with the
  40.160 -\hgopt{diff}{-r} option.  There is no way to print diffs relative to
  40.161 -both parents.
  40.162 -
  40.163 -\subsubsection{Generating safe binary diffs}
  40.164 -
  40.165 -If you use the \hgopt{diff}{-a} option to force Mercurial to print
  40.166 -diffs of files that are either ``mostly text'' or contain lots of
  40.167 -binary data, those diffs cannot subsequently be applied by either
  40.168 -Mercurial's \hgcmd{import} command or the system's \command{patch}
  40.169 -command.  
  40.170 -
  40.171 -If you want to generate a diff of a binary file that is safe to use as
  40.172 -input for \hgcmd{import}, use the \hgcmd{diff}{--git} option when you
  40.173 -generate the patch.  The system \command{patch} command cannot handle
  40.174 -binary patches at all.
  40.175 -
  40.176 -%%% Local Variables: 
  40.177 -%%% mode: latex
  40.178 -%%% TeX-master: "00book"
  40.179 -%%% End: 
    41.1 --- a/en/collab.tex	Thu Mar 26 08:57:10 2009 +0100
    41.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    41.3 @@ -1,1118 +0,0 @@
    41.4 -\chapter{Collaborating with other people}
    41.5 -\label{cha:collab}
    41.6 -
    41.7 -As a completely decentralised tool, Mercurial doesn't impose any
    41.8 -policy on how people ought to work with each other.  However, if
    41.9 -you're new to distributed revision control, it helps to have some
   41.10 -tools and examples in mind when you're thinking about possible
   41.11 -workflow models.
   41.12 -
   41.13 -\section{Mercurial's web interface}
   41.14 -
   41.15 -Mercurial has a powerful web interface that provides several 
   41.16 -useful capabilities.
   41.17 -
   41.18 -For interactive use, the web interface lets you browse a single
   41.19 -repository or a collection of repositories.  You can view the history
   41.20 -of a repository, examine each change (comments and diffs), and view
   41.21 -the contents of each directory and file.
   41.22 -
   41.23 -Also for human consumption, the web interface provides an RSS feed of
   41.24 -the changes in a repository.  This lets you ``subscribe'' to a
   41.25 -repository using your favourite feed reader, and be automatically
   41.26 -notified of activity in that repository as soon as it happens.  I find
   41.27 -this capability much more convenient than the model of subscribing to
   41.28 -a mailing list to which notifications are sent, as it requires no
   41.29 -additional configuration on the part of whoever is serving the
   41.30 -repository.
   41.31 -
   41.32 -The web interface also lets remote users clone a repository, pull
   41.33 -changes from it, and (when the server is configured to permit it) push
   41.34 -changes back to it.  Mercurial's HTTP tunneling protocol aggressively
   41.35 -compresses data, so that it works efficiently even over low-bandwidth
   41.36 -network connections.
   41.37 -
   41.38 -The easiest way to get started with the web interface is to use your
   41.39 -web browser to visit an existing repository, such as the master
   41.40 -Mercurial repository at
   41.41 -\url{http://www.selenic.com/repo/hg?style=gitweb}.
   41.42 -
   41.43 -If you're interested in providing a web interface to your own
   41.44 -repositories, Mercurial provides two ways to do this.  The first is
   41.45 -using the \hgcmd{serve} command, which is best suited to short-term
   41.46 -``lightweight'' serving.  See section~\ref{sec:collab:serve} below for
   41.47 -details of how to use this command.  If you have a long-lived
   41.48 -repository that you'd like to make permanently available, Mercurial
   41.49 -has built-in support for the CGI (Common Gateway Interface) standard,
   41.50 -which all common web servers support.  See
   41.51 -section~\ref{sec:collab:cgi} for details of CGI configuration.
   41.52 -
   41.53 -\section{Collaboration models}
   41.54 -
   41.55 -With a suitably flexible tool, making decisions about workflow is much
   41.56 -more of a social engineering challenge than a technical one.
   41.57 -Mercurial imposes few limitations on how you can structure the flow of
   41.58 -work in a project, so it's up to you and your group to set up and live
   41.59 -with a model that matches your own particular needs.
   41.60 -
   41.61 -\subsection{Factors to keep in mind}
   41.62 -
   41.63 -The most important aspect of any model that you must keep in mind is
   41.64 -how well it matches the needs and capabilities of the people who will
   41.65 -be using it.  This might seem self-evident; even so, you still can't
   41.66 -afford to forget it for a moment.
   41.67 -
   41.68 -I once put together a workflow model that seemed to make perfect sense
   41.69 -to me, but that caused a considerable amount of consternation and
   41.70 -strife within my development team.  In spite of my attempts to explain
   41.71 -why we needed a complex set of branches, and how changes ought to flow
   41.72 -between them, a few team members revolted.  Even though they were
   41.73 -smart people, they didn't want to pay attention to the constraints we
   41.74 -were operating under, or face the consequences of those constraints in
   41.75 -the details of the model that I was advocating.
   41.76 -
   41.77 -Don't sweep foreseeable social or technical problems under the rug.
   41.78 -Whatever scheme you put into effect, you should plan for mistakes and
   41.79 -problem scenarios.  Consider adding automated machinery to prevent, or
   41.80 -quickly recover from, trouble that you can anticipate.  As an example,
   41.81 -if you intend to have a branch with not-for-release changes in it,
   41.82 -you'd do well to think early about the possibility that someone might
   41.83 -accidentally merge those changes into a release branch.  You could
   41.84 -avoid this particular problem by writing a hook that prevents changes
   41.85 -from being merged from an inappropriate branch.
   41.86 -
   41.87 -\subsection{Informal anarchy}
   41.88 -
   41.89 -I wouldn't suggest an ``anything goes'' approach as something
   41.90 -sustainable, but it's a model that's easy to grasp, and it works
   41.91 -perfectly well in a few unusual situations.
   41.92 -
   41.93 -As one example, many projects have a loose-knit group of collaborators
   41.94 -who rarely physically meet each other.  Some groups like to overcome
   41.95 -the isolation of working at a distance by organising occasional
   41.96 -``sprints''.  In a sprint, a number of people get together in a single
   41.97 -location (a company's conference room, a hotel meeting room, that kind
   41.98 -of place) and spend several days more or less locked in there, hacking
   41.99 -intensely on a handful of projects.
  41.100 -
  41.101 -A sprint is the perfect place to use the \hgcmd{serve} command, since
  41.102 -\hgcmd{serve} does not requires any fancy server infrastructure.  You
  41.103 -can get started with \hgcmd{serve} in moments, by reading
  41.104 -section~\ref{sec:collab:serve} below.  Then simply tell the person
  41.105 -next to you that you're running a server, send the URL to them in an
  41.106 -instant message, and you immediately have a quick-turnaround way to
  41.107 -work together.  They can type your URL into their web browser and
  41.108 -quickly review your changes; or they can pull a bugfix from you and
  41.109 -verify it; or they can clone a branch containing a new feature and try
  41.110 -it out.
  41.111 -
  41.112 -The charm, and the problem, with doing things in an ad hoc fashion
  41.113 -like this is that only people who know about your changes, and where
  41.114 -they are, can see them.  Such an informal approach simply doesn't
  41.115 -scale beyond a handful people, because each individual needs to know
  41.116 -about $n$ different repositories to pull from.
  41.117 -
  41.118 -\subsection{A single central repository}
  41.119 -
  41.120 -For smaller projects migrating from a centralised revision control
  41.121 -tool, perhaps the easiest way to get started is to have changes flow
  41.122 -through a single shared central repository.  This is also the
  41.123 -most common ``building block'' for more ambitious workflow schemes.
  41.124 -
  41.125 -Contributors start by cloning a copy of this repository.  They can
  41.126 -pull changes from it whenever they need to, and some (perhaps all)
  41.127 -developers have permission to push a change back when they're ready
  41.128 -for other people to see it.
  41.129 -
  41.130 -Under this model, it can still often make sense for people to pull
  41.131 -changes directly from each other, without going through the central
  41.132 -repository.  Consider a case in which I have a tentative bug fix, but
  41.133 -I am worried that if I were to publish it to the central repository,
  41.134 -it might subsequently break everyone else's trees as they pull it.  To
  41.135 -reduce the potential for damage, I can ask you to clone my repository
  41.136 -into a temporary repository of your own and test it.  This lets us put
  41.137 -off publishing the potentially unsafe change until it has had a little
  41.138 -testing.
  41.139 -
  41.140 -In this kind of scenario, people usually use the \command{ssh}
  41.141 -protocol to securely push changes to the central repository, as
  41.142 -documented in section~\ref{sec:collab:ssh}.  It's also usual to
  41.143 -publish a read-only copy of the repository over HTTP using CGI, as in
  41.144 -section~\ref{sec:collab:cgi}.  Publishing over HTTP satisfies the
  41.145 -needs of people who don't have push access, and those who want to use
  41.146 -web browsers to browse the repository's history.
  41.147 -
  41.148 -\subsection{Working with multiple branches}
  41.149 -
  41.150 -Projects of any significant size naturally tend to make progress on
  41.151 -several fronts simultaneously.  In the case of software, it's common
  41.152 -for a project to go through periodic official releases.  A release
  41.153 -might then go into ``maintenance mode'' for a while after its first
  41.154 -publication; maintenance releases tend to contain only bug fixes, not
  41.155 -new features.  In parallel with these maintenance releases, one or
  41.156 -more future releases may be under development.  People normally use
  41.157 -the word ``branch'' to refer to one of these many slightly different
  41.158 -directions in which development is proceeding.
  41.159 -
  41.160 -Mercurial is particularly well suited to managing a number of
  41.161 -simultaneous, but not identical, branches.  Each ``development
  41.162 -direction'' can live in its own central repository, and you can merge
  41.163 -changes from one to another as the need arises.  Because repositories
  41.164 -are independent of each other, unstable changes in a development
  41.165 -branch will never affect a stable branch unless someone explicitly
  41.166 -merges those changes in.
  41.167 -
  41.168 -Here's an example of how this can work in practice.  Let's say you
  41.169 -have one ``main branch'' on a central server.
  41.170 -\interaction{branching.init}
  41.171 -People clone it, make changes locally, test them, and push them back.
  41.172 -
  41.173 -Once the main branch reaches a release milestone, you can use the
  41.174 -\hgcmd{tag} command to give a permanent name to the milestone
  41.175 -revision.
  41.176 -\interaction{branching.tag}
  41.177 -Let's say some ongoing development occurs on the main branch.
  41.178 -\interaction{branching.main}
  41.179 -Using the tag that was recorded at the milestone, people who clone
  41.180 -that repository at any time in the future can use \hgcmd{update} to
  41.181 -get a copy of the working directory exactly as it was when that tagged
  41.182 -revision was committed.  
  41.183 -\interaction{branching.update}
  41.184 -
  41.185 -In addition, immediately after the main branch is tagged, someone can
  41.186 -then clone the main branch on the server to a new ``stable'' branch,
  41.187 -also on the server.
  41.188 -\interaction{branching.clone}
  41.189 -
  41.190 -Someone who needs to make a change to the stable branch can then clone
  41.191 -\emph{that} repository, make their changes, commit, and push their
  41.192 -changes back there.
  41.193 -\interaction{branching.stable}
  41.194 -Because Mercurial repositories are independent, and Mercurial doesn't
  41.195 -move changes around automatically, the stable and main branches are
  41.196 -\emph{isolated} from each other.  The changes that you made on the
  41.197 -main branch don't ``leak'' to the stable branch, and vice versa.
  41.198 -
  41.199 -You'll often want all of your bugfixes on the stable branch to show up
  41.200 -on the main branch, too.  Rather than rewrite a bugfix on the main
  41.201 -branch, you can simply pull and merge changes from the stable to the
  41.202 -main branch, and Mercurial will bring those bugfixes in for you.
  41.203 -\interaction{branching.merge}
  41.204 -The main branch will still contain changes that are not on the stable
  41.205 -branch, but it will also contain all of the bugfixes from the stable
  41.206 -branch.  The stable branch remains unaffected by these changes.
  41.207 -
  41.208 -\subsection{Feature branches}
  41.209 -
  41.210 -For larger projects, an effective way to manage change is to break up
  41.211 -a team into smaller groups.  Each group has a shared branch of its
  41.212 -own, cloned from a single ``master'' branch used by the entire
  41.213 -project.  People working on an individual branch are typically quite
  41.214 -isolated from developments on other branches.
  41.215 -
  41.216 -\begin{figure}[ht]
  41.217 -  \centering
  41.218 -  \grafix{feature-branches}
  41.219 -  \caption{Feature branches}
  41.220 -  \label{fig:collab:feature-branches}
  41.221 -\end{figure}
  41.222 -
  41.223 -When a particular feature is deemed to be in suitable shape, someone
  41.224 -on that feature team pulls and merges from the master branch into the
  41.225 -feature branch, then pushes back up to the master branch.
  41.226 -
  41.227 -\subsection{The release train}
  41.228 -
  41.229 -Some projects are organised on a ``train'' basis: a release is
  41.230 -scheduled to happen every few months, and whatever features are ready
  41.231 -when the ``train'' is ready to leave are allowed in.
  41.232 -
  41.233 -This model resembles working with feature branches.  The difference is
  41.234 -that when a feature branch misses a train, someone on the feature team
  41.235 -pulls and merges the changes that went out on that train release into
  41.236 -the feature branch, and the team continues its work on top of that
  41.237 -release so that their feature can make the next release.
  41.238 -
  41.239 -\subsection{The Linux kernel model}
  41.240 -
  41.241 -The development of the Linux kernel has a shallow hierarchical
  41.242 -structure, surrounded by a cloud of apparent chaos.  Because most
  41.243 -Linux developers use \command{git}, a distributed revision control
  41.244 -tool with capabilities similar to Mercurial, it's useful to describe
  41.245 -the way work flows in that environment; if you like the ideas, the
  41.246 -approach translates well across tools.
  41.247 -
  41.248 -At the center of the community sits Linus Torvalds, the creator of
  41.249 -Linux.  He publishes a single source repository that is considered the
  41.250 -``authoritative'' current tree by the entire developer community.
  41.251 -Anyone can clone Linus's tree, but he is very choosy about whose trees
  41.252 -he pulls from.
  41.253 -
  41.254 -Linus has a number of ``trusted lieutenants''.  As a general rule, he
  41.255 -pulls whatever changes they publish, in most cases without even
  41.256 -reviewing those changes.  Some of those lieutenants are generally
  41.257 -agreed to be ``maintainers'', responsible for specific subsystems
  41.258 -within the kernel.  If a random kernel hacker wants to make a change
  41.259 -to a subsystem that they want to end up in Linus's tree, they must
  41.260 -find out who the subsystem's maintainer is, and ask that maintainer to
  41.261 -take their change.  If the maintainer reviews their changes and agrees
  41.262 -to take them, they'll pass them along to Linus in due course.
  41.263 -
  41.264 -Individual lieutenants have their own approaches to reviewing,
  41.265 -accepting, and publishing changes; and for deciding when to feed them
  41.266 -to Linus.  In addition, there are several well known branches that
  41.267 -people use for different purposes.  For example, a few people maintain
  41.268 -``stable'' repositories of older versions of the kernel, to which they
  41.269 -apply critical fixes as needed.  Some maintainers publish multiple
  41.270 -trees: one for experimental changes; one for changes that they are
  41.271 -about to feed upstream; and so on.  Others just publish a single
  41.272 -tree.
  41.273 -
  41.274 -This model has two notable features.  The first is that it's ``pull
  41.275 -only''.  You have to ask, convince, or beg another developer to take a
  41.276 -change from you, because there are almost no trees to which more than
  41.277 -one person can push, and there's no way to push changes into a tree
  41.278 -that someone else controls.
  41.279 -
  41.280 -The second is that it's based on reputation and acclaim.  If you're an
  41.281 -unknown, Linus will probably ignore changes from you without even
  41.282 -responding.  But a subsystem maintainer will probably review them, and
  41.283 -will likely take them if they pass their criteria for suitability.
  41.284 -The more ``good'' changes you contribute to a maintainer, the more
  41.285 -likely they are to trust your judgment and accept your changes.  If
  41.286 -you're well-known and maintain a long-lived branch for something Linus
  41.287 -hasn't yet accepted, people with similar interests may pull your
  41.288 -changes regularly to keep up with your work.
  41.289 -
  41.290 -Reputation and acclaim don't necessarily cross subsystem or ``people''
  41.291 -boundaries.  If you're a respected but specialised storage hacker, and
  41.292 -you try to fix a networking bug, that change will receive a level of
  41.293 -scrutiny from a network maintainer comparable to a change from a
  41.294 -complete stranger.
  41.295 -
  41.296 -To people who come from more orderly project backgrounds, the
  41.297 -comparatively chaotic Linux kernel development process often seems
  41.298 -completely insane.  It's subject to the whims of individuals; people
  41.299 -make sweeping changes whenever they deem it appropriate; and the pace
  41.300 -of development is astounding.  And yet Linux is a highly successful,
  41.301 -well-regarded piece of software.
  41.302 -
  41.303 -\subsection{Pull-only versus shared-push collaboration}
  41.304 -
  41.305 -A perpetual source of heat in the open source community is whether a
  41.306 -development model in which people only ever pull changes from others
  41.307 -is ``better than'' one in which multiple people can push changes to a
  41.308 -shared repository.
  41.309 -
  41.310 -Typically, the backers of the shared-push model use tools that
  41.311 -actively enforce this approach.  If you're using a centralised
  41.312 -revision control tool such as Subversion, there's no way to make a
  41.313 -choice over which model you'll use: the tool gives you shared-push,
  41.314 -and if you want to do anything else, you'll have to roll your own
  41.315 -approach on top (such as applying a patch by hand).
  41.316 -
  41.317 -A good distributed revision control tool, such as Mercurial, will
  41.318 -support both models.  You and your collaborators can then structure
  41.319 -how you work together based on your own needs and preferences, not on
  41.320 -what contortions your tools force you into.
  41.321 -
  41.322 -\subsection{Where collaboration meets branch management}
  41.323 -
  41.324 -Once you and your team set up some shared repositories and start
  41.325 -propagating changes back and forth between local and shared repos, you
  41.326 -begin to face a related, but slightly different challenge: that of
  41.327 -managing the multiple directions in which your team may be moving at
  41.328 -once.  Even though this subject is intimately related to how your team
  41.329 -collaborates, it's dense enough to merit treatment of its own, in
  41.330 -chapter~\ref{chap:branch}.
  41.331 -
  41.332 -\section{The technical side of sharing}
  41.333 -
  41.334 -The remainder of this chapter is devoted to the question of serving
  41.335 -data to your collaborators.
  41.336 -
  41.337 -\section{Informal sharing with \hgcmd{serve}}
  41.338 -\label{sec:collab:serve}
  41.339 -
  41.340 -Mercurial's \hgcmd{serve} command is wonderfully suited to small,
  41.341 -tight-knit, and fast-paced group environments.  It also provides a
  41.342 -great way to get a feel for using Mercurial commands over a network.
  41.343 -
  41.344 -Run \hgcmd{serve} inside a repository, and in under a second it will
  41.345 -bring up a specialised HTTP server; this will accept connections from
  41.346 -any client, and serve up data for that repository until you terminate
  41.347 -it.  Anyone who knows the URL of the server you just started, and can
  41.348 -talk to your computer over the network, can then use a web browser or
  41.349 -Mercurial to read data from that repository.  A URL for a
  41.350 -\hgcmd{serve} instance running on a laptop is likely to look something
  41.351 -like \Verb|http://my-laptop.local:8000/|.
  41.352 -
  41.353 -The \hgcmd{serve} command is \emph{not} a general-purpose web server.
  41.354 -It can do only two things:
  41.355 -\begin{itemize}
  41.356 -\item Allow people to browse the history of the repository it's
  41.357 -  serving, from their normal web browsers.
  41.358 -\item Speak Mercurial's wire protocol, so that people can
  41.359 -  \hgcmd{clone} or \hgcmd{pull} changes from that repository.
  41.360 -\end{itemize}
  41.361 -In particular, \hgcmd{serve} won't allow remote users to \emph{modify}
  41.362 -your repository.  It's intended for read-only use.
  41.363 -
  41.364 -If you're getting started with Mercurial, there's nothing to prevent
  41.365 -you from using \hgcmd{serve} to serve up a repository on your own
  41.366 -computer, then use commands like \hgcmd{clone}, \hgcmd{incoming}, and
  41.367 -so on to talk to that server as if the repository was hosted remotely.
  41.368 -This can help you to quickly get acquainted with using commands on
  41.369 -network-hosted repositories.
  41.370 -
  41.371 -\subsection{A few things to keep in mind}
  41.372 -
  41.373 -Because it provides unauthenticated read access to all clients, you
  41.374 -should only use \hgcmd{serve} in an environment where you either don't
  41.375 -care, or have complete control over, who can access your network and
  41.376 -pull data from your repository.
  41.377 -
  41.378 -The \hgcmd{serve} command knows nothing about any firewall software
  41.379 -you might have installed on your system or network.  It cannot detect
  41.380 -or control your firewall software.  If other people are unable to talk
  41.381 -to a running \hgcmd{serve} instance, the second thing you should do
  41.382 -(\emph{after} you make sure that they're using the correct URL) is
  41.383 -check your firewall configuration.
  41.384 -
  41.385 -By default, \hgcmd{serve} listens for incoming connections on
  41.386 -port~8000.  If another process is already listening on the port you
  41.387 -want to use, you can specify a different port to listen on using the
  41.388 -\hgopt{serve}{-p} option.
  41.389 -
  41.390 -Normally, when \hgcmd{serve} starts, it prints no output, which can be
  41.391 -a bit unnerving.  If you'd like to confirm that it is indeed running
  41.392 -correctly, and find out what URL you should send to your
  41.393 -collaborators, start it with the \hggopt{-v} option.
  41.394 -
  41.395 -\section{Using the Secure Shell (ssh) protocol}
  41.396 -\label{sec:collab:ssh}
  41.397 -
  41.398 -You can pull and push changes securely over a network connection using
  41.399 -the Secure Shell (\texttt{ssh}) protocol.  To use this successfully,
  41.400 -you may have to do a little bit of configuration on the client or
  41.401 -server sides.
  41.402 -
  41.403 -If you're not familiar with ssh, it's a network protocol that lets you
  41.404 -securely communicate with another computer.  To use it with Mercurial,
  41.405 -you'll be setting up one or more user accounts on a server so that
  41.406 -remote users can log in and execute commands.
  41.407 -
  41.408 -(If you \emph{are} familiar with ssh, you'll probably find some of the
  41.409 -material that follows to be elementary in nature.)
  41.410 -
  41.411 -\subsection{How to read and write ssh URLs}
  41.412 -
  41.413 -An ssh URL tends to look like this:
  41.414 -\begin{codesample2}
  41.415 -  ssh://bos@hg.serpentine.com:22/hg/hgbook
  41.416 -\end{codesample2}
  41.417 -\begin{enumerate}
  41.418 -\item The ``\texttt{ssh://}'' part tells Mercurial to use the ssh
  41.419 -  protocol.
  41.420 -\item The ``\texttt{bos@}'' component indicates what username to log
  41.421 -  into the server as.  You can leave this out if the remote username
  41.422 -  is the same as your local username.
  41.423 -\item The ``\texttt{hg.serpentine.com}'' gives the hostname of the
  41.424 -  server to log into.
  41.425 -\item The ``:22'' identifies the port number to connect to the server
  41.426 -  on.  The default port is~22, so you only need to specify this part
  41.427 -  if you're \emph{not} using port~22.
  41.428 -\item The remainder of the URL is the local path to the repository on
  41.429 -  the server.
  41.430 -\end{enumerate}
  41.431 -
  41.432 -There's plenty of scope for confusion with the path component of ssh
  41.433 -URLs, as there is no standard way for tools to interpret it.  Some
  41.434 -programs behave differently than others when dealing with these paths.
  41.435 -This isn't an ideal situation, but it's unlikely to change.  Please
  41.436 -read the following paragraphs carefully.
  41.437 -
  41.438 -Mercurial treats the path to a repository on the server as relative to
  41.439 -the remote user's home directory.  For example, if user \texttt{foo}
  41.440 -on the server has a home directory of \dirname{/home/foo}, then an ssh
  41.441 -URL that contains a path component of \dirname{bar}
  41.442 -\emph{really} refers to the directory \dirname{/home/foo/bar}.
  41.443 -
  41.444 -If you want to specify a path relative to another user's home
  41.445 -directory, you can use a path that starts with a tilde character
  41.446 -followed by the user's name (let's call them \texttt{otheruser}), like
  41.447 -this.
  41.448 -\begin{codesample2}
  41.449 -  ssh://server/~otheruser/hg/repo
  41.450 -\end{codesample2}
  41.451 -
  41.452 -And if you really want to specify an \emph{absolute} path on the
  41.453 -server, begin the path component with two slashes, as in this example.
  41.454 -\begin{codesample2}
  41.455 -  ssh://server//absolute/path
  41.456 -\end{codesample2}
  41.457 -
  41.458 -\subsection{Finding an ssh client for your system}
  41.459 -
  41.460 -Almost every Unix-like system comes with OpenSSH preinstalled.  If
  41.461 -you're using such a system, run \Verb|which ssh| to find out if
  41.462 -the \command{ssh} command is installed (it's usually in
  41.463 -\dirname{/usr/bin}).  In the unlikely event that it isn't present,
  41.464 -take a look at your system documentation to figure out how to install
  41.465 -it.
  41.466 -
  41.467 -On Windows, you'll first need to download a suitable ssh
  41.468 -client.  There are two alternatives.
  41.469 -\begin{itemize}
  41.470 -\item Simon Tatham's excellent PuTTY package~\cite{web:putty} provides
  41.471 -  a complete suite of ssh client commands.
  41.472 -\item If you have a high tolerance for pain, you can use the Cygwin
  41.473 -  port of OpenSSH.
  41.474 -\end{itemize}
  41.475 -In either case, you'll need to edit your \hgini\ file to tell
  41.476 -Mercurial where to find the actual client command.  For example, if
  41.477 -you're using PuTTY, you'll need to use the \command{plink} command as
  41.478 -a command-line ssh client.
  41.479 -\begin{codesample2}
  41.480 -  [ui]
  41.481 -  ssh = C:/path/to/plink.exe -ssh -i "C:/path/to/my/private/key"
  41.482 -\end{codesample2}
  41.483 -
  41.484 -\begin{note}
  41.485 -  The path to \command{plink} shouldn't contain any whitespace
  41.486 -  characters, or Mercurial may not be able to run it correctly (so
  41.487 -  putting it in \dirname{C:\\Program Files} is probably not a good
  41.488 -  idea).
  41.489 -\end{note}
  41.490 -
  41.491 -\subsection{Generating a key pair}
  41.492 -
  41.493 -To avoid the need to repetitively type a password every time you need
  41.494 -to use your ssh client, I recommend generating a key pair.  On a
  41.495 -Unix-like system, the \command{ssh-keygen} command will do the trick.
  41.496 -On Windows, if you're using PuTTY, the \command{puttygen} command is
  41.497 -what you'll need.
  41.498 -
  41.499 -When you generate a key pair, it's usually \emph{highly} advisable to
  41.500 -protect it with a passphrase.  (The only time that you might not want
  41.501 -to do this is when you're using the ssh protocol for automated tasks
  41.502 -on a secure network.)
  41.503 -
  41.504 -Simply generating a key pair isn't enough, however.  You'll need to
  41.505 -add the public key to the set of authorised keys for whatever user
  41.506 -you're logging in remotely as.  For servers using OpenSSH (the vast
  41.507 -majority), this will mean adding the public key to a list in a file
  41.508 -called \sfilename{authorized\_keys} in their \sdirname{.ssh}
  41.509 -directory.
  41.510 -
  41.511 -On a Unix-like system, your public key will have a \filename{.pub}
  41.512 -extension.  If you're using \command{puttygen} on Windows, you can
  41.513 -save the public key to a file of your choosing, or paste it from the
  41.514 -window it's displayed in straight into the
  41.515 -\sfilename{authorized\_keys} file.
  41.516 -
  41.517 -\subsection{Using an authentication agent}
  41.518 -
  41.519 -An authentication agent is a daemon that stores passphrases in memory
  41.520 -(so it will forget passphrases if you log out and log back in again).
  41.521 -An ssh client will notice if it's running, and query it for a
  41.522 -passphrase.  If there's no authentication agent running, or the agent
  41.523 -doesn't store the necessary passphrase, you'll have to type your
  41.524 -passphrase every time Mercurial tries to communicate with a server on
  41.525 -your behalf (e.g.~whenever you pull or push changes).
  41.526 -
  41.527 -The downside of storing passphrases in an agent is that it's possible
  41.528 -for a well-prepared attacker to recover the plain text of your
  41.529 -passphrases, in some cases even if your system has been power-cycled.
  41.530 -You should make your own judgment as to whether this is an acceptable
  41.531 -risk.  It certainly saves a lot of repeated typing.
  41.532 -
  41.533 -On Unix-like systems, the agent is called \command{ssh-agent}, and
  41.534 -it's often run automatically for you when you log in.  You'll need to
  41.535 -use the \command{ssh-add} command to add passphrases to the agent's
  41.536 -store.  On Windows, if you're using PuTTY, the \command{pageant}
  41.537 -command acts as the agent.  It adds an icon to your system tray that
  41.538 -will let you manage stored passphrases.
  41.539 -
  41.540 -\subsection{Configuring the server side properly}
  41.541 -
  41.542 -Because ssh can be fiddly to set up if you're new to it, there's a
  41.543 -variety of things that can go wrong.  Add Mercurial on top, and
  41.544 -there's plenty more scope for head-scratching.  Most of these
  41.545 -potential problems occur on the server side, not the client side.  The
  41.546 -good news is that once you've gotten a configuration working, it will
  41.547 -usually continue to work indefinitely.
  41.548 -
  41.549 -Before you try using Mercurial to talk to an ssh server, it's best to
  41.550 -make sure that you can use the normal \command{ssh} or \command{putty}
  41.551 -command to talk to the server first.  If you run into problems with
  41.552 -using these commands directly, Mercurial surely won't work.  Worse, it
  41.553 -will obscure the underlying problem.  Any time you want to debug
  41.554 -ssh-related Mercurial problems, you should drop back to making sure
  41.555 -that plain ssh client commands work first, \emph{before} you worry
  41.556 -about whether there's a problem with Mercurial.
  41.557 -
  41.558 -The first thing to be sure of on the server side is that you can
  41.559 -actually log in from another machine at all.  If you can't use
  41.560 -\command{ssh} or \command{putty} to log in, the error message you get
  41.561 -may give you a few hints as to what's wrong.  The most common problems
  41.562 -are as follows.
  41.563 -\begin{itemize}
  41.564 -\item If you get a ``connection refused'' error, either there isn't an
  41.565 -  SSH daemon running on the server at all, or it's inaccessible due to
  41.566 -  firewall configuration.
  41.567 -\item If you get a ``no route to host'' error, you either have an
  41.568 -  incorrect address for the server or a seriously locked down firewall
  41.569 -  that won't admit its existence at all.
  41.570 -\item If you get a ``permission denied'' error, you may have mistyped
  41.571 -  the username on the server, or you could have mistyped your key's
  41.572 -  passphrase or the remote user's password.
  41.573 -\end{itemize}
  41.574 -In summary, if you're having trouble talking to the server's ssh
  41.575 -daemon, first make sure that one is running at all.  On many systems
  41.576 -it will be installed, but disabled, by default.  Once you're done with
  41.577 -this step, you should then check that the server's firewall is
  41.578 -configured to allow incoming connections on the port the ssh daemon is
  41.579 -listening on (usually~22).  Don't worry about more exotic
  41.580 -possibilities for misconfiguration until you've checked these two
  41.581 -first.
  41.582 -
  41.583 -If you're using an authentication agent on the client side to store
  41.584 -passphrases for your keys, you ought to be able to log into the server
  41.585 -without being prompted for a passphrase or a password.  If you're
  41.586 -prompted for a passphrase, there are a few possible culprits.
  41.587 -\begin{itemize}
  41.588 -\item You might have forgotten to use \command{ssh-add} or
  41.589 -  \command{pageant} to store the passphrase.
  41.590 -\item You might have stored the passphrase for the wrong key.
  41.591 -\end{itemize}
  41.592 -If you're being prompted for the remote user's password, there are
  41.593 -another few possible problems to check.
  41.594 -\begin{itemize}
  41.595 -\item Either the user's home directory or their \sdirname{.ssh}
  41.596 -  directory might have excessively liberal permissions.  As a result,
  41.597 -  the ssh daemon will not trust or read their
  41.598 -  \sfilename{authorized\_keys} file.  For example, a group-writable
  41.599 -  home or \sdirname{.ssh} directory will often cause this symptom.
  41.600 -\item The user's \sfilename{authorized\_keys} file may have a problem.
  41.601 -  If anyone other than the user owns or can write to that file, the
  41.602 -  ssh daemon will not trust or read it.
  41.603 -\end{itemize}
  41.604 -
  41.605 -In the ideal world, you should be able to run the following command
  41.606 -successfully, and it should print exactly one line of output, the
  41.607 -current date and time.
  41.608 -\begin{codesample2}
  41.609 -  ssh myserver date
  41.610 -\end{codesample2}
  41.611 -
  41.612 -If, on your server, you have login scripts that print banners or other
  41.613 -junk even when running non-interactive commands like this, you should
  41.614 -fix them before you continue, so that they only print output if
  41.615 -they're run interactively.  Otherwise these banners will at least
  41.616 -clutter up Mercurial's output.  Worse, they could potentially cause
  41.617 -problems with running Mercurial commands remotely.  Mercurial makes
  41.618 -tries to detect and ignore banners in non-interactive \command{ssh}
  41.619 -sessions, but it is not foolproof.  (If you're editing your login
  41.620 -scripts on your server, the usual way to see if a login script is
  41.621 -running in an interactive shell is to check the return code from the
  41.622 -command \Verb|tty -s|.)
  41.623 -
  41.624 -Once you've verified that plain old ssh is working with your server,
  41.625 -the next step is to ensure that Mercurial runs on the server.  The
  41.626 -following command should run successfully:
  41.627 -\begin{codesample2}
  41.628 -  ssh myserver hg version
  41.629 -\end{codesample2}
  41.630 -If you see an error message instead of normal \hgcmd{version} output,
  41.631 -this is usually because you haven't installed Mercurial to
  41.632 -\dirname{/usr/bin}.  Don't worry if this is the case; you don't need
  41.633 -to do that.  But you should check for a few possible problems.
  41.634 -\begin{itemize}
  41.635 -\item Is Mercurial really installed on the server at all?  I know this
  41.636 -  sounds trivial, but it's worth checking!
  41.637 -\item Maybe your shell's search path (usually set via the \envar{PATH}
  41.638 -  environment variable) is simply misconfigured.
  41.639 -\item Perhaps your \envar{PATH} environment variable is only being set
  41.640 -  to point to the location of the \command{hg} executable if the login
  41.641 -  session is interactive.  This can happen if you're setting the path
  41.642 -  in the wrong shell login script.  See your shell's documentation for
  41.643 -  details.
  41.644 -\item The \envar{PYTHONPATH} environment variable may need to contain
  41.645 -  the path to the Mercurial Python modules.  It might not be set at
  41.646 -  all; it could be incorrect; or it may be set only if the login is
  41.647 -  interactive.
  41.648 -\end{itemize}
  41.649 -
  41.650 -If you can run \hgcmd{version} over an ssh connection, well done!
  41.651 -You've got the server and client sorted out.  You should now be able
  41.652 -to use Mercurial to access repositories hosted by that username on
  41.653 -that server.  If you run into problems with Mercurial and ssh at this
  41.654 -point, try using the \hggopt{--debug} option to get a clearer picture
  41.655 -of what's going on.
  41.656 -
  41.657 -\subsection{Using compression with ssh}
  41.658 -
  41.659 -Mercurial does not compress data when it uses the ssh protocol,
  41.660 -because the ssh protocol can transparently compress data.  However,
  41.661 -the default behaviour of ssh clients is \emph{not} to request
  41.662 -compression.
  41.663 -
  41.664 -Over any network other than a fast LAN (even a wireless network),
  41.665 -using compression is likely to significantly speed up Mercurial's
  41.666 -network operations.  For example, over a WAN, someone measured
  41.667 -compression as reducing the amount of time required to clone a
  41.668 -particularly large repository from~51 minutes to~17 minutes.
  41.669 -
  41.670 -Both \command{ssh} and \command{plink} accept a \cmdopt{ssh}{-C}
  41.671 -option which turns on compression.  You can easily edit your \hgrc\ to
  41.672 -enable compression for all of Mercurial's uses of the ssh protocol.
  41.673 -\begin{codesample2}
  41.674 -  [ui]
  41.675 -  ssh = ssh -C
  41.676 -\end{codesample2}
  41.677 -
  41.678 -If you use \command{ssh}, you can configure it to always use
  41.679 -compression when talking to your server.  To do this, edit your
  41.680 -\sfilename{.ssh/config} file (which may not yet exist), as follows.
  41.681 -\begin{codesample2}
  41.682 -  Host hg
  41.683 -    Compression yes
  41.684 -    HostName hg.example.com
  41.685 -\end{codesample2}
  41.686 -This defines an alias, \texttt{hg}.  When you use it on the
  41.687 -\command{ssh} command line or in a Mercurial \texttt{ssh}-protocol
  41.688 -URL, it will cause \command{ssh} to connect to \texttt{hg.example.com}
  41.689 -and use compression.  This gives you both a shorter name to type and
  41.690 -compression, each of which is a good thing in its own right.
  41.691 -
  41.692 -\section{Serving over HTTP using CGI}
  41.693 -\label{sec:collab:cgi}
  41.694 -
  41.695 -Depending on how ambitious you are, configuring Mercurial's CGI
  41.696 -interface can take anything from a few moments to several hours.
  41.697 -
  41.698 -We'll begin with the simplest of examples, and work our way towards a
  41.699 -more complex configuration.  Even for the most basic case, you're
  41.700 -almost certainly going to need to read and modify your web server's
  41.701 -configuration.
  41.702 -
  41.703 -\begin{note}
  41.704 -  Configuring a web server is a complex, fiddly, and highly
  41.705 -  system-dependent activity.  I can't possibly give you instructions
  41.706 -  that will cover anything like all of the cases you will encounter.
  41.707 -  Please use your discretion and judgment in following the sections
  41.708 -  below.  Be prepared to make plenty of mistakes, and to spend a lot
  41.709 -  of time reading your server's error logs.
  41.710 -\end{note}
  41.711 -
  41.712 -\subsection{Web server configuration checklist}
  41.713 -
  41.714 -Before you continue, do take a few moments to check a few aspects of
  41.715 -your system's setup.
  41.716 -
  41.717 -\begin{enumerate}
  41.718 -\item Do you have a web server installed at all?  Mac OS X ships with
  41.719 -  Apache, but many other systems may not have a web server installed.
  41.720 -\item If you have a web server installed, is it actually running?  On
  41.721 -  most systems, even if one is present, it will be disabled by
  41.722 -  default.
  41.723 -\item Is your server configured to allow you to run CGI programs in
  41.724 -  the directory where you plan to do so?  Most servers default to
  41.725 -  explicitly disabling the ability to run CGI programs.
  41.726 -\end{enumerate}
  41.727 -
  41.728 -If you don't have a web server installed, and don't have substantial
  41.729 -experience configuring Apache, you should consider using the
  41.730 -\texttt{lighttpd} web server instead of Apache.  Apache has a
  41.731 -well-deserved reputation for baroque and confusing configuration.
  41.732 -While \texttt{lighttpd} is less capable in some ways than Apache, most
  41.733 -of these capabilities are not relevant to serving Mercurial
  41.734 -repositories.  And \texttt{lighttpd} is undeniably \emph{much} easier
  41.735 -to get started with than Apache.
  41.736 -
  41.737 -\subsection{Basic CGI configuration}
  41.738 -
  41.739 -On Unix-like systems, it's common for users to have a subdirectory
  41.740 -named something like \dirname{public\_html} in their home directory,
  41.741 -from which they can serve up web pages.  A file named \filename{foo}
  41.742 -in this directory will be accessible at a URL of the form
  41.743 -\texttt{http://www.example.com/\~{}username/foo}.
  41.744 -
  41.745 -To get started, find the \sfilename{hgweb.cgi} script that should be
  41.746 -present in your Mercurial installation.  If you can't quickly find a
  41.747 -local copy on your system, simply download one from the master
  41.748 -Mercurial repository at
  41.749 -\url{http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi}.
  41.750 -
  41.751 -You'll need to copy this script into your \dirname{public\_html}
  41.752 -directory, and ensure that it's executable.
  41.753 -\begin{codesample2}
  41.754 -  cp .../hgweb.cgi ~/public_html
  41.755 -  chmod 755 ~/public_html/hgweb.cgi
  41.756 -\end{codesample2}
  41.757 -The \texttt{755} argument to \command{chmod} is a little more general
  41.758 -than just making the script executable: it ensures that the script is
  41.759 -executable by anyone, and that ``group'' and ``other'' write
  41.760 -permissions are \emph{not} set.  If you were to leave those write
  41.761 -permissions enabled, Apache's \texttt{suexec} subsystem would likely
  41.762 -refuse to execute the script.  In fact, \texttt{suexec} also insists
  41.763 -that the \emph{directory} in which the script resides must not be
  41.764 -writable by others.
  41.765 -\begin{codesample2}
  41.766 -  chmod 755 ~/public_html
  41.767 -\end{codesample2}
  41.768 -
  41.769 -\subsubsection{What could \emph{possibly} go wrong?}
  41.770 -\label{sec:collab:wtf}
  41.771 -
  41.772 -Once you've copied the CGI script into place, go into a web browser,
  41.773 -and try to open the URL \url{http://myhostname/~myuser/hgweb.cgi},
  41.774 -\emph{but} brace yourself for instant failure.  There's a high
  41.775 -probability that trying to visit this URL will fail, and there are
  41.776 -many possible reasons for this.  In fact, you're likely to stumble
  41.777 -over almost every one of the possible errors below, so please read
  41.778 -carefully.  The following are all of the problems I ran into on a
  41.779 -system running Fedora~7, with a fresh installation of Apache, and a
  41.780 -user account that I created specially to perform this exercise.
  41.781 -
  41.782 -Your web server may have per-user directories disabled.  If you're
  41.783 -using Apache, search your config file for a \texttt{UserDir}
  41.784 -directive.  If there's none present, per-user directories will be
  41.785 -disabled.  If one exists, but its value is \texttt{disabled}, then
  41.786 -per-user directories will be disabled.  Otherwise, the string after
  41.787 -\texttt{UserDir} gives the name of the subdirectory that Apache will
  41.788 -look in under your home directory, for example \dirname{public\_html}.
  41.789 -
  41.790 -Your file access permissions may be too restrictive.  The web server
  41.791 -must be able to traverse your home directory and directories under
  41.792 -your \dirname{public\_html} directory, and read files under the latter
  41.793 -too.  Here's a quick recipe to help you to make your permissions more
  41.794 -appropriate.
  41.795 -\begin{codesample2}
  41.796 -  chmod 755 ~
  41.797 -  find ~/public_html -type d -print0 | xargs -0r chmod 755
  41.798 -  find ~/public_html -type f -print0 | xargs -0r chmod 644
  41.799 -\end{codesample2}
  41.800 -
  41.801 -The other possibility with permissions is that you might get a
  41.802 -completely empty window when you try to load the script.  In this
  41.803 -case, it's likely that your access permissions are \emph{too
  41.804 -  permissive}.  Apache's \texttt{suexec} subsystem won't execute a
  41.805 -script that's group-~or world-writable, for example.
  41.806 -
  41.807 -Your web server may be configured to disallow execution of CGI
  41.808 -programs in your per-user web directory.  Here's Apache's
  41.809 -default per-user configuration from my Fedora system.
  41.810 -\begin{codesample2}
  41.811 -  <Directory /home/*/public_html>
  41.812 -      AllowOverride FileInfo AuthConfig Limit
  41.813 -      Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  41.814 -      <Limit GET POST OPTIONS>
  41.815 -          Order allow,deny
  41.816 -          Allow from all
  41.817 -      </Limit>
  41.818 -      <LimitExcept GET POST OPTIONS>
  41.819 -          Order deny,allow
  41.820 -          Deny from all
  41.821 -      </LimitExcept>
  41.822 -  </Directory>
  41.823 -\end{codesample2}
  41.824 -If you find a similar-looking \texttt{Directory} group in your Apache
  41.825 -configuration, the directive to look at inside it is \texttt{Options}.
  41.826 -Add \texttt{ExecCGI} to the end of this list if it's missing, and
  41.827 -restart the web server.
  41.828 -
  41.829 -If you find that Apache serves you the text of the CGI script instead
  41.830 -of executing it, you may need to either uncomment (if already present)
  41.831 -or add a directive like this.
  41.832 -\begin{codesample2}
  41.833 -  AddHandler cgi-script .cgi
  41.834 -\end{codesample2}
  41.835 -
  41.836 -The next possibility is that you might be served with a colourful
  41.837 -Python backtrace claiming that it can't import a
  41.838 -\texttt{mercurial}-related module.  This is actually progress!  The
  41.839 -server is now capable of executing your CGI script.  This error is
  41.840 -only likely to occur if you're running a private installation of
  41.841 -Mercurial, instead of a system-wide version.  Remember that the web
  41.842 -server runs the CGI program without any of the environment variables
  41.843 -that you take for granted in an interactive session.  If this error
  41.844 -happens to you, edit your copy of \sfilename{hgweb.cgi} and follow the
  41.845 -directions inside it to correctly set your \envar{PYTHONPATH}
  41.846 -environment variable.
  41.847 -
  41.848 -Finally, you are \emph{certain} to by served with another colourful
  41.849 -Python backtrace: this one will complain that it can't find
  41.850 -\dirname{/path/to/repository}.  Edit your \sfilename{hgweb.cgi} script
  41.851 -and replace the \dirname{/path/to/repository} string with the complete
  41.852 -path to the repository you want to serve up.
  41.853 -
  41.854 -At this point, when you try to reload the page, you should be
  41.855 -presented with a nice HTML view of your repository's history.  Whew!
  41.856 -
  41.857 -\subsubsection{Configuring lighttpd}
  41.858 -
  41.859 -To be exhaustive in my experiments, I tried configuring the
  41.860 -increasingly popular \texttt{lighttpd} web server to serve the same
  41.861 -repository as I described with Apache above.  I had already overcome
  41.862 -all of the problems I outlined with Apache, many of which are not
  41.863 -server-specific.  As a result, I was fairly sure that my file and
  41.864 -directory permissions were good, and that my \sfilename{hgweb.cgi}
  41.865 -script was properly edited.
  41.866 -
  41.867 -Once I had Apache running, getting \texttt{lighttpd} to serve the
  41.868 -repository was a snap (in other words, even if you're trying to use
  41.869 -\texttt{lighttpd}, you should read the Apache section).  I first had
  41.870 -to edit the \texttt{mod\_access} section of its config file to enable
  41.871 -\texttt{mod\_cgi} and \texttt{mod\_userdir}, both of which were
  41.872 -disabled by default on my system.  I then added a few lines to the end
  41.873 -of the config file, to configure these modules.
  41.874 -\begin{codesample2}
  41.875 -  userdir.path = "public_html"
  41.876 -  cgi.assign = ( ".cgi" => "" )
  41.877 -\end{codesample2}
  41.878 -With this done, \texttt{lighttpd} ran immediately for me.  If I had
  41.879 -configured \texttt{lighttpd} before Apache, I'd almost certainly have
  41.880 -run into many of the same system-level configuration problems as I did
  41.881 -with Apache.  However, I found \texttt{lighttpd} to be noticeably
  41.882 -easier to configure than Apache, even though I've used Apache for over
  41.883 -a decade, and this was my first exposure to \texttt{lighttpd}.
  41.884 -
  41.885 -\subsection{Sharing multiple repositories with one CGI script}
  41.886 -
  41.887 -The \sfilename{hgweb.cgi} script only lets you publish a single
  41.888 -repository, which is an annoying restriction.  If you want to publish
  41.889 -more than one without wracking yourself with multiple copies of the
  41.890 -same script, each with different names, a better choice is to use the
  41.891 -\sfilename{hgwebdir.cgi} script.
  41.892 -
  41.893 -The procedure to configure \sfilename{hgwebdir.cgi} is only a little
  41.894 -more involved than for \sfilename{hgweb.cgi}.  First, you must obtain
  41.895 -a copy of the script.  If you don't have one handy, you can download a
  41.896 -copy from the master Mercurial repository at
  41.897 -\url{http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi}.
  41.898 -
  41.899 -You'll need to copy this script into your \dirname{public\_html}
  41.900 -directory, and ensure that it's executable.
  41.901 -\begin{codesample2}
  41.902 -  cp .../hgwebdir.cgi ~/public_html
  41.903 -  chmod 755 ~/public_html ~/public_html/hgwebdir.cgi
  41.904 -\end{codesample2}
  41.905 -With basic configuration out of the way, try to visit
  41.906 -\url{http://myhostname/~myuser/hgwebdir.cgi} in your browser.  It
  41.907 -should display an empty list of repositories.  If you get a blank
  41.908 -window or error message, try walking through the list of potential
  41.909 -problems in section~\ref{sec:collab:wtf}.
  41.910 -
  41.911 -The \sfilename{hgwebdir.cgi} script relies on an external
  41.912 -configuration file.  By default, it searches for a file named
  41.913 -\sfilename{hgweb.config} in the same directory as itself.  You'll need
  41.914 -to create this file, and make it world-readable.  The format of the
  41.915 -file is similar to a Windows ``ini'' file, as understood by Python's
  41.916 -\texttt{ConfigParser}~\cite{web:configparser} module.
  41.917 -
  41.918 -The easiest way to configure \sfilename{hgwebdir.cgi} is with a
  41.919 -section named \texttt{collections}.  This will automatically publish
  41.920 -\emph{every} repository under the directories you name.  The section
  41.921 -should look like this:
  41.922 -\begin{codesample2}
  41.923 -  [collections]
  41.924 -  /my/root = /my/root
  41.925 -\end{codesample2}
  41.926 -Mercurial interprets this by looking at the directory name on the
  41.927 -\emph{right} hand side of the ``\texttt{=}'' sign; finding
  41.928 -repositories in that directory hierarchy; and using the text on the
  41.929 -\emph{left} to strip off matching text from the names it will actually
  41.930 -list in the web interface.  The remaining component of a path after
  41.931 -this stripping has occurred is called a ``virtual path''.
  41.932 -
  41.933 -Given the example above, if we have a repository whose local path is
  41.934 -\dirname{/my/root/this/repo}, the CGI script will strip the leading
  41.935 -\dirname{/my/root} from the name, and publish the repository with a
  41.936 -virtual path of \dirname{this/repo}.  If the base URL for our CGI
  41.937 -script is \url{http://myhostname/~myuser/hgwebdir.cgi}, the complete
  41.938 -URL for that repository will be
  41.939 -\url{http://myhostname/~myuser/hgwebdir.cgi/this/repo}.
  41.940 -
  41.941 -If we replace \dirname{/my/root} on the left hand side of this example
  41.942 -with \dirname{/my}, then \sfilename{hgwebdir.cgi} will only strip off
  41.943 -\dirname{/my} from the repository name, and will give us a virtual
  41.944 -path of \dirname{root/this/repo} instead of \dirname{this/repo}.
  41.945 -
  41.946 -The \sfilename{hgwebdir.cgi} script will recursively search each
  41.947 -directory listed in the \texttt{collections} section of its
  41.948 -configuration file, but it will \texttt{not} recurse into the
  41.949 -repositories it finds.
  41.950 -
  41.951 -The \texttt{collections} mechanism makes it easy to publish many
  41.952 -repositories in a ``fire and forget'' manner.  You only need to set up
  41.953 -the CGI script and configuration file one time.  Afterwards, you can
  41.954 -publish or unpublish a repository at any time by simply moving it
  41.955 -into, or out of, the directory hierarchy in which you've configured
  41.956 -\sfilename{hgwebdir.cgi} to look.
  41.957 -
  41.958 -\subsubsection{Explicitly specifying which repositories to publish}
  41.959 -
  41.960 -In addition to the \texttt{collections} mechanism, the
  41.961 -\sfilename{hgwebdir.cgi} script allows you to publish a specific list
  41.962 -of repositories.  To do so, create a \texttt{paths} section, with
  41.963 -contents of the following form.
  41.964 -\begin{codesample2}
  41.965 -  [paths]
  41.966 -  repo1 = /my/path/to/some/repo
  41.967 -  repo2 = /some/path/to/another
  41.968 -\end{codesample2}
  41.969 -In this case, the virtual path (the component that will appear in a
  41.970 -URL) is on the left hand side of each definition, while the path to
  41.971 -the repository is on the right.  Notice that there does not need to be
  41.972 -any relationship between the virtual path you choose and the location
  41.973 -of a repository in your filesystem.
  41.974 -
  41.975 -If you wish, you can use both the \texttt{collections} and
  41.976 -\texttt{paths} mechanisms simultaneously in a single configuration
  41.977 -file.
  41.978 -
  41.979 -\begin{note}
  41.980 -  If multiple repositories have the same virtual path,
  41.981 -  \sfilename{hgwebdir.cgi} will not report an error.  Instead, it will
  41.982 -  behave unpredictably.
  41.983 -\end{note}
  41.984 -
  41.985 -\subsection{Downloading source archives}
  41.986 -
  41.987 -Mercurial's web interface lets users download an archive of any
  41.988 -revision.  This archive will contain a snapshot of the working
  41.989 -directory as of that revision, but it will not contain a copy of the
  41.990 -repository data.
  41.991 -
  41.992 -By default, this feature is not enabled.  To enable it, you'll need to
  41.993 -add an \rcitem{web}{allow\_archive} item to the \rcsection{web}
  41.994 -section of your \hgrc.
  41.995 -
  41.996 -\subsection{Web configuration options}
  41.997 -
  41.998 -Mercurial's web interfaces (the \hgcmd{serve} command, and the
  41.999 -\sfilename{hgweb.cgi} and \sfilename{hgwebdir.cgi} scripts) have a
 41.1000 -number of configuration options that you can set.  These belong in a
 41.1001 -section named \rcsection{web}.
 41.1002 -\begin{itemize}
 41.1003 -\item[\rcitem{web}{allow\_archive}] Determines which (if any) archive
 41.1004 -  download mechanisms Mercurial supports.  If you enable this
 41.1005 -  feature, users of the web interface will be able to download an
 41.1006 -  archive of whatever revision of a repository they are viewing.
 41.1007 -  To enable the archive feature, this item must take the form of a
 41.1008 -  sequence of words drawn from the list below.
 41.1009 -  \begin{itemize}
 41.1010 -  \item[\texttt{bz2}] A \command{tar} archive, compressed using
 41.1011 -    \texttt{bzip2} compression.  This has the best compression ratio,
 41.1012 -    but uses the most CPU time on the server.
 41.1013 -  \item[\texttt{gz}] A \command{tar} archive, compressed using
 41.1014 -    \texttt{gzip} compression.
 41.1015 -  \item[\texttt{zip}] A \command{zip} archive, compressed using LZW
 41.1016 -    compression.  This format has the worst compression ratio, but is
 41.1017 -    widely used in the Windows world.
 41.1018 -  \end{itemize}
 41.1019 -  If you provide an empty list, or don't have an
 41.1020 -  \rcitem{web}{allow\_archive} entry at all, this feature will be
 41.1021 -  disabled.  Here is an example of how to enable all three supported
 41.1022 -  formats.
 41.1023 -  \begin{codesample4}
 41.1024 -    [web]
 41.1025 -    allow_archive = bz2 gz zip
 41.1026 -  \end{codesample4}
 41.1027 -\item[\rcitem{web}{allowpull}] Boolean.  Determines whether the web
 41.1028 -  interface allows remote users to \hgcmd{pull} and \hgcmd{clone} this
 41.1029 -  repository over~HTTP.  If set to \texttt{no} or \texttt{false}, only
 41.1030 -  the ``human-oriented'' portion of the web interface is available.
 41.1031 -\item[\rcitem{web}{contact}] String.  A free-form (but preferably
 41.1032 -  brief) string identifying the person or group in charge of the
 41.1033 -  repository.  This often contains the name and email address of a
 41.1034 -  person or mailing list.  It often makes sense to place this entry in
 41.1035 -  a repository's own \sfilename{.hg/hgrc} file, but it can make sense
 41.1036 -  to use in a global \hgrc\ if every repository has a single
 41.1037 -  maintainer.
 41.1038 -\item[\rcitem{web}{maxchanges}] Integer.  The default maximum number
 41.1039 -  of changesets to display in a single page of output.
 41.1040 -\item[\rcitem{web}{maxfiles}] Integer.  The default maximum number
 41.1041 -  of modified files to display in a single page of output.
 41.1042 -\item[\rcitem{web}{stripes}] Integer.  If the web interface displays
 41.1043 -  alternating ``stripes'' to make it easier to visually align rows
 41.1044 -  when you are looking at a table, this number controls the number of
 41.1045 -  rows in each stripe.
 41.1046 -\item[\rcitem{web}{style}] Controls the template Mercurial uses to
 41.1047 -  display the web interface.  Mercurial ships with two web templates,
 41.1048 -  named \texttt{default} and \texttt{gitweb} (the latter is much more
 41.1049 -  visually attractive).  You can also specify a custom template of
 41.1050 -  your own; see chapter~\ref{chap:template} for details.  Here, you
 41.1051 -  can see how to enable the \texttt{gitweb} style.
 41.1052 -  \begin{codesample4}
 41.1053 -    [web]
 41.1054 -    style = gitweb
 41.1055 -  \end{codesample4}
 41.1056 -\item[\rcitem{web}{templates}] Path.  The directory in which to search
 41.1057 -  for template files.  By default, Mercurial searches in the directory
 41.1058 -  in which it was installed.
 41.1059 -\end{itemize}
 41.1060 -If you are using \sfilename{hgwebdir.cgi}, you can place a few
 41.1061 -configuration items in a \rcsection{web} section of the
 41.1062 -\sfilename{hgweb.config} file instead of a \hgrc\ file, for
 41.1063 -convenience.  These items are \rcitem{web}{motd} and
 41.1064 -\rcitem{web}{style}.
 41.1065 -
 41.1066 -\subsubsection{Options specific to an individual repository}
 41.1067 -
 41.1068 -A few \rcsection{web} configuration items ought to be placed in a
 41.1069 -repository's local \sfilename{.hg/hgrc}, rather than a user's or
 41.1070 -global \hgrc.
 41.1071 -\begin{itemize}
 41.1072 -\item[\rcitem{web}{description}] String.  A free-form (but preferably
 41.1073 -  brief) string that describes the contents or purpose of the
 41.1074 -  repository.
 41.1075 -\item[\rcitem{web}{name}] String.  The name to use for the repository
 41.1076 -  in the web interface.  This overrides the default name, which is the
 41.1077 -  last component of the repository's path.
 41.1078 -\end{itemize}
 41.1079 -
 41.1080 -\subsubsection{Options specific to the \hgcmd{serve} command}
 41.1081 -
 41.1082 -Some of the items in the \rcsection{web} section of a \hgrc\ file are
 41.1083 -only for use with the \hgcmd{serve} command.
 41.1084 -\begin{itemize}
 41.1085 -\item[\rcitem{web}{accesslog}] Path.  The name of a file into which to
 41.1086 -  write an access log.  By default, the \hgcmd{serve} command writes
 41.1087 -  this information to standard output, not to a file.  Log entries are
 41.1088 -  written in the standard ``combined'' file format used by almost all
 41.1089 -  web servers.
 41.1090 -\item[\rcitem{web}{address}] String.  The local address on which the
 41.1091 -  server should listen for incoming connections.  By default, the
 41.1092 -  server listens on all addresses.
 41.1093 -\item[\rcitem{web}{errorlog}] Path.  The name of a file into which to
 41.1094 -  write an error log.  By default, the \hgcmd{serve} command writes this
 41.1095 -  information to standard error, not to a file.
 41.1096 -\item[\rcitem{web}{ipv6}] Boolean.  Whether to use the IPv6 protocol.
 41.1097 -  By default, IPv6 is not used. 
 41.1098 -\item[\rcitem{web}{port}] Integer.  The TCP~port number on which the
 41.1099 -  server should listen.  The default port number used is~8000.
 41.1100 -\end{itemize}
 41.1101 -
 41.1102 -\subsubsection{Choosing the right \hgrc\ file to add \rcsection{web}
 41.1103 -  items to}
 41.1104 -
 41.1105 -It is important to remember that a web server like Apache or
 41.1106 -\texttt{lighttpd} will run under a user~ID that is different to yours.
 41.1107 -CGI scripts run by your server, such as \sfilename{hgweb.cgi}, will
 41.1108 -usually also run under that user~ID.
 41.1109 -
 41.1110 -If you add \rcsection{web} items to your own personal \hgrc\ file, CGI
 41.1111 -scripts won't read that \hgrc\ file.  Those settings will thus only
 41.1112 -affect the behaviour of the \hgcmd{serve} command when you run it.  To
 41.1113 -cause CGI scripts to see your settings, either create a \hgrc\ file in
 41.1114 -the home directory of the user ID that runs your web server, or add
 41.1115 -those settings to a system-wide \hgrc\ file.
 41.1116 -
 41.1117 -
 41.1118 -%%% Local Variables: 
 41.1119 -%%% mode: latex
 41.1120 -%%% TeX-master: "00book"
 41.1121 -%%% End: 
    42.1 --- a/en/concepts.tex	Thu Mar 26 08:57:10 2009 +0100
    42.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.3 @@ -1,577 +0,0 @@
    42.4 -\chapter{Behind the scenes}
    42.5 -\label{chap:concepts}
    42.6 -
    42.7 -Unlike many revision control systems, the concepts upon which
    42.8 -Mercurial is built are simple enough that it's easy to understand how
    42.9 -the software really works.  Knowing this certainly isn't necessary,
   42.10 -but I find it useful to have a ``mental model'' of what's going on.
   42.11 -
   42.12 -This understanding gives me confidence that Mercurial has been
   42.13 -carefully designed to be both \emph{safe} and \emph{efficient}.  And
   42.14 -just as importantly, if it's easy for me to retain a good idea of what
   42.15 -the software is doing when I perform a revision control task, I'm less
   42.16 -likely to be surprised by its behaviour.
   42.17 -
   42.18 -In this chapter, we'll initially cover the core concepts behind
   42.19 -Mercurial's design, then continue to discuss some of the interesting
   42.20 -details of its implementation.
   42.21 -
   42.22 -\section{Mercurial's historical record}
   42.23 -
   42.24 -\subsection{Tracking the history of a single file}
   42.25 -
   42.26 -When Mercurial tracks modifications to a file, it stores the history
   42.27 -of that file in a metadata object called a \emph{filelog}.  Each entry
   42.28 -in the filelog contains enough information to reconstruct one revision
   42.29 -of the file that is being tracked.  Filelogs are stored as files in
   42.30 -the \sdirname{.hg/store/data} directory.  A filelog contains two kinds
   42.31 -of information: revision data, and an index to help Mercurial to find
   42.32 -a revision efficiently.
   42.33 -
   42.34 -A file that is large, or has a lot of history, has its filelog stored
   42.35 -in separate data (``\texttt{.d}'' suffix) and index (``\texttt{.i}''
   42.36 -suffix) files.  For small files without much history, the revision
   42.37 -data and index are combined in a single ``\texttt{.i}'' file.  The
   42.38 -correspondence between a file in the working directory and the filelog
   42.39 -that tracks its history in the repository is illustrated in
   42.40 -figure~\ref{fig:concepts:filelog}.
   42.41 -
   42.42 -\begin{figure}[ht]
   42.43 -  \centering
   42.44 -  \grafix{filelog}
   42.45 -  \caption{Relationships between files in working directory and
   42.46 -    filelogs in repository}
   42.47 -  \label{fig:concepts:filelog}
   42.48 -\end{figure}
   42.49 -
   42.50 -\subsection{Managing tracked files}
   42.51 -
   42.52 -Mercurial uses a structure called a \emph{manifest} to collect
   42.53 -together information about the files that it tracks.  Each entry in
   42.54 -the manifest contains information about the files present in a single
   42.55 -changeset.  An entry records which files are present in the changeset,
   42.56 -the revision of each file, and a few other pieces of file metadata.
   42.57 -
   42.58 -\subsection{Recording changeset information}
   42.59 -
   42.60 -The \emph{changelog} contains information about each changeset.  Each
   42.61 -revision records who committed a change, the changeset comment, other
   42.62 -pieces of changeset-related information, and the revision of the
   42.63 -manifest to use.
   42.64 -
   42.65 -\subsection{Relationships between revisions}
   42.66 -
   42.67 -Within a changelog, a manifest, or a filelog, each revision stores a
   42.68 -pointer to its immediate parent (or to its two parents, if it's a
   42.69 -merge revision).  As I mentioned above, there are also relationships
   42.70 -between revisions \emph{across} these structures, and they are
   42.71 -hierarchical in nature.
   42.72 -
   42.73 -For every changeset in a repository, there is exactly one revision
   42.74 -stored in the changelog.  Each revision of the changelog contains a
   42.75 -pointer to a single revision of the manifest.  A revision of the
   42.76 -manifest stores a pointer to a single revision of each filelog tracked
   42.77 -when that changeset was created.  These relationships are illustrated
   42.78 -in figure~\ref{fig:concepts:metadata}.
   42.79 -
   42.80 -\begin{figure}[ht]
   42.81 -  \centering
   42.82 -  \grafix{metadata}
   42.83 -  \caption{Metadata relationships}
   42.84 -  \label{fig:concepts:metadata}
   42.85 -\end{figure}
   42.86 -
   42.87 -As the illustration shows, there is \emph{not} a ``one to one''
   42.88 -relationship between revisions in the changelog, manifest, or filelog.
   42.89 -If the manifest hasn't changed between two changesets, the changelog
   42.90 -entries for those changesets will point to the same revision of the
   42.91 -manifest.  If a file that Mercurial tracks hasn't changed between two
   42.92 -changesets, the entry for that file in the two revisions of the
   42.93 -manifest will point to the same revision of its filelog.
   42.94 -
   42.95 -\section{Safe, efficient storage}
   42.96 -
   42.97 -The underpinnings of changelogs, manifests, and filelogs are provided
   42.98 -by a single structure called the \emph{revlog}.
   42.99 -
  42.100 -\subsection{Efficient storage}
  42.101 -
  42.102 -The revlog provides efficient storage of revisions using a
  42.103 -\emph{delta} mechanism.  Instead of storing a complete copy of a file
  42.104 -for each revision, it stores the changes needed to transform an older
  42.105 -revision into the new revision.  For many kinds of file data, these
  42.106 -deltas are typically a fraction of a percent of the size of a full
  42.107 -copy of a file.
  42.108 -
  42.109 -Some obsolete revision control systems can only work with deltas of
  42.110 -text files.  They must either store binary files as complete snapshots
  42.111 -or encoded into a text representation, both of which are wasteful
  42.112 -approaches.  Mercurial can efficiently handle deltas of files with
  42.113 -arbitrary binary contents; it doesn't need to treat text as special.
  42.114 -
  42.115 -\subsection{Safe operation}
  42.116 -\label{sec:concepts:txn}
  42.117 -
  42.118 -Mercurial only ever \emph{appends} data to the end of a revlog file.
  42.119 -It never modifies a section of a file after it has written it.  This
  42.120 -is both more robust and efficient than schemes that need to modify or
  42.121 -rewrite data.
  42.122 -
  42.123 -In addition, Mercurial treats every write as part of a
  42.124 -\emph{transaction} that can span a number of files.  A transaction is
  42.125 -\emph{atomic}: either the entire transaction succeeds and its effects
  42.126 -are all visible to readers in one go, or the whole thing is undone.
  42.127 -This guarantee of atomicity means that if you're running two copies of
  42.128 -Mercurial, where one is reading data and one is writing it, the reader
  42.129 -will never see a partially written result that might confuse it.
  42.130 -
  42.131 -The fact that Mercurial only appends to files makes it easier to
  42.132 -provide this transactional guarantee.  The easier it is to do stuff
  42.133 -like this, the more confident you should be that it's done correctly.
  42.134 -
  42.135 -\subsection{Fast retrieval}
  42.136 -
  42.137 -Mercurial cleverly avoids a pitfall common to all earlier
  42.138 -revision control systems: the problem of \emph{inefficient retrieval}.
  42.139 -Most revision control systems store the contents of a revision as an
  42.140 -incremental series of modifications against a ``snapshot''.  To
  42.141 -reconstruct a specific revision, you must first read the snapshot, and
  42.142 -then every one of the revisions between the snapshot and your target
  42.143 -revision.  The more history that a file accumulates, the more
  42.144 -revisions you must read, hence the longer it takes to reconstruct a
  42.145 -particular revision.
  42.146 -
  42.147 -\begin{figure}[ht]
  42.148 -  \centering
  42.149 -  \grafix{snapshot}
  42.150 -  \caption{Snapshot of a revlog, with incremental deltas}
  42.151 -  \label{fig:concepts:snapshot}
  42.152 -\end{figure}
  42.153 -
  42.154 -The innovation that Mercurial applies to this problem is simple but
  42.155 -effective.  Once the cumulative amount of delta information stored
  42.156 -since the last snapshot exceeds a fixed threshold, it stores a new
  42.157 -snapshot (compressed, of course), instead of another delta.  This
  42.158 -makes it possible to reconstruct \emph{any} revision of a file
  42.159 -quickly.  This approach works so well that it has since been copied by
  42.160 -several other revision control systems.
  42.161 -
  42.162 -Figure~\ref{fig:concepts:snapshot} illustrates the idea.  In an entry
  42.163 -in a revlog's index file, Mercurial stores the range of entries from
  42.164 -the data file that it must read to reconstruct a particular revision.
  42.165 -
  42.166 -\subsubsection{Aside: the influence of video compression}
  42.167 -
  42.168 -If you're familiar with video compression or have ever watched a TV
  42.169 -feed through a digital cable or satellite service, you may know that
  42.170 -most video compression schemes store each frame of video as a delta
  42.171 -against its predecessor frame.  In addition, these schemes use
  42.172 -``lossy'' compression techniques to increase the compression ratio, so
  42.173 -visual errors accumulate over the course of a number of inter-frame
  42.174 -deltas.
  42.175 -
  42.176 -Because it's possible for a video stream to ``drop out'' occasionally
  42.177 -due to signal glitches, and to limit the accumulation of artefacts
  42.178 -introduced by the lossy compression process, video encoders
  42.179 -periodically insert a complete frame (called a ``key frame'') into the
  42.180 -video stream; the next delta is generated against that frame.  This
  42.181 -means that if the video signal gets interrupted, it will resume once
  42.182 -the next key frame is received.  Also, the accumulation of encoding
  42.183 -errors restarts anew with each key frame.
  42.184 -
  42.185 -\subsection{Identification and strong integrity}
  42.186 -
  42.187 -Along with delta or snapshot information, a revlog entry contains a
  42.188 -cryptographic hash of the data that it represents.  This makes it
  42.189 -difficult to forge the contents of a revision, and easy to detect
  42.190 -accidental corruption.  
  42.191 -
  42.192 -Hashes provide more than a mere check against corruption; they are
  42.193 -used as the identifiers for revisions.  The changeset identification
  42.194 -hashes that you see as an end user are from revisions of the
  42.195 -changelog.  Although filelogs and the manifest also use hashes,
  42.196 -Mercurial only uses these behind the scenes.
  42.197 -
  42.198 -Mercurial verifies that hashes are correct when it retrieves file
  42.199 -revisions and when it pulls changes from another repository.  If it
  42.200 -encounters an integrity problem, it will complain and stop whatever
  42.201 -it's doing.
  42.202 -
  42.203 -In addition to the effect it has on retrieval efficiency, Mercurial's
  42.204 -use of periodic snapshots makes it more robust against partial data
  42.205 -corruption.  If a revlog becomes partly corrupted due to a hardware
  42.206 -error or system bug, it's often possible to reconstruct some or most
  42.207 -revisions from the uncorrupted sections of the revlog, both before and
  42.208 -after the corrupted section.  This would not be possible with a
  42.209 -delta-only storage model.
  42.210 -
  42.211 -\section{Revision history, branching,
  42.212 -  and merging}
  42.213 -
  42.214 -Every entry in a Mercurial revlog knows the identity of its immediate
  42.215 -ancestor revision, usually referred to as its \emph{parent}.  In fact,
  42.216 -a revision contains room for not one parent, but two.  Mercurial uses
  42.217 -a special hash, called the ``null ID'', to represent the idea ``there
  42.218 -is no parent here''.  This hash is simply a string of zeroes.
  42.219 -
  42.220 -In figure~\ref{fig:concepts:revlog}, you can see an example of the
  42.221 -conceptual structure of a revlog.  Filelogs, manifests, and changelogs
  42.222 -all have this same structure; they differ only in the kind of data
  42.223 -stored in each delta or snapshot.
  42.224 -
  42.225 -The first revision in a revlog (at the bottom of the image) has the
  42.226 -null ID in both of its parent slots.  For a ``normal'' revision, its
  42.227 -first parent slot contains the ID of its parent revision, and its
  42.228 -second contains the null ID, indicating that the revision has only one
  42.229 -real parent.  Any two revisions that have the same parent ID are
  42.230 -branches.  A revision that represents a merge between branches has two
  42.231 -normal revision IDs in its parent slots.
  42.232 -
  42.233 -\begin{figure}[ht]
  42.234 -  \centering
  42.235 -  \grafix{revlog}
  42.236 -  \caption{}
  42.237 -  \label{fig:concepts:revlog}
  42.238 -\end{figure}
  42.239 -
  42.240 -\section{The working directory}
  42.241 -
  42.242 -In the working directory, Mercurial stores a snapshot of the files
  42.243 -from the repository as of a particular changeset.
  42.244 -
  42.245 -The working directory ``knows'' which changeset it contains.  When you
  42.246 -update the working directory to contain a particular changeset,
  42.247 -Mercurial looks up the appropriate revision of the manifest to find
  42.248 -out which files it was tracking at the time that changeset was
  42.249 -committed, and which revision of each file was then current.  It then
  42.250 -recreates a copy of each of those files, with the same contents it had
  42.251 -when the changeset was committed.
  42.252 -
  42.253 -The \emph{dirstate} contains Mercurial's knowledge of the working
  42.254 -directory.  This details which changeset the working directory is
  42.255 -updated to, and all of the files that Mercurial is tracking in the
  42.256 -working directory.
  42.257 -
  42.258 -Just as a revision of a revlog has room for two parents, so that it
  42.259 -can represent either a normal revision (with one parent) or a merge of
  42.260 -two earlier revisions, the dirstate has slots for two parents.  When
  42.261 -you use the \hgcmd{update} command, the changeset that you update to
  42.262 -is stored in the ``first parent'' slot, and the null ID in the second.
  42.263 -When you \hgcmd{merge} with another changeset, the first parent
  42.264 -remains unchanged, and the second parent is filled in with the
  42.265 -changeset you're merging with.  The \hgcmd{parents} command tells you
  42.266 -what the parents of the dirstate are.
  42.267 -
  42.268 -\subsection{What happens when you commit}
  42.269 -
  42.270 -The dirstate stores parent information for more than just book-keeping
  42.271 -purposes.  Mercurial uses the parents of the dirstate as \emph{the
  42.272 -  parents of a new changeset} when you perform a commit.
  42.273 -
  42.274 -\begin{figure}[ht]
  42.275 -  \centering
  42.276 -  \grafix{wdir}
  42.277 -  \caption{The working directory can have two parents}
  42.278 -  \label{fig:concepts:wdir}
  42.279 -\end{figure}
  42.280 -
  42.281 -Figure~\ref{fig:concepts:wdir} shows the normal state of the working
  42.282 -directory, where it has a single changeset as parent.  That changeset
  42.283 -is the \emph{tip}, the newest changeset in the repository that has no
  42.284 -children.
  42.285 -
  42.286 -\begin{figure}[ht]
  42.287 -  \centering
  42.288 -  \grafix{wdir-after-commit}
  42.289 -  \caption{The working directory gains new parents after a commit}
  42.290 -  \label{fig:concepts:wdir-after-commit}
  42.291 -\end{figure}
  42.292 -
  42.293 -It's useful to think of the working directory as ``the changeset I'm
  42.294 -about to commit''.  Any files that you tell Mercurial that you've
  42.295 -added, removed, renamed, or copied will be reflected in that
  42.296 -changeset, as will modifications to any files that Mercurial is
  42.297 -already tracking; the new changeset will have the parents of the
  42.298 -working directory as its parents.
  42.299 -
  42.300 -After a commit, Mercurial will update the parents of the working
  42.301 -directory, so that the first parent is the ID of the new changeset,
  42.302 -and the second is the null ID.  This is shown in
  42.303 -figure~\ref{fig:concepts:wdir-after-commit}.  Mercurial doesn't touch
  42.304 -any of the files in the working directory when you commit; it just
  42.305 -modifies the dirstate to note its new parents.
  42.306 -
  42.307 -\subsection{Creating a new head}
  42.308 -
  42.309 -It's perfectly normal to update the working directory to a changeset
  42.310 -other than the current tip.  For example, you might want to know what
  42.311 -your project looked like last Tuesday, or you could be looking through
  42.312 -changesets to see which one introduced a bug.  In cases like this, the
  42.313 -natural thing to do is update the working directory to the changeset
  42.314 -you're interested in, and then examine the files in the working
  42.315 -directory directly to see their contents as they were when you
  42.316 -committed that changeset.  The effect of this is shown in
  42.317 -figure~\ref{fig:concepts:wdir-pre-branch}.
  42.318 -
  42.319 -\begin{figure}[ht]
  42.320 -  \centering
  42.321 -  \grafix{wdir-pre-branch}
  42.322 -  \caption{The working directory, updated to an older changeset}
  42.323 -  \label{fig:concepts:wdir-pre-branch}
  42.324 -\end{figure}
  42.325 -
  42.326 -Having updated the working directory to an older changeset, what
  42.327 -happens if you make some changes, and then commit?  Mercurial behaves
  42.328 -in the same way as I outlined above.  The parents of the working
  42.329 -directory become the parents of the new changeset.  This new changeset
  42.330 -has no children, so it becomes the new tip.  And the repository now
  42.331 -contains two changesets that have no children; we call these
  42.332 -\emph{heads}.  You can see the structure that this creates in
  42.333 -figure~\ref{fig:concepts:wdir-branch}.
  42.334 -
  42.335 -\begin{figure}[ht]
  42.336 -  \centering
  42.337 -  \grafix{wdir-branch}
  42.338 -  \caption{After a commit made while synced to an older changeset}
  42.339 -  \label{fig:concepts:wdir-branch}
  42.340 -\end{figure}
  42.341 -
  42.342 -\begin{note}
  42.343 -  If you're new to Mercurial, you should keep in mind a common
  42.344 -  ``error'', which is to use the \hgcmd{pull} command without any
  42.345 -  options.  By default, the \hgcmd{pull} command \emph{does not}
  42.346 -  update the working directory, so you'll bring new changesets into
  42.347 -  your repository, but the working directory will stay synced at the
  42.348 -  same changeset as before the pull.  If you make some changes and
  42.349 -  commit afterwards, you'll thus create a new head, because your
  42.350 -  working directory isn't synced to whatever the current tip is.
  42.351 -
  42.352 -  I put the word ``error'' in quotes because all that you need to do
  42.353 -  to rectify this situation is \hgcmd{merge}, then \hgcmd{commit}.  In
  42.354 -  other words, this almost never has negative consequences; it just
  42.355 -  surprises people.  I'll discuss other ways to avoid this behaviour,
  42.356 -  and why Mercurial behaves in this initially surprising way, later
  42.357 -  on.
  42.358 -\end{note}
  42.359 -
  42.360 -\subsection{Merging heads}
  42.361 -
  42.362 -When you run the \hgcmd{merge} command, Mercurial leaves the first
  42.363 -parent of the working directory unchanged, and sets the second parent
  42.364 -to the changeset you're merging with, as shown in
  42.365 -figure~\ref{fig:concepts:wdir-merge}.
  42.366 -
  42.367 -\begin{figure}[ht]
  42.368 -  \centering
  42.369 -  \grafix{wdir-merge}
  42.370 -  \caption{Merging two heads}
  42.371 -  \label{fig:concepts:wdir-merge}
  42.372 -\end{figure}
  42.373 -
  42.374 -Mercurial also has to modify the working directory, to merge the files
  42.375 -managed in the two changesets.  Simplified a little, the merging
  42.376 -process goes like this, for every file in the manifests of both
  42.377 -changesets.
  42.378 -\begin{itemize}
  42.379 -\item If neither changeset has modified a file, do nothing with that
  42.380 -  file.
  42.381 -\item If one changeset has modified a file, and the other hasn't,
  42.382 -  create the modified copy of the file in the working directory.
  42.383 -\item If one changeset has removed a file, and the other hasn't (or
  42.384 -  has also deleted it), delete the file from the working directory.
  42.385 -\item If one changeset has removed a file, but the other has modified
  42.386 -  the file, ask the user what to do: keep the modified file, or remove
  42.387 -  it?
  42.388 -\item If both changesets have modified a file, invoke an external
  42.389 -  merge program to choose the new contents for the merged file.  This
  42.390 -  may require input from the user.
  42.391 -\item If one changeset has modified a file, and the other has renamed
  42.392 -  or copied the file, make sure that the changes follow the new name
  42.393 -  of the file.
  42.394 -\end{itemize}
  42.395 -There are more details---merging has plenty of corner cases---but
  42.396 -these are the most common choices that are involved in a merge.  As
  42.397 -you can see, most cases are completely automatic, and indeed most
  42.398 -merges finish automatically, without requiring your input to resolve
  42.399 -any conflicts.
  42.400 -
  42.401 -When you're thinking about what happens when you commit after a merge,
  42.402 -once again the working directory is ``the changeset I'm about to
  42.403 -commit''.  After the \hgcmd{merge} command completes, the working
  42.404 -directory has two parents; these will become the parents of the new
  42.405 -changeset.
  42.406 -
  42.407 -Mercurial lets you perform multiple merges, but you must commit the
  42.408 -results of each individual merge as you go.  This is necessary because
  42.409 -Mercurial only tracks two parents for both revisions and the working
  42.410 -directory.  While it would be technically possible to merge multiple
  42.411 -changesets at once, the prospect of user confusion and making a
  42.412 -terrible mess of a merge immediately becomes overwhelming.
  42.413 -
  42.414 -\section{Other interesting design features}
  42.415 -
  42.416 -In the sections above, I've tried to highlight some of the most
  42.417 -important aspects of Mercurial's design, to illustrate that it pays
  42.418 -careful attention to reliability and performance.  However, the
  42.419 -attention to detail doesn't stop there.  There are a number of other
  42.420 -aspects of Mercurial's construction that I personally find
  42.421 -interesting.  I'll detail a few of them here, separate from the ``big
  42.422 -ticket'' items above, so that if you're interested, you can gain a
  42.423 -better idea of the amount of thinking that goes into a well-designed
  42.424 -system.
  42.425 -
  42.426 -\subsection{Clever compression}
  42.427 -
  42.428 -When appropriate, Mercurial will store both snapshots and deltas in
  42.429 -compressed form.  It does this by always \emph{trying to} compress a
  42.430 -snapshot or delta, but only storing the compressed version if it's
  42.431 -smaller than the uncompressed version.
  42.432 -
  42.433 -This means that Mercurial does ``the right thing'' when storing a file
  42.434 -whose native form is compressed, such as a \texttt{zip} archive or a
  42.435 -JPEG image.  When these types of files are compressed a second time,
  42.436 -the resulting file is usually bigger than the once-compressed form,
  42.437 -and so Mercurial will store the plain \texttt{zip} or JPEG.
  42.438 -
  42.439 -Deltas between revisions of a compressed file are usually larger than
  42.440 -snapshots of the file, and Mercurial again does ``the right thing'' in
  42.441 -these cases.  It finds that such a delta exceeds the threshold at
  42.442 -which it should store a complete snapshot of the file, so it stores
  42.443 -the snapshot, again saving space compared to a naive delta-only
  42.444 -approach.
  42.445 -
  42.446 -\subsubsection{Network recompression}
  42.447 -
  42.448 -When storing revisions on disk, Mercurial uses the ``deflate''
  42.449 -compression algorithm (the same one used by the popular \texttt{zip}
  42.450 -archive format), which balances good speed with a respectable
  42.451 -compression ratio.  However, when transmitting revision data over a
  42.452 -network connection, Mercurial uncompresses the compressed revision
  42.453 -data.
  42.454 -
  42.455 -If the connection is over HTTP, Mercurial recompresses the entire
  42.456 -stream of data using a compression algorithm that gives a better
  42.457 -compression ratio (the Burrows-Wheeler algorithm from the widely used
  42.458 -\texttt{bzip2} compression package).  This combination of algorithm
  42.459 -and compression of the entire stream (instead of a revision at a time)
  42.460 -substantially reduces the number of bytes to be transferred, yielding
  42.461 -better network performance over almost all kinds of network.
  42.462 -
  42.463 -(If the connection is over \command{ssh}, Mercurial \emph{doesn't}
  42.464 -recompress the stream, because \command{ssh} can already do this
  42.465 -itself.)
  42.466 -
  42.467 -\subsection{Read/write ordering and atomicity}
  42.468 -
  42.469 -Appending to files isn't the whole story when it comes to guaranteeing
  42.470 -that a reader won't see a partial write.  If you recall
  42.471 -figure~\ref{fig:concepts:metadata}, revisions in the changelog point to
  42.472 -revisions in the manifest, and revisions in the manifest point to
  42.473 -revisions in filelogs.  This hierarchy is deliberate.
  42.474 -
  42.475 -A writer starts a transaction by writing filelog and manifest data,
  42.476 -and doesn't write any changelog data until those are finished.  A
  42.477 -reader starts by reading changelog data, then manifest data, followed
  42.478 -by filelog data.
  42.479 -
  42.480 -Since the writer has always finished writing filelog and manifest data
  42.481 -before it writes to the changelog, a reader will never read a pointer
  42.482 -to a partially written manifest revision from the changelog, and it will
  42.483 -never read a pointer to a partially written filelog revision from the
  42.484 -manifest.
  42.485 -
  42.486 -\subsection{Concurrent access}
  42.487 -
  42.488 -The read/write ordering and atomicity guarantees mean that Mercurial
  42.489 -never needs to \emph{lock} a repository when it's reading data, even
  42.490 -if the repository is being written to while the read is occurring.
  42.491 -This has a big effect on scalability; you can have an arbitrary number
  42.492 -of Mercurial processes safely reading data from a repository safely
  42.493 -all at once, no matter whether it's being written to or not.
  42.494 -
  42.495 -The lockless nature of reading means that if you're sharing a
  42.496 -repository on a multi-user system, you don't need to grant other local
  42.497 -users permission to \emph{write} to your repository in order for them
  42.498 -to be able to clone it or pull changes from it; they only need
  42.499 -\emph{read} permission.  (This is \emph{not} a common feature among
  42.500 -revision control systems, so don't take it for granted!  Most require
  42.501 -readers to be able to lock a repository to access it safely, and this
  42.502 -requires write permission on at least one directory, which of course
  42.503 -makes for all kinds of nasty and annoying security and administrative
  42.504 -problems.)
  42.505 -
  42.506 -Mercurial uses locks to ensure that only one process can write to a
  42.507 -repository at a time (the locking mechanism is safe even over
  42.508 -filesystems that are notoriously hostile to locking, such as NFS).  If
  42.509 -a repository is locked, a writer will wait for a while to retry if the
  42.510 -repository becomes unlocked, but if the repository remains locked for
  42.511 -too long, the process attempting to write will time out after a while.
  42.512 -This means that your daily automated scripts won't get stuck forever
  42.513 -and pile up if a system crashes unnoticed, for example.  (Yes, the
  42.514 -timeout is configurable, from zero to infinity.)
  42.515 -
  42.516 -\subsubsection{Safe dirstate access}
  42.517 -
  42.518 -As with revision data, Mercurial doesn't take a lock to read the
  42.519 -dirstate file; it does acquire a lock to write it.  To avoid the
  42.520 -possibility of reading a partially written copy of the dirstate file,
  42.521 -Mercurial writes to a file with a unique name in the same directory as
  42.522 -the dirstate file, then renames the temporary file atomically to
  42.523 -\filename{dirstate}.  The file named \filename{dirstate} is thus
  42.524 -guaranteed to be complete, not partially written.
  42.525 -
  42.526 -\subsection{Avoiding seeks}
  42.527 -
  42.528 -Critical to Mercurial's performance is the avoidance of seeks of the
  42.529 -disk head, since any seek is far more expensive than even a
  42.530 -comparatively large read operation.
  42.531 -
  42.532 -This is why, for example, the dirstate is stored in a single file.  If
  42.533 -there were a dirstate file per directory that Mercurial tracked, the
  42.534 -disk would seek once per directory.  Instead, Mercurial reads the
  42.535 -entire single dirstate file in one step.
  42.536 -
  42.537 -Mercurial also uses a ``copy on write'' scheme when cloning a
  42.538 -repository on local storage.  Instead of copying every revlog file
  42.539 -from the old repository into the new repository, it makes a ``hard
  42.540 -link'', which is a shorthand way to say ``these two names point to the
  42.541 -same file''.  When Mercurial is about to write to one of a revlog's
  42.542 -files, it checks to see if the number of names pointing at the file is
  42.543 -greater than one.  If it is, more than one repository is using the
  42.544 -file, so Mercurial makes a new copy of the file that is private to
  42.545 -this repository.
  42.546 -
  42.547 -A few revision control developers have pointed out that this idea of
  42.548 -making a complete private copy of a file is not very efficient in its
  42.549 -use of storage.  While this is true, storage is cheap, and this method
  42.550 -gives the highest performance while deferring most book-keeping to the
  42.551 -operating system.  An alternative scheme would most likely reduce
  42.552 -performance and increase the complexity of the software, each of which
  42.553 -is much more important to the ``feel'' of day-to-day use.
  42.554 -
  42.555 -\subsection{Other contents of the dirstate}
  42.556 -
  42.557 -Because Mercurial doesn't force you to tell it when you're modifying a
  42.558 -file, it uses the dirstate to store some extra information so it can
  42.559 -determine efficiently whether you have modified a file.  For each file
  42.560 -in the working directory, it stores the time that it last modified the
  42.561 -file itself, and the size of the file at that time.  
  42.562 -
  42.563 -When you explicitly \hgcmd{add}, \hgcmd{remove}, \hgcmd{rename} or
  42.564 -\hgcmd{copy} files, Mercurial updates the dirstate so that it knows
  42.565 -what to do with those files when you commit.
  42.566 -
  42.567 -When Mercurial is checking the states of files in the working
  42.568 -directory, it first checks a file's modification time.  If that has
  42.569 -not changed, the file must not have been modified.  If the file's size
  42.570 -has changed, the file must have been modified.  If the modification
  42.571 -time has changed, but the size has not, only then does Mercurial need
  42.572 -to read the actual contents of the file to see if they've changed.
  42.573 -Storing these few extra pieces of information dramatically reduces the
  42.574 -amount of data that Mercurial needs to read, which yields large
  42.575 -performance improvements compared to other revision control systems.
  42.576 -
  42.577 -%%% Local Variables: 
  42.578 -%%% mode: latex
  42.579 -%%% TeX-master: "00book"
  42.580 -%%% End:
    43.1 --- a/en/daily.tex	Thu Mar 26 08:57:10 2009 +0100
    43.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    43.3 @@ -1,381 +0,0 @@
    43.4 -\chapter{Mercurial in daily use}
    43.5 -\label{chap:daily}
    43.6 -
    43.7 -\section{Telling Mercurial which files to track}
    43.8 -
    43.9 -Mercurial does not work with files in your repository unless you tell
   43.10 -it to manage them.  The \hgcmd{status} command will tell you which
   43.11 -files Mercurial doesn't know about; it uses a ``\texttt{?}'' to
   43.12 -display such files.
   43.13 -
   43.14 -To tell Mercurial to track a file, use the \hgcmd{add} command.  Once
   43.15 -you have added a file, the entry in the output of \hgcmd{status} for
   43.16 -that file changes from ``\texttt{?}'' to ``\texttt{A}''.
   43.17 -\interaction{daily.files.add}
   43.18 -
   43.19 -After you run a \hgcmd{commit}, the files that you added before the
   43.20 -commit will no longer be listed in the output of \hgcmd{status}.  The
   43.21 -reason for this is that \hgcmd{status} only tells you about
   43.22 -``interesting'' files---those that you have modified or told Mercurial
   43.23 -to do something with---by default.  If you have a repository that
   43.24 -contains thousands of files, you will rarely want to know about files
   43.25 -that Mercurial is tracking, but that have not changed.  (You can still
   43.26 -get this information; we'll return to this later.)
   43.27 -
   43.28 -Once you add a file, Mercurial doesn't do anything with it
   43.29 -immediately.  Instead, it will take a snapshot of the file's state the
   43.30 -next time you perform a commit.  It will then continue to track the
   43.31 -changes you make to the file every time you commit, until you remove
   43.32 -the file.
   43.33 -
   43.34 -\subsection{Explicit versus implicit file naming}
   43.35 -
   43.36 -A useful behaviour that Mercurial has is that if you pass the name of
   43.37 -a directory to a command, every Mercurial command will treat this as
   43.38 -``I want to operate on every file in this directory and its
   43.39 -subdirectories''.
   43.40 -\interaction{daily.files.add-dir}
   43.41 -Notice in this example that Mercurial printed the names of the files
   43.42 -it added, whereas it didn't do so when we added the file named
   43.43 -\filename{a} in the earlier example.
   43.44 -
   43.45 -What's going on is that in the former case, we explicitly named the
   43.46 -file to add on the command line, so the assumption that Mercurial
   43.47 -makes in such cases is that you know what you were doing, and it
   43.48 -doesn't print any output.
   43.49 -
   43.50 -However, when we \emph{imply} the names of files by giving the name of
   43.51 -a directory, Mercurial takes the extra step of printing the name of
   43.52 -each file that it does something with.  This makes it more clear what
   43.53 -is happening, and reduces the likelihood of a silent and nasty
   43.54 -surprise.  This behaviour is common to most Mercurial commands.
   43.55 -
   43.56 -\subsection{Aside: Mercurial tracks files, not directories}
   43.57 -
   43.58 -Mercurial does not track directory information.  Instead, it tracks
   43.59 -the path to a file.  Before creating a file, it first creates any
   43.60 -missing directory components of the path.  After it deletes a file, it
   43.61 -then deletes any empty directories that were in the deleted file's
   43.62 -path.  This sounds like a trivial distinction, but it has one minor
   43.63 -practical consequence: it is not possible to represent a completely
   43.64 -empty directory in Mercurial.
   43.65 -
   43.66 -Empty directories are rarely useful, and there are unintrusive
   43.67 -workarounds that you can use to achieve an appropriate effect.  The
   43.68 -developers of Mercurial thus felt that the complexity that would be
   43.69 -required to manage empty directories was not worth the limited benefit
   43.70 -this feature would bring.
   43.71 -
   43.72 -If you need an empty directory in your repository, there are a few
   43.73 -ways to achieve this. One is to create a directory, then \hgcmd{add} a
   43.74 -``hidden'' file to that directory.  On Unix-like systems, any file
   43.75 -name that begins with a period (``\texttt{.}'') is treated as hidden
   43.76 -by most commands and GUI tools.  This approach is illustrated in
   43.77 -figure~\ref{ex:daily:hidden}.
   43.78 -
   43.79 -\begin{figure}[ht]
   43.80 -  \interaction{daily.files.hidden}
   43.81 -  \caption{Simulating an empty directory using a hidden file}
   43.82 -  \label{ex:daily:hidden}
   43.83 -\end{figure}
   43.84 -
   43.85 -Another way to tackle a need for an empty directory is to simply
   43.86 -create one in your automated build scripts before they will need it.
   43.87 -
   43.88 -\section{How to stop tracking a file}
   43.89 -
   43.90 -Once you decide that a file no longer belongs in your repository, use
   43.91 -the \hgcmd{remove} command; this deletes the file, and tells Mercurial
   43.92 -to stop tracking it.  A removed file is represented in the output of
   43.93 -\hgcmd{status} with a ``\texttt{R}''.
   43.94 -\interaction{daily.files.remove}
   43.95 -
   43.96 -After you \hgcmd{remove} a file, Mercurial will no longer track
   43.97 -changes to that file, even if you recreate a file with the same name
   43.98 -in your working directory.  If you do recreate a file with the same
   43.99 -name and want Mercurial to track the new file, simply \hgcmd{add} it.
  43.100 -Mercurial will know that the newly added file is not related to the
  43.101 -old file of the same name.
  43.102 -
  43.103 -\subsection{Removing a file does not affect its history}
  43.104 -
  43.105 -It is important to understand that removing a file has only two
  43.106 -effects.
  43.107 -\begin{itemize}
  43.108 -\item It removes the current version of the file from the working
  43.109 -  directory.
  43.110 -\item It stops Mercurial from tracking changes to the file, from the
  43.111 -  time of the next commit.
  43.112 -\end{itemize}
  43.113 -Removing a file \emph{does not} in any way alter the \emph{history} of
  43.114 -the file.
  43.115 -
  43.116 -If you update the working directory to a changeset in which a file
  43.117 -that you have removed was still tracked, it will reappear in the
  43.118 -working directory, with the contents it had when you committed that
  43.119 -changeset.  If you then update the working directory to a later
  43.120 -changeset, in which the file had been removed, Mercurial will once
  43.121 -again remove the file from the working directory.
  43.122 -
  43.123 -\subsection{Missing files}
  43.124 -
  43.125 -Mercurial considers a file that you have deleted, but not used
  43.126 -\hgcmd{remove} to delete, to be \emph{missing}.  A missing file is
  43.127 -represented with ``\texttt{!}'' in the output of \hgcmd{status}.
  43.128 -Mercurial commands will not generally do anything with missing files.
  43.129 -\interaction{daily.files.missing}
  43.130 -
  43.131 -If your repository contains a file that \hgcmd{status} reports as
  43.132 -missing, and you want the file to stay gone, you can run
  43.133 -\hgcmdargs{remove}{\hgopt{remove}{--after}} at any time later on, to
  43.134 -tell Mercurial that you really did mean to remove the file.
  43.135 -\interaction{daily.files.remove-after}
  43.136 -
  43.137 -On the other hand, if you deleted the missing file by accident, use
  43.138 -\hgcmdargs{revert}{\emph{filename}} to recover the file.  It will
  43.139 -reappear, in unmodified form.
  43.140 -\interaction{daily.files.recover-missing}
  43.141 -
  43.142 -\subsection{Aside: why tell Mercurial explicitly to 
  43.143 -  remove a file?}
  43.144 -
  43.145 -You might wonder why Mercurial requires you to explicitly tell it that
  43.146 -you are deleting a file.  Early during the development of Mercurial,
  43.147 -it let you delete a file however you pleased; Mercurial would notice
  43.148 -the absence of the file automatically when you next ran a
  43.149 -\hgcmd{commit}, and stop tracking the file.  In practice, this made it
  43.150 -too easy to accidentally remove a file without noticing.
  43.151 -
  43.152 -\subsection{Useful shorthand---adding and removing files
  43.153 -  in one step}
  43.154 -
  43.155 -Mercurial offers a combination command, \hgcmd{addremove}, that adds
  43.156 -untracked files and marks missing files as removed.  
  43.157 -\interaction{daily.files.addremove}
  43.158 -The \hgcmd{commit} command also provides a \hgopt{commit}{-A} option
  43.159 -that performs this same add-and-remove, immediately followed by a
  43.160 -commit.
  43.161 -\interaction{daily.files.commit-addremove}
  43.162 -
  43.163 -\section{Copying files}
  43.164 -
  43.165 -Mercurial provides a \hgcmd{copy} command that lets you make a new
  43.166 -copy of a file.  When you copy a file using this command, Mercurial
  43.167 -makes a record of the fact that the new file is a copy of the original
  43.168 -file.  It treats these copied files specially when you merge your work
  43.169 -with someone else's.
  43.170 -
  43.171 -\subsection{The results of copying during a merge}
  43.172 -
  43.173 -What happens during a merge is that changes ``follow'' a copy.  To
  43.174 -best illustrate what this means, let's create an example.  We'll start
  43.175 -with the usual tiny repository that contains a single file.
  43.176 -\interaction{daily.copy.init}
  43.177 -We need to do some work in parallel, so that we'll have something to
  43.178 -merge.  So let's clone our repository.
  43.179 -\interaction{daily.copy.clone}
  43.180 -Back in our initial repository, let's use the \hgcmd{copy} command to
  43.181 -make a copy of the first file we created.
  43.182 -\interaction{daily.copy.copy}
  43.183 -
  43.184 -If we look at the output of the \hgcmd{status} command afterwards, the
  43.185 -copied file looks just like a normal added file.
  43.186 -\interaction{daily.copy.status}
  43.187 -But if we pass the \hgopt{status}{-C} option to \hgcmd{status}, it
  43.188 -prints another line of output: this is the file that our newly-added
  43.189 -file was copied \emph{from}.
  43.190 -\interaction{daily.copy.status-copy}
  43.191 -
  43.192 -Now, back in the repository we cloned, let's make a change in
  43.193 -parallel.  We'll add a line of content to the original file that we
  43.194 -created.
  43.195 -\interaction{daily.copy.other}
  43.196 -Now we have a modified \filename{file} in this repository.  When we
  43.197 -pull the changes from the first repository, and merge the two heads,
  43.198 -Mercurial will propagate the changes that we made locally to
  43.199 -\filename{file} into its copy, \filename{new-file}.
  43.200 -\interaction{daily.copy.merge}
  43.201 -
  43.202 -\subsection{Why should changes follow copies?}
  43.203 -\label{sec:daily:why-copy}
  43.204 -
  43.205 -This behaviour, of changes to a file propagating out to copies of the
  43.206 -file, might seem esoteric, but in most cases it's highly desirable.
  43.207 -
  43.208 -First of all, remember that this propagation \emph{only} happens when
  43.209 -you merge.  So if you \hgcmd{copy} a file, and subsequently modify the
  43.210 -original file during the normal course of your work, nothing will
  43.211 -happen.
  43.212 -
  43.213 -The second thing to know is that modifications will only propagate
  43.214 -across a copy as long as the repository that you're pulling changes
  43.215 -from \emph{doesn't know} about the copy.
  43.216 -
  43.217 -The reason that Mercurial does this is as follows.  Let's say I make
  43.218 -an important bug fix in a source file, and commit my changes.
  43.219 -Meanwhile, you've decided to \hgcmd{copy} the file in your repository,
  43.220 -without knowing about the bug or having seen the fix, and you have
  43.221 -started hacking on your copy of the file.
  43.222 -
  43.223 -If you pulled and merged my changes, and Mercurial \emph{didn't}
  43.224 -propagate changes across copies, your source file would now contain
  43.225 -the bug, and unless you remembered to propagate the bug fix by hand,
  43.226 -the bug would \emph{remain} in your copy of the file.
  43.227 -
  43.228 -By automatically propagating the change that fixed the bug from the
  43.229 -original file to the copy, Mercurial prevents this class of problem.
  43.230 -To my knowledge, Mercurial is the \emph{only} revision control system
  43.231 -that propagates changes across copies like this.
  43.232 -
  43.233 -Once your change history has a record that the copy and subsequent
  43.234 -merge occurred, there's usually no further need to propagate changes
  43.235 -from the original file to the copied file, and that's why Mercurial
  43.236 -only propagates changes across copies until this point, and no
  43.237 -further.
  43.238 -
  43.239 -\subsection{How to make changes \emph{not} follow a copy}
  43.240 -
  43.241 -If, for some reason, you decide that this business of automatically
  43.242 -propagating changes across copies is not for you, simply use your
  43.243 -system's normal file copy command (on Unix-like systems, that's
  43.244 -\command{cp}) to make a copy of a file, then \hgcmd{add} the new copy
  43.245 -by hand.  Before you do so, though, please do reread
  43.246 -section~\ref{sec:daily:why-copy}, and make an informed decision that
  43.247 -this behaviour is not appropriate to your specific case.
  43.248 -
  43.249 -\subsection{Behaviour of the \hgcmd{copy} command}
  43.250 -
  43.251 -When you use the \hgcmd{copy} command, Mercurial makes a copy of each
  43.252 -source file as it currently stands in the working directory.  This
  43.253 -means that if you make some modifications to a file, then \hgcmd{copy}
  43.254 -it without first having committed those changes, the new copy will
  43.255 -also contain the modifications you have made up until that point.  (I
  43.256 -find this behaviour a little counterintuitive, which is why I mention
  43.257 -it here.)
  43.258 -
  43.259 -The \hgcmd{copy} command acts similarly to the Unix \command{cp}
  43.260 -command (you can use the \hgcmd{cp} alias if you prefer).  The last
  43.261 -argument is the \emph{destination}, and all prior arguments are
  43.262 -\emph{sources}.  If you pass it a single file as the source, and the
  43.263 -destination does not exist, it creates a new file with that name.
  43.264 -\interaction{daily.copy.simple}
  43.265 -If the destination is a directory, Mercurial copies its sources into
  43.266 -that directory.
  43.267 -\interaction{daily.copy.dir-dest}
  43.268 -Copying a directory is recursive, and preserves the directory
  43.269 -structure of the source.
  43.270 -\interaction{daily.copy.dir-src}
  43.271 -If the source and destination are both directories, the source tree is
  43.272 -recreated in the destination directory.
  43.273 -\interaction{daily.copy.dir-src-dest}
  43.274 -
  43.275 -As with the \hgcmd{rename} command, if you copy a file manually and
  43.276 -then want Mercurial to know that you've copied the file, simply use
  43.277 -the \hgopt{copy}{--after} option to \hgcmd{copy}.
  43.278 -\interaction{daily.copy.after}
  43.279 -
  43.280 -\section{Renaming files}
  43.281 -
  43.282 -It's rather more common to need to rename a file than to make a copy
  43.283 -of it.  The reason I discussed the \hgcmd{copy} command before talking
  43.284 -about renaming files is that Mercurial treats a rename in essentially
  43.285 -the same way as a copy.  Therefore, knowing what Mercurial does when
  43.286 -you copy a file tells you what to expect when you rename a file.
  43.287 -
  43.288 -When you use the \hgcmd{rename} command, Mercurial makes a copy of
  43.289 -each source file, then deletes it and marks the file as removed.
  43.290 -\interaction{daily.rename.rename}
  43.291 -The \hgcmd{status} command shows the newly copied file as added, and
  43.292 -the copied-from file as removed.
  43.293 -\interaction{daily.rename.status}
  43.294 -As with the results of a \hgcmd{copy}, we must use the
  43.295 -\hgopt{status}{-C} option to \hgcmd{status} to see that the added file
  43.296 -is really being tracked by Mercurial as a copy of the original, now
  43.297 -removed, file.
  43.298 -\interaction{daily.rename.status-copy}
  43.299 -
  43.300 -As with \hgcmd{remove} and \hgcmd{copy}, you can tell Mercurial about
  43.301 -a rename after the fact using the \hgopt{rename}{--after} option.  In
  43.302 -most other respects, the behaviour of the \hgcmd{rename} command, and
  43.303 -the options it accepts, are similar to the \hgcmd{copy} command.
  43.304 -
  43.305 -\subsection{Renaming files and merging changes}
  43.306 -
  43.307 -Since Mercurial's rename is implemented as copy-and-remove, the same
  43.308 -propagation of changes happens when you merge after a rename as after
  43.309 -a copy.
  43.310 -
  43.311 -If I modify a file, and you rename it to a new name, and then we merge
  43.312 -our respective changes, my modifications to the file under its
  43.313 -original name will be propagated into the file under its new name.
  43.314 -(This is something you might expect to ``simply work,'' but not all
  43.315 -revision control systems actually do this.)
  43.316 -
  43.317 -Whereas having changes follow a copy is a feature where you can
  43.318 -perhaps nod and say ``yes, that might be useful,'' it should be clear
  43.319 -that having them follow a rename is definitely important.  Without
  43.320 -this facility, it would simply be too easy for changes to become
  43.321 -orphaned when files are renamed.
  43.322 -
  43.323 -\subsection{Divergent renames and merging}
  43.324 -
  43.325 -The case of diverging names occurs when two developers start with a
  43.326 -file---let's call it \filename{foo}---in their respective
  43.327 -repositories.
  43.328 -
  43.329 -\interaction{rename.divergent.clone}
  43.330 -Anne renames the file to \filename{bar}.
  43.331 -\interaction{rename.divergent.rename.anne}
  43.332 -Meanwhile, Bob renames it to \filename{quux}.
  43.333 -\interaction{rename.divergent.rename.bob}
  43.334 -
  43.335 -I like to think of this as a conflict because each developer has
  43.336 -expressed different intentions about what the file ought to be named.
  43.337 -
  43.338 -What do you think should happen when they merge their work?
  43.339 -Mercurial's actual behaviour is that it always preserves \emph{both}
  43.340 -names when it merges changesets that contain divergent renames.
  43.341 -\interaction{rename.divergent.merge}
  43.342 -
  43.343 -Notice that Mercurial does warn about the divergent renames, but it
  43.344 -leaves it up to you to do something about the divergence after the merge.
  43.345 -
  43.346 -\subsection{Convergent renames and merging}
  43.347 -
  43.348 -Another kind of rename conflict occurs when two people choose to
  43.349 -rename different \emph{source} files to the same \emph{destination}.
  43.350 -In this case, Mercurial runs its normal merge machinery, and lets you
  43.351 -guide it to a suitable resolution.
  43.352 -
  43.353 -\subsection{Other name-related corner cases}
  43.354 -
  43.355 -Mercurial has a longstanding bug in which it fails to handle a merge
  43.356 -where one side has a file with a given name, while another has a
  43.357 -directory with the same name.  This is documented as~\bug{29}.
  43.358 -\interaction{issue29.go}
  43.359 -
  43.360 -\section{Recovering from mistakes}
  43.361 -
  43.362 -Mercurial has some useful commands that will help you to recover from
  43.363 -some common mistakes.
  43.364 -
  43.365 -The \hgcmd{revert} command lets you undo changes that you have made to
  43.366 -your working directory.  For example, if you \hgcmd{add} a file by
  43.367 -accident, just run \hgcmd{revert} with the name of the file you added,
  43.368 -and while the file won't be touched in any way, it won't be tracked
  43.369 -for adding by Mercurial any longer, either.  You can also use
  43.370 -\hgcmd{revert} to get rid of erroneous changes to a file.
  43.371 -
  43.372 -It's useful to remember that the \hgcmd{revert} command is useful for
  43.373 -changes that you have not yet committed.  Once you've committed a
  43.374 -change, if you decide it was a mistake, you can still do something
  43.375 -about it, though your options may be more limited.
  43.376 -
  43.377 -For more information about the \hgcmd{revert} command, and details
  43.378 -about how to deal with changes you have already committed, see
  43.379 -chapter~\ref{chap:undo}.
  43.380 -
  43.381 -%%% Local Variables: 
  43.382 -%%% mode: latex
  43.383 -%%% TeX-master: "00book"
  43.384 -%%% End: 
    44.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.2 +++ b/en/examples/auto-snippets.xml	Sun Aug 16 03:41:39 2009 +0200
    44.3 @@ -0,0 +1,276 @@
    44.4 +<!ENTITY ch06-apache-config.lst SYSTEM "results/ch06-apache-config.lst.lxo">
    44.5 +<!ENTITY ch09-check_whitespace.py.lst SYSTEM "results/ch09-check_whitespace.py.lst.lxo">
    44.6 +<!ENTITY ch10-bugzilla-config.lst SYSTEM "results/ch10-bugzilla-config.lst.lxo">
    44.7 +<!ENTITY ch10-notify-config-mail.lst SYSTEM "results/ch10-notify-config-mail.lst.lxo">
    44.8 +<!ENTITY ch10-notify-config.lst SYSTEM "results/ch10-notify-config.lst.lxo">
    44.9 +<!ENTITY interaction.backout.init SYSTEM "results/backout.init.lxo">
   44.10 +<!ENTITY interaction.backout.manual.backout SYSTEM "results/backout.manual.backout.lxo">
   44.11 +<!ENTITY interaction.backout.manual.cat SYSTEM "results/backout.manual.cat.lxo">
   44.12 +<!ENTITY interaction.backout.manual.clone SYSTEM "results/backout.manual.clone.lxo">
   44.13 +<!ENTITY interaction.backout.manual.heads SYSTEM "results/backout.manual.heads.lxo">
   44.14 +<!ENTITY interaction.backout.manual.log SYSTEM "results/backout.manual.log.lxo">
   44.15 +<!ENTITY interaction.backout.manual.merge SYSTEM "results/backout.manual.merge.lxo">
   44.16 +<!ENTITY interaction.backout.manual.parents SYSTEM "results/backout.manual.parents.lxo">
   44.17 +<!ENTITY interaction.backout.non-tip.backout SYSTEM "results/backout.non-tip.backout.lxo">
   44.18 +<!ENTITY interaction.backout.non-tip.cat SYSTEM "results/backout.non-tip.cat.lxo">
   44.19 +<!ENTITY interaction.backout.non-tip.clone SYSTEM "results/backout.non-tip.clone.lxo">
   44.20 +<!ENTITY interaction.backout.simple SYSTEM "results/backout.simple.lxo">
   44.21 +<!ENTITY interaction.backout.simple.log SYSTEM "results/backout.simple.log.lxo">
   44.22 +<!ENTITY interaction.bisect.commits SYSTEM "results/bisect.commits.lxo">
   44.23 +<!ENTITY interaction.bisect.help SYSTEM "results/bisect.help.lxo">
   44.24 +<!ENTITY interaction.bisect.init SYSTEM "results/bisect.init.lxo">
   44.25 +<!ENTITY interaction.bisect.search.bad-init SYSTEM "results/bisect.search.bad-init.lxo">
   44.26 +<!ENTITY interaction.bisect.search.good-init SYSTEM "results/bisect.search.good-init.lxo">
   44.27 +<!ENTITY interaction.bisect.search.init SYSTEM "results/bisect.search.init.lxo">
   44.28 +<!ENTITY interaction.bisect.search.mytest SYSTEM "results/bisect.search.mytest.lxo">
   44.29 +<!ENTITY interaction.bisect.search.reset SYSTEM "results/bisect.search.reset.lxo">
   44.30 +<!ENTITY interaction.bisect.search.rest SYSTEM "results/bisect.search.rest.lxo">
   44.31 +<!ENTITY interaction.bisect.search.step1 SYSTEM "results/bisect.search.step1.lxo">
   44.32 +<!ENTITY interaction.bisect.search.step2 SYSTEM "results/bisect.search.step2.lxo">
   44.33 +<!ENTITY interaction.branch-named.branch SYSTEM "results/branch-named.branch.lxo">
   44.34 +<!ENTITY interaction.branch-named.branches SYSTEM "results/branch-named.branches.lxo">
   44.35 +<!ENTITY interaction.branch-named.commit SYSTEM "results/branch-named.commit.lxo">
   44.36 +<!ENTITY interaction.branch-named.create SYSTEM "results/branch-named.create.lxo">
   44.37 +<!ENTITY interaction.branch-named.foo-commit SYSTEM "results/branch-named.foo-commit.lxo">
   44.38 +<!ENTITY interaction.branch-named.merge SYSTEM "results/branch-named.merge.lxo">
   44.39 +<!ENTITY interaction.branch-named.parents SYSTEM "results/branch-named.parents.lxo">
   44.40 +<!ENTITY interaction.branch-named.rebranch SYSTEM "results/branch-named.rebranch.lxo">
   44.41 +<!ENTITY interaction.branch-named.status SYSTEM "results/branch-named.status.lxo">
   44.42 +<!ENTITY interaction.branch-named.update-bar SYSTEM "results/branch-named.update-bar.lxo">
   44.43 +<!ENTITY interaction.branch-named.update-nothing SYSTEM "results/branch-named.update-nothing.lxo">
   44.44 +<!ENTITY interaction.branch-named.update-switchy SYSTEM "results/branch-named.update-switchy.lxo">
   44.45 +<!ENTITY interaction.branch-repo.bugfix SYSTEM "results/branch-repo.bugfix.lxo">
   44.46 +<!ENTITY interaction.branch-repo.clone SYSTEM "results/branch-repo.clone.lxo">
   44.47 +<!ENTITY interaction.branch-repo.merge SYSTEM "results/branch-repo.merge.lxo">
   44.48 +<!ENTITY interaction.branch-repo.new SYSTEM "results/branch-repo.new.lxo">
   44.49 +<!ENTITY interaction.branch-repo.pull SYSTEM "results/branch-repo.pull.lxo">
   44.50 +<!ENTITY interaction.branch-repo.tag SYSTEM "results/branch-repo.tag.lxo">
   44.51 +<!ENTITY interaction.branching.clone SYSTEM "results/branching.clone.lxo">
   44.52 +<!ENTITY interaction.branching.init SYSTEM "results/branching.init.lxo">
   44.53 +<!ENTITY interaction.branching.main SYSTEM "results/branching.main.lxo">
   44.54 +<!ENTITY interaction.branching.merge SYSTEM "results/branching.merge.lxo">
   44.55 +<!ENTITY interaction.branching.stable SYSTEM "results/branching.stable.lxo">
   44.56 +<!ENTITY interaction.branching.tag SYSTEM "results/branching.tag.lxo">
   44.57 +<!ENTITY interaction.branching.update SYSTEM "results/branching.update.lxo">
   44.58 +<!ENTITY interaction.ch01-new.add SYSTEM "results/ch01-new.add.lxo">
   44.59 +<!ENTITY interaction.ch01-new.commit SYSTEM "results/ch01-new.commit.lxo">
   44.60 +<!ENTITY interaction.ch01-new.init SYSTEM "results/ch01-new.init.lxo">
   44.61 +<!ENTITY interaction.ch01-new.ls SYSTEM "results/ch01-new.ls.lxo">
   44.62 +<!ENTITY interaction.ch01-new.ls2 SYSTEM "results/ch01-new.ls2.lxo">
   44.63 +<!ENTITY interaction.ch02-rename.alice SYSTEM "results/ch02-rename.alice.lxo">
   44.64 +<!ENTITY interaction.ch02-rename.bob SYSTEM "results/ch02-rename.bob.lxo">
   44.65 +<!ENTITY interaction.ch02-rename.clone SYSTEM "results/ch02-rename.clone.lxo">
   44.66 +<!ENTITY interaction.ch02-rename.clone2 SYSTEM "results/ch02-rename.clone2.lxo">
   44.67 +<!ENTITY interaction.ch02-rename.init SYSTEM "results/ch02-rename.init.lxo">
   44.68 +<!ENTITY interaction.ch02-rename.merge SYSTEM "results/ch02-rename.merge.lxo">
   44.69 +<!ENTITY interaction.ch02-rename.merge2 SYSTEM "results/ch02-rename.merge2.lxo">
   44.70 +<!ENTITY interaction.ch02-rename.status SYSTEM "results/ch02-rename.status.lxo">
   44.71 +<!ENTITY interaction.ch02-rename.status2 SYSTEM "results/ch02-rename.status2.lxo">
   44.72 +<!ENTITY interaction.ch04-diff.chmod SYSTEM "results/ch04-diff.chmod.lxo">
   44.73 +<!ENTITY interaction.ch04-diff.chmod.git SYSTEM "results/ch04-diff.chmod.git.lxo">
   44.74 +<!ENTITY interaction.ch04-diff.rename.basic SYSTEM "results/ch04-diff.rename.basic.lxo">
   44.75 +<!ENTITY interaction.ch04-diff.rename.git SYSTEM "results/ch04-diff.rename.git.lxo">
   44.76 +<!ENTITY interaction.ch04-rename.basic SYSTEM "results/ch04-rename.basic.lxo">
   44.77 +<!ENTITY interaction.ch04-resolve.cifail SYSTEM "results/ch04-resolve.cifail.lxo">
   44.78 +<!ENTITY interaction.ch04-resolve.export SYSTEM "results/ch04-resolve.export.lxo">
   44.79 +<!ENTITY interaction.ch04-resolve.heads SYSTEM "results/ch04-resolve.heads.lxo">
   44.80 +<!ENTITY interaction.ch04-resolve.init SYSTEM "results/ch04-resolve.init.lxo">
   44.81 +<!ENTITY interaction.ch04-resolve.left SYSTEM "results/ch04-resolve.left.lxo">
   44.82 +<!ENTITY interaction.ch04-resolve.list SYSTEM "results/ch04-resolve.list.lxo">
   44.83 +<!ENTITY interaction.ch04-resolve.merge SYSTEM "results/ch04-resolve.merge.lxo">
   44.84 +<!ENTITY interaction.ch04-resolve.pull SYSTEM "results/ch04-resolve.pull.lxo">
   44.85 +<!ENTITY interaction.ch04-resolve.right SYSTEM "results/ch04-resolve.right.lxo">
   44.86 +<!ENTITY interaction.ch09-hook.ws.better SYSTEM "results/ch09-hook.ws.better.lxo">
   44.87 +<!ENTITY interaction.ch09-hook.ws.simple SYSTEM "results/ch09-hook.ws.simple.lxo">
   44.88 +<!ENTITY interaction.ch10-multiline.go SYSTEM "results/ch10-multiline.go.lxo">
   44.89 +<!ENTITY interaction.ch10-multiline.orig.go SYSTEM "results/ch10-multiline.orig.go.lxo">
   44.90 +<!ENTITY interaction.ch11-qdelete.convert SYSTEM "results/ch11-qdelete.convert.lxo">
   44.91 +<!ENTITY interaction.ch11-qdelete.go SYSTEM "results/ch11-qdelete.go.lxo">
   44.92 +<!ENTITY interaction.ch11-qdelete.import SYSTEM "results/ch11-qdelete.import.lxo">
   44.93 +<!ENTITY interaction.cmdref.diff-p SYSTEM "results/cmdref.diff-p.lxo">
   44.94 +<!ENTITY interaction.daily.copy.after SYSTEM "results/daily.copy.after.lxo">
   44.95 +<!ENTITY interaction.daily.copy.cat SYSTEM "results/daily.copy.cat.lxo">
   44.96 +<!ENTITY interaction.daily.copy.clone SYSTEM "results/daily.copy.clone.lxo">
   44.97 +<!ENTITY interaction.daily.copy.copy SYSTEM "results/daily.copy.copy.lxo">
   44.98 +<!ENTITY interaction.daily.copy.dir-dest SYSTEM "results/daily.copy.dir-dest.lxo">
   44.99 +<!ENTITY interaction.daily.copy.dir-src SYSTEM "results/daily.copy.dir-src.lxo">
  44.100 +<!ENTITY interaction.daily.copy.dir-src-dest SYSTEM "results/daily.copy.dir-src-dest.lxo">
  44.101 +<!ENTITY interaction.daily.copy.init SYSTEM "results/daily.copy.init.lxo">
  44.102 +<!ENTITY interaction.daily.copy.merge SYSTEM "results/daily.copy.merge.lxo">
  44.103 +<!ENTITY interaction.daily.copy.orig.after SYSTEM "results/daily.copy.orig.after.lxo">
  44.104 +<!ENTITY interaction.daily.copy.orig.cat SYSTEM "results/daily.copy.orig.cat.lxo">
  44.105 +<!ENTITY interaction.daily.copy.orig.clone SYSTEM "results/daily.copy.orig.clone.lxo">
  44.106 +<!ENTITY interaction.daily.copy.orig.copy SYSTEM "results/daily.copy.orig.copy.lxo">
  44.107 +<!ENTITY interaction.daily.copy.orig.dir-dest SYSTEM "results/daily.copy.orig.dir-dest.lxo">
  44.108 +<!ENTITY interaction.daily.copy.orig.dir-src SYSTEM "results/daily.copy.orig.dir-src.lxo">
  44.109 +<!ENTITY interaction.daily.copy.orig.dir-src-dest SYSTEM "results/daily.copy.orig.dir-src-dest.lxo">
  44.110 +<!ENTITY interaction.daily.copy.orig.init SYSTEM "results/daily.copy.orig.init.lxo">
  44.111 +<!ENTITY interaction.daily.copy.orig.merge SYSTEM "results/daily.copy.orig.merge.lxo">
  44.112 +<!ENTITY interaction.daily.copy.orig.other SYSTEM "results/daily.copy.orig.other.lxo">
  44.113 +<!ENTITY interaction.daily.copy.orig.simple SYSTEM "results/daily.copy.orig.simple.lxo">
  44.114 +<!ENTITY interaction.daily.copy.orig.status SYSTEM "results/daily.copy.orig.status.lxo">
  44.115 +<!ENTITY interaction.daily.copy.orig.status-copy SYSTEM "results/daily.copy.orig.status-copy.lxo">
  44.116 +<!ENTITY interaction.daily.copy.other SYSTEM "results/daily.copy.other.lxo">
  44.117 +<!ENTITY interaction.daily.copy.simple SYSTEM "results/daily.copy.simple.lxo">
  44.118 +<!ENTITY interaction.daily.copy.status SYSTEM "results/daily.copy.status.lxo">
  44.119 +<!ENTITY interaction.daily.copy.status-copy SYSTEM "results/daily.copy.status-copy.lxo">
  44.120 +<!ENTITY interaction.daily.files.add SYSTEM "results/daily.files.add.lxo">
  44.121 +<!ENTITY interaction.daily.files.add-dir SYSTEM "results/daily.files.add-dir.lxo">
  44.122 +<!ENTITY interaction.daily.files.addremove SYSTEM "results/daily.files.addremove.lxo">
  44.123 +<!ENTITY interaction.daily.files.commit-addremove SYSTEM "results/daily.files.commit-addremove.lxo">
  44.124 +<!ENTITY interaction.daily.files.hidden SYSTEM "results/daily.files.hidden.lxo">
  44.125 +<!ENTITY interaction.daily.files.missing SYSTEM "results/daily.files.missing.lxo">
  44.126 +<!ENTITY interaction.daily.files.recover-missing SYSTEM "results/daily.files.recover-missing.lxo">
  44.127 +<!ENTITY interaction.daily.files.remove SYSTEM "results/daily.files.remove.lxo">
  44.128 +<!ENTITY interaction.daily.files.remove-after SYSTEM "results/daily.files.remove-after.lxo">
  44.129 +<!ENTITY interaction.daily.rename.rename SYSTEM "results/daily.rename.rename.lxo">
  44.130 +<!ENTITY interaction.daily.rename.status SYSTEM "results/daily.rename.status.lxo">
  44.131 +<!ENTITY interaction.daily.rename.status-copy SYSTEM "results/daily.rename.status-copy.lxo">
  44.132 +<!ENTITY interaction.daily.revert.add SYSTEM "results/daily.revert.add.lxo">
  44.133 +<!ENTITY interaction.daily.revert.copy SYSTEM "results/daily.revert.copy.lxo">
  44.134 +<!ENTITY interaction.daily.revert.missing SYSTEM "results/daily.revert.missing.lxo">
  44.135 +<!ENTITY interaction.daily.revert.modify SYSTEM "results/daily.revert.modify.lxo">
  44.136 +<!ENTITY interaction.daily.revert.remove SYSTEM "results/daily.revert.remove.lxo">
  44.137 +<!ENTITY interaction.daily.revert.rename SYSTEM "results/daily.revert.rename.lxo">
  44.138 +<!ENTITY interaction.daily.revert.rename-orig SYSTEM "results/daily.revert.rename-orig.lxo">
  44.139 +<!ENTITY interaction.daily.revert.status SYSTEM "results/daily.revert.status.lxo">
  44.140 +<!ENTITY interaction.daily.revert.unmodify SYSTEM "results/daily.revert.unmodify.lxo">
  44.141 +<!ENTITY interaction.extdiff.diff SYSTEM "results/extdiff.diff.lxo">
  44.142 +<!ENTITY interaction.extdiff.extdiff SYSTEM "results/extdiff.extdiff.lxo">
  44.143 +<!ENTITY interaction.extdiff.extdiff-ctx SYSTEM "results/extdiff.extdiff-ctx.lxo">
  44.144 +<!ENTITY interaction.filenames.dirs SYSTEM "results/filenames.dirs.lxo">
  44.145 +<!ENTITY interaction.filenames.files SYSTEM "results/filenames.files.lxo">
  44.146 +<!ENTITY interaction.filenames.filter.exclude SYSTEM "results/filenames.filter.exclude.lxo">
  44.147 +<!ENTITY interaction.filenames.filter.include SYSTEM "results/filenames.filter.include.lxo">
  44.148 +<!ENTITY interaction.filenames.glob.group SYSTEM "results/filenames.glob.group.lxo">
  44.149 +<!ENTITY interaction.filenames.glob.question SYSTEM "results/filenames.glob.question.lxo">
  44.150 +<!ENTITY interaction.filenames.glob.range SYSTEM "results/filenames.glob.range.lxo">
  44.151 +<!ENTITY interaction.filenames.glob.star SYSTEM "results/filenames.glob.star.lxo">
  44.152 +<!ENTITY interaction.filenames.glob.star-starstar SYSTEM "results/filenames.glob.star-starstar.lxo">
  44.153 +<!ENTITY interaction.filenames.glob.starstar SYSTEM "results/filenames.glob.starstar.lxo">
  44.154 +<!ENTITY interaction.filenames.wdir-relname SYSTEM "results/filenames.wdir-relname.lxo">
  44.155 +<!ENTITY interaction.filenames.wdir-subdir SYSTEM "results/filenames.wdir-subdir.lxo">
  44.156 +<!ENTITY interaction.hook.msglen.go SYSTEM "results/hook.msglen.go.lxo">
  44.157 +<!ENTITY interaction.hook.simple.ext SYSTEM "results/hook.simple.ext.lxo">
  44.158 +<!ENTITY interaction.hook.simple.init SYSTEM "results/hook.simple.init.lxo">
  44.159 +<!ENTITY interaction.hook.simple.pretxncommit SYSTEM "results/hook.simple.pretxncommit.lxo">
  44.160 +<!ENTITY interaction.issue29.go SYSTEM "results/issue29.go.lxo">
  44.161 +<!ENTITY interaction.mq.dodiff.diff SYSTEM "results/mq.dodiff.diff.lxo">
  44.162 +<!ENTITY interaction.mq.guards.init SYSTEM "results/mq.guards.init.lxo">
  44.163 +<!ENTITY interaction.mq.guards.qguard SYSTEM "results/mq.guards.qguard.lxo">
  44.164 +<!ENTITY interaction.mq.guards.qguard.neg SYSTEM "results/mq.guards.qguard.neg.lxo">
  44.165 +<!ENTITY interaction.mq.guards.qguard.pos SYSTEM "results/mq.guards.qguard.pos.lxo">
  44.166 +<!ENTITY interaction.mq.guards.qselect.cat SYSTEM "results/mq.guards.qselect.cat.lxo">
  44.167 +<!ENTITY interaction.mq.guards.qselect.error SYSTEM "results/mq.guards.qselect.error.lxo">
  44.168 +<!ENTITY interaction.mq.guards.qselect.foo SYSTEM "results/mq.guards.qselect.foo.lxo">
  44.169 +<!ENTITY interaction.mq.guards.qselect.foobar SYSTEM "results/mq.guards.qselect.foobar.lxo">
  44.170 +<!ENTITY interaction.mq.guards.qselect.qpush SYSTEM "results/mq.guards.qselect.qpush.lxo">
  44.171 +<!ENTITY interaction.mq.guards.qselect.quux SYSTEM "results/mq.guards.qselect.quux.lxo">
  44.172 +<!ENTITY interaction.mq.guards.series SYSTEM "results/mq.guards.series.lxo">
  44.173 +<!ENTITY interaction.mq.id.lxoput SYSTEM "results/mq.id.lxoput.lxo">
  44.174 +<!ENTITY interaction.mq.id.output SYSTEM "results/mq.id.output.lxo">
  44.175 +<!ENTITY interaction.mq.qinit-help.help SYSTEM "results/mq.qinit-help.help.lxo">
  44.176 +<!ENTITY interaction.mq.tarball.download SYSTEM "results/mq.tarball.download.lxo">
  44.177 +<!ENTITY interaction.mq.tarball.newsource SYSTEM "results/mq.tarball.newsource.lxo">
  44.178 +<!ENTITY interaction.mq.tarball.qinit SYSTEM "results/mq.tarball.qinit.lxo">
  44.179 +<!ENTITY interaction.mq.tarball.repush SYSTEM "results/mq.tarball.repush.lxo">
  44.180 +<!ENTITY interaction.mq.tools.lsdiff SYSTEM "results/mq.tools.lsdiff.lxo">
  44.181 +<!ENTITY interaction.mq.tools.tools SYSTEM "results/mq.tools.tools.lxo">
  44.182 +<!ENTITY interaction.mq.tutorial.add SYSTEM "results/mq.tutorial.add.lxo">
  44.183 +<!ENTITY interaction.mq.tutorial.qinit SYSTEM "results/mq.tutorial.qinit.lxo">
  44.184 +<!ENTITY interaction.mq.tutorial.qnew SYSTEM "results/mq.tutorial.qnew.lxo">
  44.185 +<!ENTITY interaction.mq.tutorial.qnew2 SYSTEM "results/mq.tutorial.qnew2.lxo">
  44.186 +<!ENTITY interaction.mq.tutorial.qpop SYSTEM "results/mq.tutorial.qpop.lxo">
  44.187 +<!ENTITY interaction.mq.tutorial.qpush-a SYSTEM "results/mq.tutorial.qpush-a.lxo">
  44.188 +<!ENTITY interaction.mq.tutorial.qrefresh SYSTEM "results/mq.tutorial.qrefresh.lxo">
  44.189 +<!ENTITY interaction.mq.tutorial.qrefresh2 SYSTEM "results/mq.tutorial.qrefresh2.lxo">
  44.190 +<!ENTITY interaction.mq.tutorial.qseries SYSTEM "results/mq.tutorial.qseries.lxo">
  44.191 +<!ENTITY interaction.rename.divergent.clone SYSTEM "results/rename.divergent.clone.lxo">
  44.192 +<!ENTITY interaction.rename.divergent.merge SYSTEM "results/rename.divergent.merge.lxo">
  44.193 +<!ENTITY interaction.rename.divergent.rename.anne SYSTEM "results/rename.divergent.rename.anne.lxo">
  44.194 +<!ENTITY interaction.rename.divergent.rename.bob SYSTEM "results/rename.divergent.rename.bob.lxo">
  44.195 +<!ENTITY interaction.rollback.add SYSTEM "results/rollback.add.lxo">
  44.196 +<!ENTITY interaction.rollback.commit SYSTEM "results/rollback.commit.lxo">
  44.197 +<!ENTITY interaction.rollback.rollback SYSTEM "results/rollback.rollback.lxo">
  44.198 +<!ENTITY interaction.rollback.status SYSTEM "results/rollback.status.lxo">
  44.199 +<!ENTITY interaction.rollback.tip SYSTEM "results/rollback.tip.lxo">
  44.200 +<!ENTITY interaction.rollback.twice SYSTEM "results/rollback.twice.lxo">
  44.201 +<!ENTITY interaction.tag.init SYSTEM "results/tag.init.lxo">
  44.202 +<!ENTITY interaction.tag.log SYSTEM "results/tag.log.lxo">
  44.203 +<!ENTITY interaction.tag.log.v1.0 SYSTEM "results/tag.log.v1.0.lxo">
  44.204 +<!ENTITY interaction.tag.remove SYSTEM "results/tag.remove.lxo">
  44.205 +<!ENTITY interaction.tag.replace SYSTEM "results/tag.replace.lxo">
  44.206 +<!ENTITY interaction.tag.tag SYSTEM "results/tag.tag.lxo">
  44.207 +<!ENTITY interaction.tag.tags SYSTEM "results/tag.tags.lxo">
  44.208 +<!ENTITY interaction.tag.tip SYSTEM "results/tag.tip.lxo">
  44.209 +<!ENTITY interaction.template.simple.changelog SYSTEM "results/template.simple.changelog.lxo">
  44.210 +<!ENTITY interaction.template.simple.combine SYSTEM "results/template.simple.combine.lxo">
  44.211 +<!ENTITY interaction.template.simple.compact SYSTEM "results/template.simple.compact.lxo">
  44.212 +<!ENTITY interaction.template.simple.datekeyword SYSTEM "results/template.simple.datekeyword.lxo">
  44.213 +<!ENTITY interaction.template.simple.keywords SYSTEM "results/template.simple.keywords.lxo">
  44.214 +<!ENTITY interaction.template.simple.manyfilters SYSTEM "results/template.simple.manyfilters.lxo">
  44.215 +<!ENTITY interaction.template.simple.normal SYSTEM "results/template.simple.normal.lxo">
  44.216 +<!ENTITY interaction.template.simple.rev SYSTEM "results/template.simple.rev.lxo">
  44.217 +<!ENTITY interaction.template.simple.simplest SYSTEM "results/template.simple.simplest.lxo">
  44.218 +<!ENTITY interaction.template.simple.simplesub SYSTEM "results/template.simple.simplesub.lxo">
  44.219 +<!ENTITY interaction.template.svnstyle.id SYSTEM "results/template.svnstyle.id.lxo">
  44.220 +<!ENTITY interaction.template.svnstyle.result SYSTEM "results/template.svnstyle.result.lxo">
  44.221 +<!ENTITY interaction.template.svnstyle.short SYSTEM "results/template.svnstyle.short.lxo">
  44.222 +<!ENTITY interaction.template.svnstyle.simplest SYSTEM "results/template.svnstyle.simplest.lxo">
  44.223 +<!ENTITY interaction.template.svnstyle.style SYSTEM "results/template.svnstyle.style.lxo">
  44.224 +<!ENTITY interaction.template.svnstyle.syntax.error SYSTEM "results/template.svnstyle.syntax.error.lxo">
  44.225 +<!ENTITY interaction.template.svnstyle.syntax.input SYSTEM "results/template.svnstyle.syntax.input.lxo">
  44.226 +<!ENTITY interaction.template.svnstyle.template SYSTEM "results/template.svnstyle.template.lxo">
  44.227 +<!ENTITY interaction.tour-merge-conflict.commit SYSTEM "results/tour-merge-conflict.commit.lxo">
  44.228 +<!ENTITY interaction.tour-merge-conflict.cousin SYSTEM "results/tour-merge-conflict.cousin.lxo">
  44.229 +<!ENTITY interaction.tour-merge-conflict.merge SYSTEM "results/tour-merge-conflict.merge.lxo">
  44.230 +<!ENTITY interaction.tour-merge-conflict.pull SYSTEM "results/tour-merge-conflict.pull.lxo">
  44.231 +<!ENTITY interaction.tour-merge-conflict.son SYSTEM "results/tour-merge-conflict.son.lxo">
  44.232 +<!ENTITY interaction.tour-merge-conflict.wife SYSTEM "results/tour-merge-conflict.wife.lxo">
  44.233 +<!ENTITY interaction.tour.cat1 SYSTEM "results/tour.cat1.lxo">
  44.234 +<!ENTITY interaction.tour.cat2 SYSTEM "results/tour.cat2.lxo">
  44.235 +<!ENTITY interaction.tour.clone SYSTEM "results/tour.clone.lxo">
  44.236 +<!ENTITY interaction.tour.clone-pull SYSTEM "results/tour.clone-pull.lxo">
  44.237 +<!ENTITY interaction.tour.clone-push SYSTEM "results/tour.clone-push.lxo">
  44.238 +<!ENTITY interaction.tour.commit SYSTEM "results/tour.commit.lxo">
  44.239 +<!ENTITY interaction.tour.diff SYSTEM "results/tour.diff.lxo">
  44.240 +<!ENTITY interaction.tour.help SYSTEM "results/tour.help.lxo">
  44.241 +<!ENTITY interaction.tour.incoming SYSTEM "results/tour.incoming.lxo">
  44.242 +<!ENTITY interaction.tour.log SYSTEM "results/tour.log.lxo">
  44.243 +<!ENTITY interaction.tour.log-r SYSTEM "results/tour.log-r.lxo">
  44.244 +<!ENTITY interaction.tour.log-v SYSTEM "results/tour.log-v.lxo">
  44.245 +<!ENTITY interaction.tour.log-vp SYSTEM "results/tour.log-vp.lxo">
  44.246 +<!ENTITY interaction.tour.log.range SYSTEM "results/tour.log.range.lxo">
  44.247 +<!ENTITY interaction.tour.ls SYSTEM "results/tour.ls.lxo">
  44.248 +<!ENTITY interaction.tour.ls-a SYSTEM "results/tour.ls-a.lxo">
  44.249 +<!ENTITY interaction.tour.lxogoing SYSTEM "results/tour.lxogoing.lxo">
  44.250 +<!ENTITY interaction.tour.lxogoing.net SYSTEM "results/tour.lxogoing.net.lxo">
  44.251 +<!ENTITY interaction.tour.merge.cat SYSTEM "results/tour.merge.cat.lxo">
  44.252 +<!ENTITY interaction.tour.merge.cat1 SYSTEM "results/tour.merge.cat1.lxo">
  44.253 +<!ENTITY interaction.tour.merge.cat2 SYSTEM "results/tour.merge.cat2.lxo">
  44.254 +<!ENTITY interaction.tour.merge.clone SYSTEM "results/tour.merge.clone.lxo">
  44.255 +<!ENTITY interaction.tour.merge.commit SYSTEM "results/tour.merge.commit.lxo">
  44.256 +<!ENTITY interaction.tour.merge.dummy1 SYSTEM "results/tour.merge.dummy1.lxo">
  44.257 +<!ENTITY interaction.tour.merge.dummy2 SYSTEM "results/tour.merge.dummy2.lxo">
  44.258 +<!ENTITY interaction.tour.merge.dummy3 SYSTEM "results/tour.merge.dummy3.lxo">
  44.259 +<!ENTITY interaction.tour.merge.dummy4 SYSTEM "results/tour.merge.dummy4.lxo">
  44.260 +<!ENTITY interaction.tour.merge.heads SYSTEM "results/tour.merge.heads.lxo">
  44.261 +<!ENTITY interaction.tour.merge.merge SYSTEM "results/tour.merge.merge.lxo">
  44.262 +<!ENTITY interaction.tour.merge.parents SYSTEM "results/tour.merge.parents.lxo">
  44.263 +<!ENTITY interaction.tour.merge.pull SYSTEM "results/tour.merge.pull.lxo">
  44.264 +<!ENTITY interaction.tour.merge.tip SYSTEM "results/tour.merge.tip.lxo">
  44.265 +<!ENTITY interaction.tour.merge.update SYSTEM "results/tour.merge.update.lxo">
  44.266 +<!ENTITY interaction.tour.older SYSTEM "results/tour.older.lxo">
  44.267 +<!ENTITY interaction.tour.outgoing SYSTEM "results/tour.outgoing.lxo">
  44.268 +<!ENTITY interaction.tour.outgoing.net SYSTEM "results/tour.outgoing.net.lxo">
  44.269 +<!ENTITY interaction.tour.parents SYSTEM "results/tour.parents.lxo">
  44.270 +<!ENTITY interaction.tour.pull SYSTEM "results/tour.pull.lxo">
  44.271 +<!ENTITY interaction.tour.push SYSTEM "results/tour.push.lxo">
  44.272 +<!ENTITY interaction.tour.push.net SYSTEM "results/tour.push.net.lxo">
  44.273 +<!ENTITY interaction.tour.push.nothing SYSTEM "results/tour.push.nothing.lxo">
  44.274 +<!ENTITY interaction.tour.reclone SYSTEM "results/tour.reclone.lxo">
  44.275 +<!ENTITY interaction.tour.sed SYSTEM "results/tour.sed.lxo">
  44.276 +<!ENTITY interaction.tour.status SYSTEM "results/tour.status.lxo">
  44.277 +<!ENTITY interaction.tour.tip SYSTEM "results/tour.tip.lxo">
  44.278 +<!ENTITY interaction.tour.update SYSTEM "results/tour.update.lxo">
  44.279 +<!ENTITY interaction.tour.version SYSTEM "results/tour.version.lxo">
    45.1 --- a/en/examples/backout	Thu Mar 26 08:57:10 2009 +0100
    45.2 +++ b/en/examples/backout	Sun Aug 16 03:41:39 2009 +0200
    45.3 @@ -68,6 +68,10 @@
    45.4  
    45.5  hg heads
    45.6  
    45.7 +#$ name:
    45.8 +
    45.9 +echo 'first change' > myfile
   45.10 +
   45.11  #$ name: manual.cat
   45.12  
   45.13  cat myfile
    46.1 --- a/en/examples/backout.init.out	Thu Mar 26 08:57:10 2009 +0100
    46.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    46.3 @@ -1,7 +0,0 @@
    46.4 -$ \textbf{hg init myrepo}
    46.5 -$ \textbf{cd myrepo}
    46.6 -$ \textbf{echo first change >> myfile}
    46.7 -$ \textbf{hg add myfile}
    46.8 -$ \textbf{hg commit -m 'first change'}
    46.9 -$ \textbf{echo second change >> myfile}
   46.10 -$ \textbf{hg commit -m 'second change'}
    47.1 --- a/en/examples/backout.manual.backout.out	Thu Mar 26 08:57:10 2009 +0100
    47.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    47.3 @@ -1,8 +0,0 @@
    47.4 -$ \textbf{echo third change >> myfile}
    47.5 -$ \textbf{hg commit -m 'third change'}
    47.6 -$ \textbf{hg backout -m 'back out second change' 1}
    47.7 -reverting myfile
    47.8 -created new head
    47.9 -changeset  backs out changeset 
   47.10 -the backout changeset is a new head - do not forget to merge
   47.11 -(use "backout --merge" if you want to auto-merge)
    48.1 --- a/en/examples/backout.manual.cat.out	Thu Mar 26 08:57:10 2009 +0100
    48.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    48.3 @@ -1,4 +0,0 @@
    48.4 -$ \textbf{cat myfile}
    48.5 -first change
    48.6 -second change
    48.7 -third change
    49.1 --- a/en/examples/backout.manual.clone.out	Thu Mar 26 08:57:10 2009 +0100
    49.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    49.3 @@ -1,10 +0,0 @@
    49.4 -$ \textbf{cd ..}
    49.5 -$ \textbf{hg clone -r1 myrepo newrepo}
    49.6 -requesting all changes
    49.7 -adding changesets
    49.8 -adding manifests
    49.9 -adding file changes
   49.10 -added 2 changesets with 2 changes to 1 files
   49.11 -updating working directory
   49.12 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   49.13 -$ \textbf{cd newrepo}
    50.1 --- a/en/examples/backout.manual.heads.out	Thu Mar 26 08:57:10 2009 +0100
    50.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    50.3 @@ -1,13 +0,0 @@
    50.4 -$ \textbf{hg heads}
    50.5 -changeset:   
    50.6 -tag:         tip
    50.7 -parent:      
    50.8 -user:        Bryan O'Sullivan <bos@serpentine.com>
    50.9 -
   50.10 -summary:     back out second change
   50.11 -
   50.12 -changeset:   
   50.13 -user:        Bryan O'Sullivan <bos@serpentine.com>
   50.14 -
   50.15 -summary:     third change
   50.16 -
    51.1 --- a/en/examples/backout.manual.log.out	Thu Mar 26 08:57:10 2009 +0100
    51.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    51.3 @@ -1,13 +0,0 @@
    51.4 -$ \textbf{hg log --style compact}
    51.5 -3[tip]:1   
    51.6 -  back out second change
    51.7 -
    51.8 -2   
    51.9 -  third change
   51.10 -
   51.11 -1   
   51.12 -  second change
   51.13 -
   51.14 -0   
   51.15 -  first change
   51.16 -
    52.1 --- a/en/examples/backout.manual.merge.out	Thu Mar 26 08:57:10 2009 +0100
    52.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    52.3 @@ -1,8 +0,0 @@
    52.4 -$ \textbf{hg merge}
    52.5 -merging myfile
    52.6 -0 files updated, 1 files merged, 0 files removed, 0 files unresolved
    52.7 -(branch merge, don't forget to commit)
    52.8 -$ \textbf{hg commit -m 'merged backout with previous tip'}
    52.9 -$ \textbf{cat myfile}
   52.10 -first change
   52.11 -third change
    53.1 --- a/en/examples/backout.manual.parents.out	Thu Mar 26 08:57:10 2009 +0100
    53.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    53.3 @@ -1,6 +0,0 @@
    53.4 -$ \textbf{hg parents}
    53.5 -changeset:   
    53.6 -user:        Bryan O'Sullivan <bos@serpentine.com>
    53.7 -
    53.8 -summary:     third change
    53.9 -
    54.1 --- a/en/examples/backout.non-tip.backout.out	Thu Mar 26 08:57:10 2009 +0100
    54.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    54.3 @@ -1,10 +0,0 @@
    54.4 -$ \textbf{echo third change >> myfile}
    54.5 -$ \textbf{hg commit -m 'third change'}
    54.6 -$ \textbf{hg backout --merge -m 'back out second change' 1}
    54.7 -reverting myfile
    54.8 -created new head
    54.9 -changeset  backs out changeset 
   54.10 -merging with changeset 
   54.11 -merging myfile
   54.12 -0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   54.13 -(branch merge, don't forget to commit)
    55.1 --- a/en/examples/backout.non-tip.cat.out	Thu Mar 26 08:57:10 2009 +0100
    55.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    55.3 @@ -1,3 +0,0 @@
    55.4 -$ \textbf{cat myfile}
    55.5 -first change
    55.6 -third change
    56.1 --- a/en/examples/backout.non-tip.clone.out	Thu Mar 26 08:57:10 2009 +0100
    56.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    56.3 @@ -1,10 +0,0 @@
    56.4 -$ \textbf{cd ..}
    56.5 -$ \textbf{hg clone -r1 myrepo non-tip-repo}
    56.6 -requesting all changes
    56.7 -adding changesets
    56.8 -adding manifests
    56.9 -adding file changes
   56.10 -added 2 changesets with 2 changes to 1 files
   56.11 -updating working directory
   56.12 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   56.13 -$ \textbf{cd non-tip-repo}
    57.1 --- a/en/examples/backout.simple.log.out	Thu Mar 26 08:57:10 2009 +0100
    57.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    57.3 @@ -1,10 +0,0 @@
    57.4 -$ \textbf{hg log --style compact}
    57.5 -2[tip]   
    57.6 -  back out second change
    57.7 -
    57.8 -1   
    57.9 -  second change
   57.10 -
   57.11 -0   
   57.12 -  first change
   57.13 -
    58.1 --- a/en/examples/backout.simple.out	Thu Mar 26 08:57:10 2009 +0100
    58.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    58.3 @@ -1,5 +0,0 @@
    58.4 -$ \textbf{hg backout -m 'back out second change' tip}
    58.5 -reverting myfile
    58.6 -changeset  backs out changeset 
    58.7 -$ \textbf{cat myfile}
    58.8 -first change
    59.1 --- a/en/examples/bisect	Thu Mar 26 08:57:10 2009 +0100
    59.2 +++ b/en/examples/bisect	Sun Aug 16 03:41:39 2009 +0200
    59.3 @@ -37,15 +37,15 @@
    59.4  
    59.5  #$ name: search.init
    59.6  
    59.7 -hg bisect init
    59.8 +hg bisect --reset
    59.9  
   59.10  #$ name: search.bad-init
   59.11  
   59.12 -hg bisect bad
   59.13 +hg bisect --bad
   59.14  
   59.15  #$ name: search.good-init
   59.16  
   59.17 -hg bisect good 10
   59.18 +hg bisect --good 10
   59.19  
   59.20  #$ name: search.step1
   59.21  
   59.22 @@ -70,7 +70,7 @@
   59.23    fi
   59.24  
   59.25    echo this revision is $result
   59.26 -  hg bisect $result
   59.27 +  hg bisect --$result
   59.28  }
   59.29    
   59.30  #$ name: search.step2
   59.31 @@ -85,7 +85,7 @@
   59.32  
   59.33  #$ name: search.reset
   59.34  
   59.35 -hg bisect reset
   59.36 +hg bisect --reset
   59.37  
   59.38  #$ name:
   59.39  
    60.1 --- a/en/examples/bisect.commits.out	Thu Mar 26 08:57:10 2009 +0100
    60.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    60.3 @@ -1,10 +0,0 @@
    60.4 -
    60.5 -
    60.6 -
    60.7 -
    60.8 -
    60.9 -
   60.10 -
   60.11 -
   60.12 -
   60.13 -
    61.1 --- a/en/examples/bisect.help.out	Thu Mar 26 08:57:10 2009 +0100
    61.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    61.3 @@ -1,23 +0,0 @@
    61.4 -
    61.5 -
    61.6 -
    61.7 -
    61.8 -
    61.9 -
   61.10 -
   61.11 -
   61.12 -
   61.13 -
   61.14 -
   61.15 -
   61.16 -
   61.17 -
   61.18 -
   61.19 -
   61.20 -
   61.21 -
   61.22 -
   61.23 -
   61.24 -
   61.25 -
   61.26 -
    62.1 --- a/en/examples/bisect.init.out	Thu Mar 26 08:57:10 2009 +0100
    62.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    62.3 @@ -1,2 +0,0 @@
    62.4 -
    62.5 -
    63.1 --- a/en/examples/bisect.search.bad-init.out	Thu Mar 26 08:57:10 2009 +0100
    63.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    63.3 @@ -1,1 +0,0 @@
    63.4 -
    64.1 --- a/en/examples/bisect.search.good-init.out	Thu Mar 26 08:57:10 2009 +0100
    64.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    64.3 @@ -1,3 +0,0 @@
    64.4 -
    64.5 -
    64.6 -
    65.1 --- a/en/examples/bisect.search.init.out	Thu Mar 26 08:57:10 2009 +0100
    65.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    65.3 @@ -1,5 +0,0 @@
    65.4 -
    65.5 -
    65.6 -
    65.7 -
    65.8 -
    66.1 --- a/en/examples/bisect.search.mytest.out	Thu Mar 26 08:57:10 2009 +0100
    66.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    66.3 @@ -1,10 +0,0 @@
    66.4 -
    66.5 -
    66.6 -
    66.7 -
    66.8 -
    66.9 -
   66.10 -
   66.11 -
   66.12 -
   66.13 -
    67.1 --- a/en/examples/bisect.search.reset.out	Thu Mar 26 08:57:10 2009 +0100
    67.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    67.3 @@ -1,1 +0,0 @@
    67.4 -
    68.1 --- a/en/examples/bisect.search.rest.out	Thu Mar 26 08:57:10 2009 +0100
    68.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    68.3 @@ -1,16 +0,0 @@
    68.4 -
    68.5 -
    68.6 -
    68.7 -
    68.8 -
    68.9 -
   68.10 -
   68.11 -
   68.12 -
   68.13 -
   68.14 -
   68.15 -
   68.16 -
   68.17 -
   68.18 -
   68.19 -
    69.1 --- a/en/examples/bisect.search.step1.out	Thu Mar 26 08:57:10 2009 +0100
    69.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    69.3 @@ -1,11 +0,0 @@
    69.4 -
    69.5 -
    69.6 -
    69.7 -
    69.8 -
    69.9 -
   69.10 -
   69.11 -
   69.12 -
   69.13 -
   69.14 -
    70.1 --- a/en/examples/bisect.search.step2.out	Thu Mar 26 08:57:10 2009 +0100
    70.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    70.3 @@ -1,4 +0,0 @@
    70.4 -
    70.5 -
    70.6 -
    70.7 -
    71.1 --- a/en/examples/branch-named.branch.out	Thu Mar 26 08:57:10 2009 +0100
    71.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    71.3 @@ -1,2 +0,0 @@
    71.4 -$ \textbf{hg branch}
    71.5 -default
    72.1 --- a/en/examples/branch-named.branches.out	Thu Mar 26 08:57:10 2009 +0100
    72.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    72.3 @@ -1,9 +0,0 @@
    72.4 -$ \textbf{hg tip}
    72.5 -changeset:   
    72.6 -tag:         tip
    72.7 -user:        Bryan O'Sullivan <bos@serpentine.com>
    72.8 -
    72.9 -summary:     Initial commit
   72.10 -
   72.11 -$ \textbf{hg branches}
   72.12 -default                        
    73.1 --- a/en/examples/branch-named.commit.out	Thu Mar 26 08:57:10 2009 +0100
    73.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    73.3 @@ -1,10 +0,0 @@
    73.4 -$ \textbf{echo 'hello again' >> myfile}
    73.5 -$ \textbf{hg commit -m 'Second commit'}
    73.6 -$ \textbf{hg tip}
    73.7 -changeset:   
    73.8 -branch:      foo
    73.9 -tag:         tip
   73.10 -user:        Bryan O'Sullivan <bos@serpentine.com>
   73.11 -
   73.12 -summary:     Second commit
   73.13 -
    74.1 --- a/en/examples/branch-named.create.out	Thu Mar 26 08:57:10 2009 +0100
    74.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    74.3 @@ -1,4 +0,0 @@
    74.4 -$ \textbf{hg branch foo}
    74.5 -marked working directory as branch foo
    74.6 -$ \textbf{hg branch}
    74.7 -foo
    75.1 --- a/en/examples/branch-named.foo-commit.out	Thu Mar 26 08:57:10 2009 +0100
    75.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    75.3 @@ -1,19 +0,0 @@
    75.4 -$ \textbf{echo something > somefile}
    75.5 -$ \textbf{hg commit -A -m 'New file'}
    75.6 -adding somefile
    75.7 -created new head
    75.8 -$ \textbf{hg heads}
    75.9 -changeset:   
   75.10 -branch:      foo
   75.11 -tag:         tip
   75.12 -parent:      
   75.13 -user:        Bryan O'Sullivan <bos@serpentine.com>
   75.14 -
   75.15 -summary:     New file
   75.16 -
   75.17 -changeset:   
   75.18 -branch:      bar
   75.19 -user:        Bryan O'Sullivan <bos@serpentine.com>
   75.20 -
   75.21 -summary:     Third commit
   75.22 -
    76.1 --- a/en/examples/branch-named.merge.out	Thu Mar 26 08:57:10 2009 +0100
    76.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    76.3 @@ -1,16 +0,0 @@
    76.4 -$ \textbf{hg branch}
    76.5 -bar
    76.6 -$ \textbf{hg merge foo}
    76.7 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    76.8 -(branch merge, don't forget to commit)
    76.9 -$ \textbf{hg commit -m 'Merge'}
   76.10 -$ \textbf{hg tip}
   76.11 -changeset:   
   76.12 -branch:      bar
   76.13 -tag:         tip
   76.14 -parent:      
   76.15 -parent:      
   76.16 -user:        Bryan O'Sullivan <bos@serpentine.com>
   76.17 -
   76.18 -summary:     Merge
   76.19 -
    77.1 --- a/en/examples/branch-named.parents.out	Thu Mar 26 08:57:10 2009 +0100
    77.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    77.3 @@ -1,12 +0,0 @@
    77.4 -$ \textbf{hg parents}
    77.5 -changeset:   
    77.6 -branch:      bar
    77.7 -tag:         tip
    77.8 -user:        Bryan O'Sullivan <bos@serpentine.com>
    77.9 -
   77.10 -summary:     Third commit
   77.11 -
   77.12 -$ \textbf{hg branches}
   77.13 -bar                            
   77.14 -foo                             (inactive)
   77.15 -default                         (inactive)
    78.1 --- a/en/examples/branch-named.rebranch.out	Thu Mar 26 08:57:10 2009 +0100
    78.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    78.3 @@ -1,15 +0,0 @@
    78.4 -$ \textbf{hg branch}
    78.5 -foo
    78.6 -$ \textbf{hg branch bar}
    78.7 -marked working directory as branch bar
    78.8 -$ \textbf{echo new file > newfile}
    78.9 -$ \textbf{hg commit -A -m 'Third commit'}
   78.10 -adding newfile
   78.11 -$ \textbf{hg tip}
   78.12 -changeset:   
   78.13 -branch:      bar
   78.14 -tag:         tip
   78.15 -user:        Bryan O'Sullivan <bos@serpentine.com>
   78.16 -
   78.17 -summary:     Third commit
   78.18 -
    79.1 --- a/en/examples/branch-named.status.out	Thu Mar 26 08:57:10 2009 +0100
    79.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    79.3 @@ -1,8 +0,0 @@
    79.4 -$ \textbf{hg status}
    79.5 -$ \textbf{hg tip}
    79.6 -changeset:   
    79.7 -tag:         tip
    79.8 -user:        Bryan O'Sullivan <bos@serpentine.com>
    79.9 -
   79.10 -summary:     Initial commit
   79.11 -
    80.1 --- a/en/examples/branch-named.update-bar.out	Thu Mar 26 08:57:10 2009 +0100
    80.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    80.3 @@ -1,2 +0,0 @@
    80.4 -$ \textbf{hg update bar}
    80.5 -1 files updated, 0 files merged, 1 files removed, 0 files unresolved
    81.1 --- a/en/examples/branch-named.update-foo.out	Thu Mar 26 08:57:10 2009 +0100
    81.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    81.3 @@ -1,13 +0,0 @@
    81.4 -$ \textbf{hg update foo}
    81.5 -0 files updated, 0 files merged, 1 files removed, 0 files unresolved
    81.6 -$ \textbf{hg update}
    81.7 -0 files updated, 0 files merged, 0 files removed, 0 files unresolved
    81.8 -$ \textbf{hg parents}
    81.9 -changeset:   
   81.10 -branch:      foo
   81.11 -user:        Bryan O'Sullivan <bos@serpentine.com>
   81.12 -
   81.13 -summary:     Second commit
   81.14 -
   81.15 -$ \textbf{hg update bar}
   81.16 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    82.1 --- a/en/examples/branch-named.update-nothing.out	Thu Mar 26 08:57:10 2009 +0100
    82.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    82.3 @@ -1,4 +0,0 @@
    82.4 -$ \textbf{hg update foo}
    82.5 -0 files updated, 0 files merged, 1 files removed, 0 files unresolved
    82.6 -$ \textbf{hg update}
    82.7 -0 files updated, 0 files merged, 0 files removed, 0 files unresolved
    83.1 --- a/en/examples/branch-named.update-switchy.out	Thu Mar 26 08:57:10 2009 +0100
    83.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    83.3 @@ -1,19 +0,0 @@
    83.4 -$ \textbf{hg update foo}
    83.5 -0 files updated, 0 files merged, 1 files removed, 0 files unresolved
    83.6 -$ \textbf{hg parents}
    83.7 -changeset:   
    83.8 -branch:      foo
    83.9 -user:        Bryan O'Sullivan <bos@serpentine.com>
   83.10 -
   83.11 -summary:     Second commit
   83.12 -
   83.13 -$ \textbf{hg update bar}
   83.14 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   83.15 -$ \textbf{hg parents}
   83.16 -changeset:   
   83.17 -branch:      bar
   83.18 -tag:         tip
   83.19 -user:        Bryan O'Sullivan <bos@serpentine.com>
   83.20 -
   83.21 -summary:     Third commit
   83.22 -
    84.1 --- a/en/examples/branch-named.update.out	Thu Mar 26 08:57:10 2009 +0100
    84.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    84.3 @@ -1,13 +0,0 @@
    84.4 -$ \textbf{hg update foo}
    84.5 -0 files updated, 0 files merged, 1 files removed, 0 files unresolved
    84.6 -$ \textbf{hg update}
    84.7 -0 files updated, 0 files merged, 0 files removed, 0 files unresolved
    84.8 -$ \textbf{hg parent}
    84.9 -changeset:   
   84.10 -branch:      foo
   84.11 -user:        Bryan O'Sullivan <bos@serpentine.com>
   84.12 -
   84.13 -summary:     Second commit
   84.14 -
   84.15 -$ \textbf{hg update bar}
   84.16 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    85.1 --- a/en/examples/branch-repo.bugfix.out	Thu Mar 26 08:57:10 2009 +0100
    85.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    85.3 @@ -1,13 +0,0 @@
    85.4 -$ \textbf{hg clone myproject-1.0.1 my-1.0.1-bugfix}
    85.5 -updating working directory
    85.6 -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
    85.7 -$ \textbf{cd my-1.0.1-bugfix}
    85.8 -$ \textbf{echo 'I fixed a bug using only echo!' >> myfile}
    85.9 -$ \textbf{hg commit -m 'Important fix for 1.0.1'}
   85.10 -$ \textbf{hg push}
   85.11 -pushing to 
   85.12 -searching for changes
   85.13 -adding changesets
   85.14 -adding manifests
   85.15 -adding file changes
   85.16 -added 1 changesets with 1 changes to 1 files
    86.1 --- a/en/examples/branch-repo.clone.out	Thu Mar 26 08:57:10 2009 +0100
    86.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    86.3 @@ -1,4 +0,0 @@
    86.4 -$ \textbf{cd ..}
    86.5 -$ \textbf{hg clone myproject myproject-1.0.1}
    86.6 -updating working directory
    86.7 -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
    87.1 --- a/en/examples/branch-repo.merge.out	Thu Mar 26 08:57:10 2009 +0100
    87.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    87.3 @@ -1,11 +0,0 @@
    87.4 -$ \textbf{hg merge}
    87.5 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    87.6 -(branch merge, don't forget to commit)
    87.7 -$ \textbf{hg commit -m 'Merge bugfix from 1.0.1 branch'}
    87.8 -$ \textbf{hg push}
    87.9 -pushing to 
   87.10 -searching for changes
   87.11 -adding changesets
   87.12 -adding manifests
   87.13 -adding file changes
   87.14 -added 2 changesets with 1 changes to 1 files
    88.1 --- a/en/examples/branch-repo.new.out	Thu Mar 26 08:57:10 2009 +0100
    88.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    88.3 @@ -1,15 +0,0 @@
    88.4 -$ \textbf{cd ..}
    88.5 -$ \textbf{hg clone myproject my-feature}
    88.6 -updating working directory
    88.7 -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
    88.8 -$ \textbf{cd my-feature}
    88.9 -$ \textbf{echo 'This sure is an exciting new feature!' > mynewfile}
   88.10 -$ \textbf{hg commit -A -m 'New feature'}
   88.11 -adding mynewfile
   88.12 -$ \textbf{hg push}
   88.13 -pushing to 
   88.14 -searching for changes
   88.15 -adding changesets
   88.16 -adding manifests
   88.17 -adding file changes
   88.18 -added 1 changesets with 1 changes to 1 files
    89.1 --- a/en/examples/branch-repo.pull.out	Thu Mar 26 08:57:10 2009 +0100
    89.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    89.3 @@ -1,13 +0,0 @@
    89.4 -$ \textbf{cd ..}
    89.5 -$ \textbf{hg clone myproject myproject-merge}
    89.6 -updating working directory
    89.7 -3 files updated, 0 files merged, 0 files removed, 0 files unresolved
    89.8 -$ \textbf{cd myproject-merge}
    89.9 -$ \textbf{hg pull ../myproject-1.0.1}
   89.10 -pulling from ../myproject-1.0.1
   89.11 -searching for changes
   89.12 -adding changesets
   89.13 -adding manifests
   89.14 -adding file changes
   89.15 -added 1 changesets with 1 changes to 1 files (+1 heads)
   89.16 -(run 'hg heads' to see heads, 'hg merge' to merge)
    90.1 --- a/en/examples/branch-repo.tag.out	Thu Mar 26 08:57:10 2009 +0100
    90.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    90.3 @@ -1,2 +0,0 @@
    90.4 -$ \textbf{cd myproject}
    90.5 -$ \textbf{hg tag v1.0}
    91.1 --- a/en/examples/branching.clone.out	Thu Mar 26 08:57:10 2009 +0100
    91.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    91.3 @@ -1,9 +0,0 @@
    91.4 -$ \textbf{cd ..}
    91.5 -$ \textbf{hg clone -rv1.0 main stable}
    91.6 -requesting all changes
    91.7 -adding changesets
    91.8 -adding manifests
    91.9 -adding file changes
   91.10 -added 1 changesets with 1 changes to 1 files
   91.11 -updating working directory
   91.12 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    92.1 --- a/en/examples/branching.init.out	Thu Mar 26 08:57:10 2009 +0100
    92.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    92.3 @@ -1,5 +0,0 @@
    92.4 -$ \textbf{hg init main}
    92.5 -$ \textbf{cd main}
    92.6 -$ \textbf{echo 'This is a boring feature.' > myfile}
    92.7 -$ \textbf{hg commit -A -m 'We have reached an important milestone!'}
    92.8 -adding myfile
    93.1 --- a/en/examples/branching.main.out	Thu Mar 26 08:57:10 2009 +0100
    93.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    93.3 @@ -1,6 +0,0 @@
    93.4 -$ \textbf{cd ../main}
    93.5 -$ \textbf{echo 'This is exciting and new!' >> myfile}
    93.6 -$ \textbf{hg commit -m 'Add a new feature'}
    93.7 -$ \textbf{cat myfile}
    93.8 -This is a boring feature.
    93.9 -This is exciting and new!
    94.1 --- a/en/examples/branching.merge.out	Thu Mar 26 08:57:10 2009 +0100
    94.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    94.3 @@ -1,17 +0,0 @@
    94.4 -$ \textbf{cd ../main}
    94.5 -$ \textbf{hg pull ../stable}
    94.6 -pulling from ../stable
    94.7 -searching for changes
    94.8 -adding changesets
    94.9 -adding manifests
   94.10 -adding file changes
   94.11 -added 1 changesets with 1 changes to 1 files (+1 heads)
   94.12 -(run 'hg heads' to see heads, 'hg merge' to merge)
   94.13 -$ \textbf{hg merge}
   94.14 -merging myfile
   94.15 -0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   94.16 -(branch merge, don't forget to commit)
   94.17 -$ \textbf{hg commit -m 'Bring in bugfix from stable branch'}
   94.18 -$ \textbf{cat myfile}
   94.19 -This is a fix to a boring feature.
   94.20 -This is exciting and new!
    95.1 --- a/en/examples/branching.stable.out	Thu Mar 26 08:57:10 2009 +0100
    95.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    95.3 @@ -1,13 +0,0 @@
    95.4 -$ \textbf{hg clone stable stable-fix}
    95.5 -updating working directory
    95.6 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    95.7 -$ \textbf{cd stable-fix}
    95.8 -$ \textbf{echo 'This is a fix to a boring feature.' > myfile}
    95.9 -$ \textbf{hg commit -m 'Fix a bug'}
   95.10 -$ \textbf{hg push}
   95.11 -pushing to 
   95.12 -searching for changes
   95.13 -adding changesets
   95.14 -adding manifests
   95.15 -adding file changes
   95.16 -added 1 changesets with 1 changes to 1 files
    96.1 --- a/en/examples/branching.tag.out	Thu Mar 26 08:57:10 2009 +0100
    96.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    96.3 @@ -1,11 +0,0 @@
    96.4 -$ \textbf{hg tag v1.0}
    96.5 -$ \textbf{hg tip}
    96.6 -changeset:   
    96.7 -tag:         tip
    96.8 -user:        Bryan O'Sullivan <bos@serpentine.com>
    96.9 -
   96.10 -summary:     Added tag v1.0 for changeset 
   96.11 -
   96.12 -$ \textbf{hg tags}
   96.13 -tip                                
   96.14 -v1.0                               
    97.1 --- a/en/examples/branching.update.out	Thu Mar 26 08:57:10 2009 +0100
    97.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    97.3 @@ -1,7 +0,0 @@
    97.4 -$ \textbf{cd ..}
    97.5 -$ \textbf{hg clone -U main main-old}
    97.6 -$ \textbf{cd main-old}
    97.7 -$ \textbf{hg update v1.0}
    97.8 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    97.9 -$ \textbf{cat myfile}
   97.10 -This is a boring feature.
    98.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    98.2 +++ b/en/examples/ch01/new	Sun Aug 16 03:41:39 2009 +0200
    98.3 @@ -0,0 +1,39 @@
    98.4 +#!/bin/bash
    98.5 +
    98.6 +cat > hello.c <<EOF
    98.7 +int main()
    98.8 +{
    98.9 +    printf("hello world!\n");
   98.10 +}
   98.11 +EOF
   98.12 +
   98.13 +cat > goodbye.c <<EOF
   98.14 +int main()
   98.15 +{
   98.16 +    printf("goodbye world!\n");
   98.17 +}
   98.18 +EOF
   98.19 +
   98.20 +#$ name: init
   98.21 +
   98.22 +hg init myproject
   98.23 +
   98.24 +#$ name: ls
   98.25 +
   98.26 +ls -l
   98.27 +
   98.28 +#$ name: ls2
   98.29 +
   98.30 +ls -al myproject
   98.31 +
   98.32 +#$ name: add
   98.33 +
   98.34 +cd myproject
   98.35 +cp ../hello.c .
   98.36 +cp ../goodbye.c .
   98.37 +hg add
   98.38 +hg status
   98.39 +
   98.40 +#$ name: commit
   98.41 +
   98.42 +hg commit -m 'Initial commit'
    99.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    99.2 +++ b/en/examples/ch04/diff	Sun Aug 16 03:41:39 2009 +0200
    99.3 @@ -0,0 +1,30 @@
    99.4 +#!/bin/bash
    99.5 +
    99.6 +hg init a
    99.7 +cd a
    99.8 +echo a > a
    99.9 +hg ci -Ama
   99.10 +
   99.11 +#$ name: rename.basic
   99.12 +
   99.13 +hg rename a b
   99.14 +hg diff
   99.15 +
   99.16 +#$ name: rename.git
   99.17 +
   99.18 +hg diff -g
   99.19 +
   99.20 +#$ name:
   99.21 +
   99.22 +hg revert -a
   99.23 +rm b
   99.24 +
   99.25 +#$ name: chmod
   99.26 +
   99.27 +chmod +x a
   99.28 +hg st
   99.29 +hg diff
   99.30 +
   99.31 +#$ name: chmod.git
   99.32 +
   99.33 +hg diff -g
   100.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   100.2 +++ b/en/examples/ch04/resolve	Sun Aug 16 03:41:39 2009 +0200
   100.3 @@ -0,0 +1,38 @@
   100.4 +#$ name: init
   100.5 +hg init conflict
   100.6 +cd conflict
   100.7 +echo first > myfile.txt
   100.8 +hg ci -A -m first
   100.9 +cd ..
  100.10 +hg clone conflict left
  100.11 +hg clone conflict right
  100.12 +
  100.13 +#$ name: left
  100.14 +cd left
  100.15 +echo left >> myfile.txt
  100.16 +hg ci -m left
  100.17 +
  100.18 +#$ name: right
  100.19 +cd ../right
  100.20 +echo right >> myfile.txt
  100.21 +hg ci -m right
  100.22 +
  100.23 +#$ name: pull
  100.24 +cd ../conflict
  100.25 +hg pull -u ../left
  100.26 +hg pull -u ../right
  100.27 +
  100.28 +#$ name: heads
  100.29 +hg heads
  100.30 +
  100.31 +#$ name: export
  100.32 +export HGMERGE=false
  100.33 +
  100.34 +#$ name: merge
  100.35 +hg merge
  100.36 +
  100.37 +#$ name: cifail
  100.38 +hg commit -m 'Attempt to commit a failed merge'
  100.39 +
  100.40 +#$ name: list
  100.41 +hg resolve -l
   101.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   101.2 +++ b/en/examples/ch06/apache-config.lst	Sun Aug 16 03:41:39 2009 +0200
   101.3 @@ -0,0 +1,11 @@
   101.4 +<Directory /home/*/public_html>
   101.5 +  AllowOverride FileInfo AuthConfig Limit
   101.6 +  Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
   101.7 +  <Limit GET POST OPTIONS>
   101.8 +    Order allow,deny
   101.9 +    Allow from all
  101.10 +  </Limit>
  101.11 +  <LimitExcept GET POST OPTIONS>
  101.12 +    Order deny,allow Deny from all
  101.13 +  </LimitExcept>
  101.14 +</Directory>
   102.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   102.2 +++ b/en/examples/ch09/check_whitespace.py.lst	Sun Aug 16 03:41:39 2009 +0200
   102.3 @@ -0,0 +1,47 @@
   102.4 +#!/usr/bin/env python
   102.5 +#
   102.6 +# save as .hg/check_whitespace.py and make executable
   102.7 +
   102.8 +import re
   102.9 +
  102.10 +def trailing_whitespace(difflines):
  102.11 +    # 
  102.12 +    linenum, header = 0, False
  102.13 +
  102.14 +    for line in difflines:
  102.15 +        if header:
  102.16 +            # remember the name of the file that this diff affects
  102.17 +            m = re.match(r'(?:---|\+\+\+) ([^\t]+)', line)
  102.18 +            if m and m.group(1) != '/dev/null':
  102.19 +                filename = m.group(1).split('/', 1)[-1]
  102.20 +            if line.startswith('+++ '):
  102.21 +                header = False
  102.22 +            continue
  102.23 +        if line.startswith('diff '):
  102.24 +            header = True
  102.25 +            continue
  102.26 +        # hunk header - save the line number
  102.27 +        m = re.match(r'@@ -\d+,\d+ \+(\d+),', line)
  102.28 +        if m:
  102.29 +            linenum = int(m.group(1))
  102.30 +            continue
  102.31 +        # hunk body - check for an added line with trailing whitespace
  102.32 +        m = re.match(r'\+.*\s$', line)
  102.33 +        if m:
  102.34 +            yield filename, linenum
  102.35 +        if line and line[0] in ' +':
  102.36 +            linenum += 1
  102.37 +
  102.38 +if __name__ == '__main__':
  102.39 +    import os, sys
  102.40 +    
  102.41 +    added = 0
  102.42 +    for filename, linenum in trailing_whitespace(os.popen('hg export tip')):
  102.43 +        print >> sys.stderr, ('%s, line %d: trailing whitespace added' %
  102.44 +                              (filename, linenum))
  102.45 +        added += 1
  102.46 +    if added:
  102.47 +        # save the commit message so we don't need to retype it
  102.48 +        os.system('hg tip --template "{desc}" > .hg/commit.save')
  102.49 +        print >> sys.stderr, 'commit message saved to .hg/commit.save'
  102.50 +        sys.exit(1)
   103.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   103.2 +++ b/en/examples/ch09/hook.ws	Sun Aug 16 03:41:39 2009 +0200
   103.3 @@ -0,0 +1,32 @@
   103.4 +#!/bin/bash
   103.5 +
   103.6 +hg init a
   103.7 +cd a
   103.8 +echo '[hooks]' > .hg/hgrc
   103.9 +echo "pretxncommit.whitespace = hg export tip | (! egrep -q '^\\+.*[ \\t]$')" >> .hg/hgrc
  103.10 +
  103.11 +#$ name: simple
  103.12 +
  103.13 +cat .hg/hgrc
  103.14 +echo 'a ' > a
  103.15 +hg commit -A -m 'test with trailing whitespace'
  103.16 +echo 'a' > a
  103.17 +hg commit -A -m 'drop trailing whitespace and try again'
  103.18 +
  103.19 +#$ name:
  103.20 +
  103.21 +echo '[hooks]' > .hg/hgrc
  103.22 +echo "pretxncommit.whitespace = .hg/check_whitespace.py" >> .hg/hgrc
  103.23 +cp $EXAMPLE_DIR/ch09/check_whitespace.py.lst .hg/check_whitespace.py
  103.24 +chmod +x .hg/check_whitespace.py
  103.25 +
  103.26 +#$ name: better
  103.27 +
  103.28 +cat .hg/hgrc
  103.29 +echo 'a ' >> a
  103.30 +hg commit -A -m 'add new line with trailing whitespace'
  103.31 +sed -i 's, *$,,' a
  103.32 +hg commit -A -m 'trimmed trailing whitespace'
  103.33 +
  103.34 +#$ name:
  103.35 +exit 0
   104.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   104.2 +++ b/en/examples/ch10/bugzilla-config.lst	Sun Aug 16 03:41:39 2009 +0200
   104.3 @@ -0,0 +1,14 @@
   104.4 +[bugzilla]
   104.5 +host = bugzilla.example.com
   104.6 +password = mypassword version = 2.16
   104.7 +# server-side repos live in /home/hg/repos, so strip 4 leading
   104.8 +# separators
   104.9 +strip = 4
  104.10 +hgweb = http://hg.example.com/
  104.11 +usermap = /home/hg/repos/notify/bugzilla.conf
  104.12 +template = Changeset {node|short}, made by {author} in the {webroot}
  104.13 +  repo, refers to this bug.\n
  104.14 +  For complete details, see
  104.15 +  {hgweb}{webroot}?cmd=changeset;node={node|short}\n
  104.16 +  Changeset description:\n
  104.17 +  \t{desc|tabindent}
   105.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   105.2 +++ b/en/examples/ch10/multiline	Sun Aug 16 03:41:39 2009 +0200
   105.3 @@ -0,0 +1,13 @@
   105.4 +#!/bin/sh
   105.5 +
   105.6 +hg init
   105.7 +echo a > test.c
   105.8 +hg ci -Am'First commit'
   105.9 +
  105.10 +#$ name: go
  105.11 +
  105.12 +cat > multiline << EOF
  105.13 +changeset = "Changed in {node|short}:\n{files}"
  105.14 +file = "  {file}\n"
  105.15 +EOF
  105.16 +hg log --style multiline
   106.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   106.2 +++ b/en/examples/ch10/notify-config-mail.lst	Sun Aug 16 03:41:39 2009 +0200
   106.3 @@ -0,0 +1,18 @@
   106.4 +X-Hg-Repo: tests/slave
   106.5 +Subject: tests/slave: Handle error case when slave has no buffers
   106.6 +Date: Wed,  2 Aug 2006 15:25:46 -0700 (PDT)
   106.7 +
   106.8 +changeset 3cba9bfe74b5 in /home/hg/repos/tests/slave
   106.9 +
  106.10 +details:
  106.11 +http://hg.example.com/tests/slave?cmd=changeset;node=3cba9bfe74b5 
  106.12 +
  106.13 +description: Handle error case when slave has no buffers
  106.14 +
  106.15 +diffs (54 lines):
  106.16 +diff -r 9d95df7cf2ad -r 3cba9bfe74b5 include/tests.h
  106.17 +--- a/include/tests.h      Wed Aug 02 15:19:52 2006 -0700
  106.18 ++++ b/include/tests.h      Wed Aug 02 15:25:26 2006 -0700
  106.19 +@@ -212,6 +212,15 @@ static __inline__
  106.20 +void test_headers(void *h)
  106.21 +[...snip...]
   107.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   107.2 +++ b/en/examples/ch10/notify-config.lst	Sun Aug 16 03:41:39 2009 +0200
   107.3 @@ -0,0 +1,19 @@
   107.4 +[notify]
   107.5 +# really send email
   107.6 +test = false
   107.7 +# subscriber data lives in the notify repo
   107.8 +config = /home/hg/repos/notify/notify.conf
   107.9 +# repos live in /home/hg/repos on server, so strip 4 "/" chars
  107.10 +strip = 4
  107.11 +template = X-Hg-Repo: {webroot}\n
  107.12 +  Subject: {webroot}: {desc|firstline|strip}\n
  107.13 +  From: {author}
  107.14 +  \n\n
  107.15 +  changeset {node|short} in {root}
  107.16 +  \n\ndetails:
  107.17 +  {baseurl}{webroot}?cmd=changeset;node={node|short}
  107.18 +  description: {desc|tabindent|strip}
  107.19 +
  107.20 +[web]
  107.21 +baseurl =
  107.22 +http://hg.example.com/
   108.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   108.2 +++ b/en/examples/ch11/qdelete	Sun Aug 16 03:41:39 2009 +0200
   108.3 @@ -0,0 +1,32 @@
   108.4 +#!/bin/bash
   108.5 +
   108.6 +echo '[extensions]' >> $HGRC
   108.7 +echo 'hgext.mq =' >> $HGRC
   108.8 +
   108.9 +#$ name: go
  108.10 +
  108.11 +hg init myrepo
  108.12 +cd myrepo
  108.13 +hg qinit
  108.14 +hg qnew bad.patch
  108.15 +echo a > a
  108.16 +hg add a
  108.17 +hg qrefresh
  108.18 +hg qdelete bad.patch
  108.19 +hg qpop
  108.20 +hg qdelete bad.patch
  108.21 +
  108.22 +#$ name: convert
  108.23 +
  108.24 +hg qnew good.patch
  108.25 +echo a > a
  108.26 +hg add a
  108.27 +hg qrefresh -m 'Good change'
  108.28 +hg qfinish tip
  108.29 +hg qapplied
  108.30 +hg tip --style=compact
  108.31 +
  108.32 +#$ name: import
  108.33 +
  108.34 +hg qimport -r tip
  108.35 +hg qapplied
   109.1 --- a/en/examples/cmdref.diff-p.out	Thu Mar 26 08:57:10 2009 +0100
   109.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   109.3 @@ -1,22 +0,0 @@
   109.4 -$ \textbf{echo '[diff]' >> $HGRC}
   109.5 -$ \textbf{echo 'showfunc = False' >> $HGRC}
   109.6 -$ \textbf{hg diff}
   109.7 -diff -r  myfile.c
   109.8 -
   109.9 -
  109.10 -@@ -1,4 +1,4 @@
  109.11 - int myfunc()
  109.12 - \{
  109.13 --    return 1;
  109.14 -+    return 10;
  109.15 - \}
  109.16 -$ \textbf{hg diff -p}
  109.17 -diff -r  myfile.c
  109.18 -
  109.19 -
  109.20 -@@ -1,4 +1,4 @@ int myfunc()
  109.21 - int myfunc()
  109.22 - \{
  109.23 --    return 1;
  109.24 -+    return 10;
  109.25 - \}
   110.1 --- a/en/examples/daily.copy	Thu Mar 26 08:57:10 2009 +0100
   110.2 +++ b/en/examples/daily.copy	Sun Aug 16 03:41:39 2009 +0200
   110.3 @@ -51,9 +51,9 @@
   110.4  cd copy-example
   110.5  echo a > a
   110.6  echo b > b
   110.7 -mkdir c
   110.8 -mkdir c/a
   110.9 -echo c > c/a/c
  110.10 +mkdir z
  110.11 +mkdir z/a
  110.12 +echo c > z/a/c
  110.13  hg ci -Ama
  110.14  
  110.15  #$ name: simple
  110.16 @@ -70,13 +70,13 @@
  110.17  
  110.18  #$ name: dir-src
  110.19  
  110.20 -hg copy c e
  110.21 +hg copy z e
  110.22  
  110.23  #$ name: dir-src-dest
  110.24  
  110.25 -hg copy c d
  110.26 +hg copy z d
  110.27  
  110.28  #$ name: after
  110.29  
  110.30 -cp a z
  110.31 -hg copy --after a z
  110.32 +cp a n
  110.33 +hg copy --after a n
   111.1 --- a/en/examples/daily.copy.after.out	Thu Mar 26 08:57:10 2009 +0100
   111.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   111.3 @@ -1,2 +0,0 @@
   111.4 -$ \textbf{cp a z}
   111.5 -$ \textbf{hg copy --after a z}
   112.1 --- a/en/examples/daily.copy.cat.out	Thu Mar 26 08:57:10 2009 +0100
   112.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   112.3 @@ -1,5 +0,0 @@
   112.4 -$ \textbf{cat file}
   112.5 -line
   112.6 -new contents
   112.7 -$ \textbf{cat ../my-copy/new-file}
   112.8 -line
   113.1 --- a/en/examples/daily.copy.clone.out	Thu Mar 26 08:57:10 2009 +0100
   113.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   113.3 @@ -1,4 +0,0 @@
   113.4 -$ \textbf{cd ..}
   113.5 -$ \textbf{hg clone my-copy your-copy}
   113.6 -updating working directory
   113.7 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   114.1 --- a/en/examples/daily.copy.copy.out	Thu Mar 26 08:57:10 2009 +0100
   114.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   114.3 @@ -1,2 +0,0 @@
   114.4 -$ \textbf{cd my-copy}
   114.5 -$ \textbf{hg copy file new-file}
   115.1 --- a/en/examples/daily.copy.dir-dest.out	Thu Mar 26 08:57:10 2009 +0100
   115.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   115.3 @@ -1,4 +0,0 @@
   115.4 -$ \textbf{mkdir d}
   115.5 -$ \textbf{hg copy a b d}
   115.6 -$ \textbf{ls d}
   115.7 -a  b
   116.1 --- a/en/examples/daily.copy.dir-src-dest.out	Thu Mar 26 08:57:10 2009 +0100
   116.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   116.3 @@ -1,2 +0,0 @@
   116.4 -$ \textbf{hg copy c d}
   116.5 -copying c/a/c to d/c/a/c
   117.1 --- a/en/examples/daily.copy.dir-src.out	Thu Mar 26 08:57:10 2009 +0100
   117.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   117.3 @@ -1,2 +0,0 @@
   117.4 -$ \textbf{hg copy c e}
   117.5 -copying c/a/c to e/a/c
   118.1 --- a/en/examples/daily.copy.init.out	Thu Mar 26 08:57:10 2009 +0100
   118.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   118.3 @@ -1,5 +0,0 @@
   118.4 -$ \textbf{hg init my-copy}
   118.5 -$ \textbf{cd my-copy}
   118.6 -$ \textbf{echo line > file}
   118.7 -$ \textbf{hg add file}
   118.8 -$ \textbf{hg commit -m 'Added a file'}
   119.1 --- a/en/examples/daily.copy.merge.out	Thu Mar 26 08:57:10 2009 +0100
   119.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   119.3 @@ -1,15 +0,0 @@
   119.4 -$ \textbf{hg pull ../my-copy}
   119.5 -pulling from ../my-copy
   119.6 -searching for changes
   119.7 -adding changesets
   119.8 -adding manifests
   119.9 -adding file changes
  119.10 -added 1 changesets with 1 changes to 1 files (+1 heads)
  119.11 -(run 'hg heads' to see heads, 'hg merge' to merge)
  119.12 -$ \textbf{hg merge}
  119.13 -merging file and new-file
  119.14 -0 files updated, 1 files merged, 0 files removed, 0 files unresolved
  119.15 -(branch merge, don't forget to commit)
  119.16 -$ \textbf{cat new-file}
  119.17 -line
  119.18 -new contents
   120.1 --- a/en/examples/daily.copy.other.out	Thu Mar 26 08:57:10 2009 +0100
   120.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   120.3 @@ -1,3 +0,0 @@
   120.4 -$ \textbf{cd ../your-copy}
   120.5 -$ \textbf{echo 'new contents' >> file}
   120.6 -$ \textbf{hg commit -m 'Changed file'}
   121.1 --- a/en/examples/daily.copy.simple.out	Thu Mar 26 08:57:10 2009 +0100
   121.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   121.3 @@ -1,4 +0,0 @@
   121.4 -$ \textbf{mkdir k}
   121.5 -$ \textbf{hg copy a k}
   121.6 -$ \textbf{ls k}
   121.7 -a
   122.1 --- a/en/examples/daily.copy.status-copy.out	Thu Mar 26 08:57:10 2009 +0100
   122.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   122.3 @@ -1,4 +0,0 @@
   122.4 -$ \textbf{hg status -C}
   122.5 -A new-file
   122.6 -  file
   122.7 -$ \textbf{hg commit -m 'Copied file'}
   123.1 --- a/en/examples/daily.copy.status.out	Thu Mar 26 08:57:10 2009 +0100
   123.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   123.3 @@ -1,2 +0,0 @@
   123.4 -$ \textbf{hg status}
   123.5 -A new-file
   124.1 --- a/en/examples/daily.files	Thu Mar 26 08:57:10 2009 +0100
   124.2 +++ b/en/examples/daily.files	Sun Aug 16 03:41:39 2009 +0200
   124.3 @@ -4,9 +4,9 @@
   124.4  
   124.5  hg init add-example
   124.6  cd add-example
   124.7 -echo a > a
   124.8 +echo a > myfile.txt
   124.9  hg status
  124.10 -hg add a
  124.11 +hg add myfile.txt
  124.12  hg status
  124.13  hg commit -m 'Added one file'
  124.14  hg status
  124.15 @@ -14,10 +14,10 @@
  124.16  #$ name: add-dir
  124.17  
  124.18  mkdir b
  124.19 -echo b > b/b
  124.20 -echo c > b/c
  124.21 +echo b > b/somefile.txt
  124.22 +echo c > b/source.cpp
  124.23  mkdir b/d
  124.24 -echo d > b/d/d
  124.25 +echo d > b/d/test.h
  124.26  hg add b
  124.27  hg commit -m 'Added all files in subdirectory'
  124.28  
   125.1 --- a/en/examples/daily.files.add-dir.out	Thu Mar 26 08:57:10 2009 +0100
   125.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   125.3 @@ -1,10 +0,0 @@
   125.4 -$ \textbf{mkdir b}
   125.5 -$ \textbf{echo b > b/b}
   125.6 -$ \textbf{echo c > b/c}
   125.7 -$ \textbf{mkdir b/d}
   125.8 -$ \textbf{echo d > b/d/d}
   125.9 -$ \textbf{hg add b}
  125.10 -adding b/b
  125.11 -adding b/c
  125.12 -adding b/d/d
  125.13 -$ \textbf{hg commit -m 'Added all files in subdirectory'}
   126.1 --- a/en/examples/daily.files.add.out	Thu Mar 26 08:57:10 2009 +0100
   126.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   126.3 @@ -1,10 +0,0 @@
   126.4 -$ \textbf{hg init add-example}
   126.5 -$ \textbf{cd add-example}
   126.6 -$ \textbf{echo a > a}
   126.7 -$ \textbf{hg status}
   126.8 -? a
   126.9 -$ \textbf{hg add a}
  126.10 -$ \textbf{hg status}
  126.11 -A a
  126.12 -$ \textbf{hg commit -m 'Added one file'}
  126.13 -$ \textbf{hg status}
   127.1 --- a/en/examples/daily.files.addremove.out	Thu Mar 26 08:57:10 2009 +0100
   127.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   127.3 @@ -1,7 +0,0 @@
   127.4 -$ \textbf{hg init addremove-example}
   127.5 -$ \textbf{cd addremove-example}
   127.6 -$ \textbf{echo a > a}
   127.7 -$ \textbf{echo b > b}
   127.8 -$ \textbf{hg addremove}
   127.9 -adding a
  127.10 -adding b
   128.1 --- a/en/examples/daily.files.commit-addremove.out	Thu Mar 26 08:57:10 2009 +0100
   128.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   128.3 @@ -1,3 +0,0 @@
   128.4 -$ \textbf{echo c > c}
   128.5 -$ \textbf{hg commit -A -m 'Commit with addremove'}
   128.6 -adding c
   129.1 --- a/en/examples/daily.files.hidden.out	Thu Mar 26 08:57:10 2009 +0100
   129.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   129.3 @@ -1,14 +0,0 @@
   129.4 -$ \textbf{hg init hidden-example}
   129.5 -$ \textbf{cd hidden-example}
   129.6 -$ \textbf{mkdir empty}
   129.7 -$ \textbf{touch empty/.hidden}
   129.8 -$ \textbf{hg add empty/.hidden}
   129.9 -$ \textbf{hg commit -m 'Manage an empty-looking directory'}
  129.10 -$ \textbf{ls empty}
  129.11 -$ \textbf{cd ..}
  129.12 -$ \textbf{hg clone hidden-example tmp}
  129.13 -updating working directory
  129.14 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  129.15 -$ \textbf{ls tmp}
  129.16 -empty
  129.17 -$ \textbf{ls tmp/empty}
   130.1 --- a/en/examples/daily.files.missing.out	Thu Mar 26 08:57:10 2009 +0100
   130.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   130.3 @@ -1,8 +0,0 @@
   130.4 -$ \textbf{hg init missing-example}
   130.5 -$ \textbf{cd missing-example}
   130.6 -$ \textbf{echo a > a}
   130.7 -$ \textbf{hg add a}
   130.8 -$ \textbf{hg commit -m 'File about to be missing'}
   130.9 -$ \textbf{rm a}
  130.10 -$ \textbf{hg status}
  130.11 -! a
   131.1 --- a/en/examples/daily.files.recover-missing.out	Thu Mar 26 08:57:10 2009 +0100
   131.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   131.3 @@ -1,4 +0,0 @@
   131.4 -$ \textbf{hg revert a}
   131.5 -$ \textbf{cat a}
   131.6 -a
   131.7 -$ \textbf{hg status}
   132.1 --- a/en/examples/daily.files.remove-after.out	Thu Mar 26 08:57:10 2009 +0100
   132.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   132.3 @@ -1,3 +0,0 @@
   132.4 -$ \textbf{hg remove --after a}
   132.5 -$ \textbf{hg status}
   132.6 -R a
   133.1 --- a/en/examples/daily.files.remove.out	Thu Mar 26 08:57:10 2009 +0100
   133.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   133.3 @@ -1,13 +0,0 @@
   133.4 -$ \textbf{hg init remove-example}
   133.5 -$ \textbf{cd remove-example}
   133.6 -$ \textbf{echo a > a}
   133.7 -$ \textbf{mkdir b}
   133.8 -$ \textbf{echo b > b/b}
   133.9 -$ \textbf{hg add a b}
  133.10 -adding b/b
  133.11 -$ \textbf{hg commit -m 'Small example for file removal'}
  133.12 -$ \textbf{hg remove a}
  133.13 -$ \textbf{hg status}
  133.14 -R a
  133.15 -$ \textbf{hg remove b}
  133.16 -removing b/b
   134.1 --- a/en/examples/daily.rename.rename.out	Thu Mar 26 08:57:10 2009 +0100
   134.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   134.3 @@ -1,1 +0,0 @@
   134.4 -$ \textbf{hg rename a b}
   135.1 --- a/en/examples/daily.rename.status-copy.out	Thu Mar 26 08:57:10 2009 +0100
   135.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   135.3 @@ -1,4 +0,0 @@
   135.4 -$ \textbf{hg status -C}
   135.5 -A b
   135.6 -  a
   135.7 -R a
   136.1 --- a/en/examples/daily.rename.status.out	Thu Mar 26 08:57:10 2009 +0100
   136.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   136.3 @@ -1,3 +0,0 @@
   136.4 -$ \textbf{hg status}
   136.5 -A b
   136.6 -R a
   137.1 --- a/en/examples/daily.revert.add.out	Thu Mar 26 08:57:10 2009 +0100
   137.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   137.3 @@ -1,7 +0,0 @@
   137.4 -$ \textbf{echo oops > oops}
   137.5 -$ \textbf{hg add oops}
   137.6 -$ \textbf{hg status oops}
   137.7 -A oops
   137.8 -$ \textbf{hg revert oops}
   137.9 -$ \textbf{hg status}
  137.10 -? oops
   138.1 --- a/en/examples/daily.revert.copy.out	Thu Mar 26 08:57:10 2009 +0100
   138.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   138.3 @@ -1,4 +0,0 @@
   138.4 -$ \textbf{hg copy file new-file}
   138.5 -$ \textbf{hg revert new-file}
   138.6 -$ \textbf{hg status}
   138.7 -? new-file
   139.1 --- a/en/examples/daily.revert.missing.out	Thu Mar 26 08:57:10 2009 +0100
   139.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   139.3 @@ -1,6 +0,0 @@
   139.4 -$ \textbf{rm file}
   139.5 -$ \textbf{hg status}
   139.6 -! file
   139.7 -$ \textbf{hg revert file}
   139.8 -$ \textbf{ls file}
   139.9 -file
   140.1 --- a/en/examples/daily.revert.modify.out	Thu Mar 26 08:57:10 2009 +0100
   140.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   140.3 @@ -1,10 +0,0 @@
   140.4 -$ \textbf{cat file}
   140.5 -original content
   140.6 -$ \textbf{echo unwanted change >> file}
   140.7 -$ \textbf{hg diff file}
   140.8 -diff -r  file
   140.9 -
  140.10 -
  140.11 -@@ -1,1 +1,2 @@
  140.12 - original content
  140.13 -+unwanted change
   141.1 --- a/en/examples/daily.revert.remove.out	Thu Mar 26 08:57:10 2009 +0100
   141.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   141.3 @@ -1,7 +0,0 @@
   141.4 -$ \textbf{hg remove file}
   141.5 -$ \textbf{hg status}
   141.6 -R file
   141.7 -$ \textbf{hg revert file}
   141.8 -$ \textbf{hg status}
   141.9 -$ \textbf{ls file}
  141.10 -file
   142.1 --- a/en/examples/daily.revert.rename-orig.out	Thu Mar 26 08:57:10 2009 +0100
   142.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   142.3 @@ -1,4 +0,0 @@
   142.4 -$ \textbf{hg revert file}
   142.5 -no changes needed to file
   142.6 -$ \textbf{hg status}
   142.7 -? new-file
   143.1 --- a/en/examples/daily.revert.rename.out	Thu Mar 26 08:57:10 2009 +0100
   143.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   143.3 @@ -1,4 +0,0 @@
   143.4 -$ \textbf{hg rename file new-file}
   143.5 -$ \textbf{hg revert new-file}
   143.6 -$ \textbf{hg status}
   143.7 -? new-file
   144.1 --- a/en/examples/daily.revert.status.out	Thu Mar 26 08:57:10 2009 +0100
   144.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   144.3 @@ -1,5 +0,0 @@
   144.4 -$ \textbf{hg status}
   144.5 -? file.orig
   144.6 -$ \textbf{cat file.orig}
   144.7 -original content
   144.8 -unwanted change
   145.1 --- a/en/examples/daily.revert.unmodify.out	Thu Mar 26 08:57:10 2009 +0100
   145.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   145.3 @@ -1,5 +0,0 @@
   145.4 -$ \textbf{hg status}
   145.5 -M file
   145.6 -$ \textbf{hg revert file}
   145.7 -$ \textbf{cat file}
   145.8 -original content
   146.1 --- a/en/examples/data/check_whitespace.py	Thu Mar 26 08:57:10 2009 +0100
   146.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   146.3 @@ -1,44 +0,0 @@
   146.4 -#!/usr/bin/python
   146.5 -
   146.6 -import re
   146.7 -
   146.8 -def trailing_whitespace(difflines):
   146.9 -    added, linenum, header = [], 0, False
  146.10 -
  146.11 -    for line in difflines:
  146.12 -        if header:
  146.13 -            # remember the name of the file that this diff affects
  146.14 -            m = re.match(r'(?:---|\+\+\+) ([^\t]+)', line)
  146.15 -            if m and m.group(1) != '/dev/null':
  146.16 -                filename = m.group(1).split('/', 1)[-1]
  146.17 -            if line.startswith('+++ '):
  146.18 -                header = False
  146.19 -            continue
  146.20 -        if line.startswith('diff '):
  146.21 -            header = True
  146.22 -            continue
  146.23 -        # hunk header - save the line number
  146.24 -        m = re.match(r'@@ -\d+,\d+ \+(\d+),', line)
  146.25 -        if m:
  146.26 -            linenum = int(m.group(1))
  146.27 -            continue
  146.28 -        # hunk body - check for an added line with trailing whitespace
  146.29 -        m = re.match(r'\+.*\s$', line)
  146.30 -        if m:
  146.31 -            added.append((filename, linenum))
  146.32 -        if line and line[0] in ' +':
  146.33 -            linenum += 1
  146.34 -    return added
  146.35 -
  146.36 -if __name__ == '__main__':
  146.37 -    import os, sys
  146.38 -    
  146.39 -    added = trailing_whitespace(os.popen('hg export tip'))
  146.40 -    if added:
  146.41 -        for filename, linenum in added:
  146.42 -            print >> sys.stderr, ('%s, line %d: trailing whitespace added' %
  146.43 -                                  (filename, linenum))
  146.44 -        # save the commit message so we don't need to retype it
  146.45 -        os.system('hg tip --template "{desc}" > .hg/commit.save')
  146.46 -        print >> sys.stderr, 'commit message saved to .hg/commit.save'
  146.47 -        sys.exit(1)
   147.1 --- a/en/examples/extdiff.diff.out	Thu Mar 26 08:57:10 2009 +0100
   147.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   147.3 @@ -1,7 +0,0 @@
   147.4 -$ \textbf{hg diff}
   147.5 -diff -r  myfile
   147.6 -
   147.7 -
   147.8 -@@ -1,1 +1,2 @@
   147.9 - The first line.
  147.10 -+The second line.
   148.1 --- a/en/examples/extdiff.extdiff-ctx.out	Thu Mar 26 08:57:10 2009 +0100
   148.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   148.3 @@ -1,8 +0,0 @@
   148.4 -$ \textbf{hg extdiff -o -NprcC5}
   148.5 -
   148.6 -
   148.7 -***************
   148.8 -*** 1 ****
   148.9 -
  148.10 -  The first line.
  148.11 -+ The second line.
   149.1 --- a/en/examples/extdiff.extdiff.out	Thu Mar 26 08:57:10 2009 +0100
   149.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   149.3 @@ -1,6 +0,0 @@
   149.4 -$ \textbf{hg extdiff}
   149.5 -
   149.6 -
   149.7 -@@ -1 +1,2 @@
   149.8 - The first line.
   149.9 -+The second line.
   150.1 --- a/en/examples/filenames.dirs.out	Thu Mar 26 08:57:10 2009 +0100
   150.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   150.3 @@ -1,5 +0,0 @@
   150.4 -$ \textbf{hg status src}
   150.5 -? src/main.py
   150.6 -? src/watcher/_watcher.c
   150.7 -? src/watcher/watcher.py
   150.8 -? src/xyzzy.txt
   151.1 --- a/en/examples/filenames.files.out	Thu Mar 26 08:57:10 2009 +0100
   151.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   151.3 @@ -1,1 +0,0 @@
   151.4 -$ \textbf{hg add COPYING README examples/simple.py}
   152.1 --- a/en/examples/filenames.filter.exclude.out	Thu Mar 26 08:57:10 2009 +0100
   152.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   152.3 @@ -1,3 +0,0 @@
   152.4 -$ \textbf{hg status -X '**.py' src}
   152.5 -? src/watcher/_watcher.c
   152.6 -? src/xyzzy.txt
   153.1 --- a/en/examples/filenames.filter.include.out	Thu Mar 26 08:57:10 2009 +0100
   153.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   153.3 @@ -1,2 +0,0 @@
   153.4 -$ \textbf{hg status -I '*.in'}
   153.5 -? MANIFEST.in
   154.1 --- a/en/examples/filenames.glob.group.out	Thu Mar 26 08:57:10 2009 +0100
   154.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   154.3 @@ -1,3 +0,0 @@
   154.4 -$ \textbf{hg status 'glob:*.\{in,py\}'}
   154.5 -? MANIFEST.in
   154.6 -? setup.py
   155.1 --- a/en/examples/filenames.glob.question.out	Thu Mar 26 08:57:10 2009 +0100
   155.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   155.3 @@ -1,2 +0,0 @@
   155.4 -$ \textbf{hg status 'glob:**.?'}
   155.5 -? src/watcher/_watcher.c
   156.1 --- a/en/examples/filenames.glob.range.out	Thu Mar 26 08:57:10 2009 +0100
   156.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   156.3 @@ -1,3 +0,0 @@
   156.4 -$ \textbf{hg status 'glob:**[nr-t]'}
   156.5 -? MANIFEST.in
   156.6 -? src/xyzzy.txt
   157.1 --- a/en/examples/filenames.glob.star-starstar.out	Thu Mar 26 08:57:10 2009 +0100
   157.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   157.3 @@ -1,8 +0,0 @@
   157.4 -$ \textbf{hg status 'glob:*.py'}
   157.5 -? setup.py
   157.6 -$ \textbf{hg status 'glob:**.py'}
   157.7 -A examples/simple.py
   157.8 -A src/main.py
   157.9 -? examples/performant.py
  157.10 -? setup.py
  157.11 -? src/watcher/watcher.py
   158.1 --- a/en/examples/filenames.glob.star.out	Thu Mar 26 08:57:10 2009 +0100
   158.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   158.3 @@ -1,2 +0,0 @@
   158.4 -$ \textbf{hg add 'glob:*.py'}
   158.5 -adding main.py
   159.1 --- a/en/examples/filenames.glob.starstar.out	Thu Mar 26 08:57:10 2009 +0100
   159.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   159.3 @@ -1,7 +0,0 @@
   159.4 -$ \textbf{cd ..}
   159.5 -$ \textbf{hg status 'glob:**.py'}
   159.6 -A examples/simple.py
   159.7 -A src/main.py
   159.8 -? examples/performant.py
   159.9 -? setup.py
  159.10 -? src/watcher/watcher.py
   160.1 --- a/en/examples/filenames.wdir-relname.out	Thu Mar 26 08:57:10 2009 +0100
   160.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   160.3 @@ -1,22 +0,0 @@
   160.4 -$ \textbf{hg status}
   160.5 -A COPYING
   160.6 -A README
   160.7 -A examples/simple.py
   160.8 -? MANIFEST.in
   160.9 -? examples/performant.py
  160.10 -? setup.py
  160.11 -? src/main.py
  160.12 -? src/watcher/_watcher.c
  160.13 -? src/watcher/watcher.py
  160.14 -? src/xyzzy.txt
  160.15 -$ \textbf{hg status `hg root`}
  160.16 -A ../COPYING
  160.17 -A ../README
  160.18 -A ../examples/simple.py
  160.19 -? ../MANIFEST.in
  160.20 -? ../examples/performant.py
  160.21 -? ../setup.py
  160.22 -? main.py
  160.23 -? watcher/_watcher.c
  160.24 -? watcher/watcher.py
  160.25 -? xyzzy.txt
   161.1 --- a/en/examples/filenames.wdir-subdir.out	Thu Mar 26 08:57:10 2009 +0100
   161.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   161.3 @@ -1,14 +0,0 @@
   161.4 -$ \textbf{cd src}
   161.5 -$ \textbf{hg add -n}
   161.6 -adding ../MANIFEST.in
   161.7 -adding ../examples/performant.py
   161.8 -adding ../setup.py
   161.9 -adding main.py
  161.10 -adding watcher/_watcher.c
  161.11 -adding watcher/watcher.py
  161.12 -adding xyzzy.txt
  161.13 -$ \textbf{hg add -n .}
  161.14 -adding main.py
  161.15 -adding watcher/_watcher.c
  161.16 -adding watcher/watcher.py
  161.17 -adding xyzzy.txt
   162.1 --- a/en/examples/hook.msglen.go.out	Thu Mar 26 08:57:10 2009 +0100
   162.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   162.3 @@ -1,10 +0,0 @@
   162.4 -$ \textbf{cat .hg/hgrc}
   162.5 -[hooks]
   162.6 -pretxncommit.msglen = test `hg tip --template \{desc\} | wc -c` -ge 10
   162.7 -$ \textbf{echo a > a}
   162.8 -$ \textbf{hg add a}
   162.9 -$ \textbf{hg commit -A -m 'too short'}
  162.10 -transaction abort!
  162.11 -rollback completed
  162.12 -abort: pretxncommit.msglen hook exited with status 1
  162.13 -$ \textbf{hg commit -A -m 'long enough'}
   163.1 --- a/en/examples/hook.msglen.run.out	Thu Mar 26 08:57:10 2009 +0100
   163.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   163.3 @@ -1,10 +0,0 @@
   163.4 -$ \textbf{cat .hg/hgrc}
   163.5 -[hooks]
   163.6 -pretxncommit.msglen = test `hg tip --template \{desc\} | wc -c` -ge 10
   163.7 -$ \textbf{echo a > a}
   163.8 -$ \textbf{hg add a}
   163.9 -$ \textbf{hg commit -A -m 'too short'}
  163.10 -abort: pretxncommit.msglen hook exited with status 1
  163.11 -transaction abort!
  163.12 -rollback completed
  163.13 -$ \textbf{hg commit -A -m 'long enough'}
   164.1 --- a/en/examples/hook.simple.ext.out	Thu Mar 26 08:57:10 2009 +0100
   164.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   164.3 @@ -1,5 +0,0 @@
   164.4 -$ \textbf{echo 'commit.when = echo -n "date of commit: "; date' >> .hg/hgrc}
   164.5 -$ \textbf{echo a >> a}
   164.6 -$ \textbf{hg commit -m 'i have two hooks'}
   164.7 -committed 
   164.8 -
   165.1 --- a/en/examples/hook.simple.init.out	Thu Mar 26 08:57:10 2009 +0100
   165.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   165.3 @@ -1,11 +0,0 @@
   165.4 -$ \textbf{hg init hook-test}
   165.5 -$ \textbf{cd hook-test}
   165.6 -$ \textbf{echo '[hooks]' >> .hg/hgrc}
   165.7 -$ \textbf{echo 'commit = echo committed $HG_NODE' >> .hg/hgrc}
   165.8 -$ \textbf{cat .hg/hgrc}
   165.9 -[hooks]
  165.10 -commit = echo committed $HG_NODE
  165.11 -$ \textbf{echo a > a}
  165.12 -$ \textbf{hg add a}
  165.13 -$ \textbf{hg commit -m 'testing commit hook'}
  165.14 -committed 
   166.1 --- a/en/examples/hook.simple.pretxncommit.out	Thu Mar 26 08:57:10 2009 +0100
   166.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   166.3 @@ -1,13 +0,0 @@
   166.4 -$ \textbf{cat check_bug_id}
   166.5 -#!/bin/sh
   166.6 -# check that a commit comment mentions a numeric bug id
   166.7 -hg log -r $1 --template \{desc\} | grep -q "\textbackslash{}<bug *[0-9]"
   166.8 -$ \textbf{echo 'pretxncommit.bug_id_required = ./check_bug_id $HG_NODE' >> .hg/hgrc}
   166.9 -$ \textbf{echo a >> a}
  166.10 -$ \textbf{hg commit -m 'i am not mentioning a bug id'}
  166.11 -transaction abort!
  166.12 -rollback completed
  166.13 -abort: pretxncommit.bug_id_required hook exited with status 1
  166.14 -$ \textbf{hg commit -m 'i refer you to bug 666'}
  166.15 -committed 
  166.16 -
   167.1 --- a/en/examples/hook.ws	Thu Mar 26 08:57:10 2009 +0100
   167.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   167.3 @@ -1,31 +0,0 @@
   167.4 -#!/bin/bash
   167.5 -
   167.6 -hg init a
   167.7 -cd a
   167.8 -echo '[hooks]' > .hg/hgrc
   167.9 -echo "pretxncommit.whitespace = hg export tip | (! egrep -q '^\\+.*[ \\t]$')" >> .hg/hgrc
  167.10 -
  167.11 -#$ name: simple
  167.12 -
  167.13 -cat .hg/hgrc
  167.14 -echo 'a ' > a
  167.15 -hg commit -A -m 'test with trailing whitespace'
  167.16 -echo 'a' > a
  167.17 -hg commit -A -m 'drop trailing whitespace and try again'
  167.18 -
  167.19 -#$ name:
  167.20 -
  167.21 -echo '[hooks]' > .hg/hgrc
  167.22 -echo "pretxncommit.whitespace = .hg/check_whitespace.py" >> .hg/hgrc
  167.23 -cp $EXAMPLE_DIR/data/check_whitespace.py .hg
  167.24 -
  167.25 -#$ name: better
  167.26 -
  167.27 -cat .hg/hgrc
  167.28 -echo 'a ' >> a
  167.29 -hg commit -A -m 'add new line with trailing whitespace'
  167.30 -sed -i 's, *$,,' a
  167.31 -hg commit -A -m 'trimmed trailing whitespace'
  167.32 -
  167.33 -#$ name:
  167.34 -exit 0
   168.1 --- a/en/examples/hook.ws.better.out	Thu Mar 26 08:57:10 2009 +0100
   168.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   168.3 @@ -1,17 +0,0 @@
   168.4 -$ \textbf{cat .hg/hgrc}
   168.5 -[hooks]
   168.6 -pretxncommit.whitespace = .hg/check_whitespace.py
   168.7 -$ \textbf{echo 'a ' >> a}
   168.8 -$ \textbf{hg commit -A -m 'add new line with trailing whitespace'}
   168.9 -a, line 2: trailing whitespace added
  168.10 -commit message saved to .hg/commit.save
  168.11 -transaction abort!
  168.12 -rollback completed
  168.13 -abort: pretxncommit.whitespace hook exited with status 1
  168.14 -$ \textbf{sed -i 's, *$,,' a}
  168.15 -$ \textbf{hg commit -A -m 'trimmed trailing whitespace'}
  168.16 -a, line 2: trailing whitespace added
  168.17 -commit message saved to .hg/commit.save
  168.18 -transaction abort!
  168.19 -rollback completed
  168.20 -abort: pretxncommit.whitespace hook exited with status 1
   169.1 --- a/en/examples/hook.ws.simple.out	Thu Mar 26 08:57:10 2009 +0100
   169.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   169.3 @@ -1,11 +0,0 @@
   169.4 -$ \textbf{cat .hg/hgrc}
   169.5 -[hooks]
   169.6 -pretxncommit.whitespace = hg export tip | (! egrep -q '^\textbackslash{}+.*[ \textbackslash{}t]$')
   169.7 -$ \textbf{echo 'a ' > a}
   169.8 -$ \textbf{hg commit -A -m 'test with trailing whitespace'}
   169.9 -adding a
  169.10 -transaction abort!
  169.11 -rollback completed
  169.12 -abort: pretxncommit.whitespace hook exited with status 1
  169.13 -$ \textbf{echo 'a' > a}
  169.14 -$ \textbf{hg commit -A -m 'drop trailing whitespace and try again'}
   170.1 --- a/en/examples/issue29.go.out	Thu Mar 26 08:57:10 2009 +0100
   170.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   170.3 @@ -1,17 +0,0 @@
   170.4 -$ \textbf{hg init issue29}
   170.5 -$ \textbf{cd issue29}
   170.6 -$ \textbf{echo a > a}
   170.7 -$ \textbf{hg ci -Ama}
   170.8 -adding a
   170.9 -$ \textbf{echo b > b}
  170.10 -$ \textbf{hg ci -Amb}
  170.11 -adding b
  170.12 -$ \textbf{hg up 0}
  170.13 -0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  170.14 -$ \textbf{mkdir b}
  170.15 -$ \textbf{echo b > b/b}
  170.16 -$ \textbf{hg ci -Amc}
  170.17 -adding b/b
  170.18 -created new head
  170.19 -$ \textbf{hg merge}
  170.20 -
   171.1 --- a/en/examples/mq.dodiff.diff.out	Thu Mar 26 08:57:10 2009 +0100
   171.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   171.3 @@ -1,13 +0,0 @@
   171.4 -$ \textbf{echo 'this is my original thought' > oldfile}
   171.5 -$ \textbf{echo 'i have changed my mind' > newfile}
   171.6 -$ \textbf{diff -u oldfile newfile > tiny.patch}
   171.7 -$ \textbf{cat tiny.patch}
   171.8 -
   171.9 -
  171.10 -@@ -1 +1 @@
  171.11 --this is my original thought
  171.12 -+i have changed my mind
  171.13 -$ \textbf{patch < tiny.patch}
  171.14 -patching file oldfile
  171.15 -$ \textbf{cat oldfile}
  171.16 -i have changed my mind
   172.1 --- a/en/examples/mq.guards	Thu Mar 26 08:57:10 2009 +0100
   172.2 +++ b/en/examples/mq.guards	Sun Aug 16 03:41:39 2009 +0200
   172.3 @@ -29,7 +29,7 @@
   172.4  
   172.5  #$ name: qguard.neg
   172.6  
   172.7 -hg qguard hello.patch -quux
   172.8 +hg qguard -- hello.patch -quux
   172.9  hg qguard hello.patch
  172.10  
  172.11  #$ name: series
   173.1 --- a/en/examples/mq.guards.init.out	Thu Mar 26 08:57:10 2009 +0100
   173.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   173.3 @@ -1,9 +0,0 @@
   173.4 -$ \textbf{hg qinit}
   173.5 -$ \textbf{hg qnew hello.patch}
   173.6 -$ \textbf{echo hello > hello}
   173.7 -$ \textbf{hg add hello}
   173.8 -$ \textbf{hg qrefresh}
   173.9 -$ \textbf{hg qnew goodbye.patch}
  173.10 -$ \textbf{echo goodbye > goodbye}
  173.11 -$ \textbf{hg add goodbye}
  173.12 -$ \textbf{hg qrefresh}
   174.1 --- a/en/examples/mq.guards.qguard.neg.out	Thu Mar 26 08:57:10 2009 +0100
   174.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   174.3 @@ -1,3 +0,0 @@
   174.4 -$ \textbf{hg qguard hello.patch -quux}
   174.5 -$ \textbf{hg qguard hello.patch}
   174.6 -hello.patch: -quux
   175.1 --- a/en/examples/mq.guards.qguard.out	Thu Mar 26 08:57:10 2009 +0100
   175.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   175.3 @@ -1,2 +0,0 @@
   175.4 -$ \textbf{hg qguard}
   175.5 -goodbye.patch: unguarded
   176.1 --- a/en/examples/mq.guards.qguard.pos.out	Thu Mar 26 08:57:10 2009 +0100
   176.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   176.3 @@ -1,3 +0,0 @@
   176.4 -$ \textbf{hg qguard +foo}
   176.5 -$ \textbf{hg qguard}
   176.6 -goodbye.patch: +foo
   177.1 --- a/en/examples/mq.guards.qselect.cat.out	Thu Mar 26 08:57:10 2009 +0100
   177.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   177.3 @@ -1,2 +0,0 @@
   177.4 -$ \textbf{cat .hg/patches/guards}
   177.5 -foo
   178.1 --- a/en/examples/mq.guards.qselect.error.out	Thu Mar 26 08:57:10 2009 +0100
   178.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   178.3 @@ -1,2 +0,0 @@
   178.4 -$ \textbf{hg qselect +foo}
   178.5 -abort: guard '+foo' starts with invalid character: '+'
   179.1 --- a/en/examples/mq.guards.qselect.foo.out	Thu Mar 26 08:57:10 2009 +0100
   179.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   179.3 @@ -1,8 +0,0 @@
   179.4 -$ \textbf{hg qpop -a}
   179.5 -Patch queue now empty
   179.6 -$ \textbf{hg qselect}
   179.7 -no active guards
   179.8 -$ \textbf{hg qselect foo}
   179.9 -number of unguarded, unapplied patches has changed from 1 to 2
  179.10 -$ \textbf{hg qselect}
  179.11 -foo
   180.1 --- a/en/examples/mq.guards.qselect.foobar.out	Thu Mar 26 08:57:10 2009 +0100
   180.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   180.3 @@ -1,8 +0,0 @@
   180.4 -$ \textbf{hg qselect foo bar}
   180.5 -number of unguarded, unapplied patches has changed from 0 to 2
   180.6 -$ \textbf{hg qpop -a}
   180.7 -no patches applied
   180.8 -$ \textbf{hg qpush -a}
   180.9 -applying hello.patch
  180.10 -applying goodbye.patch
  180.11 -Now at: goodbye.patch
   181.1 --- a/en/examples/mq.guards.qselect.qpush.out	Thu Mar 26 08:57:10 2009 +0100
   181.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   181.3 @@ -1,4 +0,0 @@
   181.4 -$ \textbf{hg qpush -a}
   181.5 -applying hello.patch
   181.6 -applying goodbye.patch
   181.7 -Now at: goodbye.patch
   182.1 --- a/en/examples/mq.guards.qselect.quux.out	Thu Mar 26 08:57:10 2009 +0100
   182.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   182.3 @@ -1,6 +0,0 @@
   182.4 -$ \textbf{hg qselect quux}
   182.5 -number of guarded, applied patches has changed from 0 to 2
   182.6 -$ \textbf{hg qpop -a}
   182.7 -Patch queue now empty
   182.8 -$ \textbf{hg qpush -a}
   182.9 -patch series already fully applied
   183.1 --- a/en/examples/mq.guards.series.out	Thu Mar 26 08:57:10 2009 +0100
   183.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   183.3 @@ -1,3 +0,0 @@
   183.4 -$ \textbf{cat .hg/patches/series}
   183.5 -hello.patch #-quux
   183.6 -goodbye.patch #+foo
   184.1 --- a/en/examples/mq.id.out.out	Thu Mar 26 08:57:10 2009 +0100
   184.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   184.3 @@ -1,32 +0,0 @@
   184.4 -$ \textbf{hg qapplied}
   184.5 -first.patch
   184.6 -second.patch
   184.7 -$ \textbf{hg log -r qbase:qtip}
   184.8 -changeset:   
   184.9 -tag:         first.patch
  184.10 -tag:         qbase
  184.11 -user:        Bryan O'Sullivan <bos@serpentine.com>
  184.12 -
  184.13 -summary:     patch queue: first.patch
  184.14 -
  184.15 -changeset:   
  184.16 -tag:         second.patch
  184.17 -tag:         qtip
  184.18 -tag:         tip
  184.19 -user:        Bryan O'Sullivan <bos@serpentine.com>
  184.20 -
  184.21 -summary:     patch queue: second.patch
  184.22 -
  184.23 -$ \textbf{hg export second.patch}
  184.24 -# HG changeset patch
  184.25 -# User Bryan O'Sullivan <bos@serpentine.com>
  184.26 -
  184.27 -# Node ID 
  184.28 -# Parent  
  184.29 -patch queue: second.patch
  184.30 -
  184.31 -diff -r  -r  other.c
  184.32 -
  184.33 -
  184.34 -@@ -0,0 +1,1 @@
  184.35 -+double u;
   185.1 --- a/en/examples/mq.id.output.out	Thu Mar 26 08:57:10 2009 +0100
   185.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   185.3 @@ -1,32 +0,0 @@
   185.4 -$ \textbf{hg qapplied}
   185.5 -first.patch
   185.6 -second.patch
   185.7 -$ \textbf{hg log -r qbase:qtip}
   185.8 -changeset:   
   185.9 -tag:         first.patch
  185.10 -tag:         qbase
  185.11 -user:        Bryan O'Sullivan <bos@serpentine.com>
  185.12 -
  185.13 -summary:     [mq]: first.patch
  185.14 -
  185.15 -changeset:   
  185.16 -tag:         qtip
  185.17 -tag:         second.patch
  185.18 -tag:         tip
  185.19 -user:        Bryan O'Sullivan <bos@serpentine.com>
  185.20 -
  185.21 -summary:     [mq]: second.patch
  185.22 -
  185.23 -$ \textbf{hg export second.patch}
  185.24 -# HG changeset patch
  185.25 -# User Bryan O'Sullivan <bos@serpentine.com>
  185.26 -
  185.27 -# Node ID 
  185.28 -# Parent  
  185.29 -[mq]: second.patch
  185.30 -
  185.31 -diff -r  -r  other.c
  185.32 -
  185.33 -
  185.34 -@@ -0,0 +1,1 @@
  185.35 -+double u;
   186.1 --- a/en/examples/mq.qinit-help.help.out	Thu Mar 26 08:57:10 2009 +0100
   186.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   186.3 @@ -1,16 +0,0 @@
   186.4 -$ \textbf{hg help qinit}
   186.5 -hg qinit [-c]
   186.6 -
   186.7 -init a new queue repository
   186.8 -
   186.9 -    The queue repository is unversioned by default. If -c is
  186.10 -    specified, qinit will create a separate nested repository
  186.11 -    for patches (qinit -c may also be run later to convert
  186.12 -    an unversioned patch repository into a versioned one).
  186.13 -    You can use qcommit to commit changes to this queue repository.
  186.14 -
  186.15 -options:
  186.16 -
  186.17 - -c --create-repo  create queue repository
  186.18 -
  186.19 -use "hg -v help qinit" to show global options
   187.1 --- a/en/examples/mq.tarball.download.out	Thu Mar 26 08:57:10 2009 +0100
   187.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   187.3 @@ -1,9 +0,0 @@
   187.4 -$ \textbf{download netplug-1.2.5.tar.bz2}
   187.5 -$ \textbf{tar jxf netplug-1.2.5.tar.bz2}
   187.6 -$ \textbf{cd netplug-1.2.5}
   187.7 -$ \textbf{hg init}
   187.8 -$ \textbf{hg commit -q --addremove --message netplug-1.2.5}
   187.9 -$ \textbf{cd ..}
  187.10 -$ \textbf{hg clone netplug-1.2.5 netplug}
  187.11 -updating working directory
  187.12 -18 files updated, 0 files merged, 0 files removed, 0 files unresolved
   188.1 --- a/en/examples/mq.tarball.newsource.out	Thu Mar 26 08:57:10 2009 +0100
   188.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   188.3 @@ -1,13 +0,0 @@
   188.4 -$ \textbf{hg qpop -a}
   188.5 -Patch queue now empty
   188.6 -$ \textbf{cd ..}
   188.7 -$ \textbf{download netplug-1.2.8.tar.bz2}
   188.8 -$ \textbf{hg clone netplug-1.2.5 netplug-1.2.8}
   188.9 -updating working directory
  188.10 -18 files updated, 0 files merged, 0 files removed, 0 files unresolved
  188.11 -$ \textbf{cd netplug-1.2.8}
  188.12 -$ \textbf{hg locate -0 | xargs -0 rm}
  188.13 -$ \textbf{cd ..}
  188.14 -$ \textbf{tar jxf netplug-1.2.8.tar.bz2}
  188.15 -$ \textbf{cd netplug-1.2.8}
  188.16 -$ \textbf{hg commit --addremove --message netplug-1.2.8}
   189.1 --- a/en/examples/mq.tarball.qinit.out	Thu Mar 26 08:57:10 2009 +0100
   189.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   189.3 @@ -1,28 +0,0 @@
   189.4 -$ \textbf{cd netplug}
   189.5 -$ \textbf{hg qinit}
   189.6 -$ \textbf{hg qnew -m 'fix build problem with gcc 4' build-fix.patch}
   189.7 -$ \textbf{perl -pi -e 's/int addr_len/socklen_t addr_len/' netlink.c}
   189.8 -$ \textbf{hg qrefresh}
   189.9 -$ \textbf{hg tip -p}
  189.10 -changeset:   
  189.11 -tag:         qtip
  189.12 -tag:         build-fix.patch
  189.13 -tag:         tip
  189.14 -tag:         qbase
  189.15 -user:        Bryan O'Sullivan <bos@serpentine.com>
  189.16 -
  189.17 -summary:     fix build problem with gcc 4
  189.18 -
  189.19 -diff -r  -r  netlink.c
  189.20 -
  189.21 -
  189.22 -@@ -275,7 +275,7 @@
  189.23 -         exit(1);
  189.24 -     \}
  189.25 - 
  189.26 --    int addr_len = sizeof(addr);
  189.27 -+    socklen_t addr_len = sizeof(addr);
  189.28 - 
  189.29 -     if (getsockname(fd, (struct sockaddr *) &addr, &addr_len) == -1) \{
  189.30 -         do_log(LOG_ERR, "Could not get socket details: %m");
  189.31 -
   190.1 --- a/en/examples/mq.tarball.repush.out	Thu Mar 26 08:57:10 2009 +0100
   190.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   190.3 @@ -1,13 +0,0 @@
   190.4 -$ \textbf{cd ../netplug}
   190.5 -$ \textbf{hg pull ../netplug-1.2.8}
   190.6 -pulling from ../netplug-1.2.8
   190.7 -searching for changes
   190.8 -adding changesets
   190.9 -adding manifests
  190.10 -adding file changes
  190.11 -added 1 changesets with 12 changes to 12 files
  190.12 -(run 'hg update' to get a working copy)
  190.13 -$ \textbf{hg qpush -a}
  190.14 -(working directory not at tip)
  190.15 -applying build-fix.patch
  190.16 -Now at: build-fix.patch
   191.1 --- a/en/examples/mq.tools.lsdiff.out	Thu Mar 26 08:57:10 2009 +0100
   191.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   191.3 @@ -1,21 +0,0 @@
   191.4 -$ \textbf{lsdiff -nvv remove-redundant-null-checks.patch}
   191.5 -22	File #1  	a/drivers/char/agp/sgi-agp.c
   191.6 -	24	Hunk #1	static int __devinit agp_sgi_init(void)
   191.7 -37	File #2  	a/drivers/char/hvcs.c
   191.8 -	39	Hunk #1	static struct tty_operations hvcs_ops = 
   191.9 -	53	Hunk #2	static int hvcs_alloc_index_list(int n)
  191.10 -69	File #3  	a/drivers/message/fusion/mptfc.c
  191.11 -	71	Hunk #1	mptfc_GetFcDevPage0(MPT_ADAPTER *ioc, in
  191.12 -85	File #4  	a/drivers/message/fusion/mptsas.c
  191.13 -	87	Hunk #1	mptsas_probe_hba_phys(MPT_ADAPTER *ioc)
  191.14 -98	File #5  	a/drivers/net/fs_enet/fs_enet-mii.c
  191.15 -	100	Hunk #1	static struct fs_enet_mii_bus *create_bu
  191.16 -111	File #6  	a/drivers/net/wireless/ipw2200.c
  191.17 -	113	Hunk #1	static struct ipw_fw_error *ipw_alloc_er
  191.18 -	126	Hunk #2	static ssize_t clear_error(struct device
  191.19 -	140	Hunk #3	static void ipw_irq_tasklet(struct ipw_p
  191.20 -	150	Hunk #4	static void ipw_pci_remove(struct pci_de
  191.21 -164	File #7  	a/drivers/scsi/libata-scsi.c
  191.22 -	166	Hunk #1	int ata_cmd_ioctl(struct scsi_device *sc
  191.23 -178	File #8  	a/drivers/video/au1100fb.c
  191.24 -	180	Hunk #1	void __exit au1100fb_cleanup(void)
   192.1 --- a/en/examples/mq.tools.tools.out	Thu Mar 26 08:57:10 2009 +0100
   192.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   192.3 @@ -1,23 +0,0 @@
   192.4 -$ \textbf{diffstat -p1 remove-redundant-null-checks.patch}
   192.5 - drivers/char/agp/sgi-agp.c        |    5 ++---
   192.6 - drivers/char/hvcs.c               |   11 +++++------
   192.7 - drivers/message/fusion/mptfc.c    |    6 ++----
   192.8 - drivers/message/fusion/mptsas.c   |    3 +--
   192.9 - drivers/net/fs_enet/fs_enet-mii.c |    3 +--
  192.10 - drivers/net/wireless/ipw2200.c    |   22 ++++++----------------
  192.11 - drivers/scsi/libata-scsi.c        |    4 +---
  192.12 - drivers/video/au1100fb.c          |    3 +--
  192.13 - 8 files changed, 19 insertions(+), 38 deletions(-)
  192.14 -$ \textbf{filterdiff -i '*/video/*' remove-redundant-null-checks.patch}
  192.15 -
  192.16 -
  192.17 -@@ -743,8 +743,7 @@ void __exit au1100fb_cleanup(void)
  192.18 - \{
  192.19 - 	driver_unregister(&au1100fb_driver);
  192.20 - 
  192.21 --	if (drv_info.opt_mode)
  192.22 --		kfree(drv_info.opt_mode);
  192.23 -+	kfree(drv_info.opt_mode);
  192.24 - \}
  192.25 - 
  192.26 - module_init(au1100fb_init);
   193.1 --- a/en/examples/mq.tutorial.add.out	Thu Mar 26 08:57:10 2009 +0100
   193.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   193.3 @@ -1,4 +0,0 @@
   193.4 -$ \textbf{echo 'file 3, line 1' >> file3}
   193.5 -$ \textbf{hg qnew add-file3.patch}
   193.6 -$ \textbf{hg qnew -f add-file3.patch}
   193.7 -abort: patch "add-file3.patch" already exists
   194.1 --- a/en/examples/mq.tutorial.qinit.out	Thu Mar 26 08:57:10 2009 +0100
   194.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   194.3 @@ -1,7 +0,0 @@
   194.4 -$ \textbf{hg init mq-sandbox}
   194.5 -$ \textbf{cd mq-sandbox}
   194.6 -$ \textbf{echo 'line 1' > file1}
   194.7 -$ \textbf{echo 'another line 1' > file2}
   194.8 -$ \textbf{hg add file1 file2}
   194.9 -$ \textbf{hg commit -m'first change'}
  194.10 -$ \textbf{hg qinit}
   195.1 --- a/en/examples/mq.tutorial.qnew.out	Thu Mar 26 08:57:10 2009 +0100
   195.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   195.3 @@ -1,20 +0,0 @@
   195.4 -$ \textbf{hg tip}
   195.5 -changeset:   
   195.6 -tag:         tip
   195.7 -user:        Bryan O'Sullivan <bos@serpentine.com>
   195.8 -
   195.9 -summary:     first change
  195.10 -
  195.11 -$ \textbf{hg qnew first.patch}
  195.12 -$ \textbf{hg tip}
  195.13 -changeset:   
  195.14 -tag:         qtip
  195.15 -tag:         first.patch
  195.16 -tag:         tip
  195.17 -tag:         qbase
  195.18 -user:        Bryan O'Sullivan <bos@serpentine.com>
  195.19 -
  195.20 -summary:     [mq]: first.patch
  195.21 -
  195.22 -$ \textbf{ls .hg/patches}
  195.23 -first.patch  series  status
   196.1 --- a/en/examples/mq.tutorial.qnew2.out	Thu Mar 26 08:57:10 2009 +0100
   196.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   196.3 @@ -1,28 +0,0 @@
   196.4 -$ \textbf{hg qnew second.patch}
   196.5 -$ \textbf{hg log --style=compact --limit=2}
   196.6 -2[qtip,second.patch,tip]   
   196.7 -  [mq]: second.patch
   196.8 -
   196.9 -1[first.patch,qbase]   
  196.10 -  [mq]: first.patch
  196.11 -
  196.12 -$ \textbf{echo 'line 4' >> file1}
  196.13 -$ \textbf{hg qrefresh}
  196.14 -$ \textbf{hg tip --style=compact --patch}
  196.15 -2[qtip,second.patch,tip]   
  196.16 -  [mq]: second.patch
  196.17 -
  196.18 -diff -r  -r  file1
  196.19 -
  196.20 -
  196.21 -@@ -1,3 +1,4 @@
  196.22 - line 1
  196.23 - line 2
  196.24 - line 3
  196.25 -+line 4
  196.26 -
  196.27 -$ \textbf{hg annotate file1}
  196.28 -0: line 1
  196.29 -1: line 2
  196.30 -1: line 3
  196.31 -2: line 4
   197.1 --- a/en/examples/mq.tutorial.qpop.out	Thu Mar 26 08:57:10 2009 +0100
   197.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   197.3 @@ -1,14 +0,0 @@
   197.4 -$ \textbf{hg qapplied}
   197.5 -first.patch
   197.6 -second.patch
   197.7 -$ \textbf{hg qpop}
   197.8 -Now at: first.patch
   197.9 -$ \textbf{hg qseries}
  197.10 -first.patch
  197.11 -second.patch
  197.12 -$ \textbf{hg qapplied}
  197.13 -first.patch
  197.14 -$ \textbf{cat file1}
  197.15 -line 1
  197.16 -line 2
  197.17 -line 3
   198.1 --- a/en/examples/mq.tutorial.qpush-a.out	Thu Mar 26 08:57:10 2009 +0100
   198.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   198.3 @@ -1,8 +0,0 @@
   198.4 -$ \textbf{hg qpush -a}
   198.5 -applying second.patch
   198.6 -Now at: second.patch
   198.7 -$ \textbf{cat file1}
   198.8 -line 1
   198.9 -line 2
  198.10 -line 3
  198.11 -line 4
   199.1 --- a/en/examples/mq.tutorial.qrefresh.out	Thu Mar 26 08:57:10 2009 +0100
   199.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   199.3 @@ -1,21 +0,0 @@
   199.4 -$ \textbf{echo 'line 2' >> file1}
   199.5 -$ \textbf{hg diff}
   199.6 -diff -r  file1
   199.7 -
   199.8 -
   199.9 -@@ -1,1 +1,2 @@
  199.10 - line 1
  199.11 -+line 2
  199.12 -$ \textbf{hg qrefresh}
  199.13 -$ \textbf{hg diff}
  199.14 -$ \textbf{hg tip --style=compact --patch}
  199.15 -1[qtip,first.patch,tip,qbase]   
  199.16 -  [mq]: first.patch
  199.17 -
  199.18 -diff -r  -r  file1
  199.19 -
  199.20 -
  199.21 -@@ -1,1 +1,2 @@
  199.22 - line 1
  199.23 -+line 2
  199.24 -
   200.1 --- a/en/examples/mq.tutorial.qrefresh2.out	Thu Mar 26 08:57:10 2009 +0100
   200.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   200.3 @@ -1,16 +0,0 @@
   200.4 -$ \textbf{echo 'line 3' >> file1}
   200.5 -$ \textbf{hg status}
   200.6 -M file1
   200.7 -$ \textbf{hg qrefresh}
   200.8 -$ \textbf{hg tip --style=compact --patch}
   200.9 -1[qtip,first.patch,tip,qbase]   
  200.10 -  [mq]: first.patch
  200.11 -
  200.12 -diff -r  -r  file1
  200.13 -
  200.14 -
  200.15 -@@ -1,1 +1,3 @@
  200.16 - line 1
  200.17 -+line 2
  200.18 -+line 3
  200.19 -
   201.1 --- a/en/examples/mq.tutorial.qseries.out	Thu Mar 26 08:57:10 2009 +0100
   201.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   201.3 @@ -1,6 +0,0 @@
   201.4 -$ \textbf{hg qseries}
   201.5 -first.patch
   201.6 -second.patch
   201.7 -$ \textbf{hg qapplied}
   201.8 -first.patch
   201.9 -second.patch
   202.1 --- a/en/examples/rename.divergent	Thu Mar 26 08:57:10 2009 +0100
   202.2 +++ b/en/examples/rename.divergent	Sun Aug 16 03:41:39 2009 +0200
   202.3 @@ -14,7 +14,7 @@
   202.4  #$ name: rename.anne
   202.5  
   202.6  cd anne
   202.7 -hg mv foo bar
   202.8 +hg rename foo bar
   202.9  hg ci -m 'Rename foo to bar'
  202.10  
  202.11  #$ name: rename.bob
   203.1 --- a/en/examples/rename.divergent.clone.out	Thu Mar 26 08:57:10 2009 +0100
   203.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   203.3 @@ -1,6 +0,0 @@
   203.4 -$ \textbf{hg clone orig anne}
   203.5 -updating working directory
   203.6 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   203.7 -$ \textbf{hg clone orig bob}
   203.8 -updating working directory
   203.9 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   204.1 --- a/en/examples/rename.divergent.merge.out	Thu Mar 26 08:57:10 2009 +0100
   204.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   204.3 @@ -1,26 +0,0 @@
   204.4 -# See http://www.selenic.com/mercurial/bts/issue455
   204.5 -$ \textbf{cd ../orig}
   204.6 -$ \textbf{hg pull -u ../anne}
   204.7 -pulling from ../anne
   204.8 -searching for changes
   204.9 -adding changesets
  204.10 -adding manifests
  204.11 -adding file changes
  204.12 -added 1 changesets with 1 changes to 1 files
  204.13 -1 files updated, 0 files merged, 1 files removed, 0 files unresolved
  204.14 -$ \textbf{hg pull ../bob}
  204.15 -pulling from ../bob
  204.16 -searching for changes
  204.17 -adding changesets
  204.18 -adding manifests
  204.19 -adding file changes
  204.20 -added 1 changesets with 1 changes to 1 files (+1 heads)
  204.21 -(run 'hg heads' to see heads, 'hg merge' to merge)
  204.22 -$ \textbf{hg merge}
  204.23 -warning: detected divergent renames of foo to:
  204.24 - bar
  204.25 - quux
  204.26 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  204.27 -(branch merge, don't forget to commit)
  204.28 -$ \textbf{ls}
  204.29 -bar  quux
   205.1 --- a/en/examples/rename.divergent.rename.anne.out	Thu Mar 26 08:57:10 2009 +0100
   205.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   205.3 @@ -1,3 +0,0 @@
   205.4 -$ \textbf{cd anne}
   205.5 -$ \textbf{hg mv foo bar}
   205.6 -$ \textbf{hg ci -m 'Rename foo to bar'}
   206.1 --- a/en/examples/rename.divergent.rename.bob.out	Thu Mar 26 08:57:10 2009 +0100
   206.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   206.3 @@ -1,3 +0,0 @@
   206.4 -$ \textbf{cd ../bob}
   206.5 -$ \textbf{hg mv foo quux}
   206.6 -$ \textbf{hg ci -m 'Rename foo to quux'}
   207.1 --- a/en/examples/rollback.add.out	Thu Mar 26 08:57:10 2009 +0100
   207.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   207.3 @@ -1,2 +0,0 @@
   207.4 -$ \textbf{hg add b}
   207.5 -$ \textbf{hg commit -m 'Add file b, this time for real'}
   208.1 --- a/en/examples/rollback.commit.out	Thu Mar 26 08:57:10 2009 +0100
   208.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   208.3 @@ -1,4 +0,0 @@
   208.4 -$ \textbf{hg status}
   208.5 -M a
   208.6 -$ \textbf{echo b > b}
   208.7 -$ \textbf{hg commit -m 'Add file b'}
   209.1 --- a/en/examples/rollback.rollback.out	Thu Mar 26 08:57:10 2009 +0100
   209.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   209.3 @@ -1,12 +0,0 @@
   209.4 -$ \textbf{hg rollback}
   209.5 -rolling back last transaction
   209.6 -$ \textbf{hg tip}
   209.7 -changeset:   
   209.8 -tag:         tip
   209.9 -user:        Bryan O'Sullivan <bos@serpentine.com>
  209.10 -
  209.11 -summary:     First commit
  209.12 -
  209.13 -$ \textbf{hg status}
  209.14 -M a
  209.15 -? b
   210.1 --- a/en/examples/rollback.status.out	Thu Mar 26 08:57:10 2009 +0100
   210.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   210.3 @@ -1,9 +0,0 @@
   210.4 -$ \textbf{hg status}
   210.5 -? b
   210.6 -$ \textbf{hg tip}
   210.7 -changeset:   
   210.8 -tag:         tip
   210.9 -user:        Bryan O'Sullivan <bos@serpentine.com>
  210.10 -
  210.11 -summary:     Add file b
  210.12 -
   211.1 --- a/en/examples/rollback.twice.out	Thu Mar 26 08:57:10 2009 +0100
   211.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   211.3 @@ -1,4 +0,0 @@
   211.4 -$ \textbf{hg rollback}
   211.5 -rolling back last transaction
   211.6 -$ \textbf{hg rollback}
   211.7 -no rollback information available
   212.1 --- a/en/examples/run-example	Thu Mar 26 08:57:10 2009 +0100
   212.2 +++ b/en/examples/run-example	Sun Aug 16 03:41:39 2009 +0200
   212.3 @@ -7,6 +7,7 @@
   212.4  import cStringIO
   212.5  import errno
   212.6  import getopt
   212.7 +import glob
   212.8  import os
   212.9  import pty
  212.10  import re
  212.11 @@ -18,23 +19,23 @@
  212.12  import tempfile
  212.13  import time
  212.14  
  212.15 -tex_subs = {
  212.16 -    '\\': '\\textbackslash{}',
  212.17 -    '{': '\\{',
  212.18 -    '}': '\\}',
  212.19 +xml_subs = {
  212.20 +    '<': '&lt;',
  212.21 +    '>': '&gt;',
  212.22 +    '&': '&amp;',
  212.23      }
  212.24  
  212.25  def gensubs(s):
  212.26      start = 0
  212.27      for i, c in enumerate(s):
  212.28 -        sub = tex_subs.get(c)
  212.29 +        sub = xml_subs.get(c)
  212.30          if sub:
  212.31              yield s[start:i]
  212.32              start = i + 1
  212.33              yield sub
  212.34      yield s[start:]
  212.35  
  212.36 -def tex_escape(s):
  212.37 +def xml_escape(s):
  212.38      return ''.join(gensubs(s))
  212.39          
  212.40  def maybe_unlink(name):
  212.41 @@ -53,7 +54,92 @@
  212.42              return p
  212.43      return None
  212.44          
  212.45 +def result_name(name):
  212.46 +    return os.path.normpath(os.path.join('results', name.replace(os.sep, '-')))
  212.47 +
  212.48 +def wopen(name):
  212.49 +    path = os.path.dirname(name)
  212.50 +    if path:
  212.51 +        try:
  212.52 +            os.makedirs(path)
  212.53 +        except OSError, err:
  212.54 +            if err.errno != errno.EEXIST:
  212.55 +                raise
  212.56 +    return open(name, 'w')
  212.57 +
  212.58  class example:
  212.59 +    entities = dict.fromkeys(l.rstrip() for l in open('auto-snippets.xml'))
  212.60 +
  212.61 +    def __init__(self, name, verbose, keep_change):
  212.62 +        self.name = os.path.normpath(name)
  212.63 +        self.verbose = verbose
  212.64 +        self.keep_change = keep_change
  212.65 +        
  212.66 +    def status(self, s):
  212.67 +        sys.stdout.write(s)
  212.68 +        if not s.endswith('\n'):
  212.69 +            sys.stdout.flush()
  212.70 +
  212.71 +    def rename_output(self, base, ignore=[]):
  212.72 +        mangle_re = re.compile('(?:' + '|'.join(ignore) + ')')
  212.73 +        def mangle(s):
  212.74 +            return mangle_re.sub('', s)
  212.75 +        def matchfp(fp1, fp2):
  212.76 +            while True:
  212.77 +                s1 = mangle(fp1.readline())
  212.78 +                s2 = mangle(fp2.readline())
  212.79 +                if cmp(s1, s2):
  212.80 +                    break
  212.81 +                if not s1:
  212.82 +                    return True
  212.83 +            return False
  212.84 +
  212.85 +        oldname = result_name(base + '.out')
  212.86 +        tmpname = result_name(base + '.tmp')
  212.87 +        errname = result_name(base + '.err')
  212.88 +        errfp = open(errname, 'w+')
  212.89 +        for line in open(tmpname):
  212.90 +            errfp.write(mangle_re.sub('', line))
  212.91 +        os.rename(tmpname, result_name(base + '.lxo'))
  212.92 +        errfp.seek(0)
  212.93 +        try:
  212.94 +            oldfp = open(oldname)
  212.95 +        except IOError, err:
  212.96 +            if err.errno != errno.ENOENT:
  212.97 +                raise
  212.98 +            os.rename(errname, oldname)
  212.99 +            return False
 212.100 +        if matchfp(oldfp, errfp):
 212.101 +            os.unlink(errname)
 212.102 +            return False
 212.103 +        else:
 212.104 +            print >> sys.stderr, '\nOutput of %s has changed!' % base
 212.105 +            if self.keep_change:
 212.106 +                os.rename(errname, oldname)
 212.107 +                return False
 212.108 +            else:
 212.109 +                os.system('diff -u %s %s 1>&2' % (oldname, errname))
 212.110 +            return True
 212.111 +
 212.112 +class static_example(example):
 212.113 +    def run(self):
 212.114 +        self.status('running %s\n' % self.name)
 212.115 +        s = open(self.name).read().rstrip()
 212.116 +        s = s.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
 212.117 +        ofp = wopen(result_name(self.name + '.tmp'))
 212.118 +        ofp.write('<!-- BEGIN %s -->\n' % self.name)
 212.119 +        ofp.write('<programlisting>')
 212.120 +        ofp.write(s)
 212.121 +        ofp.write('</programlisting>\n')
 212.122 +        ofp.write('<!-- END %s -->\n' % self.name)
 212.123 +        ofp.close()
 212.124 +        self.rename_output(self.name)
 212.125 +        norm = self.name.replace(os.sep, '-')
 212.126 +        example.entities[
 212.127 +            '<!ENTITY %s SYSTEM "results/%s.lxo">' % (norm, norm)] = 1
 212.128 +
 212.129 +
 212.130 +class shell_example(example):
 212.131      shell = '/usr/bin/env bash'
 212.132      ps1 = '__run_example_ps1__ '
 212.133      ps2 = '__run_example_ps2__ '
 212.134 @@ -61,9 +147,8 @@
 212.135      
 212.136      timeout = 10
 212.137  
 212.138 -    def __init__(self, name, verbose):
 212.139 -        self.name = name
 212.140 -        self.verbose = verbose
 212.141 +    def __init__(self, name, verbose, keep_change):
 212.142 +        example.__init__(self, name, verbose, keep_change)
 212.143          self.poll = select.poll()
 212.144  
 212.145      def parse(self):
 212.146 @@ -76,11 +161,6 @@
 212.147                  yield cfp.getvalue()
 212.148                  cfp.seek(0)
 212.149                  cfp.truncate()
 212.150 -        
 212.151 -    def status(self, s):
 212.152 -        sys.stdout.write(s)
 212.153 -        if not s.endswith('\n'):
 212.154 -            sys.stdout.flush()
 212.155  
 212.156      def send(self, s):
 212.157          if self.verbose:
 212.158 @@ -146,12 +226,12 @@
 212.159          maybe_unlink(self.name + '.run')
 212.160  
 212.161          rcfile = os.path.join(tmpdir, '.hgrc')
 212.162 -        rcfp = open(rcfile, 'w')
 212.163 +        rcfp = wopen(rcfile)
 212.164          print >> rcfp, '[ui]'
 212.165          print >> rcfp, "username = Bryan O'Sullivan <bos@serpentine.com>"
 212.166          
 212.167          rcfile = os.path.join(tmpdir, '.bashrc')
 212.168 -        rcfp = open(rcfile, 'w')
 212.169 +        rcfp = wopen(rcfile)
 212.170          print >> rcfp, 'PS1="%s"' % self.ps1
 212.171          print >> rcfp, 'PS2="%s"' % self.ps2
 212.172          print >> rcfp, 'unset HISTFILE'
 212.173 @@ -230,12 +310,22 @@
 212.174                                  return 1
 212.175                              assert os.sep not in out
 212.176                              if ofp is not None:
 212.177 +                                ofp.write('</screen>\n')
 212.178 +                                ofp.write('<!-- END %s -->\n' % ofp_basename)
 212.179                                  ofp.close()
 212.180                                  err |= self.rename_output(ofp_basename, ignore)
 212.181                              if out:
 212.182                                  ofp_basename = '%s.%s' % (self.name, out)
 212.183 +                                norm = os.path.normpath(ofp_basename)
 212.184 +                                norm = norm.replace(os.sep, '-')
 212.185 +                                example.entities[
 212.186 +                                    '<!ENTITY interaction.%s '
 212.187 +                                    'SYSTEM "results/%s.lxo">'
 212.188 +                                    % (norm, norm)] = 1
 212.189                                  read_hint = ofp_basename + ' '
 212.190 -                                ofp = open(ofp_basename + '.tmp', 'w')
 212.191 +                                ofp = wopen(result_name(ofp_basename + '.tmp'))
 212.192 +                                ofp.write('<!-- BEGIN %s -->\n' % ofp_basename)
 212.193 +                                ofp.write('<screen>')
 212.194                              else:
 212.195                                  ofp = None
 212.196                          elif pi == 'ignore':
 212.197 @@ -248,14 +338,15 @@
 212.198                          # first, print the command we ran
 212.199                          if not hunk.startswith('#'):
 212.200                              nl = hunk.endswith('\n')
 212.201 -                            hunk = ('%s \\textbf{%s}' %
 212.202 +                            hunk = ('<prompt>%s</prompt> '
 212.203 +                                    '<userinput>%s</userinput>' %
 212.204                                      (prompts[ps],
 212.205 -                                     tex_escape(hunk.rstrip('\n'))))
 212.206 +                                     xml_escape(hunk.rstrip('\n'))))
 212.207                              if nl: hunk += '\n'
 212.208                          ofp.write(hunk)
 212.209                          # then its output
 212.210 -                        ofp.write(tex_escape(output))
 212.211 -                    ps = newps
 212.212 +                        ofp.write(xml_escape(output))
 212.213 +                        ps = newps
 212.214                  self.status('\n')
 212.215              except:
 212.216                  print >> sys.stderr, '(killed)'
 212.217 @@ -267,6 +358,8 @@
 212.218                      ps, output = self.sendreceive('exit\n', read_hint)
 212.219                      if ofp is not None:
 212.220                          ofp.write(output)
 212.221 +                        ofp.write('</screen>\n')
 212.222 +                        ofp.write('<!-- END %s -->\n' % ofp_basename)
 212.223                          ofp.close()
 212.224                          err |= self.rename_output(ofp_basename, ignore)
 212.225                      os.close(self.cfd)
 212.226 @@ -281,68 +374,40 @@
 212.227                      elif os.WIFSIGNALED(rc):
 212.228                          print >> sys.stderr, '(signal %s)' % os.WTERMSIG(rc)
 212.229                  else:
 212.230 -                    open(self.name + '.run', 'w')
 212.231 +                    wopen(result_name(self.name + '.run'))
 212.232                  return err
 212.233          finally:
 212.234              shutil.rmtree(tmpdir)
 212.235  
 212.236 -    def rename_output(self, base, ignore):
 212.237 -        mangle_re = re.compile('(?:' + '|'.join(ignore) + ')')
 212.238 -        def mangle(s):
 212.239 -            return mangle_re.sub('', s)
 212.240 -        def matchfp(fp1, fp2):
 212.241 -            while True:
 212.242 -                s1 = mangle(fp1.readline())
 212.243 -                s2 = mangle(fp2.readline())
 212.244 -                if cmp(s1, s2):
 212.245 -                    break
 212.246 -                if not s1:
 212.247 -                    return True
 212.248 -            return False
 212.249 -
 212.250 -        oldname = base + '.out'
 212.251 -        tmpname = base + '.tmp'
 212.252 -        errname = base + '.err'
 212.253 -        errfp = open(errname, 'w+')
 212.254 -        for line in open(tmpname):
 212.255 -            errfp.write(mangle_re.sub('', line))
 212.256 -        os.rename(tmpname, base + '.lxo')
 212.257 -        errfp.seek(0)
 212.258 -        try:
 212.259 -            oldfp = open(oldname)
 212.260 -        except IOError, err:
 212.261 -            if err.errno != errno.ENOENT:
 212.262 -                raise
 212.263 -            os.rename(errname, oldname)
 212.264 -            return False
 212.265 -        if matchfp(oldfp, errfp):
 212.266 -            os.unlink(errname)
 212.267 -            return False
 212.268 -        else:
 212.269 -            print >> sys.stderr, '\nOutput of %s has changed!' % base
 212.270 -            os.system('diff -u %s %s 1>&2' % (oldname, errname))
 212.271 -            return True
 212.272 -
 212.273  def print_help(exit, msg=None):
 212.274      if msg:
 212.275          print >> sys.stderr, 'Error:', msg
 212.276      print >> sys.stderr, 'Usage: run-example [options] [test...]'
 212.277      print >> sys.stderr, 'Options:'
 212.278 -    print >> sys.stderr, '  -a --all       run all tests in this directory'
 212.279 +    print >> sys.stderr, '  -a --all       run all examples in this directory'
 212.280      print >> sys.stderr, '  -h --help      print this help message'
 212.281 +    print >> sys.stderr, '     --keep      keep new output as desired output'
 212.282      print >> sys.stderr, '  -v --verbose   display extra debug output'
 212.283      sys.exit(exit)
 212.284  
 212.285  def main(path='.'):
 212.286 +    if os.path.realpath(path).split(os.sep)[-1] != 'examples':
 212.287 +        print >> sys.stderr, 'Not being run from the examples directory!'
 212.288 +        sys.exit(1)
 212.289 +
 212.290      opts, args = getopt.getopt(sys.argv[1:], '?ahv',
 212.291 -                               ['all', 'help', 'verbose'])
 212.292 +                               ['all', 'help', 'keep', 'verbose'])
 212.293      verbose = False
 212.294      run_all = False
 212.295 +    keep_change = False
 212.296 +
 212.297      for o, a in opts:
 212.298          if o in ('-h', '-?', '--help'):
 212.299              print_help(0)
 212.300          if o in ('-a', '--all'):
 212.301              run_all = True
 212.302 +        if o in ('--keep',):
 212.303 +            keep_change = True
 212.304          if o in ('-v', '--verbose'):
 212.305              verbose = True
 212.306      errs = 0
 212.307 @@ -354,19 +419,20 @@
 212.308                  print >> sys.stderr, '%s: %s' % (a, err.strerror)
 212.309                  errs += 1
 212.310                  continue
 212.311 -            if stat.S_ISREG(st.st_mode) and st.st_mode & 0111:
 212.312 -                if example(a, verbose).run():
 212.313 -                    errs += 1
 212.314 +            if stat.S_ISREG(st.st_mode):
 212.315 +                if st.st_mode & 0111:
 212.316 +                    if shell_example(a, verbose, keep_change).run():
 212.317 +                        errs += 1
 212.318 +                elif a.endswith('.lst'):
 212.319 +                    static_example(a, verbose, keep_change).run()
 212.320              else:
 212.321                  print >> sys.stderr, '%s: not a file, or not executable' % a
 212.322                  errs += 1
 212.323      elif run_all:
 212.324 -        names = os.listdir(path)
 212.325 +        names = glob.glob("*") + glob.glob("app*/*") + glob.glob("ch*/*")
 212.326          names.sort()
 212.327          for name in names:
 212.328 -            if name == 'run-example' or name.startswith('.'): continue
 212.329 -            if name.endswith('.out') or name.endswith('~'): continue
 212.330 -            if name.endswith('.run'): continue
 212.331 +            if name == 'run-example' or name.endswith('~'): continue
 212.332              pathname = os.path.join(path, name)
 212.333              try:
 212.334                  st = os.lstat(pathname)
 212.335 @@ -375,12 +441,20 @@
 212.336                  if err.errno != errno.ENOENT:
 212.337                      raise
 212.338                  continue
 212.339 -            if stat.S_ISREG(st.st_mode) and st.st_mode & 0111:
 212.340 -                if example(pathname, verbose).run():
 212.341 -                    errs += 1
 212.342 -        print >> open(os.path.join(path, '.run'), 'w'), time.asctime()
 212.343 +            if stat.S_ISREG(st.st_mode):
 212.344 +                if st.st_mode & 0111:
 212.345 +                    if shell_example(pathname, verbose, keep_change).run():
 212.346 +                        errs += 1
 212.347 +                elif pathname.endswith('.lst'):
 212.348 +                    static_example(pathname, verbose, keep_change).run()
 212.349 +        print >> wopen(os.path.join(path, '.run')), time.asctime()
 212.350      else:
 212.351          print_help(1, msg='no test names given, and --all not provided')
 212.352 +
 212.353 +    fp = wopen('auto-snippets.xml')
 212.354 +    for key in sorted(example.entities.iterkeys()):
 212.355 +        print >> fp, key
 212.356 +    fp.close()
 212.357      return errs
 212.358  
 212.359  if __name__ == '__main__':
   213.1 --- a/en/examples/tag.init.out	Thu Mar 26 08:57:10 2009 +0100
   213.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   213.3 @@ -1,5 +0,0 @@
   213.4 -$ \textbf{hg init mytag}
   213.5 -$ \textbf{cd mytag}
   213.6 -$ \textbf{echo hello > myfile}
   213.7 -$ \textbf{hg commit -A -m 'Initial commit'}
   213.8 -adding myfile
   214.1 --- a/en/examples/tag.log.out	Thu Mar 26 08:57:10 2009 +0100
   214.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   214.3 @@ -1,13 +0,0 @@
   214.4 -$ \textbf{hg log}
   214.5 -changeset:   
   214.6 -tag:         tip
   214.7 -user:        Bryan O'Sullivan <bos@serpentine.com>
   214.8 -
   214.9 -summary:     Added tag v1.0 for changeset 
  214.10 -
  214.11 -changeset:   
  214.12 -tag:         v1.0
  214.13 -user:        Bryan O'Sullivan <bos@serpentine.com>
  214.14 -
  214.15 -summary:     Initial commit
  214.16 -
   215.1 --- a/en/examples/tag.log.v1.0.out	Thu Mar 26 08:57:10 2009 +0100
   215.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   215.3 @@ -1,10 +0,0 @@
   215.4 -$ \textbf{echo goodbye > myfile2}
   215.5 -$ \textbf{hg commit -A -m 'Second commit'}
   215.6 -adding myfile2
   215.7 -$ \textbf{hg log -r v1.0}
   215.8 -changeset:   
   215.9 -tag:         v1.0
  215.10 -user:        Bryan O'Sullivan <bos@serpentine.com>
  215.11 -
  215.12 -summary:     Initial commit
  215.13 -
   216.1 --- a/en/examples/tag.remove.out	Thu Mar 26 08:57:10 2009 +0100
   216.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   216.3 @@ -1,3 +0,0 @@
   216.4 -$ \textbf{hg tag --remove v1.0}
   216.5 -$ \textbf{hg tags}
   216.6 -tip                                
   217.1 --- a/en/examples/tag.replace.out	Thu Mar 26 08:57:10 2009 +0100
   217.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   217.3 @@ -1,10 +0,0 @@
   217.4 -$ \textbf{hg tag -r 1 v1.1}
   217.5 -$ \textbf{hg tags}
   217.6 -tip                                
   217.7 -v1.1                               
   217.8 -$ \textbf{hg tag -r 2 v1.1}
   217.9 -abort: tag 'v1.1' already exists (use -f to force)
  217.10 -$ \textbf{hg tag -f -r 2 v1.1}
  217.11 -$ \textbf{hg tags}
  217.12 -tip                                
  217.13 -v1.1                               
   218.1 --- a/en/examples/tag.tag.out	Thu Mar 26 08:57:10 2009 +0100
   218.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   218.3 @@ -1,1 +0,0 @@
   218.4 -$ \textbf{hg tag v1.0}
   219.1 --- a/en/examples/tag.tags.out	Thu Mar 26 08:57:10 2009 +0100
   219.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   219.3 @@ -1,3 +0,0 @@
   219.4 -$ \textbf{hg tags}
   219.5 -tip                                
   219.6 -v1.0                               
   220.1 --- a/en/examples/tag.tip.out	Thu Mar 26 08:57:10 2009 +0100
   220.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   220.3 @@ -1,7 +0,0 @@
   220.4 -$ \textbf{hg tip}
   220.5 -changeset:   
   220.6 -tag:         tip
   220.7 -user:        Bryan O'Sullivan <bos@serpentine.com>
   220.8 -
   220.9 -summary:     Added tag v1.1 for changeset 
  220.10 -
   221.1 --- a/en/examples/template.simple.changelog.out	Thu Mar 26 08:57:10 2009 +0100
   221.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   221.3 @@ -1,22 +0,0 @@
   221.4 -
   221.5 -
   221.6 -
   221.7 -
   221.8 -
   221.9 -
  221.10 -
  221.11 -
  221.12 -
  221.13 -
  221.14 -
  221.15 -
  221.16 -
  221.17 -
  221.18 -
  221.19 -
  221.20 -
  221.21 -
  221.22 -
  221.23 -
  221.24 -
  221.25 -
   222.1 --- a/en/examples/template.simple.combine.out	Thu Mar 26 08:57:10 2009 +0100
   222.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   222.3 @@ -1,6 +0,0 @@
   222.4 -
   222.5 -
   222.6 -
   222.7 -
   222.8 -
   222.9 -
   223.1 --- a/en/examples/template.simple.compact.out	Thu Mar 26 08:57:10 2009 +0100
   223.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   223.3 @@ -1,13 +0,0 @@
   223.4 -
   223.5 -
   223.6 -
   223.7 -
   223.8 -
   223.9 -
  223.10 -
  223.11 -
  223.12 -
  223.13 -
  223.14 -
  223.15 -
  223.16 -
   224.1 --- a/en/examples/template.simple.datekeyword.out	Thu Mar 26 08:57:10 2009 +0100
   224.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   224.3 @@ -1,4 +0,0 @@
   224.4 -
   224.5 -
   224.6 -
   224.7 -
   225.1 --- a/en/examples/template.simple.keywords.out	Thu Mar 26 08:57:10 2009 +0100
   225.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   225.3 @@ -1,21 +0,0 @@
   225.4 -
   225.5 -
   225.6 -
   225.7 -
   225.8 -
   225.9 -
  225.10 -
  225.11 -
  225.12 -
  225.13 -
  225.14 -
  225.15 -
  225.16 -
  225.17 -
  225.18 -
  225.19 -
  225.20 -
  225.21 -
  225.22 -
  225.23 -
  225.24 -
   227.1 --- a/en/examples/template.simple.normal.out	Thu Mar 26 08:57:10 2009 +0100
   227.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   227.3 @@ -1,7 +0,0 @@
   227.4 -
   227.5 -
   227.6 -
   227.7 -
   227.8 -
   227.9 -
  227.10 -
   228.1 --- a/en/examples/template.simple.rev.out	Thu Mar 26 08:57:10 2009 +0100
   228.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   228.3 @@ -1,3 +0,0 @@
   228.4 -
   228.5 -
   228.6 -
   229.1 --- a/en/examples/template.simple.simplest.out	Thu Mar 26 08:57:10 2009 +0100
   229.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   229.3 @@ -1,2 +0,0 @@
   229.4 -
   229.5 -
   230.1 --- a/en/examples/template.simple.simplesub.out	Thu Mar 26 08:57:10 2009 +0100
   230.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   230.3 @@ -1,7 +0,0 @@
   230.4 -
   230.5 -
   230.6 -
   230.7 -
   230.8 -
   230.9 -
  230.10 -
   231.1 --- a/en/examples/template.svnstyle	Thu Mar 26 08:57:10 2009 +0100
   231.2 +++ b/en/examples/template.svnstyle	Sun Aug 16 03:41:39 2009 +0200
   231.3 @@ -34,6 +34,7 @@
   231.4  hg log -r0 --template '{node}'
   231.5  
   231.6  #$ name: simplest
   231.7 +#$ ignore: \d+-\d+-\d+ \d+:\d+ \+.*
   231.8  
   231.9  cat svn.style
  231.10  hg log -r1 --style svn.style
   232.1 --- a/en/examples/template.svnstyle.id.out	Thu Mar 26 08:57:10 2009 +0100
   232.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   232.3 @@ -1,1 +0,0 @@
   232.4 -$ \textbf{hg log -r0 --template '\{node\}'}
   233.1 --- a/en/examples/template.svnstyle.result.out	Thu Mar 26 08:57:10 2009 +0100
   233.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   233.3 @@ -1,11 +0,0 @@
   233.4 -$ \textbf{hg log -r1 --style svn.style}
   233.5 -------------------------------------------------------------------------
   233.6 -
   233.7 -r1 | bos 
   233.8 -
   233.9 -added line to end of <<hello>> file.
  233.10 -
  233.11 -in addition, added a file with the helpful name (at least i hope that some
  233.12 -might consider it so) of goodbye.
  233.13 -
  233.14 -------------------------------------------------------------------------
   234.1 --- a/en/examples/template.svnstyle.short.out	Thu Mar 26 08:57:10 2009 +0100
   234.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   234.3 @@ -1,10 +0,0 @@
   234.4 -$ \textbf{svn log -r9653}
   234.5 -------------------------------------------------------------------------
   234.6 -r9653 | sean.hefty | 2006-09-27 14:39:55 -0700 (Wed, 27 Sep 2006) | 5 lines
   234.7 -
   234.8 -On reporting a route error, also include the status for the error,
   234.9 -rather than indicating a status of 0 when an error has occurred.
  234.10 -
  234.11 -Signed-off-by: Sean Hefty <sean.hefty@intel.com>
  234.12 -
  234.13 -------------------------------------------------------------------------
   235.1 --- a/en/examples/template.svnstyle.simplest.out	Thu Mar 26 08:57:10 2009 +0100
   235.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   235.3 @@ -1,4 +0,0 @@
   235.4 -$ \textbf{cat svn.style}
   235.5 -changeset = "\{node|short\}\textbackslash{}n"
   235.6 -$ \textbf{hg log -r1 --style svn.style}
   235.7 -
   236.1 --- a/en/examples/template.svnstyle.style.out	Thu Mar 26 08:57:10 2009 +0100
   236.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   236.3 @@ -1,3 +0,0 @@
   236.4 -$ \textbf{cat svn.style}
   236.5 -header = '------------------------------------------------------------------------\textbackslash{}n\textbackslash{}n'
   236.6 -changeset = svn.template
   237.1 --- a/en/examples/template.svnstyle.syntax.error.out	Thu Mar 26 08:57:10 2009 +0100
   237.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   237.3 @@ -1,2 +0,0 @@
   237.4 -$ \textbf{hg log -r1 --style broken.style}
   237.5 -abort: broken.style:1: parse error
   238.1 --- a/en/examples/template.svnstyle.syntax.input.out	Thu Mar 26 08:57:10 2009 +0100
   238.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   238.3 @@ -1,2 +0,0 @@
   238.4 -$ \textbf{cat broken.style}
   238.5 -changeset =
   239.1 --- a/en/examples/template.svnstyle.template.out	Thu Mar 26 08:57:10 2009 +0100
   239.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   239.3 @@ -1,6 +0,0 @@
   239.4 -$ \textbf{cat svn.template}
   239.5 -r\{rev\} | \{author|user\} | \{date|isodate\} (\{date|rfc822date\})
   239.6 -
   239.7 -\{desc|strip|fill76\}
   239.8 -
   239.9 -------------------------------------------------------------------------
   240.1 --- a/en/examples/tour	Thu Mar 26 08:57:10 2009 +0100
   240.2 +++ b/en/examples/tour	Sun Aug 16 03:41:39 2009 +0200
   240.3 @@ -52,10 +52,17 @@
   240.4  hg clone hello my-hello
   240.5  cd my-hello
   240.6  
   240.7 -#$ name: sed
   240.8 +#$ name: cat1
   240.9 +cat hello.c
  240.10 +
  240.11 +#$ name:
  240.12  
  240.13  sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c
  240.14  
  240.15 +#$ name: cat2
  240.16 +# ... edit edit edit ...
  240.17 +cat hello.c
  240.18 +
  240.19  #$ name: status
  240.20  
  240.21  ls
  240.22 @@ -112,6 +119,7 @@
  240.23  hg update 2
  240.24  hg parents
  240.25  hg update
  240.26 +hg parents
  240.27  
  240.28  #$ name: clone-push
  240.29  
  240.30 @@ -139,21 +147,34 @@
  240.31  
  240.32  hg push http://hg.serpentine.com/tutorial/hello
  240.33  
  240.34 +#$ name:
  240.35 +cp hello.c ../new-hello.c
  240.36 +sed -i '/printf("hello,/i\\tprintf("once more, hello.\\n");' ../new-hello.c
  240.37 +
  240.38 +my-text-editor()
  240.39 +{
  240.40 +cp ../new-hello.c hello.c
  240.41 +}
  240.42 +
  240.43  #$ name: merge.clone
  240.44  
  240.45  cd ..
  240.46  hg clone hello my-new-hello
  240.47  cd my-new-hello
  240.48 -sed -i '/printf/i\\tprintf("once more, hello.\\n");' hello.c
  240.49 +# Make some simple edits to hello.c.
  240.50 +my-text-editor hello.c
  240.51  hg commit -m 'A new hello for a new day.'
  240.52  
  240.53  #$ name: merge.dummy2
  240.54  
  240.55  hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-new-hello
  240.56  
  240.57 -#$ name: merge.cat
  240.58 -
  240.59 -cat hello.c
  240.60 +#$ name: merge.cat1
  240.61 +
  240.62 +cat hello.c
  240.63 +
  240.64 +#$ name: merge.cat2
  240.65 +
  240.66  cat ../my-hello/hello.c
  240.67  
  240.68  #$ name: merge.pull
   241.1 --- a/en/examples/tour-merge-conflict.commit.out	Thu Mar 26 08:57:10 2009 +0100
   241.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   241.3 @@ -1,39 +0,0 @@
   241.4 -$ \textbf{cat > letter.txt <<EOF}
   241.5 -> \textbf{Greetings!}
   241.6 -> \textbf{I am Bryan O'Sullivan, no relation of the former}
   241.7 -> \textbf{Nigerian dictator Sani Abacha.}
   241.8 -> \textbf{EOF}
   241.9 -$ \textbf{hg resolve -m letter.txt}
  241.10 -hg: unknown command 'resolve'
  241.11 -Mercurial Distributed SCM
  241.12 -
  241.13 -basic commands:
  241.14 -
  241.15 - add        add the specified files on the next commit
  241.16 - annotate   show changeset information per file line
  241.17 - clone      make a copy of an existing repository
  241.18 - commit     commit the specified files or all outstanding changes
  241.19 - diff       diff repository (or selected files)
  241.20 - export     dump the header and diffs for one or more changesets
  241.21 - init       create a new repository in the given directory
  241.22 - log        show revision history of entire repository or files
  241.23 - merge      merge working directory with another revision
  241.24 - parents    show the parents of the working dir or revision
  241.25 - pull       pull changes from the specified source
  241.26 - push       push changes to the specified destination
  241.27 - remove     remove the specified files on the next commit
  241.28 - serve      export the repository via HTTP
  241.29 - status     show changed files in the working directory
  241.30 - update     update working directory
  241.31 -
  241.32 -use "hg help" for the full list of commands or "hg -v" for details
  241.33 -$ \textbf{hg commit -m 'Send me your money'}
  241.34 -$ \textbf{hg tip}
  241.35 -changeset:   
  241.36 -tag:         tip
  241.37 -parent:      
  241.38 -parent:      
  241.39 -user:        Bryan O'Sullivan <bos@serpentine.com>
  241.40 -
  241.41 -summary:     Send me your money
  241.42 -
   242.1 --- a/en/examples/tour-merge-conflict.cousin.out	Thu Mar 26 08:57:10 2009 +0100
   242.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   242.3 @@ -1,11 +0,0 @@
   242.4 -$ \textbf{cd ..}
   242.5 -$ \textbf{hg clone scam scam-cousin}
   242.6 -updating working directory
   242.7 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   242.8 -$ \textbf{cd scam-cousin}
   242.9 -$ \textbf{cat > letter.txt <<EOF}
  242.10 -> \textbf{Greetings!}
  242.11 -> \textbf{I am Shehu Musa Abacha, cousin to the former}
  242.12 -> \textbf{Nigerian dictator Sani Abacha.}
  242.13 -> \textbf{EOF}
  242.14 -$ \textbf{hg commit -m '419 scam, with cousin'}
   243.1 --- a/en/examples/tour-merge-conflict.merge.out	Thu Mar 26 08:57:10 2009 +0100
   243.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   243.3 @@ -1,17 +0,0 @@
   243.4 -$ \textbf{export HGMERGE=merge}
   243.5 -$ \textbf{hg merge}
   243.6 -merging letter.txt
   243.7 -merge: warning: conflicts during merge
   243.8 -merging letter.txt failed!
   243.9 -0 files updated, 0 files merged, 0 files removed, 1 files unresolved
  243.10 -There are unresolved merges, you can redo the full merge using:
  243.11 -  hg update -C 1
  243.12 -  hg merge 2
  243.13 -$ \textbf{cat letter.txt}
  243.14 -Greetings!
  243.15 -
  243.16 -I am Shehu Musa Abacha, cousin to the former
  243.17 -=======
  243.18 -I am Alhaji Abba Abacha, son of the former
  243.19 -
  243.20 -Nigerian dictator Sani Abacha.
   244.1 --- a/en/examples/tour-merge-conflict.pull.out	Thu Mar 26 08:57:10 2009 +0100
   244.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   244.3 @@ -1,14 +0,0 @@
   244.4 -$ \textbf{cd ..}
   244.5 -$ \textbf{hg clone scam-cousin scam-merge}
   244.6 -updating working directory
   244.7 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   244.8 -$ \textbf{cd scam-merge}
   244.9 -$ \textbf{hg pull -u ../scam-son}
  244.10 -pulling from ../scam-son
  244.11 -searching for changes
  244.12 -adding changesets
  244.13 -adding manifests
  244.14 -adding file changes
  244.15 -added 1 changesets with 1 changes to 1 files (+1 heads)
  244.16 -not updating, since new heads added
  244.17 -(run 'hg heads' to see heads, 'hg merge' to merge)
   245.1 --- a/en/examples/tour-merge-conflict.son.out	Thu Mar 26 08:57:10 2009 +0100
   245.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   245.3 @@ -1,11 +0,0 @@
   245.4 -$ \textbf{cd ..}
   245.5 -$ \textbf{hg clone scam scam-son}
   245.6 -updating working directory
   245.7 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   245.8 -$ \textbf{cd scam-son}
   245.9 -$ \textbf{cat > letter.txt <<EOF}
  245.10 -> \textbf{Greetings!}
  245.11 -> \textbf{I am Alhaji Abba Abacha, son of the former}
  245.12 -> \textbf{Nigerian dictator Sani Abacha.}
  245.13 -> \textbf{EOF}
  245.14 -$ \textbf{hg commit -m '419 scam, with son'}
   246.1 --- a/en/examples/tour-merge-conflict.wife.out	Thu Mar 26 08:57:10 2009 +0100
   246.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   246.3 @@ -1,7 +0,0 @@
   246.4 -$ \textbf{cat > letter.txt <<EOF}
   246.5 -> \textbf{Greetings!}
   246.6 -> \textbf{I am Mariam Abacha, the wife of former}
   246.7 -> \textbf{Nigerian dictator Sani Abacha.}
   246.8 -> \textbf{EOF}
   246.9 -$ \textbf{hg add letter.txt}
  246.10 -$ \textbf{hg commit -m '419 scam, first draft'}
   247.1 --- a/en/examples/tour.clone-pull.out	Thu Mar 26 08:57:10 2009 +0100
   247.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   247.3 @@ -1,4 +0,0 @@
   247.4 -$ \textbf{cd ..}
   247.5 -$ \textbf{hg clone hello hello-pull}
   247.6 -updating working directory
   247.7 -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   248.1 --- a/en/examples/tour.clone-push.out	Thu Mar 26 08:57:10 2009 +0100
   248.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   248.3 @@ -1,4 +0,0 @@
   248.4 -$ \textbf{cd ..}
   248.5 -$ \textbf{hg clone hello hello-push}
   248.6 -updating working directory
   248.7 -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   249.1 --- a/en/examples/tour.clone.out	Thu Mar 26 08:57:10 2009 +0100
   249.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   249.3 @@ -1,9 +0,0 @@
   249.4 -$ \textbf{hg clone http://hg.serpentine.com/tutorial/hello}
   249.5 -destination directory: hello
   249.6 -requesting all changes
   249.7 -adding changesets
   249.8 -adding manifests
   249.9 -adding file changes
  249.10 -added 5 changesets with 5 changes to 2 files
  249.11 -updating working directory
  249.12 -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   250.1 --- a/en/examples/tour.commit.out	Thu Mar 26 08:57:10 2009 +0100
   250.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   250.3 @@ -1,1 +0,0 @@
   250.4 -$ \textbf{hg commit}
   251.1 --- a/en/examples/tour.diff.out	Thu Mar 26 08:57:10 2009 +0100
   251.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   251.3 @@ -1,11 +0,0 @@
   251.4 -$ \textbf{hg diff}
   251.5 -diff -r  hello.c
   251.6 -
   251.7 -
   251.8 -@@ -8,5 +8,6 @@
   251.9 - int main(int argc, char **argv)
  251.10 - \{
  251.11 - 	printf("hello, world!\textbackslash{}");
  251.12 -+	printf("hello again!\textbackslash{}n");
  251.13 - 	return 0;
  251.14 - \}
   252.1 --- a/en/examples/tour.help.out	Thu Mar 26 08:57:10 2009 +0100
   252.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   252.3 @@ -1,20 +0,0 @@
   252.4 -$ \textbf{hg help init}
   252.5 -hg init [-e CMD] [--remotecmd CMD] [DEST]
   252.6 -
   252.7 -create a new repository in the given directory
   252.8 -
   252.9 -    Initialize a new repository in the given directory.  If the given
  252.10 -    directory does not exist, it is created.
  252.11 -
  252.12 -    If no directory is given, the current directory is used.
  252.13 -
  252.14 -    It is possible to specify an ssh:// URL as the destination.
  252.15 -    Look at the help text for the pull command for important details
  252.16 -    about ssh:// URLs.
  252.17 -
  252.18 -options:
  252.19 -
  252.20 - -e --ssh        specify ssh command to use
  252.21 -    --remotecmd  specify hg command to run on the remote side
  252.22 -
  252.23 -use "hg -v help init" to show global options
   253.1 --- a/en/examples/tour.incoming.out	Thu Mar 26 08:57:10 2009 +0100
   253.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   253.3 @@ -1,10 +0,0 @@
   253.4 -$ \textbf{cd hello-pull}
   253.5 -$ \textbf{hg incoming ../my-hello}
   253.6 -comparing with ../my-hello
   253.7 -searching for changes
   253.8 -changeset:   
   253.9 -tag:         tip
  253.10 -user:        Bryan O'Sullivan <bos@serpentine.com>
  253.11 -
  253.12 -summary:     Added an extra line of output
  253.13 -
   254.1 --- a/en/examples/tour.log-r.out	Thu Mar 26 08:57:10 2009 +0100
   254.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   254.3 @@ -1,24 +0,0 @@
   254.4 -$ \textbf{hg log -r 3}
   254.5 -changeset:   
   254.6 -user:        Bryan O'Sullivan <bos@serpentine.com>
   254.7 -
   254.8 -summary:     Get make to generate the final binary from a .o file.
   254.9 -
  254.10 -$ \textbf{hg log -r }
  254.11 -changeset:   
  254.12 -user:        Bryan O'Sullivan <bos@serpentine.com>
  254.13 -
  254.14 -summary:     Get make to generate the final binary from a .o file.
  254.15 -
  254.16 -$ \textbf{hg log -r 1 -r 4}
  254.17 -changeset:   
  254.18 -user:        mpm@selenic.com
  254.19 -
  254.20 -summary:     Create a makefile
  254.21 -
  254.22 -changeset:   
  254.23 -tag:         tip
  254.24 -user:        Bryan O'Sullivan <bos@serpentine.com>
  254.25 -
  254.26 -summary:     Trim comments.
  254.27 -
   255.1 --- a/en/examples/tour.log-v.out	Thu Mar 26 08:57:10 2009 +0100
   255.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   255.3 @@ -1,9 +0,0 @@
   255.4 -$ \textbf{hg log -v -r 3}
   255.5 -changeset:   
   255.6 -user:        Bryan O'Sullivan <bos@serpentine.com>
   255.7 -
   255.8 -files:       Makefile
   255.9 -description:
  255.10 -Get make to generate the final binary from a .o file.
  255.11 -
  255.12 -
   256.1 --- a/en/examples/tour.log-vp.out	Thu Mar 26 08:57:10 2009 +0100
   256.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   256.3 @@ -1,21 +0,0 @@
   256.4 -$ \textbf{hg log -v -p -r 2}
   256.5 -changeset:   
   256.6 -user:        Bryan O'Sullivan <bos@serpentine.com>
   256.7 -
   256.8 -files:       hello.c
   256.9 -description:
  256.10 -Introduce a typo into hello.c.
  256.11 -
  256.12 -
  256.13 -diff -r  -r  hello.c
  256.14 -
  256.15 -
  256.16 -@@ -11,6 +11,6 @@
  256.17 - 
  256.18 - int main(int argc, char **argv)
  256.19 - \{
  256.20 --	printf("hello, world!\textbackslash{}n");
  256.21 -+	printf("hello, world!\textbackslash{}");
  256.22 - 	return 0;
  256.23 - \}
  256.24 -
   257.1 --- a/en/examples/tour.log.out	Thu Mar 26 08:57:10 2009 +0100
   257.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   257.3 @@ -1,27 +0,0 @@
   257.4 -$ \textbf{hg log}
   257.5 -changeset:   
   257.6 -tag:         tip
   257.7 -user:        Bryan O'Sullivan <bos@serpentine.com>
   257.8 -
   257.9 -summary:     Trim comments.
  257.10 -
  257.11 -changeset:   
  257.12 -user:        Bryan O'Sullivan <bos@serpentine.com>
  257.13 -
  257.14 -summary:     Get make to generate the final binary from a .o file.
  257.15 -
  257.16 -changeset:   
  257.17 -user:        Bryan O'Sullivan <bos@serpentine.com>
  257.18 -
  257.19 -summary:     Introduce a typo into hello.c.
  257.20 -
  257.21 -changeset:   
  257.22 -user:        mpm@selenic.com
  257.23 -
  257.24 -summary:     Create a makefile
  257.25 -
  257.26 -changeset:   
  257.27 -user:        mpm@selenic.com
  257.28 -
  257.29 -summary:     Create a standard "hello, world" program
  257.30 -
   258.1 --- a/en/examples/tour.log.range.out	Thu Mar 26 08:57:10 2009 +0100
   258.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   258.3 @@ -1,17 +0,0 @@
   258.4 -$ \textbf{hg log -r 2:4}
   258.5 -changeset:   
   258.6 -user:        Bryan O'Sullivan <bos@serpentine.com>
   258.7 -
   258.8 -summary:     Introduce a typo into hello.c.
   258.9 -
  258.10 -changeset:   
  258.11 -user:        Bryan O'Sullivan <bos@serpentine.com>
  258.12 -
  258.13 -summary:     Get make to generate the final binary from a .o file.
  258.14 -
  258.15 -changeset:   
  258.16 -tag:         tip
  258.17 -user:        Bryan O'Sullivan <bos@serpentine.com>
  258.18 -
  258.19 -summary:     Trim comments.
  258.20 -
   259.1 --- a/en/examples/tour.ls-a.out	Thu Mar 26 08:57:10 2009 +0100
   259.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   259.3 @@ -1,3 +0,0 @@
   259.4 -$ \textbf{cd hello}
   259.5 -$ \textbf{ls -a}
   259.6 -.  ..  .hg  Makefile  hello.c
   260.1 --- a/en/examples/tour.ls.out	Thu Mar 26 08:57:10 2009 +0100
   260.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   260.3 @@ -1,5 +0,0 @@
   260.4 -$ \textbf{ls -l}
   260.5 -
   260.6 -
   260.7 -$ \textbf{ls hello}
   260.8 -Makefile  hello.c
   261.1 --- a/en/examples/tour.merge.cat.out	Thu Mar 26 08:57:10 2009 +0100
   261.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   261.3 @@ -1,28 +0,0 @@
   261.4 -$ \textbf{cat hello.c}
   261.5 -/*
   261.6 - * Placed in the public domain by Bryan O'Sullivan.  This program is
   261.7 - * not covered by patents in the United States or other countries.
   261.8 - */
   261.9 -
  261.10 -#include <stdio.h>
  261.11 -
  261.12 -int main(int argc, char **argv)
  261.13 -\{
  261.14 -	printf("once more, hello.\textbackslash{}n");
  261.15 -	printf("hello, world!\textbackslash{}");
  261.16 -	return 0;
  261.17 -\}
  261.18 -$ \textbf{cat ../my-hello/hello.c}
  261.19 -/*
  261.20 - * Placed in the public domain by Bryan O'Sullivan.  This program is
  261.21 - * not covered by patents in the United States or other countries.
  261.22 - */
  261.23 -
  261.24 -#include <stdio.h>
  261.25 -
  261.26 -int main(int argc, char **argv)
  261.27 -\{
  261.28 -	printf("hello, world!\textbackslash{}");
  261.29 -	printf("hello again!\textbackslash{}n");
  261.30 -	return 0;
  261.31 -\}
   262.1 --- a/en/examples/tour.merge.clone.out	Thu Mar 26 08:57:10 2009 +0100
   262.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   262.3 @@ -1,7 +0,0 @@
   262.4 -$ \textbf{cd ..}
   262.5 -$ \textbf{hg clone hello my-new-hello}
   262.6 -updating working directory
   262.7 -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   262.8 -$ \textbf{cd my-new-hello}
   262.9 -$ \textbf{sed -i '/printf/i\textbackslash{}\textbackslash{}tprintf("once more, hello.\textbackslash{}\textbackslash{}n");' hello.c}
  262.10 -$ \textbf{hg commit -m 'A new hello for a new day.'}
   263.1 --- a/en/examples/tour.merge.commit.out	Thu Mar 26 08:57:10 2009 +0100
   263.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   263.3 @@ -1,1 +0,0 @@
   263.4 -$ \textbf{hg commit -m 'Merged changes'}
   264.1 --- a/en/examples/tour.merge.heads.out	Thu Mar 26 08:57:10 2009 +0100
   264.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   264.3 @@ -1,13 +0,0 @@
   264.4 -$ \textbf{hg heads}
   264.5 -changeset:   
   264.6 -tag:         tip
   264.7 -parent:      
   264.8 -user:        Bryan O'Sullivan <bos@serpentine.com>
   264.9 -
  264.10 -summary:     Added an extra line of output
  264.11 -
  264.12 -changeset:   
  264.13 -user:        Bryan O'Sullivan <bos@serpentine.com>
  264.14 -
  264.15 -summary:     A new hello for a new day.
  264.16 -
   265.1 --- a/en/examples/tour.merge.merge.out	Thu Mar 26 08:57:10 2009 +0100
   265.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   265.3 @@ -1,4 +0,0 @@
   265.4 -$ \textbf{hg merge}
   265.5 -merging hello.c
   265.6 -0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   265.7 -(branch merge, don't forget to commit)
   266.1 --- a/en/examples/tour.merge.parents.out	Thu Mar 26 08:57:10 2009 +0100
   266.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   266.3 @@ -1,28 +0,0 @@
   266.4 -$ \textbf{hg parents}
   266.5 -changeset:   
   266.6 -user:        Bryan O'Sullivan <bos@serpentine.com>
   266.7 -
   266.8 -summary:     A new hello for a new day.
   266.9 -
  266.10 -changeset:   
  266.11 -tag:         tip
  266.12 -parent:      
  266.13 -user:        Bryan O'Sullivan <bos@serpentine.com>
  266.14 -
  266.15 -summary:     Added an extra line of output
  266.16 -
  266.17 -$ \textbf{cat hello.c}
  266.18 -/*
  266.19 - * Placed in the public domain by Bryan O'Sullivan.  This program is
  266.20 - * not covered by patents in the United States or other countries.
  266.21 - */
  266.22 -
  266.23 -#include <stdio.h>
  266.24 -
  266.25 -int main(int argc, char **argv)
  266.26 -\{
  266.27 -	printf("once more, hello.\textbackslash{}n");
  266.28 -	printf("hello, world!\textbackslash{}");
  266.29 -	printf("hello again!\textbackslash{}n");
  266.30 -	return 0;
  266.31 -\}
   267.1 --- a/en/examples/tour.merge.pull.out	Thu Mar 26 08:57:10 2009 +0100
   267.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   267.3 @@ -1,8 +0,0 @@
   267.4 -$ \textbf{hg pull ../my-hello}
   267.5 -pulling from ../my-hello
   267.6 -searching for changes
   267.7 -adding changesets
   267.8 -adding manifests
   267.9 -adding file changes
  267.10 -added 1 changesets with 1 changes to 1 files (+1 heads)
  267.11 -(run 'hg heads' to see heads, 'hg merge' to merge)
   268.1 --- a/en/examples/tour.merge.tip.out	Thu Mar 26 08:57:10 2009 +0100
   268.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   268.3 @@ -1,9 +0,0 @@
   268.4 -$ \textbf{hg tip}
   268.5 -changeset:   
   268.6 -tag:         tip
   268.7 -parent:      
   268.8 -parent:      
   268.9 -user:        Bryan O'Sullivan <bos@serpentine.com>
  268.10 -
  268.11 -summary:     Merged changes
  268.12 -
   269.1 --- a/en/examples/tour.merge.update.out	Thu Mar 26 08:57:10 2009 +0100
   269.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   269.3 @@ -1,2 +0,0 @@
   269.4 -$ \textbf{hg update}
   269.5 -abort: crosses branches (use 'hg merge' or 'hg update -C')
   270.1 --- a/en/examples/tour.older.out	Thu Mar 26 08:57:10 2009 +0100
   270.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   270.3 @@ -1,10 +0,0 @@
   270.4 -$ \textbf{hg update 2}
   270.5 -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   270.6 -$ \textbf{hg parents}
   270.7 -changeset:   
   270.8 -user:        Bryan O'Sullivan <bos@serpentine.com>
   270.9 -
  270.10 -summary:     Introduce a typo into hello.c.
  270.11 -
  270.12 -$ \textbf{hg update}
  270.13 -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   271.1 --- a/en/examples/tour.outgoing.net.out	Thu Mar 26 08:57:10 2009 +0100
   271.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   271.3 @@ -1,9 +0,0 @@
   271.4 -$ \textbf{hg outgoing http://hg.serpentine.com/tutorial/hello}
   271.5 -comparing with http://hg.serpentine.com/tutorial/hello
   271.6 -searching for changes
   271.7 -changeset:   
   271.8 -tag:         tip
   271.9 -user:        Bryan O'Sullivan <bos@serpentine.com>
  271.10 -
  271.11 -summary:     Added an extra line of output
  271.12 -
   272.1 --- a/en/examples/tour.outgoing.out	Thu Mar 26 08:57:10 2009 +0100
   272.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   272.3 @@ -1,10 +0,0 @@
   272.4 -$ \textbf{cd my-hello}
   272.5 -$ \textbf{hg outgoing ../hello-push}
   272.6 -comparing with ../hello-push
   272.7 -searching for changes
   272.8 -changeset:   
   272.9 -tag:         tip
  272.10 -user:        Bryan O'Sullivan <bos@serpentine.com>
  272.11 -
  272.12 -summary:     Added an extra line of output
  272.13 -
   273.1 --- a/en/examples/tour.parents.out	Thu Mar 26 08:57:10 2009 +0100
   273.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   273.3 @@ -1,7 +0,0 @@
   273.4 -$ \textbf{hg parents}
   273.5 -changeset:   
   273.6 -tag:         tip
   273.7 -user:        Bryan O'Sullivan <bos@serpentine.com>
   273.8 -
   273.9 -summary:     Added an extra line of output
  273.10 -
   274.1 --- a/en/examples/tour.pull.out	Thu Mar 26 08:57:10 2009 +0100
   274.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   274.3 @@ -1,22 +0,0 @@
   274.4 -$ \textbf{hg tip}
   274.5 -changeset:   
   274.6 -tag:         tip
   274.7 -user:        Bryan O'Sullivan <bos@serpentine.com>
   274.8 -
   274.9 -summary:     Trim comments.
  274.10 -
  274.11 -$ \textbf{hg pull ../my-hello}
  274.12 -pulling from ../my-hello
  274.13 -searching for changes
  274.14 -adding changesets
  274.15 -adding manifests
  274.16 -adding file changes
  274.17 -added 1 changesets with 1 changes to 1 files
  274.18 -(run 'hg update' to get a working copy)
  274.19 -$ \textbf{hg tip}
  274.20 -changeset:   
  274.21 -tag:         tip
  274.22 -user:        Bryan O'Sullivan <bos@serpentine.com>
  274.23 -
  274.24 -summary:     Added an extra line of output
  274.25 -
   275.1 --- a/en/examples/tour.push.net.out	Thu Mar 26 08:57:10 2009 +0100
   275.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   275.3 @@ -1,4 +0,0 @@
   275.4 -$ \textbf{hg push http://hg.serpentine.com/tutorial/hello}
   275.5 -pushing to http://hg.serpentine.com/tutorial/hello
   275.6 -searching for changes
   275.7 -ssl required
   276.1 --- a/en/examples/tour.push.nothing.out	Thu Mar 26 08:57:10 2009 +0100
   276.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   276.3 @@ -1,4 +0,0 @@
   276.4 -$ \textbf{hg push ../hello-push}
   276.5 -pushing to ../hello-push
   276.6 -searching for changes
   276.7 -no changes found
   277.1 --- a/en/examples/tour.push.out	Thu Mar 26 08:57:10 2009 +0100
   277.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   277.3 @@ -1,7 +0,0 @@
   277.4 -$ \textbf{hg push ../hello-push}
   277.5 -pushing to ../hello-push
   277.6 -searching for changes
   277.7 -adding changesets
   277.8 -adding manifests
   277.9 -adding file changes
  277.10 -added 1 changesets with 1 changes to 1 files
   278.1 --- a/en/examples/tour.reclone.out	Thu Mar 26 08:57:10 2009 +0100
   278.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   278.3 @@ -1,5 +0,0 @@
   278.4 -$ \textbf{cd ..}
   278.5 -$ \textbf{hg clone hello my-hello}
   278.6 -updating working directory
   278.7 -2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   278.8 -$ \textbf{cd my-hello}
   279.1 --- a/en/examples/tour.sed.out	Thu Mar 26 08:57:10 2009 +0100
   279.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   279.3 @@ -1,1 +0,0 @@
   279.4 -$ \textbf{sed -i '/printf/a\textbackslash{}\textbackslash{}tprintf("hello again!\textbackslash{}\textbackslash{}n");' hello.c}
   280.1 --- a/en/examples/tour.status.out	Thu Mar 26 08:57:10 2009 +0100
   280.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   280.3 @@ -1,4 +0,0 @@
   280.4 -$ \textbf{ls}
   280.5 -Makefile  hello.c
   280.6 -$ \textbf{hg status}
   280.7 -M hello.c
   281.1 --- a/en/examples/tour.tip.out	Thu Mar 26 08:57:10 2009 +0100
   281.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   281.3 @@ -1,21 +0,0 @@
   281.4 -$ \textbf{hg tip -vp}
   281.5 -changeset:   
   281.6 -tag:         tip
   281.7 -user:        Bryan O'Sullivan <bos@serpentine.com>
   281.8 -
   281.9 -files:       hello.c
  281.10 -description:
  281.11 -Added an extra line of output
  281.12 -
  281.13 -
  281.14 -diff -r  -r  hello.c
  281.15 -
  281.16 -
  281.17 -@@ -8,5 +8,6 @@
  281.18 - int main(int argc, char **argv)
  281.19 - \{
  281.20 - 	printf("hello, world!\textbackslash{}");
  281.21 -+	printf("hello again!\textbackslash{}n");
  281.22 - 	return 0;
  281.23 - \}
  281.24 -
   282.1 --- a/en/examples/tour.update.out	Thu Mar 26 08:57:10 2009 +0100
   282.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   282.3 @@ -1,7 +0,0 @@
   282.4 -$ \textbf{grep printf hello.c}
   282.5 -	printf("hello, world!\textbackslash{}");
   282.6 -$ \textbf{hg update tip}
   282.7 -1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   282.8 -$ \textbf{grep printf hello.c}
   282.9 -	printf("hello, world!\textbackslash{}");
  282.10 -	printf("hello again!\textbackslash{}n");
   283.1 --- a/en/examples/tour.version.out	Thu Mar 26 08:57:10 2009 +0100
   283.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   283.3 @@ -1,6 +0,0 @@
   283.4 -$ \textbf{hg version}
   283.5 -Mercurial Distributed SCM (version 1.0)
   283.6 -
   283.7 -Copyright (C) 2005-2008 Matt Mackall <mpm@selenic.com> and others
   283.8 -This is free software; see the source for copying conditions. There is NO
   283.9 -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   284.1 --- a/en/feature-branches.dot	Thu Mar 26 08:57:10 2009 +0100
   284.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   284.3 @@ -1,8 +0,0 @@
   284.4 -digraph feature_branches {
   284.5 -	master -> crypto;
   284.6 -	master -> filesystems;
   284.7 -	master -> ipc;
   284.8 -	master -> memory;
   284.9 -	master -> network;
  284.10 -	master -> security;
  284.11 -}
   285.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   285.2 +++ b/en/figs/bad-merge-1.dot	Sun Aug 16 03:41:39 2009 +0200
   285.3 @@ -0,0 +1,13 @@
   285.4 +digraph bad_merge_1 {
   285.5 +	ancestor [label="1: ancestor"];
   285.6 +	left [label="2: my change"];
   285.7 +	right [label="3: your change"];
   285.8 +	bad [label="4: bad merge"];
   285.9 +	new [label="5: new change"];
  285.10 +
  285.11 +	ancestor -> left;
  285.12 +	ancestor -> right;
  285.13 +	left -> bad;
  285.14 +	right -> bad;
  285.15 +	bad -> new;
  285.16 +}
   286.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   286.2 +++ b/en/figs/bad-merge-2.dot	Sun Aug 16 03:41:39 2009 +0200
   286.3 @@ -0,0 +1,18 @@
   286.4 +digraph bad_merge_2 {
   286.5 +	ancestor [label="1: ancestor",color=grey,fontcolor=grey];
   286.6 +	left [label="2: my change",color=grey,fontcolor=grey];
   286.7 +	right [label="3: your change",color=grey,fontcolor=grey];
   286.8 +	bad [label="4: bad merge",color=grey,fontcolor=grey];
   286.9 +	new [label="5: new change",color=grey,fontcolor=grey];
  286.10 +
  286.11 +	bak_left [label="6: backout 1 of\nbad merge",shape=box];
  286.12 +
  286.13 +	ancestor -> left [color=grey];
  286.14 +	ancestor -> right [color=grey];
  286.15 +	left -> bad [color=grey];
  286.16 +	right -> bad [color=grey];
  286.17 +	bad -> new [color=grey];
  286.18 +
  286.19 +	bad -> bak_left;
  286.20 +	left -> bak_left [style=dotted,label="--parent=2"];
  286.21 +}
   287.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   287.2 +++ b/en/figs/bad-merge-3.dot	Sun Aug 16 03:41:39 2009 +0200
   287.3 @@ -0,0 +1,22 @@
   287.4 +digraph bad_merge_3 {
   287.5 +	ancestor [label="1: ancestor",color="#bbbbbb",fontcolor="#bbbbbb"];
   287.6 +	left [label="2: my change",color="#bbbbbb",fontcolor="#bbbbbb"];
   287.7 +	right [label="3: your change",color="#bbbbbb",fontcolor="#bbbbbb"];
   287.8 +	bad [label="4: bad merge",color="#bbbbbb",fontcolor="#bbbbbb"];
   287.9 +	new [label="5: new change",color="#bbbbbb",fontcolor="#bbbbbb"];
  287.10 +
  287.11 +	bak_left [label="6: backout 1 of\nbad merge",color=grey,shape=box];
  287.12 +	bak_right [label="8: backout 2 of\nbad merge",shape=box];
  287.13 +
  287.14 +	ancestor -> left [color="#bbbbbb"];
  287.15 +	ancestor -> right [color="#bbbbbb"];
  287.16 +	left -> bad [color="#bbbbbb"];
  287.17 +	right -> bad [color="#bbbbbb"];
  287.18 +	bad -> new [color="#bbbbbb"];
  287.19 +
  287.20 +	bad -> bak_left [color=grey];
  287.21 +	left -> bak_left [style=dotted,label="--parent=2",color=grey,fontcolor=grey];
  287.22 +
  287.23 +	bad -> bak_right;
  287.24 +	right -> bak_right [style=dotted,label="--parent=3"];
  287.25 +}
   288.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   288.2 +++ b/en/figs/bad-merge-4.dot	Sun Aug 16 03:41:39 2009 +0200
   288.3 @@ -0,0 +1,26 @@
   288.4 +digraph bad_merge_4 {
   288.5 +	ancestor [label="1: ancestor",color="#bbbbbb",fontcolor="#bbbbbb"];
   288.6 +	left [label="2: my change",color="#bbbbbb",fontcolor="#bbbbbb"];
   288.7 +	right [label="3: your change",color="#bbbbbb",fontcolor="#bbbbbb"];
   288.8 +	bad [label="4: bad merge",color="#bbbbbb",fontcolor="#bbbbbb"];
   288.9 +	new [label="5: new change",color="#bbbbbb",fontcolor="#bbbbbb"];
  288.10 +
  288.11 +	bak_left [label="6: backout 1 of\nbad merge",color=grey,fontcolor=grey,shape=box];
  288.12 +	bak_right [label="7: backout 2 of\nbad merge",color=grey,fontcolor=grey,shape=box];
  288.13 +	good [label="8: merge\nof backouts",shape=box];
  288.14 +
  288.15 +	ancestor -> left [color="#bbbbbb"];
  288.16 +	ancestor -> right [color="#bbbbbb"];
  288.17 +	left -> bad [color="#bbbbbb"];
  288.18 +	right -> bad [color="#bbbbbb"];
  288.19 +	bad -> new [color="#bbbbbb"];
  288.20 +
  288.21 +	bad -> bak_left [color=grey];
  288.22 +	left -> bak_left [style=dotted,label="--parent=2",color=grey,fontcolor=grey];
  288.23 +
  288.24 +	bad -> bak_right [color=grey];
  288.25 +	right -> bak_right [style=dotted,label="--parent=3",color=grey,fontcolor=grey];
  288.26 +
  288.27 +	bak_left -> good;
  288.28 +	bak_right -> good;
  288.29 +}
   289.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   289.2 +++ b/en/figs/bad-merge-5.dot	Sun Aug 16 03:41:39 2009 +0200
   289.3 @@ -0,0 +1,30 @@
   289.4 +digraph bad_merge_5 {
   289.5 +	ancestor [label="1: ancestor",color="#bbbbbb",fontcolor="#bbbbbb"];
   289.6 +	left [label="2: my change",color="#bbbbbb",fontcolor="#bbbbbb"];
   289.7 +	right [label="3: your change",color="#bbbbbb",fontcolor="#bbbbbb"];
   289.8 +	bad [label="4: bad merge",color="#bbbbbb",fontcolor="#bbbbbb"];
   289.9 +	new [label="5: new change",color=grey,fontcolor=grey];
  289.10 +
  289.11 +	bak_left [label="6: backout 1 of\nbad merge",color="#bbbbbb",fontcolor="#bbbbbb",shape=box];
  289.12 +	bak_right [label="7: backout 2 of\nbad merge",color="#bbbbbb",fontcolor="#bbbbbb",shape=box];
  289.13 +	good [label="8: merge\nof backouts",color=grey,fontcolor=grey,shape=box];
  289.14 +	last [label="9: merge with\nnew change",shape=box];
  289.15 +
  289.16 +	ancestor -> left [color="#bbbbbb"];
  289.17 +	ancestor -> right [color="#bbbbbb"];
  289.18 +	left -> bad [color="#bbbbbb"];
  289.19 +	right -> bad [color="#bbbbbb"];
  289.20 +	bad -> new [color="#bbbbbb"];
  289.21 +
  289.22 +	bad -> bak_left [color="#bbbbbb"];
  289.23 +	left -> bak_left [style=dotted,label="--parent=2",color="#bbbbbb",fontcolor="#bbbbbb"];
  289.24 +
  289.25 +	bad -> bak_right [color="#bbbbbb"];
  289.26 +	right -> bak_right [style=dotted,label="--parent=3",color="#bbbbbb",fontcolor="#bbbbbb"];
  289.27 +
  289.28 +	bak_left -> good [color=grey];
  289.29 +	bak_right -> good [color=grey];
  289.30 +
  289.31 +	good -> last;
  289.32 +	new -> last;
  289.33 +}
   290.1 Binary file en/figs/caution.png has changed
   291.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   291.2 +++ b/en/figs/feature-branches.dot	Sun Aug 16 03:41:39 2009 +0200
   291.3 @@ -0,0 +1,8 @@
   291.4 +digraph feature_branches {
   291.5 +	master -> crypto;
   291.6 +	master -> filesystems;
   291.7 +	master -> ipc;
   291.8 +	master -> memory;
   291.9 +	master -> network;
  291.10 +	master -> security;
  291.11 +}
   292.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   292.2 +++ b/en/figs/filelog.svg	Sun Aug 16 03:41:39 2009 +0200
   292.3 @@ -0,0 +1,381 @@
   292.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   292.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   292.6 +<svg
   292.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   292.8 +   xmlns:cc="http://creativecommons.org/ns#"
   292.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  292.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  292.11 +   xmlns="http://www.w3.org/2000/svg"
  292.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  292.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  292.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  292.15 +   width="744.09448819"
  292.16 +   height="1052.3622047"
  292.17 +   id="svg2"
  292.18 +   sodipodi:version="0.32"
  292.19 +   inkscape:version="0.46"
  292.20 +   sodipodi:docname="filelog.svg"
  292.21 +   sodipodi:docbase="/home/arun/hgbook/en"
  292.22 +   inkscape:output_extension="org.inkscape.output.svg.inkscape">
  292.23 +  <defs
  292.24 +     id="defs4">
  292.25 +    <inkscape:perspective
  292.26 +       sodipodi:type="inkscape:persp3d"
  292.27 +       inkscape:vp_x="0 : 526.18109 : 1"
  292.28 +       inkscape:vp_y="0 : 1000 : 0"
  292.29 +       inkscape:vp_z="744.09448 : 526.18109 : 1"
  292.30 +       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
  292.31 +       id="perspective57" />
  292.32 +    <marker
  292.33 +       inkscape:stockid="Arrow1Mend"
  292.34 +       orient="auto"
  292.35 +       refY="0.0"
  292.36 +       refX="0.0"
  292.37 +       id="Arrow1Mend"
  292.38 +       style="overflow:visible;">
  292.39 +      <path
  292.40 +         id="path3128"
  292.41 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  292.42 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  292.43 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  292.44 +    </marker>
  292.45 +    <linearGradient
  292.46 +       id="linearGradient2887">
  292.47 +      <stop
  292.48 +         style="stop-color:#91cfcf;stop-opacity:1;"
  292.49 +         offset="0"
  292.50 +         id="stop2889" />
  292.51 +      <stop
  292.52 +         style="stop-color:aqua;stop-opacity:0;"
  292.53 +         offset="1"
  292.54 +         id="stop2891" />
  292.55 +    </linearGradient>
  292.56 +    <linearGradient
  292.57 +       id="linearGradient2795">
  292.58 +      <stop
  292.59 +         style="stop-color:#ccc;stop-opacity:1;"
  292.60 +         offset="0"
  292.61 +         id="stop2797" />
  292.62 +      <stop
  292.63 +         style="stop-color:#ccc;stop-opacity:0;"
  292.64 +         offset="1"
  292.65 +         id="stop2799" />
  292.66 +    </linearGradient>
  292.67 +    <linearGradient
  292.68 +       inkscape:collect="always"
  292.69 +       xlink:href="#linearGradient2795"
  292.70 +       id="linearGradient3170"
  292.71 +       gradientUnits="userSpaceOnUse"
  292.72 +       gradientTransform="translate(121.2183,94.95434)"
  292.73 +       x1="81.322357"
  292.74 +       y1="404.34424"
  292.75 +       x2="201.52036"
  292.76 +       y2="373.03967" />
  292.77 +    <linearGradient
  292.78 +       inkscape:collect="always"
  292.79 +       xlink:href="#linearGradient2887"
  292.80 +       id="linearGradient3172"
  292.81 +       gradientUnits="userSpaceOnUse"
  292.82 +       gradientTransform="translate(0,12)"
  292.83 +       x1="62.634491"
  292.84 +       y1="503.3392"
  292.85 +       x2="248.49242"
  292.86 +       y2="462.94327" />
  292.87 +    <linearGradient
  292.88 +       inkscape:collect="always"
  292.89 +       xlink:href="#linearGradient2795"
  292.90 +       id="linearGradient3174"
  292.91 +       gradientUnits="userSpaceOnUse"
  292.92 +       gradientTransform="matrix(1.001035,0,0,0.653159,236.7075,153.0415)"
  292.93 +       x1="81.322357"
  292.94 +       y1="404.34424"
  292.95 +       x2="201.52036"
  292.96 +       y2="373.03967" />
  292.97 +    <linearGradient
  292.98 +       inkscape:collect="always"
  292.99 +       xlink:href="#linearGradient2887"
 292.100 +       id="linearGradient3176"
 292.101 +       gradientUnits="userSpaceOnUse"
 292.102 +       gradientTransform="translate(0,12)"
 292.103 +       x1="62.634491"
 292.104 +       y1="503.3392"
 292.105 +       x2="248.49242"
 292.106 +       y2="462.94327" />
 292.107 +    <linearGradient
 292.108 +       inkscape:collect="always"
 292.109 +       xlink:href="#linearGradient2795"
 292.110 +       id="linearGradient3208"
 292.111 +       gradientUnits="userSpaceOnUse"
 292.112 +       gradientTransform="matrix(1.001035,0,0,0.653159,236.7075,153.0415)"
 292.113 +       x1="81.322357"
 292.114 +       y1="404.34424"
 292.115 +       x2="201.52036"
 292.116 +       y2="373.03967" />
 292.117 +    <linearGradient
 292.118 +       inkscape:collect="always"
 292.119 +       xlink:href="#linearGradient2887"
 292.120 +       id="linearGradient3210"
 292.121 +       gradientUnits="userSpaceOnUse"
 292.122 +       gradientTransform="translate(0,12)"
 292.123 +       x1="62.634491"
 292.124 +       y1="503.3392"
 292.125 +       x2="248.49242"
 292.126 +       y2="462.94327" />
 292.127 +    <linearGradient
 292.128 +       inkscape:collect="always"
 292.129 +       xlink:href="#linearGradient2795"
 292.130 +       id="linearGradient3212"
 292.131 +       gradientUnits="userSpaceOnUse"
 292.132 +       gradientTransform="translate(121.2183,94.95434)"
 292.133 +       x1="81.322357"
 292.134 +       y1="404.34424"
 292.135 +       x2="201.52036"
 292.136 +       y2="373.03967" />
 292.137 +    <linearGradient
 292.138 +       inkscape:collect="always"
 292.139 +       xlink:href="#linearGradient2887"
 292.140 +       id="linearGradient3214"
 292.141 +       gradientUnits="userSpaceOnUse"
 292.142 +       gradientTransform="translate(0,12)"
 292.143 +       x1="62.634491"
 292.144 +       y1="503.3392"
 292.145 +       x2="248.49242"
 292.146 +       y2="462.94327" />
 292.147 +    <linearGradient
 292.148 +       inkscape:collect="always"
 292.149 +       xlink:href="#linearGradient2795"
 292.150 +       id="linearGradient3256"
 292.151 +       gradientUnits="userSpaceOnUse"
 292.152 +       gradientTransform="matrix(1.2343775,0,0,0.9981848,103.25588,95.681888)"
 292.153 +       x1="74.301666"
 292.154 +       y1="431.67441"
 292.155 +       x2="260.05884"
 292.156 +       y2="369.95322" />
 292.157 +    <linearGradient
 292.158 +       inkscape:collect="always"
 292.159 +       xlink:href="#linearGradient2887"
 292.160 +       id="linearGradient3258"
 292.161 +       gradientUnits="userSpaceOnUse"
 292.162 +       gradientTransform="matrix(1.228929,0,0,0.9972824,-62.037003,13.312997)"
 292.163 +       x1="62.634491"
 292.164 +       y1="503.3392"
 292.165 +       x2="248.49242"
 292.166 +       y2="462.94327" />
 292.167 +    <linearGradient
 292.168 +       inkscape:collect="always"
 292.169 +       xlink:href="#linearGradient2795"
 292.170 +       id="linearGradient3260"
 292.171 +       gradientUnits="userSpaceOnUse"
 292.172 +       gradientTransform="matrix(1.2300738,0,0,0.6517275,219.97511,153.61527)"
 292.173 +       x1="74.387527"
 292.174 +       y1="431.80576"
 292.175 +       x2="259.97339"
 292.176 +       y2="369.82224" />
 292.177 +    <linearGradient
 292.178 +       inkscape:collect="always"
 292.179 +       xlink:href="#linearGradient2887"
 292.180 +       id="linearGradient3262"
 292.181 +       gradientUnits="userSpaceOnUse"
 292.182 +       gradientTransform="matrix(1.2289272,0,0,0.9972824,-62.036756,13.312985)"
 292.183 +       x1="62.634491"
 292.184 +       y1="503.3392"
 292.185 +       x2="248.49242"
 292.186 +       y2="462.94327" />
 292.187 +  </defs>
 292.188 +  <sodipodi:namedview
 292.189 +     id="base"
 292.190 +     pagecolor="#ffffff"
 292.191 +     bordercolor="#666666"
 292.192 +     borderopacity="1.0"
 292.193 +     gridtolerance="10000"
 292.194 +     guidetolerance="10"
 292.195 +     objecttolerance="10"
 292.196 +     inkscape:pageopacity="0.0"
 292.197 +     inkscape:pageshadow="2"
 292.198 +     inkscape:zoom="1.4"
 292.199 +     inkscape:cx="455.8122"
 292.200 +     inkscape:cy="520"
 292.201 +     inkscape:document-units="px"
 292.202 +     inkscape:current-layer="g2940"
 292.203 +     inkscape:window-width="1680"
 292.204 +     inkscape:window-height="970"
 292.205 +     inkscape:window-x="3"
 292.206 +     inkscape:window-y="46"
 292.207 +     showgrid="false" />
 292.208 +  <metadata
 292.209 +     id="metadata7">
 292.210 +    <rdf:RDF>
 292.211 +      <cc:Work
 292.212 +         rdf:about="">
 292.213 +        <dc:format>image/svg+xml</dc:format>
 292.214 +        <dc:type
 292.215 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 292.216 +      </cc:Work>
 292.217 +    </rdf:RDF>
 292.218 +  </metadata>
 292.219 +  <g
 292.220 +     inkscape:label="Layer 1"
 292.221 +     inkscape:groupmode="layer"
 292.222 +     id="layer1">
 292.223 +    <rect
 292.224 +       style="opacity:1;fill:#abadf8;fill-opacity:1;stroke:#595959;stroke-width:0.93760371;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 292.225 +       id="rect3180"
 292.226 +       width="273.81375"
 292.227 +       height="199.06245"
 292.228 +       x="369.1796"
 292.229 +       y="351.79019" />
 292.230 +    <rect
 292.231 +       style="opacity:1;fill:#a2f69c;fill-opacity:1;stroke:#595959;stroke-width:0.93760341;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 292.232 +       id="rect3178"
 292.233 +       width="273.81339"
 292.234 +       height="199.06233"
 292.235 +       x="72.699799"
 292.236 +       y="351.78983" />
 292.237 +    <g
 292.238 +       id="g3144"
 292.239 +       transform="translate(80.467048,0.71578)">
 292.240 +      <g
 292.241 +         id="g2940">
 292.242 +        <rect
 292.243 +           style="fill:url(#linearGradient3260);fill-opacity:1;stroke:#000000;stroke-width:0.89536202;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 292.244 +           id="rect2914"
 292.245 +           width="227.38896"
 292.246 +           height="39.500999"
 292.247 +           x="311.92496"
 292.248 +           y="395.08627" />
 292.249 +        <text
 292.250 +           xml:space="preserve"
 292.251 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 292.252 +           x="323.72824"
 292.253 +           y="416.7626"
 292.254 +           id="text2918"><tspan
 292.255 +             sodipodi:role="line"
 292.256 +             id="tspan2920"
 292.257 +             x="323.72824"
 292.258 +             y="416.7626"
 292.259 +             style="font-family:Courier">.hg/store/data/_r_e_a_d_m_e.i</tspan></text>
 292.260 +      </g>
 292.261 +      <g
 292.262 +         transform="translate(3.79093e-5,-80.1853)"
 292.263 +         id="g2945">
 292.264 +        <g
 292.265 +           id="g2955">
 292.266 +          <rect
 292.267 +             y="475.4968"
 292.268 +             x="15.550935"
 292.269 +             height="39.500999"
 292.270 +             width="227.17694"
 292.271 +             id="rect2947"
 292.272 +             style="fill:url(#linearGradient3262);fill-opacity:1;stroke:#000000;stroke-width:1.10706258;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 292.273 +          <text
 292.274 +             id="text2949"
 292.275 +             y="498.35123"
 292.276 +             x="31.230644"
 292.277 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 292.278 +             xml:space="preserve"><tspan
 292.279 +               style="font-family:Courier"
 292.280 +               y="498.35123"
 292.281 +               x="31.230644"
 292.282 +               id="tspan2951"
 292.283 +               sodipodi:role="line">README</tspan></text>
 292.284 +        </g>
 292.285 +      </g>
 292.286 +      <path
 292.287 +         inkscape:connector-type="polyline"
 292.288 +         id="path2960"
 292.289 +         d="M 242.94685,414.91115 C 242.94685,414.91115 293.61127,415.26754 310.16269,415.38633"
 292.290 +         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.02046943px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 292.291 +         sodipodi:nodetypes="cz" />
 292.292 +    </g>
 292.293 +    <g
 292.294 +       id="g3156"
 292.295 +       transform="translate(80.467048,0.71578)">
 292.296 +      <g
 292.297 +         transform="translate(116,0)"
 292.298 +         id="g2831">
 292.299 +        <rect
 292.300 +           style="fill:url(#linearGradient3256);fill-opacity:1;stroke:#000000;stroke-width:1.11001658;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 292.301 +           id="rect1906"
 292.302 +           width="228.18446"
 292.303 +           height="60.499123"
 292.304 +           x="195.52719"
 292.305 +           y="465.51859" />
 292.306 +        <g
 292.307 +           id="g2803"
 292.308 +           transform="translate(-0.893671,1.833581)">
 292.309 +          <text
 292.310 +             id="text1884"
 292.311 +             y="483.92801"
 292.312 +             x="208.95944"
 292.313 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 292.314 +             xml:space="preserve"><tspan
 292.315 +               style="font-family:Courier"
 292.316 +               y="483.92801"
 292.317 +               x="208.95944"
 292.318 +               id="tspan1886"
 292.319 +               sodipodi:role="line">.hg/store/data/src/hello.c.d</tspan></text>
 292.320 +          <text
 292.321 +             id="text1888"
 292.322 +             y="507.79309"
 292.323 +             x="208.95944"
 292.324 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 292.325 +             xml:space="preserve"><tspan
 292.326 +               style="font-family:Courier"
 292.327 +               y="507.79309"
 292.328 +               x="208.95944"
 292.329 +               id="tspan1890"
 292.330 +               sodipodi:role="line">.hg/store/data/src/hello.c.i</tspan></text>
 292.331 +        </g>
 292.332 +      </g>
 292.333 +      <g
 292.334 +         id="g2907">
 292.335 +        <rect
 292.336 +           style="fill:url(#linearGradient3258);fill-opacity:1;stroke:#000000;stroke-width:1.10706329;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 292.337 +           id="rect2843"
 292.338 +           width="227.17728"
 292.339 +           height="39.500999"
 292.340 +           x="15.550805"
 292.341 +           y="475.4968" />
 292.342 +        <text
 292.343 +           xml:space="preserve"
 292.344 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 292.345 +           x="31.230644"
 292.346 +           y="498.35123"
 292.347 +           id="text2847"><tspan
 292.348 +             sodipodi:role="line"
 292.349 +             id="tspan2849"
 292.350 +             x="31.230644"
 292.351 +             y="498.35123"
 292.352 +             style="font-family:Courier">src/hello.c</tspan></text>
 292.353 +      </g>
 292.354 +      <path
 292.355 +         inkscape:connection-end="#g2831"
 292.356 +         inkscape:connection-start="#g2907"
 292.357 +         inkscape:connector-type="polyline"
 292.358 +         id="path2962"
 292.359 +         d="M 242.4315,495.88043 C 242.4315,495.88043 292.8861,495.99942 310.04102,496.03909"
 292.360 +         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 292.361 +         sodipodi:nodetypes="cs" />
 292.362 +    </g>
 292.363 +    <text
 292.364 +       xml:space="preserve"
 292.365 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 292.366 +       x="98.496666"
 292.367 +       y="373.96353"
 292.368 +       id="text3216"><tspan
 292.369 +         sodipodi:role="line"
 292.370 +         id="tspan3218"
 292.371 +         x="98.496666"
 292.372 +         y="373.96353">Working directory</tspan></text>
 292.373 +    <text
 292.374 +       xml:space="preserve"
 292.375 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 292.376 +       x="391.39197"
 292.377 +       y="373.96353"
 292.378 +       id="text3228"><tspan
 292.379 +         sodipodi:role="line"
 292.380 +         id="tspan3230"
 292.381 +         x="391.39197"
 292.382 +         y="373.96353">Repository</tspan></text>
 292.383 +  </g>
 292.384 +</svg>
   293.1 Binary file en/figs/kdiff3.png has changed
   294.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   294.2 +++ b/en/figs/metadata.svg	Sun Aug 16 03:41:39 2009 +0200
   294.3 @@ -0,0 +1,328 @@
   294.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   294.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   294.6 +<svg
   294.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   294.8 +   xmlns:cc="http://web.resource.org/cc/"
   294.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  294.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  294.11 +   xmlns="http://www.w3.org/2000/svg"
  294.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  294.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  294.14 +   width="744.09448819"
  294.15 +   height="1052.3622047"
  294.16 +   id="svg2"
  294.17 +   sodipodi:version="0.32"
  294.18 +   inkscape:version="0.44.1"
  294.19 +   sodipodi:docname="metadata.svg"
  294.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en">
  294.21 +  <defs
  294.22 +     id="defs4">
  294.23 +    <marker
  294.24 +       inkscape:stockid="Arrow1Mend"
  294.25 +       orient="auto"
  294.26 +       refY="0.0"
  294.27 +       refX="0.0"
  294.28 +       id="Arrow1Mend"
  294.29 +       style="overflow:visible;">
  294.30 +      <path
  294.31 +         id="path2944"
  294.32 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  294.33 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  294.34 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  294.35 +    </marker>
  294.36 +  </defs>
  294.37 +  <sodipodi:namedview
  294.38 +     id="base"
  294.39 +     pagecolor="#ffffff"
  294.40 +     bordercolor="#666666"
  294.41 +     borderopacity="1.0"
  294.42 +     gridtolerance="10000"
  294.43 +     guidetolerance="10"
  294.44 +     objecttolerance="10"
  294.45 +     inkscape:pageopacity="0.0"
  294.46 +     inkscape:pageshadow="2"
  294.47 +     inkscape:zoom="1.4"
  294.48 +     inkscape:cx="232.14286"
  294.49 +     inkscape:cy="490.68696"
  294.50 +     inkscape:document-units="px"
  294.51 +     inkscape:current-layer="layer1"
  294.52 +     inkscape:window-width="906"
  294.53 +     inkscape:window-height="620"
  294.54 +     inkscape:window-x="181"
  294.55 +     inkscape:window-y="58" />
  294.56 +  <metadata
  294.57 +     id="metadata7">
  294.58 +    <rdf:RDF>
  294.59 +      <cc:Work
  294.60 +         rdf:about="">
  294.61 +        <dc:format>image/svg+xml</dc:format>
  294.62 +        <dc:type
  294.63 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  294.64 +      </cc:Work>
  294.65 +    </rdf:RDF>
  294.66 +  </metadata>
  294.67 +  <g
  294.68 +     inkscape:label="Layer 1"
  294.69 +     inkscape:groupmode="layer"
  294.70 +     id="layer1">
  294.71 +    <path
  294.72 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#a7a7a7;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1;display:inline"
  294.73 +       d="M 326.94646,467.18359 L 326.94646,510.98123"
  294.74 +       id="path1910"
  294.75 +       inkscape:connector-type="polyline"
  294.76 +       inkscape:connection-end="#rect2962"
  294.77 +       inkscape:connection-start="#rect2764" />
  294.78 +    <path
  294.79 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#a7a7a7;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1;display:inline"
  294.80 +       d="M 326.94646,531.98123 L 326.94646,591.77887"
  294.81 +       id="path1912"
  294.82 +       inkscape:connector-type="polyline"
  294.83 +       inkscape:connection-start="#rect2962"
  294.84 +       inkscape:connection-end="#rect3000" />
  294.85 +    <path
  294.86 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#a7a7a7;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1;display:inline"
  294.87 +       d="M 316.1622,531.98123 L 192.30212,652.57648"
  294.88 +       id="path1916"
  294.89 +       inkscape:connector-type="polyline"
  294.90 +       inkscape:connection-end="#rect3038"
  294.91 +       inkscape:connection-start="#rect2962" />
  294.92 +    <path
  294.93 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#484848;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1"
  294.94 +       d="M 254.23217,467.18359 L 254.23216,510.98123"
  294.95 +       id="path3088"
  294.96 +       inkscape:connector-type="polyline"
  294.97 +       inkscape:connection-start="#rect1872"
  294.98 +       inkscape:connection-end="#rect2960" />
  294.99 +    <path
 294.100 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#484848;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1"
 294.101 +       d="M 254.23215,531.98123 L 254.23215,591.77887"
 294.102 +       id="path3090"
 294.103 +       inkscape:connector-type="polyline"
 294.104 +       inkscape:connection-start="#rect2960"
 294.105 +       inkscape:connection-end="#rect2998" />
 294.106 +    <path
 294.107 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#484848;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1"
 294.108 +       d="M 248.84002,531.98123 L 186.90999,652.57648"
 294.109 +       id="path3092"
 294.110 +       inkscape:connector-type="polyline"
 294.111 +       inkscape:connection-start="#rect2960"
 294.112 +       inkscape:connection-end="#rect3038" />
 294.113 +    <rect
 294.114 +       style="fill:#7b7df5;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.115 +       id="rect1872"
 294.116 +       width="51.42857"
 294.117 +       height="20"
 294.118 +       x="228.51788"
 294.119 +       y="446.68359" />
 294.120 +    <rect
 294.121 +       style="fill:#cacbfb;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.122 +       id="rect2764"
 294.123 +       width="51.42857"
 294.124 +       height="20"
 294.125 +       x="301.23218"
 294.126 +       y="446.68359" />
 294.127 +    <rect
 294.128 +       style="fill:#cacbfb;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.129 +       id="rect2766"
 294.130 +       width="51.42857"
 294.131 +       height="20"
 294.132 +       x="155.80359"
 294.133 +       y="446.68359" />
 294.134 +    <rect
 294.135 +       style="fill:#cacbfb;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.136 +       id="rect2768"
 294.137 +       width="51.42857"
 294.138 +       height="20"
 294.139 +       x="83.089294"
 294.140 +       y="446.68359" />
 294.141 +    <path
 294.142 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 294.143 +       d="M 135.01786,456.68359 L 155.30359,456.68359"
 294.144 +       id="path2770"
 294.145 +       inkscape:connector-type="polyline"
 294.146 +       inkscape:connection-start="#rect2768"
 294.147 +       inkscape:connection-end="#rect2766" />
 294.148 +    <path
 294.149 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 294.150 +       d="M 207.73216,456.68359 L 228.01788,456.68359"
 294.151 +       id="path2772"
 294.152 +       inkscape:connector-type="polyline"
 294.153 +       inkscape:connection-start="#rect2766"
 294.154 +       inkscape:connection-end="#rect1872" />
 294.155 +    <path
 294.156 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 294.157 +       d="M 280.44645,456.68359 L 300.73218,456.68359"
 294.158 +       id="path2774"
 294.159 +       inkscape:connector-type="polyline"
 294.160 +       inkscape:connection-start="#rect1872"
 294.161 +       inkscape:connection-end="#rect2764" />
 294.162 +    <path
 294.163 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
 294.164 +       d="M 62.303571,456.68359 L 82.589294,456.68359"
 294.165 +       id="path2778"
 294.166 +       inkscape:connector-type="polyline"
 294.167 +       inkscape:connection-end="#rect2768" />
 294.168 +    <rect
 294.169 +       style="fill:#84f57b;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.170 +       id="rect2960"
 294.171 +       width="51.42857"
 294.172 +       height="20"
 294.173 +       x="228.51787"
 294.174 +       y="511.48123" />
 294.175 +    <rect
 294.176 +       style="fill:#cefbca;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.177 +       id="rect2962"
 294.178 +       width="51.42857"
 294.179 +       height="20"
 294.180 +       x="301.23218"
 294.181 +       y="511.48123" />
 294.182 +    <rect
 294.183 +       style="fill:#cefbca;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.184 +       id="rect2964"
 294.185 +       width="51.42857"
 294.186 +       height="20"
 294.187 +       x="155.80357"
 294.188 +       y="511.48123" />
 294.189 +    <rect
 294.190 +       style="fill:#cefbca;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.191 +       id="rect2966"
 294.192 +       width="51.42857"
 294.193 +       height="20"
 294.194 +       x="83.089287"
 294.195 +       y="511.48123" />
 294.196 +    <path
 294.197 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 294.198 +       d="M 135.01786,521.48121 L 155.30359,521.48121"
 294.199 +       id="path2968"
 294.200 +       inkscape:connector-type="polyline" />
 294.201 +    <path
 294.202 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 294.203 +       d="M 207.73216,521.48121 L 228.01788,521.48121"
 294.204 +       id="path2970"
 294.205 +       inkscape:connector-type="polyline" />
 294.206 +    <path
 294.207 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 294.208 +       d="M 280.44645,521.48121 L 300.73218,521.48121"
 294.209 +       id="path2972"
 294.210 +       inkscape:connector-type="polyline" />
 294.211 +    <path
 294.212 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
 294.213 +       d="M 62.30358,521.48121 L 82.5893,521.48121"
 294.214 +       id="path2974"
 294.215 +       inkscape:connector-type="polyline" />
 294.216 +    <rect
 294.217 +       style="fill:#f57b8f;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.218 +       id="rect2998"
 294.219 +       width="51.42857"
 294.220 +       height="20"
 294.221 +       x="228.51787"
 294.222 +       y="592.27887" />
 294.223 +    <rect
 294.224 +       style="fill:#fbcad2;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.225 +       id="rect3000"
 294.226 +       width="51.42857"
 294.227 +       height="20"
 294.228 +       x="301.23218"
 294.229 +       y="592.27887" />
 294.230 +    <rect
 294.231 +       style="fill:#fbcad2;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.232 +       id="rect3002"
 294.233 +       width="51.42857"
 294.234 +       height="20"
 294.235 +       x="155.80357"
 294.236 +       y="592.27887" />
 294.237 +    <rect
 294.238 +       style="fill:#fbcad2;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.239 +       id="rect3004"
 294.240 +       width="51.42857"
 294.241 +       height="20"
 294.242 +       x="83.089287"
 294.243 +       y="592.27887" />
 294.244 +    <path
 294.245 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 294.246 +       d="M 135.01786,602.27884 L 155.30359,602.27884"
 294.247 +       id="path3006"
 294.248 +       inkscape:connector-type="polyline" />
 294.249 +    <path
 294.250 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 294.251 +       d="M 207.73216,602.27884 L 228.01788,602.27884"
 294.252 +       id="path3008"
 294.253 +       inkscape:connector-type="polyline" />
 294.254 +    <path
 294.255 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 294.256 +       d="M 280.44645,602.27884 L 300.73218,602.27884"
 294.257 +       id="path3010"
 294.258 +       inkscape:connector-type="polyline" />
 294.259 +    <path
 294.260 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
 294.261 +       d="M 62.30358,602.27884 L 82.5893,602.27884"
 294.262 +       id="path3012"
 294.263 +       inkscape:connector-type="polyline" />
 294.264 +    <rect
 294.265 +       style="fill:#ffced6;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.266 +       id="rect3034"
 294.267 +       width="51.42857"
 294.268 +       height="20"
 294.269 +       x="228.51787"
 294.270 +       y="653.07648" />
 294.271 +    <rect
 294.272 +       style="fill:#f57b8f;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.273 +       id="rect3038"
 294.274 +       width="51.42857"
 294.275 +       height="20"
 294.276 +       x="155.80357"
 294.277 +       y="653.07648" />
 294.278 +    <rect
 294.279 +       style="fill:#fbcad2;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 294.280 +       id="rect3040"
 294.281 +       width="51.42857"
 294.282 +       height="20"
 294.283 +       x="83.089287"
 294.284 +       y="653.07648" />
 294.285 +    <path
 294.286 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 294.287 +       d="M 135.01786,663.07646 L 155.30359,663.07646"
 294.288 +       id="path3042"
 294.289 +       inkscape:connector-type="polyline" />
 294.290 +    <path
 294.291 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 294.292 +       d="M 207.73216,663.07646 L 228.01788,663.07646"
 294.293 +       id="path3044"
 294.294 +       inkscape:connector-type="polyline" />
 294.295 +    <path
 294.296 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
 294.297 +       d="M 62.30358,663.07646 L 82.5893,663.07646"
 294.298 +       id="path3048"
 294.299 +       inkscape:connector-type="polyline" />
 294.300 +    <text
 294.301 +       xml:space="preserve"
 294.302 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 294.303 +       x="82.072548"
 294.304 +       y="432.64789"
 294.305 +       id="text3094"><tspan
 294.306 +         sodipodi:role="line"
 294.307 +         id="tspan3096"
 294.308 +         x="82.072548"
 294.309 +         y="432.64789">Changelog</tspan></text>
 294.310 +    <text
 294.311 +       xml:space="preserve"
 294.312 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 294.313 +       x="82.306923"
 294.314 +       y="498.97327"
 294.315 +       id="text3098"><tspan
 294.316 +         sodipodi:role="line"
 294.317 +         id="tspan3100"
 294.318 +         x="82.306923"
 294.319 +         y="498.97327">Manifest</tspan></text>
 294.320 +    <text
 294.321 +       xml:space="preserve"
 294.322 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 294.323 +       x="82.14286"
 294.324 +       y="580.08569"
 294.325 +       id="text3102"><tspan
 294.326 +         sodipodi:role="line"
 294.327 +         id="tspan3104"
 294.328 +         x="82.14286"
 294.329 +         y="580.08569">Filelogs</tspan></text>
 294.330 +  </g>
 294.331 +</svg>
   295.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   295.2 +++ b/en/figs/mq-stack.svg	Sun Aug 16 03:41:39 2009 +0200
   295.3 @@ -0,0 +1,270 @@
   295.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   295.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   295.6 +<svg
   295.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   295.8 +   xmlns:cc="http://web.resource.org/cc/"
   295.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  295.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  295.11 +   xmlns="http://www.w3.org/2000/svg"
  295.12 +   xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
  295.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  295.14 +   width="744.09448819"
  295.15 +   height="1052.3622047"
  295.16 +   id="svg2"
  295.17 +   sodipodi:version="0.32"
  295.18 +   inkscape:version="0.43"
  295.19 +   sodipodi:docname="mq-stack.svg"
  295.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en">
  295.21 +  <defs
  295.22 +     id="defs4" />
  295.23 +  <sodipodi:namedview
  295.24 +     id="base"
  295.25 +     pagecolor="#ffffff"
  295.26 +     bordercolor="#666666"
  295.27 +     borderopacity="1.0"
  295.28 +     inkscape:pageopacity="0.0"
  295.29 +     inkscape:pageshadow="2"
  295.30 +     inkscape:zoom="1.4142136"
  295.31 +     inkscape:cx="299.33323"
  295.32 +     inkscape:cy="815.646"
  295.33 +     inkscape:document-units="px"
  295.34 +     inkscape:current-layer="layer1"
  295.35 +     inkscape:window-width="1014"
  295.36 +     inkscape:window-height="689"
  295.37 +     inkscape:window-x="0"
  295.38 +     inkscape:window-y="25" />
  295.39 +  <metadata
  295.40 +     id="metadata7">
  295.41 +    <rdf:RDF>
  295.42 +      <cc:Work
  295.43 +         rdf:about="">
  295.44 +        <dc:format>image/svg+xml</dc:format>
  295.45 +        <dc:type
  295.46 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  295.47 +      </cc:Work>
  295.48 +    </rdf:RDF>
  295.49 +  </metadata>
  295.50 +  <g
  295.51 +     inkscape:label="Layer 1"
  295.52 +     inkscape:groupmode="layer"
  295.53 +     id="layer1">
  295.54 +    <rect
  295.55 +       style="fill:#0000ff;fill-opacity:0.75;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  295.56 +       id="rect1307"
  295.57 +       width="202.93683"
  295.58 +       height="24.243662"
  295.59 +       x="230.01944"
  295.60 +       y="221.70146" />
  295.61 +    <text
  295.62 +       xml:space="preserve"
  295.63 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
  295.64 +       x="237.89606"
  295.65 +       y="237.13383"
  295.66 +       id="text1309"><tspan
  295.67 +         sodipodi:role="line"
  295.68 +         id="tspan1311"
  295.69 +         x="237.89606"
  295.70 +         y="237.13383">prevent-compiler-reorder.patch</tspan></text>
  295.71 +    <rect
  295.72 +       style="fill:#7979ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  295.73 +       id="rect1320"
  295.74 +       width="202.93683"
  295.75 +       height="24.243662"
  295.76 +       x="230.01936"
  295.77 +       y="251.34325" />
  295.78 +    <text
  295.79 +       xml:space="preserve"
  295.80 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
  295.81 +       x="237.89598"
  295.82 +       y="266.77563"
  295.83 +       id="text1322"><tspan
  295.84 +         sodipodi:role="line"
  295.85 +         id="tspan1324"
  295.86 +         x="237.89598"
  295.87 +         y="266.77563">namespace-cleanup.patch</tspan></text>
  295.88 +    <rect
  295.89 +       style="fill:#7979ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  295.90 +       id="rect2217"
  295.91 +       width="202.93683"
  295.92 +       height="24.243662"
  295.93 +       x="230.01936"
  295.94 +       y="280.98505" />
  295.95 +    <text
  295.96 +       xml:space="preserve"
  295.97 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
  295.98 +       x="237.89598"
  295.99 +       y="296.41742"
 295.100 +       id="text2219"><tspan
 295.101 +         sodipodi:role="line"
 295.102 +         id="tspan2221"
 295.103 +         x="237.89598"
 295.104 +         y="296.41742">powerpc-port-fixes.patch</tspan></text>
 295.105 +    <rect
 295.106 +       style="fill:#7979ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 295.107 +       id="rect3114"
 295.108 +       width="202.93683"
 295.109 +       height="24.243662"
 295.110 +       x="230.01936"
 295.111 +       y="310.6268" />
 295.112 +    <text
 295.113 +       xml:space="preserve"
 295.114 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 295.115 +       x="237.89598"
 295.116 +       y="326.05917"
 295.117 +       id="text3116"><tspan
 295.118 +         sodipodi:role="line"
 295.119 +         id="tspan3118"
 295.120 +         x="237.89598"
 295.121 +         y="326.05917">report-devinfo-correctly.patch</tspan></text>
 295.122 +    <text
 295.123 +       xml:space="preserve"
 295.124 +       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 295.125 +       x="200.01021"
 295.126 +       y="191.68094"
 295.127 +       id="text3170"
 295.128 +       sodipodi:linespacing="125%"><tspan
 295.129 +         sodipodi:role="line"
 295.130 +         id="tspan3172"
 295.131 +         x="200.01021"
 295.132 +         y="191.68094"
 295.133 +         style="font-size:48px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans">{</tspan></text>
 295.134 +    <text
 295.135 +       xml:space="preserve"
 295.136 +       style="font-size:15.25329685px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 295.137 +       x="255.26627"
 295.138 +       y="248.79449"
 295.139 +       id="text3190"
 295.140 +       sodipodi:linespacing="125%"
 295.141 +       transform="scale(0.786716,1.271107)"><tspan
 295.142 +         sodipodi:role="line"
 295.143 +         id="tspan3192"
 295.144 +         x="255.26627"
 295.145 +         y="248.79449"
 295.146 +         style="font-size:61.01318741px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans">{</tspan></text>
 295.147 +    <text
 295.148 +       xml:space="preserve"
 295.149 +       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 295.150 +       x="195.86807"
 295.151 +       y="173.17117"
 295.152 +       id="text4085"
 295.153 +       sodipodi:linespacing="125%"><tspan
 295.154 +         sodipodi:role="line"
 295.155 +         id="tspan4087"
 295.156 +         x="195.86807"
 295.157 +         y="173.17117"
 295.158 +         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">present in series,</tspan><tspan
 295.159 +         sodipodi:role="line"
 295.160 +         x="195.86807"
 295.161 +         y="188.17117"
 295.162 +         id="tspan4089"
 295.163 +         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">but not applied</tspan></text>
 295.164 +    <text
 295.165 +       xml:space="preserve"
 295.166 +       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 295.167 +       x="195.0712"
 295.168 +       y="288.91745"
 295.169 +       id="text4091"
 295.170 +       sodipodi:linespacing="125%"><tspan
 295.171 +         sodipodi:role="line"
 295.172 +         id="tspan4093"
 295.173 +         x="195.0712"
 295.174 +         y="288.91745"
 295.175 +         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">patches applied,</tspan><tspan
 295.176 +         sodipodi:role="line"
 295.177 +         x="195.0712"
 295.178 +         y="303.91745"
 295.179 +         id="tspan4111"
 295.180 +         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">changesets present</tspan></text>
 295.181 +    <text
 295.182 +       xml:space="preserve"
 295.183 +       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 295.184 +       x="195.0712"
 295.185 +       y="229.28813"
 295.186 +       id="text4095"
 295.187 +       sodipodi:linespacing="125%"><tspan
 295.188 +         sodipodi:role="line"
 295.189 +         id="tspan4097"
 295.190 +         x="195.0712"
 295.191 +         y="229.28813"
 295.192 +         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">topmost</tspan><tspan
 295.193 +         sodipodi:role="line"
 295.194 +         x="195.0712"
 295.195 +         y="244.28813"
 295.196 +         id="tspan4109"
 295.197 +         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">applied patch</tspan></text>
 295.198 +    <text
 295.199 +       xml:space="preserve"
 295.200 +       style="font-size:12px;font-style:normal;font-weight:normal;opacity:1;fill:#666666;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 295.201 +       x="450.4975"
 295.202 +       y="238.29692"
 295.203 +       id="text4137"><tspan
 295.204 +         sodipodi:role="line"
 295.205 +         id="tspan4139"
 295.206 +         x="450.4975"
 295.207 +         y="238.29692">201ad3209902</tspan></text>
 295.208 +    <text
 295.209 +       xml:space="preserve"
 295.210 +       style="font-size:12px;font-style:normal;font-weight:normal;opacity:1;fill:#989898;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 295.211 +       x="450.05804"
 295.212 +       y="267.93872"
 295.213 +       id="text4141"><tspan
 295.214 +         sodipodi:role="line"
 295.215 +         id="tspan4143"
 295.216 +         x="450.05804"
 295.217 +         y="267.93872">126b84e593ae</tspan></text>
 295.218 +    <text
 295.219 +       xml:space="preserve"
 295.220 +       style="font-size:12px;font-style:normal;font-weight:normal;opacity:1;fill:#989898;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 295.221 +       x="450.6557"
 295.222 +       y="297.58051"
 295.223 +       id="text4145"><tspan
 295.224 +         sodipodi:role="line"
 295.225 +         id="tspan4147"
 295.226 +         x="450.6557"
 295.227 +         y="297.58051">a655daf15409</tspan></text>
 295.228 +    <text
 295.229 +       xml:space="preserve"
 295.230 +       style="font-size:12px;font-style:normal;font-weight:normal;opacity:1;fill:#989898;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 295.231 +       x="450.71429"
 295.232 +       y="327.22226"
 295.233 +       id="text4149"><tspan
 295.234 +         sodipodi:role="line"
 295.235 +         id="tspan4151"
 295.236 +         x="450.71429"
 295.237 +         y="327.22226">e50d59aaea3a</tspan></text>
 295.238 +    <rect
 295.239 +       style="fill:#d7d7ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#a6a6a6;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 295.240 +       id="rect3106"
 295.241 +       width="202.93683"
 295.242 +       height="24.243662"
 295.243 +       x="230.01936"
 295.244 +       y="150.41792" />
 295.245 +    <text
 295.246 +       xml:space="preserve"
 295.247 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#808080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 295.248 +       x="237.89598"
 295.249 +       y="165.8503"
 295.250 +       id="text3108"><tspan
 295.251 +         sodipodi:role="line"
 295.252 +         id="tspan3110"
 295.253 +         x="237.89598"
 295.254 +         y="165.8503">forbid-illegal-params.patch</tspan></text>
 295.255 +    <rect
 295.256 +       style="fill:#d7d7ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#a6a6a6;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 295.257 +       id="rect2241"
 295.258 +       width="202.93683"
 295.259 +       height="24.243662"
 295.260 +       x="230.16466"
 295.261 +       y="180.05968" />
 295.262 +    <text
 295.263 +       xml:space="preserve"
 295.264 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#808080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 295.265 +       x="238.04128"
 295.266 +       y="195.49205"
 295.267 +       id="text2243"><tspan
 295.268 +         sodipodi:role="line"
 295.269 +         id="tspan2245"
 295.270 +         x="238.04128"
 295.271 +         y="195.49205">fix-memory-leak.patch</tspan></text>
 295.272 +  </g>
 295.273 +</svg>
   296.1 Binary file en/figs/note.png has changed
   297.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   297.2 +++ b/en/figs/revlog.svg	Sun Aug 16 03:41:39 2009 +0200
   297.3 @@ -0,0 +1,1155 @@
   297.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   297.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   297.6 +<svg
   297.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   297.8 +   xmlns:cc="http://web.resource.org/cc/"
   297.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  297.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  297.11 +   xmlns="http://www.w3.org/2000/svg"
  297.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  297.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  297.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  297.15 +   width="744.09448819"
  297.16 +   height="1052.3622047"
  297.17 +   id="svg2"
  297.18 +   sodipodi:version="0.32"
  297.19 +   inkscape:version="0.44.1"
  297.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  297.21 +   sodipodi:docname="revlog.svg">
  297.22 +  <defs
  297.23 +     id="defs4">
  297.24 +    <marker
  297.25 +       inkscape:stockid="Arrow1Mend"
  297.26 +       orient="auto"
  297.27 +       refY="0.0"
  297.28 +       refX="0.0"
  297.29 +       id="Arrow1Mend"
  297.30 +       style="overflow:visible;">
  297.31 +      <path
  297.32 +         id="path4852"
  297.33 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  297.34 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  297.35 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  297.36 +    </marker>
  297.37 +    <linearGradient
  297.38 +       id="linearGradient3092">
  297.39 +      <stop
  297.40 +         style="stop-color:#44436f;stop-opacity:1;"
  297.41 +         offset="0"
  297.42 +         id="stop3094" />
  297.43 +      <stop
  297.44 +         style="stop-color:#abade5;stop-opacity:1;"
  297.45 +         offset="1"
  297.46 +         id="stop3096" />
  297.47 +    </linearGradient>
  297.48 +    <linearGradient
  297.49 +       inkscape:collect="always"
  297.50 +       xlink:href="#linearGradient3092"
  297.51 +       id="linearGradient3118"
  297.52 +       gradientUnits="userSpaceOnUse"
  297.53 +       x1="176.16635"
  297.54 +       y1="405.21934"
  297.55 +       x2="417.11935"
  297.56 +       y2="405.21934" />
  297.57 +    <linearGradient
  297.58 +       inkscape:collect="always"
  297.59 +       xlink:href="#linearGradient3092"
  297.60 +       id="linearGradient3120"
  297.61 +       gradientUnits="userSpaceOnUse"
  297.62 +       x1="176.16635"
  297.63 +       y1="405.21934"
  297.64 +       x2="417.11935"
  297.65 +       y2="405.21934" />
  297.66 +    <linearGradient
  297.67 +       inkscape:collect="always"
  297.68 +       xlink:href="#linearGradient3092"
  297.69 +       id="linearGradient3129"
  297.70 +       gradientUnits="userSpaceOnUse"
  297.71 +       x1="176.16635"
  297.72 +       y1="405.21934"
  297.73 +       x2="417.11935"
  297.74 +       y2="405.21934"
  297.75 +       gradientTransform="translate(-0.928574,-1.428574)" />
  297.76 +    <linearGradient
  297.77 +       inkscape:collect="always"
  297.78 +       xlink:href="#linearGradient3092"
  297.79 +       id="linearGradient3133"
  297.80 +       gradientUnits="userSpaceOnUse"
  297.81 +       x1="176.16635"
  297.82 +       y1="405.21934"
  297.83 +       x2="417.11935"
  297.84 +       y2="405.21934"
  297.85 +       gradientTransform="translate(-0.928574,-1.428574)" />
  297.86 +    <linearGradient
  297.87 +       inkscape:collect="always"
  297.88 +       xlink:href="#linearGradient3092"
  297.89 +       id="linearGradient3708"
  297.90 +       gradientUnits="userSpaceOnUse"
  297.91 +       gradientTransform="matrix(0.423343,0,0,0.423343,138.874,-67.01732)"
  297.92 +       x1="175.23776"
  297.93 +       y1="509.98154"
  297.94 +       x2="416.29077"
  297.95 +       y2="297.49997" />
  297.96 +    <linearGradient
  297.97 +       inkscape:collect="always"
  297.98 +       xlink:href="#linearGradient3092"
  297.99 +       id="linearGradient5164"
 297.100 +       gradientUnits="userSpaceOnUse"
 297.101 +       gradientTransform="matrix(0.423343,0,0,0.423343,198.249,247.4358)"
 297.102 +       x1="175.23776"
 297.103 +       y1="509.98154"
 297.104 +       x2="416.29077"
 297.105 +       y2="297.49997" />
 297.106 +    <linearGradient
 297.107 +       inkscape:collect="always"
 297.108 +       xlink:href="#linearGradient3092"
 297.109 +       id="linearGradient5584"
 297.110 +       gradientUnits="userSpaceOnUse"
 297.111 +       gradientTransform="matrix(0.423343,0,0,0.423343,143.9081,371.2915)"
 297.112 +       x1="175.23776"
 297.113 +       y1="509.98154"
 297.114 +       x2="416.29077"
 297.115 +       y2="297.49997" />
 297.116 +    <linearGradient
 297.117 +       inkscape:collect="always"
 297.118 +       xlink:href="#linearGradient3092"
 297.119 +       id="linearGradient5784"
 297.120 +       gradientUnits="userSpaceOnUse"
 297.121 +       gradientTransform="matrix(0.423343,0,0,0.423343,76.37397,152.137)"
 297.122 +       x1="175.23776"
 297.123 +       y1="509.98154"
 297.124 +       x2="416.29077"
 297.125 +       y2="297.49997" />
 297.126 +    <linearGradient
 297.127 +       inkscape:collect="always"
 297.128 +       xlink:href="#linearGradient3092"
 297.129 +       id="linearGradient5786"
 297.130 +       gradientUnits="userSpaceOnUse"
 297.131 +       gradientTransform="matrix(0.423343,0,0,0.423343,198.249,152.137)"
 297.132 +       x1="175.23776"
 297.133 +       y1="509.98154"
 297.134 +       x2="416.29077"
 297.135 +       y2="297.49997" />
 297.136 +    <linearGradient
 297.137 +       inkscape:collect="always"
 297.138 +       xlink:href="#linearGradient3092"
 297.139 +       id="linearGradient5895"
 297.140 +       gradientUnits="userSpaceOnUse"
 297.141 +       gradientTransform="matrix(0.423343,0,0,0.423343,198.0215,261.7142)"
 297.142 +       x1="175.23776"
 297.143 +       y1="509.98154"
 297.144 +       x2="416.29077"
 297.145 +       y2="297.49997" />
 297.146 +    <linearGradient
 297.147 +       inkscape:collect="always"
 297.148 +       xlink:href="#linearGradient3092"
 297.149 +       id="linearGradient5958"
 297.150 +       gradientUnits="userSpaceOnUse"
 297.151 +       gradientTransform="matrix(0.423343,0,0,0.423343,137.1978,42.55987)"
 297.152 +       x1="175.23776"
 297.153 +       y1="509.98154"
 297.154 +       x2="416.29077"
 297.155 +       y2="297.49997" />
 297.156 +  </defs>
 297.157 +  <sodipodi:namedview
 297.158 +     id="base"
 297.159 +     pagecolor="#ffffff"
 297.160 +     bordercolor="#666666"
 297.161 +     borderopacity="1.0"
 297.162 +     gridtolerance="10000"
 297.163 +     guidetolerance="10"
 297.164 +     objecttolerance="10"
 297.165 +     inkscape:pageopacity="0.0"
 297.166 +     inkscape:pageshadow="2"
 297.167 +     inkscape:zoom="0.64"
 297.168 +     inkscape:cx="566.02368"
 297.169 +     inkscape:cy="688.16826"
 297.170 +     inkscape:document-units="px"
 297.171 +     inkscape:current-layer="layer1"
 297.172 +     inkscape:window-width="906"
 297.173 +     inkscape:window-height="620"
 297.174 +     inkscape:window-x="29"
 297.175 +     inkscape:window-y="79"
 297.176 +     inkscape:connector-spacing="11" />
 297.177 +  <metadata
 297.178 +     id="metadata7">
 297.179 +    <rdf:RDF>
 297.180 +      <cc:Work
 297.181 +         rdf:about="">
 297.182 +        <dc:format>image/svg+xml</dc:format>
 297.183 +        <dc:type
 297.184 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 297.185 +      </cc:Work>
 297.186 +    </rdf:RDF>
 297.187 +  </metadata>
 297.188 +  <g
 297.189 +     inkscape:label="Layer 1"
 297.190 +     inkscape:groupmode="layer"
 297.191 +     id="layer1">
 297.192 +    <rect
 297.193 +       y="168.74846"
 297.194 +       x="211.58516"
 297.195 +       height="89.506805"
 297.196 +       width="101.60232"
 297.197 +       id="rect3068"
 297.198 +       style="fill:url(#linearGradient5958);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 297.199 +    <g
 297.200 +       id="g3215"
 297.201 +       transform="matrix(0.423343,0,0,0.423343,137.1977,42.55985)">
 297.202 +      <rect
 297.203 +         y="447.71451"
 297.204 +         x="299.67859"
 297.205 +         height="48.571426"
 297.206 +         width="103.14286"
 297.207 +         id="rect2899"
 297.208 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 297.209 +      <text
 297.210 +         id="text2903"
 297.211 +         y="464.8139"
 297.212 +         x="308.89639"
 297.213 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.214 +         xml:space="preserve"><tspan
 297.215 +           y="464.8139"
 297.216 +           x="308.89639"
 297.217 +           sodipodi:role="line"
 297.218 +           id="tspan2905">Second parent</tspan></text>
 297.219 +      <text
 297.220 +         id="text2907"
 297.221 +         y="485.50256"
 297.222 +         x="308.20175"
 297.223 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.224 +         xml:space="preserve"><tspan
 297.225 +           style="font-family:Courier"
 297.226 +           y="485.50256"
 297.227 +           x="308.20175"
 297.228 +           id="tspan2909"
 297.229 +           sodipodi:role="line">32bf9a5f22c0</tspan></text>
 297.230 +    </g>
 297.231 +    <g
 297.232 +       id="g3250"
 297.233 +       transform="matrix(0.423343,0,0,0.423343,137.1977,42.55986)">
 297.234 +      <rect
 297.235 +         y="311.28598"
 297.236 +         x="188.6071"
 297.237 +         height="48.571426"
 297.238 +         width="103.14286"
 297.239 +         id="rect2936"
 297.240 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 297.241 +      <text
 297.242 +         id="text2940"
 297.243 +         y="328.38538"
 297.244 +         x="197.82495"
 297.245 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.246 +         xml:space="preserve"><tspan
 297.247 +           y="328.38538"
 297.248 +           x="197.82495"
 297.249 +           sodipodi:role="line"
 297.250 +           id="tspan2942">Revision hash</tspan></text>
 297.251 +      <text
 297.252 +         id="text2944"
 297.253 +         y="349.07404"
 297.254 +         x="197.13031"
 297.255 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.256 +         xml:space="preserve"><tspan
 297.257 +           style="font-family:Courier"
 297.258 +           y="349.07404"
 297.259 +           x="197.13031"
 297.260 +           id="tspan2946"
 297.261 +           sodipodi:role="line">34b8b7a15ea1</tspan></text>
 297.262 +    </g>
 297.263 +    <g
 297.264 +       id="g3243"
 297.265 +       transform="matrix(0.423343,0,0,0.423343,137.6664,43.91853)">
 297.266 +      <rect
 297.267 +         y="363.07654"
 297.268 +         x="187.5"
 297.269 +         height="75"
 297.270 +         width="213.85715"
 297.271 +         id="rect2950"
 297.272 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 297.273 +      <text
 297.274 +         id="text2958"
 297.275 +         y="400.86459"
 297.276 +         x="196.02321"
 297.277 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.278 +         xml:space="preserve"><tspan
 297.279 +           style="fill:black;fill-opacity:1;font-family:Courier"
 297.280 +           y="400.86459"
 297.281 +           x="196.02321"
 297.282 +           id="tspan2960"
 297.283 +           sodipodi:role="line">...</tspan></text>
 297.284 +      <text
 297.285 +         id="text2954"
 297.286 +         y="380.17593"
 297.287 +         x="196.71785"
 297.288 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.289 +         xml:space="preserve"><tspan
 297.290 +           y="380.17593"
 297.291 +           x="196.71785"
 297.292 +           sodipodi:role="line"
 297.293 +           id="tspan2956"
 297.294 +           style="fill:black;fill-opacity:1">Revision data (delta or snapshot)</tspan></text>
 297.295 +    </g>
 297.296 +    <g
 297.297 +       id="g5529"
 297.298 +       transform="translate(-6.710312,-8.165836e-6)">
 297.299 +      <rect
 297.300 +         style="fill:url(#linearGradient5584);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.301 +         id="rect3509"
 297.302 +         width="101.60232"
 297.303 +         height="89.506805"
 297.304 +         x="218.29547"
 297.305 +         y="497.4801" />
 297.306 +      <g
 297.307 +         transform="matrix(0.423343,0,0,0.423343,143.908,371.2915)"
 297.308 +         id="g3513">
 297.309 +        <g
 297.310 +           id="g3515">
 297.311 +          <rect
 297.312 +             y="447.72418"
 297.313 +             x="188.6071"
 297.314 +             height="48.571426"
 297.315 +             width="103.14286"
 297.316 +             id="rect3517"
 297.317 +             style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 297.318 +          <text
 297.319 +             id="text3519"
 297.320 +             y="464.82358"
 297.321 +             x="197.82495"
 297.322 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.323 +             xml:space="preserve"><tspan
 297.324 +               y="464.82358"
 297.325 +               x="197.82495"
 297.326 +               sodipodi:role="line"
 297.327 +               id="tspan3521">First parent</tspan></text>
 297.328 +          <text
 297.329 +             id="text3523"
 297.330 +             y="485.51224"
 297.331 +             x="197.13031"
 297.332 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.333 +             xml:space="preserve"><tspan
 297.334 +               style="font-family:Courier"
 297.335 +               y="485.51224"
 297.336 +               x="197.13031"
 297.337 +               id="tspan3525"
 297.338 +               sodipodi:role="line">000000000000</tspan></text>
 297.339 +        </g>
 297.340 +        <g
 297.341 +           id="g3527">
 297.342 +          <rect
 297.343 +             y="447.71451"
 297.344 +             x="299.67859"
 297.345 +             height="48.571426"
 297.346 +             width="103.14286"
 297.347 +             id="rect3529"
 297.348 +             style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 297.349 +          <text
 297.350 +             id="text3531"
 297.351 +             y="464.8139"
 297.352 +             x="308.89639"
 297.353 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.354 +             xml:space="preserve"><tspan
 297.355 +               y="464.8139"
 297.356 +               x="308.89639"
 297.357 +               sodipodi:role="line"
 297.358 +               id="tspan3533">Second parent</tspan></text>
 297.359 +          <text
 297.360 +             id="text3535"
 297.361 +             y="485.50256"
 297.362 +             x="308.20175"
 297.363 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.364 +             xml:space="preserve"><tspan
 297.365 +               style="font-family:Courier"
 297.366 +               y="485.50256"
 297.367 +               x="308.20175"
 297.368 +               id="tspan3537"
 297.369 +               sodipodi:role="line">000000000000</tspan></text>
 297.370 +        </g>
 297.371 +      </g>
 297.372 +      <g
 297.373 +         transform="matrix(0.423343,0,0,0.423343,143.908,371.2915)"
 297.374 +         id="g3539">
 297.375 +        <rect
 297.376 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.377 +           id="rect3541"
 297.378 +           width="103.14286"
 297.379 +           height="48.571426"
 297.380 +           x="188.6071"
 297.381 +           y="311.28598" />
 297.382 +        <text
 297.383 +           xml:space="preserve"
 297.384 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.385 +           x="197.82495"
 297.386 +           y="328.38538"
 297.387 +           id="text3543"><tspan
 297.388 +             id="tspan3545"
 297.389 +             sodipodi:role="line"
 297.390 +             x="197.82495"
 297.391 +             y="328.38538">Revision hash</tspan></text>
 297.392 +        <text
 297.393 +           xml:space="preserve"
 297.394 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.395 +           x="197.13031"
 297.396 +           y="349.07404"
 297.397 +           id="text3547"><tspan
 297.398 +             sodipodi:role="line"
 297.399 +             id="tspan3549"
 297.400 +             x="197.13031"
 297.401 +             y="349.07404"
 297.402 +             style="font-family:Courier">ff9dc8bc2a8b</tspan></text>
 297.403 +      </g>
 297.404 +      <g
 297.405 +         transform="matrix(0.423343,0,0,0.423343,144.3767,372.6502)"
 297.406 +         id="g3551">
 297.407 +        <rect
 297.408 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.409 +           id="rect3553"
 297.410 +           width="213.85715"
 297.411 +           height="75"
 297.412 +           x="187.5"
 297.413 +           y="363.07654" />
 297.414 +        <text
 297.415 +           xml:space="preserve"
 297.416 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.417 +           x="196.02321"
 297.418 +           y="400.86459"
 297.419 +           id="text3555"><tspan
 297.420 +             sodipodi:role="line"
 297.421 +             id="tspan3557"
 297.422 +             x="196.02321"
 297.423 +             y="400.86459"
 297.424 +             style="fill:black;fill-opacity:1;font-family:Courier">...</tspan></text>
 297.425 +        <text
 297.426 +           xml:space="preserve"
 297.427 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.428 +           x="196.71785"
 297.429 +           y="380.17593"
 297.430 +           id="text3559"><tspan
 297.431 +             style="fill:black;fill-opacity:1"
 297.432 +             id="tspan3561"
 297.433 +             sodipodi:role="line"
 297.434 +             x="196.71785"
 297.435 +             y="380.17593">Revision data (delta or snapshot)</tspan></text>
 297.436 +      </g>
 297.437 +    </g>
 297.438 +    <g
 297.439 +       id="g4868"
 297.440 +       transform="translate(-1.676208,-2.342463e-5)">
 297.441 +      <rect
 297.442 +         style="fill:url(#linearGradient3708);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.443 +         id="rect3567"
 297.444 +         width="101.60232"
 297.445 +         height="89.506805"
 297.446 +         x="213.26137"
 297.447 +         y="59.171272" />
 297.448 +      <g
 297.449 +         transform="matrix(0.423343,0,0,0.423343,138.8739,-67.01734)"
 297.450 +         id="g3573">
 297.451 +        <rect
 297.452 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.453 +           id="rect3575"
 297.454 +           width="103.14286"
 297.455 +           height="48.571426"
 297.456 +           x="188.6071"
 297.457 +           y="447.72418" />
 297.458 +        <text
 297.459 +           xml:space="preserve"
 297.460 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.461 +           x="197.82495"
 297.462 +           y="464.82358"
 297.463 +           id="text3577"><tspan
 297.464 +             id="tspan3579"
 297.465 +             sodipodi:role="line"
 297.466 +             x="197.82495"
 297.467 +             y="464.82358">First parent</tspan></text>
 297.468 +        <text
 297.469 +           xml:space="preserve"
 297.470 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.471 +           x="197.13031"
 297.472 +           y="485.51224"
 297.473 +           id="text3581"><tspan
 297.474 +             sodipodi:role="line"
 297.475 +             id="tspan3583"
 297.476 +             x="197.13031"
 297.477 +             y="485.51224"
 297.478 +             style="font-family:Courier">34b8b7a15ea1</tspan></text>
 297.479 +      </g>
 297.480 +      <g
 297.481 +         transform="matrix(0.423343,0,0,0.423343,138.8739,-67.01734)"
 297.482 +         id="g3585">
 297.483 +        <rect
 297.484 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.485 +           id="rect3587"
 297.486 +           width="103.14286"
 297.487 +           height="48.571426"
 297.488 +           x="299.67859"
 297.489 +           y="447.71451" />
 297.490 +        <text
 297.491 +           xml:space="preserve"
 297.492 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.493 +           x="308.89639"
 297.494 +           y="464.8139"
 297.495 +           id="text3589"><tspan
 297.496 +             id="tspan3591"
 297.497 +             sodipodi:role="line"
 297.498 +             x="308.89639"
 297.499 +             y="464.8139">Second parent</tspan></text>
 297.500 +        <text
 297.501 +           xml:space="preserve"
 297.502 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.503 +           x="308.20175"
 297.504 +           y="485.50256"
 297.505 +           id="text3593"><tspan
 297.506 +             sodipodi:role="line"
 297.507 +             id="tspan3595"
 297.508 +             x="308.20175"
 297.509 +             y="485.50256"
 297.510 +             style="font-family:Courier">000000000000</tspan></text>
 297.511 +      </g>
 297.512 +      <g
 297.513 +         transform="matrix(0.423343,0,0,0.423343,138.8739,-67.01733)"
 297.514 +         id="g3597">
 297.515 +        <rect
 297.516 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.517 +           id="rect3599"
 297.518 +           width="103.14286"
 297.519 +           height="48.571426"
 297.520 +           x="188.6071"
 297.521 +           y="311.28598" />
 297.522 +        <text
 297.523 +           xml:space="preserve"
 297.524 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.525 +           x="197.82495"
 297.526 +           y="328.38538"
 297.527 +           id="text3601"><tspan
 297.528 +             id="tspan3603"
 297.529 +             sodipodi:role="line"
 297.530 +             x="197.82495"
 297.531 +             y="328.38538">Revision hash</tspan></text>
 297.532 +        <text
 297.533 +           xml:space="preserve"
 297.534 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.535 +           x="197.13031"
 297.536 +           y="349.07404"
 297.537 +           id="text3605"><tspan
 297.538 +             sodipodi:role="line"
 297.539 +             id="tspan3607"
 297.540 +             x="197.13031"
 297.541 +             y="349.07404"
 297.542 +             style="font-family:Courier">1b67dc96f27a</tspan></text>
 297.543 +      </g>
 297.544 +      <g
 297.545 +         transform="matrix(0.423343,0,0,0.423343,139.3426,-65.65866)"
 297.546 +         id="g3609">
 297.547 +        <rect
 297.548 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.549 +           id="rect3611"
 297.550 +           width="213.85715"
 297.551 +           height="75"
 297.552 +           x="187.5"
 297.553 +           y="363.07654" />
 297.554 +        <text
 297.555 +           xml:space="preserve"
 297.556 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.557 +           x="196.02321"
 297.558 +           y="400.86459"
 297.559 +           id="text3613"><tspan
 297.560 +             sodipodi:role="line"
 297.561 +             id="tspan3615"
 297.562 +             x="196.02321"
 297.563 +             y="400.86459"
 297.564 +             style="fill:black;fill-opacity:1;font-family:Courier">...</tspan></text>
 297.565 +        <text
 297.566 +           xml:space="preserve"
 297.567 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.568 +           x="196.71785"
 297.569 +           y="380.17593"
 297.570 +           id="text3617"><tspan
 297.571 +             style="fill:black;fill-opacity:1"
 297.572 +             id="tspan3619"
 297.573 +             sodipodi:role="line"
 297.574 +             x="196.71785"
 297.575 +             y="380.17593">Revision data (delta or snapshot)</tspan></text>
 297.576 +      </g>
 297.577 +    </g>
 297.578 +    <path
 297.579 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Mend)"
 297.580 +       d="M 240.78255,143.08593 L 241.42595,171.75349"
 297.581 +       id="path3801"
 297.582 +       inkscape:connector-type="polyline"
 297.583 +       inkscape:connection-start="#g3573"
 297.584 +       inkscape:connection-end="#g3250" />
 297.585 +    <g
 297.586 +       id="g5677">
 297.587 +      <rect
 297.588 +         style="fill:url(#linearGradient5784);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.589 +         id="rect3393"
 297.590 +         width="101.60232"
 297.591 +         height="89.506805"
 297.592 +         x="150.76137"
 297.593 +         y="278.32565" />
 297.594 +      <g
 297.595 +         transform="matrix(0.423343,0,0,0.423343,76.37397,152.137)"
 297.596 +         id="g3399">
 297.597 +        <rect
 297.598 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.599 +           id="rect3401"
 297.600 +           width="103.14286"
 297.601 +           height="48.571426"
 297.602 +           x="188.6071"
 297.603 +           y="447.72418" />
 297.604 +        <text
 297.605 +           xml:space="preserve"
 297.606 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.607 +           x="197.82495"
 297.608 +           y="464.82358"
 297.609 +           id="text3403"><tspan
 297.610 +             id="tspan3405"
 297.611 +             sodipodi:role="line"
 297.612 +             x="197.82495"
 297.613 +             y="464.82358">First parent</tspan></text>
 297.614 +        <text
 297.615 +           xml:space="preserve"
 297.616 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.617 +           x="197.13031"
 297.618 +           y="485.51224"
 297.619 +           id="text3407"><tspan
 297.620 +             sodipodi:role="line"
 297.621 +             id="tspan3409"
 297.622 +             x="197.13031"
 297.623 +             y="485.51224"
 297.624 +             style="font-family:Courier">ff9dc8bc2a8b</tspan></text>
 297.625 +      </g>
 297.626 +      <g
 297.627 +         transform="matrix(0.423343,0,0,0.423343,76.37397,152.137)"
 297.628 +         id="g3411">
 297.629 +        <rect
 297.630 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.631 +           id="rect3413"
 297.632 +           width="103.14286"
 297.633 +           height="48.571426"
 297.634 +           x="299.67859"
 297.635 +           y="447.71451" />
 297.636 +        <text
 297.637 +           xml:space="preserve"
 297.638 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.639 +           x="308.89639"
 297.640 +           y="464.8139"
 297.641 +           id="text3415"><tspan
 297.642 +             id="tspan3417"
 297.643 +             sodipodi:role="line"
 297.644 +             x="308.89639"
 297.645 +             y="464.8139">Second parent</tspan></text>
 297.646 +        <text
 297.647 +           xml:space="preserve"
 297.648 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.649 +           x="308.20175"
 297.650 +           y="485.50256"
 297.651 +           id="text3419"><tspan
 297.652 +             sodipodi:role="line"
 297.653 +             id="tspan3421"
 297.654 +             x="308.20175"
 297.655 +             y="485.50256"
 297.656 +             style="font-family:Courier">000000000000</tspan></text>
 297.657 +      </g>
 297.658 +      <g
 297.659 +         transform="matrix(0.423343,0,0,0.423343,76.37397,152.137)"
 297.660 +         id="g3423">
 297.661 +        <rect
 297.662 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.663 +           id="rect3425"
 297.664 +           width="103.14286"
 297.665 +           height="48.571426"
 297.666 +           x="188.6071"
 297.667 +           y="311.28598" />
 297.668 +        <text
 297.669 +           xml:space="preserve"
 297.670 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.671 +           x="197.82495"
 297.672 +           y="328.38538"
 297.673 +           id="text3427"><tspan
 297.674 +             id="tspan3429"
 297.675 +             sodipodi:role="line"
 297.676 +             x="197.82495"
 297.677 +             y="328.38538">Revision hash</tspan></text>
 297.678 +        <text
 297.679 +           xml:space="preserve"
 297.680 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.681 +           x="197.13031"
 297.682 +           y="349.07404"
 297.683 +           id="text3431"><tspan
 297.684 +             sodipodi:role="line"
 297.685 +             id="tspan3433"
 297.686 +             x="197.13031"
 297.687 +             y="349.07404"
 297.688 +             style="font-family:Courier">5b80c922ebdd</tspan></text>
 297.689 +      </g>
 297.690 +      <g
 297.691 +         transform="matrix(0.423343,0,0,0.423343,76.84265,153.4957)"
 297.692 +         id="g3435">
 297.693 +        <rect
 297.694 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.695 +           id="rect3437"
 297.696 +           width="213.85715"
 297.697 +           height="75"
 297.698 +           x="187.5"
 297.699 +           y="363.07654" />
 297.700 +        <text
 297.701 +           xml:space="preserve"
 297.702 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.703 +           x="196.02321"
 297.704 +           y="400.86459"
 297.705 +           id="text3439"><tspan
 297.706 +             sodipodi:role="line"
 297.707 +             id="tspan3441"
 297.708 +             x="196.02321"
 297.709 +             y="400.86459"
 297.710 +             style="fill:black;fill-opacity:1;font-family:Courier">...</tspan></text>
 297.711 +        <text
 297.712 +           xml:space="preserve"
 297.713 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.714 +           x="196.71785"
 297.715 +           y="380.17593"
 297.716 +           id="text3443"><tspan
 297.717 +             style="fill:black;fill-opacity:1"
 297.718 +             id="tspan3445"
 297.719 +             sodipodi:role="line"
 297.720 +             x="196.71785"
 297.721 +             y="380.17593">Revision data (delta or snapshot)</tspan></text>
 297.722 +      </g>
 297.723 +    </g>
 297.724 +    <g
 297.725 +       id="g5646"
 297.726 +       transform="translate(-0.227432,0)">
 297.727 +      <rect
 297.728 +         style="fill:url(#linearGradient5786);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.729 +         id="rect3451"
 297.730 +         width="101.60232"
 297.731 +         height="89.506805"
 297.732 +         x="272.63638"
 297.733 +         y="278.32565" />
 297.734 +      <g
 297.735 +         transform="matrix(0.423343,0,0,0.423343,198.2489,152.137)"
 297.736 +         id="g3457">
 297.737 +        <rect
 297.738 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.739 +           id="rect3459"
 297.740 +           width="103.14286"
 297.741 +           height="48.571426"
 297.742 +           x="188.6071"
 297.743 +           y="447.72418" />
 297.744 +        <text
 297.745 +           xml:space="preserve"
 297.746 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.747 +           x="197.82495"
 297.748 +           y="464.82358"
 297.749 +           id="text3461"><tspan
 297.750 +             id="tspan3463"
 297.751 +             sodipodi:role="line"
 297.752 +             x="197.82495"
 297.753 +             y="464.82358">First parent</tspan></text>
 297.754 +        <text
 297.755 +           xml:space="preserve"
 297.756 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.757 +           x="197.13031"
 297.758 +           y="485.51224"
 297.759 +           id="text3465"><tspan
 297.760 +             sodipodi:role="line"
 297.761 +             id="tspan3467"
 297.762 +             x="197.13031"
 297.763 +             y="485.51224"
 297.764 +             style="font-family:Courier">ecacb6b4c9fd</tspan></text>
 297.765 +      </g>
 297.766 +      <g
 297.767 +         transform="matrix(0.423343,0,0,0.423343,198.2489,152.137)"
 297.768 +         id="g3469">
 297.769 +        <rect
 297.770 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.771 +           id="rect3471"
 297.772 +           width="103.14286"
 297.773 +           height="48.571426"
 297.774 +           x="299.67859"
 297.775 +           y="447.71451" />
 297.776 +        <text
 297.777 +           xml:space="preserve"
 297.778 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.779 +           x="308.89639"
 297.780 +           y="464.8139"
 297.781 +           id="text3473"><tspan
 297.782 +             id="tspan3475"
 297.783 +             sodipodi:role="line"
 297.784 +             x="308.89639"
 297.785 +             y="464.8139">Second parent</tspan></text>
 297.786 +        <text
 297.787 +           xml:space="preserve"
 297.788 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.789 +           x="308.20175"
 297.790 +           y="485.50256"
 297.791 +           id="text3477"><tspan
 297.792 +             sodipodi:role="line"
 297.793 +             id="tspan3479"
 297.794 +             x="308.20175"
 297.795 +             y="485.50256"
 297.796 +             style="font-family:Courier">000000000000</tspan></text>
 297.797 +      </g>
 297.798 +      <g
 297.799 +         transform="matrix(0.423343,0,0,0.423343,198.2489,152.137)"
 297.800 +         id="g3481">
 297.801 +        <rect
 297.802 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.803 +           id="rect3483"
 297.804 +           width="103.14286"
 297.805 +           height="48.571426"
 297.806 +           x="188.6071"
 297.807 +           y="311.28598" />
 297.808 +        <text
 297.809 +           xml:space="preserve"
 297.810 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.811 +           x="197.82495"
 297.812 +           y="328.38538"
 297.813 +           id="text3485"><tspan
 297.814 +             id="tspan3487"
 297.815 +             sodipodi:role="line"
 297.816 +             x="197.82495"
 297.817 +             y="328.38538">Revision hash</tspan></text>
 297.818 +        <text
 297.819 +           xml:space="preserve"
 297.820 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.821 +           x="197.13031"
 297.822 +           y="349.07404"
 297.823 +           id="text3489"><tspan
 297.824 +             sodipodi:role="line"
 297.825 +             id="tspan3491"
 297.826 +             x="197.13031"
 297.827 +             y="349.07404"
 297.828 +             style="font-family:Courier">32bf9a5f22c0</tspan></text>
 297.829 +      </g>
 297.830 +      <g
 297.831 +         transform="matrix(0.423343,0,0,0.423343,198.7176,153.4957)"
 297.832 +         id="g3493">
 297.833 +        <rect
 297.834 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 297.835 +           id="rect3495"
 297.836 +           width="213.85715"
 297.837 +           height="75"
 297.838 +           x="187.5"
 297.839 +           y="363.07654" />
 297.840 +        <text
 297.841 +           xml:space="preserve"
 297.842 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.843 +           x="196.02321"
 297.844 +           y="400.86459"
 297.845 +           id="text3497"><tspan
 297.846 +             sodipodi:role="line"
 297.847 +             id="tspan3499"
 297.848 +             x="196.02321"
 297.849 +             y="400.86459"
 297.850 +             style="fill:black;fill-opacity:1;font-family:Courier">...</tspan></text>
 297.851 +        <text
 297.852 +           xml:space="preserve"
 297.853 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.854 +           x="196.71785"
 297.855 +           y="380.17593"
 297.856 +           id="text3501"><tspan
 297.857 +             style="fill:black;fill-opacity:1"
 297.858 +             id="tspan3503"
 297.859 +             sodipodi:role="line"
 297.860 +             x="196.71785"
 297.861 +             y="380.17593">Revision data (delta or snapshot)</tspan></text>
 297.862 +      </g>
 297.863 +    </g>
 297.864 +    <rect
 297.865 +       y="387.90286"
 297.866 +       x="272.40894"
 297.867 +       height="89.506805"
 297.868 +       width="101.60232"
 297.869 +       id="rect5081"
 297.870 +       style="fill:url(#linearGradient5895);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 297.871 +    <g
 297.872 +       id="g5087"
 297.873 +       transform="matrix(0.423343,0,0,0.423343,198.0214,261.7142)">
 297.874 +      <rect
 297.875 +         y="447.72418"
 297.876 +         x="188.6071"
 297.877 +         height="48.571426"
 297.878 +         width="103.14286"
 297.879 +         id="rect5089"
 297.880 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 297.881 +      <text
 297.882 +         id="text5091"
 297.883 +         y="464.82358"
 297.884 +         x="197.82495"
 297.885 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.886 +         xml:space="preserve"><tspan
 297.887 +           y="464.82358"
 297.888 +           x="197.82495"
 297.889 +           sodipodi:role="line"
 297.890 +           id="tspan5093">First parent</tspan></text>
 297.891 +      <text
 297.892 +         id="text5095"
 297.893 +         y="485.51224"
 297.894 +         x="197.13031"
 297.895 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.896 +         xml:space="preserve"><tspan
 297.897 +           style="font-family:Courier"
 297.898 +           y="485.51224"
 297.899 +           x="197.13031"
 297.900 +           id="tspan5097"
 297.901 +           sodipodi:role="line">ff9dc8bc2a8b</tspan></text>
 297.902 +    </g>
 297.903 +    <g
 297.904 +       id="g5099"
 297.905 +       transform="matrix(0.423343,0,0,0.423343,198.0214,261.7142)">
 297.906 +      <rect
 297.907 +         y="447.71451"
 297.908 +         x="299.67859"
 297.909 +         height="48.571426"
 297.910 +         width="103.14286"
 297.911 +         id="rect5101"
 297.912 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 297.913 +      <text
 297.914 +         id="text5103"
 297.915 +         y="464.8139"
 297.916 +         x="308.89639"
 297.917 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.918 +         xml:space="preserve"><tspan
 297.919 +           y="464.8139"
 297.920 +           x="308.89639"
 297.921 +           sodipodi:role="line"
 297.922 +           id="tspan5105">Second parent</tspan></text>
 297.923 +      <text
 297.924 +         id="text5107"
 297.925 +         y="485.50256"
 297.926 +         x="308.20175"
 297.927 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.928 +         xml:space="preserve"><tspan
 297.929 +           style="font-family:Courier"
 297.930 +           y="485.50256"
 297.931 +           x="308.20175"
 297.932 +           id="tspan5109"
 297.933 +           sodipodi:role="line">000000000000</tspan></text>
 297.934 +    </g>
 297.935 +    <g
 297.936 +       id="g5111"
 297.937 +       transform="matrix(0.423343,0,0,0.423343,198.0214,261.7142)">
 297.938 +      <rect
 297.939 +         y="311.28598"
 297.940 +         x="188.6071"
 297.941 +         height="48.571426"
 297.942 +         width="103.14286"
 297.943 +         id="rect5113"
 297.944 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 297.945 +      <text
 297.946 +         id="text5115"
 297.947 +         y="328.38538"
 297.948 +         x="197.82495"
 297.949 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.950 +         xml:space="preserve"><tspan
 297.951 +           y="328.38538"
 297.952 +           x="197.82495"
 297.953 +           sodipodi:role="line"
 297.954 +           id="tspan5117">Revision hash</tspan></text>
 297.955 +      <text
 297.956 +         id="text5119"
 297.957 +         y="349.07404"
 297.958 +         x="197.13031"
 297.959 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.960 +         xml:space="preserve"><tspan
 297.961 +           style="font-family:Courier"
 297.962 +           y="349.07404"
 297.963 +           x="197.13031"
 297.964 +           id="tspan5121"
 297.965 +           sodipodi:role="line">ecacb6b4c9fd</tspan></text>
 297.966 +    </g>
 297.967 +    <g
 297.968 +       id="g5123"
 297.969 +       transform="matrix(0.423343,0,0,0.423343,198.4901,263.0729)">
 297.970 +      <rect
 297.971 +         y="363.07654"
 297.972 +         x="187.5"
 297.973 +         height="75"
 297.974 +         width="213.85715"
 297.975 +         id="rect5125"
 297.976 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 297.977 +      <text
 297.978 +         id="text5127"
 297.979 +         y="400.86459"
 297.980 +         x="196.02321"
 297.981 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.982 +         xml:space="preserve"><tspan
 297.983 +           style="fill:black;fill-opacity:1;font-family:Courier"
 297.984 +           y="400.86459"
 297.985 +           x="196.02321"
 297.986 +           id="tspan5129"
 297.987 +           sodipodi:role="line">...</tspan></text>
 297.988 +      <text
 297.989 +         id="text5131"
 297.990 +         y="380.17593"
 297.991 +         x="196.71785"
 297.992 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 297.993 +         xml:space="preserve"><tspan
 297.994 +           y="380.17593"
 297.995 +           x="196.71785"
 297.996 +           sodipodi:role="line"
 297.997 +           id="tspan5133"
 297.998 +           style="fill:black;fill-opacity:1">Revision data (delta or snapshot)</tspan></text>
 297.999 +    </g>
297.1000 +    <path
297.1001 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
297.1002 +       d="M 299.69935,362.24027 L 299.69931,393.49494"
297.1003 +       id="path5203"
297.1004 +       inkscape:connector-type="polyline"
297.1005 +       inkscape:connection-start="#g3457"
297.1006 +       inkscape:connection-end="#g5111" />
297.1007 +    <path
297.1008 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
297.1009 +       d="M 182.35357,362.22647 L 241.2842,503.07224"
297.1010 +       id="path5271"
297.1011 +       inkscape:connector-type="polyline"
297.1012 +       inkscape:connection-start="#g3399"
297.1013 +       inkscape:connection-end="#g3539" />
297.1014 +    <path
297.1015 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
297.1016 +       d="M 287.63109,471.81747 L 250.9438,503.07223"
297.1017 +       id="path5285"
297.1018 +       inkscape:connector-type="polyline"
297.1019 +       inkscape:connection-start="#g5087"
297.1020 +       inkscape:connection-end="#g3539" />
297.1021 +    <path
297.1022 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
297.1023 +       d="M 290.80419,250.07192 L 297.80065,283.90394"
297.1024 +       id="path5077"
297.1025 +       inkscape:connector-type="polyline"
297.1026 +       inkscape:connection-start="#g3215"
297.1027 +       inkscape:connection-end="#g3481" />
297.1028 +    <path
297.1029 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
297.1030 +       d="M 229.63373,250.07601 L 190.07484,283.90394"
297.1031 +       id="path5075"
297.1032 +       inkscape:connector-type="polyline"
297.1033 +       inkscape:connection-end="#g3423" />
297.1034 +    <text
297.1035 +       xml:space="preserve"
297.1036 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
297.1037 +       x="131.5625"
297.1038 +       y="100.79968"
297.1039 +       id="text5897"><tspan
297.1040 +         sodipodi:role="line"
297.1041 +         id="tspan5899"
297.1042 +         x="131.5625"
297.1043 +         y="100.79968"
297.1044 +         style="text-align:end;text-anchor:end">Head revision</tspan><tspan
297.1045 +         sodipodi:role="line"
297.1046 +         x="131.5625"
297.1047 +         y="115.79968"
297.1048 +         id="tspan5901"
297.1049 +         style="text-align:end;text-anchor:end">(no children)</tspan></text>
297.1050 +    <text
297.1051 +       xml:space="preserve"
297.1052 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
297.1053 +       x="131.5625"
297.1054 +       y="207.04968"
297.1055 +       id="text5903"><tspan
297.1056 +         sodipodi:role="line"
297.1057 +         id="tspan5905"
297.1058 +         x="131.5625"
297.1059 +         y="207.04968"
297.1060 +         style="text-align:end;text-anchor:end">Merge revision</tspan><tspan
297.1061 +         sodipodi:role="line"
297.1062 +         x="131.5625"
297.1063 +         y="222.04968"
297.1064 +         id="tspan5907"
297.1065 +         style="text-align:end;text-anchor:end">(two parents)</tspan></text>
297.1066 +    <text
297.1067 +       xml:space="preserve"
297.1068 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
297.1069 +       x="131.92578"
297.1070 +       y="451.58093"
297.1071 +       id="text5909"><tspan
297.1072 +         sodipodi:role="line"
297.1073 +         id="tspan5911"
297.1074 +         x="131.92578"
297.1075 +         y="451.58093"
297.1076 +         style="text-align:end;text-anchor:end">Branches</tspan><tspan
297.1077 +         sodipodi:role="line"
297.1078 +         x="131.92578"
297.1079 +         y="466.58093"
297.1080 +         id="tspan5913"
297.1081 +         style="text-align:end;text-anchor:end">(two revisions,</tspan><tspan
297.1082 +         sodipodi:role="line"
297.1083 +         x="131.92578"
297.1084 +         y="481.58093"
297.1085 +         id="tspan5915"
297.1086 +         style="text-align:end;text-anchor:end">same parent)</tspan></text>
297.1087 +    <path
297.1088 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
297.1089 +       d="M 111.71875,433.61218 L 154.7268,368.52294"
297.1090 +       id="path5917"
297.1091 +       inkscape:connector-type="polyline" />
297.1092 +    <path
297.1093 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
297.1094 +       d="M 134.375,464.86218 L 277.86691,440.37816"
297.1095 +       id="path5919"
297.1096 +       inkscape:connector-type="polyline"
297.1097 +       inkscape:connection-end="#g5123" />
297.1098 +    <text
297.1099 +       xml:space="preserve"
297.1100 +       style="font-size:12px;font-style:normal;font-weight:normal;text-align:end;text-anchor:end;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
297.1101 +       x="131.5625"
297.1102 +       y="536.73718"
297.1103 +       id="text5927"><tspan
297.1104 +         sodipodi:role="line"
297.1105 +         id="tspan5929"
297.1106 +         x="131.5625"
297.1107 +         y="536.73718">First revision</tspan><tspan
297.1108 +         sodipodi:role="line"
297.1109 +         x="131.5625"
297.1110 +         y="551.73718"
297.1111 +         id="tspan5931">(both parents null)</tspan></text>
297.1112 +    <rect
297.1113 +       style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
297.1114 +       id="rect2830"
297.1115 +       width="43.664806"
297.1116 +       height="20.562374"
297.1117 +       x="217.0432"
297.1118 +       y="232.10075" />
297.1119 +    <text
297.1120 +       xml:space="preserve"
297.1121 +       style="font-size:5.0801158px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
297.1122 +       x="220.94551"
297.1123 +       y="239.33966"
297.1124 +       id="text2832"><tspan
297.1125 +         id="tspan2836"
297.1126 +         sodipodi:role="line"
297.1127 +         x="220.94551"
297.1128 +         y="239.33966">First parent</tspan></text>
297.1129 +    <text
297.1130 +       xml:space="preserve"
297.1131 +       style="font-size:5.0801158px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
297.1132 +       x="220.65144"
297.1133 +       y="248.09805"
297.1134 +       id="text2879"><tspan
297.1135 +         sodipodi:role="line"
297.1136 +         id="tspan2881"
297.1137 +         x="220.65144"
297.1138 +         y="248.09805"
297.1139 +         style="font-family:Courier">5b80c922ebdd</tspan></text>
297.1140 +    <path
297.1141 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
297.1142 +       d="M 139.84375,107.83093 L 210.15625,107.83093"
297.1143 +       id="path5965"
297.1144 +       inkscape:connector-type="polyline" />
297.1145 +    <path
297.1146 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
297.1147 +       d="M 137.5,213.29968 L 210.49036,214.09055"
297.1148 +       id="path5967"
297.1149 +       inkscape:connector-type="polyline" />
297.1150 +    <path
297.1151 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
297.1152 +       d="M 136.34375,544.54968 L 206.65625,544.54968"
297.1153 +       id="path5969"
297.1154 +       inkscape:connector-type="polyline"
297.1155 +       inkscape:transform-center-y="-171.09375"
297.1156 +       inkscape:transform-center-x="53.90625" />
297.1157 +  </g>
297.1158 +</svg>
   298.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   298.2 +++ b/en/figs/snapshot.svg	Sun Aug 16 03:41:39 2009 +0200
   298.3 @@ -0,0 +1,202 @@
   298.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   298.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   298.6 +<svg
   298.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   298.8 +   xmlns:cc="http://web.resource.org/cc/"
   298.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  298.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  298.11 +   xmlns="http://www.w3.org/2000/svg"
  298.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  298.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  298.14 +   width="744.09448819"
  298.15 +   height="1052.3622047"
  298.16 +   id="svg2807"
  298.17 +   sodipodi:version="0.32"
  298.18 +   inkscape:version="0.44.1"
  298.19 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  298.20 +   sodipodi:docname="snapshots.svg">
  298.21 +  <defs
  298.22 +     id="defs2809" />
  298.23 +  <sodipodi:namedview
  298.24 +     id="base"
  298.25 +     pagecolor="#ffffff"
  298.26 +     bordercolor="#666666"
  298.27 +     borderopacity="1.0"
  298.28 +     gridtolerance="10000"
  298.29 +     guidetolerance="10"
  298.30 +     objecttolerance="10"
  298.31 +     inkscape:pageopacity="0.0"
  298.32 +     inkscape:pageshadow="2"
  298.33 +     inkscape:zoom="1.4"
  298.34 +     inkscape:cx="252.04111"
  298.35 +     inkscape:cy="605.75448"
  298.36 +     inkscape:document-units="px"
  298.37 +     inkscape:current-layer="layer1"
  298.38 +     inkscape:window-width="906"
  298.39 +     inkscape:window-height="721"
  298.40 +     inkscape:window-x="0"
  298.41 +     inkscape:window-y="25" />
  298.42 +  <metadata
  298.43 +     id="metadata2812">
  298.44 +    <rdf:RDF>
  298.45 +      <cc:Work
  298.46 +         rdf:about="">
  298.47 +        <dc:format>image/svg+xml</dc:format>
  298.48 +        <dc:type
  298.49 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  298.50 +      </cc:Work>
  298.51 +    </rdf:RDF>
  298.52 +  </metadata>
  298.53 +  <g
  298.54 +     inkscape:label="Layer 1"
  298.55 +     inkscape:groupmode="layer"
  298.56 +     id="layer1">
  298.57 +    <rect
  298.58 +       style="opacity:1;fill:#d3ceff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.88795626;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
  298.59 +       id="rect2817"
  298.60 +       width="118.18347"
  298.61 +       height="245.32632"
  298.62 +       x="243.05112"
  298.63 +       y="315.4133"
  298.64 +       inkscape:transform-center-x="136.84403"
  298.65 +       inkscape:transform-center-y="-66.529183" />
  298.66 +    <rect
  298.67 +       y="315.04153"
  298.68 +       x="46.965065"
  298.69 +       height="97.803009"
  298.70 +       width="108.92702"
  298.71 +       id="rect2815"
  298.72 +       style="fill:#ffced6;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.14441991;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
  298.73 +    <g
  298.74 +       id="g3814">
  298.75 +      <rect
  298.76 +         y="348.94302"
  298.77 +         x="59.285713"
  298.78 +         height="30"
  298.79 +         width="84.285713"
  298.80 +         id="rect2819"
  298.81 +         style="fill:#ff6e86;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
  298.82 +         ry="0" />
  298.83 +      <text
  298.84 +         id="text2821"
  298.85 +         y="368.02701"
  298.86 +         x="72.717636"
  298.87 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
  298.88 +         xml:space="preserve"><tspan
  298.89 +           y="368.02701"
  298.90 +           x="72.717636"
  298.91 +           id="tspan2823"
  298.92 +           sodipodi:role="line">Index, rev 7</tspan></text>
  298.93 +    </g>
  298.94 +    <text
  298.95 +       id="text3722"
  298.96 +       y="301.29074"
  298.97 +       x="46.187778"
  298.98 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
  298.99 +       xml:space="preserve"><tspan
 298.100 +         y="301.29074"
 298.101 +         x="46.187778"
 298.102 +         id="tspan3724"
 298.103 +         sodipodi:role="line">Revlog index (.i file)</tspan></text>
 298.104 +    <text
 298.105 +       id="text3726"
 298.106 +       y="301.29074"
 298.107 +       x="241.90207"
 298.108 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 298.109 +       xml:space="preserve"><tspan
 298.110 +         y="301.29074"
 298.111 +         x="241.90207"
 298.112 +         id="tspan3728"
 298.113 +         sodipodi:role="line">Revlog data (.d file)</tspan></text>
 298.114 +    <path
 298.115 +       style="fill:#c695ff;fill-opacity:0.60109288;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 298.116 +       d="M 143.57143,348.07647 L 255,368.07646 L 255.71429,544.50504 L 142.85714,379.50504 L 143.57143,348.07647 z "
 298.117 +       id="path3839"
 298.118 +       sodipodi:nodetypes="ccccc" />
 298.119 +    <rect
 298.120 +       style="fill:#4733ff;fill-opacity:1;stroke:#a7a7a7;stroke-width:2.35124183;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 298.121 +       id="rect3752"
 298.122 +       width="92.720184"
 298.123 +       height="67.005905"
 298.124 +       x="255.42564"
 298.125 +       y="368.64264" />
 298.126 +    <text
 298.127 +       xml:space="preserve"
 298.128 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 298.129 +       x="264.45859"
 298.130 +       y="387.30099"
 298.131 +       id="text3754"><tspan
 298.132 +         sodipodi:role="line"
 298.133 +         id="tspan3756"
 298.134 +         x="264.45859"
 298.135 +         y="387.30099">Snapshot, rev 4</tspan></text>
 298.136 +    <rect
 298.137 +       style="fill:#7c6eff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.57776296;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 298.138 +       id="rect3761"
 298.139 +       width="93.49366"
 298.140 +       height="29.922237"
 298.141 +       x="255.03891"
 298.142 +       y="442.04395" />
 298.143 +    <text
 298.144 +       xml:space="preserve"
 298.145 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 298.146 +       x="263.2662"
 298.147 +       y="460.17206"
 298.148 +       id="text3763"><tspan
 298.149 +         sodipodi:role="line"
 298.150 +         id="tspan3765"
 298.151 +         x="263.2662"
 298.152 +         y="460.17206">Delta, rev 4 to 5</tspan></text>
 298.153 +    <rect
 298.154 +       style="fill:#7c6eff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.57776296;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 298.155 +       id="rect3774"
 298.156 +       width="93.49366"
 298.157 +       height="29.922237"
 298.158 +       x="255.03891"
 298.159 +       y="477.97485" />
 298.160 +    <text
 298.161 +       xml:space="preserve"
 298.162 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 298.163 +       x="263.2662"
 298.164 +       y="496.10297"
 298.165 +       id="text3776"><tspan
 298.166 +         sodipodi:role="line"
 298.167 +         id="tspan3778"
 298.168 +         x="263.2662"
 298.169 +         y="496.10297">Delta, rev 5 to 6</tspan></text>
 298.170 +    <rect
 298.171 +       style="fill:#7c6eff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.57776296;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 298.172 +       id="rect3782"
 298.173 +       width="93.49366"
 298.174 +       height="29.922237"
 298.175 +       x="255.03891"
 298.176 +       y="513.90576" />
 298.177 +    <text
 298.178 +       xml:space="preserve"
 298.179 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 298.180 +       x="263.2662"
 298.181 +       y="532.03387"
 298.182 +       id="text3784"><tspan
 298.183 +         sodipodi:role="line"
 298.184 +         id="tspan3786"
 298.185 +         x="263.2662"
 298.186 +         y="532.03387">Delta, rev 6 to 7</tspan></text>
 298.187 +    <rect
 298.188 +       style="fill:#7c6eff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.57776296;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 298.189 +       id="rect3889"
 298.190 +       width="93.49366"
 298.191 +       height="29.922237"
 298.192 +       x="255.03891"
 298.193 +       y="332.32489" />
 298.194 +    <text
 298.195 +       xml:space="preserve"
 298.196 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 298.197 +       x="263.2662"
 298.198 +       y="350.453"
 298.199 +       id="text3891"><tspan
 298.200 +         sodipodi:role="line"
 298.201 +         id="tspan3893"
 298.202 +         x="263.2662"
 298.203 +         y="350.453">Delta, rev 2 to 3</tspan></text>
 298.204 +  </g>
 298.205 +</svg>
   299.1 Binary file en/figs/throbber.gif has changed
   300.1 Binary file en/figs/tip.png has changed
   301.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   301.2 +++ b/en/figs/tour-history.svg	Sun Aug 16 03:41:39 2009 +0200
   301.3 @@ -0,0 +1,289 @@
   301.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   301.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   301.6 +<svg
   301.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   301.8 +   xmlns:cc="http://web.resource.org/cc/"
   301.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  301.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  301.11 +   xmlns="http://www.w3.org/2000/svg"
  301.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  301.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  301.14 +   width="744.09448819"
  301.15 +   height="1052.3622047"
  301.16 +   id="svg2"
  301.17 +   sodipodi:version="0.32"
  301.18 +   inkscape:version="0.44.1"
  301.19 +   sodipodi:docname="tour-history.svg">
  301.20 +  <defs
  301.21 +     id="defs4">
  301.22 +    <marker
  301.23 +       inkscape:stockid="Arrow1Mstart"
  301.24 +       orient="auto"
  301.25 +       refY="0.0"
  301.26 +       refX="0.0"
  301.27 +       id="Arrow1Mstart"
  301.28 +       style="overflow:visible">
  301.29 +      <path
  301.30 +         id="path2973"
  301.31 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  301.32 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  301.33 +         transform="scale(0.4) translate(10,0)" />
  301.34 +    </marker>
  301.35 +    <marker
  301.36 +       inkscape:stockid="Arrow1Mend"
  301.37 +       orient="auto"
  301.38 +       refY="0.0"
  301.39 +       refX="0.0"
  301.40 +       id="Arrow1Mend"
  301.41 +       style="overflow:visible;">
  301.42 +      <path
  301.43 +         id="path3066"
  301.44 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  301.45 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  301.46 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  301.47 +    </marker>
  301.48 +  </defs>
  301.49 +  <sodipodi:namedview
  301.50 +     id="base"
  301.51 +     pagecolor="#ffffff"
  301.52 +     bordercolor="#666666"
  301.53 +     borderopacity="1.0"
  301.54 +     gridtolerance="10000"
  301.55 +     guidetolerance="10"
  301.56 +     objecttolerance="10"
  301.57 +     inkscape:pageopacity="0.0"
  301.58 +     inkscape:pageshadow="2"
  301.59 +     inkscape:zoom="1.4"
  301.60 +     inkscape:cx="232.14286"
  301.61 +     inkscape:cy="672.75296"
  301.62 +     inkscape:document-units="px"
  301.63 +     inkscape:current-layer="layer1"
  301.64 +     inkscape:window-width="906"
  301.65 +     inkscape:window-height="620"
  301.66 +     inkscape:window-x="5"
  301.67 +     inkscape:window-y="49" />
  301.68 +  <metadata
  301.69 +     id="metadata7">
  301.70 +    <rdf:RDF>
  301.71 +      <cc:Work
  301.72 +         rdf:about="">
  301.73 +        <dc:format>image/svg+xml</dc:format>
  301.74 +        <dc:type
  301.75 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  301.76 +      </cc:Work>
  301.77 +    </rdf:RDF>
  301.78 +  </metadata>
  301.79 +  <g
  301.80 +     inkscape:label="Layer 1"
  301.81 +     inkscape:groupmode="layer"
  301.82 +     id="layer1">
  301.83 +    <rect
  301.84 +       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
  301.85 +       id="rect1878"
  301.86 +       width="94.285713"
  301.87 +       height="20.714285"
  301.88 +       x="138"
  301.89 +       y="479.50504" />
  301.90 +    <text
  301.91 +       xml:space="preserve"
  301.92 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
  301.93 +       x="162.09892"
  301.94 +       y="493.12619"
  301.95 +       id="text1872"><tspan
  301.96 +         sodipodi:role="line"
  301.97 +         id="tspan1874"
  301.98 +         x="162.09892"
  301.99 +         y="493.12619"
 301.100 +         style="font-family:Courier"><tspan
 301.101 +   style="font-weight:bold"
 301.102 +   id="tspan1876">0</tspan>: REV0</tspan></text>
 301.103 +    <rect
 301.104 +       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 301.105 +       id="rect2800"
 301.106 +       width="94.285713"
 301.107 +       height="20.714285"
 301.108 +       x="138"
 301.109 +       y="432.63004" />
 301.110 +    <text
 301.111 +       xml:space="preserve"
 301.112 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 301.113 +       x="162.09892"
 301.114 +       y="446.25119"
 301.115 +       id="text2794"><tspan
 301.116 +         sodipodi:role="line"
 301.117 +         id="tspan2796"
 301.118 +         x="162.09892"
 301.119 +         y="446.25119"
 301.120 +         style="font-family:Courier"><tspan
 301.121 +   id="tspan2868"
 301.122 +   style="font-weight:bold">1</tspan>: REV1</tspan></text>
 301.123 +    <rect
 301.124 +       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 301.125 +       id="rect2810"
 301.126 +       width="94.285713"
 301.127 +       height="20.714285"
 301.128 +       x="138"
 301.129 +       y="385.75504" />
 301.130 +    <text
 301.131 +       xml:space="preserve"
 301.132 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 301.133 +       x="162.09892"
 301.134 +       y="399.37619"
 301.135 +       id="text2804"><tspan
 301.136 +         sodipodi:role="line"
 301.137 +         id="tspan2806"
 301.138 +         x="162.09892"
 301.139 +         y="399.37619"
 301.140 +         style="font-family:Courier"><tspan
 301.141 +   style="font-weight:bold"
 301.142 +   id="tspan2866">2</tspan>: REV2</tspan></text>
 301.143 +    <rect
 301.144 +       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 301.145 +       id="rect2820"
 301.146 +       width="94.285713"
 301.147 +       height="20.714285"
 301.148 +       x="138"
 301.149 +       y="338.88007" />
 301.150 +    <text
 301.151 +       xml:space="preserve"
 301.152 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 301.153 +       x="162.09892"
 301.154 +       y="352.50122"
 301.155 +       id="text2814"><tspan
 301.156 +         sodipodi:role="line"
 301.157 +         id="tspan2816"
 301.158 +         x="162.09892"
 301.159 +         y="352.50122"
 301.160 +         style="font-family:Courier"><tspan
 301.161 +   style="font-weight:bold"
 301.162 +   id="tspan2864">3</tspan>: REV3</tspan></text>
 301.163 +    <rect
 301.164 +       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 301.165 +       id="rect2830"
 301.166 +       width="94.285713"
 301.167 +       height="20.714285"
 301.168 +       x="138"
 301.169 +       y="292.00504" />
 301.170 +    <text
 301.171 +       xml:space="preserve"
 301.172 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 301.173 +       x="162.09892"
 301.174 +       y="305.62619"
 301.175 +       id="text2824"><tspan
 301.176 +         sodipodi:role="line"
 301.177 +         id="tspan2826"
 301.178 +         x="162.09892"
 301.179 +         y="305.62619"
 301.180 +         style="font-family:Courier"><tspan
 301.181 +   style="font-weight:bold"
 301.182 +   id="tspan2862">4</tspan>: REV4</tspan></text>
 301.183 +    <text
 301.184 +       xml:space="preserve"
 301.185 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 301.186 +       x="173.57143"
 301.187 +       y="443.79074"
 301.188 +       id="text2832"><tspan
 301.189 +         sodipodi:role="line"
 301.190 +         id="tspan2834"
 301.191 +         x="173.57143"
 301.192 +         y="443.79074" /></text>
 301.193 +    <path
 301.194 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 301.195 +       d="M 185.14286,478.50504 L 185.14286,454.34432"
 301.196 +       id="path2894"
 301.197 +       inkscape:connector-type="polyline" />
 301.198 +    <path
 301.199 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 301.200 +       d="M 185.14286,431.63004 L 185.14286,407.46932"
 301.201 +       id="path2896"
 301.202 +       inkscape:connector-type="polyline" />
 301.203 +    <path
 301.204 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 301.205 +       d="M 185.14286,384.75504 L 185.14286,360.59435"
 301.206 +       id="path2898"
 301.207 +       inkscape:connector-type="polyline" />
 301.208 +    <path
 301.209 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 301.210 +       d="M 185.14286,337.88007 L 185.14286,313.71932"
 301.211 +       id="path2900"
 301.212 +       inkscape:connector-type="polyline" />
 301.213 +    <text
 301.214 +       xml:space="preserve"
 301.215 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times"
 301.216 +       x="244.60992"
 301.217 +       y="305.245"
 301.218 +       id="text1902"><tspan
 301.219 +         sodipodi:role="line"
 301.220 +         id="tspan1904"
 301.221 +         x="244.60992"
 301.222 +         y="305.245">(newest)</tspan></text>
 301.223 +    <text
 301.224 +       xml:space="preserve"
 301.225 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times"
 301.226 +       x="244.60992"
 301.227 +       y="492.745"
 301.228 +       id="text1906"><tspan
 301.229 +         sodipodi:role="line"
 301.230 +         id="tspan1908"
 301.231 +         x="244.60992"
 301.232 +         y="492.745">(oldest)</tspan></text>
 301.233 +    <rect
 301.234 +       style="opacity:1;fill:#d2e1e4;fill-opacity:1;stroke:#b1cbd0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 301.235 +       id="rect1907"
 301.236 +       width="94.285713"
 301.237 +       height="20.714285"
 301.238 +       x="309.28571"
 301.239 +       y="324.86218" />
 301.240 +    <text
 301.241 +       xml:space="preserve"
 301.242 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 301.243 +       x="333.38464"
 301.244 +       y="338.48334"
 301.245 +       id="text1909"><tspan
 301.246 +         sodipodi:role="line"
 301.247 +         id="tspan1911"
 301.248 +         x="333.38464"
 301.249 +         y="338.48334"
 301.250 +         style="font-family:Courier"><tspan
 301.251 +   style="font-weight:bold"
 301.252 +   id="tspan1913">4</tspan>: REV4</tspan></text>
 301.253 +    <path
 301.254 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 301.255 +       d="M 332.14286,375.21932 L 335.71429,347.36218"
 301.256 +       id="path2802" />
 301.257 +    <path
 301.258 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 301.259 +       d="M 372.69968,375.21932 L 369.12825,347.36218"
 301.260 +       id="path2986" />
 301.261 +    <text
 301.262 +       xml:space="preserve"
 301.263 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times"
 301.264 +       x="335.14285"
 301.265 +       y="387.21933"
 301.266 +       id="text2988"><tspan
 301.267 +         sodipodi:role="line"
 301.268 +         x="335.14285"
 301.269 +         y="387.21933"
 301.270 +         id="tspan3020"
 301.271 +         style="text-align:end;text-anchor:end">revision</tspan><tspan
 301.272 +         sodipodi:role="line"
 301.273 +         x="335.14285"
 301.274 +         y="402.21933"
 301.275 +         id="tspan3014"
 301.276 +         style="text-align:end;text-anchor:end">number</tspan></text>
 301.277 +    <text
 301.278 +       xml:space="preserve"
 301.279 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times"
 301.280 +       x="368.71429"
 301.281 +       y="387.21933"
 301.282 +       id="text2994"><tspan
 301.283 +         sodipodi:role="line"
 301.284 +         id="tspan2996"
 301.285 +         x="368.71429"
 301.286 +         y="387.21933">changeset</tspan><tspan
 301.287 +         sodipodi:role="line"
 301.288 +         x="368.71429"
 301.289 +         y="402.21933"
 301.290 +         id="tspan2998">identifier</tspan></text>
 301.291 +  </g>
 301.292 +</svg>
   302.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   302.2 +++ b/en/figs/tour-merge-conflict.svg	Sun Aug 16 03:41:39 2009 +0200
   302.3 @@ -0,0 +1,210 @@
   302.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   302.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   302.6 +<svg
   302.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   302.8 +   xmlns:cc="http://web.resource.org/cc/"
   302.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  302.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  302.11 +   xmlns="http://www.w3.org/2000/svg"
  302.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  302.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  302.14 +   width="744.09448819"
  302.15 +   height="1052.3622047"
  302.16 +   id="svg2"
  302.17 +   sodipodi:version="0.32"
  302.18 +   inkscape:version="0.44.1"
  302.19 +   sodipodi:docname="tour-merge-conflict.svg">
  302.20 +  <defs
  302.21 +     id="defs4">
  302.22 +    <marker
  302.23 +       inkscape:stockid="Arrow1Mend"
  302.24 +       orient="auto"
  302.25 +       refY="0.0"
  302.26 +       refX="0.0"
  302.27 +       id="Arrow1Mend"
  302.28 +       style="overflow:visible;">
  302.29 +      <path
  302.30 +         id="path3053"
  302.31 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  302.32 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  302.33 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  302.34 +    </marker>
  302.35 +  </defs>
  302.36 +  <sodipodi:namedview
  302.37 +     id="base"
  302.38 +     pagecolor="#ffffff"
  302.39 +     bordercolor="#666666"
  302.40 +     borderopacity="1.0"
  302.41 +     gridtolerance="10000"
  302.42 +     guidetolerance="10"
  302.43 +     objecttolerance="10"
  302.44 +     inkscape:pageopacity="0.0"
  302.45 +     inkscape:pageshadow="2"
  302.46 +     inkscape:zoom="1.4"
  302.47 +     inkscape:cx="164.78349"
  302.48 +     inkscape:cy="590.07679"
  302.49 +     inkscape:document-units="px"
  302.50 +     inkscape:current-layer="layer1"
  302.51 +     inkscape:window-width="906"
  302.52 +     inkscape:window-height="620"
  302.53 +     inkscape:window-x="5"
  302.54 +     inkscape:window-y="49" />
  302.55 +  <metadata
  302.56 +     id="metadata7">
  302.57 +    <rdf:RDF>
  302.58 +      <cc:Work
  302.59 +         rdf:about="">
  302.60 +        <dc:format>image/svg+xml</dc:format>
  302.61 +        <dc:type
  302.62 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  302.63 +      </cc:Work>
  302.64 +    </rdf:RDF>
  302.65 +  </metadata>
  302.66 +  <g
  302.67 +     inkscape:label="Layer 1"
  302.68 +     inkscape:groupmode="layer"
  302.69 +     id="layer1">
  302.70 +    <g
  302.71 +       id="g1988"
  302.72 +       transform="translate(84.85711,0)">
  302.73 +      <g
  302.74 +         id="g1876">
  302.75 +        <path
  302.76 +           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  302.77 +           d="M 118.57143,458.21933 L 118.57143,563.79075 L 191.42857,563.79075 L 204.28571,550.93361 L 203.57142,459.6479 L 118.57143,458.21933 z "
  302.78 +           id="path1872"
  302.79 +           sodipodi:nodetypes="cccccc" />
  302.80 +        <path
  302.81 +           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  302.82 +           d="M 191.55484,563.36862 L 191.6923,560.98794 L 192.69126,552.44884 L 203.80416,551.31242"
  302.83 +           id="path1874"
  302.84 +           sodipodi:nodetypes="cccc" />
  302.85 +      </g>
  302.86 +      <flowRoot
  302.87 +         style="font-size:8px;font-family:Times New Roman"
  302.88 +         id="flowRoot1898"
  302.89 +         xml:space="preserve"><flowRegion
  302.90 +           id="flowRegion1900"><rect
  302.91 +             style="font-size:8px;font-family:Times New Roman"
  302.92 +             y="464.50504"
  302.93 +             x="122.85714"
  302.94 +             height="93.571426"
  302.95 +             width="76.428574"
  302.96 +             id="rect1902" /></flowRegion><flowPara
  302.97 +           id="flowPara1904">Greetings!</flowPara><flowPara
  302.98 +           id="flowPara1906" /><flowPara
  302.99 +           id="flowPara1908">I am Mariam Abacha, the wife of former Nigerian dictator Sani Abacha. I am contacting you in confidence, and as a means of developing</flowPara></flowRoot>    </g>
 302.100 +    <g
 302.101 +       id="g1966"
 302.102 +       transform="translate(82,0.35715)">
 302.103 +      <g
 302.104 +         transform="translate(-77.85718,-140.0714)"
 302.105 +         id="g1910">
 302.106 +        <path
 302.107 +           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 302.108 +           d="M 118.57143,458.21933 L 118.57143,563.79075 L 191.42857,563.79075 L 204.28571,550.93361 L 203.57142,459.6479 L 118.57143,458.21933 z "
 302.109 +           id="path1912"
 302.110 +           sodipodi:nodetypes="cccccc" />
 302.111 +        <path
 302.112 +           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 302.113 +           d="M 191.55484,563.36862 L 191.6923,560.98794 L 192.69126,552.44884 L 203.80416,551.31242"
 302.114 +           id="path1914"
 302.115 +           sodipodi:nodetypes="cccc" />
 302.116 +      </g>
 302.117 +      <flowRoot
 302.118 +         transform="translate(-77.85718,-140.0714)"
 302.119 +         style="font-size:8px;font-family:Times New Roman"
 302.120 +         id="flowRoot1916"
 302.121 +         xml:space="preserve"><flowRegion
 302.122 +           id="flowRegion1918"><rect
 302.123 +             style="font-size:8px;font-family:Times New Roman"
 302.124 +             y="464.50504"
 302.125 +             x="122.85714"
 302.126 +             height="93.571426"
 302.127 +             width="76.428574"
 302.128 +             id="rect1920" /></flowRegion><flowPara
 302.129 +           id="flowPara1922">Greetings!</flowPara><flowPara
 302.130 +           id="flowPara1924" /><flowPara
 302.131 +           id="flowPara1926">I am <flowSpan
 302.132 +   style="font-style:italic;fill:red"
 302.133 +   id="flowSpan3094">Shehu Musa Abacha, cousin to</flowSpan> the former Nigerian dictator Sani Abacha. I am contacting you in confidence, and as a means of developing</flowPara></flowRoot>    </g>
 302.134 +    <g
 302.135 +       id="g1977"
 302.136 +       transform="translate(81.99999,-0.35715)">
 302.137 +      <g
 302.138 +         transform="translate(83.57141,-139.3571)"
 302.139 +         id="g1932">
 302.140 +        <path
 302.141 +           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 302.142 +           d="M 118.57143,458.21933 L 118.57143,563.79075 L 191.42857,563.79075 L 204.28571,550.93361 L 203.57142,459.6479 L 118.57143,458.21933 z "
 302.143 +           id="path1934"
 302.144 +           sodipodi:nodetypes="cccccc" />
 302.145 +        <path
 302.146 +           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 302.147 +           d="M 191.55484,563.36862 L 191.6923,560.98794 L 192.69126,552.44884 L 203.80416,551.31242"
 302.148 +           id="path1936"
 302.149 +           sodipodi:nodetypes="cccc" />
 302.150 +      </g>
 302.151 +      <flowRoot
 302.152 +         transform="translate(83.57141,-139.3571)"
 302.153 +         style="font-size:8px;font-family:Times New Roman"
 302.154 +         id="flowRoot1938"
 302.155 +         xml:space="preserve"><flowRegion
 302.156 +           id="flowRegion1940"><rect
 302.157 +             style="font-size:8px;font-family:Times New Roman"
 302.158 +             y="464.50504"
 302.159 +             x="122.85714"
 302.160 +             height="93.571426"
 302.161 +             width="76.428574"
 302.162 +             id="rect1942" /></flowRegion><flowPara
 302.163 +           id="flowPara1944">Greetings!</flowPara><flowPara
 302.164 +           id="flowPara1946" /><flowPara
 302.165 +           id="flowPara1948">I am <flowSpan
 302.166 +   style="font-style:italic;fill:red"
 302.167 +   id="flowSpan3096">Alhaji Abba Abacha, son of</flowSpan> the former Nigerian dictator Sani Abacha. I am contacting you in confidence, and as a means of developing</flowPara></flowRoot>    </g>
 302.168 +    <path
 302.169 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 302.170 +       d="M 215.502,457.71933 L 196.35507,424.5765"
 302.171 +       id="path1999"
 302.172 +       inkscape:connector-type="polyline"
 302.173 +       inkscape:connection-start="#g1988"
 302.174 +       inkscape:connection-end="#g1966" />
 302.175 +    <path
 302.176 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 302.177 +       d="M 277.06936,457.71933 L 296.21629,424.5765"
 302.178 +       id="path2001"
 302.179 +       inkscape:connector-type="polyline"
 302.180 +       inkscape:connection-start="#g1988"
 302.181 +       inkscape:connection-end="#g1977" />
 302.182 +    <text
 302.183 +       xml:space="preserve"
 302.184 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 302.185 +       x="302.42859"
 302.186 +       y="515.08905"
 302.187 +       id="text1905"><tspan
 302.188 +         sodipodi:role="line"
 302.189 +         id="tspan1907"
 302.190 +         x="302.42859"
 302.191 +         y="515.08905">Base version</tspan></text>
 302.192 +    <text
 302.193 +       xml:space="preserve"
 302.194 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 302.195 +       x="45.57143"
 302.196 +       y="374.1619"
 302.197 +       id="text1917"><tspan
 302.198 +         sodipodi:role="line"
 302.199 +         id="tspan1919"
 302.200 +         x="45.57143"
 302.201 +         y="374.1619">Our changes</tspan></text>
 302.202 +    <text
 302.203 +       xml:space="preserve"
 302.204 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 302.205 +       x="385.71429"
 302.206 +       y="374.1619"
 302.207 +       id="text1921"><tspan
 302.208 +         sodipodi:role="line"
 302.209 +         id="tspan1923"
 302.210 +         x="385.71429"
 302.211 +         y="374.1619">Their changes</tspan></text>
 302.212 +  </g>
 302.213 +</svg>
   303.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   303.2 +++ b/en/figs/tour-merge-merge.svg	Sun Aug 16 03:41:39 2009 +0200
   303.3 @@ -0,0 +1,380 @@
   303.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   303.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   303.6 +<svg
   303.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   303.8 +   xmlns:cc="http://web.resource.org/cc/"
   303.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  303.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  303.11 +   xmlns="http://www.w3.org/2000/svg"
  303.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  303.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  303.14 +   width="744.09448819"
  303.15 +   height="1052.3622047"
  303.16 +   id="svg2"
  303.17 +   sodipodi:version="0.32"
  303.18 +   inkscape:version="0.44.1"
  303.19 +   sodipodi:docname="tour-merge-merge.svg">
  303.20 +  <defs
  303.21 +     id="defs4">
  303.22 +    <marker
  303.23 +       inkscape:stockid="Arrow1Mstart"
  303.24 +       orient="auto"
  303.25 +       refY="0.0"
  303.26 +       refX="0.0"
  303.27 +       id="Arrow1Mstart"
  303.28 +       style="overflow:visible">
  303.29 +      <path
  303.30 +         id="path2973"
  303.31 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  303.32 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  303.33 +         transform="scale(0.4) translate(10,0)" />
  303.34 +    </marker>
  303.35 +    <marker
  303.36 +       inkscape:stockid="Arrow1Mend"
  303.37 +       orient="auto"
  303.38 +       refY="0.0"
  303.39 +       refX="0.0"
  303.40 +       id="Arrow1Mend"
  303.41 +       style="overflow:visible;">
  303.42 +      <path
  303.43 +         id="path3066"
  303.44 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  303.45 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  303.46 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  303.47 +    </marker>
  303.48 +  </defs>
  303.49 +  <sodipodi:namedview
  303.50 +     id="base"
  303.51 +     pagecolor="#ffffff"
  303.52 +     bordercolor="#666666"
  303.53 +     borderopacity="1.0"
  303.54 +     gridtolerance="10000"
  303.55 +     guidetolerance="10"
  303.56 +     objecttolerance="10"
  303.57 +     inkscape:pageopacity="0.0"
  303.58 +     inkscape:pageshadow="2"
  303.59 +     inkscape:zoom="1.4"
  303.60 +     inkscape:cx="247.53795"
  303.61 +     inkscape:cy="871.05738"
  303.62 +     inkscape:document-units="px"
  303.63 +     inkscape:current-layer="layer1"
  303.64 +     inkscape:window-width="906"
  303.65 +     inkscape:window-height="620"
  303.66 +     inkscape:window-x="38"
  303.67 +     inkscape:window-y="95" />
  303.68 +  <metadata
  303.69 +     id="metadata7">
  303.70 +    <rdf:RDF>
  303.71 +      <cc:Work
  303.72 +         rdf:about="">
  303.73 +        <dc:format>image/svg+xml</dc:format>
  303.74 +        <dc:type
  303.75 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  303.76 +      </cc:Work>
  303.77 +    </rdf:RDF>
  303.78 +  </metadata>
  303.79 +  <g
  303.80 +     inkscape:label="Layer 1"
  303.81 +     inkscape:groupmode="layer"
  303.82 +     id="layer1">
  303.83 +    <rect
  303.84 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
  303.85 +       id="rect2995"
  303.86 +       width="94.285713"
  303.87 +       height="20.714285"
  303.88 +       x="532.85718"
  303.89 +       y="203.0479" />
  303.90 +    <text
  303.91 +       xml:space="preserve"
  303.92 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
  303.93 +       x="173.57143"
  303.94 +       y="443.79074"
  303.95 +       id="text2832"><tspan
  303.96 +         sodipodi:role="line"
  303.97 +         id="tspan2834"
  303.98 +         x="173.57143"
  303.99 +         y="443.79074" /></text>
 303.100 +    <rect
 303.101 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 303.102 +       id="rect2830"
 303.103 +       width="94.285713"
 303.104 +       height="20.714285"
 303.105 +       x="138"
 303.106 +       y="297.76227" />
 303.107 +    <text
 303.108 +       xml:space="preserve"
 303.109 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 303.110 +       x="162.09892"
 303.111 +       y="311.38342"
 303.112 +       id="text2824"><tspan
 303.113 +         sodipodi:role="line"
 303.114 +         id="tspan2826"
 303.115 +         x="162.09892"
 303.116 +         y="311.38342"
 303.117 +         style="font-family:Courier"><tspan
 303.118 +   style="font-weight:bold"
 303.119 +   id="tspan2862">4</tspan>: REV4</tspan></text>
 303.120 +    <path
 303.121 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 303.122 +       d="M 185.14286,343.63731 L 185.14286,319.47656"
 303.123 +       id="path2900"
 303.124 +       inkscape:connector-type="polyline" />
 303.125 +    <rect
 303.126 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 303.127 +       id="rect2863"
 303.128 +       width="94.285713"
 303.129 +       height="20.714285"
 303.130 +       x="91.428574"
 303.131 +       y="250.47656" />
 303.132 +    <text
 303.133 +       xml:space="preserve"
 303.134 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 303.135 +       x="116.09886"
 303.136 +       y="264.56592"
 303.137 +       id="text1965"
 303.138 +       transform="scale(1.000002,0.999998)"><tspan
 303.139 +         sodipodi:role="line"
 303.140 +         id="tspan1967"
 303.141 +         x="116.09886"
 303.142 +         y="264.56592"
 303.143 +         style="font-family:Courier"><tspan
 303.144 +   style="font-weight:bold"
 303.145 +   id="tspan1973">5</tspan>: REV_my_new_hello</tspan></text>
 303.146 +    <path
 303.147 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 303.148 +       d="M 173.95727,296.76228 L 149.75702,272.19085"
 303.149 +       id="path1971"
 303.150 +       inkscape:connector-type="polyline"
 303.151 +       inkscape:connection-end="#rect2863"
 303.152 +       inkscape:connection-start="#rect2830" />
 303.153 +    <rect
 303.154 +       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 303.155 +       id="rect2911"
 303.156 +       width="94.285995"
 303.157 +       height="20.714283"
 303.158 +       x="186.71414"
 303.159 +       y="204.40514" />
 303.160 +    <text
 303.161 +       xml:space="preserve"
 303.162 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 303.163 +       x="210.81311"
 303.164 +       y="218.02673"
 303.165 +       id="text2913"
 303.166 +       transform="scale(1.000002,0.999998)"><tspan
 303.167 +         sodipodi:role="line"
 303.168 +         id="tspan2915"
 303.169 +         x="210.81311"
 303.170 +         y="218.02673"
 303.171 +         style="font-family:Courier"><tspan
 303.172 +   id="tspan1966"
 303.173 +   style="font-weight:bold">6</tspan>: REV6_my_new_hello</tspan></text>
 303.174 +    <path
 303.175 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 303.176 +       d="M 191.06908,296.76228 L 227.93092,226.11942"
 303.177 +       id="path2919"
 303.178 +       inkscape:connector-type="polyline"
 303.179 +       inkscape:connection-start="#rect2830" />
 303.180 +    <text
 303.181 +       xml:space="preserve"
 303.182 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 303.183 +       x="295.28571"
 303.184 +       y="217.56711"
 303.185 +       id="text2871"><tspan
 303.186 +         sodipodi:role="line"
 303.187 +         id="tspan2873"
 303.188 +         x="295.28571"
 303.189 +         y="217.56711">tip (and head)</tspan></text>
 303.190 +    <text
 303.191 +       xml:space="preserve"
 303.192 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 303.193 +       x="76"
 303.194 +       y="264.91769"
 303.195 +       id="text2875"><tspan
 303.196 +         sodipodi:role="line"
 303.197 +         id="tspan2877"
 303.198 +         x="76"
 303.199 +         y="264.91769"
 303.200 +         style="text-align:end;text-anchor:end">head</tspan></text>
 303.201 +    <rect
 303.202 +       style="fill:#c8aaa5;fill-opacity:1;stroke:#a07163;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:2, 4;stroke-dashoffset:0;stroke-opacity:1"
 303.203 +       id="rect1913"
 303.204 +       width="94.285713"
 303.205 +       height="20.714285"
 303.206 +       x="138"
 303.207 +       y="156.90514" />
 303.208 +    <path
 303.209 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 2;stroke-dashoffset:0;stroke-opacity:1"
 303.210 +       d="M 144.22399,249.47657 L 179.49029,178.61943"
 303.211 +       id="path1915"
 303.212 +       inkscape:connector-type="polyline"
 303.213 +       inkscape:connection-start="#rect2863"
 303.214 +       inkscape:connection-end="#rect1913" />
 303.215 +    <path
 303.216 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 2;stroke-dashoffset:0;stroke-opacity:1"
 303.217 +       d="M 222.20966,203.40514 L 196.79033,178.61943"
 303.218 +       id="path1917"
 303.219 +       inkscape:connector-type="polyline"
 303.220 +       inkscape:connection-start="#rect2911"
 303.221 +       inkscape:connection-end="#rect1913" />
 303.222 +    <text
 303.223 +       xml:space="preserve"
 303.224 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 303.225 +       x="166.16823"
 303.226 +       y="168.52228"
 303.227 +       id="text2806"><tspan
 303.228 +         sodipodi:role="line"
 303.229 +         id="tspan2808"
 303.230 +         x="166.16823"
 303.231 +         y="168.52228"
 303.232 +         style="font-family:Courier">merge</tspan></text>
 303.233 +    <text
 303.234 +       xml:space="preserve"
 303.235 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 303.236 +       x="246"
 303.237 +       y="162.63338"
 303.238 +       id="text2810"><tspan
 303.239 +         sodipodi:role="line"
 303.240 +         id="tspan2812"
 303.241 +         x="246"
 303.242 +         y="162.63338">working directory</tspan><tspan
 303.243 +         sodipodi:role="line"
 303.244 +         x="246"
 303.245 +         y="177.63338"
 303.246 +         id="tspan2814">during merge</tspan></text>
 303.247 +    <rect
 303.248 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 303.249 +       id="rect2816"
 303.250 +       width="94.285713"
 303.251 +       height="20.714285"
 303.252 +       x="483.14636"
 303.253 +       y="297.76227" />
 303.254 +    <text
 303.255 +       xml:space="preserve"
 303.256 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 303.257 +       x="507.24527"
 303.258 +       y="311.38342"
 303.259 +       id="text2818"><tspan
 303.260 +         sodipodi:role="line"
 303.261 +         id="tspan2820"
 303.262 +         x="507.24527"
 303.263 +         y="311.38342"
 303.264 +         style="font-family:Courier"><tspan
 303.265 +   style="font-weight:bold"
 303.266 +   id="tspan2822">4</tspan>: REV4</tspan></text>
 303.267 +    <path
 303.268 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 303.269 +       d="M 530.28921,343.6373 L 530.28921,319.47655"
 303.270 +       id="path2824"
 303.271 +       inkscape:connector-type="polyline" />
 303.272 +    <rect
 303.273 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 303.274 +       id="rect2826"
 303.275 +       width="94.285713"
 303.276 +       height="20.714285"
 303.277 +       x="436.57492"
 303.278 +       y="250.47656" />
 303.279 +    <text
 303.280 +       xml:space="preserve"
 303.281 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 303.282 +       x="461.24484"
 303.283 +       y="264.56613"
 303.284 +       id="text2828"
 303.285 +       transform="scale(1.000002,0.999998)"><tspan
 303.286 +         sodipodi:role="line"
 303.287 +         id="tspan2830"
 303.288 +         x="461.24484"
 303.289 +         y="264.56613"
 303.290 +         style="font-family:Courier"><tspan
 303.291 +   style="font-weight:bold"
 303.292 +   id="tspan2832">5</tspan>: REV_my_new_hello</tspan></text>
 303.293 +    <path
 303.294 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 303.295 +       d="M 519.10362,296.76227 L 494.90337,272.19084"
 303.296 +       id="path2834"
 303.297 +       inkscape:connector-type="polyline" />
 303.298 +    <rect
 303.299 +       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 303.300 +       id="rect2836"
 303.301 +       width="94.285995"
 303.302 +       height="20.714283"
 303.303 +       x="483.14001"
 303.304 +       y="156.548" />
 303.305 +    <text
 303.306 +       xml:space="preserve"
 303.307 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 303.308 +       x="555.95911"
 303.309 +       y="218.02698"
 303.310 +       id="text2838"
 303.311 +       transform="scale(1.000002,0.999998)"><tspan
 303.312 +         sodipodi:role="line"
 303.313 +         id="tspan2840"
 303.314 +         x="555.95911"
 303.315 +         y="218.02698"
 303.316 +         style="font-family:Courier"><tspan
 303.317 +   id="tspan2842"
 303.318 +   style="font-weight:bold">6</tspan>: REV6_my_new_hello</tspan></text>
 303.319 +    <path
 303.320 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 303.321 +       d="M 536.21543,296.76227 L 574.03453,224.76218"
 303.322 +       id="path2844"
 303.323 +       inkscape:connector-type="polyline" />
 303.324 +    <text
 303.325 +       xml:space="preserve"
 303.326 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 303.327 +       x="594.43207"
 303.328 +       y="169.78796"
 303.329 +       id="text2846"><tspan
 303.330 +         sodipodi:role="line"
 303.331 +         id="tspan2848"
 303.332 +         x="594.43207"
 303.333 +         y="169.78796">tip</tspan></text>
 303.334 +    <path
 303.335 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
 303.336 +       d="M 489.37034,249.47656 L 524.65575,178.26229"
 303.337 +       id="path2856"
 303.338 +       inkscape:connector-type="polyline"
 303.339 +       inkscape:connection-end="#rect2836" />
 303.340 +    <path
 303.341 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
 303.342 +       d="M 567.85714,202.0479 L 542.42591,178.26229"
 303.343 +       id="path2858"
 303.344 +       inkscape:connector-type="polyline"
 303.345 +       inkscape:connection-end="#rect2836"
 303.346 +       inkscape:connection-start="#rect2995" />
 303.347 +    <text
 303.348 +       xml:space="preserve"
 303.349 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 303.350 +       x="504.54507"
 303.351 +       y="170.39714"
 303.352 +       id="text2860"><tspan
 303.353 +         sodipodi:role="line"
 303.354 +         id="tspan2863"
 303.355 +         x="504.54507"
 303.356 +         y="170.39714"
 303.357 +         style="font-family:Courier"><tspan
 303.358 +   style="font-weight:bold"
 303.359 +   id="tspan2997">7</tspan>: REV7_my_new_hello</tspan></text>
 303.360 +    <text
 303.361 +       xml:space="preserve"
 303.362 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 303.363 +       x="90.323105"
 303.364 +       y="120.21933"
 303.365 +       id="text2929"><tspan
 303.366 +         sodipodi:role="line"
 303.367 +         id="tspan2931"
 303.368 +         x="90.323105"
 303.369 +         y="120.21933"
 303.370 +         style="font-weight:bold">Working directory during merge</tspan></text>
 303.371 +    <text
 303.372 +       xml:space="preserve"
 303.373 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 303.374 +       x="435.35226"
 303.375 +       y="120.21933"
 303.376 +       id="text2937"><tspan
 303.377 +         sodipodi:role="line"
 303.378 +         id="tspan2939"
 303.379 +         x="435.35226"
 303.380 +         y="120.21933"
 303.381 +         style="font-weight:bold">Repository after merge committed</tspan></text>
 303.382 +  </g>
 303.383 +</svg>
   304.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   304.2 +++ b/en/figs/tour-merge-pull.svg	Sun Aug 16 03:41:39 2009 +0200
   304.3 @@ -0,0 +1,288 @@
   304.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   304.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   304.6 +<svg
   304.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   304.8 +   xmlns:cc="http://web.resource.org/cc/"
   304.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  304.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  304.11 +   xmlns="http://www.w3.org/2000/svg"
  304.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  304.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  304.14 +   width="744.09448819"
  304.15 +   height="1052.3622047"
  304.16 +   id="svg2"
  304.17 +   sodipodi:version="0.32"
  304.18 +   inkscape:version="0.44.1"
  304.19 +   sodipodi:docname="tour-merge-pull.svg"
  304.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en">
  304.21 +  <defs
  304.22 +     id="defs4">
  304.23 +    <marker
  304.24 +       inkscape:stockid="Arrow1Mstart"
  304.25 +       orient="auto"
  304.26 +       refY="0.0"
  304.27 +       refX="0.0"
  304.28 +       id="Arrow1Mstart"
  304.29 +       style="overflow:visible">
  304.30 +      <path
  304.31 +         id="path2973"
  304.32 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  304.33 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  304.34 +         transform="scale(0.4) translate(10,0)" />
  304.35 +    </marker>
  304.36 +    <marker
  304.37 +       inkscape:stockid="Arrow1Mend"
  304.38 +       orient="auto"
  304.39 +       refY="0.0"
  304.40 +       refX="0.0"
  304.41 +       id="Arrow1Mend"
  304.42 +       style="overflow:visible;">
  304.43 +      <path
  304.44 +         id="path3066"
  304.45 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  304.46 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  304.47 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  304.48 +    </marker>
  304.49 +  </defs>
  304.50 +  <sodipodi:namedview
  304.51 +     id="base"
  304.52 +     pagecolor="#ffffff"
  304.53 +     bordercolor="#666666"
  304.54 +     borderopacity="1.0"
  304.55 +     gridtolerance="10000"
  304.56 +     guidetolerance="10"
  304.57 +     objecttolerance="10"
  304.58 +     inkscape:pageopacity="0.0"
  304.59 +     inkscape:pageshadow="2"
  304.60 +     inkscape:zoom="1.4"
  304.61 +     inkscape:cx="233.63208"
  304.62 +     inkscape:cy="832.54381"
  304.63 +     inkscape:document-units="px"
  304.64 +     inkscape:current-layer="layer1"
  304.65 +     inkscape:window-width="906"
  304.66 +     inkscape:window-height="620"
  304.67 +     inkscape:window-x="237"
  304.68 +     inkscape:window-y="103" />
  304.69 +  <metadata
  304.70 +     id="metadata7">
  304.71 +    <rdf:RDF>
  304.72 +      <cc:Work
  304.73 +         rdf:about="">
  304.74 +        <dc:format>image/svg+xml</dc:format>
  304.75 +        <dc:type
  304.76 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  304.77 +      </cc:Work>
  304.78 +    </rdf:RDF>
  304.79 +  </metadata>
  304.80 +  <g
  304.81 +     inkscape:label="Layer 1"
  304.82 +     inkscape:groupmode="layer"
  304.83 +     id="layer1">
  304.84 +    <text
  304.85 +       xml:space="preserve"
  304.86 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
  304.87 +       x="173.57143"
  304.88 +       y="443.79074"
  304.89 +       id="text2832"><tspan
  304.90 +         sodipodi:role="line"
  304.91 +         id="tspan2834"
  304.92 +         x="173.57143"
  304.93 +         y="443.79074" /></text>
  304.94 +    <rect
  304.95 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
  304.96 +       id="rect1878"
  304.97 +       width="94.285713"
  304.98 +       height="20.714285"
  304.99 +       x="138"
 304.100 +       y="479.50504" />
 304.101 +    <text
 304.102 +       xml:space="preserve"
 304.103 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 304.104 +       x="162.09892"
 304.105 +       y="493.12619"
 304.106 +       id="text1872"><tspan
 304.107 +         sodipodi:role="line"
 304.108 +         id="tspan1874"
 304.109 +         x="162.09892"
 304.110 +         y="493.12619"
 304.111 +         style="font-family:Courier"><tspan
 304.112 +   style="font-weight:bold"
 304.113 +   id="tspan1876">0</tspan>: REV0</tspan></text>
 304.114 +    <rect
 304.115 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 304.116 +       id="rect2800"
 304.117 +       width="94.285713"
 304.118 +       height="20.714285"
 304.119 +       x="138"
 304.120 +       y="432.63004" />
 304.121 +    <text
 304.122 +       xml:space="preserve"
 304.123 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 304.124 +       x="162.09892"
 304.125 +       y="446.25119"
 304.126 +       id="text2794"><tspan
 304.127 +         sodipodi:role="line"
 304.128 +         id="tspan2796"
 304.129 +         x="162.09892"
 304.130 +         y="446.25119"
 304.131 +         style="font-family:Courier"><tspan
 304.132 +   id="tspan2868"
 304.133 +   style="font-weight:bold">1</tspan>: REV1</tspan></text>
 304.134 +    <rect
 304.135 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 304.136 +       id="rect2810"
 304.137 +       width="94.285713"
 304.138 +       height="20.714285"
 304.139 +       x="138"
 304.140 +       y="385.75504" />
 304.141 +    <text
 304.142 +       xml:space="preserve"
 304.143 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 304.144 +       x="162.09892"
 304.145 +       y="399.37619"
 304.146 +       id="text2804"><tspan
 304.147 +         sodipodi:role="line"
 304.148 +         id="tspan2806"
 304.149 +         x="162.09892"
 304.150 +         y="399.37619"
 304.151 +         style="font-family:Courier"><tspan
 304.152 +   style="font-weight:bold"
 304.153 +   id="tspan2866">2</tspan>: REV2</tspan></text>
 304.154 +    <rect
 304.155 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 304.156 +       id="rect2820"
 304.157 +       width="94.285713"
 304.158 +       height="20.714285"
 304.159 +       x="138"
 304.160 +       y="338.88007" />
 304.161 +    <text
 304.162 +       xml:space="preserve"
 304.163 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 304.164 +       x="162.09892"
 304.165 +       y="352.50122"
 304.166 +       id="text2814"><tspan
 304.167 +         sodipodi:role="line"
 304.168 +         id="tspan2816"
 304.169 +         x="162.09892"
 304.170 +         y="352.50122"
 304.171 +         style="font-family:Courier"><tspan
 304.172 +   style="font-weight:bold"
 304.173 +   id="tspan2864">3</tspan>: REV3</tspan></text>
 304.174 +    <rect
 304.175 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 304.176 +       id="rect2830"
 304.177 +       width="94.285713"
 304.178 +       height="20.714285"
 304.179 +       x="138"
 304.180 +       y="292.00504" />
 304.181 +    <text
 304.182 +       xml:space="preserve"
 304.183 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 304.184 +       x="162.09892"
 304.185 +       y="305.62619"
 304.186 +       id="text2824"><tspan
 304.187 +         sodipodi:role="line"
 304.188 +         id="tspan2826"
 304.189 +         x="162.09892"
 304.190 +         y="305.62619"
 304.191 +         style="font-family:Courier"><tspan
 304.192 +   style="font-weight:bold"
 304.193 +   id="tspan2862">4</tspan>: REV4</tspan></text>
 304.194 +    <path
 304.195 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 304.196 +       d="M 185.14286,478.50504 L 185.14286,454.34432"
 304.197 +       id="path2894"
 304.198 +       inkscape:connector-type="polyline" />
 304.199 +    <path
 304.200 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 304.201 +       d="M 185.14286,431.63004 L 185.14286,407.46932"
 304.202 +       id="path2896"
 304.203 +       inkscape:connector-type="polyline" />
 304.204 +    <path
 304.205 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 304.206 +       d="M 185.14286,384.75504 L 185.14286,360.59435"
 304.207 +       id="path2898"
 304.208 +       inkscape:connector-type="polyline" />
 304.209 +    <path
 304.210 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 304.211 +       d="M 185.14286,337.88007 L 185.14286,313.71932"
 304.212 +       id="path2900"
 304.213 +       inkscape:connector-type="polyline" />
 304.214 +    <rect
 304.215 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 304.216 +       id="rect2863"
 304.217 +       width="94.285713"
 304.218 +       height="20.714285"
 304.219 +       x="91.428574"
 304.220 +       y="244.71933" />
 304.221 +    <text
 304.222 +       xml:space="preserve"
 304.223 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 304.224 +       x="116.09886"
 304.225 +       y="258.80865"
 304.226 +       id="text1965"
 304.227 +       transform="scale(1.000002,0.999998)"><tspan
 304.228 +         sodipodi:role="line"
 304.229 +         id="tspan1967"
 304.230 +         x="116.09886"
 304.231 +         y="258.80865"
 304.232 +         style="font-family:Courier"><tspan
 304.233 +   style="font-weight:bold"
 304.234 +   id="tspan1973">5</tspan>: REV_my_new_hello</tspan></text>
 304.235 +    <path
 304.236 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 304.237 +       d="M 173.95727,291.00504 L 149.75702,266.43361"
 304.238 +       id="path1971"
 304.239 +       inkscape:connector-type="polyline"
 304.240 +       inkscape:connection-end="#rect2863"
 304.241 +       inkscape:connection-start="#rect2830" />
 304.242 +    <rect
 304.243 +       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 304.244 +       id="rect2911"
 304.245 +       width="94.285995"
 304.246 +       height="20.714283"
 304.247 +       x="186.71414"
 304.248 +       y="198.6479" />
 304.249 +    <text
 304.250 +       xml:space="preserve"
 304.251 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 304.252 +       x="210.81311"
 304.253 +       y="212.26949"
 304.254 +       id="text2913"
 304.255 +       transform="scale(1.000002,0.999998)"><tspan
 304.256 +         sodipodi:role="line"
 304.257 +         id="tspan2915"
 304.258 +         x="210.81311"
 304.259 +         y="212.26949"
 304.260 +         style="font-family:Courier"><tspan
 304.261 +   id="tspan1966"
 304.262 +   style="font-weight:bold">6</tspan>: REV6_my_new_hello</tspan></text>
 304.263 +    <path
 304.264 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 304.265 +       d="M 191.06908,291.00504 L 227.93092,220.36218"
 304.266 +       id="path2919"
 304.267 +       inkscape:connector-type="polyline"
 304.268 +       inkscape:connection-start="#rect2830" />
 304.269 +    <text
 304.270 +       xml:space="preserve"
 304.271 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 304.272 +       x="295.28571"
 304.273 +       y="211.80988"
 304.274 +       id="text2871"><tspan
 304.275 +         sodipodi:role="line"
 304.276 +         id="tspan2873"
 304.277 +         x="295.28571"
 304.278 +         y="211.80988">tip (and head)</tspan></text>
 304.279 +    <text
 304.280 +       xml:space="preserve"
 304.281 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 304.282 +       x="76"
 304.283 +       y="259.16046"
 304.284 +       id="text2875"><tspan
 304.285 +         sodipodi:role="line"
 304.286 +         id="tspan2877"
 304.287 +         x="76"
 304.288 +         y="259.16046"
 304.289 +         style="text-align:end;text-anchor:end">head</tspan></text>
 304.290 +  </g>
 304.291 +</svg>
   305.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   305.2 +++ b/en/figs/tour-merge-sep-repos.svg	Sun Aug 16 03:41:39 2009 +0200
   305.3 @@ -0,0 +1,466 @@
   305.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   305.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   305.6 +<svg
   305.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   305.8 +   xmlns:cc="http://web.resource.org/cc/"
   305.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  305.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  305.11 +   xmlns="http://www.w3.org/2000/svg"
  305.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  305.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  305.14 +   width="744.09448819"
  305.15 +   height="1052.3622047"
  305.16 +   id="svg2"
  305.17 +   sodipodi:version="0.32"
  305.18 +   inkscape:version="0.44.1"
  305.19 +   sodipodi:docname="tour-merge-sep-repos.svg">
  305.20 +  <defs
  305.21 +     id="defs4">
  305.22 +    <marker
  305.23 +       inkscape:stockid="Arrow1Mstart"
  305.24 +       orient="auto"
  305.25 +       refY="0.0"
  305.26 +       refX="0.0"
  305.27 +       id="Arrow1Mstart"
  305.28 +       style="overflow:visible">
  305.29 +      <path
  305.30 +         id="path2973"
  305.31 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  305.32 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  305.33 +         transform="scale(0.4) translate(10,0)" />
  305.34 +    </marker>
  305.35 +    <marker
  305.36 +       inkscape:stockid="Arrow1Mend"
  305.37 +       orient="auto"
  305.38 +       refY="0.0"
  305.39 +       refX="0.0"
  305.40 +       id="Arrow1Mend"
  305.41 +       style="overflow:visible;">
  305.42 +      <path
  305.43 +         id="path3066"
  305.44 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  305.45 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  305.46 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  305.47 +    </marker>
  305.48 +  </defs>
  305.49 +  <sodipodi:namedview
  305.50 +     id="base"
  305.51 +     pagecolor="#ffffff"
  305.52 +     bordercolor="#666666"
  305.53 +     borderopacity="1.0"
  305.54 +     gridtolerance="10000"
  305.55 +     guidetolerance="10"
  305.56 +     objecttolerance="10"
  305.57 +     inkscape:pageopacity="0.0"
  305.58 +     inkscape:pageshadow="2"
  305.59 +     inkscape:zoom="1.4"
  305.60 +     inkscape:cx="307.20351"
  305.61 +     inkscape:cy="716.87911"
  305.62 +     inkscape:document-units="px"
  305.63 +     inkscape:current-layer="layer1"
  305.64 +     inkscape:window-width="906"
  305.65 +     inkscape:window-height="620"
  305.66 +     inkscape:window-x="5"
  305.67 +     inkscape:window-y="49" />
  305.68 +  <metadata
  305.69 +     id="metadata7">
  305.70 +    <rdf:RDF>
  305.71 +      <cc:Work
  305.72 +         rdf:about="">
  305.73 +        <dc:format>image/svg+xml</dc:format>
  305.74 +        <dc:type
  305.75 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  305.76 +      </cc:Work>
  305.77 +    </rdf:RDF>
  305.78 +  </metadata>
  305.79 +  <g
  305.80 +     inkscape:label="Layer 1"
  305.81 +     inkscape:groupmode="layer"
  305.82 +     id="layer1">
  305.83 +    <text
  305.84 +       xml:space="preserve"
  305.85 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
  305.86 +       x="173.57143"
  305.87 +       y="443.79074"
  305.88 +       id="text2832"><tspan
  305.89 +         sodipodi:role="line"
  305.90 +         id="tspan2834"
  305.91 +         x="173.57143"
  305.92 +         y="443.79074" /></text>
  305.93 +    <rect
  305.94 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
  305.95 +       id="rect1878"
  305.96 +       width="94.285713"
  305.97 +       height="20.714285"
  305.98 +       x="138"
  305.99 +       y="479.50504" />
 305.100 +    <text
 305.101 +       xml:space="preserve"
 305.102 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 305.103 +       x="162.09892"
 305.104 +       y="493.12619"
 305.105 +       id="text1872"><tspan
 305.106 +         sodipodi:role="line"
 305.107 +         id="tspan1874"
 305.108 +         x="162.09892"
 305.109 +         y="493.12619"
 305.110 +         style="font-family:Courier"><tspan
 305.111 +   style="font-weight:bold"
 305.112 +   id="tspan1876">0</tspan>: REV0</tspan></text>
 305.113 +    <rect
 305.114 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 305.115 +       id="rect2800"
 305.116 +       width="94.285713"
 305.117 +       height="20.714285"
 305.118 +       x="138"
 305.119 +       y="432.63004" />
 305.120 +    <text
 305.121 +       xml:space="preserve"
 305.122 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 305.123 +       x="162.09892"
 305.124 +       y="446.25119"
 305.125 +       id="text2794"><tspan
 305.126 +         sodipodi:role="line"
 305.127 +         id="tspan2796"
 305.128 +         x="162.09892"
 305.129 +         y="446.25119"
 305.130 +         style="font-family:Courier"><tspan
 305.131 +   id="tspan2868"
 305.132 +   style="font-weight:bold">1</tspan>: REV1</tspan></text>
 305.133 +    <rect
 305.134 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 305.135 +       id="rect2810"
 305.136 +       width="94.285713"
 305.137 +       height="20.714285"
 305.138 +       x="138"
 305.139 +       y="385.75504" />
 305.140 +    <text
 305.141 +       xml:space="preserve"
 305.142 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 305.143 +       x="162.09892"
 305.144 +       y="399.37619"
 305.145 +       id="text2804"><tspan
 305.146 +         sodipodi:role="line"
 305.147 +         id="tspan2806"
 305.148 +         x="162.09892"
 305.149 +         y="399.37619"
 305.150 +         style="font-family:Courier"><tspan
 305.151 +   style="font-weight:bold"
 305.152 +   id="tspan2866">2</tspan>: REV2</tspan></text>
 305.153 +    <rect
 305.154 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 305.155 +       id="rect2820"
 305.156 +       width="94.285713"
 305.157 +       height="20.714285"
 305.158 +       x="138"
 305.159 +       y="338.88007" />
 305.160 +    <text
 305.161 +       xml:space="preserve"
 305.162 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 305.163 +       x="162.09892"
 305.164 +       y="352.50122"
 305.165 +       id="text2814"><tspan
 305.166 +         sodipodi:role="line"
 305.167 +         id="tspan2816"
 305.168 +         x="162.09892"
 305.169 +         y="352.50122"
 305.170 +         style="font-family:Courier"><tspan
 305.171 +   style="font-weight:bold"
 305.172 +   id="tspan2864">3</tspan>: REV3</tspan></text>
 305.173 +    <rect
 305.174 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 305.175 +       id="rect2830"
 305.176 +       width="94.285713"
 305.177 +       height="20.714285"
 305.178 +       x="138"
 305.179 +       y="292.00504" />
 305.180 +    <text
 305.181 +       xml:space="preserve"
 305.182 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 305.183 +       x="162.09892"
 305.184 +       y="305.62619"
 305.185 +       id="text2824"><tspan
 305.186 +         sodipodi:role="line"
 305.187 +         id="tspan2826"
 305.188 +         x="162.09892"
 305.189 +         y="305.62619"
 305.190 +         style="font-family:Courier"><tspan
 305.191 +   style="font-weight:bold"
 305.192 +   id="tspan2862">4</tspan>: REV4</tspan></text>
 305.193 +    <path
 305.194 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 305.195 +       d="M 185.14286,478.50504 L 185.14286,454.34432"
 305.196 +       id="path2894"
 305.197 +       inkscape:connector-type="polyline" />
 305.198 +    <path
 305.199 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 305.200 +       d="M 185.14286,431.63004 L 185.14286,407.46932"
 305.201 +       id="path2896"
 305.202 +       inkscape:connector-type="polyline" />
 305.203 +    <path
 305.204 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 305.205 +       d="M 185.14286,384.75504 L 185.14286,360.59435"
 305.206 +       id="path2898"
 305.207 +       inkscape:connector-type="polyline" />
 305.208 +    <path
 305.209 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 305.210 +       d="M 185.14286,337.88007 L 185.14286,313.71932"
 305.211 +       id="path2900"
 305.212 +       inkscape:connector-type="polyline" />
 305.213 +    <rect
 305.214 +       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 305.215 +       id="rect1963"
 305.216 +       width="94.285995"
 305.217 +       height="20.714283"
 305.218 +       x="138"
 305.219 +       y="245.18723" />
 305.220 +    <text
 305.221 +       xml:space="preserve"
 305.222 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 305.223 +       x="162.09877"
 305.224 +       y="258.80865"
 305.225 +       id="text1965"
 305.226 +       transform="scale(1.000002,0.999998)"><tspan
 305.227 +         sodipodi:role="line"
 305.228 +         id="tspan1967"
 305.229 +         x="162.09877"
 305.230 +         y="258.80865"
 305.231 +         style="font-family:Courier"><tspan
 305.232 +   style="font-weight:bold"
 305.233 +   id="tspan1973">5</tspan>: REV_my_hello</tspan></text>
 305.234 +    <path
 305.235 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 305.236 +       d="M 185.143,291.06218 L 185.143,266.90143"
 305.237 +       id="path1971"
 305.238 +       inkscape:connector-type="polyline" />
 305.239 +    <text
 305.240 +       xml:space="preserve"
 305.241 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 305.242 +       x="136.90039"
 305.243 +       y="232.25546"
 305.244 +       id="text2921"><tspan
 305.245 +         sodipodi:role="line"
 305.246 +         id="tspan2923"
 305.247 +         x="136.90039"
 305.248 +         y="232.25546">my-hello</tspan></text>
 305.249 +    <rect
 305.250 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 305.251 +       id="rect2863"
 305.252 +       width="94.285713"
 305.253 +       height="20.714285"
 305.254 +       x="370.71414"
 305.255 +       y="479.49289" />
 305.256 +    <text
 305.257 +       xml:space="preserve"
 305.258 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 305.259 +       x="394.81305"
 305.260 +       y="493.11404"
 305.261 +       id="text2865"><tspan
 305.262 +         sodipodi:role="line"
 305.263 +         id="tspan2867"
 305.264 +         x="394.81305"
 305.265 +         y="493.11404"
 305.266 +         style="font-family:Courier"><tspan
 305.267 +   style="font-weight:bold"
 305.268 +   id="tspan2869">0</tspan>: REV0</tspan></text>
 305.269 +    <rect
 305.270 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 305.271 +       id="rect2871"
 305.272 +       width="94.285713"
 305.273 +       height="20.714285"
 305.274 +       x="370.71414"
 305.275 +       y="432.61789" />
 305.276 +    <text
 305.277 +       xml:space="preserve"
 305.278 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 305.279 +       x="394.81305"
 305.280 +       y="446.23904"
 305.281 +       id="text2873"><tspan
 305.282 +         sodipodi:role="line"
 305.283 +         id="tspan2875"
 305.284 +         x="394.81305"
 305.285 +         y="446.23904"
 305.286 +         style="font-family:Courier"><tspan
 305.287 +   id="tspan2877"
 305.288 +   style="font-weight:bold">1</tspan>: REV1</tspan></text>
 305.289 +    <rect
 305.290 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 305.291 +       id="rect2879"
 305.292 +       width="94.285713"
 305.293 +       height="20.714285"
 305.294 +       x="370.71414"
 305.295 +       y="385.74289" />
 305.296 +    <text
 305.297 +       xml:space="preserve"
 305.298 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 305.299 +       x="394.81305"
 305.300 +       y="399.36404"
 305.301 +       id="text2881"><tspan
 305.302 +         sodipodi:role="line"
 305.303 +         id="tspan2883"
 305.304 +         x="394.81305"
 305.305 +         y="399.36404"
 305.306 +         style="font-family:Courier"><tspan
 305.307 +   style="font-weight:bold"
 305.308 +   id="tspan2885">2</tspan>: REV2</tspan></text>
 305.309 +    <rect
 305.310 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 305.311 +       id="rect2887"
 305.312 +       width="94.285713"
 305.313 +       height="20.714285"
 305.314 +       x="370.71414"
 305.315 +       y="338.86792" />
 305.316 +    <text
 305.317 +       xml:space="preserve"
 305.318 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 305.319 +       x="394.81305"
 305.320 +       y="352.48907"
 305.321 +       id="text2889"><tspan
 305.322 +         sodipodi:role="line"
 305.323 +         id="tspan2891"
 305.324 +         x="394.81305"
 305.325 +         y="352.48907"
 305.326 +         style="font-family:Courier"><tspan
 305.327 +   style="font-weight:bold"
 305.328 +   id="tspan2893">3</tspan>: REV3</tspan></text>
 305.329 +    <rect
 305.330 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 305.331 +       id="rect2895"
 305.332 +       width="94.285713"
 305.333 +       height="20.714285"
 305.334 +       x="370.71414"
 305.335 +       y="291.99289" />
 305.336 +    <text
 305.337 +       xml:space="preserve"
 305.338 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 305.339 +       x="394.81305"
 305.340 +       y="305.61404"
 305.341 +       id="text2897"><tspan
 305.342 +         sodipodi:role="line"
 305.343 +         id="tspan2899"
 305.344 +         x="394.81305"
 305.345 +         y="305.61404"
 305.346 +         style="font-family:Courier"><tspan
 305.347 +   style="font-weight:bold"
 305.348 +   id="tspan2901">4</tspan>: REV4</tspan></text>
 305.349 +    <path
 305.350 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 305.351 +       d="M 417.85701,478.4929 L 417.85701,454.33218"
 305.352 +       id="path2903"
 305.353 +       inkscape:connector-type="polyline" />
 305.354 +    <path
 305.355 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 305.356 +       d="M 417.85701,431.6179 L 417.85701,407.45718"
 305.357 +       id="path2905"
 305.358 +       inkscape:connector-type="polyline" />
 305.359 +    <path
 305.360 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 305.361 +       d="M 417.85701,384.7429 L 417.85701,360.58221"
 305.362 +       id="path2907"
 305.363 +       inkscape:connector-type="polyline" />
 305.364 +    <path
 305.365 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 305.366 +       d="M 417.85701,337.86793 L 417.85701,313.70718"
 305.367 +       id="path2909"
 305.368 +       inkscape:connector-type="polyline" />
 305.369 +    <rect
 305.370 +       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 305.371 +       id="rect2911"
 305.372 +       width="94.285995"
 305.373 +       height="20.714283"
 305.374 +       x="370.71414"
 305.375 +       y="245.17511" />
 305.376 +    <text
 305.377 +       xml:space="preserve"
 305.378 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 305.379 +       x="394.81274"
 305.380 +       y="258.79678"
 305.381 +       id="text2913"
 305.382 +       transform="scale(1.000002,0.999998)"><tspan
 305.383 +         sodipodi:role="line"
 305.384 +         id="tspan2915"
 305.385 +         x="394.81274"
 305.386 +         y="258.79678"
 305.387 +         style="font-family:Courier"><tspan
 305.388 +   style="font-weight:bold"
 305.389 +   id="tspan2917">5</tspan>: REV_my_new_hello</tspan></text>
 305.390 +    <path
 305.391 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 305.392 +       d="M 417.85715,291.05004 L 417.85715,266.88929"
 305.393 +       id="path2919"
 305.394 +       inkscape:connector-type="polyline" />
 305.395 +    <text
 305.396 +       xml:space="preserve"
 305.397 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 305.398 +       x="369.61453"
 305.399 +       y="232.25546"
 305.400 +       id="text2925"><tspan
 305.401 +         sodipodi:role="line"
 305.402 +         id="tspan2927"
 305.403 +         x="369.61453"
 305.404 +         y="232.25546">my-new-hello</tspan></text>
 305.405 +    <text
 305.406 +       xml:space="preserve"
 305.407 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 305.408 +       x="300.54352"
 305.409 +       y="252.12723"
 305.410 +       id="text2933"><tspan
 305.411 +         sodipodi:role="line"
 305.412 +         id="tspan2935"
 305.413 +         x="300.54352"
 305.414 +         y="252.12723"
 305.415 +         style="text-align:center;text-anchor:middle">newest changes</tspan><tspan
 305.416 +         sodipodi:role="line"
 305.417 +         x="300.54352"
 305.418 +         y="267.12723"
 305.419 +         style="text-align:center;text-anchor:middle"
 305.420 +         id="tspan3132">differ</tspan></text>
 305.421 +    <text
 305.422 +       xml:space="preserve"
 305.423 +       style="font-size:12px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 305.424 +       x="262.15436"
 305.425 +       y="398.37112"
 305.426 +       id="text2929"><tspan
 305.427 +         sodipodi:role="line"
 305.428 +         x="262.15436"
 305.429 +         y="398.37112"
 305.430 +         id="tspan3013"
 305.431 +         style="text-align:start;text-anchor:start">common history</tspan></text>
 305.432 +    <g
 305.433 +       id="g3107"
 305.434 +       transform="translate(0,0.855744)">
 305.435 +      <path
 305.436 +         id="path3101"
 305.437 +         d="M 300.35713,381.29075 L 300.35713,304.50504"
 305.438 +         style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:0;stroke-opacity:1" />
 305.439 +      <path
 305.440 +         id="path3105"
 305.441 +         d="M 291.07142,301.64789 L 309.28571,301.64789"
 305.442 +         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#bfbfbf;stroke-width:0.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
 305.443 +    </g>
 305.444 +    <path
 305.445 +       style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:0;stroke-opacity:1"
 305.446 +       d="M 300.53571,486.38926 L 300.53571,409.60355"
 305.447 +       id="path3113" />
 305.448 +    <path
 305.449 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#bfbfbf;stroke-width:0.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 305.450 +       d="M 291.25,488.49641 L 309.46429,488.49641"
 305.451 +       id="path3115" />
 305.452 +    <text
 305.453 +       xml:space="preserve"
 305.454 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 305.455 +       x="480.71429"
 305.456 +       y="250.91507"
 305.457 +       id="text1949"><tspan
 305.458 +         sodipodi:role="line"
 305.459 +         id="tspan1951"
 305.460 +         x="480.71429"
 305.461 +         y="250.91507"
 305.462 +         style="text-align:start;text-anchor:start">head revision</tspan><tspan
 305.463 +         sodipodi:role="line"
 305.464 +         x="480.71429"
 305.465 +         y="265.91507"
 305.466 +         id="tspan1953"
 305.467 +         style="text-align:start;text-anchor:start">(has no children)</tspan></text>
 305.468 +  </g>
 305.469 +</svg>
   306.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   306.2 +++ b/en/figs/undo-manual-merge.dot	Sun Aug 16 03:41:39 2009 +0200
   306.3 @@ -0,0 +1,8 @@
   306.4 +digraph undo_manual {
   306.5 +	"first change" -> "second change";
   306.6 +	"second change" -> "third change";
   306.7 +	backout [label="back out\nsecond change", shape=box];
   306.8 +	"second change" -> backout;
   306.9 +	"third change" -> "manual\nmerge";
  306.10 +	backout -> "manual\nmerge";
  306.11 +}
   307.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   307.2 +++ b/en/figs/undo-manual.dot	Sun Aug 16 03:41:39 2009 +0200
   307.3 @@ -0,0 +1,6 @@
   307.4 +digraph undo_manual {
   307.5 +	"first change" -> "second change";
   307.6 +	"second change" -> "third change";
   307.7 +	backout [label="back out\nsecond change", shape=box];
   307.8 +	"second change" -> backout;
   307.9 +}
   308.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   308.2 +++ b/en/figs/undo-non-tip.dot	Sun Aug 16 03:41:39 2009 +0200
   308.3 @@ -0,0 +1,9 @@
   308.4 +digraph undo_non_tip {
   308.5 +	"first change" -> "second change";
   308.6 +	"second change" -> "third change";
   308.7 +	backout [label="back out\nsecond change", shape=box];
   308.8 +	"second change" -> backout;
   308.9 +	merge [label="automated\nmerge", shape=box];
  308.10 +	"third change" -> merge;
  308.11 +	backout -> merge;
  308.12 +}
   309.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   309.2 +++ b/en/figs/undo-simple.dot	Sun Aug 16 03:41:39 2009 +0200
   309.3 @@ -0,0 +1,4 @@
   309.4 +digraph undo_simple {
   309.5 +	"first change" -> "second change";
   309.6 +	"second change" -> "back out\nsecond change";
   309.7 +}
   310.1 Binary file en/figs/warning.png has changed
   311.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   311.2 +++ b/en/figs/wdir-after-commit.svg	Sun Aug 16 03:41:39 2009 +0200
   311.3 @@ -0,0 +1,394 @@
   311.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   311.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   311.6 +<svg
   311.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   311.8 +   xmlns:cc="http://web.resource.org/cc/"
   311.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  311.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  311.11 +   xmlns="http://www.w3.org/2000/svg"
  311.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  311.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  311.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  311.15 +   width="744.09448819"
  311.16 +   height="1052.3622047"
  311.17 +   id="svg5971"
  311.18 +   sodipodi:version="0.32"
  311.19 +   inkscape:version="0.44.1"
  311.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  311.21 +   sodipodi:docname="wdir-after-commit.svg">
  311.22 +  <defs
  311.23 +     id="defs5973">
  311.24 +    <linearGradient
  311.25 +       inkscape:collect="always"
  311.26 +       xlink:href="#linearGradient6049"
  311.27 +       id="linearGradient6445"
  311.28 +       gradientUnits="userSpaceOnUse"
  311.29 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  311.30 +       x1="333.91171"
  311.31 +       y1="488.79077"
  311.32 +       x2="508.94543"
  311.33 +       y2="263.79077" />
  311.34 +    <marker
  311.35 +       inkscape:stockid="Arrow1Mstart"
  311.36 +       orient="auto"
  311.37 +       refY="0.0"
  311.38 +       refX="0.0"
  311.39 +       id="Arrow1Mstart"
  311.40 +       style="overflow:visible">
  311.41 +      <path
  311.42 +         id="path4855"
  311.43 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  311.44 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  311.45 +         transform="scale(0.4) translate(10,0)" />
  311.46 +    </marker>
  311.47 +    <linearGradient
  311.48 +       id="linearGradient6049">
  311.49 +      <stop
  311.50 +         style="stop-color:#686868;stop-opacity:1;"
  311.51 +         offset="0"
  311.52 +         id="stop6051" />
  311.53 +      <stop
  311.54 +         style="stop-color:#f0f0f0;stop-opacity:1;"
  311.55 +         offset="1"
  311.56 +         id="stop6053" />
  311.57 +    </linearGradient>
  311.58 +    <marker
  311.59 +       inkscape:stockid="Arrow1Mend"
  311.60 +       orient="auto"
  311.61 +       refY="0.0"
  311.62 +       refX="0.0"
  311.63 +       id="Arrow1Mend"
  311.64 +       style="overflow:visible;">
  311.65 +      <path
  311.66 +         id="path4852"
  311.67 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  311.68 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  311.69 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  311.70 +    </marker>
  311.71 +    <linearGradient
  311.72 +       inkscape:collect="always"
  311.73 +       xlink:href="#linearGradient6049"
  311.74 +       id="linearGradient6083"
  311.75 +       gradientUnits="userSpaceOnUse"
  311.76 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  311.77 +       x1="333.91171"
  311.78 +       y1="488.79077"
  311.79 +       x2="508.94543"
  311.80 +       y2="263.79077" />
  311.81 +    <linearGradient
  311.82 +       inkscape:collect="always"
  311.83 +       xlink:href="#linearGradient6049"
  311.84 +       id="linearGradient6142"
  311.85 +       gradientUnits="userSpaceOnUse"
  311.86 +       gradientTransform="translate(-42.00893,-30.49544)"
  311.87 +       x1="333.91171"
  311.88 +       y1="488.79077"
  311.89 +       x2="508.94543"
  311.90 +       y2="263.79077" />
  311.91 +    <linearGradient
  311.92 +       inkscape:collect="always"
  311.93 +       xlink:href="#linearGradient6049"
  311.94 +       id="linearGradient6193"
  311.95 +       gradientUnits="userSpaceOnUse"
  311.96 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  311.97 +       x1="333.91171"
  311.98 +       y1="488.79077"
  311.99 +       x2="508.94543"
 311.100 +       y2="263.79077" />
 311.101 +    <linearGradient
 311.102 +       inkscape:collect="always"
 311.103 +       xlink:href="#linearGradient6049"
 311.104 +       id="linearGradient6216"
 311.105 +       gradientUnits="userSpaceOnUse"
 311.106 +       gradientTransform="translate(-6.0462,-0.664361)"
 311.107 +       x1="333.91171"
 311.108 +       y1="488.79077"
 311.109 +       x2="508.94543"
 311.110 +       y2="263.79077" />
 311.111 +    <linearGradient
 311.112 +       inkscape:collect="always"
 311.113 +       xlink:href="#linearGradient6049"
 311.114 +       id="linearGradient6232"
 311.115 +       gradientUnits="userSpaceOnUse"
 311.116 +       gradientTransform="matrix(1.000474,0,0,0.790947,222.8399,50.85693)"
 311.117 +       x1="333.91171"
 311.118 +       y1="488.79077"
 311.119 +       x2="508.94543"
 311.120 +       y2="263.79077" />
 311.121 +    <linearGradient
 311.122 +       inkscape:collect="always"
 311.123 +       xlink:href="#linearGradient6049"
 311.124 +       id="linearGradient6772"
 311.125 +       gradientUnits="userSpaceOnUse"
 311.126 +       gradientTransform="matrix(1.000474,0,0,0.790947,222.8399,50.85693)"
 311.127 +       x1="333.91171"
 311.128 +       y1="488.79077"
 311.129 +       x2="508.94543"
 311.130 +       y2="263.79077" />
 311.131 +  </defs>
 311.132 +  <sodipodi:namedview
 311.133 +     id="base"
 311.134 +     pagecolor="#ffffff"
 311.135 +     bordercolor="#666666"
 311.136 +     borderopacity="1.0"
 311.137 +     gridtolerance="10000"
 311.138 +     guidetolerance="10"
 311.139 +     objecttolerance="10"
 311.140 +     inkscape:pageopacity="0.0"
 311.141 +     inkscape:pageshadow="2"
 311.142 +     inkscape:zoom="0.90509668"
 311.143 +     inkscape:cx="390.0539"
 311.144 +     inkscape:cy="690.49342"
 311.145 +     inkscape:document-units="px"
 311.146 +     inkscape:current-layer="layer1"
 311.147 +     showguides="true"
 311.148 +     inkscape:guide-bbox="true"
 311.149 +     inkscape:window-width="906"
 311.150 +     inkscape:window-height="620"
 311.151 +     inkscape:window-x="0"
 311.152 +     inkscape:window-y="25">
 311.153 +    <sodipodi:guide
 311.154 +       orientation="vertical"
 311.155 +       position="-1.4285714"
 311.156 +       id="guide6022" />
 311.157 +  </sodipodi:namedview>
 311.158 +  <metadata
 311.159 +     id="metadata5976">
 311.160 +    <rdf:RDF>
 311.161 +      <cc:Work
 311.162 +         rdf:about="">
 311.163 +        <dc:format>image/svg+xml</dc:format>
 311.164 +        <dc:type
 311.165 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 311.166 +      </cc:Work>
 311.167 +    </rdf:RDF>
 311.168 +  </metadata>
 311.169 +  <g
 311.170 +     inkscape:label="Layer 1"
 311.171 +     inkscape:groupmode="layer"
 311.172 +     id="layer1">
 311.173 +    <rect
 311.174 +       y="245.98355"
 311.175 +       x="328.23956"
 311.176 +       height="258.57144"
 311.177 +       width="174.28572"
 311.178 +       id="rect6047"
 311.179 +       style="fill:url(#linearGradient6216);fill-opacity:1;stroke:#686868;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 311.180 +    <g
 311.181 +       id="g6261"
 311.182 +       transform="translate(234,0)">
 311.183 +      <rect
 311.184 +         y="258.7149"
 311.185 +         x="114.11369"
 311.186 +         height="44.537449"
 311.187 +         width="134.53746"
 311.188 +         id="rect5983"
 311.189 +         style="fill:#b1b1b1;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 311.190 +      <text
 311.191 +         id="text5985"
 311.192 +         y="284.47562"
 311.193 +         x="138.7962"
 311.194 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 311.195 +         xml:space="preserve"><tspan
 311.196 +           style="font-family:Courier"
 311.197 +           y="284.47562"
 311.198 +           x="138.7962"
 311.199 +           id="tspan5987"
 311.200 +           sodipodi:role="line">dfbbb33f3fa3</tspan></text>
 311.201 +    </g>
 311.202 +    <rect
 311.203 +       style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 311.204 +       id="rect5996"
 311.205 +       width="134.53746"
 311.206 +       height="44.537449"
 311.207 +       x="348.11371"
 311.208 +       y="320.38159" />
 311.209 +    <text
 311.210 +       xml:space="preserve"
 311.211 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 311.212 +       x="372.7962"
 311.213 +       y="346.1423"
 311.214 +       id="text5998"><tspan
 311.215 +         sodipodi:role="line"
 311.216 +         id="tspan6000"
 311.217 +         x="372.7962"
 311.218 +         y="346.1423"
 311.219 +         style="font-family:Courier">e7639888bb2f</tspan></text>
 311.220 +    <rect
 311.221 +       style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 311.222 +       id="rect6004"
 311.223 +       width="134.53746"
 311.224 +       height="44.537449"
 311.225 +       x="348.11371"
 311.226 +       y="382.04825" />
 311.227 +    <text
 311.228 +       xml:space="preserve"
 311.229 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 311.230 +       x="370.65421"
 311.231 +       y="407.80896"
 311.232 +       id="text6006"><tspan
 311.233 +         sodipodi:role="line"
 311.234 +         id="tspan6008"
 311.235 +         x="370.65421"
 311.236 +         y="407.80896"
 311.237 +         style="font-family:Courier">7b064d8bac5e</tspan></text>
 311.238 +    <path
 311.239 +       inkscape:connector-type="polyline"
 311.240 +       id="path6018"
 311.241 +       d="M 415.38242,303.62646 L 415.38242,320.00744"
 311.242 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 311.243 +    <path
 311.244 +       inkscape:connection-end="#rect6004"
 311.245 +       inkscape:connector-type="polyline"
 311.246 +       id="path6020"
 311.247 +       d="M 415.38242,365.29315 L 415.38243,381.67412"
 311.248 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 311.249 +    <rect
 311.250 +       style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 311.251 +       id="rect6039"
 311.252 +       width="134.53746"
 311.253 +       height="44.537449"
 311.254 +       x="348.11359"
 311.255 +       y="443.71487" />
 311.256 +    <text
 311.257 +       xml:space="preserve"
 311.258 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 311.259 +       x="372.79706"
 311.260 +       y="469.47556"
 311.261 +       id="text6041"><tspan
 311.262 +         sodipodi:role="line"
 311.263 +         id="tspan6043"
 311.264 +         x="372.79706"
 311.265 +         y="469.47556"
 311.266 +         style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 311.267 +    <path
 311.268 +       inkscape:connection-end="#rect6039"
 311.269 +       inkscape:connector-type="polyline"
 311.270 +       id="path6045"
 311.271 +       d="M 415.38238,426.95981 L 415.38235,443.34087"
 311.272 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 311.273 +    <text
 311.274 +       xml:space="preserve"
 311.275 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 311.276 +       x="327.66046"
 311.277 +       y="231.36218"
 311.278 +       id="text6102"><tspan
 311.279 +         sodipodi:role="line"
 311.280 +         id="tspan6104"
 311.281 +         x="327.66046"
 311.282 +         y="231.36218">History in repository</tspan></text>
 311.283 +    <rect
 311.284 +       y="245.94225"
 311.285 +       x="557.28418"
 311.286 +       height="204.51619"
 311.287 +       width="174.36833"
 311.288 +       id="rect6140"
 311.289 +       style="fill:url(#linearGradient6232);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 311.290 +    <g
 311.291 +       id="g6130"
 311.292 +       transform="translate(262.3254,24.38544)">
 311.293 +      <rect
 311.294 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 311.295 +         id="rect6106"
 311.296 +         width="134.53746"
 311.297 +         height="44.537449"
 311.298 +         x="314.87415"
 311.299 +         y="257.95059" />
 311.300 +      <text
 311.301 +         xml:space="preserve"
 311.302 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 311.303 +         x="339.55664"
 311.304 +         y="283.7113"
 311.305 +         id="text6108"><tspan
 311.306 +           sodipodi:role="line"
 311.307 +           id="tspan6110"
 311.308 +           x="339.55664"
 311.309 +           y="283.7113"
 311.310 +           style="font-family:Courier">dfbbb33f3fa3</tspan></text>
 311.311 +    </g>
 311.312 +    <g
 311.313 +       id="g6135"
 311.314 +       transform="translate(263.0396,49.83106)">
 311.315 +      <rect
 311.316 +         inkscape:transform-center-y="102.85714"
 311.317 +         inkscape:transform-center-x="129.28571"
 311.318 +         style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 311.319 +         id="rect6112"
 311.320 +         width="134.53746"
 311.321 +         height="44.537449"
 311.322 +         x="314.15985"
 311.323 +         y="326.52203" />
 311.324 +      <text
 311.325 +         inkscape:transform-center-y="102.7311"
 311.326 +         inkscape:transform-center-x="128.69672"
 311.327 +         xml:space="preserve"
 311.328 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 311.329 +         x="338.84335"
 311.330 +         y="352.28271"
 311.331 +         id="text6114"><tspan
 311.332 +           sodipodi:role="line"
 311.333 +           id="tspan6116"
 311.334 +           x="338.84335"
 311.335 +           y="352.28271"
 311.336 +           style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 311.337 +    </g>
 311.338 +    <text
 311.339 +       xml:space="preserve"
 311.340 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 311.341 +       x="576.63208"
 311.342 +       y="270.479"
 311.343 +       id="text6118"><tspan
 311.344 +         sodipodi:role="line"
 311.345 +         id="tspan6120"
 311.346 +         x="576.63208"
 311.347 +         y="270.479">First parent</tspan></text>
 311.348 +    <text
 311.349 +       xml:space="preserve"
 311.350 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 311.351 +       x="576.07544"
 311.352 +       y="364.49615"
 311.353 +       id="text6122"><tspan
 311.354 +         sodipodi:role="line"
 311.355 +         id="tspan6124"
 311.356 +         x="576.07544"
 311.357 +         y="364.49615">Second parent</tspan></text>
 311.358 +    <text
 311.359 +       xml:space="preserve"
 311.360 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 311.361 +       x="556.61743"
 311.362 +       y="231.36218"
 311.363 +       id="text6195"><tspan
 311.364 +         sodipodi:role="line"
 311.365 +         id="tspan6197"
 311.366 +         x="556.61743"
 311.367 +         y="231.36218">Parents of working directory</tspan></text>
 311.368 +    <path
 311.369 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 311.370 +       d="M 576.82542,297.63008 L 483.02528,287.95831"
 311.371 +       id="path6266"
 311.372 +       inkscape:connector-type="polyline"
 311.373 +       inkscape:connection-start="#g6130"
 311.374 +       inkscape:connection-end="#g6261" />
 311.375 +    <path
 311.376 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 311.377 +       d="M 665.12232,418.17579 L 665.12232,418.17579"
 311.378 +       id="path6270"
 311.379 +       inkscape:connector-type="polyline" />
 311.380 +    <text
 311.381 +       xml:space="preserve"
 311.382 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 311.383 +       x="316.86407"
 311.384 +       y="275.6496"
 311.385 +       id="text6573"><tspan
 311.386 +         sodipodi:role="line"
 311.387 +         id="tspan6575"
 311.388 +         x="316.86407"
 311.389 +         y="275.6496"
 311.390 +         style="text-align:end;text-anchor:end">New</tspan><tspan
 311.391 +         sodipodi:role="line"
 311.392 +         x="316.86407"
 311.393 +         y="290.6496"
 311.394 +         id="tspan6577"
 311.395 +         style="text-align:end;text-anchor:end">changeset</tspan></text>
 311.396 +  </g>
 311.397 +</svg>
   312.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   312.2 +++ b/en/figs/wdir-branch.svg	Sun Aug 16 03:41:39 2009 +0200
   312.3 @@ -0,0 +1,418 @@
   312.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   312.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   312.6 +<svg
   312.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   312.8 +   xmlns:cc="http://web.resource.org/cc/"
   312.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  312.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  312.11 +   xmlns="http://www.w3.org/2000/svg"
  312.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  312.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  312.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  312.15 +   width="744.09448819"
  312.16 +   height="1052.3622047"
  312.17 +   id="svg5971"
  312.18 +   sodipodi:version="0.32"
  312.19 +   inkscape:version="0.44.1"
  312.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  312.21 +   sodipodi:docname="wdir-branch.svg">
  312.22 +  <defs
  312.23 +     id="defs5973">
  312.24 +    <marker
  312.25 +       inkscape:stockid="Arrow1Mstart"
  312.26 +       orient="auto"
  312.27 +       refY="0.0"
  312.28 +       refX="0.0"
  312.29 +       id="Arrow1Mstart"
  312.30 +       style="overflow:visible">
  312.31 +      <path
  312.32 +         id="path4855"
  312.33 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  312.34 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  312.35 +         transform="scale(0.4) translate(10,0)" />
  312.36 +    </marker>
  312.37 +    <linearGradient
  312.38 +       id="linearGradient6049">
  312.39 +      <stop
  312.40 +         style="stop-color:#686868;stop-opacity:1;"
  312.41 +         offset="0"
  312.42 +         id="stop6051" />
  312.43 +      <stop
  312.44 +         style="stop-color:#f0f0f0;stop-opacity:1;"
  312.45 +         offset="1"
  312.46 +         id="stop6053" />
  312.47 +    </linearGradient>
  312.48 +    <marker
  312.49 +       inkscape:stockid="Arrow1Mend"
  312.50 +       orient="auto"
  312.51 +       refY="0.0"
  312.52 +       refX="0.0"
  312.53 +       id="Arrow1Mend"
  312.54 +       style="overflow:visible;">
  312.55 +      <path
  312.56 +         id="path4852"
  312.57 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  312.58 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  312.59 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  312.60 +    </marker>
  312.61 +    <linearGradient
  312.62 +       inkscape:collect="always"
  312.63 +       xlink:href="#linearGradient6049"
  312.64 +       id="linearGradient6083"
  312.65 +       gradientUnits="userSpaceOnUse"
  312.66 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  312.67 +       x1="333.91171"
  312.68 +       y1="488.79077"
  312.69 +       x2="508.94543"
  312.70 +       y2="263.79077" />
  312.71 +    <linearGradient
  312.72 +       inkscape:collect="always"
  312.73 +       xlink:href="#linearGradient6049"
  312.74 +       id="linearGradient6142"
  312.75 +       gradientUnits="userSpaceOnUse"
  312.76 +       gradientTransform="translate(-42.00893,-30.49544)"
  312.77 +       x1="333.91171"
  312.78 +       y1="488.79077"
  312.79 +       x2="508.94543"
  312.80 +       y2="263.79077" />
  312.81 +    <linearGradient
  312.82 +       inkscape:collect="always"
  312.83 +       xlink:href="#linearGradient6049"
  312.84 +       id="linearGradient6193"
  312.85 +       gradientUnits="userSpaceOnUse"
  312.86 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  312.87 +       x1="333.91171"
  312.88 +       y1="488.79077"
  312.89 +       x2="508.94543"
  312.90 +       y2="263.79077" />
  312.91 +    <linearGradient
  312.92 +       inkscape:collect="always"
  312.93 +       xlink:href="#linearGradient6049"
  312.94 +       id="linearGradient6216"
  312.95 +       gradientUnits="userSpaceOnUse"
  312.96 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  312.97 +       x1="333.91171"
  312.98 +       y1="488.79077"
  312.99 +       x2="508.94543"
 312.100 +       y2="263.79077" />
 312.101 +    <linearGradient
 312.102 +       inkscape:collect="always"
 312.103 +       xlink:href="#linearGradient6049"
 312.104 +       id="linearGradient6232"
 312.105 +       gradientUnits="userSpaceOnUse"
 312.106 +       gradientTransform="matrix(1.000473,0,0,0.790947,-11.16012,50.85693)"
 312.107 +       x1="333.91171"
 312.108 +       y1="488.79077"
 312.109 +       x2="508.94543"
 312.110 +       y2="263.79077" />
 312.111 +    <linearGradient
 312.112 +       inkscape:collect="always"
 312.113 +       xlink:href="#linearGradient6049"
 312.114 +       id="linearGradient6445"
 312.115 +       gradientUnits="userSpaceOnUse"
 312.116 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
 312.117 +       x1="333.91171"
 312.118 +       y1="488.79077"
 312.119 +       x2="508.94543"
 312.120 +       y2="263.79077" />
 312.121 +    <linearGradient
 312.122 +       inkscape:collect="always"
 312.123 +       xlink:href="#linearGradient6049"
 312.124 +       id="linearGradient6974"
 312.125 +       gradientUnits="userSpaceOnUse"
 312.126 +       gradientTransform="matrix(1.911882,0,0,0.789965,-574.7896,51.22599)"
 312.127 +       x1="333.91171"
 312.128 +       y1="488.79077"
 312.129 +       x2="508.94543"
 312.130 +       y2="263.79077" />
 312.131 +    <linearGradient
 312.132 +       inkscape:collect="always"
 312.133 +       xlink:href="#linearGradient6049"
 312.134 +       id="linearGradient6996"
 312.135 +       gradientUnits="userSpaceOnUse"
 312.136 +       gradientTransform="matrix(1.000473,0,0,0.790947,112.8399,50.85693)"
 312.137 +       x1="333.91171"
 312.138 +       y1="488.79077"
 312.139 +       x2="508.94543"
 312.140 +       y2="263.79077" />
 312.141 +  </defs>
 312.142 +  <sodipodi:namedview
 312.143 +     id="base"
 312.144 +     pagecolor="#ffffff"
 312.145 +     bordercolor="#666666"
 312.146 +     borderopacity="1.0"
 312.147 +     gridtolerance="10000"
 312.148 +     guidetolerance="10"
 312.149 +     objecttolerance="10"
 312.150 +     inkscape:pageopacity="0.0"
 312.151 +     inkscape:pageshadow="2"
 312.152 +     inkscape:zoom="0.90509668"
 312.153 +     inkscape:cx="345.85973"
 312.154 +     inkscape:cy="690.49342"
 312.155 +     inkscape:document-units="px"
 312.156 +     inkscape:current-layer="layer1"
 312.157 +     showguides="true"
 312.158 +     inkscape:guide-bbox="true"
 312.159 +     inkscape:window-width="906"
 312.160 +     inkscape:window-height="620"
 312.161 +     inkscape:window-x="0"
 312.162 +     inkscape:window-y="25">
 312.163 +    <sodipodi:guide
 312.164 +       orientation="vertical"
 312.165 +       position="-1.4285714"
 312.166 +       id="guide6022" />
 312.167 +  </sodipodi:namedview>
 312.168 +  <metadata
 312.169 +     id="metadata5976">
 312.170 +    <rdf:RDF>
 312.171 +      <cc:Work
 312.172 +         rdf:about="">
 312.173 +        <dc:format>image/svg+xml</dc:format>
 312.174 +        <dc:type
 312.175 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 312.176 +      </cc:Work>
 312.177 +    </rdf:RDF>
 312.178 +  </metadata>
 312.179 +  <g
 312.180 +     inkscape:label="Layer 1"
 312.181 +     inkscape:groupmode="layer"
 312.182 +     id="layer1">
 312.183 +    <rect
 312.184 +       y="246.06918"
 312.185 +       x="64.325172"
 312.186 +       height="204.26233"
 312.187 +       width="333.2135"
 312.188 +       id="rect6047"
 312.189 +       style="fill:url(#linearGradient6974);fill-opacity:1;stroke:#686868;stroke-width:0.91925466;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 312.190 +    <g
 312.191 +       id="g1935">
 312.192 +      <rect
 312.193 +         y="266.24374"
 312.194 +         x="84.113708"
 312.195 +         height="44.537449"
 312.196 +         width="134.53746"
 312.197 +         id="rect5996"
 312.198 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 312.199 +      <text
 312.200 +         id="text5998"
 312.201 +         y="292.00446"
 312.202 +         x="108.7962"
 312.203 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 312.204 +         xml:space="preserve"><tspan
 312.205 +           style="font-family:Courier"
 312.206 +           y="292.00446"
 312.207 +           x="108.7962"
 312.208 +           id="tspan6000"
 312.209 +           sodipodi:role="line">e7639888bb2f</tspan></text>
 312.210 +    </g>
 312.211 +    <g
 312.212 +       id="g6976"
 312.213 +       transform="translate(70,0)">
 312.214 +      <rect
 312.215 +         y="327.9104"
 312.216 +         x="40.113693"
 312.217 +         height="44.537449"
 312.218 +         width="134.53746"
 312.219 +         id="rect6004"
 312.220 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 312.221 +      <text
 312.222 +         id="text6006"
 312.223 +         y="353.67111"
 312.224 +         x="62.654205"
 312.225 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 312.226 +         xml:space="preserve"><tspan
 312.227 +           style="font-family:Courier"
 312.228 +           y="353.67111"
 312.229 +           x="62.654205"
 312.230 +           id="tspan6008"
 312.231 +           sodipodi:role="line">7b064d8bac5e</tspan></text>
 312.232 +    </g>
 312.233 +    <path
 312.234 +       inkscape:connector-type="polyline"
 312.235 +       id="path6020"
 312.236 +       d="M 160.92915,311.15532 L 167.83571,327.53627"
 312.237 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 312.238 +       inkscape:connection-end="#g6976"
 312.239 +       inkscape:connection-start="#g1935" />
 312.240 +    <rect
 312.241 +       style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 312.242 +       id="rect6039"
 312.243 +       width="134.53746"
 312.244 +       height="44.537449"
 312.245 +       x="110.11359"
 312.246 +       y="389.57703" />
 312.247 +    <text
 312.248 +       xml:space="preserve"
 312.249 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 312.250 +       x="134.79706"
 312.251 +       y="415.33771"
 312.252 +       id="text6041"><tspan
 312.253 +         sodipodi:role="line"
 312.254 +         id="tspan6043"
 312.255 +         x="134.79706"
 312.256 +         y="415.33771"
 312.257 +         style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 312.258 +    <path
 312.259 +       inkscape:connection-end="#rect6039"
 312.260 +       inkscape:connector-type="polyline"
 312.261 +       id="path6045"
 312.262 +       d="M 177.38238,372.82195 L 177.38235,389.20303"
 312.263 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 312.264 +    <rect
 312.265 +       y="245.94225"
 312.266 +       x="447.28412"
 312.267 +       height="204.51619"
 312.268 +       width="174.36833"
 312.269 +       id="rect6140"
 312.270 +       style="fill:url(#linearGradient6996);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 312.271 +    <g
 312.272 +       id="g6130"
 312.273 +       transform="translate(152.3254,24.38544)">
 312.274 +      <rect
 312.275 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 312.276 +         id="rect6106"
 312.277 +         width="134.53746"
 312.278 +         height="44.537449"
 312.279 +         x="314.87415"
 312.280 +         y="257.95059" />
 312.281 +      <text
 312.282 +         xml:space="preserve"
 312.283 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 312.284 +         x="339.55664"
 312.285 +         y="283.7113"
 312.286 +         id="text6108"><tspan
 312.287 +           sodipodi:role="line"
 312.288 +           id="tspan6110"
 312.289 +           x="339.55664"
 312.290 +           y="283.7113"
 312.291 +           style="font-family:Courier">ffb20e1701ea</tspan></text>
 312.292 +    </g>
 312.293 +    <g
 312.294 +       id="g6135"
 312.295 +       transform="translate(153.0396,49.83106)">
 312.296 +      <rect
 312.297 +         inkscape:transform-center-y="102.85714"
 312.298 +         inkscape:transform-center-x="129.28571"
 312.299 +         style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 312.300 +         id="rect6112"
 312.301 +         width="134.53746"
 312.302 +         height="44.537449"
 312.303 +         x="314.15985"
 312.304 +         y="326.52203" />
 312.305 +      <text
 312.306 +         inkscape:transform-center-y="102.7311"
 312.307 +         inkscape:transform-center-x="128.69672"
 312.308 +         xml:space="preserve"
 312.309 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 312.310 +         x="338.84335"
 312.311 +         y="352.28271"
 312.312 +         id="text6114"><tspan
 312.313 +           sodipodi:role="line"
 312.314 +           id="tspan6116"
 312.315 +           x="338.84335"
 312.316 +           y="352.28271"
 312.317 +           style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 312.318 +    </g>
 312.319 +    <text
 312.320 +       xml:space="preserve"
 312.321 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 312.322 +       x="466.63208"
 312.323 +       y="270.479"
 312.324 +       id="text6118"><tspan
 312.325 +         sodipodi:role="line"
 312.326 +         id="tspan6120"
 312.327 +         x="466.63208"
 312.328 +         y="270.479">First parent</tspan></text>
 312.329 +    <text
 312.330 +       xml:space="preserve"
 312.331 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 312.332 +       x="466.07544"
 312.333 +       y="364.49615"
 312.334 +       id="text6122"><tspan
 312.335 +         sodipodi:role="line"
 312.336 +         id="tspan6124"
 312.337 +         x="466.07544"
 312.338 +         y="364.49615">Second parent</tspan></text>
 312.339 +    <text
 312.340 +       xml:space="preserve"
 312.341 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 312.342 +       x="446.61743"
 312.343 +       y="231.36218"
 312.344 +       id="text6195"><tspan
 312.345 +         sodipodi:role="line"
 312.346 +         id="tspan6197"
 312.347 +         x="446.61743"
 312.348 +         y="231.36218">Parents of working directory</tspan></text>
 312.349 +    <path
 312.350 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 312.351 +       d="M 466.82542,300.21999 L 377.00207,294.39744"
 312.352 +       id="path6266"
 312.353 +       inkscape:connector-type="polyline"
 312.354 +       inkscape:connection-start="#g6130"
 312.355 +       inkscape:connection-end="#rect1925" />
 312.356 +    <path
 312.357 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 312.358 +       d="M 665.12232,418.17579 L 665.12232,418.17579"
 312.359 +       id="path6270"
 312.360 +       inkscape:connector-type="polyline" />
 312.361 +    <g
 312.362 +       id="g2845">
 312.363 +      <rect
 312.364 +         y="266.24374"
 312.365 +         x="242.09048"
 312.366 +         height="44.537449"
 312.367 +         width="134.53746"
 312.368 +         id="rect1925"
 312.369 +         style="fill:#9f9f9f;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 312.370 +      <text
 312.371 +         id="text1927"
 312.372 +         y="292.00446"
 312.373 +         x="266.77298"
 312.374 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 312.375 +         xml:space="preserve"><tspan
 312.376 +           style="font-family:Courier"
 312.377 +           y="292.00446"
 312.378 +           x="266.77298"
 312.379 +           id="tspan1929"
 312.380 +           sodipodi:role="line">ffb20e1701ea</tspan></text>
 312.381 +    </g>
 312.382 +    <path
 312.383 +       inkscape:connector-type="polyline"
 312.384 +       id="path1933"
 312.385 +       d="M 260.89978,311.15532 L 225.84185,327.53627"
 312.386 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 312.387 +       inkscape:connection-end="#g6976" />
 312.388 +    <text
 312.389 +       xml:space="preserve"
 312.390 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 312.391 +       x="109.45568"
 312.392 +       y="231.4554"
 312.393 +       id="text2837"><tspan
 312.394 +         sodipodi:role="line"
 312.395 +         id="tspan2839"
 312.396 +         x="109.45568"
 312.397 +         y="231.4554">Pre-existing head</tspan></text>
 312.398 +    <text
 312.399 +       xml:space="preserve"
 312.400 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 312.401 +       x="237.54184"
 312.402 +       y="231.4554"
 312.403 +       id="text2841"><tspan
 312.404 +         sodipodi:role="line"
 312.405 +         id="tspan2843"
 312.406 +         x="237.54184"
 312.407 +         y="231.4554">Newly created head (and tip)</tspan></text>
 312.408 +    <path
 312.409 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 312.410 +       d="M 148.05048,235.87482 L 149.94915,265.86962"
 312.411 +       id="path2850"
 312.412 +       inkscape:connector-type="polyline"
 312.413 +       inkscape:connection-end="#g1935" />
 312.414 +    <path
 312.415 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 312.416 +       d="M 303.83495,238.08453 L 306.87874,265.86962"
 312.417 +       id="path2852"
 312.418 +       inkscape:connector-type="polyline"
 312.419 +       inkscape:connection-end="#g2845" />
 312.420 +  </g>
 312.421 +</svg>
   313.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   313.2 +++ b/en/figs/wdir-merge.svg	Sun Aug 16 03:41:39 2009 +0200
   313.3 @@ -0,0 +1,425 @@
   313.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   313.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   313.6 +<svg
   313.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   313.8 +   xmlns:cc="http://web.resource.org/cc/"
   313.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  313.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  313.11 +   xmlns="http://www.w3.org/2000/svg"
  313.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  313.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  313.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  313.15 +   width="744.09448819"
  313.16 +   height="1052.3622047"
  313.17 +   id="svg5971"
  313.18 +   sodipodi:version="0.32"
  313.19 +   inkscape:version="0.44.1"
  313.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  313.21 +   sodipodi:docname="wdir-merge.svg">
  313.22 +  <defs
  313.23 +     id="defs5973">
  313.24 +    <marker
  313.25 +       inkscape:stockid="Arrow1Mstart"
  313.26 +       orient="auto"
  313.27 +       refY="0.0"
  313.28 +       refX="0.0"
  313.29 +       id="Arrow1Mstart"
  313.30 +       style="overflow:visible">
  313.31 +      <path
  313.32 +         id="path4855"
  313.33 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  313.34 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  313.35 +         transform="scale(0.4) translate(10,0)" />
  313.36 +    </marker>
  313.37 +    <linearGradient
  313.38 +       id="linearGradient6049">
  313.39 +      <stop
  313.40 +         style="stop-color:#686868;stop-opacity:1;"
  313.41 +         offset="0"
  313.42 +         id="stop6051" />
  313.43 +      <stop
  313.44 +         style="stop-color:#f0f0f0;stop-opacity:1;"
  313.45 +         offset="1"
  313.46 +         id="stop6053" />
  313.47 +    </linearGradient>
  313.48 +    <marker
  313.49 +       inkscape:stockid="Arrow1Mend"
  313.50 +       orient="auto"
  313.51 +       refY="0.0"
  313.52 +       refX="0.0"
  313.53 +       id="Arrow1Mend"
  313.54 +       style="overflow:visible;">
  313.55 +      <path
  313.56 +         id="path4852"
  313.57 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  313.58 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  313.59 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  313.60 +    </marker>
  313.61 +    <linearGradient
  313.62 +       inkscape:collect="always"
  313.63 +       xlink:href="#linearGradient6049"
  313.64 +       id="linearGradient6083"
  313.65 +       gradientUnits="userSpaceOnUse"
  313.66 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  313.67 +       x1="333.91171"
  313.68 +       y1="488.79077"
  313.69 +       x2="508.94543"
  313.70 +       y2="263.79077" />
  313.71 +    <linearGradient
  313.72 +       inkscape:collect="always"
  313.73 +       xlink:href="#linearGradient6049"
  313.74 +       id="linearGradient6142"
  313.75 +       gradientUnits="userSpaceOnUse"
  313.76 +       gradientTransform="translate(-42.00893,-30.49544)"
  313.77 +       x1="333.91171"
  313.78 +       y1="488.79077"
  313.79 +       x2="508.94543"
  313.80 +       y2="263.79077" />
  313.81 +    <linearGradient
  313.82 +       inkscape:collect="always"
  313.83 +       xlink:href="#linearGradient6049"
  313.84 +       id="linearGradient6193"
  313.85 +       gradientUnits="userSpaceOnUse"
  313.86 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  313.87 +       x1="333.91171"
  313.88 +       y1="488.79077"
  313.89 +       x2="508.94543"
  313.90 +       y2="263.79077" />
  313.91 +    <linearGradient
  313.92 +       inkscape:collect="always"
  313.93 +       xlink:href="#linearGradient6049"
  313.94 +       id="linearGradient6216"
  313.95 +       gradientUnits="userSpaceOnUse"
  313.96 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  313.97 +       x1="333.91171"
  313.98 +       y1="488.79077"
  313.99 +       x2="508.94543"
 313.100 +       y2="263.79077" />
 313.101 +    <linearGradient
 313.102 +       inkscape:collect="always"
 313.103 +       xlink:href="#linearGradient6049"
 313.104 +       id="linearGradient6232"
 313.105 +       gradientUnits="userSpaceOnUse"
 313.106 +       gradientTransform="matrix(1.000473,0,0,0.790947,-11.16012,50.85693)"
 313.107 +       x1="333.91171"
 313.108 +       y1="488.79077"
 313.109 +       x2="508.94543"
 313.110 +       y2="263.79077" />
 313.111 +    <linearGradient
 313.112 +       inkscape:collect="always"
 313.113 +       xlink:href="#linearGradient6049"
 313.114 +       id="linearGradient6445"
 313.115 +       gradientUnits="userSpaceOnUse"
 313.116 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
 313.117 +       x1="333.91171"
 313.118 +       y1="488.79077"
 313.119 +       x2="508.94543"
 313.120 +       y2="263.79077" />
 313.121 +    <linearGradient
 313.122 +       inkscape:collect="always"
 313.123 +       xlink:href="#linearGradient6049"
 313.124 +       id="linearGradient6974"
 313.125 +       gradientUnits="userSpaceOnUse"
 313.126 +       gradientTransform="matrix(1.911882,0,0,0.789965,-574.7896,51.22599)"
 313.127 +       x1="333.91171"
 313.128 +       y1="488.79077"
 313.129 +       x2="508.94543"
 313.130 +       y2="263.79077" />
 313.131 +    <linearGradient
 313.132 +       inkscape:collect="always"
 313.133 +       xlink:href="#linearGradient6049"
 313.134 +       id="linearGradient6996"
 313.135 +       gradientUnits="userSpaceOnUse"
 313.136 +       gradientTransform="matrix(1.000473,0,0,0.790947,112.8399,50.85693)"
 313.137 +       x1="333.91171"
 313.138 +       y1="488.79077"
 313.139 +       x2="508.94543"
 313.140 +       y2="263.79077" />
 313.141 +  </defs>
 313.142 +  <sodipodi:namedview
 313.143 +     id="base"
 313.144 +     pagecolor="#ffffff"
 313.145 +     bordercolor="#666666"
 313.146 +     borderopacity="1.0"
 313.147 +     gridtolerance="10000"
 313.148 +     guidetolerance="10"
 313.149 +     objecttolerance="10"
 313.150 +     inkscape:pageopacity="0.0"
 313.151 +     inkscape:pageshadow="2"
 313.152 +     inkscape:zoom="1.28"
 313.153 +     inkscape:cx="345.85973"
 313.154 +     inkscape:cy="690.49342"
 313.155 +     inkscape:document-units="px"
 313.156 +     inkscape:current-layer="layer1"
 313.157 +     showguides="true"
 313.158 +     inkscape:guide-bbox="true"
 313.159 +     inkscape:window-width="906"
 313.160 +     inkscape:window-height="620"
 313.161 +     inkscape:window-x="0"
 313.162 +     inkscape:window-y="25">
 313.163 +    <sodipodi:guide
 313.164 +       orientation="vertical"
 313.165 +       position="-1.4285714"
 313.166 +       id="guide6022" />
 313.167 +  </sodipodi:namedview>
 313.168 +  <metadata
 313.169 +     id="metadata5976">
 313.170 +    <rdf:RDF>
 313.171 +      <cc:Work
 313.172 +         rdf:about="">
 313.173 +        <dc:format>image/svg+xml</dc:format>
 313.174 +        <dc:type
 313.175 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 313.176 +      </cc:Work>
 313.177 +    </rdf:RDF>
 313.178 +  </metadata>
 313.179 +  <g
 313.180 +     inkscape:label="Layer 1"
 313.181 +     inkscape:groupmode="layer"
 313.182 +     id="layer1">
 313.183 +    <rect
 313.184 +       y="246.06918"
 313.185 +       x="64.325172"
 313.186 +       height="204.26233"
 313.187 +       width="333.2135"
 313.188 +       id="rect6047"
 313.189 +       style="fill:url(#linearGradient6974);fill-opacity:1;stroke:#686868;stroke-width:0.91925466;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 313.190 +    <g
 313.191 +       id="g6976"
 313.192 +       transform="translate(70,0)">
 313.193 +      <rect
 313.194 +         y="327.9104"
 313.195 +         x="40.113693"
 313.196 +         height="44.537449"
 313.197 +         width="134.53746"
 313.198 +         id="rect6004"
 313.199 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 313.200 +      <text
 313.201 +         id="text6006"
 313.202 +         y="353.67111"
 313.203 +         x="62.654205"
 313.204 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 313.205 +         xml:space="preserve"><tspan
 313.206 +           style="font-family:Courier"
 313.207 +           y="353.67111"
 313.208 +           x="62.654205"
 313.209 +           id="tspan6008"
 313.210 +           sodipodi:role="line">7b064d8bac5e</tspan></text>
 313.211 +    </g>
 313.212 +    <path
 313.213 +       inkscape:connector-type="polyline"
 313.214 +       id="path6020"
 313.215 +       d="M 160.92915,311.15532 L 167.83571,327.53627"
 313.216 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 313.217 +       inkscape:connection-end="#g6976"
 313.218 +       inkscape:connection-start="#g1935" />
 313.219 +    <rect
 313.220 +       style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 313.221 +       id="rect6039"
 313.222 +       width="134.53746"
 313.223 +       height="44.537449"
 313.224 +       x="110.11359"
 313.225 +       y="389.57703" />
 313.226 +    <text
 313.227 +       xml:space="preserve"
 313.228 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 313.229 +       x="134.79706"
 313.230 +       y="415.33771"
 313.231 +       id="text6041"><tspan
 313.232 +         sodipodi:role="line"
 313.233 +         id="tspan6043"
 313.234 +         x="134.79706"
 313.235 +         y="415.33771"
 313.236 +         style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 313.237 +    <path
 313.238 +       inkscape:connection-end="#rect6039"
 313.239 +       inkscape:connector-type="polyline"
 313.240 +       id="path6045"
 313.241 +       d="M 177.38238,372.82195 L 177.38235,389.20303"
 313.242 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 313.243 +    <rect
 313.244 +       y="245.94225"
 313.245 +       x="447.28412"
 313.246 +       height="204.51619"
 313.247 +       width="174.36833"
 313.248 +       id="rect6140"
 313.249 +       style="fill:url(#linearGradient6996);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 313.250 +    <g
 313.251 +       id="g6130"
 313.252 +       transform="translate(152.3254,24.38544)">
 313.253 +      <rect
 313.254 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 313.255 +         id="rect6106"
 313.256 +         width="134.53746"
 313.257 +         height="44.537449"
 313.258 +         x="314.87415"
 313.259 +         y="257.95059" />
 313.260 +      <text
 313.261 +         xml:space="preserve"
 313.262 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 313.263 +         x="339.55664"
 313.264 +         y="283.7113"
 313.265 +         id="text6108"><tspan
 313.266 +           sodipodi:role="line"
 313.267 +           id="tspan6110"
 313.268 +           x="339.55664"
 313.269 +           y="283.7113"
 313.270 +           style="font-family:Courier">ffb20e1701ea</tspan></text>
 313.271 +    </g>
 313.272 +    <g
 313.273 +       id="g6135"
 313.274 +       transform="translate(153.0396,49.83106)">
 313.275 +      <rect
 313.276 +         inkscape:transform-center-y="102.85714"
 313.277 +         inkscape:transform-center-x="129.28571"
 313.278 +         style="fill:#d4d4d4;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 313.279 +         id="rect6112"
 313.280 +         width="134.53746"
 313.281 +         height="44.537449"
 313.282 +         x="314.15985"
 313.283 +         y="326.52203" />
 313.284 +      <text
 313.285 +         inkscape:transform-center-y="102.7311"
 313.286 +         inkscape:transform-center-x="128.69672"
 313.287 +         xml:space="preserve"
 313.288 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 313.289 +         x="338.84335"
 313.290 +         y="352.28271"
 313.291 +         id="text6114"><tspan
 313.292 +           sodipodi:role="line"
 313.293 +           id="tspan6116"
 313.294 +           x="338.84335"
 313.295 +           y="352.28271"
 313.296 +           style="fill:black;fill-opacity:1;font-family:Courier">e7639888bb2f</tspan></text>
 313.297 +    </g>
 313.298 +    <text
 313.299 +       xml:space="preserve"
 313.300 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 313.301 +       x="466.63208"
 313.302 +       y="270.479"
 313.303 +       id="text6118"><tspan
 313.304 +         sodipodi:role="line"
 313.305 +         id="tspan6120"
 313.306 +         x="466.63208"
 313.307 +         y="270.479">First parent (unchanged)</tspan></text>
 313.308 +    <text
 313.309 +       xml:space="preserve"
 313.310 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 313.311 +       x="466.07544"
 313.312 +       y="364.49615"
 313.313 +       id="text6122"><tspan
 313.314 +         sodipodi:role="line"
 313.315 +         id="tspan6124"
 313.316 +         x="466.07544"
 313.317 +         y="364.49615">Second parent</tspan></text>
 313.318 +    <text
 313.319 +       xml:space="preserve"
 313.320 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 313.321 +       x="446.61743"
 313.322 +       y="231.36218"
 313.323 +       id="text6195"><tspan
 313.324 +         sodipodi:role="line"
 313.325 +         id="tspan6197"
 313.326 +         x="446.61743"
 313.327 +         y="231.36218">Parents of working directory</tspan></text>
 313.328 +    <path
 313.329 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 313.330 +       d="M 466.82542,300.21999 L 377.00207,294.39744"
 313.331 +       id="path6266"
 313.332 +       inkscape:connector-type="polyline"
 313.333 +       inkscape:connection-start="#g6130"
 313.334 +       inkscape:connection-end="#rect1925" />
 313.335 +    <path
 313.336 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 313.337 +       d="M 665.12232,418.17579 L 665.12232,418.17579"
 313.338 +       id="path6270"
 313.339 +       inkscape:connector-type="polyline" />
 313.340 +    <g
 313.341 +       id="g2845">
 313.342 +      <rect
 313.343 +         y="266.24374"
 313.344 +         x="242.09048"
 313.345 +         height="44.537449"
 313.346 +         width="134.53746"
 313.347 +         id="rect1925"
 313.348 +         style="fill:#9f9f9f;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 313.349 +      <text
 313.350 +         id="text1927"
 313.351 +         y="292.00446"
 313.352 +         x="266.77298"
 313.353 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 313.354 +         xml:space="preserve"><tspan
 313.355 +           style="font-family:Courier"
 313.356 +           y="292.00446"
 313.357 +           x="266.77298"
 313.358 +           id="tspan1929"
 313.359 +           sodipodi:role="line">ffb20e1701ea</tspan></text>
 313.360 +    </g>
 313.361 +    <path
 313.362 +       inkscape:connector-type="polyline"
 313.363 +       id="path1933"
 313.364 +       d="M 260.89978,311.15532 L 225.84185,327.53627"
 313.365 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 313.366 +       inkscape:connection-end="#g6976" />
 313.367 +    <text
 313.368 +       xml:space="preserve"
 313.369 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 313.370 +       x="109.45568"
 313.371 +       y="231.4554"
 313.372 +       id="text2837"><tspan
 313.373 +         sodipodi:role="line"
 313.374 +         id="tspan2839"
 313.375 +         x="109.45568"
 313.376 +         y="231.4554">Pre-existing head</tspan></text>
 313.377 +    <text
 313.378 +       xml:space="preserve"
 313.379 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 313.380 +       x="237.54184"
 313.381 +       y="231.4554"
 313.382 +       id="text2841"><tspan
 313.383 +         sodipodi:role="line"
 313.384 +         id="tspan2843"
 313.385 +         x="237.54184"
 313.386 +         y="231.4554">Newly created head (and tip)</tspan></text>
 313.387 +    <path
 313.388 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 313.389 +       d="M 148.05048,235.87482 L 149.94915,265.86962"
 313.390 +       id="path2850"
 313.391 +       inkscape:connector-type="polyline"
 313.392 +       inkscape:connection-end="#g1935" />
 313.393 +    <path
 313.394 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 313.395 +       d="M 303.83495,238.08453 L 306.87874,265.86962"
 313.396 +       id="path2852"
 313.397 +       inkscape:connector-type="polyline"
 313.398 +       inkscape:connection-end="#g2845" />
 313.399 +    <path
 313.400 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 313.401 +       d="M 466.82545,379.17944 L 219.0253,307.95488"
 313.402 +       id="path3016"
 313.403 +       inkscape:connector-type="polyline"
 313.404 +       inkscape:connection-start="#g6135"
 313.405 +       inkscape:connection-end="#g1935" />
 313.406 +    <g
 313.407 +       id="g1935">
 313.408 +      <rect
 313.409 +         y="266.24374"
 313.410 +         x="84.113708"
 313.411 +         height="44.537449"
 313.412 +         width="134.53746"
 313.413 +         id="rect5996"
 313.414 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 313.415 +      <text
 313.416 +         id="text5998"
 313.417 +         y="292.00446"
 313.418 +         x="108.7962"
 313.419 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 313.420 +         xml:space="preserve"><tspan
 313.421 +           style="font-family:Courier"
 313.422 +           y="292.00446"
 313.423 +           x="108.7962"
 313.424 +           id="tspan6000"
 313.425 +           sodipodi:role="line">e7639888bb2f</tspan></text>
 313.426 +    </g>
 313.427 +  </g>
 313.428 +</svg>
   314.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   314.2 +++ b/en/figs/wdir-pre-branch.svg	Sun Aug 16 03:41:39 2009 +0200
   314.3 @@ -0,0 +1,364 @@
   314.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   314.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   314.6 +<svg
   314.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   314.8 +   xmlns:cc="http://web.resource.org/cc/"
   314.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  314.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  314.11 +   xmlns="http://www.w3.org/2000/svg"
  314.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  314.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  314.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  314.15 +   width="744.09448819"
  314.16 +   height="1052.3622047"
  314.17 +   id="svg5971"
  314.18 +   sodipodi:version="0.32"
  314.19 +   inkscape:version="0.44.1"
  314.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  314.21 +   sodipodi:docname="wdir-branch.svg">
  314.22 +  <defs
  314.23 +     id="defs5973">
  314.24 +    <marker
  314.25 +       inkscape:stockid="Arrow1Mstart"
  314.26 +       orient="auto"
  314.27 +       refY="0.0"
  314.28 +       refX="0.0"
  314.29 +       id="Arrow1Mstart"
  314.30 +       style="overflow:visible">
  314.31 +      <path
  314.32 +         id="path4855"
  314.33 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  314.34 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  314.35 +         transform="scale(0.4) translate(10,0)" />
  314.36 +    </marker>
  314.37 +    <linearGradient
  314.38 +       id="linearGradient6049">
  314.39 +      <stop
  314.40 +         style="stop-color:#686868;stop-opacity:1;"
  314.41 +         offset="0"
  314.42 +         id="stop6051" />
  314.43 +      <stop
  314.44 +         style="stop-color:#f0f0f0;stop-opacity:1;"
  314.45 +         offset="1"
  314.46 +         id="stop6053" />
  314.47 +    </linearGradient>
  314.48 +    <marker
  314.49 +       inkscape:stockid="Arrow1Mend"
  314.50 +       orient="auto"
  314.51 +       refY="0.0"
  314.52 +       refX="0.0"
  314.53 +       id="Arrow1Mend"
  314.54 +       style="overflow:visible;">
  314.55 +      <path
  314.56 +         id="path4852"
  314.57 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  314.58 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  314.59 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  314.60 +    </marker>
  314.61 +    <linearGradient
  314.62 +       inkscape:collect="always"
  314.63 +       xlink:href="#linearGradient6049"
  314.64 +       id="linearGradient6083"
  314.65 +       gradientUnits="userSpaceOnUse"
  314.66 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  314.67 +       x1="333.91171"
  314.68 +       y1="488.79077"
  314.69 +       x2="508.94543"
  314.70 +       y2="263.79077" />
  314.71 +    <linearGradient
  314.72 +       inkscape:collect="always"
  314.73 +       xlink:href="#linearGradient6049"
  314.74 +       id="linearGradient6142"
  314.75 +       gradientUnits="userSpaceOnUse"
  314.76 +       gradientTransform="translate(-42.00893,-30.49544)"
  314.77 +       x1="333.91171"
  314.78 +       y1="488.79077"
  314.79 +       x2="508.94543"
  314.80 +       y2="263.79077" />
  314.81 +    <linearGradient
  314.82 +       inkscape:collect="always"
  314.83 +       xlink:href="#linearGradient6049"
  314.84 +       id="linearGradient6193"
  314.85 +       gradientUnits="userSpaceOnUse"
  314.86 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  314.87 +       x1="333.91171"
  314.88 +       y1="488.79077"
  314.89 +       x2="508.94543"
  314.90 +       y2="263.79077" />
  314.91 +    <linearGradient
  314.92 +       inkscape:collect="always"
  314.93 +       xlink:href="#linearGradient6049"
  314.94 +       id="linearGradient6216"
  314.95 +       gradientUnits="userSpaceOnUse"
  314.96 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  314.97 +       x1="333.91171"
  314.98 +       y1="488.79077"
  314.99 +       x2="508.94543"
 314.100 +       y2="263.79077" />
 314.101 +    <linearGradient
 314.102 +       inkscape:collect="always"
 314.103 +       xlink:href="#linearGradient6049"
 314.104 +       id="linearGradient6232"
 314.105 +       gradientUnits="userSpaceOnUse"
 314.106 +       gradientTransform="matrix(1.000473,0,0,0.790947,-11.16012,50.85693)"
 314.107 +       x1="333.91171"
 314.108 +       y1="488.79077"
 314.109 +       x2="508.94543"
 314.110 +       y2="263.79077" />
 314.111 +    <linearGradient
 314.112 +       inkscape:collect="always"
 314.113 +       xlink:href="#linearGradient6049"
 314.114 +       id="linearGradient6445"
 314.115 +       gradientUnits="userSpaceOnUse"
 314.116 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
 314.117 +       x1="333.91171"
 314.118 +       y1="488.79077"
 314.119 +       x2="508.94543"
 314.120 +       y2="263.79077" />
 314.121 +    <linearGradient
 314.122 +       inkscape:collect="always"
 314.123 +       xlink:href="#linearGradient6049"
 314.124 +       id="linearGradient6974"
 314.125 +       gradientUnits="userSpaceOnUse"
 314.126 +       gradientTransform="matrix(1.000474,0,0,0.790947,-314.246,50.85694)"
 314.127 +       x1="333.91171"
 314.128 +       y1="488.79077"
 314.129 +       x2="508.94543"
 314.130 +       y2="263.79077" />
 314.131 +    <linearGradient
 314.132 +       inkscape:collect="always"
 314.133 +       xlink:href="#linearGradient6049"
 314.134 +       id="linearGradient6996"
 314.135 +       gradientUnits="userSpaceOnUse"
 314.136 +       gradientTransform="matrix(1.000473,0,0,0.790947,-85.16012,50.85693)"
 314.137 +       x1="333.91171"
 314.138 +       y1="488.79077"
 314.139 +       x2="508.94543"
 314.140 +       y2="263.79077" />
 314.141 +  </defs>
 314.142 +  <sodipodi:namedview
 314.143 +     id="base"
 314.144 +     pagecolor="#ffffff"
 314.145 +     bordercolor="#666666"
 314.146 +     borderopacity="1.0"
 314.147 +     gridtolerance="10000"
 314.148 +     guidetolerance="10"
 314.149 +     objecttolerance="10"
 314.150 +     inkscape:pageopacity="0.0"
 314.151 +     inkscape:pageshadow="2"
 314.152 +     inkscape:zoom="0.90509668"
 314.153 +     inkscape:cx="390.0539"
 314.154 +     inkscape:cy="690.49342"
 314.155 +     inkscape:document-units="px"
 314.156 +     inkscape:current-layer="layer1"
 314.157 +     showguides="true"
 314.158 +     inkscape:guide-bbox="true"
 314.159 +     inkscape:window-width="906"
 314.160 +     inkscape:window-height="620"
 314.161 +     inkscape:window-x="0"
 314.162 +     inkscape:window-y="25">
 314.163 +    <sodipodi:guide
 314.164 +       orientation="vertical"
 314.165 +       position="-1.4285714"
 314.166 +       id="guide6022" />
 314.167 +  </sodipodi:namedview>
 314.168 +  <metadata
 314.169 +     id="metadata5976">
 314.170 +    <rdf:RDF>
 314.171 +      <cc:Work
 314.172 +         rdf:about="">
 314.173 +        <dc:format>image/svg+xml</dc:format>
 314.174 +        <dc:type
 314.175 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 314.176 +      </cc:Work>
 314.177 +    </rdf:RDF>
 314.178 +  </metadata>
 314.179 +  <g
 314.180 +     inkscape:label="Layer 1"
 314.181 +     inkscape:groupmode="layer"
 314.182 +     id="layer1">
 314.183 +    <rect
 314.184 +       y="245.94225"
 314.185 +       x="20.198257"
 314.186 +       height="204.51619"
 314.187 +       width="174.36833"
 314.188 +       id="rect6047"
 314.189 +       style="fill:url(#linearGradient6974);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 314.190 +    <rect
 314.191 +       style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 314.192 +       id="rect5996"
 314.193 +       width="134.53746"
 314.194 +       height="44.537449"
 314.195 +       x="40.113693"
 314.196 +       y="266.24374" />
 314.197 +    <text
 314.198 +       xml:space="preserve"
 314.199 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 314.200 +       x="64.796204"
 314.201 +       y="292.00446"
 314.202 +       id="text5998"><tspan
 314.203 +         sodipodi:role="line"
 314.204 +         id="tspan6000"
 314.205 +         x="64.796204"
 314.206 +         y="292.00446"
 314.207 +         style="font-family:Courier">e7639888bb2f</tspan></text>
 314.208 +    <g
 314.209 +       id="g6976">
 314.210 +      <rect
 314.211 +         y="327.9104"
 314.212 +         x="40.113693"
 314.213 +         height="44.537449"
 314.214 +         width="134.53746"
 314.215 +         id="rect6004"
 314.216 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 314.217 +      <text
 314.218 +         id="text6006"
 314.219 +         y="353.67111"
 314.220 +         x="62.654205"
 314.221 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 314.222 +         xml:space="preserve"><tspan
 314.223 +           style="font-family:Courier"
 314.224 +           y="353.67111"
 314.225 +           x="62.654205"
 314.226 +           id="tspan6008"
 314.227 +           sodipodi:role="line">7b064d8bac5e</tspan></text>
 314.228 +    </g>
 314.229 +    <path
 314.230 +       inkscape:connection-end="#rect6004"
 314.231 +       inkscape:connector-type="polyline"
 314.232 +       id="path6020"
 314.233 +       d="M 107.38242,311.15529 L 107.38242,327.53626"
 314.234 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 314.235 +    <rect
 314.236 +       style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 314.237 +       id="rect6039"
 314.238 +       width="134.53746"
 314.239 +       height="44.537449"
 314.240 +       x="40.113571"
 314.241 +       y="389.57703" />
 314.242 +    <text
 314.243 +       xml:space="preserve"
 314.244 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 314.245 +       x="64.797073"
 314.246 +       y="415.33771"
 314.247 +       id="text6041"><tspan
 314.248 +         sodipodi:role="line"
 314.249 +         id="tspan6043"
 314.250 +         x="64.797073"
 314.251 +         y="415.33771"
 314.252 +         style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 314.253 +    <path
 314.254 +       inkscape:connection-end="#rect6039"
 314.255 +       inkscape:connector-type="polyline"
 314.256 +       id="path6045"
 314.257 +       d="M 107.38238,372.82195 L 107.38235,389.20301"
 314.258 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 314.259 +    <text
 314.260 +       xml:space="preserve"
 314.261 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 314.262 +       x="19.660461"
 314.263 +       y="231.36218"
 314.264 +       id="text6102"><tspan
 314.265 +         sodipodi:role="line"
 314.266 +         id="tspan6104"
 314.267 +         x="19.660461"
 314.268 +         y="231.36218">History in repository</tspan></text>
 314.269 +    <rect
 314.270 +       y="245.94225"
 314.271 +       x="249.28412"
 314.272 +       height="204.51619"
 314.273 +       width="174.36833"
 314.274 +       id="rect6140"
 314.275 +       style="fill:url(#linearGradient6996);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 314.276 +    <g
 314.277 +       id="g6130"
 314.278 +       transform="translate(-45.67459,24.38544)">
 314.279 +      <rect
 314.280 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 314.281 +         id="rect6106"
 314.282 +         width="134.53746"
 314.283 +         height="44.537449"
 314.284 +         x="314.87415"
 314.285 +         y="257.95059" />
 314.286 +      <text
 314.287 +         xml:space="preserve"
 314.288 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 314.289 +         x="339.55664"
 314.290 +         y="283.7113"
 314.291 +         id="text6108"><tspan
 314.292 +           sodipodi:role="line"
 314.293 +           id="tspan6110"
 314.294 +           x="339.55664"
 314.295 +           y="283.7113"
 314.296 +           style="font-family:Courier">7b064d8bac5e</tspan></text>
 314.297 +    </g>
 314.298 +    <g
 314.299 +       id="g6135"
 314.300 +       transform="translate(-44.96042,49.83106)">
 314.301 +      <rect
 314.302 +         inkscape:transform-center-y="102.85714"
 314.303 +         inkscape:transform-center-x="129.28571"
 314.304 +         style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 314.305 +         id="rect6112"
 314.306 +         width="134.53746"
 314.307 +         height="44.537449"
 314.308 +         x="314.15985"
 314.309 +         y="326.52203" />
 314.310 +      <text
 314.311 +         inkscape:transform-center-y="102.7311"
 314.312 +         inkscape:transform-center-x="128.69672"
 314.313 +         xml:space="preserve"
 314.314 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 314.315 +         x="338.84335"
 314.316 +         y="352.28271"
 314.317 +         id="text6114"><tspan
 314.318 +           sodipodi:role="line"
 314.319 +           id="tspan6116"
 314.320 +           x="338.84335"
 314.321 +           y="352.28271"
 314.322 +           style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 314.323 +    </g>
 314.324 +    <text
 314.325 +       xml:space="preserve"
 314.326 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 314.327 +       x="268.63208"
 314.328 +       y="270.479"
 314.329 +       id="text6118"><tspan
 314.330 +         sodipodi:role="line"
 314.331 +         id="tspan6120"
 314.332 +         x="268.63208"
 314.333 +         y="270.479">First parent</tspan></text>
 314.334 +    <text
 314.335 +       xml:space="preserve"
 314.336 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 314.337 +       x="268.07544"
 314.338 +       y="364.49615"
 314.339 +       id="text6122"><tspan
 314.340 +         sodipodi:role="line"
 314.341 +         id="tspan6124"
 314.342 +         x="268.07544"
 314.343 +         y="364.49615">Second parent</tspan></text>
 314.344 +    <text
 314.345 +       xml:space="preserve"
 314.346 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 314.347 +       x="248.61746"
 314.348 +       y="231.36218"
 314.349 +       id="text6195"><tspan
 314.350 +         sodipodi:role="line"
 314.351 +         id="tspan6197"
 314.352 +         x="248.61746"
 314.353 +         y="231.36218">Parents of working directory</tspan></text>
 314.354 +    <path
 314.355 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 314.356 +       d="M 268.82543,318.06163 L 175.02528,336.72225"
 314.357 +       id="path6266"
 314.358 +       inkscape:connector-type="polyline"
 314.359 +       inkscape:connection-end="#g6976"
 314.360 +       inkscape:connection-start="#g6130" />
 314.361 +    <path
 314.362 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 314.363 +       d="M 665.12232,418.17579 L 665.12232,418.17579"
 314.364 +       id="path6270"
 314.365 +       inkscape:connector-type="polyline" />
 314.366 +  </g>
 314.367 +</svg>
   315.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   315.2 +++ b/en/figs/wdir.svg	Sun Aug 16 03:41:39 2009 +0200
   315.3 @@ -0,0 +1,348 @@
   315.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   315.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   315.6 +<svg
   315.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   315.8 +   xmlns:cc="http://web.resource.org/cc/"
   315.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  315.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  315.11 +   xmlns="http://www.w3.org/2000/svg"
  315.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  315.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  315.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  315.15 +   width="744.09448819"
  315.16 +   height="1052.3622047"
  315.17 +   id="svg5971"
  315.18 +   sodipodi:version="0.32"
  315.19 +   inkscape:version="0.44.1"
  315.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  315.21 +   sodipodi:docname="wdir.svg">
  315.22 +  <defs
  315.23 +     id="defs5973">
  315.24 +    <marker
  315.25 +       inkscape:stockid="Arrow1Mstart"
  315.26 +       orient="auto"
  315.27 +       refY="0.0"
  315.28 +       refX="0.0"
  315.29 +       id="Arrow1Mstart"
  315.30 +       style="overflow:visible">
  315.31 +      <path
  315.32 +         id="path4855"
  315.33 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  315.34 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  315.35 +         transform="scale(0.4) translate(10,0)" />
  315.36 +    </marker>
  315.37 +    <linearGradient
  315.38 +       id="linearGradient6049">
  315.39 +      <stop
  315.40 +         style="stop-color:#686868;stop-opacity:1;"
  315.41 +         offset="0"
  315.42 +         id="stop6051" />
  315.43 +      <stop
  315.44 +         style="stop-color:#f0f0f0;stop-opacity:1;"
  315.45 +         offset="1"
  315.46 +         id="stop6053" />
  315.47 +    </linearGradient>
  315.48 +    <marker
  315.49 +       inkscape:stockid="Arrow1Mend"
  315.50 +       orient="auto"
  315.51 +       refY="0.0"
  315.52 +       refX="0.0"
  315.53 +       id="Arrow1Mend"
  315.54 +       style="overflow:visible;">
  315.55 +      <path
  315.56 +         id="path4852"
  315.57 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  315.58 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  315.59 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  315.60 +    </marker>
  315.61 +    <linearGradient
  315.62 +       inkscape:collect="always"
  315.63 +       xlink:href="#linearGradient6049"
  315.64 +       id="linearGradient6083"
  315.65 +       gradientUnits="userSpaceOnUse"
  315.66 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  315.67 +       x1="333.91171"
  315.68 +       y1="488.79077"
  315.69 +       x2="508.94543"
  315.70 +       y2="263.79077" />
  315.71 +    <linearGradient
  315.72 +       inkscape:collect="always"
  315.73 +       xlink:href="#linearGradient6049"
  315.74 +       id="linearGradient6142"
  315.75 +       gradientUnits="userSpaceOnUse"
  315.76 +       gradientTransform="translate(-42.00893,-30.49544)"
  315.77 +       x1="333.91171"
  315.78 +       y1="488.79077"
  315.79 +       x2="508.94543"
  315.80 +       y2="263.79077" />
  315.81 +    <linearGradient
  315.82 +       inkscape:collect="always"
  315.83 +       xlink:href="#linearGradient6049"
  315.84 +       id="linearGradient6193"
  315.85 +       gradientUnits="userSpaceOnUse"
  315.86 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  315.87 +       x1="333.91171"
  315.88 +       y1="488.79077"
  315.89 +       x2="508.94543"
  315.90 +       y2="263.79077" />
  315.91 +    <linearGradient
  315.92 +       inkscape:collect="always"
  315.93 +       xlink:href="#linearGradient6049"
  315.94 +       id="linearGradient6216"
  315.95 +       gradientUnits="userSpaceOnUse"
  315.96 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  315.97 +       x1="333.91171"
  315.98 +       y1="488.79077"
  315.99 +       x2="508.94543"
 315.100 +       y2="263.79077" />
 315.101 +    <linearGradient
 315.102 +       inkscape:collect="always"
 315.103 +       xlink:href="#linearGradient6049"
 315.104 +       id="linearGradient6232"
 315.105 +       gradientUnits="userSpaceOnUse"
 315.106 +       gradientTransform="matrix(1.000473,0,0,0.790947,-11.16012,50.85693)"
 315.107 +       x1="333.91171"
 315.108 +       y1="488.79077"
 315.109 +       x2="508.94543"
 315.110 +       y2="263.79077" />
 315.111 +    <linearGradient
 315.112 +       inkscape:collect="always"
 315.113 +       xlink:href="#linearGradient6049"
 315.114 +       id="linearGradient6445"
 315.115 +       gradientUnits="userSpaceOnUse"
 315.116 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
 315.117 +       x1="333.91171"
 315.118 +       y1="488.79077"
 315.119 +       x2="508.94543"
 315.120 +       y2="263.79077" />
 315.121 +  </defs>
 315.122 +  <sodipodi:namedview
 315.123 +     id="base"
 315.124 +     pagecolor="#ffffff"
 315.125 +     bordercolor="#666666"
 315.126 +     borderopacity="1.0"
 315.127 +     gridtolerance="10000"
 315.128 +     guidetolerance="10"
 315.129 +     objecttolerance="10"
 315.130 +     inkscape:pageopacity="0.0"
 315.131 +     inkscape:pageshadow="2"
 315.132 +     inkscape:zoom="0.90509668"
 315.133 +     inkscape:cx="390.0539"
 315.134 +     inkscape:cy="690.49342"
 315.135 +     inkscape:document-units="px"
 315.136 +     inkscape:current-layer="layer1"
 315.137 +     showguides="true"
 315.138 +     inkscape:guide-bbox="true"
 315.139 +     inkscape:window-width="906"
 315.140 +     inkscape:window-height="620"
 315.141 +     inkscape:window-x="0"
 315.142 +     inkscape:window-y="25">
 315.143 +    <sodipodi:guide
 315.144 +       orientation="vertical"
 315.145 +       position="-1.4285714"
 315.146 +       id="guide6022" />
 315.147 +  </sodipodi:namedview>
 315.148 +  <metadata
 315.149 +     id="metadata5976">
 315.150 +    <rdf:RDF>
 315.151 +      <cc:Work
 315.152 +         rdf:about="">
 315.153 +        <dc:format>image/svg+xml</dc:format>
 315.154 +        <dc:type
 315.155 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 315.156 +      </cc:Work>
 315.157 +    </rdf:RDF>
 315.158 +  </metadata>
 315.159 +  <g
 315.160 +     inkscape:label="Layer 1"
 315.161 +     inkscape:groupmode="layer"
 315.162 +     id="layer1">
 315.163 +    <g
 315.164 +       id="g6431"
 315.165 +       transform="translate(0,-0.137863)">
 315.166 +      <rect
 315.167 +         style="fill:url(#linearGradient6445);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 315.168 +         id="rect6047"
 315.169 +         width="174.36833"
 315.170 +         height="204.51619"
 315.171 +         x="94.198257"
 315.172 +         y="246.08011" />
 315.173 +      <rect
 315.174 +         y="266.38159"
 315.175 +         x="114.11369"
 315.176 +         height="44.537449"
 315.177 +         width="134.53746"
 315.178 +         id="rect5996"
 315.179 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 315.180 +      <text
 315.181 +         id="text5998"
 315.182 +         y="292.1423"
 315.183 +         x="138.7962"
 315.184 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 315.185 +         xml:space="preserve"><tspan
 315.186 +           style="font-family:Courier"
 315.187 +           y="292.1423"
 315.188 +           x="138.7962"
 315.189 +           id="tspan6000"
 315.190 +           sodipodi:role="line">e7639888bb2f</tspan></text>
 315.191 +      <rect
 315.192 +         y="328.04825"
 315.193 +         x="114.11369"
 315.194 +         height="44.537449"
 315.195 +         width="134.53746"
 315.196 +         id="rect6004"
 315.197 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 315.198 +      <text
 315.199 +         id="text6006"
 315.200 +         y="353.80896"
 315.201 +         x="136.65421"
 315.202 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 315.203 +         xml:space="preserve"><tspan
 315.204 +           style="font-family:Courier"
 315.205 +           y="353.80896"
 315.206 +           x="136.65421"
 315.207 +           id="tspan6008"
 315.208 +           sodipodi:role="line">7b064d8bac5e</tspan></text>
 315.209 +      <path
 315.210 +         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 315.211 +         d="M 181.38242,311.29315 L 181.38242,327.67412"
 315.212 +         id="path6020"
 315.213 +         inkscape:connector-type="polyline"
 315.214 +         inkscape:connection-end="#rect6004" />
 315.215 +      <rect
 315.216 +         y="389.71487"
 315.217 +         x="114.11357"
 315.218 +         height="44.537449"
 315.219 +         width="134.53746"
 315.220 +         id="rect6039"
 315.221 +         style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 315.222 +      <text
 315.223 +         id="text6041"
 315.224 +         y="415.47556"
 315.225 +         x="138.79707"
 315.226 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 315.227 +         xml:space="preserve"><tspan
 315.228 +           style="fill:#979797;fill-opacity:1;font-family:Courier"
 315.229 +           y="415.47556"
 315.230 +           x="138.79707"
 315.231 +           id="tspan6043"
 315.232 +           sodipodi:role="line">000000000000</tspan></text>
 315.233 +      <path
 315.234 +         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 315.235 +         d="M 181.38238,372.95981 L 181.38235,389.34087"
 315.236 +         id="path6045"
 315.237 +         inkscape:connector-type="polyline"
 315.238 +         inkscape:connection-end="#rect6039" />
 315.239 +    </g>
 315.240 +    <text
 315.241 +       xml:space="preserve"
 315.242 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 315.243 +       x="93.660484"
 315.244 +       y="231.36218"
 315.245 +       id="text6102"><tspan
 315.246 +         sodipodi:role="line"
 315.247 +         id="tspan6104"
 315.248 +         x="93.660484"
 315.249 +         y="231.36218">History in repository</tspan></text>
 315.250 +    <g
 315.251 +       id="g6416">
 315.252 +      <rect
 315.253 +         style="fill:url(#linearGradient6232);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 315.254 +         id="rect6140"
 315.255 +         width="174.36833"
 315.256 +         height="204.51619"
 315.257 +         x="323.28412"
 315.258 +         y="245.94225" />
 315.259 +      <g
 315.260 +         transform="translate(28.32541,24.38544)"
 315.261 +         id="g6130">
 315.262 +        <rect
 315.263 +           y="257.95059"
 315.264 +           x="314.87415"
 315.265 +           height="44.537449"
 315.266 +           width="134.53746"
 315.267 +           id="rect6106"
 315.268 +           style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 315.269 +        <text
 315.270 +           id="text6108"
 315.271 +           y="283.7113"
 315.272 +           x="339.55664"
 315.273 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 315.274 +           xml:space="preserve"><tspan
 315.275 +             style="font-family:Courier"
 315.276 +             y="283.7113"
 315.277 +             x="339.55664"
 315.278 +             id="tspan6110"
 315.279 +             sodipodi:role="line">e7639888bb2f</tspan></text>
 315.280 +      </g>
 315.281 +      <g
 315.282 +         transform="translate(29.03958,49.83106)"
 315.283 +         id="g6135">
 315.284 +        <rect
 315.285 +           y="326.52203"
 315.286 +           x="314.15985"
 315.287 +           height="44.537449"
 315.288 +           width="134.53746"
 315.289 +           id="rect6112"
 315.290 +           style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 315.291 +           inkscape:transform-center-x="129.28571"
 315.292 +           inkscape:transform-center-y="102.85714" />
 315.293 +        <text
 315.294 +           id="text6114"
 315.295 +           y="352.28271"
 315.296 +           x="338.84335"
 315.297 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 315.298 +           xml:space="preserve"
 315.299 +           inkscape:transform-center-x="128.69672"
 315.300 +           inkscape:transform-center-y="102.7311"><tspan
 315.301 +             style="fill:#979797;fill-opacity:1;font-family:Courier"
 315.302 +             y="352.28271"
 315.303 +             x="338.84335"
 315.304 +             id="tspan6116"
 315.305 +             sodipodi:role="line">000000000000</tspan></text>
 315.306 +      </g>
 315.307 +      <text
 315.308 +         id="text6118"
 315.309 +         y="270.479"
 315.310 +         x="342.63208"
 315.311 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 315.312 +         xml:space="preserve"><tspan
 315.313 +           y="270.479"
 315.314 +           x="342.63208"
 315.315 +           id="tspan6120"
 315.316 +           sodipodi:role="line">First parent</tspan></text>
 315.317 +      <text
 315.318 +         id="text6122"
 315.319 +         y="364.49615"
 315.320 +         x="342.07544"
 315.321 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 315.322 +         xml:space="preserve"><tspan
 315.323 +           y="364.49615"
 315.324 +           x="342.07544"
 315.325 +           id="tspan6124"
 315.326 +           sodipodi:role="line">Second parent</tspan></text>
 315.327 +    </g>
 315.328 +    <text
 315.329 +       xml:space="preserve"
 315.330 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 315.331 +       x="322.61746"
 315.332 +       y="231.36218"
 315.333 +       id="text6195"><tspan
 315.334 +         sodipodi:role="line"
 315.335 +         id="tspan6197"
 315.336 +         x="322.61746"
 315.337 +         y="231.36218">Parents of working directory</tspan></text>
 315.338 +    <path
 315.339 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 315.340 +       d="M 342.82543,299.89384 L 249.02528,293.36123"
 315.341 +       id="path6266"
 315.342 +       inkscape:connector-type="polyline"
 315.343 +       inkscape:connection-start="#g6130"
 315.344 +       inkscape:connection-end="#rect5996" />
 315.345 +    <path
 315.346 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 315.347 +       d="M 665.12232,418.17579 L 665.12232,418.17579"
 315.348 +       id="path6270"
 315.349 +       inkscape:connector-type="polyline" />
 315.350 +  </g>
 315.351 +</svg>
   316.1 --- a/en/filelog.svg	Thu Mar 26 08:57:10 2009 +0100
   316.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   316.3 @@ -1,373 +0,0 @@
   316.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   316.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   316.6 -<svg
   316.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   316.8 -   xmlns:cc="http://web.resource.org/cc/"
   316.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  316.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  316.11 -   xmlns="http://www.w3.org/2000/svg"
  316.12 -   xmlns:xlink="http://www.w3.org/1999/xlink"
  316.13 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  316.14 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  316.15 -   width="744.09448819"
  316.16 -   height="1052.3622047"
  316.17 -   id="svg2"
  316.18 -   sodipodi:version="0.32"
  316.19 -   inkscape:version="0.45.1"
  316.20 -   sodipodi:docname="filelog.svg"
  316.21 -   sodipodi:docbase="/home/arun/hgbook/en"
  316.22 -   inkscape:output_extension="org.inkscape.output.svg.inkscape">
  316.23 -  <defs
  316.24 -     id="defs4">
  316.25 -    <marker
  316.26 -       inkscape:stockid="Arrow1Mend"
  316.27 -       orient="auto"
  316.28 -       refY="0.0"
  316.29 -       refX="0.0"
  316.30 -       id="Arrow1Mend"
  316.31 -       style="overflow:visible;">
  316.32 -      <path
  316.33 -         id="path3128"
  316.34 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  316.35 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  316.36 -         transform="scale(0.4) rotate(180) translate(10,0)" />
  316.37 -    </marker>
  316.38 -    <linearGradient
  316.39 -       id="linearGradient2887">
  316.40 -      <stop
  316.41 -         style="stop-color:#91cfcf;stop-opacity:1;"
  316.42 -         offset="0"
  316.43 -         id="stop2889" />
  316.44 -      <stop
  316.45 -         style="stop-color:aqua;stop-opacity:0;"
  316.46 -         offset="1"
  316.47 -         id="stop2891" />
  316.48 -    </linearGradient>
  316.49 -    <linearGradient
  316.50 -       id="linearGradient2795">
  316.51 -      <stop
  316.52 -         style="stop-color:#ccc;stop-opacity:1;"
  316.53 -         offset="0"
  316.54 -         id="stop2797" />
  316.55 -      <stop
  316.56 -         style="stop-color:#ccc;stop-opacity:0;"
  316.57 -         offset="1"
  316.58 -         id="stop2799" />
  316.59 -    </linearGradient>
  316.60 -    <linearGradient
  316.61 -       inkscape:collect="always"
  316.62 -       xlink:href="#linearGradient2795"
  316.63 -       id="linearGradient3170"
  316.64 -       gradientUnits="userSpaceOnUse"
  316.65 -       gradientTransform="translate(121.2183,94.95434)"
  316.66 -       x1="81.322357"
  316.67 -       y1="404.34424"
  316.68 -       x2="201.52036"
  316.69 -       y2="373.03967" />
  316.70 -    <linearGradient
  316.71 -       inkscape:collect="always"
  316.72 -       xlink:href="#linearGradient2887"
  316.73 -       id="linearGradient3172"
  316.74 -       gradientUnits="userSpaceOnUse"
  316.75 -       gradientTransform="translate(0,12)"
  316.76 -       x1="62.634491"
  316.77 -       y1="503.3392"
  316.78 -       x2="248.49242"
  316.79 -       y2="462.94327" />
  316.80 -    <linearGradient
  316.81 -       inkscape:collect="always"
  316.82 -       xlink:href="#linearGradient2795"
  316.83 -       id="linearGradient3174"
  316.84 -       gradientUnits="userSpaceOnUse"
  316.85 -       gradientTransform="matrix(1.001035,0,0,0.653159,236.7075,153.0415)"
  316.86 -       x1="81.322357"
  316.87 -       y1="404.34424"
  316.88 -       x2="201.52036"
  316.89 -       y2="373.03967" />
  316.90 -    <linearGradient
  316.91 -       inkscape:collect="always"
  316.92 -       xlink:href="#linearGradient2887"
  316.93 -       id="linearGradient3176"
  316.94 -       gradientUnits="userSpaceOnUse"
  316.95 -       gradientTransform="translate(0,12)"
  316.96 -       x1="62.634491"
  316.97 -       y1="503.3392"
  316.98 -       x2="248.49242"
  316.99 -       y2="462.94327" />
 316.100 -    <linearGradient
 316.101 -       inkscape:collect="always"
 316.102 -       xlink:href="#linearGradient2795"
 316.103 -       id="linearGradient3208"
 316.104 -       gradientUnits="userSpaceOnUse"
 316.105 -       gradientTransform="matrix(1.001035,0,0,0.653159,236.7075,153.0415)"
 316.106 -       x1="81.322357"
 316.107 -       y1="404.34424"
 316.108 -       x2="201.52036"
 316.109 -       y2="373.03967" />
 316.110 -    <linearGradient
 316.111 -       inkscape:collect="always"
 316.112 -       xlink:href="#linearGradient2887"
 316.113 -       id="linearGradient3210"
 316.114 -       gradientUnits="userSpaceOnUse"
 316.115 -       gradientTransform="translate(0,12)"
 316.116 -       x1="62.634491"
 316.117 -       y1="503.3392"
 316.118 -       x2="248.49242"
 316.119 -       y2="462.94327" />
 316.120 -    <linearGradient
 316.121 -       inkscape:collect="always"
 316.122 -       xlink:href="#linearGradient2795"
 316.123 -       id="linearGradient3212"
 316.124 -       gradientUnits="userSpaceOnUse"
 316.125 -       gradientTransform="translate(121.2183,94.95434)"
 316.126 -       x1="81.322357"
 316.127 -       y1="404.34424"
 316.128 -       x2="201.52036"
 316.129 -       y2="373.03967" />
 316.130 -    <linearGradient
 316.131 -       inkscape:collect="always"
 316.132 -       xlink:href="#linearGradient2887"
 316.133 -       id="linearGradient3214"
 316.134 -       gradientUnits="userSpaceOnUse"
 316.135 -       gradientTransform="translate(0,12)"
 316.136 -       x1="62.634491"
 316.137 -       y1="503.3392"
 316.138 -       x2="248.49242"
 316.139 -       y2="462.94327" />
 316.140 -    <linearGradient
 316.141 -       inkscape:collect="always"
 316.142 -       xlink:href="#linearGradient2795"
 316.143 -       id="linearGradient3256"
 316.144 -       gradientUnits="userSpaceOnUse"
 316.145 -       gradientTransform="matrix(1.2343775,0,0,0.9981848,103.25588,95.681888)"
 316.146 -       x1="74.301666"
 316.147 -       y1="431.67441"
 316.148 -       x2="260.05884"
 316.149 -       y2="369.95322" />
 316.150 -    <linearGradient
 316.151 -       inkscape:collect="always"
 316.152 -       xlink:href="#linearGradient2887"
 316.153 -       id="linearGradient3258"
 316.154 -       gradientUnits="userSpaceOnUse"
 316.155 -       gradientTransform="matrix(1.228929,0,0,0.9972824,-62.037003,13.312997)"
 316.156 -       x1="62.634491"
 316.157 -       y1="503.3392"
 316.158 -       x2="248.49242"
 316.159 -       y2="462.94327" />
 316.160 -    <linearGradient
 316.161 -       inkscape:collect="always"
 316.162 -       xlink:href="#linearGradient2795"
 316.163 -       id="linearGradient3260"
 316.164 -       gradientUnits="userSpaceOnUse"
 316.165 -       gradientTransform="matrix(1.2300738,0,0,0.6517275,219.97511,153.61527)"
 316.166 -       x1="74.387527"
 316.167 -       y1="431.80576"
 316.168 -       x2="259.97339"
 316.169 -       y2="369.82224" />
 316.170 -    <linearGradient
 316.171 -       inkscape:collect="always"
 316.172 -       xlink:href="#linearGradient2887"
 316.173 -       id="linearGradient3262"
 316.174 -       gradientUnits="userSpaceOnUse"
 316.175 -       gradientTransform="matrix(1.2289272,0,0,0.9972824,-62.036756,13.312985)"
 316.176 -       x1="62.634491"
 316.177 -       y1="503.3392"
 316.178 -       x2="248.49242"
 316.179 -       y2="462.94327" />
 316.180 -  </defs>
 316.181 -  <sodipodi:namedview
 316.182 -     id="base"
 316.183 -     pagecolor="#ffffff"
 316.184 -     bordercolor="#666666"
 316.185 -     borderopacity="1.0"
 316.186 -     gridtolerance="10000"
 316.187 -     guidetolerance="10"
 316.188 -     objecttolerance="10"
 316.189 -     inkscape:pageopacity="0.0"
 316.190 -     inkscape:pageshadow="2"
 316.191 -     inkscape:zoom="1.4"
 316.192 -     inkscape:cx="455.8122"
 316.193 -     inkscape:cy="520"
 316.194 -     inkscape:document-units="px"
 316.195 -     inkscape:current-layer="layer1"
 316.196 -     inkscape:window-width="1680"
 316.197 -     inkscape:window-height="970"
 316.198 -     inkscape:window-x="0"
 316.199 -     inkscape:window-y="54" />
 316.200 -  <metadata
 316.201 -     id="metadata7">
 316.202 -    <rdf:RDF>
 316.203 -      <cc:Work
 316.204 -         rdf:about="">
 316.205 -        <dc:format>image/svg+xml</dc:format>
 316.206 -        <dc:type
 316.207 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 316.208 -      </cc:Work>
 316.209 -    </rdf:RDF>
 316.210 -  </metadata>
 316.211 -  <g
 316.212 -     inkscape:label="Layer 1"
 316.213 -     inkscape:groupmode="layer"
 316.214 -     id="layer1">
 316.215 -    <rect
 316.216 -       style="opacity:1;fill:#abadf8;fill-opacity:1;stroke:#595959;stroke-width:0.93760371;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 316.217 -       id="rect3180"
 316.218 -       width="273.81375"
 316.219 -       height="199.06245"
 316.220 -       x="369.1796"
 316.221 -       y="351.79019" />
 316.222 -    <rect
 316.223 -       style="opacity:1;fill:#a2f69c;fill-opacity:1;stroke:#595959;stroke-width:0.93760341;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 316.224 -       id="rect3178"
 316.225 -       width="273.81339"
 316.226 -       height="199.06233"
 316.227 -       x="72.699799"
 316.228 -       y="351.78983" />
 316.229 -    <g
 316.230 -       id="g3144"
 316.231 -       transform="translate(80.467048,0.71578)">
 316.232 -      <g
 316.233 -         id="g2940">
 316.234 -        <rect
 316.235 -           style="fill:url(#linearGradient3260);fill-opacity:1;stroke:#000000;stroke-width:0.89536202;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 316.236 -           id="rect2914"
 316.237 -           width="227.38896"
 316.238 -           height="39.500999"
 316.239 -           x="311.92496"
 316.240 -           y="395.08627" />
 316.241 -        <text
 316.242 -           xml:space="preserve"
 316.243 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 316.244 -           x="323.72824"
 316.245 -           y="416.7626"
 316.246 -           id="text2918"><tspan
 316.247 -             sodipodi:role="line"
 316.248 -             id="tspan2920"
 316.249 -             x="323.72824"
 316.250 -             y="416.7626"
 316.251 -             style="font-family:Courier">.hg/store/data/README.i</tspan></text>
 316.252 -      </g>
 316.253 -      <g
 316.254 -         transform="translate(3.79093e-5,-80.1853)"
 316.255 -         id="g2945">
 316.256 -        <g
 316.257 -           id="g2955">
 316.258 -          <rect
 316.259 -             y="475.4968"
 316.260 -             x="15.550935"
 316.261 -             height="39.500999"
 316.262 -             width="227.17694"
 316.263 -             id="rect2947"
 316.264 -             style="fill:url(#linearGradient3262);fill-opacity:1;stroke:#000000;stroke-width:1.10706258;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 316.265 -          <text
 316.266 -             id="text2949"
 316.267 -             y="498.35123"
 316.268 -             x="31.230644"
 316.269 -             style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 316.270 -             xml:space="preserve"><tspan
 316.271 -               style="font-family:Courier"
 316.272 -               y="498.35123"
 316.273 -               x="31.230644"
 316.274 -               id="tspan2951"
 316.275 -               sodipodi:role="line">README</tspan></text>
 316.276 -        </g>
 316.277 -      </g>
 316.278 -      <path
 316.279 -         inkscape:connector-type="polyline"
 316.280 -         id="path2960"
 316.281 -         d="M 242.94685,414.91115 C 242.94685,414.91115 293.61127,415.26754 310.16269,415.38633"
 316.282 -         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.02046943px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 316.283 -         sodipodi:nodetypes="cz" />
 316.284 -    </g>
 316.285 -    <g
 316.286 -       id="g3156"
 316.287 -       transform="translate(80.467048,0.71578)">
 316.288 -      <g
 316.289 -         transform="translate(116,0)"
 316.290 -         id="g2831">
 316.291 -        <rect
 316.292 -           style="fill:url(#linearGradient3256);fill-opacity:1;stroke:#000000;stroke-width:1.11001658;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 316.293 -           id="rect1906"
 316.294 -           width="228.18446"
 316.295 -           height="60.499123"
 316.296 -           x="195.52719"
 316.297 -           y="465.51859" />
 316.298 -        <g
 316.299 -           id="g2803"
 316.300 -           transform="translate(-0.893671,1.833581)">
 316.301 -          <text
 316.302 -             id="text1884"
 316.303 -             y="483.92801"
 316.304 -             x="208.95944"
 316.305 -             style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 316.306 -             xml:space="preserve"><tspan
 316.307 -               style="font-family:Courier"
 316.308 -               y="483.92801"
 316.309 -               x="208.95944"
 316.310 -               id="tspan1886"
 316.311 -               sodipodi:role="line">.hg/store/data/src/hello.c.d</tspan></text>
 316.312 -          <text
 316.313 -             id="text1888"
 316.314 -             y="507.79309"
 316.315 -             x="208.95944"
 316.316 -             style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 316.317 -             xml:space="preserve"><tspan
 316.318 -               style="font-family:Courier"
 316.319 -               y="507.79309"
 316.320 -               x="208.95944"
 316.321 -               id="tspan1890"
 316.322 -               sodipodi:role="line">.hg/store/data/src/hello.c.i</tspan></text>
 316.323 -        </g>
 316.324 -      </g>
 316.325 -      <g
 316.326 -         id="g2907">
 316.327 -        <rect
 316.328 -           style="fill:url(#linearGradient3258);fill-opacity:1;stroke:#000000;stroke-width:1.10706329;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 316.329 -           id="rect2843"
 316.330 -           width="227.17728"
 316.331 -           height="39.500999"
 316.332 -           x="15.550805"
 316.333 -           y="475.4968" />
 316.334 -        <text
 316.335 -           xml:space="preserve"
 316.336 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 316.337 -           x="31.230644"
 316.338 -           y="498.35123"
 316.339 -           id="text2847"><tspan
 316.340 -             sodipodi:role="line"
 316.341 -             id="tspan2849"
 316.342 -             x="31.230644"
 316.343 -             y="498.35123"
 316.344 -             style="font-family:Courier">src/hello.c</tspan></text>
 316.345 -      </g>
 316.346 -      <path
 316.347 -         inkscape:connection-end="#g2831"
 316.348 -         inkscape:connection-start="#g2907"
 316.349 -         inkscape:connector-type="polyline"
 316.350 -         id="path2962"
 316.351 -         d="M 242.4315,495.88043 C 242.4315,495.88043 292.8861,495.99942 310.04102,496.03909"
 316.352 -         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 316.353 -         sodipodi:nodetypes="cs" />
 316.354 -    </g>
 316.355 -    <text
 316.356 -       xml:space="preserve"
 316.357 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 316.358 -       x="98.496666"
 316.359 -       y="373.96353"
 316.360 -       id="text3216"><tspan
 316.361 -         sodipodi:role="line"
 316.362 -         id="tspan3218"
 316.363 -         x="98.496666"
 316.364 -         y="373.96353">Working directory</tspan></text>
 316.365 -    <text
 316.366 -       xml:space="preserve"
 316.367 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 316.368 -       x="391.39197"
 316.369 -       y="373.96353"
 316.370 -       id="text3228"><tspan
 316.371 -         sodipodi:role="line"
 316.372 -         id="tspan3230"
 316.373 -         x="391.39197"
 316.374 -         y="373.96353">Repository</tspan></text>
 316.375 -  </g>
 316.376 -</svg>
   317.1 --- a/en/filenames.tex	Thu Mar 26 08:57:10 2009 +0100
   317.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   317.3 @@ -1,306 +0,0 @@
   317.4 -\chapter{File names and pattern matching}
   317.5 -\label{chap:names}
   317.6 -
   317.7 -Mercurial provides mechanisms that let you work with file names in a
   317.8 -consistent and expressive way.
   317.9 -
  317.10 -\section{Simple file naming}
  317.11 -
  317.12 -Mercurial uses a unified piece of machinery ``under the hood'' to
  317.13 -handle file names.  Every command behaves uniformly with respect to
  317.14 -file names.  The way in which commands work with file names is as
  317.15 -follows.
  317.16 -
  317.17 -If you explicitly name real files on the command line, Mercurial works
  317.18 -with exactly those files, as you would expect.
  317.19 -\interaction{filenames.files}
  317.20 -
  317.21 -When you provide a directory name, Mercurial will interpret this as
  317.22 -``operate on every file in this directory and its subdirectories''.
  317.23 -Mercurial traverses the files and subdirectories in a directory in
  317.24 -alphabetical order.  When it encounters a subdirectory, it will
  317.25 -traverse that subdirectory before continuing with the current
  317.26 -directory.
  317.27 -\interaction{filenames.dirs}
  317.28 -
  317.29 -\section{Running commands without any file names}
  317.30 -
  317.31 -Mercurial's commands that work with file names have useful default
  317.32 -behaviours when you invoke them without providing any file names or
  317.33 -patterns.  What kind of behaviour you should expect depends on what
  317.34 -the command does.  Here are a few rules of thumb you can use to
  317.35 -predict what a command is likely to do if you don't give it any names
  317.36 -to work with.
  317.37 -\begin{itemize}
  317.38 -\item Most commands will operate on the entire working directory.
  317.39 -  This is what the \hgcmd{add} command does, for example.
  317.40 -\item If the command has effects that are difficult or impossible to
  317.41 -  reverse, it will force you to explicitly provide at least one name
  317.42 -  or pattern (see below).  This protects you from accidentally
  317.43 -  deleting files by running \hgcmd{remove} with no arguments, for
  317.44 -  example.
  317.45 -\end{itemize}
  317.46 -
  317.47 -It's easy to work around these default behaviours if they don't suit
  317.48 -you.  If a command normally operates on the whole working directory,
  317.49 -you can invoke it on just the current directory and its subdirectories
  317.50 -by giving it the name ``\dirname{.}''.
  317.51 -\interaction{filenames.wdir-subdir}
  317.52 -
  317.53 -Along the same lines, some commands normally print file names relative
  317.54 -to the root of the repository, even if you're invoking them from a
  317.55 -subdirectory.  Such a command will print file names relative to your
  317.56 -subdirectory if you give it explicit names.  Here, we're going to run
  317.57 -\hgcmd{status} from a subdirectory, and get it to operate on the
  317.58 -entire working directory while printing file names relative to our
  317.59 -subdirectory, by passing it the output of the \hgcmd{root} command.
  317.60 -\interaction{filenames.wdir-relname}
  317.61 -
  317.62 -\section{Telling you what's going on}
  317.63 -
  317.64 -The \hgcmd{add} example in the preceding section illustrates something
  317.65 -else that's helpful about Mercurial commands.  If a command operates
  317.66 -on a file that you didn't name explicitly on the command line, it will
  317.67 -usually print the name of the file, so that you will not be surprised
  317.68 -what's going on.
  317.69 -
  317.70 -The principle here is of \emph{least surprise}.  If you've exactly
  317.71 -named a file on the command line, there's no point in repeating it
  317.72 -back at you.  If Mercurial is acting on a file \emph{implicitly},
  317.73 -because you provided no names, or a directory, or a pattern (see
  317.74 -below), it's safest to tell you what it's doing.
  317.75 -
  317.76 -For commands that behave this way, you can silence them using the
  317.77 -\hggopt{-q} option.  You can also get them to print the name of every
  317.78 -file, even those you've named explicitly, using the \hggopt{-v}
  317.79 -option.
  317.80 -
  317.81 -\section{Using patterns to identify files}
  317.82 -
  317.83 -In addition to working with file and directory names, Mercurial lets
  317.84 -you use \emph{patterns} to identify files.  Mercurial's pattern
  317.85 -handling is expressive.
  317.86 -
  317.87 -On Unix-like systems (Linux, MacOS, etc.), the job of matching file
  317.88 -names to patterns normally falls to the shell.  On these systems, you
  317.89 -must explicitly tell Mercurial that a name is a pattern.  On Windows,
  317.90 -the shell does not expand patterns, so Mercurial will automatically
  317.91 -identify names that are patterns, and expand them for you.
  317.92 -
  317.93 -To provide a pattern in place of a regular name on the command line,
  317.94 -the mechanism is simple:
  317.95 -\begin{codesample2}
  317.96 -  syntax:patternbody
  317.97 -\end{codesample2}
  317.98 -That is, a pattern is identified by a short text string that says what
  317.99 -kind of pattern this is, followed by a colon, followed by the actual
 317.100 -pattern.
 317.101 -
 317.102 -Mercurial supports two kinds of pattern syntax.  The most frequently
 317.103 -used is called \texttt{glob}; this is the same kind of pattern
 317.104 -matching used by the Unix shell, and should be familiar to Windows
 317.105 -command prompt users, too.  
 317.106 -
 317.107 -When Mercurial does automatic pattern matching on Windows, it uses
 317.108 -\texttt{glob} syntax.  You can thus omit the ``\texttt{glob:}'' prefix
 317.109 -on Windows, but it's safe to use it, too.
 317.110 -
 317.111 -The \texttt{re} syntax is more powerful; it lets you specify patterns
 317.112 -using regular expressions, also known as regexps.
 317.113 -
 317.114 -By the way, in the examples that follow, notice that I'm careful to
 317.115 -wrap all of my patterns in quote characters, so that they won't get
 317.116 -expanded by the shell before Mercurial sees them.
 317.117 -
 317.118 -\subsection{Shell-style \texttt{glob} patterns}
 317.119 -
 317.120 -This is an overview of the kinds of patterns you can use when you're
 317.121 -matching on glob patterns.
 317.122 -
 317.123 -The ``\texttt{*}'' character matches any string, within a single
 317.124 -directory.
 317.125 -\interaction{filenames.glob.star}
 317.126 -
 317.127 -The ``\texttt{**}'' pattern matches any string, and crosses directory
 317.128 -boundaries.  It's not a standard Unix glob token, but it's accepted by
 317.129 -several popular Unix shells, and is very useful.
 317.130 -\interaction{filenames.glob.starstar}
 317.131 -
 317.132 -The ``\texttt{?}'' pattern matches any single character.
 317.133 -\interaction{filenames.glob.question}
 317.134 -
 317.135 -The ``\texttt{[}'' character begins a \emph{character class}.  This
 317.136 -matches any single character within the class.  The class ends with a
 317.137 -``\texttt{]}'' character.  A class may contain multiple \emph{range}s
 317.138 -of the form ``\texttt{a-f}'', which is shorthand for
 317.139 -``\texttt{abcdef}''.
 317.140 -\interaction{filenames.glob.range}
 317.141 -If the first character after the ``\texttt{[}'' in a character class
 317.142 -is a ``\texttt{!}'', it \emph{negates} the class, making it match any
 317.143 -single character not in the class.
 317.144 -
 317.145 -A ``\texttt{\{}'' begins a group of subpatterns, where the whole group
 317.146 -matches if any subpattern in the group matches.  The ``\texttt{,}''
 317.147 -character separates subpatterns, and ``\texttt{\}}'' ends the group.
 317.148 -\interaction{filenames.glob.group}
 317.149 -
 317.150 -\subsubsection{Watch out!}
 317.151 -
 317.152 -Don't forget that if you want to match a pattern in any directory, you
 317.153 -should not be using the ``\texttt{*}'' match-any token, as this will
 317.154 -only match within one directory.  Instead, use the ``\texttt{**}''
 317.155 -token.  This small example illustrates the difference between the two.
 317.156 -\interaction{filenames.glob.star-starstar}
 317.157 -
 317.158 -\subsection{Regular expression matching with \texttt{re} patterns}
 317.159 -
 317.160 -Mercurial accepts the same regular expression syntax as the Python
 317.161 -programming language (it uses Python's regexp engine internally).
 317.162 -This is based on the Perl language's regexp syntax, which is the most
 317.163 -popular dialect in use (it's also used in Java, for example).
 317.164 -
 317.165 -I won't discuss Mercurial's regexp dialect in any detail here, as
 317.166 -regexps are not often used.  Perl-style regexps are in any case
 317.167 -already exhaustively documented on a multitude of web sites, and in
 317.168 -many books.  Instead, I will focus here on a few things you should
 317.169 -know if you find yourself needing to use regexps with Mercurial.
 317.170 -
 317.171 -A regexp is matched against an entire file name, relative to the root
 317.172 -of the repository.  In other words, even if you're already in
 317.173 -subbdirectory \dirname{foo}, if you want to match files under this
 317.174 -directory, your pattern must start with ``\texttt{foo/}''.
 317.175 -
 317.176 -One thing to note, if you're familiar with Perl-style regexps, is that
 317.177 -Mercurial's are \emph{rooted}.  That is, a regexp starts matching
 317.178 -against the beginning of a string; it doesn't look for a match
 317.179 -anywhere within the string.  To match anywhere in a string, start
 317.180 -your pattern with ``\texttt{.*}''.
 317.181 -
 317.182 -\section{Filtering files}
 317.183 -
 317.184 -Not only does Mercurial give you a variety of ways to specify files;
 317.185 -it lets you further winnow those files using \emph{filters}.  Commands
 317.186 -that work with file names accept two filtering options.
 317.187 -\begin{itemize}
 317.188 -\item \hggopt{-I}, or \hggopt{--include}, lets you specify a pattern
 317.189 -  that file names must match in order to be processed.
 317.190 -\item \hggopt{-X}, or \hggopt{--exclude}, gives you a way to
 317.191 -  \emph{avoid} processing files, if they match this pattern.
 317.192 -\end{itemize}
 317.193 -You can provide multiple \hggopt{-I} and \hggopt{-X} options on the
 317.194 -command line, and intermix them as you please.  Mercurial interprets
 317.195 -the patterns you provide using glob syntax by default (but you can use
 317.196 -regexps if you need to).
 317.197 -
 317.198 -You can read a \hggopt{-I} filter as ``process only the files that
 317.199 -match this filter''.
 317.200 -\interaction{filenames.filter.include}
 317.201 -The \hggopt{-X} filter is best read as ``process only the files that
 317.202 -don't match this pattern''.
 317.203 -\interaction{filenames.filter.exclude}
 317.204 -
 317.205 -\section{Ignoring unwanted files and directories}
 317.206 -
 317.207 -XXX.
 317.208 -
 317.209 -\section{Case sensitivity}
 317.210 -\label{sec:names:case}
 317.211 -
 317.212 -If you're working in a mixed development environment that contains
 317.213 -both Linux (or other Unix) systems and Macs or Windows systems, you
 317.214 -should keep in the back of your mind the knowledge that they treat the
 317.215 -case (``N'' versus ``n'') of file names in incompatible ways.  This is
 317.216 -not very likely to affect you, and it's easy to deal with if it does,
 317.217 -but it could surprise you if you don't know about it.
 317.218 -
 317.219 -Operating systems and filesystems differ in the way they handle the
 317.220 -\emph{case} of characters in file and directory names.  There are
 317.221 -three common ways to handle case in names.
 317.222 -\begin{itemize}
 317.223 -\item Completely case insensitive.  Uppercase and lowercase versions
 317.224 -  of a letter are treated as identical, both when creating a file and
 317.225 -  during subsequent accesses.  This is common on older DOS-based
 317.226 -  systems.
 317.227 -\item Case preserving, but insensitive.  When a file or directory is
 317.228 -  created, the case of its name is stored, and can be retrieved and
 317.229 -  displayed by the operating system.  When an existing file is being
 317.230 -  looked up, its case is ignored.  This is the standard arrangement on
 317.231 -  Windows and MacOS.  The names \filename{foo} and \filename{FoO}
 317.232 -  identify the same file.  This treatment of uppercase and lowercase
 317.233 -  letters as interchangeable is also referred to as \emph{case
 317.234 -    folding}.
 317.235 -\item Case sensitive.  The case of a name is significant at all times.
 317.236 -  The names \filename{foo} and {FoO} identify different files.  This
 317.237 -  is the way Linux and Unix systems normally work.
 317.238 -\end{itemize}
 317.239 -
 317.240 -On Unix-like systems, it is possible to have any or all of the above
 317.241 -ways of handling case in action at once.  For example, if you use a
 317.242 -USB thumb drive formatted with a FAT32 filesystem on a Linux system,
 317.243 -Linux will handle names on that filesystem in a case preserving, but
 317.244 -insensitive, way.
 317.245 -
 317.246 -\subsection{Safe, portable repository storage}
 317.247 -
 317.248 -Mercurial's repository storage mechanism is \emph{case safe}.  It
 317.249 -translates file names so that they can be safely stored on both case
 317.250 -sensitive and case insensitive filesystems.  This means that you can
 317.251 -use normal file copying tools to transfer a Mercurial repository onto,
 317.252 -for example, a USB thumb drive, and safely move that drive and
 317.253 -repository back and forth between a Mac, a PC running Windows, and a
 317.254 -Linux box.
 317.255 -
 317.256 -\subsection{Detecting case conflicts}
 317.257 -
 317.258 -When operating in the working directory, Mercurial honours the naming
 317.259 -policy of the filesystem where the working directory is located.  If
 317.260 -the filesystem is case preserving, but insensitive, Mercurial will
 317.261 -treat names that differ only in case as the same.
 317.262 -
 317.263 -An important aspect of this approach is that it is possible to commit
 317.264 -a changeset on a case sensitive (typically Linux or Unix) filesystem
 317.265 -that will cause trouble for users on case insensitive (usually Windows
 317.266 -and MacOS) users.  If a Linux user commits changes to two files, one
 317.267 -named \filename{myfile.c} and the other named \filename{MyFile.C},
 317.268 -they will be stored correctly in the repository.  And in the working
 317.269 -directories of other Linux users, they will be correctly represented
 317.270 -as separate files.
 317.271 -
 317.272 -If a Windows or Mac user pulls this change, they will not initially
 317.273 -have a problem, because Mercurial's repository storage mechanism is
 317.274 -case safe.  However, once they try to \hgcmd{update} the working
 317.275 -directory to that changeset, or \hgcmd{merge} with that changeset,
 317.276 -Mercurial will spot the conflict between the two file names that the
 317.277 -filesystem would treat as the same, and forbid the update or merge
 317.278 -from occurring.
 317.279 -
 317.280 -\subsection{Fixing a case conflict}
 317.281 -
 317.282 -If you are using Windows or a Mac in a mixed environment where some of
 317.283 -your collaborators are using Linux or Unix, and Mercurial reports a
 317.284 -case folding conflict when you try to \hgcmd{update} or \hgcmd{merge},
 317.285 -the procedure to fix the problem is simple.
 317.286 -
 317.287 -Just find a nearby Linux or Unix box, clone the problem repository
 317.288 -onto it, and use Mercurial's \hgcmd{rename} command to change the
 317.289 -names of any offending files or directories so that they will no
 317.290 -longer cause case folding conflicts.  Commit this change, \hgcmd{pull}
 317.291 -or \hgcmd{push} it across to your Windows or MacOS system, and
 317.292 -\hgcmd{update} to the revision with the non-conflicting names.
 317.293 -
 317.294 -The changeset with case-conflicting names will remain in your
 317.295 -project's history, and you still won't be able to \hgcmd{update} your
 317.296 -working directory to that changeset on a Windows or MacOS system, but
 317.297 -you can continue development unimpeded.
 317.298 -
 317.299 -\begin{note}
 317.300 -  Prior to version~0.9.3, Mercurial did not use a case safe repository
 317.301 -  storage mechanism, and did not detect case folding conflicts.  If
 317.302 -  you are using an older version of Mercurial on Windows or MacOS, I
 317.303 -  strongly recommend that you upgrade.
 317.304 -\end{note}
 317.305 -
 317.306 -%%% Local Variables: 
 317.307 -%%% mode: latex
 317.308 -%%% TeX-master: "00book"
 317.309 -%%% End: 
   318.1 --- a/en/fixhtml.py	Thu Mar 26 08:57:10 2009 +0100
   318.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   318.3 @@ -1,50 +0,0 @@
   318.4 -#!/usr/bin/env python
   318.5 -#
   318.6 -# This script attempts to work around some of the more bizarre and
   318.7 -# quirky behaviours of htlatex.
   318.8 -#
   318.9 -# - We've persuaded htlatex to produce UTF-8, which unfortunately
  318.10 -#   causes it to use huge character sequences to represent even the
  318.11 -#   safe 7-bit ASCII subset of UTF-8.  We fix that up.
  318.12 -#
  318.13 -# - BUT we have to treat angle brackets (for example, redirections in
  318.14 -#   shell script snippets) specially, otherwise they'll break the
  318.15 -#   generated HTML.  (Reported by Johannes Hoff.)
  318.16 -#
  318.17 -# - For some reason, htlatex gives a unique ID to each fancyvrb
  318.18 -#   environment, which makes writing a sane, small CSS stylesheet
  318.19 -#   impossible.  We squish all those IDs down to nothing.
  318.20 -
  318.21 -import os
  318.22 -import sys
  318.23 -import re
  318.24 -
  318.25 -angle_re = re.compile(r'(&#x003[CE];)')
  318.26 -unicode_re = re.compile(r'&#x00([0-7][0-9A-F]);')
  318.27 -fancyvrb_re = re.compile(r'id="fancyvrb\d+"', re.I)
  318.28 -ligature_re = re.compile(r'&#xFB0([0-4]);')
  318.29 -
  318.30 -tmpsuffix = '.tmp.' + str(os.getpid())
  318.31 -
  318.32 -def hide_angle(m):
  318.33 -    return m.group(1).lower()
  318.34 -
  318.35 -def fix_ascii(m):
  318.36 -    return chr(int(m.group(1), 16))
  318.37 -
  318.38 -ligatures = ['ff', 'fi', 'fl', 'ffi', 'ffl']
  318.39 -
  318.40 -def expand_ligature(m):
  318.41 -    return ligatures[int(m.group(1))]
  318.42 -
  318.43 -for name in sys.argv[1:]:
  318.44 -    tmpname = name + tmpsuffix
  318.45 -    ofp = file(tmpname, 'w')
  318.46 -    for line in file(name):
  318.47 -        line = angle_re.sub(hide_angle, line)
  318.48 -        line = unicode_re.sub(fix_ascii, line)
  318.49 -        line = ligature_re.sub(expand_ligature, line)
  318.50 -        line = fancyvrb_re.sub('id="fancyvrb"', line)
  318.51 -        ofp.write(line)
  318.52 -    ofp.close()
  318.53 -    os.rename(tmpname, name)
   319.1 --- a/en/hgbook.css	Thu Mar 26 08:57:10 2009 +0100
   319.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   319.3 @@ -1,441 +0,0 @@
   319.4 -body {
   319.5 -  font: 12px/1.5 Verdana, sans-serif;
   319.6 -  padding-top: 50px;
   319.7 -  padding-left: 80px;
   319.8 -  padding-right: 80px;
   319.9 -  padding-bottom: 90px;
  319.10 -}
  319.11 -.ptmr7t- {
  319.12 -  font-family: monospace;
  319.13 -}
  319.14 -.ptmr7t-x-x-172 {
  319.15 -  font-size: 172%;
  319.16 -  font-family: monospace;
  319.17 -}
  319.18 -.ptmr7t-x-x-120 {
  319.19 -  font-size: 120%;
  319.20 -}
  319.21 -.zpzccmry-x-x-120 {
  319.22 -  font-size: 120%;
  319.23 -  font-weight: bold;
  319.24 -  font-style: italic;
  319.25 -}
  319.26 -.zpzccmry-x-x-120 {
  319.27 -  font-weight: bold;
  319.28 -  font-style: italic;
  319.29 -}
  319.30 -.pcrr7tn- {
  319.31 -  font-family: monospace;
  319.32 -}
  319.33 -.ptmri7t- {
  319.34 -  font-style: italic;
  319.35 -}
  319.36 -.ptmr7t-x-x-50 {
  319.37 -  font-size: 50%;
  319.38 -  font-family: monospace;
  319.39 -}
  319.40 -.ptmb7t- {
  319.41 -  font-weight: bold;
  319.42 -}
  319.43 -.zptmcmr- {
  319.44 -  font-style: italic;
  319.45 -}
  319.46 -.zptmcmrm- {
  319.47 -  font-style: italic;
  319.48 -}
  319.49 -.zpzccmry- {
  319.50 -  font-weight: bold;
  319.51 -  font-style: italic;
  319.52 -}
  319.53 -.pcrb7t- {
  319.54 -  font-family: monospace;
  319.55 -  font-weight: bold;
  319.56 -}
  319.57 -.pcrro7t- {
  319.58 -  font-family: monospace;
  319.59 -  font-style: oblique;
  319.60 -}
  319.61 -p.noindent {
  319.62 -  text-indent: 0em;
  319.63 -  margin: 0em;
  319.64 -}
  319.65 -p.nopar {
  319.66 -  text-indent: 0em;
  319.67 -}
  319.68 -p.indent {
  319.69 -  text-indent: 1.5em;
  319.70 -  margin: 0em;
  319.71 -}
  319.72 -a img {
  319.73 -  border-top: 0;
  319.74 -  border-left: 0;
  319.75 -  border-right: 0;
  319.76 -}
  319.77 -center {
  319.78 -  margin-top: 1em;
  319.79 -  margin-bottom: 1em;
  319.80 -}
  319.81 -td center {
  319.82 -  margin-top: 0em;
  319.83 -  margin-bottom: 0em;
  319.84 -}
  319.85 -.Canvas {
  319.86 -  position: relative;
  319.87 -}
  319.88 -img.math {
  319.89 -  vertical-align: middle;
  319.90 -}
  319.91 -li p.indent {
  319.92 -  text-indent: 0em;
  319.93 -}
  319.94 -.enumerate1 {
  319.95 -  list-style-type: decimal;
  319.96 -}
  319.97 -.enumerate2 {
  319.98 -  list-style-type: lower-alpha;
  319.99 -}
 319.100 -.enumerate3 {
 319.101 -  list-style-type: lower-roman;
 319.102 -}
 319.103 -.enumerate4 {
 319.104 -  list-style-type: upper-alpha;
 319.105 -}
 319.106 -div.newtheorem {
 319.107 -  margin-bottom: 2em;
 319.108 -  margin-top: 2em;
 319.109 -}
 319.110 -.obeylines-h,.obeylines-v {
 319.111 -  white-space: nowrap;
 319.112 -}
 319.113 -div.obeylines-v p {
 319.114 -  margin-top: 0;
 319.115 -  margin-bottom: 0;
 319.116 -}
 319.117 -.overline {
 319.118 -  text-decoration: overline;
 319.119 -}
 319.120 -.overline img {
 319.121 -  border-top: 1px solid black;
 319.122 -}
 319.123 -td.displaylines {
 319.124 -  text-align: center;
 319.125 -  white-space: nowrap;
 319.126 -}
 319.127 -.centerline {
 319.128 -  text-align: center;
 319.129 -}
 319.130 -.rightline {
 319.131 -  text-align: right;
 319.132 -}
 319.133 -div.verbatim {
 319.134 -  font-family: monospace;
 319.135 -  white-space: nowrap;
 319.136 -}
 319.137 -table.verbatim {
 319.138 -  width: 100%;
 319.139 -}
 319.140 -.fbox {
 319.141 -  background: url(note.png) no-repeat #cec;
 319.142 -  padding-left: 65px;
 319.143 -  padding-top: 1em;
 319.144 -  padding-bottom: 1em;
 319.145 -  padding-right: 1em;
 319.146 -  text-indent: 0pt;
 319.147 -  border: dotted black 1px;
 319.148 -}
 319.149 -div.center div.fbox {
 319.150 -  text-align: center;
 319.151 -  clear: both;
 319.152 -  padding-left: 3.0pt;
 319.153 -  padding-right: 3.0pt;
 319.154 -  text-indent: 0pt;
 319.155 -  border: solid black 0.4pt;
 319.156 -}
 319.157 -table.minipage {
 319.158 -  width: 100%;
 319.159 -}
 319.160 -div.center, div.center div.center {
 319.161 -  text-align: center;
 319.162 -  margin-left: 1em;
 319.163 -  margin-right: 1em;
 319.164 -}
 319.165 -div.center div {
 319.166 -  text-align: left;
 319.167 -}
 319.168 -div.flushright, div.flushright div.flushright {
 319.169 -  text-align: right;
 319.170 -}
 319.171 -div.flushright div {
 319.172 -  text-align: left;
 319.173 -}
 319.174 -div.flushleft {
 319.175 -  text-align: left;
 319.176 -}
 319.177 -.underline {
 319.178 -  text-decoration: underline;
 319.179 -}
 319.180 -.underline img {
 319.181 -  border-bottom: 1px solid black;
 319.182 -  margin-bottom: 1pt;
 319.183 -}
 319.184 -.framebox-c, .framebox-l, .framebox-r {
 319.185 -  padding-left: 3.0pt;
 319.186 -  padding-right: 3.0pt;
 319.187 -  text-indent: 0pt;
 319.188 -  border: solid black 0.4pt;
 319.189 -}
 319.190 -.framebox-c {
 319.191 -  text-align: center;
 319.192 -}
 319.193 -.framebox-l {
 319.194 -  text-align: left;
 319.195 -}
 319.196 -.framebox-r {
 319.197 -  text-align: right;
 319.198 -}
 319.199 -span.thank-mark {
 319.200 -  vertical-align: super
 319.201 -}
 319.202 -span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript {
 319.203 -  font-size: 80%;
 319.204 -}
 319.205 -div.tabular, div.center div.tabular {
 319.206 -  text-align: center;
 319.207 -  margin-top: 0.5em;
 319.208 -  margin-bottom: 0.5em;
 319.209 -}
 319.210 -table.tabular td p {
 319.211 -  margin-top: 0em;
 319.212 -}
 319.213 -table.tabular {
 319.214 -  margin-left: auto;
 319.215 -  margin-right: auto;
 319.216 -}
 319.217 -div.td00 {
 319.218 -  margin-left: 0pt;
 319.219 -  margin-right: 0pt;
 319.220 -}
 319.221 -div.td01 {
 319.222 -  margin-left: 0pt;
 319.223 -  margin-right: 5pt;
 319.224 -}
 319.225 -div.td10 {
 319.226 -  margin-left: 5pt;
 319.227 -  margin-right: 0pt;
 319.228 -}
 319.229 -div.td11 {
 319.230 -  margin-left: 5pt;
 319.231 -  margin-right: 5pt;
 319.232 -}
 319.233 -table[rules] {
 319.234 -  border-left: solid black 0.4pt;
 319.235 -  border-right: solid black 0.4pt;
 319.236 -}
 319.237 -td.td00 {
 319.238 -  padding-left: 0pt;
 319.239 -  padding-right: 0pt;
 319.240 -}
 319.241 -td.td01 {
 319.242 -  padding-left: 0pt;
 319.243 -  padding-right: 5pt;
 319.244 -}
 319.245 -td.td10 {
 319.246 -  padding-left: 5pt;
 319.247 -  padding-right: 0pt;
 319.248 -}
 319.249 -td.td11 {
 319.250 -  padding-left: 5pt;
 319.251 -  padding-right: 5pt;
 319.252 -}
 319.253 -table[rules] {
 319.254 -  border-left: solid black 0.4pt;
 319.255 -  border-right: solid black 0.4pt;
 319.256 -}
 319.257 -.hline hr, .cline hr {
 319.258 -  height : 1px;
 319.259 -  margin: 0px;
 319.260 -}
 319.261 -.tabbing-right {
 319.262 -  text-align: right;
 319.263 -}
 319.264 -span.TEX {
 319.265 -  letter-spacing: -0.125em;
 319.266 -}
 319.267 -span.TEX span.E {
 319.268 -  position: relative;top: 0.5ex;left: -0.0417em;
 319.269 -}
 319.270 -a span.TEX span.E {
 319.271 -  text-decoration: none;
 319.272 -}
 319.273 -span.LATEX span.A {
 319.274 -  position: relative;
 319.275 -  top: -0.5ex;
 319.276 -  left: -0.4em;
 319.277 -  font-size: 85%;
 319.278 -}
 319.279 -span.LATEX span.TEX {
 319.280 -  position: relative;
 319.281 -  left: -0.4em;
 319.282 -}
 319.283 -div.float img, div.float .caption {
 319.284 -  text-align: center;
 319.285 -}
 319.286 -div.figure img, div.figure .caption {
 319.287 -  text-align: center;
 319.288 -}
 319.289 -.marginpar {
 319.290 -  width: 20%;
 319.291 -  float: right;
 319.292 -  text-align: left;
 319.293 -  margin-left: auto;
 319.294 -  margin-top: 0.5em;
 319.295 -  font-size: 85%;
 319.296 -  text-decoration: underline;
 319.297 -}
 319.298 -.marginpar p {
 319.299 -  margin-top: 0.4em;
 319.300 -  margin-bottom: 0.4em;
 319.301 -}
 319.302 -table.equation {
 319.303 -  width: 100%;
 319.304 -}
 319.305 -.equation td {
 319.306 -  text-align: center;
 319.307 -}
 319.308 -td.equation {
 319.309 -  margin-top: 1em;
 319.310 -  margin-bottom: 1em;
 319.311 -} 
 319.312 -td.equation-label {
 319.313 -  width: 5%;
 319.314 -  text-align: center;
 319.315 -}
 319.316 -td.eqnarray4 {
 319.317 -  width: 5%;
 319.318 -  white-space: normal;
 319.319 -}
 319.320 -td.eqnarray2 {
 319.321 -  width: 5%;
 319.322 -}
 319.323 -table.eqnarray-star, table.eqnarray {
 319.324 -  width: 100%;
 319.325 -}
 319.326 -div.eqnarray {
 319.327 -  text-align: center;
 319.328 -}
 319.329 -div.array {
 319.330 -  text-align: center;
 319.331 -}
 319.332 -div.pmatrix {
 319.333 -  text-align: center;
 319.334 -}
 319.335 -table.pmatrix {
 319.336 -  width: 100%;
 319.337 -}
 319.338 -span.pmatrix img {
 319.339 -  vertical-align: middle;
 319.340 -}
 319.341 -div.pmatrix {
 319.342 -  text-align: center;
 319.343 -}
 319.344 -table.pmatrix {
 319.345 -  width: 100%;
 319.346 -}
 319.347 -img.cdots {
 319.348 -  vertical-align: middle;
 319.349 -}
 319.350 -.partToc a, .partToc, .likepartToc a, .likepartToc {
 319.351 -  line-height: 200%;
 319.352 -  font-weight: bold;
 319.353 -  font-size: 110%;
 319.354 -}
 319.355 -.chapterToc a, .chapterToc, .likechapterToc a, .likechapterToc, .appendixToc a, .appendixToc {
 319.356 -  line-height: 200%;
 319.357 -  font-weight: bold;
 319.358 -}
 319.359 -.caption td.id {
 319.360 -  font-weight: bold;
 319.361 -  white-space: nowrap;
 319.362 -}
 319.363 -table.caption {
 319.364 -  text-align: center;
 319.365 -}
 319.366 -h1.partHead {
 319.367 -  text-align: center;
 319.368 -}
 319.369 -p.bibitem {
 319.370 -  text-indent: -2em;
 319.371 -  margin-left: 2em;
 319.372 -  margin-top: 0.6em;
 319.373 -  margin-bottom: 0.6em;
 319.374 -}
 319.375 -p.bibitem-p {
 319.376 -  text-indent: 0em;
 319.377 -  margin-left: 2em;
 319.378 -  margin-top: 0.6em;
 319.379 -  margin-bottom: 0.6em;
 319.380 -}
 319.381 -.paragraphHead, .likeparagraphHead {
 319.382 -  margin-top: 2em;
 319.383 -  font-weight: bold;
 319.384 -}
 319.385 -.subparagraphHead, .likesubparagraphHead {
 319.386 -  font-weight: bold;
 319.387 -}
 319.388 -.quote {
 319.389 -  margin-bottom: 0.25em;
 319.390 -  margin-top: 0.25em;
 319.391 -  margin-left: 1em;
 319.392 -  margin-right: 1em;
 319.393 -  text-align: justify;
 319.394 -}
 319.395 -.verse {
 319.396 -  white-space: nowrap;
 319.397 -  margin-left: 2em}
 319.398 -div.maketitle {
 319.399 -  text-align: center;
 319.400 -}
 319.401 -h2.titleHead {
 319.402 -  text-align: center;
 319.403 -}
 319.404 -div.maketitle {
 319.405 -  margin-bottom: 2em;
 319.406 -}
 319.407 -div.author, div.date {
 319.408 -  text-align: center;
 319.409 -}
 319.410 -div.thanks {
 319.411 -  text-align: left;
 319.412 -  margin-left: 10%;
 319.413 -  font-size: 85%;
 319.414 -  font-style: italic;
 319.415 -}
 319.416 -div.author {
 319.417 -  white-space: nowrap;
 319.418 -}
 319.419 -.quotation {
 319.420 -  margin-bottom: 0.25em;
 319.421 -  margin-top: 0.25em;
 319.422 -  margin-left: 1em;
 319.423 -}
 319.424 -h1.partHead {
 319.425 -  text-align: center;
 319.426 -}
 319.427 -img.graphics {
 319.428 -  margin-left: 10%;
 319.429 -}
 319.430 -.figure {
 319.431 -  width: 100%;
 319.432 -}
 319.433 -P.fancyvrb {
 319.434 -  white-space: nowrap;
 319.435 -}
 319.436 -hr {
 319.437 -  border: 0;
 319.438 -  height: 1px;
 319.439 -}
 319.440 -div#fancyvrb {
 319.441 -  white-space: nowrap;
 319.442 -  background: #eee;
 319.443 -  padding: 1em;
 319.444 -}
   320.1 --- a/en/hgext.tex	Thu Mar 26 08:57:10 2009 +0100
   320.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   320.3 @@ -1,429 +0,0 @@
   320.4 -\chapter{Adding functionality with extensions}
   320.5 -\label{chap:hgext}
   320.6 -
   320.7 -While the core of Mercurial is quite complete from a functionality
   320.8 -standpoint, it's deliberately shorn of fancy features.  This approach
   320.9 -of preserving simplicity keeps the software easy to deal with for both
  320.10 -maintainers and users.
  320.11 -
  320.12 -However, Mercurial doesn't box you in with an inflexible command set:
  320.13 -you can add features to it as \emph{extensions} (sometimes known as
  320.14 -\emph{plugins}).  We've already discussed a few of these extensions in
  320.15 -earlier chapters.
  320.16 -\begin{itemize}
  320.17 -\item Section~\ref{sec:tour-merge:fetch} covers the \hgext{fetch}
  320.18 -  extension; this combines pulling new changes and merging them with
  320.19 -  local changes into a single command, \hgxcmd{fetch}{fetch}.
  320.20 -\item In chapter~\ref{chap:hook}, we covered several extensions that
  320.21 -  are useful for hook-related functionality: \hgext{acl} adds access
  320.22 -  control lists; \hgext{bugzilla} adds integration with the Bugzilla
  320.23 -  bug tracking system; and \hgext{notify} sends notification emails on
  320.24 -  new changes.
  320.25 -\item The Mercurial Queues patch management extension is so invaluable
  320.26 -  that it merits two chapters and an appendix all to itself.
  320.27 -  Chapter~\ref{chap:mq} covers the basics;
  320.28 -  chapter~\ref{chap:mq-collab} discusses advanced topics; and
  320.29 -  appendix~\ref{chap:mqref} goes into detail on each command.
  320.30 -\end{itemize}
  320.31 -
  320.32 -In this chapter, we'll cover some of the other extensions that are
  320.33 -available for Mercurial, and briefly touch on some of the machinery
  320.34 -you'll need to know about if you want to write an extension of your
  320.35 -own.
  320.36 -\begin{itemize}
  320.37 -\item In section~\ref{sec:hgext:inotify}, we'll discuss the
  320.38 -  possibility of \emph{huge} performance improvements using the
  320.39 -  \hgext{inotify} extension.
  320.40 -\end{itemize}
  320.41 -
  320.42 -\section{Improve performance with the \hgext{inotify} extension}
  320.43 -\label{sec:hgext:inotify}
  320.44 -
  320.45 -Are you interested in having some of the most common Mercurial
  320.46 -operations run as much as a hundred times faster?  Read on!
  320.47 -
  320.48 -Mercurial has great performance under normal circumstances.  For
  320.49 -example, when you run the \hgcmd{status} command, Mercurial has to
  320.50 -scan almost every directory and file in your repository so that it can
  320.51 -display file status.  Many other Mercurial commands need to do the
  320.52 -same work behind the scenes; for example, the \hgcmd{diff} command
  320.53 -uses the status machinery to avoid doing an expensive comparison
  320.54 -operation on files that obviously haven't changed.
  320.55 -
  320.56 -Because obtaining file status is crucial to good performance, the
  320.57 -authors of Mercurial have optimised this code to within an inch of its
  320.58 -life.  However, there's no avoiding the fact that when you run
  320.59 -\hgcmd{status}, Mercurial is going to have to perform at least one
  320.60 -expensive system call for each managed file to determine whether it's
  320.61 -changed since the last time Mercurial checked.  For a sufficiently
  320.62 -large repository, this can take a long time.
  320.63 -
  320.64 -To put a number on the magnitude of this effect, I created a
  320.65 -repository containing 150,000 managed files.  I timed \hgcmd{status}
  320.66 -as taking ten seconds to run, even when \emph{none} of those files had
  320.67 -been modified.
  320.68 -
  320.69 -Many modern operating systems contain a file notification facility.
  320.70 -If a program signs up to an appropriate service, the operating system
  320.71 -will notify it every time a file of interest is created, modified, or
  320.72 -deleted.  On Linux systems, the kernel component that does this is
  320.73 -called \texttt{inotify}.
  320.74 -
  320.75 -Mercurial's \hgext{inotify} extension talks to the kernel's
  320.76 -\texttt{inotify} component to optimise \hgcmd{status} commands.  The
  320.77 -extension has two components.  A daemon sits in the background and
  320.78 -receives notifications from the \texttt{inotify} subsystem.  It also
  320.79 -listens for connections from a regular Mercurial command.  The
  320.80 -extension modifies Mercurial's behaviour so that instead of scanning
  320.81 -the filesystem, it queries the daemon.  Since the daemon has perfect
  320.82 -information about the state of the repository, it can respond with a
  320.83 -result instantaneously, avoiding the need to scan every directory and
  320.84 -file in the repository.
  320.85 -
  320.86 -Recall the ten seconds that I measured plain Mercurial as taking to
  320.87 -run \hgcmd{status} on a 150,000 file repository.  With the
  320.88 -\hgext{inotify} extension enabled, the time dropped to 0.1~seconds, a
  320.89 -factor of \emph{one hundred} faster.
  320.90 -
  320.91 -Before we continue, please pay attention to some caveats.
  320.92 -\begin{itemize}
  320.93 -\item The \hgext{inotify} extension is Linux-specific.  Because it
  320.94 -  interfaces directly to the Linux kernel's \texttt{inotify}
  320.95 -  subsystem, it does not work on other operating systems.
  320.96 -\item It should work on any Linux distribution that was released after
  320.97 -  early~2005.  Older distributions are likely to have a kernel that
  320.98 -  lacks \texttt{inotify}, or a version of \texttt{glibc} that does not
  320.99 -  have the necessary interfacing support.
 320.100 -\item Not all filesystems are suitable for use with the
 320.101 -  \hgext{inotify} extension.  Network filesystems such as NFS are a
 320.102 -  non-starter, for example, particularly if you're running Mercurial
 320.103 -  on several systems, all mounting the same network filesystem.  The
 320.104 -  kernel's \texttt{inotify} system has no way of knowing about changes
 320.105 -  made on another system.  Most local filesystems (e.g.~ext3, XFS,
 320.106 -  ReiserFS) should work fine.
 320.107 -\end{itemize}
 320.108 -
 320.109 -The \hgext{inotify} extension is not yet shipped with Mercurial as of
 320.110 -May~2007, so it's a little more involved to set up than other
 320.111 -extensions.  But the performance improvement is worth it!
 320.112 -
 320.113 -The extension currently comes in two parts: a set of patches to the
 320.114 -Mercurial source code, and a library of Python bindings to the
 320.115 -\texttt{inotify} subsystem.
 320.116 -\begin{note}
 320.117 -  There are \emph{two} Python \texttt{inotify} binding libraries.  One
 320.118 -  of them is called \texttt{pyinotify}, and is packaged by some Linux
 320.119 -  distributions as \texttt{python-inotify}.  This is \emph{not} the
 320.120 -  one you'll need, as it is too buggy and inefficient to be practical.
 320.121 -\end{note}
 320.122 -To get going, it's best to already have a functioning copy of
 320.123 -Mercurial installed.
 320.124 -\begin{note}
 320.125 -  If you follow the instructions below, you'll be \emph{replacing} and
 320.126 -  overwriting any existing installation of Mercurial that you might
 320.127 -  already have, using the latest ``bleeding edge'' Mercurial code.
 320.128 -  Don't say you weren't warned!
 320.129 -\end{note}
 320.130 -\begin{enumerate}
 320.131 -\item Clone the Python \texttt{inotify} binding repository.  Build and
 320.132 -  install it.
 320.133 -  \begin{codesample4}
 320.134 -    hg clone http://hg.kublai.com/python/inotify
 320.135 -    cd inotify
 320.136 -    python setup.py build --force
 320.137 -    sudo python setup.py install --skip-build
 320.138 -  \end{codesample4}
 320.139 -\item Clone the \dirname{crew} Mercurial repository.  Clone the
 320.140 -  \hgext{inotify} patch repository so that Mercurial Queues will be
 320.141 -  able to apply patches to your cope of the \dirname{crew} repository.
 320.142 -  \begin{codesample4}
 320.143 -    hg clone http://hg.intevation.org/mercurial/crew
 320.144 -    hg clone crew inotify
 320.145 -    hg clone http://hg.kublai.com/mercurial/patches/inotify inotify/.hg/patches
 320.146 -  \end{codesample4}
 320.147 -\item Make sure that you have the Mercurial Queues extension,
 320.148 -  \hgext{mq}, enabled.  If you've never used MQ, read
 320.149 -  section~\ref{sec:mq:start} to get started quickly.
 320.150 -\item Go into the \dirname{inotify} repo, and apply all of the
 320.151 -  \hgext{inotify} patches using the \hgxopt{mq}{qpush}{-a} option to
 320.152 -  the \hgxcmd{mq}{qpush} command.
 320.153 -  \begin{codesample4}
 320.154 -    cd inotify
 320.155 -    hg qpush -a
 320.156 -  \end{codesample4}
 320.157 -  If you get an error message from \hgxcmd{mq}{qpush}, you should not
 320.158 -  continue.  Instead, ask for help.
 320.159 -\item Build and install the patched version of Mercurial.
 320.160 -  \begin{codesample4}
 320.161 -    python setup.py build --force
 320.162 -    sudo python setup.py install --skip-build
 320.163 -  \end{codesample4}
 320.164 -\end{enumerate}
 320.165 -Once you've build a suitably patched version of Mercurial, all you
 320.166 -need to do to enable the \hgext{inotify} extension is add an entry to
 320.167 -your \hgrc.
 320.168 -\begin{codesample2}
 320.169 -  [extensions]
 320.170 -  inotify =
 320.171 -\end{codesample2}
 320.172 -When the \hgext{inotify} extension is enabled, Mercurial will
 320.173 -automatically and transparently start the status daemon the first time
 320.174 -you run a command that needs status in a repository.  It runs one
 320.175 -status daemon per repository.
 320.176 -
 320.177 -The status daemon is started silently, and runs in the background.  If
 320.178 -you look at a list of running processes after you've enabled the
 320.179 -\hgext{inotify} extension and run a few commands in different
 320.180 -repositories, you'll thus see a few \texttt{hg} processes sitting
 320.181 -around, waiting for updates from the kernel and queries from
 320.182 -Mercurial.
 320.183 -
 320.184 -The first time you run a Mercurial command in a repository when you
 320.185 -have the \hgext{inotify} extension enabled, it will run with about the
 320.186 -same performance as a normal Mercurial command.  This is because the
 320.187 -status daemon needs to perform a normal status scan so that it has a
 320.188 -baseline against which to apply later updates from the kernel.
 320.189 -However, \emph{every} subsequent command that does any kind of status
 320.190 -check should be noticeably faster on repositories of even fairly
 320.191 -modest size.  Better yet, the bigger your repository is, the greater a
 320.192 -performance advantage you'll see.  The \hgext{inotify} daemon makes
 320.193 -status operations almost instantaneous on repositories of all sizes!
 320.194 -
 320.195 -If you like, you can manually start a status daemon using the
 320.196 -\hgxcmd{inotify}{inserve} command.  This gives you slightly finer
 320.197 -control over how the daemon ought to run.  This command will of course
 320.198 -only be available when the \hgext{inotify} extension is enabled.
 320.199 -
 320.200 -When you're using the \hgext{inotify} extension, you should notice
 320.201 -\emph{no difference at all} in Mercurial's behaviour, with the sole
 320.202 -exception of status-related commands running a whole lot faster than
 320.203 -they used to.  You should specifically expect that commands will not
 320.204 -print different output; neither should they give different results.
 320.205 -If either of these situations occurs, please report a bug.
 320.206 -
 320.207 -\section{Flexible diff support with the \hgext{extdiff} extension}
 320.208 -\label{sec:hgext:extdiff}
 320.209 -
 320.210 -Mercurial's built-in \hgcmd{diff} command outputs plaintext unified
 320.211 -diffs.
 320.212 -\interaction{extdiff.diff}
 320.213 -If you would like to use an external tool to display modifications,
 320.214 -you'll want to use the \hgext{extdiff} extension.  This will let you
 320.215 -use, for example, a graphical diff tool.
 320.216 -
 320.217 -The \hgext{extdiff} extension is bundled with Mercurial, so it's easy
 320.218 -to set up.  In the \rcsection{extensions} section of your \hgrc,
 320.219 -simply add a one-line entry to enable the extension.
 320.220 -\begin{codesample2}
 320.221 -  [extensions]
 320.222 -  extdiff =
 320.223 -\end{codesample2}
 320.224 -This introduces a command named \hgxcmd{extdiff}{extdiff}, which by
 320.225 -default uses your system's \command{diff} command to generate a
 320.226 -unified diff in the same form as the built-in \hgcmd{diff} command.
 320.227 -\interaction{extdiff.extdiff}
 320.228 -The result won't be exactly the same as with the built-in \hgcmd{diff}
 320.229 -variations, because the output of \command{diff} varies from one
 320.230 -system to another, even when passed the same options.
 320.231 -
 320.232 -As the ``\texttt{making snapshot}'' lines of output above imply, the
 320.233 -\hgxcmd{extdiff}{extdiff} command works by creating two snapshots of
 320.234 -your source tree.  The first snapshot is of the source revision; the
 320.235 -second, of the target revision or working directory.  The
 320.236 -\hgxcmd{extdiff}{extdiff} command generates these snapshots in a
 320.237 -temporary directory, passes the name of each directory to an external
 320.238 -diff viewer, then deletes the temporary directory.  For efficiency, it
 320.239 -only snapshots the directories and files that have changed between the
 320.240 -two revisions.
 320.241 -
 320.242 -Snapshot directory names have the same base name as your repository.
 320.243 -If your repository path is \dirname{/quux/bar/foo}, then \dirname{foo}
 320.244 -will be the name of each snapshot directory.  Each snapshot directory
 320.245 -name has its changeset ID appended, if appropriate.  If a snapshot is
 320.246 -of revision \texttt{a631aca1083f}, the directory will be named
 320.247 -\dirname{foo.a631aca1083f}.  A snapshot of the working directory won't
 320.248 -have a changeset ID appended, so it would just be \dirname{foo} in
 320.249 -this example.  To see what this looks like in practice, look again at
 320.250 -the \hgxcmd{extdiff}{extdiff} example above.  Notice that the diff has
 320.251 -the snapshot directory names embedded in its header.
 320.252 -
 320.253 -The \hgxcmd{extdiff}{extdiff} command accepts two important options.
 320.254 -The \hgxopt{extdiff}{extdiff}{-p} option lets you choose a program to
 320.255 -view differences with, instead of \command{diff}.  With the
 320.256 -\hgxopt{extdiff}{extdiff}{-o} option, you can change the options that
 320.257 -\hgxcmd{extdiff}{extdiff} passes to the program (by default, these
 320.258 -options are ``\texttt{-Npru}'', which only make sense if you're
 320.259 -running \command{diff}).  In other respects, the
 320.260 -\hgxcmd{extdiff}{extdiff} command acts similarly to the built-in
 320.261 -\hgcmd{diff} command: you use the same option names, syntax, and
 320.262 -arguments to specify the revisions you want, the files you want, and
 320.263 -so on.
 320.264 -
 320.265 -As an example, here's how to run the normal system \command{diff}
 320.266 -command, getting it to generate context diffs (using the
 320.267 -\cmdopt{diff}{-c} option) instead of unified diffs, and five lines of
 320.268 -context instead of the default three (passing \texttt{5} as the
 320.269 -argument to the \cmdopt{diff}{-C} option).
 320.270 -\interaction{extdiff.extdiff-ctx}
 320.271 -
 320.272 -Launching a visual diff tool is just as easy.  Here's how to launch
 320.273 -the \command{kdiff3} viewer.
 320.274 -\begin{codesample2}
 320.275 -  hg extdiff -p kdiff3 -o ''
 320.276 -\end{codesample2}
 320.277 -
 320.278 -If your diff viewing command can't deal with directories, you can
 320.279 -easily work around this with a little scripting.  For an example of
 320.280 -such scripting in action with the \hgext{mq} extension and the
 320.281 -\command{interdiff} command, see
 320.282 -section~\ref{mq-collab:tips:interdiff}.
 320.283 -
 320.284 -\subsection{Defining command aliases}
 320.285 -
 320.286 -It can be cumbersome to remember the options to both the
 320.287 -\hgxcmd{extdiff}{extdiff} command and the diff viewer you want to use,
 320.288 -so the \hgext{extdiff} extension lets you define \emph{new} commands
 320.289 -that will invoke your diff viewer with exactly the right options.
 320.290 -
 320.291 -All you need to do is edit your \hgrc, and add a section named
 320.292 -\rcsection{extdiff}.  Inside this section, you can define multiple
 320.293 -commands.  Here's how to add a \texttt{kdiff3} command.  Once you've
 320.294 -defined this, you can type ``\texttt{hg kdiff3}'' and the
 320.295 -\hgext{extdiff} extension will run \command{kdiff3} for you.
 320.296 -\begin{codesample2}
 320.297 -  [extdiff]
 320.298 -  cmd.kdiff3 =
 320.299 -\end{codesample2}
 320.300 -If you leave the right hand side of the definition empty, as above,
 320.301 -the \hgext{extdiff} extension uses the name of the command you defined
 320.302 -as the name of the external program to run.  But these names don't
 320.303 -have to be the same.  Here, we define a command named ``\texttt{hg
 320.304 -  wibble}'', which runs \command{kdiff3}.
 320.305 -\begin{codesample2}
 320.306 -  [extdiff]
 320.307 -  cmd.wibble = kdiff3
 320.308 -\end{codesample2}
 320.309 -
 320.310 -You can also specify the default options that you want to invoke your
 320.311 -diff viewing program with.  The prefix to use is ``\texttt{opts.}'',
 320.312 -followed by the name of the command to which the options apply.  This
 320.313 -example defines a ``\texttt{hg vimdiff}'' command that runs the
 320.314 -\command{vim} editor's \texttt{DirDiff} extension.
 320.315 -\begin{codesample2}
 320.316 -  [extdiff]  
 320.317 -  cmd.vimdiff = vim
 320.318 -  opts.vimdiff = -f '+next' '+execute "DirDiff" argv(0) argv(1)'
 320.319 -\end{codesample2}
 320.320 -
 320.321 -\section{Cherrypicking changes with the \hgext{transplant} extension}
 320.322 -\label{sec:hgext:transplant}
 320.323 -
 320.324 -Need to have a long chat with Brendan about this.
 320.325 -
 320.326 -\section{Send changes via email with the \hgext{patchbomb} extension}
 320.327 -\label{sec:hgext:patchbomb}
 320.328 -
 320.329 -Many projects have a culture of ``change review'', in which people
 320.330 -send their modifications to a mailing list for others to read and
 320.331 -comment on before they commit the final version to a shared
 320.332 -repository.  Some projects have people who act as gatekeepers; they
 320.333 -apply changes from other people to a repository to which those others
 320.334 -don't have access.
 320.335 -
 320.336 -Mercurial makes it easy to send changes over email for review or
 320.337 -application, via its \hgext{patchbomb} extension.  The extension is so
 320.338 -namd because changes are formatted as patches, and it's usual to send
 320.339 -one changeset per email message.  Sending a long series of changes by
 320.340 -email is thus much like ``bombing'' the recipient's inbox, hence
 320.341 -``patchbomb''.
 320.342 -
 320.343 -As usual, the basic configuration of the \hgext{patchbomb} extension
 320.344 -takes just one or two lines in your \hgrc.
 320.345 -\begin{codesample2}
 320.346 -  [extensions]
 320.347 -  patchbomb =
 320.348 -\end{codesample2}
 320.349 -Once you've enabled the extension, you will have a new command
 320.350 -available, named \hgxcmd{patchbomb}{email}.
 320.351 -
 320.352 -The safest and best way to invoke the \hgxcmd{patchbomb}{email}
 320.353 -command is to \emph{always} run it first with the
 320.354 -\hgxopt{patchbomb}{email}{-n} option.  This will show you what the
 320.355 -command \emph{would} send, without actually sending anything.  Once
 320.356 -you've had a quick glance over the changes and verified that you are
 320.357 -sending the right ones, you can rerun the same command, with the
 320.358 -\hgxopt{patchbomb}{email}{-n} option removed.
 320.359 -
 320.360 -The \hgxcmd{patchbomb}{email} command accepts the same kind of
 320.361 -revision syntax as every other Mercurial command.  For example, this
 320.362 -command will send every revision between 7 and \texttt{tip},
 320.363 -inclusive.
 320.364 -\begin{codesample2}
 320.365 -  hg email -n 7:tip
 320.366 -\end{codesample2}
 320.367 -You can also specify a \emph{repository} to compare with.  If you
 320.368 -provide a repository but no revisions, the \hgxcmd{patchbomb}{email}
 320.369 -command will send all revisions in the local repository that are not
 320.370 -present in the remote repository.  If you additionally specify
 320.371 -revisions or a branch name (the latter using the
 320.372 -\hgxopt{patchbomb}{email}{-b} option), this will constrain the
 320.373 -revisions sent.
 320.374 -
 320.375 -It's perfectly safe to run the \hgxcmd{patchbomb}{email} command
 320.376 -without the names of the people you want to send to: if you do this,
 320.377 -it will just prompt you for those values interactively.  (If you're
 320.378 -using a Linux or Unix-like system, you should have enhanced
 320.379 -\texttt{readline}-style editing capabilities when entering those
 320.380 -headers, too, which is useful.)
 320.381 -
 320.382 -When you are sending just one revision, the \hgxcmd{patchbomb}{email}
 320.383 -command will by default use the first line of the changeset
 320.384 -description as the subject of the single email message it sends.
 320.385 -
 320.386 -If you send multiple revisions, the \hgxcmd{patchbomb}{email} command
 320.387 -will usually send one message per changeset.  It will preface the
 320.388 -series with an introductory message, in which you should describe the
 320.389 -purpose of the series of changes you're sending.
 320.390 -
 320.391 -\subsection{Changing the behaviour of patchbombs}
 320.392 -
 320.393 -Not every project has exactly the same conventions for sending changes
 320.394 -in email; the \hgext{patchbomb} extension tries to accommodate a
 320.395 -number of variations through command line options.
 320.396 -\begin{itemize}
 320.397 -\item You can write a subject for the introductory message on the
 320.398 -  command line using the \hgxopt{patchbomb}{email}{-s} option.  This
 320.399 -  takes one argument, the text of the subject to use.
 320.400 -\item To change the email address from which the messages originate,
 320.401 -  use the \hgxopt{patchbomb}{email}{-f} option.  This takes one
 320.402 -  argument, the email address to use.
 320.403 -\item The default behaviour is to send unified diffs (see
 320.404 -  section~\ref{sec:mq:patch} for a description of the format), one per
 320.405 -  message.  You can send a binary bundle instead with the
 320.406 -  \hgxopt{patchbomb}{email}{-b} option.  
 320.407 -\item Unified diffs are normally prefaced with a metadata header.  You
 320.408 -  can omit this, and send unadorned diffs, with the
 320.409 -  \hgxopt{patchbomb}{email}{--plain} option.
 320.410 -\item Diffs are normally sent ``inline'', in the same body part as the
 320.411 -  description of a patch.  This makes it easiest for the largest
 320.412 -  number of readers to quote and respond to parts of a diff, as some
 320.413 -  mail clients will only quote the first MIME body part in a message.
 320.414 -  If you'd prefer to send the description and the diff in separate
 320.415 -  body parts, use the \hgxopt{patchbomb}{email}{-a} option.
 320.416 -\item Instead of sending mail messages, you can write them to an
 320.417 -  \texttt{mbox}-format mail folder using the
 320.418 -  \hgxopt{patchbomb}{email}{-m} option.  That option takes one
 320.419 -  argument, the name of the file to write to.
 320.420 -\item If you would like to add a \command{diffstat}-format summary to
 320.421 -  each patch, and one to the introductory message, use the
 320.422 -  \hgxopt{patchbomb}{email}{-d} option.  The \command{diffstat}
 320.423 -  command displays a table containing the name of each file patched,
 320.424 -  the number of lines affected, and a histogram showing how much each
 320.425 -  file is modified.  This gives readers a qualitative glance at how
 320.426 -  complex a patch is.
 320.427 -\end{itemize}
 320.428 -
 320.429 -%%% Local Variables: 
 320.430 -%%% mode: latex
 320.431 -%%% TeX-master: "00book"
 320.432 -%%% End: 
   321.1 --- a/en/hook.tex	Thu Mar 26 08:57:10 2009 +0100
   321.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   321.3 @@ -1,1413 +0,0 @@
   321.4 -\chapter{Handling repository events with hooks}
   321.5 -\label{chap:hook}
   321.6 -
   321.7 -Mercurial offers a powerful mechanism to let you perform automated
   321.8 -actions in response to events that occur in a repository.  In some
   321.9 -cases, you can even control Mercurial's response to those events.
  321.10 -
  321.11 -The name Mercurial uses for one of these actions is a \emph{hook}.
  321.12 -Hooks are called ``triggers'' in some revision control systems, but
  321.13 -the two names refer to the same idea.
  321.14 -
  321.15 -\section{An overview of hooks in Mercurial}
  321.16 -
  321.17 -Here is a brief list of the hooks that Mercurial supports.  We will
  321.18 -revisit each of these hooks in more detail later, in
  321.19 -section~\ref{sec:hook:ref}.
  321.20 -
  321.21 -\begin{itemize}
  321.22 -\item[\small\hook{changegroup}] This is run after a group of
  321.23 -  changesets has been brought into the repository from elsewhere.
  321.24 -\item[\small\hook{commit}] This is run after a new changeset has been
  321.25 -  created in the local repository.
  321.26 -\item[\small\hook{incoming}] This is run once for each new changeset
  321.27 -  that is brought into the repository from elsewhere.  Notice the
  321.28 -  difference from \hook{changegroup}, which is run once per
  321.29 -  \emph{group} of changesets brought in.
  321.30 -\item[\small\hook{outgoing}] This is run after a group of changesets
  321.31 -  has been transmitted from this repository.
  321.32 -\item[\small\hook{prechangegroup}] This is run before starting to
  321.33 -  bring a group of changesets into the repository.
  321.34 -\item[\small\hook{precommit}] Controlling. This is run before starting
  321.35 -  a commit.
  321.36 -\item[\small\hook{preoutgoing}] Controlling. This is run before
  321.37 -  starting to transmit a group of changesets from this repository.
  321.38 -\item[\small\hook{pretag}] Controlling. This is run before creating a tag.
  321.39 -\item[\small\hook{pretxnchangegroup}] Controlling. This is run after a
  321.40 -  group of changesets has been brought into the local repository from
  321.41 -  another, but before the transaction completes that will make the
  321.42 -  changes permanent in the repository.
  321.43 -\item[\small\hook{pretxncommit}] Controlling. This is run after a new
  321.44 -  changeset has been created in the local repository, but before the
  321.45 -  transaction completes that will make it permanent.
  321.46 -\item[\small\hook{preupdate}] Controlling. This is run before starting
  321.47 -  an update or merge of the working directory.
  321.48 -\item[\small\hook{tag}] This is run after a tag is created.
  321.49 -\item[\small\hook{update}] This is run after an update or merge of the
  321.50 -  working directory has finished.
  321.51 -\end{itemize}
  321.52 -Each of the hooks whose description begins with the word
  321.53 -``Controlling'' has the ability to determine whether an activity can
  321.54 -proceed.  If the hook succeeds, the activity may proceed; if it fails,
  321.55 -the activity is either not permitted or undone, depending on the hook.
  321.56 -
  321.57 -\section{Hooks and security}
  321.58 -
  321.59 -\subsection{Hooks are run with your privileges}
  321.60 -
  321.61 -When you run a Mercurial command in a repository, and the command
  321.62 -causes a hook to run, that hook runs on \emph{your} system, under
  321.63 -\emph{your} user account, with \emph{your} privilege level.  Since
  321.64 -hooks are arbitrary pieces of executable code, you should treat them
  321.65 -with an appropriate level of suspicion.  Do not install a hook unless
  321.66 -you are confident that you know who created it and what it does.
  321.67 -
  321.68 -In some cases, you may be exposed to hooks that you did not install
  321.69 -yourself.  If you work with Mercurial on an unfamiliar system,
  321.70 -Mercurial will run hooks defined in that system's global \hgrc\ file.
  321.71 -
  321.72 -If you are working with a repository owned by another user, Mercurial
  321.73 -can run hooks defined in that user's repository, but it will still run
  321.74 -them as ``you''.  For example, if you \hgcmd{pull} from that
  321.75 -repository, and its \sfilename{.hg/hgrc} defines a local
  321.76 -\hook{outgoing} hook, that hook will run under your user account, even
  321.77 -though you don't own that repository.
  321.78 -
  321.79 -\begin{note}
  321.80 -  This only applies if you are pulling from a repository on a local or
  321.81 -  network filesystem.  If you're pulling over http or ssh, any
  321.82 -  \hook{outgoing} hook will run under whatever account is executing
  321.83 -  the server process, on the server.
  321.84 -\end{note}
  321.85 -
  321.86 -XXX To see what hooks are defined in a repository, use the
  321.87 -\hgcmdargs{config}{hooks} command.  If you are working in one
  321.88 -repository, but talking to another that you do not own (e.g.~using
  321.89 -\hgcmd{pull} or \hgcmd{incoming}), remember that it is the other
  321.90 -repository's hooks you should be checking, not your own.
  321.91 -
  321.92 -\subsection{Hooks do not propagate}
  321.93 -
  321.94 -In Mercurial, hooks are not revision controlled, and do not propagate
  321.95 -when you clone, or pull from, a repository.  The reason for this is
  321.96 -simple: a hook is a completely arbitrary piece of executable code.  It
  321.97 -runs under your user identity, with your privilege level, on your
  321.98 -machine.
  321.99 -
 321.100 -It would be extremely reckless for any distributed revision control
 321.101 -system to implement revision-controlled hooks, as this would offer an
 321.102 -easily exploitable way to subvert the accounts of users of the
 321.103 -revision control system.
 321.104 -
 321.105 -Since Mercurial does not propagate hooks, if you are collaborating
 321.106 -with other people on a common project, you should not assume that they
 321.107 -are using the same Mercurial hooks as you are, or that theirs are
 321.108 -correctly configured.  You should document the hooks you expect people
 321.109 -to use.
 321.110 -
 321.111 -In a corporate intranet, this is somewhat easier to control, as you
 321.112 -can for example provide a ``standard'' installation of Mercurial on an
 321.113 -NFS filesystem, and use a site-wide \hgrc\ file to define hooks that
 321.114 -all users will see.  However, this too has its limits; see below.
 321.115 -
 321.116 -\subsection{Hooks can be overridden}
 321.117 -
 321.118 -Mercurial allows you to override a hook definition by redefining the
 321.119 -hook.  You can disable it by setting its value to the empty string, or
 321.120 -change its behaviour as you wish.
 321.121 -
 321.122 -If you deploy a system-~or site-wide \hgrc\ file that defines some
 321.123 -hooks, you should thus understand that your users can disable or
 321.124 -override those hooks.
 321.125 -
 321.126 -\subsection{Ensuring that critical hooks are run}
 321.127 -
 321.128 -Sometimes you may want to enforce a policy that you do not want others
 321.129 -to be able to work around.  For example, you may have a requirement
 321.130 -that every changeset must pass a rigorous set of tests.  Defining this
 321.131 -requirement via a hook in a site-wide \hgrc\ won't work for remote
 321.132 -users on laptops, and of course local users can subvert it at will by
 321.133 -overriding the hook.
 321.134 -
 321.135 -Instead, you can set up your policies for use of Mercurial so that
 321.136 -people are expected to propagate changes through a well-known
 321.137 -``canonical'' server that you have locked down and configured
 321.138 -appropriately.
 321.139 -
 321.140 -One way to do this is via a combination of social engineering and
 321.141 -technology.  Set up a restricted-access account; users can push
 321.142 -changes over the network to repositories managed by this account, but
 321.143 -they cannot log into the account and run normal shell commands.  In
 321.144 -this scenario, a user can commit a changeset that contains any old
 321.145 -garbage they want.
 321.146 -
 321.147 -When someone pushes a changeset to the server that everyone pulls
 321.148 -from, the server will test the changeset before it accepts it as
 321.149 -permanent, and reject it if it fails to pass the test suite.  If
 321.150 -people only pull changes from this filtering server, it will serve to
 321.151 -ensure that all changes that people pull have been automatically
 321.152 -vetted.
 321.153 -
 321.154 -\section{Care with \texttt{pretxn} hooks in a shared-access repository}
 321.155 -
 321.156 -If you want to use hooks to do some automated work in a repository
 321.157 -that a number of people have shared access to, you need to be careful
 321.158 -in how you do this.
 321.159 -
 321.160 -Mercurial only locks a repository when it is writing to the
 321.161 -repository, and only the parts of Mercurial that write to the
 321.162 -repository pay attention to locks.  Write locks are necessary to
 321.163 -prevent multiple simultaneous writers from scribbling on each other's
 321.164 -work, corrupting the repository.
 321.165 -
 321.166 -Because Mercurial is careful with the order in which it reads and
 321.167 -writes data, it does not need to acquire a lock when it wants to read
 321.168 -data from the repository.  The parts of Mercurial that read from the
 321.169 -repository never pay attention to locks.  This lockless reading scheme
 321.170 -greatly increases performance and concurrency.
 321.171 -
 321.172 -With great performance comes a trade-off, though, one which has the
 321.173 -potential to cause you trouble unless you're aware of it.  To describe
 321.174 -this requires a little detail about how Mercurial adds changesets to a
 321.175 -repository and reads those changes.
 321.176 -
 321.177 -When Mercurial \emph{writes} metadata, it writes it straight into the
 321.178 -destination file.  It writes file data first, then manifest data
 321.179 -(which contains pointers to the new file data), then changelog data
 321.180 -(which contains pointers to the new manifest data).  Before the first
 321.181 -write to each file, it stores a record of where the end of the file
 321.182 -was in its transaction log.  If the transaction must be rolled back,
 321.183 -Mercurial simply truncates each file back to the size it was before the
 321.184 -transaction began.
 321.185 -
 321.186 -When Mercurial \emph{reads} metadata, it reads the changelog first,
 321.187 -then everything else.  Since a reader will only access parts of the
 321.188 -manifest or file metadata that it can see in the changelog, it can
 321.189 -never see partially written data.
 321.190 -
 321.191 -Some controlling hooks (\hook{pretxncommit} and
 321.192 -\hook{pretxnchangegroup}) run when a transaction is almost complete.
 321.193 -All of the metadata has been written, but Mercurial can still roll the
 321.194 -transaction back and cause the newly-written data to disappear.
 321.195 -
 321.196 -If one of these hooks runs for long, it opens a window of time during
 321.197 -which a reader can see the metadata for changesets that are not yet
 321.198 -permanent, and should not be thought of as ``really there''.  The
 321.199 -longer the hook runs, the longer that window is open.
 321.200 -
 321.201 -\subsection{The problem illustrated}
 321.202 -
 321.203 -In principle, a good use for the \hook{pretxnchangegroup} hook would
 321.204 -be to automatically build and test incoming changes before they are
 321.205 -accepted into a central repository.  This could let you guarantee that
 321.206 -nobody can push changes to this repository that ``break the build''.
 321.207 -But if a client can pull changes while they're being tested, the
 321.208 -usefulness of the test is zero; an unsuspecting someone can pull
 321.209 -untested changes, potentially breaking their build.
 321.210 -
 321.211 -The safest technological answer to this challenge is to set up such a
 321.212 -``gatekeeper'' repository as \emph{unidirectional}.  Let it take
 321.213 -changes pushed in from the outside, but do not allow anyone to pull
 321.214 -changes from it (use the \hook{preoutgoing} hook to lock it down).
 321.215 -Configure a \hook{changegroup} hook so that if a build or test
 321.216 -succeeds, the hook will push the new changes out to another repository
 321.217 -that people \emph{can} pull from.
 321.218 -
 321.219 -In practice, putting a centralised bottleneck like this in place is
 321.220 -not often a good idea, and transaction visibility has nothing to do
 321.221 -with the problem.  As the size of a project---and the time it takes to
 321.222 -build and test---grows, you rapidly run into a wall with this ``try
 321.223 -before you buy'' approach, where you have more changesets to test than
 321.224 -time in which to deal with them.  The inevitable result is frustration
 321.225 -on the part of all involved.
 321.226 -
 321.227 -An approach that scales better is to get people to build and test
 321.228 -before they push, then run automated builds and tests centrally
 321.229 -\emph{after} a push, to be sure all is well.  The advantage of this
 321.230 -approach is that it does not impose a limit on the rate at which the
 321.231 -repository can accept changes.
 321.232 -
 321.233 -\section{A short tutorial on using hooks}
 321.234 -\label{sec:hook:simple}
 321.235 -
 321.236 -It is easy to write a Mercurial hook.  Let's start with a hook that
 321.237 -runs when you finish a \hgcmd{commit}, and simply prints the hash of
 321.238 -the changeset you just created.  The hook is called \hook{commit}.
 321.239 -
 321.240 -\begin{figure}[ht]
 321.241 -  \interaction{hook.simple.init}
 321.242 -  \caption{A simple hook that runs when a changeset is committed}
 321.243 -  \label{ex:hook:init}
 321.244 -\end{figure}
 321.245 -
 321.246 -All hooks follow the pattern in example~\ref{ex:hook:init}.  You add
 321.247 -an entry to the \rcsection{hooks} section of your \hgrc.  On the left
 321.248 -is the name of the event to trigger on; on the right is the action to
 321.249 -take.  As you can see, you can run an arbitrary shell command in a
 321.250 -hook.  Mercurial passes extra information to the hook using
 321.251 -environment variables (look for \envar{HG\_NODE} in the example).
 321.252 -
 321.253 -\subsection{Performing multiple actions per event}
 321.254 -
 321.255 -Quite often, you will want to define more than one hook for a
 321.256 -particular kind of event, as shown in example~\ref{ex:hook:ext}.
 321.257 -Mercurial lets you do this by adding an \emph{extension} to the end of
 321.258 -a hook's name.  You extend a hook's name by giving the name of the
 321.259 -hook, followed by a full stop (the ``\texttt{.}'' character), followed
 321.260 -by some more text of your choosing.  For example, Mercurial will run
 321.261 -both \texttt{commit.foo} and \texttt{commit.bar} when the
 321.262 -\texttt{commit} event occurs.
 321.263 -
 321.264 -\begin{figure}[ht]
 321.265 -  \interaction{hook.simple.ext}
 321.266 -  \caption{Defining a second \hook{commit} hook}
 321.267 -  \label{ex:hook:ext}
 321.268 -\end{figure}
 321.269 -
 321.270 -To give a well-defined order of execution when there are multiple
 321.271 -hooks defined for an event, Mercurial sorts hooks by extension, and
 321.272 -executes the hook commands in this sorted order.  In the above
 321.273 -example, it will execute \texttt{commit.bar} before
 321.274 -\texttt{commit.foo}, and \texttt{commit} before both.
 321.275 -
 321.276 -It is a good idea to use a somewhat descriptive extension when you
 321.277 -define a new hook.  This will help you to remember what the hook was
 321.278 -for.  If the hook fails, you'll get an error message that contains the
 321.279 -hook name and extension, so using a descriptive extension could give
 321.280 -you an immediate hint as to why the hook failed (see
 321.281 -section~\ref{sec:hook:perm} for an example).
 321.282 -
 321.283 -\subsection{Controlling whether an activity can proceed}
 321.284 -\label{sec:hook:perm}
 321.285 -
 321.286 -In our earlier examples, we used the \hook{commit} hook, which is
 321.287 -run after a commit has completed.  This is one of several Mercurial
 321.288 -hooks that run after an activity finishes.  Such hooks have no way of
 321.289 -influencing the activity itself.
 321.290 -
 321.291 -Mercurial defines a number of events that occur before an activity
 321.292 -starts; or after it starts, but before it finishes.  Hooks that
 321.293 -trigger on these events have the added ability to choose whether the
 321.294 -activity can continue, or will abort.  
 321.295 -
 321.296 -The \hook{pretxncommit} hook runs after a commit has all but
 321.297 -completed.  In other words, the metadata representing the changeset
 321.298 -has been written out to disk, but the transaction has not yet been
 321.299 -allowed to complete.  The \hook{pretxncommit} hook has the ability to
 321.300 -decide whether the transaction can complete, or must be rolled back.
 321.301 -
 321.302 -If the \hook{pretxncommit} hook exits with a status code of zero, the
 321.303 -transaction is allowed to complete; the commit finishes; and the
 321.304 -\hook{commit} hook is run.  If the \hook{pretxncommit} hook exits with
 321.305 -a non-zero status code, the transaction is rolled back; the metadata
 321.306 -representing the changeset is erased; and the \hook{commit} hook is
 321.307 -not run.
 321.308 -
 321.309 -\begin{figure}[ht]
 321.310 -  \interaction{hook.simple.pretxncommit}
 321.311 -  \caption{Using the \hook{pretxncommit} hook to control commits}
 321.312 -  \label{ex:hook:pretxncommit}
 321.313 -\end{figure}
 321.314 -
 321.315 -The hook in example~\ref{ex:hook:pretxncommit} checks that a commit
 321.316 -comment contains a bug ID.  If it does, the commit can complete.  If
 321.317 -not, the commit is rolled back.
 321.318 -
 321.319 -\section{Writing your own hooks}
 321.320 -
 321.321 -When you are writing a hook, you might find it useful to run Mercurial
 321.322 -either with the \hggopt{-v} option, or the \rcitem{ui}{verbose} config
 321.323 -item set to ``true''.  When you do so, Mercurial will print a message
 321.324 -before it calls each hook.
 321.325 -
 321.326 -\subsection{Choosing how your hook should run}
 321.327 -\label{sec:hook:lang}
 321.328 -
 321.329 -You can write a hook either as a normal program---typically a shell
 321.330 -script---or as a Python function that is executed within the Mercurial
 321.331 -process.
 321.332 -
 321.333 -Writing a hook as an external program has the advantage that it
 321.334 -requires no knowledge of Mercurial's internals.  You can call normal
 321.335 -Mercurial commands to get any added information you need.  The
 321.336 -trade-off is that external hooks are slower than in-process hooks.
 321.337 -
 321.338 -An in-process Python hook has complete access to the Mercurial API,
 321.339 -and does not ``shell out'' to another process, so it is inherently
 321.340 -faster than an external hook.  It is also easier to obtain much of the
 321.341 -information that a hook requires by using the Mercurial API than by
 321.342 -running Mercurial commands.
 321.343 -
 321.344 -If you are comfortable with Python, or require high performance,
 321.345 -writing your hooks in Python may be a good choice.  However, when you
 321.346 -have a straightforward hook to write and you don't need to care about
 321.347 -performance (probably the majority of hooks), a shell script is
 321.348 -perfectly fine.
 321.349 -
 321.350 -\subsection{Hook parameters}
 321.351 -\label{sec:hook:param}
 321.352 -
 321.353 -Mercurial calls each hook with a set of well-defined parameters.  In
 321.354 -Python, a parameter is passed as a keyword argument to your hook
 321.355 -function.  For an external program, a parameter is passed as an
 321.356 -environment variable.
 321.357 -
 321.358 -Whether your hook is written in Python or as a shell script, the
 321.359 -hook-specific parameter names and values will be the same.  A boolean
 321.360 -parameter will be represented as a boolean value in Python, but as the
 321.361 -number 1 (for ``true'') or 0 (for ``false'') as an environment
 321.362 -variable for an external hook.  If a hook parameter is named
 321.363 -\texttt{foo}, the keyword argument for a Python hook will also be
 321.364 -named \texttt{foo}, while the environment variable for an external
 321.365 -hook will be named \texttt{HG\_FOO}.
 321.366 -
 321.367 -\subsection{Hook return values and activity control}
 321.368 -
 321.369 -A hook that executes successfully must exit with a status of zero if
 321.370 -external, or return boolean ``false'' if in-process.  Failure is
 321.371 -indicated with a non-zero exit status from an external hook, or an
 321.372 -in-process hook returning boolean ``true''.  If an in-process hook
 321.373 -raises an exception, the hook is considered to have failed.
 321.374 -
 321.375 -For a hook that controls whether an activity can proceed, zero/false
 321.376 -means ``allow'', while non-zero/true/exception means ``deny''.
 321.377 -
 321.378 -\subsection{Writing an external hook}
 321.379 -
 321.380 -When you define an external hook in your \hgrc\ and the hook is run,
 321.381 -its value is passed to your shell, which interprets it.  This means
 321.382 -that you can use normal shell constructs in the body of the hook.
 321.383 -
 321.384 -An executable hook is always run with its current directory set to a
 321.385 -repository's root directory.
 321.386 -
 321.387 -Each hook parameter is passed in as an environment variable; the name
 321.388 -is upper-cased, and prefixed with the string ``\texttt{HG\_}''.
 321.389 -
 321.390 -With the exception of hook parameters, Mercurial does not set or
 321.391 -modify any environment variables when running a hook.  This is useful
 321.392 -to remember if you are writing a site-wide hook that may be run by a
 321.393 -number of different users with differing environment variables set.
 321.394 -In multi-user situations, you should not rely on environment variables
 321.395 -being set to the values you have in your environment when testing the
 321.396 -hook.
 321.397 -
 321.398 -\subsection{Telling Mercurial to use an in-process hook}
 321.399 -
 321.400 -The \hgrc\ syntax for defining an in-process hook is slightly
 321.401 -different than for an executable hook.  The value of the hook must
 321.402 -start with the text ``\texttt{python:}'', and continue with the
 321.403 -fully-qualified name of a callable object to use as the hook's value.
 321.404 -
 321.405 -The module in which a hook lives is automatically imported when a hook
 321.406 -is run.  So long as you have the module name and \envar{PYTHONPATH}
 321.407 -right, it should ``just work''.
 321.408 -
 321.409 -The following \hgrc\ example snippet illustrates the syntax and
 321.410 -meaning of the notions we just described.
 321.411 -\begin{codesample2}
 321.412 -  [hooks]
 321.413 -  commit.example = python:mymodule.submodule.myhook
 321.414 -\end{codesample2}
 321.415 -When Mercurial runs the \texttt{commit.example} hook, it imports
 321.416 -\texttt{mymodule.submodule}, looks for the callable object named
 321.417 -\texttt{myhook}, and calls it.
 321.418 -
 321.419 -\subsection{Writing an in-process hook}
 321.420 -
 321.421 -The simplest in-process hook does nothing, but illustrates the basic
 321.422 -shape of the hook API:
 321.423 -\begin{codesample2}
 321.424 -  def myhook(ui, repo, **kwargs):
 321.425 -      pass
 321.426 -\end{codesample2}
 321.427 -The first argument to a Python hook is always a
 321.428 -\pymodclass{mercurial.ui}{ui} object.  The second is a repository object;
 321.429 -at the moment, it is always an instance of
 321.430 -\pymodclass{mercurial.localrepo}{localrepository}.  Following these two
 321.431 -arguments are other keyword arguments.  Which ones are passed in
 321.432 -depends on the hook being called, but a hook can ignore arguments it
 321.433 -doesn't care about by dropping them into a keyword argument dict, as
 321.434 -with \texttt{**kwargs} above.
 321.435 -
 321.436 -\section{Some hook examples}
 321.437 -
 321.438 -\subsection{Writing meaningful commit messages}
 321.439 -
 321.440 -It's hard to imagine a useful commit message being very short.  The
 321.441 -simple \hook{pretxncommit} hook of figure~\ref{ex:hook:msglen.go}
 321.442 -will prevent you from committing a changeset with a message that is
 321.443 -less than ten bytes long.
 321.444 -
 321.445 -\begin{figure}[ht]
 321.446 -  \interaction{hook.msglen.go}
 321.447 -  \caption{A hook that forbids overly short commit messages}
 321.448 -  \label{ex:hook:msglen.go}
 321.449 -\end{figure}
 321.450 -
 321.451 -\subsection{Checking for trailing whitespace}
 321.452 -
 321.453 -An interesting use of a commit-related hook is to help you to write
 321.454 -cleaner code.  A simple example of ``cleaner code'' is the dictum that
 321.455 -a change should not add any new lines of text that contain ``trailing
 321.456 -whitespace''.  Trailing whitespace is a series of space and tab
 321.457 -characters at the end of a line of text.  In most cases, trailing
 321.458 -whitespace is unnecessary, invisible noise, but it is occasionally
 321.459 -problematic, and people often prefer to get rid of it.
 321.460 -
 321.461 -You can use either the \hook{precommit} or \hook{pretxncommit} hook to
 321.462 -tell whether you have a trailing whitespace problem.  If you use the
 321.463 -\hook{precommit} hook, the hook will not know which files you are
 321.464 -committing, so it will have to check every modified file in the
 321.465 -repository for trailing white space.  If you want to commit a change
 321.466 -to just the file \filename{foo}, but the file \filename{bar} contains
 321.467 -trailing whitespace, doing a check in the \hook{precommit} hook will
 321.468 -prevent you from committing \filename{foo} due to the problem with
 321.469 -\filename{bar}.  This doesn't seem right.
 321.470 -
 321.471 -Should you choose the \hook{pretxncommit} hook, the check won't occur
 321.472 -until just before the transaction for the commit completes.  This will
 321.473 -allow you to check for problems only the exact files that are being
 321.474 -committed.  However, if you entered the commit message interactively
 321.475 -and the hook fails, the transaction will roll back; you'll have to
 321.476 -re-enter the commit message after you fix the trailing whitespace and
 321.477 -run \hgcmd{commit} again.
 321.478 -
 321.479 -\begin{figure}[ht]
 321.480 -  \interaction{hook.ws.simple}
 321.481 -  \caption{A simple hook that checks for trailing whitespace}
 321.482 -  \label{ex:hook:ws.simple}
 321.483 -\end{figure}
 321.484 -
 321.485 -Figure~\ref{ex:hook:ws.simple} introduces a simple \hook{pretxncommit}
 321.486 -hook that checks for trailing whitespace.  This hook is short, but not
 321.487 -very helpful.  It exits with an error status if a change adds a line
 321.488 -with trailing whitespace to any file, but does not print any
 321.489 -information that might help us to identify the offending file or
 321.490 -line.  It also has the nice property of not paying attention to
 321.491 -unmodified lines; only lines that introduce new trailing whitespace
 321.492 -cause problems.
 321.493 -
 321.494 -\begin{figure}[ht]
 321.495 -  \interaction{hook.ws.better}
 321.496 -  \caption{A better trailing whitespace hook}
 321.497 -  \label{ex:hook:ws.better}
 321.498 -\end{figure}
 321.499 -
 321.500 -The example of figure~\ref{ex:hook:ws.better} is much more complex,
 321.501 -but also more useful.  It parses a unified diff to see if any lines
 321.502 -add trailing whitespace, and prints the name of the file and the line
 321.503 -number of each such occurrence.  Even better, if the change adds
 321.504 -trailing whitespace, this hook saves the commit comment and prints the
 321.505 -name of the save file before exiting and telling Mercurial to roll the
 321.506 -transaction back, so you can use
 321.507 -\hgcmdargs{commit}{\hgopt{commit}{-l}~\emph{filename}} to reuse the
 321.508 -saved commit message once you've corrected the problem.
 321.509 -
 321.510 -As a final aside, note in figure~\ref{ex:hook:ws.better} the use of
 321.511 -\command{perl}'s in-place editing feature to get rid of trailing
 321.512 -whitespace from a file.  This is concise and useful enough that I will
 321.513 -reproduce it here.
 321.514 -\begin{codesample2}
 321.515 -  perl -pi -e 's,\textbackslash{}s+\$,,' filename
 321.516 -\end{codesample2}
 321.517 -
 321.518 -\section{Bundled hooks}
 321.519 -
 321.520 -Mercurial ships with several bundled hooks.  You can find them in the
 321.521 -\dirname{hgext} directory of a Mercurial source tree.  If you are
 321.522 -using a Mercurial binary package, the hooks will be located in the
 321.523 -\dirname{hgext} directory of wherever your package installer put
 321.524 -Mercurial.
 321.525 -
 321.526 -\subsection{\hgext{acl}---access control for parts of a repository}
 321.527 -
 321.528 -The \hgext{acl} extension lets you control which remote users are
 321.529 -allowed to push changesets to a networked server.  You can protect any
 321.530 -portion of a repository (including the entire repo), so that a
 321.531 -specific remote user can push changes that do not affect the protected
 321.532 -portion.
 321.533 -
 321.534 -This extension implements access control based on the identity of the
 321.535 -user performing a push, \emph{not} on who committed the changesets
 321.536 -they're pushing.  It makes sense to use this hook only if you have a
 321.537 -locked-down server environment that authenticates remote users, and
 321.538 -you want to be sure that only specific users are allowed to push
 321.539 -changes to that server.
 321.540 -
 321.541 -\subsubsection{Configuring the \hook{acl} hook}
 321.542 -
 321.543 -In order to manage incoming changesets, the \hgext{acl} hook must be
 321.544 -used as a \hook{pretxnchangegroup} hook.  This lets it see which files
 321.545 -are modified by each incoming changeset, and roll back a group of
 321.546 -changesets if they modify ``forbidden'' files.  Example:
 321.547 -\begin{codesample2}
 321.548 -  [hooks]
 321.549 -  pretxnchangegroup.acl = python:hgext.acl.hook
 321.550 -\end{codesample2}
 321.551 -
 321.552 -The \hgext{acl} extension is configured using three sections.  
 321.553 -
 321.554 -The \rcsection{acl} section has only one entry, \rcitem{acl}{sources},
 321.555 -which lists the sources of incoming changesets that the hook should
 321.556 -pay attention to.  You don't normally need to configure this section.
 321.557 -\begin{itemize}
 321.558 -\item[\rcitem{acl}{serve}] Control incoming changesets that are arriving
 321.559 -  from a remote repository over http or ssh.  This is the default
 321.560 -  value of \rcitem{acl}{sources}, and usually the only setting you'll
 321.561 -  need for this configuration item.
 321.562 -\item[\rcitem{acl}{pull}] Control incoming changesets that are
 321.563 -  arriving via a pull from a local repository.
 321.564 -\item[\rcitem{acl}{push}] Control incoming changesets that are
 321.565 -  arriving via a push from a local repository.
 321.566 -\item[\rcitem{acl}{bundle}] Control incoming changesets that are
 321.567 -  arriving from another repository via a bundle.
 321.568 -\end{itemize}
 321.569 -
 321.570 -The \rcsection{acl.allow} section controls the users that are allowed to
 321.571 -add changesets to the repository.  If this section is not present, all
 321.572 -users that are not explicitly denied are allowed.  If this section is
 321.573 -present, all users that are not explicitly allowed are denied (so an
 321.574 -empty section means that all users are denied).
 321.575 -
 321.576 -The \rcsection{acl.deny} section determines which users are denied
 321.577 -from adding changesets to the repository.  If this section is not
 321.578 -present or is empty, no users are denied.
 321.579 -
 321.580 -The syntaxes for the \rcsection{acl.allow} and \rcsection{acl.deny}
 321.581 -sections are identical.  On the left of each entry is a glob pattern
 321.582 -that matches files or directories, relative to the root of the
 321.583 -repository; on the right, a user name.
 321.584 -
 321.585 -In the following example, the user \texttt{docwriter} can only push
 321.586 -changes to the \dirname{docs} subtree of the repository, while
 321.587 -\texttt{intern} can push changes to any file or directory except
 321.588 -\dirname{source/sensitive}.
 321.589 -\begin{codesample2}
 321.590 -  [acl.allow]
 321.591 -  docs/** = docwriter
 321.592 -
 321.593 -  [acl.deny]
 321.594 -  source/sensitive/** = intern
 321.595 -\end{codesample2}
 321.596 -
 321.597 -\subsubsection{Testing and troubleshooting}
 321.598 -
 321.599 -If you want to test the \hgext{acl} hook, run it with Mercurial's
 321.600 -debugging output enabled.  Since you'll probably be running it on a
 321.601 -server where it's not convenient (or sometimes possible) to pass in
 321.602 -the \hggopt{--debug} option, don't forget that you can enable
 321.603 -debugging output in your \hgrc:
 321.604 -\begin{codesample2}
 321.605 -  [ui]
 321.606 -  debug = true
 321.607 -\end{codesample2}
 321.608 -With this enabled, the \hgext{acl} hook will print enough information
 321.609 -to let you figure out why it is allowing or forbidding pushes from
 321.610 -specific users.
 321.611 -
 321.612 -\subsection{\hgext{bugzilla}---integration with Bugzilla}
 321.613 -
 321.614 -The \hgext{bugzilla} extension adds a comment to a Bugzilla bug
 321.615 -whenever it finds a reference to that bug ID in a commit comment.  You
 321.616 -can install this hook on a shared server, so that any time a remote
 321.617 -user pushes changes to this server, the hook gets run.  
 321.618 -
 321.619 -It adds a comment to the bug that looks like this (you can configure
 321.620 -the contents of the comment---see below):
 321.621 -\begin{codesample2}
 321.622 -  Changeset aad8b264143a, made by Joe User <joe.user@domain.com> in
 321.623 -  the frobnitz repository, refers to this bug.
 321.624 -
 321.625 -  For complete details, see
 321.626 -  http://hg.domain.com/frobnitz?cmd=changeset;node=aad8b264143a
 321.627 -
 321.628 -  Changeset description:
 321.629 -        Fix bug 10483 by guarding against some NULL pointers
 321.630 -\end{codesample2}
 321.631 -The value of this hook is that it automates the process of updating a
 321.632 -bug any time a changeset refers to it.  If you configure the hook
 321.633 -properly, it makes it easy for people to browse straight from a
 321.634 -Bugzilla bug to a changeset that refers to that bug.
 321.635 -
 321.636 -You can use the code in this hook as a starting point for some more
 321.637 -exotic Bugzilla integration recipes.  Here are a few possibilities:
 321.638 -\begin{itemize}
 321.639 -\item Require that every changeset pushed to the server have a valid
 321.640 -  bug~ID in its commit comment.  In this case, you'd want to configure
 321.641 -  the hook as a \hook{pretxncommit} hook.  This would allow the hook
 321.642 -  to reject changes that didn't contain bug IDs.
 321.643 -\item Allow incoming changesets to automatically modify the
 321.644 -  \emph{state} of a bug, as well as simply adding a comment.  For
 321.645 -  example, the hook could recognise the string ``fixed bug 31337'' as
 321.646 -  indicating that it should update the state of bug 31337 to
 321.647 -  ``requires testing''.
 321.648 -\end{itemize}
 321.649 -
 321.650 -\subsubsection{Configuring the \hook{bugzilla} hook}
 321.651 -\label{sec:hook:bugzilla:config}
 321.652 -
 321.653 -You should configure this hook in your server's \hgrc\ as an
 321.654 -\hook{incoming} hook, for example as follows:
 321.655 -\begin{codesample2}
 321.656 -  [hooks]
 321.657 -  incoming.bugzilla = python:hgext.bugzilla.hook
 321.658 -\end{codesample2}
 321.659 -
 321.660 -Because of the specialised nature of this hook, and because Bugzilla
 321.661 -was not written with this kind of integration in mind, configuring
 321.662 -this hook is a somewhat involved process.
 321.663 -
 321.664 -Before you begin, you must install the MySQL bindings for Python on
 321.665 -the host(s) where you'll be running the hook.  If this is not
 321.666 -available as a binary package for your system, you can download it
 321.667 -from~\cite{web:mysql-python}.
 321.668 -
 321.669 -Configuration information for this hook lives in the
 321.670 -\rcsection{bugzilla} section of your \hgrc.
 321.671 -\begin{itemize}
 321.672 -\item[\rcitem{bugzilla}{version}] The version of Bugzilla installed on
 321.673 -  the server.  The database schema that Bugzilla uses changes
 321.674 -  occasionally, so this hook has to know exactly which schema to use.
 321.675 -  At the moment, the only version supported is \texttt{2.16}.
 321.676 -\item[\rcitem{bugzilla}{host}] The hostname of the MySQL server that
 321.677 -  stores your Bugzilla data.  The database must be configured to allow
 321.678 -  connections from whatever host you are running the \hook{bugzilla}
 321.679 -  hook on.
 321.680 -\item[\rcitem{bugzilla}{user}] The username with which to connect to
 321.681 -  the MySQL server.  The database must be configured to allow this
 321.682 -  user to connect from whatever host you are running the
 321.683 -  \hook{bugzilla} hook on.  This user must be able to access and
 321.684 -  modify Bugzilla tables.  The default value of this item is
 321.685 -  \texttt{bugs}, which is the standard name of the Bugzilla user in a
 321.686 -  MySQL database.
 321.687 -\item[\rcitem{bugzilla}{password}] The MySQL password for the user you
 321.688 -  configured above.  This is stored as plain text, so you should make
 321.689 -  sure that unauthorised users cannot read the \hgrc\ file where you
 321.690 -  store this information.
 321.691 -\item[\rcitem{bugzilla}{db}] The name of the Bugzilla database on the
 321.692 -  MySQL server.  The default value of this item is \texttt{bugs},
 321.693 -  which is the standard name of the MySQL database where Bugzilla
 321.694 -  stores its data.
 321.695 -\item[\rcitem{bugzilla}{notify}] If you want Bugzilla to send out a
 321.696 -  notification email to subscribers after this hook has added a
 321.697 -  comment to a bug, you will need this hook to run a command whenever
 321.698 -  it updates the database.  The command to run depends on where you
 321.699 -  have installed Bugzilla, but it will typically look something like
 321.700 -  this, if you have Bugzilla installed in
 321.701 -  \dirname{/var/www/html/bugzilla}:
 321.702 -  \begin{codesample4}
 321.703 -    cd /var/www/html/bugzilla && ./processmail %s nobody@nowhere.com
 321.704 -  \end{codesample4}
 321.705 -  The Bugzilla \texttt{processmail} program expects to be given a
 321.706 -  bug~ID (the hook replaces ``\texttt{\%s}'' with the bug~ID) and an
 321.707 -  email address.  It also expects to be able to write to some files in
 321.708 -  the directory that it runs in.  If Bugzilla and this hook are not
 321.709 -  installed on the same machine, you will need to find a way to run
 321.710 -  \texttt{processmail} on the server where Bugzilla is installed.
 321.711 -\end{itemize}
 321.712 -
 321.713 -\subsubsection{Mapping committer names to Bugzilla user names}
 321.714 -
 321.715 -By default, the \hgext{bugzilla} hook tries to use the email address
 321.716 -of a changeset's committer as the Bugzilla user name with which to
 321.717 -update a bug.  If this does not suit your needs, you can map committer
 321.718 -email addresses to Bugzilla user names using a \rcsection{usermap}
 321.719 -section.
 321.720 -
 321.721 -Each item in the \rcsection{usermap} section contains an email address
 321.722 -on the left, and a Bugzilla user name on the right.
 321.723 -\begin{codesample2}
 321.724 -  [usermap]
 321.725 -  jane.user@example.com = jane
 321.726 -\end{codesample2}
 321.727 -You can either keep the \rcsection{usermap} data in a normal \hgrc, or
 321.728 -tell the \hgext{bugzilla} hook to read the information from an
 321.729 -external \filename{usermap} file.  In the latter case, you can store
 321.730 -\filename{usermap} data by itself in (for example) a user-modifiable
 321.731 -repository.  This makes it possible to let your users maintain their
 321.732 -own \rcitem{bugzilla}{usermap} entries.  The main \hgrc\ file might
 321.733 -look like this:
 321.734 -\begin{codesample2}
 321.735 -  # regular hgrc file refers to external usermap file
 321.736 -  [bugzilla]
 321.737 -  usermap = /home/hg/repos/userdata/bugzilla-usermap.conf
 321.738 -\end{codesample2}
 321.739 -While the \filename{usermap} file that it refers to might look like
 321.740 -this:
 321.741 -\begin{codesample2}
 321.742 -  # bugzilla-usermap.conf - inside a hg repository
 321.743 -  [usermap]
 321.744 -  stephanie@example.com = steph
 321.745 -\end{codesample2}
 321.746 -
 321.747 -\subsubsection{Configuring the text that gets added to a bug}
 321.748 -
 321.749 -You can configure the text that this hook adds as a comment; you
 321.750 -specify it in the form of a Mercurial template.  Several \hgrc\
 321.751 -entries (still in the \rcsection{bugzilla} section) control this
 321.752 -behaviour.
 321.753 -\begin{itemize}
 321.754 -\item[\texttt{strip}] The number of leading path elements to strip
 321.755 -  from a repository's path name to construct a partial path for a URL.
 321.756 -  For example, if the repositories on your server live under
 321.757 -  \dirname{/home/hg/repos}, and you have a repository whose path is
 321.758 -  \dirname{/home/hg/repos/app/tests}, then setting \texttt{strip} to
 321.759 -  \texttt{4} will give a partial path of \dirname{app/tests}.  The
 321.760 -  hook will make this partial path available when expanding a
 321.761 -  template, as \texttt{webroot}.
 321.762 -\item[\texttt{template}] The text of the template to use.  In addition
 321.763 -  to the usual changeset-related variables, this template can use
 321.764 -  \texttt{hgweb} (the value of the \texttt{hgweb} configuration item
 321.765 -  above) and \texttt{webroot} (the path constructed using
 321.766 -  \texttt{strip} above).
 321.767 -\end{itemize}
 321.768 -
 321.769 -In addition, you can add a \rcitem{web}{baseurl} item to the
 321.770 -\rcsection{web} section of your \hgrc.  The \hgext{bugzilla} hook will
 321.771 -make this available when expanding a template, as the base string to
 321.772 -use when constructing a URL that will let users browse from a Bugzilla
 321.773 -comment to view a changeset.  Example:
 321.774 -\begin{codesample2}
 321.775 -  [web]
 321.776 -  baseurl = http://hg.domain.com/
 321.777 -\end{codesample2}
 321.778 -
 321.779 -Here is an example set of \hgext{bugzilla} hook config information.
 321.780 -\begin{codesample2}
 321.781 -  [bugzilla]
 321.782 -  host = bugzilla.example.com
 321.783 -  password = mypassword
 321.784 -  version = 2.16
 321.785 -  # server-side repos live in /home/hg/repos, so strip 4 leading
 321.786 -  # separators
 321.787 -  strip = 4
 321.788 -  hgweb = http://hg.example.com/
 321.789 -  usermap = /home/hg/repos/notify/bugzilla.conf
 321.790 -  template = Changeset \{node|short\}, made by \{author\} in the \{webroot\}
 321.791 -    repo, refers to this bug.\\nFor complete details, see 
 321.792 -    \{hgweb\}\{webroot\}?cmd=changeset;node=\{node|short\}\\nChangeset
 321.793 -    description:\\n\\t\{desc|tabindent\}
 321.794 -\end{codesample2}
 321.795 -
 321.796 -\subsubsection{Testing and troubleshooting}
 321.797 -
 321.798 -The most common problems with configuring the \hgext{bugzilla} hook
 321.799 -relate to running Bugzilla's \filename{processmail} script and mapping
 321.800 -committer names to user names.
 321.801 -
 321.802 -Recall from section~\ref{sec:hook:bugzilla:config} above that the user
 321.803 -that runs the Mercurial process on the server is also the one that
 321.804 -will run the \filename{processmail} script.  The
 321.805 -\filename{processmail} script sometimes causes Bugzilla to write to
 321.806 -files in its configuration directory, and Bugzilla's configuration
 321.807 -files are usually owned by the user that your web server runs under.
 321.808 -
 321.809 -You can cause \filename{processmail} to be run with the suitable
 321.810 -user's identity using the \command{sudo} command.  Here is an example
 321.811 -entry for a \filename{sudoers} file.
 321.812 -\begin{codesample2}
 321.813 -  hg_user = (httpd_user) NOPASSWD: /var/www/html/bugzilla/processmail-wrapper %s
 321.814 -\end{codesample2}
 321.815 -This allows the \texttt{hg\_user} user to run a
 321.816 -\filename{processmail-wrapper} program under the identity of
 321.817 -\texttt{httpd\_user}.
 321.818 -
 321.819 -This indirection through a wrapper script is necessary, because
 321.820 -\filename{processmail} expects to be run with its current directory
 321.821 -set to wherever you installed Bugzilla; you can't specify that kind of
 321.822 -constraint in a \filename{sudoers} file.  The contents of the wrapper
 321.823 -script are simple:
 321.824 -\begin{codesample2}
 321.825 -  #!/bin/sh
 321.826 -  cd `dirname $0` && ./processmail "$1" nobody@example.com
 321.827 -\end{codesample2}
 321.828 -It doesn't seem to matter what email address you pass to
 321.829 -\filename{processmail}.
 321.830 -
 321.831 -If your \rcsection{usermap} is not set up correctly, users will see an
 321.832 -error message from the \hgext{bugzilla} hook when they push changes
 321.833 -to the server.  The error message will look like this:
 321.834 -\begin{codesample2}
 321.835 -  cannot find bugzilla user id for john.q.public@example.com
 321.836 -\end{codesample2}
 321.837 -What this means is that the committer's address,
 321.838 -\texttt{john.q.public@example.com}, is not a valid Bugzilla user name,
 321.839 -nor does it have an entry in your \rcsection{usermap} that maps it to
 321.840 -a valid Bugzilla user name.
 321.841 -
 321.842 -\subsection{\hgext{notify}---send email notifications}
 321.843 -
 321.844 -Although Mercurial's built-in web server provides RSS feeds of changes
 321.845 -in every repository, many people prefer to receive change
 321.846 -notifications via email.  The \hgext{notify} hook lets you send out
 321.847 -notifications to a set of email addresses whenever changesets arrive
 321.848 -that those subscribers are interested in.
 321.849 -
 321.850 -As with the \hgext{bugzilla} hook, the \hgext{notify} hook is
 321.851 -template-driven, so you can customise the contents of the notification
 321.852 -messages that it sends.
 321.853 -
 321.854 -By default, the \hgext{notify} hook includes a diff of every changeset
 321.855 -that it sends out; you can limit the size of the diff, or turn this
 321.856 -feature off entirely.  It is useful for letting subscribers review
 321.857 -changes immediately, rather than clicking to follow a URL.
 321.858 -
 321.859 -\subsubsection{Configuring the \hgext{notify} hook}
 321.860 -
 321.861 -You can set up the \hgext{notify} hook to send one email message per
 321.862 -incoming changeset, or one per incoming group of changesets (all those
 321.863 -that arrived in a single pull or push).
 321.864 -\begin{codesample2}
 321.865 -  [hooks]
 321.866 -  # send one email per group of changes
 321.867 -  changegroup.notify = python:hgext.notify.hook
 321.868 -  # send one email per change
 321.869 -  incoming.notify = python:hgext.notify.hook
 321.870 -\end{codesample2}
 321.871 -
 321.872 -Configuration information for this hook lives in the
 321.873 -\rcsection{notify} section of a \hgrc\ file.
 321.874 -\begin{itemize}
 321.875 -\item[\rcitem{notify}{test}] By default, this hook does not send out
 321.876 -  email at all; instead, it prints the message that it \emph{would}
 321.877 -  send.  Set this item to \texttt{false} to allow email to be sent.
 321.878 -  The reason that sending of email is turned off by default is that it
 321.879 -  takes several tries to configure this extension exactly as you would
 321.880 -  like, and it would be bad form to spam subscribers with a number of
 321.881 -  ``broken'' notifications while you debug your configuration.
 321.882 -\item[\rcitem{notify}{config}] The path to a configuration file that
 321.883 -  contains subscription information.  This is kept separate from the
 321.884 -  main \hgrc\ so that you can maintain it in a repository of its own.
 321.885 -  People can then clone that repository, update their subscriptions,
 321.886 -  and push the changes back to your server.
 321.887 -\item[\rcitem{notify}{strip}] The number of leading path separator
 321.888 -  characters to strip from a repository's path, when deciding whether
 321.889 -  a repository has subscribers.  For example, if the repositories on
 321.890 -  your server live in \dirname{/home/hg/repos}, and \hgext{notify} is
 321.891 -  considering a repository named \dirname{/home/hg/repos/shared/test},
 321.892 -  setting \rcitem{notify}{strip} to \texttt{4} will cause
 321.893 -  \hgext{notify} to trim the path it considers down to
 321.894 -  \dirname{shared/test}, and it will match subscribers against that.
 321.895 -\item[\rcitem{notify}{template}] The template text to use when sending
 321.896 -  messages.  This specifies both the contents of the message header
 321.897 -  and its body.
 321.898 -\item[\rcitem{notify}{maxdiff}] The maximum number of lines of diff
 321.899 -  data to append to the end of a message.  If a diff is longer than
 321.900 -  this, it is truncated.  By default, this is set to 300.  Set this to
 321.901 -  \texttt{0} to omit diffs from notification emails.
 321.902 -\item[\rcitem{notify}{sources}] A list of sources of changesets to
 321.903 -  consider.  This lets you limit \hgext{notify} to only sending out
 321.904 -  email about changes that remote users pushed into this repository
 321.905 -  via a server, for example.  See section~\ref{sec:hook:sources} for
 321.906 -  the sources you can specify here.
 321.907 -\end{itemize}
 321.908 -
 321.909 -If you set the \rcitem{web}{baseurl} item in the \rcsection{web}
 321.910 -section, you can use it in a template; it will be available as
 321.911 -\texttt{webroot}.
 321.912 -
 321.913 -Here is an example set of \hgext{notify} configuration information.
 321.914 -\begin{codesample2}
 321.915 -  [notify]
 321.916 -  # really send email
 321.917 -  test = false
 321.918 -  # subscriber data lives in the notify repo
 321.919 -  config = /home/hg/repos/notify/notify.conf
 321.920 -  # repos live in /home/hg/repos on server, so strip 4 "/" chars
 321.921 -  strip = 4
 321.922 -  template = X-Hg-Repo: \{webroot\}
 321.923 -    Subject: \{webroot\}: \{desc|firstline|strip\}
 321.924 -    From: \{author\}
 321.925 -
 321.926 -    changeset \{node|short\} in \{root\}
 321.927 -    details: \{baseurl\}\{webroot\}?cmd=changeset;node=\{node|short\}
 321.928 -    description:
 321.929 -      \{desc|tabindent|strip\}
 321.930 -
 321.931 -  [web]
 321.932 -  baseurl = http://hg.example.com/
 321.933 -\end{codesample2}
 321.934 -
 321.935 -This will produce a message that looks like the following:
 321.936 -\begin{codesample2}
 321.937 -  X-Hg-Repo: tests/slave
 321.938 -  Subject: tests/slave: Handle error case when slave has no buffers
 321.939 -  Date: Wed,  2 Aug 2006 15:25:46 -0700 (PDT)
 321.940 -
 321.941 -  changeset 3cba9bfe74b5 in /home/hg/repos/tests/slave
 321.942 -  details: http://hg.example.com/tests/slave?cmd=changeset;node=3cba9bfe74b5
 321.943 -  description:
 321.944 -          Handle error case when slave has no buffers
 321.945 -  diffs (54 lines):
 321.946 -
 321.947 -  diff -r 9d95df7cf2ad -r 3cba9bfe74b5 include/tests.h
 321.948 -  --- a/include/tests.h      Wed Aug 02 15:19:52 2006 -0700
 321.949 -  +++ b/include/tests.h      Wed Aug 02 15:25:26 2006 -0700
 321.950 -  @@ -212,6 +212,15 @@ static __inline__ void test_headers(void *h)
 321.951 -  [...snip...]
 321.952 -\end{codesample2}
 321.953 -
 321.954 -\subsubsection{Testing and troubleshooting}
 321.955 -
 321.956 -Do not forget that by default, the \hgext{notify} extension \emph{will
 321.957 -  not send any mail} until you explicitly configure it to do so, by
 321.958 -setting \rcitem{notify}{test} to \texttt{false}.  Until you do that,
 321.959 -it simply prints the message it \emph{would} send.
 321.960 -
 321.961 -\section{Information for writers of hooks}
 321.962 -\label{sec:hook:ref}
 321.963 -
 321.964 -\subsection{In-process hook execution}
 321.965 -
 321.966 -An in-process hook is called with arguments of the following form:
 321.967 -\begin{codesample2}
 321.968 -  def myhook(ui, repo, **kwargs):
 321.969 -      pass
 321.970 -\end{codesample2}
 321.971 -The \texttt{ui} parameter is a \pymodclass{mercurial.ui}{ui} object.
 321.972 -The \texttt{repo} parameter is a
 321.973 -\pymodclass{mercurial.localrepo}{localrepository} object.  The
 321.974 -names and values of the \texttt{**kwargs} parameters depend on the
 321.975 -hook being invoked, with the following common features:
 321.976 -\begin{itemize}
 321.977 -\item If a parameter is named \texttt{node} or
 321.978 -  \texttt{parent\emph{N}}, it will contain a hexadecimal changeset ID.
 321.979 -  The empty string is used to represent ``null changeset ID'' instead
 321.980 -  of a string of zeroes.
 321.981 -\item If a parameter is named \texttt{url}, it will contain the URL of
 321.982 -  a remote repository, if that can be determined.
 321.983 -\item Boolean-valued parameters are represented as Python
 321.984 -  \texttt{bool} objects.
 321.985 -\end{itemize}
 321.986 -
 321.987 -An in-process hook is called without a change to the process's working
 321.988 -directory (unlike external hooks, which are run in the root of the
 321.989 -repository).  It must not change the process's working directory, or
 321.990 -it will cause any calls it makes into the Mercurial API to fail.
 321.991 -
 321.992 -If a hook returns a boolean ``false'' value, it is considered to have
 321.993 -succeeded.  If it returns a boolean ``true'' value or raises an
 321.994 -exception, it is considered to have failed.  A useful way to think of
 321.995 -the calling convention is ``tell me if you fail''.
 321.996 -
 321.997 -Note that changeset IDs are passed into Python hooks as hexadecimal
 321.998 -strings, not the binary hashes that Mercurial's APIs normally use.  To
 321.999 -convert a hash from hex to binary, use the
321.1000 -\pymodfunc{mercurial.node}{bin} function.
321.1001 -
321.1002 -\subsection{External hook execution}
321.1003 -
321.1004 -An external hook is passed to the shell of the user running Mercurial.
321.1005 -Features of that shell, such as variable substitution and command
321.1006 -redirection, are available.  The hook is run in the root directory of
321.1007 -the repository (unlike in-process hooks, which are run in the same
321.1008 -directory that Mercurial was run in).
321.1009 -
321.1010 -Hook parameters are passed to the hook as environment variables.  Each
321.1011 -environment variable's name is converted in upper case and prefixed
321.1012 -with the string ``\texttt{HG\_}''.  For example, if the name of a
321.1013 -parameter is ``\texttt{node}'', the name of the environment variable
321.1014 -representing that parameter will be ``\texttt{HG\_NODE}''.
321.1015 -
321.1016 -A boolean parameter is represented as the string ``\texttt{1}'' for
321.1017 -``true'', ``\texttt{0}'' for ``false''.  If an environment variable is
321.1018 -named \envar{HG\_NODE}, \envar{HG\_PARENT1} or \envar{HG\_PARENT2}, it
321.1019 -contains a changeset ID represented as a hexadecimal string.  The
321.1020 -empty string is used to represent ``null changeset ID'' instead of a
321.1021 -string of zeroes.  If an environment variable is named
321.1022 -\envar{HG\_URL}, it will contain the URL of a remote repository, if
321.1023 -that can be determined.
321.1024 -
321.1025 -If a hook exits with a status of zero, it is considered to have
321.1026 -succeeded.  If it exits with a non-zero status, it is considered to
321.1027 -have failed.
321.1028 -
321.1029 -\subsection{Finding out where changesets come from}
321.1030 -
321.1031 -A hook that involves the transfer of changesets between a local
321.1032 -repository and another may be able to find out information about the
321.1033 -``far side''.  Mercurial knows \emph{how} changes are being
321.1034 -transferred, and in many cases \emph{where} they are being transferred
321.1035 -to or from.
321.1036 -
321.1037 -\subsubsection{Sources of changesets}
321.1038 -\label{sec:hook:sources}
321.1039 -
321.1040 -Mercurial will tell a hook what means are, or were, used to transfer
321.1041 -changesets between repositories.  This is provided by Mercurial in a
321.1042 -Python parameter named \texttt{source}, or an environment variable named
321.1043 -\envar{HG\_SOURCE}.
321.1044 -
321.1045 -\begin{itemize}
321.1046 -\item[\texttt{serve}] Changesets are transferred to or from a remote
321.1047 -  repository over http or ssh.
321.1048 -\item[\texttt{pull}] Changesets are being transferred via a pull from
321.1049 -  one repository into another.
321.1050 -\item[\texttt{push}] Changesets are being transferred via a push from
321.1051 -  one repository into another.
321.1052 -\item[\texttt{bundle}] Changesets are being transferred to or from a
321.1053 -  bundle.
321.1054 -\end{itemize}
321.1055 -
321.1056 -\subsubsection{Where changes are going---remote repository URLs}
321.1057 -\label{sec:hook:url}
321.1058 -
321.1059 -When possible, Mercurial will tell a hook the location of the ``far
321.1060 -side'' of an activity that transfers changeset data between
321.1061 -repositories.  This is provided by Mercurial in a Python parameter
321.1062 -named \texttt{url}, or an environment variable named \envar{HG\_URL}.
321.1063 -
321.1064 -This information is not always known.  If a hook is invoked in a
321.1065 -repository that is being served via http or ssh, Mercurial cannot tell
321.1066 -where the remote repository is, but it may know where the client is
321.1067 -connecting from.  In such cases, the URL will take one of the
321.1068 -following forms:
321.1069 -\begin{itemize}
321.1070 -\item \texttt{remote:ssh:\emph{ip-address}}---remote ssh client, at
321.1071 -  the given IP address.
321.1072 -\item \texttt{remote:http:\emph{ip-address}}---remote http client, at
321.1073 -  the given IP address.  If the client is using SSL, this will be of
321.1074 -  the form \texttt{remote:https:\emph{ip-address}}.
321.1075 -\item Empty---no information could be discovered about the remote
321.1076 -  client.
321.1077 -\end{itemize}
321.1078 -
321.1079 -\section{Hook reference}
321.1080 -
321.1081 -\subsection{\hook{changegroup}---after remote changesets added}
321.1082 -\label{sec:hook:changegroup}
321.1083 -
321.1084 -This hook is run after a group of pre-existing changesets has been
321.1085 -added to the repository, for example via a \hgcmd{pull} or
321.1086 -\hgcmd{unbundle}.  This hook is run once per operation that added one
321.1087 -or more changesets.  This is in contrast to the \hook{incoming} hook,
321.1088 -which is run once per changeset, regardless of whether the changesets
321.1089 -arrive in a group.
321.1090 -
321.1091 -Some possible uses for this hook include kicking off an automated
321.1092 -build or test of the added changesets, updating a bug database, or
321.1093 -notifying subscribers that a repository contains new changes.
321.1094 -
321.1095 -Parameters to this hook:
321.1096 -\begin{itemize}
321.1097 -\item[\texttt{node}] A changeset ID.  The changeset ID of the first
321.1098 -  changeset in the group that was added.  All changesets between this
321.1099 -  and \index{tags!\texttt{tip}}\texttt{tip}, inclusive, were added by
321.1100 -  a single \hgcmd{pull}, \hgcmd{push} or \hgcmd{unbundle}.
321.1101 -\item[\texttt{source}] A string.  The source of these changes.  See
321.1102 -  section~\ref{sec:hook:sources} for details.
321.1103 -\item[\texttt{url}] A URL.  The location of the remote repository, if
321.1104 -  known.  See section~\ref{sec:hook:url} for more information.
321.1105 -\end{itemize}
321.1106 -
321.1107 -See also: \hook{incoming} (section~\ref{sec:hook:incoming}),
321.1108 -\hook{prechangegroup} (section~\ref{sec:hook:prechangegroup}),
321.1109 -\hook{pretxnchangegroup} (section~\ref{sec:hook:pretxnchangegroup})
321.1110 -
321.1111 -\subsection{\hook{commit}---after a new changeset is created}
321.1112 -\label{sec:hook:commit}
321.1113 -
321.1114 -This hook is run after a new changeset has been created.
321.1115 -
321.1116 -Parameters to this hook:
321.1117 -\begin{itemize}
321.1118 -\item[\texttt{node}] A changeset ID.  The changeset ID of the newly
321.1119 -  committed changeset.
321.1120 -\item[\texttt{parent1}] A changeset ID.  The changeset ID of the first
321.1121 -  parent of the newly committed changeset.
321.1122 -\item[\texttt{parent2}] A changeset ID.  The changeset ID of the second
321.1123 -  parent of the newly committed changeset.
321.1124 -\end{itemize}
321.1125 -
321.1126 -See also: \hook{precommit} (section~\ref{sec:hook:precommit}),
321.1127 -\hook{pretxncommit} (section~\ref{sec:hook:pretxncommit})
321.1128 -
321.1129 -\subsection{\hook{incoming}---after one remote changeset is added}
321.1130 -\label{sec:hook:incoming}
321.1131 -
321.1132 -This hook is run after a pre-existing changeset has been added to the
321.1133 -repository, for example via a \hgcmd{push}.  If a group of changesets
321.1134 -was added in a single operation, this hook is called once for each
321.1135 -added changeset.
321.1136 -
321.1137 -You can use this hook for the same purposes as the \hook{changegroup}
321.1138 -hook (section~\ref{sec:hook:changegroup}); it's simply more convenient
321.1139 -sometimes to run a hook once per group of changesets, while other
321.1140 -times it's handier once per changeset.
321.1141 -
321.1142 -Parameters to this hook:
321.1143 -\begin{itemize}
321.1144 -\item[\texttt{node}] A changeset ID.  The ID of the newly added
321.1145 -  changeset.
321.1146 -\item[\texttt{source}] A string.  The source of these changes.  See
321.1147 -  section~\ref{sec:hook:sources} for details.
321.1148 -\item[\texttt{url}] A URL.  The location of the remote repository, if
321.1149 -  known.  See section~\ref{sec:hook:url} for more information.
321.1150 -\end{itemize}
321.1151 -
321.1152 -See also: \hook{changegroup} (section~\ref{sec:hook:changegroup}) \hook{prechangegroup} (section~\ref{sec:hook:prechangegroup}), \hook{pretxnchangegroup} (section~\ref{sec:hook:pretxnchangegroup})
321.1153 -
321.1154 -\subsection{\hook{outgoing}---after changesets are propagated}
321.1155 -\label{sec:hook:outgoing}
321.1156 -
321.1157 -This hook is run after a group of changesets has been propagated out
321.1158 -of this repository, for example by a \hgcmd{push} or \hgcmd{bundle}
321.1159 -command.
321.1160 -
321.1161 -One possible use for this hook is to notify administrators that
321.1162 -changes have been pulled.
321.1163 -
321.1164 -Parameters to this hook:
321.1165 -\begin{itemize}
321.1166 -\item[\texttt{node}] A changeset ID.  The changeset ID of the first
321.1167 -  changeset of the group that was sent.
321.1168 -\item[\texttt{source}] A string.  The source of the of the operation
321.1169 -  (see section~\ref{sec:hook:sources}).  If a remote client pulled
321.1170 -  changes from this repository, \texttt{source} will be
321.1171 -  \texttt{serve}.  If the client that obtained changes from this
321.1172 -  repository was local, \texttt{source} will be \texttt{bundle},
321.1173 -  \texttt{pull}, or \texttt{push}, depending on the operation the
321.1174 -  client performed.
321.1175 -\item[\texttt{url}] A URL.  The location of the remote repository, if
321.1176 -  known.  See section~\ref{sec:hook:url} for more information.
321.1177 -\end{itemize}
321.1178 -
321.1179 -See also: \hook{preoutgoing} (section~\ref{sec:hook:preoutgoing})
321.1180 -
321.1181 -\subsection{\hook{prechangegroup}---before starting to add remote changesets}
321.1182 -\label{sec:hook:prechangegroup}
321.1183 -
321.1184 -This controlling hook is run before Mercurial begins to add a group of
321.1185 -changesets from another repository.
321.1186 -
321.1187 -This hook does not have any information about the changesets to be
321.1188 -added, because it is run before transmission of those changesets is
321.1189 -allowed to begin.  If this hook fails, the changesets will not be
321.1190 -transmitted.
321.1191 -
321.1192 -One use for this hook is to prevent external changes from being added
321.1193 -to a repository.  For example, you could use this to ``freeze'' a
321.1194 -server-hosted branch temporarily or permanently so that users cannot
321.1195 -push to it, while still allowing a local administrator to modify the
321.1196 -repository.
321.1197 -
321.1198 -Parameters to this hook:
321.1199 -\begin{itemize}
321.1200 -\item[\texttt{source}] A string.  The source of these changes.  See
321.1201 -  section~\ref{sec:hook:sources} for details.
321.1202 -\item[\texttt{url}] A URL.  The location of the remote repository, if
321.1203 -  known.  See section~\ref{sec:hook:url} for more information.
321.1204 -\end{itemize}
321.1205 -
321.1206 -See also: \hook{changegroup} (section~\ref{sec:hook:changegroup}),
321.1207 -\hook{incoming} (section~\ref{sec:hook:incoming}), ,
321.1208 -\hook{pretxnchangegroup} (section~\ref{sec:hook:pretxnchangegroup})
321.1209 -
321.1210 -\subsection{\hook{precommit}---before starting to commit a changeset}
321.1211 -\label{sec:hook:precommit}
321.1212 -
321.1213 -This hook is run before Mercurial begins to commit a new changeset.
321.1214 -It is run before Mercurial has any of the metadata for the commit,
321.1215 -such as the files to be committed, the commit message, or the commit
321.1216 -date.
321.1217 -
321.1218 -One use for this hook is to disable the ability to commit new
321.1219 -changesets, while still allowing incoming changesets.  Another is to
321.1220 -run a build or test, and only allow the commit to begin if the build
321.1221 -or test succeeds.
321.1222 -
321.1223 -Parameters to this hook:
321.1224 -\begin{itemize}
321.1225 -\item[\texttt{parent1}] A changeset ID.  The changeset ID of the first
321.1226 -  parent of the working directory.
321.1227 -\item[\texttt{parent2}] A changeset ID.  The changeset ID of the second
321.1228 -  parent of the working directory.
321.1229 -\end{itemize}
321.1230 -If the commit proceeds, the parents of the working directory will
321.1231 -become the parents of the new changeset.
321.1232 -
321.1233 -See also: \hook{commit} (section~\ref{sec:hook:commit}),
321.1234 -\hook{pretxncommit} (section~\ref{sec:hook:pretxncommit})
321.1235 -
321.1236 -\subsection{\hook{preoutgoing}---before starting to propagate changesets}
321.1237 -\label{sec:hook:preoutgoing}
321.1238 -
321.1239 -This hook is invoked before Mercurial knows the identities of the
321.1240 -changesets to be transmitted.
321.1241 -
321.1242 -One use for this hook is to prevent changes from being transmitted to
321.1243 -another repository.
321.1244 -
321.1245 -Parameters to this hook:
321.1246 -\begin{itemize}
321.1247 -\item[\texttt{source}] A string.  The source of the operation that is
321.1248 -  attempting to obtain changes from this repository (see
321.1249 -  section~\ref{sec:hook:sources}).  See the documentation for the
321.1250 -  \texttt{source} parameter to the \hook{outgoing} hook, in
321.1251 -  section~\ref{sec:hook:outgoing}, for possible values of this
321.1252 -  parameter.
321.1253 -\item[\texttt{url}] A URL.  The location of the remote repository, if
321.1254 -  known.  See section~\ref{sec:hook:url} for more information.
321.1255 -\end{itemize}
321.1256 -
321.1257 -See also: \hook{outgoing} (section~\ref{sec:hook:outgoing})
321.1258 -
321.1259 -\subsection{\hook{pretag}---before tagging a changeset}
321.1260 -\label{sec:hook:pretag}
321.1261 -
321.1262 -This controlling hook is run before a tag is created.  If the hook
321.1263 -succeeds, creation of the tag proceeds.  If the hook fails, the tag is
321.1264 -not created.
321.1265 -
321.1266 -Parameters to this hook:
321.1267 -\begin{itemize}
321.1268 -\item[\texttt{local}] A boolean.  Whether the tag is local to this
321.1269 -  repository instance (i.e.~stored in \sfilename{.hg/localtags}) or
321.1270 -  managed by Mercurial (stored in \sfilename{.hgtags}).
321.1271 -\item[\texttt{node}] A changeset ID.  The ID of the changeset to be tagged.
321.1272 -\item[\texttt{tag}] A string.  The name of the tag to be created.
321.1273 -\end{itemize}
321.1274 -
321.1275 -If the tag to be created is revision-controlled, the \hook{precommit}
321.1276 -and \hook{pretxncommit} hooks (sections~\ref{sec:hook:commit}
321.1277 -and~\ref{sec:hook:pretxncommit}) will also be run.
321.1278 -
321.1279 -See also: \hook{tag} (section~\ref{sec:hook:tag})
321.1280 -
321.1281 -\subsection{\hook{pretxnchangegroup}---before completing addition of
321.1282 -  remote changesets}
321.1283 -\label{sec:hook:pretxnchangegroup}
321.1284 -
321.1285 -This controlling hook is run before a transaction---that manages the
321.1286 -addition of a group of new changesets from outside the
321.1287 -repository---completes.  If the hook succeeds, the transaction
321.1288 -completes, and all of the changesets become permanent within this
321.1289 -repository.  If the hook fails, the transaction is rolled back, and
321.1290 -the data for the changesets is erased.
321.1291 -
321.1292 -This hook can access the metadata associated with the almost-added
321.1293 -changesets, but it should not do anything permanent with this data.
321.1294 -It must also not modify the working directory.
321.1295 -
321.1296 -While this hook is running, if other Mercurial processes access this
321.1297 -repository, they will be able to see the almost-added changesets as if
321.1298 -they are permanent.  This may lead to race conditions if you do not
321.1299 -take steps to avoid them.
321.1300 -
321.1301 -This hook can be used to automatically vet a group of changesets.  If
321.1302 -the hook fails, all of the changesets are ``rejected'' when the
321.1303 -transaction rolls back.
321.1304 -
321.1305 -Parameters to this hook:
321.1306 -\begin{itemize}
321.1307 -\item[\texttt{node}] A changeset ID.  The changeset ID of the first
321.1308 -  changeset in the group that was added.  All changesets between this
321.1309 -  and \index{tags!\texttt{tip}}\texttt{tip}, inclusive, were added by
321.1310 -  a single \hgcmd{pull}, \hgcmd{push} or \hgcmd{unbundle}.
321.1311 -\item[\texttt{source}] A string.  The source of these changes.  See
321.1312 -  section~\ref{sec:hook:sources} for details.
321.1313 -\item[\texttt{url}] A URL.  The location of the remote repository, if
321.1314 -  known.  See section~\ref{sec:hook:url} for more information.
321.1315 -\end{itemize}
321.1316 -
321.1317 -See also: \hook{changegroup} (section~\ref{sec:hook:changegroup}),
321.1318 -\hook{incoming} (section~\ref{sec:hook:incoming}),
321.1319 -\hook{prechangegroup} (section~\ref{sec:hook:prechangegroup})
321.1320 -
321.1321 -\subsection{\hook{pretxncommit}---before completing commit of new changeset}
321.1322 -\label{sec:hook:pretxncommit}
321.1323 -
321.1324 -This controlling hook is run before a transaction---that manages a new
321.1325 -commit---completes.  If the hook succeeds, the transaction completes
321.1326 -and the changeset becomes permanent within this repository.  If the
321.1327 -hook fails, the transaction is rolled back, and the commit data is
321.1328 -erased.
321.1329 -
321.1330 -This hook can access the metadata associated with the almost-new
321.1331 -changeset, but it should not do anything permanent with this data.  It
321.1332 -must also not modify the working directory.
321.1333 -
321.1334 -While this hook is running, if other Mercurial processes access this
321.1335 -repository, they will be able to see the almost-new changeset as if it
321.1336 -is permanent.  This may lead to race conditions if you do not take
321.1337 -steps to avoid them.
321.1338 -
321.1339 -Parameters to this hook:
321.1340 -\begin{itemize}
321.1341 -\item[\texttt{node}] A changeset ID.  The changeset ID of the newly
321.1342 -  committed changeset.
321.1343 -\item[\texttt{parent1}] A changeset ID.  The changeset ID of the first
321.1344 -  parent of the newly committed changeset.
321.1345 -\item[\texttt{parent2}] A changeset ID.  The changeset ID of the second
321.1346 -  parent of the newly committed changeset.
321.1347 -\end{itemize}
321.1348 -
321.1349 -See also: \hook{precommit} (section~\ref{sec:hook:precommit})
321.1350 -
321.1351 -\subsection{\hook{preupdate}---before updating or merging working directory}
321.1352 -\label{sec:hook:preupdate}
321.1353 -
321.1354 -This controlling hook is run before an update or merge of the working
321.1355 -directory begins.  It is run only if Mercurial's normal pre-update
321.1356 -checks determine that the update or merge can proceed.  If the hook
321.1357 -succeeds, the update or merge may proceed; if it fails, the update or
321.1358 -merge does not start.
321.1359 -
321.1360 -Parameters to this hook:
321.1361 -\begin{itemize}
321.1362 -\item[\texttt{parent1}] A changeset ID.  The ID of the parent that the
321.1363 -  working directory is to be updated to.  If the working directory is
321.1364 -  being merged, it will not change this parent.
321.1365 -\item[\texttt{parent2}] A changeset ID.  Only set if the working
321.1366 -  directory is being merged.  The ID of the revision that the working
321.1367 -  directory is being merged with.
321.1368 -\end{itemize}
321.1369 -
321.1370 -See also: \hook{update} (section~\ref{sec:hook:update})
321.1371 -
321.1372 -\subsection{\hook{tag}---after tagging a changeset}
321.1373 -\label{sec:hook:tag}
321.1374 -
321.1375 -This hook is run after a tag has been created.
321.1376 -
321.1377 -Parameters to this hook:
321.1378 -\begin{itemize}
321.1379 -\item[\texttt{local}] A boolean.  Whether the new tag is local to this
321.1380 -  repository instance (i.e.~stored in \sfilename{.hg/localtags}) or
321.1381 -  managed by Mercurial (stored in \sfilename{.hgtags}).
321.1382 -\item[\texttt{node}] A changeset ID.  The ID of the changeset that was
321.1383 -  tagged.
321.1384 -\item[\texttt{tag}] A string.  The name of the tag that was created.
321.1385 -\end{itemize}
321.1386 -
321.1387 -If the created tag is revision-controlled, the \hook{commit} hook
321.1388 -(section~\ref{sec:hook:commit}) is run before this hook.
321.1389 -
321.1390 -See also: \hook{pretag} (section~\ref{sec:hook:pretag})
321.1391 -
321.1392 -\subsection{\hook{update}---after updating or merging working directory}
321.1393 -\label{sec:hook:update}
321.1394 -
321.1395 -This hook is run after an update or merge of the working directory
321.1396 -completes.  Since a merge can fail (if the external \command{hgmerge}
321.1397 -command fails to resolve conflicts in a file), this hook communicates
321.1398 -whether the update or merge completed cleanly.
321.1399 -
321.1400 -\begin{itemize}
321.1401 -\item[\texttt{error}] A boolean.  Indicates whether the update or
321.1402 -  merge completed successfully.
321.1403 -\item[\texttt{parent1}] A changeset ID.  The ID of the parent that the
321.1404 -  working directory was updated to.  If the working directory was
321.1405 -  merged, it will not have changed this parent.
321.1406 -\item[\texttt{parent2}] A changeset ID.  Only set if the working
321.1407 -  directory was merged.  The ID of the revision that the working
321.1408 -  directory was merged with.
321.1409 -\end{itemize}
321.1410 -
321.1411 -See also: \hook{preupdate} (section~\ref{sec:hook:preupdate})
321.1412 -
321.1413 -%%% Local Variables: 
321.1414 -%%% mode: latex
321.1415 -%%% TeX-master: "00book"
321.1416 -%%% End: 
   322.1 --- a/en/htlatex.book	Thu Mar 26 08:57:10 2009 +0100
   322.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   322.3 @@ -1,12 +0,0 @@
   322.4 -#!/bin/bash
   322.5 -#
   322.6 -# This script is horrible.  It's essentially a hacked copy of
   322.7 -# /usr/bin/htlatex from Fedora Core 6.  I apologise for any lasting
   322.8 -# pain reading it causes.
   322.9 -
  322.10 -latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
  322.11 -(cd $4 && bibtex hgbook)
  322.12 -(cd $4 && makeindex hgbook)
  322.13 -latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
  322.14 -latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
  322.15 -echo status $$
   323.1 --- a/en/intro.tex	Thu Mar 26 08:57:10 2009 +0100
   323.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   323.3 @@ -1,561 +0,0 @@
   323.4 -\chapter{Introduction}
   323.5 -\label{chap:intro}
   323.6 -
   323.7 -\section{About revision control}
   323.8 -
   323.9 -Revision control is the process of managing multiple versions of a
  323.10 -piece of information.  In its simplest form, this is something that
  323.11 -many people do by hand: every time you modify a file, save it under a
  323.12 -new name that contains a number, each one higher than the number of
  323.13 -the preceding version.
  323.14 -
  323.15 -Manually managing multiple versions of even a single file is an
  323.16 -error-prone task, though, so software tools to help automate this
  323.17 -process have long been available.  The earliest automated revision
  323.18 -control tools were intended to help a single user to manage revisions
  323.19 -of a single file.  Over the past few decades, the scope of revision
  323.20 -control tools has expanded greatly; they now manage multiple files,
  323.21 -and help multiple people to work together.  The best modern revision
  323.22 -control tools have no problem coping with thousands of people working
  323.23 -together on projects that consist of hundreds of thousands of files.
  323.24 -
  323.25 -\subsection{Why use revision control?}
  323.26 -
  323.27 -There are a number of reasons why you or your team might want to use
  323.28 -an automated revision control tool for a project.
  323.29 -\begin{itemize}
  323.30 -\item It will track the history and evolution of your project, so you
  323.31 -  don't have to.  For every change, you'll have a log of \emph{who}
  323.32 -  made it; \emph{why} they made it; \emph{when} they made it; and
  323.33 -  \emph{what} the change was.
  323.34 -\item When you're working with other people, revision control software
  323.35 -  makes it easier for you to collaborate.  For example, when people
  323.36 -  more or less simultaneously make potentially incompatible changes,
  323.37 -  the software will help you to identify and resolve those conflicts.
  323.38 -\item It can help you to recover from mistakes.  If you make a change
  323.39 -  that later turns out to be in error, you can revert to an earlier
  323.40 -  version of one or more files.  In fact, a \emph{really} good
  323.41 -  revision control tool will even help you to efficiently figure out
  323.42 -  exactly when a problem was introduced (see
  323.43 -  section~\ref{sec:undo:bisect} for details).
  323.44 -\item It will help you to work simultaneously on, and manage the drift
  323.45 -  between, multiple versions of your project.
  323.46 -\end{itemize}
  323.47 -Most of these reasons are equally valid---at least in theory---whether
  323.48 -you're working on a project by yourself, or with a hundred other
  323.49 -people.
  323.50 -
  323.51 -A key question about the practicality of revision control at these two
  323.52 -different scales (``lone hacker'' and ``huge team'') is how its
  323.53 -\emph{benefits} compare to its \emph{costs}.  A revision control tool
  323.54 -that's difficult to understand or use is going to impose a high cost.
  323.55 -
  323.56 -A five-hundred-person project is likely to collapse under its own
  323.57 -weight almost immediately without a revision control tool and process.
  323.58 -In this case, the cost of using revision control might hardly seem
  323.59 -worth considering, since \emph{without} it, failure is almost
  323.60 -guaranteed.
  323.61 -
  323.62 -On the other hand, a one-person ``quick hack'' might seem like a poor
  323.63 -place to use a revision control tool, because surely the cost of using
  323.64 -one must be close to the overall cost of the project.  Right?
  323.65 -
  323.66 -Mercurial uniquely supports \emph{both} of these scales of
  323.67 -development.  You can learn the basics in just a few minutes, and due
  323.68 -to its low overhead, you can apply revision control to the smallest of
  323.69 -projects with ease.  Its simplicity means you won't have a lot of
  323.70 -abstruse concepts or command sequences competing for mental space with
  323.71 -whatever you're \emph{really} trying to do.  At the same time,
  323.72 -Mercurial's high performance and peer-to-peer nature let you scale
  323.73 -painlessly to handle large projects.
  323.74 -
  323.75 -No revision control tool can rescue a poorly run project, but a good
  323.76 -choice of tools can make a huge difference to the fluidity with which
  323.77 -you can work on a project.
  323.78 -
  323.79 -\subsection{The many names of revision control}
  323.80 -
  323.81 -Revision control is a diverse field, so much so that it doesn't
  323.82 -actually have a single name or acronym.  Here are a few of the more
  323.83 -common names and acronyms you'll encounter:
  323.84 -\begin{itemize}
  323.85 -\item Revision control (RCS)
  323.86 -\item Software configuration management (SCM), or configuration management
  323.87 -\item Source code management
  323.88 -\item Source code control, or source control
  323.89 -\item Version control (VCS)
  323.90 -\end{itemize}
  323.91 -Some people claim that these terms actually have different meanings,
  323.92 -but in practice they overlap so much that there's no agreed or even
  323.93 -useful way to tease them apart.
  323.94 -
  323.95 -\section{A short history of revision control}
  323.96 -
  323.97 -The best known of the old-time revision control tools is SCCS (Source
  323.98 -Code Control System), which Marc Rochkind wrote at Bell Labs, in the
  323.99 -early 1970s.  SCCS operated on individual files, and required every
 323.100 -person working on a project to have access to a shared workspace on a
 323.101 -single system.  Only one person could modify a file at any time;
 323.102 -arbitration for access to files was via locks.  It was common for
 323.103 -people to lock files, and later forget to unlock them, preventing
 323.104 -anyone else from modifying those files without the help of an
 323.105 -administrator.  
 323.106 -
 323.107 -Walter Tichy developed a free alternative to SCCS in the early 1980s;
 323.108 -he called his program RCS (Revison Control System).  Like SCCS, RCS
 323.109 -required developers to work in a single shared workspace, and to lock
 323.110 -files to prevent multiple people from modifying them simultaneously.
 323.111 -
 323.112 -Later in the 1980s, Dick Grune used RCS as a building block for a set
 323.113 -of shell scripts he initially called cmt, but then renamed to CVS
 323.114 -(Concurrent Versions System).  The big innovation of CVS was that it
 323.115 -let developers work simultaneously and somewhat independently in their
 323.116 -own personal workspaces.  The personal workspaces prevented developers
 323.117 -from stepping on each other's toes all the time, as was common with
 323.118 -SCCS and RCS.  Each developer had a copy of every project file, and
 323.119 -could modify their copies independently.  They had to merge their
 323.120 -edits prior to committing changes to the central repository.
 323.121 -
 323.122 -Brian Berliner took Grune's original scripts and rewrote them in~C,
 323.123 -releasing in 1989 the code that has since developed into the modern
 323.124 -version of CVS.  CVS subsequently acquired the ability to operate over
 323.125 -a network connection, giving it a client/server architecture.  CVS's
 323.126 -architecture is centralised; only the server has a copy of the history
 323.127 -of the project.  Client workspaces just contain copies of recent
 323.128 -versions of the project's files, and a little metadata to tell them
 323.129 -where the server is.  CVS has been enormously successful; it is
 323.130 -probably the world's most widely used revision control system.
 323.131 -
 323.132 -In the early 1990s, Sun Microsystems developed an early distributed
 323.133 -revision control system, called TeamWare.  A TeamWare workspace
 323.134 -contains a complete copy of the project's history.  TeamWare has no
 323.135 -notion of a central repository.  (CVS relied upon RCS for its history
 323.136 -storage; TeamWare used SCCS.)
 323.137 -
 323.138 -As the 1990s progressed, awareness grew of a number of problems with
 323.139 -CVS.  It records simultaneous changes to multiple files individually,
 323.140 -instead of grouping them together as a single logically atomic
 323.141 -operation.  It does not manage its file hierarchy well; it is easy to
 323.142 -make a mess of a repository by renaming files and directories.  Worse,
 323.143 -its source code is difficult to read and maintain, which made the
 323.144 -``pain level'' of fixing these architectural problems prohibitive.
 323.145 -
 323.146 -In 2001, Jim Blandy and Karl Fogel, two developers who had worked on
 323.147 -CVS, started a project to replace it with a tool that would have a
 323.148 -better architecture and cleaner code.  The result, Subversion, does
 323.149 -not stray from CVS's centralised client/server model, but it adds
 323.150 -multi-file atomic commits, better namespace management, and a number
 323.151 -of other features that make it a generally better tool than CVS.
 323.152 -Since its initial release, it has rapidly grown in popularity.
 323.153 -
 323.154 -More or less simultaneously, Graydon Hoare began working on an
 323.155 -ambitious distributed revision control system that he named Monotone.
 323.156 -While Monotone addresses many of CVS's design flaws and has a
 323.157 -peer-to-peer architecture, it goes beyond earlier (and subsequent)
 323.158 -revision control tools in a number of innovative ways.  It uses
 323.159 -cryptographic hashes as identifiers, and has an integral notion of
 323.160 -``trust'' for code from different sources.
 323.161 -
 323.162 -Mercurial began life in 2005.  While a few aspects of its design are
 323.163 -influenced by Monotone, Mercurial focuses on ease of use, high
 323.164 -performance, and scalability to very large projects.
 323.165 -
 323.166 -\section{Trends in revision control}
 323.167 -
 323.168 -There has been an unmistakable trend in the development and use of
 323.169 -revision control tools over the past four decades, as people have
 323.170 -become familiar with the capabilities of their tools and constrained
 323.171 -by their limitations.
 323.172 -
 323.173 -The first generation began by managing single files on individual
 323.174 -computers.  Although these tools represented a huge advance over
 323.175 -ad-hoc manual revision control, their locking model and reliance on a
 323.176 -single computer limited them to small, tightly-knit teams.
 323.177 -
 323.178 -The second generation loosened these constraints by moving to
 323.179 -network-centered architectures, and managing entire projects at a
 323.180 -time.  As projects grew larger, they ran into new problems.  With
 323.181 -clients needing to talk to servers very frequently, server scaling
 323.182 -became an issue for large projects.  An unreliable network connection
 323.183 -could prevent remote users from being able to talk to the server at
 323.184 -all.  As open source projects started making read-only access
 323.185 -available anonymously to anyone, people without commit privileges
 323.186 -found that they could not use the tools to interact with a project in
 323.187 -a natural way, as they could not record their changes.
 323.188 -
 323.189 -The current generation of revision control tools is peer-to-peer in
 323.190 -nature.  All of these systems have dropped the dependency on a single
 323.191 -central server, and allow people to distribute their revision control
 323.192 -data to where it's actually needed.  Collaboration over the Internet
 323.193 -has moved from constrained by technology to a matter of choice and
 323.194 -consensus.  Modern tools can operate offline indefinitely and
 323.195 -autonomously, with a network connection only needed when syncing
 323.196 -changes with another repository.
 323.197 -
 323.198 -\section{A few of the advantages of distributed revision control}
 323.199 -
 323.200 -Even though distributed revision control tools have for several years
 323.201 -been as robust and usable as their previous-generation counterparts,
 323.202 -people using older tools have not yet necessarily woken up to their
 323.203 -advantages.  There are a number of ways in which distributed tools
 323.204 -shine relative to centralised ones.
 323.205 -
 323.206 -For an individual developer, distributed tools are almost always much
 323.207 -faster than centralised tools.  This is for a simple reason: a
 323.208 -centralised tool needs to talk over the network for many common
 323.209 -operations, because most metadata is stored in a single copy on the
 323.210 -central server.  A distributed tool stores all of its metadata
 323.211 -locally.  All else being equal, talking over the network adds overhead
 323.212 -to a centralised tool.  Don't underestimate the value of a snappy,
 323.213 -responsive tool: you're going to spend a lot of time interacting with
 323.214 -your revision control software.
 323.215 -
 323.216 -Distributed tools are indifferent to the vagaries of your server
 323.217 -infrastructure, again because they replicate metadata to so many
 323.218 -locations.  If you use a centralised system and your server catches
 323.219 -fire, you'd better hope that your backup media are reliable, and that
 323.220 -your last backup was recent and actually worked.  With a distributed
 323.221 -tool, you have many backups available on every contributor's computer.
 323.222 -
 323.223 -The reliability of your network will affect distributed tools far less
 323.224 -than it will centralised tools.  You can't even use a centralised tool
 323.225 -without a network connection, except for a few highly constrained
 323.226 -commands.  With a distributed tool, if your network connection goes
 323.227 -down while you're working, you may not even notice.  The only thing
 323.228 -you won't be able to do is talk to repositories on other computers,
 323.229 -something that is relatively rare compared with local operations.  If
 323.230 -you have a far-flung team of collaborators, this may be significant.
 323.231 -
 323.232 -\subsection{Advantages for open source projects}
 323.233 -
 323.234 -If you take a shine to an open source project and decide that you
 323.235 -would like to start hacking on it, and that project uses a distributed
 323.236 -revision control tool, you are at once a peer with the people who
 323.237 -consider themselves the ``core'' of that project.  If they publish
 323.238 -their repositories, you can immediately copy their project history,
 323.239 -start making changes, and record your work, using the same tools in
 323.240 -the same ways as insiders.  By contrast, with a centralised tool, you
 323.241 -must use the software in a ``read only'' mode unless someone grants
 323.242 -you permission to commit changes to their central server.  Until then,
 323.243 -you won't be able to record changes, and your local modifications will
 323.244 -be at risk of corruption any time you try to update your client's view
 323.245 -of the repository.
 323.246 -
 323.247 -\subsubsection{The forking non-problem}
 323.248 -
 323.249 -It has been suggested that distributed revision control tools pose
 323.250 -some sort of risk to open source projects because they make it easy to
 323.251 -``fork'' the development of a project.  A fork happens when there are
 323.252 -differences in opinion or attitude between groups of developers that
 323.253 -cause them to decide that they can't work together any longer.  Each
 323.254 -side takes a more or less complete copy of the project's source code,
 323.255 -and goes off in its own direction.
 323.256 -
 323.257 -Sometimes the camps in a fork decide to reconcile their differences.
 323.258 -With a centralised revision control system, the \emph{technical}
 323.259 -process of reconciliation is painful, and has to be performed largely
 323.260 -by hand.  You have to decide whose revision history is going to
 323.261 -``win'', and graft the other team's changes into the tree somehow.
 323.262 -This usually loses some or all of one side's revision history.
 323.263 -
 323.264 -What distributed tools do with respect to forking is they make forking
 323.265 -the \emph{only} way to develop a project.  Every single change that
 323.266 -you make is potentially a fork point.  The great strength of this
 323.267 -approach is that a distributed revision control tool has to be really
 323.268 -good at \emph{merging} forks, because forks are absolutely
 323.269 -fundamental: they happen all the time.  
 323.270 -
 323.271 -If every piece of work that everybody does, all the time, is framed in
 323.272 -terms of forking and merging, then what the open source world refers
 323.273 -to as a ``fork'' becomes \emph{purely} a social issue.  If anything,
 323.274 -distributed tools \emph{lower} the likelihood of a fork:
 323.275 -\begin{itemize}
 323.276 -\item They eliminate the social distinction that centralised tools
 323.277 -  impose: that between insiders (people with commit access) and
 323.278 -  outsiders (people without).
 323.279 -\item They make it easier to reconcile after a social fork, because
 323.280 -  all that's involved from the perspective of the revision control
 323.281 -  software is just another merge.
 323.282 -\end{itemize}
 323.283 -
 323.284 -Some people resist distributed tools because they want to retain tight
 323.285 -control over their projects, and they believe that centralised tools
 323.286 -give them this control.  However, if you're of this belief, and you
 323.287 -publish your CVS or Subversion repositories publically, there are
 323.288 -plenty of tools available that can pull out your entire project's
 323.289 -history (albeit slowly) and recreate it somewhere that you don't
 323.290 -control.  So while your control in this case is illusory, you are
 323.291 -forgoing the ability to fluidly collaborate with whatever people feel
 323.292 -compelled to mirror and fork your history.
 323.293 -
 323.294 -\subsection{Advantages for commercial projects}
 323.295 -
 323.296 -Many commercial projects are undertaken by teams that are scattered
 323.297 -across the globe.  Contributors who are far from a central server will
 323.298 -see slower command execution and perhaps less reliability.  Commercial
 323.299 -revision control systems attempt to ameliorate these problems with
 323.300 -remote-site replication add-ons that are typically expensive to buy
 323.301 -and cantankerous to administer.  A distributed system doesn't suffer
 323.302 -from these problems in the first place.  Better yet, you can easily
 323.303 -set up multiple authoritative servers, say one per site, so that
 323.304 -there's no redundant communication between repositories over expensive
 323.305 -long-haul network links.
 323.306 -
 323.307 -Centralised revision control systems tend to have relatively low
 323.308 -scalability.  It's not unusual for an expensive centralised system to
 323.309 -fall over under the combined load of just a few dozen concurrent
 323.310 -users.  Once again, the typical response tends to be an expensive and
 323.311 -clunky replication facility.  Since the load on a central server---if
 323.312 -you have one at all---is many times lower with a distributed
 323.313 -tool (because all of the data is replicated everywhere), a single
 323.314 -cheap server can handle the needs of a much larger team, and
 323.315 -replication to balance load becomes a simple matter of scripting.
 323.316 -
 323.317 -If you have an employee in the field, troubleshooting a problem at a
 323.318 -customer's site, they'll benefit from distributed revision control.
 323.319 -The tool will let them generate custom builds, try different fixes in
 323.320 -isolation from each other, and search efficiently through history for
 323.321 -the sources of bugs and regressions in the customer's environment, all
 323.322 -without needing to connect to your company's network.
 323.323 -
 323.324 -\section{Why choose Mercurial?}
 323.325 -
 323.326 -Mercurial has a unique set of properties that make it a particularly
 323.327 -good choice as a revision control system.
 323.328 -\begin{itemize}
 323.329 -\item It is easy to learn and use.
 323.330 -\item It is lightweight.
 323.331 -\item It scales excellently.
 323.332 -\item It is easy to customise.
 323.333 -\end{itemize}
 323.334 -
 323.335 -If you are at all familiar with revision control systems, you should
 323.336 -be able to get up and running with Mercurial in less than five
 323.337 -minutes.  Even if not, it will take no more than a few minutes
 323.338 -longer.  Mercurial's command and feature sets are generally uniform
 323.339 -and consistent, so you can keep track of a few general rules instead
 323.340 -of a host of exceptions.
 323.341 -
 323.342 -On a small project, you can start working with Mercurial in moments.
 323.343 -Creating new changes and branches; transferring changes around
 323.344 -(whether locally or over a network); and history and status operations
 323.345 -are all fast.  Mercurial attempts to stay nimble and largely out of
 323.346 -your way by combining low cognitive overhead with blazingly fast
 323.347 -operations.
 323.348 -
 323.349 -The usefulness of Mercurial is not limited to small projects: it is
 323.350 -used by projects with hundreds to thousands of contributors, each
 323.351 -containing tens of thousands of files and hundreds of megabytes of
 323.352 -source code.
 323.353 -
 323.354 -If the core functionality of Mercurial is not enough for you, it's
 323.355 -easy to build on.  Mercurial is well suited to scripting tasks, and
 323.356 -its clean internals and implementation in Python make it easy to add
 323.357 -features in the form of extensions.  There are a number of popular and
 323.358 -useful extensions already available, ranging from helping to identify
 323.359 -bugs to improving performance.
 323.360 -
 323.361 -\section{Mercurial compared with other tools}
 323.362 -
 323.363 -Before you read on, please understand that this section necessarily
 323.364 -reflects my own experiences, interests, and (dare I say it) biases.  I
 323.365 -I have used every one of the revision control tools listed below, in
 323.366 -most cases for several years at a time.
 323.367 -
 323.368 -
 323.369 -\subsection{Subversion}
 323.370 -
 323.371 -Subversion is a popular revision control tool, developed to replace
 323.372 -CVS.  It has a centralised client/server architecture.
 323.373 -
 323.374 -Subversion and Mercurial have similarly named commands for performing
 323.375 -the same operations, so if you're familiar with one, it is easy to
 323.376 -learn to use the other.  Both tools are portable to all popular
 323.377 -operating systems.
 323.378 -
 323.379 -Prior to version 1.5, Subversion had no useful support for merges.
 323.380 -At the time of writing, its merge tracking capability is new, and known to be
 323.381 -\href{http://svnbook.red-bean.com/nightly/en/svn.branchmerge.advanced.html#svn.branchmerge.advanced.finalword}{complicated
 323.382 -  and buggy}.
 323.383 -
 323.384 -Mercurial has a substantial performance advantage over Subversion on
 323.385 -every revision control operation I have benchmarked.  I have measured
 323.386 -its advantage as ranging from a factor of two to a factor of six when
 323.387 -compared with Subversion~1.4.3's \emph{ra\_local} file store, which is
 323.388 -the fastest access method available.  In more realistic deployments
 323.389 -involving a network-based store, Subversion will be at a substantially
 323.390 -larger disadvantage.  Because many Subversion commands must talk to
 323.391 -the server and Subversion does not have useful replication facilities,
 323.392 -server capacity and network bandwidth become bottlenecks for modestly
 323.393 -large projects.
 323.394 -
 323.395 -Additionally, Subversion incurs substantial storage overhead to avoid
 323.396 -network transactions for a few common operations, such as finding
 323.397 -modified files (\texttt{status}) and displaying modifications against
 323.398 -the current revision (\texttt{diff}).  As a result, a Subversion
 323.399 -working copy is often the same size as, or larger than, a Mercurial
 323.400 -repository and working directory, even though the Mercurial repository
 323.401 -contains a complete history of the project.
 323.402 -
 323.403 -Subversion is widely supported by third party tools.  Mercurial
 323.404 -currently lags considerably in this area.  This gap is closing,
 323.405 -however, and indeed some of Mercurial's GUI tools now outshine their
 323.406 -Subversion equivalents.  Like Mercurial, Subversion has an excellent
 323.407 -user manual.
 323.408 -
 323.409 -Because Subversion doesn't store revision history on the client, it is
 323.410 -well suited to managing projects that deal with lots of large, opaque
 323.411 -binary files.  If you check in fifty revisions to an incompressible
 323.412 -10MB file, Subversion's client-side space usage stays constant. The
 323.413 -space used by any distributed SCM will grow rapidly in proportion to
 323.414 -the number of revisions, because the differences between each revision
 323.415 -are large.
 323.416 -
 323.417 -In addition, it's often difficult or, more usually, impossible to
 323.418 -merge different versions of a binary file.  Subversion's ability to
 323.419 -let a user lock a file, so that they temporarily have the exclusive
 323.420 -right to commit changes to it, can be a significant advantage to a
 323.421 -project where binary files are widely used.
 323.422 -
 323.423 -Mercurial can import revision history from a Subversion repository.
 323.424 -It can also export revision history to a Subversion repository.  This
 323.425 -makes it easy to ``test the waters'' and use Mercurial and Subversion
 323.426 -in parallel before deciding to switch.  History conversion is
 323.427 -incremental, so you can perform an initial conversion, then small
 323.428 -additional conversions afterwards to bring in new changes.
 323.429 -
 323.430 -
 323.431 -\subsection{Git}
 323.432 -
 323.433 -Git is a distributed revision control tool that was developed for
 323.434 -managing the Linux kernel source tree.  Like Mercurial, its early
 323.435 -design was somewhat influenced by Monotone.
 323.436 -
 323.437 -Git has a very large command set, with version~1.5.0 providing~139
 323.438 -individual commands.  It has something of a reputation for being
 323.439 -difficult to learn.  Compared to Git, Mercurial has a strong focus on
 323.440 -simplicity.
 323.441 -
 323.442 -In terms of performance, Git is extremely fast.  In several cases, it
 323.443 -is faster than Mercurial, at least on Linux, while Mercurial performs
 323.444 -better on other operations.  However, on Windows, the performance and
 323.445 -general level of support that Git provides is, at the time of writing,
 323.446 -far behind that of Mercurial.
 323.447 -
 323.448 -While a Mercurial repository needs no maintenance, a Git repository
 323.449 -requires frequent manual ``repacks'' of its metadata.  Without these,
 323.450 -performance degrades, while space usage grows rapidly.  A server that
 323.451 -contains many Git repositories that are not rigorously and frequently
 323.452 -repacked will become heavily disk-bound during backups, and there have
 323.453 -been instances of daily backups taking far longer than~24 hours as a
 323.454 -result.  A freshly packed Git repository is slightly smaller than a
 323.455 -Mercurial repository, but an unpacked repository is several orders of
 323.456 -magnitude larger.
 323.457 -
 323.458 -The core of Git is written in C.  Many Git commands are implemented as
 323.459 -shell or Perl scripts, and the quality of these scripts varies widely.
 323.460 -I have encountered several instances where scripts charged along
 323.461 -blindly in the presence of errors that should have been fatal.
 323.462 -
 323.463 -Mercurial can import revision history from a Git repository.
 323.464 -
 323.465 -
 323.466 -\subsection{CVS}
 323.467 -
 323.468 -CVS is probably the most widely used revision control tool in the
 323.469 -world.  Due to its age and internal untidiness, it has been only
 323.470 -lightly maintained for many years.
 323.471 -
 323.472 -It has a centralised client/server architecture.  It does not group
 323.473 -related file changes into atomic commits, making it easy for people to
 323.474 -``break the build'': one person can successfully commit part of a
 323.475 -change and then be blocked by the need for a merge, causing other
 323.476 -people to see only a portion of the work they intended to do.  This
 323.477 -also affects how you work with project history.  If you want to see
 323.478 -all of the modifications someone made as part of a task, you will need
 323.479 -to manually inspect the descriptions and timestamps of the changes
 323.480 -made to each file involved (if you even know what those files were).
 323.481 -
 323.482 -CVS has a muddled notion of tags and branches that I will not attempt
 323.483 -to even describe.  It does not support renaming of files or
 323.484 -directories well, making it easy to corrupt a repository.  It has
 323.485 -almost no internal consistency checking capabilities, so it is usually
 323.486 -not even possible to tell whether or how a repository is corrupt.  I
 323.487 -would not recommend CVS for any project, existing or new.
 323.488 -
 323.489 -Mercurial can import CVS revision history.  However, there are a few
 323.490 -caveats that apply; these are true of every other revision control
 323.491 -tool's CVS importer, too.  Due to CVS's lack of atomic changes and
 323.492 -unversioned filesystem hierarchy, it is not possible to reconstruct
 323.493 -CVS history completely accurately; some guesswork is involved, and
 323.494 -renames will usually not show up.  Because a lot of advanced CVS
 323.495 -administration has to be done by hand and is hence error-prone, it's
 323.496 -common for CVS importers to run into multiple problems with corrupted
 323.497 -repositories (completely bogus revision timestamps and files that have
 323.498 -remained locked for over a decade are just two of the less interesting
 323.499 -problems I can recall from personal experience).
 323.500 -
 323.501 -Mercurial can import revision history from a CVS repository.
 323.502 -
 323.503 -
 323.504 -\subsection{Commercial tools}
 323.505 -
 323.506 -Perforce has a centralised client/server architecture, with no
 323.507 -client-side caching of any data.  Unlike modern revision control
 323.508 -tools, Perforce requires that a user run a command to inform the
 323.509 -server about every file they intend to edit.
 323.510 -
 323.511 -The performance of Perforce is quite good for small teams, but it
 323.512 -falls off rapidly as the number of users grows beyond a few dozen.
 323.513 -Modestly large Perforce installations require the deployment of
 323.514 -proxies to cope with the load their users generate.
 323.515 -
 323.516 -
 323.517 -\subsection{Choosing a revision control tool}
 323.518 -
 323.519 -With the exception of CVS, all of the tools listed above have unique
 323.520 -strengths that suit them to particular styles of work.  There is no
 323.521 -single revision control tool that is best in all situations.
 323.522 -
 323.523 -As an example, Subversion is a good choice for working with frequently
 323.524 -edited binary files, due to its centralised nature and support for
 323.525 -file locking.
 323.526 -
 323.527 -I personally find Mercurial's properties of simplicity, performance,
 323.528 -and good merge support to be a compelling combination that has served
 323.529 -me well for several years.
 323.530 -
 323.531 -
 323.532 -\section{Switching from another tool to Mercurial}
 323.533 -
 323.534 -Mercurial is bundled with an extension named \hgext{convert}, which
 323.535 -can incrementally import revision history from several other revision
 323.536 -control tools.  By ``incremental'', I mean that you can convert all of
 323.537 -a project's history to date in one go, then rerun the conversion later
 323.538 -to obtain new changes that happened after the initial conversion.
 323.539 -
 323.540 -The revision control tools supported by \hgext{convert} are as
 323.541 -follows:
 323.542 -\begin{itemize}
 323.543 -\item Subversion
 323.544 -\item CVS
 323.545 -\item Git
 323.546 -\item Darcs
 323.547 -\end{itemize}
 323.548 -
 323.549 -In addition, \hgext{convert} can export changes from Mercurial to
 323.550 -Subversion.  This makes it possible to try Subversion and Mercurial in
 323.551 -parallel before committing to a switchover, without risking the loss
 323.552 -of any work.
 323.553 -
 323.554 -The \hgxcmd{conver}{convert} command is easy to use.  Simply point it
 323.555 -at the path or URL of the source repository, optionally give it the
 323.556 -name of the destination repository, and it will start working.  After
 323.557 -the initial conversion, just run the same command again to import new
 323.558 -changes.
 323.559 -
 323.560 -
 323.561 -%%% Local Variables: 
 323.562 -%%% mode: latex
 323.563 -%%% TeX-master: "00book"
 323.564 -%%% End: 
   324.1 Binary file en/kdiff3.png has changed
   325.1 --- a/en/license.tex	Thu Mar 26 08:57:10 2009 +0100
   325.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   325.3 @@ -1,138 +0,0 @@
   325.4 -\chapter{Open Publication License}
   325.5 -\label{cha:opl}
   325.6 -
   325.7 -Version 1.0, 8 June 1999
   325.8 -
   325.9 -\section{Requirements on both unmodified and modified versions}
  325.10 -
  325.11 -The Open Publication works may be reproduced and distributed in whole
  325.12 -or in part, in any medium physical or electronic, provided that the
  325.13 -terms of this license are adhered to, and that this license or an
  325.14 -incorporation of it by reference (with any options elected by the
  325.15 -author(s) and/or publisher) is displayed in the reproduction.
  325.16 -
  325.17 -Proper form for an incorporation by reference is as follows:
  325.18 -
  325.19 -\begin{quote}
  325.20 -  Copyright (c) \emph{year} by \emph{author's name or designee}. This
  325.21 -  material may be distributed only subject to the terms and conditions
  325.22 -  set forth in the Open Publication License, v\emph{x.y} or later (the
  325.23 -  latest version is presently available at
  325.24 -  \url{http://www.opencontent.org/openpub/}).
  325.25 -\end{quote}
  325.26 -
  325.27 -The reference must be immediately followed with any options elected by
  325.28 -the author(s) and/or publisher of the document (see
  325.29 -section~\ref{sec:opl:options}).
  325.30 -
  325.31 -Commercial redistribution of Open Publication-licensed material is
  325.32 -permitted.
  325.33 -
  325.34 -Any publication in standard (paper) book form shall require the
  325.35 -citation of the original publisher and author. The publisher and
  325.36 -author's names shall appear on all outer surfaces of the book. On all
  325.37 -outer surfaces of the book the original publisher's name shall be as
  325.38 -large as the title of the work and cited as possessive with respect to
  325.39 -the title.
  325.40 -
  325.41 -\section{Copyright}
  325.42 -
  325.43 -The copyright to each Open Publication is owned by its author(s) or
  325.44 -designee.
  325.45 -
  325.46 -\section{Scope of license}
  325.47 -
  325.48 -The following license terms apply to all Open Publication works,
  325.49 -unless otherwise explicitly stated in the document.
  325.50 -
  325.51 -Mere aggregation of Open Publication works or a portion of an Open
  325.52 -Publication work with other works or programs on the same media shall
  325.53 -not cause this license to apply to those other works. The aggregate
  325.54 -work shall contain a notice specifying the inclusion of the Open
  325.55 -Publication material and appropriate copyright notice.
  325.56 -
  325.57 -\textbf{Severability}. If any part of this license is found to be
  325.58 -unenforceable in any jurisdiction, the remaining portions of the
  325.59 -license remain in force.
  325.60 -
  325.61 -\textbf{No warranty}. Open Publication works are licensed and provided
  325.62 -``as is'' without warranty of any kind, express or implied, including,
  325.63 -but not limited to, the implied warranties of merchantability and
  325.64 -fitness for a particular purpose or a warranty of non-infringement.
  325.65 -
  325.66 -\section{Requirements on modified works}
  325.67 -
  325.68 -All modified versions of documents covered by this license, including
  325.69 -translations, anthologies, compilations and partial documents, must
  325.70 -meet the following requirements:
  325.71 -
  325.72 -\begin{enumerate}
  325.73 -\item The modified version must be labeled as such.
  325.74 -\item The person making the modifications must be identified and the
  325.75 -  modifications dated.
  325.76 -\item Acknowledgement of the original author and publisher if
  325.77 -  applicable must be retained according to normal academic citation
  325.78 -  practices.
  325.79 -\item The location of the original unmodified document must be
  325.80 -  identified.
  325.81 -\item The original author's (or authors') name(s) may not be used to
  325.82 -  assert or imply endorsement of the resulting document without the
  325.83 -  original author's (or authors') permission.
  325.84 -\end{enumerate}
  325.85 -
  325.86 -\section{Good-practice recommendations}
  325.87 -
  325.88 -In addition to the requirements of this license, it is requested from
  325.89 -and strongly recommended of redistributors that:
  325.90 -
  325.91 -\begin{enumerate}
  325.92 -\item If you are distributing Open Publication works on hardcopy or
  325.93 -  CD-ROM, you provide email notification to the authors of your intent
  325.94 -  to redistribute at least thirty days before your manuscript or media
  325.95 -  freeze, to give the authors time to provide updated documents. This
  325.96 -  notification should describe modifications, if any, made to the
  325.97 -  document.
  325.98 -\item All substantive modifications (including deletions) be either
  325.99 -  clearly marked up in the document or else described in an attachment
 325.100 -  to the document.
 325.101 -\item Finally, while it is not mandatory under this license, it is
 325.102 -  considered good form to offer a free copy of any hardcopy and CD-ROM
 325.103 -  expression of an Open Publication-licensed work to its author(s).
 325.104 -\end{enumerate}
 325.105 -
 325.106 -\section{License options}
 325.107 -\label{sec:opl:options}
 325.108 -
 325.109 -The author(s) and/or publisher of an Open Publication-licensed
 325.110 -document may elect certain options by appending language to the
 325.111 -reference to or copy of the license. These options are considered part
 325.112 -of the license instance and must be included with the license (or its
 325.113 -incorporation by reference) in derived works.
 325.114 -
 325.115 -\begin{enumerate}[A]
 325.116 -\item To prohibit distribution of substantively modified versions
 325.117 -  without the explicit permission of the author(s). ``Substantive
 325.118 -  modification'' is defined as a change to the semantic content of the
 325.119 -  document, and excludes mere changes in format or typographical
 325.120 -  corrections.
 325.121 -
 325.122 -  To accomplish this, add the phrase ``Distribution of substantively
 325.123 -  modified versions of this document is prohibited without the
 325.124 -  explicit permission of the copyright holder.'' to the license
 325.125 -  reference or copy.
 325.126 -
 325.127 -\item To prohibit any publication of this work or derivative works in
 325.128 -  whole or in part in standard (paper) book form for commercial
 325.129 -  purposes is prohibited unless prior permission is obtained from the
 325.130 -  copyright holder.
 325.131 -
 325.132 -  To accomplish this, add the phrase ``Distribution of the work or
 325.133 -  derivative of the work in any standard (paper) book form is
 325.134 -  prohibited unless prior permission is obtained from the copyright
 325.135 -  holder.'' to the license reference or copy.
 325.136 -\end{enumerate}
 325.137 -
 325.138 -%%% Local Variables: 
 325.139 -%%% mode: latex
 325.140 -%%% TeX-master: "00book"
 325.141 -%%% End: 
   326.1 --- a/en/metadata.svg	Thu Mar 26 08:57:10 2009 +0100
   326.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   326.3 @@ -1,328 +0,0 @@
   326.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   326.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   326.6 -<svg
   326.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   326.8 -   xmlns:cc="http://web.resource.org/cc/"
   326.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  326.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  326.11 -   xmlns="http://www.w3.org/2000/svg"
  326.12 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  326.13 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  326.14 -   width="744.09448819"
  326.15 -   height="1052.3622047"
  326.16 -   id="svg2"
  326.17 -   sodipodi:version="0.32"
  326.18 -   inkscape:version="0.44.1"
  326.19 -   sodipodi:docname="metadata.svg"
  326.20 -   sodipodi:docbase="/home/bos/hg/hgbook/en">
  326.21 -  <defs
  326.22 -     id="defs4">
  326.23 -    <marker
  326.24 -       inkscape:stockid="Arrow1Mend"
  326.25 -       orient="auto"
  326.26 -       refY="0.0"
  326.27 -       refX="0.0"
  326.28 -       id="Arrow1Mend"
  326.29 -       style="overflow:visible;">
  326.30 -      <path
  326.31 -         id="path2944"
  326.32 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  326.33 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  326.34 -         transform="scale(0.4) rotate(180) translate(10,0)" />
  326.35 -    </marker>
  326.36 -  </defs>
  326.37 -  <sodipodi:namedview
  326.38 -     id="base"
  326.39 -     pagecolor="#ffffff"
  326.40 -     bordercolor="#666666"
  326.41 -     borderopacity="1.0"
  326.42 -     gridtolerance="10000"
  326.43 -     guidetolerance="10"
  326.44 -     objecttolerance="10"
  326.45 -     inkscape:pageopacity="0.0"
  326.46 -     inkscape:pageshadow="2"
  326.47 -     inkscape:zoom="1.4"
  326.48 -     inkscape:cx="232.14286"
  326.49 -     inkscape:cy="490.68696"
  326.50 -     inkscape:document-units="px"
  326.51 -     inkscape:current-layer="layer1"
  326.52 -     inkscape:window-width="906"
  326.53 -     inkscape:window-height="620"
  326.54 -     inkscape:window-x="181"
  326.55 -     inkscape:window-y="58" />
  326.56 -  <metadata
  326.57 -     id="metadata7">
  326.58 -    <rdf:RDF>
  326.59 -      <cc:Work
  326.60 -         rdf:about="">
  326.61 -        <dc:format>image/svg+xml</dc:format>
  326.62 -        <dc:type
  326.63 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  326.64 -      </cc:Work>
  326.65 -    </rdf:RDF>
  326.66 -  </metadata>
  326.67 -  <g
  326.68 -     inkscape:label="Layer 1"
  326.69 -     inkscape:groupmode="layer"
  326.70 -     id="layer1">
  326.71 -    <path
  326.72 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#a7a7a7;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1;display:inline"
  326.73 -       d="M 326.94646,467.18359 L 326.94646,510.98123"
  326.74 -       id="path1910"
  326.75 -       inkscape:connector-type="polyline"
  326.76 -       inkscape:connection-end="#rect2962"
  326.77 -       inkscape:connection-start="#rect2764" />
  326.78 -    <path
  326.79 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#a7a7a7;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1;display:inline"
  326.80 -       d="M 326.94646,531.98123 L 326.94646,591.77887"
  326.81 -       id="path1912"
  326.82 -       inkscape:connector-type="polyline"
  326.83 -       inkscape:connection-start="#rect2962"
  326.84 -       inkscape:connection-end="#rect3000" />
  326.85 -    <path
  326.86 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#a7a7a7;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1;display:inline"
  326.87 -       d="M 316.1622,531.98123 L 192.30212,652.57648"
  326.88 -       id="path1916"
  326.89 -       inkscape:connector-type="polyline"
  326.90 -       inkscape:connection-end="#rect3038"
  326.91 -       inkscape:connection-start="#rect2962" />
  326.92 -    <path
  326.93 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#484848;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1"
  326.94 -       d="M 254.23217,467.18359 L 254.23216,510.98123"
  326.95 -       id="path3088"
  326.96 -       inkscape:connector-type="polyline"
  326.97 -       inkscape:connection-start="#rect1872"
  326.98 -       inkscape:connection-end="#rect2960" />
  326.99 -    <path
 326.100 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#484848;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1"
 326.101 -       d="M 254.23215,531.98123 L 254.23215,591.77887"
 326.102 -       id="path3090"
 326.103 -       inkscape:connector-type="polyline"
 326.104 -       inkscape:connection-start="#rect2960"
 326.105 -       inkscape:connection-end="#rect2998" />
 326.106 -    <path
 326.107 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#484848;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1"
 326.108 -       d="M 248.84002,531.98123 L 186.90999,652.57648"
 326.109 -       id="path3092"
 326.110 -       inkscape:connector-type="polyline"
 326.111 -       inkscape:connection-start="#rect2960"
 326.112 -       inkscape:connection-end="#rect3038" />
 326.113 -    <rect
 326.114 -       style="fill:#7b7df5;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.115 -       id="rect1872"
 326.116 -       width="51.42857"
 326.117 -       height="20"
 326.118 -       x="228.51788"
 326.119 -       y="446.68359" />
 326.120 -    <rect
 326.121 -       style="fill:#cacbfb;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.122 -       id="rect2764"
 326.123 -       width="51.42857"
 326.124 -       height="20"
 326.125 -       x="301.23218"
 326.126 -       y="446.68359" />
 326.127 -    <rect
 326.128 -       style="fill:#cacbfb;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.129 -       id="rect2766"
 326.130 -       width="51.42857"
 326.131 -       height="20"
 326.132 -       x="155.80359"
 326.133 -       y="446.68359" />
 326.134 -    <rect
 326.135 -       style="fill:#cacbfb;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.136 -       id="rect2768"
 326.137 -       width="51.42857"
 326.138 -       height="20"
 326.139 -       x="83.089294"
 326.140 -       y="446.68359" />
 326.141 -    <path
 326.142 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 326.143 -       d="M 135.01786,456.68359 L 155.30359,456.68359"
 326.144 -       id="path2770"
 326.145 -       inkscape:connector-type="polyline"
 326.146 -       inkscape:connection-start="#rect2768"
 326.147 -       inkscape:connection-end="#rect2766" />
 326.148 -    <path
 326.149 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 326.150 -       d="M 207.73216,456.68359 L 228.01788,456.68359"
 326.151 -       id="path2772"
 326.152 -       inkscape:connector-type="polyline"
 326.153 -       inkscape:connection-start="#rect2766"
 326.154 -       inkscape:connection-end="#rect1872" />
 326.155 -    <path
 326.156 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 326.157 -       d="M 280.44645,456.68359 L 300.73218,456.68359"
 326.158 -       id="path2774"
 326.159 -       inkscape:connector-type="polyline"
 326.160 -       inkscape:connection-start="#rect1872"
 326.161 -       inkscape:connection-end="#rect2764" />
 326.162 -    <path
 326.163 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
 326.164 -       d="M 62.303571,456.68359 L 82.589294,456.68359"
 326.165 -       id="path2778"
 326.166 -       inkscape:connector-type="polyline"
 326.167 -       inkscape:connection-end="#rect2768" />
 326.168 -    <rect
 326.169 -       style="fill:#84f57b;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.170 -       id="rect2960"
 326.171 -       width="51.42857"
 326.172 -       height="20"
 326.173 -       x="228.51787"
 326.174 -       y="511.48123" />
 326.175 -    <rect
 326.176 -       style="fill:#cefbca;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.177 -       id="rect2962"
 326.178 -       width="51.42857"
 326.179 -       height="20"
 326.180 -       x="301.23218"
 326.181 -       y="511.48123" />
 326.182 -    <rect
 326.183 -       style="fill:#cefbca;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.184 -       id="rect2964"
 326.185 -       width="51.42857"
 326.186 -       height="20"
 326.187 -       x="155.80357"
 326.188 -       y="511.48123" />
 326.189 -    <rect
 326.190 -       style="fill:#cefbca;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.191 -       id="rect2966"
 326.192 -       width="51.42857"
 326.193 -       height="20"
 326.194 -       x="83.089287"
 326.195 -       y="511.48123" />
 326.196 -    <path
 326.197 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 326.198 -       d="M 135.01786,521.48121 L 155.30359,521.48121"
 326.199 -       id="path2968"
 326.200 -       inkscape:connector-type="polyline" />
 326.201 -    <path
 326.202 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 326.203 -       d="M 207.73216,521.48121 L 228.01788,521.48121"
 326.204 -       id="path2970"
 326.205 -       inkscape:connector-type="polyline" />
 326.206 -    <path
 326.207 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 326.208 -       d="M 280.44645,521.48121 L 300.73218,521.48121"
 326.209 -       id="path2972"
 326.210 -       inkscape:connector-type="polyline" />
 326.211 -    <path
 326.212 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
 326.213 -       d="M 62.30358,521.48121 L 82.5893,521.48121"
 326.214 -       id="path2974"
 326.215 -       inkscape:connector-type="polyline" />
 326.216 -    <rect
 326.217 -       style="fill:#f57b8f;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.218 -       id="rect2998"
 326.219 -       width="51.42857"
 326.220 -       height="20"
 326.221 -       x="228.51787"
 326.222 -       y="592.27887" />
 326.223 -    <rect
 326.224 -       style="fill:#fbcad2;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.225 -       id="rect3000"
 326.226 -       width="51.42857"
 326.227 -       height="20"
 326.228 -       x="301.23218"
 326.229 -       y="592.27887" />
 326.230 -    <rect
 326.231 -       style="fill:#fbcad2;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.232 -       id="rect3002"
 326.233 -       width="51.42857"
 326.234 -       height="20"
 326.235 -       x="155.80357"
 326.236 -       y="592.27887" />
 326.237 -    <rect
 326.238 -       style="fill:#fbcad2;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.239 -       id="rect3004"
 326.240 -       width="51.42857"
 326.241 -       height="20"
 326.242 -       x="83.089287"
 326.243 -       y="592.27887" />
 326.244 -    <path
 326.245 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 326.246 -       d="M 135.01786,602.27884 L 155.30359,602.27884"
 326.247 -       id="path3006"
 326.248 -       inkscape:connector-type="polyline" />
 326.249 -    <path
 326.250 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 326.251 -       d="M 207.73216,602.27884 L 228.01788,602.27884"
 326.252 -       id="path3008"
 326.253 -       inkscape:connector-type="polyline" />
 326.254 -    <path
 326.255 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 326.256 -       d="M 280.44645,602.27884 L 300.73218,602.27884"
 326.257 -       id="path3010"
 326.258 -       inkscape:connector-type="polyline" />
 326.259 -    <path
 326.260 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
 326.261 -       d="M 62.30358,602.27884 L 82.5893,602.27884"
 326.262 -       id="path3012"
 326.263 -       inkscape:connector-type="polyline" />
 326.264 -    <rect
 326.265 -       style="fill:#ffced6;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.266 -       id="rect3034"
 326.267 -       width="51.42857"
 326.268 -       height="20"
 326.269 -       x="228.51787"
 326.270 -       y="653.07648" />
 326.271 -    <rect
 326.272 -       style="fill:#f57b8f;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.273 -       id="rect3038"
 326.274 -       width="51.42857"
 326.275 -       height="20"
 326.276 -       x="155.80357"
 326.277 -       y="653.07648" />
 326.278 -    <rect
 326.279 -       style="fill:#fbcad2;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 326.280 -       id="rect3040"
 326.281 -       width="51.42857"
 326.282 -       height="20"
 326.283 -       x="83.089287"
 326.284 -       y="653.07648" />
 326.285 -    <path
 326.286 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 326.287 -       d="M 135.01786,663.07646 L 155.30359,663.07646"
 326.288 -       id="path3042"
 326.289 -       inkscape:connector-type="polyline" />
 326.290 -    <path
 326.291 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 326.292 -       d="M 207.73216,663.07646 L 228.01788,663.07646"
 326.293 -       id="path3044"
 326.294 -       inkscape:connector-type="polyline" />
 326.295 -    <path
 326.296 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
 326.297 -       d="M 62.30358,663.07646 L 82.5893,663.07646"
 326.298 -       id="path3048"
 326.299 -       inkscape:connector-type="polyline" />
 326.300 -    <text
 326.301 -       xml:space="preserve"
 326.302 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 326.303 -       x="82.072548"
 326.304 -       y="432.64789"
 326.305 -       id="text3094"><tspan
 326.306 -         sodipodi:role="line"
 326.307 -         id="tspan3096"
 326.308 -         x="82.072548"
 326.309 -         y="432.64789">Changelog</tspan></text>
 326.310 -    <text
 326.311 -       xml:space="preserve"
 326.312 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 326.313 -       x="82.306923"
 326.314 -       y="498.97327"
 326.315 -       id="text3098"><tspan
 326.316 -         sodipodi:role="line"
 326.317 -         id="tspan3100"
 326.318 -         x="82.306923"
 326.319 -         y="498.97327">Manifest</tspan></text>
 326.320 -    <text
 326.321 -       xml:space="preserve"
 326.322 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 326.323 -       x="82.14286"
 326.324 -       y="580.08569"
 326.325 -       id="text3102"><tspan
 326.326 -         sodipodi:role="line"
 326.327 -         id="tspan3104"
 326.328 -         x="82.14286"
 326.329 -         y="580.08569">Filelogs</tspan></text>
 326.330 -  </g>
 326.331 -</svg>
   327.1 --- a/en/mq-collab.tex	Thu Mar 26 08:57:10 2009 +0100
   327.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   327.3 @@ -1,393 +0,0 @@
   327.4 -\chapter{Advanced uses of Mercurial Queues}
   327.5 -\label{chap:mq-collab}
   327.6 -
   327.7 -While it's easy to pick up straightforward uses of Mercurial Queues,
   327.8 -use of a little discipline and some of MQ's less frequently used
   327.9 -capabilities makes it possible to work in complicated development
  327.10 -environments.
  327.11 -
  327.12 -In this chapter, I will use as an example a technique I have used to
  327.13 -manage the development of an Infiniband device driver for the Linux
  327.14 -kernel.  The driver in question is large (at least as drivers go),
  327.15 -with 25,000 lines of code spread across 35 source files.  It is
  327.16 -maintained by a small team of developers.
  327.17 -
  327.18 -While much of the material in this chapter is specific to Linux, the
  327.19 -same principles apply to any code base for which you're not the
  327.20 -primary owner, and upon which you need to do a lot of development.
  327.21 -
  327.22 -\section{The problem of many targets}
  327.23 -
  327.24 -The Linux kernel changes rapidly, and has never been internally
  327.25 -stable; developers frequently make drastic changes between releases.
  327.26 -This means that a version of the driver that works well with a
  327.27 -particular released version of the kernel will not even \emph{compile}
  327.28 -correctly against, typically, any other version.
  327.29 -
  327.30 -To maintain a driver, we have to keep a number of distinct versions of
  327.31 -Linux in mind.
  327.32 -\begin{itemize}
  327.33 -\item One target is the main Linux kernel development tree.
  327.34 -  Maintenance of the code is in this case partly shared by other
  327.35 -  developers in the kernel community, who make ``drive-by''
  327.36 -  modifications to the driver as they develop and refine kernel
  327.37 -  subsystems.
  327.38 -\item We also maintain a number of ``backports'' to older versions of
  327.39 -  the Linux kernel, to support the needs of customers who are running
  327.40 -  older Linux distributions that do not incorporate our drivers.  (To
  327.41 -  \emph{backport} a piece of code is to modify it to work in an older
  327.42 -  version of its target environment than the version it was developed
  327.43 -  for.)
  327.44 -\item Finally, we make software releases on a schedule that is
  327.45 -  necessarily not aligned with those used by Linux distributors and
  327.46 -  kernel developers, so that we can deliver new features to customers
  327.47 -  without forcing them to upgrade their entire kernels or
  327.48 -  distributions.
  327.49 -\end{itemize}
  327.50 -
  327.51 -\subsection{Tempting approaches that don't work well}
  327.52 -
  327.53 -There are two ``standard'' ways to maintain a piece of software that
  327.54 -has to target many different environments.
  327.55 -
  327.56 -The first is to maintain a number of branches, each intended for a
  327.57 -single target.  The trouble with this approach is that you must
  327.58 -maintain iron discipline in the flow of changes between repositories.
  327.59 -A new feature or bug fix must start life in a ``pristine'' repository,
  327.60 -then percolate out to every backport repository.  Backport changes are
  327.61 -more limited in the branches they should propagate to; a backport
  327.62 -change that is applied to a branch where it doesn't belong will
  327.63 -probably stop the driver from compiling.
  327.64 -
  327.65 -The second is to maintain a single source tree filled with conditional
  327.66 -statements that turn chunks of code on or off depending on the
  327.67 -intended target.  Because these ``ifdefs'' are not allowed in the
  327.68 -Linux kernel tree, a manual or automatic process must be followed to
  327.69 -strip them out and yield a clean tree.  A code base maintained in this
  327.70 -fashion rapidly becomes a rat's nest of conditional blocks that are
  327.71 -difficult to understand and maintain.
  327.72 -
  327.73 -Neither of these approaches is well suited to a situation where you
  327.74 -don't ``own'' the canonical copy of a source tree.  In the case of a
  327.75 -Linux driver that is distributed with the standard kernel, Linus's
  327.76 -tree contains the copy of the code that will be treated by the world
  327.77 -as canonical.  The upstream version of ``my'' driver can be modified
  327.78 -by people I don't know, without me even finding out about it until
  327.79 -after the changes show up in Linus's tree.  
  327.80 -
  327.81 -These approaches have the added weakness of making it difficult to
  327.82 -generate well-formed patches to submit upstream.
  327.83 -
  327.84 -In principle, Mercurial Queues seems like a good candidate to manage a
  327.85 -development scenario such as the above.  While this is indeed the
  327.86 -case, MQ contains a few added features that make the job more
  327.87 -pleasant.
  327.88 -
  327.89 -\section{Conditionally applying patches with 
  327.90 -  guards}
  327.91 -
  327.92 -Perhaps the best way to maintain sanity with so many targets is to be
  327.93 -able to choose specific patches to apply for a given situation.  MQ
  327.94 -provides a feature called ``guards'' (which originates with quilt's
  327.95 -\texttt{guards} command) that does just this.  To start off, let's
  327.96 -create a simple repository for experimenting in.
  327.97 -\interaction{mq.guards.init}
  327.98 -This gives us a tiny repository that contains two patches that don't
  327.99 -have any dependencies on each other, because they touch different files.
 327.100 -
 327.101 -The idea behind conditional application is that you can ``tag'' a
 327.102 -patch with a \emph{guard}, which is simply a text string of your
 327.103 -choosing, then tell MQ to select specific guards to use when applying
 327.104 -patches.  MQ will then either apply, or skip over, a guarded patch,
 327.105 -depending on the guards that you have selected.
 327.106 -
 327.107 -A patch can have an arbitrary number of guards;
 327.108 -each one is \emph{positive} (``apply this patch if this guard is
 327.109 -selected'') or \emph{negative} (``skip this patch if this guard is
 327.110 -selected'').  A patch with no guards is always applied.
 327.111 -
 327.112 -\section{Controlling the guards on a patch}
 327.113 -
 327.114 -The \hgxcmd{mq}{qguard} command lets you determine which guards should
 327.115 -apply to a patch, or display the guards that are already in effect.
 327.116 -Without any arguments, it displays the guards on the current topmost
 327.117 -patch.
 327.118 -\interaction{mq.guards.qguard}
 327.119 -To set a positive guard on a patch, prefix the name of the guard with
 327.120 -a ``\texttt{+}''.
 327.121 -\interaction{mq.guards.qguard.pos}
 327.122 -To set a negative guard on a patch, prefix the name of the guard with
 327.123 -a ``\texttt{-}''.
 327.124 -\interaction{mq.guards.qguard.neg}
 327.125 -
 327.126 -\begin{note}
 327.127 -  The \hgxcmd{mq}{qguard} command \emph{sets} the guards on a patch; it
 327.128 -  doesn't \emph{modify} them.  What this means is that if you run
 327.129 -  \hgcmdargs{qguard}{+a +b} on a patch, then \hgcmdargs{qguard}{+c} on
 327.130 -  the same patch, the \emph{only} guard that will be set on it
 327.131 -  afterwards is \texttt{+c}.
 327.132 -\end{note}
 327.133 -
 327.134 -Mercurial stores guards in the \sfilename{series} file; the form in
 327.135 -which they are stored is easy both to understand and to edit by hand.
 327.136 -(In other words, you don't have to use the \hgxcmd{mq}{qguard} command if
 327.137 -you don't want to; it's okay to simply edit the \sfilename{series}
 327.138 -file.)
 327.139 -\interaction{mq.guards.series}
 327.140 -
 327.141 -\section{Selecting the guards to use}
 327.142 -
 327.143 -The \hgxcmd{mq}{qselect} command determines which guards are active at a
 327.144 -given time.  The effect of this is to determine which patches MQ will
 327.145 -apply the next time you run \hgxcmd{mq}{qpush}.  It has no other effect; in
 327.146 -particular, it doesn't do anything to patches that are already
 327.147 -applied.
 327.148 -
 327.149 -With no arguments, the \hgxcmd{mq}{qselect} command lists the guards
 327.150 -currently in effect, one per line of output.  Each argument is treated
 327.151 -as the name of a guard to apply.
 327.152 -\interaction{mq.guards.qselect.foo}
 327.153 -In case you're interested, the currently selected guards are stored in
 327.154 -the \sfilename{guards} file.
 327.155 -\interaction{mq.guards.qselect.cat}
 327.156 -We can see the effect the selected guards have when we run
 327.157 -\hgxcmd{mq}{qpush}.
 327.158 -\interaction{mq.guards.qselect.qpush}
 327.159 -
 327.160 -A guard cannot start with a ``\texttt{+}'' or ``\texttt{-}''
 327.161 -character.  The name of a guard must not contain white space, but most
 327.162 -other characters are acceptable.  If you try to use a guard with an
 327.163 -invalid name, MQ will complain:
 327.164 -\interaction{mq.guards.qselect.error} 
 327.165 -Changing the selected guards changes the patches that are applied.
 327.166 -\interaction{mq.guards.qselect.quux} 
 327.167 -You can see in the example below that negative guards take precedence
 327.168 -over positive guards.
 327.169 -\interaction{mq.guards.qselect.foobar}
 327.170 -
 327.171 -\section{MQ's rules for applying patches}
 327.172 -
 327.173 -The rules that MQ uses when deciding whether to apply a patch
 327.174 -are as follows.
 327.175 -\begin{itemize}
 327.176 -\item A patch that has no guards is always applied.
 327.177 -\item If the patch has any negative guard that matches any currently
 327.178 -  selected guard, the patch is skipped.
 327.179 -\item If the patch has any positive guard that matches any currently
 327.180 -  selected guard, the patch is applied.
 327.181 -\item If the patch has positive or negative guards, but none matches
 327.182 -  any currently selected guard, the patch is skipped.
 327.183 -\end{itemize}
 327.184 -
 327.185 -\section{Trimming the work environment}
 327.186 -
 327.187 -In working on the device driver I mentioned earlier, I don't apply the
 327.188 -patches to a normal Linux kernel tree.  Instead, I use a repository
 327.189 -that contains only a snapshot of the source files and headers that are
 327.190 -relevant to Infiniband development.  This repository is~1\% the size
 327.191 -of a kernel repository, so it's easier to work with.
 327.192 -
 327.193 -I then choose a ``base'' version on top of which the patches are
 327.194 -applied.  This is a snapshot of the Linux kernel tree as of a revision
 327.195 -of my choosing.  When I take the snapshot, I record the changeset ID
 327.196 -from the kernel repository in the commit message.  Since the snapshot
 327.197 -preserves the ``shape'' and content of the relevant parts of the
 327.198 -kernel tree, I can apply my patches on top of either my tiny
 327.199 -repository or a normal kernel tree.
 327.200 -
 327.201 -Normally, the base tree atop which the patches apply should be a
 327.202 -snapshot of a very recent upstream tree.  This best facilitates the
 327.203 -development of patches that can easily be submitted upstream with few
 327.204 -or no modifications.
 327.205 -
 327.206 -\section{Dividing up the \sfilename{series} file}
 327.207 -
 327.208 -I categorise the patches in the \sfilename{series} file into a number
 327.209 -of logical groups.  Each section of like patches begins with a block
 327.210 -of comments that describes the purpose of the patches that follow.
 327.211 -
 327.212 -The sequence of patch groups that I maintain follows.  The ordering of
 327.213 -these groups is important; I'll describe why after I introduce the
 327.214 -groups.
 327.215 -\begin{itemize}
 327.216 -\item The ``accepted'' group.  Patches that the development team has
 327.217 -  submitted to the maintainer of the Infiniband subsystem, and which
 327.218 -  he has accepted, but which are not present in the snapshot that the
 327.219 -  tiny repository is based on.  These are ``read only'' patches,
 327.220 -  present only to transform the tree into a similar state as it is in
 327.221 -  the upstream maintainer's repository.
 327.222 -\item The ``rework'' group.  Patches that I have submitted, but that
 327.223 -  the upstream maintainer has requested modifications to before he
 327.224 -  will accept them.
 327.225 -\item The ``pending'' group.  Patches that I have not yet submitted to
 327.226 -  the upstream maintainer, but which we have finished working on.
 327.227 -  These will be ``read only'' for a while.  If the upstream maintainer
 327.228 -  accepts them upon submission, I'll move them to the end of the
 327.229 -  ``accepted'' group.  If he requests that I modify any, I'll move
 327.230 -  them to the beginning of the ``rework'' group.
 327.231 -\item The ``in progress'' group.  Patches that are actively being
 327.232 -  developed, and should not be submitted anywhere yet.
 327.233 -\item The ``backport'' group.  Patches that adapt the source tree to
 327.234 -  older versions of the kernel tree.
 327.235 -\item The ``do not ship'' group.  Patches that for some reason should
 327.236 -  never be submitted upstream.  For example, one such patch might
 327.237 -  change embedded driver identification strings to make it easier to
 327.238 -  distinguish, in the field, between an out-of-tree version of the
 327.239 -  driver and a version shipped by a distribution vendor.
 327.240 -\end{itemize}
 327.241 -
 327.242 -Now to return to the reasons for ordering groups of patches in this
 327.243 -way.  We would like the lowest patches in the stack to be as stable as
 327.244 -possible, so that we will not need to rework higher patches due to
 327.245 -changes in context.  Putting patches that will never be changed first
 327.246 -in the \sfilename{series} file serves this purpose.
 327.247 -
 327.248 -We would also like the patches that we know we'll need to modify to be
 327.249 -applied on top of a source tree that resembles the upstream tree as
 327.250 -closely as possible.  This is why we keep accepted patches around for
 327.251 -a while.
 327.252 -
 327.253 -The ``backport'' and ``do not ship'' patches float at the end of the
 327.254 -\sfilename{series} file.  The backport patches must be applied on top
 327.255 -of all other patches, and the ``do not ship'' patches might as well
 327.256 -stay out of harm's way.
 327.257 -
 327.258 -\section{Maintaining the patch series}
 327.259 -
 327.260 -In my work, I use a number of guards to control which patches are to
 327.261 -be applied.
 327.262 -
 327.263 -\begin{itemize}
 327.264 -\item ``Accepted'' patches are guarded with \texttt{accepted}.  I
 327.265 -  enable this guard most of the time.  When I'm applying the patches
 327.266 -  on top of a tree where the patches are already present, I can turn
 327.267 -  this patch off, and the patches that follow it will apply cleanly.
 327.268 -\item Patches that are ``finished'', but not yet submitted, have no
 327.269 -  guards.  If I'm applying the patch stack to a copy of the upstream
 327.270 -  tree, I don't need to enable any guards in order to get a reasonably
 327.271 -  safe source tree.
 327.272 -\item Those patches that need reworking before being resubmitted are
 327.273 -  guarded with \texttt{rework}.
 327.274 -\item For those patches that are still under development, I use
 327.275 -  \texttt{devel}.
 327.276 -\item A backport patch may have several guards, one for each version
 327.277 -  of the kernel to which it applies.  For example, a patch that
 327.278 -  backports a piece of code to~2.6.9 will have a~\texttt{2.6.9} guard.
 327.279 -\end{itemize}
 327.280 -This variety of guards gives me considerable flexibility in
 327.281 -determining what kind of source tree I want to end up with.  For most
 327.282 -situations, the selection of appropriate guards is automated during
 327.283 -the build process, but I can manually tune the guards to use for less
 327.284 -common circumstances.
 327.285 -
 327.286 -\subsection{The art of writing backport patches}
 327.287 -
 327.288 -Using MQ, writing a backport patch is a simple process.  All such a
 327.289 -patch has to do is modify a piece of code that uses a kernel feature
 327.290 -not present in the older version of the kernel, so that the driver
 327.291 -continues to work correctly under that older version.
 327.292 -
 327.293 -A useful goal when writing a good backport patch is to make your code
 327.294 -look as if it was written for the older version of the kernel you're
 327.295 -targeting.  The less obtrusive the patch, the easier it will be to
 327.296 -understand and maintain.  If you're writing a collection of backport
 327.297 -patches to avoid the ``rat's nest'' effect of lots of
 327.298 -\texttt{\#ifdef}s (hunks of source code that are only used
 327.299 -conditionally) in your code, don't introduce version-dependent
 327.300 -\texttt{\#ifdef}s into the patches.  Instead, write several patches,
 327.301 -each of which makes unconditional changes, and control their
 327.302 -application using guards.
 327.303 -
 327.304 -There are two reasons to divide backport patches into a distinct
 327.305 -group, away from the ``regular'' patches whose effects they modify.
 327.306 -The first is that intermingling the two makes it more difficult to use
 327.307 -a tool like the \hgext{patchbomb} extension to automate the process of
 327.308 -submitting the patches to an upstream maintainer.  The second is that
 327.309 -a backport patch could perturb the context in which a subsequent
 327.310 -regular patch is applied, making it impossible to apply the regular
 327.311 -patch cleanly \emph{without} the earlier backport patch already being
 327.312 -applied.
 327.313 -
 327.314 -\section{Useful tips for developing with MQ}
 327.315 -
 327.316 -\subsection{Organising patches in directories}
 327.317 -
 327.318 -If you're working on a substantial project with MQ, it's not difficult
 327.319 -to accumulate a large number of patches.  For example, I have one
 327.320 -patch repository that contains over 250 patches.
 327.321 -
 327.322 -If you can group these patches into separate logical categories, you
 327.323 -can if you like store them in different directories; MQ has no
 327.324 -problems with patch names that contain path separators.
 327.325 -
 327.326 -\subsection{Viewing the history of a patch}
 327.327 -\label{mq-collab:tips:interdiff}
 327.328 -
 327.329 -If you're developing a set of patches over a long time, it's a good
 327.330 -idea to maintain them in a repository, as discussed in
 327.331 -section~\ref{sec:mq:repo}.  If you do so, you'll quickly discover that
 327.332 -using the \hgcmd{diff} command to look at the history of changes to a
 327.333 -patch is unworkable.  This is in part because you're looking at the
 327.334 -second derivative of the real code (a diff of a diff), but also
 327.335 -because MQ adds noise to the process by modifying time stamps and
 327.336 -directory names when it updates a patch.
 327.337 -
 327.338 -However, you can use the \hgext{extdiff} extension, which is bundled
 327.339 -with Mercurial, to turn a diff of two versions of a patch into
 327.340 -something readable.  To do this, you will need a third-party package
 327.341 -called \package{patchutils}~\cite{web:patchutils}.  This provides a
 327.342 -command named \command{interdiff}, which shows the differences between
 327.343 -two diffs as a diff.  Used on two versions of the same diff, it
 327.344 -generates a diff that represents the diff from the first to the second
 327.345 -version.
 327.346 -
 327.347 -You can enable the \hgext{extdiff} extension in the usual way, by
 327.348 -adding a line to the \rcsection{extensions} section of your \hgrc.
 327.349 -\begin{codesample2}
 327.350 -  [extensions]
 327.351 -  extdiff =
 327.352 -\end{codesample2}
 327.353 -The \command{interdiff} command expects to be passed the names of two
 327.354 -files, but the \hgext{extdiff} extension passes the program it runs a
 327.355 -pair of directories, each of which can contain an arbitrary number of
 327.356 -files.  We thus need a small program that will run \command{interdiff}
 327.357 -on each pair of files in these two directories.  This program is
 327.358 -available as \sfilename{hg-interdiff} in the \dirname{examples}
 327.359 -directory of the source code repository that accompanies this book.
 327.360 -\excode{hg-interdiff}
 327.361 -
 327.362 -With the \sfilename{hg-interdiff} program in your shell's search path,
 327.363 -you can run it as follows, from inside an MQ patch directory:
 327.364 -\begin{codesample2}
 327.365 -  hg extdiff -p hg-interdiff -r A:B my-change.patch
 327.366 -\end{codesample2}
 327.367 -Since you'll probably want to use this long-winded command a lot, you
 327.368 -can get \hgext{hgext} to make it available as a normal Mercurial
 327.369 -command, again by editing your \hgrc.
 327.370 -\begin{codesample2}
 327.371 -  [extdiff]
 327.372 -  cmd.interdiff = hg-interdiff
 327.373 -\end{codesample2}
 327.374 -This directs \hgext{hgext} to make an \texttt{interdiff} command
 327.375 -available, so you can now shorten the previous invocation of
 327.376 -\hgxcmd{extdiff}{extdiff} to something a little more wieldy.
 327.377 -\begin{codesample2}
 327.378 -  hg interdiff -r A:B my-change.patch
 327.379 -\end{codesample2}
 327.380 -
 327.381 -\begin{note}
 327.382 -  The \command{interdiff} command works well only if the underlying
 327.383 -  files against which versions of a patch are generated remain the
 327.384 -  same.  If you create a patch, modify the underlying files, and then
 327.385 -  regenerate the patch, \command{interdiff} may not produce useful
 327.386 -  output.
 327.387 -\end{note}
 327.388 -
 327.389 -The \hgext{extdiff} extension is useful for more than merely improving
 327.390 -the presentation of MQ~patches.  To read more about it, go to
 327.391 -section~\ref{sec:hgext:extdiff}.
 327.392 -
 327.393 -%%% Local Variables: 
 327.394 -%%% mode: latex
 327.395 -%%% TeX-master: "00book"
 327.396 -%%% End: 
   328.1 --- a/en/mq-ref.tex	Thu Mar 26 08:57:10 2009 +0100
   328.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   328.3 @@ -1,349 +0,0 @@
   328.4 -\chapter{Mercurial Queues reference}
   328.5 -\label{chap:mqref}
   328.6 -
   328.7 -\section{MQ command reference}
   328.8 -\label{sec:mqref:cmdref}
   328.9 -
  328.10 -For an overview of the commands provided by MQ, use the command
  328.11 -\hgcmdargs{help}{mq}.
  328.12 -
  328.13 -\subsection{\hgxcmd{mq}{qapplied}---print applied patches}
  328.14 -
  328.15 -The \hgxcmd{mq}{qapplied} command prints the current stack of applied
  328.16 -patches.  Patches are printed in oldest-to-newest order, so the last
  328.17 -patch in the list is the ``top'' patch.
  328.18 -
  328.19 -\subsection{\hgxcmd{mq}{qcommit}---commit changes in the queue repository}
  328.20 -
  328.21 -The \hgxcmd{mq}{qcommit} command commits any outstanding changes in the
  328.22 -\sdirname{.hg/patches} repository.  This command only works if the
  328.23 -\sdirname{.hg/patches} directory is a repository, i.e.~you created the
  328.24 -directory using \hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}} or ran
  328.25 -\hgcmd{init} in the directory after running \hgxcmd{mq}{qinit}.
  328.26 -
  328.27 -This command is shorthand for \hgcmdargs{commit}{--cwd .hg/patches}.
  328.28 -
  328.29 -\subsection{\hgxcmd{mq}{qdelete}---delete a patch from the
  328.30 -  \sfilename{series} file}
  328.31 -
  328.32 -The \hgxcmd{mq}{qdelete} command removes the entry for a patch from the
  328.33 -\sfilename{series} file in the \sdirname{.hg/patches} directory.  It
  328.34 -does not pop the patch if the patch is already applied.  By default,
  328.35 -it does not delete the patch file; use the \hgxopt{mq}{qdel}{-f} option to
  328.36 -do that.
  328.37 -
  328.38 -Options:
  328.39 -\begin{itemize}
  328.40 -\item[\hgxopt{mq}{qdel}{-f}] Delete the patch file.
  328.41 -\end{itemize}
  328.42 -
  328.43 -\subsection{\hgxcmd{mq}{qdiff}---print a diff of the topmost applied patch}
  328.44 -
  328.45 -The \hgxcmd{mq}{qdiff} command prints a diff of the topmost applied patch.
  328.46 -It is equivalent to \hgcmdargs{diff}{-r-2:-1}.
  328.47 -
  328.48 -\subsection{\hgxcmd{mq}{qfold}---merge (``fold'') several patches into one}
  328.49 -
  328.50 -The \hgxcmd{mq}{qfold} command merges multiple patches into the topmost
  328.51 -applied patch, so that the topmost applied patch makes the union of
  328.52 -all of the changes in the patches in question.
  328.53 -
  328.54 -The patches to fold must not be applied; \hgxcmd{mq}{qfold} will exit with
  328.55 -an error if any is.  The order in which patches are folded is
  328.56 -significant; \hgcmdargs{qfold}{a b} means ``apply the current topmost
  328.57 -patch, followed by \texttt{a}, followed by \texttt{b}''.
  328.58 -
  328.59 -The comments from the folded patches are appended to the comments of
  328.60 -the destination patch, with each block of comments separated by three
  328.61 -asterisk (``\texttt{*}'') characters.  Use the \hgxopt{mq}{qfold}{-e}
  328.62 -option to edit the commit message for the combined patch/changeset
  328.63 -after the folding has completed.
  328.64 -
  328.65 -Options:
  328.66 -\begin{itemize}
  328.67 -\item[\hgxopt{mq}{qfold}{-e}] Edit the commit message and patch description
  328.68 -  for the newly folded patch.
  328.69 -\item[\hgxopt{mq}{qfold}{-l}] Use the contents of the given file as the new
  328.70 -  commit message and patch description for the folded patch.
  328.71 -\item[\hgxopt{mq}{qfold}{-m}] Use the given text as the new commit message
  328.72 -  and patch description for the folded patch.
  328.73 -\end{itemize}
  328.74 -
  328.75 -\subsection{\hgxcmd{mq}{qheader}---display the header/description of a patch}
  328.76 -
  328.77 -The \hgxcmd{mq}{qheader} command prints the header, or description, of a
  328.78 -patch.  By default, it prints the header of the topmost applied patch.
  328.79 -Given an argument, it prints the header of the named patch.
  328.80 -
  328.81 -\subsection{\hgxcmd{mq}{qimport}---import a third-party patch into the queue}
  328.82 -
  328.83 -The \hgxcmd{mq}{qimport} command adds an entry for an external patch to the
  328.84 -\sfilename{series} file, and copies the patch into the
  328.85 -\sdirname{.hg/patches} directory.  It adds the entry immediately after
  328.86 -the topmost applied patch, but does not push the patch.
  328.87 -
  328.88 -If the \sdirname{.hg/patches} directory is a repository,
  328.89 -\hgxcmd{mq}{qimport} automatically does an \hgcmd{add} of the imported
  328.90 -patch.
  328.91 -
  328.92 -\subsection{\hgxcmd{mq}{qinit}---prepare a repository to work with MQ}
  328.93 -
  328.94 -The \hgxcmd{mq}{qinit} command prepares a repository to work with MQ.  It
  328.95 -creates a directory called \sdirname{.hg/patches}.
  328.96 -
  328.97 -Options:
  328.98 -\begin{itemize}
  328.99 -\item[\hgxopt{mq}{qinit}{-c}] Create \sdirname{.hg/patches} as a repository
 328.100 -  in its own right.  Also creates a \sfilename{.hgignore} file that
 328.101 -  will ignore the \sfilename{status} file.
 328.102 -\end{itemize}
 328.103 -
 328.104 -When the \sdirname{.hg/patches} directory is a repository, the
 328.105 -\hgxcmd{mq}{qimport} and \hgxcmd{mq}{qnew} commands automatically \hgcmd{add}
 328.106 -new patches.
 328.107 -
 328.108 -\subsection{\hgxcmd{mq}{qnew}---create a new patch}
 328.109 -
 328.110 -The \hgxcmd{mq}{qnew} command creates a new patch.  It takes one mandatory
 328.111 -argument, the name to use for the patch file.  The newly created patch
 328.112 -is created empty by default.  It is added to the \sfilename{series}
 328.113 -file after the current topmost applied patch, and is immediately
 328.114 -pushed on top of that patch.
 328.115 -
 328.116 -If \hgxcmd{mq}{qnew} finds modified files in the working directory, it will
 328.117 -refuse to create a new patch unless the \hgxopt{mq}{qnew}{-f} option is
 328.118 -used (see below).  This behaviour allows you to \hgxcmd{mq}{qrefresh} your
 328.119 -topmost applied patch before you apply a new patch on top of it.
 328.120 -
 328.121 -Options:
 328.122 -\begin{itemize}
 328.123 -\item[\hgxopt{mq}{qnew}{-f}] Create a new patch if the contents of the
 328.124 -  working directory are modified.  Any outstanding modifications are
 328.125 -  added to the newly created patch, so after this command completes,
 328.126 -  the working directory will no longer be modified.
 328.127 -\item[\hgxopt{mq}{qnew}{-m}] Use the given text as the commit message.
 328.128 -  This text will be stored at the beginning of the patch file, before
 328.129 -  the patch data.
 328.130 -\end{itemize}
 328.131 -
 328.132 -\subsection{\hgxcmd{mq}{qnext}---print the name of the next patch}
 328.133 -
 328.134 -The \hgxcmd{mq}{qnext} command prints the name name of the next patch in
 328.135 -the \sfilename{series} file after the topmost applied patch.  This
 328.136 -patch will become the topmost applied patch if you run \hgxcmd{mq}{qpush}.
 328.137 -
 328.138 -\subsection{\hgxcmd{mq}{qpop}---pop patches off the stack}
 328.139 -
 328.140 -The \hgxcmd{mq}{qpop} command removes applied patches from the top of the
 328.141 -stack of applied patches.  By default, it removes only one patch.
 328.142 -
 328.143 -This command removes the changesets that represent the popped patches
 328.144 -from the repository, and updates the working directory to undo the
 328.145 -effects of the patches.
 328.146 -
 328.147 -This command takes an optional argument, which it uses as the name or
 328.148 -index of the patch to pop to.  If given a name, it will pop patches
 328.149 -until the named patch is the topmost applied patch.  If given a
 328.150 -number, \hgxcmd{mq}{qpop} treats the number as an index into the entries in
 328.151 -the series file, counting from zero (empty lines and lines containing
 328.152 -only comments do not count).  It pops patches until the patch
 328.153 -identified by the given index is the topmost applied patch.
 328.154 -
 328.155 -The \hgxcmd{mq}{qpop} command does not read or write patches or the
 328.156 -\sfilename{series} file.  It is thus safe to \hgxcmd{mq}{qpop} a patch that
 328.157 -you have removed from the \sfilename{series} file, or a patch that you
 328.158 -have renamed or deleted entirely.  In the latter two cases, use the
 328.159 -name of the patch as it was when you applied it.
 328.160 -
 328.161 -By default, the \hgxcmd{mq}{qpop} command will not pop any patches if the
 328.162 -working directory has been modified.  You can override this behaviour
 328.163 -using the \hgxopt{mq}{qpop}{-f} option, which reverts all modifications in
 328.164 -the working directory.
 328.165 -
 328.166 -Options:
 328.167 -\begin{itemize}
 328.168 -\item[\hgxopt{mq}{qpop}{-a}] Pop all applied patches.  This returns the
 328.169 -  repository to its state before you applied any patches.
 328.170 -\item[\hgxopt{mq}{qpop}{-f}] Forcibly revert any modifications to the
 328.171 -  working directory when popping.
 328.172 -\item[\hgxopt{mq}{qpop}{-n}] Pop a patch from the named queue.
 328.173 -\end{itemize}
 328.174 -
 328.175 -The \hgxcmd{mq}{qpop} command removes one line from the end of the
 328.176 -\sfilename{status} file for each patch that it pops.
 328.177 -
 328.178 -\subsection{\hgxcmd{mq}{qprev}---print the name of the previous patch}
 328.179 -
 328.180 -The \hgxcmd{mq}{qprev} command prints the name of the patch in the
 328.181 -\sfilename{series} file that comes before the topmost applied patch.
 328.182 -This will become the topmost applied patch if you run \hgxcmd{mq}{qpop}.
 328.183 -
 328.184 -\subsection{\hgxcmd{mq}{qpush}---push patches onto the stack}
 328.185 -\label{sec:mqref:cmd:qpush}
 328.186 -
 328.187 -The \hgxcmd{mq}{qpush} command adds patches onto the applied stack.  By
 328.188 -default, it adds only one patch.
 328.189 -
 328.190 -This command creates a new changeset to represent each applied patch,
 328.191 -and updates the working directory to apply the effects of the patches.
 328.192 -
 328.193 -The default data used when creating a changeset are as follows:
 328.194 -\begin{itemize}
 328.195 -\item The commit date and time zone are the current date and time
 328.196 -  zone.  Because these data are used to compute the identity of a
 328.197 -  changeset, this means that if you \hgxcmd{mq}{qpop} a patch and
 328.198 -  \hgxcmd{mq}{qpush} it again, the changeset that you push will have a
 328.199 -  different identity than the changeset you popped.
 328.200 -\item The author is the same as the default used by the \hgcmd{commit}
 328.201 -  command.
 328.202 -\item The commit message is any text from the patch file that comes
 328.203 -  before the first diff header.  If there is no such text, a default
 328.204 -  commit message is used that identifies the name of the patch.
 328.205 -\end{itemize}
 328.206 -If a patch contains a Mercurial patch header (XXX add link), the
 328.207 -information in the patch header overrides these defaults.
 328.208 -
 328.209 -Options:
 328.210 -\begin{itemize}
 328.211 -\item[\hgxopt{mq}{qpush}{-a}] Push all unapplied patches from the
 328.212 -  \sfilename{series} file until there are none left to push.
 328.213 -\item[\hgxopt{mq}{qpush}{-l}] Add the name of the patch to the end
 328.214 -  of the commit message.
 328.215 -\item[\hgxopt{mq}{qpush}{-m}] If a patch fails to apply cleanly, use the
 328.216 -  entry for the patch in another saved queue to compute the parameters
 328.217 -  for a three-way merge, and perform a three-way merge using the
 328.218 -  normal Mercurial merge machinery.  Use the resolution of the merge
 328.219 -  as the new patch content.
 328.220 -\item[\hgxopt{mq}{qpush}{-n}] Use the named queue if merging while pushing.
 328.221 -\end{itemize}
 328.222 -
 328.223 -The \hgxcmd{mq}{qpush} command reads, but does not modify, the
 328.224 -\sfilename{series} file.  It appends one line to the \hgcmd{status}
 328.225 -file for each patch that it pushes.
 328.226 -
 328.227 -\subsection{\hgxcmd{mq}{qrefresh}---update the topmost applied patch}
 328.228 -
 328.229 -The \hgxcmd{mq}{qrefresh} command updates the topmost applied patch.  It
 328.230 -modifies the patch, removes the old changeset that represented the
 328.231 -patch, and creates a new changeset to represent the modified patch.
 328.232 -
 328.233 -The \hgxcmd{mq}{qrefresh} command looks for the following modifications:
 328.234 -\begin{itemize}
 328.235 -\item Changes to the commit message, i.e.~the text before the first
 328.236 -  diff header in the patch file, are reflected in the new changeset
 328.237 -  that represents the patch.
 328.238 -\item Modifications to tracked files in the working directory are
 328.239 -  added to the patch.
 328.240 -\item Changes to the files tracked using \hgcmd{add}, \hgcmd{copy},
 328.241 -  \hgcmd{remove}, or \hgcmd{rename}.  Added files and copy and rename
 328.242 -  destinations are added to the patch, while removed files and rename
 328.243 -  sources are removed.
 328.244 -\end{itemize}
 328.245 -
 328.246 -Even if \hgxcmd{mq}{qrefresh} detects no changes, it still recreates the
 328.247 -changeset that represents the patch.  This causes the identity of the
 328.248 -changeset to differ from the previous changeset that identified the
 328.249 -patch.
 328.250 -
 328.251 -Options:
 328.252 -\begin{itemize}
 328.253 -\item[\hgxopt{mq}{qrefresh}{-e}] Modify the commit and patch description,
 328.254 -  using the preferred text editor.
 328.255 -\item[\hgxopt{mq}{qrefresh}{-m}] Modify the commit message and patch
 328.256 -  description, using the given text.
 328.257 -\item[\hgxopt{mq}{qrefresh}{-l}] Modify the commit message and patch
 328.258 -  description, using text from the given file.
 328.259 -\end{itemize}
 328.260 -
 328.261 -\subsection{\hgxcmd{mq}{qrename}---rename a patch}
 328.262 -
 328.263 -The \hgxcmd{mq}{qrename} command renames a patch, and changes the entry for
 328.264 -the patch in the \sfilename{series} file.
 328.265 -
 328.266 -With a single argument, \hgxcmd{mq}{qrename} renames the topmost applied
 328.267 -patch.  With two arguments, it renames its first argument to its
 328.268 -second.
 328.269 -
 328.270 -\subsection{\hgxcmd{mq}{qrestore}---restore saved queue state}
 328.271 -
 328.272 -XXX No idea what this does.
 328.273 -
 328.274 -\subsection{\hgxcmd{mq}{qsave}---save current queue state}
 328.275 -
 328.276 -XXX Likewise.
 328.277 -
 328.278 -\subsection{\hgxcmd{mq}{qseries}---print the entire patch series}
 328.279 -
 328.280 -The \hgxcmd{mq}{qseries} command prints the entire patch series from the
 328.281 -\sfilename{series} file.  It prints only patch names, not empty lines
 328.282 -or comments.  It prints in order from first to be applied to last.
 328.283 -
 328.284 -\subsection{\hgxcmd{mq}{qtop}---print the name of the current patch}
 328.285 -
 328.286 -The \hgxcmd{mq}{qtop} prints the name of the topmost currently applied
 328.287 -patch.
 328.288 -
 328.289 -\subsection{\hgxcmd{mq}{qunapplied}---print patches not yet applied}
 328.290 -
 328.291 -The \hgxcmd{mq}{qunapplied} command prints the names of patches from the
 328.292 -\sfilename{series} file that are not yet applied.  It prints them in
 328.293 -order from the next patch that will be pushed to the last.
 328.294 -
 328.295 -\subsection{\hgcmd{strip}---remove a revision and descendants}
 328.296 -
 328.297 -The \hgcmd{strip} command removes a revision, and all of its
 328.298 -descendants, from the repository.  It undoes the effects of the
 328.299 -removed revisions from the repository, and updates the working
 328.300 -directory to the first parent of the removed revision.
 328.301 -
 328.302 -The \hgcmd{strip} command saves a backup of the removed changesets in
 328.303 -a bundle, so that they can be reapplied if removed in error.
 328.304 -
 328.305 -Options:
 328.306 -\begin{itemize}
 328.307 -\item[\hgopt{strip}{-b}] Save unrelated changesets that are intermixed
 328.308 -  with the stripped changesets in the backup bundle.
 328.309 -\item[\hgopt{strip}{-f}] If a branch has multiple heads, remove all
 328.310 -  heads. XXX This should be renamed, and use \texttt{-f} to strip revs
 328.311 -  when there are pending changes.
 328.312 -\item[\hgopt{strip}{-n}] Do not save a backup bundle.
 328.313 -\end{itemize}
 328.314 -
 328.315 -\section{MQ file reference}
 328.316 -
 328.317 -\subsection{The \sfilename{series} file}
 328.318 -
 328.319 -The \sfilename{series} file contains a list of the names of all
 328.320 -patches that MQ can apply.  It is represented as a list of names, with
 328.321 -one name saved per line.  Leading and trailing white space in each
 328.322 -line are ignored.
 328.323 -
 328.324 -Lines may contain comments.  A comment begins with the ``\texttt{\#}''
 328.325 -character, and extends to the end of the line.  Empty lines, and lines
 328.326 -that contain only comments, are ignored.
 328.327 -
 328.328 -You will often need to edit the \sfilename{series} file by hand, hence
 328.329 -the support for comments and empty lines noted above.  For example,
 328.330 -you can comment out a patch temporarily, and \hgxcmd{mq}{qpush} will skip
 328.331 -over that patch when applying patches.  You can also change the order
 328.332 -in which patches are applied by reordering their entries in the
 328.333 -\sfilename{series} file.
 328.334 -
 328.335 -Placing the \sfilename{series} file under revision control is also
 328.336 -supported; it is a good idea to place all of the patches that it
 328.337 -refers to under revision control, as well.  If you create a patch
 328.338 -directory using the \hgxopt{mq}{qinit}{-c} option to \hgxcmd{mq}{qinit}, this
 328.339 -will be done for you automatically.
 328.340 -
 328.341 -\subsection{The \sfilename{status} file}
 328.342 -
 328.343 -The \sfilename{status} file contains the names and changeset hashes of
 328.344 -all patches that MQ currently has applied.  Unlike the
 328.345 -\sfilename{series} file, this file is not intended for editing.  You
 328.346 -should not place this file under revision control, or modify it in any
 328.347 -way.  It is used by MQ strictly for internal book-keeping.
 328.348 -
 328.349 -%%% Local Variables: 
 328.350 -%%% mode: latex
 328.351 -%%% TeX-master: "00book"
 328.352 -%%% End: 
   329.1 --- a/en/mq-stack.svg	Thu Mar 26 08:57:10 2009 +0100
   329.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   329.3 @@ -1,270 +0,0 @@
   329.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   329.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   329.6 -<svg
   329.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   329.8 -   xmlns:cc="http://web.resource.org/cc/"
   329.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  329.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  329.11 -   xmlns="http://www.w3.org/2000/svg"
  329.12 -   xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
  329.13 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  329.14 -   width="744.09448819"
  329.15 -   height="1052.3622047"
  329.16 -   id="svg2"
  329.17 -   sodipodi:version="0.32"
  329.18 -   inkscape:version="0.43"
  329.19 -   sodipodi:docname="mq-stack.svg"
  329.20 -   sodipodi:docbase="/home/bos/hg/hgbook/en">
  329.21 -  <defs
  329.22 -     id="defs4" />
  329.23 -  <sodipodi:namedview
  329.24 -     id="base"
  329.25 -     pagecolor="#ffffff"
  329.26 -     bordercolor="#666666"
  329.27 -     borderopacity="1.0"
  329.28 -     inkscape:pageopacity="0.0"
  329.29 -     inkscape:pageshadow="2"
  329.30 -     inkscape:zoom="1.4142136"
  329.31 -     inkscape:cx="299.33323"
  329.32 -     inkscape:cy="815.646"
  329.33 -     inkscape:document-units="px"
  329.34 -     inkscape:current-layer="layer1"
  329.35 -     inkscape:window-width="1014"
  329.36 -     inkscape:window-height="689"
  329.37 -     inkscape:window-x="0"
  329.38 -     inkscape:window-y="25" />
  329.39 -  <metadata
  329.40 -     id="metadata7">
  329.41 -    <rdf:RDF>
  329.42 -      <cc:Work
  329.43 -         rdf:about="">
  329.44 -        <dc:format>image/svg+xml</dc:format>
  329.45 -        <dc:type
  329.46 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  329.47 -      </cc:Work>
  329.48 -    </rdf:RDF>
  329.49 -  </metadata>
  329.50 -  <g
  329.51 -     inkscape:label="Layer 1"
  329.52 -     inkscape:groupmode="layer"
  329.53 -     id="layer1">
  329.54 -    <rect
  329.55 -       style="fill:#0000ff;fill-opacity:0.75;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  329.56 -       id="rect1307"
  329.57 -       width="202.93683"
  329.58 -       height="24.243662"
  329.59 -       x="230.01944"
  329.60 -       y="221.70146" />
  329.61 -    <text
  329.62 -       xml:space="preserve"
  329.63 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
  329.64 -       x="237.89606"
  329.65 -       y="237.13383"
  329.66 -       id="text1309"><tspan
  329.67 -         sodipodi:role="line"
  329.68 -         id="tspan1311"
  329.69 -         x="237.89606"
  329.70 -         y="237.13383">prevent-compiler-reorder.patch</tspan></text>
  329.71 -    <rect
  329.72 -       style="fill:#7979ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  329.73 -       id="rect1320"
  329.74 -       width="202.93683"
  329.75 -       height="24.243662"
  329.76 -       x="230.01936"
  329.77 -       y="251.34325" />
  329.78 -    <text
  329.79 -       xml:space="preserve"
  329.80 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
  329.81 -       x="237.89598"
  329.82 -       y="266.77563"
  329.83 -       id="text1322"><tspan
  329.84 -         sodipodi:role="line"
  329.85 -         id="tspan1324"
  329.86 -         x="237.89598"
  329.87 -         y="266.77563">namespace-cleanup.patch</tspan></text>
  329.88 -    <rect
  329.89 -       style="fill:#7979ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  329.90 -       id="rect2217"
  329.91 -       width="202.93683"
  329.92 -       height="24.243662"
  329.93 -       x="230.01936"
  329.94 -       y="280.98505" />
  329.95 -    <text
  329.96 -       xml:space="preserve"
  329.97 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
  329.98 -       x="237.89598"
  329.99 -       y="296.41742"
 329.100 -       id="text2219"><tspan
 329.101 -         sodipodi:role="line"
 329.102 -         id="tspan2221"
 329.103 -         x="237.89598"
 329.104 -         y="296.41742">powerpc-port-fixes.patch</tspan></text>
 329.105 -    <rect
 329.106 -       style="fill:#7979ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 329.107 -       id="rect3114"
 329.108 -       width="202.93683"
 329.109 -       height="24.243662"
 329.110 -       x="230.01936"
 329.111 -       y="310.6268" />
 329.112 -    <text
 329.113 -       xml:space="preserve"
 329.114 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 329.115 -       x="237.89598"
 329.116 -       y="326.05917"
 329.117 -       id="text3116"><tspan
 329.118 -         sodipodi:role="line"
 329.119 -         id="tspan3118"
 329.120 -         x="237.89598"
 329.121 -         y="326.05917">report-devinfo-correctly.patch</tspan></text>
 329.122 -    <text
 329.123 -       xml:space="preserve"
 329.124 -       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 329.125 -       x="200.01021"
 329.126 -       y="191.68094"
 329.127 -       id="text3170"
 329.128 -       sodipodi:linespacing="125%"><tspan
 329.129 -         sodipodi:role="line"
 329.130 -         id="tspan3172"
 329.131 -         x="200.01021"
 329.132 -         y="191.68094"
 329.133 -         style="font-size:48px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans">{</tspan></text>
 329.134 -    <text
 329.135 -       xml:space="preserve"
 329.136 -       style="font-size:15.25329685px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 329.137 -       x="255.26627"
 329.138 -       y="248.79449"
 329.139 -       id="text3190"
 329.140 -       sodipodi:linespacing="125%"
 329.141 -       transform="scale(0.786716,1.271107)"><tspan
 329.142 -         sodipodi:role="line"
 329.143 -         id="tspan3192"
 329.144 -         x="255.26627"
 329.145 -         y="248.79449"
 329.146 -         style="font-size:61.01318741px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans">{</tspan></text>
 329.147 -    <text
 329.148 -       xml:space="preserve"
 329.149 -       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 329.150 -       x="195.86807"
 329.151 -       y="173.17117"
 329.152 -       id="text4085"
 329.153 -       sodipodi:linespacing="125%"><tspan
 329.154 -         sodipodi:role="line"
 329.155 -         id="tspan4087"
 329.156 -         x="195.86807"
 329.157 -         y="173.17117"
 329.158 -         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">present in series,</tspan><tspan
 329.159 -         sodipodi:role="line"
 329.160 -         x="195.86807"
 329.161 -         y="188.17117"
 329.162 -         id="tspan4089"
 329.163 -         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">but not applied</tspan></text>
 329.164 -    <text
 329.165 -       xml:space="preserve"
 329.166 -       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 329.167 -       x="195.0712"
 329.168 -       y="288.91745"
 329.169 -       id="text4091"
 329.170 -       sodipodi:linespacing="125%"><tspan
 329.171 -         sodipodi:role="line"
 329.172 -         id="tspan4093"
 329.173 -         x="195.0712"
 329.174 -         y="288.91745"
 329.175 -         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">patches applied,</tspan><tspan
 329.176 -         sodipodi:role="line"
 329.177 -         x="195.0712"
 329.178 -         y="303.91745"
 329.179 -         id="tspan4111"
 329.180 -         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">changesets present</tspan></text>
 329.181 -    <text
 329.182 -       xml:space="preserve"
 329.183 -       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 329.184 -       x="195.0712"
 329.185 -       y="229.28813"
 329.186 -       id="text4095"
 329.187 -       sodipodi:linespacing="125%"><tspan
 329.188 -         sodipodi:role="line"
 329.189 -         id="tspan4097"
 329.190 -         x="195.0712"
 329.191 -         y="229.28813"
 329.192 -         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">topmost</tspan><tspan
 329.193 -         sodipodi:role="line"
 329.194 -         x="195.0712"
 329.195 -         y="244.28813"
 329.196 -         id="tspan4109"
 329.197 -         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">applied patch</tspan></text>
 329.198 -    <text
 329.199 -       xml:space="preserve"
 329.200 -       style="font-size:12px;font-style:normal;font-weight:normal;opacity:1;fill:#666666;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 329.201 -       x="450.4975"
 329.202 -       y="238.29692"
 329.203 -       id="text4137"><tspan
 329.204 -         sodipodi:role="line"
 329.205 -         id="tspan4139"
 329.206 -         x="450.4975"
 329.207 -         y="238.29692">201ad3209902</tspan></text>
 329.208 -    <text
 329.209 -       xml:space="preserve"
 329.210 -       style="font-size:12px;font-style:normal;font-weight:normal;opacity:1;fill:#989898;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 329.211 -       x="450.05804"
 329.212 -       y="267.93872"
 329.213 -       id="text4141"><tspan
 329.214 -         sodipodi:role="line"
 329.215 -         id="tspan4143"
 329.216 -         x="450.05804"
 329.217 -         y="267.93872">126b84e593ae</tspan></text>
 329.218 -    <text
 329.219 -       xml:space="preserve"
 329.220 -       style="font-size:12px;font-style:normal;font-weight:normal;opacity:1;fill:#989898;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 329.221 -       x="450.6557"
 329.222 -       y="297.58051"
 329.223 -       id="text4145"><tspan
 329.224 -         sodipodi:role="line"
 329.225 -         id="tspan4147"
 329.226 -         x="450.6557"
 329.227 -         y="297.58051">a655daf15409</tspan></text>
 329.228 -    <text
 329.229 -       xml:space="preserve"
 329.230 -       style="font-size:12px;font-style:normal;font-weight:normal;opacity:1;fill:#989898;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 329.231 -       x="450.71429"
 329.232 -       y="327.22226"
 329.233 -       id="text4149"><tspan
 329.234 -         sodipodi:role="line"
 329.235 -         id="tspan4151"
 329.236 -         x="450.71429"
 329.237 -         y="327.22226">e50d59aaea3a</tspan></text>
 329.238 -    <rect
 329.239 -       style="fill:#d7d7ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#a6a6a6;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 329.240 -       id="rect3106"
 329.241 -       width="202.93683"
 329.242 -       height="24.243662"
 329.243 -       x="230.01936"
 329.244 -       y="150.41792" />
 329.245 -    <text
 329.246 -       xml:space="preserve"
 329.247 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:#808080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 329.248 -       x="237.89598"
 329.249 -       y="165.8503"
 329.250 -       id="text3108"><tspan
 329.251 -         sodipodi:role="line"
 329.252 -         id="tspan3110"
 329.253 -         x="237.89598"
 329.254 -         y="165.8503">forbid-illegal-params.patch</tspan></text>
 329.255 -    <rect
 329.256 -       style="fill:#d7d7ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#a6a6a6;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 329.257 -       id="rect2241"
 329.258 -       width="202.93683"
 329.259 -       height="24.243662"
 329.260 -       x="230.16466"
 329.261 -       y="180.05968" />
 329.262 -    <text
 329.263 -       xml:space="preserve"
 329.264 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:#808080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 329.265 -       x="238.04128"
 329.266 -       y="195.49205"
 329.267 -       id="text2243"><tspan
 329.268 -         sodipodi:role="line"
 329.269 -         id="tspan2245"
 329.270 -         x="238.04128"
 329.271 -         y="195.49205">fix-memory-leak.patch</tspan></text>
 329.272 -  </g>
 329.273 -</svg>
   330.1 --- a/en/mq.tex	Thu Mar 26 08:57:10 2009 +0100
   330.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   330.3 @@ -1,1043 +0,0 @@
   330.4 -\chapter{Managing change with Mercurial Queues}
   330.5 -\label{chap:mq}
   330.6 -
   330.7 -\section{The patch management problem}
   330.8 -\label{sec:mq:patch-mgmt}
   330.9 -
  330.10 -Here is a common scenario: you need to install a software package from
  330.11 -source, but you find a bug that you must fix in the source before you
  330.12 -can start using the package.  You make your changes, forget about the
  330.13 -package for a while, and a few months later you need to upgrade to a
  330.14 -newer version of the package.  If the newer version of the package
  330.15 -still has the bug, you must extract your fix from the older source
  330.16 -tree and apply it against the newer version.  This is a tedious task,
  330.17 -and it's easy to make mistakes.
  330.18 -
  330.19 -This is a simple case of the ``patch management'' problem.  You have
  330.20 -an ``upstream'' source tree that you can't change; you need to make
  330.21 -some local changes on top of the upstream tree; and you'd like to be
  330.22 -able to keep those changes separate, so that you can apply them to
  330.23 -newer versions of the upstream source.
  330.24 -
  330.25 -The patch management problem arises in many situations.  Probably the
  330.26 -most visible is that a user of an open source software project will
  330.27 -contribute a bug fix or new feature to the project's maintainers in the
  330.28 -form of a patch.
  330.29 -
  330.30 -Distributors of operating systems that include open source software
  330.31 -often need to make changes to the packages they distribute so that
  330.32 -they will build properly in their environments.
  330.33 -
  330.34 -When you have few changes to maintain, it is easy to manage a single
  330.35 -patch using the standard \command{diff} and \command{patch} programs
  330.36 -(see section~\ref{sec:mq:patch} for a discussion of these tools).
  330.37 -Once the number of changes grows, it starts to make sense to maintain
  330.38 -patches as discrete ``chunks of work,'' so that for example a single
  330.39 -patch will contain only one bug fix (the patch might modify several
  330.40 -files, but it's doing ``only one thing''), and you may have a number
  330.41 -of such patches for different bugs you need fixed and local changes
  330.42 -you require.  In this situation, if you submit a bug fix patch to the
  330.43 -upstream maintainers of a package and they include your fix in a
  330.44 -subsequent release, you can simply drop that single patch when you're
  330.45 -updating to the newer release.
  330.46 -
  330.47 -Maintaining a single patch against an upstream tree is a little
  330.48 -tedious and error-prone, but not difficult.  However, the complexity
  330.49 -of the problem grows rapidly as the number of patches you have to
  330.50 -maintain increases.  With more than a tiny number of patches in hand,
  330.51 -understanding which ones you have applied and maintaining them moves
  330.52 -from messy to overwhelming.
  330.53 -
  330.54 -Fortunately, Mercurial includes a powerful extension, Mercurial Queues
  330.55 -(or simply ``MQ''), that massively simplifies the patch management
  330.56 -problem.
  330.57 -
  330.58 -\section{The prehistory of Mercurial Queues}
  330.59 -\label{sec:mq:history}
  330.60 -
  330.61 -During the late 1990s, several Linux kernel developers started to
  330.62 -maintain ``patch series'' that modified the behaviour of the Linux
  330.63 -kernel.  Some of these series were focused on stability, some on
  330.64 -feature coverage, and others were more speculative.
  330.65 -
  330.66 -The sizes of these patch series grew rapidly.  In 2002, Andrew Morton
  330.67 -published some shell scripts he had been using to automate the task of
  330.68 -managing his patch queues.  Andrew was successfully using these
  330.69 -scripts to manage hundreds (sometimes thousands) of patches on top of
  330.70 -the Linux kernel.
  330.71 -
  330.72 -\subsection{A patchwork quilt}
  330.73 -\label{sec:mq:quilt}
  330.74 -
  330.75 -In early 2003, Andreas Gruenbacher and Martin Quinson borrowed the
  330.76 -approach of Andrew's scripts and published a tool called ``patchwork
  330.77 -quilt''~\cite{web:quilt}, or simply ``quilt''
  330.78 -(see~\cite{gruenbacher:2005} for a paper describing it).  Because
  330.79 -quilt substantially automated patch management, it rapidly gained a
  330.80 -large following among open source software developers.
  330.81 -
  330.82 -Quilt manages a \emph{stack of patches} on top of a directory tree.
  330.83 -To begin, you tell quilt to manage a directory tree, and tell it which
  330.84 -files you want to manage; it stores away the names and contents of
  330.85 -those files.  To fix a bug, you create a new patch (using a single
  330.86 -command), edit the files you need to fix, then ``refresh'' the patch.
  330.87 -
  330.88 -The refresh step causes quilt to scan the directory tree; it updates
  330.89 -the patch with all of the changes you have made.  You can create
  330.90 -another patch on top of the first, which will track the changes
  330.91 -required to modify the tree from ``tree with one patch applied'' to
  330.92 -``tree with two patches applied''.
  330.93 -
  330.94 -You can \emph{change} which patches are applied to the tree.  If you
  330.95 -``pop'' a patch, the changes made by that patch will vanish from the
  330.96 -directory tree.  Quilt remembers which patches you have popped,
  330.97 -though, so you can ``push'' a popped patch again, and the directory
  330.98 -tree will be restored to contain the modifications in the patch.  Most
  330.99 -importantly, you can run the ``refresh'' command at any time, and the
 330.100 -topmost applied patch will be updated.  This means that you can, at
 330.101 -any time, change both which patches are applied and what
 330.102 -modifications those patches make.
 330.103 -
 330.104 -Quilt knows nothing about revision control tools, so it works equally
 330.105 -well on top of an unpacked tarball or a Subversion working copy.
 330.106 -
 330.107 -\subsection{From patchwork quilt to Mercurial Queues}
 330.108 -\label{sec:mq:quilt-mq}
 330.109 -
 330.110 -In mid-2005, Chris Mason took the features of quilt and wrote an
 330.111 -extension that he called Mercurial Queues, which added quilt-like
 330.112 -behaviour to Mercurial.
 330.113 -
 330.114 -The key difference between quilt and MQ is that quilt knows nothing
 330.115 -about revision control systems, while MQ is \emph{integrated} into
 330.116 -Mercurial.  Each patch that you push is represented as a Mercurial
 330.117 -changeset.  Pop a patch, and the changeset goes away.
 330.118 -
 330.119 -Because quilt does not care about revision control tools, it is still
 330.120 -a tremendously useful piece of software to know about for situations
 330.121 -where you cannot use Mercurial and MQ.
 330.122 -
 330.123 -\section{The huge advantage of MQ}
 330.124 -
 330.125 -I cannot overstate the value that MQ offers through the unification of
 330.126 -patches and revision control.
 330.127 -
 330.128 -A major reason that patches have persisted in the free software and
 330.129 -open source world---in spite of the availability of increasingly
 330.130 -capable revision control tools over the years---is the \emph{agility}
 330.131 -they offer.  
 330.132 -
 330.133 -Traditional revision control tools make a permanent, irreversible
 330.134 -record of everything that you do.  While this has great value, it's
 330.135 -also somewhat stifling.  If you want to perform a wild-eyed
 330.136 -experiment, you have to be careful in how you go about it, or you risk
 330.137 -leaving unneeded---or worse, misleading or destabilising---traces of
 330.138 -your missteps and errors in the permanent revision record.
 330.139 -
 330.140 -By contrast, MQ's marriage of distributed revision control with
 330.141 -patches makes it much easier to isolate your work.  Your patches live
 330.142 -on top of normal revision history, and you can make them disappear or
 330.143 -reappear at will.  If you don't like a patch, you can drop it.  If a
 330.144 -patch isn't quite as you want it to be, simply fix it---as many times
 330.145 -as you need to, until you have refined it into the form you desire.
 330.146 -
 330.147 -As an example, the integration of patches with revision control makes
 330.148 -understanding patches and debugging their effects---and their
 330.149 -interplay with the code they're based on---\emph{enormously} easier.
 330.150 -Since every applied patch has an associated changeset, you can use
 330.151 -\hgcmdargs{log}{\emph{filename}} to see which changesets and patches
 330.152 -affected a file.  You can use the \hgext{bisect} command to
 330.153 -binary-search through all changesets and applied patches to see where
 330.154 -a bug got introduced or fixed.  You can use the \hgcmd{annotate}
 330.155 -command to see which changeset or patch modified a particular line of
 330.156 -a source file.  And so on.
 330.157 -
 330.158 -\section{Understanding patches}
 330.159 -\label{sec:mq:patch}
 330.160 -
 330.161 -Because MQ doesn't hide its patch-oriented nature, it is helpful to
 330.162 -understand what patches are, and a little about the tools that work
 330.163 -with them.
 330.164 -
 330.165 -The traditional Unix \command{diff} command compares two files, and
 330.166 -prints a list of differences between them. The \command{patch} command
 330.167 -understands these differences as \emph{modifications} to make to a
 330.168 -file.  Take a look at figure~\ref{ex:mq:diff} for a simple example of
 330.169 -these commands in action.
 330.170 -
 330.171 -\begin{figure}[ht]
 330.172 -  \interaction{mq.dodiff.diff}
 330.173 -  \caption{Simple uses of the \command{diff} and \command{patch} commands}
 330.174 -  \label{ex:mq:diff}
 330.175 -\end{figure}
 330.176 -
 330.177 -The type of file that \command{diff} generates (and \command{patch}
 330.178 -takes as input) is called a ``patch'' or a ``diff''; there is no
 330.179 -difference between a patch and a diff.  (We'll use the term ``patch'',
 330.180 -since it's more commonly used.)
 330.181 -
 330.182 -A patch file can start with arbitrary text; the \command{patch}
 330.183 -command ignores this text, but MQ uses it as the commit message when
 330.184 -creating changesets.  To find the beginning of the patch content,
 330.185 -\command{patch} searches for the first line that starts with the
 330.186 -string ``\texttt{diff~-}''.
 330.187 -
 330.188 -MQ works with \emph{unified} diffs (\command{patch} can accept several
 330.189 -other diff formats, but MQ doesn't).  A unified diff contains two
 330.190 -kinds of header.  The \emph{file header} describes the file being
 330.191 -modified; it contains the name of the file to modify.  When
 330.192 -\command{patch} sees a new file header, it looks for a file with that
 330.193 -name to start modifying.
 330.194 -
 330.195 -After the file header comes a series of \emph{hunks}.  Each hunk
 330.196 -starts with a header; this identifies the range of line numbers within
 330.197 -the file that the hunk should modify.  Following the header, a hunk
 330.198 -starts and ends with a few (usually three) lines of text from the
 330.199 -unmodified file; these are called the \emph{context} for the hunk.  If
 330.200 -there's only a small amount of context between successive hunks,
 330.201 -\command{diff} doesn't print a new hunk header; it just runs the hunks
 330.202 -together, with a few lines of context between modifications.
 330.203 -
 330.204 -Each line of context begins with a space character.  Within the hunk,
 330.205 -a line that begins with ``\texttt{-}'' means ``remove this line,''
 330.206 -while a line that begins with ``\texttt{+}'' means ``insert this
 330.207 -line.''  For example, a line that is modified is represented by one
 330.208 -deletion and one insertion.
 330.209 -
 330.210 -We will return to some of the more subtle aspects of patches later (in
 330.211 -section~\ref{sec:mq:adv-patch}), but you should have enough information
 330.212 -now to use MQ.
 330.213 -
 330.214 -\section{Getting started with Mercurial Queues}
 330.215 -\label{sec:mq:start}
 330.216 -
 330.217 -Because MQ is implemented as an extension, you must explicitly enable
 330.218 -before you can use it.  (You don't need to download anything; MQ ships
 330.219 -with the standard Mercurial distribution.)  To enable MQ, edit your
 330.220 -\tildefile{.hgrc} file, and add the lines in figure~\ref{ex:mq:config}.
 330.221 -
 330.222 -\begin{figure}[ht]
 330.223 -  \begin{codesample4}
 330.224 -    [extensions]
 330.225 -    hgext.mq =
 330.226 -  \end{codesample4}
 330.227 -  \label{ex:mq:config}
 330.228 -  \caption{Contents to add to \tildefile{.hgrc} to enable the MQ extension}
 330.229 -\end{figure}
 330.230 -
 330.231 -Once the extension is enabled, it will make a number of new commands
 330.232 -available.  To verify that the extension is working, you can use
 330.233 -\hgcmd{help} to see if the \hgxcmd{mq}{qinit} command is now available; see
 330.234 -the example in figure~\ref{ex:mq:enabled}.
 330.235 -
 330.236 -\begin{figure}[ht]
 330.237 -  \interaction{mq.qinit-help.help}
 330.238 -  \caption{How to verify that MQ is enabled}
 330.239 -  \label{ex:mq:enabled}
 330.240 -\end{figure}
 330.241 -
 330.242 -You can use MQ with \emph{any} Mercurial repository, and its commands
 330.243 -only operate within that repository.  To get started, simply prepare
 330.244 -the repository using the \hgxcmd{mq}{qinit} command (see
 330.245 -figure~\ref{ex:mq:qinit}).  This command creates an empty directory
 330.246 -called \sdirname{.hg/patches}, where MQ will keep its metadata.  As
 330.247 -with many Mercurial commands, the \hgxcmd{mq}{qinit} command prints nothing
 330.248 -if it succeeds.
 330.249 -
 330.250 -\begin{figure}[ht]
 330.251 -  \interaction{mq.tutorial.qinit}
 330.252 -  \caption{Preparing a repository for use with MQ}
 330.253 -  \label{ex:mq:qinit}
 330.254 -\end{figure}
 330.255 -
 330.256 -\begin{figure}[ht]
 330.257 -  \interaction{mq.tutorial.qnew}
 330.258 -  \caption{Creating a new patch}
 330.259 -  \label{ex:mq:qnew}
 330.260 -\end{figure}
 330.261 -
 330.262 -\subsection{Creating a new patch}
 330.263 -
 330.264 -To begin work on a new patch, use the \hgxcmd{mq}{qnew} command.  This
 330.265 -command takes one argument, the name of the patch to create.  MQ will
 330.266 -use this as the name of an actual file in the \sdirname{.hg/patches}
 330.267 -directory, as you can see in figure~\ref{ex:mq:qnew}.
 330.268 -
 330.269 -Also newly present in the \sdirname{.hg/patches} directory are two
 330.270 -other files, \sfilename{series} and \sfilename{status}.  The
 330.271 -\sfilename{series} file lists all of the patches that MQ knows about
 330.272 -for this repository, with one patch per line.  Mercurial uses the
 330.273 -\sfilename{status} file for internal book-keeping; it tracks all of the
 330.274 -patches that MQ has \emph{applied} in this repository.
 330.275 -
 330.276 -\begin{note}
 330.277 -  You may sometimes want to edit the \sfilename{series} file by hand;
 330.278 -  for example, to change the sequence in which some patches are
 330.279 -  applied.  However, manually editing the \sfilename{status} file is
 330.280 -  almost always a bad idea, as it's easy to corrupt MQ's idea of what
 330.281 -  is happening.
 330.282 -\end{note}
 330.283 -
 330.284 -Once you have created your new patch, you can edit files in the
 330.285 -working directory as you usually would.  All of the normal Mercurial
 330.286 -commands, such as \hgcmd{diff} and \hgcmd{annotate}, work exactly as
 330.287 -they did before.
 330.288 -
 330.289 -\subsection{Refreshing a patch}
 330.290 -
 330.291 -When you reach a point where you want to save your work, use the
 330.292 -\hgxcmd{mq}{qrefresh} command (figure~\ref{ex:mq:qnew}) to update the patch
 330.293 -you are working on.  This command folds the changes you have made in
 330.294 -the working directory into your patch, and updates its corresponding
 330.295 -changeset to contain those changes.
 330.296 -
 330.297 -\begin{figure}[ht]
 330.298 -  \interaction{mq.tutorial.qrefresh}
 330.299 -  \caption{Refreshing a patch}
 330.300 -  \label{ex:mq:qrefresh}
 330.301 -\end{figure}
 330.302 -
 330.303 -You can run \hgxcmd{mq}{qrefresh} as often as you like, so it's a good way
 330.304 -to ``checkpoint'' your work.  Refresh your patch at an opportune
 330.305 -time; try an experiment; and if the experiment doesn't work out,
 330.306 -\hgcmd{revert} your modifications back to the last time you refreshed.
 330.307 -
 330.308 -\begin{figure}[ht]
 330.309 -  \interaction{mq.tutorial.qrefresh2}
 330.310 -  \caption{Refresh a patch many times to accumulate changes}
 330.311 -  \label{ex:mq:qrefresh2}
 330.312 -\end{figure}
 330.313 -
 330.314 -\subsection{Stacking and tracking patches}
 330.315 -
 330.316 -Once you have finished working on a patch, or need to work on another,
 330.317 -you can use the \hgxcmd{mq}{qnew} command again to create a new patch.
 330.318 -Mercurial will apply this patch on top of your existing patch.  See
 330.319 -figure~\ref{ex:mq:qnew2} for an example.  Notice that the patch
 330.320 -contains the changes in our prior patch as part of its context (you
 330.321 -can see this more clearly in the output of \hgcmd{annotate}).
 330.322 -
 330.323 -\begin{figure}[ht]
 330.324 -  \interaction{mq.tutorial.qnew2}
 330.325 -  \caption{Stacking a second patch on top of the first}
 330.326 -  \label{ex:mq:qnew2}
 330.327 -\end{figure}
 330.328 -
 330.329 -So far, with the exception of \hgxcmd{mq}{qnew} and \hgxcmd{mq}{qrefresh}, we've
 330.330 -been careful to only use regular Mercurial commands.  However, MQ
 330.331 -provides many commands that are easier to use when you are thinking
 330.332 -about patches, as illustrated in figure~\ref{ex:mq:qseries}:
 330.333 -
 330.334 -\begin{itemize}
 330.335 -\item The \hgxcmd{mq}{qseries} command lists every patch that MQ knows
 330.336 -  about in this repository, from oldest to newest (most recently
 330.337 -  \emph{created}).
 330.338 -\item The \hgxcmd{mq}{qapplied} command lists every patch that MQ has
 330.339 -  \emph{applied} in this repository, again from oldest to newest (most
 330.340 -  recently applied).
 330.341 -\end{itemize}
 330.342 -
 330.343 -\begin{figure}[ht]
 330.344 -  \interaction{mq.tutorial.qseries}
 330.345 -  \caption{Understanding the patch stack with \hgxcmd{mq}{qseries} and
 330.346 -    \hgxcmd{mq}{qapplied}}
 330.347 -  \label{ex:mq:qseries}
 330.348 -\end{figure}
 330.349 -
 330.350 -\subsection{Manipulating the patch stack}
 330.351 -
 330.352 -The previous discussion implied that there must be a difference
 330.353 -between ``known'' and ``applied'' patches, and there is.  MQ can
 330.354 -manage a patch without it being applied in the repository.
 330.355 -
 330.356 -An \emph{applied} patch has a corresponding changeset in the
 330.357 -repository, and the effects of the patch and changeset are visible in
 330.358 -the working directory.  You can undo the application of a patch using
 330.359 -the \hgxcmd{mq}{qpop} command.  MQ still \emph{knows about}, or manages, a
 330.360 -popped patch, but the patch no longer has a corresponding changeset in
 330.361 -the repository, and the working directory does not contain the changes
 330.362 -made by the patch.  Figure~\ref{fig:mq:stack} illustrates the
 330.363 -difference between applied and tracked patches.
 330.364 -
 330.365 -\begin{figure}[ht]
 330.366 -  \centering
 330.367 -  \grafix{mq-stack}
 330.368 -  \caption{Applied and unapplied patches in the MQ patch stack}
 330.369 -  \label{fig:mq:stack}
 330.370 -\end{figure}
 330.371 -
 330.372 -You can reapply an unapplied, or popped, patch using the \hgxcmd{mq}{qpush}
 330.373 -command.  This creates a new changeset to correspond to the patch, and
 330.374 -the patch's changes once again become present in the working
 330.375 -directory.  See figure~\ref{ex:mq:qpop} for examples of \hgxcmd{mq}{qpop}
 330.376 -and \hgxcmd{mq}{qpush} in action.  Notice that once we have popped a patch
 330.377 -or two patches, the output of \hgxcmd{mq}{qseries} remains the same, while
 330.378 -that of \hgxcmd{mq}{qapplied} has changed.
 330.379 -
 330.380 -\begin{figure}[ht]
 330.381 -  \interaction{mq.tutorial.qpop}
 330.382 -  \caption{Modifying the stack of applied patches}
 330.383 -  \label{ex:mq:qpop}
 330.384 -\end{figure}
 330.385 -
 330.386 -\subsection{Pushing and popping many patches}
 330.387 -
 330.388 -While \hgxcmd{mq}{qpush} and \hgxcmd{mq}{qpop} each operate on a single patch at
 330.389 -a time by default, you can push and pop many patches in one go.  The
 330.390 -\hgxopt{mq}{qpush}{-a} option to \hgxcmd{mq}{qpush} causes it to push all
 330.391 -unapplied patches, while the \hgxopt{mq}{qpop}{-a} option to \hgxcmd{mq}{qpop}
 330.392 -causes it to pop all applied patches.  (For some more ways to push and
 330.393 -pop many patches, see section~\ref{sec:mq:perf} below.)
 330.394 -
 330.395 -\begin{figure}[ht]
 330.396 -  \interaction{mq.tutorial.qpush-a}
 330.397 -  \caption{Pushing all unapplied patches}
 330.398 -  \label{ex:mq:qpush-a}
 330.399 -\end{figure}
 330.400 -
 330.401 -\subsection{Safety checks, and overriding them}
 330.402 -
 330.403 -Several MQ commands check the working directory before they do
 330.404 -anything, and fail if they find any modifications.  They do this to
 330.405 -ensure that you won't lose any changes that you have made, but not yet
 330.406 -incorporated into a patch.  Figure~\ref{ex:mq:add} illustrates this;
 330.407 -the \hgxcmd{mq}{qnew} command will not create a new patch if there are
 330.408 -outstanding changes, caused in this case by the \hgcmd{add} of
 330.409 -\filename{file3}.
 330.410 -
 330.411 -\begin{figure}[ht]
 330.412 -  \interaction{mq.tutorial.add}
 330.413 -  \caption{Forcibly creating a patch}
 330.414 -  \label{ex:mq:add}
 330.415 -\end{figure}
 330.416 -
 330.417 -Commands that check the working directory all take an ``I know what
 330.418 -I'm doing'' option, which is always named \option{-f}.  The exact
 330.419 -meaning of \option{-f} depends on the command.  For example,
 330.420 -\hgcmdargs{qnew}{\hgxopt{mq}{qnew}{-f}} will incorporate any outstanding
 330.421 -changes into the new patch it creates, but
 330.422 -\hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-f}} will revert modifications to any
 330.423 -files affected by the patch that it is popping.  Be sure to read the
 330.424 -documentation for a command's \option{-f} option before you use it!
 330.425 -
 330.426 -\subsection{Working on several patches at once}
 330.427 -
 330.428 -The \hgxcmd{mq}{qrefresh} command always refreshes the \emph{topmost}
 330.429 -applied patch.  This means that you can suspend work on one patch (by
 330.430 -refreshing it), pop or push to make a different patch the top, and
 330.431 -work on \emph{that} patch for a while.
 330.432 -
 330.433 -Here's an example that illustrates how you can use this ability.
 330.434 -Let's say you're developing a new feature as two patches.  The first
 330.435 -is a change to the core of your software, and the second---layered on
 330.436 -top of the first---changes the user interface to use the code you just
 330.437 -added to the core.  If you notice a bug in the core while you're
 330.438 -working on the UI patch, it's easy to fix the core.  Simply
 330.439 -\hgxcmd{mq}{qrefresh} the UI patch to save your in-progress changes, and
 330.440 -\hgxcmd{mq}{qpop} down to the core patch.  Fix the core bug,
 330.441 -\hgxcmd{mq}{qrefresh} the core patch, and \hgxcmd{mq}{qpush} back to the UI
 330.442 -patch to continue where you left off.
 330.443 -
 330.444 -\section{More about patches}
 330.445 -\label{sec:mq:adv-patch}
 330.446 -
 330.447 -MQ uses the GNU \command{patch} command to apply patches, so it's
 330.448 -helpful to know a few more detailed aspects of how \command{patch}
 330.449 -works, and about patches themselves.
 330.450 -
 330.451 -\subsection{The strip count}
 330.452 -
 330.453 -If you look at the file headers in a patch, you will notice that the
 330.454 -pathnames usually have an extra component on the front that isn't
 330.455 -present in the actual path name.  This is a holdover from the way that
 330.456 -people used to generate patches (people still do this, but it's
 330.457 -somewhat rare with modern revision control tools).  
 330.458 -
 330.459 -Alice would unpack a tarball, edit her files, then decide that she
 330.460 -wanted to create a patch.  So she'd rename her working directory,
 330.461 -unpack the tarball again (hence the need for the rename), and use the
 330.462 -\cmdopt{diff}{-r} and \cmdopt{diff}{-N} options to \command{diff} to
 330.463 -recursively generate a patch between the unmodified directory and the
 330.464 -modified one.  The result would be that the name of the unmodified
 330.465 -directory would be at the front of the left-hand path in every file
 330.466 -header, and the name of the modified directory would be at the front
 330.467 -of the right-hand path.
 330.468 -
 330.469 -Since someone receiving a patch from the Alices of the net would be
 330.470 -unlikely to have unmodified and modified directories with exactly the
 330.471 -same names, the \command{patch} command has a \cmdopt{patch}{-p}
 330.472 -option that indicates the number of leading path name components to
 330.473 -strip when trying to apply a patch.  This number is called the
 330.474 -\emph{strip count}.
 330.475 -
 330.476 -An option of ``\texttt{-p1}'' means ``use a strip count of one''.  If
 330.477 -\command{patch} sees a file name \filename{foo/bar/baz} in a file
 330.478 -header, it will strip \filename{foo} and try to patch a file named
 330.479 -\filename{bar/baz}.  (Strictly speaking, the strip count refers to the
 330.480 -number of \emph{path separators} (and the components that go with them
 330.481 -) to strip.  A strip count of one will turn \filename{foo/bar} into
 330.482 -\filename{bar}, but \filename{/foo/bar} (notice the extra leading
 330.483 -slash) into \filename{foo/bar}.)
 330.484 -
 330.485 -The ``standard'' strip count for patches is one; almost all patches
 330.486 -contain one leading path name component that needs to be stripped.
 330.487 -Mercurial's \hgcmd{diff} command generates path names in this form,
 330.488 -and the \hgcmd{import} command and MQ expect patches to have a strip
 330.489 -count of one.
 330.490 -
 330.491 -If you receive a patch from someone that you want to add to your patch
 330.492 -queue, and the patch needs a strip count other than one, you cannot
 330.493 -just \hgxcmd{mq}{qimport} the patch, because \hgxcmd{mq}{qimport} does not yet
 330.494 -have a \texttt{-p} option (see~\bug{311}).  Your best bet is to
 330.495 -\hgxcmd{mq}{qnew} a patch of your own, then use \cmdargs{patch}{-p\emph{N}}
 330.496 -to apply their patch, followed by \hgcmd{addremove} to pick up any
 330.497 -files added or removed by the patch, followed by \hgxcmd{mq}{qrefresh}.
 330.498 -This complexity may become unnecessary; see~\bug{311} for details.
 330.499 -\subsection{Strategies for applying a patch}
 330.500 -
 330.501 -When \command{patch} applies a hunk, it tries a handful of
 330.502 -successively less accurate strategies to try to make the hunk apply.
 330.503 -This falling-back technique often makes it possible to take a patch
 330.504 -that was generated against an old version of a file, and apply it
 330.505 -against a newer version of that file.
 330.506 -
 330.507 -First, \command{patch} tries an exact match, where the line numbers,
 330.508 -the context, and the text to be modified must apply exactly.  If it
 330.509 -cannot make an exact match, it tries to find an exact match for the
 330.510 -context, without honouring the line numbering information.  If this
 330.511 -succeeds, it prints a line of output saying that the hunk was applied,
 330.512 -but at some \emph{offset} from the original line number.
 330.513 -
 330.514 -If a context-only match fails, \command{patch} removes the first and
 330.515 -last lines of the context, and tries a \emph{reduced} context-only
 330.516 -match.  If the hunk with reduced context succeeds, it prints a message
 330.517 -saying that it applied the hunk with a \emph{fuzz factor} (the number
 330.518 -after the fuzz factor indicates how many lines of context
 330.519 -\command{patch} had to trim before the patch applied).
 330.520 -
 330.521 -When neither of these techniques works, \command{patch} prints a
 330.522 -message saying that the hunk in question was rejected.  It saves
 330.523 -rejected hunks (also simply called ``rejects'') to a file with the
 330.524 -same name, and an added \sfilename{.rej} extension.  It also saves an
 330.525 -unmodified copy of the file with a \sfilename{.orig} extension; the
 330.526 -copy of the file without any extensions will contain any changes made
 330.527 -by hunks that \emph{did} apply cleanly.  If you have a patch that
 330.528 -modifies \filename{foo} with six hunks, and one of them fails to
 330.529 -apply, you will have: an unmodified \filename{foo.orig}, a
 330.530 -\filename{foo.rej} containing one hunk, and \filename{foo}, containing
 330.531 -the changes made by the five successful hunks.
 330.532 -
 330.533 -\subsection{Some quirks of patch representation}
 330.534 -
 330.535 -There are a few useful things to know about how \command{patch} works
 330.536 -with files.
 330.537 -\begin{itemize}
 330.538 -\item This should already be obvious, but \command{patch} cannot
 330.539 -  handle binary files.
 330.540 -\item Neither does it care about the executable bit; it creates new
 330.541 -  files as readable, but not executable.
 330.542 -\item \command{patch} treats the removal of a file as a diff between
 330.543 -  the file to be removed and the empty file.  So your idea of ``I
 330.544 -  deleted this file'' looks like ``every line of this file was
 330.545 -  deleted'' in a patch.
 330.546 -\item It treats the addition of a file as a diff between the empty
 330.547 -  file and the file to be added.  So in a patch, your idea of ``I
 330.548 -  added this file'' looks like ``every line of this file was added''.
 330.549 -\item It treats a renamed file as the removal of the old name, and the
 330.550 -  addition of the new name.  This means that renamed files have a big
 330.551 -  footprint in patches.  (Note also that Mercurial does not currently
 330.552 -  try to infer when files have been renamed or copied in a patch.)
 330.553 -\item \command{patch} cannot represent empty files, so you cannot use
 330.554 -  a patch to represent the notion ``I added this empty file to the
 330.555 -  tree''.
 330.556 -\end{itemize}
 330.557 -\subsection{Beware the fuzz}
 330.558 -
 330.559 -While applying a hunk at an offset, or with a fuzz factor, will often
 330.560 -be completely successful, these inexact techniques naturally leave
 330.561 -open the possibility of corrupting the patched file.  The most common
 330.562 -cases typically involve applying a patch twice, or at an incorrect
 330.563 -location in the file.  If \command{patch} or \hgxcmd{mq}{qpush} ever
 330.564 -mentions an offset or fuzz factor, you should make sure that the
 330.565 -modified files are correct afterwards.  
 330.566 -
 330.567 -It's often a good idea to refresh a patch that has applied with an
 330.568 -offset or fuzz factor; refreshing the patch generates new context
 330.569 -information that will make it apply cleanly.  I say ``often,'' not
 330.570 -``always,'' because sometimes refreshing a patch will make it fail to
 330.571 -apply against a different revision of the underlying files.  In some
 330.572 -cases, such as when you're maintaining a patch that must sit on top of
 330.573 -multiple versions of a source tree, it's acceptable to have a patch
 330.574 -apply with some fuzz, provided you've verified the results of the
 330.575 -patching process in such cases.
 330.576 -
 330.577 -\subsection{Handling rejection}
 330.578 -
 330.579 -If \hgxcmd{mq}{qpush} fails to apply a patch, it will print an error
 330.580 -message and exit.  If it has left \sfilename{.rej} files behind, it is
 330.581 -usually best to fix up the rejected hunks before you push more patches
 330.582 -or do any further work.
 330.583 -
 330.584 -If your patch \emph{used to} apply cleanly, and no longer does because
 330.585 -you've changed the underlying code that your patches are based on,
 330.586 -Mercurial Queues can help; see section~\ref{sec:mq:merge} for details.
 330.587 -
 330.588 -Unfortunately, there aren't any great techniques for dealing with
 330.589 -rejected hunks.  Most often, you'll need to view the \sfilename{.rej}
 330.590 -file and edit the target file, applying the rejected hunks by hand.
 330.591 -
 330.592 -If you're feeling adventurous, Neil Brown, a Linux kernel hacker,
 330.593 -wrote a tool called \command{wiggle}~\cite{web:wiggle}, which is more
 330.594 -vigorous than \command{patch} in its attempts to make a patch apply.
 330.595 -
 330.596 -Another Linux kernel hacker, Chris Mason (the author of Mercurial
 330.597 -Queues), wrote a similar tool called
 330.598 -\command{mpatch}~\cite{web:mpatch}, which takes a simple approach to
 330.599 -automating the application of hunks rejected by \command{patch}.  The
 330.600 -\command{mpatch} command can help with four common reasons that a hunk
 330.601 -may be rejected:
 330.602 -
 330.603 -\begin{itemize}
 330.604 -\item The context in the middle of a hunk has changed.
 330.605 -\item A hunk is missing some context at the beginning or end.
 330.606 -\item A large hunk might apply better---either entirely or in
 330.607 -  part---if it was broken up into smaller hunks.
 330.608 -\item A hunk removes lines with slightly different content than those
 330.609 -  currently present in the file.
 330.610 -\end{itemize}
 330.611 -
 330.612 -If you use \command{wiggle} or \command{mpatch}, you should be doubly
 330.613 -careful to check your results when you're done.  In fact,
 330.614 -\command{mpatch} enforces this method of double-checking the tool's
 330.615 -output, by automatically dropping you into a merge program when it has
 330.616 -done its job, so that you can verify its work and finish off any
 330.617 -remaining merges.
 330.618 -
 330.619 -\section{Getting the best performance out of MQ}
 330.620 -\label{sec:mq:perf}
 330.621 -
 330.622 -MQ is very efficient at handling a large number of patches.  I ran
 330.623 -some performance experiments in mid-2006 for a talk that I gave at the
 330.624 -2006 EuroPython conference~\cite{web:europython}.  I used as my data
 330.625 -set the Linux 2.6.17-mm1 patch series, which consists of 1,738
 330.626 -patches.  I applied these on top of a Linux kernel repository
 330.627 -containing all 27,472 revisions between Linux 2.6.12-rc2 and Linux
 330.628 -2.6.17.
 330.629 -
 330.630 -On my old, slow laptop, I was able to
 330.631 -\hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} all 1,738 patches in 3.5 minutes,
 330.632 -and \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} them all in 30 seconds.  (On a
 330.633 -newer laptop, the time to push all patches dropped to two minutes.)  I
 330.634 -could \hgxcmd{mq}{qrefresh} one of the biggest patches (which made 22,779
 330.635 -lines of changes to 287 files) in 6.6 seconds.
 330.636 -
 330.637 -Clearly, MQ is well suited to working in large trees, but there are a
 330.638 -few tricks you can use to get the best performance of it.
 330.639 -
 330.640 -First of all, try to ``batch'' operations together.  Every time you
 330.641 -run \hgxcmd{mq}{qpush} or \hgxcmd{mq}{qpop}, these commands scan the working
 330.642 -directory once to make sure you haven't made some changes and then
 330.643 -forgotten to run \hgxcmd{mq}{qrefresh}.  On a small tree, the time that
 330.644 -this scan takes is unnoticeable.  However, on a medium-sized tree
 330.645 -(containing tens of thousands of files), it can take a second or more.
 330.646 -
 330.647 -The \hgxcmd{mq}{qpush} and \hgxcmd{mq}{qpop} commands allow you to push and pop
 330.648 -multiple patches at a time.  You can identify the ``destination
 330.649 -patch'' that you want to end up at.  When you \hgxcmd{mq}{qpush} with a
 330.650 -destination specified, it will push patches until that patch is at the
 330.651 -top of the applied stack.  When you \hgxcmd{mq}{qpop} to a destination, MQ
 330.652 -will pop patches until the destination patch is at the top.
 330.653 -
 330.654 -You can identify a destination patch using either the name of the
 330.655 -patch, or by number.  If you use numeric addressing, patches are
 330.656 -counted from zero; this means that the first patch is zero, the second
 330.657 -is one, and so on.
 330.658 -
 330.659 -\section{Updating your patches when the underlying code changes}
 330.660 -\label{sec:mq:merge}
 330.661 -
 330.662 -It's common to have a stack of patches on top of an underlying
 330.663 -repository that you don't modify directly.  If you're working on
 330.664 -changes to third-party code, or on a feature that is taking longer to
 330.665 -develop than the rate of change of the code beneath, you will often
 330.666 -need to sync up with the underlying code, and fix up any hunks in your
 330.667 -patches that no longer apply.  This is called \emph{rebasing} your
 330.668 -patch series.
 330.669 -
 330.670 -The simplest way to do this is to \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}}
 330.671 -your patches, then \hgcmd{pull} changes into the underlying
 330.672 -repository, and finally \hgcmdargs{qpush}{\hgxopt{mq}{qpop}{-a}} your
 330.673 -patches again.  MQ will stop pushing any time it runs across a patch
 330.674 -that fails to apply during conflicts, allowing you to fix your
 330.675 -conflicts, \hgxcmd{mq}{qrefresh} the affected patch, and continue pushing
 330.676 -until you have fixed your entire stack.
 330.677 -
 330.678 -This approach is easy to use and works well if you don't expect
 330.679 -changes to the underlying code to affect how well your patches apply.
 330.680 -If your patch stack touches code that is modified frequently or
 330.681 -invasively in the underlying repository, however, fixing up rejected
 330.682 -hunks by hand quickly becomes tiresome.
 330.683 -
 330.684 -It's possible to partially automate the rebasing process.  If your
 330.685 -patches apply cleanly against some revision of the underlying repo, MQ
 330.686 -can use this information to help you to resolve conflicts between your
 330.687 -patches and a different revision.
 330.688 -
 330.689 -The process is a little involved.
 330.690 -\begin{enumerate}
 330.691 -\item To begin, \hgcmdargs{qpush}{-a} all of your patches on top of
 330.692 -  the revision where you know that they apply cleanly.
 330.693 -\item Save a backup copy of your patch directory using
 330.694 -  \hgcmdargs{qsave}{\hgxopt{mq}{qsave}{-e} \hgxopt{mq}{qsave}{-c}}.  This prints
 330.695 -  the name of the directory that it has saved the patches in.  It will
 330.696 -  save the patches to a directory called
 330.697 -  \sdirname{.hg/patches.\emph{N}}, where \texttt{\emph{N}} is a small
 330.698 -  integer.  It also commits a ``save changeset'' on top of your
 330.699 -  applied patches; this is for internal book-keeping, and records the
 330.700 -  states of the \sfilename{series} and \sfilename{status} files.
 330.701 -\item Use \hgcmd{pull} to bring new changes into the underlying
 330.702 -  repository.  (Don't run \hgcmdargs{pull}{-u}; see below for why.)
 330.703 -\item Update to the new tip revision, using
 330.704 -  \hgcmdargs{update}{\hgopt{update}{-C}} to override the patches you
 330.705 -  have pushed.
 330.706 -\item Merge all patches using \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-m}
 330.707 -    \hgxopt{mq}{qpush}{-a}}.  The \hgxopt{mq}{qpush}{-m} option to \hgxcmd{mq}{qpush}
 330.708 -  tells MQ to perform a three-way merge if the patch fails to apply.
 330.709 -\end{enumerate}
 330.710 -
 330.711 -During the \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-m}}, each patch in the
 330.712 -\sfilename{series} file is applied normally.  If a patch applies with
 330.713 -fuzz or rejects, MQ looks at the queue you \hgxcmd{mq}{qsave}d, and
 330.714 -performs a three-way merge with the corresponding changeset.  This
 330.715 -merge uses Mercurial's normal merge machinery, so it may pop up a GUI
 330.716 -merge tool to help you to resolve problems.
 330.717 -
 330.718 -When you finish resolving the effects of a patch, MQ refreshes your
 330.719 -patch based on the result of the merge.
 330.720 -
 330.721 -At the end of this process, your repository will have one extra head
 330.722 -from the old patch queue, and a copy of the old patch queue will be in
 330.723 -\sdirname{.hg/patches.\emph{N}}. You can remove the extra head using
 330.724 -\hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a} \hgxopt{mq}{qpop}{-n} patches.\emph{N}}
 330.725 -or \hgcmd{strip}.  You can delete \sdirname{.hg/patches.\emph{N}} once
 330.726 -you are sure that you no longer need it as a backup.
 330.727 -
 330.728 -\section{Identifying patches}
 330.729 -
 330.730 -MQ commands that work with patches let you refer to a patch either by
 330.731 -using its name or by a number.  By name is obvious enough; pass the
 330.732 -name \filename{foo.patch} to \hgxcmd{mq}{qpush}, for example, and it will
 330.733 -push patches until \filename{foo.patch} is applied.  
 330.734 -
 330.735 -As a shortcut, you can refer to a patch using both a name and a
 330.736 -numeric offset; \texttt{foo.patch-2} means ``two patches before
 330.737 -\texttt{foo.patch}'', while \texttt{bar.patch+4} means ``four patches
 330.738 -after \texttt{bar.patch}''.
 330.739 -
 330.740 -Referring to a patch by index isn't much different.  The first patch
 330.741 -printed in the output of \hgxcmd{mq}{qseries} is patch zero (yes, it's one
 330.742 -of those start-at-zero counting systems); the second is patch one; and
 330.743 -so on.
 330.744 -
 330.745 -MQ also makes it easy to work with patches when you are using normal
 330.746 -Mercurial commands.  Every command that accepts a changeset ID will
 330.747 -also accept the name of an applied patch.  MQ augments the tags
 330.748 -normally in the repository with an eponymous one for each applied
 330.749 -patch.  In addition, the special tags \index{tags!special tag
 330.750 -  names!\texttt{qbase}}\texttt{qbase} and \index{tags!special tag
 330.751 -  names!\texttt{qtip}}\texttt{qtip} identify the ``bottom-most'' and
 330.752 -topmost applied patches, respectively.
 330.753 -
 330.754 -These additions to Mercurial's normal tagging capabilities make
 330.755 -dealing with patches even more of a breeze.
 330.756 -\begin{itemize}
 330.757 -\item Want to patchbomb a mailing list with your latest series of
 330.758 -  changes?
 330.759 -  \begin{codesample4}
 330.760 -    hg email qbase:qtip
 330.761 -  \end{codesample4}
 330.762 -  (Don't know what ``patchbombing'' is?  See
 330.763 -  section~\ref{sec:hgext:patchbomb}.)
 330.764 -\item Need to see all of the patches since \texttt{foo.patch} that
 330.765 -  have touched files in a subdirectory of your tree?
 330.766 -  \begin{codesample4}
 330.767 -    hg log -r foo.patch:qtip \emph{subdir}
 330.768 -  \end{codesample4}
 330.769 -\end{itemize}
 330.770 -
 330.771 -Because MQ makes the names of patches available to the rest of
 330.772 -Mercurial through its normal internal tag machinery, you don't need to
 330.773 -type in the entire name of a patch when you want to identify it by
 330.774 -name.
 330.775 -
 330.776 -\begin{figure}[ht]
 330.777 -  \interaction{mq.id.output}
 330.778 -  \caption{Using MQ's tag features to work with patches}
 330.779 -  \label{ex:mq:id}
 330.780 -\end{figure}
 330.781 -
 330.782 -Another nice consequence of representing patch names as tags is that
 330.783 -when you run the \hgcmd{log} command, it will display a patch's name
 330.784 -as a tag, simply as part of its normal output.  This makes it easy to
 330.785 -visually distinguish applied patches from underlying ``normal''
 330.786 -revisions.  Figure~\ref{ex:mq:id} shows a few normal Mercurial
 330.787 -commands in use with applied patches.
 330.788 -
 330.789 -\section{Useful things to know about}
 330.790 -
 330.791 -There are a number of aspects of MQ usage that don't fit tidily into
 330.792 -sections of their own, but that are good to know.  Here they are, in
 330.793 -one place.
 330.794 -
 330.795 -\begin{itemize}
 330.796 -\item Normally, when you \hgxcmd{mq}{qpop} a patch and \hgxcmd{mq}{qpush} it
 330.797 -  again, the changeset that represents the patch after the pop/push
 330.798 -  will have a \emph{different identity} than the changeset that
 330.799 -  represented the hash beforehand.  See
 330.800 -  section~\ref{sec:mqref:cmd:qpush} for information as to why this is.
 330.801 -\item It's not a good idea to \hgcmd{merge} changes from another
 330.802 -  branch with a patch changeset, at least if you want to maintain the
 330.803 -  ``patchiness'' of that changeset and changesets below it on the
 330.804 -  patch stack.  If you try to do this, it will appear to succeed, but
 330.805 -  MQ will become confused.
 330.806 -\end{itemize}
 330.807 -
 330.808 -\section{Managing patches in a repository}
 330.809 -\label{sec:mq:repo}
 330.810 -
 330.811 -Because MQ's \sdirname{.hg/patches} directory resides outside a
 330.812 -Mercurial repository's working directory, the ``underlying'' Mercurial
 330.813 -repository knows nothing about the management or presence of patches.
 330.814 -
 330.815 -This presents the interesting possibility of managing the contents of
 330.816 -the patch directory as a Mercurial repository in its own right.  This
 330.817 -can be a useful way to work.  For example, you can work on a patch for
 330.818 -a while, \hgxcmd{mq}{qrefresh} it, then \hgcmd{commit} the current state of
 330.819 -the patch.  This lets you ``roll back'' to that version of the patch
 330.820 -later on.
 330.821 -
 330.822 -You can then share different versions of the same patch stack among
 330.823 -multiple underlying repositories.  I use this when I am developing a
 330.824 -Linux kernel feature.  I have a pristine copy of my kernel sources for
 330.825 -each of several CPU architectures, and a cloned repository under each
 330.826 -that contains the patches I am working on.  When I want to test a
 330.827 -change on a different architecture, I push my current patches to the
 330.828 -patch repository associated with that kernel tree, pop and push all of
 330.829 -my patches, and build and test that kernel.
 330.830 -
 330.831 -Managing patches in a repository makes it possible for multiple
 330.832 -developers to work on the same patch series without colliding with
 330.833 -each other, all on top of an underlying source base that they may or
 330.834 -may not control.
 330.835 -
 330.836 -\subsection{MQ support for patch repositories}
 330.837 -
 330.838 -MQ helps you to work with the \sdirname{.hg/patches} directory as a
 330.839 -repository; when you prepare a repository for working with patches
 330.840 -using \hgxcmd{mq}{qinit}, you can pass the \hgxopt{mq}{qinit}{-c} option to
 330.841 -create the \sdirname{.hg/patches} directory as a Mercurial repository.
 330.842 -
 330.843 -\begin{note}
 330.844 -  If you forget to use the \hgxopt{mq}{qinit}{-c} option, you can simply go
 330.845 -  into the \sdirname{.hg/patches} directory at any time and run
 330.846 -  \hgcmd{init}.  Don't forget to add an entry for the
 330.847 -  \sfilename{status} file to the \sfilename{.hgignore} file, though
 330.848 -
 330.849 -  (\hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}} does this for you
 330.850 -  automatically); you \emph{really} don't want to manage the
 330.851 -  \sfilename{status} file.
 330.852 -\end{note}
 330.853 -
 330.854 -As a convenience, if MQ notices that the \dirname{.hg/patches}
 330.855 -directory is a repository, it will automatically \hgcmd{add} every
 330.856 -patch that you create and import.
 330.857 -
 330.858 -MQ provides a shortcut command, \hgxcmd{mq}{qcommit}, that runs
 330.859 -\hgcmd{commit} in the \sdirname{.hg/patches} directory.  This saves
 330.860 -some bothersome typing.
 330.861 -
 330.862 -Finally, as a convenience to manage the patch directory, you can
 330.863 -define the alias \command{mq} on Unix systems. For example, on Linux
 330.864 -systems using the \command{bash} shell, you can include the following
 330.865 -snippet in your \tildefile{.bashrc}.
 330.866 -
 330.867 -\begin{codesample2}
 330.868 -  alias mq=`hg -R \$(hg root)/.hg/patches'
 330.869 -\end{codesample2}
 330.870 -
 330.871 -You can then issue commands of the form \cmdargs{mq}{pull} from
 330.872 -the main repository.
 330.873 -
 330.874 -\subsection{A few things to watch out for}
 330.875 -
 330.876 -MQ's support for working with a repository full of patches is limited
 330.877 -in a few small respects.
 330.878 -
 330.879 -MQ cannot automatically detect changes that you make to the patch
 330.880 -directory.  If you \hgcmd{pull}, manually edit, or \hgcmd{update}
 330.881 -changes to patches or the \sfilename{series} file, you will have to
 330.882 -\hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} and then
 330.883 -\hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} in the underlying repository to
 330.884 -see those changes show up there.  If you forget to do this, you can
 330.885 -confuse MQ's idea of which patches are applied.
 330.886 -
 330.887 -\section{Third party tools for working with patches}
 330.888 -\label{sec:mq:tools}
 330.889 -
 330.890 -Once you've been working with patches for a while, you'll find
 330.891 -yourself hungry for tools that will help you to understand and
 330.892 -manipulate the patches you're dealing with.
 330.893 -
 330.894 -The \command{diffstat} command~\cite{web:diffstat} generates a
 330.895 -histogram of the modifications made to each file in a patch.  It
 330.896 -provides a good way to ``get a sense of'' a patch---which files it
 330.897 -affects, and how much change it introduces to each file and as a
 330.898 -whole.  (I find that it's a good idea to use \command{diffstat}'s
 330.899 -\cmdopt{diffstat}{-p} option as a matter of course, as otherwise it
 330.900 -will try to do clever things with prefixes of file names that
 330.901 -inevitably confuse at least me.)
 330.902 -
 330.903 -\begin{figure}[ht]
 330.904 -  \interaction{mq.tools.tools}
 330.905 -  \caption{The \command{diffstat}, \command{filterdiff}, and \command{lsdiff} commands}
 330.906 -  \label{ex:mq:tools}
 330.907 -\end{figure}
 330.908 -
 330.909 -The \package{patchutils} package~\cite{web:patchutils} is invaluable.
 330.910 -It provides a set of small utilities that follow the ``Unix
 330.911 -philosophy;'' each does one useful thing with a patch.  The
 330.912 -\package{patchutils} command I use most is \command{filterdiff}, which
 330.913 -extracts subsets from a patch file.  For example, given a patch that
 330.914 -modifies hundreds of files across dozens of directories, a single
 330.915 -invocation of \command{filterdiff} can generate a smaller patch that
 330.916 -only touches files whose names match a particular glob pattern.  See
 330.917 -section~\ref{mq-collab:tips:interdiff} for another example.
 330.918 -
 330.919 -\section{Good ways to work with patches}
 330.920 -
 330.921 -Whether you are working on a patch series to submit to a free software
 330.922 -or open source project, or a series that you intend to treat as a
 330.923 -sequence of regular changesets when you're done, you can use some
 330.924 -simple techniques to keep your work well organised.
 330.925 -
 330.926 -Give your patches descriptive names.  A good name for a patch might be
 330.927 -\filename{rework-device-alloc.patch}, because it will immediately give
 330.928 -you a hint what the purpose of the patch is.  Long names shouldn't be
 330.929 -a problem; you won't be typing the names often, but you \emph{will} be
 330.930 -running commands like \hgxcmd{mq}{qapplied} and \hgxcmd{mq}{qtop} over and over.
 330.931 -Good naming becomes especially important when you have a number of
 330.932 -patches to work with, or if you are juggling a number of different
 330.933 -tasks and your patches only get a fraction of your attention.
 330.934 -
 330.935 -Be aware of what patch you're working on.  Use the \hgxcmd{mq}{qtop}
 330.936 -command and skim over the text of your patches frequently---for
 330.937 -example, using \hgcmdargs{tip}{\hgopt{tip}{-p}})---to be sure of where
 330.938 -you stand.  I have several times worked on and \hgxcmd{mq}{qrefresh}ed a
 330.939 -patch other than the one I intended, and it's often tricky to migrate
 330.940 -changes into the right patch after making them in the wrong one.
 330.941 -
 330.942 -For this reason, it is very much worth investing a little time to
 330.943 -learn how to use some of the third-party tools I described in
 330.944 -section~\ref{sec:mq:tools}, particularly \command{diffstat} and
 330.945 -\command{filterdiff}.  The former will give you a quick idea of what
 330.946 -changes your patch is making, while the latter makes it easy to splice
 330.947 -hunks selectively out of one patch and into another.
 330.948 -
 330.949 -\section{MQ cookbook}
 330.950 -
 330.951 -\subsection{Manage ``trivial'' patches}
 330.952 -
 330.953 -Because the overhead of dropping files into a new Mercurial repository
 330.954 -is so low, it makes a lot of sense to manage patches this way even if
 330.955 -you simply want to make a few changes to a source tarball that you
 330.956 -downloaded.
 330.957 -
 330.958 -Begin by downloading and unpacking the source tarball,
 330.959 -and turning it into a Mercurial repository.
 330.960 -\interaction{mq.tarball.download}
 330.961 -
 330.962 -Continue by creating a patch stack and making your changes.
 330.963 -\interaction{mq.tarball.qinit}
 330.964 -
 330.965 -Let's say a few weeks or months pass, and your package author releases
 330.966 -a new version.  First, bring their changes into the repository.
 330.967 -\interaction{mq.tarball.newsource}
 330.968 -The pipeline starting with \hgcmd{locate} above deletes all files in
 330.969 -the working directory, so that \hgcmd{commit}'s
 330.970 -\hgopt{commit}{--addremove} option can actually tell which files have
 330.971 -really been removed in the newer version of the source.
 330.972 -
 330.973 -Finally, you can apply your patches on top of the new tree.
 330.974 -\interaction{mq.tarball.repush}
 330.975 -
 330.976 -\subsection{Combining entire patches}
 330.977 -\label{sec:mq:combine}
 330.978 -
 330.979 -MQ provides a command, \hgxcmd{mq}{qfold} that lets you combine entire
 330.980 -patches.  This ``folds'' the patches you name, in the order you name
 330.981 -them, into the topmost applied patch, and concatenates their
 330.982 -descriptions onto the end of its description.  The patches that you
 330.983 -fold must be unapplied before you fold them.
 330.984 -
 330.985 -The order in which you fold patches matters.  If your topmost applied
 330.986 -patch is \texttt{foo}, and you \hgxcmd{mq}{qfold} \texttt{bar} and
 330.987 -\texttt{quux} into it, you will end up with a patch that has the same
 330.988 -effect as if you applied first \texttt{foo}, then \texttt{bar},
 330.989 -followed by \texttt{quux}.
 330.990 -
 330.991 -\subsection{Merging part of one patch into another}
 330.992 -
 330.993 -Merging \emph{part} of one patch into another is more difficult than
 330.994 -combining entire patches.
 330.995 -
 330.996 -If you want to move changes to entire files, you can use
 330.997 -\command{filterdiff}'s \cmdopt{filterdiff}{-i} and
 330.998 -\cmdopt{filterdiff}{-x} options to choose the modifications to snip
 330.999 -out of one patch, concatenating its output onto the end of the patch
330.1000 -you want to merge into.  You usually won't need to modify the patch
330.1001 -you've merged the changes from.  Instead, MQ will report some rejected
330.1002 -hunks when you \hgxcmd{mq}{qpush} it (from the hunks you moved into the
330.1003 -other patch), and you can simply \hgxcmd{mq}{qrefresh} the patch to drop
330.1004 -the duplicate hunks.
330.1005 -
330.1006 -If you have a patch that has multiple hunks modifying a file, and you
330.1007 -only want to move a few of those hunks, the job becomes more messy,
330.1008 -but you can still partly automate it.  Use \cmdargs{lsdiff}{-nvv} to
330.1009 -print some metadata about the patch.
330.1010 -\interaction{mq.tools.lsdiff}
330.1011 -
330.1012 -This command prints three different kinds of number:
330.1013 -\begin{itemize}
330.1014 -\item (in the first column) a \emph{file number} to identify each file
330.1015 -  modified in the patch;
330.1016 -\item (on the next line, indented) the line number within a modified
330.1017 -  file where a hunk starts; and
330.1018 -\item (on the same line) a \emph{hunk number} to identify that hunk.
330.1019 -\end{itemize}
330.1020 -
330.1021 -You'll have to use some visual inspection, and reading of the patch,
330.1022 -to identify the file and hunk numbers you'll want, but you can then
330.1023 -pass them to to \command{filterdiff}'s \cmdopt{filterdiff}{--files}
330.1024 -and \cmdopt{filterdiff}{--hunks} options, to select exactly the file
330.1025 -and hunk you want to extract.
330.1026 -
330.1027 -Once you have this hunk, you can concatenate it onto the end of your
330.1028 -destination patch and continue with the remainder of
330.1029 -section~\ref{sec:mq:combine}.
330.1030 -
330.1031 -\section{Differences between quilt and MQ}
330.1032 -
330.1033 -If you are already familiar with quilt, MQ provides a similar command
330.1034 -set.  There are a few differences in the way that it works.
330.1035 -
330.1036 -You will already have noticed that most quilt commands have MQ
330.1037 -counterparts that simply begin with a ``\texttt{q}''.  The exceptions
330.1038 -are quilt's \texttt{add} and \texttt{remove} commands, the
330.1039 -counterparts for which are the normal Mercurial \hgcmd{add} and
330.1040 -\hgcmd{remove} commands.  There is no MQ equivalent of the quilt
330.1041 -\texttt{edit} command.
330.1042 -
330.1043 -%%% Local Variables: 
330.1044 -%%% mode: latex
330.1045 -%%% TeX-master: "00book"
330.1046 -%%% End: 
   331.1 Binary file en/note.png has changed
   332.1 --- a/en/preface.tex	Thu Mar 26 08:57:10 2009 +0100
   332.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   332.3 @@ -1,67 +0,0 @@
   332.4 -\chapter*{Preface}
   332.5 -\addcontentsline{toc}{chapter}{Preface}
   332.6 -\label{chap:preface}
   332.7 -
   332.8 -Distributed revision control is a relatively new territory, and has
   332.9 -thus far grown due to people's willingness to strike out into
  332.10 -ill-charted territory.
  332.11 -
  332.12 -I am writing a book about distributed revision control because I
  332.13 -believe that it is an important subject that deserves a field guide.
  332.14 -I chose to write about Mercurial because it is the easiest tool to
  332.15 -learn the terrain with, and yet it scales to the demands of real,
  332.16 -challenging environments where many other revision control tools fail.
  332.17 -
  332.18 -\section{This book is a work in progress}
  332.19 -
  332.20 -I am releasing this book while I am still writing it, in the hope that
  332.21 -it will prove useful to others.  I also hope that readers will
  332.22 -contribute as they see fit.
  332.23 -
  332.24 -\section{About the examples in this book}
  332.25 -
  332.26 -This book takes an unusual approach to code samples.  Every example is
  332.27 -``live''---each one is actually the result of a shell script that
  332.28 -executes the Mercurial commands you see.  Every time an image of the
  332.29 -book is built from its sources, all the example scripts are
  332.30 -automatically run, and their current results compared against their
  332.31 -expected results.
  332.32 -
  332.33 -The advantage of this approach is that the examples are always
  332.34 -accurate; they describe \emph{exactly} the behaviour of the version of
  332.35 -Mercurial that's mentioned at the front of the book.  If I update the
  332.36 -version of Mercurial that I'm documenting, and the output of some
  332.37 -command changes, the build fails.
  332.38 -
  332.39 -There is a small disadvantage to this approach, which is that the
  332.40 -dates and times you'll see in examples tend to be ``squashed''
  332.41 -together in a way that they wouldn't be if the same commands were
  332.42 -being typed by a human.  Where a human can issue no more than one
  332.43 -command every few seconds, with any resulting timestamps
  332.44 -correspondingly spread out, my automated example scripts run many
  332.45 -commands in one second.
  332.46 -
  332.47 -As an instance of this, several consecutive commits in an example can
  332.48 -show up as having occurred during the same second.  You can see this
  332.49 -occur in the \hgext{bisect} example in section~\ref{sec:undo:bisect},
  332.50 -for instance.
  332.51 -
  332.52 -So when you're reading examples, don't place too much weight on the
  332.53 -dates or times you see in the output of commands.  But \emph{do} be
  332.54 -confident that the behaviour you're seeing is consistent and
  332.55 -reproducible.
  332.56 -
  332.57 -\section{Colophon---this book is Free}
  332.58 -
  332.59 -This book is licensed under the Open Publication License, and is
  332.60 -produced entirely using Free Software tools.  It is typeset with
  332.61 -\LaTeX{}; illustrations are drawn and rendered with
  332.62 -\href{http://www.inkscape.org/}{Inkscape}.
  332.63 -
  332.64 -The complete source code for this book is published as a Mercurial
  332.65 -repository, at \url{http://hg.serpentine.com/mercurial/book}.
  332.66 -
  332.67 -%%% Local Variables: 
  332.68 -%%% mode: latex
  332.69 -%%% TeX-master: "00book"
  332.70 -%%% End: 
   333.1 --- a/en/revlog.svg	Thu Mar 26 08:57:10 2009 +0100
   333.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   333.3 @@ -1,1155 +0,0 @@
   333.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   333.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   333.6 -<svg
   333.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   333.8 -   xmlns:cc="http://web.resource.org/cc/"
   333.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  333.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  333.11 -   xmlns="http://www.w3.org/2000/svg"
  333.12 -   xmlns:xlink="http://www.w3.org/1999/xlink"
  333.13 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  333.14 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  333.15 -   width="744.09448819"
  333.16 -   height="1052.3622047"
  333.17 -   id="svg2"
  333.18 -   sodipodi:version="0.32"
  333.19 -   inkscape:version="0.44.1"
  333.20 -   sodipodi:docbase="/home/bos/hg/hgbook/en"
  333.21 -   sodipodi:docname="revlog.svg">
  333.22 -  <defs
  333.23 -     id="defs4">
  333.24 -    <marker
  333.25 -       inkscape:stockid="Arrow1Mend"
  333.26 -       orient="auto"
  333.27 -       refY="0.0"
  333.28 -       refX="0.0"
  333.29 -       id="Arrow1Mend"
  333.30 -       style="overflow:visible;">
  333.31 -      <path
  333.32 -         id="path4852"
  333.33 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  333.34 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  333.35 -         transform="scale(0.4) rotate(180) translate(10,0)" />
  333.36 -    </marker>
  333.37 -    <linearGradient
  333.38 -       id="linearGradient3092">
  333.39 -      <stop
  333.40 -         style="stop-color:#44436f;stop-opacity:1;"
  333.41 -         offset="0"
  333.42 -         id="stop3094" />
  333.43 -      <stop
  333.44 -         style="stop-color:#abade5;stop-opacity:1;"
  333.45 -         offset="1"
  333.46 -         id="stop3096" />
  333.47 -    </linearGradient>
  333.48 -    <linearGradient
  333.49 -       inkscape:collect="always"
  333.50 -       xlink:href="#linearGradient3092"
  333.51 -       id="linearGradient3118"
  333.52 -       gradientUnits="userSpaceOnUse"
  333.53 -       x1="176.16635"
  333.54 -       y1="405.21934"
  333.55 -       x2="417.11935"
  333.56 -       y2="405.21934" />
  333.57 -    <linearGradient
  333.58 -       inkscape:collect="always"
  333.59 -       xlink:href="#linearGradient3092"
  333.60 -       id="linearGradient3120"
  333.61 -       gradientUnits="userSpaceOnUse"
  333.62 -       x1="176.16635"
  333.63 -       y1="405.21934"
  333.64 -       x2="417.11935"
  333.65 -       y2="405.21934" />
  333.66 -    <linearGradient
  333.67 -       inkscape:collect="always"
  333.68 -       xlink:href="#linearGradient3092"
  333.69 -       id="linearGradient3129"
  333.70 -       gradientUnits="userSpaceOnUse"
  333.71 -       x1="176.16635"
  333.72 -       y1="405.21934"
  333.73 -       x2="417.11935"
  333.74 -       y2="405.21934"
  333.75 -       gradientTransform="translate(-0.928574,-1.428574)" />
  333.76 -    <linearGradient
  333.77 -       inkscape:collect="always"
  333.78 -       xlink:href="#linearGradient3092"
  333.79 -       id="linearGradient3133"
  333.80 -       gradientUnits="userSpaceOnUse"
  333.81 -       x1="176.16635"
  333.82 -       y1="405.21934"
  333.83 -       x2="417.11935"
  333.84 -       y2="405.21934"
  333.85 -       gradientTransform="translate(-0.928574,-1.428574)" />
  333.86 -    <linearGradient
  333.87 -       inkscape:collect="always"
  333.88 -       xlink:href="#linearGradient3092"
  333.89 -       id="linearGradient3708"
  333.90 -       gradientUnits="userSpaceOnUse"
  333.91 -       gradientTransform="matrix(0.423343,0,0,0.423343,138.874,-67.01732)"
  333.92 -       x1="175.23776"
  333.93 -       y1="509.98154"
  333.94 -       x2="416.29077"
  333.95 -       y2="297.49997" />
  333.96 -    <linearGradient
  333.97 -       inkscape:collect="always"
  333.98 -       xlink:href="#linearGradient3092"
  333.99 -       id="linearGradient5164"
 333.100 -       gradientUnits="userSpaceOnUse"
 333.101 -       gradientTransform="matrix(0.423343,0,0,0.423343,198.249,247.4358)"
 333.102 -       x1="175.23776"
 333.103 -       y1="509.98154"
 333.104 -       x2="416.29077"
 333.105 -       y2="297.49997" />
 333.106 -    <linearGradient
 333.107 -       inkscape:collect="always"
 333.108 -       xlink:href="#linearGradient3092"
 333.109 -       id="linearGradient5584"
 333.110 -       gradientUnits="userSpaceOnUse"
 333.111 -       gradientTransform="matrix(0.423343,0,0,0.423343,143.9081,371.2915)"
 333.112 -       x1="175.23776"
 333.113 -       y1="509.98154"
 333.114 -       x2="416.29077"
 333.115 -       y2="297.49997" />
 333.116 -    <linearGradient
 333.117 -       inkscape:collect="always"
 333.118 -       xlink:href="#linearGradient3092"
 333.119 -       id="linearGradient5784"
 333.120 -       gradientUnits="userSpaceOnUse"
 333.121 -       gradientTransform="matrix(0.423343,0,0,0.423343,76.37397,152.137)"
 333.122 -       x1="175.23776"
 333.123 -       y1="509.98154"
 333.124 -       x2="416.29077"
 333.125 -       y2="297.49997" />
 333.126 -    <linearGradient
 333.127 -       inkscape:collect="always"
 333.128 -       xlink:href="#linearGradient3092"
 333.129 -       id="linearGradient5786"
 333.130 -       gradientUnits="userSpaceOnUse"
 333.131 -       gradientTransform="matrix(0.423343,0,0,0.423343,198.249,152.137)"
 333.132 -       x1="175.23776"
 333.133 -       y1="509.98154"
 333.134 -       x2="416.29077"
 333.135 -       y2="297.49997" />
 333.136 -    <linearGradient
 333.137 -       inkscape:collect="always"
 333.138 -       xlink:href="#linearGradient3092"
 333.139 -       id="linearGradient5895"
 333.140 -       gradientUnits="userSpaceOnUse"
 333.141 -       gradientTransform="matrix(0.423343,0,0,0.423343,198.0215,261.7142)"
 333.142 -       x1="175.23776"
 333.143 -       y1="509.98154"
 333.144 -       x2="416.29077"
 333.145 -       y2="297.49997" />
 333.146 -    <linearGradient
 333.147 -       inkscape:collect="always"
 333.148 -       xlink:href="#linearGradient3092"
 333.149 -       id="linearGradient5958"
 333.150 -       gradientUnits="userSpaceOnUse"
 333.151 -       gradientTransform="matrix(0.423343,0,0,0.423343,137.1978,42.55987)"
 333.152 -       x1="175.23776"
 333.153 -       y1="509.98154"
 333.154 -       x2="416.29077"
 333.155 -       y2="297.49997" />
 333.156 -  </defs>
 333.157 -  <sodipodi:namedview
 333.158 -     id="base"
 333.159 -     pagecolor="#ffffff"
 333.160 -     bordercolor="#666666"
 333.161 -     borderopacity="1.0"
 333.162 -     gridtolerance="10000"
 333.163 -     guidetolerance="10"
 333.164 -     objecttolerance="10"
 333.165 -     inkscape:pageopacity="0.0"
 333.166 -     inkscape:pageshadow="2"
 333.167 -     inkscape:zoom="0.64"
 333.168 -     inkscape:cx="566.02368"
 333.169 -     inkscape:cy="688.16826"
 333.170 -     inkscape:document-units="px"
 333.171 -     inkscape:current-layer="layer1"
 333.172 -     inkscape:window-width="906"
 333.173 -     inkscape:window-height="620"
 333.174 -     inkscape:window-x="29"
 333.175 -     inkscape:window-y="79"
 333.176 -     inkscape:connector-spacing="11" />
 333.177 -  <metadata
 333.178 -     id="metadata7">
 333.179 -    <rdf:RDF>
 333.180 -      <cc:Work
 333.181 -         rdf:about="">
 333.182 -        <dc:format>image/svg+xml</dc:format>
 333.183 -        <dc:type
 333.184 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 333.185 -      </cc:Work>
 333.186 -    </rdf:RDF>
 333.187 -  </metadata>
 333.188 -  <g
 333.189 -     inkscape:label="Layer 1"
 333.190 -     inkscape:groupmode="layer"
 333.191 -     id="layer1">
 333.192 -    <rect
 333.193 -       y="168.74846"
 333.194 -       x="211.58516"
 333.195 -       height="89.506805"
 333.196 -       width="101.60232"
 333.197 -       id="rect3068"
 333.198 -       style="fill:url(#linearGradient5958);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 333.199 -    <g
 333.200 -       id="g3215"
 333.201 -       transform="matrix(0.423343,0,0,0.423343,137.1977,42.55985)">
 333.202 -      <rect
 333.203 -         y="447.71451"
 333.204 -         x="299.67859"
 333.205 -         height="48.571426"
 333.206 -         width="103.14286"
 333.207 -         id="rect2899"
 333.208 -         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 333.209 -      <text
 333.210 -         id="text2903"
 333.211 -         y="464.8139"
 333.212 -         x="308.89639"
 333.213 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.214 -         xml:space="preserve"><tspan
 333.215 -           y="464.8139"
 333.216 -           x="308.89639"
 333.217 -           sodipodi:role="line"
 333.218 -           id="tspan2905">Second parent</tspan></text>
 333.219 -      <text
 333.220 -         id="text2907"
 333.221 -         y="485.50256"
 333.222 -         x="308.20175"
 333.223 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.224 -         xml:space="preserve"><tspan
 333.225 -           style="font-family:Courier"
 333.226 -           y="485.50256"
 333.227 -           x="308.20175"
 333.228 -           id="tspan2909"
 333.229 -           sodipodi:role="line">32bf9a5f22c0</tspan></text>
 333.230 -    </g>
 333.231 -    <g
 333.232 -       id="g3250"
 333.233 -       transform="matrix(0.423343,0,0,0.423343,137.1977,42.55986)">
 333.234 -      <rect
 333.235 -         y="311.28598"
 333.236 -         x="188.6071"
 333.237 -         height="48.571426"
 333.238 -         width="103.14286"
 333.239 -         id="rect2936"
 333.240 -         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 333.241 -      <text
 333.242 -         id="text2940"
 333.243 -         y="328.38538"
 333.244 -         x="197.82495"
 333.245 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.246 -         xml:space="preserve"><tspan
 333.247 -           y="328.38538"
 333.248 -           x="197.82495"
 333.249 -           sodipodi:role="line"
 333.250 -           id="tspan2942">Revision hash</tspan></text>
 333.251 -      <text
 333.252 -         id="text2944"
 333.253 -         y="349.07404"
 333.254 -         x="197.13031"
 333.255 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.256 -         xml:space="preserve"><tspan
 333.257 -           style="font-family:Courier"
 333.258 -           y="349.07404"
 333.259 -           x="197.13031"
 333.260 -           id="tspan2946"
 333.261 -           sodipodi:role="line">34b8b7a15ea1</tspan></text>
 333.262 -    </g>
 333.263 -    <g
 333.264 -       id="g3243"
 333.265 -       transform="matrix(0.423343,0,0,0.423343,137.6664,43.91853)">
 333.266 -      <rect
 333.267 -         y="363.07654"
 333.268 -         x="187.5"
 333.269 -         height="75"
 333.270 -         width="213.85715"
 333.271 -         id="rect2950"
 333.272 -         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 333.273 -      <text
 333.274 -         id="text2958"
 333.275 -         y="400.86459"
 333.276 -         x="196.02321"
 333.277 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.278 -         xml:space="preserve"><tspan
 333.279 -           style="fill:black;fill-opacity:1;font-family:Courier"
 333.280 -           y="400.86459"
 333.281 -           x="196.02321"
 333.282 -           id="tspan2960"
 333.283 -           sodipodi:role="line">...</tspan></text>
 333.284 -      <text
 333.285 -         id="text2954"
 333.286 -         y="380.17593"
 333.287 -         x="196.71785"
 333.288 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.289 -         xml:space="preserve"><tspan
 333.290 -           y="380.17593"
 333.291 -           x="196.71785"
 333.292 -           sodipodi:role="line"
 333.293 -           id="tspan2956"
 333.294 -           style="fill:black;fill-opacity:1">Revision data (delta or snapshot)</tspan></text>
 333.295 -    </g>
 333.296 -    <g
 333.297 -       id="g5529"
 333.298 -       transform="translate(-6.710312,-8.165836e-6)">
 333.299 -      <rect
 333.300 -         style="fill:url(#linearGradient5584);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.301 -         id="rect3509"
 333.302 -         width="101.60232"
 333.303 -         height="89.506805"
 333.304 -         x="218.29547"
 333.305 -         y="497.4801" />
 333.306 -      <g
 333.307 -         transform="matrix(0.423343,0,0,0.423343,143.908,371.2915)"
 333.308 -         id="g3513">
 333.309 -        <g
 333.310 -           id="g3515">
 333.311 -          <rect
 333.312 -             y="447.72418"
 333.313 -             x="188.6071"
 333.314 -             height="48.571426"
 333.315 -             width="103.14286"
 333.316 -             id="rect3517"
 333.317 -             style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 333.318 -          <text
 333.319 -             id="text3519"
 333.320 -             y="464.82358"
 333.321 -             x="197.82495"
 333.322 -             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.323 -             xml:space="preserve"><tspan
 333.324 -               y="464.82358"
 333.325 -               x="197.82495"
 333.326 -               sodipodi:role="line"
 333.327 -               id="tspan3521">First parent</tspan></text>
 333.328 -          <text
 333.329 -             id="text3523"
 333.330 -             y="485.51224"
 333.331 -             x="197.13031"
 333.332 -             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.333 -             xml:space="preserve"><tspan
 333.334 -               style="font-family:Courier"
 333.335 -               y="485.51224"
 333.336 -               x="197.13031"
 333.337 -               id="tspan3525"
 333.338 -               sodipodi:role="line">000000000000</tspan></text>
 333.339 -        </g>
 333.340 -        <g
 333.341 -           id="g3527">
 333.342 -          <rect
 333.343 -             y="447.71451"
 333.344 -             x="299.67859"
 333.345 -             height="48.571426"
 333.346 -             width="103.14286"
 333.347 -             id="rect3529"
 333.348 -             style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 333.349 -          <text
 333.350 -             id="text3531"
 333.351 -             y="464.8139"
 333.352 -             x="308.89639"
 333.353 -             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.354 -             xml:space="preserve"><tspan
 333.355 -               y="464.8139"
 333.356 -               x="308.89639"
 333.357 -               sodipodi:role="line"
 333.358 -               id="tspan3533">Second parent</tspan></text>
 333.359 -          <text
 333.360 -             id="text3535"
 333.361 -             y="485.50256"
 333.362 -             x="308.20175"
 333.363 -             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.364 -             xml:space="preserve"><tspan
 333.365 -               style="font-family:Courier"
 333.366 -               y="485.50256"
 333.367 -               x="308.20175"
 333.368 -               id="tspan3537"
 333.369 -               sodipodi:role="line">000000000000</tspan></text>
 333.370 -        </g>
 333.371 -      </g>
 333.372 -      <g
 333.373 -         transform="matrix(0.423343,0,0,0.423343,143.908,371.2915)"
 333.374 -         id="g3539">
 333.375 -        <rect
 333.376 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.377 -           id="rect3541"
 333.378 -           width="103.14286"
 333.379 -           height="48.571426"
 333.380 -           x="188.6071"
 333.381 -           y="311.28598" />
 333.382 -        <text
 333.383 -           xml:space="preserve"
 333.384 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.385 -           x="197.82495"
 333.386 -           y="328.38538"
 333.387 -           id="text3543"><tspan
 333.388 -             id="tspan3545"
 333.389 -             sodipodi:role="line"
 333.390 -             x="197.82495"
 333.391 -             y="328.38538">Revision hash</tspan></text>
 333.392 -        <text
 333.393 -           xml:space="preserve"
 333.394 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.395 -           x="197.13031"
 333.396 -           y="349.07404"
 333.397 -           id="text3547"><tspan
 333.398 -             sodipodi:role="line"
 333.399 -             id="tspan3549"
 333.400 -             x="197.13031"
 333.401 -             y="349.07404"
 333.402 -             style="font-family:Courier">ff9dc8bc2a8b</tspan></text>
 333.403 -      </g>
 333.404 -      <g
 333.405 -         transform="matrix(0.423343,0,0,0.423343,144.3767,372.6502)"
 333.406 -         id="g3551">
 333.407 -        <rect
 333.408 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.409 -           id="rect3553"
 333.410 -           width="213.85715"
 333.411 -           height="75"
 333.412 -           x="187.5"
 333.413 -           y="363.07654" />
 333.414 -        <text
 333.415 -           xml:space="preserve"
 333.416 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.417 -           x="196.02321"
 333.418 -           y="400.86459"
 333.419 -           id="text3555"><tspan
 333.420 -             sodipodi:role="line"
 333.421 -             id="tspan3557"
 333.422 -             x="196.02321"
 333.423 -             y="400.86459"
 333.424 -             style="fill:black;fill-opacity:1;font-family:Courier">...</tspan></text>
 333.425 -        <text
 333.426 -           xml:space="preserve"
 333.427 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.428 -           x="196.71785"
 333.429 -           y="380.17593"
 333.430 -           id="text3559"><tspan
 333.431 -             style="fill:black;fill-opacity:1"
 333.432 -             id="tspan3561"
 333.433 -             sodipodi:role="line"
 333.434 -             x="196.71785"
 333.435 -             y="380.17593">Revision data (delta or snapshot)</tspan></text>
 333.436 -      </g>
 333.437 -    </g>
 333.438 -    <g
 333.439 -       id="g4868"
 333.440 -       transform="translate(-1.676208,-2.342463e-5)">
 333.441 -      <rect
 333.442 -         style="fill:url(#linearGradient3708);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.443 -         id="rect3567"
 333.444 -         width="101.60232"
 333.445 -         height="89.506805"
 333.446 -         x="213.26137"
 333.447 -         y="59.171272" />
 333.448 -      <g
 333.449 -         transform="matrix(0.423343,0,0,0.423343,138.8739,-67.01734)"
 333.450 -         id="g3573">
 333.451 -        <rect
 333.452 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.453 -           id="rect3575"
 333.454 -           width="103.14286"
 333.455 -           height="48.571426"
 333.456 -           x="188.6071"
 333.457 -           y="447.72418" />
 333.458 -        <text
 333.459 -           xml:space="preserve"
 333.460 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.461 -           x="197.82495"
 333.462 -           y="464.82358"
 333.463 -           id="text3577"><tspan
 333.464 -             id="tspan3579"
 333.465 -             sodipodi:role="line"
 333.466 -             x="197.82495"
 333.467 -             y="464.82358">First parent</tspan></text>
 333.468 -        <text
 333.469 -           xml:space="preserve"
 333.470 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.471 -           x="197.13031"
 333.472 -           y="485.51224"
 333.473 -           id="text3581"><tspan
 333.474 -             sodipodi:role="line"
 333.475 -             id="tspan3583"
 333.476 -             x="197.13031"
 333.477 -             y="485.51224"
 333.478 -             style="font-family:Courier">34b8b7a15ea1</tspan></text>
 333.479 -      </g>
 333.480 -      <g
 333.481 -         transform="matrix(0.423343,0,0,0.423343,138.8739,-67.01734)"
 333.482 -         id="g3585">
 333.483 -        <rect
 333.484 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.485 -           id="rect3587"
 333.486 -           width="103.14286"
 333.487 -           height="48.571426"
 333.488 -           x="299.67859"
 333.489 -           y="447.71451" />
 333.490 -        <text
 333.491 -           xml:space="preserve"
 333.492 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.493 -           x="308.89639"
 333.494 -           y="464.8139"
 333.495 -           id="text3589"><tspan
 333.496 -             id="tspan3591"
 333.497 -             sodipodi:role="line"
 333.498 -             x="308.89639"
 333.499 -             y="464.8139">Second parent</tspan></text>
 333.500 -        <text
 333.501 -           xml:space="preserve"
 333.502 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.503 -           x="308.20175"
 333.504 -           y="485.50256"
 333.505 -           id="text3593"><tspan
 333.506 -             sodipodi:role="line"
 333.507 -             id="tspan3595"
 333.508 -             x="308.20175"
 333.509 -             y="485.50256"
 333.510 -             style="font-family:Courier">000000000000</tspan></text>
 333.511 -      </g>
 333.512 -      <g
 333.513 -         transform="matrix(0.423343,0,0,0.423343,138.8739,-67.01733)"
 333.514 -         id="g3597">
 333.515 -        <rect
 333.516 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.517 -           id="rect3599"
 333.518 -           width="103.14286"
 333.519 -           height="48.571426"
 333.520 -           x="188.6071"
 333.521 -           y="311.28598" />
 333.522 -        <text
 333.523 -           xml:space="preserve"
 333.524 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.525 -           x="197.82495"
 333.526 -           y="328.38538"
 333.527 -           id="text3601"><tspan
 333.528 -             id="tspan3603"
 333.529 -             sodipodi:role="line"
 333.530 -             x="197.82495"
 333.531 -             y="328.38538">Revision hash</tspan></text>
 333.532 -        <text
 333.533 -           xml:space="preserve"
 333.534 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.535 -           x="197.13031"
 333.536 -           y="349.07404"
 333.537 -           id="text3605"><tspan
 333.538 -             sodipodi:role="line"
 333.539 -             id="tspan3607"
 333.540 -             x="197.13031"
 333.541 -             y="349.07404"
 333.542 -             style="font-family:Courier">1b67dc96f27a</tspan></text>
 333.543 -      </g>
 333.544 -      <g
 333.545 -         transform="matrix(0.423343,0,0,0.423343,139.3426,-65.65866)"
 333.546 -         id="g3609">
 333.547 -        <rect
 333.548 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.549 -           id="rect3611"
 333.550 -           width="213.85715"
 333.551 -           height="75"
 333.552 -           x="187.5"
 333.553 -           y="363.07654" />
 333.554 -        <text
 333.555 -           xml:space="preserve"
 333.556 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.557 -           x="196.02321"
 333.558 -           y="400.86459"
 333.559 -           id="text3613"><tspan
 333.560 -             sodipodi:role="line"
 333.561 -             id="tspan3615"
 333.562 -             x="196.02321"
 333.563 -             y="400.86459"
 333.564 -             style="fill:black;fill-opacity:1;font-family:Courier">...</tspan></text>
 333.565 -        <text
 333.566 -           xml:space="preserve"
 333.567 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.568 -           x="196.71785"
 333.569 -           y="380.17593"
 333.570 -           id="text3617"><tspan
 333.571 -             style="fill:black;fill-opacity:1"
 333.572 -             id="tspan3619"
 333.573 -             sodipodi:role="line"
 333.574 -             x="196.71785"
 333.575 -             y="380.17593">Revision data (delta or snapshot)</tspan></text>
 333.576 -      </g>
 333.577 -    </g>
 333.578 -    <path
 333.579 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Mend)"
 333.580 -       d="M 240.78255,143.08593 L 241.42595,171.75349"
 333.581 -       id="path3801"
 333.582 -       inkscape:connector-type="polyline"
 333.583 -       inkscape:connection-start="#g3573"
 333.584 -       inkscape:connection-end="#g3250" />
 333.585 -    <g
 333.586 -       id="g5677">
 333.587 -      <rect
 333.588 -         style="fill:url(#linearGradient5784);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.589 -         id="rect3393"
 333.590 -         width="101.60232"
 333.591 -         height="89.506805"
 333.592 -         x="150.76137"
 333.593 -         y="278.32565" />
 333.594 -      <g
 333.595 -         transform="matrix(0.423343,0,0,0.423343,76.37397,152.137)"
 333.596 -         id="g3399">
 333.597 -        <rect
 333.598 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.599 -           id="rect3401"
 333.600 -           width="103.14286"
 333.601 -           height="48.571426"
 333.602 -           x="188.6071"
 333.603 -           y="447.72418" />
 333.604 -        <text
 333.605 -           xml:space="preserve"
 333.606 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.607 -           x="197.82495"
 333.608 -           y="464.82358"
 333.609 -           id="text3403"><tspan
 333.610 -             id="tspan3405"
 333.611 -             sodipodi:role="line"
 333.612 -             x="197.82495"
 333.613 -             y="464.82358">First parent</tspan></text>
 333.614 -        <text
 333.615 -           xml:space="preserve"
 333.616 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.617 -           x="197.13031"
 333.618 -           y="485.51224"
 333.619 -           id="text3407"><tspan
 333.620 -             sodipodi:role="line"
 333.621 -             id="tspan3409"
 333.622 -             x="197.13031"
 333.623 -             y="485.51224"
 333.624 -             style="font-family:Courier">ff9dc8bc2a8b</tspan></text>
 333.625 -      </g>
 333.626 -      <g
 333.627 -         transform="matrix(0.423343,0,0,0.423343,76.37397,152.137)"
 333.628 -         id="g3411">
 333.629 -        <rect
 333.630 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.631 -           id="rect3413"
 333.632 -           width="103.14286"
 333.633 -           height="48.571426"
 333.634 -           x="299.67859"
 333.635 -           y="447.71451" />
 333.636 -        <text
 333.637 -           xml:space="preserve"
 333.638 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.639 -           x="308.89639"
 333.640 -           y="464.8139"
 333.641 -           id="text3415"><tspan
 333.642 -             id="tspan3417"
 333.643 -             sodipodi:role="line"
 333.644 -             x="308.89639"
 333.645 -             y="464.8139">Second parent</tspan></text>
 333.646 -        <text
 333.647 -           xml:space="preserve"
 333.648 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.649 -           x="308.20175"
 333.650 -           y="485.50256"
 333.651 -           id="text3419"><tspan
 333.652 -             sodipodi:role="line"
 333.653 -             id="tspan3421"
 333.654 -             x="308.20175"
 333.655 -             y="485.50256"
 333.656 -             style="font-family:Courier">000000000000</tspan></text>
 333.657 -      </g>
 333.658 -      <g
 333.659 -         transform="matrix(0.423343,0,0,0.423343,76.37397,152.137)"
 333.660 -         id="g3423">
 333.661 -        <rect
 333.662 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.663 -           id="rect3425"
 333.664 -           width="103.14286"
 333.665 -           height="48.571426"
 333.666 -           x="188.6071"
 333.667 -           y="311.28598" />
 333.668 -        <text
 333.669 -           xml:space="preserve"
 333.670 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.671 -           x="197.82495"
 333.672 -           y="328.38538"
 333.673 -           id="text3427"><tspan
 333.674 -             id="tspan3429"
 333.675 -             sodipodi:role="line"
 333.676 -             x="197.82495"
 333.677 -             y="328.38538">Revision hash</tspan></text>
 333.678 -        <text
 333.679 -           xml:space="preserve"
 333.680 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.681 -           x="197.13031"
 333.682 -           y="349.07404"
 333.683 -           id="text3431"><tspan
 333.684 -             sodipodi:role="line"
 333.685 -             id="tspan3433"
 333.686 -             x="197.13031"
 333.687 -             y="349.07404"
 333.688 -             style="font-family:Courier">5b80c922ebdd</tspan></text>
 333.689 -      </g>
 333.690 -      <g
 333.691 -         transform="matrix(0.423343,0,0,0.423343,76.84265,153.4957)"
 333.692 -         id="g3435">
 333.693 -        <rect
 333.694 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.695 -           id="rect3437"
 333.696 -           width="213.85715"
 333.697 -           height="75"
 333.698 -           x="187.5"
 333.699 -           y="363.07654" />
 333.700 -        <text
 333.701 -           xml:space="preserve"
 333.702 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.703 -           x="196.02321"
 333.704 -           y="400.86459"
 333.705 -           id="text3439"><tspan
 333.706 -             sodipodi:role="line"
 333.707 -             id="tspan3441"
 333.708 -             x="196.02321"
 333.709 -             y="400.86459"
 333.710 -             style="fill:black;fill-opacity:1;font-family:Courier">...</tspan></text>
 333.711 -        <text
 333.712 -           xml:space="preserve"
 333.713 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.714 -           x="196.71785"
 333.715 -           y="380.17593"
 333.716 -           id="text3443"><tspan
 333.717 -             style="fill:black;fill-opacity:1"
 333.718 -             id="tspan3445"
 333.719 -             sodipodi:role="line"
 333.720 -             x="196.71785"
 333.721 -             y="380.17593">Revision data (delta or snapshot)</tspan></text>
 333.722 -      </g>
 333.723 -    </g>
 333.724 -    <g
 333.725 -       id="g5646"
 333.726 -       transform="translate(-0.227432,0)">
 333.727 -      <rect
 333.728 -         style="fill:url(#linearGradient5786);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.729 -         id="rect3451"
 333.730 -         width="101.60232"
 333.731 -         height="89.506805"
 333.732 -         x="272.63638"
 333.733 -         y="278.32565" />
 333.734 -      <g
 333.735 -         transform="matrix(0.423343,0,0,0.423343,198.2489,152.137)"
 333.736 -         id="g3457">
 333.737 -        <rect
 333.738 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.739 -           id="rect3459"
 333.740 -           width="103.14286"
 333.741 -           height="48.571426"
 333.742 -           x="188.6071"
 333.743 -           y="447.72418" />
 333.744 -        <text
 333.745 -           xml:space="preserve"
 333.746 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.747 -           x="197.82495"
 333.748 -           y="464.82358"
 333.749 -           id="text3461"><tspan
 333.750 -             id="tspan3463"
 333.751 -             sodipodi:role="line"
 333.752 -             x="197.82495"
 333.753 -             y="464.82358">First parent</tspan></text>
 333.754 -        <text
 333.755 -           xml:space="preserve"
 333.756 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.757 -           x="197.13031"
 333.758 -           y="485.51224"
 333.759 -           id="text3465"><tspan
 333.760 -             sodipodi:role="line"
 333.761 -             id="tspan3467"
 333.762 -             x="197.13031"
 333.763 -             y="485.51224"
 333.764 -             style="font-family:Courier">ecacb6b4c9fd</tspan></text>
 333.765 -      </g>
 333.766 -      <g
 333.767 -         transform="matrix(0.423343,0,0,0.423343,198.2489,152.137)"
 333.768 -         id="g3469">
 333.769 -        <rect
 333.770 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.771 -           id="rect3471"
 333.772 -           width="103.14286"
 333.773 -           height="48.571426"
 333.774 -           x="299.67859"
 333.775 -           y="447.71451" />
 333.776 -        <text
 333.777 -           xml:space="preserve"
 333.778 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.779 -           x="308.89639"
 333.780 -           y="464.8139"
 333.781 -           id="text3473"><tspan
 333.782 -             id="tspan3475"
 333.783 -             sodipodi:role="line"
 333.784 -             x="308.89639"
 333.785 -             y="464.8139">Second parent</tspan></text>
 333.786 -        <text
 333.787 -           xml:space="preserve"
 333.788 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.789 -           x="308.20175"
 333.790 -           y="485.50256"
 333.791 -           id="text3477"><tspan
 333.792 -             sodipodi:role="line"
 333.793 -             id="tspan3479"
 333.794 -             x="308.20175"
 333.795 -             y="485.50256"
 333.796 -             style="font-family:Courier">000000000000</tspan></text>
 333.797 -      </g>
 333.798 -      <g
 333.799 -         transform="matrix(0.423343,0,0,0.423343,198.2489,152.137)"
 333.800 -         id="g3481">
 333.801 -        <rect
 333.802 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.803 -           id="rect3483"
 333.804 -           width="103.14286"
 333.805 -           height="48.571426"
 333.806 -           x="188.6071"
 333.807 -           y="311.28598" />
 333.808 -        <text
 333.809 -           xml:space="preserve"
 333.810 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.811 -           x="197.82495"
 333.812 -           y="328.38538"
 333.813 -           id="text3485"><tspan
 333.814 -             id="tspan3487"
 333.815 -             sodipodi:role="line"
 333.816 -             x="197.82495"
 333.817 -             y="328.38538">Revision hash</tspan></text>
 333.818 -        <text
 333.819 -           xml:space="preserve"
 333.820 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.821 -           x="197.13031"
 333.822 -           y="349.07404"
 333.823 -           id="text3489"><tspan
 333.824 -             sodipodi:role="line"
 333.825 -             id="tspan3491"
 333.826 -             x="197.13031"
 333.827 -             y="349.07404"
 333.828 -             style="font-family:Courier">32bf9a5f22c0</tspan></text>
 333.829 -      </g>
 333.830 -      <g
 333.831 -         transform="matrix(0.423343,0,0,0.423343,198.7176,153.4957)"
 333.832 -         id="g3493">
 333.833 -        <rect
 333.834 -           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 333.835 -           id="rect3495"
 333.836 -           width="213.85715"
 333.837 -           height="75"
 333.838 -           x="187.5"
 333.839 -           y="363.07654" />
 333.840 -        <text
 333.841 -           xml:space="preserve"
 333.842 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.843 -           x="196.02321"
 333.844 -           y="400.86459"
 333.845 -           id="text3497"><tspan
 333.846 -             sodipodi:role="line"
 333.847 -             id="tspan3499"
 333.848 -             x="196.02321"
 333.849 -             y="400.86459"
 333.850 -             style="fill:black;fill-opacity:1;font-family:Courier">...</tspan></text>
 333.851 -        <text
 333.852 -           xml:space="preserve"
 333.853 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.854 -           x="196.71785"
 333.855 -           y="380.17593"
 333.856 -           id="text3501"><tspan
 333.857 -             style="fill:black;fill-opacity:1"
 333.858 -             id="tspan3503"
 333.859 -             sodipodi:role="line"
 333.860 -             x="196.71785"
 333.861 -             y="380.17593">Revision data (delta or snapshot)</tspan></text>
 333.862 -      </g>
 333.863 -    </g>
 333.864 -    <rect
 333.865 -       y="387.90286"
 333.866 -       x="272.40894"
 333.867 -       height="89.506805"
 333.868 -       width="101.60232"
 333.869 -       id="rect5081"
 333.870 -       style="fill:url(#linearGradient5895);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 333.871 -    <g
 333.872 -       id="g5087"
 333.873 -       transform="matrix(0.423343,0,0,0.423343,198.0214,261.7142)">
 333.874 -      <rect
 333.875 -         y="447.72418"
 333.876 -         x="188.6071"
 333.877 -         height="48.571426"
 333.878 -         width="103.14286"
 333.879 -         id="rect5089"
 333.880 -         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 333.881 -      <text
 333.882 -         id="text5091"
 333.883 -         y="464.82358"
 333.884 -         x="197.82495"
 333.885 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.886 -         xml:space="preserve"><tspan
 333.887 -           y="464.82358"
 333.888 -           x="197.82495"
 333.889 -           sodipodi:role="line"
 333.890 -           id="tspan5093">First parent</tspan></text>
 333.891 -      <text
 333.892 -         id="text5095"
 333.893 -         y="485.51224"
 333.894 -         x="197.13031"
 333.895 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.896 -         xml:space="preserve"><tspan
 333.897 -           style="font-family:Courier"
 333.898 -           y="485.51224"
 333.899 -           x="197.13031"
 333.900 -           id="tspan5097"
 333.901 -           sodipodi:role="line">ff9dc8bc2a8b</tspan></text>
 333.902 -    </g>
 333.903 -    <g
 333.904 -       id="g5099"
 333.905 -       transform="matrix(0.423343,0,0,0.423343,198.0214,261.7142)">
 333.906 -      <rect
 333.907 -         y="447.71451"
 333.908 -         x="299.67859"
 333.909 -         height="48.571426"
 333.910 -         width="103.14286"
 333.911 -         id="rect5101"
 333.912 -         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 333.913 -      <text
 333.914 -         id="text5103"
 333.915 -         y="464.8139"
 333.916 -         x="308.89639"
 333.917 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.918 -         xml:space="preserve"><tspan
 333.919 -           y="464.8139"
 333.920 -           x="308.89639"
 333.921 -           sodipodi:role="line"
 333.922 -           id="tspan5105">Second parent</tspan></text>
 333.923 -      <text
 333.924 -         id="text5107"
 333.925 -         y="485.50256"
 333.926 -         x="308.20175"
 333.927 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.928 -         xml:space="preserve"><tspan
 333.929 -           style="font-family:Courier"
 333.930 -           y="485.50256"
 333.931 -           x="308.20175"
 333.932 -           id="tspan5109"
 333.933 -           sodipodi:role="line">000000000000</tspan></text>
 333.934 -    </g>
 333.935 -    <g
 333.936 -       id="g5111"
 333.937 -       transform="matrix(0.423343,0,0,0.423343,198.0214,261.7142)">
 333.938 -      <rect
 333.939 -         y="311.28598"
 333.940 -         x="188.6071"
 333.941 -         height="48.571426"
 333.942 -         width="103.14286"
 333.943 -         id="rect5113"
 333.944 -         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 333.945 -      <text
 333.946 -         id="text5115"
 333.947 -         y="328.38538"
 333.948 -         x="197.82495"
 333.949 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.950 -         xml:space="preserve"><tspan
 333.951 -           y="328.38538"
 333.952 -           x="197.82495"
 333.953 -           sodipodi:role="line"
 333.954 -           id="tspan5117">Revision hash</tspan></text>
 333.955 -      <text
 333.956 -         id="text5119"
 333.957 -         y="349.07404"
 333.958 -         x="197.13031"
 333.959 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.960 -         xml:space="preserve"><tspan
 333.961 -           style="font-family:Courier"
 333.962 -           y="349.07404"
 333.963 -           x="197.13031"
 333.964 -           id="tspan5121"
 333.965 -           sodipodi:role="line">ecacb6b4c9fd</tspan></text>
 333.966 -    </g>
 333.967 -    <g
 333.968 -       id="g5123"
 333.969 -       transform="matrix(0.423343,0,0,0.423343,198.4901,263.0729)">
 333.970 -      <rect
 333.971 -         y="363.07654"
 333.972 -         x="187.5"
 333.973 -         height="75"
 333.974 -         width="213.85715"
 333.975 -         id="rect5125"
 333.976 -         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 333.977 -      <text
 333.978 -         id="text5127"
 333.979 -         y="400.86459"
 333.980 -         x="196.02321"
 333.981 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.982 -         xml:space="preserve"><tspan
 333.983 -           style="fill:black;fill-opacity:1;font-family:Courier"
 333.984 -           y="400.86459"
 333.985 -           x="196.02321"
 333.986 -           id="tspan5129"
 333.987 -           sodipodi:role="line">...</tspan></text>
 333.988 -      <text
 333.989 -         id="text5131"
 333.990 -         y="380.17593"
 333.991 -         x="196.71785"
 333.992 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 333.993 -         xml:space="preserve"><tspan
 333.994 -           y="380.17593"
 333.995 -           x="196.71785"
 333.996 -           sodipodi:role="line"
 333.997 -           id="tspan5133"
 333.998 -           style="fill:black;fill-opacity:1">Revision data (delta or snapshot)</tspan></text>
 333.999 -    </g>
333.1000 -    <path
333.1001 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
333.1002 -       d="M 299.69935,362.24027 L 299.69931,393.49494"
333.1003 -       id="path5203"
333.1004 -       inkscape:connector-type="polyline"
333.1005 -       inkscape:connection-start="#g3457"
333.1006 -       inkscape:connection-end="#g5111" />
333.1007 -    <path
333.1008 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
333.1009 -       d="M 182.35357,362.22647 L 241.2842,503.07224"
333.1010 -       id="path5271"
333.1011 -       inkscape:connector-type="polyline"
333.1012 -       inkscape:connection-start="#g3399"
333.1013 -       inkscape:connection-end="#g3539" />
333.1014 -    <path
333.1015 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
333.1016 -       d="M 287.63109,471.81747 L 250.9438,503.07223"
333.1017 -       id="path5285"
333.1018 -       inkscape:connector-type="polyline"
333.1019 -       inkscape:connection-start="#g5087"
333.1020 -       inkscape:connection-end="#g3539" />
333.1021 -    <path
333.1022 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
333.1023 -       d="M 290.80419,250.07192 L 297.80065,283.90394"
333.1024 -       id="path5077"
333.1025 -       inkscape:connector-type="polyline"
333.1026 -       inkscape:connection-start="#g3215"
333.1027 -       inkscape:connection-end="#g3481" />
333.1028 -    <path
333.1029 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
333.1030 -       d="M 229.63373,250.07601 L 190.07484,283.90394"
333.1031 -       id="path5075"
333.1032 -       inkscape:connector-type="polyline"
333.1033 -       inkscape:connection-end="#g3423" />
333.1034 -    <text
333.1035 -       xml:space="preserve"
333.1036 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
333.1037 -       x="131.5625"
333.1038 -       y="100.79968"
333.1039 -       id="text5897"><tspan
333.1040 -         sodipodi:role="line"
333.1041 -         id="tspan5899"
333.1042 -         x="131.5625"
333.1043 -         y="100.79968"
333.1044 -         style="text-align:end;text-anchor:end">Head revision</tspan><tspan
333.1045 -         sodipodi:role="line"
333.1046 -         x="131.5625"
333.1047 -         y="115.79968"
333.1048 -         id="tspan5901"
333.1049 -         style="text-align:end;text-anchor:end">(no children)</tspan></text>
333.1050 -    <text
333.1051 -       xml:space="preserve"
333.1052 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
333.1053 -       x="131.5625"
333.1054 -       y="207.04968"
333.1055 -       id="text5903"><tspan
333.1056 -         sodipodi:role="line"
333.1057 -         id="tspan5905"
333.1058 -         x="131.5625"
333.1059 -         y="207.04968"
333.1060 -         style="text-align:end;text-anchor:end">Merge revision</tspan><tspan
333.1061 -         sodipodi:role="line"
333.1062 -         x="131.5625"
333.1063 -         y="222.04968"
333.1064 -         id="tspan5907"
333.1065 -         style="text-align:end;text-anchor:end">(two parents)</tspan></text>
333.1066 -    <text
333.1067 -       xml:space="preserve"
333.1068 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
333.1069 -       x="131.92578"
333.1070 -       y="451.58093"
333.1071 -       id="text5909"><tspan
333.1072 -         sodipodi:role="line"
333.1073 -         id="tspan5911"
333.1074 -         x="131.92578"
333.1075 -         y="451.58093"
333.1076 -         style="text-align:end;text-anchor:end">Branches</tspan><tspan
333.1077 -         sodipodi:role="line"
333.1078 -         x="131.92578"
333.1079 -         y="466.58093"
333.1080 -         id="tspan5913"
333.1081 -         style="text-align:end;text-anchor:end">(two revisions,</tspan><tspan
333.1082 -         sodipodi:role="line"
333.1083 -         x="131.92578"
333.1084 -         y="481.58093"
333.1085 -         id="tspan5915"
333.1086 -         style="text-align:end;text-anchor:end">same parent)</tspan></text>
333.1087 -    <path
333.1088 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
333.1089 -       d="M 111.71875,433.61218 L 154.7268,368.52294"
333.1090 -       id="path5917"
333.1091 -       inkscape:connector-type="polyline" />
333.1092 -    <path
333.1093 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
333.1094 -       d="M 134.375,464.86218 L 277.86691,440.37816"
333.1095 -       id="path5919"
333.1096 -       inkscape:connector-type="polyline"
333.1097 -       inkscape:connection-end="#g5123" />
333.1098 -    <text
333.1099 -       xml:space="preserve"
333.1100 -       style="font-size:12px;font-style:normal;font-weight:normal;text-align:end;text-anchor:end;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
333.1101 -       x="131.5625"
333.1102 -       y="536.73718"
333.1103 -       id="text5927"><tspan
333.1104 -         sodipodi:role="line"
333.1105 -         id="tspan5929"
333.1106 -         x="131.5625"
333.1107 -         y="536.73718">First revision</tspan><tspan
333.1108 -         sodipodi:role="line"
333.1109 -         x="131.5625"
333.1110 -         y="551.73718"
333.1111 -         id="tspan5931">(both parents null)</tspan></text>
333.1112 -    <rect
333.1113 -       style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
333.1114 -       id="rect2830"
333.1115 -       width="43.664806"
333.1116 -       height="20.562374"
333.1117 -       x="217.0432"
333.1118 -       y="232.10075" />
333.1119 -    <text
333.1120 -       xml:space="preserve"
333.1121 -       style="font-size:5.0801158px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
333.1122 -       x="220.94551"
333.1123 -       y="239.33966"
333.1124 -       id="text2832"><tspan
333.1125 -         id="tspan2836"
333.1126 -         sodipodi:role="line"
333.1127 -         x="220.94551"
333.1128 -         y="239.33966">First parent</tspan></text>
333.1129 -    <text
333.1130 -       xml:space="preserve"
333.1131 -       style="font-size:5.0801158px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
333.1132 -       x="220.65144"
333.1133 -       y="248.09805"
333.1134 -       id="text2879"><tspan
333.1135 -         sodipodi:role="line"
333.1136 -         id="tspan2881"
333.1137 -         x="220.65144"
333.1138 -         y="248.09805"
333.1139 -         style="font-family:Courier">5b80c922ebdd</tspan></text>
333.1140 -    <path
333.1141 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
333.1142 -       d="M 139.84375,107.83093 L 210.15625,107.83093"
333.1143 -       id="path5965"
333.1144 -       inkscape:connector-type="polyline" />
333.1145 -    <path
333.1146 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
333.1147 -       d="M 137.5,213.29968 L 210.49036,214.09055"
333.1148 -       id="path5967"
333.1149 -       inkscape:connector-type="polyline" />
333.1150 -    <path
333.1151 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
333.1152 -       d="M 136.34375,544.54968 L 206.65625,544.54968"
333.1153 -       id="path5969"
333.1154 -       inkscape:connector-type="polyline"
333.1155 -       inkscape:transform-center-y="-171.09375"
333.1156 -       inkscape:transform-center-x="53.90625" />
333.1157 -  </g>
333.1158 -</svg>
   334.1 --- a/en/snapshot.svg	Thu Mar 26 08:57:10 2009 +0100
   334.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   334.3 @@ -1,202 +0,0 @@
   334.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   334.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   334.6 -<svg
   334.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   334.8 -   xmlns:cc="http://web.resource.org/cc/"
   334.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  334.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  334.11 -   xmlns="http://www.w3.org/2000/svg"
  334.12 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  334.13 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  334.14 -   width="744.09448819"
  334.15 -   height="1052.3622047"
  334.16 -   id="svg2807"
  334.17 -   sodipodi:version="0.32"
  334.18 -   inkscape:version="0.44.1"
  334.19 -   sodipodi:docbase="/home/bos/hg/hgbook/en"
  334.20 -   sodipodi:docname="snapshots.svg">
  334.21 -  <defs
  334.22 -     id="defs2809" />
  334.23 -  <sodipodi:namedview
  334.24 -     id="base"
  334.25 -     pagecolor="#ffffff"
  334.26 -     bordercolor="#666666"
  334.27 -     borderopacity="1.0"
  334.28 -     gridtolerance="10000"
  334.29 -     guidetolerance="10"
  334.30 -     objecttolerance="10"
  334.31 -     inkscape:pageopacity="0.0"
  334.32 -     inkscape:pageshadow="2"
  334.33 -     inkscape:zoom="1.4"
  334.34 -     inkscape:cx="252.04111"
  334.35 -     inkscape:cy="605.75448"
  334.36 -     inkscape:document-units="px"
  334.37 -     inkscape:current-layer="layer1"
  334.38 -     inkscape:window-width="906"
  334.39 -     inkscape:window-height="721"
  334.40 -     inkscape:window-x="0"
  334.41 -     inkscape:window-y="25" />
  334.42 -  <metadata
  334.43 -     id="metadata2812">
  334.44 -    <rdf:RDF>
  334.45 -      <cc:Work
  334.46 -         rdf:about="">
  334.47 -        <dc:format>image/svg+xml</dc:format>
  334.48 -        <dc:type
  334.49 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  334.50 -      </cc:Work>
  334.51 -    </rdf:RDF>
  334.52 -  </metadata>
  334.53 -  <g
  334.54 -     inkscape:label="Layer 1"
  334.55 -     inkscape:groupmode="layer"
  334.56 -     id="layer1">
  334.57 -    <rect
  334.58 -       style="opacity:1;fill:#d3ceff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.88795626;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
  334.59 -       id="rect2817"
  334.60 -       width="118.18347"
  334.61 -       height="245.32632"
  334.62 -       x="243.05112"
  334.63 -       y="315.4133"
  334.64 -       inkscape:transform-center-x="136.84403"
  334.65 -       inkscape:transform-center-y="-66.529183" />
  334.66 -    <rect
  334.67 -       y="315.04153"
  334.68 -       x="46.965065"
  334.69 -       height="97.803009"
  334.70 -       width="108.92702"
  334.71 -       id="rect2815"
  334.72 -       style="fill:#ffced6;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.14441991;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
  334.73 -    <g
  334.74 -       id="g3814">
  334.75 -      <rect
  334.76 -         y="348.94302"
  334.77 -         x="59.285713"
  334.78 -         height="30"
  334.79 -         width="84.285713"
  334.80 -         id="rect2819"
  334.81 -         style="fill:#ff6e86;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
  334.82 -         ry="0" />
  334.83 -      <text
  334.84 -         id="text2821"
  334.85 -         y="368.02701"
  334.86 -         x="72.717636"
  334.87 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
  334.88 -         xml:space="preserve"><tspan
  334.89 -           y="368.02701"
  334.90 -           x="72.717636"
  334.91 -           id="tspan2823"
  334.92 -           sodipodi:role="line">Index, rev 7</tspan></text>
  334.93 -    </g>
  334.94 -    <text
  334.95 -       id="text3722"
  334.96 -       y="301.29074"
  334.97 -       x="46.187778"
  334.98 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
  334.99 -       xml:space="preserve"><tspan
 334.100 -         y="301.29074"
 334.101 -         x="46.187778"
 334.102 -         id="tspan3724"
 334.103 -         sodipodi:role="line">Revlog index (.i file)</tspan></text>
 334.104 -    <text
 334.105 -       id="text3726"
 334.106 -       y="301.29074"
 334.107 -       x="241.90207"
 334.108 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 334.109 -       xml:space="preserve"><tspan
 334.110 -         y="301.29074"
 334.111 -         x="241.90207"
 334.112 -         id="tspan3728"
 334.113 -         sodipodi:role="line">Revlog data (.d file)</tspan></text>
 334.114 -    <path
 334.115 -       style="fill:#c695ff;fill-opacity:0.60109288;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 334.116 -       d="M 143.57143,348.07647 L 255,368.07646 L 255.71429,544.50504 L 142.85714,379.50504 L 143.57143,348.07647 z "
 334.117 -       id="path3839"
 334.118 -       sodipodi:nodetypes="ccccc" />
 334.119 -    <rect
 334.120 -       style="fill:#4733ff;fill-opacity:1;stroke:#a7a7a7;stroke-width:2.35124183;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 334.121 -       id="rect3752"
 334.122 -       width="92.720184"
 334.123 -       height="67.005905"
 334.124 -       x="255.42564"
 334.125 -       y="368.64264" />
 334.126 -    <text
 334.127 -       xml:space="preserve"
 334.128 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 334.129 -       x="264.45859"
 334.130 -       y="387.30099"
 334.131 -       id="text3754"><tspan
 334.132 -         sodipodi:role="line"
 334.133 -         id="tspan3756"
 334.134 -         x="264.45859"
 334.135 -         y="387.30099">Snapshot, rev 4</tspan></text>
 334.136 -    <rect
 334.137 -       style="fill:#7c6eff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.57776296;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 334.138 -       id="rect3761"
 334.139 -       width="93.49366"
 334.140 -       height="29.922237"
 334.141 -       x="255.03891"
 334.142 -       y="442.04395" />
 334.143 -    <text
 334.144 -       xml:space="preserve"
 334.145 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 334.146 -       x="263.2662"
 334.147 -       y="460.17206"
 334.148 -       id="text3763"><tspan
 334.149 -         sodipodi:role="line"
 334.150 -         id="tspan3765"
 334.151 -         x="263.2662"
 334.152 -         y="460.17206">Delta, rev 4 to 5</tspan></text>
 334.153 -    <rect
 334.154 -       style="fill:#7c6eff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.57776296;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 334.155 -       id="rect3774"
 334.156 -       width="93.49366"
 334.157 -       height="29.922237"
 334.158 -       x="255.03891"
 334.159 -       y="477.97485" />
 334.160 -    <text
 334.161 -       xml:space="preserve"
 334.162 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 334.163 -       x="263.2662"
 334.164 -       y="496.10297"
 334.165 -       id="text3776"><tspan
 334.166 -         sodipodi:role="line"
 334.167 -         id="tspan3778"
 334.168 -         x="263.2662"
 334.169 -         y="496.10297">Delta, rev 5 to 6</tspan></text>
 334.170 -    <rect
 334.171 -       style="fill:#7c6eff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.57776296;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 334.172 -       id="rect3782"
 334.173 -       width="93.49366"
 334.174 -       height="29.922237"
 334.175 -       x="255.03891"
 334.176 -       y="513.90576" />
 334.177 -    <text
 334.178 -       xml:space="preserve"
 334.179 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 334.180 -       x="263.2662"
 334.181 -       y="532.03387"
 334.182 -       id="text3784"><tspan
 334.183 -         sodipodi:role="line"
 334.184 -         id="tspan3786"
 334.185 -         x="263.2662"
 334.186 -         y="532.03387">Delta, rev 6 to 7</tspan></text>
 334.187 -    <rect
 334.188 -       style="fill:#7c6eff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.57776296;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 334.189 -       id="rect3889"
 334.190 -       width="93.49366"
 334.191 -       height="29.922237"
 334.192 -       x="255.03891"
 334.193 -       y="332.32489" />
 334.194 -    <text
 334.195 -       xml:space="preserve"
 334.196 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 334.197 -       x="263.2662"
 334.198 -       y="350.453"
 334.199 -       id="text3891"><tspan
 334.200 -         sodipodi:role="line"
 334.201 -         id="tspan3893"
 334.202 -         x="263.2662"
 334.203 -         y="350.453">Delta, rev 2 to 3</tspan></text>
 334.204 -  </g>
 334.205 -</svg>
   335.1 --- a/en/srcinstall.tex	Thu Mar 26 08:57:10 2009 +0100
   335.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   335.3 @@ -1,53 +0,0 @@
   335.4 -\chapter{Installing Mercurial from source}
   335.5 -\label{chap:srcinstall}
   335.6 -
   335.7 -\section{On a Unix-like system}
   335.8 -\label{sec:srcinstall:unixlike}
   335.9 -
  335.10 -If you are using a Unix-like system that has a sufficiently recent
  335.11 -version of Python (2.3~or newer) available, it is easy to install
  335.12 -Mercurial from source.
  335.13 -\begin{enumerate}
  335.14 -\item Download a recent source tarball from
  335.15 -  \url{http://www.selenic.com/mercurial/download}.
  335.16 -\item Unpack the tarball:
  335.17 -  \begin{codesample4}
  335.18 -    gzip -dc mercurial-\emph{version}.tar.gz | tar xf -
  335.19 -  \end{codesample4}
  335.20 -\item Go into the source directory and run the installer script.  This
  335.21 -  will build Mercurial and install it in your home directory.
  335.22 -  \begin{codesample4}
  335.23 -    cd mercurial-\emph{version}
  335.24 -    python setup.py install --force --home=\$HOME
  335.25 -  \end{codesample4}
  335.26 -\end{enumerate}
  335.27 -Once the install finishes, Mercurial will be in the \texttt{bin}
  335.28 -subdirectory of your home directory.  Don't forget to make sure that
  335.29 -this directory is present in your shell's search path.
  335.30 -
  335.31 -You will probably need to set the \envar{PYTHONPATH} environment
  335.32 -variable so that the Mercurial executable can find the rest of the
  335.33 -Mercurial packages.  For example, on my laptop, I have set it to
  335.34 -\texttt{/home/bos/lib/python}.  The exact path that you will need to
  335.35 -use depends on how Python was built for your system, but should be
  335.36 -easy to figure out.  If you're uncertain, look through the output of
  335.37 -the installer script above, and see where the contents of the
  335.38 -\texttt{mercurial} directory were installed to.
  335.39 -
  335.40 -\section{On Windows}
  335.41 -
  335.42 -Building and installing Mercurial on Windows requires a variety of
  335.43 -tools, a fair amount of technical knowledge, and considerable
  335.44 -patience.  I very much \emph{do not recommend} this route if you are a
  335.45 -``casual user''.  Unless you intend to hack on Mercurial, I strongly
  335.46 -suggest that you use a binary package instead.
  335.47 -
  335.48 -If you are intent on building Mercurial from source on Windows, follow
  335.49 -the ``hard way'' directions on the Mercurial wiki at
  335.50 -\url{http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall},
  335.51 -and expect the process to involve a lot of fiddly work.
  335.52 -
  335.53 -%%% Local Variables: 
  335.54 -%%% mode: latex
  335.55 -%%% TeX-master: "00book"
  335.56 -%%% End: 
   336.1 --- a/en/template.tex	Thu Mar 26 08:57:10 2009 +0100
   336.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   336.3 @@ -1,475 +0,0 @@
   336.4 -\chapter{Customising the output of Mercurial}
   336.5 -\label{chap:template}
   336.6 -
   336.7 -Mercurial provides a powerful mechanism to let you control how it
   336.8 -displays information.  The mechanism is based on templates.  You can
   336.9 -use templates to generate specific output for a single command, or to
  336.10 -customise the entire appearance of the built-in web interface.
  336.11 -
  336.12 -\section{Using precanned output styles}
  336.13 -\label{sec:style}
  336.14 -
  336.15 -Packaged with Mercurial are some output styles that you can use
  336.16 -immediately.  A style is simply a precanned template that someone
  336.17 -wrote and installed somewhere that Mercurial can find.
  336.18 -
  336.19 -Before we take a look at Mercurial's bundled styles, let's review its
  336.20 -normal output.
  336.21 -
  336.22 -\interaction{template.simple.normal}
  336.23 -
  336.24 -This is somewhat informative, but it takes up a lot of space---five
  336.25 -lines of output per changeset.  The \texttt{compact} style reduces
  336.26 -this to three lines, presented in a sparse manner.
  336.27 -
  336.28 -\interaction{template.simple.compact}
  336.29 -
  336.30 -The \texttt{changelog} style hints at the expressive power of
  336.31 -Mercurial's templating engine.  This style attempts to follow the GNU
  336.32 -Project's changelog guidelines\cite{web:changelog}.
  336.33 -
  336.34 -\interaction{template.simple.changelog}
  336.35 -
  336.36 -You will not be shocked to learn that Mercurial's default output style
  336.37 -is named \texttt{default}.
  336.38 -
  336.39 -\subsection{Setting a default style}
  336.40 -
  336.41 -You can modify the output style that Mercurial will use for every
  336.42 -command by editing your \hgrc\ file, naming the style you would
  336.43 -prefer to use.
  336.44 -
  336.45 -\begin{codesample2}
  336.46 -  [ui]
  336.47 -  style = compact
  336.48 -\end{codesample2}
  336.49 -
  336.50 -If you write a style of your own, you can use it by either providing
  336.51 -the path to your style file, or copying your style file into a
  336.52 -location where Mercurial can find it (typically the \texttt{templates}
  336.53 -subdirectory of your Mercurial install directory).
  336.54 -
  336.55 -\section{Commands that support styles and templates}
  336.56 -
  336.57 -All of Mercurial's ``\texttt{log}-like'' commands let you use styles
  336.58 -and templates: \hgcmd{incoming}, \hgcmd{log}, \hgcmd{outgoing}, and
  336.59 -\hgcmd{tip}.
  336.60 -
  336.61 -As I write this manual, these are so far the only commands that
  336.62 -support styles and templates.  Since these are the most important
  336.63 -commands that need customisable output, there has been little pressure
  336.64 -from the Mercurial user community to add style and template support to
  336.65 -other commands.
  336.66 -
  336.67 -\section{The basics of templating}
  336.68 -
  336.69 -At its simplest, a Mercurial template is a piece of text.  Some of the
  336.70 -text never changes, while other parts are \emph{expanded}, or replaced
  336.71 -with new text, when necessary.
  336.72 -
  336.73 -Before we continue, let's look again at a simple example of
  336.74 -Mercurial's normal output.
  336.75 -
  336.76 -\interaction{template.simple.normal}
  336.77 -
  336.78 -Now, let's run the same command, but using a template to change its
  336.79 -output.
  336.80 -
  336.81 -\interaction{template.simple.simplest}
  336.82 -
  336.83 -The example above illustrates the simplest possible template; it's
  336.84 -just a piece of static text, printed once for each changeset.  The
  336.85 -\hgopt{log}{--template} option to the \hgcmd{log} command tells
  336.86 -Mercurial to use the given text as the template when printing each
  336.87 -changeset.
  336.88 -
  336.89 -Notice that the template string above ends with the text
  336.90 -``\Verb+\n+''.  This is an \emph{escape sequence}, telling Mercurial
  336.91 -to print a newline at the end of each template item.  If you omit this
  336.92 -newline, Mercurial will run each piece of output together.  See
  336.93 -section~\ref{sec:template:escape} for more details of escape sequences.
  336.94 -
  336.95 -A template that prints a fixed string of text all the time isn't very
  336.96 -useful; let's try something a bit more complex.
  336.97 -
  336.98 -\interaction{template.simple.simplesub}
  336.99 -
 336.100 -As you can see, the string ``\Verb+{desc}+'' in the template has been
 336.101 -replaced in the output with the description of each changeset.  Every
 336.102 -time Mercurial finds text enclosed in curly braces (``\texttt{\{}''
 336.103 -and ``\texttt{\}}''), it will try to replace the braces and text with
 336.104 -the expansion of whatever is inside.  To print a literal curly brace,
 336.105 -you must escape it, as described in section~\ref{sec:template:escape}.
 336.106 -
 336.107 -\section{Common template keywords}
 336.108 -\label{sec:template:keyword}
 336.109 -
 336.110 -You can start writing simple templates immediately using the keywords
 336.111 -below.
 336.112 -
 336.113 -\begin{itemize}
 336.114 -\item[\tplkword{author}] String.  The unmodified author of the changeset.
 336.115 -\item[\tplkword{branches}] String.  The name of the branch on which
 336.116 -  the changeset was committed.  Will be empty if the branch name was
 336.117 -  \texttt{default}.
 336.118 -\item[\tplkword{date}] Date information.  The date when the changeset
 336.119 -  was committed.  This is \emph{not} human-readable; you must pass it
 336.120 -  through a filter that will render it appropriately.  See
 336.121 -  section~\ref{sec:template:filter} for more information on filters.
 336.122 -  The date is expressed as a pair of numbers.  The first number is a
 336.123 -  Unix UTC timestamp (seconds since January 1, 1970); the second is
 336.124 -  the offset of the committer's timezone from UTC, in seconds.
 336.125 -\item[\tplkword{desc}] String.  The text of the changeset description.
 336.126 -\item[\tplkword{files}] List of strings.  All files modified, added, or
 336.127 -  removed by this changeset.
 336.128 -\item[\tplkword{file\_adds}] List of strings.  Files added by this
 336.129 -  changeset.
 336.130 -\item[\tplkword{file\_dels}] List of strings.  Files removed by this
 336.131 -  changeset.
 336.132 -\item[\tplkword{node}] String.  The changeset identification hash, as a
 336.133 -  40-character hexadecimal string.
 336.134 -\item[\tplkword{parents}] List of strings.  The parents of the
 336.135 -  changeset.
 336.136 -\item[\tplkword{rev}] Integer.  The repository-local changeset revision
 336.137 -  number.
 336.138 -\item[\tplkword{tags}] List of strings.  Any tags associated with the
 336.139 -  changeset.
 336.140 -\end{itemize}
 336.141 -
 336.142 -A few simple experiments will show us what to expect when we use these
 336.143 -keywords; you can see the results in
 336.144 -figure~\ref{fig:template:keywords}.
 336.145 -
 336.146 -\begin{figure}
 336.147 -  \interaction{template.simple.keywords}
 336.148 -  \caption{Template keywords in use}
 336.149 -  \label{fig:template:keywords}
 336.150 -\end{figure}
 336.151 -
 336.152 -As we noted above, the date keyword does not produce human-readable
 336.153 -output, so we must treat it specially.  This involves using a
 336.154 -\emph{filter}, about which more in section~\ref{sec:template:filter}.
 336.155 -
 336.156 -\interaction{template.simple.datekeyword}
 336.157 -
 336.158 -\section{Escape sequences}
 336.159 -\label{sec:template:escape}
 336.160 -
 336.161 -Mercurial's templating engine recognises the most commonly used escape
 336.162 -sequences in strings.  When it sees a backslash (``\Verb+\+'')
 336.163 -character, it looks at the following character and substitutes the two
 336.164 -characters with a single replacement, as described below.
 336.165 -
 336.166 -\begin{itemize}
 336.167 -\item[\Verb+\textbackslash\textbackslash+] Backslash, ``\Verb+\+'',
 336.168 -  ASCII~134.
 336.169 -\item[\Verb+\textbackslash n+] Newline, ASCII~12.
 336.170 -\item[\Verb+\textbackslash r+] Carriage return, ASCII~15.
 336.171 -\item[\Verb+\textbackslash t+] Tab, ASCII~11.
 336.172 -\item[\Verb+\textbackslash v+] Vertical tab, ASCII~13.
 336.173 -\item[\Verb+\textbackslash \{+] Open curly brace, ``\Verb+{+'', ASCII~173.
 336.174 -\item[\Verb+\textbackslash \}+] Close curly brace, ``\Verb+}+'', ASCII~175.
 336.175 -\end{itemize}
 336.176 -
 336.177 -As indicated above, if you want the expansion of a template to contain
 336.178 -a literal ``\Verb+\+'', ``\Verb+{+'', or ``\Verb+{+'' character, you
 336.179 -must escape it.
 336.180 -
 336.181 -\section{Filtering keywords to change their results}
 336.182 -\label{sec:template:filter}
 336.183 -
 336.184 -Some of the results of template expansion are not immediately easy to
 336.185 -use.  Mercurial lets you specify an optional chain of \emph{filters}
 336.186 -to modify the result of expanding a keyword.  You have already seen a
 336.187 -common filter, \tplkwfilt{date}{isodate}, in action above, to make a
 336.188 -date readable.
 336.189 -
 336.190 -Below is a list of the most commonly used filters that Mercurial
 336.191 -supports.  While some filters can be applied to any text, others can
 336.192 -only be used in specific circumstances.  The name of each filter is
 336.193 -followed first by an indication of where it can be used, then a
 336.194 -description of its effect.
 336.195 -
 336.196 -\begin{itemize}
 336.197 -\item[\tplfilter{addbreaks}] Any text. Add an XHTML ``\Verb+<br/>+''
 336.198 -  tag before the end of every line except the last.  For example,
 336.199 -  ``\Verb+foo\nbar+'' becomes ``\Verb+foo<br/>\nbar+''.
 336.200 -\item[\tplkwfilt{date}{age}] \tplkword{date} keyword.  Render the
 336.201 -  age of the date, relative to the current time.  Yields a string like
 336.202 -  ``\Verb+10 minutes+''.
 336.203 -\item[\tplfilter{basename}] Any text, but most useful for the
 336.204 -  \tplkword{files} keyword and its relatives.  Treat the text as a
 336.205 -  path, and return the basename. For example, ``\Verb+foo/bar/baz+''
 336.206 -  becomes ``\Verb+baz+''.
 336.207 -\item[\tplkwfilt{date}{date}] \tplkword{date} keyword.  Render a date
 336.208 -  in a similar format to the Unix \tplkword{date} command, but with
 336.209 -  timezone included.  Yields a string like
 336.210 -  ``\Verb+Mon Sep 04 15:13:13 2006 -0700+''.
 336.211 -\item[\tplkwfilt{author}{domain}] Any text, but most useful for the
 336.212 -  \tplkword{author} keyword.  Finds the first string that looks like
 336.213 -  an email address, and extract just the domain component.  For
 336.214 -  example, ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' becomes
 336.215 -  ``\Verb+serpentine.com+''.
 336.216 -\item[\tplkwfilt{author}{email}] Any text, but most useful for the
 336.217 -  \tplkword{author} keyword.  Extract the first string that looks like
 336.218 -  an email address.  For example,
 336.219 -  ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' becomes
 336.220 -  ``\Verb+bos@serpentine.com+''.
 336.221 -\item[\tplfilter{escape}] Any text.  Replace the special XML/XHTML
 336.222 -  characters ``\Verb+&+'', ``\Verb+<+'' and ``\Verb+>+'' with
 336.223 -  XML entities.
 336.224 -\item[\tplfilter{fill68}] Any text.  Wrap the text to fit in 68
 336.225 -  columns.  This is useful before you pass text through the
 336.226 -  \tplfilter{tabindent} filter, and still want it to fit in an
 336.227 -  80-column fixed-font window.
 336.228 -\item[\tplfilter{fill76}] Any text.  Wrap the text to fit in 76
 336.229 -  columns.
 336.230 -\item[\tplfilter{firstline}] Any text.  Yield the first line of text,
 336.231 -  without any trailing newlines.
 336.232 -\item[\tplkwfilt{date}{hgdate}] \tplkword{date} keyword.  Render the
 336.233 -  date as a pair of readable numbers.  Yields a string like
 336.234 -  ``\Verb+1157407993 25200+''.
 336.235 -\item[\tplkwfilt{date}{isodate}] \tplkword{date} keyword.  Render the
 336.236 -  date as a text string in ISO~8601 format.  Yields a string like
 336.237 -  ``\Verb+2006-09-04 15:13:13 -0700+''.
 336.238 -\item[\tplfilter{obfuscate}] Any text, but most useful for the
 336.239 -  \tplkword{author} keyword.  Yield the input text rendered as a
 336.240 -  sequence of XML entities.  This helps to defeat some particularly
 336.241 -  stupid screen-scraping email harvesting spambots.
 336.242 -\item[\tplkwfilt{author}{person}] Any text, but most useful for the
 336.243 -  \tplkword{author} keyword.  Yield the text before an email address.
 336.244 -  For example, ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+''
 336.245 -  becomes ``\Verb+Bryan O'Sullivan+''.
 336.246 -\item[\tplkwfilt{date}{rfc822date}] \tplkword{date} keyword.  Render a
 336.247 -  date using the same format used in email headers.  Yields a string
 336.248 -  like ``\Verb+Mon, 04 Sep 2006 15:13:13 -0700+''.
 336.249 -\item[\tplkwfilt{node}{short}] Changeset hash.  Yield the short form
 336.250 -  of a changeset hash, i.e.~a 12-character hexadecimal string.
 336.251 -\item[\tplkwfilt{date}{shortdate}] \tplkword{date} keyword.  Render
 336.252 -  the year, month, and day of the date.  Yields a string like
 336.253 -  ``\Verb+2006-09-04+''.
 336.254 -\item[\tplfilter{strip}] Any text.  Strip all leading and trailing
 336.255 -  whitespace from the string.
 336.256 -\item[\tplfilter{tabindent}] Any text.  Yield the text, with every line
 336.257 -  except the first starting with a tab character.
 336.258 -\item[\tplfilter{urlescape}] Any text.  Escape all characters that are
 336.259 -  considered ``special'' by URL parsers.  For example, \Verb+foo bar+
 336.260 -  becomes \Verb+foo%20bar+.
 336.261 -\item[\tplkwfilt{author}{user}] Any text, but most useful for the
 336.262 -  \tplkword{author} keyword.  Return the ``user'' portion of an email
 336.263 -  address.  For example,
 336.264 -  ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' becomes
 336.265 -  ``\Verb+bos+''.
 336.266 -\end{itemize}
 336.267 -
 336.268 -\begin{figure}
 336.269 -  \interaction{template.simple.manyfilters}
 336.270 -  \caption{Template filters in action}
 336.271 -  \label{fig:template:filters}
 336.272 -\end{figure}
 336.273 -
 336.274 -\begin{note}
 336.275 -  If you try to apply a filter to a piece of data that it cannot
 336.276 -  process, Mercurial will fail and print a Python exception.  For
 336.277 -  example, trying to run the output of the \tplkword{desc} keyword
 336.278 -  into the \tplkwfilt{date}{isodate} filter is not a good idea.
 336.279 -\end{note}
 336.280 -
 336.281 -\subsection{Combining filters}
 336.282 -
 336.283 -It is easy to combine filters to yield output in the form you would
 336.284 -like.  The following chain of filters tidies up a description, then
 336.285 -makes sure that it fits cleanly into 68 columns, then indents it by a
 336.286 -further 8~characters (at least on Unix-like systems, where a tab is
 336.287 -conventionally 8~characters wide).
 336.288 -
 336.289 -\interaction{template.simple.combine}
 336.290 -
 336.291 -Note the use of ``\Verb+\t+'' (a tab character) in the template to
 336.292 -force the first line to be indented; this is necessary since
 336.293 -\tplkword{tabindent} indents all lines \emph{except} the first.
 336.294 -
 336.295 -Keep in mind that the order of filters in a chain is significant.  The
 336.296 -first filter is applied to the result of the keyword; the second to
 336.297 -the result of the first filter; and so on.  For example, using
 336.298 -\Verb+fill68|tabindent+ gives very different results from
 336.299 -\Verb+tabindent|fill68+.
 336.300 -
 336.301 -
 336.302 -\section{From templates to styles}
 336.303 -
 336.304 -A command line template provides a quick and simple way to format some
 336.305 -output.  Templates can become verbose, though, and it's useful to be
 336.306 -able to give a template a name.  A style file is a template with a
 336.307 -name, stored in a file.
 336.308 -
 336.309 -More than that, using a style file unlocks the power of Mercurial's
 336.310 -templating engine in ways that are not possible using the command line
 336.311 -\hgopt{log}{--template} option.
 336.312 -
 336.313 -\subsection{The simplest of style files}
 336.314 -
 336.315 -Our simple style file contains just one line:
 336.316 -
 336.317 -\interaction{template.simple.rev}
 336.318 -
 336.319 -This tells Mercurial, ``if you're printing a changeset, use the text
 336.320 -on the right as the template''.
 336.321 -
 336.322 -\subsection{Style file syntax}
 336.323 -
 336.324 -The syntax rules for a style file are simple.
 336.325 -
 336.326 -\begin{itemize}
 336.327 -\item The file is processed one line at a time.
 336.328 -
 336.329 -\item Leading and trailing white space are ignored.
 336.330 -
 336.331 -\item Empty lines are skipped.
 336.332 -
 336.333 -\item If a line starts with either of the characters ``\texttt{\#}'' or
 336.334 -  ``\texttt{;}'', the entire line is treated as a comment, and skipped
 336.335 -  as if empty.
 336.336 -
 336.337 -\item A line starts with a keyword.  This must start with an
 336.338 -  alphabetic character or underscore, and can subsequently contain any
 336.339 -  alphanumeric character or underscore.  (In regexp notation, a
 336.340 -  keyword must match \Verb+[A-Za-z_][A-Za-z0-9_]*+.)
 336.341 -
 336.342 -\item The next element must be an ``\texttt{=}'' character, which can
 336.343 -  be preceded or followed by an arbitrary amount of white space.
 336.344 -
 336.345 -\item If the rest of the line starts and ends with matching quote
 336.346 -  characters (either single or double quote), it is treated as a
 336.347 -  template body.
 336.348 -
 336.349 -\item If the rest of the line \emph{does not} start with a quote
 336.350 -  character, it is treated as the name of a file; the contents of this
 336.351 -  file will be read and used as a template body.
 336.352 -\end{itemize}
 336.353 -
 336.354 -\section{Style files by example}
 336.355 -
 336.356 -To illustrate how to write a style file, we will construct a few by
 336.357 -example.  Rather than provide a complete style file and walk through
 336.358 -it, we'll mirror the usual process of developing a style file by
 336.359 -starting with something very simple, and walking through a series of
 336.360 -successively more complete examples.
 336.361 -
 336.362 -\subsection{Identifying mistakes in style files}
 336.363 -
 336.364 -If Mercurial encounters a problem in a style file you are working on,
 336.365 -it prints a terse error message that, once you figure out what it
 336.366 -means, is actually quite useful.
 336.367 -
 336.368 -\interaction{template.svnstyle.syntax.input}
 336.369 -
 336.370 -Notice that \filename{broken.style} attempts to define a
 336.371 -\texttt{changeset} keyword, but forgets to give any content for it.
 336.372 -When instructed to use this style file, Mercurial promptly complains.
 336.373 -
 336.374 -\interaction{template.svnstyle.syntax.error}
 336.375 -
 336.376 -This error message looks intimidating, but it is not too hard to
 336.377 -follow.
 336.378 -
 336.379 -\begin{itemize}
 336.380 -\item The first component is simply Mercurial's way of saying ``I am
 336.381 -  giving up''.
 336.382 -  \begin{codesample4}
 336.383 -    \textbf{abort:} broken.style:1: parse error
 336.384 -  \end{codesample4}
 336.385 -
 336.386 -\item Next comes the name of the style file that contains the error.
 336.387 -  \begin{codesample4}
 336.388 -    abort: \textbf{broken.style}:1: parse error
 336.389 -  \end{codesample4}
 336.390 -
 336.391 -\item Following the file name is the line number where the error was
 336.392 -  encountered.
 336.393 -  \begin{codesample4}
 336.394 -    abort: broken.style:\textbf{1}: parse error
 336.395 -  \end{codesample4}
 336.396 -
 336.397 -\item Finally, a description of what went wrong.
 336.398 -  \begin{codesample4}
 336.399 -    abort: broken.style:1: \textbf{parse error}
 336.400 -  \end{codesample4}
 336.401 -  The description of the problem is not always clear (as in this
 336.402 -  case), but even when it is cryptic, it is almost always trivial to
 336.403 -  visually inspect the offending line in the style file and see what
 336.404 -  is wrong.
 336.405 -\end{itemize}
 336.406 -
 336.407 -\subsection{Uniquely identifying a repository}
 336.408 -
 336.409 -If you would like to be able to identify a Mercurial repository
 336.410 -``fairly uniquely'' using a short string as an identifier, you can
 336.411 -use the first revision in the repository.
 336.412 -\interaction{template.svnstyle.id} 
 336.413 -This is not guaranteed to be unique, but it is nevertheless useful in
 336.414 -many cases.
 336.415 -\begin{itemize}
 336.416 -\item It will not work in a completely empty repository, because such
 336.417 -  a repository does not have a revision~zero.
 336.418 -\item Neither will it work in the (extremely rare) case where a
 336.419 -  repository is a merge of two or more formerly independent
 336.420 -  repositories, and you still have those repositories around.
 336.421 -\end{itemize}
 336.422 -Here are some uses to which you could put this identifier:
 336.423 -\begin{itemize}
 336.424 -\item As a key into a table for a database that manages repositories
 336.425 -  on a server.
 336.426 -\item As half of a \{\emph{repository~ID}, \emph{revision~ID}\} tuple.
 336.427 -  Save this information away when you run an automated build or other
 336.428 -  activity, so that you can ``replay'' the build later if necessary.
 336.429 -\end{itemize}
 336.430 -
 336.431 -\subsection{Mimicking Subversion's output}
 336.432 -
 336.433 -Let's try to emulate the default output format used by another
 336.434 -revision control tool, Subversion.
 336.435 -\interaction{template.svnstyle.short}
 336.436 -
 336.437 -Since Subversion's output style is fairly simple, it is easy to
 336.438 -copy-and-paste a hunk of its output into a file, and replace the text
 336.439 -produced above by Subversion with the template values we'd like to see
 336.440 -expanded.
 336.441 -\interaction{template.svnstyle.template}
 336.442 -
 336.443 -There are a few small ways in which this template deviates from the
 336.444 -output produced by Subversion.
 336.445 -\begin{itemize}
 336.446 -\item Subversion prints a ``readable'' date (the ``\texttt{Wed, 27 Sep
 336.447 -    2006}'' in the example output above) in parentheses.  Mercurial's
 336.448 -  templating engine does not provide a way to display a date in this
 336.449 -  format without also printing the time and time zone.
 336.450 -\item We emulate Subversion's printing of ``separator'' lines full of
 336.451 -  ``\texttt{-}'' characters by ending the template with such a line.
 336.452 -  We use the templating engine's \tplkword{header} keyword to print a
 336.453 -  separator line as the first line of output (see below), thus
 336.454 -  achieving similar output to Subversion.
 336.455 -\item Subversion's output includes a count in the header of the number
 336.456 -  of lines in the commit message.  We cannot replicate this in
 336.457 -  Mercurial; the templating engine does not currently provide a filter
 336.458 -  that counts the number of lines the template generates.
 336.459 -\end{itemize}
 336.460 -It took me no more than a minute or two of work to replace literal
 336.461 -text from an example of Subversion's output with some keywords and
 336.462 -filters to give the template above.  The style file simply refers to
 336.463 -the template.
 336.464 -\interaction{template.svnstyle.style}
 336.465 -
 336.466 -We could have included the text of the template file directly in the
 336.467 -style file by enclosing it in quotes and replacing the newlines with
 336.468 -``\verb!\n!'' sequences, but it would have made the style file too
 336.469 -difficult to read.  Readability is a good guide when you're trying to
 336.470 -decide whether some text belongs in a style file, or in a template
 336.471 -file that the style file points to.  If the style file will look too
 336.472 -big or cluttered if you insert a literal piece of text, drop it into a
 336.473 -template instead.
 336.474 -
 336.475 -%%% Local Variables: 
 336.476 -%%% mode: latex
 336.477 -%%% TeX-master: "00book"
 336.478 -%%% End: 
   337.1 --- a/en/tour-basic.tex	Thu Mar 26 08:57:10 2009 +0100
   337.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   337.3 @@ -1,624 +0,0 @@
   337.4 -\chapter{A tour of Mercurial: the basics}
   337.5 -\label{chap:tour-basic}
   337.6 -
   337.7 -\section{Installing Mercurial on your system}
   337.8 -\label{sec:tour:install}
   337.9 -
  337.10 -Prebuilt binary packages of Mercurial are available for every popular
  337.11 -operating system.  These make it easy to start using Mercurial on your
  337.12 -computer immediately.
  337.13 -
  337.14 -\subsection{Linux}
  337.15 -
  337.16 -Because each Linux distribution has its own packaging tools, policies,
  337.17 -and rate of development, it's difficult to give a comprehensive set of
  337.18 -instructions on how to install Mercurial binaries.  The version of
  337.19 -Mercurial that you will end up with can vary depending on how active
  337.20 -the person is who maintains the package for your distribution.
  337.21 -
  337.22 -To keep things simple, I will focus on installing Mercurial from the
  337.23 -command line under the most popular Linux distributions.  Most of
  337.24 -these distributions provide graphical package managers that will let
  337.25 -you install Mercurial with a single click; the package name to look
  337.26 -for is \texttt{mercurial}.
  337.27 -
  337.28 -\begin{itemize}
  337.29 -\item[Debian]
  337.30 -  \begin{codesample4}
  337.31 -    apt-get install mercurial
  337.32 -  \end{codesample4}
  337.33 -
  337.34 -\item[Fedora Core]
  337.35 -  \begin{codesample4}
  337.36 -    yum install mercurial
  337.37 -  \end{codesample4}
  337.38 -
  337.39 -\item[Gentoo]
  337.40 -  \begin{codesample4}
  337.41 -    emerge mercurial
  337.42 -  \end{codesample4}
  337.43 -
  337.44 -\item[OpenSUSE]
  337.45 -  \begin{codesample4}
  337.46 -    yum install mercurial
  337.47 -  \end{codesample4}
  337.48 -
  337.49 -\item[Ubuntu] Ubuntu's Mercurial package is based on Debian's.  To
  337.50 -  install it, run the following command.
  337.51 -  \begin{codesample4}
  337.52 -    apt-get install mercurial
  337.53 -  \end{codesample4}
  337.54 -  The Ubuntu package for Mercurial tends to lag behind the Debian
  337.55 -  version by a considerable time margin (at the time of writing, seven
  337.56 -  months), which in some cases will mean that on Ubuntu, you may run
  337.57 -  into problems that have since been fixed in the Debian package.
  337.58 -\end{itemize}
  337.59 -
  337.60 -\subsection{Solaris}
  337.61 -
  337.62 -SunFreeWare, at \url{http://www.sunfreeware.com}, is a good source for a
  337.63 -large number of pre-built Solaris packages for 32 and 64 bit Intel and
  337.64 -Sparc architectures, including current versions of Mercurial.
  337.65 -
  337.66 -\subsection{Mac OS X}
  337.67 -
  337.68 -Lee Cantey publishes an installer of Mercurial for Mac OS~X at
  337.69 -\url{http://mercurial.berkwood.com}.  This package works on both
  337.70 -Intel-~and Power-based Macs.  Before you can use it, you must install
  337.71 -a compatible version of Universal MacPython~\cite{web:macpython}.  This
  337.72 -is easy to do; simply follow the instructions on Lee's site.
  337.73 -
  337.74 -It's also possible to install Mercurial using Fink or MacPorts,
  337.75 -two popular free package managers for Mac OS X.  If you have Fink,
  337.76 -use \command{sudo fink install mercurial-py25}.  If MacPorts,
  337.77 -\command{sudo port install mercurial}.
  337.78 -
  337.79 -\subsection{Windows}
  337.80 -
  337.81 -Lee Cantey publishes an installer of Mercurial for Windows at
  337.82 -\url{http://mercurial.berkwood.com}.  This package has no external
  337.83 -dependencies; it ``just works''.
  337.84 -
  337.85 -\begin{note}
  337.86 -  The Windows version of Mercurial does not automatically convert line
  337.87 -  endings between Windows and Unix styles.  If you want to share work
  337.88 -  with Unix users, you must do a little additional configuration
  337.89 -  work. XXX Flesh this out.
  337.90 -\end{note}
  337.91 -
  337.92 -\section{Getting started}
  337.93 -
  337.94 -To begin, we'll use the \hgcmd{version} command to find out whether
  337.95 -Mercurial is actually installed properly.  The actual version
  337.96 -information that it prints isn't so important; it's whether it prints
  337.97 -anything at all that we care about.
  337.98 -\interaction{tour.version}
  337.99 -
 337.100 -\subsection{Built-in help}
 337.101 -
 337.102 -Mercurial provides a built-in help system.  This is invaluable for those
 337.103 -times when you find yourself stuck trying to remember how to run a
 337.104 -command.  If you are completely stuck, simply run \hgcmd{help}; it
 337.105 -will print a brief list of commands, along with a description of what
 337.106 -each does.  If you ask for help on a specific command (as below), it
 337.107 -prints more detailed information.
 337.108 -\interaction{tour.help}
 337.109 -For a more impressive level of detail (which you won't usually need)
 337.110 -run \hgcmdargs{help}{\hggopt{-v}}.  The \hggopt{-v} option is short
 337.111 -for \hggopt{--verbose}, and tells Mercurial to print more information
 337.112 -than it usually would.
 337.113 -
 337.114 -\section{Working with a repository}
 337.115 -
 337.116 -In Mercurial, everything happens inside a \emph{repository}.  The
 337.117 -repository for a project contains all of the files that ``belong to''
 337.118 -that project, along with a historical record of the project's files.
 337.119 -
 337.120 -There's nothing particularly magical about a repository; it is simply
 337.121 -a directory tree in your filesystem that Mercurial treats as special.
 337.122 -You can rename or delete a repository any time you like, using either the
 337.123 -command line or your file browser.
 337.124 -
 337.125 -\subsection{Making a local copy of a repository}
 337.126 -
 337.127 -\emph{Copying} a repository is just a little bit special.  While you
 337.128 -could use a normal file copying command to make a copy of a
 337.129 -repository, it's best to use a built-in command that Mercurial
 337.130 -provides.  This command is called \hgcmd{clone}, because it creates an
 337.131 -identical copy of an existing repository.
 337.132 -\interaction{tour.clone}
 337.133 -If our clone succeeded, we should now have a local directory called
 337.134 -\dirname{hello}.  This directory will contain some files.
 337.135 -\interaction{tour.ls}
 337.136 -These files have the same contents and history in our repository as
 337.137 -they do in the repository we cloned.
 337.138 -
 337.139 -Every Mercurial repository is complete, self-contained, and
 337.140 -independent.  It contains its own private copy of a project's files
 337.141 -and history.  A cloned repository remembers the location of the
 337.142 -repository it was cloned from, but it does not communicate with that
 337.143 -repository, or any other, unless you tell it to.
 337.144 -
 337.145 -What this means for now is that we're free to experiment with our
 337.146 -repository, safe in the knowledge that it's a private ``sandbox'' that
 337.147 -won't affect anyone else.
 337.148 -
 337.149 -\subsection{What's in a repository?}
 337.150 -
 337.151 -When we take a more detailed look inside a repository, we can see that
 337.152 -it contains a directory named \dirname{.hg}.  This is where Mercurial
 337.153 -keeps all of its metadata for the repository.
 337.154 -\interaction{tour.ls-a}
 337.155 -
 337.156 -The contents of the \dirname{.hg} directory and its subdirectories are
 337.157 -private to Mercurial.  Every other file and directory in the
 337.158 -repository is yours to do with as you please.
 337.159 -
 337.160 -To introduce a little terminology, the \dirname{.hg} directory is the
 337.161 -``real'' repository, and all of the files and directories that coexist
 337.162 -with it are said to live in the \emph{working directory}.  An easy way
 337.163 -to remember the distinction is that the \emph{repository} contains the
 337.164 -\emph{history} of your project, while the \emph{working directory}
 337.165 -contains a \emph{snapshot} of your project at a particular point in
 337.166 -history.
 337.167 -
 337.168 -\section{A tour through history}
 337.169 -
 337.170 -One of the first things we might want to do with a new, unfamiliar
 337.171 -repository is understand its history.  The \hgcmd{log} command gives
 337.172 -us a view of history.
 337.173 -\interaction{tour.log}
 337.174 -By default, this command prints a brief paragraph of output for each
 337.175 -change to the project that was recorded.  In Mercurial terminology, we
 337.176 -call each of these recorded events a \emph{changeset}, because it can
 337.177 -contain a record of changes to several files.
 337.178 -
 337.179 -The fields in a record of output from \hgcmd{log} are as follows.
 337.180 -\begin{itemize}
 337.181 -\item[\texttt{changeset}] This field has the format of a number,
 337.182 -  followed by a colon, followed by a hexadecimal string.  These are
 337.183 -  \emph{identifiers} for the changeset.  There are two identifiers
 337.184 -  because the number is shorter and easier to type than the hex
 337.185 -  string.
 337.186 -\item[\texttt{user}] The identity of the person who created the
 337.187 -  changeset.  This is a free-form field, but it most often contains a
 337.188 -  person's name and email address.
 337.189 -\item[\texttt{date}] The date and time on which the changeset was
 337.190 -  created, and the timezone in which it was created.  (The date and
 337.191 -  time are local to that timezone; they display what time and date it
 337.192 -  was for the person who created the changeset.)
 337.193 -\item[\texttt{summary}] The first line of the text message that the
 337.194 -  creator of the changeset entered to describe the changeset.
 337.195 -\end{itemize}
 337.196 -The default output printed by \hgcmd{log} is purely a summary; it is
 337.197 -missing a lot of detail.
 337.198 -
 337.199 -Figure~\ref{fig:tour-basic:history} provides a graphical representation of
 337.200 -the history of the \dirname{hello} repository, to make it a little
 337.201 -easier to see which direction history is ``flowing'' in.  We'll be
 337.202 -returning to this figure several times in this chapter and the chapter
 337.203 -that follows.
 337.204 -
 337.205 -\begin{figure}[ht]
 337.206 -  \centering
 337.207 -  \grafix{tour-history}
 337.208 -  \caption{Graphical history of the \dirname{hello} repository}
 337.209 -  \label{fig:tour-basic:history}
 337.210 -\end{figure}
 337.211 -
 337.212 -\subsection{Changesets, revisions, and talking to other 
 337.213 -  people}
 337.214 -
 337.215 -As English is a notoriously sloppy language, and computer science has
 337.216 -a hallowed history of terminological confusion (why use one term when
 337.217 -four will do?), revision control has a variety of words and phrases
 337.218 -that mean the same thing.  If you are talking about Mercurial history
 337.219 -with other people, you will find that the word ``changeset'' is often
 337.220 -compressed to ``change'' or (when written) ``cset'', and sometimes a
 337.221 -changeset is referred to as a ``revision'' or a ``rev''.
 337.222 -
 337.223 -While it doesn't matter what \emph{word} you use to refer to the
 337.224 -concept of ``a~changeset'', the \emph{identifier} that you use to
 337.225 -refer to ``a~\emph{specific} changeset'' is of great importance.
 337.226 -Recall that the \texttt{changeset} field in the output from
 337.227 -\hgcmd{log} identifies a changeset using both a number and a
 337.228 -hexadecimal string.
 337.229 -\begin{itemize}
 337.230 -\item The revision number is \emph{only valid in that repository},
 337.231 -\item while the hex string is the \emph{permanent, unchanging
 337.232 -    identifier} that will always identify that exact changeset in
 337.233 -  \emph{every} copy of the repository.
 337.234 -\end{itemize}
 337.235 -This distinction is important.  If you send someone an email talking
 337.236 -about ``revision~33'', there's a high likelihood that their
 337.237 -revision~33 will \emph{not be the same} as yours.  The reason for this
 337.238 -is that a revision number depends on the order in which changes
 337.239 -arrived in a repository, and there is no guarantee that the same
 337.240 -changes will happen in the same order in different repositories.
 337.241 -Three changes $a,b,c$ can easily appear in one repository as $0,1,2$,
 337.242 -while in another as $1,0,2$.
 337.243 -
 337.244 -Mercurial uses revision numbers purely as a convenient shorthand.  If
 337.245 -you need to discuss a changeset with someone, or make a record of a
 337.246 -changeset for some other reason (for example, in a bug report), use
 337.247 -the hexadecimal identifier.
 337.248 -
 337.249 -\subsection{Viewing specific revisions}
 337.250 -
 337.251 -To narrow the output of \hgcmd{log} down to a single revision, use the
 337.252 -\hgopt{log}{-r} (or \hgopt{log}{--rev}) option.  You can use either a
 337.253 -revision number or a long-form changeset identifier, and you can
 337.254 -provide as many revisions as you want.  \interaction{tour.log-r}
 337.255 -
 337.256 -If you want to see the history of several revisions without having to
 337.257 -list each one, you can use \emph{range notation}; this lets you
 337.258 -express the idea ``I want all revisions between $a$ and $b$,
 337.259 -inclusive''.
 337.260 -\interaction{tour.log.range}
 337.261 -Mercurial also honours the order in which you specify revisions, so
 337.262 -\hgcmdargs{log}{-r 2:4} prints $2,3,4$ while \hgcmdargs{log}{-r 4:2}
 337.263 -prints $4,3,2$.
 337.264 -
 337.265 -\subsection{More detailed information}
 337.266 -
 337.267 -While the summary information printed by \hgcmd{log} is useful if you
 337.268 -already know what you're looking for, you may need to see a complete
 337.269 -description of the change, or a list of the files changed, if you're
 337.270 -trying to decide whether a changeset is the one you're looking for.
 337.271 -The \hgcmd{log} command's \hggopt{-v} (or \hggopt{--verbose})
 337.272 -option gives you this extra detail.
 337.273 -\interaction{tour.log-v}
 337.274 -
 337.275 -If you want to see both the description and content of a change, add
 337.276 -the \hgopt{log}{-p} (or \hgopt{log}{--patch}) option.  This displays
 337.277 -the content of a change as a \emph{unified diff} (if you've never seen
 337.278 -a unified diff before, see section~\ref{sec:mq:patch} for an overview).
 337.279 -\interaction{tour.log-vp}
 337.280 -
 337.281 -\section{All about command options}
 337.282 -
 337.283 -Let's take a brief break from exploring Mercurial commands to discuss
 337.284 -a pattern in the way that they work; you may find this useful to keep
 337.285 -in mind as we continue our tour.
 337.286 -
 337.287 -Mercurial has a consistent and straightforward approach to dealing
 337.288 -with the options that you can pass to commands.  It follows the
 337.289 -conventions for options that are common to modern Linux and Unix
 337.290 -systems.
 337.291 -\begin{itemize}
 337.292 -\item Every option has a long name.  For example, as we've already
 337.293 -  seen, the \hgcmd{log} command accepts a \hgopt{log}{--rev} option.
 337.294 -\item Most options have short names, too.  Instead of
 337.295 -  \hgopt{log}{--rev}, we can use \hgopt{log}{-r}.  (The reason that
 337.296 -  some options don't have short names is that the options in question
 337.297 -  are rarely used.)
 337.298 -\item Long options start with two dashes (e.g.~\hgopt{log}{--rev}),
 337.299 -  while short options start with one (e.g.~\hgopt{log}{-r}).
 337.300 -\item Option naming and usage is consistent across commands.  For
 337.301 -  example, every command that lets you specify a changeset~ID or
 337.302 -  revision number accepts both \hgopt{log}{-r} and \hgopt{log}{--rev}
 337.303 -  arguments.
 337.304 -\end{itemize}
 337.305 -In the examples throughout this book, I use short options instead of
 337.306 -long.  This just reflects my own preference, so don't read anything
 337.307 -significant into it.
 337.308 -
 337.309 -Most commands that print output of some kind will print more output
 337.310 -when passed a \hggopt{-v} (or \hggopt{--verbose}) option, and less
 337.311 -when passed \hggopt{-q} (or \hggopt{--quiet}).
 337.312 -
 337.313 -\section{Making and reviewing changes}
 337.314 -
 337.315 -Now that we have a grasp of viewing history in Mercurial, let's take a
 337.316 -look at making some changes and examining them.
 337.317 -
 337.318 -The first thing we'll do is isolate our experiment in a repository of
 337.319 -its own.  We use the \hgcmd{clone} command, but we don't need to
 337.320 -clone a copy of the remote repository.  Since we already have a copy
 337.321 -of it locally, we can just clone that instead.  This is much faster
 337.322 -than cloning over the network, and cloning a local repository uses
 337.323 -less disk space in most cases, too.
 337.324 -\interaction{tour.reclone}
 337.325 -As an aside, it's often good practice to keep a ``pristine'' copy of a
 337.326 -remote repository around, which you can then make temporary clones of
 337.327 -to create sandboxes for each task you want to work on.  This lets you
 337.328 -work on multiple tasks in parallel, each isolated from the others
 337.329 -until it's complete and you're ready to integrate it back.  Because
 337.330 -local clones are so cheap, there's almost no overhead to cloning and
 337.331 -destroying repositories whenever you want.
 337.332 -
 337.333 -In our \dirname{my-hello} repository, we have a file
 337.334 -\filename{hello.c} that contains the classic ``hello, world'' program.
 337.335 -Let's use the ancient and venerable \command{sed} command to edit this
 337.336 -file so that it prints a second line of output.  (I'm only using
 337.337 -\command{sed} to do this because it's easy to write a scripted example
 337.338 -this way.  Since you're not under the same constraint, you probably
 337.339 -won't want to use \command{sed}; simply use your preferred text editor to
 337.340 -do the same thing.)
 337.341 -\interaction{tour.sed}
 337.342 -
 337.343 -Mercurial's \hgcmd{status} command will tell us what Mercurial knows
 337.344 -about the files in the repository.
 337.345 -\interaction{tour.status}
 337.346 -The \hgcmd{status} command prints no output for some files, but a line
 337.347 -starting with ``\texttt{M}'' for \filename{hello.c}.  Unless you tell
 337.348 -it to, \hgcmd{status} will not print any output for files that have
 337.349 -not been modified.  
 337.350 -
 337.351 -The ``\texttt{M}'' indicates that Mercurial has noticed that we
 337.352 -modified \filename{hello.c}.  We didn't need to \emph{inform}
 337.353 -Mercurial that we were going to modify the file before we started, or
 337.354 -that we had modified the file after we were done; it was able to
 337.355 -figure this out itself.
 337.356 -
 337.357 -It's a little bit helpful to know that we've modified
 337.358 -\filename{hello.c}, but we might prefer to know exactly \emph{what}
 337.359 -changes we've made to it.  To do this, we use the \hgcmd{diff}
 337.360 -command.
 337.361 -\interaction{tour.diff}
 337.362 -
 337.363 -\section{Recording changes in a new changeset}
 337.364 -
 337.365 -We can modify files, build and test our changes, and use
 337.366 -\hgcmd{status} and \hgcmd{diff} to review our changes, until we're
 337.367 -satisfied with what we've done and arrive at a natural stopping point
 337.368 -where we want to record our work in a new changeset.
 337.369 -
 337.370 -The \hgcmd{commit} command lets us create a new changeset; we'll
 337.371 -usually refer to this as ``making a commit'' or ``committing''.  
 337.372 -
 337.373 -\subsection{Setting up a username}
 337.374 -
 337.375 -When you try to run \hgcmd{commit} for the first time, it is not
 337.376 -guaranteed to succeed.  Mercurial records your name and address with
 337.377 -each change that you commit, so that you and others will later be able
 337.378 -to tell who made each change.  Mercurial tries to automatically figure
 337.379 -out a sensible username to commit the change with.  It will attempt
 337.380 -each of the following methods, in order:
 337.381 -\begin{enumerate}
 337.382 -\item If you specify a \hgopt{commit}{-u} option to the \hgcmd{commit}
 337.383 -  command on the command line, followed by a username, this is always
 337.384 -  given the highest precedence.
 337.385 -\item If you have set the \envar{HGUSER} environment variable, this is
 337.386 -  checked next.
 337.387 -\item If you create a file in your home directory called
 337.388 -  \sfilename{.hgrc}, with a \rcitem{ui}{username} entry, that will be
 337.389 -  used next.  To see what the contents of this file should look like,
 337.390 -  refer to section~\ref{sec:tour-basic:username} below.
 337.391 -\item If you have set the \envar{EMAIL} environment variable, this
 337.392 -  will be used next.
 337.393 -\item Mercurial will query your system to find out your local user
 337.394 -  name and host name, and construct a username from these components.
 337.395 -  Since this often results in a username that is not very useful, it
 337.396 -  will print a warning if it has to do this.
 337.397 -\end{enumerate}
 337.398 -If all of these mechanisms fail, Mercurial will fail, printing an
 337.399 -error message.  In this case, it will not let you commit until you set
 337.400 -up a username.
 337.401 -
 337.402 -You should think of the \envar{HGUSER} environment variable and the
 337.403 -\hgopt{commit}{-u} option to the \hgcmd{commit} command as ways to
 337.404 -\emph{override} Mercurial's default selection of username.  For normal
 337.405 -use, the simplest and most robust way to set a username for yourself
 337.406 -is by creating a \sfilename{.hgrc} file; see below for details.
 337.407 -
 337.408 -\subsubsection{Creating a Mercurial configuration file}
 337.409 -\label{sec:tour-basic:username}
 337.410 -
 337.411 -To set a user name, use your favourite editor to create a file called
 337.412 -\sfilename{.hgrc} in your home directory.  Mercurial will use this
 337.413 -file to look up your personalised configuration settings.  The initial
 337.414 -contents of your \sfilename{.hgrc} should look like this.
 337.415 -\begin{codesample2}
 337.416 -  # This is a Mercurial configuration file.
 337.417 -  [ui]
 337.418 -  username = Firstname Lastname <email.address@domain.net>
 337.419 -\end{codesample2}
 337.420 -The ``\texttt{[ui]}'' line begins a \emph{section} of the config file,
 337.421 -so you can read the ``\texttt{username = ...}'' line as meaning ``set
 337.422 -the value of the \texttt{username} item in the \texttt{ui} section''.
 337.423 -A section continues until a new section begins, or the end of the
 337.424 -file.  Mercurial ignores empty lines and treats any text from
 337.425 -``\texttt{\#}'' to the end of a line as a comment.
 337.426 -
 337.427 -\subsubsection{Choosing a user name}
 337.428 -
 337.429 -You can use any text you like as the value of the \texttt{username}
 337.430 -config item, since this information is for reading by other people,
 337.431 -but for interpreting by Mercurial.  The convention that most people
 337.432 -follow is to use their name and email address, as in the example
 337.433 -above.
 337.434 -
 337.435 -\begin{note}
 337.436 -  Mercurial's built-in web server obfuscates email addresses, to make
 337.437 -  it more difficult for the email harvesting tools that spammers use.
 337.438 -  This reduces the likelihood that you'll start receiving more junk
 337.439 -  email if you publish a Mercurial repository on the web.
 337.440 -\end{note}
 337.441 -
 337.442 -\subsection{Writing a commit message}
 337.443 -
 337.444 -When we commit a change, Mercurial drops us into a text editor, to
 337.445 -enter a message that will describe the modifications we've made in
 337.446 -this changeset.  This is called the \emph{commit message}.  It will be
 337.447 -a record for readers of what we did and why, and it will be printed by
 337.448 -\hgcmd{log} after we've finished committing.
 337.449 -\interaction{tour.commit}
 337.450 -
 337.451 -The editor that the \hgcmd{commit} command drops us into will contain
 337.452 -an empty line, followed by a number of lines starting with
 337.453 -``\texttt{HG:}''.
 337.454 -\begin{codesample2}
 337.455 -  \emph{empty line}
 337.456 -  HG: changed hello.c
 337.457 -\end{codesample2}
 337.458 -Mercurial ignores the lines that start with ``\texttt{HG:}''; it uses
 337.459 -them only to tell us which files it's recording changes to.  Modifying
 337.460 -or deleting these lines has no effect.
 337.461 -
 337.462 -\subsection{Writing a good commit message}
 337.463 -
 337.464 -Since \hgcmd{log} only prints the first line of a commit message by
 337.465 -default, it's best to write a commit message whose first line stands
 337.466 -alone.  Here's a real example of a commit message that \emph{doesn't}
 337.467 -follow this guideline, and hence has a summary that is not readable.
 337.468 -\begin{codesample2}
 337.469 -  changeset:   73:584af0e231be
 337.470 -  user:        Censored Person <censored.person@example.org>
 337.471 -  date:        Tue Sep 26 21:37:07 2006 -0700
 337.472 -  summary:     include buildmeister/commondefs.   Add an exports and install
 337.473 -\end{codesample2}
 337.474 -
 337.475 -As far as the remainder of the contents of the commit message are
 337.476 -concerned, there are no hard-and-fast rules.  Mercurial itself doesn't
 337.477 -interpret or care about the contents of the commit message, though
 337.478 -your project may have policies that dictate a certain kind of
 337.479 -formatting.
 337.480 -
 337.481 -My personal preference is for short, but informative, commit messages
 337.482 -that tell me something that I can't figure out with a quick glance at
 337.483 -the output of \hgcmdargs{log}{--patch}.
 337.484 -
 337.485 -\subsection{Aborting a commit}
 337.486 -
 337.487 -If you decide that you don't want to commit while in the middle of
 337.488 -editing a commit message, simply exit from your editor without saving
 337.489 -the file that it's editing.  This will cause nothing to happen to
 337.490 -either the repository or the working directory.
 337.491 -
 337.492 -If we run the \hgcmd{commit} command without any arguments, it records
 337.493 -all of the changes we've made, as reported by \hgcmd{status} and
 337.494 -\hgcmd{diff}.
 337.495 -
 337.496 -\subsection{Admiring our new handiwork}
 337.497 -
 337.498 -Once we've finished the commit, we can use the \hgcmd{tip} command to
 337.499 -display the changeset we just created.  This command produces output
 337.500 -that is identical to \hgcmd{log}, but it only displays the newest
 337.501 -revision in the repository.
 337.502 -\interaction{tour.tip}
 337.503 -We refer to the newest revision in the repository as the tip revision,
 337.504 -or simply the tip.
 337.505 -
 337.506 -\section{Sharing changes}
 337.507 -
 337.508 -We mentioned earlier that repositories in Mercurial are
 337.509 -self-contained.  This means that the changeset we just created exists
 337.510 -only in our \dirname{my-hello} repository.  Let's look at a few ways
 337.511 -that we can propagate this change into other repositories.
 337.512 -
 337.513 -\subsection{Pulling changes from another repository}
 337.514 -\label{sec:tour:pull}
 337.515 -
 337.516 -To get started, let's clone our original \dirname{hello} repository,
 337.517 -which does not contain the change we just committed.  We'll call our
 337.518 -temporary repository \dirname{hello-pull}.
 337.519 -\interaction{tour.clone-pull}
 337.520 -
 337.521 -We'll use the \hgcmd{pull} command to bring changes from
 337.522 -\dirname{my-hello} into \dirname{hello-pull}.  However, blindly
 337.523 -pulling unknown changes into a repository is a somewhat scary
 337.524 -prospect.  Mercurial provides the \hgcmd{incoming} command to tell us
 337.525 -what changes the \hgcmd{pull} command \emph{would} pull into the
 337.526 -repository, without actually pulling the changes in.
 337.527 -\interaction{tour.incoming}
 337.528 -(Of course, someone could cause more changesets to appear in the
 337.529 -repository that we ran \hgcmd{incoming} in, before we get a chance to
 337.530 -\hgcmd{pull} the changes, so that we could end up pulling changes that we
 337.531 -didn't expect.)
 337.532 -
 337.533 -Bringing changes into a repository is a simple matter of running the
 337.534 -\hgcmd{pull} command, and telling it which repository to pull from.
 337.535 -\interaction{tour.pull}
 337.536 -As you can see from the before-and-after output of \hgcmd{tip}, we
 337.537 -have successfully pulled changes into our repository.  There remains
 337.538 -one step before we can see these changes in the working directory.
 337.539 -
 337.540 -\subsection{Updating the working directory}
 337.541 -
 337.542 -We have so far glossed over the relationship between a repository and
 337.543 -its working directory.  The \hgcmd{pull} command that we ran in
 337.544 -section~\ref{sec:tour:pull} brought changes into the repository, but
 337.545 -if we check, there's no sign of those changes in the working
 337.546 -directory.  This is because \hgcmd{pull} does not (by default) touch
 337.547 -the working directory.  Instead, we use the \hgcmd{update} command to
 337.548 -do this.
 337.549 -\interaction{tour.update}
 337.550 -
 337.551 -It might seem a bit strange that \hgcmd{pull} doesn't update the
 337.552 -working directory automatically.  There's actually a good reason for
 337.553 -this: you can use \hgcmd{update} to update the working directory to
 337.554 -the state it was in at \emph{any revision} in the history of the
 337.555 -repository.  If you had the working directory updated to an old
 337.556 -revision---to hunt down the origin of a bug, say---and ran a
 337.557 -\hgcmd{pull} which automatically updated the working directory to a
 337.558 -new revision, you might not be terribly happy.
 337.559 -
 337.560 -However, since pull-then-update is such a common thing to do,
 337.561 -Mercurial lets you combine the two by passing the \hgopt{pull}{-u}
 337.562 -option to \hgcmd{pull}.
 337.563 -\begin{codesample2}
 337.564 -  hg pull -u
 337.565 -\end{codesample2}
 337.566 -If you look back at the output of \hgcmd{pull} in
 337.567 -section~\ref{sec:tour:pull} when we ran it without \hgopt{pull}{-u},
 337.568 -you can see that it printed a helpful reminder that we'd have to take
 337.569 -an explicit step to update the working directory:
 337.570 -\begin{codesample2}
 337.571 -  (run 'hg update' to get a working copy)
 337.572 -\end{codesample2}
 337.573 -
 337.574 -To find out what revision the working directory is at, use the
 337.575 -\hgcmd{parents} command.
 337.576 -\interaction{tour.parents}
 337.577 -If you look back at figure~\ref{fig:tour-basic:history}, you'll see
 337.578 -arrows connecting each changeset.  The node that the arrow leads
 337.579 -\emph{from} in each case is a parent, and the node that the arrow
 337.580 -leads \emph{to} is its child.  The working directory has a parent in
 337.581 -just the same way; this is the changeset that the working directory
 337.582 -currently contains.
 337.583 -
 337.584 -To update the working directory to a particular revision, give a
 337.585 -revision number or changeset~ID to the \hgcmd{update} command.
 337.586 -\interaction{tour.older}
 337.587 -If you omit an explicit revision, \hgcmd{update} will update to the
 337.588 -tip revision, as shown by the second call to \hgcmd{update} in the
 337.589 -example above.
 337.590 -
 337.591 -\subsection{Pushing changes to another repository}
 337.592 -
 337.593 -Mercurial lets us push changes to another repository, from the
 337.594 -repository we're currently visiting.  As with the example of
 337.595 -\hgcmd{pull} above, we'll create a temporary repository to push our
 337.596 -changes into.
 337.597 -\interaction{tour.clone-push}
 337.598 -The \hgcmd{outgoing} command tells us what changes would be pushed
 337.599 -into another repository.
 337.600 -\interaction{tour.outgoing}
 337.601 -And the \hgcmd{push} command does the actual push.
 337.602 -\interaction{tour.push}
 337.603 -As with \hgcmd{pull}, the \hgcmd{push} command does not update the
 337.604 -working directory in the repository that it's pushing changes into.
 337.605 -(Unlike \hgcmd{pull}, \hgcmd{push} does not provide a \texttt{-u}
 337.606 -option that updates the other repository's working directory.)
 337.607 -
 337.608 -What happens if we try to pull or push changes and the receiving
 337.609 -repository already has those changes?  Nothing too exciting.
 337.610 -\interaction{tour.push.nothing}
 337.611 -
 337.612 -\subsection{Sharing changes over a network}
 337.613 -
 337.614 -The commands we have covered in the previous few sections are not
 337.615 -limited to working with local repositories.  Each works in exactly the
 337.616 -same fashion over a network connection; simply pass in a URL instead
 337.617 -of a local path.
 337.618 -\interaction{tour.outgoing.net}
 337.619 -In this example, we can see what changes we could push to the remote
 337.620 -repository, but the repository is understandably not set up to let
 337.621 -anonymous users push to it.
 337.622 -\interaction{tour.push.net}
 337.623 -
 337.624 -%%% Local Variables: 
 337.625 -%%% mode: latex
 337.626 -%%% TeX-master: "00book"
 337.627 -%%% End: 
   338.1 --- a/en/tour-history.svg	Thu Mar 26 08:57:10 2009 +0100
   338.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   338.3 @@ -1,289 +0,0 @@
   338.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   338.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   338.6 -<svg
   338.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   338.8 -   xmlns:cc="http://web.resource.org/cc/"
   338.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  338.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  338.11 -   xmlns="http://www.w3.org/2000/svg"
  338.12 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  338.13 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  338.14 -   width="744.09448819"
  338.15 -   height="1052.3622047"
  338.16 -   id="svg2"
  338.17 -   sodipodi:version="0.32"
  338.18 -   inkscape:version="0.44.1"
  338.19 -   sodipodi:docname="tour-history.svg">
  338.20 -  <defs
  338.21 -     id="defs4">
  338.22 -    <marker
  338.23 -       inkscape:stockid="Arrow1Mstart"
  338.24 -       orient="auto"
  338.25 -       refY="0.0"
  338.26 -       refX="0.0"
  338.27 -       id="Arrow1Mstart"
  338.28 -       style="overflow:visible">
  338.29 -      <path
  338.30 -         id="path2973"
  338.31 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  338.32 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  338.33 -         transform="scale(0.4) translate(10,0)" />
  338.34 -    </marker>
  338.35 -    <marker
  338.36 -       inkscape:stockid="Arrow1Mend"
  338.37 -       orient="auto"
  338.38 -       refY="0.0"
  338.39 -       refX="0.0"
  338.40 -       id="Arrow1Mend"
  338.41 -       style="overflow:visible;">
  338.42 -      <path
  338.43 -         id="path3066"
  338.44 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  338.45 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  338.46 -         transform="scale(0.4) rotate(180) translate(10,0)" />
  338.47 -    </marker>
  338.48 -  </defs>
  338.49 -  <sodipodi:namedview
  338.50 -     id="base"
  338.51 -     pagecolor="#ffffff"
  338.52 -     bordercolor="#666666"
  338.53 -     borderopacity="1.0"
  338.54 -     gridtolerance="10000"
  338.55 -     guidetolerance="10"
  338.56 -     objecttolerance="10"
  338.57 -     inkscape:pageopacity="0.0"
  338.58 -     inkscape:pageshadow="2"
  338.59 -     inkscape:zoom="1.4"
  338.60 -     inkscape:cx="232.14286"
  338.61 -     inkscape:cy="672.75296"
  338.62 -     inkscape:document-units="px"
  338.63 -     inkscape:current-layer="layer1"
  338.64 -     inkscape:window-width="906"
  338.65 -     inkscape:window-height="620"
  338.66 -     inkscape:window-x="5"
  338.67 -     inkscape:window-y="49" />
  338.68 -  <metadata
  338.69 -     id="metadata7">
  338.70 -    <rdf:RDF>
  338.71 -      <cc:Work
  338.72 -         rdf:about="">
  338.73 -        <dc:format>image/svg+xml</dc:format>
  338.74 -        <dc:type
  338.75 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  338.76 -      </cc:Work>
  338.77 -    </rdf:RDF>
  338.78 -  </metadata>
  338.79 -  <g
  338.80 -     inkscape:label="Layer 1"
  338.81 -     inkscape:groupmode="layer"
  338.82 -     id="layer1">
  338.83 -    <rect
  338.84 -       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
  338.85 -       id="rect1878"
  338.86 -       width="94.285713"
  338.87 -       height="20.714285"
  338.88 -       x="138"
  338.89 -       y="479.50504" />
  338.90 -    <text
  338.91 -       xml:space="preserve"
  338.92 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
  338.93 -       x="162.09892"
  338.94 -       y="493.12619"
  338.95 -       id="text1872"><tspan
  338.96 -         sodipodi:role="line"
  338.97 -         id="tspan1874"
  338.98 -         x="162.09892"
  338.99 -         y="493.12619"
 338.100 -         style="font-family:Courier"><tspan
 338.101 -   style="font-weight:bold"
 338.102 -   id="tspan1876">0</tspan>: REV0</tspan></text>
 338.103 -    <rect
 338.104 -       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 338.105 -       id="rect2800"
 338.106 -       width="94.285713"
 338.107 -       height="20.714285"
 338.108 -       x="138"
 338.109 -       y="432.63004" />
 338.110 -    <text
 338.111 -       xml:space="preserve"
 338.112 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 338.113 -       x="162.09892"
 338.114 -       y="446.25119"
 338.115 -       id="text2794"><tspan
 338.116 -         sodipodi:role="line"
 338.117 -         id="tspan2796"
 338.118 -         x="162.09892"
 338.119 -         y="446.25119"
 338.120 -         style="font-family:Courier"><tspan
 338.121 -   id="tspan2868"
 338.122 -   style="font-weight:bold">1</tspan>: REV1</tspan></text>
 338.123 -    <rect
 338.124 -       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 338.125 -       id="rect2810"
 338.126 -       width="94.285713"
 338.127 -       height="20.714285"
 338.128 -       x="138"
 338.129 -       y="385.75504" />
 338.130 -    <text
 338.131 -       xml:space="preserve"
 338.132 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 338.133 -       x="162.09892"
 338.134 -       y="399.37619"
 338.135 -       id="text2804"><tspan
 338.136 -         sodipodi:role="line"
 338.137 -         id="tspan2806"
 338.138 -         x="162.09892"
 338.139 -         y="399.37619"
 338.140 -         style="font-family:Courier"><tspan
 338.141 -   style="font-weight:bold"
 338.142 -   id="tspan2866">2</tspan>: REV2</tspan></text>
 338.143 -    <rect
 338.144 -       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 338.145 -       id="rect2820"
 338.146 -       width="94.285713"
 338.147 -       height="20.714285"
 338.148 -       x="138"
 338.149 -       y="338.88007" />
 338.150 -    <text
 338.151 -       xml:space="preserve"
 338.152 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 338.153 -       x="162.09892"
 338.154 -       y="352.50122"
 338.155 -       id="text2814"><tspan
 338.156 -         sodipodi:role="line"
 338.157 -         id="tspan2816"
 338.158 -         x="162.09892"
 338.159 -         y="352.50122"
 338.160 -         style="font-family:Courier"><tspan
 338.161 -   style="font-weight:bold"
 338.162 -   id="tspan2864">3</tspan>: REV3</tspan></text>
 338.163 -    <rect
 338.164 -       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 338.165 -       id="rect2830"
 338.166 -       width="94.285713"
 338.167 -       height="20.714285"
 338.168 -       x="138"
 338.169 -       y="292.00504" />
 338.170 -    <text
 338.171 -       xml:space="preserve"
 338.172 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 338.173 -       x="162.09892"
 338.174 -       y="305.62619"
 338.175 -       id="text2824"><tspan
 338.176 -         sodipodi:role="line"
 338.177 -         id="tspan2826"
 338.178 -         x="162.09892"
 338.179 -         y="305.62619"
 338.180 -         style="font-family:Courier"><tspan
 338.181 -   style="font-weight:bold"
 338.182 -   id="tspan2862">4</tspan>: REV4</tspan></text>
 338.183 -    <text
 338.184 -       xml:space="preserve"
 338.185 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 338.186 -       x="173.57143"
 338.187 -       y="443.79074"
 338.188 -       id="text2832"><tspan
 338.189 -         sodipodi:role="line"
 338.190 -         id="tspan2834"
 338.191 -         x="173.57143"
 338.192 -         y="443.79074" /></text>
 338.193 -    <path
 338.194 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 338.195 -       d="M 185.14286,478.50504 L 185.14286,454.34432"
 338.196 -       id="path2894"
 338.197 -       inkscape:connector-type="polyline" />
 338.198 -    <path
 338.199 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 338.200 -       d="M 185.14286,431.63004 L 185.14286,407.46932"
 338.201 -       id="path2896"
 338.202 -       inkscape:connector-type="polyline" />
 338.203 -    <path
 338.204 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 338.205 -       d="M 185.14286,384.75504 L 185.14286,360.59435"
 338.206 -       id="path2898"
 338.207 -       inkscape:connector-type="polyline" />
 338.208 -    <path
 338.209 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 338.210 -       d="M 185.14286,337.88007 L 185.14286,313.71932"
 338.211 -       id="path2900"
 338.212 -       inkscape:connector-type="polyline" />
 338.213 -    <text
 338.214 -       xml:space="preserve"
 338.215 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times"
 338.216 -       x="244.60992"
 338.217 -       y="305.245"
 338.218 -       id="text1902"><tspan
 338.219 -         sodipodi:role="line"
 338.220 -         id="tspan1904"
 338.221 -         x="244.60992"
 338.222 -         y="305.245">(newest)</tspan></text>
 338.223 -    <text
 338.224 -       xml:space="preserve"
 338.225 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times"
 338.226 -       x="244.60992"
 338.227 -       y="492.745"
 338.228 -       id="text1906"><tspan
 338.229 -         sodipodi:role="line"
 338.230 -         id="tspan1908"
 338.231 -         x="244.60992"
 338.232 -         y="492.745">(oldest)</tspan></text>
 338.233 -    <rect
 338.234 -       style="opacity:1;fill:#d2e1e4;fill-opacity:1;stroke:#b1cbd0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 338.235 -       id="rect1907"
 338.236 -       width="94.285713"
 338.237 -       height="20.714285"
 338.238 -       x="309.28571"
 338.239 -       y="324.86218" />
 338.240 -    <text
 338.241 -       xml:space="preserve"
 338.242 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 338.243 -       x="333.38464"
 338.244 -       y="338.48334"
 338.245 -       id="text1909"><tspan
 338.246 -         sodipodi:role="line"
 338.247 -         id="tspan1911"
 338.248 -         x="333.38464"
 338.249 -         y="338.48334"
 338.250 -         style="font-family:Courier"><tspan
 338.251 -   style="font-weight:bold"
 338.252 -   id="tspan1913">4</tspan>: REV4</tspan></text>
 338.253 -    <path
 338.254 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 338.255 -       d="M 332.14286,375.21932 L 335.71429,347.36218"
 338.256 -       id="path2802" />
 338.257 -    <path
 338.258 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 338.259 -       d="M 372.69968,375.21932 L 369.12825,347.36218"
 338.260 -       id="path2986" />
 338.261 -    <text
 338.262 -       xml:space="preserve"
 338.263 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times"
 338.264 -       x="335.14285"
 338.265 -       y="387.21933"
 338.266 -       id="text2988"><tspan
 338.267 -         sodipodi:role="line"
 338.268 -         x="335.14285"
 338.269 -         y="387.21933"
 338.270 -         id="tspan3020"
 338.271 -         style="text-align:end;text-anchor:end">revision</tspan><tspan
 338.272 -         sodipodi:role="line"
 338.273 -         x="335.14285"
 338.274 -         y="402.21933"
 338.275 -         id="tspan3014"
 338.276 -         style="text-align:end;text-anchor:end">number</tspan></text>
 338.277 -    <text
 338.278 -       xml:space="preserve"
 338.279 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times"
 338.280 -       x="368.71429"
 338.281 -       y="387.21933"
 338.282 -       id="text2994"><tspan
 338.283 -         sodipodi:role="line"
 338.284 -         id="tspan2996"
 338.285 -         x="368.71429"
 338.286 -         y="387.21933">changeset</tspan><tspan
 338.287 -         sodipodi:role="line"
 338.288 -         x="368.71429"
 338.289 -         y="402.21933"
 338.290 -         id="tspan2998">identifier</tspan></text>
 338.291 -  </g>
 338.292 -</svg>
   339.1 --- a/en/tour-merge-conflict.svg	Thu Mar 26 08:57:10 2009 +0100
   339.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   339.3 @@ -1,210 +0,0 @@
   339.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   339.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   339.6 -<svg
   339.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   339.8 -   xmlns:cc="http://web.resource.org/cc/"
   339.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  339.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  339.11 -   xmlns="http://www.w3.org/2000/svg"
  339.12 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  339.13 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  339.14 -   width="744.09448819"
  339.15 -   height="1052.3622047"
  339.16 -   id="svg2"
  339.17 -   sodipodi:version="0.32"
  339.18 -   inkscape:version="0.44.1"
  339.19 -   sodipodi:docname="tour-merge-conflict.svg">
  339.20 -  <defs
  339.21 -     id="defs4">
  339.22 -    <marker
  339.23 -       inkscape:stockid="Arrow1Mend"
  339.24 -       orient="auto"
  339.25 -       refY="0.0"
  339.26 -       refX="0.0"
  339.27 -       id="Arrow1Mend"
  339.28 -       style="overflow:visible;">
  339.29 -      <path
  339.30 -         id="path3053"
  339.31 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  339.32 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  339.33 -         transform="scale(0.4) rotate(180) translate(10,0)" />
  339.34 -    </marker>
  339.35 -  </defs>
  339.36 -  <sodipodi:namedview
  339.37 -     id="base"
  339.38 -     pagecolor="#ffffff"
  339.39 -     bordercolor="#666666"
  339.40 -     borderopacity="1.0"
  339.41 -     gridtolerance="10000"
  339.42 -     guidetolerance="10"
  339.43 -     objecttolerance="10"
  339.44 -     inkscape:pageopacity="0.0"
  339.45 -     inkscape:pageshadow="2"
  339.46 -     inkscape:zoom="1.4"
  339.47 -     inkscape:cx="164.78349"
  339.48 -     inkscape:cy="590.07679"
  339.49 -     inkscape:document-units="px"
  339.50 -     inkscape:current-layer="layer1"
  339.51 -     inkscape:window-width="906"
  339.52 -     inkscape:window-height="620"
  339.53 -     inkscape:window-x="5"
  339.54 -     inkscape:window-y="49" />
  339.55 -  <metadata
  339.56 -     id="metadata7">
  339.57 -    <rdf:RDF>
  339.58 -      <cc:Work
  339.59 -         rdf:about="">
  339.60 -        <dc:format>image/svg+xml</dc:format>
  339.61 -        <dc:type
  339.62 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  339.63 -      </cc:Work>
  339.64 -    </rdf:RDF>
  339.65 -  </metadata>
  339.66 -  <g
  339.67 -     inkscape:label="Layer 1"
  339.68 -     inkscape:groupmode="layer"
  339.69 -     id="layer1">
  339.70 -    <g
  339.71 -       id="g1988"
  339.72 -       transform="translate(84.85711,0)">
  339.73 -      <g
  339.74 -         id="g1876">
  339.75 -        <path
  339.76 -           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  339.77 -           d="M 118.57143,458.21933 L 118.57143,563.79075 L 191.42857,563.79075 L 204.28571,550.93361 L 203.57142,459.6479 L 118.57143,458.21933 z "
  339.78 -           id="path1872"
  339.79 -           sodipodi:nodetypes="cccccc" />
  339.80 -        <path
  339.81 -           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  339.82 -           d="M 191.55484,563.36862 L 191.6923,560.98794 L 192.69126,552.44884 L 203.80416,551.31242"
  339.83 -           id="path1874"
  339.84 -           sodipodi:nodetypes="cccc" />
  339.85 -      </g>
  339.86 -      <flowRoot
  339.87 -         style="font-size:8px;font-family:Times New Roman"
  339.88 -         id="flowRoot1898"
  339.89 -         xml:space="preserve"><flowRegion
  339.90 -           id="flowRegion1900"><rect
  339.91 -             style="font-size:8px;font-family:Times New Roman"
  339.92 -             y="464.50504"
  339.93 -             x="122.85714"
  339.94 -             height="93.571426"
  339.95 -             width="76.428574"
  339.96 -             id="rect1902" /></flowRegion><flowPara
  339.97 -           id="flowPara1904">Greetings!</flowPara><flowPara
  339.98 -           id="flowPara1906" /><flowPara
  339.99 -           id="flowPara1908">I am Mariam Abacha, the wife of former Nigerian dictator Sani Abacha. I am contacting you in confidence, and as a means of developing</flowPara></flowRoot>    </g>
 339.100 -    <g
 339.101 -       id="g1966"
 339.102 -       transform="translate(82,0.35715)">
 339.103 -      <g
 339.104 -         transform="translate(-77.85718,-140.0714)"
 339.105 -         id="g1910">
 339.106 -        <path
 339.107 -           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 339.108 -           d="M 118.57143,458.21933 L 118.57143,563.79075 L 191.42857,563.79075 L 204.28571,550.93361 L 203.57142,459.6479 L 118.57143,458.21933 z "
 339.109 -           id="path1912"
 339.110 -           sodipodi:nodetypes="cccccc" />
 339.111 -        <path
 339.112 -           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 339.113 -           d="M 191.55484,563.36862 L 191.6923,560.98794 L 192.69126,552.44884 L 203.80416,551.31242"
 339.114 -           id="path1914"
 339.115 -           sodipodi:nodetypes="cccc" />
 339.116 -      </g>
 339.117 -      <flowRoot
 339.118 -         transform="translate(-77.85718,-140.0714)"
 339.119 -         style="font-size:8px;font-family:Times New Roman"
 339.120 -         id="flowRoot1916"
 339.121 -         xml:space="preserve"><flowRegion
 339.122 -           id="flowRegion1918"><rect
 339.123 -             style="font-size:8px;font-family:Times New Roman"
 339.124 -             y="464.50504"
 339.125 -             x="122.85714"
 339.126 -             height="93.571426"
 339.127 -             width="76.428574"
 339.128 -             id="rect1920" /></flowRegion><flowPara
 339.129 -           id="flowPara1922">Greetings!</flowPara><flowPara
 339.130 -           id="flowPara1924" /><flowPara
 339.131 -           id="flowPara1926">I am <flowSpan
 339.132 -   style="font-style:italic;fill:red"
 339.133 -   id="flowSpan3094">Shehu Musa Abacha, cousin to</flowSpan> the former Nigerian dictator Sani Abacha. I am contacting you in confidence, and as a means of developing</flowPara></flowRoot>    </g>
 339.134 -    <g
 339.135 -       id="g1977"
 339.136 -       transform="translate(81.99999,-0.35715)">
 339.137 -      <g
 339.138 -         transform="translate(83.57141,-139.3571)"
 339.139 -         id="g1932">
 339.140 -        <path
 339.141 -           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 339.142 -           d="M 118.57143,458.21933 L 118.57143,563.79075 L 191.42857,563.79075 L 204.28571,550.93361 L 203.57142,459.6479 L 118.57143,458.21933 z "
 339.143 -           id="path1934"
 339.144 -           sodipodi:nodetypes="cccccc" />
 339.145 -        <path
 339.146 -           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 339.147 -           d="M 191.55484,563.36862 L 191.6923,560.98794 L 192.69126,552.44884 L 203.80416,551.31242"
 339.148 -           id="path1936"
 339.149 -           sodipodi:nodetypes="cccc" />
 339.150 -      </g>
 339.151 -      <flowRoot
 339.152 -         transform="translate(83.57141,-139.3571)"
 339.153 -         style="font-size:8px;font-family:Times New Roman"
 339.154 -         id="flowRoot1938"
 339.155 -         xml:space="preserve"><flowRegion
 339.156 -           id="flowRegion1940"><rect
 339.157 -             style="font-size:8px;font-family:Times New Roman"
 339.158 -             y="464.50504"
 339.159 -             x="122.85714"
 339.160 -             height="93.571426"
 339.161 -             width="76.428574"
 339.162 -             id="rect1942" /></flowRegion><flowPara
 339.163 -           id="flowPara1944">Greetings!</flowPara><flowPara
 339.164 -           id="flowPara1946" /><flowPara
 339.165 -           id="flowPara1948">I am <flowSpan
 339.166 -   style="font-style:italic;fill:red"
 339.167 -   id="flowSpan3096">Alhaji Abba Abacha, son of</flowSpan> the former Nigerian dictator Sani Abacha. I am contacting you in confidence, and as a means of developing</flowPara></flowRoot>    </g>
 339.168 -    <path
 339.169 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 339.170 -       d="M 215.502,457.71933 L 196.35507,424.5765"
 339.171 -       id="path1999"
 339.172 -       inkscape:connector-type="polyline"
 339.173 -       inkscape:connection-start="#g1988"
 339.174 -       inkscape:connection-end="#g1966" />
 339.175 -    <path
 339.176 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 339.177 -       d="M 277.06936,457.71933 L 296.21629,424.5765"
 339.178 -       id="path2001"
 339.179 -       inkscape:connector-type="polyline"
 339.180 -       inkscape:connection-start="#g1988"
 339.181 -       inkscape:connection-end="#g1977" />
 339.182 -    <text
 339.183 -       xml:space="preserve"
 339.184 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 339.185 -       x="302.42859"
 339.186 -       y="515.08905"
 339.187 -       id="text1905"><tspan
 339.188 -         sodipodi:role="line"
 339.189 -         id="tspan1907"
 339.190 -         x="302.42859"
 339.191 -         y="515.08905">Base version</tspan></text>
 339.192 -    <text
 339.193 -       xml:space="preserve"
 339.194 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 339.195 -       x="45.57143"
 339.196 -       y="374.1619"
 339.197 -       id="text1917"><tspan
 339.198 -         sodipodi:role="line"
 339.199 -         id="tspan1919"
 339.200 -         x="45.57143"
 339.201 -         y="374.1619">Our changes</tspan></text>
 339.202 -    <text
 339.203 -       xml:space="preserve"
 339.204 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 339.205 -       x="385.71429"
 339.206 -       y="374.1619"
 339.207 -       id="text1921"><tspan
 339.208 -         sodipodi:role="line"
 339.209 -         id="tspan1923"
 339.210 -         x="385.71429"
 339.211 -         y="374.1619">Their changes</tspan></text>
 339.212 -  </g>
 339.213 -</svg>
   340.1 --- a/en/tour-merge-merge.svg	Thu Mar 26 08:57:10 2009 +0100
   340.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   340.3 @@ -1,380 +0,0 @@
   340.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   340.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   340.6 -<svg
   340.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   340.8 -   xmlns:cc="http://web.resource.org/cc/"
   340.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  340.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  340.11 -   xmlns="http://www.w3.org/2000/svg"
  340.12 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  340.13 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  340.14 -   width="744.09448819"
  340.15 -   height="1052.3622047"
  340.16 -   id="svg2"
  340.17 -   sodipodi:version="0.32"
  340.18 -   inkscape:version="0.44.1"
  340.19 -   sodipodi:docname="tour-merge-merge.svg">
  340.20 -  <defs
  340.21 -     id="defs4">
  340.22 -    <marker
  340.23 -       inkscape:stockid="Arrow1Mstart"
  340.24 -       orient="auto"
  340.25 -       refY="0.0"
  340.26 -       refX="0.0"
  340.27 -       id="Arrow1Mstart"
  340.28 -       style="overflow:visible">
  340.29 -      <path
  340.30 -         id="path2973"
  340.31 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  340.32 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  340.33 -         transform="scale(0.4) translate(10,0)" />
  340.34 -    </marker>
  340.35 -    <marker
  340.36 -       inkscape:stockid="Arrow1Mend"
  340.37 -       orient="auto"
  340.38 -       refY="0.0"
  340.39 -       refX="0.0"
  340.40 -       id="Arrow1Mend"
  340.41 -       style="overflow:visible;">
  340.42 -      <path
  340.43 -         id="path3066"
  340.44 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  340.45 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  340.46 -         transform="scale(0.4) rotate(180) translate(10,0)" />
  340.47 -    </marker>
  340.48 -  </defs>
  340.49 -  <sodipodi:namedview
  340.50 -     id="base"
  340.51 -     pagecolor="#ffffff"
  340.52 -     bordercolor="#666666"
  340.53 -     borderopacity="1.0"
  340.54 -     gridtolerance="10000"
  340.55 -     guidetolerance="10"
  340.56 -     objecttolerance="10"
  340.57 -     inkscape:pageopacity="0.0"
  340.58 -     inkscape:pageshadow="2"
  340.59 -     inkscape:zoom="1.4"
  340.60 -     inkscape:cx="247.53795"
  340.61 -     inkscape:cy="871.05738"
  340.62 -     inkscape:document-units="px"
  340.63 -     inkscape:current-layer="layer1"
  340.64 -     inkscape:window-width="906"
  340.65 -     inkscape:window-height="620"
  340.66 -     inkscape:window-x="38"
  340.67 -     inkscape:window-y="95" />
  340.68 -  <metadata
  340.69 -     id="metadata7">
  340.70 -    <rdf:RDF>
  340.71 -      <cc:Work
  340.72 -         rdf:about="">
  340.73 -        <dc:format>image/svg+xml</dc:format>
  340.74 -        <dc:type
  340.75 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  340.76 -      </cc:Work>
  340.77 -    </rdf:RDF>
  340.78 -  </metadata>
  340.79 -  <g
  340.80 -     inkscape:label="Layer 1"
  340.81 -     inkscape:groupmode="layer"
  340.82 -     id="layer1">
  340.83 -    <rect
  340.84 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
  340.85 -       id="rect2995"
  340.86 -       width="94.285713"
  340.87 -       height="20.714285"
  340.88 -       x="532.85718"
  340.89 -       y="203.0479" />
  340.90 -    <text
  340.91 -       xml:space="preserve"
  340.92 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
  340.93 -       x="173.57143"
  340.94 -       y="443.79074"
  340.95 -       id="text2832"><tspan
  340.96 -         sodipodi:role="line"
  340.97 -         id="tspan2834"
  340.98 -         x="173.57143"
  340.99 -         y="443.79074" /></text>
 340.100 -    <rect
 340.101 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 340.102 -       id="rect2830"
 340.103 -       width="94.285713"
 340.104 -       height="20.714285"
 340.105 -       x="138"
 340.106 -       y="297.76227" />
 340.107 -    <text
 340.108 -       xml:space="preserve"
 340.109 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 340.110 -       x="162.09892"
 340.111 -       y="311.38342"
 340.112 -       id="text2824"><tspan
 340.113 -         sodipodi:role="line"
 340.114 -         id="tspan2826"
 340.115 -         x="162.09892"
 340.116 -         y="311.38342"
 340.117 -         style="font-family:Courier"><tspan
 340.118 -   style="font-weight:bold"
 340.119 -   id="tspan2862">4</tspan>: REV4</tspan></text>
 340.120 -    <path
 340.121 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 340.122 -       d="M 185.14286,343.63731 L 185.14286,319.47656"
 340.123 -       id="path2900"
 340.124 -       inkscape:connector-type="polyline" />
 340.125 -    <rect
 340.126 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 340.127 -       id="rect2863"
 340.128 -       width="94.285713"
 340.129 -       height="20.714285"
 340.130 -       x="91.428574"
 340.131 -       y="250.47656" />
 340.132 -    <text
 340.133 -       xml:space="preserve"
 340.134 -       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 340.135 -       x="116.09886"
 340.136 -       y="264.56592"
 340.137 -       id="text1965"
 340.138 -       transform="scale(1.000002,0.999998)"><tspan
 340.139 -         sodipodi:role="line"
 340.140 -         id="tspan1967"
 340.141 -         x="116.09886"
 340.142 -         y="264.56592"
 340.143 -         style="font-family:Courier"><tspan
 340.144 -   style="font-weight:bold"
 340.145 -   id="tspan1973">5</tspan>: REV_my_new_hello</tspan></text>
 340.146 -    <path
 340.147 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 340.148 -       d="M 173.95727,296.76228 L 149.75702,272.19085"
 340.149 -       id="path1971"
 340.150 -       inkscape:connector-type="polyline"
 340.151 -       inkscape:connection-end="#rect2863"
 340.152 -       inkscape:connection-start="#rect2830" />
 340.153 -    <rect
 340.154 -       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 340.155 -       id="rect2911"
 340.156 -       width="94.285995"
 340.157 -       height="20.714283"
 340.158 -       x="186.71414"
 340.159 -       y="204.40514" />
 340.160 -    <text
 340.161 -       xml:space="preserve"
 340.162 -       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 340.163 -       x="210.81311"
 340.164 -       y="218.02673"
 340.165 -       id="text2913"
 340.166 -       transform="scale(1.000002,0.999998)"><tspan
 340.167 -         sodipodi:role="line"
 340.168 -         id="tspan2915"
 340.169 -         x="210.81311"
 340.170 -         y="218.02673"
 340.171 -         style="font-family:Courier"><tspan
 340.172 -   id="tspan1966"
 340.173 -   style="font-weight:bold">6</tspan>: REV6_my_new_hello</tspan></text>
 340.174 -    <path
 340.175 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 340.176 -       d="M 191.06908,296.76228 L 227.93092,226.11942"
 340.177 -       id="path2919"
 340.178 -       inkscape:connector-type="polyline"
 340.179 -       inkscape:connection-start="#rect2830" />
 340.180 -    <text
 340.181 -       xml:space="preserve"
 340.182 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 340.183 -       x="295.28571"
 340.184 -       y="217.56711"
 340.185 -       id="text2871"><tspan
 340.186 -         sodipodi:role="line"
 340.187 -         id="tspan2873"
 340.188 -         x="295.28571"
 340.189 -         y="217.56711">tip (and head)</tspan></text>
 340.190 -    <text
 340.191 -       xml:space="preserve"
 340.192 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 340.193 -       x="76"
 340.194 -       y="264.91769"
 340.195 -       id="text2875"><tspan
 340.196 -         sodipodi:role="line"
 340.197 -         id="tspan2877"
 340.198 -         x="76"
 340.199 -         y="264.91769"
 340.200 -         style="text-align:end;text-anchor:end">head</tspan></text>
 340.201 -    <rect
 340.202 -       style="fill:#c8aaa5;fill-opacity:1;stroke:#a07163;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:2, 4;stroke-dashoffset:0;stroke-opacity:1"
 340.203 -       id="rect1913"
 340.204 -       width="94.285713"
 340.205 -       height="20.714285"
 340.206 -       x="138"
 340.207 -       y="156.90514" />
 340.208 -    <path
 340.209 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 2;stroke-dashoffset:0;stroke-opacity:1"
 340.210 -       d="M 144.22399,249.47657 L 179.49029,178.61943"
 340.211 -       id="path1915"
 340.212 -       inkscape:connector-type="polyline"
 340.213 -       inkscape:connection-start="#rect2863"
 340.214 -       inkscape:connection-end="#rect1913" />
 340.215 -    <path
 340.216 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 2;stroke-dashoffset:0;stroke-opacity:1"
 340.217 -       d="M 222.20966,203.40514 L 196.79033,178.61943"
 340.218 -       id="path1917"
 340.219 -       inkscape:connector-type="polyline"
 340.220 -       inkscape:connection-start="#rect2911"
 340.221 -       inkscape:connection-end="#rect1913" />
 340.222 -    <text
 340.223 -       xml:space="preserve"
 340.224 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 340.225 -       x="166.16823"
 340.226 -       y="168.52228"
 340.227 -       id="text2806"><tspan
 340.228 -         sodipodi:role="line"
 340.229 -         id="tspan2808"
 340.230 -         x="166.16823"
 340.231 -         y="168.52228"
 340.232 -         style="font-family:Courier">merge</tspan></text>
 340.233 -    <text
 340.234 -       xml:space="preserve"
 340.235 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 340.236 -       x="246"
 340.237 -       y="162.63338"
 340.238 -       id="text2810"><tspan
 340.239 -         sodipodi:role="line"
 340.240 -         id="tspan2812"
 340.241 -         x="246"
 340.242 -         y="162.63338">working directory</tspan><tspan
 340.243 -         sodipodi:role="line"
 340.244 -         x="246"
 340.245 -         y="177.63338"
 340.246 -         id="tspan2814">during merge</tspan></text>
 340.247 -    <rect
 340.248 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 340.249 -       id="rect2816"
 340.250 -       width="94.285713"
 340.251 -       height="20.714285"
 340.252 -       x="483.14636"
 340.253 -       y="297.76227" />
 340.254 -    <text
 340.255 -       xml:space="preserve"
 340.256 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 340.257 -       x="507.24527"
 340.258 -       y="311.38342"
 340.259 -       id="text2818"><tspan
 340.260 -         sodipodi:role="line"
 340.261 -         id="tspan2820"
 340.262 -         x="507.24527"
 340.263 -         y="311.38342"
 340.264 -         style="font-family:Courier"><tspan
 340.265 -   style="font-weight:bold"
 340.266 -   id="tspan2822">4</tspan>: REV4</tspan></text>
 340.267 -    <path
 340.268 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 340.269 -       d="M 530.28921,343.6373 L 530.28921,319.47655"
 340.270 -       id="path2824"
 340.271 -       inkscape:connector-type="polyline" />
 340.272 -    <rect
 340.273 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 340.274 -       id="rect2826"
 340.275 -       width="94.285713"
 340.276 -       height="20.714285"
 340.277 -       x="436.57492"
 340.278 -       y="250.47656" />
 340.279 -    <text
 340.280 -       xml:space="preserve"
 340.281 -       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 340.282 -       x="461.24484"
 340.283 -       y="264.56613"
 340.284 -       id="text2828"
 340.285 -       transform="scale(1.000002,0.999998)"><tspan
 340.286 -         sodipodi:role="line"
 340.287 -         id="tspan2830"
 340.288 -         x="461.24484"
 340.289 -         y="264.56613"
 340.290 -         style="font-family:Courier"><tspan
 340.291 -   style="font-weight:bold"
 340.292 -   id="tspan2832">5</tspan>: REV_my_new_hello</tspan></text>
 340.293 -    <path
 340.294 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 340.295 -       d="M 519.10362,296.76227 L 494.90337,272.19084"
 340.296 -       id="path2834"
 340.297 -       inkscape:connector-type="polyline" />
 340.298 -    <rect
 340.299 -       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 340.300 -       id="rect2836"
 340.301 -       width="94.285995"
 340.302 -       height="20.714283"
 340.303 -       x="483.14001"
 340.304 -       y="156.548" />
 340.305 -    <text
 340.306 -       xml:space="preserve"
 340.307 -       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 340.308 -       x="555.95911"
 340.309 -       y="218.02698"
 340.310 -       id="text2838"
 340.311 -       transform="scale(1.000002,0.999998)"><tspan
 340.312 -         sodipodi:role="line"
 340.313 -         id="tspan2840"
 340.314 -         x="555.95911"
 340.315 -         y="218.02698"
 340.316 -         style="font-family:Courier"><tspan
 340.317 -   id="tspan2842"
 340.318 -   style="font-weight:bold">6</tspan>: REV6_my_new_hello</tspan></text>
 340.319 -    <path
 340.320 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 340.321 -       d="M 536.21543,296.76227 L 574.03453,224.76218"
 340.322 -       id="path2844"
 340.323 -       inkscape:connector-type="polyline" />
 340.324 -    <text
 340.325 -       xml:space="preserve"
 340.326 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 340.327 -       x="594.43207"
 340.328 -       y="169.78796"
 340.329 -       id="text2846"><tspan
 340.330 -         sodipodi:role="line"
 340.331 -         id="tspan2848"
 340.332 -         x="594.43207"
 340.333 -         y="169.78796">tip</tspan></text>
 340.334 -    <path
 340.335 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
 340.336 -       d="M 489.37034,249.47656 L 524.65575,178.26229"
 340.337 -       id="path2856"
 340.338 -       inkscape:connector-type="polyline"
 340.339 -       inkscape:connection-end="#rect2836" />
 340.340 -    <path
 340.341 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
 340.342 -       d="M 567.85714,202.0479 L 542.42591,178.26229"
 340.343 -       id="path2858"
 340.344 -       inkscape:connector-type="polyline"
 340.345 -       inkscape:connection-end="#rect2836"
 340.346 -       inkscape:connection-start="#rect2995" />
 340.347 -    <text
 340.348 -       xml:space="preserve"
 340.349 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 340.350 -       x="504.54507"
 340.351 -       y="170.39714"
 340.352 -       id="text2860"><tspan
 340.353 -         sodipodi:role="line"
 340.354 -         id="tspan2863"
 340.355 -         x="504.54507"
 340.356 -         y="170.39714"
 340.357 -         style="font-family:Courier"><tspan
 340.358 -   style="font-weight:bold"
 340.359 -   id="tspan2997">7</tspan>: REV7_my_new_hello</tspan></text>
 340.360 -    <text
 340.361 -       xml:space="preserve"
 340.362 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 340.363 -       x="90.323105"
 340.364 -       y="120.21933"
 340.365 -       id="text2929"><tspan
 340.366 -         sodipodi:role="line"
 340.367 -         id="tspan2931"
 340.368 -         x="90.323105"
 340.369 -         y="120.21933"
 340.370 -         style="font-weight:bold">Working directory during merge</tspan></text>
 340.371 -    <text
 340.372 -       xml:space="preserve"
 340.373 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 340.374 -       x="435.35226"
 340.375 -       y="120.21933"
 340.376 -       id="text2937"><tspan
 340.377 -         sodipodi:role="line"
 340.378 -         id="tspan2939"
 340.379 -         x="435.35226"
 340.380 -         y="120.21933"
 340.381 -         style="font-weight:bold">Repository after merge committed</tspan></text>
 340.382 -  </g>
 340.383 -</svg>
   341.1 --- a/en/tour-merge-pull.svg	Thu Mar 26 08:57:10 2009 +0100
   341.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   341.3 @@ -1,288 +0,0 @@
   341.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   341.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   341.6 -<svg
   341.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   341.8 -   xmlns:cc="http://web.resource.org/cc/"
   341.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  341.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  341.11 -   xmlns="http://www.w3.org/2000/svg"
  341.12 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  341.13 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  341.14 -   width="744.09448819"
  341.15 -   height="1052.3622047"
  341.16 -   id="svg2"
  341.17 -   sodipodi:version="0.32"
  341.18 -   inkscape:version="0.44.1"
  341.19 -   sodipodi:docname="tour-merge-pull.svg"
  341.20 -   sodipodi:docbase="/home/bos/hg/hgbook/en">
  341.21 -  <defs
  341.22 -     id="defs4">
  341.23 -    <marker
  341.24 -       inkscape:stockid="Arrow1Mstart"
  341.25 -       orient="auto"
  341.26 -       refY="0.0"
  341.27 -       refX="0.0"
  341.28 -       id="Arrow1Mstart"
  341.29 -       style="overflow:visible">
  341.30 -      <path
  341.31 -         id="path2973"
  341.32 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  341.33 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  341.34 -         transform="scale(0.4) translate(10,0)" />
  341.35 -    </marker>
  341.36 -    <marker
  341.37 -       inkscape:stockid="Arrow1Mend"
  341.38 -       orient="auto"
  341.39 -       refY="0.0"
  341.40 -       refX="0.0"
  341.41 -       id="Arrow1Mend"
  341.42 -       style="overflow:visible;">
  341.43 -      <path
  341.44 -         id="path3066"
  341.45 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  341.46 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  341.47 -         transform="scale(0.4) rotate(180) translate(10,0)" />
  341.48 -    </marker>
  341.49 -  </defs>
  341.50 -  <sodipodi:namedview
  341.51 -     id="base"
  341.52 -     pagecolor="#ffffff"
  341.53 -     bordercolor="#666666"
  341.54 -     borderopacity="1.0"
  341.55 -     gridtolerance="10000"
  341.56 -     guidetolerance="10"
  341.57 -     objecttolerance="10"
  341.58 -     inkscape:pageopacity="0.0"
  341.59 -     inkscape:pageshadow="2"
  341.60 -     inkscape:zoom="1.4"
  341.61 -     inkscape:cx="233.63208"
  341.62 -     inkscape:cy="832.54381"
  341.63 -     inkscape:document-units="px"
  341.64 -     inkscape:current-layer="layer1"
  341.65 -     inkscape:window-width="906"
  341.66 -     inkscape:window-height="620"
  341.67 -     inkscape:window-x="237"
  341.68 -     inkscape:window-y="103" />
  341.69 -  <metadata
  341.70 -     id="metadata7">
  341.71 -    <rdf:RDF>
  341.72 -      <cc:Work
  341.73 -         rdf:about="">
  341.74 -        <dc:format>image/svg+xml</dc:format>
  341.75 -        <dc:type
  341.76 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  341.77 -      </cc:Work>
  341.78 -    </rdf:RDF>
  341.79 -  </metadata>
  341.80 -  <g
  341.81 -     inkscape:label="Layer 1"
  341.82 -     inkscape:groupmode="layer"
  341.83 -     id="layer1">
  341.84 -    <text
  341.85 -       xml:space="preserve"
  341.86 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
  341.87 -       x="173.57143"
  341.88 -       y="443.79074"
  341.89 -       id="text2832"><tspan
  341.90 -         sodipodi:role="line"
  341.91 -         id="tspan2834"
  341.92 -         x="173.57143"
  341.93 -         y="443.79074" /></text>
  341.94 -    <rect
  341.95 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
  341.96 -       id="rect1878"
  341.97 -       width="94.285713"
  341.98 -       height="20.714285"
  341.99 -       x="138"
 341.100 -       y="479.50504" />
 341.101 -    <text
 341.102 -       xml:space="preserve"
 341.103 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 341.104 -       x="162.09892"
 341.105 -       y="493.12619"
 341.106 -       id="text1872"><tspan
 341.107 -         sodipodi:role="line"
 341.108 -         id="tspan1874"
 341.109 -         x="162.09892"
 341.110 -         y="493.12619"
 341.111 -         style="font-family:Courier"><tspan
 341.112 -   style="font-weight:bold"
 341.113 -   id="tspan1876">0</tspan>: REV0</tspan></text>
 341.114 -    <rect
 341.115 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 341.116 -       id="rect2800"
 341.117 -       width="94.285713"
 341.118 -       height="20.714285"
 341.119 -       x="138"
 341.120 -       y="432.63004" />
 341.121 -    <text
 341.122 -       xml:space="preserve"
 341.123 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 341.124 -       x="162.09892"
 341.125 -       y="446.25119"
 341.126 -       id="text2794"><tspan
 341.127 -         sodipodi:role="line"
 341.128 -         id="tspan2796"
 341.129 -         x="162.09892"
 341.130 -         y="446.25119"
 341.131 -         style="font-family:Courier"><tspan
 341.132 -   id="tspan2868"
 341.133 -   style="font-weight:bold">1</tspan>: REV1</tspan></text>
 341.134 -    <rect
 341.135 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 341.136 -       id="rect2810"
 341.137 -       width="94.285713"
 341.138 -       height="20.714285"
 341.139 -       x="138"
 341.140 -       y="385.75504" />
 341.141 -    <text
 341.142 -       xml:space="preserve"
 341.143 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 341.144 -       x="162.09892"
 341.145 -       y="399.37619"
 341.146 -       id="text2804"><tspan
 341.147 -         sodipodi:role="line"
 341.148 -         id="tspan2806"
 341.149 -         x="162.09892"
 341.150 -         y="399.37619"
 341.151 -         style="font-family:Courier"><tspan
 341.152 -   style="font-weight:bold"
 341.153 -   id="tspan2866">2</tspan>: REV2</tspan></text>
 341.154 -    <rect
 341.155 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 341.156 -       id="rect2820"
 341.157 -       width="94.285713"
 341.158 -       height="20.714285"
 341.159 -       x="138"
 341.160 -       y="338.88007" />
 341.161 -    <text
 341.162 -       xml:space="preserve"
 341.163 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 341.164 -       x="162.09892"
 341.165 -       y="352.50122"
 341.166 -       id="text2814"><tspan
 341.167 -         sodipodi:role="line"
 341.168 -         id="tspan2816"
 341.169 -         x="162.09892"
 341.170 -         y="352.50122"
 341.171 -         style="font-family:Courier"><tspan
 341.172 -   style="font-weight:bold"
 341.173 -   id="tspan2864">3</tspan>: REV3</tspan></text>
 341.174 -    <rect
 341.175 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 341.176 -       id="rect2830"
 341.177 -       width="94.285713"
 341.178 -       height="20.714285"
 341.179 -       x="138"
 341.180 -       y="292.00504" />
 341.181 -    <text
 341.182 -       xml:space="preserve"
 341.183 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 341.184 -       x="162.09892"
 341.185 -       y="305.62619"
 341.186 -       id="text2824"><tspan
 341.187 -         sodipodi:role="line"
 341.188 -         id="tspan2826"
 341.189 -         x="162.09892"
 341.190 -         y="305.62619"
 341.191 -         style="font-family:Courier"><tspan
 341.192 -   style="font-weight:bold"
 341.193 -   id="tspan2862">4</tspan>: REV4</tspan></text>
 341.194 -    <path
 341.195 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 341.196 -       d="M 185.14286,478.50504 L 185.14286,454.34432"
 341.197 -       id="path2894"
 341.198 -       inkscape:connector-type="polyline" />
 341.199 -    <path
 341.200 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 341.201 -       d="M 185.14286,431.63004 L 185.14286,407.46932"
 341.202 -       id="path2896"
 341.203 -       inkscape:connector-type="polyline" />
 341.204 -    <path
 341.205 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 341.206 -       d="M 185.14286,384.75504 L 185.14286,360.59435"
 341.207 -       id="path2898"
 341.208 -       inkscape:connector-type="polyline" />
 341.209 -    <path
 341.210 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 341.211 -       d="M 185.14286,337.88007 L 185.14286,313.71932"
 341.212 -       id="path2900"
 341.213 -       inkscape:connector-type="polyline" />
 341.214 -    <rect
 341.215 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 341.216 -       id="rect2863"
 341.217 -       width="94.285713"
 341.218 -       height="20.714285"
 341.219 -       x="91.428574"
 341.220 -       y="244.71933" />
 341.221 -    <text
 341.222 -       xml:space="preserve"
 341.223 -       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 341.224 -       x="116.09886"
 341.225 -       y="258.80865"
 341.226 -       id="text1965"
 341.227 -       transform="scale(1.000002,0.999998)"><tspan
 341.228 -         sodipodi:role="line"
 341.229 -         id="tspan1967"
 341.230 -         x="116.09886"
 341.231 -         y="258.80865"
 341.232 -         style="font-family:Courier"><tspan
 341.233 -   style="font-weight:bold"
 341.234 -   id="tspan1973">5</tspan>: REV_my_new_hello</tspan></text>
 341.235 -    <path
 341.236 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 341.237 -       d="M 173.95727,291.00504 L 149.75702,266.43361"
 341.238 -       id="path1971"
 341.239 -       inkscape:connector-type="polyline"
 341.240 -       inkscape:connection-end="#rect2863"
 341.241 -       inkscape:connection-start="#rect2830" />
 341.242 -    <rect
 341.243 -       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 341.244 -       id="rect2911"
 341.245 -       width="94.285995"
 341.246 -       height="20.714283"
 341.247 -       x="186.71414"
 341.248 -       y="198.6479" />
 341.249 -    <text
 341.250 -       xml:space="preserve"
 341.251 -       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 341.252 -       x="210.81311"
 341.253 -       y="212.26949"
 341.254 -       id="text2913"
 341.255 -       transform="scale(1.000002,0.999998)"><tspan
 341.256 -         sodipodi:role="line"
 341.257 -         id="tspan2915"
 341.258 -         x="210.81311"
 341.259 -         y="212.26949"
 341.260 -         style="font-family:Courier"><tspan
 341.261 -   id="tspan1966"
 341.262 -   style="font-weight:bold">6</tspan>: REV6_my_new_hello</tspan></text>
 341.263 -    <path
 341.264 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 341.265 -       d="M 191.06908,291.00504 L 227.93092,220.36218"
 341.266 -       id="path2919"
 341.267 -       inkscape:connector-type="polyline"
 341.268 -       inkscape:connection-start="#rect2830" />
 341.269 -    <text
 341.270 -       xml:space="preserve"
 341.271 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 341.272 -       x="295.28571"
 341.273 -       y="211.80988"
 341.274 -       id="text2871"><tspan
 341.275 -         sodipodi:role="line"
 341.276 -         id="tspan2873"
 341.277 -         x="295.28571"
 341.278 -         y="211.80988">tip (and head)</tspan></text>
 341.279 -    <text
 341.280 -       xml:space="preserve"
 341.281 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 341.282 -       x="76"
 341.283 -       y="259.16046"
 341.284 -       id="text2875"><tspan
 341.285 -         sodipodi:role="line"
 341.286 -         id="tspan2877"
 341.287 -         x="76"
 341.288 -         y="259.16046"
 341.289 -         style="text-align:end;text-anchor:end">head</tspan></text>
 341.290 -  </g>
 341.291 -</svg>
   342.1 --- a/en/tour-merge-sep-repos.svg	Thu Mar 26 08:57:10 2009 +0100
   342.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   342.3 @@ -1,466 +0,0 @@
   342.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   342.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   342.6 -<svg
   342.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   342.8 -   xmlns:cc="http://web.resource.org/cc/"
   342.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  342.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  342.11 -   xmlns="http://www.w3.org/2000/svg"
  342.12 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  342.13 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  342.14 -   width="744.09448819"
  342.15 -   height="1052.3622047"
  342.16 -   id="svg2"
  342.17 -   sodipodi:version="0.32"
  342.18 -   inkscape:version="0.44.1"
  342.19 -   sodipodi:docname="tour-merge-sep-repos.svg">
  342.20 -  <defs
  342.21 -     id="defs4">
  342.22 -    <marker
  342.23 -       inkscape:stockid="Arrow1Mstart"
  342.24 -       orient="auto"
  342.25 -       refY="0.0"
  342.26 -       refX="0.0"
  342.27 -       id="Arrow1Mstart"
  342.28 -       style="overflow:visible">
  342.29 -      <path
  342.30 -         id="path2973"
  342.31 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  342.32 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  342.33 -         transform="scale(0.4) translate(10,0)" />
  342.34 -    </marker>
  342.35 -    <marker
  342.36 -       inkscape:stockid="Arrow1Mend"
  342.37 -       orient="auto"
  342.38 -       refY="0.0"
  342.39 -       refX="0.0"
  342.40 -       id="Arrow1Mend"
  342.41 -       style="overflow:visible;">
  342.42 -      <path
  342.43 -         id="path3066"
  342.44 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  342.45 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  342.46 -         transform="scale(0.4) rotate(180) translate(10,0)" />
  342.47 -    </marker>
  342.48 -  </defs>
  342.49 -  <sodipodi:namedview
  342.50 -     id="base"
  342.51 -     pagecolor="#ffffff"
  342.52 -     bordercolor="#666666"
  342.53 -     borderopacity="1.0"
  342.54 -     gridtolerance="10000"
  342.55 -     guidetolerance="10"
  342.56 -     objecttolerance="10"
  342.57 -     inkscape:pageopacity="0.0"
  342.58 -     inkscape:pageshadow="2"
  342.59 -     inkscape:zoom="1.4"
  342.60 -     inkscape:cx="307.20351"
  342.61 -     inkscape:cy="716.87911"
  342.62 -     inkscape:document-units="px"
  342.63 -     inkscape:current-layer="layer1"
  342.64 -     inkscape:window-width="906"
  342.65 -     inkscape:window-height="620"
  342.66 -     inkscape:window-x="5"
  342.67 -     inkscape:window-y="49" />
  342.68 -  <metadata
  342.69 -     id="metadata7">
  342.70 -    <rdf:RDF>
  342.71 -      <cc:Work
  342.72 -         rdf:about="">
  342.73 -        <dc:format>image/svg+xml</dc:format>
  342.74 -        <dc:type
  342.75 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  342.76 -      </cc:Work>
  342.77 -    </rdf:RDF>
  342.78 -  </metadata>
  342.79 -  <g
  342.80 -     inkscape:label="Layer 1"
  342.81 -     inkscape:groupmode="layer"
  342.82 -     id="layer1">
  342.83 -    <text
  342.84 -       xml:space="preserve"
  342.85 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
  342.86 -       x="173.57143"
  342.87 -       y="443.79074"
  342.88 -       id="text2832"><tspan
  342.89 -         sodipodi:role="line"
  342.90 -         id="tspan2834"
  342.91 -         x="173.57143"
  342.92 -         y="443.79074" /></text>
  342.93 -    <rect
  342.94 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
  342.95 -       id="rect1878"
  342.96 -       width="94.285713"
  342.97 -       height="20.714285"
  342.98 -       x="138"
  342.99 -       y="479.50504" />
 342.100 -    <text
 342.101 -       xml:space="preserve"
 342.102 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 342.103 -       x="162.09892"
 342.104 -       y="493.12619"
 342.105 -       id="text1872"><tspan
 342.106 -         sodipodi:role="line"
 342.107 -         id="tspan1874"
 342.108 -         x="162.09892"
 342.109 -         y="493.12619"
 342.110 -         style="font-family:Courier"><tspan
 342.111 -   style="font-weight:bold"
 342.112 -   id="tspan1876">0</tspan>: REV0</tspan></text>
 342.113 -    <rect
 342.114 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 342.115 -       id="rect2800"
 342.116 -       width="94.285713"
 342.117 -       height="20.714285"
 342.118 -       x="138"
 342.119 -       y="432.63004" />
 342.120 -    <text
 342.121 -       xml:space="preserve"
 342.122 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 342.123 -       x="162.09892"
 342.124 -       y="446.25119"
 342.125 -       id="text2794"><tspan
 342.126 -         sodipodi:role="line"
 342.127 -         id="tspan2796"
 342.128 -         x="162.09892"
 342.129 -         y="446.25119"
 342.130 -         style="font-family:Courier"><tspan
 342.131 -   id="tspan2868"
 342.132 -   style="font-weight:bold">1</tspan>: REV1</tspan></text>
 342.133 -    <rect
 342.134 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 342.135 -       id="rect2810"
 342.136 -       width="94.285713"
 342.137 -       height="20.714285"
 342.138 -       x="138"
 342.139 -       y="385.75504" />
 342.140 -    <text
 342.141 -       xml:space="preserve"
 342.142 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 342.143 -       x="162.09892"
 342.144 -       y="399.37619"
 342.145 -       id="text2804"><tspan
 342.146 -         sodipodi:role="line"
 342.147 -         id="tspan2806"
 342.148 -         x="162.09892"
 342.149 -         y="399.37619"
 342.150 -         style="font-family:Courier"><tspan
 342.151 -   style="font-weight:bold"
 342.152 -   id="tspan2866">2</tspan>: REV2</tspan></text>
 342.153 -    <rect
 342.154 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 342.155 -       id="rect2820"
 342.156 -       width="94.285713"
 342.157 -       height="20.714285"
 342.158 -       x="138"
 342.159 -       y="338.88007" />
 342.160 -    <text
 342.161 -       xml:space="preserve"
 342.162 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 342.163 -       x="162.09892"
 342.164 -       y="352.50122"
 342.165 -       id="text2814"><tspan
 342.166 -         sodipodi:role="line"
 342.167 -         id="tspan2816"
 342.168 -         x="162.09892"
 342.169 -         y="352.50122"
 342.170 -         style="font-family:Courier"><tspan
 342.171 -   style="font-weight:bold"
 342.172 -   id="tspan2864">3</tspan>: REV3</tspan></text>
 342.173 -    <rect
 342.174 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 342.175 -       id="rect2830"
 342.176 -       width="94.285713"
 342.177 -       height="20.714285"
 342.178 -       x="138"
 342.179 -       y="292.00504" />
 342.180 -    <text
 342.181 -       xml:space="preserve"
 342.182 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 342.183 -       x="162.09892"
 342.184 -       y="305.62619"
 342.185 -       id="text2824"><tspan
 342.186 -         sodipodi:role="line"
 342.187 -         id="tspan2826"
 342.188 -         x="162.09892"
 342.189 -         y="305.62619"
 342.190 -         style="font-family:Courier"><tspan
 342.191 -   style="font-weight:bold"
 342.192 -   id="tspan2862">4</tspan>: REV4</tspan></text>
 342.193 -    <path
 342.194 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 342.195 -       d="M 185.14286,478.50504 L 185.14286,454.34432"
 342.196 -       id="path2894"
 342.197 -       inkscape:connector-type="polyline" />
 342.198 -    <path
 342.199 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 342.200 -       d="M 185.14286,431.63004 L 185.14286,407.46932"
 342.201 -       id="path2896"
 342.202 -       inkscape:connector-type="polyline" />
 342.203 -    <path
 342.204 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 342.205 -       d="M 185.14286,384.75504 L 185.14286,360.59435"
 342.206 -       id="path2898"
 342.207 -       inkscape:connector-type="polyline" />
 342.208 -    <path
 342.209 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 342.210 -       d="M 185.14286,337.88007 L 185.14286,313.71932"
 342.211 -       id="path2900"
 342.212 -       inkscape:connector-type="polyline" />
 342.213 -    <rect
 342.214 -       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 342.215 -       id="rect1963"
 342.216 -       width="94.285995"
 342.217 -       height="20.714283"
 342.218 -       x="138"
 342.219 -       y="245.18723" />
 342.220 -    <text
 342.221 -       xml:space="preserve"
 342.222 -       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 342.223 -       x="162.09877"
 342.224 -       y="258.80865"
 342.225 -       id="text1965"
 342.226 -       transform="scale(1.000002,0.999998)"><tspan
 342.227 -         sodipodi:role="line"
 342.228 -         id="tspan1967"
 342.229 -         x="162.09877"
 342.230 -         y="258.80865"
 342.231 -         style="font-family:Courier"><tspan
 342.232 -   style="font-weight:bold"
 342.233 -   id="tspan1973">5</tspan>: REV_my_hello</tspan></text>
 342.234 -    <path
 342.235 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 342.236 -       d="M 185.143,291.06218 L 185.143,266.90143"
 342.237 -       id="path1971"
 342.238 -       inkscape:connector-type="polyline" />
 342.239 -    <text
 342.240 -       xml:space="preserve"
 342.241 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 342.242 -       x="136.90039"
 342.243 -       y="232.25546"
 342.244 -       id="text2921"><tspan
 342.245 -         sodipodi:role="line"
 342.246 -         id="tspan2923"
 342.247 -         x="136.90039"
 342.248 -         y="232.25546">my-hello</tspan></text>
 342.249 -    <rect
 342.250 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 342.251 -       id="rect2863"
 342.252 -       width="94.285713"
 342.253 -       height="20.714285"
 342.254 -       x="370.71414"
 342.255 -       y="479.49289" />
 342.256 -    <text
 342.257 -       xml:space="preserve"
 342.258 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 342.259 -       x="394.81305"
 342.260 -       y="493.11404"
 342.261 -       id="text2865"><tspan
 342.262 -         sodipodi:role="line"
 342.263 -         id="tspan2867"
 342.264 -         x="394.81305"
 342.265 -         y="493.11404"
 342.266 -         style="font-family:Courier"><tspan
 342.267 -   style="font-weight:bold"
 342.268 -   id="tspan2869">0</tspan>: REV0</tspan></text>
 342.269 -    <rect
 342.270 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 342.271 -       id="rect2871"
 342.272 -       width="94.285713"
 342.273 -       height="20.714285"
 342.274 -       x="370.71414"
 342.275 -       y="432.61789" />
 342.276 -    <text
 342.277 -       xml:space="preserve"
 342.278 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 342.279 -       x="394.81305"
 342.280 -       y="446.23904"
 342.281 -       id="text2873"><tspan
 342.282 -         sodipodi:role="line"
 342.283 -         id="tspan2875"
 342.284 -         x="394.81305"
 342.285 -         y="446.23904"
 342.286 -         style="font-family:Courier"><tspan
 342.287 -   id="tspan2877"
 342.288 -   style="font-weight:bold">1</tspan>: REV1</tspan></text>
 342.289 -    <rect
 342.290 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 342.291 -       id="rect2879"
 342.292 -       width="94.285713"
 342.293 -       height="20.714285"
 342.294 -       x="370.71414"
 342.295 -       y="385.74289" />
 342.296 -    <text
 342.297 -       xml:space="preserve"
 342.298 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 342.299 -       x="394.81305"
 342.300 -       y="399.36404"
 342.301 -       id="text2881"><tspan
 342.302 -         sodipodi:role="line"
 342.303 -         id="tspan2883"
 342.304 -         x="394.81305"
 342.305 -         y="399.36404"
 342.306 -         style="font-family:Courier"><tspan
 342.307 -   style="font-weight:bold"
 342.308 -   id="tspan2885">2</tspan>: REV2</tspan></text>
 342.309 -    <rect
 342.310 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 342.311 -       id="rect2887"
 342.312 -       width="94.285713"
 342.313 -       height="20.714285"
 342.314 -       x="370.71414"
 342.315 -       y="338.86792" />
 342.316 -    <text
 342.317 -       xml:space="preserve"
 342.318 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 342.319 -       x="394.81305"
 342.320 -       y="352.48907"
 342.321 -       id="text2889"><tspan
 342.322 -         sodipodi:role="line"
 342.323 -         id="tspan2891"
 342.324 -         x="394.81305"
 342.325 -         y="352.48907"
 342.326 -         style="font-family:Courier"><tspan
 342.327 -   style="font-weight:bold"
 342.328 -   id="tspan2893">3</tspan>: REV3</tspan></text>
 342.329 -    <rect
 342.330 -       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 342.331 -       id="rect2895"
 342.332 -       width="94.285713"
 342.333 -       height="20.714285"
 342.334 -       x="370.71414"
 342.335 -       y="291.99289" />
 342.336 -    <text
 342.337 -       xml:space="preserve"
 342.338 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 342.339 -       x="394.81305"
 342.340 -       y="305.61404"
 342.341 -       id="text2897"><tspan
 342.342 -         sodipodi:role="line"
 342.343 -         id="tspan2899"
 342.344 -         x="394.81305"
 342.345 -         y="305.61404"
 342.346 -         style="font-family:Courier"><tspan
 342.347 -   style="font-weight:bold"
 342.348 -   id="tspan2901">4</tspan>: REV4</tspan></text>
 342.349 -    <path
 342.350 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 342.351 -       d="M 417.85701,478.4929 L 417.85701,454.33218"
 342.352 -       id="path2903"
 342.353 -       inkscape:connector-type="polyline" />
 342.354 -    <path
 342.355 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 342.356 -       d="M 417.85701,431.6179 L 417.85701,407.45718"
 342.357 -       id="path2905"
 342.358 -       inkscape:connector-type="polyline" />
 342.359 -    <path
 342.360 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 342.361 -       d="M 417.85701,384.7429 L 417.85701,360.58221"
 342.362 -       id="path2907"
 342.363 -       inkscape:connector-type="polyline" />
 342.364 -    <path
 342.365 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 342.366 -       d="M 417.85701,337.86793 L 417.85701,313.70718"
 342.367 -       id="path2909"
 342.368 -       inkscape:connector-type="polyline" />
 342.369 -    <rect
 342.370 -       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 342.371 -       id="rect2911"
 342.372 -       width="94.285995"
 342.373 -       height="20.714283"
 342.374 -       x="370.71414"
 342.375 -       y="245.17511" />
 342.376 -    <text
 342.377 -       xml:space="preserve"
 342.378 -       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 342.379 -       x="394.81274"
 342.380 -       y="258.79678"
 342.381 -       id="text2913"
 342.382 -       transform="scale(1.000002,0.999998)"><tspan
 342.383 -         sodipodi:role="line"
 342.384 -         id="tspan2915"
 342.385 -         x="394.81274"
 342.386 -         y="258.79678"
 342.387 -         style="font-family:Courier"><tspan
 342.388 -   style="font-weight:bold"
 342.389 -   id="tspan2917">5</tspan>: REV_my_new_hello</tspan></text>
 342.390 -    <path
 342.391 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 342.392 -       d="M 417.85715,291.05004 L 417.85715,266.88929"
 342.393 -       id="path2919"
 342.394 -       inkscape:connector-type="polyline" />
 342.395 -    <text
 342.396 -       xml:space="preserve"
 342.397 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 342.398 -       x="369.61453"
 342.399 -       y="232.25546"
 342.400 -       id="text2925"><tspan
 342.401 -         sodipodi:role="line"
 342.402 -         id="tspan2927"
 342.403 -         x="369.61453"
 342.404 -         y="232.25546">my-new-hello</tspan></text>
 342.405 -    <text
 342.406 -       xml:space="preserve"
 342.407 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 342.408 -       x="300.54352"
 342.409 -       y="252.12723"
 342.410 -       id="text2933"><tspan
 342.411 -         sodipodi:role="line"
 342.412 -         id="tspan2935"
 342.413 -         x="300.54352"
 342.414 -         y="252.12723"
 342.415 -         style="text-align:center;text-anchor:middle">newest changes</tspan><tspan
 342.416 -         sodipodi:role="line"
 342.417 -         x="300.54352"
 342.418 -         y="267.12723"
 342.419 -         style="text-align:center;text-anchor:middle"
 342.420 -         id="tspan3132">differ</tspan></text>
 342.421 -    <text
 342.422 -       xml:space="preserve"
 342.423 -       style="font-size:12px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 342.424 -       x="262.15436"
 342.425 -       y="398.37112"
 342.426 -       id="text2929"><tspan
 342.427 -         sodipodi:role="line"
 342.428 -         x="262.15436"
 342.429 -         y="398.37112"
 342.430 -         id="tspan3013"
 342.431 -         style="text-align:start;text-anchor:start">common history</tspan></text>
 342.432 -    <g
 342.433 -       id="g3107"
 342.434 -       transform="translate(0,0.855744)">
 342.435 -      <path
 342.436 -         id="path3101"
 342.437 -         d="M 300.35713,381.29075 L 300.35713,304.50504"
 342.438 -         style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:0;stroke-opacity:1" />
 342.439 -      <path
 342.440 -         id="path3105"
 342.441 -         d="M 291.07142,301.64789 L 309.28571,301.64789"
 342.442 -         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#bfbfbf;stroke-width:0.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
 342.443 -    </g>
 342.444 -    <path
 342.445 -       style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:0;stroke-opacity:1"
 342.446 -       d="M 300.53571,486.38926 L 300.53571,409.60355"
 342.447 -       id="path3113" />
 342.448 -    <path
 342.449 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#bfbfbf;stroke-width:0.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 342.450 -       d="M 291.25,488.49641 L 309.46429,488.49641"
 342.451 -       id="path3115" />
 342.452 -    <text
 342.453 -       xml:space="preserve"
 342.454 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 342.455 -       x="480.71429"
 342.456 -       y="250.91507"
 342.457 -       id="text1949"><tspan
 342.458 -         sodipodi:role="line"
 342.459 -         id="tspan1951"
 342.460 -         x="480.71429"
 342.461 -         y="250.91507"
 342.462 -         style="text-align:start;text-anchor:start">head revision</tspan><tspan
 342.463 -         sodipodi:role="line"
 342.464 -         x="480.71429"
 342.465 -         y="265.91507"
 342.466 -         id="tspan1953"
 342.467 -         style="text-align:start;text-anchor:start">(has no children)</tspan></text>
 342.468 -  </g>
 342.469 -</svg>
   343.1 --- a/en/tour-merge.tex	Thu Mar 26 08:57:10 2009 +0100
   343.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   343.3 @@ -1,283 +0,0 @@
   343.4 -\chapter{A tour of Mercurial: merging work}
   343.5 -\label{chap:tour-merge}
   343.6 -
   343.7 -We've now covered cloning a repository, making changes in a
   343.8 -repository, and pulling or pushing changes from one repository into
   343.9 -another.  Our next step is \emph{merging} changes from separate
  343.10 -repositories.
  343.11 -
  343.12 -\section{Merging streams of work}
  343.13 -
  343.14 -Merging is a fundamental part of working with a distributed revision
  343.15 -control tool.
  343.16 -\begin{itemize}
  343.17 -\item Alice and Bob each have a personal copy of a repository for a
  343.18 -  project they're collaborating on.  Alice fixes a bug in her
  343.19 -  repository; Bob adds a new feature in his.  They want the shared
  343.20 -  repository to contain both the bug fix and the new feature.
  343.21 -\item I frequently work on several different tasks for a single
  343.22 -  project at once, each safely isolated in its own repository.
  343.23 -  Working this way means that I often need to merge one piece of my
  343.24 -  own work with another.
  343.25 -\end{itemize}
  343.26 -
  343.27 -Because merging is such a common thing to need to do, Mercurial makes
  343.28 -it easy.  Let's walk through the process.  We'll begin by cloning yet
  343.29 -another repository (see how often they spring up?) and making a change
  343.30 -in it.
  343.31 -\interaction{tour.merge.clone}
  343.32 -We should now have two copies of \filename{hello.c} with different
  343.33 -contents.  The histories of the two repositories have also diverged,
  343.34 -as illustrated in figure~\ref{fig:tour-merge:sep-repos}.
  343.35 -\interaction{tour.merge.cat}
  343.36 -
  343.37 -\begin{figure}[ht]
  343.38 -  \centering
  343.39 -  \grafix{tour-merge-sep-repos}
  343.40 -  \caption{Divergent recent histories of the \dirname{my-hello} and
  343.41 -    \dirname{my-new-hello} repositories}
  343.42 -  \label{fig:tour-merge:sep-repos}
  343.43 -\end{figure}
  343.44 -
  343.45 -We already know that pulling changes from our \dirname{my-hello}
  343.46 -repository will have no effect on the working directory.
  343.47 -\interaction{tour.merge.pull}
  343.48 -However, the \hgcmd{pull} command says something about ``heads''.  
  343.49 -
  343.50 -\subsection{Head changesets}
  343.51 -
  343.52 -A head is a change that has no descendants, or children, as they're
  343.53 -also known.  The tip revision is thus a head, because the newest
  343.54 -revision in a repository doesn't have any children, but a repository
  343.55 -can contain more than one head.
  343.56 -
  343.57 -\begin{figure}[ht]
  343.58 -  \centering
  343.59 -  \grafix{tour-merge-pull}
  343.60 -  \caption{Repository contents after pulling from \dirname{my-hello} into
  343.61 -    \dirname{my-new-hello}}
  343.62 -  \label{fig:tour-merge:pull}
  343.63 -\end{figure}
  343.64 -
  343.65 -In figure~\ref{fig:tour-merge:pull}, you can see the effect of the
  343.66 -pull from \dirname{my-hello} into \dirname{my-new-hello}.  The history
  343.67 -that was already present in \dirname{my-new-hello} is untouched, but a
  343.68 -new revision has been added.  By referring to
  343.69 -figure~\ref{fig:tour-merge:sep-repos}, we can see that the
  343.70 -\emph{changeset ID} remains the same in the new repository, but the
  343.71 -\emph{revision number} has changed.  (This, incidentally, is a fine
  343.72 -example of why it's not safe to use revision numbers when discussing
  343.73 -changesets.)  We can view the heads in a repository using the
  343.74 -\hgcmd{heads} command.
  343.75 -\interaction{tour.merge.heads}
  343.76 -
  343.77 -\subsection{Performing the merge}
  343.78 -
  343.79 -What happens if we try to use the normal \hgcmd{update} command to
  343.80 -update to the new tip?
  343.81 -\interaction{tour.merge.update}
  343.82 -Mercurial is telling us that the \hgcmd{update} command won't do a
  343.83 -merge; it won't update the working directory when it thinks we might
  343.84 -be wanting to do a merge, unless we force it to do so.  Instead, we
  343.85 -use the \hgcmd{merge} command to merge the two heads.
  343.86 -\interaction{tour.merge.merge}
  343.87 -
  343.88 -\begin{figure}[ht]
  343.89 -  \centering
  343.90 -  \grafix{tour-merge-merge}
  343.91 -  \caption{Working directory and repository during merge, and
  343.92 -    following commit}
  343.93 -  \label{fig:tour-merge:merge}
  343.94 -\end{figure}
  343.95 -
  343.96 -This updates the working directory so that it contains changes from
  343.97 -\emph{both} heads, which is reflected in both the output of
  343.98 -\hgcmd{parents} and the contents of \filename{hello.c}.
  343.99 -\interaction{tour.merge.parents}
 343.100 -
 343.101 -\subsection{Committing the results of the merge}
 343.102 -
 343.103 -Whenever we've done a merge, \hgcmd{parents} will display two parents
 343.104 -until we \hgcmd{commit} the results of the merge.
 343.105 -\interaction{tour.merge.commit}
 343.106 -We now have a new tip revision; notice that it has \emph{both} of
 343.107 -our former heads as its parents.  These are the same revisions that
 343.108 -were previously displayed by \hgcmd{parents}.
 343.109 -\interaction{tour.merge.tip}
 343.110 -In figure~\ref{fig:tour-merge:merge}, you can see a representation of
 343.111 -what happens to the working directory during the merge, and how this
 343.112 -affects the repository when the commit happens.  During the merge, the
 343.113 -working directory has two parent changesets, and these become the
 343.114 -parents of the new changeset.
 343.115 -
 343.116 -\section{Merging conflicting changes}
 343.117 -
 343.118 -Most merges are simple affairs, but sometimes you'll find yourself
 343.119 -merging changes where each modifies the same portions of the same
 343.120 -files.  Unless both modifications are identical, this results in a
 343.121 -\emph{conflict}, where you have to decide how to reconcile the
 343.122 -different changes into something coherent.
 343.123 -
 343.124 -\begin{figure}[ht]
 343.125 -  \centering
 343.126 -  \grafix{tour-merge-conflict}
 343.127 -  \caption{Conflicting changes to a document}
 343.128 -  \label{fig:tour-merge:conflict}
 343.129 -\end{figure}
 343.130 -
 343.131 -Figure~\ref{fig:tour-merge:conflict} illustrates an instance of two
 343.132 -conflicting changes to a document.  We started with a single version
 343.133 -of the file; then we made some changes; while someone else made
 343.134 -different changes to the same text.  Our task in resolving the
 343.135 -conflicting changes is to decide what the file should look like.
 343.136 -
 343.137 -Mercurial doesn't have a built-in facility for handling conflicts.
 343.138 -Instead, it runs an external program called \command{hgmerge}.  This
 343.139 -is a shell script that is bundled with Mercurial; you can change it to
 343.140 -behave however you please.  What it does by default is try to find one
 343.141 -of several different merging tools that are likely to be installed on
 343.142 -your system.  It first tries a few fully automatic merging tools; if
 343.143 -these don't succeed (because the resolution process requires human
 343.144 -guidance) or aren't present, the script tries a few different
 343.145 -graphical merging tools.
 343.146 -
 343.147 -It's also possible to get Mercurial to run another program or script
 343.148 -instead of \command{hgmerge}, by setting the \envar{HGMERGE}
 343.149 -environment variable to the name of your preferred program.
 343.150 -
 343.151 -\subsection{Using a graphical merge tool}
 343.152 -
 343.153 -My preferred graphical merge tool is \command{kdiff3}, which I'll use
 343.154 -to describe the features that are common to graphical file merging
 343.155 -tools.  You can see a screenshot of \command{kdiff3} in action in
 343.156 -figure~\ref{fig:tour-merge:kdiff3}.  The kind of merge it is
 343.157 -performing is called a \emph{three-way merge}, because there are three
 343.158 -different versions of the file of interest to us.  The tool thus
 343.159 -splits the upper portion of the window into three panes:
 343.160 -\begin{itemize}
 343.161 -\item At the left is the \emph{base} version of the file, i.e.~the
 343.162 -  most recent version from which the two versions we're trying to
 343.163 -  merge are descended.
 343.164 -\item In the middle is ``our'' version of the file, with the contents
 343.165 -  that we modified.
 343.166 -\item On the right is ``their'' version of the file, the one that
 343.167 -  from the changeset that we're trying to merge with.
 343.168 -\end{itemize}
 343.169 -In the pane below these is the current \emph{result} of the merge.
 343.170 -Our task is to replace all of the red text, which indicates unresolved
 343.171 -conflicts, with some sensible merger of the ``ours'' and ``theirs''
 343.172 -versions of the file.
 343.173 -
 343.174 -All four of these panes are \emph{locked together}; if we scroll
 343.175 -vertically or horizontally in any of them, the others are updated to
 343.176 -display the corresponding sections of their respective files.
 343.177 -
 343.178 -\begin{figure}[ht]
 343.179 -  \centering
 343.180 -  \grafix{kdiff3}
 343.181 -  \caption{Using \command{kdiff3} to merge versions of a file}
 343.182 -  \label{fig:tour-merge:kdiff3}
 343.183 -\end{figure}
 343.184 -
 343.185 -For each conflicting portion of the file, we can choose to resolve
 343.186 -the conflict using some combination of text from the base version,
 343.187 -ours, or theirs.  We can also manually edit the merged file at any
 343.188 -time, in case we need to make further modifications.
 343.189 -
 343.190 -There are \emph{many} file merging tools available, too many to cover
 343.191 -here.  They vary in which platforms they are available for, and in
 343.192 -their particular strengths and weaknesses.  Most are tuned for merging
 343.193 -files containing plain text, while a few are aimed at specialised file
 343.194 -formats (generally XML).
 343.195 -
 343.196 -\subsection{A worked example}
 343.197 -
 343.198 -In this example, we will reproduce the file modification history of
 343.199 -figure~\ref{fig:tour-merge:conflict} above.  Let's begin by creating a
 343.200 -repository with a base version of our document.
 343.201 -\interaction{tour-merge-conflict.wife}
 343.202 -We'll clone the repository and make a change to the file.
 343.203 -\interaction{tour-merge-conflict.cousin}
 343.204 -And another clone, to simulate someone else making a change to the
 343.205 -file.  (This hints at the idea that it's not all that unusual to merge
 343.206 -with yourself when you isolate tasks in separate repositories, and
 343.207 -indeed to find and resolve conflicts while doing so.)
 343.208 -\interaction{tour-merge-conflict.son}
 343.209 -Having created two different versions of the file, we'll set up an
 343.210 -environment suitable for running our merge.
 343.211 -\interaction{tour-merge-conflict.pull}
 343.212 -
 343.213 -In this example, I won't use Mercurial's normal \command{hgmerge}
 343.214 -program to do the merge, because it would drop my nice automated
 343.215 -example-running tool into a graphical user interface.  Instead, I'll
 343.216 -set \envar{HGMERGE} to tell Mercurial to use the non-interactive
 343.217 -\command{merge} command.  This is bundled with many Unix-like systems.
 343.218 -If you're following this example on your computer, don't bother
 343.219 -setting \envar{HGMERGE}.
 343.220 -\interaction{tour-merge-conflict.merge}
 343.221 -Because \command{merge} can't resolve the conflicting changes, it
 343.222 -leaves \emph{merge markers} inside the file that has conflicts,
 343.223 -indicating which lines have conflicts, and whether they came from our
 343.224 -version of the file or theirs.
 343.225 -
 343.226 -Mercurial can tell from the way \command{merge} exits that it wasn't
 343.227 -able to merge successfully, so it tells us what commands we'll need to
 343.228 -run if we want to redo the merging operation.  This could be useful
 343.229 -if, for example, we were running a graphical merge tool and quit
 343.230 -because we were confused or realised we had made a mistake.
 343.231 -
 343.232 -If automatic or manual merges fail, there's nothing to prevent us from
 343.233 -``fixing up'' the affected files ourselves, and committing the results
 343.234 -of our merge:
 343.235 -\interaction{tour-merge-conflict.commit}
 343.236 -
 343.237 -\section{Simplifying the pull-merge-commit sequence}
 343.238 -\label{sec:tour-merge:fetch}
 343.239 -
 343.240 -The process of merging changes as outlined above is straightforward,
 343.241 -but requires running three commands in sequence.
 343.242 -\begin{codesample2}
 343.243 -  hg pull
 343.244 -  hg merge
 343.245 -  hg commit -m 'Merged remote changes'
 343.246 -\end{codesample2}
 343.247 -In the case of the final commit, you also need to enter a commit
 343.248 -message, which is almost always going to be a piece of uninteresting
 343.249 -``boilerplate'' text.
 343.250 -
 343.251 -It would be nice to reduce the number of steps needed, if this were
 343.252 -possible.  Indeed, Mercurial is distributed with an extension called
 343.253 -\hgext{fetch} that does just this.
 343.254 -
 343.255 -Mercurial provides a flexible extension mechanism that lets people
 343.256 -extend its functionality, while keeping the core of Mercurial small
 343.257 -and easy to deal with.  Some extensions add new commands that you can
 343.258 -use from the command line, while others work ``behind the scenes,''
 343.259 -for example adding capabilities to the server.
 343.260 -
 343.261 -The \hgext{fetch} extension adds a new command called, not
 343.262 -surprisingly, \hgcmd{fetch}.  This extension acts as a combination of
 343.263 -\hgcmd{pull}, \hgcmd{update} and \hgcmd{merge}.  It begins by pulling
 343.264 -changes from another repository into the current repository.  If it
 343.265 -finds that the changes added a new head to the repository, it begins a
 343.266 -merge, then commits the result of the merge with an
 343.267 -automatically-generated commit message.  If no new heads were added,
 343.268 -it updates the working directory to the new tip changeset.
 343.269 -
 343.270 -Enabling the \hgext{fetch} extension is easy.  Edit your
 343.271 -\sfilename{.hgrc}, and either go to the \rcsection{extensions} section
 343.272 -or create an \rcsection{extensions} section.  Then add a line that
 343.273 -simply reads ``\Verb+fetch +''.
 343.274 -\begin{codesample2}
 343.275 -  [extensions]
 343.276 -  fetch =
 343.277 -\end{codesample2}
 343.278 -(Normally, on the right-hand side of the ``\texttt{=}'' would appear
 343.279 -the location of the extension, but since the \hgext{fetch} extension
 343.280 -is in the standard distribution, Mercurial knows where to search for
 343.281 -it.)
 343.282 -
 343.283 -%%% Local Variables: 
 343.284 -%%% mode: latex
 343.285 -%%% TeX-master: "00book"
 343.286 -%%% End: 
   344.1 --- a/en/undo-manual-merge.dot	Thu Mar 26 08:57:10 2009 +0100
   344.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   344.3 @@ -1,8 +0,0 @@
   344.4 -digraph undo_manual {
   344.5 -	"first change" -> "second change";
   344.6 -	"second change" -> "third change";
   344.7 -	backout [label="back out\nsecond change", shape=box];
   344.8 -	"second change" -> backout;
   344.9 -	"third change" -> "manual\nmerge";
  344.10 -	backout -> "manual\nmerge";
  344.11 -}
   345.1 --- a/en/undo-manual.dot	Thu Mar 26 08:57:10 2009 +0100
   345.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   345.3 @@ -1,6 +0,0 @@
   345.4 -digraph undo_manual {
   345.5 -	"first change" -> "second change";
   345.6 -	"second change" -> "third change";
   345.7 -	backout [label="back out\nsecond change", shape=box];
   345.8 -	"second change" -> backout;
   345.9 -}
   346.1 --- a/en/undo-non-tip.dot	Thu Mar 26 08:57:10 2009 +0100
   346.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   346.3 @@ -1,9 +0,0 @@
   346.4 -digraph undo_non_tip {
   346.5 -	"first change" -> "second change";
   346.6 -	"second change" -> "third change";
   346.7 -	backout [label="back out\nsecond change", shape=box];
   346.8 -	"second change" -> backout;
   346.9 -	merge [label="automated\nmerge", shape=box];
  346.10 -	"third change" -> merge;
  346.11 -	backout -> merge;
  346.12 -}
   347.1 --- a/en/undo-simple.dot	Thu Mar 26 08:57:10 2009 +0100
   347.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   347.3 @@ -1,4 +0,0 @@
   347.4 -digraph undo_simple {
   347.5 -	"first change" -> "second change";
   347.6 -	"second change" -> "back out\nsecond change";
   347.7 -}
   348.1 --- a/en/undo.tex	Thu Mar 26 08:57:10 2009 +0100
   348.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   348.3 @@ -1,767 +0,0 @@
   348.4 -\chapter{Finding and fixing your mistakes}
   348.5 -\label{chap:undo}
   348.6 -
   348.7 -To err might be human, but to really handle the consequences well
   348.8 -takes a top-notch revision control system.  In this chapter, we'll
   348.9 -discuss some of the techniques you can use when you find that a
  348.10 -problem has crept into your project.  Mercurial has some highly
  348.11 -capable features that will help you to isolate the sources of
  348.12 -problems, and to handle them appropriately.
  348.13 -
  348.14 -\section{Erasing local history}
  348.15 -
  348.16 -\subsection{The accidental commit}
  348.17 -
  348.18 -I have the occasional but persistent problem of typing rather more
  348.19 -quickly than I can think, which sometimes results in me committing a
  348.20 -changeset that is either incomplete or plain wrong.  In my case, the
  348.21 -usual kind of incomplete changeset is one in which I've created a new
  348.22 -source file, but forgotten to \hgcmd{add} it.  A ``plain wrong''
  348.23 -changeset is not as common, but no less annoying.
  348.24 -
  348.25 -\subsection{Rolling back a transaction}
  348.26 -\label{sec:undo:rollback}
  348.27 -
  348.28 -In section~\ref{sec:concepts:txn}, I mentioned that Mercurial treats
  348.29 -each modification of a repository as a \emph{transaction}.  Every time
  348.30 -you commit a changeset or pull changes from another repository,
  348.31 -Mercurial remembers what you did.  You can undo, or \emph{roll back},
  348.32 -exactly one of these actions using the \hgcmd{rollback} command.  (See
  348.33 -section~\ref{sec:undo:rollback-after-push} for an important caveat
  348.34 -about the use of this command.)
  348.35 -
  348.36 -Here's a mistake that I often find myself making: committing a change
  348.37 -in which I've created a new file, but forgotten to \hgcmd{add} it.
  348.38 -\interaction{rollback.commit}
  348.39 -Looking at the output of \hgcmd{status} after the commit immediately
  348.40 -confirms the error.
  348.41 -\interaction{rollback.status}
  348.42 -The commit captured the changes to the file \filename{a}, but not the
  348.43 -new file \filename{b}.  If I were to push this changeset to a
  348.44 -repository that I shared with a colleague, the chances are high that
  348.45 -something in \filename{a} would refer to \filename{b}, which would not
  348.46 -be present in their repository when they pulled my changes.  I would
  348.47 -thus become the object of some indignation.
  348.48 -
  348.49 -However, luck is with me---I've caught my error before I pushed the
  348.50 -changeset.  I use the \hgcmd{rollback} command, and Mercurial makes
  348.51 -that last changeset vanish.
  348.52 -\interaction{rollback.rollback}
  348.53 -Notice that the changeset is no longer present in the repository's
  348.54 -history, and the working directory once again thinks that the file
  348.55 -\filename{a} is modified.  The commit and rollback have left the
  348.56 -working directory exactly as it was prior to the commit; the changeset
  348.57 -has been completely erased.  I can now safely \hgcmd{add} the file
  348.58 -\filename{b}, and rerun my commit.
  348.59 -\interaction{rollback.add}
  348.60 -
  348.61 -\subsection{The erroneous pull}
  348.62 -
  348.63 -It's common practice with Mercurial to maintain separate development
  348.64 -branches of a project in different repositories.  Your development
  348.65 -team might have one shared repository for your project's ``0.9''
  348.66 -release, and another, containing different changes, for the ``1.0''
  348.67 -release.
  348.68 -
  348.69 -Given this, you can imagine that the consequences could be messy if
  348.70 -you had a local ``0.9'' repository, and accidentally pulled changes
  348.71 -from the shared ``1.0'' repository into it.  At worst, you could be
  348.72 -paying insufficient attention, and push those changes into the shared
  348.73 -``0.9'' tree, confusing your entire team (but don't worry, we'll
  348.74 -return to this horror scenario later).  However, it's more likely that
  348.75 -you'll notice immediately, because Mercurial will display the URL it's
  348.76 -pulling from, or you will see it pull a suspiciously large number of
  348.77 -changes into the repository.
  348.78 -
  348.79 -The \hgcmd{rollback} command will work nicely to expunge all of the
  348.80 -changesets that you just pulled.  Mercurial groups all changes from
  348.81 -one \hgcmd{pull} into a single transaction, so one \hgcmd{rollback} is
  348.82 -all you need to undo this mistake.
  348.83 -
  348.84 -\subsection{Rolling back is useless once you've pushed}
  348.85 -\label{sec:undo:rollback-after-push}
  348.86 -
  348.87 -The value of the \hgcmd{rollback} command drops to zero once you've
  348.88 -pushed your changes to another repository.  Rolling back a change
  348.89 -makes it disappear entirely, but \emph{only} in the repository in
  348.90 -which you perform the \hgcmd{rollback}.  Because a rollback eliminates
  348.91 -history, there's no way for the disappearance of a change to propagate
  348.92 -between repositories.
  348.93 -
  348.94 -If you've pushed a change to another repository---particularly if it's
  348.95 -a shared repository---it has essentially ``escaped into the wild,''
  348.96 -and you'll have to recover from your mistake in a different way.  What
  348.97 -will happen if you push a changeset somewhere, then roll it back, then
  348.98 -pull from the repository you pushed to, is that the changeset will
  348.99 -reappear in your repository.
 348.100 -
 348.101 -(If you absolutely know for sure that the change you want to roll back
 348.102 -is the most recent change in the repository that you pushed to,
 348.103 -\emph{and} you know that nobody else could have pulled it from that
 348.104 -repository, you can roll back the changeset there, too, but you really
 348.105 -should really not rely on this working reliably.  If you do this,
 348.106 -sooner or later a change really will make it into a repository that
 348.107 -you don't directly control (or have forgotten about), and come back to
 348.108 -bite you.)
 348.109 -
 348.110 -\subsection{You can only roll back once}
 348.111 -
 348.112 -Mercurial stores exactly one transaction in its transaction log; that
 348.113 -transaction is the most recent one that occurred in the repository.
 348.114 -This means that you can only roll back one transaction.  If you expect
 348.115 -to be able to roll back one transaction, then its predecessor, this is
 348.116 -not the behaviour you will get.
 348.117 -\interaction{rollback.twice}
 348.118 -Once you've rolled back one transaction in a repository, you can't
 348.119 -roll back again in that repository until you perform another commit or
 348.120 -pull.
 348.121 -
 348.122 -\section{Reverting the mistaken change}
 348.123 -
 348.124 -If you make a modification to a file, and decide that you really
 348.125 -didn't want to change the file at all, and you haven't yet committed
 348.126 -your changes, the \hgcmd{revert} command is the one you'll need.  It
 348.127 -looks at the changeset that's the parent of the working directory, and
 348.128 -restores the contents of the file to their state as of that changeset.
 348.129 -(That's a long-winded way of saying that, in the normal case, it
 348.130 -undoes your modifications.)
 348.131 -
 348.132 -Let's illustrate how the \hgcmd{revert} command works with yet another
 348.133 -small example.  We'll begin by modifying a file that Mercurial is
 348.134 -already tracking.
 348.135 -\interaction{daily.revert.modify}
 348.136 -If we don't want that change, we can simply \hgcmd{revert} the file.
 348.137 -\interaction{daily.revert.unmodify}
 348.138 -The \hgcmd{revert} command provides us with an extra degree of safety
 348.139 -by saving our modified file with a \filename{.orig} extension.
 348.140 -\interaction{daily.revert.status}
 348.141 -
 348.142 -Here is a summary of the cases that the \hgcmd{revert} command can
 348.143 -deal with.  We will describe each of these in more detail in the
 348.144 -section that follows.
 348.145 -\begin{itemize}
 348.146 -\item If you modify a file, it will restore the file to its unmodified
 348.147 -  state.
 348.148 -\item If you \hgcmd{add} a file, it will undo the ``added'' state of
 348.149 -  the file, but leave the file itself untouched.
 348.150 -\item If you delete a file without telling Mercurial, it will restore
 348.151 -  the file to its unmodified contents.
 348.152 -\item If you use the \hgcmd{remove} command to remove a file, it will
 348.153 -  undo the ``removed'' state of the file, and restore the file to its
 348.154 -  unmodified contents.
 348.155 -\end{itemize}
 348.156 -
 348.157 -\subsection{File management errors}
 348.158 -\label{sec:undo:mgmt}
 348.159 -
 348.160 -The \hgcmd{revert} command is useful for more than just modified
 348.161 -files.  It lets you reverse the results of all of Mercurial's file
 348.162 -management commands---\hgcmd{add}, \hgcmd{remove}, and so on.
 348.163 -
 348.164 -If you \hgcmd{add} a file, then decide that in fact you don't want
 348.165 -Mercurial to track it, use \hgcmd{revert} to undo the add.  Don't
 348.166 -worry; Mercurial will not modify the file in any way.  It will just
 348.167 -``unmark'' the file.
 348.168 -\interaction{daily.revert.add}
 348.169 -
 348.170 -Similarly, if you ask Mercurial to \hgcmd{remove} a file, you can use
 348.171 -\hgcmd{revert} to restore it to the contents it had as of the parent
 348.172 -of the working directory.
 348.173 -\interaction{daily.revert.remove}
 348.174 -This works just as well for a file that you deleted by hand, without
 348.175 -telling Mercurial (recall that in Mercurial terminology, this kind of
 348.176 -file is called ``missing'').
 348.177 -\interaction{daily.revert.missing}
 348.178 -
 348.179 -If you revert a \hgcmd{copy}, the copied-to file remains in your
 348.180 -working directory afterwards, untracked.  Since a copy doesn't affect
 348.181 -the copied-from file in any way, Mercurial doesn't do anything with
 348.182 -the copied-from file.
 348.183 -\interaction{daily.revert.copy}
 348.184 -
 348.185 -\subsubsection{A slightly special case: reverting a rename}
 348.186 -
 348.187 -If you \hgcmd{rename} a file, there is one small detail that
 348.188 -you should remember.  When you \hgcmd{revert} a rename, it's not
 348.189 -enough to provide the name of the renamed-to file, as you can see
 348.190 -here.
 348.191 -\interaction{daily.revert.rename}
 348.192 -As you can see from the output of \hgcmd{status}, the renamed-to file
 348.193 -is no longer identified as added, but the renamed-\emph{from} file is
 348.194 -still removed!  This is counter-intuitive (at least to me), but at
 348.195 -least it's easy to deal with.
 348.196 -\interaction{daily.revert.rename-orig}
 348.197 -So remember, to revert a \hgcmd{rename}, you must provide \emph{both}
 348.198 -the source and destination names.  
 348.199 -
 348.200 -% TODO: the output doesn't look like it will be removed!
 348.201 -
 348.202 -(By the way, if you rename a file, then modify the renamed-to file,
 348.203 -then revert both components of the rename, when Mercurial restores the
 348.204 -file that was removed as part of the rename, it will be unmodified.
 348.205 -If you need the modifications in the renamed-to file to show up in the
 348.206 -renamed-from file, don't forget to copy them over.)
 348.207 -
 348.208 -These fiddly aspects of reverting a rename arguably constitute a small
 348.209 -bug in Mercurial.
 348.210 -
 348.211 -\section{Dealing with committed changes}
 348.212 -
 348.213 -Consider a case where you have committed a change $a$, and another
 348.214 -change $b$ on top of it; you then realise that change $a$ was
 348.215 -incorrect.  Mercurial lets you ``back out'' an entire changeset
 348.216 -automatically, and building blocks that let you reverse part of a
 348.217 -changeset by hand.
 348.218 -
 348.219 -Before you read this section, here's something to keep in mind: the
 348.220 -\hgcmd{backout} command undoes changes by \emph{adding} history, not
 348.221 -by modifying or erasing it.  It's the right tool to use if you're
 348.222 -fixing bugs, but not if you're trying to undo some change that has
 348.223 -catastrophic consequences.  To deal with those, see
 348.224 -section~\ref{sec:undo:aaaiiieee}.
 348.225 -
 348.226 -\subsection{Backing out a changeset}
 348.227 -
 348.228 -The \hgcmd{backout} command lets you ``undo'' the effects of an entire
 348.229 -changeset in an automated fashion.  Because Mercurial's history is
 348.230 -immutable, this command \emph{does not} get rid of the changeset you
 348.231 -want to undo.  Instead, it creates a new changeset that
 348.232 -\emph{reverses} the effect of the to-be-undone changeset.
 348.233 -
 348.234 -The operation of the \hgcmd{backout} command is a little intricate, so
 348.235 -let's illustrate it with some examples.  First, we'll create a
 348.236 -repository with some simple changes.
 348.237 -\interaction{backout.init}
 348.238 -
 348.239 -The \hgcmd{backout} command takes a single changeset ID as its
 348.240 -argument; this is the changeset to back out.  Normally,
 348.241 -\hgcmd{backout} will drop you into a text editor to write a commit
 348.242 -message, so you can record why you're backing the change out.  In this
 348.243 -example, we provide a commit message on the command line using the
 348.244 -\hgopt{backout}{-m} option.
 348.245 -
 348.246 -\subsection{Backing out the tip changeset}
 348.247 -
 348.248 -We're going to start by backing out the last changeset we committed.
 348.249 -\interaction{backout.simple}
 348.250 -You can see that the second line from \filename{myfile} is no longer
 348.251 -present.  Taking a look at the output of \hgcmd{log} gives us an idea
 348.252 -of what the \hgcmd{backout} command has done.
 348.253 -\interaction{backout.simple.log}
 348.254 -Notice that the new changeset that \hgcmd{backout} has created is a
 348.255 -child of the changeset we backed out.  It's easier to see this in
 348.256 -figure~\ref{fig:undo:backout}, which presents a graphical view of the
 348.257 -change history.  As you can see, the history is nice and linear.
 348.258 -
 348.259 -\begin{figure}[htb]
 348.260 -  \centering
 348.261 -  \grafix{undo-simple}
 348.262 -  \caption{Backing out a change using the \hgcmd{backout} command}
 348.263 -  \label{fig:undo:backout}
 348.264 -\end{figure}
 348.265 -
 348.266 -\subsection{Backing out a non-tip change}
 348.267 -
 348.268 -If you want to back out a change other than the last one you
 348.269 -committed, pass the \hgopt{backout}{--merge} option to the
 348.270 -\hgcmd{backout} command.
 348.271 -\interaction{backout.non-tip.clone}
 348.272 -This makes backing out any changeset a ``one-shot'' operation that's
 348.273 -usually simple and fast.
 348.274 -\interaction{backout.non-tip.backout}
 348.275 -
 348.276 -If you take a look at the contents of \filename{myfile} after the
 348.277 -backout finishes, you'll see that the first and third changes are
 348.278 -present, but not the second.
 348.279 -\interaction{backout.non-tip.cat}
 348.280 -
 348.281 -As the graphical history in figure~\ref{fig:undo:backout-non-tip}
 348.282 -illustrates, Mercurial actually commits \emph{two} changes in this
 348.283 -kind of situation (the box-shaped nodes are the ones that Mercurial
 348.284 -commits automatically).  Before Mercurial begins the backout process,
 348.285 -it first remembers what the current parent of the working directory
 348.286 -is.  It then backs out the target changeset, and commits that as a
 348.287 -changeset.  Finally, it merges back to the previous parent of the
 348.288 -working directory, and commits the result of the merge.
 348.289 -
 348.290 -% TODO: to me it looks like mercurial doesn't commit the second merge automatically!
 348.291 -
 348.292 -\begin{figure}[htb]
 348.293 -  \centering
 348.294 -  \grafix{undo-non-tip}
 348.295 -  \caption{Automated backout of a non-tip change using the \hgcmd{backout} command}
 348.296 -  \label{fig:undo:backout-non-tip}
 348.297 -\end{figure}
 348.298 -
 348.299 -The result is that you end up ``back where you were'', only with some
 348.300 -extra history that undoes the effect of the changeset you wanted to
 348.301 -back out.
 348.302 -
 348.303 -\subsubsection{Always use the \hgopt{backout}{--merge} option}
 348.304 -
 348.305 -In fact, since the \hgopt{backout}{--merge} option will do the ``right
 348.306 -thing'' whether or not the changeset you're backing out is the tip
 348.307 -(i.e.~it won't try to merge if it's backing out the tip, since there's
 348.308 -no need), you should \emph{always} use this option when you run the
 348.309 -\hgcmd{backout} command.
 348.310 -
 348.311 -\subsection{Gaining more control of the backout process}
 348.312 -
 348.313 -While I've recommended that you always use the
 348.314 -\hgopt{backout}{--merge} option when backing out a change, the
 348.315 -\hgcmd{backout} command lets you decide how to merge a backout
 348.316 -changeset.  Taking control of the backout process by hand is something
 348.317 -you will rarely need to do, but it can be useful to understand what
 348.318 -the \hgcmd{backout} command is doing for you automatically.  To
 348.319 -illustrate this, let's clone our first repository, but omit the
 348.320 -backout change that it contains.
 348.321 -
 348.322 -\interaction{backout.manual.clone}
 348.323 -As with our earlier example, We'll commit a third changeset, then back
 348.324 -out its parent, and see what happens.
 348.325 -\interaction{backout.manual.backout} 
 348.326 -Our new changeset is again a descendant of the changeset we backout
 348.327 -out; it's thus a new head, \emph{not} a descendant of the changeset
 348.328 -that was the tip.  The \hgcmd{backout} command was quite explicit in
 348.329 -telling us this.
 348.330 -\interaction{backout.manual.log}
 348.331 -
 348.332 -Again, it's easier to see what has happened by looking at a graph of
 348.333 -the revision history, in figure~\ref{fig:undo:backout-manual}.  This
 348.334 -makes it clear that when we use \hgcmd{backout} to back out a change
 348.335 -other than the tip, Mercurial adds a new head to the repository (the
 348.336 -change it committed is box-shaped).
 348.337 -
 348.338 -\begin{figure}[htb]
 348.339 -  \centering
 348.340 -  \grafix{undo-manual}
 348.341 -  \caption{Backing out a change using the \hgcmd{backout} command}
 348.342 -  \label{fig:undo:backout-manual}
 348.343 -\end{figure}
 348.344 -
 348.345 -After the \hgcmd{backout} command has completed, it leaves the new
 348.346 -``backout'' changeset as the parent of the working directory.
 348.347 -\interaction{backout.manual.parents}
 348.348 -Now we have two isolated sets of changes.
 348.349 -\interaction{backout.manual.heads}
 348.350 -
 348.351 -Let's think about what we expect to see as the contents of
 348.352 -\filename{myfile} now.  The first change should be present, because
 348.353 -we've never backed it out.  The second change should be missing, as
 348.354 -that's the change we backed out.  Since the history graph shows the
 348.355 -third change as a separate head, we \emph{don't} expect to see the
 348.356 -third change present in \filename{myfile}.
 348.357 -\interaction{backout.manual.cat}
 348.358 -To get the third change back into the file, we just do a normal merge
 348.359 -of our two heads.
 348.360 -\interaction{backout.manual.merge}
 348.361 -Afterwards, the graphical history of our repository looks like
 348.362 -figure~\ref{fig:undo:backout-manual-merge}.
 348.363 -
 348.364 -\begin{figure}[htb]
 348.365 -  \centering
 348.366 -  \grafix{undo-manual-merge}
 348.367 -  \caption{Manually merging a backout change}
 348.368 -  \label{fig:undo:backout-manual-merge}
 348.369 -\end{figure}
 348.370 -
 348.371 -\subsection{Why \hgcmd{backout} works as it does}
 348.372 -
 348.373 -Here's a brief description of how the \hgcmd{backout} command works.
 348.374 -\begin{enumerate}
 348.375 -\item It ensures that the working directory is ``clean'', i.e.~that
 348.376 -  the output of \hgcmd{status} would be empty.
 348.377 -\item It remembers the current parent of the working directory.  Let's
 348.378 -  call this changeset \texttt{orig}
 348.379 -\item It does the equivalent of a \hgcmd{update} to sync the working
 348.380 -  directory to the changeset you want to back out.  Let's call this
 348.381 -  changeset \texttt{backout}
 348.382 -\item It finds the parent of that changeset.  Let's call that
 348.383 -  changeset \texttt{parent}.
 348.384 -\item For each file that the \texttt{backout} changeset affected, it
 348.385 -  does the equivalent of a \hgcmdargs{revert}{-r parent} on that file,
 348.386 -  to restore it to the contents it had before that changeset was
 348.387 -  committed.
 348.388 -\item It commits the result as a new changeset.  This changeset has
 348.389 -  \texttt{backout} as its parent.
 348.390 -\item If you specify \hgopt{backout}{--merge} on the command line, it
 348.391 -  merges with \texttt{orig}, and commits the result of the merge.
 348.392 -\end{enumerate}
 348.393 -
 348.394 -An alternative way to implement the \hgcmd{backout} command would be
 348.395 -to \hgcmd{export} the to-be-backed-out changeset as a diff, then use
 348.396 -the \cmdopt{patch}{--reverse} option to the \command{patch} command to
 348.397 -reverse the effect of the change without fiddling with the working
 348.398 -directory.  This sounds much simpler, but it would not work nearly as
 348.399 -well.
 348.400 -
 348.401 -The reason that \hgcmd{backout} does an update, a commit, a merge, and
 348.402 -another commit is to give the merge machinery the best chance to do a
 348.403 -good job when dealing with all the changes \emph{between} the change
 348.404 -you're backing out and the current tip.  
 348.405 -
 348.406 -If you're backing out a changeset that's~100 revisions back in your
 348.407 -project's history, the chances that the \command{patch} command will
 348.408 -be able to apply a reverse diff cleanly are not good, because
 348.409 -intervening changes are likely to have ``broken the context'' that
 348.410 -\command{patch} uses to determine whether it can apply a patch (if
 348.411 -this sounds like gibberish, see \ref{sec:mq:patch} for a
 348.412 -discussion of the \command{patch} command).  Also, Mercurial's merge
 348.413 -machinery will handle files and directories being renamed, permission
 348.414 -changes, and modifications to binary files, none of which
 348.415 -\command{patch} can deal with.
 348.416 -
 348.417 -\section{Changes that should never have been}
 348.418 -\label{sec:undo:aaaiiieee}
 348.419 -
 348.420 -Most of the time, the \hgcmd{backout} command is exactly what you need
 348.421 -if you want to undo the effects of a change.  It leaves a permanent
 348.422 -record of exactly what you did, both when committing the original
 348.423 -changeset and when you cleaned up after it.
 348.424 -
 348.425 -On rare occasions, though, you may find that you've committed a change
 348.426 -that really should not be present in the repository at all.  For
 348.427 -example, it would be very unusual, and usually considered a mistake,
 348.428 -to commit a software project's object files as well as its source
 348.429 -files.  Object files have almost no intrinsic value, and they're
 348.430 -\emph{big}, so they increase the size of the repository and the amount
 348.431 -of time it takes to clone or pull changes.
 348.432 -
 348.433 -Before I discuss the options that you have if you commit a ``brown
 348.434 -paper bag'' change (the kind that's so bad that you want to pull a
 348.435 -brown paper bag over your head), let me first discuss some approaches
 348.436 -that probably won't work.
 348.437 -
 348.438 -Since Mercurial treats history as accumulative---every change builds
 348.439 -on top of all changes that preceded it---you generally can't just make
 348.440 -disastrous changes disappear.  The one exception is when you've just
 348.441 -committed a change, and it hasn't been pushed or pulled into another
 348.442 -repository.  That's when you can safely use the \hgcmd{rollback}
 348.443 -command, as I detailed in section~\ref{sec:undo:rollback}.
 348.444 -
 348.445 -After you've pushed a bad change to another repository, you
 348.446 -\emph{could} still use \hgcmd{rollback} to make your local copy of the
 348.447 -change disappear, but it won't have the consequences you want.  The
 348.448 -change will still be present in the remote repository, so it will
 348.449 -reappear in your local repository the next time you pull.
 348.450 -
 348.451 -If a situation like this arises, and you know which repositories your
 348.452 -bad change has propagated into, you can \emph{try} to get rid of the
 348.453 -changeefrom \emph{every} one of those repositories.  This is, of
 348.454 -course, not a satisfactory solution: if you miss even a single
 348.455 -repository while you're expunging, the change is still ``in the
 348.456 -wild'', and could propagate further.
 348.457 -
 348.458 -If you've committed one or more changes \emph{after} the change that
 348.459 -you'd like to see disappear, your options are further reduced.
 348.460 -Mercurial doesn't provide a way to ``punch a hole'' in history,
 348.461 -leaving changesets intact.
 348.462 -
 348.463 -XXX This needs filling out.  The \texttt{hg-replay} script in the
 348.464 -\texttt{examples} directory works, but doesn't handle merge
 348.465 -changesets.  Kind of an important omission.
 348.466 -
 348.467 -\subsection{Protect yourself from ``escaped'' changes}
 348.468 -
 348.469 -If you've committed some changes to your local repository and they've
 348.470 -been pushed or pulled somewhere else, this isn't necessarily a
 348.471 -disaster.  You can protect yourself ahead of time against some classes
 348.472 -of bad changeset.  This is particularly easy if your team usually
 348.473 -pulls changes from a central repository.
 348.474 -
 348.475 -By configuring some hooks on that repository to validate incoming
 348.476 -changesets (see chapter~\ref{chap:hook}), you can automatically
 348.477 -prevent some kinds of bad changeset from being pushed to the central
 348.478 -repository at all.  With such a configuration in place, some kinds of
 348.479 -bad changeset will naturally tend to ``die out'' because they can't
 348.480 -propagate into the central repository.  Better yet, this happens
 348.481 -without any need for explicit intervention.
 348.482 -
 348.483 -For instance, an incoming change hook that verifies that a changeset
 348.484 -will actually compile can prevent people from inadvertantly ``breaking
 348.485 -the build''.
 348.486 -
 348.487 -\section{Finding the source of a bug}
 348.488 -\label{sec:undo:bisect}
 348.489 -
 348.490 -While it's all very well to be able to back out a changeset that
 348.491 -introduced a bug, this requires that you know which changeset to back
 348.492 -out.  Mercurial provides an invaluable command, called
 348.493 -\hgcmd{bisect}, that helps you to automate this process and accomplish
 348.494 -it very efficiently.
 348.495 -
 348.496 -The idea behind the \hgcmd{bisect} command is that a changeset has
 348.497 -introduced some change of behaviour that you can identify with a
 348.498 -simple binary test.  You don't know which piece of code introduced the
 348.499 -change, but you know how to test for the presence of the bug.  The
 348.500 -\hgcmd{bisect} command uses your test to direct its search for the
 348.501 -changeset that introduced the code that caused the bug.
 348.502 -
 348.503 -Here are a few scenarios to help you understand how you might apply
 348.504 -this command.
 348.505 -\begin{itemize}
 348.506 -\item The most recent version of your software has a bug that you
 348.507 -  remember wasn't present a few weeks ago, but you don't know when it
 348.508 -  was introduced.  Here, your binary test checks for the presence of
 348.509 -  that bug.
 348.510 -\item You fixed a bug in a rush, and now it's time to close the entry
 348.511 -  in your team's bug database.  The bug database requires a changeset
 348.512 -  ID when you close an entry, but you don't remember which changeset
 348.513 -  you fixed the bug in.  Once again, your binary test checks for the
 348.514 -  presence of the bug.
 348.515 -\item Your software works correctly, but runs~15\% slower than the
 348.516 -  last time you measured it.  You want to know which changeset
 348.517 -  introduced the performance regression.  In this case, your binary
 348.518 -  test measures the performance of your software, to see whether it's
 348.519 -  ``fast'' or ``slow''.
 348.520 -\item The sizes of the components of your project that you ship
 348.521 -  exploded recently, and you suspect that something changed in the way
 348.522 -  you build your project.
 348.523 -\end{itemize}
 348.524 -
 348.525 -From these examples, it should be clear that the \hgcmd{bisect}
 348.526 -command is not useful only for finding the sources of bugs.  You can
 348.527 -use it to find any ``emergent property'' of a repository (anything
 348.528 -that you can't find from a simple text search of the files in the
 348.529 -tree) for which you can write a binary test.
 348.530 -
 348.531 -We'll introduce a little bit of terminology here, just to make it
 348.532 -clear which parts of the search process are your responsibility, and
 348.533 -which are Mercurial's.  A \emph{test} is something that \emph{you} run
 348.534 -when \hgcmd{bisect} chooses a changeset.  A \emph{probe} is what
 348.535 -\hgcmd{bisect} runs to tell whether a revision is good.  Finally,
 348.536 -we'll use the word ``bisect'', as both a noun and a verb, to stand in
 348.537 -for the phrase ``search using the \hgcmd{bisect} command.
 348.538 -
 348.539 -One simple way to automate the searching process would be simply to
 348.540 -probe every changeset.  However, this scales poorly.  If it took ten
 348.541 -minutes to test a single changeset, and you had 10,000 changesets in
 348.542 -your repository, the exhaustive approach would take on average~35
 348.543 -\emph{days} to find the changeset that introduced a bug.  Even if you
 348.544 -knew that the bug was introduced by one of the last 500 changesets,
 348.545 -and limited your search to those, you'd still be looking at over 40
 348.546 -hours to find the changeset that introduced your bug.
 348.547 -
 348.548 -What the \hgcmd{bisect} command does is use its knowledge of the
 348.549 -``shape'' of your project's revision history to perform a search in
 348.550 -time proportional to the \emph{logarithm} of the number of changesets
 348.551 -to check (the kind of search it performs is called a dichotomic
 348.552 -search).  With this approach, searching through 10,000 changesets will
 348.553 -take less than three hours, even at ten minutes per test (the search
 348.554 -will require about 14 tests).  Limit your search to the last hundred
 348.555 -changesets, and it will take only about an hour (roughly seven tests).
 348.556 -
 348.557 -The \hgcmd{bisect} command is aware of the ``branchy'' nature of a
 348.558 -Mercurial project's revision history, so it has no problems dealing
 348.559 -with branches, merges, or multiple heads in a repository.  It can
 348.560 -prune entire branches of history with a single probe, which is how it
 348.561 -operates so efficiently.
 348.562 -
 348.563 -\subsection{Using the \hgcmd{bisect} command}
 348.564 -
 348.565 -Here's an example of \hgcmd{bisect} in action.
 348.566 -
 348.567 -\begin{note}
 348.568 -  In versions 0.9.5 and earlier of Mercurial, \hgcmd{bisect} was not a
 348.569 -  core command: it was distributed with Mercurial as an extension.
 348.570 -  This section describes the built-in command, not the old extension.
 348.571 -\end{note}
 348.572 -
 348.573 -Now let's create a repository, so that we can try out the
 348.574 -\hgcmd{bisect} command in isolation.
 348.575 -\interaction{bisect.init}
 348.576 -We'll simulate a project that has a bug in it in a simple-minded way:
 348.577 -create trivial changes in a loop, and nominate one specific change
 348.578 -that will have the ``bug''.  This loop creates 35 changesets, each
 348.579 -adding a single file to the repository.  We'll represent our ``bug''
 348.580 -with a file that contains the text ``i have a gub''.
 348.581 -\interaction{bisect.commits}
 348.582 -
 348.583 -The next thing that we'd like to do is figure out how to use the
 348.584 -\hgcmd{bisect} command.  We can use Mercurial's normal built-in help
 348.585 -mechanism for this.
 348.586 -\interaction{bisect.help}
 348.587 -
 348.588 -The \hgcmd{bisect} command works in steps.  Each step proceeds as follows.
 348.589 -\begin{enumerate}
 348.590 -\item You run your binary test.
 348.591 -  \begin{itemize}
 348.592 -  \item If the test succeeded, you tell \hgcmd{bisect} by running the
 348.593 -    \hgcmdargs{bisect}{good} command.
 348.594 -  \item If it failed, run the \hgcmdargs{bisect}{--bad} command.
 348.595 -  \end{itemize}
 348.596 -\item The command uses your information to decide which changeset to
 348.597 -  test next.
 348.598 -\item It updates the working directory to that changeset, and the
 348.599 -  process begins again.
 348.600 -\end{enumerate}
 348.601 -The process ends when \hgcmd{bisect} identifies a unique changeset
 348.602 -that marks the point where your test transitioned from ``succeeding''
 348.603 -to ``failing''.
 348.604 -
 348.605 -To start the search, we must run the \hgcmdargs{bisect}{--reset} command.
 348.606 -\interaction{bisect.search.init}
 348.607 -
 348.608 -In our case, the binary test we use is simple: we check to see if any
 348.609 -file in the repository contains the string ``i have a gub''.  If it
 348.610 -does, this changeset contains the change that ``caused the bug''.  By
 348.611 -convention, a changeset that has the property we're searching for is
 348.612 -``bad'', while one that doesn't is ``good''.
 348.613 -
 348.614 -Most of the time, the revision to which the working directory is
 348.615 -synced (usually the tip) already exhibits the problem introduced by
 348.616 -the buggy change, so we'll mark it as ``bad''.
 348.617 -\interaction{bisect.search.bad-init}
 348.618 -
 348.619 -Our next task is to nominate a changeset that we know \emph{doesn't}
 348.620 -have the bug; the \hgcmd{bisect} command will ``bracket'' its search
 348.621 -between the first pair of good and bad changesets.  In our case, we
 348.622 -know that revision~10 didn't have the bug.  (I'll have more words
 348.623 -about choosing the first ``good'' changeset later.)
 348.624 -\interaction{bisect.search.good-init}
 348.625 -
 348.626 -Notice that this command printed some output.
 348.627 -\begin{itemize}
 348.628 -\item It told us how many changesets it must consider before it can
 348.629 -  identify the one that introduced the bug, and how many tests that
 348.630 -  will require.
 348.631 -\item It updated the working directory to the next changeset to test,
 348.632 -  and told us which changeset it's testing.
 348.633 -\end{itemize}
 348.634 -
 348.635 -We now run our test in the working directory.  We use the
 348.636 -\command{grep} command to see if our ``bad'' file is present in the
 348.637 -working directory.  If it is, this revision is bad; if not, this
 348.638 -revision is good.
 348.639 -\interaction{bisect.search.step1}
 348.640 -
 348.641 -This test looks like a perfect candidate for automation, so let's turn
 348.642 -it into a shell function.
 348.643 -\interaction{bisect.search.mytest}
 348.644 -We can now run an entire test step with a single command,
 348.645 -\texttt{mytest}.
 348.646 -\interaction{bisect.search.step2}
 348.647 -A few more invocations of our canned test step command, and we're
 348.648 -done.
 348.649 -\interaction{bisect.search.rest}
 348.650 -
 348.651 -Even though we had~40 changesets to search through, the \hgcmd{bisect}
 348.652 -command let us find the changeset that introduced our ``bug'' with
 348.653 -only five tests.  Because the number of tests that the \hgcmd{bisect}
 348.654 -command performs grows logarithmically with the number of changesets to
 348.655 -search, the advantage that it has over the ``brute force'' search
 348.656 -approach increases with every changeset you add.
 348.657 -
 348.658 -\subsection{Cleaning up after your search}
 348.659 -
 348.660 -When you're finished using the \hgcmd{bisect} command in a
 348.661 -repository, you can use the \hgcmdargs{bisect}{reset} command to drop
 348.662 -the information it was using to drive your search.  The command
 348.663 -doesn't use much space, so it doesn't matter if you forget to run this
 348.664 -command.  However, \hgcmd{bisect} won't let you start a new search in
 348.665 -that repository until you do a \hgcmdargs{bisect}{reset}.
 348.666 -\interaction{bisect.search.reset}
 348.667 -
 348.668 -\section{Tips for finding bugs effectively}
 348.669 -
 348.670 -\subsection{Give consistent input}
 348.671 -
 348.672 -The \hgcmd{bisect} command requires that you correctly report the
 348.673 -result of every test you perform.  If you tell it that a test failed
 348.674 -when it really succeeded, it \emph{might} be able to detect the
 348.675 -inconsistency.  If it can identify an inconsistency in your reports,
 348.676 -it will tell you that a particular changeset is both good and bad.
 348.677 -However, it can't do this perfectly; it's about as likely to report
 348.678 -the wrong changeset as the source of the bug.
 348.679 -
 348.680 -\subsection{Automate as much as possible}
 348.681 -
 348.682 -When I started using the \hgcmd{bisect} command, I tried a few times
 348.683 -to run my tests by hand, on the command line.  This is an approach
 348.684 -that I, at least, am not suited to.  After a few tries, I found that I
 348.685 -was making enough mistakes that I was having to restart my searches
 348.686 -several times before finally getting correct results.
 348.687 -
 348.688 -My initial problems with driving the \hgcmd{bisect} command by hand
 348.689 -occurred even with simple searches on small repositories; if the
 348.690 -problem you're looking for is more subtle, or the number of tests that
 348.691 -\hgcmd{bisect} must perform increases, the likelihood of operator
 348.692 -error ruining the search is much higher.  Once I started automating my
 348.693 -tests, I had much better results.
 348.694 -
 348.695 -The key to automated testing is twofold:
 348.696 -\begin{itemize}
 348.697 -\item always test for the same symptom, and
 348.698 -\item always feed consistent input to the \hgcmd{bisect} command.
 348.699 -\end{itemize}
 348.700 -In my tutorial example above, the \command{grep} command tests for the
 348.701 -symptom, and the \texttt{if} statement takes the result of this check
 348.702 -and ensures that we always feed the same input to the \hgcmd{bisect}
 348.703 -command.  The \texttt{mytest} function marries these together in a
 348.704 -reproducible way, so that every test is uniform and consistent.
 348.705 -
 348.706 -\subsection{Check your results}
 348.707 -
 348.708 -Because the output of a \hgcmd{bisect} search is only as good as the
 348.709 -input you give it, don't take the changeset it reports as the
 348.710 -absolute truth.  A simple way to cross-check its report is to manually
 348.711 -run your test at each of the following changesets:
 348.712 -\begin{itemize}
 348.713 -\item The changeset that it reports as the first bad revision.  Your
 348.714 -  test should still report this as bad.
 348.715 -\item The parent of that changeset (either parent, if it's a merge).
 348.716 -  Your test should report this changeset as good.
 348.717 -\item A child of that changeset.  Your test should report this
 348.718 -  changeset as bad.
 348.719 -\end{itemize}
 348.720 -
 348.721 -\subsection{Beware interference between bugs}
 348.722 -
 348.723 -It's possible that your search for one bug could be disrupted by the
 348.724 -presence of another.  For example, let's say your software crashes at
 348.725 -revision 100, and worked correctly at revision 50.  Unknown to you,
 348.726 -someone else introduced a different crashing bug at revision 60, and
 348.727 -fixed it at revision 80.  This could distort your results in one of
 348.728 -several ways.
 348.729 -
 348.730 -It is possible that this other bug completely ``masks'' yours, which
 348.731 -is to say that it occurs before your bug has a chance to manifest
 348.732 -itself.  If you can't avoid that other bug (for example, it prevents
 348.733 -your project from building), and so can't tell whether your bug is
 348.734 -present in a particular changeset, the \hgcmd{bisect} command cannot
 348.735 -help you directly.  Instead, you can mark a changeset as untested by
 348.736 -running \hgcmdargs{bisect}{--skip}.
 348.737 -
 348.738 -A different problem could arise if your test for a bug's presence is
 348.739 -not specific enough.  If you check for ``my program crashes'', then
 348.740 -both your crashing bug and an unrelated crashing bug that masks it
 348.741 -will look like the same thing, and mislead \hgcmd{bisect}.
 348.742 -
 348.743 -Another useful situation in which to use \hgcmdargs{bisect}{--skip} is
 348.744 -if you can't test a revision because your project was in a broken and
 348.745 -hence untestable state at that revision, perhaps because someone
 348.746 -checked in a change that prevented the project from building.
 348.747 -
 348.748 -\subsection{Bracket your search lazily}
 348.749 -
 348.750 -Choosing the first ``good'' and ``bad'' changesets that will mark the
 348.751 -end points of your search is often easy, but it bears a little
 348.752 -discussion nevertheless.  From the perspective of \hgcmd{bisect}, the
 348.753 -``newest'' changeset is conventionally ``bad'', and the older
 348.754 -changeset is ``good''.
 348.755 -
 348.756 -If you're having trouble remembering when a suitable ``good'' change
 348.757 -was, so that you can tell \hgcmd{bisect}, you could do worse than
 348.758 -testing changesets at random.  Just remember to eliminate contenders
 348.759 -that can't possibly exhibit the bug (perhaps because the feature with
 348.760 -the bug isn't present yet) and those where another problem masks the
 348.761 -bug (as I discussed above).
 348.762 -
 348.763 -Even if you end up ``early'' by thousands of changesets or months of
 348.764 -history, you will only add a handful of tests to the total number that
 348.765 -\hgcmd{bisect} must perform, thanks to its logarithmic behaviour.
 348.766 -
 348.767 -%%% Local Variables: 
 348.768 -%%% mode: latex
 348.769 -%%% TeX-master: "00book"
 348.770 -%%% End: 
   349.1 --- a/en/wdir-after-commit.svg	Thu Mar 26 08:57:10 2009 +0100
   349.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   349.3 @@ -1,394 +0,0 @@
   349.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   349.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   349.6 -<svg
   349.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   349.8 -   xmlns:cc="http://web.resource.org/cc/"
   349.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  349.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  349.11 -   xmlns="http://www.w3.org/2000/svg"
  349.12 -   xmlns:xlink="http://www.w3.org/1999/xlink"
  349.13 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  349.14 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  349.15 -   width="744.09448819"
  349.16 -   height="1052.3622047"
  349.17 -   id="svg5971"
  349.18 -   sodipodi:version="0.32"
  349.19 -   inkscape:version="0.44.1"
  349.20 -   sodipodi:docbase="/home/bos/hg/hgbook/en"
  349.21 -   sodipodi:docname="wdir-after-commit.svg">
  349.22 -  <defs
  349.23 -     id="defs5973">
  349.24 -    <linearGradient
  349.25 -       inkscape:collect="always"
  349.26 -       xlink:href="#linearGradient6049"
  349.27 -       id="linearGradient6445"
  349.28 -       gradientUnits="userSpaceOnUse"
  349.29 -       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  349.30 -       x1="333.91171"
  349.31 -       y1="488.79077"
  349.32 -       x2="508.94543"
  349.33 -       y2="263.79077" />
  349.34 -    <marker
  349.35 -       inkscape:stockid="Arrow1Mstart"
  349.36 -       orient="auto"
  349.37 -       refY="0.0"
  349.38 -       refX="0.0"
  349.39 -       id="Arrow1Mstart"
  349.40 -       style="overflow:visible">
  349.41 -      <path
  349.42 -         id="path4855"
  349.43 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  349.44 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  349.45 -         transform="scale(0.4) translate(10,0)" />
  349.46 -    </marker>
  349.47 -    <linearGradient
  349.48 -       id="linearGradient6049">
  349.49 -      <stop
  349.50 -         style="stop-color:#686868;stop-opacity:1;"
  349.51 -         offset="0"
  349.52 -         id="stop6051" />
  349.53 -      <stop
  349.54 -         style="stop-color:#f0f0f0;stop-opacity:1;"
  349.55 -         offset="1"
  349.56 -         id="stop6053" />
  349.57 -    </linearGradient>
  349.58 -    <marker
  349.59 -       inkscape:stockid="Arrow1Mend"
  349.60 -       orient="auto"
  349.61 -       refY="0.0"
  349.62 -       refX="0.0"
  349.63 -       id="Arrow1Mend"
  349.64 -       style="overflow:visible;">
  349.65 -      <path
  349.66 -         id="path4852"
  349.67 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  349.68 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  349.69 -         transform="scale(0.4) rotate(180) translate(10,0)" />
  349.70 -    </marker>
  349.71 -    <linearGradient
  349.72 -       inkscape:collect="always"
  349.73 -       xlink:href="#linearGradient6049"
  349.74 -       id="linearGradient6083"
  349.75 -       gradientUnits="userSpaceOnUse"
  349.76 -       gradientTransform="translate(-240.0462,-8.633237e-6)"
  349.77 -       x1="333.91171"
  349.78 -       y1="488.79077"
  349.79 -       x2="508.94543"
  349.80 -       y2="263.79077" />
  349.81 -    <linearGradient
  349.82 -       inkscape:collect="always"
  349.83 -       xlink:href="#linearGradient6049"
  349.84 -       id="linearGradient6142"
  349.85 -       gradientUnits="userSpaceOnUse"
  349.86 -       gradientTransform="translate(-42.00893,-30.49544)"
  349.87 -       x1="333.91171"
  349.88 -       y1="488.79077"
  349.89 -       x2="508.94543"
  349.90 -       y2="263.79077" />
  349.91 -    <linearGradient
  349.92 -       inkscape:collect="always"
  349.93 -       xlink:href="#linearGradient6049"
  349.94 -       id="linearGradient6193"
  349.95 -       gradientUnits="userSpaceOnUse"
  349.96 -       gradientTransform="translate(-240.0462,-8.633237e-6)"
  349.97 -       x1="333.91171"
  349.98 -       y1="488.79077"
  349.99 -       x2="508.94543"
 349.100 -       y2="263.79077" />
 349.101 -    <linearGradient
 349.102 -       inkscape:collect="always"
 349.103 -       xlink:href="#linearGradient6049"
 349.104 -       id="linearGradient6216"
 349.105 -       gradientUnits="userSpaceOnUse"
 349.106 -       gradientTransform="translate(-6.0462,-0.664361)"
 349.107 -       x1="333.91171"
 349.108 -       y1="488.79077"
 349.109 -       x2="508.94543"
 349.110 -       y2="263.79077" />
 349.111 -    <linearGradient
 349.112 -       inkscape:collect="always"
 349.113 -       xlink:href="#linearGradient6049"
 349.114 -       id="linearGradient6232"
 349.115 -       gradientUnits="userSpaceOnUse"
 349.116 -       gradientTransform="matrix(1.000474,0,0,0.790947,222.8399,50.85693)"
 349.117 -       x1="333.91171"
 349.118 -       y1="488.79077"
 349.119 -       x2="508.94543"
 349.120 -       y2="263.79077" />
 349.121 -    <linearGradient
 349.122 -       inkscape:collect="always"
 349.123 -       xlink:href="#linearGradient6049"
 349.124 -       id="linearGradient6772"
 349.125 -       gradientUnits="userSpaceOnUse"
 349.126 -       gradientTransform="matrix(1.000474,0,0,0.790947,222.8399,50.85693)"
 349.127 -       x1="333.91171"
 349.128 -       y1="488.79077"
 349.129 -       x2="508.94543"
 349.130 -       y2="263.79077" />
 349.131 -  </defs>
 349.132 -  <sodipodi:namedview
 349.133 -     id="base"
 349.134 -     pagecolor="#ffffff"
 349.135 -     bordercolor="#666666"
 349.136 -     borderopacity="1.0"
 349.137 -     gridtolerance="10000"
 349.138 -     guidetolerance="10"
 349.139 -     objecttolerance="10"
 349.140 -     inkscape:pageopacity="0.0"
 349.141 -     inkscape:pageshadow="2"
 349.142 -     inkscape:zoom="0.90509668"
 349.143 -     inkscape:cx="390.0539"
 349.144 -     inkscape:cy="690.49342"
 349.145 -     inkscape:document-units="px"
 349.146 -     inkscape:current-layer="layer1"
 349.147 -     showguides="true"
 349.148 -     inkscape:guide-bbox="true"
 349.149 -     inkscape:window-width="906"
 349.150 -     inkscape:window-height="620"
 349.151 -     inkscape:window-x="0"
 349.152 -     inkscape:window-y="25">
 349.153 -    <sodipodi:guide
 349.154 -       orientation="vertical"
 349.155 -       position="-1.4285714"
 349.156 -       id="guide6022" />
 349.157 -  </sodipodi:namedview>
 349.158 -  <metadata
 349.159 -     id="metadata5976">
 349.160 -    <rdf:RDF>
 349.161 -      <cc:Work
 349.162 -         rdf:about="">
 349.163 -        <dc:format>image/svg+xml</dc:format>
 349.164 -        <dc:type
 349.165 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 349.166 -      </cc:Work>
 349.167 -    </rdf:RDF>
 349.168 -  </metadata>
 349.169 -  <g
 349.170 -     inkscape:label="Layer 1"
 349.171 -     inkscape:groupmode="layer"
 349.172 -     id="layer1">
 349.173 -    <rect
 349.174 -       y="245.98355"
 349.175 -       x="328.23956"
 349.176 -       height="258.57144"
 349.177 -       width="174.28572"
 349.178 -       id="rect6047"
 349.179 -       style="fill:url(#linearGradient6216);fill-opacity:1;stroke:#686868;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 349.180 -    <g
 349.181 -       id="g6261"
 349.182 -       transform="translate(234,0)">
 349.183 -      <rect
 349.184 -         y="258.7149"
 349.185 -         x="114.11369"
 349.186 -         height="44.537449"
 349.187 -         width="134.53746"
 349.188 -         id="rect5983"
 349.189 -         style="fill:#b1b1b1;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 349.190 -      <text
 349.191 -         id="text5985"
 349.192 -         y="284.47562"
 349.193 -         x="138.7962"
 349.194 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 349.195 -         xml:space="preserve"><tspan
 349.196 -           style="font-family:Courier"
 349.197 -           y="284.47562"
 349.198 -           x="138.7962"
 349.199 -           id="tspan5987"
 349.200 -           sodipodi:role="line">dfbbb33f3fa3</tspan></text>
 349.201 -    </g>
 349.202 -    <rect
 349.203 -       style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 349.204 -       id="rect5996"
 349.205 -       width="134.53746"
 349.206 -       height="44.537449"
 349.207 -       x="348.11371"
 349.208 -       y="320.38159" />
 349.209 -    <text
 349.210 -       xml:space="preserve"
 349.211 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 349.212 -       x="372.7962"
 349.213 -       y="346.1423"
 349.214 -       id="text5998"><tspan
 349.215 -         sodipodi:role="line"
 349.216 -         id="tspan6000"
 349.217 -         x="372.7962"
 349.218 -         y="346.1423"
 349.219 -         style="font-family:Courier">e7639888bb2f</tspan></text>
 349.220 -    <rect
 349.221 -       style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 349.222 -       id="rect6004"
 349.223 -       width="134.53746"
 349.224 -       height="44.537449"
 349.225 -       x="348.11371"
 349.226 -       y="382.04825" />
 349.227 -    <text
 349.228 -       xml:space="preserve"
 349.229 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 349.230 -       x="370.65421"
 349.231 -       y="407.80896"
 349.232 -       id="text6006"><tspan
 349.233 -         sodipodi:role="line"
 349.234 -         id="tspan6008"
 349.235 -         x="370.65421"
 349.236 -         y="407.80896"
 349.237 -         style="font-family:Courier">7b064d8bac5e</tspan></text>
 349.238 -    <path
 349.239 -       inkscape:connector-type="polyline"
 349.240 -       id="path6018"
 349.241 -       d="M 415.38242,303.62646 L 415.38242,320.00744"
 349.242 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 349.243 -    <path
 349.244 -       inkscape:connection-end="#rect6004"
 349.245 -       inkscape:connector-type="polyline"
 349.246 -       id="path6020"
 349.247 -       d="M 415.38242,365.29315 L 415.38243,381.67412"
 349.248 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 349.249 -    <rect
 349.250 -       style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 349.251 -       id="rect6039"
 349.252 -       width="134.53746"
 349.253 -       height="44.537449"
 349.254 -       x="348.11359"
 349.255 -       y="443.71487" />
 349.256 -    <text
 349.257 -       xml:space="preserve"
 349.258 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 349.259 -       x="372.79706"
 349.260 -       y="469.47556"
 349.261 -       id="text6041"><tspan
 349.262 -         sodipodi:role="line"
 349.263 -         id="tspan6043"
 349.264 -         x="372.79706"
 349.265 -         y="469.47556"
 349.266 -         style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 349.267 -    <path
 349.268 -       inkscape:connection-end="#rect6039"
 349.269 -       inkscape:connector-type="polyline"
 349.270 -       id="path6045"
 349.271 -       d="M 415.38238,426.95981 L 415.38235,443.34087"
 349.272 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 349.273 -    <text
 349.274 -       xml:space="preserve"
 349.275 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 349.276 -       x="327.66046"
 349.277 -       y="231.36218"
 349.278 -       id="text6102"><tspan
 349.279 -         sodipodi:role="line"
 349.280 -         id="tspan6104"
 349.281 -         x="327.66046"
 349.282 -         y="231.36218">History in repository</tspan></text>
 349.283 -    <rect
 349.284 -       y="245.94225"
 349.285 -       x="557.28418"
 349.286 -       height="204.51619"
 349.287 -       width="174.36833"
 349.288 -       id="rect6140"
 349.289 -       style="fill:url(#linearGradient6232);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 349.290 -    <g
 349.291 -       id="g6130"
 349.292 -       transform="translate(262.3254,24.38544)">
 349.293 -      <rect
 349.294 -         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 349.295 -         id="rect6106"
 349.296 -         width="134.53746"
 349.297 -         height="44.537449"
 349.298 -         x="314.87415"
 349.299 -         y="257.95059" />
 349.300 -      <text
 349.301 -         xml:space="preserve"
 349.302 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 349.303 -         x="339.55664"
 349.304 -         y="283.7113"
 349.305 -         id="text6108"><tspan
 349.306 -           sodipodi:role="line"
 349.307 -           id="tspan6110"
 349.308 -           x="339.55664"
 349.309 -           y="283.7113"
 349.310 -           style="font-family:Courier">dfbbb33f3fa3</tspan></text>
 349.311 -    </g>
 349.312 -    <g
 349.313 -       id="g6135"
 349.314 -       transform="translate(263.0396,49.83106)">
 349.315 -      <rect
 349.316 -         inkscape:transform-center-y="102.85714"
 349.317 -         inkscape:transform-center-x="129.28571"
 349.318 -         style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 349.319 -         id="rect6112"
 349.320 -         width="134.53746"
 349.321 -         height="44.537449"
 349.322 -         x="314.15985"
 349.323 -         y="326.52203" />
 349.324 -      <text
 349.325 -         inkscape:transform-center-y="102.7311"
 349.326 -         inkscape:transform-center-x="128.69672"
 349.327 -         xml:space="preserve"
 349.328 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 349.329 -         x="338.84335"
 349.330 -         y="352.28271"
 349.331 -         id="text6114"><tspan
 349.332 -           sodipodi:role="line"
 349.333 -           id="tspan6116"
 349.334 -           x="338.84335"
 349.335 -           y="352.28271"
 349.336 -           style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 349.337 -    </g>
 349.338 -    <text
 349.339 -       xml:space="preserve"
 349.340 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 349.341 -       x="576.63208"
 349.342 -       y="270.479"
 349.343 -       id="text6118"><tspan
 349.344 -         sodipodi:role="line"
 349.345 -         id="tspan6120"
 349.346 -         x="576.63208"
 349.347 -         y="270.479">First parent</tspan></text>
 349.348 -    <text
 349.349 -       xml:space="preserve"
 349.350 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 349.351 -       x="576.07544"
 349.352 -       y="364.49615"
 349.353 -       id="text6122"><tspan
 349.354 -         sodipodi:role="line"
 349.355 -         id="tspan6124"
 349.356 -         x="576.07544"
 349.357 -         y="364.49615">Second parent</tspan></text>
 349.358 -    <text
 349.359 -       xml:space="preserve"
 349.360 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 349.361 -       x="556.61743"
 349.362 -       y="231.36218"
 349.363 -       id="text6195"><tspan
 349.364 -         sodipodi:role="line"
 349.365 -         id="tspan6197"
 349.366 -         x="556.61743"
 349.367 -         y="231.36218">Parents of working directory</tspan></text>
 349.368 -    <path
 349.369 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 349.370 -       d="M 576.82542,297.63008 L 483.02528,287.95831"
 349.371 -       id="path6266"
 349.372 -       inkscape:connector-type="polyline"
 349.373 -       inkscape:connection-start="#g6130"
 349.374 -       inkscape:connection-end="#g6261" />
 349.375 -    <path
 349.376 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 349.377 -       d="M 665.12232,418.17579 L 665.12232,418.17579"
 349.378 -       id="path6270"
 349.379 -       inkscape:connector-type="polyline" />
 349.380 -    <text
 349.381 -       xml:space="preserve"
 349.382 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 349.383 -       x="316.86407"
 349.384 -       y="275.6496"
 349.385 -       id="text6573"><tspan
 349.386 -         sodipodi:role="line"
 349.387 -         id="tspan6575"
 349.388 -         x="316.86407"
 349.389 -         y="275.6496"
 349.390 -         style="text-align:end;text-anchor:end">New</tspan><tspan
 349.391 -         sodipodi:role="line"
 349.392 -         x="316.86407"
 349.393 -         y="290.6496"
 349.394 -         id="tspan6577"
 349.395 -         style="text-align:end;text-anchor:end">changeset</tspan></text>
 349.396 -  </g>
 349.397 -</svg>
   350.1 --- a/en/wdir-branch.svg	Thu Mar 26 08:57:10 2009 +0100
   350.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   350.3 @@ -1,418 +0,0 @@
   350.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   350.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   350.6 -<svg
   350.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   350.8 -   xmlns:cc="http://web.resource.org/cc/"
   350.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  350.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  350.11 -   xmlns="http://www.w3.org/2000/svg"
  350.12 -   xmlns:xlink="http://www.w3.org/1999/xlink"
  350.13 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  350.14 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  350.15 -   width="744.09448819"
  350.16 -   height="1052.3622047"
  350.17 -   id="svg5971"
  350.18 -   sodipodi:version="0.32"
  350.19 -   inkscape:version="0.44.1"
  350.20 -   sodipodi:docbase="/home/bos/hg/hgbook/en"
  350.21 -   sodipodi:docname="wdir-branch.svg">
  350.22 -  <defs
  350.23 -     id="defs5973">
  350.24 -    <marker
  350.25 -       inkscape:stockid="Arrow1Mstart"
  350.26 -       orient="auto"
  350.27 -       refY="0.0"
  350.28 -       refX="0.0"
  350.29 -       id="Arrow1Mstart"
  350.30 -       style="overflow:visible">
  350.31 -      <path
  350.32 -         id="path4855"
  350.33 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  350.34 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  350.35 -         transform="scale(0.4) translate(10,0)" />
  350.36 -    </marker>
  350.37 -    <linearGradient
  350.38 -       id="linearGradient6049">
  350.39 -      <stop
  350.40 -         style="stop-color:#686868;stop-opacity:1;"
  350.41 -         offset="0"
  350.42 -         id="stop6051" />
  350.43 -      <stop
  350.44 -         style="stop-color:#f0f0f0;stop-opacity:1;"
  350.45 -         offset="1"
  350.46 -         id="stop6053" />
  350.47 -    </linearGradient>
  350.48 -    <marker
  350.49 -       inkscape:stockid="Arrow1Mend"
  350.50 -       orient="auto"
  350.51 -       refY="0.0"
  350.52 -       refX="0.0"
  350.53 -       id="Arrow1Mend"
  350.54 -       style="overflow:visible;">
  350.55 -      <path
  350.56 -         id="path4852"
  350.57 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  350.58 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  350.59 -         transform="scale(0.4) rotate(180) translate(10,0)" />
  350.60 -    </marker>
  350.61 -    <linearGradient
  350.62 -       inkscape:collect="always"
  350.63 -       xlink:href="#linearGradient6049"
  350.64 -       id="linearGradient6083"
  350.65 -       gradientUnits="userSpaceOnUse"
  350.66 -       gradientTransform="translate(-240.0462,-8.633237e-6)"
  350.67 -       x1="333.91171"
  350.68 -       y1="488.79077"
  350.69 -       x2="508.94543"
  350.70 -       y2="263.79077" />
  350.71 -    <linearGradient
  350.72 -       inkscape:collect="always"
  350.73 -       xlink:href="#linearGradient6049"
  350.74 -       id="linearGradient6142"
  350.75 -       gradientUnits="userSpaceOnUse"
  350.76 -       gradientTransform="translate(-42.00893,-30.49544)"
  350.77 -       x1="333.91171"
  350.78 -       y1="488.79077"
  350.79 -       x2="508.94543"
  350.80 -       y2="263.79077" />
  350.81 -    <linearGradient
  350.82 -       inkscape:collect="always"
  350.83 -       xlink:href="#linearGradient6049"
  350.84 -       id="linearGradient6193"
  350.85 -       gradientUnits="userSpaceOnUse"
  350.86 -       gradientTransform="translate(-240.0462,-8.633237e-6)"
  350.87 -       x1="333.91171"
  350.88 -       y1="488.79077"
  350.89 -       x2="508.94543"
  350.90 -       y2="263.79077" />
  350.91 -    <linearGradient
  350.92 -       inkscape:collect="always"
  350.93 -       xlink:href="#linearGradient6049"
  350.94 -       id="linearGradient6216"
  350.95 -       gradientUnits="userSpaceOnUse"
  350.96 -       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  350.97 -       x1="333.91171"
  350.98 -       y1="488.79077"
  350.99 -       x2="508.94543"
 350.100 -       y2="263.79077" />
 350.101 -    <linearGradient
 350.102 -       inkscape:collect="always"
 350.103 -       xlink:href="#linearGradient6049"
 350.104 -       id="linearGradient6232"
 350.105 -       gradientUnits="userSpaceOnUse"
 350.106 -       gradientTransform="matrix(1.000473,0,0,0.790947,-11.16012,50.85693)"
 350.107 -       x1="333.91171"
 350.108 -       y1="488.79077"
 350.109 -       x2="508.94543"
 350.110 -       y2="263.79077" />
 350.111 -    <linearGradient
 350.112 -       inkscape:collect="always"
 350.113 -       xlink:href="#linearGradient6049"
 350.114 -       id="linearGradient6445"
 350.115 -       gradientUnits="userSpaceOnUse"
 350.116 -       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
 350.117 -       x1="333.91171"
 350.118 -       y1="488.79077"
 350.119 -       x2="508.94543"
 350.120 -       y2="263.79077" />
 350.121 -    <linearGradient
 350.122 -       inkscape:collect="always"
 350.123 -       xlink:href="#linearGradient6049"
 350.124 -       id="linearGradient6974"
 350.125 -       gradientUnits="userSpaceOnUse"
 350.126 -       gradientTransform="matrix(1.911882,0,0,0.789965,-574.7896,51.22599)"
 350.127 -       x1="333.91171"
 350.128 -       y1="488.79077"
 350.129 -       x2="508.94543"
 350.130 -       y2="263.79077" />
 350.131 -    <linearGradient
 350.132 -       inkscape:collect="always"
 350.133 -       xlink:href="#linearGradient6049"
 350.134 -       id="linearGradient6996"
 350.135 -       gradientUnits="userSpaceOnUse"
 350.136 -       gradientTransform="matrix(1.000473,0,0,0.790947,112.8399,50.85693)"
 350.137 -       x1="333.91171"
 350.138 -       y1="488.79077"
 350.139 -       x2="508.94543"
 350.140 -       y2="263.79077" />
 350.141 -  </defs>
 350.142 -  <sodipodi:namedview
 350.143 -     id="base"
 350.144 -     pagecolor="#ffffff"
 350.145 -     bordercolor="#666666"
 350.146 -     borderopacity="1.0"
 350.147 -     gridtolerance="10000"
 350.148 -     guidetolerance="10"
 350.149 -     objecttolerance="10"
 350.150 -     inkscape:pageopacity="0.0"
 350.151 -     inkscape:pageshadow="2"
 350.152 -     inkscape:zoom="0.90509668"
 350.153 -     inkscape:cx="345.85973"
 350.154 -     inkscape:cy="690.49342"
 350.155 -     inkscape:document-units="px"
 350.156 -     inkscape:current-layer="layer1"
 350.157 -     showguides="true"
 350.158 -     inkscape:guide-bbox="true"
 350.159 -     inkscape:window-width="906"
 350.160 -     inkscape:window-height="620"
 350.161 -     inkscape:window-x="0"
 350.162 -     inkscape:window-y="25">
 350.163 -    <sodipodi:guide
 350.164 -       orientation="vertical"
 350.165 -       position="-1.4285714"
 350.166 -       id="guide6022" />
 350.167 -  </sodipodi:namedview>
 350.168 -  <metadata
 350.169 -     id="metadata5976">
 350.170 -    <rdf:RDF>
 350.171 -      <cc:Work
 350.172 -         rdf:about="">
 350.173 -        <dc:format>image/svg+xml</dc:format>
 350.174 -        <dc:type
 350.175 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 350.176 -      </cc:Work>
 350.177 -    </rdf:RDF>
 350.178 -  </metadata>
 350.179 -  <g
 350.180 -     inkscape:label="Layer 1"
 350.181 -     inkscape:groupmode="layer"
 350.182 -     id="layer1">
 350.183 -    <rect
 350.184 -       y="246.06918"
 350.185 -       x="64.325172"
 350.186 -       height="204.26233"
 350.187 -       width="333.2135"
 350.188 -       id="rect6047"
 350.189 -       style="fill:url(#linearGradient6974);fill-opacity:1;stroke:#686868;stroke-width:0.91925466;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 350.190 -    <g
 350.191 -       id="g1935">
 350.192 -      <rect
 350.193 -         y="266.24374"
 350.194 -         x="84.113708"
 350.195 -         height="44.537449"
 350.196 -         width="134.53746"
 350.197 -         id="rect5996"
 350.198 -         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 350.199 -      <text
 350.200 -         id="text5998"
 350.201 -         y="292.00446"
 350.202 -         x="108.7962"
 350.203 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 350.204 -         xml:space="preserve"><tspan
 350.205 -           style="font-family:Courier"
 350.206 -           y="292.00446"
 350.207 -           x="108.7962"
 350.208 -           id="tspan6000"
 350.209 -           sodipodi:role="line">e7639888bb2f</tspan></text>
 350.210 -    </g>
 350.211 -    <g
 350.212 -       id="g6976"
 350.213 -       transform="translate(70,0)">
 350.214 -      <rect
 350.215 -         y="327.9104"
 350.216 -         x="40.113693"
 350.217 -         height="44.537449"
 350.218 -         width="134.53746"
 350.219 -         id="rect6004"
 350.220 -         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 350.221 -      <text
 350.222 -         id="text6006"
 350.223 -         y="353.67111"
 350.224 -         x="62.654205"
 350.225 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 350.226 -         xml:space="preserve"><tspan
 350.227 -           style="font-family:Courier"
 350.228 -           y="353.67111"
 350.229 -           x="62.654205"
 350.230 -           id="tspan6008"
 350.231 -           sodipodi:role="line">7b064d8bac5e</tspan></text>
 350.232 -    </g>
 350.233 -    <path
 350.234 -       inkscape:connector-type="polyline"
 350.235 -       id="path6020"
 350.236 -       d="M 160.92915,311.15532 L 167.83571,327.53627"
 350.237 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 350.238 -       inkscape:connection-end="#g6976"
 350.239 -       inkscape:connection-start="#g1935" />
 350.240 -    <rect
 350.241 -       style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 350.242 -       id="rect6039"
 350.243 -       width="134.53746"
 350.244 -       height="44.537449"
 350.245 -       x="110.11359"
 350.246 -       y="389.57703" />
 350.247 -    <text
 350.248 -       xml:space="preserve"
 350.249 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 350.250 -       x="134.79706"
 350.251 -       y="415.33771"
 350.252 -       id="text6041"><tspan
 350.253 -         sodipodi:role="line"
 350.254 -         id="tspan6043"
 350.255 -         x="134.79706"
 350.256 -         y="415.33771"
 350.257 -         style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 350.258 -    <path
 350.259 -       inkscape:connection-end="#rect6039"
 350.260 -       inkscape:connector-type="polyline"
 350.261 -       id="path6045"
 350.262 -       d="M 177.38238,372.82195 L 177.38235,389.20303"
 350.263 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 350.264 -    <rect
 350.265 -       y="245.94225"
 350.266 -       x="447.28412"
 350.267 -       height="204.51619"
 350.268 -       width="174.36833"
 350.269 -       id="rect6140"
 350.270 -       style="fill:url(#linearGradient6996);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 350.271 -    <g
 350.272 -       id="g6130"
 350.273 -       transform="translate(152.3254,24.38544)">
 350.274 -      <rect
 350.275 -         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 350.276 -         id="rect6106"
 350.277 -         width="134.53746"
 350.278 -         height="44.537449"
 350.279 -         x="314.87415"
 350.280 -         y="257.95059" />
 350.281 -      <text
 350.282 -         xml:space="preserve"
 350.283 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 350.284 -         x="339.55664"
 350.285 -         y="283.7113"
 350.286 -         id="text6108"><tspan
 350.287 -           sodipodi:role="line"
 350.288 -           id="tspan6110"
 350.289 -           x="339.55664"
 350.290 -           y="283.7113"
 350.291 -           style="font-family:Courier">ffb20e1701ea</tspan></text>
 350.292 -    </g>
 350.293 -    <g
 350.294 -       id="g6135"
 350.295 -       transform="translate(153.0396,49.83106)">
 350.296 -      <rect
 350.297 -         inkscape:transform-center-y="102.85714"
 350.298 -         inkscape:transform-center-x="129.28571"
 350.299 -         style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 350.300 -         id="rect6112"
 350.301 -         width="134.53746"
 350.302 -         height="44.537449"
 350.303 -         x="314.15985"
 350.304 -         y="326.52203" />
 350.305 -      <text
 350.306 -         inkscape:transform-center-y="102.7311"
 350.307 -         inkscape:transform-center-x="128.69672"
 350.308 -         xml:space="preserve"
 350.309 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 350.310 -         x="338.84335"
 350.311 -         y="352.28271"
 350.312 -         id="text6114"><tspan
 350.313 -           sodipodi:role="line"
 350.314 -           id="tspan6116"
 350.315 -           x="338.84335"
 350.316 -           y="352.28271"
 350.317 -           style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 350.318 -    </g>
 350.319 -    <text
 350.320 -       xml:space="preserve"
 350.321 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 350.322 -       x="466.63208"
 350.323 -       y="270.479"
 350.324 -       id="text6118"><tspan
 350.325 -         sodipodi:role="line"
 350.326 -         id="tspan6120"
 350.327 -         x="466.63208"
 350.328 -         y="270.479">First parent</tspan></text>
 350.329 -    <text
 350.330 -       xml:space="preserve"
 350.331 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 350.332 -       x="466.07544"
 350.333 -       y="364.49615"
 350.334 -       id="text6122"><tspan
 350.335 -         sodipodi:role="line"
 350.336 -         id="tspan6124"
 350.337 -         x="466.07544"
 350.338 -         y="364.49615">Second parent</tspan></text>
 350.339 -    <text
 350.340 -       xml:space="preserve"
 350.341 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 350.342 -       x="446.61743"
 350.343 -       y="231.36218"
 350.344 -       id="text6195"><tspan
 350.345 -         sodipodi:role="line"
 350.346 -         id="tspan6197"
 350.347 -         x="446.61743"
 350.348 -         y="231.36218">Parents of working directory</tspan></text>
 350.349 -    <path
 350.350 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 350.351 -       d="M 466.82542,300.21999 L 377.00207,294.39744"
 350.352 -       id="path6266"
 350.353 -       inkscape:connector-type="polyline"
 350.354 -       inkscape:connection-start="#g6130"
 350.355 -       inkscape:connection-end="#rect1925" />
 350.356 -    <path
 350.357 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 350.358 -       d="M 665.12232,418.17579 L 665.12232,418.17579"
 350.359 -       id="path6270"
 350.360 -       inkscape:connector-type="polyline" />
 350.361 -    <g
 350.362 -       id="g2845">
 350.363 -      <rect
 350.364 -         y="266.24374"
 350.365 -         x="242.09048"
 350.366 -         height="44.537449"
 350.367 -         width="134.53746"
 350.368 -         id="rect1925"
 350.369 -         style="fill:#9f9f9f;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 350.370 -      <text
 350.371 -         id="text1927"
 350.372 -         y="292.00446"
 350.373 -         x="266.77298"
 350.374 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 350.375 -         xml:space="preserve"><tspan
 350.376 -           style="font-family:Courier"
 350.377 -           y="292.00446"
 350.378 -           x="266.77298"
 350.379 -           id="tspan1929"
 350.380 -           sodipodi:role="line">ffb20e1701ea</tspan></text>
 350.381 -    </g>
 350.382 -    <path
 350.383 -       inkscape:connector-type="polyline"
 350.384 -       id="path1933"
 350.385 -       d="M 260.89978,311.15532 L 225.84185,327.53627"
 350.386 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 350.387 -       inkscape:connection-end="#g6976" />
 350.388 -    <text
 350.389 -       xml:space="preserve"
 350.390 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 350.391 -       x="109.45568"
 350.392 -       y="231.4554"
 350.393 -       id="text2837"><tspan
 350.394 -         sodipodi:role="line"
 350.395 -         id="tspan2839"
 350.396 -         x="109.45568"
 350.397 -         y="231.4554">Pre-existing head</tspan></text>
 350.398 -    <text
 350.399 -       xml:space="preserve"
 350.400 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 350.401 -       x="237.54184"
 350.402 -       y="231.4554"
 350.403 -       id="text2841"><tspan
 350.404 -         sodipodi:role="line"
 350.405 -         id="tspan2843"
 350.406 -         x="237.54184"
 350.407 -         y="231.4554">Newly created head (and tip)</tspan></text>
 350.408 -    <path
 350.409 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 350.410 -       d="M 148.05048,235.87482 L 149.94915,265.86962"
 350.411 -       id="path2850"
 350.412 -       inkscape:connector-type="polyline"
 350.413 -       inkscape:connection-end="#g1935" />
 350.414 -    <path
 350.415 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 350.416 -       d="M 303.83495,238.08453 L 306.87874,265.86962"
 350.417 -       id="path2852"
 350.418 -       inkscape:connector-type="polyline"
 350.419 -       inkscape:connection-end="#g2845" />
 350.420 -  </g>
 350.421 -</svg>
   351.1 --- a/en/wdir-merge.svg	Thu Mar 26 08:57:10 2009 +0100
   351.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   351.3 @@ -1,425 +0,0 @@
   351.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   351.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   351.6 -<svg
   351.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   351.8 -   xmlns:cc="http://web.resource.org/cc/"
   351.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  351.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  351.11 -   xmlns="http://www.w3.org/2000/svg"
  351.12 -   xmlns:xlink="http://www.w3.org/1999/xlink"
  351.13 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  351.14 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  351.15 -   width="744.09448819"
  351.16 -   height="1052.3622047"
  351.17 -   id="svg5971"
  351.18 -   sodipodi:version="0.32"
  351.19 -   inkscape:version="0.44.1"
  351.20 -   sodipodi:docbase="/home/bos/hg/hgbook/en"
  351.21 -   sodipodi:docname="wdir-merge.svg">
  351.22 -  <defs
  351.23 -     id="defs5973">
  351.24 -    <marker
  351.25 -       inkscape:stockid="Arrow1Mstart"
  351.26 -       orient="auto"
  351.27 -       refY="0.0"
  351.28 -       refX="0.0"
  351.29 -       id="Arrow1Mstart"
  351.30 -       style="overflow:visible">
  351.31 -      <path
  351.32 -         id="path4855"
  351.33 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  351.34 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  351.35 -         transform="scale(0.4) translate(10,0)" />
  351.36 -    </marker>
  351.37 -    <linearGradient
  351.38 -       id="linearGradient6049">
  351.39 -      <stop
  351.40 -         style="stop-color:#686868;stop-opacity:1;"
  351.41 -         offset="0"
  351.42 -         id="stop6051" />
  351.43 -      <stop
  351.44 -         style="stop-color:#f0f0f0;stop-opacity:1;"
  351.45 -         offset="1"
  351.46 -         id="stop6053" />
  351.47 -    </linearGradient>
  351.48 -    <marker
  351.49 -       inkscape:stockid="Arrow1Mend"
  351.50 -       orient="auto"
  351.51 -       refY="0.0"
  351.52 -       refX="0.0"
  351.53 -       id="Arrow1Mend"
  351.54 -       style="overflow:visible;">
  351.55 -      <path
  351.56 -         id="path4852"
  351.57 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  351.58 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  351.59 -         transform="scale(0.4) rotate(180) translate(10,0)" />
  351.60 -    </marker>
  351.61 -    <linearGradient
  351.62 -       inkscape:collect="always"
  351.63 -       xlink:href="#linearGradient6049"
  351.64 -       id="linearGradient6083"
  351.65 -       gradientUnits="userSpaceOnUse"
  351.66 -       gradientTransform="translate(-240.0462,-8.633237e-6)"
  351.67 -       x1="333.91171"
  351.68 -       y1="488.79077"
  351.69 -       x2="508.94543"
  351.70 -       y2="263.79077" />
  351.71 -    <linearGradient
  351.72 -       inkscape:collect="always"
  351.73 -       xlink:href="#linearGradient6049"
  351.74 -       id="linearGradient6142"
  351.75 -       gradientUnits="userSpaceOnUse"
  351.76 -       gradientTransform="translate(-42.00893,-30.49544)"
  351.77 -       x1="333.91171"
  351.78 -       y1="488.79077"
  351.79 -       x2="508.94543"
  351.80 -       y2="263.79077" />
  351.81 -    <linearGradient
  351.82 -       inkscape:collect="always"
  351.83 -       xlink:href="#linearGradient6049"
  351.84 -       id="linearGradient6193"
  351.85 -       gradientUnits="userSpaceOnUse"
  351.86 -       gradientTransform="translate(-240.0462,-8.633237e-6)"
  351.87 -       x1="333.91171"
  351.88 -       y1="488.79077"
  351.89 -       x2="508.94543"
  351.90 -       y2="263.79077" />
  351.91 -    <linearGradient
  351.92 -       inkscape:collect="always"
  351.93 -       xlink:href="#linearGradient6049"
  351.94 -       id="linearGradient6216"
  351.95 -       gradientUnits="userSpaceOnUse"
  351.96 -       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  351.97 -       x1="333.91171"
  351.98 -       y1="488.79077"
  351.99 -       x2="508.94543"
 351.100 -       y2="263.79077" />
 351.101 -    <linearGradient
 351.102 -       inkscape:collect="always"
 351.103 -       xlink:href="#linearGradient6049"
 351.104 -       id="linearGradient6232"
 351.105 -       gradientUnits="userSpaceOnUse"
 351.106 -       gradientTransform="matrix(1.000473,0,0,0.790947,-11.16012,50.85693)"
 351.107 -       x1="333.91171"
 351.108 -       y1="488.79077"
 351.109 -       x2="508.94543"
 351.110 -       y2="263.79077" />
 351.111 -    <linearGradient
 351.112 -       inkscape:collect="always"
 351.113 -       xlink:href="#linearGradient6049"
 351.114 -       id="linearGradient6445"
 351.115 -       gradientUnits="userSpaceOnUse"
 351.116 -       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
 351.117 -       x1="333.91171"
 351.118 -       y1="488.79077"
 351.119 -       x2="508.94543"
 351.120 -       y2="263.79077" />
 351.121 -    <linearGradient
 351.122 -       inkscape:collect="always"
 351.123 -       xlink:href="#linearGradient6049"
 351.124 -       id="linearGradient6974"
 351.125 -       gradientUnits="userSpaceOnUse"
 351.126 -       gradientTransform="matrix(1.911882,0,0,0.789965,-574.7896,51.22599)"
 351.127 -       x1="333.91171"
 351.128 -       y1="488.79077"
 351.129 -       x2="508.94543"
 351.130 -       y2="263.79077" />
 351.131 -    <linearGradient
 351.132 -       inkscape:collect="always"
 351.133 -       xlink:href="#linearGradient6049"
 351.134 -       id="linearGradient6996"
 351.135 -       gradientUnits="userSpaceOnUse"
 351.136 -       gradientTransform="matrix(1.000473,0,0,0.790947,112.8399,50.85693)"
 351.137 -       x1="333.91171"
 351.138 -       y1="488.79077"
 351.139 -       x2="508.94543"
 351.140 -       y2="263.79077" />
 351.141 -  </defs>
 351.142 -  <sodipodi:namedview
 351.143 -     id="base"
 351.144 -     pagecolor="#ffffff"
 351.145 -     bordercolor="#666666"
 351.146 -     borderopacity="1.0"
 351.147 -     gridtolerance="10000"
 351.148 -     guidetolerance="10"
 351.149 -     objecttolerance="10"
 351.150 -     inkscape:pageopacity="0.0"
 351.151 -     inkscape:pageshadow="2"
 351.152 -     inkscape:zoom="1.28"
 351.153 -     inkscape:cx="345.85973"
 351.154 -     inkscape:cy="690.49342"
 351.155 -     inkscape:document-units="px"
 351.156 -     inkscape:current-layer="layer1"
 351.157 -     showguides="true"
 351.158 -     inkscape:guide-bbox="true"
 351.159 -     inkscape:window-width="906"
 351.160 -     inkscape:window-height="620"
 351.161 -     inkscape:window-x="0"
 351.162 -     inkscape:window-y="25">
 351.163 -    <sodipodi:guide
 351.164 -       orientation="vertical"
 351.165 -       position="-1.4285714"
 351.166 -       id="guide6022" />
 351.167 -  </sodipodi:namedview>
 351.168 -  <metadata
 351.169 -     id="metadata5976">
 351.170 -    <rdf:RDF>
 351.171 -      <cc:Work
 351.172 -         rdf:about="">
 351.173 -        <dc:format>image/svg+xml</dc:format>
 351.174 -        <dc:type
 351.175 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 351.176 -      </cc:Work>
 351.177 -    </rdf:RDF>
 351.178 -  </metadata>
 351.179 -  <g
 351.180 -     inkscape:label="Layer 1"
 351.181 -     inkscape:groupmode="layer"
 351.182 -     id="layer1">
 351.183 -    <rect
 351.184 -       y="246.06918"
 351.185 -       x="64.325172"
 351.186 -       height="204.26233"
 351.187 -       width="333.2135"
 351.188 -       id="rect6047"
 351.189 -       style="fill:url(#linearGradient6974);fill-opacity:1;stroke:#686868;stroke-width:0.91925466;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 351.190 -    <g
 351.191 -       id="g6976"
 351.192 -       transform="translate(70,0)">
 351.193 -      <rect
 351.194 -         y="327.9104"
 351.195 -         x="40.113693"
 351.196 -         height="44.537449"
 351.197 -         width="134.53746"
 351.198 -         id="rect6004"
 351.199 -         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 351.200 -      <text
 351.201 -         id="text6006"
 351.202 -         y="353.67111"
 351.203 -         x="62.654205"
 351.204 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 351.205 -         xml:space="preserve"><tspan
 351.206 -           style="font-family:Courier"
 351.207 -           y="353.67111"
 351.208 -           x="62.654205"
 351.209 -           id="tspan6008"
 351.210 -           sodipodi:role="line">7b064d8bac5e</tspan></text>
 351.211 -    </g>
 351.212 -    <path
 351.213 -       inkscape:connector-type="polyline"
 351.214 -       id="path6020"
 351.215 -       d="M 160.92915,311.15532 L 167.83571,327.53627"
 351.216 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 351.217 -       inkscape:connection-end="#g6976"
 351.218 -       inkscape:connection-start="#g1935" />
 351.219 -    <rect
 351.220 -       style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 351.221 -       id="rect6039"
 351.222 -       width="134.53746"
 351.223 -       height="44.537449"
 351.224 -       x="110.11359"
 351.225 -       y="389.57703" />
 351.226 -    <text
 351.227 -       xml:space="preserve"
 351.228 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 351.229 -       x="134.79706"
 351.230 -       y="415.33771"
 351.231 -       id="text6041"><tspan
 351.232 -         sodipodi:role="line"
 351.233 -         id="tspan6043"
 351.234 -         x="134.79706"
 351.235 -         y="415.33771"
 351.236 -         style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 351.237 -    <path
 351.238 -       inkscape:connection-end="#rect6039"
 351.239 -       inkscape:connector-type="polyline"
 351.240 -       id="path6045"
 351.241 -       d="M 177.38238,372.82195 L 177.38235,389.20303"
 351.242 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 351.243 -    <rect
 351.244 -       y="245.94225"
 351.245 -       x="447.28412"
 351.246 -       height="204.51619"
 351.247 -       width="174.36833"
 351.248 -       id="rect6140"
 351.249 -       style="fill:url(#linearGradient6996);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 351.250 -    <g
 351.251 -       id="g6130"
 351.252 -       transform="translate(152.3254,24.38544)">
 351.253 -      <rect
 351.254 -         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 351.255 -         id="rect6106"
 351.256 -         width="134.53746"
 351.257 -         height="44.537449"
 351.258 -         x="314.87415"
 351.259 -         y="257.95059" />
 351.260 -      <text
 351.261 -         xml:space="preserve"
 351.262 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 351.263 -         x="339.55664"
 351.264 -         y="283.7113"
 351.265 -         id="text6108"><tspan
 351.266 -           sodipodi:role="line"
 351.267 -           id="tspan6110"
 351.268 -           x="339.55664"
 351.269 -           y="283.7113"
 351.270 -           style="font-family:Courier">ffb20e1701ea</tspan></text>
 351.271 -    </g>
 351.272 -    <g
 351.273 -       id="g6135"
 351.274 -       transform="translate(153.0396,49.83106)">
 351.275 -      <rect
 351.276 -         inkscape:transform-center-y="102.85714"
 351.277 -         inkscape:transform-center-x="129.28571"
 351.278 -         style="fill:#d4d4d4;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 351.279 -         id="rect6112"
 351.280 -         width="134.53746"
 351.281 -         height="44.537449"
 351.282 -         x="314.15985"
 351.283 -         y="326.52203" />
 351.284 -      <text
 351.285 -         inkscape:transform-center-y="102.7311"
 351.286 -         inkscape:transform-center-x="128.69672"
 351.287 -         xml:space="preserve"
 351.288 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 351.289 -         x="338.84335"
 351.290 -         y="352.28271"
 351.291 -         id="text6114"><tspan
 351.292 -           sodipodi:role="line"
 351.293 -           id="tspan6116"
 351.294 -           x="338.84335"
 351.295 -           y="352.28271"
 351.296 -           style="fill:black;fill-opacity:1;font-family:Courier">e7639888bb2f</tspan></text>
 351.297 -    </g>
 351.298 -    <text
 351.299 -       xml:space="preserve"
 351.300 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 351.301 -       x="466.63208"
 351.302 -       y="270.479"
 351.303 -       id="text6118"><tspan
 351.304 -         sodipodi:role="line"
 351.305 -         id="tspan6120"
 351.306 -         x="466.63208"
 351.307 -         y="270.479">First parent (unchanged)</tspan></text>
 351.308 -    <text
 351.309 -       xml:space="preserve"
 351.310 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 351.311 -       x="466.07544"
 351.312 -       y="364.49615"
 351.313 -       id="text6122"><tspan
 351.314 -         sodipodi:role="line"
 351.315 -         id="tspan6124"
 351.316 -         x="466.07544"
 351.317 -         y="364.49615">Second parent</tspan></text>
 351.318 -    <text
 351.319 -       xml:space="preserve"
 351.320 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 351.321 -       x="446.61743"
 351.322 -       y="231.36218"
 351.323 -       id="text6195"><tspan
 351.324 -         sodipodi:role="line"
 351.325 -         id="tspan6197"
 351.326 -         x="446.61743"
 351.327 -         y="231.36218">Parents of working directory</tspan></text>
 351.328 -    <path
 351.329 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 351.330 -       d="M 466.82542,300.21999 L 377.00207,294.39744"
 351.331 -       id="path6266"
 351.332 -       inkscape:connector-type="polyline"
 351.333 -       inkscape:connection-start="#g6130"
 351.334 -       inkscape:connection-end="#rect1925" />
 351.335 -    <path
 351.336 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 351.337 -       d="M 665.12232,418.17579 L 665.12232,418.17579"
 351.338 -       id="path6270"
 351.339 -       inkscape:connector-type="polyline" />
 351.340 -    <g
 351.341 -       id="g2845">
 351.342 -      <rect
 351.343 -         y="266.24374"
 351.344 -         x="242.09048"
 351.345 -         height="44.537449"
 351.346 -         width="134.53746"
 351.347 -         id="rect1925"
 351.348 -         style="fill:#9f9f9f;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 351.349 -      <text
 351.350 -         id="text1927"
 351.351 -         y="292.00446"
 351.352 -         x="266.77298"
 351.353 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 351.354 -         xml:space="preserve"><tspan
 351.355 -           style="font-family:Courier"
 351.356 -           y="292.00446"
 351.357 -           x="266.77298"
 351.358 -           id="tspan1929"
 351.359 -           sodipodi:role="line">ffb20e1701ea</tspan></text>
 351.360 -    </g>
 351.361 -    <path
 351.362 -       inkscape:connector-type="polyline"
 351.363 -       id="path1933"
 351.364 -       d="M 260.89978,311.15532 L 225.84185,327.53627"
 351.365 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 351.366 -       inkscape:connection-end="#g6976" />
 351.367 -    <text
 351.368 -       xml:space="preserve"
 351.369 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 351.370 -       x="109.45568"
 351.371 -       y="231.4554"
 351.372 -       id="text2837"><tspan
 351.373 -         sodipodi:role="line"
 351.374 -         id="tspan2839"
 351.375 -         x="109.45568"
 351.376 -         y="231.4554">Pre-existing head</tspan></text>
 351.377 -    <text
 351.378 -       xml:space="preserve"
 351.379 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 351.380 -       x="237.54184"
 351.381 -       y="231.4554"
 351.382 -       id="text2841"><tspan
 351.383 -         sodipodi:role="line"
 351.384 -         id="tspan2843"
 351.385 -         x="237.54184"
 351.386 -         y="231.4554">Newly created head (and tip)</tspan></text>
 351.387 -    <path
 351.388 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 351.389 -       d="M 148.05048,235.87482 L 149.94915,265.86962"
 351.390 -       id="path2850"
 351.391 -       inkscape:connector-type="polyline"
 351.392 -       inkscape:connection-end="#g1935" />
 351.393 -    <path
 351.394 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 351.395 -       d="M 303.83495,238.08453 L 306.87874,265.86962"
 351.396 -       id="path2852"
 351.397 -       inkscape:connector-type="polyline"
 351.398 -       inkscape:connection-end="#g2845" />
 351.399 -    <path
 351.400 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 351.401 -       d="M 466.82545,379.17944 L 219.0253,307.95488"
 351.402 -       id="path3016"
 351.403 -       inkscape:connector-type="polyline"
 351.404 -       inkscape:connection-start="#g6135"
 351.405 -       inkscape:connection-end="#g1935" />
 351.406 -    <g
 351.407 -       id="g1935">
 351.408 -      <rect
 351.409 -         y="266.24374"
 351.410 -         x="84.113708"
 351.411 -         height="44.537449"
 351.412 -         width="134.53746"
 351.413 -         id="rect5996"
 351.414 -         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 351.415 -      <text
 351.416 -         id="text5998"
 351.417 -         y="292.00446"
 351.418 -         x="108.7962"
 351.419 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 351.420 -         xml:space="preserve"><tspan
 351.421 -           style="font-family:Courier"
 351.422 -           y="292.00446"
 351.423 -           x="108.7962"
 351.424 -           id="tspan6000"
 351.425 -           sodipodi:role="line">e7639888bb2f</tspan></text>
 351.426 -    </g>
 351.427 -  </g>
 351.428 -</svg>
   352.1 --- a/en/wdir-pre-branch.svg	Thu Mar 26 08:57:10 2009 +0100
   352.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   352.3 @@ -1,364 +0,0 @@
   352.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   352.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   352.6 -<svg
   352.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   352.8 -   xmlns:cc="http://web.resource.org/cc/"
   352.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  352.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  352.11 -   xmlns="http://www.w3.org/2000/svg"
  352.12 -   xmlns:xlink="http://www.w3.org/1999/xlink"
  352.13 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  352.14 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  352.15 -   width="744.09448819"
  352.16 -   height="1052.3622047"
  352.17 -   id="svg5971"
  352.18 -   sodipodi:version="0.32"
  352.19 -   inkscape:version="0.44.1"
  352.20 -   sodipodi:docbase="/home/bos/hg/hgbook/en"
  352.21 -   sodipodi:docname="wdir-branch.svg">
  352.22 -  <defs
  352.23 -     id="defs5973">
  352.24 -    <marker
  352.25 -       inkscape:stockid="Arrow1Mstart"
  352.26 -       orient="auto"
  352.27 -       refY="0.0"
  352.28 -       refX="0.0"
  352.29 -       id="Arrow1Mstart"
  352.30 -       style="overflow:visible">
  352.31 -      <path
  352.32 -         id="path4855"
  352.33 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  352.34 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  352.35 -         transform="scale(0.4) translate(10,0)" />
  352.36 -    </marker>
  352.37 -    <linearGradient
  352.38 -       id="linearGradient6049">
  352.39 -      <stop
  352.40 -         style="stop-color:#686868;stop-opacity:1;"
  352.41 -         offset="0"
  352.42 -         id="stop6051" />
  352.43 -      <stop
  352.44 -         style="stop-color:#f0f0f0;stop-opacity:1;"
  352.45 -         offset="1"
  352.46 -         id="stop6053" />
  352.47 -    </linearGradient>
  352.48 -    <marker
  352.49 -       inkscape:stockid="Arrow1Mend"
  352.50 -       orient="auto"
  352.51 -       refY="0.0"
  352.52 -       refX="0.0"
  352.53 -       id="Arrow1Mend"
  352.54 -       style="overflow:visible;">
  352.55 -      <path
  352.56 -         id="path4852"
  352.57 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  352.58 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  352.59 -         transform="scale(0.4) rotate(180) translate(10,0)" />
  352.60 -    </marker>
  352.61 -    <linearGradient
  352.62 -       inkscape:collect="always"
  352.63 -       xlink:href="#linearGradient6049"
  352.64 -       id="linearGradient6083"
  352.65 -       gradientUnits="userSpaceOnUse"
  352.66 -       gradientTransform="translate(-240.0462,-8.633237e-6)"
  352.67 -       x1="333.91171"
  352.68 -       y1="488.79077"
  352.69 -       x2="508.94543"
  352.70 -       y2="263.79077" />
  352.71 -    <linearGradient
  352.72 -       inkscape:collect="always"
  352.73 -       xlink:href="#linearGradient6049"
  352.74 -       id="linearGradient6142"
  352.75 -       gradientUnits="userSpaceOnUse"
  352.76 -       gradientTransform="translate(-42.00893,-30.49544)"
  352.77 -       x1="333.91171"
  352.78 -       y1="488.79077"
  352.79 -       x2="508.94543"
  352.80 -       y2="263.79077" />
  352.81 -    <linearGradient
  352.82 -       inkscape:collect="always"
  352.83 -       xlink:href="#linearGradient6049"
  352.84 -       id="linearGradient6193"
  352.85 -       gradientUnits="userSpaceOnUse"
  352.86 -       gradientTransform="translate(-240.0462,-8.633237e-6)"
  352.87 -       x1="333.91171"
  352.88 -       y1="488.79077"
  352.89 -       x2="508.94543"
  352.90 -       y2="263.79077" />
  352.91 -    <linearGradient
  352.92 -       inkscape:collect="always"
  352.93 -       xlink:href="#linearGradient6049"
  352.94 -       id="linearGradient6216"
  352.95 -       gradientUnits="userSpaceOnUse"
  352.96 -       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  352.97 -       x1="333.91171"
  352.98 -       y1="488.79077"
  352.99 -       x2="508.94543"
 352.100 -       y2="263.79077" />
 352.101 -    <linearGradient
 352.102 -       inkscape:collect="always"
 352.103 -       xlink:href="#linearGradient6049"
 352.104 -       id="linearGradient6232"
 352.105 -       gradientUnits="userSpaceOnUse"
 352.106 -       gradientTransform="matrix(1.000473,0,0,0.790947,-11.16012,50.85693)"
 352.107 -       x1="333.91171"
 352.108 -       y1="488.79077"
 352.109 -       x2="508.94543"
 352.110 -       y2="263.79077" />
 352.111 -    <linearGradient
 352.112 -       inkscape:collect="always"
 352.113 -       xlink:href="#linearGradient6049"
 352.114 -       id="linearGradient6445"
 352.115 -       gradientUnits="userSpaceOnUse"
 352.116 -       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
 352.117 -       x1="333.91171"
 352.118 -       y1="488.79077"
 352.119 -       x2="508.94543"
 352.120 -       y2="263.79077" />
 352.121 -    <linearGradient
 352.122 -       inkscape:collect="always"
 352.123 -       xlink:href="#linearGradient6049"
 352.124 -       id="linearGradient6974"
 352.125 -       gradientUnits="userSpaceOnUse"
 352.126 -       gradientTransform="matrix(1.000474,0,0,0.790947,-314.246,50.85694)"
 352.127 -       x1="333.91171"
 352.128 -       y1="488.79077"
 352.129 -       x2="508.94543"
 352.130 -       y2="263.79077" />
 352.131 -    <linearGradient
 352.132 -       inkscape:collect="always"
 352.133 -       xlink:href="#linearGradient6049"
 352.134 -       id="linearGradient6996"
 352.135 -       gradientUnits="userSpaceOnUse"
 352.136 -       gradientTransform="matrix(1.000473,0,0,0.790947,-85.16012,50.85693)"
 352.137 -       x1="333.91171"
 352.138 -       y1="488.79077"
 352.139 -       x2="508.94543"
 352.140 -       y2="263.79077" />
 352.141 -  </defs>
 352.142 -  <sodipodi:namedview
 352.143 -     id="base"
 352.144 -     pagecolor="#ffffff"
 352.145 -     bordercolor="#666666"
 352.146 -     borderopacity="1.0"
 352.147 -     gridtolerance="10000"
 352.148 -     guidetolerance="10"
 352.149 -     objecttolerance="10"
 352.150 -     inkscape:pageopacity="0.0"
 352.151 -     inkscape:pageshadow="2"
 352.152 -     inkscape:zoom="0.90509668"
 352.153 -     inkscape:cx="390.0539"
 352.154 -     inkscape:cy="690.49342"
 352.155 -     inkscape:document-units="px"
 352.156 -     inkscape:current-layer="layer1"
 352.157 -     showguides="true"
 352.158 -     inkscape:guide-bbox="true"
 352.159 -     inkscape:window-width="906"
 352.160 -     inkscape:window-height="620"
 352.161 -     inkscape:window-x="0"
 352.162 -     inkscape:window-y="25">
 352.163 -    <sodipodi:guide
 352.164 -       orientation="vertical"
 352.165 -       position="-1.4285714"
 352.166 -       id="guide6022" />
 352.167 -  </sodipodi:namedview>
 352.168 -  <metadata
 352.169 -     id="metadata5976">
 352.170 -    <rdf:RDF>
 352.171 -      <cc:Work
 352.172 -         rdf:about="">
 352.173 -        <dc:format>image/svg+xml</dc:format>
 352.174 -        <dc:type
 352.175 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 352.176 -      </cc:Work>
 352.177 -    </rdf:RDF>
 352.178 -  </metadata>
 352.179 -  <g
 352.180 -     inkscape:label="Layer 1"
 352.181 -     inkscape:groupmode="layer"
 352.182 -     id="layer1">
 352.183 -    <rect
 352.184 -       y="245.94225"
 352.185 -       x="20.198257"
 352.186 -       height="204.51619"
 352.187 -       width="174.36833"
 352.188 -       id="rect6047"
 352.189 -       style="fill:url(#linearGradient6974);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 352.190 -    <rect
 352.191 -       style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 352.192 -       id="rect5996"
 352.193 -       width="134.53746"
 352.194 -       height="44.537449"
 352.195 -       x="40.113693"
 352.196 -       y="266.24374" />
 352.197 -    <text
 352.198 -       xml:space="preserve"
 352.199 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 352.200 -       x="64.796204"
 352.201 -       y="292.00446"
 352.202 -       id="text5998"><tspan
 352.203 -         sodipodi:role="line"
 352.204 -         id="tspan6000"
 352.205 -         x="64.796204"
 352.206 -         y="292.00446"
 352.207 -         style="font-family:Courier">e7639888bb2f</tspan></text>
 352.208 -    <g
 352.209 -       id="g6976">
 352.210 -      <rect
 352.211 -         y="327.9104"
 352.212 -         x="40.113693"
 352.213 -         height="44.537449"
 352.214 -         width="134.53746"
 352.215 -         id="rect6004"
 352.216 -         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 352.217 -      <text
 352.218 -         id="text6006"
 352.219 -         y="353.67111"
 352.220 -         x="62.654205"
 352.221 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 352.222 -         xml:space="preserve"><tspan
 352.223 -           style="font-family:Courier"
 352.224 -           y="353.67111"
 352.225 -           x="62.654205"
 352.226 -           id="tspan6008"
 352.227 -           sodipodi:role="line">7b064d8bac5e</tspan></text>
 352.228 -    </g>
 352.229 -    <path
 352.230 -       inkscape:connection-end="#rect6004"
 352.231 -       inkscape:connector-type="polyline"
 352.232 -       id="path6020"
 352.233 -       d="M 107.38242,311.15529 L 107.38242,327.53626"
 352.234 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 352.235 -    <rect
 352.236 -       style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 352.237 -       id="rect6039"
 352.238 -       width="134.53746"
 352.239 -       height="44.537449"
 352.240 -       x="40.113571"
 352.241 -       y="389.57703" />
 352.242 -    <text
 352.243 -       xml:space="preserve"
 352.244 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 352.245 -       x="64.797073"
 352.246 -       y="415.33771"
 352.247 -       id="text6041"><tspan
 352.248 -         sodipodi:role="line"
 352.249 -         id="tspan6043"
 352.250 -         x="64.797073"
 352.251 -         y="415.33771"
 352.252 -         style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 352.253 -    <path
 352.254 -       inkscape:connection-end="#rect6039"
 352.255 -       inkscape:connector-type="polyline"
 352.256 -       id="path6045"
 352.257 -       d="M 107.38238,372.82195 L 107.38235,389.20301"
 352.258 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 352.259 -    <text
 352.260 -       xml:space="preserve"
 352.261 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 352.262 -       x="19.660461"
 352.263 -       y="231.36218"
 352.264 -       id="text6102"><tspan
 352.265 -         sodipodi:role="line"
 352.266 -         id="tspan6104"
 352.267 -         x="19.660461"
 352.268 -         y="231.36218">History in repository</tspan></text>
 352.269 -    <rect
 352.270 -       y="245.94225"
 352.271 -       x="249.28412"
 352.272 -       height="204.51619"
 352.273 -       width="174.36833"
 352.274 -       id="rect6140"
 352.275 -       style="fill:url(#linearGradient6996);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 352.276 -    <g
 352.277 -       id="g6130"
 352.278 -       transform="translate(-45.67459,24.38544)">
 352.279 -      <rect
 352.280 -         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 352.281 -         id="rect6106"
 352.282 -         width="134.53746"
 352.283 -         height="44.537449"
 352.284 -         x="314.87415"
 352.285 -         y="257.95059" />
 352.286 -      <text
 352.287 -         xml:space="preserve"
 352.288 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 352.289 -         x="339.55664"
 352.290 -         y="283.7113"
 352.291 -         id="text6108"><tspan
 352.292 -           sodipodi:role="line"
 352.293 -           id="tspan6110"
 352.294 -           x="339.55664"
 352.295 -           y="283.7113"
 352.296 -           style="font-family:Courier">7b064d8bac5e</tspan></text>
 352.297 -    </g>
 352.298 -    <g
 352.299 -       id="g6135"
 352.300 -       transform="translate(-44.96042,49.83106)">
 352.301 -      <rect
 352.302 -         inkscape:transform-center-y="102.85714"
 352.303 -         inkscape:transform-center-x="129.28571"
 352.304 -         style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 352.305 -         id="rect6112"
 352.306 -         width="134.53746"
 352.307 -         height="44.537449"
 352.308 -         x="314.15985"
 352.309 -         y="326.52203" />
 352.310 -      <text
 352.311 -         inkscape:transform-center-y="102.7311"
 352.312 -         inkscape:transform-center-x="128.69672"
 352.313 -         xml:space="preserve"
 352.314 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 352.315 -         x="338.84335"
 352.316 -         y="352.28271"
 352.317 -         id="text6114"><tspan
 352.318 -           sodipodi:role="line"
 352.319 -           id="tspan6116"
 352.320 -           x="338.84335"
 352.321 -           y="352.28271"
 352.322 -           style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 352.323 -    </g>
 352.324 -    <text
 352.325 -       xml:space="preserve"
 352.326 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 352.327 -       x="268.63208"
 352.328 -       y="270.479"
 352.329 -       id="text6118"><tspan
 352.330 -         sodipodi:role="line"
 352.331 -         id="tspan6120"
 352.332 -         x="268.63208"
 352.333 -         y="270.479">First parent</tspan></text>
 352.334 -    <text
 352.335 -       xml:space="preserve"
 352.336 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 352.337 -       x="268.07544"
 352.338 -       y="364.49615"
 352.339 -       id="text6122"><tspan
 352.340 -         sodipodi:role="line"
 352.341 -         id="tspan6124"
 352.342 -         x="268.07544"
 352.343 -         y="364.49615">Second parent</tspan></text>
 352.344 -    <text
 352.345 -       xml:space="preserve"
 352.346 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 352.347 -       x="248.61746"
 352.348 -       y="231.36218"
 352.349 -       id="text6195"><tspan
 352.350 -         sodipodi:role="line"
 352.351 -         id="tspan6197"
 352.352 -         x="248.61746"
 352.353 -         y="231.36218">Parents of working directory</tspan></text>
 352.354 -    <path
 352.355 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 352.356 -       d="M 268.82543,318.06163 L 175.02528,336.72225"
 352.357 -       id="path6266"
 352.358 -       inkscape:connector-type="polyline"
 352.359 -       inkscape:connection-end="#g6976"
 352.360 -       inkscape:connection-start="#g6130" />
 352.361 -    <path
 352.362 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 352.363 -       d="M 665.12232,418.17579 L 665.12232,418.17579"
 352.364 -       id="path6270"
 352.365 -       inkscape:connector-type="polyline" />
 352.366 -  </g>
 352.367 -</svg>
   353.1 --- a/en/wdir.svg	Thu Mar 26 08:57:10 2009 +0100
   353.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   353.3 @@ -1,348 +0,0 @@
   353.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   353.5 -<!-- Created with Inkscape (http://www.inkscape.org/) -->
   353.6 -<svg
   353.7 -   xmlns:dc="http://purl.org/dc/elements/1.1/"
   353.8 -   xmlns:cc="http://web.resource.org/cc/"
   353.9 -   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  353.10 -   xmlns:svg="http://www.w3.org/2000/svg"
  353.11 -   xmlns="http://www.w3.org/2000/svg"
  353.12 -   xmlns:xlink="http://www.w3.org/1999/xlink"
  353.13 -   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  353.14 -   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  353.15 -   width="744.09448819"
  353.16 -   height="1052.3622047"
  353.17 -   id="svg5971"
  353.18 -   sodipodi:version="0.32"
  353.19 -   inkscape:version="0.44.1"
  353.20 -   sodipodi:docbase="/home/bos/hg/hgbook/en"
  353.21 -   sodipodi:docname="wdir.svg">
  353.22 -  <defs
  353.23 -     id="defs5973">
  353.24 -    <marker
  353.25 -       inkscape:stockid="Arrow1Mstart"
  353.26 -       orient="auto"
  353.27 -       refY="0.0"
  353.28 -       refX="0.0"
  353.29 -       id="Arrow1Mstart"
  353.30 -       style="overflow:visible">
  353.31 -      <path
  353.32 -         id="path4855"
  353.33 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  353.34 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  353.35 -         transform="scale(0.4) translate(10,0)" />
  353.36 -    </marker>
  353.37 -    <linearGradient
  353.38 -       id="linearGradient6049">
  353.39 -      <stop
  353.40 -         style="stop-color:#686868;stop-opacity:1;"
  353.41 -         offset="0"
  353.42 -         id="stop6051" />
  353.43 -      <stop
  353.44 -         style="stop-color:#f0f0f0;stop-opacity:1;"
  353.45 -         offset="1"
  353.46 -         id="stop6053" />
  353.47 -    </linearGradient>
  353.48 -    <marker
  353.49 -       inkscape:stockid="Arrow1Mend"
  353.50 -       orient="auto"
  353.51 -       refY="0.0"
  353.52 -       refX="0.0"
  353.53 -       id="Arrow1Mend"
  353.54 -       style="overflow:visible;">
  353.55 -      <path
  353.56 -         id="path4852"
  353.57 -         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  353.58 -         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  353.59 -         transform="scale(0.4) rotate(180) translate(10,0)" />
  353.60 -    </marker>
  353.61 -    <linearGradient
  353.62 -       inkscape:collect="always"
  353.63 -       xlink:href="#linearGradient6049"
  353.64 -       id="linearGradient6083"
  353.65 -       gradientUnits="userSpaceOnUse"
  353.66 -       gradientTransform="translate(-240.0462,-8.633237e-6)"
  353.67 -       x1="333.91171"
  353.68 -       y1="488.79077"
  353.69 -       x2="508.94543"
  353.70 -       y2="263.79077" />
  353.71 -    <linearGradient
  353.72 -       inkscape:collect="always"
  353.73 -       xlink:href="#linearGradient6049"
  353.74 -       id="linearGradient6142"
  353.75 -       gradientUnits="userSpaceOnUse"
  353.76 -       gradientTransform="translate(-42.00893,-30.49544)"
  353.77 -       x1="333.91171"
  353.78 -       y1="488.79077"
  353.79 -       x2="508.94543"
  353.80 -       y2="263.79077" />
  353.81 -    <linearGradient
  353.82 -       inkscape:collect="always"
  353.83 -       xlink:href="#linearGradient6049"
  353.84 -       id="linearGradient6193"
  353.85 -       gradientUnits="userSpaceOnUse"
  353.86 -       gradientTransform="translate(-240.0462,-8.633237e-6)"
  353.87 -       x1="333.91171"
  353.88 -       y1="488.79077"
  353.89 -       x2="508.94543"
  353.90 -       y2="263.79077" />
  353.91 -    <linearGradient
  353.92 -       inkscape:collect="always"
  353.93 -       xlink:href="#linearGradient6049"
  353.94 -       id="linearGradient6216"
  353.95 -       gradientUnits="userSpaceOnUse"
  353.96 -       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  353.97 -       x1="333.91171"
  353.98 -       y1="488.79077"
  353.99 -       x2="508.94543"
 353.100 -       y2="263.79077" />
 353.101 -    <linearGradient
 353.102 -       inkscape:collect="always"
 353.103 -       xlink:href="#linearGradient6049"
 353.104 -       id="linearGradient6232"
 353.105 -       gradientUnits="userSpaceOnUse"
 353.106 -       gradientTransform="matrix(1.000473,0,0,0.790947,-11.16012,50.85693)"
 353.107 -       x1="333.91171"
 353.108 -       y1="488.79077"
 353.109 -       x2="508.94543"
 353.110 -       y2="263.79077" />
 353.111 -    <linearGradient
 353.112 -       inkscape:collect="always"
 353.113 -       xlink:href="#linearGradient6049"
 353.114 -       id="linearGradient6445"
 353.115 -       gradientUnits="userSpaceOnUse"
 353.116 -       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
 353.117 -       x1="333.91171"
 353.118 -       y1="488.79077"
 353.119 -       x2="508.94543"
 353.120 -       y2="263.79077" />
 353.121 -  </defs>
 353.122 -  <sodipodi:namedview
 353.123 -     id="base"
 353.124 -     pagecolor="#ffffff"
 353.125 -     bordercolor="#666666"
 353.126 -     borderopacity="1.0"
 353.127 -     gridtolerance="10000"
 353.128 -     guidetolerance="10"
 353.129 -     objecttolerance="10"
 353.130 -     inkscape:pageopacity="0.0"
 353.131 -     inkscape:pageshadow="2"
 353.132 -     inkscape:zoom="0.90509668"
 353.133 -     inkscape:cx="390.0539"
 353.134 -     inkscape:cy="690.49342"
 353.135 -     inkscape:document-units="px"
 353.136 -     inkscape:current-layer="layer1"
 353.137 -     showguides="true"
 353.138 -     inkscape:guide-bbox="true"
 353.139 -     inkscape:window-width="906"
 353.140 -     inkscape:window-height="620"
 353.141 -     inkscape:window-x="0"
 353.142 -     inkscape:window-y="25">
 353.143 -    <sodipodi:guide
 353.144 -       orientation="vertical"
 353.145 -       position="-1.4285714"
 353.146 -       id="guide6022" />
 353.147 -  </sodipodi:namedview>
 353.148 -  <metadata
 353.149 -     id="metadata5976">
 353.150 -    <rdf:RDF>
 353.151 -      <cc:Work
 353.152 -         rdf:about="">
 353.153 -        <dc:format>image/svg+xml</dc:format>
 353.154 -        <dc:type
 353.155 -           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 353.156 -      </cc:Work>
 353.157 -    </rdf:RDF>
 353.158 -  </metadata>
 353.159 -  <g
 353.160 -     inkscape:label="Layer 1"
 353.161 -     inkscape:groupmode="layer"
 353.162 -     id="layer1">
 353.163 -    <g
 353.164 -       id="g6431"
 353.165 -       transform="translate(0,-0.137863)">
 353.166 -      <rect
 353.167 -         style="fill:url(#linearGradient6445);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 353.168 -         id="rect6047"
 353.169 -         width="174.36833"
 353.170 -         height="204.51619"
 353.171 -         x="94.198257"
 353.172 -         y="246.08011" />
 353.173 -      <rect
 353.174 -         y="266.38159"
 353.175 -         x="114.11369"
 353.176 -         height="44.537449"
 353.177 -         width="134.53746"
 353.178 -         id="rect5996"
 353.179 -         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 353.180 -      <text
 353.181 -         id="text5998"
 353.182 -         y="292.1423"
 353.183 -         x="138.7962"
 353.184 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 353.185 -         xml:space="preserve"><tspan
 353.186 -           style="font-family:Courier"
 353.187 -           y="292.1423"
 353.188 -           x="138.7962"
 353.189 -           id="tspan6000"
 353.190 -           sodipodi:role="line">e7639888bb2f</tspan></text>
 353.191 -      <rect
 353.192 -         y="328.04825"
 353.193 -         x="114.11369"
 353.194 -         height="44.537449"
 353.195 -         width="134.53746"
 353.196 -         id="rect6004"
 353.197 -         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 353.198 -      <text
 353.199 -         id="text6006"
 353.200 -         y="353.80896"
 353.201 -         x="136.65421"
 353.202 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 353.203 -         xml:space="preserve"><tspan
 353.204 -           style="font-family:Courier"
 353.205 -           y="353.80896"
 353.206 -           x="136.65421"
 353.207 -           id="tspan6008"
 353.208 -           sodipodi:role="line">7b064d8bac5e</tspan></text>
 353.209 -      <path
 353.210 -         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 353.211 -         d="M 181.38242,311.29315 L 181.38242,327.67412"
 353.212 -         id="path6020"
 353.213 -         inkscape:connector-type="polyline"
 353.214 -         inkscape:connection-end="#rect6004" />
 353.215 -      <rect
 353.216 -         y="389.71487"
 353.217 -         x="114.11357"
 353.218 -         height="44.537449"
 353.219 -         width="134.53746"
 353.220 -         id="rect6039"
 353.221 -         style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 353.222 -      <text
 353.223 -         id="text6041"
 353.224 -         y="415.47556"
 353.225 -         x="138.79707"
 353.226 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 353.227 -         xml:space="preserve"><tspan
 353.228 -           style="fill:#979797;fill-opacity:1;font-family:Courier"
 353.229 -           y="415.47556"
 353.230 -           x="138.79707"
 353.231 -           id="tspan6043"
 353.232 -           sodipodi:role="line">000000000000</tspan></text>
 353.233 -      <path
 353.234 -         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 353.235 -         d="M 181.38238,372.95981 L 181.38235,389.34087"
 353.236 -         id="path6045"
 353.237 -         inkscape:connector-type="polyline"
 353.238 -         inkscape:connection-end="#rect6039" />
 353.239 -    </g>
 353.240 -    <text
 353.241 -       xml:space="preserve"
 353.242 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 353.243 -       x="93.660484"
 353.244 -       y="231.36218"
 353.245 -       id="text6102"><tspan
 353.246 -         sodipodi:role="line"
 353.247 -         id="tspan6104"
 353.248 -         x="93.660484"
 353.249 -         y="231.36218">History in repository</tspan></text>
 353.250 -    <g
 353.251 -       id="g6416">
 353.252 -      <rect
 353.253 -         style="fill:url(#linearGradient6232);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 353.254 -         id="rect6140"
 353.255 -         width="174.36833"
 353.256 -         height="204.51619"
 353.257 -         x="323.28412"
 353.258 -         y="245.94225" />
 353.259 -      <g
 353.260 -         transform="translate(28.32541,24.38544)"
 353.261 -         id="g6130">
 353.262 -        <rect
 353.263 -           y="257.95059"
 353.264 -           x="314.87415"
 353.265 -           height="44.537449"
 353.266 -           width="134.53746"
 353.267 -           id="rect6106"
 353.268 -           style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 353.269 -        <text
 353.270 -           id="text6108"
 353.271 -           y="283.7113"
 353.272 -           x="339.55664"
 353.273 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 353.274 -           xml:space="preserve"><tspan
 353.275 -             style="font-family:Courier"
 353.276 -             y="283.7113"
 353.277 -             x="339.55664"
 353.278 -             id="tspan6110"
 353.279 -             sodipodi:role="line">e7639888bb2f</tspan></text>
 353.280 -      </g>
 353.281 -      <g
 353.282 -         transform="translate(29.03958,49.83106)"
 353.283 -         id="g6135">
 353.284 -        <rect
 353.285 -           y="326.52203"
 353.286 -           x="314.15985"
 353.287 -           height="44.537449"
 353.288 -           width="134.53746"
 353.289 -           id="rect6112"
 353.290 -           style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 353.291 -           inkscape:transform-center-x="129.28571"
 353.292 -           inkscape:transform-center-y="102.85714" />
 353.293 -        <text
 353.294 -           id="text6114"
 353.295 -           y="352.28271"
 353.296 -           x="338.84335"
 353.297 -           style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 353.298 -           xml:space="preserve"
 353.299 -           inkscape:transform-center-x="128.69672"
 353.300 -           inkscape:transform-center-y="102.7311"><tspan
 353.301 -             style="fill:#979797;fill-opacity:1;font-family:Courier"
 353.302 -             y="352.28271"
 353.303 -             x="338.84335"
 353.304 -             id="tspan6116"
 353.305 -             sodipodi:role="line">000000000000</tspan></text>
 353.306 -      </g>
 353.307 -      <text
 353.308 -         id="text6118"
 353.309 -         y="270.479"
 353.310 -         x="342.63208"
 353.311 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 353.312 -         xml:space="preserve"><tspan
 353.313 -           y="270.479"
 353.314 -           x="342.63208"
 353.315 -           id="tspan6120"
 353.316 -           sodipodi:role="line">First parent</tspan></text>
 353.317 -      <text
 353.318 -         id="text6122"
 353.319 -         y="364.49615"
 353.320 -         x="342.07544"
 353.321 -         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 353.322 -         xml:space="preserve"><tspan
 353.323 -           y="364.49615"
 353.324 -           x="342.07544"
 353.325 -           id="tspan6124"
 353.326 -           sodipodi:role="line">Second parent</tspan></text>
 353.327 -    </g>
 353.328 -    <text
 353.329 -       xml:space="preserve"
 353.330 -       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 353.331 -       x="322.61746"
 353.332 -       y="231.36218"
 353.333 -       id="text6195"><tspan
 353.334 -         sodipodi:role="line"
 353.335 -         id="tspan6197"
 353.336 -         x="322.61746"
 353.337 -         y="231.36218">Parents of working directory</tspan></text>
 353.338 -    <path
 353.339 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 353.340 -       d="M 342.82543,299.89384 L 249.02528,293.36123"
 353.341 -       id="path6266"
 353.342 -       inkscape:connector-type="polyline"
 353.343 -       inkscape:connection-start="#g6130"
 353.344 -       inkscape:connection-end="#rect5996" />
 353.345 -    <path
 353.346 -       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 353.347 -       d="M 665.12232,418.17579 L 665.12232,418.17579"
 353.348 -       id="path6270"
 353.349 -       inkscape:connector-type="polyline" />
 353.350 -  </g>
 353.351 -</svg>
   354.1 --- a/es/99book.bib	Thu Mar 26 08:57:10 2009 +0100
   354.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   354.3 @@ -1,1 +0,0 @@
   354.4 -../en/99book.bib
   354.5 \ No newline at end of file
   355.1 --- a/es/bookhtml.cfg	Thu Mar 26 08:57:10 2009 +0100
   355.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   355.3 @@ -1,1 +0,0 @@
   355.4 -../en/bookhtml.cfg
   355.5 \ No newline at end of file
   356.1 --- a/es/fixhtml.py	Thu Mar 26 08:57:10 2009 +0100
   356.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   356.3 @@ -1,1 +0,0 @@
   356.4 -../en/fixhtml.py
   356.5 \ No newline at end of file
   357.1 --- a/es/hgbook.css	Thu Mar 26 08:57:10 2009 +0100
   357.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   357.3 @@ -1,1 +0,0 @@
   357.4 -../en/hgbook.css
   357.5 \ No newline at end of file
   358.1 --- a/es/htlatex.book	Thu Mar 26 08:57:10 2009 +0100
   358.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   358.3 @@ -1,1 +0,0 @@
   358.4 -../en/htlatex.book
   358.5 \ No newline at end of file
   359.1 --- a/examples/hg-interdiff	Thu Mar 26 08:57:10 2009 +0100
   359.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   359.3 @@ -1,45 +0,0 @@
   359.4 -#!/usr/bin/env python
   359.5 -#
   359.6 -# Adapter for using interdiff with mercurial's extdiff extension.
   359.7 -#
   359.8 -# Copyright 2006 Bryan O'Sullivan <bos@serpentine.com>
   359.9 -#
  359.10 -# This software may be used and distributed according to the terms of
  359.11 -# the GNU General Public License, incorporated herein by reference.
  359.12 -
  359.13 -import os, sys
  359.14 -
  359.15 -def walk(base):
  359.16 -    # yield all non-directories below the base path.
  359.17 -    for root, dirs, files in os.walk(base):
  359.18 -        for f in files:
  359.19 -            path = os.path.join(root, f)
  359.20 -            yield path[len(base)+1:], path
  359.21 -    else:
  359.22 -        if os.path.isfile(base):
  359.23 -            yield '', base
  359.24 -
  359.25 -# create list of unique file names under both directories.
  359.26 -files = dict(walk(sys.argv[1]))
  359.27 -files.update(walk(sys.argv[2]))
  359.28 -files = files.keys()
  359.29 -files.sort()
  359.30 -
  359.31 -def name(base, f):
  359.32 -    if f:
  359.33 -        path = os.path.join(base, f)
  359.34 -    else:
  359.35 -        path = base
  359.36 -    # interdiff requires two files; use /dev/null if one is missing.
  359.37 -    if os.path.exists(path):
  359.38 -        return path
  359.39 -    return '/dev/null'
  359.40 -
  359.41 -ret = 0
  359.42 -
  359.43 -for f in files:
  359.44 -    if os.system('interdiff "%s" "%s"' % (name(sys.argv[1], f),
  359.45 -                                          name(sys.argv[2], f))):
  359.46 -        ret = 1
  359.47 -
  359.48 -sys.exit(ret)
   360.1 --- a/examples/hg-replay	Thu Mar 26 08:57:10 2009 +0100
   360.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   360.3 @@ -1,107 +0,0 @@
   360.4 -#!/usr/bin/env python
   360.5 -#
   360.6 -# Adapter for using interdiff with mercurial's extdiff extension.
   360.7 -#
   360.8 -# Copyright 2006 Bryan O'Sullivan <bos@serpentine.com>
   360.9 -#
  360.10 -# This software may be used and distributed according to the terms of
  360.11 -# the GNU General Public License, incorporated herein by reference.
  360.12 -
  360.13 -import os
  360.14 -import shutil
  360.15 -import sys
  360.16 -import tempfile
  360.17 -
  360.18 -if len(sys.argv) < 4:
  360.19 -    print >> sys.stderr, ('usage: %s srcrepo destrepo cset-to-omit [...]' %
  360.20 -                          os.path.basename(sys.argv[0]))
  360.21 -    sys.exit(1)
  360.22 -
  360.23 -srcrepo, destrepo = sys.argv[1], sys.argv[2]
  360.24 -omit = sys.argv[3:]
  360.25 -    
  360.26 -changemap = {}
  360.27 -revs = []
  360.28 -
  360.29 -parent = None
  360.30 -
  360.31 -sys.stdout.write('gathering history...')
  360.32 -sys.stdout.flush()
  360.33 -
  360.34 -for line in os.popen("hg --cwd %r log -r0:tip --template '{rev}:{node} {parents}\n'" % srcrepo):
  360.35 -    changes = line.split()
  360.36 -    cset = changes[0].split(':')[1]
  360.37 -    rev = len(revs)
  360.38 -    changemap[cset] = rev
  360.39 -    if len(changes) >= 2:
  360.40 -        p1 = int(changes[1].split(':', 1)[0])
  360.41 -    if len(changes) == 3:
  360.42 -        p2 = int(changes[2].split(':', 1)[0])
  360.43 -    else:
  360.44 -        p2 = None
  360.45 -    if len(changes) == 1:
  360.46 -        p1 = parent
  360.47 -    revs.append((cset, p1, p2))
  360.48 -    parent = rev
  360.49 -
  360.50 -sys.stdout.write(' %d revs\n' % len(revs))
  360.51 -
  360.52 -def findrev(r):
  360.53 -    try:
  360.54 -        i = int(r)
  360.55 -        if str(i) == r:
  360.56 -            rev = i
  360.57 -        if rev < 0:
  360.58 -            rev += len(revs)
  360.59 -        if rev < 0 or rev > len(revs):
  360.60 -            print >> sys.stderr, 'bad changeset: %r' % r
  360.61 -            sys.exit(1)
  360.62 -        cset = revs[rev][0]
  360.63 -    except ValueError:
  360.64 -        cset = r
  360.65 -        matches = [changemap[c] for c in changemap if c.startswith(cset)]
  360.66 -        if len(matches) != 1:
  360.67 -            print >> sys.stderr, 'bad changeset: %r' % r
  360.68 -            sys.exit(1)
  360.69 -        rev = matches[0]
  360.70 -    return rev
  360.71 -
  360.72 -def run(cmd):
  360.73 -    print cmd
  360.74 -    ret = os.system(cmd)
  360.75 -    if ret:
  360.76 -        print >> sys.stderr, 'failure:', cmd
  360.77 -        sys.exit(1)
  360.78 -
  360.79 -omit = map(findrev, omit)
  360.80 -omit.sort()
  360.81 -newrevs = revs[:omit[0]]
  360.82 -tip = len(newrevs) - 1
  360.83 -run('hg clone -q -r%s %r %r' % (tip, srcrepo, destrepo))
  360.84 -    
  360.85 -os.environ['HGMERGE'] = 'true'
  360.86 -
  360.87 -patchdir = tempfile.mkdtemp(prefix='replay.')
  360.88 -try:
  360.89 -    run('hg --cwd %r export --git -o %r%s%%R %d:tip' %
  360.90 -        (srcrepo, patchdir, os.sep, omit[0]+1))
  360.91 -    for rev in xrange(omit[0], len(revs)):
  360.92 -        if rev in omit:
  360.93 -            print 'omit', rev
  360.94 -            newrevs.append((None, revs[rev][1], None))
  360.95 -            continue
  360.96 -        _, p1, p2 = revs[rev]
  360.97 -        np1 = newrevs[p1][1]
  360.98 -        if tip != np1:
  360.99 -            run('hg --cwd %r update -q -C %s' % (destrepo, np1))
 360.100 -        np2 = None
 360.101 -        if p2:
 360.102 -            np2 = newrevs[p2][1]
 360.103 -            run('hg --cwd %r merge -q %s' % (destrepo, np2))
 360.104 -            print >> sys.stderr, 'XXX - cannot handle merges properly yet'
 360.105 -        run('hg --cwd %r import -q -f %r%s%d' % (destrepo, patchdir, os.sep, rev))
 360.106 -        tip = len(newrevs) - 1
 360.107 -        newrevs.append((None, tip, np2))
 360.108 -finally:
 360.109 -    print 'cleaning up ...'
 360.110 -    #shutil.rmtree(patchdir)
   361.1 --- a/fr/Makefile	Thu Mar 26 08:57:10 2009 +0100
   361.2 +++ b/fr/Makefile	Sun Aug 16 03:41:39 2009 +0200
   361.3 @@ -1,62 +1,26 @@
   361.4  # This makefile requires GNU make.
   361.5  
   361.6 -sources := \
   361.7 -	00book.tex \
   361.8 -	99book.bib \
   361.9 -	99defs.tex \
  361.10 -	build_id.tex \
  361.11 -	branch.tex \
  361.12 -	cmdref.tex \
  361.13 -	collab.tex \
  361.14 -	concepts.tex \
  361.15 -	daily.tex \
  361.16 -	filenames.tex \
  361.17 -	hg_id.tex \
  361.18 -	hgext.tex \
  361.19 -	hook.tex \
  361.20 -	intro.tex \
  361.21 -	mq.tex \
  361.22 -	mq-collab.tex \
  361.23 -	mq-ref.tex \
  361.24 -	preface.tex \
  361.25 -	srcinstall.tex \
  361.26 -	template.tex \
  361.27 -	tour-basic.tex \
  361.28 -	tour-merge.tex \
  361.29 -	undo.tex
  361.30 -
  361.31 -image-sources := \
  361.32 -	feature-branches.dot \
  361.33 -	filelog.svg \
  361.34 -	kdiff3.png \
  361.35 -	metadata.svg \
  361.36 -	mq-stack.svg \
  361.37 -	note.png \
  361.38 -	revlog.svg \
  361.39 -	snapshot.svg \
  361.40 -	tour-history.svg \
  361.41 -	tour-merge-conflict.svg \
  361.42 -	tour-merge-merge.svg \
  361.43 -	tour-merge-pull.svg \
  361.44 -	tour-merge-sep-repos.svg \
  361.45 -	undo-manual.dot \
  361.46 -	undo-manual-merge.dot \
  361.47 -	undo-non-tip.dot \
  361.48 -	undo-simple.dot \
  361.49 -	wdir.svg \
  361.50 -	wdir-after-commit.svg \
  361.51 -	wdir-branch.svg \
  361.52 -	wdir-merge.svg \
  361.53 -	wdir-pre-branch.svg
  361.54 +image-sources := $(wildcard figs/*.dot figs/*.gif figs/*.png figs/*.svg)
  361.55 +
  361.56 +xml-src-files := \
  361.57 +	00book.xml \
  361.58 +	app*.xml \
  361.59 +	ch*.xml
  361.60  
  361.61  image-dot := $(filter %.dot,$(image-sources))
  361.62  image-svg := $(filter %.svg,$(image-sources))
  361.63 -image-png := $(filter %.png,$(image-sources))
  361.64 -
  361.65 -image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png)
  361.66 -image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png)
  361.67 -
  361.68 -example-sources := \
  361.69 +image-oth := $(filter %.gif %.png,$(image-sources))
  361.70 +
  361.71 +obj-web := html
  361.72 +obj-websup := $(obj-web)/support
  361.73 +obj-web-read := $(obj-web)/read
  361.74 +
  361.75 +image-web := \
  361.76 +	$(image-dot:%.dot=$(obj-web-read)/%.png) \
  361.77 +	$(image-svg:%.svg=$(obj-web-read)/%.png) \
  361.78 +	$(image-oth:%=$(obj-web-read)/%)
  361.79 +
  361.80 +example-sources-by-name := \
  361.81  	backout \
  361.82  	bisect \
  361.83  	branching \
  361.84 @@ -71,7 +35,6 @@
  361.85  	filenames \
  361.86  	hook.msglen \
  361.87  	hook.simple \
  361.88 -	hook.ws \
  361.89  	issue29 \
  361.90  	mq.guards \
  361.91  	mq.qinit-help \
  361.92 @@ -88,6 +51,49 @@
  361.93  	tour \
  361.94  	tour-merge-conflict
  361.95  
  361.96 +example-sources := \
  361.97 +	$(example-sources-by-name:%=examples/%) \
  361.98 +	$(wildcard examples/ch*/*)
  361.99 +
 361.100 +extras-web-base := \
 361.101 +	$(obj-web)/index.html \
 361.102 +	$(obj-web)/robots.txt \
 361.103 +	$(obj-websup)/form-min.js \
 361.104 +	$(obj-websup)/form.js \
 361.105 +	$(obj-websup)/hsbook.js \
 361.106 +	$(obj-websup)/jquery-min.js \
 361.107 +	$(obj-websup)/jquery.js \
 361.108 +	$(obj-websup)/styles.css
 361.109 +
 361.110 +extras-web := $(extras-web-base) $(extras-web-base:%=%.gz)
 361.111 +
 361.112 +xsltproc := xsltproc
 361.113 +xsltproc-opts := --nonet --xinclude --path '$(xml-path)'
 361.114 +
 361.115 +xmllint := xmllint
 361.116 +xmllint-opts := --noout --nonet --valid
 361.117 +
 361.118 +system-xsl-dir := $(firstword $(wildcard \
 361.119 +	/usr/share/sgml/docbook/xsl-stylesheets \
 361.120 +	/usr/share/xml/docbook/stylesheet/nwalsh \
 361.121 +	))
 361.122 +
 361.123 +# Bletcherousness.
 361.124 +
 361.125 +ifneq ($(wildcard /usr/share/sgml/docbook/xml-dtd-4.4-*),)
 361.126 +dtd-dir := $(wildcard /usr/share/sgml/docbook/xml-dtd-4.4-*)
 361.127 +else
 361.128 +ifneq ($(wildcard /usr/share/xml/docbook/schema/dtd/4.4),)
 361.129 +dtd-dir := $(wildcard /usr/share/xml/docbook/schema/dtd/4.4)
 361.130 +else
 361.131 +$(error Do not know where to look for DocBook XML 4.4 DTD)
 361.132 +endif
 361.133 +endif
 361.134 +
 361.135 +ifeq ($(system-xsl-dir),)
 361.136 +$(error add a suitable directory to system-xsl-dir)
 361.137 +endif
 361.138 +
 361.139  example-prereqs := \
 361.140  	/usr/bin/merge
 361.141  
 361.142 @@ -96,11 +102,6 @@
 361.143  	../html/index.html.var \
 361.144  	../html/index.en.html
 361.145  
 361.146 -latex-options = \
 361.147 -	-interaction batchmode \
 361.148 -	-output-directory $(dir $(1)) \
 361.149 -	-jobname $(basename $(notdir $(1)))
 361.150 -
 361.151  hg = $(shell which hg)
 361.152  
 361.153  hg-id = $(shell hg parents --template '{node|short}, dated {date|isodate},\n')
 361.154 @@ -108,113 +109,111 @@
 361.155  hg-version = $(shell hg version -q | \
 361.156  		     sed 's,.*(version \(unknown\|[a-f0-9+]*\)),\1,')
 361.157  
 361.158 -all: pdf html
 361.159 -
 361.160 -pdf: pdf/hgbook.pdf
 361.161 -
 361.162 -define pdf
 361.163 +all: web complete.xml
 361.164 +
 361.165 +../stylesheets/system-xsl: $(system-xsl-dir)
 361.166 +	ln -s $< $@
 361.167 +
 361.168 +web: ../stylesheets/system-xsl websup html
 361.169 +
 361.170 +html: $(obj-web-read)/index.html
 361.171 +
 361.172 +../web/index-read.html.in: ../web/genindex.py $(xml-src-files)
 361.173 +	cd ../web && ./genindex.py
 361.174 +
 361.175 +$(obj-web-read)/index.html: ../stylesheets/system-xsl .validated-00book.xml ../web/index-read.html.in
 361.176 +	xsltproc $(xsltproc-opts) -o $(obj-web-read)/x ../stylesheets/chunk-stylesheet.xsl 00book.xml
 361.177 +	python ../web/texpand.py ../web/index-read.html.in html/read/index.html
 361.178 +	for i in $(obj-web-read)/*.html; do \
 361.179 +	  gzip -9 -c $$i > $$i.gz; \
 361.180 +	done
 361.181 +
 361.182 +websup: $(extras-web) $(image-web)
 361.183 +	mkdir -p $(obj-websup)/figs $(obj-web-read)/figs
 361.184 +	cp ../stylesheets/system-xsl/images/*.png $(obj-websup)/figs
 361.185 +	cp -f ../web/icons/*.png $(obj-websup)/figs
 361.186 +
 361.187 +complete.xml: .validated-00book.xml
 361.188 +	$(xsltproc) $(xsltproc-opts) -o $@ ../stylesheets/dtd-profile.xsl 00book.xml
 361.189 +
 361.190 +all-ids.dat: ../stylesheets/all-ids.xsl $(xml-src-files)
 361.191 +	$(xsltproc) $(xsltproc-opts) -o $@ ../stylesheets/all-ids.xsl 00book.xml
 361.192 +
 361.193 +web: websup
 361.194 +
 361.195 +valid: .validated-00book.xml
 361.196 +
 361.197 +.validated-00book.xml: $(xml-src-files) examples/.run
 361.198 +	$(xmllint) --path '$(dtd-dir):$(xml-path)' $(xmllint-opts) $<
 361.199 +	touch $@
 361.200 +
 361.201 +# Produce 90dpi PNGs for the web.
 361.202 +
 361.203 +$(obj-web-read)/figs/%.png: $(obj-web-read)/figs/%.svg fixsvg
 361.204  	mkdir -p $(dir $@)
 361.205 -	TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
 361.206 -	cp 99book.bib $(dir $@)
 361.207 -	cd $(dir $@) && bibtex $(basename $(notdir $@))
 361.208 -	cd $(dir $@) && makeindex $(basename $(notdir $@))
 361.209 -	TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
 361.210 -	TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
 361.211 -	if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi
 361.212 -endef
 361.213 -
 361.214 -pdf/hgbook.pdf: $(sources) examples $(image-pdf)
 361.215 -	$(call pdf)
 361.216 -
 361.217 -html: onepage split
 361.218 -
 361.219 -onepage: $(htlatex) html/onepage/hgbook.html html/onepage/hgbook.css $(image-html:%=html/onepage/%)
 361.220 -
 361.221 -html/onepage/%: %
 361.222 -	cp $< $@
 361.223 -
 361.224 -split: $(htlatex) html/split/hgbook.html html/split/hgbook.css $(image-html:%=html/split/%)
 361.225 -
 361.226 -html/split/%: %
 361.227 -	cp $< $@
 361.228 -
 361.229 -# This is a horrible hack to work around the fact that the htlatex
 361.230 -# command in tex4ht is itself a horrible hack.  I really don't want to
 361.231 -# include verbatim the big wad of TeX that is repeated in that script,
 361.232 -# but I've given up and run a hacked copy as htlatex.book here.
 361.233 -
 361.234 -define htlatex
 361.235 -	mkdir -p $(dir $(1))
 361.236 -	cp 99book.bib $(dir $(1))
 361.237 -	TEXINPUTS=$(dir $(2)): ./htlatex.book $(2) "bookhtml,html4-uni,$(3)" " -cunihtf -utf8" "$(dir $(1))" "$(call latex-options,$(1))" || (rm -f $(1); exit 1)
 361.238 -	cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf
 361.239 -	cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1)))
 361.240 -	./fixhtml.py $(dir $(1))/*.html
 361.241 -	rm $(dir $(1))/hgbook.css
 361.242 -endef
 361.243 -
 361.244 -html/onepage/hgbook.html: $(sources) examples $(image-html) bookhtml.cfg
 361.245 -	$(call htlatex,$@,$<)
 361.246 -
 361.247 -html/split/hgbook.html: $(sources) examples bookhtml.cfg
 361.248 -	$(call htlatex,$@,$<,2)
 361.249 -
 361.250 -# Produce 90dpi PNGs for the web.
 361.251 -
 361.252 -%.png: %.svg fixsvg
 361.253  	./fixsvg $<
 361.254  	inkscape -D -e $@ $<-tmp.svg
 361.255  	rm $<-tmp.svg
 361.256  
 361.257 -%.svg: %.dot
 361.258 +$(obj-web-read)/figs/%.png: figs/%.svg fixsvg
 361.259 +	mkdir -p $(dir $@)
 361.260 +	./fixsvg $<
 361.261 +	inkscape -D -e $@ $<-tmp.svg
 361.262 +	rm $<-tmp.svg
 361.263 +
 361.264 +$(obj-web-read)/figs/%.gif: figs/%.gif
 361.265 +	cp $< $@
 361.266 +
 361.267 +$(obj-web-read)/figs/%.png: figs/%.png
 361.268 +	cp $< $@
 361.269 +
 361.270 +$(obj-web-read)/figs/%.svg: figs/%.dot
 361.271 +	mkdir -p $(dir $@)
 361.272  	dot -Tsvg -o $@ $<
 361.273  
 361.274 -# Produce eps & pdf for the pdf
 361.275 -
 361.276 -%.pdf: %.eps
 361.277 -	epstopdf $<
 361.278 -
 361.279 -%.eps: %.svg
 361.280 -	./fixsvg $<
 361.281 -	inkscape -E $@ $<-tmp.svg
 361.282 -	rm $<-tmp.svg
 361.283 -
 361.284 -%.eps: %.dot
 361.285 -	dot -Tps -o $@ $<
 361.286 -
 361.287  examples: $(example-prereqs) examples/.run
 361.288  
 361.289 -examples/.run: $(example-sources:%=examples/%.run)
 361.290 -	touch examples/.run
 361.291 +examples/.run: $(example-sources)
 361.292 +	cd examples && ./run-example -a
 361.293  
 361.294  examples/%.run: examples/% examples/run-example
 361.295 -	cd examples && ./run-example $(notdir $<)
 361.296 -
 361.297 -changelog := $(wildcard ../.hg/store/00changelog.[id])
 361.298 -ifeq ($(changelog),)
 361.299 -changelog := $(wildcard ../.hg/00changelog.[id])
 361.300 -endif
 361.301 -
 361.302 -build_id.tex: $(changelog)
 361.303 -	echo -n '$(hg-id)' > build_id.tex
 361.304 -
 361.305 -hg_id.tex: $(hg)
 361.306 -	echo -n '$(hg-version)' > hg_id.tex
 361.307  
 361.308  clean:
 361.309 -	rm -rf dist html pdf \
 361.310 -		$(image-dot:%.dot=%.pdf) \
 361.311 -		$(image-dot:%.dot=%.png) \
 361.312 -		$(image-svg:%.svg=%.pdf) \
 361.313 -		$(image-svg:%.svg=%.png) \
 361.314 -		examples/*.{lxo,run} examples/.run build_id.tex hg_id.tex
 361.315 -
 361.316 -install: pdf split $(dist-sources)
 361.317 +	-rm -rf dist html $(image-dot:%.dot=%.pdf) $(image-dot:%.dot=%.png) \
 361.318 +	  $(image-svg:%.svg=%.png) examples/*.{lxo,run} examples/.run
 361.319 +
 361.320 +install: html $(dist-sources)
 361.321  	rm -rf dist
 361.322  	mkdir -p dist
 361.323 -	cp pdf/hgbook.pdf dist
 361.324 -	cp html/split/*.{css,html,png} dist
 361.325 +	cp html/*.{css,html,png} dist
 361.326  	cp $(dist-sources) dist
 361.327  
 361.328  rsync: install
 361.329  	rsync -avz --delete dist sp.red-bean.com:public_html/hgbook
 361.330 +
 361.331 +vpath %.css ../web
 361.332 +vpath %.html.in ../web
 361.333 +vpath %.js ../web/javascript
 361.334 +
 361.335 +$(obj-websup)/%.css: %.css
 361.336 +	@mkdir -p $(dir $@)
 361.337 +	cp $< $@
 361.338 +
 361.339 +$(obj-websup)/%.jpg: %.jpg
 361.340 +	@mkdir -p $(dir $@)
 361.341 +	cp $< $@
 361.342 +
 361.343 +$(obj-websup)/%.js: %.js
 361.344 +	@mkdir -p $(dir $@)
 361.345 +	cp $< $@
 361.346 +
 361.347 +$(obj-web)/%: ../web/%
 361.348 +	@mkdir -p $(dir $@)
 361.349 +	cp $< $@
 361.350 +
 361.351 +$(obj-web)/%.html: %.html.in
 361.352 +	@mkdir -p $(dir $@)
 361.353 +	python ../web/texpand.py $< $@
 361.354 +
 361.355 +%.gz: %
 361.356 +	gzip -9 -c $< > $@
   362.1 --- a/fr/examples/backout	Thu Mar 26 08:57:10 2009 +0100
   362.2 +++ b/fr/examples/backout	Sun Aug 16 03:41:39 2009 +0200
   362.3 @@ -68,6 +68,10 @@
   362.4  
   362.5  hg heads
   362.6  
   362.7 +#$ name:
   362.8 +
   362.9 +echo 'first change' > myfile
  362.10 +
  362.11  #$ name: manual.cat
  362.12  
  362.13  cat myfile
   363.1 --- a/fr/examples/bisect	Thu Mar 26 08:57:10 2009 +0100
   363.2 +++ b/fr/examples/bisect	Sun Aug 16 03:41:39 2009 +0200
   363.3 @@ -37,15 +37,15 @@
   363.4  
   363.5  #$ name: search.init
   363.6  
   363.7 -hg bisect init
   363.8 +hg bisect --reset
   363.9  
  363.10  #$ name: search.bad-init
  363.11  
  363.12 -hg bisect bad
  363.13 +hg bisect --bad
  363.14  
  363.15  #$ name: search.good-init
  363.16  
  363.17 -hg bisect good 10
  363.18 +hg bisect --good 10
  363.19  
  363.20  #$ name: search.step1
  363.21  
  363.22 @@ -70,7 +70,7 @@
  363.23    fi
  363.24  
  363.25    echo this revision is $result
  363.26 -  hg bisect $result
  363.27 +  hg bisect --$result
  363.28  }
  363.29    
  363.30  #$ name: search.step2
  363.31 @@ -85,7 +85,7 @@
  363.32  
  363.33  #$ name: search.reset
  363.34  
  363.35 -hg bisect reset
  363.36 +hg bisect --reset
  363.37  
  363.38  #$ name:
  363.39  
   364.1 --- a/fr/examples/daily.copy	Thu Mar 26 08:57:10 2009 +0100
   364.2 +++ b/fr/examples/daily.copy	Sun Aug 16 03:41:39 2009 +0200
   364.3 @@ -51,9 +51,9 @@
   364.4  cd copy-example
   364.5  echo a > a
   364.6  echo b > b
   364.7 -mkdir c
   364.8 -mkdir c/a
   364.9 -echo c > c/a/c
  364.10 +mkdir z
  364.11 +mkdir z/a
  364.12 +echo c > z/a/c
  364.13  hg ci -Ama
  364.14  
  364.15  #$ name: simple
  364.16 @@ -70,13 +70,13 @@
  364.17  
  364.18  #$ name: dir-src
  364.19  
  364.20 -hg copy c e
  364.21 +hg copy z e
  364.22  
  364.23  #$ name: dir-src-dest
  364.24  
  364.25 -hg copy c d
  364.26 +hg copy z d
  364.27  
  364.28  #$ name: after
  364.29  
  364.30 -cp a z
  364.31 -hg copy --after a z
  364.32 +cp a n
  364.33 +hg copy --after a n
   365.1 --- a/fr/examples/daily.files	Thu Mar 26 08:57:10 2009 +0100
   365.2 +++ b/fr/examples/daily.files	Sun Aug 16 03:41:39 2009 +0200
   365.3 @@ -4,9 +4,9 @@
   365.4  
   365.5  hg init add-example
   365.6  cd add-example
   365.7 -echo a > a
   365.8 +echo a > myfile.txt
   365.9  hg status
  365.10 -hg add a
  365.11 +hg add myfile.txt
  365.12  hg status
  365.13  hg commit -m 'Added one file'
  365.14  hg status
  365.15 @@ -14,10 +14,10 @@
  365.16  #$ name: add-dir
  365.17  
  365.18  mkdir b
  365.19 -echo b > b/b
  365.20 -echo c > b/c
  365.21 +echo b > b/somefile.txt
  365.22 +echo c > b/source.cpp
  365.23  mkdir b/d
  365.24 -echo d > b/d/d
  365.25 +echo d > b/d/test.h
  365.26  hg add b
  365.27  hg commit -m 'Added all files in subdirectory'
  365.28  
   366.1 --- a/fr/examples/mq.guards	Thu Mar 26 08:57:10 2009 +0100
   366.2 +++ b/fr/examples/mq.guards	Sun Aug 16 03:41:39 2009 +0200
   366.3 @@ -29,7 +29,7 @@
   366.4  
   366.5  #$ name: qguard.neg
   366.6  
   366.7 -hg qguard hello.patch -quux
   366.8 +hg qguard -- hello.patch -quux
   366.9  hg qguard hello.patch
  366.10  
  366.11  #$ name: series
   367.1 --- a/fr/examples/rename.divergent	Thu Mar 26 08:57:10 2009 +0100
   367.2 +++ b/fr/examples/rename.divergent	Sun Aug 16 03:41:39 2009 +0200
   367.3 @@ -14,7 +14,7 @@
   367.4  #$ name: rename.anne
   367.5  
   367.6  cd anne
   367.7 -hg mv foo bar
   367.8 +hg rename foo bar
   367.9  hg ci -m 'Rename foo to bar'
  367.10  
  367.11  #$ name: rename.bob
   368.1 --- a/fr/examples/run-example	Thu Mar 26 08:57:10 2009 +0100
   368.2 +++ b/fr/examples/run-example	Sun Aug 16 03:41:39 2009 +0200
   368.3 @@ -7,6 +7,7 @@
   368.4  import cStringIO
   368.5  import errno
   368.6  import getopt
   368.7 +import glob
   368.8  import os
   368.9  import pty
  368.10  import re
  368.11 @@ -18,23 +19,23 @@
  368.12  import tempfile
  368.13  import time
  368.14  
  368.15 -tex_subs = {
  368.16 -    '\\': '\\textbackslash{}',
  368.17 -    '{': '\\{',
  368.18 -    '}': '\\}',
  368.19 +xml_subs = {
  368.20 +    '<': '&lt;',
  368.21 +    '>': '&gt;',
  368.22 +    '&': '&amp;',
  368.23      }
  368.24  
  368.25  def gensubs(s):
  368.26      start = 0
  368.27      for i, c in enumerate(s):
  368.28 -        sub = tex_subs.get(c)
  368.29 +        sub = xml_subs.get(c)
  368.30          if sub:
  368.31              yield s[start:i]
  368.32              start = i + 1
  368.33              yield sub
  368.34      yield s[start:]
  368.35  
  368.36 -def tex_escape(s):
  368.37 +def xml_escape(s):
  368.38      return ''.join(gensubs(s))
  368.39          
  368.40  def maybe_unlink(name):
  368.41 @@ -53,7 +54,92 @@
  368.42              return p
  368.43      return None
  368.44          
  368.45 +def result_name(name):
  368.46 +    return os.path.normpath(os.path.join('results', name.replace(os.sep, '-')))
  368.47 +
  368.48 +def wopen(name):
  368.49 +    path = os.path.dirname(name)
  368.50 +    if path:
  368.51 +        try:
  368.52 +            os.makedirs(path)
  368.53 +        except OSError, err:
  368.54 +            if err.errno != errno.EEXIST:
  368.55 +                raise
  368.56 +    return open(name, 'w')
  368.57 +
  368.58  class example:
  368.59 +    entities = dict.fromkeys(l.rstrip() for l in open('auto-snippets.xml'))
  368.60 +
  368.61 +    def __init__(self, name, verbose, keep_change):
  368.62 +        self.name = os.path.normpath(name)
  368.63 +        self.verbose = verbose
  368.64 +        self.keep_change = keep_change
  368.65 +        
  368.66 +    def status(self, s):
  368.67 +        sys.stdout.write(s)
  368.68 +        if not s.endswith('\n'):
  368.69 +            sys.stdout.flush()
  368.70 +
  368.71 +    def rename_output(self, base, ignore=[]):
  368.72 +        mangle_re = re.compile('(?:' + '|'.join(ignore) + ')')
  368.73 +        def mangle(s):
  368.74 +            return mangle_re.sub('', s)
  368.75 +        def matchfp(fp1, fp2):
  368.76 +            while True:
  368.77 +                s1 = mangle(fp1.readline())
  368.78 +                s2 = mangle(fp2.readline())
  368.79 +                if cmp(s1, s2):
  368.80 +                    break
  368.81 +                if not s1:
  368.82 +                    return True
  368.83 +            return False
  368.84 +
  368.85 +        oldname = result_name(base + '.out')
  368.86 +        tmpname = result_name(base + '.tmp')
  368.87 +        errname = result_name(base + '.err')
  368.88 +        errfp = open(errname, 'w+')
  368.89 +        for line in open(tmpname):
  368.90 +            errfp.write(mangle_re.sub('', line))
  368.91 +        os.rename(tmpname, result_name(base + '.lxo'))
  368.92 +        errfp.seek(0)
  368.93 +        try:
  368.94 +            oldfp = open(oldname)
  368.95 +        except IOError, err:
  368.96 +            if err.errno != errno.ENOENT:
  368.97 +                raise
  368.98 +            os.rename(errname, oldname)
  368.99 +            return False
 368.100 +        if matchfp(oldfp, errfp):
 368.101 +            os.unlink(errname)
 368.102 +            return False
 368.103 +        else:
 368.104 +            print >> sys.stderr, '\nOutput of %s has changed!' % base
 368.105 +            if self.keep_change:
 368.106 +                os.rename(errname, oldname)
 368.107 +                return False
 368.108 +            else:
 368.109 +                os.system('diff -u %s %s 1>&2' % (oldname, errname))
 368.110 +            return True
 368.111 +
 368.112 +class static_example(example):
 368.113 +    def run(self):
 368.114 +        self.status('running %s\n' % self.name)
 368.115 +        s = open(self.name).read().rstrip()
 368.116 +        s = s.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
 368.117 +        ofp = wopen(result_name(self.name + '.tmp'))
 368.118 +        ofp.write('<!-- BEGIN %s -->\n' % self.name)
 368.119 +        ofp.write('<programlisting>')
 368.120 +        ofp.write(s)
 368.121 +        ofp.write('</programlisting>\n')
 368.122 +        ofp.write('<!-- END %s -->\n' % self.name)
 368.123 +        ofp.close()
 368.124 +        self.rename_output(self.name)
 368.125 +        norm = self.name.replace(os.sep, '-')
 368.126 +        example.entities[
 368.127 +            '<!ENTITY %s SYSTEM "results/%s.lxo">' % (norm, norm)] = 1
 368.128 +
 368.129 +
 368.130 +class shell_example(example):
 368.131      shell = '/usr/bin/env bash'
 368.132      ps1 = '__run_example_ps1__ '
 368.133      ps2 = '__run_example_ps2__ '
 368.134 @@ -61,9 +147,8 @@
 368.135      
 368.136      timeout = 10
 368.137  
 368.138 -    def __init__(self, name, verbose):
 368.139 -        self.name = name
 368.140 -        self.verbose = verbose
 368.141 +    def __init__(self, name, verbose, keep_change):
 368.142 +        example.__init__(self, name, verbose, keep_change)
 368.143          self.poll = select.poll()
 368.144  
 368.145      def parse(self):
 368.146 @@ -76,11 +161,6 @@
 368.147                  yield cfp.getvalue()
 368.148                  cfp.seek(0)
 368.149                  cfp.truncate()
 368.150 -        
 368.151 -    def status(self, s):
 368.152 -        sys.stdout.write(s)
 368.153 -        if not s.endswith('\n'):
 368.154 -            sys.stdout.flush()
 368.155  
 368.156      def send(self, s):
 368.157          if self.verbose:
 368.158 @@ -146,12 +226,12 @@
 368.159          maybe_unlink(self.name + '.run')
 368.160  
 368.161          rcfile = os.path.join(tmpdir, '.hgrc')
 368.162 -        rcfp = open(rcfile, 'w')
 368.163 +        rcfp = wopen(rcfile)
 368.164          print >> rcfp, '[ui]'
 368.165          print >> rcfp, "username = Bryan O'Sullivan <bos@serpentine.com>"
 368.166          
 368.167          rcfile = os.path.join(tmpdir, '.bashrc')
 368.168 -        rcfp = open(rcfile, 'w')
 368.169 +        rcfp = wopen(rcfile)
 368.170          print >> rcfp, 'PS1="%s"' % self.ps1
 368.171          print >> rcfp, 'PS2="%s"' % self.ps2
 368.172          print >> rcfp, 'unset HISTFILE'
 368.173 @@ -230,12 +310,22 @@
 368.174                                  return 1
 368.175                              assert os.sep not in out
 368.176                              if ofp is not None:
 368.177 +                                ofp.write('</screen>\n')
 368.178 +                                ofp.write('<!-- END %s -->\n' % ofp_basename)
 368.179                                  ofp.close()
 368.180                                  err |= self.rename_output(ofp_basename, ignore)
 368.181                              if out:
 368.182                                  ofp_basename = '%s.%s' % (self.name, out)
 368.183 +                                norm = os.path.normpath(ofp_basename)
 368.184 +                                norm = norm.replace(os.sep, '-')
 368.185 +                                example.entities[
 368.186 +                                    '<!ENTITY interaction.%s '
 368.187 +                                    'SYSTEM "results/%s.lxo">'
 368.188 +                                    % (norm, norm)] = 1
 368.189                                  read_hint = ofp_basename + ' '
 368.190 -                                ofp = open(ofp_basename + '.tmp', 'w')
 368.191 +                                ofp = wopen(result_name(ofp_basename + '.tmp'))
 368.192 +                                ofp.write('<!-- BEGIN %s -->\n' % ofp_basename)
 368.193 +                                ofp.write('<screen>')
 368.194                              else:
 368.195                                  ofp = None
 368.196                          elif pi == 'ignore':
 368.197 @@ -248,14 +338,15 @@
 368.198                          # first, print the command we ran
 368.199                          if not hunk.startswith('#'):
 368.200                              nl = hunk.endswith('\n')
 368.201 -                            hunk = ('%s \\textbf{%s}' %
 368.202 +                            hunk = ('<prompt>%s</prompt> '
 368.203 +                                    '<userinput>%s</userinput>' %
 368.204                                      (prompts[ps],
 368.205 -                                     tex_escape(hunk.rstrip('\n'))))
 368.206 +                                     xml_escape(hunk.rstrip('\n'))))
 368.207                              if nl: hunk += '\n'
 368.208                          ofp.write(hunk)
 368.209                          # then its output
 368.210 -                        ofp.write(tex_escape(output))
 368.211 -                    ps = newps
 368.212 +                        ofp.write(xml_escape(output))
 368.213 +                        ps = newps
 368.214                  self.status('\n')
 368.215              except:
 368.216                  print >> sys.stderr, '(killed)'
 368.217 @@ -267,6 +358,8 @@
 368.218                      ps, output = self.sendreceive('exit\n', read_hint)
 368.219                      if ofp is not None:
 368.220                          ofp.write(output)
 368.221 +                        ofp.write('</screen>\n')
 368.222 +                        ofp.write('<!-- END %s -->\n' % ofp_basename)
 368.223                          ofp.close()
 368.224                          err |= self.rename_output(ofp_basename, ignore)
 368.225                      os.close(self.cfd)
 368.226 @@ -281,68 +374,40 @@
 368.227                      elif os.WIFSIGNALED(rc):
 368.228                          print >> sys.stderr, '(signal %s)' % os.WTERMSIG(rc)
 368.229                  else:
 368.230 -                    open(self.name + '.run', 'w')
 368.231 +                    wopen(result_name(self.name + '.run'))
 368.232                  return err
 368.233          finally:
 368.234              shutil.rmtree(tmpdir)
 368.235  
 368.236 -    def rename_output(self, base, ignore):
 368.237 -        mangle_re = re.compile('(?:' + '|'.join(ignore) + ')')
 368.238 -        def mangle(s):
 368.239 -            return mangle_re.sub('', s)
 368.240 -        def matchfp(fp1, fp2):
 368.241 -            while True:
 368.242 -                s1 = mangle(fp1.readline())
 368.243 -                s2 = mangle(fp2.readline())
 368.244 -                if cmp(s1, s2):
 368.245 -                    break
 368.246 -                if not s1:
 368.247 -                    return True
 368.248 -            return False
 368.249 -
 368.250 -        oldname = base + '.out'
 368.251 -        tmpname = base + '.tmp'
 368.252 -        errname = base + '.err'
 368.253 -        errfp = open(errname, 'w+')
 368.254 -        for line in open(tmpname):
 368.255 -            errfp.write(mangle_re.sub('', line))
 368.256 -        os.rename(tmpname, base + '.lxo')
 368.257 -        errfp.seek(0)
 368.258 -        try:
 368.259 -            oldfp = open(oldname)
 368.260 -        except IOError, err:
 368.261 -            if err.errno != errno.ENOENT:
 368.262 -                raise
 368.263 -            os.rename(errname, oldname)
 368.264 -            return False
 368.265 -        if matchfp(oldfp, errfp):
 368.266 -            os.unlink(errname)
 368.267 -            return False
 368.268 -        else:
 368.269 -            print >> sys.stderr, '\nOutput of %s has changed!' % base
 368.270 -            os.system('diff -u %s %s 1>&2' % (oldname, errname))
 368.271 -            return True
 368.272 -
 368.273  def print_help(exit, msg=None):
 368.274      if msg:
 368.275          print >> sys.stderr, 'Error:', msg
 368.276      print >> sys.stderr, 'Usage: run-example [options] [test...]'
 368.277      print >> sys.stderr, 'Options:'
 368.278 -    print >> sys.stderr, '  -a --all       run all tests in this directory'
 368.279 +    print >> sys.stderr, '  -a --all       run all examples in this directory'
 368.280      print >> sys.stderr, '  -h --help      print this help message'
 368.281 +    print >> sys.stderr, '     --keep      keep new output as desired output'
 368.282      print >> sys.stderr, '  -v --verbose   display extra debug output'
 368.283      sys.exit(exit)
 368.284  
 368.285  def main(path='.'):
 368.286 +    if os.path.realpath(path).split(os.sep)[-1] != 'examples':
 368.287 +        print >> sys.stderr, 'Not being run from the examples directory!'
 368.288 +        sys.exit(1)
 368.289 +
 368.290      opts, args = getopt.getopt(sys.argv[1:], '?ahv',
 368.291 -                               ['all', 'help', 'verbose'])
 368.292 +                               ['all', 'help', 'keep', 'verbose'])
 368.293      verbose = False
 368.294      run_all = False
 368.295 +    keep_change = False
 368.296 +
 368.297      for o, a in opts:
 368.298          if o in ('-h', '-?', '--help'):
 368.299              print_help(0)
 368.300          if o in ('-a', '--all'):
 368.301              run_all = True
 368.302 +        if o in ('--keep',):
 368.303 +            keep_change = True
 368.304          if o in ('-v', '--verbose'):
 368.305              verbose = True
 368.306      errs = 0
 368.307 @@ -354,19 +419,20 @@
 368.308                  print >> sys.stderr, '%s: %s' % (a, err.strerror)
 368.309                  errs += 1
 368.310                  continue
 368.311 -            if stat.S_ISREG(st.st_mode) and st.st_mode & 0111:
 368.312 -                if example(a, verbose).run():
 368.313 -                    errs += 1
 368.314 +            if stat.S_ISREG(st.st_mode):
 368.315 +                if st.st_mode & 0111:
 368.316 +                    if shell_example(a, verbose, keep_change).run():
 368.317 +                        errs += 1
 368.318 +                elif a.endswith('.lst'):
 368.319 +                    static_example(a, verbose, keep_change).run()
 368.320              else:
 368.321                  print >> sys.stderr, '%s: not a file, or not executable' % a
 368.322                  errs += 1
 368.323      elif run_all:
 368.324 -        names = os.listdir(path)
 368.325 +        names = glob.glob("*") + glob.glob("app*/*") + glob.glob("ch*/*")
 368.326          names.sort()
 368.327          for name in names:
 368.328 -            if name == 'run-example' or name.startswith('.'): continue
 368.329 -            if name.endswith('.out') or name.endswith('~'): continue
 368.330 -            if name.endswith('.run'): continue
 368.331 +            if name == 'run-example' or name.endswith('~'): continue
 368.332              pathname = os.path.join(path, name)
 368.333              try:
 368.334                  st = os.lstat(pathname)
 368.335 @@ -375,12 +441,20 @@
 368.336                  if err.errno != errno.ENOENT:
 368.337                      raise
 368.338                  continue
 368.339 -            if stat.S_ISREG(st.st_mode) and st.st_mode & 0111:
 368.340 -                if example(pathname, verbose).run():
 368.341 -                    errs += 1
 368.342 -        print >> open(os.path.join(path, '.run'), 'w'), time.asctime()
 368.343 +            if stat.S_ISREG(st.st_mode):
 368.344 +                if st.st_mode & 0111:
 368.345 +                    if shell_example(pathname, verbose, keep_change).run():
 368.346 +                        errs += 1
 368.347 +                elif pathname.endswith('.lst'):
 368.348 +                    static_example(pathname, verbose, keep_change).run()
 368.349 +        print >> wopen(os.path.join(path, '.run')), time.asctime()
 368.350      else:
 368.351          print_help(1, msg='no test names given, and --all not provided')
 368.352 +
 368.353 +    fp = wopen('auto-snippets.xml')
 368.354 +    for key in sorted(example.entities.iterkeys()):
 368.355 +        print >> fp, key
 368.356 +    fp.close()
 368.357      return errs
 368.358  
 368.359  if __name__ == '__main__':
   369.1 --- a/fr/examples/template.svnstyle	Thu Mar 26 08:57:10 2009 +0100
   369.2 +++ b/fr/examples/template.svnstyle	Sun Aug 16 03:41:39 2009 +0200
   369.3 @@ -34,6 +34,7 @@
   369.4  hg log -r0 --template '{node}'
   369.5  
   369.6  #$ name: simplest
   369.7 +#$ ignore: \d+-\d+-\d+ \d+:\d+ \+.*
   369.8  
   369.9  cat svn.style
  369.10  hg log -r1 --style svn.style
   370.1 --- a/fr/examples/tour	Thu Mar 26 08:57:10 2009 +0100
   370.2 +++ b/fr/examples/tour	Sun Aug 16 03:41:39 2009 +0200
   370.3 @@ -52,10 +52,17 @@
   370.4  hg clone hello my-hello
   370.5  cd my-hello
   370.6  
   370.7 -#$ name: sed
   370.8 +#$ name: cat1
   370.9 +cat hello.c
  370.10 +
  370.11 +#$ name:
  370.12  
  370.13  sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c
  370.14  
  370.15 +#$ name: cat2
  370.16 +# ... edit edit edit ...
  370.17 +cat hello.c
  370.18 +
  370.19  #$ name: status
  370.20  
  370.21  ls
  370.22 @@ -112,6 +119,7 @@
  370.23  hg update 2
  370.24  hg parents
  370.25  hg update
  370.26 +hg parents
  370.27  
  370.28  #$ name: clone-push
  370.29  
  370.30 @@ -139,21 +147,34 @@
  370.31  
  370.32  hg push http://hg.serpentine.com/tutorial/hello
  370.33  
  370.34 +#$ name:
  370.35 +cp hello.c ../new-hello.c
  370.36 +sed -i '/printf("hello,/i\\tprintf("once more, hello.\\n");' ../new-hello.c
  370.37 +
  370.38 +my-text-editor()
  370.39 +{
  370.40 +cp ../new-hello.c hello.c
  370.41 +}
  370.42 +
  370.43  #$ name: merge.clone
  370.44  
  370.45  cd ..
  370.46  hg clone hello my-new-hello
  370.47  cd my-new-hello
  370.48 -sed -i '/printf/i\\tprintf("once more, hello.\\n");' hello.c
  370.49 +# Make some simple edits to hello.c.
  370.50 +my-text-editor hello.c
  370.51  hg commit -m 'A new hello for a new day.'
  370.52  
  370.53  #$ name: merge.dummy2
  370.54  
  370.55  hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-new-hello
  370.56  
  370.57 -#$ name: merge.cat
  370.58 -
  370.59 -cat hello.c
  370.60 +#$ name: merge.cat1
  370.61 +
  370.62 +cat hello.c
  370.63 +
  370.64 +#$ name: merge.cat2
  370.65 +
  370.66  cat ../my-hello/hello.c
  370.67  
  370.68  #$ name: merge.pull
   371.1 Binary file htdocs/hgicon.png has changed
   372.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   372.2 +++ b/htdocs/index.en.html	Sun Aug 16 03:41:39 2009 +0200
   372.3 @@ -0,0 +1,51 @@
   372.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   372.5 +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   372.6 +<html lang="en">
   372.7 +  <head>
   372.8 +    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   372.9 +    <link rel="icon" href="/hgicon.png" type="image/png">
  372.10 +    <meta name="robots" content="index,follow">
  372.11 +    <title>Distributed revision control with Mercurial</title>
  372.12 +  </head>
  372.13 +
  372.14 +  <body>
  372.15 +    <h1>Distributed revision control with Mercurial</h1>
  372.16 +
  372.17 +    <p>Welcome to the home of the book &ldquo;Distributed revision
  372.18 +      control with Mercurial&rdquo;, by <a
  372.19 +      href="http://www.serpentine.com/blog/">Bryan O'Sullivan</a>.
  372.20 +      This is a <a href="hgbookap4.html">freely licensed</a> book
  372.21 +      about the <a
  372.22 +      href="http://www.selenic.com/mercurial">Mercurial</a> revision
  372.23 +      control system.</p>
  372.24 +
  372.25 +    <ul>
  372.26 +      <li>The <a href="hgbook.html">HTML version</a> is split into one
  372.27 +	web page per chapter.</li>
  372.28 +      <li>The <a href="hgbook.pdf">PDF version</a> is a single 1.3
  372.29 +	megabyte file.</li>
  372.30 +      <li>The <a href="http://hg.serpentine.com/mercurial/book">source
  372.31 +	  code</a> is available to the adventurous.</li>
  372.32 +    </ul>
  372.33 +
  372.34 +    <h2>How you can help Mercurial, and help free software</h2>
  372.35 +
  372.36 +    <p>Mercurial is a member of the <a
  372.37 +	href="http://conservancy.softwarefreedom.org/">Software
  372.38 +	Freedom Conservancy</a>, a wonderful non-profit
  372.39 +      organisation that offers its member projects legal and
  372.40 +      administrative advice.  The SFC can accept <a
  372.41 +      href="http://conservancy.softwarefreedom.org/?donate">accept
  372.42 +      donations</a> (tax-free under IRS 501(c)(3), within the United
  372.43 +      States) on behalf of its member projects.  If you would like to
  372.44 +      support Mercurial directly, please consider making a donation to
  372.45 +      the SFC on its behalf.</p>
  372.46 +
  372.47 +    <p>If you would like to help free software developers to provide
  372.48 +      their important public services without being impeded by legal
  372.49 +      issues, please consider donating to the SFC's sister
  372.50 +      organisation, the <a
  372.51 +	href="http://www.softwarefreedom.org/">Software Freedom Law
  372.52 +	Center</a>.</p>
  372.53 +  </body>
  372.54 +</html>
   373.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   373.2 +++ b/htdocs/index.es.html	Sun Aug 16 03:41:39 2009 +0200
   373.3 @@ -0,0 +1,53 @@
   373.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   373.5 +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   373.6 +<html lang="es">
   373.7 +  <head>
   373.8 +    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   373.9 +    <link rel="icon" href="/hgicon.png" type="image/png">
  373.10 +    <meta name="robots" content="index,follow">
  373.11 +    <title>Control Distribuido de Revisiones con Mercurial</title>
  373.12 +  </head>
  373.13 +
  373.14 +  <body>
  373.15 +    <h1>Control Distribuido de Revisiones con Mercurial</h1>
  373.16 +
  373.17 +    <p>Bienvenido al sito del libro &ldquo;Control Distribuido de Revisiones con Mercurial&rdquo;, en español, 
  373.18 +      por <a href="http://www.serpentine.com/blog/">Bryan O'Sullivan</a>.
  373.19 +      Este libro está cobijado por una <a href="hgbookap4.html">licencia abierta</a>
  373.20 +      y trata del sistema de control de revisiones
  373.21 +      <a href="http://www.selenic.com/mercurial">Mercurial</a>.
  373.22 +
  373.23 +    <p>Los traductores son <a href="http://devnull.li/~jerojasro/blog/">Javier Rojas</a> e
  373.24 +    <a href="http://igor.tamarapatino.org/">Igor Támara</a>. En este sitio usted puede encontrar:
  373.25 +    <ul>
  373.26 +      <li>La <a href="onepage.html">versi&oacute;n HTML</a> una sola página.</li>
  373.27 +      <li>La <a href="hgbook.pdf">versi&oacute;n PDF</a> (1.9 megabytes.)</li>
  373.28 +      <li>El <a href="http://mercurial.intuxication.org/hg/mercurial_book_es/">c&oacute;digo
  373.29 +	fuente</a> de la traducci&oacute;n, si desea revisarla o colaborar con el proyecto. En 
  373.30 +      <a href="http://hg.serpentine.com/mercurial/book">este sitio</a> puede
  373.31 +      encontrar la versi&oacute;n original en ingl&eacute;s.</li>
  373.32 +    </ul>
  373.33 +    Para más detalles acerca del proceso de traducción, por favor vea <a
  373.34 +        href="http://mercurial.intuxication.org/hg/mercurial_book_es/file/tip/es/Leame.1st">este
  373.35 +        fichero</a>.
  373.36 +
  373.37 +    <h2>¿Cómo puede usted ayudar a Mercurial, y el software libre?</h2>
  373.38 +
  373.39 +    <p>Mercurial es miembro del <a
  373.40 +	href="http://conservancy.softwarefreedom.org/">Conservatorio
  373.41 +	de Software Libre</a>, una maravillosa organización sin ánimo
  373.42 +      de lucro que ofrece a sus proyectos miembros consejo legal y
  373.43 +      administrativo.  La SFC acepta <a href="http://conservancy.softwarefreedom.org/?donate">donaciones</a>
  373.44 +      (deducibles de impuestos bajo IRS 501(c)(3), dentro de los Estados Unidos) 
  373.45 +      en representación de sus proyectos miembros.  Si desea dar un apoyo
  373.46 +      directo a Mercurial, por favor considere hacer una donación a SFC 
  373.47 +      en su representación.</p>
  373.48 +
  373.49 +    <p>Si desea apoyar a los desarrolladores de software libre en su
  373.50 +      importante servicio público sin estar impedido por cuestiones
  373.51 +      legales, por favor considere donar a la organización hermana de
  373.52 +      SFC, el <a
  373.53 +	href="http://www.softwarefreedom.org/">Centro de Leyes de Software
  373.54 +	Libre</a>.</p>
  373.55 +  </body>
  373.56 +</html>
   374.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   374.2 +++ b/htdocs/index.html.var	Sun Aug 16 03:41:39 2009 +0200
   374.3 @@ -0,0 +1,7 @@
   374.4 +URI: index.en.html
   374.5 +Content-Language: en
   374.6 +Content-Type: text/html; charset=UTF-8
   374.7 +
   374.8 +URI: index.es.html
   374.9 +Content-Language: es
  374.10 +Content-Type: text/html; charset=UTF-8
   375.1 Binary file html/hgicon.png has changed
   376.1 --- a/html/index.en.html	Thu Mar 26 08:57:10 2009 +0100
   376.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   376.3 @@ -1,51 +0,0 @@
   376.4 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   376.5 -"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   376.6 -<html lang="en">
   376.7 -  <head>
   376.8 -    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   376.9 -    <link rel="icon" href="/hgicon.png" type="image/png">
  376.10 -    <meta name="robots" content="index,follow">
  376.11 -    <title>Distributed revision control with Mercurial</title>
  376.12 -  </head>
  376.13 -
  376.14 -  <body>
  376.15 -    <h1>Distributed revision control with Mercurial</h1>
  376.16 -
  376.17 -    <p>Welcome to the home of the book &ldquo;Distributed revision
  376.18 -      control with Mercurial&rdquo;, by <a
  376.19 -      href="http://www.serpentine.com/blog/">Bryan O'Sullivan</a>.
  376.20 -      This is a <a href="hgbookap4.html">freely licensed</a> book
  376.21 -      about the <a
  376.22 -      href="http://www.selenic.com/mercurial">Mercurial</a> revision
  376.23 -      control system.</p>
  376.24 -
  376.25 -    <ul>
  376.26 -      <li>The <a href="hgbook.html">HTML version</a> is split into one
  376.27 -	web page per chapter.</li>
  376.28 -      <li>The <a href="hgbook.pdf">PDF version</a> is a single 1.3
  376.29 -	megabyte file.</li>
  376.30 -      <li>The <a href="http://hg.serpentine.com/mercurial/book">source
  376.31 -	  code</a> is available to the adventurous.</li>
  376.32 -    </ul>
  376.33 -
  376.34 -    <h2>How you can help Mercurial, and help free software</h2>
  376.35 -
  376.36 -    <p>Mercurial is a member of the <a
  376.37 -	href="http://conservancy.softwarefreedom.org/">Software
  376.38 -	Freedom Conservancy</a>, a wonderful non-profit
  376.39 -      organisation that offers its member projects legal and
  376.40 -      administrative advice.  The SFC can accept <a
  376.41 -      href="http://conservancy.softwarefreedom.org/?donate">accept
  376.42 -      donations</a> (tax-free under IRS 501(c)(3), within the United
  376.43 -      States) on behalf of its member projects.  If you would like to
  376.44 -      support Mercurial directly, please consider making a donation to
  376.45 -      the SFC on its behalf.</p>
  376.46 -
  376.47 -    <p>If you would like to help free software developers to provide
  376.48 -      their important public services without being impeded by legal
  376.49 -      issues, please consider donating to the SFC's sister
  376.50 -      organisation, the <a
  376.51 -	href="http://www.softwarefreedom.org/">Software Freedom Law
  376.52 -	Center</a>.</p>
  376.53 -  </body>
  376.54 -</html>
   377.1 --- a/html/index.es.html	Thu Mar 26 08:57:10 2009 +0100
   377.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   377.3 @@ -1,53 +0,0 @@
   377.4 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   377.5 -"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   377.6 -<html lang="es">
   377.7 -  <head>
   377.8 -    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   377.9 -    <link rel="icon" href="/hgicon.png" type="image/png">
  377.10 -    <meta name="robots" content="index,follow">
  377.11 -    <title>Control Distribuido de Revisiones con Mercurial</title>
  377.12 -  </head>
  377.13 -
  377.14 -  <body>
  377.15 -    <h1>Control Distribuido de Revisiones con Mercurial</h1>
  377.16 -
  377.17 -    <p>Bienvenido al sito del libro &ldquo;Control Distribuido de Revisiones con Mercurial&rdquo;, en español, 
  377.18 -      por <a href="http://www.serpentine.com/blog/">Bryan O'Sullivan</a>.
  377.19 -      Este libro está cobijado por una <a href="hgbookap4.html">licencia abierta</a>
  377.20 -      y trata del sistema de control de revisiones
  377.21 -      <a href="http://www.selenic.com/mercurial">Mercurial</a>.
  377.22 -
  377.23 -    <p>Los traductores son <a href="http://devnull.li/~jerojasro/blog/">Javier Rojas</a> e
  377.24 -    <a href="http://igor.tamarapatino.org/">Igor Támara</a>. En este sitio usted puede encontrar:
  377.25 -    <ul>
  377.26 -      <li>La <a href="onepage.html">versi&oacute;n HTML</a> una sola página.</li>
  377.27 -      <li>La <a href="hgbook.pdf">versi&oacute;n PDF</a> (1.9 megabytes.)</li>
  377.28 -      <li>El <a href="http://mercurial.intuxication.org/hg/mercurial_book_es/">c&oacute;digo
  377.29 -	fuente</a> de la traducci&oacute;n, si desea revisarla o colaborar con el proyecto. En 
  377.30 -      <a href="http://hg.serpentine.com/mercurial/book">este sitio</a> puede
  377.31 -      encontrar la versi&oacute;n original en ingl&eacute;s.</li>
  377.32 -    </ul>
  377.33 -    Para más detalles acerca del proceso de traducción, por favor vea <a
  377.34 -        href="http://mercurial.intuxication.org/hg/mercurial_book_es/file/tip/es/Leame.1st">este
  377.35 -        fichero</a>.
  377.36 -
  377.37 -    <h2>¿Cómo puede usted ayudar a Mercurial, y el software libre?</h2>
  377.38 -
  377.39 -    <p>Mercurial es miembro del <a
  377.40 -	href="http://conservancy.softwarefreedom.org/">Conservatorio
  377.41 -	de Software Libre</a>, una maravillosa organización sin ánimo
  377.42 -      de lucro que ofrece a sus proyectos miembros consejo legal y
  377.43 -      administrativo.  La SFC acepta <a href="http://conservancy.softwarefreedom.org/?donate">donaciones</a>
  377.44 -      (deducibles de impuestos bajo IRS 501(c)(3), dentro de los Estados Unidos) 
  377.45 -      en representación de sus proyectos miembros.  Si desea dar un apoyo
  377.46 -      directo a Mercurial, por favor considere hacer una donación a SFC 
  377.47 -      en su representación.</p>
  377.48 -
  377.49 -    <p>Si desea apoyar a los desarrolladores de software libre en su
  377.50 -      importante servicio público sin estar impedido por cuestiones
  377.51 -      legales, por favor considere donar a la organización hermana de
  377.52 -      SFC, el <a
  377.53 -	href="http://www.softwarefreedom.org/">Centro de Leyes de Software
  377.54 -	Libre</a>.</p>
  377.55 -  </body>
  377.56 -</html>
   378.1 --- a/html/index.html.var	Thu Mar 26 08:57:10 2009 +0100
   378.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   378.3 @@ -1,7 +0,0 @@
   378.4 -URI: index.en.html
   378.5 -Content-Language: en
   378.6 -Content-Type: text/html; charset=UTF-8
   378.7 -
   378.8 -URI: index.es.html
   378.9 -Content-Language: es
  378.10 -Content-Type: text/html; charset=UTF-8
   379.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   379.2 +++ b/ja/00book.tex	Sun Aug 16 03:41:39 2009 +0200
   379.3 @@ -0,0 +1,58 @@
   379.4 +\title{Mercurial $B$K$h$kJ,;69=@.4IM}(B} 
   379.5 +\author{Bryan O'Sullivan}
   379.6 +\date{Copyright \copyright\ 2006, 2007 Bryan O'Sullivan.\\
   379.7 +  This material may be distributed only subject to the terms and
   379.8 +  conditions set forth in version 1.0 of the Open Publication License.
   379.9 +  $B%i%$%;%s%9>r9`$K4X$9$k>\:Y$O!"IUO?(B~\ref{cha:opl}$B$r;2>H$7$F$/$@$5$$!#(B\\
  379.10 +  $BK\=q$O%j%S%8%g%s(B
  379.11 +  \href{http://hg.serpentine.com/mercurial/book/}{a24b370a16ee}
  379.12 +  $B$N@.2LJ*$r85$KK]Lu$7$?$b$N$G$9!#(B}
  379.13 +
  379.14 +\makeindex
  379.15 +
  379.16 +\begin{document}
  379.17 +
  379.18 +\maketitle
  379.19 +
  379.20 +\addcontentsline{toc}{chapter}{Contents}
  379.21 +\pagenumbering{roman}
  379.22 +\tableofcontents
  379.23 +\listoffigures
  379.24 +%\listoftables
  379.25 +
  379.26 +\pagenumbering{arabic}
  379.27 +
  379.28 +\include{preface}
  379.29 +\include{intro}
  379.30 +\include{tour-basic}
  379.31 +\include{tour-merge}
  379.32 +\include{concepts}
  379.33 +\include{daily}
  379.34 +\include{collab}
  379.35 +\include{filenames}
  379.36 +\include{branch}
  379.37 +\include{undo}
  379.38 +\include{hook}
  379.39 +\include{template}
  379.40 +\include{mq}
  379.41 +\include{mq-collab}
  379.42 +\include{hgext}
  379.43 +
  379.44 +\appendix
  379.45 +%\include{cmdref}
  379.46 +%\include{mq-ref}
  379.47 +\include{srcinstall}
  379.48 +\include{license}
  379.49 +\addcontentsline{toc}{chapter}{Bibliography}
  379.50 +\bibliographystyle{alpha}
  379.51 +\bibliography{99book}
  379.52 +
  379.53 +\addcontentsline{toc}{chapter}{Index}
  379.54 +\printindex
  379.55 +
  379.56 +\end{document}
  379.57 +
  379.58 +%%% Local Variables: 
  379.59 +%%% mode: latex
  379.60 +%%% TeX-master: "00book_pdf"
  379.61 +%%% End: 
   380.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   380.2 +++ b/ja/00book_html.tex	Sun Aug 16 03:41:39 2009 +0200
   380.3 @@ -0,0 +1,78 @@
   380.4 +% The use of oneside here is a temporary hack; \marginpar entries
   380.5 +% don't show up on odd pages of PDF output without it.  Sigh.
   380.6 +%\documentclass[oneside]{jbook}
   380.7 +\documentclass[oneside]{book}
   380.8 +
   380.9 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  380.10 +
  380.11 +%%%%
  380.12 +%%%% output format independent part:
  380.13 +%%%%
  380.14 +
  380.15 +%\usepackage{enumerate}
  380.16 +\usepackage{fullpage}
  380.17 +\usepackage{makeidx}
  380.18 +\usepackage{fancyvrb}
  380.19 +\usepackage{custom}
  380.20 +
  380.21 +%%%%
  380.22 +%%%% output format specific part:
  380.23 +%%%%
  380.24 +
  380.25 +\usepackage{graphicx}
  380.26 +
  380.27 +% leave hyperref until last
  380.28 +\usepackage[
  380.29 +  tex4ht,
  380.30 +  colorlinks=true,
  380.31 +  bookmarks=true,
  380.32 +  bookmarksnumbered=true,
  380.33 +  bookmarkstype=toc
  380.34 +  ]{hyperref}
  380.35 +
  380.36 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  380.37 +
  380.38 +%%%%
  380.39 +%%%% output format independent part:
  380.40 +%%%%
  380.41 +
  380.42 +\include{99defs}
  380.43 +
  380.44 +%%%%
  380.45 +%%%% output format specific part:
  380.46 +%%%%
  380.47 +
  380.48 +%\newcommand{\grafix}[1]{\includegraphics{#1}}
  380.49 +%\newcommand{\grafix}[1]{#1}
  380.50 +\newcommand{\grafix}[2][]{\Picture{#2}} % ignore #1
  380.51 +\newcommand{\grafixL}[1]{\Picture{#1}}
  380.52 +
  380.53 +% Note: blah blah.
  380.54 +\newsavebox{\notebox}
  380.55 +\newenvironment{note}{
  380.56 +  \begin{lrbox}{\notebox}
  380.57 +    \begin{minipage}{0.7\textwidth}
  380.58 +      \textbf{$BHw9M(B:}\space%
  380.59 +}{
  380.60 +    \end{minipage}
  380.61 +  \end{lrbox}
  380.62 +  \fbox{\usebox{\notebox}}
  380.63 +}
  380.64 +\newenvironment{caution}{
  380.65 +  \begin{lrbox}{\notebox}
  380.66 +    \begin{minipage}{0.7\textwidth}
  380.67 +      \textbf{$BCm0U(B:}\space%
  380.68 +}{
  380.69 +    \end{minipage}
  380.70 +  \end{lrbox}
  380.71 +  \fbox{\usebox{\notebox}}
  380.72 +}
  380.73 +
  380.74 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  380.75 +
  380.76 +\input{00book}
  380.77 +
  380.78 +%%% Local Variables: 
  380.79 +%%% mode: latex
  380.80 +%%% TeX-master: t
  380.81 +%%% End: 
   381.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   381.2 +++ b/ja/00book_pdf.tex	Sun Aug 16 03:41:39 2009 +0200
   381.3 @@ -0,0 +1,91 @@
   381.4 +% The use of oneside here is a temporary hack; \marginpar entries
   381.5 +% don't show up on odd pages of PDF output without it.  Sigh.
   381.6 +\documentclass[oneside]{jbook}
   381.7 +
   381.8 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   381.9 +
  381.10 +%%%%
  381.11 +%%%% output format independent part:
  381.12 +%%%%
  381.13 +
  381.14 +%\usepackage{enumerate}
  381.15 +\usepackage{fullpage}
  381.16 +\usepackage{makeidx}
  381.17 +\usepackage{fancyvrb}
  381.18 +\usepackage{custom}
  381.19 +
  381.20 +%%%%
  381.21 +%%%% output format specific part:
  381.22 +%%%%
  381.23 +
  381.24 +\usepackage[dvipdfm]{color} % prevents COLOR.STY from using DVIPS.DEF driver
  381.25 +\usepackage[dvipdfm]{graphicx}
  381.26 +\usepackage{pslatex}
  381.27 +
  381.28 +\input{atbegxxx}
  381.29 +
  381.30 +% leave hyperref until last
  381.31 +\usepackage[
  381.32 +  dvipdfm,
  381.33 +  colorlinks=true,
  381.34 +  bookmarks=true,
  381.35 +  bookmarksnumbered=true,
  381.36 +  bookmarkstype=toc,
  381.37 +  pdftitle={Mercurial $B$K$h$kJ,;69=@.4IM}(B},
  381.38 +  pdfsubject={$B9=@.4IM}(B},
  381.39 +  pdfkeywords={Mercurial, $B9=@.4IM}(B, $BJ,;69=@.4IM}(B},
  381.40 +  pdfauthor={Bryan O'Sullivan}
  381.41 +  ]{hyperref}
  381.42 +
  381.43 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  381.44 +
  381.45 +%%%%
  381.46 +%%%% output format independent part:
  381.47 +%%%%
  381.48 +
  381.49 +\include{99defs}
  381.50 +
  381.51 +%%%%
  381.52 +%%%% output format specific part:
  381.53 +%%%%
  381.54 +
  381.55 +\newcommand{\grafix}[2][]{\includegraphics[#1]{#2}}
  381.56 +\newcommand{\grafixL}[1]{\includegraphics[angle=90,height=\textwidth]{#1}}
  381.57 +
  381.58 +% Note: blah blah.
  381.59 +\newsavebox{\notebox}
  381.60 +\newenvironment{note}{
  381.61 +  \vspace{1.5\kanjicharheight}
  381.62 +  \begin{center}
  381.63 +    \begin{lrbox}{\notebox}
  381.64 +      \begin{minipage}{0.8\textwidth}
  381.65 +        \textbf{$BHw9M(B:}\space
  381.66 +}{
  381.67 +      \end{minipage}
  381.68 +    \end{lrbox}
  381.69 +    \fbox{\usebox{\notebox}}
  381.70 +  \end{center}
  381.71 +  \vspace{1.5\kanjicharheight}
  381.72 +}
  381.73 +\newenvironment{caution}{
  381.74 +  \vspace{1.5\kanjicharheight}
  381.75 +  \begin{center}
  381.76 +    \begin{lrbox}{\notebox}
  381.77 +      \begin{minipage}{0.8\textwidth}
  381.78 +        \textbf{$BCm0U(B:}\space%
  381.79 +}{
  381.80 +      \end{minipage}
  381.81 +    \end{lrbox}
  381.82 +    \fbox{\usebox{\notebox}}
  381.83 +  \begin{center}
  381.84 +  \vspace{1.5\kanjicharheight}
  381.85 +}
  381.86 +
  381.87 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  381.88 +
  381.89 +\input{00book}
  381.90 +
  381.91 +%%% Local Variables: 
  381.92 +%%% mode: latex
  381.93 +%%% TeX-master: t
  381.94 +%%% End: 
   382.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   382.2 +++ b/ja/99book.bib	Sun Aug 16 03:41:39 2009 +0200
   382.3 @@ -0,0 +1,76 @@
   382.4 +@Unpublished{gruenbacher:2005,
   382.5 +  author = 	 {Andreas Gruenbacher},
   382.6 +  title = 	 {How To Survive With Many Patches (Introduction to \texttt{quilt})},
   382.7 +  year = 	 {2005},
   382.8 +  month = 	 {June},
   382.9 +  note =         {\url{http://www.suse.de/~agruen/quilt.pdf}},
  382.10 +}
  382.11 +
  382.12 +@InProceedings{web:europython,
  382.13 +  author = 	 {Bryan O'Sullivan},
  382.14 +  title = 	 {Achieving High Performance in Mercurial},
  382.15 +  booktitle = 	 {EuroPython Conference},
  382.16 +  year = 	 {2006},
  382.17 +  month = 	 {July},
  382.18 +  note = 	 {\url{XXX}},
  382.19 +}
  382.20 +
  382.21 +@Misc{web:diffstat,
  382.22 +  author = 	 {Thomas Dickey},
  382.23 +  title = 	 {\texttt{diffstat}--make a histogram of \texttt{diff} output},
  382.24 +  note = 	 {\url{http://dickey.his.com/diffstat/diffstat.html}},
  382.25 +}
  382.26 +
  382.27 +@Misc{web:quilt,
  382.28 +  author = 	 {Andreas Gruenbacher, Martin Quinson, Jean Delvare},
  382.29 +  title = 	 {Patchwork Quilt},
  382.30 +  note = 	 {\url{http://savannah.nongnu.org/projects/quilt}},
  382.31 +}
  382.32 +
  382.33 +@Misc{web:patchutils,
  382.34 +  author = 	 {Tim Waugh},
  382.35 +  title = 	 {\texttt{patchutils}--programs that operate on patch files},
  382.36 +  note = 	 {\url{http://cyberelk.net/tim/patchutils/}},
  382.37 +}
  382.38 +
  382.39 +@Misc{web:mpatch,
  382.40 +  author = 	 {Chris Mason},
  382.41 +  title = 	 {\texttt{mpatch}--help solve patch rejects},
  382.42 +  note = 	 {\url{http://oss.oracle.com/~mason/mpatch/}},
  382.43 +}
  382.44 +
  382.45 +@Misc{web:wiggle,
  382.46 +  author = 	 {Neil Brown},
  382.47 +  title = 	 {\texttt{wiggle}--apply conflicting patches},
  382.48 +  note = 	 {\url{http://cgi.cse.unsw.edu.au/~neilb/source/wiggle/}},
  382.49 +}
  382.50 +
  382.51 +@Misc{web:mysql-python,
  382.52 +  author =	 {Andy Dustman},
  382.53 +  title =	 {MySQL for Python},
  382.54 +  note =	 {\url{http://sourceforge.net/projects/mysql-python}},
  382.55 +}
  382.56 +
  382.57 +@Misc{web:changelog,
  382.58 +  author =	 {Richard Stallman, GNU Project volunteers},
  382.59 +  title =	 {GNU Coding Standards---Change Logs},
  382.60 +  note =	 {\url{http://www.gnu.org/prep/standards/html_node/Change-Logs.html}},
  382.61 +}
  382.62 +
  382.63 +@Misc{web:macpython,
  382.64 +  author =	 {Bob Ippolito, Ronald Oussoren},
  382.65 +  title =	 {Universal MacPython},
  382.66 +  note =	 {\url{http://bob.pythonmac.org/archives/2006/04/10/python-and-universal-binaries-on-mac-os-x/}},
  382.67 +}
  382.68 +
  382.69 +@Misc{web:putty,
  382.70 +  author =	 {Simon Tatham},
  382.71 +  title =	 {PuTTY---open source ssh client for Windows},
  382.72 +  note =	 {\url{http://www.chiark.greenend.org.uk/~sgtatham/putty/}},
  382.73 +}
  382.74 +
  382.75 +@Misc{web:configparser,
  382.76 +  author =       {Python.org},
  382.77 +  title =	 {\texttt{ConfigParser}---Configuration file parser},
  382.78 +  note =	 {\url{http://docs.python.org/lib/module-ConfigParser.html}},
  382.79 +}
   383.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   383.2 +++ b/ja/99defs.tex	Sun Aug 16 03:41:39 2009 +0200
   383.3 @@ -0,0 +1,183 @@
   383.4 +% Bug ID.
   383.5 +\newcommand{\bug}[1]{\index{Mercurial 
   383.6 +    $B%P%0%G!<%?%Y!<%9(B!
   383.7 +    \href{http://www.selenic.com/mercurial/bts/issue#1}{$B%P%0(B~#1}
   383.8 +    }\href{http://www.selenic.com/mercurial/bts/issue#1}{Mercurial
   383.9 +    $B%P%0HV9f(B~#1}}
  383.10 +
  383.11 +% File name in the user's home directory.
  383.12 +\newcommand{\tildefile}[1]{\texttt{\~{}/#1}}
  383.13 +
  383.14 +% File name.
  383.15 +\newcommand{\filename}[1]{\texttt{#1}}
  383.16 +
  383.17 +% Directory name.
  383.18 +\newcommand{\dirname}[1]{\texttt{#1}}
  383.19 +
  383.20 +% File name, with index entry.
  383.21 +% The ``s'' prefix comes from ``special''.
  383.22 +\newcommand{\sfilename}[1]{\index{\texttt{#1} $B%U%!%$%k(B}\texttt{#1}}
  383.23 +
  383.24 +% Directory name, with index entry.
  383.25 +\newcommand{\sdirname}[1]{\index{\texttt{#1} $B%G%#%l%/%H%j(B}\texttt{#1}}
  383.26 +
  383.27 +% Mercurial extension.
  383.28 +\newcommand{\hgext}[1]{\index{\texttt{#1} $B%$%/%9%F%s%7%g%s(B}\texttt{#1}}
  383.29 +
  383.30 +% Command provided by a Mercurial extension.
  383.31 +\newcommand{\hgxcmd}[2]{\index{\texttt{#2} $B%3%^%s%I(B (\texttt{#1}
  383.32 +    $B%$%/%9%F%s%7%g%s(B)
  383.33 +    }\index{\texttt{#1} $B%$%/%9%F%s%7%g%s(B!\texttt{#2} $B%3%^%s%I(B
  383.34 +    }``\texttt{hg #2}''}
  383.35 +
  383.36 +% Mercurial command.
  383.37 +\newcommand{\hgcmd}[1]{\index{\texttt{#1} $B%3%^%s%I(B}``\texttt{hg #1}''}
  383.38 +
  383.39 +% Mercurial command, with arguments.
  383.40 +\newcommand{\hgcmdargs}[2]{\index{\texttt{#1} $B%3%^%s%I(B}``\texttt{hg #1 #2}''}
  383.41 +
  383.42 +\newcommand{\tplkword}[1]{\index{\texttt{#1} $B%F%s%W%l!<%H%-!<%o!<%I(B
  383.43 +    }\index{$B%F%s%W%l!<%H%-!<%o!<%I(B!\texttt{#1}}\texttt{#1}}
  383.44 +
  383.45 +\newcommand{\tplkwfilt}[2]{
  383.46 +    \index{\texttt{#1} $B%F%s%W%l!<%H%-!<%o!<%I(B!\texttt{#2} $B%U%#%k%?(B
  383.47 +    }\index{$B%F%s%W%l!<%H%U%#%k%?(B!
  383.48 +    \texttt{#2}}\index{\texttt{#2} $B%F%s%W%l!<%H%U%#%k%?(B}\texttt{#2}}
  383.49 +
  383.50 +\newcommand{\tplfilter}[1]{\index{$B%F%s%W%l!<%H%U%#%k%?(B!\texttt{#1}
  383.51 +    }\index{\texttt{#1} $B%F%s%W%l!<%H%U%#%k%?(B}\texttt{#1}}
  383.52 +
  383.53 +% Shell/system command.
  383.54 +\newcommand{\command}[1]{\index{\texttt{#1} $B%7%9%F%`%3%^%s%I(B}\texttt{#1}}
  383.55 +
  383.56 +% Shell/system command, with arguments.
  383.57 +\newcommand{\cmdargs}[2]{\index{\texttt{#1} $B%3%^%s%I(B}``\texttt{#1 #2}''}
  383.58 +
  383.59 +% Mercurial command option.
  383.60 +\newcommand{\hgopt}[2]{\index{\texttt{#1} $B%3%^%s%I(B!\texttt{#2} $B%*%W%7%g%s(B
  383.61 +    }\texttt{#2}}
  383.62 +
  383.63 +% Mercurial command option, provided by an extension command.
  383.64 +\newcommand{\hgxopt}[3]{
  383.65 +    \index{\texttt{#2} $B%3%^%s%I(B(\texttt{#1} $B%$%/%9%F%s%7%g%s(B)!
  383.66 +    \texttt{#3} $B%*%W%7%g%s(B
  383.67 +    }\index{\texttt{#1} $B%$%/%9%F%s%7%g%s(B!\texttt{#2} $B%3%^%s%I(B!
  383.68 +    \texttt{#3} $B%*%W%7%g%s(B}\texttt{#3}}
  383.69 +
  383.70 +% Mercurial global option.
  383.71 +\newcommand{\hggopt}[1]{\index{$B%0%m!<%P%k%*%W%7%g%s(B!\texttt{#1} $B%*%W%7%g%s(B
  383.72 +    }\texttt{#1}}
  383.73 +
  383.74 +% Shell/system command option.
  383.75 +\newcommand{\cmdopt}[2]{\index{\texttt{#1} $B%3%^%s%I(B!\texttt{#2} $B%*%W%7%g%s(B
  383.76 +    }\texttt{#2}}
  383.77 +
  383.78 +% Command option.
  383.79 +\newcommand{\option}[1]{\texttt{#1}}
  383.80 +
  383.81 +% Software package.
  383.82 +\newcommand{\package}[1]{\index{\texttt{#1} $B%Q%C%1!<%8(B}\texttt{#1}}
  383.83 +
  383.84 +% Section name from a hgrc file.
  383.85 +\newcommand{\rcsection}[1]{\index{\texttt{hgrc} $B%U%!%$%k(B!\texttt{#1} $B%;%/%7%g%s(B
  383.86 +    }\texttt{[#1]}}
  383.87 +
  383.88 +% Named item in a hgrc file section.
  383.89 +\newcommand{\rcitem}[2]{\index{\texttt{hgrc} $B%U%!%$%k(B!
  383.90 +    \texttt{#1} $B%;%/%7%g%s(B!\texttt{#2} $B9`L\(B}\texttt{#2}}
  383.91 +
  383.92 +% hgrc file.
  383.93 +\newcommand{\hgrc}{\index{$B@_Dj%U%!%$%k(B!\texttt{hgrc}(Linux/Unix)
  383.94 +    }\index{\texttt{hgrc} $B@_Dj%U%!%$%k(B}\texttt{hgrc}}
  383.95 +
  383.96 +% Mercurial.ini file.
  383.97 +\newcommand{\hgini}{\index{$B@_Dj%U%!%$%k(B!\texttt{Mercurial.ini}(Windows)
  383.98 +    }\index{\texttt{Mercurial.ini} $B@_Dj%U%!%$%k(B
  383.99 +    }\texttt{Mercurial.ini}}
 383.100 +
 383.101 +% Hook name.
 383.102 +\newcommand{\hook}[1]{\index{\texttt{#1} $B%U%C%/(B
 383.103 +    }\index{$B%U%C%/(B!\texttt{#1}}\texttt{#1}}
 383.104 +
 383.105 +% Environment variable.
 383.106 +\newcommand{\envar}[1]{\index{\texttt{#1} $B4D6-JQ?t(B
 383.107 +    }\index{$B4D6-JQ?t(B!\texttt{#1}}\texttt{#1}}
 383.108 +
 383.109 +% Python module.
 383.110 +\newcommand{\pymod}[1]{\index{\texttt{#1} $B%b%8%e!<%k(B}\texttt{#1}}
 383.111 +
 383.112 +% Python class in a module.
 383.113 +\newcommand{\pymodclass}[2]{\index{\texttt{#1} $B%b%8%e!<%k(B!\texttt{#2} $B%/%i%9(B
 383.114 +    }\texttt{#1.#2}}
 383.115 +
 383.116 +% Python function in a module.
 383.117 +\newcommand{\pymodfunc}[2]{\index{\texttt{#1} $B%b%8%e!<%k(B!\texttt{#2} $B4X?t(B
 383.118 +    }\texttt{#1.#2}}
 383.119 +
 383.120 +% Code sample, eating 4 characters of leading space.
 383.121 +\DefineVerbatimEnvironment{codesample4}{Verbatim}{
 383.122 +  frame=single,
 383.123 +  gobble=4,
 383.124 +  xleftmargin=0.1\textwidth,
 383.125 +  xrightmargin=0.1\textwidth,
 383.126 +  baselinestretch=0.8,
 383.127 +  numbers=left,
 383.128 +  commandchars=\\\{\}
 383.129 +}
 383.130 +
 383.131 +% Code sample, eating 2 characters of leading space.
 383.132 +\DefineVerbatimEnvironment{codesample2}{Verbatim}{
 383.133 +  frame=single,
 383.134 +  gobble=2,
 383.135 +  xleftmargin=0.1\textwidth,
 383.136 +  xrightmargin=0.1\textwidth,
 383.137 +  baselinestretch=0.8,
 383.138 +  numbers=left,
 383.139 +  commandchars=\\\{\}
 383.140 +}
 383.141 +
 383.142 +% Interaction from the examples directory.
 383.143 +\newcommand{\interaction}[1]{
 383.144 +  \vspace{1.5\kanjicharheight}
 383.145 +  \VerbatimInput[
 383.146 +    frame=single,
 383.147 +    xleftmargin=0.1\textwidth,
 383.148 +    xrightmargin=0.1\textwidth,
 383.149 +    baselinestretch=0.8,
 383.150 +    numbers=left,
 383.151 +    commandchars=\\\{\}
 383.152 +  ]{%
 383.153 +%    examples/#1.out
 383.154 +    examples/#1.lxo
 383.155 +  }
 383.156 +  \vspace{1.5\kanjicharheight}
 383.157 +}
 383.158 +% Example code from the examples directory.
 383.159 +\newcommand{\excode}[1]{
 383.160 +  \vspace{1.5\kanjicharheight}
 383.161 +  \VerbatimInput[
 383.162 +    frame=single,
 383.163 +    xleftmargin=0.1\textwidth,
 383.164 +    xrightmargin=0.1\textwidth,
 383.165 +    baselinestretch=0.8,
 383.166 +    numbers=left,
 383.167 +    commandchars=\\\{\}
 383.168 +  ]{../examples/#1}
 383.169 +  \vspace{1.5\kanjicharheight}
 383.170 +}
 383.171 +
 383.172 +% Reference entry for a command.
 383.173 +\newcommand{\cmdref}[2]{\section{\hgcmd{#1}---#2}\label{cmdref:#1}
 383.174 +    \index{\texttt{#1} $B%3%^%s%I(B}}
 383.175 +
 383.176 +% Reference entry for a command option with long and short forms.
 383.177 +\newcommand{\optref}[3]{\subsubsection{\hgopt{#1}{--#3} $B$J$$$7(B
 383.178 +    \hgopt{#1}{-#2}}}
 383.179 +
 383.180 +% Reference entry for a command option with only long form.
 383.181 +\newcommand{\loptref}[2]{\subsubsection{\hgopt{#1}{--#2} $B%*%W%7%g%s(B}}
 383.182 +
 383.183 +%%% Local Variables: 
 383.184 +%%% mode: latex
 383.185 +%%% TeX-master: "00book"
 383.186 +%%% End: 
   384.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   384.2 +++ b/ja/CONFIRMED.ja.txt	Sun Aug 16 03:41:39 2009 +0200
   384.3 @@ -0,0 +1,171 @@
   384.4 +===============================================================================
   384.5 +                         $BF0:n3NG':Q$_4D6->pJs(B
   384.6 +===============================================================================
   384.7 +
   384.8 +===============================================================================
   384.9 +[Vine 4.2 2.6.16-76.40vl4]
  384.10 +
  384.11 +TeX tools:
  384.12 +
  384.13 +    name                 version
  384.14 +    --------------------+----------------
  384.15 +    tetex               |3.0 0vl11.4
  384.16 +    tetex-extra         |3.0 0vl11.4
  384.17 +    tetex-macros        |3.0 0vl3
  384.18 +    jvf                 |2.0 0vl1
  384.19 +    dvipdfmx            |20070518 0vl1
  384.20 +    --------------------+----------------
  384.21 +
  384.22 +    Vine $B$G@8@.$7$?(B PDF $B$K$O0lIt$KITL@$J%U%)%s%H$,@_Dj$5$l$k>l9g$,$"$j(B
  384.23 +    $B$^$9$,!"8=>u$G$O860xITL@$G$9!#(B
  384.24 +
  384.25 +Graphic tools:
  384.26 +
  384.27 +    name                 version
  384.28 +    --------------------+----------------
  384.29 +    ghostscript         |7.07 0vl30.1
  384.30 +    ghostscript-fonts   |5.50 1vl2
  384.31 +    graphviz            |2.6 0vl2
  384.32 +    inkscape            |0.44.1 0vl1
  384.33 +    --------------------+----------------
  384.34 +
  384.35 +Other tools:
  384.36 +
  384.37 +    name                 version
  384.38 +    --------------------+----------------
  384.39 +    make                |3.80 0vl4
  384.40 +    python              |2.4.4 1.4vl4
  384.41 +    perl                |5.8.6 0vl3.1
  384.42 +    --------------------+----------------
  384.43 +
  384.44 +===============================================================================
  384.45 +[Debian 2.6.26-13lenny2]
  384.46 +
  384.47 +TeX tools:
  384.48 +
  384.49 +    name                 version
  384.50 +    --------------------+----------------
  384.51 +    ptex-bin            |3.1.10+0.04b-2.1
  384.52 +    ptex-jisfonts       |2-21
  384.53 +    vfdata-morisawa5    |0.0.20020122-14
  384.54 +    texlive-latex-base  |2007.dfsg.1-5
  384.55 +    texlive-latex-extra |2007.dfsg.17-1~lenny01
  384.56 +    jbibtex-bin         |3.1.10+0.04b-2.1
  384.57 +    mendexk             |2.6e-3
  384.58 +    dvipdfmx            |1:20080607-1
  384.59 +    cmap-adobe-cns1     |0+20060819-3
  384.60 +    cmap-adobe-gb1      |0+20051207-3        
  384.61 +    cmap-adobe-japan1   |0+20071201-4
  384.62 +    cmap-adobe-japan2   |0+20020208-4
  384.63 +    --------------------+----------------
  384.64 +
  384.65 +    $B>e5-$N(B dvipdfmx $B$K$O!"J8;z%3!<%IJQ49MQ$N%^%C%W%U%!%$%k$,F1:-$5$l$J(B
  384.66 +    $B$$LdBj$,$"$j$^$9!#(B
  384.67 +
  384.68 +         http://oku.edu.mie-u.ac.jp/~okumura/texfaq/qa/52108.html
  384.69 +         http://oku.edu.mie-u.ac.jp/~okumura/texfaq/qa/52944.html
  384.70 +
  384.71 +     $BHG$K$h$C$FE:IU!?:o=|$r7+$jJV$7$F$$LOMM$@$,!">e5-$NHG$G$OE:IU$5$l$F(B
  384.72 +     $B$$$J$$>uBV$N$?$a!"0J2<$N<j=g$GBP=h$,I,MW$G$9(B:
  384.73 +
  384.74 +     1. EUC-UCS2 $B%U%!%$%k$rF~<j(B
  384.75 +
  384.76 +        a. $B%=!<%9%"!<%+%$%V$rF~<j$7$F(B data/EUC-UCS2 $B$r<h$j=P$9(B
  384.77 +
  384.78 +           http://project.ktug.or.kr/dvipdfmx/
  384.79 +
  384.80 +        b. $B$"$k$$$O(B CVS $B%V%i%&%8%s%0%5!<%S%97PM3$GF~<j(B
  384.81 +
  384.82 +           http://cvs.ktug.or.kr/viewcvs/dvipdfmx/
  384.83 +
  384.84 +     2. $BF~<j$7$?(B EUC-UCS2 $B%U%!%$%k$NG[CV(B
  384.85 +
  384.86 +        /etc/texmf/texmf.cnf $B%U%!%$%kCf$N(B dvipdfmx $B$K4X$9$k(BCMAPINPUTS
  384.87 +        $B@_Dj%Q%9$K1~$8$F(B EUC-UCS2 $B%U%!%$%k$rG[CV$9$k!#(B
  384.88 +
  384.89 +        $B"((B $B;d$N4D6-$G$O(B /usr/share/fonts/cmap/ $BG[2<$G$7$?(B
  384.90 +
  384.91 +Graphic tools:
  384.92 +
  384.93 +    name                 version
  384.94 +    --------------------+----------------
  384.95 +    gs                  |8.62.dfsg.1-3.2lenny1
  384.96 +    gs-esp              |8.62.dfsg.1-3.2lenny1
  384.97 +    gs-cjk-resource     |1.20080107-4
  384.98 +    graphviz            |2.20.2-3
  384.99 +    inkscape            |0.46-2.lenny2
 384.100 +    --------------------+----------------
 384.101 +
 384.102 +Other tools:
 384.103 +
 384.104 +    name                 version
 384.105 +    --------------------+----------------
 384.106 +    make                |3.81-5
 384.107 +    python              |2.5.2-3
 384.108 +    perl                |5.10.0-19
 384.109 +    --------------------+----------------
 384.110 +
 384.111 +===============================================================================
 384.112 +[Win32]
 384.113 +
 384.114 +TeX tools:
 384.115 +
 384.116 +    README.ja.txt $B$K5-:\$5$l$F$$$k(B URL $B$N%Z!<%8$r;29M$K!"4pK\E*$K$O!V%U(B
 384.117 +    $B%k%$%s%9%H!<%k!W$GF3F~$7$F$/$@$5$$!#(BWin32 $B8~$1$NG[I[J*$O!"%j%j!<%9(B
 384.118 +    $B;~E@$N%9%J%C%W%7%g%C%H$K87L)$J%P!<%8%g%sIU$1$,$5$l$F$$$^$;$s$N$G!"(B
 384.119 +    $B$3$3$G$O%P!<%8%g%sI=5-$r9T$$$^$;$s(B($BI=5-$G$-$^$;$s(B)$B!#(B
 384.120 +
 384.121 +    $B$=$N>e$G!"F3F~$5$l$kHG$K$h$C$F$O0J2<$N%Q%C%1!<%8$rJLESF3F~$9$kI,MW(B
 384.122 +    $B$,$"$j$^$9!#(B
 384.123 +
 384.124 +    name                 version
 384.125 +    --------------------+----------------
 384.126 +    XeTeX for W32       |$BITL@(B
 384.127 +    --------------------+----------------
 384.128 +
 384.129 +    Win32 $B8~$1$N%$%s%9%H!<%i$G(B TeX $B%D!<%k72$rF3F~$7$?>l9g!"(Bcat cp
 384.130 +    mkdir $B$d(B rm $B$H$$$C$?4pK\E*$J%3%^%s%I$N%P%$%J%j$bF3F~$5$l$^$9!#(B
 384.131 +
 384.132 +    PATH $B4D6-JQ?t$N@_Dj$G!"(BTeX $B%$%s%9%H!<%k@h$N(B bin $B$KBP$9$k8!:w=g=x$r(B
 384.133 +    Cygwin $B$N(B bin $B$h$j$bA0$K$7$F$7$^$&$H!"A[Dj30$NF0:n$H$J$k2DG=@-$,$"(B
 384.134 +    $B$j$^$9$N$GCm0U$,I,MW$G$9!#(B
 384.135 +
 384.136 +    $B$^$?!"(BWin32 $B4D6-$G(B HTML $B$r@8@.$9$k>l9g$O!"F3F~8e$K(B tex4ht $B$N@_Dj%U%!(B
 384.137 +    $B%$%k$KBP$9$k=$@5$,I,MW$G$9!#(B
 384.138 +
 384.139 +    share/texmf/tex4ht/base/win32/tex4ht.env $BCf$N0J2<$NItJ,$,!"6uGr$G;z(B
 384.140 +    $B2<$2$5$l$F$$$k!aL58z2=$5$l$F$$$k>uBV$J$N$G!"9TF,$N6uGrJ8;z$r=|30(B
 384.141 +    ("Ggswin32c" $B$G;O$^$k9T$OD9$9$.$k$N$G>JN,(B)$B$7$F$/$@$5$$!#(B
 384.142 +
 384.143 +         ========================================
 384.144 +         G.png
 384.145 +         Ghterasefile zz%%4.ps
 384.146 +         Ghterasefile %%3
 384.147 +         Gdvipsk -E -q -Ppdf -f %%1 -pp %%2 > zz%%4.ps
 384.148 +         Ggswin32c -sDEVICE=pngalpha -sOutputFile=%%3 ......
 384.149 +         Ghterasefile zz%%4.ps
 384.150 +         ========================================
 384.151 +
 384.152 +Graphic tools:
 384.153 +
 384.154 +    name                 version
 384.155 +    --------------------+----------------
 384.156 +    ghostscript         |8.63 $B"((B W32TeX $B%Z!<%8$+$i%@%&%s%m!<%I(B
 384.157 +    graphviz            |2.24
 384.158 +    inkscape            |0.46
 384.159 +    --------------------+----------------
 384.160 +
 384.161 +    $B"((B $B$$$:$l$b(B Win32 $BMQ%P%$%J%j$r;HMQ(B
 384.162 +
 384.163 +Other tools:
 384.164 +
 384.165 +    name                 version
 384.166 +    --------------------+----------------
 384.167 +    make                |3.81
 384.168 +    python              |2.5.2
 384.169 +    perl                |5.10.0
 384.170 +    --------------------+----------------
 384.171 +
 384.172 +    $B"((B $B$$$:$l$b(B Cygwin $B>e$N$b$N$r;HMQ(B
 384.173 +
 384.174 +===============================================================================
   385.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   385.2 +++ b/ja/Makefile	Sun Aug 16 03:41:39 2009 +0200
   385.3 @@ -0,0 +1,324 @@
   385.4 +# This makefile requires GNU make.
   385.5 +
   385.6 +sources := \
   385.7 +	00book.tex \
   385.8 +	99book.bib \
   385.9 +	99defs.tex \
  385.10 +	build_id.tex \
  385.11 +	branch.tex \
  385.12 +	collab.tex \
  385.13 +	concepts.tex \
  385.14 +	custom.sty \
  385.15 +	daily.tex \
  385.16 +	filenames.tex \
  385.17 +	hg_id.tex \
  385.18 +	hgext.tex \
  385.19 +	hook.tex \
  385.20 +	intro.tex \
  385.21 +	mq.tex \
  385.22 +	mq-collab.tex \
  385.23 +	preface.tex \
  385.24 +	srcinstall.tex \
  385.25 +	template.tex \
  385.26 +	tour-basic.tex \
  385.27 +	tour-merge.tex \
  385.28 +	undo.tex \
  385.29 +
  385.30 +
  385.31 +image-sources := \
  385.32 +	feature-branches.dot \
  385.33 +	filelog.svg \
  385.34 +	kdiff3.png \
  385.35 +	metadata.svg \
  385.36 +	mq-stack.svg \
  385.37 +	note.png \
  385.38 +	revlog.svg \
  385.39 +	snapshot.svg \
  385.40 +	tour-history.svg \
  385.41 +	tour-merge-conflict.svg \
  385.42 +	tour-merge-merge.svg \
  385.43 +	tour-merge-pull.svg \
  385.44 +	tour-merge-sep-repos.svg \
  385.45 +	undo-manual.dot \
  385.46 +	undo-manual-merge.dot \
  385.47 +	undo-non-tip.dot \
  385.48 +	undo-simple.dot \
  385.49 +	wdir.svg \
  385.50 +	wdir-after-commit.svg \
  385.51 +	wdir-branch.svg \
  385.52 +	wdir-merge.svg \
  385.53 +	wdir-pre-branch.svg \
  385.54 +
  385.55 +
  385.56 +image-dot := $(filter %.dot,$(image-sources))
  385.57 +image-svg := $(filter %.svg,$(image-sources))
  385.58 +image-png := $(filter %.png,$(image-sources))
  385.59 +
  385.60 +image-pdf := \
  385.61 +	$(image-dot:%.dot=%.pdf) \
  385.62 +	$(image-svg:%.svg=%.pdf) \
  385.63 +	$(image-png) \
  385.64 +
  385.65 +
  385.66 +bb-pdf := \
  385.67 +	$(image-dot:%.dot=%.bb) \
  385.68 +	$(image-svg:%.svg=%.bb) \
  385.69 +	$(image-png:%.png=%.bb) \
  385.70 +
  385.71 +
  385.72 +image-html := \
  385.73 +	$(image-dot:%.dot=%.png) \
  385.74 +	$(image-svg:%.svg=%.png) \
  385.75 +	$(image-png) \
  385.76 +
  385.77 +
  385.78 +example-sources := \
  385.79 +	backout \
  385.80 +	bisect \
  385.81 +	branching \
  385.82 +	branch-named \
  385.83 +	branch-repo \
  385.84 +	cmdref \
  385.85 +	daily.copy \
  385.86 +	daily.files \
  385.87 +	daily.rename \
  385.88 +	daily.revert \
  385.89 +	extdiff \
  385.90 +	filenames \
  385.91 +	hook.msglen \
  385.92 +	hook.simple \
  385.93 +	hook.ws \
  385.94 +	issue29 \
  385.95 +	mq.guards \
  385.96 +	mq.qinit-help \
  385.97 +	mq.dodiff \
  385.98 +	mq.id \
  385.99 +	mq.tarball \
 385.100 +	mq.tools \
 385.101 +	mq.tutorial \
 385.102 +	rename.divergent \
 385.103 +	rollback \
 385.104 +	tag \
 385.105 +	template.simple \
 385.106 +	template.svnstyle \
 385.107 +	tour \
 385.108 +	tour-merge-conflict \
 385.109 +
 385.110 +
 385.111 +example-prereqs := \
 385.112 +	/usr/bin/merge \
 385.113 +
 385.114 +
 385.115 +binary-staffs := \
 385.116 +	kdiff3.png \
 385.117 +	note.png \
 385.118 +	examples/data/netplug-1.2.5.tar.bz2 \
 385.119 +	examples/data/netplug-1.2.8.tar.bz2 \
 385.120 +
 385.121 +
 385.122 +dist-sources := \
 385.123 +	../html/hgicon.png \
 385.124 +	../html/index.html.var \
 385.125 +	../html/index.en.html \
 385.126 +
 385.127 +
 385.128 +latex-options = \
 385.129 +	-interaction batchmode \
 385.130 +	-output-directory $(dir $(1)) \
 385.131 +	-jobname $(basename $(notdir $(1))) \
 385.132 +
 385.133 +hg = $(shell which hg)
 385.134 +
 385.135 +hg-id = 
 385.136 +
 385.137 +hg-version = unknown
 385.138 +
 385.139 +########################################
 385.140 +
 385.141 +SVG2PNG = sh svg2png.sh
 385.142 +
 385.143 +SVG2EPS = sh svg2eps.sh
 385.144 +
 385.145 +GS = gs
 385.146 +
 385.147 +MAKEINDEX= mendex -J -f
 385.148 +
 385.149 +########################################
 385.150 +
 385.151 +all: pdf html
 385.152 +
 385.153 +pdf: pdf/hgbook.pdf
 385.154 +
 385.155 +define pdf
 385.156 +	mkdir -p $(dir $@)
 385.157 +	platex $(call latex-options,$@) $(1) \
 385.158 +	|| (rm -f $@; exit 1)
 385.159 +	cp 99book.bib $(dir $@)
 385.160 +	cd $(dir $@) && jbibtex $(basename $(notdir $@))
 385.161 +	cd $(dir $@) && $(MAKEINDEX) $(basename $(notdir $@))
 385.162 +	platex $(call latex-options,$@) $(1) \
 385.163 +	|| (rm -f $@; exit 1)
 385.164 +	platex $(call latex-options,$@) $(1) \
 385.165 +	|| (rm -f $@; exit 1)
 385.166 +	export TEXINPUTS=..; cd $(dir $@) && dvipdfmx $(basename $(notdir $@))
 385.167 +#	if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi
 385.168 +endef
 385.169 +
 385.170 +pdf/hgbook.pdf: $(sources) atbegxxx.tex
 385.171 +pdf/hgbook.pdf: $(image-pdf)
 385.172 +pdf/hgbook.pdf: $(bb-pdf)
 385.173 +#pdf/hgbook.pdf: examples
 385.174 +pdf/hgbook.pdf: 00book_pdf.tex
 385.175 +	$(call pdf,00book_pdf.tex)
 385.176 +
 385.177 +html: onepage split
 385.178 +
 385.179 +htlatex := htlatex.sh
 385.180 +
 385.181 +onepage: $(htlatex)
 385.182 +onepage: html/onepage/hgbook.html
 385.183 +onepage: html/onepage/hgbook.css
 385.184 +onepage: $(image-html:%=html/onepage/%)
 385.185 +
 385.186 +html/onepage/%: %
 385.187 +	cp $< $@
 385.188 +
 385.189 +split: $(htlatex)
 385.190 +split: html/split/hgbook.html
 385.191 +split: html/split/hgbook.css
 385.192 +split: $(image-html:%=html/split/%)
 385.193 +
 385.194 +html/split/%: %
 385.195 +	cp $< $@
 385.196 +
 385.197 +# This is a horrible hack to work around the fact that the htlatex
 385.198 +# command in tex4ht is itself a horrible hack.  I really don't want to
 385.199 +# include verbatim the big wad of TeX that is repeated in that script,
 385.200 +# but I've given up and run a hacked copy as htlatex.book here.
 385.201 +
 385.202 +define htlatex
 385.203 +	mkdir -p $(dir $@)
 385.204 +	sh ./htlatex.sh \
 385.205 +		$(1) \
 385.206 +		"bookhtml,html4-uni,$(2)" \
 385.207 +		"$(call latex-options,$@)" \
 385.208 +	|| (rm -f $@; exit 1)
 385.209 +	cp 99book.bib $(dir $@)
 385.210 +	cd $(dir $@) && jbibtex $(basename $(notdir $@))
 385.211 +	cd $(dir $@) \
 385.212 +	&& jtex '\def\filename{{hgbook}{idx}{4dx}{ind}} \input idxmake.4ht' \
 385.213 +	&& $(MAKEINDEX) \
 385.214 +		-o $(basename $(notdir $@)).ind \
 385.215 +		$(basename $(notdir $@)).4dx
 385.216 +	sh ./htlatex.sh \
 385.217 +		$(1) \
 385.218 +		"bookhtml,html4-uni,$(2)" \
 385.219 +		"$(call latex-options,$@)" \
 385.220 +	|| (rm -f $@; exit 1)
 385.221 +	sh ./htlatex.sh \
 385.222 +		$(1) \
 385.223 +		"bookhtml,html4-uni,$(2)" \
 385.224 +		"$(call latex-options,$@)" \
 385.225 +	|| (rm -f $@; exit 1)
 385.226 +	cd $(dir $@) && tex4ht -f/$(basename $(notdir $@)) -cvalidate -cunihtf
 385.227 +	cd $(dir $@) && t4ht -f/$(basename $(notdir $@))
 385.228 +	python ./fixhtml.py $(dir $@)/*.html
 385.229 +	rm $(dir $@)/hgbook.css
 385.230 +endef
 385.231 +
 385.232 +html/onepage/hgbook.html: $(sources)
 385.233 +html/onepage/hgbook.html: $(image-html)
 385.234 +#html/onepage/hgbook.html: examples
 385.235 +html/onepage/hgbook.html: bookhtml.cfg
 385.236 +html/onepage/hgbook.html: 00book_html.tex
 385.237 +	$(call htlatex,00book_html.tex)
 385.238 +
 385.239 +html/split/hgbook.html: $(sources)
 385.240 +html/split/hgbook.html: $(image-html)
 385.241 +#html/split/hgbook.html: examples
 385.242 +html/split/hgbook.html: bookhtml.cfg
 385.243 +html/split/hgbook.html: 00book_html.tex
 385.244 +	$(call htlatex,00book_html.tex,2)
 385.245 +
 385.246 +# Produce 90dpi PNGs for the web.
 385.247 +
 385.248 +%.png: %.svg
 385.249 +	$(SVG2PNG) $@ $<
 385.250 +
 385.251 +%.svg: %.dot
 385.252 +	dot -Tsvg -o $@ $<
 385.253 +
 385.254 +# Produce eps/pdf/bb for the pdf
 385.255 +
 385.256 +%.pdf: %.eps
 385.257 +	epstopdf $<
 385.258 +
 385.259 +%.eps: %.svg
 385.260 +	$(SVG2EPS) $@ $<
 385.261 +
 385.262 +%.eps: %.dot
 385.263 +	dot -Tps -o $@ $<
 385.264 +
 385.265 +%.bb: %.pdf
 385.266 +	$(GS) -q -sDEVICE=bbox -dAutoRotatePages=/None - -c quit - \
 385.267 +		< $< > $@ 2>&1
 385.268 +
 385.269 +%.bb: %.png
 385.270 +	ebb $<
 385.271 +
 385.272 +examples: $(example-prereqs) $(binary-staffs) examples/.run
 385.273 +
 385.274 +examples/.run: $(example-sources:%=examples/%.run)
 385.275 +	touch examples/.run
 385.276 +
 385.277 +examples/%.run: examples/% examples/run-example
 385.278 +	cd examples && python ./run-example $(notdir $<)
 385.279 +
 385.280 +changelog := $(wildcard ../.hg/store/00changelog.[id])
 385.281 +ifeq ($(changelog),)
 385.282 +changelog := $(wildcard ../.hg/00changelog.[id])
 385.283 +endif
 385.284 +
 385.285 +build_id.tex: $(changelog)
 385.286 +	echo -n '$(hg-id)' > build_id.tex
 385.287 +
 385.288 +hg_id.tex: $(hg)
 385.289 +	echo -n '$(hg-version)' > hg_id.tex
 385.290 +
 385.291 +clean:
 385.292 +	rm -rf dist html pdf \
 385.293 +		$(image-dot:%.dot=%.pdf) \
 385.294 +		$(image-dot:%.dot=%.png) \
 385.295 +		$(image-dot:%.dot=%.bb) \
 385.296 +		$(image-svg:%.svg=%.pdf) \
 385.297 +		$(image-svg:%.svg=%.png) \
 385.298 +		$(image-svg:%.svg=%.bb) \
 385.299 +		$(image-png:%.png=%.bb) \
 385.300 +		examples/*.{lxo,run} examples/.run build_id.tex hg_id.tex
 385.301 +	rm -f atbegxxx.tex
 385.302 +
 385.303 +install: pdf split $(dist-sources)
 385.304 +	rm -rf dist
 385.305 +	mkdir -p dist
 385.306 +	cp pdf/hgbook.pdf dist
 385.307 +	cp html/split/*.{css,html,png} dist
 385.308 +	cp $(dist-sources) dist
 385.309 +
 385.310 +rsync: install
 385.311 +	rsync -avz --delete dist sp.red-bean.com:public_html/hgbook
 385.312 +
 385.313 +##### these targets are needed because mq can not handle binary files
 385.314 +
 385.315 +kdiff3.png:
 385.316 +	cp ../en/kdiff3.png .
 385.317 +
 385.318 +note.png:
 385.319 +	cp ../en/note.png .
 385.320 +
 385.321 +examples/data/netplug-1.2.5.tar.bz2:
 385.322 +	mkdir -p examples/data
 385.323 +	cp ../en/examples/data/netplug-1.2.5.tar.bz2 examples/data
 385.324 +
 385.325 +examples/data/netplug-1.2.8.tar.bz2:
 385.326 +	mkdir -p examples/data
 385.327 +	cp ../en/examples/data/netplug-1.2.8.tar.bz2 examples/data
   386.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   386.2 +++ b/ja/Makefile.linux	Sun Aug 16 03:41:39 2009 +0200
   386.3 @@ -0,0 +1,11 @@
   386.4 +# -*- makefile -*-
   386.5 +
   386.6 +include ./Makefile
   386.7 +
   386.8 +#SVG2PNG=
   386.9 +#SVG2EPS=
  386.10 +#GS=
  386.11 +#MAKEINDEX= 
  386.12 +
  386.13 +atbegxxx.tex: atbegdvi.tex
  386.14 +	cp $< $@
   387.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   387.2 +++ b/ja/Makefile.win32	Sun Aug 16 03:41:39 2009 +0200
   387.3 @@ -0,0 +1,11 @@
   387.4 +# -*- makefile -*-
   387.5 +
   387.6 +include ./Makefile
   387.7 +
   387.8 +SVG2PNG= sh svg2png_w32.sh
   387.9 +SVG2EPS= sh svg2eps_w32.sh
  387.10 +GS= gswin32c
  387.11 +MAKEINDEX= jmakeindex
  387.12 +
  387.13 +atbegxxx.tex: atbegshi.tex
  387.14 +	cp $< $@
   388.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   388.2 +++ b/ja/README.ja.txt	Sun Aug 16 03:41:39 2009 +0200
   388.3 @@ -0,0 +1,182 @@
   388.4 +===============================================================================
   388.5 +                             HGBOOK $BK]Lu(B
   388.6 +===============================================================================
   388.7 +
   388.8 +$BK\%G%#%l%/%H%jG[2<$K3JG<$5$l$F$$$k@.2LJ*$O!"0J2<$N(B URL $B$G8x3+$5$l$F$$$k(B
   388.9 +Bryan O'Sullivan $B;a$K$h$k(B "Mercurial: The Definitive Guide" $B$NK]LuHG$G$9!#(B
  388.10 +
  388.11 +    http://hgbook.red-bean.com/
  388.12 +
  388.13 +****
  388.14 +**** $BCm0U(B
  388.15 +****
  388.16 +
  388.17 +** $BFbMF$K4X$9$kCm0U(B
  388.18 +
  388.19 +  - $BK]Lu%Y!<%9$,(B 2007-06-17 $B;~E@$NHG$J$N$G!"(B1.x $BHG0J9_$H$J$C$?8=>u$N(B
  388.20 +    Mercurial $B$K$=$0$o$J$$FbMF$,4^$^$l$F$$$^$9(B
  388.21 +
  388.22 +
  388.23 +** $BK]LuFbMF$K4X$9$kCm0U(B:
  388.24 +
  388.25 +  - $BK]Lu?e=`$r;n9T:x8m$7$F$$$k:"$@$C$?$N$G!"!V(Bcommit$B!W$r!V3NDj!W$HLu$9(B
  388.26 +    $B$J$I!"8=>u$N(B Mercurial $B%a%C%;!<%8K]Lu$NJ}?K$H$O0[$J$k$b$N$,4^$^$l$F(B
  388.27 +    $B$$$^$9(B
  388.28 +
  388.29 +    $B"((B $B8=>u$N(B Mercurial $B%a%C%;!<%8K]LuJ}?K$N>\:Y$K4X$7$F$O!"0J2<$NF|K\(B
  388.30 +       $B8lK]Lu%W%m%8%'%/%H$N@.2LJ*$r;2>H$7$F$/$@$5$$(B
  388.31 +
  388.32 +       http://bitbucket.org/foozy/mercurial-translation-ja/wiki/
  388.33 +
  388.34 +  - $B86Cx$N0J2<$N(B Appendix $B$OK]LuHG$K$O4^$^$l$F$$$^$;$s(B
  388.35 +
  388.36 +    - Command reference
  388.37 +    - Mercurial Queues reference
  388.38 +
  388.39 +  - $B86Cx$N0J2<$N(B Appendix $B$OL$K]Lu$G$9(B
  388.40 +
  388.41 +    - Open Publication License
  388.42 +
  388.43 +  - $BE,@Z$JLu$,$G$-$J$+$C$?2U=j$K$O!"(B"XXXX" $B%^!<%/$H6&$K86J8$rJ;5-$7$F$"(B
  388.44 +    $B$j$^$9(B
  388.45 +
  388.46 +
  388.47 +** $BK]Lu@.2L$K4X$9$kCm0U(B:
  388.48 +
  388.49 +  - $BK\Mh$O!"<B:]$K%3%^%s%I$r<B9T$7$?7k2L$rJ8=q$K<h$j9~$`$h$&$K$J$C$F$$(B
  388.50 +    $B$^$9$,(B:
  388.51 +
  388.52 +      - $B4|BTFbMF$H$N:9$r8!=P$7$?:]$K!"<B9T7k2L@8@.$,CfCG$5$l$F$7$^$&(B
  388.53 +
  388.54 +      - Mercurial $B$NHG$r87L)$K0lCW$5$;$J$$$H!":9J,$,8!=P$5$l$F$7$^$&(B
  388.55 +
  388.56 +      - $B%3%^%s%I<+F0<B9T$,(B Win32 $B4D6-$G$O>e<j$/5!G=$7$J$$(B
  388.57 +
  388.58 +    $B0J>e$N$3$H$+$i!"<B9T7k2L=PNO$OJLESDs6!$9$k$b$N$rE83+$7$F;HMQ$9$k$3(B
  388.59 +    $B$H$H$7$F$$$^$9(B
  388.60 +
  388.61 +    $BJLESDs6!$7$F$$$k<B9T7k2L=PNO$O!"Hf3SE*?7$7$$(B Mercurial $B$r;HMQ$7$F@8(B
  388.62 +    $B@.$7$F$$$k$?$a!"86Cx<T$N4|BT$9$k$b$N$H$O0[$J$k2DG=@-$,$"$j$^$9(B
  388.63 +
  388.64 +  - $B0J2<$NM}M3$+$i!"K]Lu7k2L%U%!%$%k$NJ8;z%3!<%I$K$O(B iso-2022-jp $B$r:NMQ(B
  388.65 +    $B$7$F$$$^$9(B:
  388.66 +
  388.67 +      - TeX $B$N(B Unicode $B2=$,<BMQE*$J$N$O(B Win32 $B4D6-(B(+ MacOS ?)$B$N$_(B
  388.68 +
  388.69 +      - Linux/Win32 $B4D6-$NF|K\8l2=$5$l$?(B TeX $B$,!"6&$KG'<12DG=$JJ8;z%3!<(B
  388.70 +        $B%I$O(B iso-2022-jp $B$N$_(B
  388.71 +
  388.72 +  - PDF $B@8@.$O(B Linux/Win32 $B$NN>4D6-$G3NG':Q$_(B
  388.73 +
  388.74 +  - HTML $B@8@.$O(B Win32 $B4D6-$G$N$_3NG':Q$_(B
  388.75 +
  388.76 +    $B0J2<$NM}M3$+$i!"(B($B%Q%C%1!<%8%Y!<%9$G4D6-9=C[$9$k$N$G$"$l$P(B)Win32 $B4D(B
  388.77 +    $B6-$G$N$_(B HTML $B@8@.$r3NG':Q$_$G$9!#(B
  388.78 +
  388.79 +       - HTML $B2=$K;HMQ$9$k(B tex4ht $B$O!"(BASCII TeX(ptex)$B$G$O$J$/!"(B
  388.80 +         NTT-jTeX $B$,I,MW(B($BFbIt$G$N=hM}$N0c$$$K5/0x(B)
  388.81 +
  388.82 +       - Vine $B8~$1$N(B NTT-jTeX $B%Q%C%1!<%8$ON.DL$7$F$$$J$$(B
  388.83 +
  388.84 +       - Debian $B8~$1$N(B NTT-jTeX $B%Q%C%1!<%8$OHG$,8E$9$.$k(B
  388.85 +
  388.86 +  - HTML $B@8@.$O%U%!%$%kJ,3d7A<0$N$_(B
  388.87 +
  388.88 +    $BC10l%U%!%$%k7A<0$N(B HTML $B@8@.$O!"(BLaTeX $B$,%R!<%WNN0hITB-$GHaLD$r>e$2(B
  388.89 +    $B$F$7$^$&$?$a!"8=;~E@$G$OL$3NG'$G$9(B
  388.90 +
  388.91 +
  388.92 +****
  388.93 +**** $B;vA0=`Hw(B
  388.94 +****
  388.95 +
  388.96 +  $B8=>u!"(BLaTeX $B%=!<%9$+$i$N(B PDF/HTML $B@8@.$O!"0J2<$N4D6-$G3NG'$7$F$$$^$9!#(B
  388.97 +
  388.98 +      - Vine 4.2 2.6.16-76.40vl4 (Linux)
  388.99 +      - Debian 2.6.26-13lenny2   (Linux)
 388.100 +      - Windows XP/Vista         (Win32)
 388.101 +
 388.102 +  $B@8@.$KI,MW$J%Q%C%1!<%8$NF3F~J}K!Ey$K4X$7$F$O!"$=$l$>$l0J2<$N(B URL $B$r;2(B
 388.103 +  $B>H$7$F$/$@$5$$!#(B
 388.104 +
 388.105 +      - Vine:
 388.106 +          http://oku.edu.mie-u.ac.jp/~okumura/texwiki/?cmd=read&page=Linux%2Fvine
 388.107 +
 388.108 +      - Debian:
 388.109 +          http://oku.edu.mie-u.ac.jp/~okumura/texwiki/?cmd=read&page=Linux%2FDebian
 388.110 +          $B"((B $B>e5-%Z!<%8$G$N@bL@$O(B Sarge $B$G$N$b$N$G$9$,!"F0:n3NG':Q$_4D(B
 388.111 +             $B6-$O(B Lenny $B$G$9(B
 388.112 +
 388.113 +      - Win32:
 388.114 +          http://www.fsci.fuk.kindai.ac.jp/kakuto/win32-ptex/web2c75.html
 388.115 +          http://oku.edu.mie-u.ac.jp/~okumura/texwiki/?%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB(Windows)
 388.116 +
 388.117 +  $BF0:n3NG':Q$_$N4D6-$K4X$9$k>pJs$O!"(Bja/CONFIRMED.ja.txt $B$r;2>H$7$F$/$@(B
 388.118 +  $B$5$$(B($BF3F~8e$N<jF0@_Dj$K4X$9$k5-=R$b$"$j$^$9$N$G!"I,$:L\$rDL$7$F$/$@$5(B
 388.119 +  $B$$(B)$B!#(B
 388.120 +
 388.121 +  Linux $B4D6-$G%Q%C%1!<%8F3F~$9$k>l9g$O!"<+F0E*$K0MB8%Q%C%1!<%8$NF3F~$,(B
 388.122 +  $B9T$o$l$^$9$,!"(BWin32 $B>e$G4D6-9=C[$9$k>l9g$O!"<jF0$GE,59F3F~$9$kI,MW$,(B
 388.123 +  $B$"$j$^$9!#(B
 388.124 +
 388.125 +  $B%Q%C%1!<%84V$N0MB84X78$O!"F3F~$9$kHG$K$h$C$F>o$KJQF0$7$^$9$N$G!"%G%#(B
 388.126 +  $B%9%/MFNL;v>p$,5v$9$J$i!";n9T:x8m$r$9$k$h$j$bA4%Q%C%1!<%8$rF3F~(B($B!V%U%k(B
 388.127 +  $B%$%s%9%H!<%k!W$H8F$P$l$k>uBV(B)$B$9$k$N$,$*4+$a$G$9!#(B
 388.128 +
 388.129 +
 388.130 +  TeX/LaTeX $B$H$OJL$K!"0J2<$N%D!<%k$NF3F~$,I,MW$G$9!#(B
 388.131 +
 388.132 +      - Inkscape: SVG $B2hA|$+$i$NJQ49=hM}$K;HMQ(B
 388.133 +          http://www.inkscape.org/
 388.134 +          
 388.135 +      - Graphviz: $B%0%i%U2hA|$N@8@.$K;HMQ(B
 388.136 +          http://www.graphviz.org/
 388.137 +
 388.138 +  Debian/Vine $BEy$N(B Linux $B4D6-$G$O%Q%C%1!<%84IM}%D!<%k7PM3$GF3F~2DG=$G$9(B
 388.139 +  $B$,!"(BWin32 $B4D6-$X$NF3F~$O%@%&%s%m!<%I!u%$%s%9%H!<%k$r<jF0$G9T$&I,MW$,(B
 388.140 +  $B$"$j$^$9!#(B
 388.141 +
 388.142 +
 388.143 +  LaTeX $B$d2hA|%U%!%$%k$H$OD>@\4X78$7$^$;$s$,!"0J2<$N$b$N$bI,MW$G$9!#(B
 388.144 +
 388.145 +      - Perl
 388.146 +      - Python
 388.147 +      - GNU make
 388.148 +      - GNU bash $B"((B $B$$$o$f$k(B B-shell $B$G$b2D(B
 388.149 +
 388.150 +
 388.151 +****
 388.152 +**** PDF/HTML $B$N@8@.<j=g(B
 388.153 +****
 388.154 +
 388.155 +  1. lxo $B%U%!%$%k$NE83+(B
 388.156 +
 388.157 +     $B0J2<$N(B URL $B$GI=<($5$l$k%Z!<%8$N(B "Uploaded files" $B$K$"$k(B
 388.158 +     "hgbook_lxo.tar.gz" $B$r%@%&%s%m!<%I$7!"!V(BHGBOOK $B$N%=!<%9%D%j!<$N%k!<(B
 388.159 +     $B%H0LCV!W$GE83+$7$F$/$@$5$$!#(B
 388.160 +
 388.161 +         http://bitbucket.org/foozy/hgbook-ja/downloads/
 388.162 +
 388.163 +  2. ja $B%G%#%l%/%H%j(B($B$3$N%U%!%$%k$N3JG<$5$l$F$$$k0LCV(B)$B$K0\F0(B
 388.164 +
 388.165 +     $B"((B $B0J2<$N@bL@$O!"A4$F$3$N%G%#%l%/%H%j$r5/E@$H$7$F$$$^$9(B
 388.166 +
 388.167 +  3. Makefile $B$NA*Br(B
 388.168 +
 388.169 +     Linux $B4D6-$N>l9g$O(B Makefile.linux $B$r!"(BWin32 $B4D6-$N>l9g$O(B
 388.170 +     Makefile.win32 $B$r;HMQ$7$^$9!#(B
 388.171 +
 388.172 +     $B0J2<$N(B "make $B<B9T(B" $B$K4X$9$k2U=j$K$*$$$F!"$=$l$>$l(B "-f
 388.173 +     Makefile.linux" $B$J$$$7(B "-f Makefile.win32" $B$r;XDj$9$k$b$N$H$7(B
 388.174 +     $B$^$9!#(B
 388.175 +
 388.176 +  4. PDF $B$N@8@.$O(B "make pdf" $B$r<B9T(B
 388.177 +
 388.178 +     pdf $B%G%#%l%/%H%jG[2<$K(B hgbook.pdf $B$,@8@.$5$l$^$9!#(B
 388.179 +
 388.180 +  5. HTML $B$N@8@.$O(B "make split" $B$r<B9T(B($B"((B Win32 $B4D6-$G$N$_@8@.$r3NG'(B)
 388.181 +
 388.182 +     html/split $B%G%#%l%/%H%jG[2<$K(B HTML $B%U%!%$%k$,@8@.$5$l$^$9!#(B
 388.183 +     $BI,MW$J%U%!%$%k$O(B *.css *.html $B$*$h$S(B *.png $B%U%#%k$G$9!#(B
 388.184 +
 388.185 +===============================================================================
   389.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   389.2 +++ b/ja/atbegdvi.tex	Sun Aug 16 03:41:39 2009 +0200
   389.3 @@ -0,0 +1,7 @@
   389.4 +% encoding specified below depends not on one of file content
   389.5 +% but on TeX processing internal one.
   389.6 +\ifnum 42146=\euc"A4A2
   389.7 +  \AtBeginDvi{\special{pdf:tounicode EUC-UCS2}}
   389.8 +\else
   389.9 +  \AtBeginDvi{\special{pdf:tounicode 90ms-RKSJ-UCS2}}
  389.10 +\fi
   390.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   390.2 +++ b/ja/atbegshi.tex	Sun Aug 16 03:41:39 2009 +0200
   390.3 @@ -0,0 +1,11 @@
   390.4 +\usepackage{atbegshi} % defnes '\AtBeginShipoutFirst'
   390.5 +
   390.6 +% encoding specified below depends not on one of file content
   390.7 +% but on TeX processing internal one.
   390.8 +\ifnum 42146=\euc"A4A2
   390.9 +  % \AtBeginDvi does not work correctly with current HYPERREF package
  390.10 +  \AtBeginShipoutFirst{\special{pdf:tounicode EUC-UCS2}}
  390.11 +\else
  390.12 +  % \AtBeginDvi does not work correctly with current HYPERREF package
  390.13 +  \AtBeginShipoutFirst{\special{pdf:tounicode 90ms-RKSJ-UCS2}}
  390.14 +\fi
   391.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   391.2 +++ b/ja/bookhtml.cfg	Sun Aug 16 03:41:39 2009 +0200
   391.3 @@ -0,0 +1,18 @@
   391.4 +% -*- latex -*-
   391.5 +
   391.6 +\Preamble{xhtml}
   391.7 +
   391.8 +% Tex4ht's default definition of lists is complete crap.
   391.9 +% Unfortunately, it can't distinguish between "ul" and "dl" lists.
  391.10 +
  391.11 +\ConfigureList{itemize}%
  391.12 +   {\EndP\HCode{<ul>}\let\endItem=\empty}
  391.13 +   {\ifvmode \IgnorePar\fi
  391.14 +    \EndP\HCode{</li></ul>}\ShowPar}
  391.15 +   {\endItem \def\endItem{\EndP\Tg</span>}\HCode{<li><span class="dt">}}
  391.16 +   {\HCode{</span><span class="dd">}}
  391.17 +\def\textbullet{}
  391.18 +
  391.19 +\begin{document}
  391.20 +
  391.21 +\EndPreamble
   392.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   392.2 +++ b/ja/branch.tex	Sun Aug 16 03:41:39 2009 +0200
   392.3 @@ -0,0 +1,528 @@
   392.4 +\chapter{Managing releases and branchy development}
   392.5 +\label{chap:branch}
   392.6 +
   392.7 +Mercurial $B$O!"(B
   392.8 +$BF1;~JB9TE*$K3+H/$r?J$a$k$h$&$J%W%m%8%'%/%H$r4IM}$G$-$k;EAH$_$r;}$C$F$$$^$9!#(B
   392.9 +$B$3$l$i$N;EAH$_$rM}2r$9$k$?$a$K!"(B
  392.10 +$B$^$:$O0lHLE*$J%=%U%H%&%'%"3+H/$N;EAH$_$rD/$a$F$_$^$7$g$&!#(B
  392.11 +
  392.12 +$BB?$/$N%=%U%H%&%'%"%W%m%8%'%/%H$G$O!"(B
  392.13 +$B=EMW$J?75,5!G=$r4^$`(B``$B%a%8%c!<(B''$B%j%j!<%9$r4V7gE*$KH/9T$7$^$9!#(B
  392.14 +$B$=$l$HJ?9T$7$F(B``$B%^%$%J!<(B''$B%j%j!<%9$bH/9T$9$k$3$H$,$"$j$^$9!#(B
  392.15 +$BB?$/$N>l9g!"(B
  392.16 +$B%^%$%J!<%j%j!<%9$O85$K$7$?%a%8%c!<%j%j!<%9$HF10l$G$9$,!"(B
  392.17 +$B%P%0$N=$@5$,$J$5$l$F$$$^$9!#(B
  392.18 +
  392.19 +$B$3$N>O$G$O!"(B
  392.20 +$B!V%j%j!<%9!W$N$h$&$J%W%m%8%'%/%H$N%^%$%k%9%H!<%s$N!"(B
  392.21 +$B5-O?$rJ];}$9$kJ}K!$+$i@bL@$r;O$a$?$$$H;W$$$^$9!#(B
  392.22 +$B$=$N8e$G!"(B
  392.23 +$B%W%m%8%'%/%H$K$*$1$k%U%'!<%:0\9T$G$N:n6H$NN.$l$d!"(B
  392.24 +$B$=$N:]$N:n6H$d@.2LJ*$r(B
  392.25 +Mercurial $B$K$h$C$FJ,N%!?4IM}$9$kJ}K!$r@bL@$7$^$9!#(B
  392.26 +
  392.27 +\section{Giving a persistent name to a revision}
  392.28 +
  392.29 +$BFCDj$N%j%S%8%g%s$r(B``$B%j%j!<%9(B''$B$H8F$V$3$H$K7hDj$7$?$J$i!"(B
  392.30 +$B$=$N%j%S%8%g%s$N(B ID $B$r5-O?$9$k$Y$-$G$9!#(B
  392.31 +$B%j%S%8%g%s$N(B ID $B$r5-O?$9$k$3$H$G!"(B
  392.32 +$B8eF|2?$i$+$NM}M3!JNc$($P%P%0$N:F8=$d!"?75,%W%i%C%H%U%)!<%`$X$N0\?"Ey!K(B
  392.33 +$B$GI,MW$K$J$C$?:]$K%j%j!<%9$r:F8=$9$k$3$H$,$G$-$^$9!#(B
  392.34 +
  392.35 +\interaction{tag.init}
  392.36 +
  392.37 +\hgcmd{tag} $B%3%^%s%I$rMxMQ$9$k$3$H$G!"(B
  392.38 +Mercurial $B$OG$0U$N%j%S%8%g%s$K1JB3E*$JL>A0$rIUM?$7$^$9!#(B
  392.39 +$BFI<T$NM=A[DL$j!"$3$NL>A0$N$3$H$r(B``$B%?%0(B''$B$H8F$S$^$9!#(B
  392.40 +
  392.41 +\interaction{tag.tag}
  392.42 +
  392.43 +$B%j%S%8%g%s$K$H$C$F!"(B
  392.44 +$B%?%0$O(B``$B>]D'E*$JL>A0(B''(symbolic name) $B0J30$N2?<T$G$b$"$j$^$;$s!#(B
  392.45 +$B%?%0$O=c?h$KMxJX@-$N$?$a$KB8:_$9$k$b$N$G!"(B
  392.46 +$B%j%S%8%g%s$r;2>H$9$k:]$N<j7Z$G1JB3E*$J<jCJ$H$J$j$^$9!#(B
  392.47 +Mercurial $B$O!"(B
  392.48 +$BMxMQ<T$NMQ$$$k%?%0L>$N0UL#$r2r<a$7$?$j$7$^$;$s!#(B
  392.49 +$B[#Kf$5$,L5$/2r@O$G$-$k$3$H$rJ]>Z$9$k$?$a$KI,MW$J>/!9$N@)Ls$r=|$$$F$O!"(B
  392.50 +$B%?%0L>$K2?$i$+$N@)Ls$r$D$1$?$j$9$k$3$H$b$"$j$^$;$s!#(B
  392.51 +$B0J2<$N$$$:$l$NJ8;z$b%?%0L>$K$O;HMQ$G$-$^$;$s!#(B
  392.52 +
  392.53 +\begin{itemize}
  392.54 +\item $B%3%m%s(B(ASCII 58, ``\texttt{:}'')
  392.55 +\item $B9TF,0\F0(B\footnote{carriage return} (ASCII 13, ``\Verb+\r+'')
  392.56 +\item $B2~9T(B (ASCII 10, ``\Verb+\n+'')
  392.57 +\end{itemize}
  392.58 +
  392.59 +\hgcmd{tags} $B%3%^%s%I$r;HMQ$9$k$3$H$G!"(B
  392.60 +$B%j%]%8%H%j$,J];}$7$F$$$k%?%0$rI=<($5$;$k$3$H$,$G$-$^$9!#(B
  392.61 +\hgcmd{tags} $B%3%^%s%I$N=PNO$K$*$$$F!"(B
  392.62 +$B8D!9$N%?%0IU$1$5$l$?%j%S%8%g%s$O!"(B
  392.63 +$B;O$a$K%?%0L>$G!"<!$K%j%S%8%g%sHV9f$G!"(B
  392.64 +$B:G8e$K0l0U$N%j%S%8%g%s%O%C%7%eCM$G<1JL$5$l$^$9!#(B
  392.65 +
  392.66 +\interaction{tag.tags}
  392.67 +
  392.68 +\texttt{tip} $B%?%0$,(B \hgcmd{tags} 
  392.69 +$B%3%^%s%I$N=PNO$KNs5s$5$l$F$$$k$3$H$KCm0U$7$F$/$@$5$$!#(B
  392.70 +\texttt{tip} $B$O!">o$K%j%]%8%H%jCf$N:G?7$N%j%S%8%g%s$r;X$9(B
  392.71 +``$BN.F0E*$J(B''$BFC<l%?%0$G$9!#(B
  392.72 +
  392.73 +\hgcmd{tags} $B%3%^%s%I$N=PNO$G$O!"(B
  392.74 +$B%?%0$O%j%S%8%g%sHV9f$N5U=g!J9_=g!K$GNs5s$5$l$F$$$^$9!#(B
  392.75 +$B$3$l$O:G?7$N%?%0$O8E$$%?%0$h$j$b@h$KNs5s$5$l$k$3$H$r0UL#$7!"(B
  392.76 +$B$=$l$OF1;~$K(B \hgcmd{tags} $B$,=PNO$9$k%?%00lMw$N:G=i$K(B
  392.77 +\texttt{tip} $B$,I=<($5$l$k$3$H$b0UL#$7$^$9!#(B
  392.78 +
  392.79 +\hgcmd{log} $B%3%^%s%I$N<B9T;~$K!"(B
  392.80 +$B%?%0$H4XO"IU$1$i$l$?%j%S%8%g%s$rI=<($9$k>l9g!"(B
  392.81 +\hgcmd{log} $B%3%^%s%I$O%?%0$rI=<($7$^$9!#(B
  392.82 +
  392.83 +\interaction{tag.log}
  392.84 +
  392.85 +Mercurial $B%3%^%s%I$KBP$7$F%j%S%8%g%s<1JL;R$r;XDj$9$kI,MW$,$"$k>l9g!"(B
  392.86 +$B%j%S%8%g%s<1JL;R$r;XDj$9$k0LCV$G$O!"(B
  392.87 +$B>o$K%?%0L>$r;HMQ$9$k$3$H$,$G$-$^$9!#(B
  392.88 +Mercurial $B$NFbIt$G$O!"(B
  392.89 +$B%?%0L>$rBP1~$9$k%j%S%8%g%s<1JL;R$KJQ49$7$F$+$i;HMQ$7$F$$$^$9!#(B
  392.90 +
  392.91 +\interaction{tag.log.v1.0}
  392.92 +
  392.93 +$BC10l$N%j%]%8%H%j$,J];}$G$-$k%?%0$N?t$K$b!"(B
  392.94 +$BC10l$N%j%S%8%g%s$KIUM?$G$-$k%?%0$N?t$K$b@)8B$O$"$j$^$;$s!#(B
  392.95 +$B8=<BE*$JLdBj$H$7$F!"(B
  392.96 +$B%?%0$OC1$K%j%S%8%g%s$NFCDj$rJd=u$9$k$b$N$G$9$+$i!"(B
  392.97 +``$B2a>j$K(B''$B!J6qBNE*$J?t$O%W%m%8%'%/%H$K1~$8$F0[$J$j$^$9$,!K(B
  392.98 +$B%?%0$rIUM?$9$k$N$O$h$m$7$/$"$j$^$;$s!#(B
  392.99 +$BB?$/$N%?%0$,$"$k$H!"%j%S%8%g%s$rFCDj$9$kMxJX@-$,Aa!9$K8:>/$7$F$7$^$$$^$9!#(B
 392.100 +
 392.101 +$BNc$($P!"(B
 392.102 +$B$"$k%W%m%8%'%/%H$G$O?tF|Kh$NIQEY$G%^%$%k%9%H!<%s$r@_Dj$7$F$$$k$H$9$k$H!"(B
 392.103 +$B$=$l$>$l$N%^%$%k%9%H!<%s$K%?%0$rIUM?$9$k$N$O6K$a$F9gM}E*$G$9!#(B
 392.104 +$B$7$+$7!"A4$F$N%j%S%8%g%s$G3N<B$Ke:No$J%S%k%I$,$G$-$k7QB3E*(B
 392.105 +$B!J(Bcontinuous$B!K$J%S%k%I%7%9%F%`$,$"$k>l9g$O!"(B
 392.106 +$Be:No$J%S%k%IKh$K%?%0$rIUM?$9$k$H!"BgNL$N%N%$%:$r;}$A9~$`$3$H$K$J$j$^$9!#(B
 392.107 +$B$=$NBe$o$j$K!"(B
 392.108 +$B%S%k%I$,<:GT$9$k%j%S%8%g%s!J$3$N;vBV$,5)$@$H2>Dj$7$F$$$^$9!*!K(B
 392.109 +$B$K%?%0$rIUM?$9$k$+!"(B
 392.110 +$B%S%k%I$N2DH]$rDI@W$9$k%?%0$N;HMQ$r;_$a$k$N$,NI$$$G$7$g$&!#(B
 392.111 +
 392.112 +$BI,MW$NL5$/$J$C$?%?%0$r:o=|$7$?$$>l9g$O(B
 392.113 +\hgcmdargs{tag}{--remove} $B%3%^%s%I$r;HMQ$7$^$9!#(B
 392.114 +
 392.115 +\interaction{tag.remove}
 392.116 +
 392.117 +$BG$0U$N;~E@$G%?%0$N4XO"IU$1$rJQ99$9$k$3$H$b$G$-$^$9$N$G!"(B
 392.118 +$B?75,$N(B \hgcmd{tag} $B%3%^%s%I<B9T$K$h$j!"(B
 392.119 +$BF10l$N%?%0$,0[$J$k%j%S%8%g%s$r<1JL$9$k$h$&$K$J$j$^$9!#(B
 392.120 +\emph{$BK\Ev$K(B}$B%?%0$r99?7$7$?$$$3$H$r(B Mercurial $B$KEA$($k$?$a$K!"(B
 392.121 +\hgopt{tag}{-f} $B%*%W%7%g%s$r;HMQ$7$J$1$l$P$J$j$^$;$s!#(B
 392.122 +
 392.123 +\interaction{tag.replace}
 392.124 +
 392.125 +$B%?%0$N99?78e$b!"(B
 392.126 +$B%?%0$,0JA0$K<1JL$7$F$$$?%j%S%8%g%s$K4X$9$k1JB3E*$J5-O?$,;D$j$^$9$,!"(B
 392.127 +Mercurial $B$,$=$l$r;HMQ$9$k$3$H$O$"$j$^$;$s!#(B
 392.128 +$B$3$N$h$&$K!"(B
 392.129 +$B4V0c$C$?%j%S%8%g%s$X$N%?%0$NIUM?$K$O2?$NITMx1W$b$"$j$^$;$s$N$G!"(B
 392.130 +$B%?%0IU$1$r4V0c$C$?$J$i!"@5$7$$%j%S%8%g%s$K%?%0$rIUM?$7D>$;$P$h$$$N$G$9!#(B
 392.131 +
 392.132 +Mercurial $B$O!"(B
 392.133 +$B%j%]%8%H%jCf$N%j%S%8%g%s4IM}$5$l$?DL>o%U%!%$%k$K%?%0$N>pJs$r3JG<$7$F$$$^$9!#(B
 392.134 +$B2?$i$+$N%?%0$rIUM?$9$k$H!"(B
 392.135 +\sfilename{.hgtags} $B%U%!%$%kCf$K$=$N%?%0$r8+$D$1$k$3$H$,$G$-$k$G$7$g$&!#(B
 392.136 +\hgcmd{tag} $B%3%^%s%I$r<B9T$9$k$H!"(B
 392.137 +Mercurial $B$O$3$N%U%!%$%k$rJQ99$7!"<+F0E*$KJQ99$r%3%_%C%H$7$^$9!#(B
 392.138 +$B$3$N$3$H$O!"(B
 392.139 +\hgcmd{tag} $B%3%^%s%I$r<B9T$7$?:]$K$O!"(B
 392.140 +$B>o$KBP1~$9$k%A%'%s%8%;%C%H$r(B \hgcmd{log} $B%3%^%s%I$N=PNO$G8+$k$3$H$,$G$-$k!"(B
 392.141 +$B$H$$$&$3$H$r0UL#$7$F$$$^$9!#(B
 392.142 +
 392.143 +\interaction{tag.tip}
 392.144 +
 392.145 +\subsection{Handling tag conflicts during a merge}
 392.146 +
 392.147 +\sfilename{.hgtags} $B%U%!%$%k$r5$$K$9$kI,MW$OKX$I$"$j$^$;$s$,!"(B
 392.148 +$B;~$K$O%^!<%8$N:]$K$=$NB8:_$,0U<1$5$l$k$3$H$,$"$j$^$9!#(B
 392.149 +$B$3$N%U%!%$%k$N7A<0$OC1=c$G!"O"B3$7$?9T$+$i9=@.$5$l$F$$$^$9!#(B
 392.150 +$B3F9T$O%A%'%s%8%;%C%H$N%O%C%7%eCM$G;O$^$j!"6uGr$H%?%0L>$,B3$-$^$9!#(B
 392.151 +
 392.152 +$B%^!<%8$K$*$1$k(B
 392.153 +\sfilename{.hgtags} $B%U%!%$%k$N>WFM$r2r>C$9$k:]$K$O!"(B
 392.154 +\sfilename{.hgtags} $B%U%!%$%k=$@5$K$R$M$j$,I,MW$G$9!#(B
 392.155 +$B%j%]%8%H%jCf$N%?%0$r2r@O$9$k>l9g!"(B
 392.156 +Mercurial $B$O(B\emph{$B7h$7$F(B} 
 392.157 +\sfilename{.hgtags} $B%U%!%$%k$N%o!<%-%s%0%3%T!<$r;2>H$9$k$3$H$O$"$j$^$;$s!#(B
 392.158 +$B$=$NBe$o$j$K!"(BMercurial 
 392.159 +$B$O(B\emph{$B:G$b:G6a%3%_%C%H$5$l$?(B}$B%U%!%$%k$N%j%S%8%g%s$rD4$Y$^$9!#(B
 392.160 +
 392.161 +$B$3$N$h$&$J@_7W$N;DG0$J7k2L$H$7$F!"(B
 392.162 +$B%^!<%8$7$?(B \sfilename{.hgtags} $B%U%!%$%k$,!"(B
 392.163 +$B$=$NJQ99$r%3%_%C%H$7$?(B\emph{$B8e$b(B}$B@5$7$$>uBV$G$"$k$3$H$r!"(B
 392.164 +$B<B:]$K8!>Z$9$k$3$H$,$G$-$^$;$s!#(B
 392.165 +$B%^!<%8$N:]$K(B \sfilename{.hgtags} $B%U%!%$%k$N>WFM$r2r>C$9$k:]$K$O!"(B
 392.166 +$B%3%_%C%H8e$K(B \hgcmd{tags} $B%3%^%s%I$N<B9T$rK:$l$:$K9T$C$F$/$@$5$$!#(B
 392.167 +\sfilename{.hgtags} $B%U%!%$%k$KIT@5$,$"$C$?>l9g!"(B
 392.168 +\hgcmd{tags} $B%3%^%s%I$OIT@5$N>l=j$rJs9p$7$^$9$N$G!"(B
 392.169 +$B$=$N2U=j$r=$@5$7$F%3%_%C%H$9$l$PNI$$$N$G$9!#(B
 392.170 +$BJQ99FbMF$N@5$7$5$r3NG'$9$k$?$a$K!"(B
 392.171 +$BJQ99$N8e$G!":FEY(B \hgcmd{tags} $B%3%^%s%I$r<B9T$7$F$/$@$5$$!#(B
 392.172 +
 392.173 +\subsection{Tags and cloning}
 392.174 +
 392.175 +\hgcmd{clone} $B%3%^%s%I$,(B
 392.176 +$BFCDj$N%A%'%s%8%;%C%H$r;XDj$7$F87L)$JJ#@=$r:n@.$9$k$?$a$N(B
 392.177 +\hgopt{clone}{-r} $B%*%W%7%g%s$r;}$C$F$$$k$3$H$K5$IU$$$F$$$k$+$b$7$l$^$;$s!#(B
 392.178 +$B?7$7$$J#@=$O!"(B
 392.179 +$B;XDj$7$?%j%S%8%g%s$h$j$b8e$K@8$8$?MzNr>pJs$r0l@Z;}$C$F$$$^$;$s!#(B
 392.180 +$B$3$N$3$H$,%?%0$HAj8_:nMQ$7$?>l9g!"!"(B
 392.181 +$BL}CG$7$F$$$k$H6C$+$5$l$k;vBV$K$J$j$^$9!#(B
 392.182 +
 392.183 +$B%?%0$N@8@.$,!"(B
 392.184 +\sfilename{.hgtags} $B%U%!%$%k$X$N3JG<$N:]$K!"(B
 392.185 +$B0l$D$N%j%S%8%g%s$H$7$F07$o$l$k$3$H$r;W$$=P$;$P!"(B
 392.186 +$B%?%0$,5-O?$5$l$?%A%'%s%8%;%C%H$,!"(B
 392.187 +$B%?%0$NIUM?BP>]$H$J$k!J8E$$!K%A%'%s%8%;%C%H$r;2>H$9$k$N$OEvA3$N$3$H$G$9!#(B
 392.188 +$B%?%0(B \texttt{foo} $B;~E@$N%j%]%8%H%j$rJ#@=$9$k$?$a$K(B
 392.189 +\hgcmdargs{clone}{-r foo}  $B$r<B9T$7$?>l9g!"(B
 392.190 +$BJ#@=$5$l$?%j%]%8%H%j$O!"(B
 392.191 +$BJ#@=$9$k:]$K;HMQ$5$l$?(B\emph{$B%?%0$N:n@.$K4X$9$kMzNr$r;}$C$F$$$^$;$s(B}$B!#(B
 392.192 +$B?7$7$$%j%]%8%H%j$K$O!"(B
 392.193 +$B%W%m%8%'%/%HMzNr$N40A4$J%5%V%;%C%H$,4^$^$l$^$9$,!"(B
 392.194 +$BM#0l!";XDj$KMQ$$$?%?%0$N>pJs$O(B\emph{$B4^$^$l$F$$$^$;$s(B}$B!#(B
 392.195 +
 392.196 +\subsection{When permanent tags are too much}
 392.197 +
 392.198 +Mercurial $B$N%?%0$O9=@.4IM}$5$l$F$*$j!"(B
 392.199 +$B%W%m%8%'%/%H$NMzNr$H0lBN2=$7$F$$$k$?$a!"(B
 392.200 +$BC/$+$,:n@.$7$?%?%0$O!"(B
 392.201 +$B0l=o$K:n6H$r9T$C$F$$$kC/$b$,8+$k$3$H$,$G$-$^$9!#(B
 392.202 +$B$7$+$7!"%j%S%8%g%s$KL>A0$rIU$1$k$3$H$O!"(B
 392.203 +$B%j%S%8%g%s(B \texttt{4237e45506ee} $B$,<B$O(B \texttt{v2.0.2}  $B$G$"$k!"(B
 392.204 +$B$H$$$&$3$H$r=q$-N1$a$F$*$/0J>e$NM-MQ@-$,$"$j$^$9!#(B
 392.205 +$B9*L/$J%P%0$rDI@W$9$k:]$K!"(B
 392.206 +``$B%"%s$,$3$N%j%S%8%g%s$G>I>u$r8+$+$1$?(B''$B$H$$$C$?N`$NHwK:O?$H$7$F!"(B
 392.207 +$B%?%0$rIUM?$7$?$$>l9g$b$"$k$G$7$g$&!#(B
 392.208 +
 392.209 +$B$3$N$h$&$J>l9g!"(B
 392.210 +\emph{$B%m!<%+%k(B}$B$J%?%0$,:GE,$G$9!#(B
 392.211 +\hgopt{tag}{-l} $B%*%W%7%g%sIU$-$G(B
 392.212 +\hgcmd{tag} $B%3%^%s%I$r5/F0$9$k$3$H$G!"(B
 392.213 +$B%m!<%+%k%?%0$r:n@.$9$k$3$H$,$G$-$^$9!#(B
 392.214 +$B$3$N%3%^%s%I<B9T$N>l9g!"(B
 392.215 +$B%?%0$O(B \sfilename{.hg/localtags} $B%U%!%$%k$K3JG<$5$l$^$9(B
 392.216 +\sfilename{.hgtags} $B$H0[$J$j(B
 392.217 +\sfilename{.hg/localtags} $B$O9=@.4IM}$5$l$^$;$s!#(B
 392.218 +\hgopt{tag}{-l} $B$K$h$C$F:n@.$7$?%?%0$O!"(B
 392.219 +$B8=:_:n6H$r$7$F$$$k%j%]%8%H%j$KN1$^$jB3$1$^$9(B
 392.220 +\footnote{$BLuCm(B: \hgcmd{clone}$B!"(B\hgcmd{pull} $B$d(B 
 392.221 +\hgcmd{push} $B$K$h$C$FB>$N%j%]%8%H%j$K%3%T!<$5$l$k$3$H$,$"$j$^$;$s(B}$B!#(B
 392.222 +
 392.223 +\section{The flow of changes---big picture vs. little}
 392.224 +
 392.225 +$B$3$3$G!"K\>O$NKAF,$G=R$Y$?35N,$KLa$j!"(B
 392.226 +$BJ#?t$NJ?9T$7$?3+H/$,F1;~$K9T$o$l$F$$$k%W%m%8%'%/%H$K$D$$$F9M$($F8+$^$7$g$&!#(B
 392.227 +
 392.228 +$B?7$7$$(B``$B<g(B''$B%j%j!<%9$d!"(B
 392.229 +$B:G?7$N<g%j%j!<%9$KBP$9$k?7$?$J%^%$%J!<%P%0=$@5!"(B
 392.230 +$B8=:_$OJ]<i>uBV$K$"$k$h$&$J8E$$%j%j!<%9$KBP$9$kM=4|$;$L(B``hot fix''
 392.231 +$B$N$?$a$N(B push $B$,$"$k$G$7$g$&!#(B
 392.232 +
 392.233 +$B3+H/$K$*$1$kMM!9$JJ?9T$7$?J}8~$r;2>H$9$k$?$a$N0lHLE*$JJ}K!$O!"(B
 392.234 +``$B%V%i%s%A(B''$B$H8F$P$l$k$b$N$G$9!#(B
 392.235 +$B$7$+$7!"(B
 392.236 +Mercurial $B$,(B\emph{$BA4$F$NMzNr(B}$B$r(B
 392.237 +$B!V%V%i%s%A$H%^!<%8$NO"B3!W$H$7$F07$C$F$$$k$3$H$r!"(B
 392.238 +$B4{$K2?EY$b8+$F$-$^$7$?!#(B
 392.239 +$B<B:]$K$O!"(B
 392.240 +$BI=LLE*$K$O4X78$7$F$$$k$h$&$G!"(B
 392.241 +$B$=$N<B!"$?$^$?$^F1$8L>A0$G$"$k$@$1$N#2$D$N35G0$r07$C$F$$$k$N$G$9!#(B
 392.242 +
 392.243 +\begin{itemize}
 392.244 +\item ``$B5p;kE*$J(B''$B%V%i%s%A$O!"%W%m%8%'%/%HH/E8$N9-$,$j$rI=$7!"(B
 392.245 +  $BL>A0$r$D$1$?$j!"OCBj$K>e$C$?$j$7$^$9!#(B
 392.246 +
 392.247 +\item ``$BHy;kE*$J(B''$B%V%i%s%A$O!"F|!9$N3+H/3hF0$H!"JQ99%^!<%8$N@.2L$G$9!#(B
 392.248 +  $B$3$N%V%i%s%A$O!"%3!<%I$,$I$N$h$&$K3+H/$5$l$F$$$C$?$N$+$rJ*8l$j$^$9!#(B
 392.249 +
 392.250 +\end{itemize}
 392.251 +
 392.252 +\section{Managing big-picture branches in repositories}
 392.253 +
 392.254 +Mercurial $B$K$*$$$F(B``$B5p;kE*$J(B''$B%V%i%s%A$r3VN%$9$k:G$b4JC1$JJ}K!$O!"(B
 392.255 +$B3VN%MQ$N%j%]%8%H%j$rMQ0U$9$k$3$H$G$9!#(B
 392.256 +$BNc$($P!"4{$K$"$k6&M-%j%]%8%H%j(B---$B$3$l$r(B \texttt{myproject} $B$H8F>N$7$^$9(B
 392.257 +---$B$,(B ``1.0'' $B$H$$$&%^%$%k%9%H!<%s$KE~C#$7$F$$$k>l9g!"(B
 392.258 +1.0 $B%j%j!<%9$N$?$a$K;HMQ$7$?%j%S%8%g%s$K%?%0$rIUM?$9$k$3$H$G!"(B
 392.259 +1.0 $BHG$KBP$9$kMh$k$Y$-J]<i%j%j!<%9$N=`Hw$r9T$$$^$9!#(B
 392.260 +
 392.261 +\interaction{branch-repo.tag}
 392.262 +
 392.263 +$B%?%0IU$1$7$?;~E@$HF1$8FbMF$N(B
 392.264 +\texttt{myproject-1.0.1} 
 392.265 +$B$H$$$&L>$N?7$7$$6&M-%j%]%8%H%j$rJ#@=$7$^$9!#(B
 392.266 +
 392.267 +\interaction{branch-repo.clone}
 392.268 +
 392.269 +$B$=$N8e!"(B
 392.270 +$BMh$k(B 1.0.1 $B%^%$%J!<%j%j!<%9$K4^$a$k$Y$-%P%0=$@5$N:n6H$,I,MW$K$J$C$?$J$i!"(B
 392.271 +\texttt{myproject-1.0.1} $B%j%]%8%H%j$rJ#@=$7JQ99$r9T$C$F!"(B
 392.272 +$B$=$N@.2L$rH?1G$7$^$9!#(B
 392.273 +
 392.274 +\interaction{branch-repo.bugfix}
 392.275 +
 392.276 +$B$=$N4V!"<!$N%a%8%c!<%j%j!<%9$X8~$1$?3+H/:n6H$O!"(B
 392.277 +$B%^%$%J!<%j%j!<%9$K4X$9$k:n6H$H$O3VN%$5$l$?>uBV$G!"(B
 392.278 +\texttt{myproject} $B%j%]%8%H%j$K$*$$$F3hH/$KB3$1$i$l$^$9!#(B
 392.279 +
 392.280 +\interaction{branch-repo.new}
 392.281 +
 392.282 +\section{Don't repeat yourself: merging across branches}
 392.283 +
 392.284 +$BJ]<iMQ%V%i%s%A$G%P%0=$@5$r9T$C$?$H$9$k$H!"(B
 392.285 +$BB?$/$N>l9g!"%W%m%8%'%/%H$N%a%$%s%V%i%s%A$K(B
 392.286 +$B!J$=$7$F$=$l0J30$NJ]<i%V%i%s%A$K$*$$$F$b!K(B
 392.287 +$BF1$8%P%0$,B8:_$9$k2DG=@-$,$"$j$^$9!#(B
 392.288 +$BF1$8%P%0$r2?EY$bD>$7$?$$$H;W$&3+H/<T$O5)$G$9$+$i!"(B
 392.289 +$BF1$8:n6H$r7+$jJV$9$3$H$J$/%P%0=$@5$r4IM}$9$k$?$a$K(B
 392.290 +Mercurial $B$,Ds6!$9$k4v$D$+$NJ}K!$r8+$F$_$^$7$g$&!#(B
 392.291 +
 392.292 +$B:G$bC1=c$JJ}K!$O!"(B
 392.293 +$B:n6HBP>]%V%i%s%A$+$iJ#@=$7$?%m!<%+%k%j%]%8%H%j$X!"(B
 392.294 +$BJ]<i%V%i%s%A$+$iJQ99$r(B pull $B$9$k$3$H$G$9!#(B
 392.295 +
 392.296 +\interaction{branch-repo.pull}
 392.297 +
 392.298 +$B$=$N>e$G#2$D$N%V%i%s%A$N$=$l$>$l$N%X%C%I$r%^!<%8$7!"(B
 392.299 +$B$=$N@.2L$r%a%$%s%V%i%s%A$KH?1G$7$^$9!#(B
 392.300 +
 392.301 +\interaction{branch-repo.merge}
 392.302 +
 392.303 +\section{Naming branches within one repository}
 392.304 +
 392.305 +$BB?$/$N>l9g$O!"(B
 392.306 +$B%j%]%8%H%j$NJ,N%$K$h$C$F%V%i%s%A$rJ,N%$9$k$N$,E,@Z$J8/$jJ}$G$9!#(B
 392.307 +$BC1=c$G$9$+$iM}2r$b4JC1$G$9$7!"$=$l8N$K4V0c$($k$3$H$,$"$j$^$;$s!#(B
 392.308 +$B:n6H$7$F$$$k%V%i%s%A$H!"%3%s%T%e!<%?>e$N!J%j%]%8%H%j!K%G%#%l%/%H%j$N4V$G!"(B
 392.309 +$B#1BP#1$N4X78$,$G$-$F$$$^$9$N$G!"(B
 392.310 +$B%V%i%s%A!?%j%]%8%H%jCf$N%U%!%$%k$KBP$7$F!"(B
 392.311 +$B!J(BMercurial $B$r0U<1$7$J$$!KDL>o$N%D!<%k$r;HMQ$9$k$3$H$b$G$-$^$9!#(B
 392.312 +
 392.313 +$B$"$J$?$,!J$=$7$F6&F1:n6H<T$b!K(B
 392.314 +``$B%Q%o!<%f!<%6!<(B''$B$h$j$b9b$$%l%Y%k$K$"$k$N$G$"$l$P!"(B
 392.315 +$B%V%i%s%A(B(that you can consider XXXX)$B$r07$&JL$JJ}K!$,$"$j$^$9!#(B
 392.316 +$BA0$N@a$G$O!"(B
 392.317 +``$BHy;kE*(B''$B%V%i%s%A$H(B``$B5p;kE*(B''$B%V%i%s%A$N!"(B
 392.318 +$BMxMQ<T%l%Y%k$G$N6hJL$K$D$$$F8@5Z$7$^$7$?!#(B
 392.319 +$BC10l$N%j%]%8%H%jCf$G!"(B
 392.320 +$B>o$KJ#?t$N(B``$BHy;kE*$J(B''$B%V%i%s%A(B
 392.321 +$B!JNc$($P!"JQ99$N(B pull $B8e$K%^!<%8$7$F$$$J$$>uBV!K$r07$C$F$$$k0lJ}$G!"(B
 392.322 +Mercurial $B$OJ#?t$N(B``$B5p;kE*$J(B''$B%V%i%s%A$r07$&$3$H(B\emph{$B$b(B}$B$G$-$^$9!#(B
 392.323 +
 392.324 +Mercurial $B$,(B``$B5p;kE*$J(B''$B%V%i%s%A$r07$&:]$NMWE@$O!"(B
 392.325 +$B%V%i%s%A$K1JB3E*$J(B\emph{$BL>A0(B}$B$rIU$1$k$H$3$m$K$"$j$^$9!#(B
 392.326 +$BA0=R$N$h$&$K(B \texttt{default} $B$H$$$&L>A0$N%V%i%s%A$,>o$KB8:_$7$^$9$N$G!"(B
 392.327 +$B%V%i%s%A$X$NL?L>$r9T$&A0$G$"$C$F$b!"(B
 392.328 +$BC5$;$P(B \texttt{default} $B%V%i%s%A$N@W$r8+$D$1$k$3$H$,$G$-$^$9!#(B
 392.329 +
 392.330 +$BNc$($P!"(B
 392.331 +\hgcmd{commit} $B%3%^%s%I$r<B9T$9$k$H!"(B
 392.332 +$B%(%G%#%?$,5/F0$5$l$F%3%_%C%H%a%C%;!<%8$rF~NO$G$-$^$9(B
 392.333 +\footnote{$BLuCm(B: Emacs $B$N(B hg-mode.el $B$r;HMQ$7$F$$$k>l9g$O8+$i$l$^$;$s(B}$B$,!"(B
 392.334 +$BKvHx$N(B ``\texttt{HG: branch default}'' $B$r4^$`9T$r8+$F$/$@$5$$!#(B
 392.335 +$B$3$l$O!"(B\texttt{default} $B$H$$$&L>A0$N%V%i%s%A$KBP$7$F%3%_%C%H$7$F$$$k!"(B
 392.336 +$B$H$$$&$3$H$rI=$7$F$$$^$9!#(B
 392.337 +
 392.338 +$B%V%i%s%A$KL>A0$r$D$1$k$K$O!"(B
 392.339 +$B$^$:$O(B \hgcmd{branches} $B$r;HMQ$7$^$9!#(B
 392.340 +$B$3$N%3%^%s%I$O!"%j%]%8%H%jCf$K4{$KB8:_$9$kL>A0IU$-%V%i%s%A$H!"(B
 392.341 +$B8D!9$N%V%i%s%A$K$*$1$k@hF,!J(Btip$B!K%j%S%8%g%s$,$I$l$+$rNs5s$7$^$9!#(B
 392.342 +
 392.343 +\interaction{branch-named.branches}
 392.344 +
 392.345 +$B<B9TNc$G$O!"(B
 392.346 +$BL>A0IU$-%V%i%s%A$r@8@.$9$kA0$G$9$+$i!"(B
 392.347 +$BM#0lB8:_$9$k(B \texttt{default} $B$@$1$,I=<($5$l$^$9!#(B
 392.348 +
 392.349 +$B$I$l$,(B``$B8=:_$N(B''$B%V%i%s%A$+$rCN$k$K$O!"(B
 392.350 +$B0z?tL5$7$G(B \hgcmd{branch} $B%3%^%s%I$r<B9T$7$^$9!#(B
 392.351 +$B$3$N%3%^%s%I$O!"(B
 392.352 +$B8=:_$N%A%'%s%8%;%C%H$N?F%A%'%s%8%;%C%H$,!"(B
 392.353 +$B$I$N%V%i%s%A>e$K$"$k$b$N$+$rI=<($7$^$9!#(B
 392.354 +
 392.355 +\interaction{branch-named.branch}
 392.356 +
 392.357 +$B?7$7$$%V%i%s%A$r:n@.$9$k$K$O!"(B
 392.358 +$B:FEY(B \hgcmd{branch} $B%3%^%s%I$r<B9T$7$^$9$,!"(B
 392.359 +$B:#2s$O@8@.$9$k%V%i%s%AL>$r0z?t$H$7$F;XDj$7$^$9!#(B
 392.360 +
 392.361 +\interaction{branch-named.create}
 392.362 +
 392.363 +$B%V%i%s%A@8@.8e!"(B
 392.364 +\hgcmd{branch} $B%3%^%s%I$K$h$j$I$N$h$&$JI{:nMQ$r@8$8$?$N$+!"(B
 392.365 +$B2x$7$`$+$b$7$l$^$;$s!#(B
 392.366 +\hgcmd{status} $B$d(B \hgcmd{tip} $B$N=PNO$O$I$&$J$C$F$$$k$G$7$g$&$+!)(B
 392.367 +
 392.368 +\interaction{branch-named.status}
 392.369 +
 392.370 +$B:n6HNN0h$KJQ99$O2C$($i$l$F$$$^$;$s$7!"(B
 392.371 +$BMzNr$KJQ2=$b$"$j$^$;$s!#(B
 392.372 +$B$3$N$3$H$,<(:6$7$F$$$k$h$&$K!"(B
 392.373 +\hgcmd{branch} $B%3%^%s%I$N<B9T$O2?$i1JB3E*$J8z2L$r;}$A$^$;$s!#(B
 392.374 +$B$3$N%3%^%s%I$O!"(B
 392.375 +\emph{$B<!2s$N(B}$B%A%'%s%8%;%C%H$N%3%_%C%H$N:]$K!"(B
 392.376 +$B2?$H$$$&%V%i%s%AL>$r;HMQ$9$k$+$r(B
 392.377 +Mercurial $B$KEA$($k$@$1$G$9!#(B
 392.378 +
 392.379 +$BJQ99$r%3%_%C%H$9$k$H!"(B
 392.380 +Mercurial $B$O%3%_%C%H$5$l$?%A%'%s%8%;%C%H$K%V%i%s%AL>$r5-O?$7$^$9!#(B
 392.381 +$B0lC6(B \texttt{default} $B%V%i%s%A$+$iB>$N%V%i%s%A$K@Z$jBX$($F%3%_%C%H$7$?$J$i!"(B
 392.382 +\hgcmd{log}$B!"(B\hgcmd{tip} $B$d$=$l$KN`$9$k=PNO$r;}$D%3%^%s%I$N=PNO$K!"(B
 392.383 +$B?7$?$J%V%i%s%AL>$,I=<($5$l$F$$$k$3$H$G$7$g$&!#(B
 392.384 +
 392.385 +\interaction{branch-named.commit}
 392.386 +
 392.387 +\hgcmd{log} $B$KN`$9$k%3%^%s%I$O!"(B
 392.388 +\texttt{default} $B%V%i%s%A0J30$KB0$9$kA4$F$N%A%'%s%8%;%C%H$KBP$7$F!"(B
 392.389 +$B%V%i%s%AL>$rI=<($7$^$9!#(B
 392.390 +$B$=$N$?$a!"L>A0IU$-%V%i%s%A$r;H$o$J$$8B$j!"(B
 392.391 +$B%V%i%s%A$K4X$9$k>pJs$r8+$k$3$H$O$"$j$^$;$s!#(B
 392.392 +
 392.393 +$BL>A0IU$-%V%i%s%A$r:n@.$7!"$=$N%V%i%s%AL>$GJQ99$r%3%_%C%H$7$?$J$i$P!"(B
 392.394 +$B$=$NJQ99$KO"$J$k$=$N8e$N%3%_%C%H$O!"F1$8%V%i%s%AL>$r0z$-7Q$.$^$9!#(B
 392.395 +\hgcmd{branch} $B%3%^%s%I$K$h$j!"(B
 392.396 +$BG$0U$N;~E@$G%V%i%s%AL>$rJQ99$9$k$3$H$,$G$-$^$9!#(B
 392.397 +
 392.398 +\interaction{branch-named.rebranch}
 392.399 +
 392.400 +$B%V%i%s%AL>$O$+$J$jD9$$<wL?$r;}$D$?$a!"(B
 392.401 +$B<B:]$K$O$3$N$h$&$J%V%i%s%AL>$NJQ99$O$=$l$[$IIQHK$K<B9T$9$k$3$H$OL5$$$G$7$g$&(B
 392.402 +$B!J$3$N$3$H$O5,Ls$G$O$J$/!"$"$/$^$G46A[$G$9!K!#(B
 392.403 +
 392.404 +\section{Dealing with multiple named branches in a repository}
 392.405 +
 392.406 +$B%j%]%8%H%j$KJ#?t$NL>A0IU$-%V%i%s%A$,$"$k>l9g!"(B
 392.407 +\hgcmd{update} $B$d(B \hgcmdargs{pull}{-u} $B$H$$$C$?%3%^%s%I<B9T$N:]$K!"(B
 392.408 +Mercurial $B$O:n6HNN0h%G%#%l%/%H%j$,B0$9$k%V%i%s%A$r3P$($F$$$F!"(B
 392.409 +``$B%j%]%8%H%jA4BN(B''$B$N(B tip $B%j%S%8%g%s$G$O$J$/!"(B
 392.410 +$B$=$N%V%i%s%A$N(B tip $B%j%S%8%g%s$G:n6HNN0h%G%#%l%/%H%j$r99?7$7$^$9!#(B
 392.411 +$BJL$JL>A0IU$-%V%i%s%A$N%j%S%8%g%s$G99?7$7$?$$>l9g$O!"(B
 392.412 +\hgcmd{update} $B%3%^%s%I$K(B
 392.413 +\hgopt{update}{-C} $B%*%W%7%g%s$r;XDj$7$J$1$l$P$J$j$^$;$s!#(B
 392.414 +
 392.415 +$B$3$N?6$kIq$$$O>/!9HyL/$G$9$+$i!"<BNc$G8+$F$_$^$7$g$&!#(B
 392.416 +$B;O$a$K!"(B
 392.417 +$B$I$N%V%i%s%A>e$G:n6H$7$F$$$k$N$+$H!"(B
 392.418 +$B$I$s$J%V%i%s%A$,%j%]%8%H%jCf$KM-$k$N$+$r3NG'$7$^$9!#(B
 392.419 +
 392.420 +\interaction{branch-named.parents}
 392.421 +
 392.422 +$B8=:_(B \texttt{bar} $B%V%i%s%A>e$K$$$^$9$,!"(B
 392.423 +$B8E$$(B \hgcmd{foo} $B%V%i%s%A$bB8:_$7$^$9!#(B
 392.424 +
 392.425 +\texttt{foo} $B%V%i%s%A$*$h$S(B \texttt{bar} $B%V%i%s%A$N(B
 392.426 +tip $B%j%S%8%g%s$X$N0\F0$O!"(B
 392.427 +$BJQ99MzNr>e$rD>@~E*$KA08e$9$k$3$H$7$+I,MW$H$7$J$$$?$a!"(B
 392.428 +\hgcmd{update} $B%3%^%s%I$K(B
 392.429 +\hgopt{update}{-C} $B%*%W%7%g%s$r;XDj$9$k$3$HL5$7$K!"(B
 392.430 +$B$=$l$>$l$N(B tip $B%j%S%8%g%s$X$N99?7$r9T$&$3$H$,$G$-$^$9!#(B
 392.431 +
 392.432 +\interaction{branch-named.update-switchy}
 392.433 +
 392.434 +\texttt{foo} $B%V%i%s%A$KLa$k$?$a$K(B
 392.435 +\hgcmd{update} $B%3%^%s%I$r<B9T$9$k$H!"(B
 392.436 +\texttt{foo} $B%V%i%s%A>e$KN1$^$C$?$^$^$G(B
 392.437 +\texttt{bar} $B%V%i%s%A$N(B tip $B%j%S%8%g%s$K$O0\F0$7$^$;$s!#(B
 392.438 +
 392.439 +\interaction{branch-named.update-nothing}
 392.440 +
 392.441 +\texttt{foo} $B%V%i%s%A$G$NJQ99$N%3%_%C%H$K$h$j!"(B
 392.442 +$B?7$?$J%X%C%I$,@8@.$5$l$^$9!#(B
 392.443 +
 392.444 +\interaction{branch-named.foo-commit}
 392.445 +
 392.446 +\texttt{foo} $B%V%i%s%A$+$i(B \texttt{bar} $B%V%i%s%A$X$N99?7$O!"(B
 392.447 +$BMzNr$r(B``$B2#$CHt$S(B''$B$7$J$$$H$G$-$^$;$s$+$i!"(B
 392.448 +Mercurial $B$O(B
 392.449 +\hgcmd{update} $B%3%^%s%I$X$N(B \hgopt{update}{-C}
 392.450 +$B%*%W%7%g%s$N;XDj$rI,MW$H$7$^$9!#(B
 392.451 +
 392.452 +\interaction{branch-named.update-bar}
 392.453 +
 392.454 +\section{Branch names and merging}
 392.455 +
 392.456 +$B$*5$$E$-$N;v$H$O;W$$$^$9$,!"(B
 392.457 +Mercurial $B$K$*$1$k%^!<%8=hM}$OBP>NE*$G$O$"$j$^$;$s!#(B
 392.458 +$B%j%S%8%g%sHV9f(B 17 $B$N$b$N$H(B 23 $B$N$b$N!"(B
 392.459 +$B#2$D$N%X%C%I$r%j%]%8%H%j$,;}$C$F$$$k$b$N$H$7$^$7$g$&!#(B
 392.460 +$B%j%S%8%g%s(B 17 $B$X$H(B \hgcmd{update} 
 392.461 +$B$7$F$+$i%j%S%8%g%s(B 23 $B$H(B \hgcmd{merge} $B$7$?>l9g!"(B
 392.462 +Mercurial $B$O%j%S%8%g%s(B 17 $B$r%^!<%8$NBh#1?F!"(B
 392.463 +$B%j%S%8%g%s(B 23 $B$rBh#2?F$H$7$F5-O?$7$^$9!#(B
 392.464 +$B0lJ}$G!"(B
 392.465 +$B%j%S%8%g%s(B 23 $B$X$H(B \hgcmd{update}
 392.466 +$B$7$F$+$i%j%S%8%g%s(B 17 $B$H(B \hgcmd{merge} $B$7$?>l9g!"(B
 392.467 +$B%j%S%8%g%s(B 23 $B$,%^!<%8$NBh#1?F!"(B
 392.468 +$B%j%S%8%g%s(B 17 $B$,Bh#2?F$H$7$F5-O?$5$l$^$9!#(B
 392.469 +
 392.470 +$B$3$N?6$kIq$$$,!"%^!<%8$r9T$C$?:]$N(B Mercurial $B$N%V%i%s%AL>A*Br$K1F6A$7$^$9!#(B
 392.471 +$B%^!<%88e$K$=$N7k2L$r%3%_%C%H$9$k$H!"(B
 392.472 +Mercurial $B$OBh#1?F$N%V%i%s%AL>$r0];}$7$h$&$H$7$^$9!#(B
 392.473 +$BBh#1?F$N%V%i%s%AL>$,(B \texttt{foo} $B$G!"(B
 392.474 +\texttt{bar} $B%V%i%s%A$N%j%S%8%g%s$H%^!<%8$7$?>l9g!"(B
 392.475 +$B%^!<%88e$N%V%i%s%AL>$O(B \texttt{foo} $B$N$^$^$H$J$j$^$9!#(B
 392.476 +
 392.477 +$B%j%]%8%H%jCf$KF1$8%V%i%s%AL>$NJ#?t$N%X%C%I$,B8:_$9$k$3$H$O!"(B
 392.478 +$B$=$l$[$IDA$7$$$3$H$G$O$"$j$^$;$s!#(B
 392.479 +$BNc$($P!";d$H$"$J$?$,(B \texttt{foo} $B%V%i%s%A$G:n6H$7$F$$$k$H$7$^$9!#(B
 392.480 +$BFs?M$,$=$l$>$l0[$J$kJQ99$r%3%_%C%H$7!"(B
 392.481 +$B;d$,$"$J$?$NJQ99$r(B pull $B$7$^$7$?!#(B
 392.482 +$B$3$N;~E@$G;d$N%j%]%8%H%j$K$O!"(B
 392.483 +\texttt{foo} $B%V%i%s%A>e$K#2$D$N%X%C%I$,B8:_$7$^$9!#(B
 392.484 +$B%^!<%8$N7k2L!"(B
 392.485 +\texttt{foo} $B%V%i%s%A>e$N#2$D$N%X%C%I$O4|BTDL$j#1$D$K$J$j$^$9!#(B
 392.486 +
 392.487 +$B$7$+$7!";d$,(B \texttt{bar} $B%V%i%s%A$G:n6H$7$F$$$F!"(B
 392.488 +\texttt{foo} $B%V%i%s%A$N@.2L$r%^!<%8$7$?>l9g!"(B
 392.489 +$B%^!<%8$N7k2L$O(B \texttt{bar} $B%V%i%s%A>e$KN1$^$j$^$9!#(B
 392.490 +
 392.491 +\interaction{branch-named.merge}
 392.492 +
 392.493 +$B$h$j6qBNE*$JNc$H$7$F!"(B
 392.494 +\texttt{bleeding-edge} $B%V%i%s%A$G:n6H$7$F$$$F!"(B
 392.495 +$B:G?7$N@.2L$r(B \texttt{stable} $B%V%i%s%A$+$i;}$A9~$_$?$$$H;W$C$?$H$7$^$9!#(B
 392.496 +$B$3$N>l9g!"(B
 392.497 +\texttt{stable} $B%V%i%s%A$N@.2L$r(B pull $B$7$F%^!<%8$7$?CJ3,$G!"(B
 392.498 +Mercurial $B$O(B``$BE,@Z$J(B''$B%V%i%s%AL>(B(\texttt{bleeding-edge})$B$rA*Br$7$^$9!#(B
 392.499 +
 392.500 +\section{Branch naming is generally useful}
 392.501 +
 392.502 +$B<wL?$ND9$$J#?t$N%V%i%s%A$,C10l%j%]%8%H%j$G6&B8$7$F$$$k>u67$@$1$,!"(B
 392.503 +$BL>A0IU$-%V%i%s%A$NMxMQ$G$-$k>u67$@$H$O9M$($J$$$G$/$@$5$$!#(B
 392.504 +$B%j%]%8%H%j#1$D$K%V%i%s%A#1$D$N>u67$G$"$C$F$b!"(B
 392.505 +$BL>A0IU$-%V%i%s%A$OM-MQ$G$9!#(B
 392.506 +
 392.507 +$BC1=c$JNc$H$7$F$O!"(B
 392.508 +$B%V%i%s%A$KL>A0$rIUM?$9$k$3$H$G!"(B
 392.509 +$B%A%'%s%8%;%C%H$,$I$N%V%i%s%A$KM3Mh$9$k$+$N915WE*$J5-O?$rF@$k$3$H$,$G$-$^$9!#(B
 392.510 +$B$3$N5-O?$O!"(B
 392.511 +$B<wL?$ND9$$%V%i%s%A$r;}$D%W%m%8%'%/%H$NMzNr$rC)$k:]$K!"(B
 392.512 +$BB?$/$N>pJs$r$b$?$i$9$3$H$G$7$g$&!#(B
 392.513 +
 392.514 +$B%j%]%8%H%j$r6&M-$7$F:n6H$7$F$$$k>l9g!"(B
 392.515 +\hook{pretxnchangegroup}  $B%U%C%/$r$=$l$>$l$N%j%]%8%H%j$KBP$7$F@_Dj$9$k$3$H$G!"(B
 392.516 +``$BIT@5$J(B''$B%V%i%s%AL>$r;}$DJQ99$,;}$A9~$^$l$k$N$rKI$0$3$H$,$G$-$^$9!#(B
 392.517 +$B$3$N<jK!$OC1=c$G$9$,!"(B
 392.518 +``$B7l$NE)$k?O(B''$B$H$G$b8@$&$Y$-!JIT0BDj$J!K%V%i%s%A$N@.2L$r!"(B
 392.519 +$B8m$C$F(B``$B0BDj$7$?(B''$B%V%i%s%A$X$H;}$A9~$`$3$H$rKI$0$K$O8z2LE*$G$9!#(B
 392.520 +$B$3$N$h$&$J%U%C%/$O!"(B
 392.521 +$B6&M-%j%]%8%H%j$N(B \hgrc $B%U%!%$%k$K0J2<$N$h$&$K5-=R$7$^$9!#(B
 392.522 +
 392.523 +\begin{codesample2}
 392.524 +  [hooks]
 392.525 +  pretxnchangegroup.branch = hg heads --template '{branches} ' | grep mybranch
 392.526 +\end{codesample2}
 392.527 +
 392.528 +%%% Local Variables: 
 392.529 +%%% mode: latex
 392.530 +%%% TeX-master: "00book"
 392.531 +%%% End: 
   393.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   393.2 +++ b/ja/collab.tex	Sun Aug 16 03:41:39 2009 +0200
   393.3 @@ -0,0 +1,1524 @@
   393.4 +\chapter{Collaborating with other people}
   393.5 +\label{cha:collab}
   393.6 +
   393.7 +Mercurial $B$O40A4$KHsCf1{=8LsE*$J%D!<%k$G$"$k$?$a!"(B
   393.8 +$BMxMQ<TAj8_$NO"7H$K4X$7$F$O2?$i@)Ls$r2]$9$3$H$r$7$^$;$s!#(B
   393.9 +$B$G$9$,!"(B
  393.10 +$BJ,;69=@.4IM}$KFk@w$_$,L5$$$N$G$"$l$P!"(B
  393.11 +$B$$$/$D$+$N%D!<%k$d;HMQNc$rCN$C$F$*$/$3$H$O!"(B
  393.12 +$BBEEv$J:n6H<j=g$N%b%G%k$r9M$($k:]$KLr$KN)$A$^$9!#(B
  393.13 +
  393.14 +\section{Mercurial's web interface}
  393.15 +
  393.16 +Mercurial $B$O!"(B
  393.17 +$B$$$/$D$+$NM-MQ$J5!G=$rDs6!$9$k!"(B
  393.18 +$B6/NO$J%&%'%V%$%s%?%U%'!<%9$r;}$C$F$$$^$9!#(B
  393.19 +
  393.20 +$BBPOCE*$JMxMQ$N>l9g!"(B
  393.21 +$B%&%'%V%$%s%?%U%'!<%97PM3$G#1$D$J$$$7J#?t$N%j%]%8%H%j$N1\Mw$,$G$-$^$9!#(B
  393.22 +$B%j%]%8%H%jMzNr$N;2>H$d!"(B
  393.23 +$B8D!9$NJQ99!J%3%_%C%H%a%C%;!<%8$d:9J,!K$N8!>Z!"(B
  393.24 +$B$*$h$S3F%G%#%l%/%H%j$d%U%!%$%k$NFbMF$N;2>H!"(B
  393.25 +$B$H$$$C$?$3$H$,$G$-$^$9!#(B
  393.26 +
  393.27 +$BDLCN$K4X$7$F$b!"(B
  393.28 +$B%&%'%V%$%s%?%U%'!<%9$O!"(B
  393.29 +$B%j%]%8%H%j$K$*$1$kJQ99$K4X$9$k(B RSS $BG[?.5!G=$rDs6!$7$^$9!#(B
  393.30 +$B$*5$$KF~$j$N%D!<%k$r;H$C$F%j%]%8%H%j$r(B``$B9XFI(B''$B$9$k$3$H$b$G$-$^$9$7!"(B
  393.31 +$B%j%]%8%H%j$K$*$1$k3hF0>u67$N<+F0DLCN$rB(:B$K9T$&$3$H$b$G$-$^$9!#(B
  393.32 +$B%j%]%8%H%jDs6!<TB&$K$*$1$kDI2C@_Dj$,ITMW$G$"$k$3$H$+$i!"(B
  393.33 +$BI.<T<+?H$O!"(B
  393.34 +$BJQ99DLCN$N%a!<%j%s%0%j%9%H$h$j$b!"(B
  393.35 +$B!V(BRSS $BG[?.$r9XFI!W$9$k%b%G%k$NJ}$,Hs>o$KJXMx$@$H;W$$$^$9!#(B
  393.36 +
  393.37 +$B%&%'%V%$%s%?%U%'!<%9$K$h$j!"(B
  393.38 +$B1s3V%f!<%6$K$h$k%j%]%8%H%j$NJ#@=$dJQ99$N<h$j9~$_!"(B
  393.39 +$B$*$h$S!J%5!<%PB&$G$=$l$r5v2D$7$F$$$k$J$i$P!K(B
  393.40 +$BJQ99$N<uM}$,2DG=$K$J$j$^$9!#(B
  393.41 +Mercurial $B$N(B HTTP $B%H%s%M%j%s%0%W%m%H%3%k$G$O!"(B
  393.42 +$B@Q6KE*$K%G!<%?$N05=L$r9T$$$^$9$N$G!"(B
  393.43 +$B69$$BS0h$N%M%C%H%o!<%/@\B37PM3$G$b8zN($h$/5!G=$7$^$9!#(B
  393.44 +
  393.45 +$B%&%'%V%$%s%?%U%'!<%9$r?($C$F$_$k:G$b4JC1$JJ}K!$O!"(B
  393.46 +Mercurial $B$N%^%9%?%j%]%8%H%j$G$"$k(B
  393.47 +\url{http://www.selenic.com/repo/hg?style=gitweb} $B$N$h$&$J!"(B
  393.48 +$B4{B8$N%j%]%8%H%j$K%&%'%V%V%i%&%6$G@\B3$7$F$_$k$3$H$G$9!#(B
  393.49 +
  393.50 +$B<+?H$G%j%]%8%H%j$N%&%'%V%$%s%?%U%'!<%9$rDs6!$9$k$3$H$K6=L#$,$"$k>l9g!"(B
  393.51 +Mercurial $B$K$O#2$D$NA*Br;h$,$"$j$^$9!#(B
  393.52 +$B#1$D$O(B \hgcmd{serve} $B%3%^%s%I$r;HMQ$9$k$b$N$G!"(B
  393.53 +$BC;4|4V$N(B``$B7ZNL$J(B''$B2TF0$N>l9g$K:GE,$G$9!#(B
  393.54 +$B$3$N%3%^%s%I$NMxMQ$K4X$9$k>\:Y$O!"(B
  393.55 +\ref{sec:collab:serve}~$B@a$r;2>H$7$F$/$@$5$$!#(B
  393.56 +$BD94|E*3n$D>o;~MxMQ2DG=$J2TF0$rK>$`>l9g$O!"(B
  393.57 +Mercurial $B$KAH$_9~$^$l$F$$$k(B
  393.58 +CGI $B!J(BCommon Gateway Interface$B!K5!G=$,!"(B
  393.59 +$B0lHLE*$JA4$F$N%&%'%V%5!<%P$GMxMQ2DG=$G$9!#(B
  393.60 +CGI $B@_Dj$N>\:Y$O!"(B
  393.61 +\ref{sec:collab:cgi}~$B@a$r;2>H$7$F$/$@$5$$!#(B
  393.62 +
  393.63 +\section{Collaboration models}
  393.64 +
  393.65 +$BE,@Z$J=@Fp@-$r;}$D%D!<%k$r;H$&$3$H$G!"(B
  393.66 +$B:n6H<j=g$N7hDj$O!"(B
  393.67 +$B5;=QE*$JLdBj$+$iAH?%9)3XE*!J(Bsocial engineering$B!K$JLdBj$X$HJQ$o$j$^$9!#(B
  393.68 +Mercurial $B$O!"(B
  393.69 +$B%W%m%8%'%/%H$K$*$1$k:n6H<j=g$N9=@.$K4X$7$FKX$I@)8B$r2]$5$J$$$?$a!"(B
  393.70 +$B8DJL$NMWK>$K1h$C$?%b%G%k$N@_Dj$H1?MQ$OMxMQ<T<!Bh$H$J$j$^$9!#(B
  393.71 +
  393.72 +\subsection{Factors to keep in mind}
  393.73 +
  393.74 +$B$$$:$l$N%b%G%k$K$*$$$F$b?4F@$F$*$/$Y$-:G$b=EMW$JE@$O!"(B
  393.75 +$B$=$l$rMxMQ$9$k?M!9$NMWK>$HG=NO$K$I$l$@$1E,9g$9$k$+!"(B
  393.76 +$B$H$$$&$3$H$G$9!#(B
  393.77 +$B$3$l$O<+L@$K8+$($k$+$b$7$l$^$;$s$,!"(B
  393.78 +$B$[$s$N>/$7$N4V$G$b$3$N$3$H$rK:$l$F$O$$$1$^$;$s!#(B
  393.79 +
  393.80 +$BI.<T$O0JA0!"40`z$H;W$($k:n6H<j=g%b%G%k$r9=C[$7$?$N$G$9$,!"(B
  393.81 +$B3+H/%A!<%`$K>/$J$+$i$LNL$N6C$-$HITOB$r$b$?$i$7$^$7$?!#(B
  393.82 +$BJ#;($J%V%i%s%A72$,I,MW$JM}M3$H!"(B
  393.83 +$B$=$l$i$N4V$K$*$1$kJQ99$N<h$j07$$$K$D$$$F@bL@$7$h$&$H;n$_$^$7$?$,!"(B
  393.84 +$B%A!<%`$N%a%s%P!<$N2??M$+$,0[$r>'$($F$-$?$N$G$9!#(B
  393.85 +$BH`$i$OAoL@$J?MC#$G$7$?$,!"(B
  393.86 +$B:n6H$K$*$1$k@)Ls$KCm0U$rJ'$&(B\footnote{$BLuCm(B: $B!V%k!<%k$r<i$k!W$N0U$+!)(B}$B$3$H$b!"(B
  393.87 +$BI.<T$,>'$($k%b%G%k$N:YIt$K$*$1$k@)Ls$N=EMW@-$K8~$-9g$*$&$H$b$7$^$;$s$G$7$?!#(B
  393.88 +
  393.89 +$B6a$$>-Mh$N<R2qE*!&5;=QE*$JLdBj$+$iL\$rGX$1$J$$$G$/$@$5$$!#(B
  393.90 +$B$I$s$J7W2h$r<B;\$7$h$&$H$b!"(B
  393.91 +$B4V0c$$$dLdBj$,H/@8$7$?>l9g$KHw$($k$Y$-$G$9!#(B
  393.92 +$BM=A[2DG=$JLdBj$KBP$7$F!"(B
  393.93 +$B<+F0E*$JKI8f$dB(;~I|5l$N$?$a$N;EAH$_$NDI2C$r9MN8$7$^$7$g$&!#(B
  393.94 +$BNc$($P!"(B
  393.95 +$B%j%j!<%98~$1$G$O$J$$JQ99$N$?$a$N%V%i%s%A$r:n@.$7$h$&$H$7$?>l9g!"(B
  393.96 +$BB>$N:n6H<T$,%j%j!<%9MQ%V%i%s%A$K$&$C$+$j%^!<%8$7$F$7$^$&2DG=@-$K$D$$$F!"(B
  393.97 +$BAa$$;~E@$G9MN8$7$?$[$&$,NI$$$G$7$g$&!#(B
  393.98 +$BITE,@Z$J%V%i%s%A$+$i%A%'%s%8%;%C%H$r%^!<%8$5$;$J$$%U%C%/$r5-=R$9$k$3$H$G!"(B
  393.99 +$B$3$NLdBj$K4X$7$F$O2sHr2DG=$G$9!#(B
 393.100 +
 393.101 +\subsection{Informal anarchy}
 393.102 +
 393.103 +$B;}B32DG=@-$NE@$+$i(B
 393.104 +``$B2?$G$b%"%j(B''$B$J$d$jJ}$O$*A&$a$7$^$;$s$,!"(B
 393.105 +$B4JC1$KGD0.$9$k$3$H$,$G$-$k%b%G%k$G$"$j!"(B
 393.106 +$B$$$/$D$+$NFC0[$J>u67$G$OHs>o$KNI$/5!G=$7$^$9!#(B
 393.107 +
 393.108 +$B0l$D$NNc$H$7$F!"(B
 393.109 +$BB?$/$N%W%m%8%'%/%H$,!"(B
 393.110 +$BD>@\2q$&$3$H$N5)$J<e$/$^$H$^$C$?6(NO<T%0%k!<%W$r;}$F$$$k(B
 393.111 +As one example, many projects have a loose-knit group of collaborators
 393.112 +who rarely physically meet each other.  
 393.113 +$B;~@^$N(B``$BA4NO<@Av(B''$B!J(Bsprints$B!K(B\footnote{$BLuCm(B:
 393.114 +$B%*%U2q$H$+$G$9$M!#(B}$B$r@_$1$k$3$H$G!"(B
 393.115 +$B5wN%$K$h$C$F3V$F$i$l$?:n6H$KBG$A>!$D%0%k!<%W$b$"$j$^$9!#(B
 393.116 +$BA4NO<@Av$N5!2q$G$O!"(B
 393.117 +$BB?$/$N?M$,6&$KF1$8>l=j!J2q<R$N2q5D<<$d%[%F%k$N2q5D<<$NN`!K(B
 393.118 +$B$K=8$^$j!"(B
 393.119 +$B?tF|DxEY$rJD$8$3$b$C$F2a$4$7!"(B
 393.120 +$B>/NL$N%W%m%8%'%/%H$K=8Cf$7$F%O%C%-%s%0$r9T$$$^$9!#(B
 393.121 +
 393.122 +$BA4NO<@Av$O!"(B
 393.123 +$BBg3]$+$j$J%5!<%P%$%s%U%i$rI,MW$H$7$J$$(B
 393.124 +\hgcmd{serve} $B%3%^%s%I$rMxMQ$9$k$N$K$A$g$&$INI$$5!2q$G$9!#(B
 393.125 +$B0J2<$N(B\ref{sec:collab:serve}~$B@a$rFI$`$3$H$G!"(B
 393.126 +$B$9$0$K$G$b(B \hgcmd{serve} $B$r;H$$;O$a$k$3$H$,$G$-$^$9!#(B
 393.127 +$B$=$&$7$?$J$i!"(B
 393.128 +$B<~0O$N?MC#$K%5!<%P$r<B9TCf$G$"$k$3$H$rEA$(!"(B
 393.129 +$B%$%s%9%?%s%H%a%C%;%s%8%c!<Ey$r;HMQ$7$F(B URL $B$rAw$l$P!"(B
 393.130 +$B6&F1:n6H$9$k>e$G$N@^$jJV$7COE@$^$GC)$jCe$-$^$7$?!#(B
 393.131 +$B%V%i%&%6$K65$($i$l$?(B URL $B$rF~NO$9$l$P!"(B
 393.132 +$BH`$i$O$9$0$K$G$b$"$J$?$NJQ99$r%l%S%e!<$9$k$3$H$,$G$-$^$9$7!"(B
 393.133 +$B$"$J$?$+$i%P%0%U%#%C%/%9$rF~<j$7$F$=$l$r8!>Z$7$?$j!"(B
 393.134 +$B?75!G=$,4^$^$l$k%V%i%s%A$rJ#@=$7$F$=$l$r;n$7$F$_$?$j$9$k$3$H$,$G$-$^$9!#(B
 393.135 +
 393.136 +$B$=$N>l8B$j$N$3$N$h$&$J7A<0$G;v$r?J$a$k$3$H$NMxE@$H7gE@$O!"(B
 393.137 +$B$"$J$?$K$h$kJQ99$NB8:_$H!"$I$3$G%"%/%;%92DG=$+$rCN$k?M$@$1$,!"(B
 393.138 +$B$=$l$r;2>H$9$k$3$H$,$G$-$k!"$H$$$&E@$K$"$j$^$9!#(B
 393.139 +$B$3$N$h$&$JHs8x<0$J<jK!$O!"(B
 393.140 +$BJ#?t$N0[$J$k%j%]%8%H%j$+$i$N<h$j9~$_$,3F<+$KMW5a$5$l$k$?$a!"(B
 393.141 +$B?t?M0J>e$KBP$7$F$OC1=c$K5,LO$N3HBg$,$G$-$^$;$s!#(B
 393.142 +
 393.143 +\subsection{A single central repository}
 393.144 +
 393.145 +$B>.5,LO$J%W%m%8%'%/%H$K$*$$$F!"(B
 393.146 +$BCf1{=8LsE*$J9=@.4IM}%D!<%k$+$i$N0\9T$9$k:G$b4JC1$JJ}K!$O!"(B
 393.147 +$BC10l$N6&M-%j%]%8%H%j$r7PM3$7$FJQ99$N$d$j<h$j$r$9$k!"(B
 393.148 +$B$H$$$&$b$N$G$9!#(B
 393.149 +$B$3$NBN@)$O!"(B
 393.150 +$B$h$jLn?4E*$J:n6H<j=gBN7O$N$?$a$N:G$b4pK\E*$J(B``$B9=@.MWAG(B''$B$G$b$"$j$^$9!#(B
 393.151 +
 393.152 +$B3+H/<T!J(Bcontributor$B!K$O!"(B
 393.153 +$B6&M-%j%]%8%H%j$NJ#@=$r9T$&$3$H$G:n6H$r3+;O$7$^$9!#(B
 393.154 +$BI,MW$J;~$K$$$D$G$bJQ99$N<h$j9~$_$r9T$($^$9$7!"(B
 393.155 +$B3+H/<T$N2??M$+$O!JA40w$G$b2D!K!"(B
 393.156 +$B30It$K8x3+2DG=$K$J$C$?:]$KJQ99$r6&M-%j%]%8%H%j$KH?1G$5$;$k8"8B$r;}$A$^$9!#(B
 393.157 +
 393.158 +$B$3$N%b%G%k$G$"$C$F$b!"(B
 393.159 +$B6&M-%j%]%8%H%j$r7PM3$;$:$K$*8_$$$NJQ99$rD>@\(B \hgcmd{pull} $B$9$k$3$H$O!"(B
 393.160 +$B3+H/<T$K$H$C$F$O0U5A$N$"$k$3$H$G$9!#(B
 393.161 +$BNc$($P!"(B
 393.162 +$B;CDjE*$J%P%0=$@5$r9T$C$?$b$N$N!"(B
 393.163 +$B6&M-%j%]%8%H%j$K$=$N=$@5$r8x3+$7$?>l9g$K!"(B
 393.164 +$B$=$N=$@5$r<h$j9~$s$@B>$N3+H/<T$N:n6H$K;Y>c$r$-$?$962$l$,$"$k!"(B
 393.165 +$B$H$$$&>l9g$r9M$($F$_$^$7$g$&!#(B
 393.166 +$B%P%0=$@5$r4^$`<+J,$N%j%]%8%H%j$+$i0l;~E*$J%j%]%8%H%j$rJ#@=$7!"(B
 393.167 +$BJ#@=@h$G=$@5FbMF$r8!>Z$7$F$b$i$($k$h$&$KB>$N3+H/<T$K$*4j$$$9$k$3$H$G!"(B
 393.168 +$B@x:_E*$JB;32$rDc8:$9$k$3$H$,$G$-$^$9!#(B
 393.169 +$B$3$N$h$&$K$9$k$3$H$G!"(B
 393.170 +$B@x:_E*$J4m81@-$r;}$DJQ99$G$"$C$F$b!"(B
 393.171 +$B4JC1$J8!>Z$,:Q$`$^$G$O8x3+$5$l$J$$$h$&$K$9$k$3$H$,$G$-$^$9!#(B
 393.172 +
 393.173 +$B$3$N<o$N$d$j<h$j$N>l9g$O!"(B
 393.174 +$B6&M-%j%]%8%H%j$X$N0BA4$JJQ99H?1G$N$?$a$K(B
 393.175 +\command{ssh} $B%W%m%H%3%k$r;HMQ$9$k$N$,0lHLE*$G$9(B
 393.176 +$B!J(B\ref{sec:collab:ssh}~$B@a;2>H!K!#(B
 393.177 +$BFI$_=P$7@lMQ%j%]%8%H%j$r!"(B
 393.178 +CGI $B$r;HMQ$7$F(B HTTP $B7PM3$G8x3+$9$k$3$H$b2DG=$G$9(B
 393.179 +$B!J(B\ref{sec:collab:cgi}~$B@a;2>H!K!#(B
 393.180 +$B%j%]%8%H%j$X$NJQ99H?1G$,I,MW$J$$>l9g$d!"(B
 393.181 +$B%j%]%8%H%j$NMzNr$r%&%'%V%V%i%&%67PM3$G;2>H$7$?$$>l9g$K$O!"(B
 393.182 +HTTP $B7PM3$G$N8x3+$G==J,%K!<%:$,K~$?$5$l$^$9!#(B
 393.183 +
 393.184 +\subsection{Working with multiple branches}
 393.185 +
 393.186 +$B0lDj0J>e$N5,LO$r;}$D%W%m%8%'%/%H$K$*$$$F$O!"(B
 393.187 +$B:n6H$N?JE8$,F1;~$KJ#?t$N!VA0@~!W$G9T$o$l$k$3$H$O<+A3$J@.$j9T$-$G$9!#(B
 393.188 +$B%=%U%H%&%'%"3+H/$N>l9g!"(B
 393.189 +$B$I$N%W%m%8%'%/%H$G$b!"(B
 393.190 +$B0lDj4|4V$4$H$K8x<0%j%j!<%9$r9T$&$N$,0lHLE*$G$9!#(B
 393.191 +$B3F%j%j!<%9$O:G=i$N8x3+$N8e$K!"(B
 393.192 +$B0lDj4|4V$N(B``$BJ]<i>uBV(B''$B!J(Bmaintenance mode$B!K$H$J$k$3$H$,$"$j$^$9!#(B
 393.193 +$BJ]<i%j%j!<%9$G$O%P%0=$@5$N$_$r07$$!"(B
 393.194 +$B?75,5!G=$K$D$$$F$O<h$j07$o$J$$$N$,DLNc$G$9!#(B
 393.195 +$B$3$l$iJ]<i%j%j!<%9$HJ?9T$7$F!"(B
 393.196 +$B!J>l9g$K$h$C$F$OJ#?t$N!K>-Mh$N%j%j!<%9$K8~$1$?3+H/$,?J9T$7$^$9!#(B
 393.197 +$BJ}8~@-$N>/$70[$J$k!"$3$l$i?J9TCf$N8D!9$N3+H/$r;X$9$N$K!"(B
 393.198 +$B0lHLE*$K(B``$B%V%i%s%A(B''$B$H$$$&I=8=$r;H$$$^$9!#(B
 393.199 +
 393.200 +Mercurial $B$OFC$K!"(B
 393.201 +$BJ#?t$N0[$J$k%V%i%s%A$rF1;~$K4IM}$9$k$3$H$KE,$7$F$$$^$9!#(B
 393.202 +$B$=$l$>$l$N(B``$B3+H/;X8~(B''$B$4$H$K!"(B
 393.203 +$BJL!9$N6&M-MQ%j%]%8%H%j$rMQ0U$9$k$3$H$G!"(B
 393.204 +$BI,MW$K$J$kETEY!"(B
 393.205 +$B$"$k%j%]%8%H%j$+$iJL$N%j%]%8%H%j$X$N%^!<%8$r9T$($PNI$$$N$G$9!#(B
 393.206 +$B3F%j%]%8%H%j$O8_$$$KFHN)$7$F$$$^$9$+$i!"(B
 393.207 +$BC/$+$,L@<(E*$K%^!<%8$7$J$$8B$j$O(B
 393.208 +$B3+H/%V%i%s%A$K$*$1$kIT0BDj$JJQ99$,!"(B
 393.209 +$B0BDjHG$N$?$a$N%V%i%s%A$K1F6A$rM?$($k$3$H$O$"$j$^$;$s!#(B
 393.210 +
 393.211 +$B%V%i%s%A$4$H$K%j%]%8%H%j$rMQ0U$9$k8/$jJ}$N<B:]$NNc$r0J2<$K<($7$^$9!#(B
 393.212 +$BCf1{$N%5!<%P$K(B``$B%a%$%s%V%i%s%A(B''$B$,$"$k$b$N$H$7$^$9!#(B
 393.213 +
 393.214 +\interaction{branching.init}
 393.215 +
 393.216 +$B3+H/<T$O%a%$%s%V%i%s%A$+$iJ#@=$7!"(B
 393.217 +$BJQ99!"JQ99$N%F%9%H!"%3%_%C%H$N8e$K!"(B
 393.218 +$BJQ99$r%a%$%s%V%i%s%A$N%j%]%8%H%j$KH?1G$7$^$9!#(B
 393.219 +
 393.220 +$B%a%$%s%V%i%s%A$,%j%j!<%9$N%^%$%k%9%H!<%s$KC#$7$?$J$i$P!"(B
 393.221 +$B%^%$%k%9%H!<%s$H$J$k%j%S%8%g%s$K(B
 393.222 +\hgcmd{tag} $B%3%^%s%I$G1JB3E*$JL>A0$rIUM?$7$^$9!#(B
 393.223 +
 393.224 +\interaction{branching.tag}
 393.225 +
 393.226 +$B%a%$%s%V%i%s%A$G$O3+H/$,7QB3$7$F$$$k$H$7$^$9!#(B
 393.227 +
 393.228 +\interaction{branching.main}
 393.229 +
 393.230 +$B%j%j!<%9%^%$%k%9%H!<%s8e$NG$0U$N;~E@$G%j%]%8%H%j$rJ#@=$7$?3+H/<T$O!"(B
 393.231 +$B%j%j!<%9%^%$%k%9%H!<%s$G5-O?$5$l$?%?%0$r;H$&$3$H$G!"(B
 393.232 +$B%?%0$,IUM?$5$l$?%j%S%8%g%s$,%3%_%C%H$5$l$?;~E@$H(B
 393.233 +$B87L)$K0lCW$9$k:n6HNN0h%G%#%l%/%H%j$r(B
 393.234 +\hgcmd{update} $B%3%^%s%I$K$h$jJ#@=$9$k$3$H$,$G$-$^$9!#(B
 393.235 +
 393.236 +\interaction{branching.update}
 393.237 +
 393.238 +$B$=$l$K2C$($F!"(B
 393.239 +$B%a%$%s%V%i%s%A$G$N%?%0IU$1$N8e$G!"(B
 393.240 +$B%5!<%P>e$N%a%$%s%V%i%s%A$r!"(B
 393.241 +$B?7$?$J(B``$B0BDjHG(B''$B%V%i%s%A!J$N%j%]%8%H%j!K$X$HJ#@=$9$k$3$H$b$G$-$^$9(B\footnote{
 393.242 +$BLuCm(B: $B%a%$%s%V%i%s%A$H0BDjHG%V%i%s%A$N3F%j%]%8%H%j$O!"(B
 393.243 +$BI,$:$7$bF10l%5!<%P$G1?MQ$5$l$kI,MW$O$"$j$^$;$s!#(B}$B!#(B
 393.244 +
 393.245 +\interaction{branching.clone}
 393.246 +
 393.247 +$B0BDjHG%V%i%s%A$KBP$7$FJQ99$9$kI,MW$,$"$k>l9g!"(B
 393.248 +$B3+H/<T$O(B\emph{$B0BDjHG%V%i%s%A(B}$B$N%j%]%8%H%j$+$iJ#@=$7!"(B
 393.249 +$BJQ99!"JQ99$N%F%9%H!"%3%_%C%H$N8e$K!"(B
 393.250 +$BJQ99$r0BDjHG%V%i%s%A$N%j%]%8%H%j$KH?1G$7$^$9!#(B
 393.251 +
 393.252 +\interaction{branching.stable}
 393.253 +
 393.254 +Mercurial $B$N%j%]%8%H%j$O$*8_$$$K!JJ*M}E*$K!KFHN)$7$F$*$j!"(B
 393.255 +$B%j%]%8%H%j4V$G$NJQ99$N<+F0E*$J$d$j<h$j$O9T$o$l$J$$$?$a!"(B
 393.256 +$B0BDjHG%V%i%s%A$H$H%a%$%s%V%i%s$O$*8_$$$K(B\emph{$B3VN%(B}$B$5$l$F$$$^$9!#(B
 393.257 +$B%a%$%s%V%i%s%A$K2C$($?JQ99$,0BDjHG%V%i%s%A$K(B``$BO3$l=P$9(B''$B$3$H$O$"$j$^$;$s$7!"(B
 393.258 +$B$=$N5U$K4X$7$F$bF1MM$G$9!#(B
 393.259 +
 393.260 +$B0BDjHG%V%i%s%A$K$*$1$kA4$F$N%P%0=$@5$r!"(B
 393.261 +$B%a%$%s%V%i%s%A$KH?1G$7$?$$>l9g$b$"$k$G$7$g$&!#(B
 393.262 +$B%a%$%s%V%i%s%A$G%P%0=$@5$r:FEY!J<jF0$G!K9T$&Be$o$j$K!"(B
 393.263 +$B0BDjHG%V%i%s%A$+$i<h$j9~$s$@JQ99$r%a%$%s%V%i%s$KBP$7$F%^!<%8$9$k$3$H$G!"(B
 393.264 +$B0BDjHG%V%i%s%A$K$*$1$kJQ99$r%a%$%s%V%i%s%A$K;}$A9~$`$3$H$,$G$-$^$9!#(B
 393.265 +
 393.266 +\interaction{branching.merge}
 393.267 +
 393.268 +$B$3$N;~E@$G$N%a%$%s%V%i%s%A$O!"(B
 393.269 +$B0BDjHG%V%i%s%A$K$OL5$$JQ99$rJ];}$7$F$$$^$9$,!"(B
 393.270 +$B0BDjHG%V%i%s%A$K$*$1$kA4$F$N%P%0=$@5$rJ];}$7$F$$$^$9!#(B
 393.271 +$B0BDjHG%V%i%s%A$O!"(B
 393.272 +$B%a%$%s%V%i%s%A$K$N$_4^$^$l$kJQ99$K$O1F6A$r<u$1$J$$$^$^$G$9!#(B
 393.273 +
 393.274 +\subsection{Feature branches}
 393.275 +
 393.276 +$BBg5,LO%W%m%8%'%/%H$GM-8z$JJQ994IM}J}K!$O!"(B
 393.277 +$B3+H/%A!<%`$r>.$5$J%0%k!<%W$KJ,3d$9$k$3$H$G$9!#(B
 393.278 +$B%W%m%8%'%/%HA4BN$,;2>H$9$kC10l$N(B``$B%^%9%?!<(B''$B%V%i%s%A$+$iJ#@=$7$?6&M-%V%i%s%A(B
 393.279 +$B!J!a(B $B%j%]%8%H%j!K$r!"(B
 393.280 +$B3F%0%k!<%W$4$H$K$=$l$>$l;}$A$^$9!#(B
 393.281 +$B8D!9$N%V%i%s%A>e$G:n6H$9$k3+H/%a%s%P!<$O!"(B
 393.282 +$BB>$N%V%i%s%A$K$*$1$k3+H/:n6H$H$O3VN%$5$l$F$$$^$9!#(B
 393.283 +
 393.284 +\begin{figure}[ht]
 393.285 +  \centering
 393.286 +  \grafix[width=\textwidth]{feature-branches}
 393.287 +  \caption{Feature branches}
 393.288 +  \label{fig:collab:feature-branches}
 393.289 +\end{figure}
 393.290 +
 393.291 +$B$H$"$k5!G=$,E,@Z$J>u67(B\footnote{$BLuCm(B:
 393.292 +``$B%3%s%Q%$%k%(%i!<$,L5$/$J$C$?(B''$B>u67$J$N$+!"(B
 393.293 +``$BC1BN%F%9%H$,40N;$7$?(B''$B>u67$J$N$+$O!"(B
 393.294 +$B3F%W%m%8%'%/%H$N9=@.4IM}J}?K<!Bh$H$J$j$^$9!#(B}$B$KE~C#$7$?$HH=CG$5$l$?$J$i!"(B
 393.295 +$BEv3:5!G=$NC4Ev%A!<%`$G$O!"(B
 393.296 +$B%^%9%?!<%V%i%s%A!J$N%j%]%8%H%j!K(B
 393.297 +$B$+$iH?1G$7$?JQ99$r<+%A!<%`$N%V%i%s%A!J$N%j%]%8%H%j!K$X$H%^!<%8$7$F$+$i!"(B
 393.298 +$B%^%9%?!<%V%i%s%A$X$H%^!<%87k2L$rH?1G$9$l$PNI$$$N$G$9!#(B
 393.299 +
 393.300 +\subsection{The release train}
 393.301 +
 393.302 +$B%W%m%8%'%/%H$K$h$C$F$O!"(B
 393.303 +``train''$B%b%G%k$G1?MQ$5$l$F$$$k>l9g$b$"$j$^$9!#(B
 393.304 +``train'' $B%b%G%k$G1?MQ$5$l$F$$$k%W%m%8%'%/%H$G$O!"(B
 393.305 +$B%j%j!<%9$O?t%v7n$4$H$K@_Dj$5$l$F$*$j!"(B
 393.306 +``train''$B$,=PH/=`Hw40N;$7$?CJ3,(B\footnote{$BLuCm(B: 
 393.307 +$B!V?t%v7n$4$H$K@_Dj$5$l$?%j%j!<%9%9%1%8%e!<%k!W$r(B
 393.308 +$B!V;~9oI=DL$j$NH/<V;~9o!W$KNc$($F$$$kLOMM!#(B
 393.309 +}$B$GDs6!2DG=$J5!G=$@$1$,%j%j!<%9$K4^$^$l$^$9!#(B
 393.310 +
 393.311 +$B$3$N%b%G%k$O!"@h$K@bL@$7$?5!G=JL%V%i%s%A$K$h$k:n6H$H;w$F$$$^$9!#(B
 393.312 +``train''$B%b%G%k$N>l9g!"(B
 393.313 +$B5!G=JL%V%i%s%A$,Ns<V$K>h$j$=$3$J$C$?>l9g!"(B
 393.314 +$BEv3:5!G=$NC4Ev%A!<%`$G$O!"(B
 393.315 +$B<+%A!<%`$N5!G=%V%i%s%A!J%j%]%8%H%j!K$KBP$7$F!"(B
 393.316 +$B%j%j!<%9Ns<V$K4^$^$l$kJQ99$N<h$j9~$_$*$h$S%^!<%8$r9T$$!"(B
 393.317 +$B%^!<%87k2L$KBP$7$F:n6H$r7QB3$9$kI,MW$,$"$kE@$,0[$J$j$^$9!#(B
 393.318 +$B$3$N%^!<%8:n6H$r9T$&$3$H$G!"(B
 393.319 +$B<!2s%j%j!<%9$N:]$K!"(B
 393.320 +$BEv3:5!G=$,@09g@-$rJ]$D$3$H$,$G$-$^$9!#(B
 393.321 +
 393.322 +\subsection{The Linux kernel model}
 393.323 +
 393.324 +Linux $B%+!<%M%k$N3+H/BN@)$O!"(B
 393.325 +$B@u$$3,AX9=B$$H!"$=$l$r<h$j0O$`0l8+:.FY$H$7$?72=8$+$i@.$jN)$C$F$$$^$9!#(B
 393.326 +$BKX$I$N(B Linux $B3+H/<T$,!"(B
 393.327 +Mercurial $B$HF1Ey$N5!G=$r;}$C$?J,;69=@.4IM}%D!<%k$G$"$k(B
 393.328 +\command{git} $B%3%^%s%I$r;HMQ$7$F$$$k$N$G!"(B
 393.329 +Linux $B%+!<%M%k3+H/$K$*$1$k:n6H<j=g$N@bL@$O(B
 393.330 +Mercurial $BMxMQ$K$H$C$F$bM-MQ@-$r;}$C$F$$$^$9!#(B
 393.331 +$B5$$KF~$C$?%"%$%G%"$,$"$l$P!"(B
 393.332 +$B%D!<%k$rD6$($F<jK!$rMxMQ$9$k$3$H$O2DG=$J$N$G$9$+$i!#(B
 393.333 +
 393.334 +$B%3%_%e%K%F%#$NCf?4$K$O!"(B
 393.335 +Linux $B$rAO$j=P$7$?(B Linus Torvalds $B;a$,$$$^$9!#(B
 393.336 +$BH`$OC10l$N%=!<%9%j%]%8%H%j$r8x3+$7$F$*$j!"(B
 393.337 +$B3+H/%3%_%e%K%F%#A4BN$K$H$C$F$O!"(B
 393.338 +$B$3$N%j%]%8%H%j$,(B``$B8"0R$"$k(B''$B8=9T%=!<%9%D%j!<$H$_$J$5$l$^$9!#(B
 393.339 +$BC/$b$,(B Torvalds $B;a$N%=!<%9%D%j!<$rJ#@=$G$-$^$9$,!"(B
 393.340 +$BC/$N%D%j!<$+$iJQ99$r<h$j9~$`$+$H$$$&E@$K4X$7$F!"(B
 393.341 +Torvalds $B;a$OHs>o$K?5=E$JA*Br$r$7$F$$$^$9!#(B
 393.342 +
 393.343 +Torvalds $B;a$K$O(B``$B?.Mj$G$-$kJd:4Lr(B''$B$,2??M$+$$$^$9!#(B
 393.344 +$BH`$iJd:4Lr$,8x3+$7$F$$$kJQ99$O!"(B
 393.345 +$B%l%S%e!<$,9T$o$l$F$$$J$/$F$b!"(B
 393.346 +$BBg35$O(B Torvalds $B;a$K$h$j<h$j9~$^$l$^$9!#(B
 393.347 +$BJd:4Lr$N$&$A$N2??M$+$O!"(B
 393.348 +``$BJ]<iC4Ev<T(B''$B$H$7$F>5G'$5$l$F$*$j!"(B
 393.349 +$B%+!<%M%k$NFCDj$N%5%V%7%9%F%`$K4X$9$k@UG$$rIi$C$F$$$^$9(B
 393.350 +$B$H$"$k%+!<%M%k%O%C%+!<$,%5%V%7%9%F%`$X$NJQ99$r9T$$!"(B
 393.351 +$B$=$NJQ99$r:G=*E*$K(B Torvalds $B;a$N%D%j!<$K<h$j9~$s$GM_$7$$$H9M$($?>l9g!"(B
 393.352 +$BEv3:%5%V%7%9%F%`$NJ]<iC4Ev<T$,C/$G$"$k$+$rD4$Y$F!"(B
 393.353 +$B$=$NC4Ev<T$KJQ99$N:NMQ$r$*4j$$$9$kI,MW$,$"$j$^$9!#(B
 393.354 +$BJ]<iC4Ev<T$,JQ99$N%l%S%e!<$N8e$K:NMQ$KF10U$7$?>l9g!"(B
 393.355 +$B$=$NJQ99$O<j=g$K=>$$(B Torvalds $B;a$X$HEO$5$l$^$9!#(B
 393.356 +
 393.357 +$B8D!9$NJd:4Lr$O!"(B
 393.358 +$BJQ99$N%l%S%e!<!&>5G'$*$h$S8x3+$K4X$9$k$=$l$>$l$N<jK!$r;}$C$F$*$j!"(B
 393.359 +Torvalds $B;a$X$NJQ99AwIU;~4|$NH=CG$K4X$7$F$b!"$=$l$OEv$F$O$^$j$^$9!#(B
 393.360 +$B$=$l$K2C$($F!"(B
 393.361 +$B0[$J$kL\E*8~$1$NNI$/CN$i$l$?%V%i%s%A$,$$$/$D$+B8:_$7$^$9!#(B
 393.362 +$BNc$($P!"(B
 393.363 +$B8E$$HG$N%+!<%M%k$N(B``$B0BDjHG(B''$B%j%]%8%H%j$,!"(B
 393.364 +$BI,MW$K1~$8$F?<9o$J>c32$N=$@5$rE,MQ$9$k$?$a$K!"(B
 393.365 +$B>/?t$N?M!9$K$h$jJ]<i$5$l$F$$$^$9!#(B
 393.366 +$B2??M$+$NJ]<iC4Ev<T$O!"(B
 393.367 +$BJ#?t$N%=!<%9%D%j!<$r8x3+$7$F$$$^$9!#(B
 393.368 +$B#1$D$O<B83E*$JJQ99$N$?$a$N$b$N!"(B
 393.369 +$B#1$D$O>eN.%j%]%8%H%j$+$iG[I[$7$h$&$H$7$F$$$kJQ99$N$?$a$N$b$N!"(B
 393.370 +$B$H$$$C$?0DG[$G$9!#(B
 393.371 +$BB>$NJ]<iC4Ev<T$O!"%=!<%9%D%j!<$r#1$D$@$18x3+$7$F$$$^$9!#(B
 393.372 +
 393.373 +Linux $B$K$*$1$k$3$N%b%G%k$O!"(B
 393.374 +$B#2$D$NCmL\$KCM$9$kFCD'$r;}$C$F$$$^$9!#(B
 393.375 +$B#1$DL\$O(B``$B<h$j9~$_8BDj(B''$B!J(Bpull only$B!K$G$"$kE@$G$9!#(B
 393.376 +$BJ]<iC4Ev<T0J30$,JQ99$rH?1G$G$-$k%=!<%9%D%j!<$,KX$IL5$/!"(B
 393.377 +$BB>$N?M$,4IM}$7$F$$$k%=!<%9%D%j!<$KJQ99$rH?1G$9$kJ}K!$,L5$$$3$H$+$i!"(B
 393.378 +$BJQ99$rH?1G$5$;$?$$%=!<%9%D%j!<$NJ]<iC4Ev<T$KBP$7$F!"(B
 393.379 +$BJQ99$N:NMQ$r(B\emph{$B$*4j$$(B}$B$9$kI,MW$,$"$j$^$9!#(B
 393.380 +
 393.381 +$B#2$DL\$NFCD'$O!"(B
 393.382 +$BCNL>EY$HI>H=$K4p$E$$$F$$$kE@$G$9!#(B
 393.383 +$BL>$NCN$i$l$F$$$J$$3+H/<T$+$i$NJQ990MMj$N>l9g!"(B
 393.384 +Torvalds $B;a$,0MMj%a!<%k$r<u$1<h$C$?$N$J$i!"(B
 393.385 +$BJV?.$b$;$:$KL5;k$7$F$7$^$&$G$7$g$&!#(B
 393.386 +$B$7$+$7!"(B
 393.387 +$B%5%V%7%9%F%`$NJ]<iC4Ev<T$,0MMj%a!<%k$r<u$1<h$C$?>l9g!"(B
 393.388 +$BFbMF$,%l%S%e!<$5$l$?>e$G!"(B
 393.389 +$B$=$l$,J]<iC4Ev<T$N4p=`$rK~$?$7$F$$$l$P!"(B
 393.390 +$B$*$=$i$/$=$NJQ99$O:NMQ$5$l$k$G$7$g$&!#(B
 393.391 +$B$h$j(B``$BNI$$(B''$BJQ99$G9W8%$9$kDx!"(B
 393.392 +$BJ]<iC4Ev<T$O$"$J$?$NH=CG$r?.Mj$9$k$G$7$g$&$7!"(B
 393.393 +$B$"$J$?$NJQ990MMj$,<uM}EY$5$l$kEY9g$$$bA}$9$G$7$g$&!#(B
 393.394 +$B$"$J$?$,M-L>$K$J$j!"(B
 393.395 +Torvalds $B;a$,$^$@<uM}$7$F$$$J$$B)$ND9$$%V%i%s%A$NJ]<i$r9T$&$h$&$K$J$l$P!"(B
 393.396 +$B$"$J$?$N:n6HFbMF$KDI=>$9$k$?$a$K!"(B
 393.397 +$B;w$?$h$&$J6=L#$r;}$D?M!9$,$"$J$?$NJQ99$rDj4|E*$K<h$j9~$`$h$&$K$J$k$G$7$g$&!#(B
 393.398 +
 393.399 +$BCNL>EY$dI>H=$O!"(B
 393.400 +$BI,$:$7$b%5%V%7%9%F%`$d(B``$B?ME*(B''$B6-3&$r1[$($k$o$1$G$O$"$j$^$;$s!#(B
 393.401 +$B@l$i%9%H%l!<%87O$GCxL>$J%O%C%+!<$,!"(B
 393.402 +$B%M%C%H%o!<%/$N%P%0=$@5$r;n$_$?>l9g!"(B
 393.403 +$B%M%C%H%o!<%/%5%V%7%9%F%`$NJ]<iC4Ev<T$K$h$k4F::$O!"(B
 393.404 +$BA4$/$NIt30<T$K$h$kJQ99$HF1DxEY$H$J$k$G$7$g$&!#(B
 393.405 +
 393.406 +$B$h$j@0A3$H$7$?%W%m%8%'%/%H=>;v$N7P83$r;}$D?M$K$H$C$F!"(B
 393.407 +$BAjEv$KL5Ca=x$J(B Linux $B%+!<%M%k$N3+H/<j=g$O!"(B
 393.408 +$BA4$/Hs>o<1$J$b$N$K8+$($k$3$H$G$7$g$&!#(B
 393.409 +$B$3$N3+H/7ABV$O!"8D?M$N5$$^$0$l$N1F6A$r<u$1$d$9$$$N$G$9!#(B
 393.410 +$B:n6H$O3F<+$NET9g$NNI$$;~$K!"6C$/$Y$-%Z!<%99T$o$l$^$9!#(B
 393.411 +$B$=$l$G$b$J$*(B  Linux $B$O!"(B
 393.412 +$B@.8y$r<}$a$?=EMW$J%=%U%H%&%'%"$N#1$D$H$J$C$F$$$^$9!#(B
 393.413 +
 393.414 +\subsection{Pull-only versus shared-push collaboration}
 393.415 +
 393.416 +$BB>$N?M$N%j%]%8%H%j$+$i$OJQ99$NH?1G$N$_$7$+$7$J$$%b%G%k$H!"(B
 393.417 +$BJ#?t$N?M!9$,6&M-%j%]%8%H%j$X$NJQ99H?1G$r9T$&$3$H$,$G$-$k3+H/%b%G%k$N!"(B
 393.418 +$B$I$A$i$,(B``$B$h$jNI$$(B''$B%b%G%k$G$"$k$+$O!"(B
 393.419 +$B%*!<%W%s%=!<%9%3%_%e%K%F%#$K$*$$$F7QB3E*$J5DO@$NE*$K$J$C$F$$$^$9!#(B
 393.420 +$B$G$9!#(B
 393.421 +
 393.422 +$B6&M-%j%]%8%H%j!\H?1G%b%G%k$N;Y;}<T$O!"(B
 393.423 +$B$=$N<jK!$r@Q6KE*$K;HMQ$9$k%D!<%k$r;HMQ$9$k798~$K$"$j$^$9!#(B
 393.424 +Subversion $B$N$h$&$JCf1{=8LsE*$J9=@.4IM}%D!<%k$r;HMQ$7$F$$$k>l9g!"(B
 393.425 +$B:NMQ$9$k%b%G%k$NA*Br;h$O$"$j$^$;$s!#(B
 393.426 +$B6&M-%j%]%8%H%j!\H?1G%b%G%k$,%D!<%k$K$h$C$F6/@)$5$l$k$?$a!"(B
 393.427 +$BB>$N%b%G%k$r;HMQ$9$k$K$O!"(B
 393.428 +$B$=$N%D!<%k>e$GFH<+$N<jK!!JNc$($P!"<jF0$G(B \command{patch}
 393.429 +$B$r08$F$k!"$J$I!K$r6n;H$9$kI,MW$,$"$j$^$9!#(B
 393.430 +
 393.431 +Mercurial $B$N$h$&$JE,@Z$JJ,;69=@.4IM}%D!<%k$G$"$l$P!"(B
 393.432 +$BN>J}$N%b%G%k$rA*Br2DG=$G$9!#(B
 393.433 +$BMxMQ<T4V$NO"7H7ABV$O!"(B
 393.434 +$B%D!<%k$K$h$j6/@)$5$l$kOD$s$@$b$N$G$O$J$/!"(B
 393.435 +$B8GM-$NMWK>$d9%$_$K4p$E$$$F9=C[$9$k$3$H$,$G$-$^$9!#(B
 393.436 +
 393.437 +\subsection{Where collaboration meets branch management}
 393.438 +
 393.439 +$B6&M-%j%]%8%H%j$r9=C[$7!"(B
 393.440 +$B3F:n6H<T$,<j85$N%j%]%8%H%j$H6&M-%j%]%8%H%j$H$N4V$G!"(B
 393.441 +$BJQ99$NEAGE$r3+;O$7;O$a$?$J$i!"(B
 393.442 +$B%A!<%`Fb$N3+H/$NJ}8~@-$rF1;~$KJ#?t4IM}$9$k$H$$$&!"(B
 393.443 +$BO"7H$K4X$9$k$3$H$G$O$"$j$D$D$b!"(B
 393.444 +$BHyL/$K0[$J$kFqLd$KD>LL$9$k$3$H$G$7$g$&!#(B
 393.445 +$B$3$NLdBj$O3+H/%A!<%`$NO"7HJ}<0$HL)@\$K4XO"$7$F$O$$$k$b$N$N!"(B
 393.446 +$B2~$a$F<h$j>e$2$k2ACM$,$"$k$[$IHs>o$K9~$_F~$C$?OC$G$"$k$3$H$+$i!"(B
 393.447 +\ref{chap:branch}~$B>O$G2~$a$F@bL@$7$^$9!#(B
 393.448 +
 393.449 +\section{The technical side of sharing}
 393.450 +
 393.451 +$BK\>O$N;D$j$O!"(B
 393.452 +$B6&F1:n6H<T$KBP$7$F%G!<%?$NDs6!$r9T$&>e$G$NLdBjE@$K3d$-$?$$$H;W$$$^$9!#(B
 393.453 +
 393.454 +\section{Informal sharing with \hgcmd{serve}}
 393.455 +\label{sec:collab:serve}
 393.456 +
 393.457 +Mercurial $B$N(B \hgcmd{serve} $B%3%^%s%I$O!"(B
 393.458 +$B>.$5$/6[L)$GB-JB$_$NAa$$=8CD$G$NMxMQ$KBgJQE,$7$F$$$^$9!#(B
 393.459 +\hgcmd{serve} $B%3%^%s%I$O$^$?!"(B
 393.460 +$B%M%C%H%o!<%/1[$7$G$N(B Mercurial $B%3%^%s%I$NMxMQ46$rDO$`$?$a$N!"(B
 393.461 +$BAG@2$i$7$$<jCJ$rDs6!$7$F$$$^$9!#(B
 393.462 +
 393.463 +$B%j%]%8%H%jG[2<$K$*$$$F(B \hgcmd{serve} $B$r<B9T$9$k$3$H$G!"(B
 393.464 +$B#1IC$b7P$?$:$KFC@=$N(B HTTP $B%5!<%P$,5/F0$7$^$9!#(B
 393.465 +$B<B9T$,Dd;_$5$l$k$^$G$N4V$K$3$N(B HTTP $B%5!<%P$O!"(B
 393.466 +$BG$0U$N%/%i%$%"%s%H$+$i$N@\B3$r<uM}$7!"(B
 393.467 +$BEv3:%j%]%8%H%jCf$N%G!<%?$NDs6!$r9T$$$^$9!#(B
 393.468 +$B$?$C$?:#5/F0$7$?$P$+$j$N%5!<%P$N(B URL $B$rCN$C$F$$$F!"(B
 393.469 +$B%M%C%H%o!<%/1[$7$K%5!<%P$,2TF0$7$F$$$k%3%s%T%e!<%?$HDL?.$G$-$k$J$i!"(B
 393.470 +$B%&%'%V%V%i%&%6$d(B Mercurial $B$rMxMQ$7$F!"(B
 393.471 +$BC/$b$,%j%]%8%H%j$+$i%G!<%?$rFI$_=P$9$3$H$,$G$-$^$9!#(B
 393.472 +$B%N!<%H(B PC $B>e$G2TF0$9$k(B \hgcmd{serve} $B%W%m%;%9$N(B URL $B$O!"(B
 393.473 +\Verb|http://my-notepc.local:8000/| $B$N$h$&$J7A<0$K$J$j$^$9!#(B
 393.474 +
 393.475 +\hgcmd{serve} $B%3%^%s%I$OHFMQ%&%'%V%5!<%P$G$O(B\emph{$B$"$j$^$;$s(B}$B!#(B
 393.476 +$B$3$N%3%^%s%I$r;HMQ$9$k$3$H$G#2$D$N;v$,2DG=$K$J$j$^$9!#(B
 393.477 +
 393.478 +\begin{itemize}
 393.479 +\item $B0lHLE*$J%&%'%V%V%i%&%67PM3$G$N%5!<%S%9BP>]%j%]%8%H%j$NMzNr$N1\Mw(B
 393.480 +
 393.481 +\item Mercurial $B%W%m%H%3%k$K$h$kDL?.$r9T$&$3$H$G!"(B
 393.482 +  $B%j%]%8%H%jFb%A%'%s%8%;%C%H$N(B \hgcmd{clone} $B$J$$$7(B \hgcmd{pull}
 393.483 +
 393.484 +\end{itemize}
 393.485 +
 393.486 +$B$H$j$o$11s3V%f!<%6$K$h$kBP>]%j%]%8%H%j$N(B\emph{$BJQ99(B}$B$r5v2D$7$J$$$3$H$+$i!"(B
 393.487 +\hgcmd{serve} $B$OFI$_=P$7@lMQ$H$7$F$NMxMQ$,A[Dj$5$l$F$$$^$9!#(B
 393.488 +
 393.489 +Mercurial $B$r4{$KMxMQ$7;O$a$F$$$k$N$G$"$l$P!"(B
 393.490 +$B<+?H$N%3%s%T%e!<%?>e$N%j%]%8%H%j$rBP>]$H$7$F(B
 393.491 +\hgcmd{serve} $B$rMxMQ$9$k$3$H$,$G$-$^$9$+$i!"(B
 393.492 +$B%M%C%H%o!<%/1[$7$K8x3+$5$l$F$$$k%j%]%8%H%j$N>l9g$HF1MM$K!"(B
 393.493 +\hgcmd{clone} $B$d(B \hgcmd{incoming} 
 393.494 +$B$N$h$&$J%3%^%s%I$r;HMQ$7$F!"(B
 393.495 +\hgcmd{serve} $B$K$h$C$F5/F0$5$l$?%5!<%P$HDL?.$7$F$_$^$7$g$&!#(B
 393.496 +$B%M%C%H%o!<%/7PM3$G8x3+$5$l$F$$$k%j%]%8%H%j$KBP$9$k%3%^%s%I$N;HMQJ}K!$r!"(B
 393.497 +$B<jAa$/=,F@$9$k0l=u$K(B \hgcmd{serve} $B$r;HMQ$9$k$N$bNI$$$G$7$g$&!#(B
 393.498 +
 393.499 +\subsection{A few things to keep in mind}
 393.500 +
 393.501 +\hgcmd{serve} $B$O!"(B
 393.502 +$B%M%C%H%o!<%/1[$7$NFI$_=P$7A`:n$rG'>ZL5$7$GA4$F5v2D$7$F$$$k$?$a!"(B
 393.503 +$BBP>]%j%]%8%H%j$+$i%G!<%?$rFI$_=P$9$?$a$KC/$,@\B3$7$FMh$k$N$+$r!"(B
 393.504 +$B5$$K$7$J$/$FNI$$!J$"$k$$$O40A4$K@)8f$G$-$k!K4D6-$G$N$_(B
 393.505 +\hgcmd{serve}  $B$r;H$&$h$&$K$9$Y$-$G$9!#(B
 393.506 +
 393.507 +$B%3%s%T%e!<%?$d%M%C%H%o!<%/$X$N%U%!%$%d%&%)!<%k$NF3F~>u67$K$D$$$F!"(B
 393.508 +\hgcmd{serve} $B%3%^%s%I$O0l@Z4XCN$7$^$;$s!#(B
 393.509 +$B%U%!%$%d%&%)!<%k$N8!=P$b@)8f$b$G$-$^$;$s!#(B
 393.510 +$B<B9TCf$N(B \hgcmd{serve} $B%W%m%;%9$H$NDL?.$,$G$-$J$$>l9g$O!"(B
 393.511 +$B!JM}>&<R$,@5$7$$(B URL $B$r;HMQ$7$F$$$k$3$H$r3NG'$7$?(B\emph{$B8e(B}$B$G!K(B
 393.512 +$B%U%!%$%"%&%)!<%k$N@_Dj$r3NG'$9$Y$-$G$9!#(B
 393.513 +
 393.514 +\hgcmd{serve} $B$K$h$k%M%C%H%o!<%/@\B3$N<u$1IU$1$O!"(B
 393.515 +$BDL>o$O(B 8000 $BHV%]!<%H$G9T$o$l$^$9!#(B
 393.516 +$BEv3:%]!<%H$,4{$KB>$N%W%m%;%9$K$h$j;HMQ$5$l$F$$$?>l9g$O!"(B
 393.517 +\hgopt{serve}{-p} $B%*%W%7%g%s$r;HMQ$9$k$3$H$G!"(B
 393.518 +$B@\B3<u$1IU$1%]!<%HHV9f$r;XDj$9$k$3$H$,$G$-$^$9!#(B
 393.519 +
 393.520 +\hgcmd{serve} $B5/F0$N:]$K$ODL>o2?$b=PNO$5$l$^$;$s$N$G!"(B
 393.521 +$B>/!9IT0B$K$J$k$+$b$7$l$^$;$s!#(B
 393.522 +\hgcmd{serve} $B$,E,@Z$K2TF0$7$F$$$k$3$H$r3NG'$7$?$j!"(B
 393.523 +$B6&F1:n6H<T$KAwIU$9$k(B URL $B$rCN$j$?$$$N$G$"$l$P!"(B
 393.524 +\hggopt{-v} $B%*%W%7%g%sIU$-$G(B \hgcmd{serve} $B$r5/F0$7$F$/$@$5$$!#(B
 393.525 +
 393.526 +\section{Using the Secure Shell (ssh) protocol}
 393.527 +\label{sec:collab:ssh}
 393.528 +
 393.529 +Secure Shell $B!J(B\texttt{ssh}$B!K%W%m%H%3%k$r;HMQ$9$k$3$H$G!"(B
 393.530 +$B%M%C%H%o!<%/@\B31[$7$K0BA4$KJQ99FbMF$N<h$j9~$_!&H?1G$r9T$&$3$H$,$G$-$^$9!#(B
 393.531 +$B$3$N@\B3J}K!$r@5$7$/5!G=$5$;$k$K$O!"(B
 393.532 +$B%/%i%$%"%s%H$"$k$$$O%5!<%PB&$G>/!9@_Dj$,I,MW$+$b$7$l$^$;$s!#(B
 393.533 +
 393.534 +ssh $B$KFk@w$_$,$J$$$N$G$"$l$P!"(B
 393.535 +$BB>$N%3%s%T%e!<%?$H0BA4$KDL?.$9$k$?$a$N%M%C%H%o!<%/%W%m%H%3%k$G$"$k!"(B
 393.536 +$B$HM}2r$7$F$*$$$F$/$@$5$$!#(B
 393.537 +Mercurial $B$G(B ssh $B$rMxMQ$9$k$K$O!"(B
 393.538 +$B%5!<%P$X$N%m%0%$%s$*$h$S%3%^%s%I<B9T$,$G$-$k$h$&$K!"(B
 393.539 +$B%5!<%PB&$K%f!<%6%"%+%&%s%H$r!JI,MW$G$"$l$PJ#?t!KMQ0U$9$kI,MW$,$"$j$^$9!#(B
 393.540 +
 393.541 +$B!J(Bssh $B$K$D$$$F>\$7$$>l9g!"(B
 393.542 +$B0J9_$N@bL@$O$*$=$i$/Hs>o$K=iJbE*$K46$8$k$G$7$g$&!K(B
 393.543 +
 393.544 +\subsection{How to read and write ssh URLs}
 393.545 +
 393.546 +ssh $B%W%m%H%3%k$rMxMQ$9$k>l9g$N(B URL $B$O!"(B
 393.547 +$B35$M0J2<$N$h$&$J7A<0$r;}$A$^$9!#(B
 393.548 +
 393.549 +\begin{codesample2}
 393.550 +  ssh://bos@hg.serpentine.com:22/hg/hgbook
 393.551 +\end{codesample2}
 393.552 +
 393.553 +\begin{enumerate}
 393.554 +\item ``\texttt{ssh://}' $BItJ,$,(B Mercurial $B$K(B ssh $B%W%m%H%3%k$NMxMQ$r;X<($7$^$9(B
 393.555 +
 393.556 +\item ``\texttt{bos@}''$BItJ,$,%5!<%P$X$N%m%0%$%s$K$*$1$k%f!<%6L>$rI=$7$^$9!#(B
 393.557 +  $B%5!<%P$G$N%f!<%6L>$,%m!<%+%k%^%7%s>e$N%f!<%6L>$H0lCW$9$k>l9g$O!"(B
 393.558 +  $B$3$NItJ,$r>JN,$G$-$^$9!#(B
 393.559 +
 393.560 +\item ``\texttt{hg.serpentine.com}'' 
 393.561 +  $BItJ,$O%m%0%$%s@h%5!<%P$N%[%9%HL>$rI=$7$^$9!#(B
 393.562 +
 393.563 +\item ``:22'' $BItJ,$O%5!<%P$K@\B3$9$k:]$N%]!<%HHV9f$rI=$7$^$9!#(B
 393.564 +  ssh $B@\B3$K$*$1$k4{Dj%]!<%HHV9f$O(B 22 $BHV$G$9$N$G!"(B
 393.565 +  22 $BHV(B\emph{$B0J30(B}$B$N%]!<%H$r;HMQ$9$k>l9g$N$_;XDj$,I,MW$G$9!#(B
 393.566 +
 393.567 +\item URL $B$N;D$j$NItJ,$O%5!<%P>e$K$*$1$k%j%]%8%H%j$N%Q%9$rI=$7$^$9!#(B
 393.568 +
 393.569 +\end{enumerate}
 393.570 +
 393.571 +ssh $B%W%m%H%3%k$K$*$1$k(B URL $BI=5-$N%Q%9MWAGItJ,$K$O!"(B
 393.572 +$BCM$N2r<a$K4X$9$kI8=`E*$J<jK!$,$J$$$?$a$K!"(B
 393.573 +$B:.Mp$NM>CO$,B?!9$"$j$^$9!#(B
 393.574 +$B0l72$N%W%m%0%i%`$O!"(B
 393.575 +$B%Q%9MWAGItJ,$K4X$7$FB>$N%W%m%0%i%`$H0[$J$k?6$kIq$$$r$7$^$9!#(B
 393.576 +$B$3$N$h$&$J>u67$OM}A[E*$G$O$"$j$^$;$s$,!"(B
 393.577 +$B>u67$,JQ$o$j$=$&$K$O$"$j$^$;$s!#(B
 393.578 +$B$G$9$+$i0J9_$N@bL@$OCm0U?<$/FI$s$G$/$@$5$$!#(B
 393.579 +
 393.580 +Mercurial $B$O%Q%9ItJ,$r!"(B
 393.581 +$B%5!<%P$K%m%0%$%s$9$k%f!<%6$N!"(B
 393.582 +$B%[!<%`%G%#%l%/%H%j$KBP$9$kAjBP%Q%9$H$_$J$7$^$9!#(B
 393.583 +$BNc$($P!"(B
 393.584 +$B%5!<%P$K$*$1$k(B \texttt{foo} $B%f!<%6$N%[!<%`%G%#%l%/%H%j$,(B
 393.585 +\dirname{/home/foo} $B$G$"$k>l9g!"(B
 393.586 +ssh $B%W%m%H%3%k$K$*$1$k(B URL $B$N%Q%9MWAG$,(B \dirname{bar} $B$G$"$l$P!"(B
 393.587 +$B$=$N(B URL $B$K$h$j(B\emph{$B<B:]$K(B}$B;2>H$5$l$k$N$O(B
 393.588 +\dirname{/home/foo/bar} $B%G%#%l%/%H%j$G$9!#(B
 393.589 +
 393.590 +$BB>$N%f!<%6$N%[!<%`%G%#%l%/%H%j$KBP$9$kAjBP%Q%9$r;XDj$9$k>l9g$O!"(B
 393.591 +$B%A%k%@J8;z!J(B\texttt{~}$B!K$K%f!<%6L>!J$3$3$G$O(B
 393.592 +\texttt{otheruser} $B$H$7$^$9!K$rB3$1$?%Q%9$G;O$^$k!"(B
 393.593 +$B0J2<$N$h$&$JI=5-$K$J$j$^$9!#(B
 393.594 +
 393.595 +\begin{codesample2}
 393.596 +  ssh://server/~otheruser/hg/repo
 393.597 +\end{codesample2}
 393.598 +
 393.599 +\emph{$B@dBP(B}$B%Q%9$K$h$k;XDj$r9T$&>l9g$O!"(B
 393.600 +$B0J2<$N$h$&$K%Q%9MWAG$r%@%V%k%9%i%C%7%e$G;O$a$^$9!#(B
 393.601 +
 393.602 +\begin{codesample2}
 393.603 +  ssh://server//absolute/path
 393.604 +\end{codesample2}
 393.605 +
 393.606 +\subsection{Finding an ssh client for your system}
 393.607 +
 393.608 +$BKX$IA4$F$N(B Unix $B%i%$%/$J%7%9%F%`$K$O(B
 393.609 +OpenSSH $B$,;vA0F3F~$5$l$F$$$^$9!#(B
 393.610 +Unix $B%i%$%/$J%7%9%F%`$r;HMQ$7$F$$$k>l9g!"(B
 393.611 +\Verb|which ssh| $B$HF~NO$9$k$3$H$G(B
 393.612 +\command{ssh} $B%3%^%s%I!JDL>o$O(B \dirname{/usr/bin} $B$K%$%s%9%H!<%k$5$l$F$$$^$9!K(B
 393.613 +$B$N%$%s%9%H!<%k$NM-L5$r3NG'$9$k$3$H$,$G$-$^$9!#(B
 393.614 +$BM=A[$KH?$7$F%$%s%9%H!<%k$5$l$F$$$J$+$C$?>l9g$K$O!"(B
 393.615 +$B%7%9%F%`E:IU$N%I%-%e%a%s%H$r;2>H$7$F%$%s%9%H!<%kJ}K!$rD4$Y$F$/$@$5$$!#(B
 393.616 +
 393.617 +Windows $B$N>l9g!"(B
 393.618 +$BBEEv$J(B ssh $B%/%i%$%"%s%H$rA*Br$7$F%@%&%s%m!<%I$9$kI,MW$,$"$j$^$9!#(B
 393.619 +$B<g$JA*Br;h$O#2$D$"$j$^$9!#(B
 393.620 +
 393.621 +\begin{itemize}
 393.622 +\item Simon Tatham $B;a$K$h$k(B PuTTY~\cite{web:putty} $B$O!"(B
 393.623 +  ssh $B%/%i%$%"%s%H%3%^%s%I0l<0$rDs6!$7$F$$$^$9!#(B
 393.624 +
 393.625 +\item $BLLE]$J;v$X$NBQ@-$,9b$$J}$J$i!"(B
 393.626 +  Cygwin $B>e$N(B OpenSSH $B$r;H$&$N$bNI$$$G$7$g$&!#(B
 393.627 +
 393.628 +\end{itemize}
 393.629 +
 393.630 +$B$I$A$i$N>l9g$G$b!"(B
 393.631 +Mercurial $B$,(B ssh $B%/%i%$%"%s%H%3%^%s%I$rC5$7=P$;$k$h$&$K(B
 393.632 +\hgini\ $B%U%!%$%k$rJT=8$9$kI,MW$,$"$k$G$7$g$&!#(B
 393.633 +$BNc$($P(B PuTTY $B$r;HMQ$9$k$J$i!"(B
 393.634 +$B%3%^%s%I9T$G<B9T$9$k(B ssh $B%/%i%$%"%s%H$H$7$F(B
 393.635 +\command{plink} $B$r<B9T$9$k$3$H$K$J$j$^$9!#(B
 393.636 +
 393.637 +\begin{codesample2}
 393.638 +  [ui]
 393.639 +  ssh = C:/path/to/plink.exe -ssh -i "C:/path/to/my/private/key"
 393.640 +\end{codesample2}
 393.641 +
 393.642 +\begin{note}
 393.643 +  \command{plink} $B$X$N%Q%9$,6uGrJ8;z$r4^$`>l9g!"(B
 393.644 +  Mercurial $B$O(B \command{plink} $B%3%^%s%I$r@5$7$/5/F0$G$-$^$;$s(B
 393.645 +  $B!J$G$9$N$G(B \dirname{C:\\Program Files} $B$K%$%s%9%H!<%k$9$k$N$O!"(B
 393.646 +  $B$h$/$"$j$^$;$s!K!#(B
 393.647 +\end{note}
 393.648 +
 393.649 +\subsection{Generating a key pair}
 393.650 +
 393.651 +ssh $B%/%i%$%"%s%H$r;HMQ$9$kEY$K!"(B
 393.652 +$BKh2s%Q%9%o!<%IF~NO$r7+$jJV$5$J$/$F$bNI$$MM$K!"(B
 393.653 +$B80BP!J(Bkey pair$B!K(B\footnote{$BLuCm(B:
 393.654 +$B!V8x3+80!W!J(Bpublic key$B!K$H(B
 393.655 +$B!VHkL)80!W!J(Bprivate key$B!K$NBP$,@8@.$5$l$^$9!#(B
 393.656 +}$B$r@8@.$9$k$3$H$r$*$9$9$a$7$^$9!#(B
 393.657 +Unix $B%i%$%/$J%7%9%F%`(B\footnote{$BLuCm(B: Windows $B$N(B Cygwin $B4D6-4^$`(B}$B$G$O!"(B
 393.658 +\command{ssh-keygen} $B%3%^%s%I$G80BP$r@8@.$7$^$9!#(B
 393.659 +Windows $B>e$G(B PuTTY $B$r;HMQ$7$F$$$k>l9g$O!"(B
 393.660 +\command{puttygen} $B%3%^%s%I$G80BP$r@8@.$7$^$9!#(B
 393.661 +
 393.662 +$B80BP$r@8@.$9$k>l9g!"(B
 393.663 +$B%Q%9%U%l!<%:$G80$r<i$k$h$&$K$9$k$N$,!"(B
 393.664 +$B0lHL$K$O(B\emph{$BHs>o$K(B}$B8-L@$H$5$l$F$$$^$9(B
 393.665 +$B!J(Bssh $B%W%m%H%3%k$K$h$k0BA4$J%M%C%H%o!<%/$r!"(B
 393.666 +$B<+F02=$5$l$?=hM}$K$*$$$F;HMQ$9$k>l9g$r=|$/!K!#(B
 393.667 +
 393.668 +$B$7$+$7!"C1$K80BP$r@8@.$7$?$@$1$G$OIT==J,$G$9!#(B
 393.669 +$B%M%C%H%o!<%/7PM3$G%m%0%$%s$9$k%5!<%PB&%"%+%&%s%H$K$*$$$F!"(B
 393.670 +$B>5G'800lMw$K8x3+80$rDI2CEPO?$9$kI,MW$,$"$j$^$9!#(B
 393.671 +OpenSSH $B$,F3F~$5$l$F$$$k%5!<%P$G$N8x3+80$NDI2C$O!"(B
 393.672 +$BEv3:%"%+%&%s%H$N(B \sdirname{.ssh} $B%G%#%l%/%H%jG[2<$N(B
 393.673 +\sfilename{authorized\_keys} 
 393.674 +$B%U%!%$%k$K8x3+80$NFbMF$rDI2C$9$k$3$H$G9T$o$l$^$9!#(B
 393.675 +
 393.676 +Unix $B%i%$%/L>%7%9%F%`$G$O!"(B
 393.677 +$B8x3+80$ODL>o(B \filename{.pub} $B3HD%;R$r;}$C$F$$$^$9!#(B
 393.678 +Windows $B>e$G(B \command{puttygen} $B$r;HMQ$9$k>l9g$O!"(B
 393.679 +$BG$0U$N%U%!%$%kL>$GJ]B82DG=$G$9$7!"(B
 393.680 +$B8x3+80$NFbMF$,I=<($5$l$F$$$k%&%#%s%I%&$+$i(B
 393.681 +\sfilename{authorized\_keys} $B$XD>@\E=$jIU$1!J(Bpaste$B!K$k$3$H$b2DG=$G$9(B
 393.682 +
 393.683 +\subsection{Using an authentication agent}
 393.684 +
 393.685 +$BG'>Z%(!<%8%'%s%H$O!"(B
 393.686 +$B%Q%9%U%l!<%:$r%a%b%j>e$K3JG<$9$k%G!<%b%s%W%m%;%9$G$9(B
 393.687 +$B!J$=$N$?$a!"%m%0%"%&%H8e$K:FEY%m%0%$%s$7$?>l9g!"(B
 393.688 +$B%Q%9%U%l!<%:$O<:$o$l$^$9!K!#(B
 393.689 +$BG'>Z%(!<%8%'%s%H$N2TF0$r8!CN$9$k$H!"(B
 393.690 +ssh $B%/%i%$%"%s%H$OG'>Z%(!<%8%'%s%H$K%Q%9%U%l!<%:$NLd$$9g$o$;$r9T$$$^$9!#(B
 393.691 +$BG'>Z%(!<%8%'%s%H$,2TF0$7$F$$$J$$$+!"(B
 393.692 +$B$"$k$$$OI,MW$J%Q%9%U%l!<%:$r5-21$7$F$$$J$$>l9g$O!"(B
 393.693 +Mercurial $B$K$h$k%5!<%PO"7H!JNc(B: \hgcmd{push} $B$d(B \hgcmd{pull}$B!K$NETEY!"(B
 393.694 +$B%Q%9%U%l!<%:$NF~NO$,I,MW$G$9!#(B
 393.695 +
 393.696 +$BG'>Z%(!<%8%'%s%H$K$h$k%Q%9%U%l!<%:J]B8$N7gE@$O!"(B
 393.697 +$BF~G0$K=`Hw$7$?967b<T$K$H$C$F$O!"(B
 393.698 +$B$?$H$(Dj4|E*$K:F5/F0$7$F$$$k%7%9%F%`$G$"$C$F$b(B XXXXXX power-cycled XXXX
 393.699 +$B%Q%9%U%l!<%:$NJ?J,$rI|852DG=$G$"$kE@$G$9!#(B
 393.700 +$B$3$NLdBj$,5vMF2DG=$J$b$N$+H]$+$O!"3F<+$GH=CG$9$kI,MW$,$"$j$^$9!#(B
 393.701 +$BG'>Z%(!<%8%'%s%H$r;HMQ$9$k$3$H$G!"(B
 393.702 +$B7+$jJV$7%Q%9%U%l!<%:$rF~NO$9$k<j4V$rBgI}$KDc8:$9$k$3$H$,$G$-$^$9!#(B
 393.703 +
 393.704 +Unix $B%i%$%/L>%7%9%F%`$G$O!"(B
 393.705 +$BG'>Z%(!<%8%'%s%H$O(B \command{ssh-agent} $B$H$$$&L>A0$G!"(B
 393.706 +\command{ssh-add} 
 393.707 +$B%3%^%s%I$r;H$C$F%(!<%8%'%s%H$N5-21NN0h$K%Q%9%U%l!<%:$rJ]B8$7$^$9!#(B
 393.708 +Windows $B>e$G(B PuTTY $B$r;HMQ$9$k>l9g$O!"(B
 393.709 +\command{pageant} $B%3%^%s%I$,G'>Z%(!<%8%'%s%H$7$F?6Iq$$$^$9!#(B
 393.710 +$B%7%9%F%`%H%l%$$KDI2C$5$l$?%"%$%3%s$r%/%j%C%/$9$k$3$H$G!"(B
 393.711 +$B3JG<$5$l$?%Q%9%U%l!<%:$N4IM}$r9T$&$3$H$,$G$-$^$9!#(B
 393.712 +
 393.713 +\subsection{Configuring the server side properly}
 393.714 +
 393.715 +$B=i?4<T$K$H$C$F(B ssh $B$N@_Dj$OLLE]$J$N$G!"(B
 393.716 +$BLdBj$,H/@8$9$k>u67$bB?4t$KEO$j$^$9!#(B
 393.717 +Add Mercurial on top, and
 393.718 +there's plenty more scope for head-scratching.  XXXXX
 393.719 +$BLdBjH/@8$N2DG=@-$O!"(B
 393.720 +$B%/%i%$%"%s%HB&$G$O$J$/%5!<%PB&$NJ}$,9b$$$G$9!#(B
 393.721 +$B$"$j$,$?$$$3$H$K!"(B
 393.722 +$B0lC6@5$7$/F0:n$9$k@_Dj$,$G$-$F$7$^$($P!"(B
 393.723 +$BDL>o$OL54|8B$K@5$7$/F0:n$7B3$1$^$9!#(B
 393.724 +
 393.725 +Mercurial $B$G(B ssh $B%5!<%P$HDL?.$r$7$F$_$kA0$K!"(B
 393.726 +$BDL>o$N(B \command{ssh} $B$J$$$7(B 
 393.727 +\command{putty} $B%3%^%s%I$K$h$k%5!<%P$H$NDL?.$r3NG'$9$k$N$,L5Fq$G$9!#(B
 393.728 +$BD>@\%3%^%s%I$r;HMQ$7$?:]$KLdBj$,H/@8$7$?$J$i$P!"(B
 393.729 +Mercurial $B$,5!G=$7$J$$$3$H$O3N<B$G$9!#(B
 393.730 +$B99$K0-$$$3$H$K!"(B
 393.731 +Mercurial $B$r2p$7$F$N(B ssh $B%5!<%P$H$NO"7H$O!"(B
 393.732 +$B:,K\E*$J860x$,1#$l$F$7$^$$$^$9!#(B
 393.733 +ssh $B$K4XO"$9$k(B Mercurial $B$NLdBj$r2r7h$9$k>l9g$O!"(B
 393.734 +Mercurial $B$NIT6q9g$r5?$&(B\emph{$BA0$K(B}$B!"(B
 393.735 +ssh $B%/%i%$%"%s%H%3%^%s%I$ND>@\<B9T$,5!G=$9$k$3$H$r3NG'$7$F$/$@$5$$!#(B
 393.736 +
 393.737 +$B%5!<%PB&$G:G=i$K3NG'$9$Y$-;v$O!"(B
 393.738 +$B$"$k%^%7%s$+$i%5!<%P%^%7%s$X$N<B:]$N%m%0%$%s$N2DH]$G$9!#(B
 393.739 +\command{ssh} $B$J$$$7(B \command{putty} $B$G%m%0%$%s$G$-$J$$>l9g!"(B
 393.740 +$BI=<($5$l$k%(%i!<%a%C%;!<%8$+$iLdBjFCDj$N%R%s%H$,F@$i$l$k$+$b$7$l$^$;$s!#(B
 393.741 +$B$h$/$"$kLdBj$K$O0J2<$N$h$&$J$b$N$,$"$j$^$9!#(B
 393.742 +
 393.743 +\begin{itemize}
 393.744 +\item ``connection refused'' $B$,I=<($5$l$k>l9g$O!"(B
 393.745 +  ssh $B%5!<%P%W%m%;%9$,5/F0$5$l$F$$$J$$$+!"(B
 393.746 +  $B%U%!%$%d!<%&%)!<%k@_Dj$K$h$j%M%C%H%o!<%/@\B3$G$-$J$$$3$H$,860x$G$9!#(B
 393.747 +
 393.748 +\item ``no route to host'' $B$,I=<($5$l$k>l9g$O!"(B
 393.749 +  $B@\B3@h$N%5!<%P%"%I%l%9$,4V0c$C$F$$$k$+!"(B
 393.750 +  $B%U%!%$%d!<%&%)!<%k$K$h$C$F@\B3$,87=E$K6X;_$5$l$F$$$k$3$H$,860x$G$9!#(B
 393.751 +
 393.752 +\item ``permission denied'' $B$,I=<($5$l$k>l9g$O!"(B
 393.753 +  $B%5!<%P@\B3$N:]$N%f!<%6L>!"%Q%9%U%l!<%:!"(B
 393.754 +  $B$J$$$7%5!<%PB&%f!<%6$N%Q%9%o!<%I$NF~NO$r4V0c$($F$$$k$3$H$,860x$G$9!#(B
 393.755 +
 393.756 +\end{itemize}
 393.757 +
 393.758 +$B$3$l$^$G$NOC$r$^$H$a$k$H!"(B
 393.759 +$B%5!<%P%^%7%s>e$N(B ssh $B%5!<%P%W%m%;%9$H$NDL?.$KLdBj$,$"$k>l9g!"(B
 393.760 +$B$^$:$O%5!<%P%W%m%;%9$N2TF0>u67$r3NG'$7$F$/$@$5$$!#(B
 393.761 +$BB?$/$N%7%9%F%`$G$O!"(B
 393.762 +ssh $B<+BN$O%$%s%9%H!<%k$5$l$F$$$^$9$,!"(B
 393.763 +$B=i4|>uBV$G$OL58z2=$5$l$F$$$k>l9g$,$"$j$^$9!#(B
 393.764 +$B$3$N3NG'$,:Q$s$@$J$i!"(B
 393.765 +$B<!$K3NG'$9$k$N$O!"(B
 393.766 +ssh $B%5!<%P%W%m%;%9$,30It$+$i$N@\B3$r<u$1IU$1$k%]!<%H!JDL>o$O(B 22 $BHV!K(B
 393.767 +$B$KBP$9$k30It$+$i$N@\B3$r!"(B
 393.768 +$B%5!<%P$N%U%!%$%d!<%&%)!<%k@_Dj$,5v2D$7$F$$$k$+H]$+$G$9!#(B
 393.769 +$B$3$l$i#2$D$N3NG'$r:Q$^$;$k$^$G$O!"(B
 393.770 +$BFMGo;R$b$J$$@_Dj%_%9$N2DG=@-$K4X$7$F?4G[$9$kI,MW$O$"$j$^$;$s!#(B
 393.771 +
 393.772 +$BHkL)80MQ%Q%9%U%l!<%:$NJ];}$N$?$a$K!"(B
 393.773 +$B%/%i%$%"%s%HB&$GG'>Z%(!<%8%'%s%H$r;HMQ$7$F$$$k>l9g$O!"(B
 393.774 +$B%Q%9%U%l!<%:$d%Q%9%o!<%I$NLd$$9g$o$;$r<u$1$k;vL5$/!"(B
 393.775 +$B%5!<%P$K%m%0%$%s$G$-$F$$$J$1$l$P$J$j$^$;$s!#(B
 393.776 +$B%Q%9%U%l!<%:$rLd$$9g$o$;$k%W%m%s%W%H$,I=<($5$l$k>l9g!"(B
 393.777 +$BLdBj$N2DG=@-$N$"$k$b$N$,4v$D$+$"$j$^$9!#(B
 393.778 +
 393.779 +\begin{itemize}
 393.780 +\item \command{ssh-add} $B$J$$$7(B \command{pageant} 
 393.781 +  $B$K$h$k%Q%9%U%l!<%:$N3JG<$rK:$l$F$$$k$N$+$b$7$l$^$;$s!#(B
 393.782 +
 393.783 +\item $BA[Dj$7$F$$$k$b$N$H$OJL$J80$N%Q%9%U%l!<%:$r3JG<$7$F$$$k$N$+$b$7$l$^$;$s!#(B
 393.784 +
 393.785 +\end{itemize}
 393.786 +
 393.787 +$B%5!<%PB&%f!<%6$N%Q%9%o!<%I$NLd$$9g$o$;$,$"$C$?>l9g!"(B
 393.788 +$BJL$JLdBj$N2DG=@-$r8!F$$9$kI,MW$,$"$j$^$9!#(B
 393.789 +
 393.790 +\begin{itemize}
 393.791 +\item $B%5!<%PB&%f!<%6$N!"%[!<%`%G%#%l%/%H%j$J$$$7(B
 393.792 +  \sdirname{.ssh} $B%G%#%l%/%H%j$N8"8B@_Dj$,!"(B
 393.793 +  $B2aEY$K4K$/@_Dj$5$l$F$$$k$N$+$b$7$l$^$;$s!#(B
 393.794 +  ssh $B%5!<%P%W%m%;%9$O$=$N>l9g!"(B
 393.795 +  \sfilename{authorized\_keys}
 393.796 +  $B%U%!%$%k$N?.Mj@-$,Dc$$$b$N$H$7$FFI$_9~$_$r9T$$$^$;$s!#(B
 393.797 +  $BNc$($P!"(B
 393.798 +  $B%[!<%`%G%#%l%/%H%j$J$$$7(B \sdirname{.ssh} $B%G%#%l%/%H%j$,!"(B
 393.799 +  $B%0%k!<%W$KBP$9$k=q$-9~$_8"8B$r@_Dj$5$l$F$$$k>l9g!"(B
 393.800 +  $B%Q%9%o!<%ILd$$9g$o$;$,9T$o$l$k!"$H$$$C$?>I>u$,8+$i$l$^$9!#(B
 393.801 +
 393.802 +\item \sfilename{authorized\_keys} 
 393.803 +  $B%U%!%$%k$=$N$b$N$KLdBj$,$"$k2DG=@-$b$"$j$^$9!#(B
 393.804 +  $B$3$N%U%!%$%k$X$N=q$-9~$_8"8B$,=jM-<T0J30$K$b@_Dj$5$l$F$$$k>l9g!"(B
 393.805 +  ssh $B%5!<%P%W%m%;%9$O%U%!%$%k$N?.Mj@-$,Dc$$$b$N$H$7$FFI$_9~$_$r9T$$$^$;$s!#(B
 393.806 +
 393.807 +\end{itemize}
 393.808 +
 393.809 +$B0J2<$N%3%^%s%I<B9T$KBP$7$F!"(B
 393.810 +$B!J%5!<%PB&$N!K8=:_;~9o$rI=<($9$k#19T$@$1$,=PNO$5$l$k!"(B
 393.811 +$B$H$$$&>uBV$,M}A[E*$G$9!#(B
 393.812 +
 393.813 +\begin{codesample2}
 393.814 +  ssh myserver date
 393.815 +\end{codesample2}
 393.816 +
 393.817 +$B>e5-$N$h$&$JHsBPOCE*$J%3%^%s%I<B9T$N>l9g$K$b!"(B
 393.818 +$B%P%J!<I=<($d$=$l$KN`$9$kI=<($,9T$o$l$k$h$&$J@_Dj$,!"(B
 393.819 +$BO"7H@h%5!<%PB&$G9T$o$l$F$$$k>l9g$K$O!"(B
 393.820 +$B$3$N@h$N<j=g$K?J$`A0$K!"(B
 393.821 +$BBPOCE*$J<B9T(B\footnote{$BLuCm(B: $B!V(Bssh $B$K$h$k%m%0%$%s;~!W$N0U(B}$B$N;~$K$N$_!"(B
 393.822 +$B$3$l$i$,I=<($5$l$k$h$&$K@_DjJQ99$7$F$/$@$5$$!#(B
 393.823 +$B$3$l$rBU$k$H!"(B
 393.824 +$B%P%J!<Ey$NI=<($,(B Mercurial $B$N=PNO$r:.Mp$5$;$F$7$^$$$^$9!#(B
 393.825 +$B99$KLdBj$J$3$H$K!"(B
 393.826 +$B%P%J!<Ey$NI=<($O(B Mercurial $B%3%^%s%I$N1s3V<B9T$K$*$1$k@x:_E*$JLdBj$H@.$jF@$^$9!#(B
 393.827 +$BHsBPOCE*$J(B \command{ssh} $BO"7H$K$*$$$F!"(B
 393.828 +Mercurial $B$O6KNO%P%J!<Ey$NI=<($N8!CN$J$i$S$KL5;k$KEX$a$^$9$,!"(B
 393.829 +$BI,$:$7$bA4$F$,L5;k$G$-$k$o$1$G$O$"$j$^$;$s(B
 393.830 +$B!J%5!<%PB&$G%m%0%$%s;~<B9T%9%/%j%W%H$r%+%9%?%^%$%:$9$k>l9g!"(B
 393.831 +\Verb|tty -s| $B%3%^%s%I$NLa$jCM$rH=Dj$9$k$3$H$G!"(B
 393.832 +$BEv3:%9%/%j%W%H$,8=:_BPOC%7%'%k$G<B9T$5$l$F$$$k$+H]$+$rH=Dj$9$k$3$H$,$G$-$^$9!K(B
 393.833 +\footnote{$BLuCm(B: $B%m%0%$%s%9%/%j%W%H$G$N=PNO0J30$G$b!"(B
 393.834 +$B%U%C%/<B9T;~$KI8=`=PNO$KBP$7$F2?$i$+$NI=<($,$"$C$?>l9g!"(B
 393.835 +Mercurial $B$O!VO"7H$K$*$1$kA[Dj30$N%G!<%?<x<u!W$H$_$J$9$?$a!"(B
 393.836 +$BCm0U$,I,MW$G$9!#(B}$B!#(B
 393.837 +
 393.838 +$BAG$N(B ssh $B$K$h$k%5!<%PO"7H$,5!G=$9$k$3$H$r3NG'$7$?$J$i$P!"(B
 393.839 +$B<!$K3NG'$9$k$N$O!"(B
 393.840 +$B%5!<%PB&$G$N(B Mercurial $B<B9T$N2DH]$G$9!#(B
 393.841 +$B0J2<$N%3%^%s%I<B9T$,@5$7$/5!G=$9$k$3$H$r3NG'$7$F$/$@$5$$!#(B
 393.842 +
 393.843 +\begin{codesample2}
 393.844 +  ssh myserver hg version
 393.845 +\end{codesample2}
 393.846 +
 393.847 +$BDL>o$N(B \hgcmd{version} $B=PNO$G$O$J$/%(%i!<%a%C%;!<%8$,I=<($5$l$k>l9g!"(B
 393.848 +$BBg35$O(B \dirname{/usr/bin} $B$K(B
 393.849 +Mercurial $B$,%$%s%9%H!<%k$5$l$F$$$J$$$3$H$,860x$G$9!#(B
 393.850 +$B$=$N>l9g$G$b!"(B
 393.851 +$BI,$:$7$b(B \dirname{/usr/bin} $B$K%$%s%9%H!<%k$9$kI,MW$O$"$j$^$;$s!#(B
 393.852 +$B$7$+$7!"9M$(F@$k0J2<$N4v$D$+$N860x$K4X$7$F3NG'$,I,MW$G$9!#(B
 393.853 +
 393.854 +\begin{itemize}
 393.855 +\item Mercurial $B$OK\Ev$K%5!<%P$K%$%s%9%H!<%k$5$l$F$$$^$9$+!)(B
 393.856 +  $BJQ$J<ALd$H;W$o$l$k$+$b$7$l$^$;$s$,!"$3$l$OHs>o$K=EMW$J3NG';v9`$G$9!#(B
 393.857 +
 393.858 +\item $B%7%'%k$N%3%^%s%I%5!<%A%Q%9!JDL>o$O(B \envar{PATH} $B4D6-JQ?t$G@_Dj!K(B
 393.859 +  $B$N@_Dj$,C1$KITE,@Z$J$N$+$b$7$l$^$;$s!#(B
 393.860 +
 393.861 +\item $B$R$g$C$H$7$?$i!"(B\envar{PATH} $B4D6-JQ?t$,(B 
 393.862 +  \command{hg} 
 393.863 +  $B%3%^%s%I$N3JG<>l=j$r;X$9$h$&$K@_Dj$5$l$k$N$OBPOCE*$J%m%0%$%s;~$K$N$_!"(B
 393.864 +  $B$H$$$&2DG=@-$b$"$j$^$9!#(B
 393.865 +  \envar{PATH} $B4D6-JQ?t$N@_Dj$rITE,Ev$J5/F0%9%/%j%W%H$G9T$C$F$$$k>l9g$K!"(B
 393.866 +  $B$3$N$h$&$J8=>]$,H/@8$7$^$9!#(B
 393.867 +  $B3F<+$N;HMQ$7$F$$$k%7%'%k$N%I%-%e%a%s%H$r3NG'$7$F$_$^$7$g$&(B\footnote{$BLuCm(B:
 393.868 +  $BNc$($P(B bash $B$N>l9g!"BPOCE*%m%0%$%s$+H]$+$G(B
 393.869 +  \sfilename{.bashrc}$B!"(B
 393.870 +  \sfilename{.bash\_profile}$B!"(B
 393.871 +  \sfilename{.profile} $B$*$h$S(B
 393.872 +  \sfilename{.login} $B$H$$$C$?3F%U%!%$%k$NFI$_9~$_$NM-L5$,JQ2=$7$^$9!#(B
 393.873 +  $B$^$?!"%G%#%9%H%j%S%e!<%7%g%s$K$h$C$F$O!"(B
 393.874 +  $BHsBPOCE*$J<B9T$N:]$K$O!"(B
 393.875 +  \dirname{/etc/bashrc} $B$K$h$k(B
 393.876 +  \dirname{/etc/profile.d} 
 393.877 +  $BG[2<$N@_Dj%U%!%$%kFI$_9~$_$,9T$o$l$J$$>l9g$,$"$j$^$9(B
 393.878 +  $B!J(B2.6.x $B7O%+!<%M%k%Y!<%9$N$b$N$OFI$_9~$^$J$$J}?K$NLOMM!K$N$G!"(B
 393.879 +  \envar{PYTHONPATH} $B$N7o$b4^$a$F!"(B
 393.880 +  $B%7%9%F%`%o%$%I$J@_Dj$r9T$&J}$OCm0U$,I,MW$G$9!#(B
 393.881 +  \Verb|ssh myserver env| 
 393.882 +  $B<B9T$G=PNO$5$l$k4D6-JQ?t0lMw$r3NG'$7$F$_$^$7$g$&!#(B
 393.883 +  }$B!#(B
 393.884 +
 393.885 +\item \envar{PYTHONPATH} $B4D6-JQ?t$K$h$k(B
 393.886 +  Mercurial $B$N(B Python 
 393.887 +  $B%b%8%e!<%k3JG<%G%#%l%/%H%j$N;2>H$,I,MW$G$"$k%1!<%9$b$"$j$^$9!#(B
 393.888 +  $BITE,@Z$J@_Dj$@$C$?$j!"BPOCE*%m%0%$%s;~$K$N$_@_Dj$5$l$F$$$k2DG=@-$,$"$j$^$9!#(B
 393.889 +
 393.890 +\end{itemize}
 393.891 +
 393.892 +ssh $B7PM3$G$N(B \hgcmd{version} $B%3%^%s%I<B9T$,@.8y$7$?$J$i=`Hw$O40N;$G$9!#(B
 393.893 +$B%5!<%P!&%/%i%$%"%s%H$O6&$KLdBj2r7h:Q$_$H$J$j$^$7$?!#(B
 393.894 +$B%5!<%P>e$G8x3+$5$l$F$$$k(B $B%j%]%8%H%j$K!"(B
 393.895 +$BEv3:%f!<%6L>$K$h$k(B Mercurial $B$G$N%"%/%;%9$,2DG=$K$J$C$F$$$kH&$G$9!#(B
 393.896 +$B$3$3$^$G$N3NG'$r%/%j%"$7$?>e$G!"(B
 393.897 +Mercurial $B$H(B ssh $B$NO"7H$K$*$$$FLdBj$,H/@8$7$?>l9g!"(B
 393.898 +$BLdBjH/@8$N>u67$r$h$jL@3N$K$9$k$?$a$K!"(B
 393.899 +\hggopt{--debug} $B%*%W%7%g%s$rIU$1$F$N<B9T$r;n$7$F$_$F$/$@$5$$!#(B
 393.900 +
 393.901 +\subsection{Using compression with ssh}
 393.902 +
 393.903 +ssh $B%W%m%H%3%k$r;HMQ$9$k>l9g!"(B
 393.904 +ssh $B%W%m%H%3%k<+?H$,DL?.;~$K%G!<%?05=L$r9T$&$?$a!"(B
 393.905 +Mercurial $B$O05=L$r9T$$$^$;$s!#(B
 393.906 +$B$7$+$7!"(Bssh $B%/%i%$%"%s%H$N!JDL>o$N!K4pDlF0:n$G$O!"(B
 393.907 +$B05=L$r(B\emph{$B9T$$$^$;$s(B}$B!#(B
 393.908 +
 393.909 +$B9bB.$J(B LAN $B$N>l9g$r=|$1$P!JL5@~%M%C%H%o!<%/$G$"$C$F$b!K!"(B
 393.910 +$BDL?.;~$N05=L$O(B Mercurial 
 393.911 +$B$N%M%C%H%o!<%/7PM3$N=hM}$r82Cx$K9bB.2=$7$^$9!#(B
 393.912 +$BNc$($P(B WAN $B7PM3$G$NO"7H$N>l9g!"(B
 393.913 +$B$+$J$jBg$-$J%j%]%8%H%j$NJ#@=$KMW$9$k;~4V$,(B 51 $BJ,$+$i(B 17 $BJ,$KDc8:$7$?!"(B
 393.914 +$B$H$N@-G=7WB,Js9p$b$"$j$^$9!#(B
 393.915 +
 393.916 +\command{ssh} $B$H(B \command{plink} $B$NN>J}$H$b!"(B
 393.917 +$BDL?.;~05=L$rM-8z2=$9$k(B
 393.918 +\cmdopt{ssh}{-C} $B%*%W%7%g%s$r<u$1IU$1$^$9!#(B
 393.919 +\hgrc\ $B%U%!%$%k$r0J2<$N$h$&$KJT=8$9$k$3$H$G!"(B
 393.920 +ssh $B%W%m%H%3%kMxMQ$N:]$K>o$K05=L$r9T$&$h$&$K(B Mercurial $B$KBP$7$F;XDj$G$-$^$9!#(B
 393.921 +
 393.922 +\begin{codesample2}
 393.923 +  [ui]
 393.924 +  ssh = ssh -C
 393.925 +\end{codesample2}
 393.926 +
 393.927 +\command{ssh} $B$r;HMQ$7$F$$$k>l9g$O!"(B
 393.928 +$BO"7H@h%5!<%P$H$NDL?.$N:]$K$O>o$K05=L$r9T$&$h$&$K@_Dj$9$k$3$H$b$G$-$^$9!#(B
 393.929 +$B$3$N@_Dj$r9T$&$K$O!"(B
 393.930 +$B%[!<%`%G%#%l%/%H%jG[2<$N(B
 393.931 +\sfilename{.ssh/config} $B%U%!%$%k(B
 393.932 +$B!JL5$$>l9g$O?75,$K:n@.$7$^$9!K$K0J2<$N$h$&$K5-=R$7$^$9!#(B
 393.933 +
 393.934 +\begin{codesample2}
 393.935 +  Host hg
 393.936 +    Compression yes
 393.937 +    HostName hg.example.com
 393.938 +\end{codesample2}
 393.939 +
 393.940 +$B>e5-$N5-=R$O!"(B
 393.941 +\texttt{hg} $B$H$$$&JLL>!J(Balias$B!K$r:n@.$7$^$9!#(B
 393.942 +\command{ssh} $B<B9T$N:]$N%3%^%s%I9T5-=R$d!"(B
 393.943 +Mercurial $B$N(B \texttt{ssh} $B%W%m%H%3%k$K$*$1$k(B URL $B$H$7$F!"(B
 393.944 +\texttt{hg} $B$r!J%[%9%HL>$H$7$F!K;HMQ$7$?>l9g!"(B
 393.945 +\command{ssh} $B$ODL?.;~05=L$r9T$$$D$D(B \texttt{hg.example.com} $B$K@\B3$7$^$9!#(B
 393.946 +$B$3$N@_Dj$K$h$j!"(B
 393.947 +$BF~NO$NJXMx$J>JN,L>$H!"05=L;XDj$NN>J}$r<j$K$9$k$3$H$,$G$-$^$9!#(B
 393.948 +
 393.949 +\section{Serving over HTTP using CGI}
 393.950 +\label{sec:collab:cgi}
 393.951 +
 393.952 +$B0U5$9~$_<!Bh$G$O!"(B
 393.953 +Mercurial $B$N(B CGI $B%$%s%?%U%'!<%9$N@_Dj$O!"(B
 393.954 +$B?tJ,$N$b$N$r?t;~4V$K$7$F$7$^$&2DG=@-$,$"$j$^$9!#(B
 393.955 +
 393.956 +$B:G$bC1=c$JNc$+$i=i$a$F!"(B
 393.957 +$B$h$jJ#;($J@_Dj$X$H8~$1$F?J$a$F$f$-$^$7$g$&!#(B
 393.958 +$B:G$b4pK\E*$J%1!<%9$G$9$i!"(B
 393.959 +$B%&%'%V%5!<%P$N@_Dj%U%!%&%k$NFI$_=q$-$r9T$&I,MW$,=P$F$/$k$3$H$G$7$g$&!#(B
 393.960 +
 393.961 +\begin{note}
 393.962 +  $B%&%'%V%5!<%P$N@_Dj$OJ#;($G!"07$$$K$/$/!"3n$D%7%9%F%`0MB8@-$N9b$$:n6H$G$9!#(B
 393.963 +  $B$=$N$?$aK\=q$G$O!"(B
 393.964 +  $BH/@8$9$k$G$"$m$&LdBj$N%1!<%9$rA4$FLVMe$9$k$h$&$J<j=g$r<($9$3$H$,$G$-$^$;$s!#(B
 393.965 +  $B0J9_$N5-=R$O!"?5=E$5$H3F<+$NH=CG$r$b$C$FFI$_?J$a$k$h$&$K$7$F$/$@$5$$!#(B
 393.966 +  $BBt;34V0c$($?$j!"%5!<%P$N%(%i!<%m%02r@O$K;~4V$rHq$d$93P8g$,I,MW$G$7$g$&!#(B
 393.967 +\end{note}
 393.968 +
 393.969 +\subsection{Web server configuration checklist}
 393.970 +
 393.971 +$BFI$_?J$a$kA0$K!"(B
 393.972 +$B%7%9%F%`$N@_Dj>u67$K4X$9$k4v$D$+$N3NG'$r9T$$$^$7$g$&!#(B
 393.973 +
 393.974 +\begin{enumerate}
 393.975 +\item $B%&%'%V%5!<%P$O%$%s%9%H!<%k$5$l$F$$$^$9$+!)(B
 393.976 +  Mac OS X $B$O(B Apache $B$,%$%s%9%H!<%k$5$l$?>uBV$G=P2Y$5$l$^$9$,!"(B
 393.977 +  $BB?$/$N%7%9%F%`$G$O%&%'%V%5!<%P$O%$%s%9%H!<%k$5$l$F$$$^$;$s!#(B
 393.978 +
 393.979 +\item $B%&%'%V%5!<%P$,%$%s%9%H!<%k$5$l$F$$$k>l9g!"(B
 393.980 +  $B$=$l$O<B:]$K2TF0$7$F$$$^$9$+!)(B
 393.981 +  $B%&%'%V%5!<%P$,%$%s%9%H!<%k$5$l$F$$$?>l9g$G$b!"(B
 393.982 +  $BB?$/$N%7%9%F%`$N4pDl>uBV$O!"%&%'%V%5!<%P$,L58z2=$5$l$F$$$^$9!#(B
 393.983 +
 393.984 +\item CGI $B$r2TF0$5$;$h$&$H$7$F$$$k%G%#%l%/%H%j$O!"(B
 393.985 +  $B%&%'%V%5!<%P$N@_Dj$G(B CGI $B$N<B9T$,5v2D$5$l$F$$$^$9$+!)(B
 393.986 +  $BB?$/$N%&%'%V%5!<%P$N4pDl>uBV$O!"(B
 393.987 +  CGI $B%W%m%0%i%`$N<B9T5!G=$,L@<(E*$KL58z2=$5$l$F$$$^$9!#(B
 393.988 +
 393.989 +\end{enumerate}
 393.990 +
 393.991 +$B%&%'%V%5!<%P$,%$%s%9%H!<%k$5$l$F$$$J$$>l9g$d!"(B
 393.992 +Apache $B%&%'%V%5!<%P$N@_Dj7P83$,$"$^$jL5$$>l9g$K$O!"(B
 393.993 +Apache $B%&%'%V%5!<%P$NBe$o$j$K(B
 393.994 +\texttt{lighttpd} $B%&%'%V%5!<%P$NMxMQ$r$*A&$a$7$^$9!#(B
 393.995 +Apache $B%&%'%V%5!<%P$N@_Dj$O!"(B
 393.996 +$B6E$C$F$$$F3n$D$o$+$j$K$/$$$H$$$&I>H=$K8+9g$&$b$N$,$"$j$^$9!#(B
 393.997 +\texttt{lighttpd} $B$O(B Apache $B%&%'%V%5!<%PDx$N5!G=$OL5$$$b$N$N!"(B
 393.998 +$BB-$j$J$$5!G=$NKX$I$,(B Mercurial $B%j%]%8%H%j$N1?MQ$K$O4X78$J$$$b$N$G$9!#(B
 393.999 +$B$=$l$K2C$($F!"(B
393.1000 +$BL@$i$+$K(B \texttt{lighttpd} $B$O(B
393.1001 +Apache $B%&%'%V%5!<%P$h$j$b4JC1$KMxMQ$,3+;O$G$-$^$9!#(B
393.1002 +
393.1003 +\subsection{Basic CGI configuration}
393.1004 +
393.1005 +Unix $BE*$J%7%9%F%`$rMxMQ$7$F$$$k>l9g!"(B
393.1006 +$B%&%'%V%Z!<%8$H$7$F8x3+$9$k$?$a$N(B
393.1007 +\dirname{public\_html} $B$N$h$&$J%G%#%l%/%H%j$r!"(B
393.1008 +$B%[!<%`%G%#%l%/%H%jG[2<$K;}$D$N$,6&DLG'<1$H$J$C$F$$$^$9!#(B
393.1009 +$B$3$N%G%#%l%/%H%jD>2<$KCV$$$?(B
393.1010 +\filename{foo} $B$H$$$&L>A0$N%U%!%$%k$O!"(B
393.1011 +\texttt{http://www.example.com/\~username/foo} $B$H$$$&(B
393.1012 +URL $B$G;2>H2DG=$K$J$j$^$9!#(B
393.1013 +
393.1014 +$B@_Dj$r;O$a$k$KEv$?$C$F!"(B
393.1015 +Mercurial $B$N%$%s%9%H!<%k@h$K3JG<$5$l$F$$$k(B
393.1016 +\sfilename{hgweb.cgi} $B%9%/%j%W%H$N=j:_$r3NG'$7$F$/$@$5$$!#(B
393.1017 +$B%7%9%F%`>e$N=j:_$,$9$0$K$O$o$+$i$J$+$C$?>l9g$O!"(B
393.1018 +Mercurial $B$N%^%9%?!<%j%]%8%H%j$+$i(B
393.1019 +\url{http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi}
393.1020 +$B$rD>@\%@%&%s%m!<%I$7$F$/$@$5$$!#(B
393.1021 +
393.1022 +$B>e5-%9%/%j%W%H$r(B
393.1023 +\dirname{public\_html} $BG[2<$KG[CV$7!"(B
393.1024 +$B<B9T2DG=$H$J$k$h$&$K8"8B@_Dj$r9T$$$^$9!#(B
393.1025 +
393.1026 +\begin{codesample2}
393.1027 +  cp .../hgweb.cgi ~/public_html
393.1028 +  chmod 755 ~/public_html/hgweb.cgi
393.1029 +\end{codesample2}
393.1030 +
393.1031 +\command{chmod} $B%3%^%s%I$X$N(B \texttt{755} $B0z?t;XDj$O!"(B
393.1032 +$B%9%/%j%W%H$K<B9T2DG=8"8B$rIUM?$9$k0J>e$NIU2CE*$J;XDj$r0UL#$7$^$9!#(B
393.1033 +$B$3$N@_Dj$K$h$j!"%9%/%j%W%H$,C/$+$i$b<B9T2DG=$K$J$k$HF1;~$K!"(B
393.1034 +``group'' $B$*$h$S(B ``other'' $B$K$h$k=q$-9~$_8"8B$,(B\emph{$BGmC%(B}$B$5$l$^$9!#(B
393.1035 +$B$3$l$i$N=q$-9~$_8"8B$rM-8z$J$^$^$K$7$?>l9g!"(B
393.1036 +Apache $B$N(B \texttt{suexec} $B%5%V%7%9%F%`$O!"(B
393.1037 +$B$*$=$i$/%9%/%j%W%H$N<B9T$r5qH]$9$k$G$7$g$&!#(B
393.1038 +$B<B$N$H$3$m(B \texttt{suexec} $B$O!"(B
393.1039 +$B%9%/%j%W%H$,G[CV$5$l$F$$$k(B\emph{$B%G%#%l%/%H%j(B}$B$KBP$9$k(B
393.1040 +``group'' $B$*$h$S(B ``other'' $B$K$h$k=q$-9~$_8"8B$,GmC%$5$l$F$$$k$3$H$bMW5a$7$^$9!#(B
393.1041 +
393.1042 +\begin{codesample2}
393.1043 +  chmod 755 ~/public_html
393.1044 +\end{codesample2}
393.1045 +
393.1046 +\subsubsection{What could \emph{possibly} go wrong?}
393.1047 +\label{sec:collab:wtf}
393.1048 +
393.1049 +CGI $B$rG[CV$7$?$J$i$P!"(B
393.1050 +$B%&%'%V%V%i%&%6$r5/F0$7$F(B
393.1051 +\url{http://myhostname/~myuser/hgweb.cgi} $B$KAjEv$9$k(B
393.1052 +URL $B$K%"%/%;%9$7$F$_$^$7$g$&!#(B
393.1053 +$BC"$7!"$A$g$C$H$7$?<:GT$K$O(B\emph{$B?H9=$($F$*$$$F$/$@$5$$(B}$B!#(B
393.1054 +$B=jK>$N(B URL $B$X$N%"%/%;%9$,<:GT$9$k8x;;$OHs>o$K9b$/!"(B
393.1055 +$B$=$NM}M3$OB?4t$KEO$j$^$9!#(B
393.1056 +$B<B:]$N$H$3$m!"(B
393.1057 +$B0J2<$N5/$3$jF@$k%(%i!<MW0x$NA4$F$Gm5$/2DG=@-$,$"$j$^$9$+$i!"(B
393.1058 +$B$3$N@h$OCm0U?<$/FI$_?J$a$F$/$@$5$$!#(B
393.1059 +$B0J2<$G=R$Y$kLdBj$O!"(B
393.1060 +$B$^$C$5$i$J>uBV$+$i%$%s%9%H!<%k$7$?(B Apache $B$r;H$$!"(B
393.1061 +$B$3$N<BNc$r9T$&$?$a$K?7$?$K@8@.$7$?%f!<%6%"%+%&%s%H$G!"(B
393.1062 +Fedora~7 $B>e$G:n6H$r<B;\$7$?:]$K!"(B
393.1063 +$BI.<T$,<B:]$KD>LL$7$?A4$F$NLdBj$G$9!#(B
393.1064 +
393.1065 +$B;HMQ$7$F$$$k%&%'%V%5!<%P$O!"(B
393.1066 +$B%f!<%6Kh$N%G%#%l%/%H%j$rL58z2=$7$F$$$k$+$b$7$l$^$;$s!#(B
393.1067 +Apache $B$r;HMQ$7$F$$$k>l9g$O!"(B
393.1068 +$B@_Dj%U%!%$%kCf$K(B \texttt{UserDir} $B;XDj$NM-L5$r3NG'$7$F$/$@$5$$!#(B
393.1069 +$B$3$N;XDj$,L5$$>l9g!"%f!<%6Kh%G%#%l%/%H%j$OL58z$K$J$j$^$9!#(B
393.1070 +$B;XDj$,M-$C$F$b(B\texttt{$BL58z2=$5$l$F$$$k(B}$B>l9g$b!"(B
393.1071 +$B%f!<%6Kh%G%#%l%/%H%j$OL58z$K$J$j$^$9!#(B
393.1072 +$BM-8z$J(B \texttt{UserDir} $B;XDj$,$"$k>l9g!"(B
393.1073 +\texttt{UserDir} $B;XDj$G5-=R$5$l$F$$$kJ8;zNs(B
393.1074 +$B!JNc$($P(B \dirname{public\_html}$B!K$,!"(B
393.1075 +$B%[!<%`%G%#%l%/%H%jD>2<$G(B Apache $B$,;2>H$9$k%5%V%G%#%l%/%H%jL>$K$J$j$^$9!#(B
393.1076 +
393.1077 +$B%U%!%$%k$N%"%/%;%98"8B$,87$7$9$.$k2DG=@-$b$"$j$^$9!#(B
393.1078 +$B%&%'%V%5!<%P$O!"(B
393.1079 +$BBP>]$H$J$k%f!<%6$N%[!<%`%G%#%l%/%H%j!"(B
393.1080 +$B$*$h$S(B \dirname{public\_html} 
393.1081 +$BG[2<$N%U%!%$%k!&%G%#%l%/%H%j$NFI$_9~$_$,$G$-$J$1$l$P$J$j$^$;$s!#(B
393.1082 +$BE,@Z$J8"8B@_Dj$r9T$&$?$a$N4JC1$J<j=g$r0J2<$K<($7$^$9!#(B
393.1083 +
393.1084 +\begin{codesample2}
393.1085 +  chmod 755 ~
393.1086 +  find ~/public_html -type d -print0 | xargs -0r chmod 755
393.1087 +  find ~/public_html -type f -print0 | xargs -0r chmod 644
393.1088 +\end{codesample2}
393.1089 +
393.1090 +$B8"8B@_Dj$K4X$9$kB>$NMW0x$N2DG=@-$,$"$k>l9g$O!"(B
393.1091 +$B%V%i%&%6$G$N=jK>$N(B URL $B%"%/%;%9;~$K!"(B
393.1092 +$B40A4$K6u$N2hLL$,I=<($5$l$k$3$H$G$7$g$&!#(B
393.1093 +$B$3$N>l9g$O!"$*$=$i$/%"%/%;%98"8B$,(B\emph{$B4K$9$.$k(B}$B$N$G$7$g$&!#(B
393.1094 +$BNc$($P(B Apache $B$N(B \texttt{suexec} $B%5%V%7%9%F%`$O!"(B
393.1095 +group $B$J$$$7(B other $B$K=q$-9~$_8"8B$,IUM?$5$l$?%9%/%j%W%H$O<B9T$7$^$;$s!#(B
393.1096 +
393.1097 +$B;HMQ$7$F$$$k%&%'%V%5!<%P$,!"(B
393.1098 +$B%f!<%6Kh%G%#%l%/%H%jG[2<$N(B CGI $B%W%m%0%i%`$N<B9T$r!"(B
393.1099 +$B6X;_$9$k$h$&$K@_Dj$5$l$F$$$k2DG=@-$bM-$j$^$9!#(B
393.1100 +$BI.<T$N(B Fedora~7 $B%7%9%F%`$K$*$1$k(B Apache $B$N!"(B
393.1101 +$B=i4|>uBV$N%f!<%6Kh@_Dj$r0J2<$K<($7$^$9!#(B
393.1102 +
393.1103 +\begin{codesample2}
393.1104 +  <Directory /home/*/public_html>
393.1105 +      AllowOverride FileInfo AuthConfig Limit
393.1106 +      Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
393.1107 +      <Limit GET POST OPTIONS>
393.1108 +          Order allow,deny
393.1109 +          Allow from all
393.1110 +      </Limit>
393.1111 +      <LimitExcept GET POST OPTIONS>
393.1112 +          Order deny,allow
393.1113 +          Deny from all
393.1114 +      </LimitExcept>
393.1115 +  </Directory>
393.1116 +\end{codesample2}
393.1117 +
393.1118 +$BBP>]$H$J$k(B Apache $B@_Dj%U%!%$%kCf$K;w$?$h$&$J(B
393.1119 +\texttt{Directory} $B@_Dj$,$"$k>l9g!"(B
393.1120 +\texttt{Options} $B;XDj$KCmL\$7$F$/$@$5$$!#(B
393.1121 +\texttt{ExecCGI} $B$,;XDj$5$l$F$$$J$$>l9g$O0lMwKvHx$K$3$l$rDI2C$7!"(B
393.1122 +$B%&%'%V%5!<%P$r:F5/F0$7$F$/$@$5$$!#(B
393.1123 +
393.1124 +Apache $B$,(B CGI $B$r<B9T$9$k$N$G$O$J$/!"(B
393.1125 +CGI $B%9%/%j%W%H$NFbMF$=$N$b$N$rJV5Q$7$F$-$?>l9g$O!"(B
393.1126 +$B0J2<$N5-=R$r!J4{$K5-=R$,$"$k$J$i$P!KM-8z2=$9$k$J$jDI2C$9$k$J$j$7$F$/$@$5$$!#(B
393.1127 +
393.1128 +\begin{codesample2}
393.1129 +  AddHandler cgi-script .cgi
393.1130 +\end{codesample2}
393.1131 +
393.1132 +$B<!$KLdBj$NH/@8$7F@$k%1!<%9$G$O!"(B
393.1133 +Python $B$N%P%C%/%H%l!<%9$,I=<($5$l!"(B
393.1134 +\texttt{mercurial} $B4XO"%b%8%e!<%k$,%$%s%]!<%H(B
393.1135 +$B!J(Bimport$B!K$G$-$J$$;]$rEA$($F$$$k$3$H$G$7$g$&!#(B
393.1136 +$B=jK>$N7k2L$OF@$i$l$F$$$^$;$s$,!"(B
393.1137 +$B%&%'%V%5!<%P$O(B CGI $B%9%/%j%W%H$N<B9T$r9T$&$h$&$K$J$C$?$N$G!"(B
393.1138 +$B@hDx$N>uBV$+$i$OA0?J$7$F$$$^$9!*(B
393.1139 +$B%$%s%]!<%H$,$G$-$J$$;]$N%(%i!<$O!"(B
393.1140 +$B%7%9%F%`%o%$%I$GMxMQ2DG=$J(B Mercurial $B$G$O$J$/!"(B
393.1141 +$B$*$=$i$/8D?ME*$K%$%s%9%H!<%k$7$?(B Mercurial 
393.1142 +$B$r<B9T$7$F$$$k>l9g$K$N$_H/@8$7$^$9!#(B
393.1143 +$B%&%'%V%5!<%P$,(B CGI $B%W%m%0%i%`$r<B9T$9$k>l9g!"(B
393.1144 +$B3F8D?M$NBPOCE*%m%0%$%s%;%C%7%g%s$G<B;\$5$l$F$$$k4D6-JQ?t;XDj$,L5$$!"(B
393.1145 +$B$H$$$&$3$H$rK:$l$J$$$G$/$@$5$$!#(B
393.1146 +$B$3$N%(%i!<$,H/@8$7$?>l9g$O!"(B
393.1147 +\envar{PYTHONPATH} $B4D6-JQ?t@_Dj$,E,@Z$K$J$k$h$&$K(B
393.1148 +\sfilename{hgweb.cgi} $B$N5-=R$rJT=8$7$F$/$@$5$$!#(B
393.1149 +
393.1150 +$B:G=*E*$K!"(B
393.1151 +\dirname{/path/to/repository} $B$,8+$D$+$i$J$$;]$rEA$($k(B
393.1152 +Python $B$N%P%C%/%H%l!<%9$,(B\emph{$B3N<B$K(B}$BI=<($5$l$k$3$H$G$7$g$&!#(B
393.1153 +\sfilename{hgweb.cgi} $B%9%/%j%W%H$rJT=8$7$F!"(B
393.1154 +$BJ8;zNs(B \dirname{/path/to/repository} 
393.1155 +$B$r<B:]$K8x3+$7$?$$%j%]%8%H%j$X$N@dBP%Q%9$GCV$-49$($F$/$@$5$$!#(B
393.1156 +
393.1157 +$B$3$3$^$GMh$l$P!"(B
393.1158 +$B%&%'%V%V%i%&%6$G%Z!<%8$r%j%m!<%I$7$?:]$K!"(B
393.1159 +$Be:No$K(B HTML $B$G@07A$5$l$?%j%]%8%H%jMzNr$NI=<($r8+$k$3$H$,$G$-$kH&$G$9!#(B
393.1160 +$B$*Hh$lMM$G$9!#(B
393.1161 +
393.1162 +\subsubsection{Configuring lighttpd}
393.1163 +
393.1164 +$BE0DlE*$K<B83$9$k$?$a$K!"(B
393.1165 +$B$3$l$^$G(B Apache $B$K4X$7$F@bL@$7$?$N$HF1MM$K!"(B
393.1166 +$B6aG/?M5$$,9b$^$C$F$$$k(B \texttt{lighttpd} $B%&%'%V%5!<%P$G!"(B
393.1167 +$BF1$8%j%]%8%H%j$r8x3+$9$k$?$a$N@_Dj5-=R$KD)@o$7$F$_$^$7$?!#(B
393.1168 +Apache $B$K$D$$$F$3$l$^$G35@b$7$F$-$?A4$F$NLdBj$O4{$K9nI~:Q$_$G$9$7!"(B
393.1169 +$B$=$NKX$I$O%&%'%V%5!<%P<BAu$K0MB8$7$^$;$s!#(B
393.1170 +$B7k2L$H$7$F!"(B
393.1171 +$B%U%!%$%k!&%G%#%l%/%H%j$N8"8B@_Dj$,BEEv$G$"$k$3$H$H!"(B
393.1172 +\sfilename{hgweb.cgi} $B%9%/%j%W%H$,E,@Z$K2~JQ:Q$_$G$"$k$3$H$O!"(B
393.1173 +$B$"$kDxEY3N?.$G$-$^$9!#(B
393.1174 +
393.1175 +$B0lC6(B Apache $B$G$N8x3+$K@.8y$7$F$$$l$P!"(B
393.1176 +\texttt{lighttpd} $B$G$N%j%]%8%H%j8x3+$O4JC1(B
393.1177 +$B!J8@$$49$($k$J$i!"(B
393.1178 +\texttt{lighttpd} $B$r;HMQ$9$k>l9g$G$b!"(B
393.1179 +$BA0=R$N(B Apache $B$K4X$9$k@bL@$rFI$`$Y$-$H8@$($^$9(B
393.1180 +$B!K$G$9!#(B
393.1181 +$B=i4|>uBV$G(B
393.1182 +\texttt{mod\_cgi} $B$*$h$S(B \texttt{mod\_userdir} $B$,L58z2=$5$l$F$$$?>l9g!"(B
393.1183 +$B$3$l$i$rM-8z2=$9$k$?$a$K!"(B
393.1184 +$B$^$:$O!"(B
393.1185 +$B@_Dj%U%!%$%k$N(B \texttt{mod\_access} $B%;%/%7%g%s$rJT=8$9$kI,MW$,$"$j$^$9!#(B
393.1186 +$B$=$N8e!"$3$l$i$N%b%8%e!<%k$r@_Dj$9$k$?$a$K!"(B
393.1187 +$B@_Dj%U%!%$%kKvHx$K?t9T$[$IDI2C$7$^$9!#(B
393.1188 +
393.1189 +\begin{codesample2}
393.1190 +  userdir.path = "public_html"
393.1191 +  cgi.assign = ( ".cgi" => "" )
393.1192 +\end{codesample2}
393.1193 +
393.1194 +$B$3$N5-=R$K$h$j!"(B
393.1195 +\texttt{lighttpd} $B$O%f!<%6Kh$N%G%#%l%/%H%j$*$h$S(B CGI $B$rG'<1$7$^$9!#(B
393.1196 +Apache $B$h$j$bA0$K(B
393.1197 +\texttt{lighttpd} $B$N@_Dj$r$7$?$H$7$?$i!"(B
393.1198 +$BKX$I4V0c$$$J$/!"(B
393.1199 +Apache 
393.1200 +$B$N@_Dj$N:]$K7P83$7$?$N$HF1$8%7%9%F%`%l%Y%k$N@_Dj%_%9$rHH$7$?$3$H$G$7$g$&!#(B
393.1201 +$B$7$+$7(B
393.1202 +Apache $B$N;HMQ7P83$,#1#0G/0J>e$"$j!"(B
393.1203 +$B3n$D=i$a$F$N(B \texttt{lighttpd} $B;HMQ$G$O$"$k$b$N$N!"(B
393.1204 +Apache $B$N@_Dj$h$j$b(B \texttt{lighttpd} $B$N$=$l$OCx$7$/MF0W$G$"$k$H;W$o$l$^$9!#(B
393.1205 +
393.1206 +\subsection{Sharing multiple repositories with one CGI script}
393.1207 +
393.1208 +$BC10l$N%j%]%8%H%j$N$_$7$+8x3+$G$-$J$$$H$$$&$N$O!"(B
393.1209 +\sfilename{hgweb.cgi} $B%9%/%j%W%H$NG:$^$7$$@)Ls$G$9!#(B
393.1210 +$BF1$8%9%/%j%W%H(B\footnote{$BLuCm(B: $B87L)$K$O!"(B
393.1211 +$B8x3+BP>]%j%]%8%H%j$N%Q%9$,0[$J$k$N$G$9$,!"(B
393.1212 +$B35$M!VF1$8!W$H8@$C$FNI$$$G$7$g$&!#(B
393.1213 +}$B$r0[$J$kL>A0$GJ#@=$9$k!"(B
393.1214 +$B$H$$$&LLE]$JJ}K!$h$j$O!"(B
393.1215 +\sfilename{hgwebdir.cgi} $B%9%/%j%W%H$N;HMQ$,$*A&$a$G$9!#(B
393.1216 +
393.1217 +\sfilename{hgwebdir.cgi} $B$N@_Dj<j=g$O!"(B
393.1218 +\sfilename{hgweb.cgi} $B$h$j$bB?>/9~$_F~$C$F$$$^$9!#(B
393.1219 +$B$^$:;O$a$K(B
393.1220 +$B%9%/%j%W%H$N%3%T!<$rF~<j$7$^$9!#(B
393.1221 +$B<j6a$KL5$$>l9g$O(B
393.1222 +Mercurial $B$N%^%9%?!<%j%]%8%H%j$+$i(B
393.1223 +\url{http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi}
393.1224 +$B$rD>@\%@%&%s%m!<%I$7$F$/$@$5$$!#(B
393.1225 +
393.1226 +\dirname{public\_html} $BG[2<$K>e5-%9%/%j%W%H$rG[CV$7!"(B
393.1227 +$B<B9T2DG=$H$J$k$h$&$K8"8B@_Dj$r9T$$$^$9!#(B
393.1228 +
393.1229 +\begin{codesample2}
393.1230 +  cp .../hgwebdir.cgi ~/public_html
393.1231 +  chmod 755 ~/public_html ~/public_html/hgwebdir.cgi
393.1232 +\end{codesample2}
393.1233 +
393.1234 +$B4pK\E*$J@_Dj$,:Q$s$@$J$i!"(B
393.1235 +$B%V%i%&%6$G(B \url{http://myhostname/~myuser/hgwebdir.cgi}
393.1236 +$B$K%"%/%;%9$7$F$_$^$7$g$&!#(B
393.1237 +$B6u$N%j%]%8%H%j%j%9%H$,I=<($5$l$kH&$G$9!#(B
393.1238 +$B2?$bI=<($5$l$J$$$+!"%(%i!<%a%C%;!<%8$,I=<($5$l$k>l9g$O!"(B
393.1239 +\ref{sec:collab:wtf}~$B@a$G@bL@$7$?@x:_E*LdBj0lMw$r0lDL$j3NG'$7$F$/$@$5$$!#(B
393.1240 +
393.1241 +\sfilename{hgwebdir.cgi} $B%9%/%j%W%H$O30It@_Dj%U%!%$%k$rI,MW$H$7$^$9!#(B
393.1242 +$B4pDl>uBV$N(B
393.1243 +\sfilename{hgwebdir.cgi} $B%9%/%j%W%H$O!"(B
393.1244 +$B<+?H$HF1$8%G%#%l%/%H%j$K3JG<$5$l$?(B
393.1245 +\sfilename{hgweb.config} $B%U%!%$%k$rFI$_9~$b$&$H$7$^$9!#(B
393.1246 +$B$3$N%U%!%$%k$r@8@.$7!"(B
393.1247 +$BC/$KBP$7$F$bFI$_=P$78"8B$rIUM?$7$J$1$l$P$J$j$^$;$s!#(B
393.1248 +$B$3$N%U%!%$%k$N5-=R7A<0$O!"(B
393.1249 +Windows $B$K$*$1$k(B ``ini'' $B%U%!%$%k$N$=$l$HF1$8$G!"(B
393.1250 +Python $B$N(B
393.1251 +\texttt{ConfigParser}~\cite{web:configparser} 
393.1252 +$B$K$h$j2r@O2DG=$J7A<0$G$9!#(B
393.1253 +
393.1254 +$B:G$b4JC1$K(B \sfilename{hgwebdir.cgi} $B$r@_Dj$9$k$K$O!"(B
393.1255 +\texttt{collections} $B$H$$$&L>A0$N%;%/%7%g%s$r@_Dj$7$F$/$@$5$$!#(B
393.1256 +$B$3$N%;%/%7%g%s$r5-=R$9$k$3$H$G!"(B
393.1257 +$BL>IU$1$?%G%#%l%/%H%jG[2<$N(B\emph{$BA4$F$N(B}$B%j%]%8%H%j$r<+F0E*$K8x3+$7$^$9!#(B
393.1258 +$B$3$N%;%/%7%g%s$N5-=R$O0J2<$N$h$&$K$J$j$^$9!#(B
393.1259 +
393.1260 +\begin{codesample2}
393.1261 +  [collections]
393.1262 +  /my/root = /my/root
393.1263 +\end{codesample2}
393.1264 +
393.1265 +Mercurial $B$O$3$N5-=R$r2r<a$9$k$KEv$?$j!"(B
393.1266 +``\texttt{=}'' 
393.1267 +$B5-9f$N(B\emph{$B1&JU(B}$B$K5-=R$5$l$?%G%#%l%/%H%j3,AX2<$G%j%]%8%H%j$rC5$7!"(B
393.1268 +``\texttt{=}'' $B5-9f$N(B\emph{$B:8JU(B}$B$N%F%-%9%H$K9gCW$9$kItJ,$r!"(B
393.1269 +$B%&%'%V%$%s%?%U%'!<%9$G$N0lMwI=<($G<B:]$K8x3+$5$l$kL>A0$+$i=|30$7$^$9!#(B
393.1270 +$B=|30=hM}$N8e$K;D$C$?%Q%9MWAG$O!"(B``$B2>A[%Q%9(B''$B$H8F$P$l$^$9!#(B
393.1271 +
393.1272 +$BNc$H$7$F(B
393.1273 +\dirname{/my/root/this/repo} $B$K%j%]%8%H%j$,$"$k$H$7$?>l9g!"(B
393.1274 +CGI $B%9%/%j%W%H$OKAF,$N(B
393.1275 +\dirname{/my/root} $BItJ,$rL>A0$+$i=|30$7!"(B
393.1276 +$B2>A[%Q%9$H$7$F(B \dirname{this/repo} $B$r;}$D%j%]%8%H%j$H$7$F8x3+$7$^$9!#(B
393.1277 +CGI $B%9%/%j%W%H$N4pDl(B URL $B$r(B
393.1278 +\url{http://myhostname/~myuser/hgwebdir.cgi} $B$H$9$k$H!"(B
393.1279 +$B$3$N%j%]%8%H%j$N40A4$J(B URL $B$O!"(B
393.1280 +\url{http://myhostname/~myuser/hgwebdir.cgi/this/repo} $B$H$J$j$^$9!#(B
393.1281 +
393.1282 +$B$3$N@_Dj5-=RNc$G$N:8JU$r(B \dirname{/my/root} $B$+$i(B
393.1283 +\dirname{/my} $B$KJQ99$7$?>l9g!"(B
393.1284 +\sfilename{hgwebdir.cgi} $B$O%j%]%8%H%jL>$+$i(B
393.1285 +\dirname{/my} $B$N$_$r#z#yJb30$9$k$N$G!"(B
393.1286 +$B2>A[%Q%9$O(B \dirname{this/repo} $B$G$O$J$/(B
393.1287 +\dirname{root/this/repo} $B$H$J$j$^$9!#(B
393.1288 +
393.1289 +\sfilename{hgwebdir.cgi} $B$O!"(B
393.1290 +$B@_Dj%U%!%$%kCf$N(B \texttt{collections}
393.1291 +$B%;%/%7%g%s$GNs5s$5$l$?8D!9$N%G%#%l%/%H%j$KBP$7$F!"(B
393.1292 +$B:F5"E*$K%j%]%8%H%j$rC5$7$^$9$,!"(B
393.1293 +$B8+$D$+$C$?%j%]%8%H%j$+$i99$K2<$X$N:F5"E*C5:w$O(B\texttt{$B9T$$$^$;$s(B}$B!#(B
393.1294 +
393.1295 +\texttt{collections} $B$N5!9=$O!"(B
393.1296 +$BB?$/$N%j%]%8%H%j$r(B``fire and forget''$B:nK!$G8x3+$9$k$N$KE,$7$F$$$^$9!#(B
393.1297 +CGI $B$d@_Dj%U%!%$%k$N5-=R$O0lEY$G;vB-$j$^$9!#(B
393.1298 +$B@_Dj$,:Q$s$@$J$i!"(B
393.1299 +\sfilename{hgwebdir.cgi} 
393.1300 +$B$KC5:w$r;X<($7$?%G%#%l%/%H%j3,AXG[2<$H$N4V$G%j%]%8%H%j$N0\F0$r9T$&$@$1$G!"(B
393.1301 +$B%j%]%8%H%j$N8x3+!&Hs8x3+$rG$0U$N;~E@$G9T$&$3$H$,$G$-$^$9!#(B
393.1302 +
393.1303 +\subsubsection{Explicitly specifying which repositories to publish}
393.1304 +
393.1305 +\sfilename{hgwebdir.cgi} $B%9%/%j%W%H$O(B
393.1306 +\texttt{collections} $B$K$h$k8x3+$N;EAH$_$K2C$($F!"(B
393.1307 +$BFCDj$N0lMw;XDj$K$h$k%j%]%8%H%j8x3+$r$9$k$3$H$b$G$-$^$9!#(B
393.1308 +$B$3$NJ}K!$G$N8x3+$r$9$k$K$O!"(B
393.1309 +$B0J2<$N$h$&$J7A<0$NFbMF$r;}$D(B
393.1310 +\texttt{paths} $B%;%/%7%g%s$r5-=R$9$kI,MW$,$"$j$^$9!#(B
393.1311 +
393.1312 +\begin{codesample2}
393.1313 +  [paths]
393.1314 +  repo1 = /my/path/to/some/repo
393.1315 +  repo2 = /some/path/to/another
393.1316 +\end{codesample2}
393.1317 +
393.1318 +$B>e5-$NNc$G$O!"8D!9$NDj5A$N:8JU$,2>A[%Q%9!J(BURL $BCf$K8=$l$k%Q%9MWAG!K!"(B
393.1319 +$B1&JU$,%j%]%8%H%j$X$N%Q%9$H$J$j$^$9!#(B
393.1320 +$B2>A[%Q%9$N;XDj$H!"(B
393.1321 +$B%U%!%$%k%7%9%F%`>e$N%j%]%8%H%j0LCV$K$O!"(B
393.1322 +$B2?$N4XO"@-$bL5$$E@$KCm0U$7$F$/$@$5$$!#(B
393.1323 +
393.1324 +$BC10l$N@_Dj%U%!%$%kCf$G(B
393.1325 +\texttt{collections} $B$H(B
393.1326 +\texttt{paths} $B$NN>J}$rF1;~$K;HMQ$9$k$3$H$b2DG=$G$9!#(B
393.1327 +
393.1328 +\begin{note}
393.1329 +  $BF10l$N2>A[%Q%9$KJ#?t$N%j%]%8%H%j$,4XO"IU$1$i$l$F$$$k>l9g!"(B
393.1330 +  \sfilename{hgwebdir.cgi} $B$O%(%i!<$rDLCN$7$^$;$s!#(B
393.1331 +  $B$=$NBe$o$j$K!"(B
393.1332 +  \sfilename{hgwebdir.cgi} $B$N?6$kIq$$$OM=A[$G$-$J$$$b$N$H$J$j$^$9!#(B
393.1333 +\end{note}
393.1334 +
393.1335 +\subsection{Downloading source archives}
393.1336 +
393.1337 +Mercurial $B$N%&%'%V%$%s%?%U%'!<%97PM3$G!"(B
393.1338 +$BG$0U$N%j%S%8%g%s$N%"!<%+%$%V$r%@%&%s%m!<%I$9$k$3$H$,2DG=$G$9!#(B
393.1339 +$B$3$N%"!<%+%$%V$K$O!"(B
393.1340 +$BEv3:%j%S%8%g%s$K$*$1$k:n6HNN0h%G%#%l%/%H%j$N%9%J%C%W%7%g%C%H$,3JG<$5$l$^$9$,!"(B
393.1341 +$B%j%]%8%H%j%G!<%?ItJ,$O4^$^$l$^$;$s!#(B
393.1342 +
393.1343 +$B$3$N5!G=$O4{Dj>uBV$G$OL58z2=$5$l$F$$$^$9!#(B
393.1344 +$B$3$N5!G=$rM-8z2=$9$k$K$O!"(B
393.1345 +\rcitem{web}{allow\_archive} $B9`L\$r(B
393.1346 +\hgrc $B%U%!%$%k$N(B \rcsection{web} $B%;%/%7%g%s$KDI2C$7$F$/$@$5$$(B\footnote{$BLuCm(B:
393.1347 +$B$3$N$3$H$+$i!"(B
393.1348 +$B%"!<%+%$%V%@%&%s%m!<%I$NM-8z2=!&L58z2=@_Dj$,!"(B
393.1349 +\sfilename{hgwebdir.cgi} $BC10L$G$O$J$/!"(B
393.1350 +$B%j%]%8%H%jC10L$G$N@_Dj$G$"$k$3$H$,$o$+$j$^$9!#(B}$B!#(B
393.1351 +
393.1352 +\subsection{Web configuration options}
393.1353 +
393.1354 +Mercurial $B$N%&%'%V%$%s%?%U%'!<%9(B
393.1355 +$B!J(B\hgcmd{serve} $B%3%^%s%I$*$h$S(B
393.1356 +\sfilename{hgweb.cgi} $B$J$$$7(B \sfilename{hgwebdir.cgi} $B%9%/%j%W%H!K(B
393.1357 +$B$K$OJQ992DG=$J@_Dj9`L\$,B??t$"$j$^$9!#(B
393.1358 +$B$3$l$i$N@_Dj9`L\$O(B
393.1359 +\rcsection{web} $B%;%/%7%g%s$KB0$7$F$$$^$9!#(B
393.1360 +
393.1361 +\begin{description}
393.1362 +
393.1363 +\item[\rcitem{web}{allow\_archive}] 
393.1364 +  Mercurial $B$N%"!<%+%$%V%@%&%s%m!<%I5!G=$rM-8z2=$9$k$+H]$+$r;XDj!#(B
393.1365 +  $B$3$N5!G=$rM-8z2=$7$?>l9g%&%'%V%$%s%?%U%'!<%9$NMxMQ<T$O!"(B
393.1366 +  $B%j%]%8%H%jCf$N;2>H2DG=$JG$0U$N%j%S%8%g%s$N%"!<%+%$%V$r%@%&%s%m!<%I$G$-$^$9!#(B
393.1367 +  $B$3$N5!G=$rM-8z2=$9$k$K$O!"(B
393.1368 +  $B0J2<$KNs5s$5$l$k%-!<%o!<%I$NJB$S$r(B
393.1369 +  \rcitem{web}{allow\_archive} $B9`L\$K;XDj$9$kI,MW$,$"$j$^$9!#(B
393.1370 +
393.1371 +  \begin{description}
393.1372 +  \item[\texttt{bz2}] \texttt{bzip2} $B05=L$5$l$?(B \command{tar} $B%"!<%+%$%V7A<0!#(B
393.1373 +    $B$3$N7A<0$O:G$b9b$$05=LN($rF@$i$l$^$9$,!"(B
393.1374 +    $B%5!<%PB&$N(B CPU $B$r:G$b9s;H$7$^$9!#(B
393.1375 +
393.1376 +  \item[\texttt{gz}] \texttt{gzip} $B05=L$5$l$?(B \command{tar} $B%"!<%+%$%V7A<0!#(B
393.1377 +
393.1378 +  \item[\texttt{zip}] LZW $B05=L$5$l$?(B \command{zip} $B%"!<%+%$%V7A<0!#(B
393.1379 +    $B$3$N7A<0$O05=LN($,:G$bNt$j$^$9$,!"(BWindows $B4D6-$G$O9-$/;HMQ$5$l$F$$$^$9!#(B
393.1380 +
393.1381 +  \end{description}
393.1382 +
393.1383 +  $BCM$r;XDj$7$J$+$C$?$j!"(B
393.1384 +  \rcitem{web}{allow\_archive} $B9`L\$=$N$b$N$r;XDj$7$J$+$C$?>l9g!"(B
393.1385 +  $B%"!<%+%$%V%@%&%s%m!<%I5!G=$OL58z2=$5$l$^$9!#(B
393.1386 +  $BMxMQ2DG=$JA4$F$N%"!<%+%$%V7A<0$rM-8z2=$9$k5-=RNc$r0J2<$K<($7$^$9!#(B
393.1387 +
393.1388 +  \begin{codesample4}
393.1389 +    [web]
393.1390 +    allow_archive = bz2 gz zip
393.1391 +  \end{codesample4}
393.1392 +
393.1393 +\item[\rcitem{web}{allowpull}] 
393.1394 +  $B%&%'%V%$%s%?%U%'!<%97PM3$G$N(B HTTP $B1[$7$N(B
393.1395 +  \hgcmd{pull} $B$*$h$S(B \hgcmd{clone} $B$r5v2D$9$k$+H]$+$r;XDj$9$k??56CM!#(B
393.1396 +  \texttt{no} $B$J$$$7(B \texttt{false} $B$,;XDj$5$l$?>l9g!"(B
393.1397 +  $B%&%'%V%$%s%?%U%'!<%9$N(B``$B?M4V8~$1(B''$BItJ,$N$_$,M-8z2=$5$l$^$9!#(B
393.1398 +
393.1399 +\item[\rcitem{web}{contact}] 
393.1400 +  $B%j%]%8%H%j$N4IM}$r9T$&?MJ*!&AH?%$rFCDj$9$k$?$a$NG$0U$N(B
393.1401 +  $B!JC"$76KNO4J7i$J!KJ8;zNs!#(B
393.1402 +  $BDL>o$3$NCM$O!"4IM}<T$J$$$7%a!<%j%s%0%j%9%H$NL>A0$HEE;R%a!<%k%"%I%l%9$G$9!#(B
393.1403 +  $BB?$/$N>l9g!"(B
393.1404 +  $B$3$N>pJs$O%j%]%8%H%jKh$N(B \sfilename{.hg/hgrc} $B%U%!%$%k$K5-=R$7$^$9$,!"(B
393.1405 +  $BA4$F$N%j%]%8%H%j$,F10l$NJ]<iC4Ev$K$h$jJ]<i$5$l$F$$$k>l9g!"(B
393.1406 +  $BBg0hE*$J(B \hgrc $B%U%!%$%k$K5-=R$9$k$N$bNI$$$G$7$g$&!#(B
393.1407 +
393.1408 +\item[\rcitem{web}{maxchanges}] 
393.1409 +  $B%Z!<%8Kh$KI=<($5$l$k%A%'%s%8%;%C%H$N:GBg?t!J4{DjCM!K$rI=$9?tCM!#(B
393.1410 +
393.1411 +\item[\rcitem{web}{maxfiles}] 
393.1412 +  $B%Z!<%8Kh$KI=<($5$l$kJQ99%U%!%$%k$N:GBg?t!J4{DjCM!K$rI=$9?tCM!#(B
393.1413 +
393.1414 +\item[\rcitem{web}{stripes}] 
393.1415 +  $B%F!<%V%kI=<($K$*$1$k2DFI@-8~>e$N$?$a$K!"(B
393.1416 +  $B3F9T$N?'$r8_$$0c$$$K(B``$B<JLOMM(B''$B$H$9$k:]$K!"(B
393.1417 +  $B2?9TKh$K?'$rJQ99$9$k$+$N?tCM!#(B
393.1418 +
393.1419 +\item[\rcitem{web}{style}] 
393.1420 +  Mercurial $B$,%&%'%V%$%s%?%U%'!<%9$rI=<($9$k:]$K;HMQ$9$k%F%s%W%l!<%H!#(B
393.1421 +  Mercurial $B$O(B \texttt{default} $B$*$h$S(B
393.1422 +  \texttt{gitweb} $B$N#2$D$N%&%'%V%$%s%?%U%'!<%9MQ%F%s%W%l!<%H$rF1:-$7$F$$$^$9(B
393.1423 +  $B!J8e<T$NJ}$,8+1I$($,NI$$$G$9!K!#(B
393.1424 +  $B<+A0$G%+%9%?%^%$%:$7$?%F%s%W%l!<%H$r;XDj$9$k$3$H$b$G$-$^$9!#(B
393.1425 +  $B>\:Y$O(B\ref{chap:template}~$B@a$r;2>H$7$F$/$@$5$$!#(B
393.1426 +  \texttt{gitweb} $B%9%?%$%k$NMxMQJ}K!$r0J2<$K<($7$^$9!#(B
393.1427 +
393.1428 +  \begin{codesample4}
393.1429 +    [web]
393.1430 +    style = gitweb
393.1431 +  \end{codesample4}
393.1432 +
393.1433 +\item[\rcitem{web}{templates}] 
393.1434 +  $B%F%s%W%l!<%H%U%!%$%k$N;2>H@h%G%#%l%/%H%j$r<($9%Q%9!#(B
393.1435 +  Mercurial $B$N4{DjCM$G$O!"%$%s%9%H!<%k@h%G%#%l%/%H%j$r;2>H$7$^$9!#(B
393.1436 +
393.1437 +\end{description}
393.1438 +
393.1439 +\sfilename{hgwebdir.cgi} $B$r;HMQ$9$k>l9g!"(B
393.1440 +$B4v$D$+$N@_Dj9`L\$K4X$7$F$OMxJX@->e!"(B
393.1441 +\hgrc $B%U%!%$%k$K5-=R$9$kBe$o$j$K!"(B
393.1442 +\sfilename{hgweb.config} $B%U%!%$%k$N(B
393.1443 +\rcsection{web} $B%;%/%7%g%s$K5-=R$9$k$3$H$,$G$-$^$9!#(B
393.1444 +$B5-=R2DG=$J@_Dj9`L\$O!"(B
393.1445 +\rcitem{web}{motd} $B$*$h$S(B \rcitem{web}{style} $B$G$9!#(B
393.1446 +
393.1447 +\subsubsection{Options specific to an individual repository}
393.1448 +
393.1449 +$B%f!<%6Kh$J$$$7Bg0hE*$J(B \hgrc $B%U%!%$%k$G$O$J$/!"(B
393.1450 +$B%j%]%8%H%jKh$N(B \sfilename{.hg/hgrc} $B$G5-=R$9$Y$-(B
393.1451 +\rcsection{web} $B%;%/%7%g%s$N@_Dj9`L\$,4v$D$+$"$j$^$9!#(B
393.1452 +
393.1453 +\begin{description}
393.1454 +\item[\rcitem{web}{description}] 
393.1455 +  $B%j%]%8%H%j$NFbMF$J$$$7L\E*$r5-=R$7$?G$0U$N(B
393.1456 +  $B!JC"$76KNO4J7i$J!KJ8;zNs!#(B
393.1457 +
393.1458 +\item[\rcitem{web}{name}] 
393.1459 +  $B%&%'%V%$%s%?%U%'!<%9$K$*$1$k%j%]%8%H%j;2>HL>$r<($9J8;zNs!#(B
393.1460 +  $B$3$NCM$O!"(B
393.1461 +  $B%j%]%8%H%j$N%Q%9(B\footnote{$BLuCm(B: $B2>A[%Q%9!)(B
393.1462 +  }$B$NKvHxMWAG$rMQ$$$?4{DjL>$r>e=q$-$7$^$9!#(B
393.1463 +
393.1464 +\end{description}
393.1465 +
393.1466 +\subsubsection{Options specific to the \hgcmd{serve} command}
393.1467 +
393.1468 +\hgrc $B%U%!%$%k$N(B
393.1469 +\rcsection{web} $B%;%/%7%g%s$K$*$1$k@_Dj9`L\$N4v$D$+$O!"(B
393.1470 +\hgcmd{serve} $B%3%^%s%I@lMQ$N9`L\$G$9!#(B
393.1471 +
393.1472 +\begin{description}
393.1473 +
393.1474 +\item[\rcitem{web}{accesslog}] 
393.1475 +  $B%"%/%;%9%m%0$r=q$-=P$9%U%!%$%k$N%Q%9!#(B
393.1476 +  \hgcmd{serve} $B%3%^%s%I$N4pDlF0:n$G$N%"%/%;%9%m%0=PNO@h$O!"(B
393.1477 +  $B%U%!%$%k$G$O$J$/I8=`=PNO$G$9!#(B
393.1478 +  $B%m%0MWAG$O!"(B
393.1479 +  $BB?$/$N%&%'%V%5!<%P$K$*$$$FMxMQ$5$l$kI8=`E*$J(B``$BJ#9g(B''$B!J(Bcombined$B!K(B
393.1480 +  $B%U%!%$%k7A<0$G=PNO$5$l$^$9!#(B
393.1481 +
393.1482 +\item[\rcitem{web}{address}] 
393.1483 +  $B30It$+$i$N@\B3$r<u$1IU$1$k%"%I%l%9$r;XDj$9$kJ8;zNs!#(B
393.1484 +  $B4pDlF0:n$G$O!"(B\hgcmd{serve} $B%3%^%s%I$OA4$F$N%"%I%l%9$G@\B3$r<u$1IU$1$^$9!#(B
393.1485 +
393.1486 +\item[\rcitem{web}{errorlog}] 
393.1487 +  $B%(%i!<%m%0$r=q$-=P$9%U%!%$%k$N%Q%9!#(B
393.1488 +  \hgcmd{serve} $B%3%^%s%I$N4pDlF0:n$G$N%(%i!<%m%0=PNO@h$O!"(B
393.1489 +  $B%U%!%$%k$G$O$J$/I8=`%(%i!<=PNO$G$9!#(B
393.1490 +
393.1491 +\item[\rcitem{web}{ipv6}] 
393.1492 +  IPv6 $B%W%m%H%3%kMxMQ$NM-L5$r;XDj$9$k??56CM!#(B
393.1493 +  $B4pDlF0:n$G$O(B IPv6 $B$O%5%]!<%H$5$l$^$;$s!#(B
393.1494 +
393.1495 +\item[\rcitem{web}{port}] 
393.1496 +  \hgcmd{serve} $B%3%^%s%I$,@\B3$r<u$1IU$1$k(B TCP $B%]!<%H$NHV9f$r;XDj$9$k?tCM!#(B
393.1497 +  $B4pDlF0:n$G$O!"(B8000 $BHV%]!<%H$,;HMQ$5$l$^$9!#(B
393.1498 +
393.1499 +\end{description}
393.1500 +
393.1501 +\subsubsection{Choosing the right \hgrc\ file to add \rcsection{web}
393.1502 +  items to}
393.1503 +
393.1504 +Apache $B$d(B \texttt{lighttpd} $B$N$h$&$J%&%'%V%5!<%P$O!"(B
393.1505 +$B%j%]%8%H%j=jM-<T$H$O0[$J$k%f!<%68"8B$G2TF0$9$k2DG=@-$,$"$k!"(B
393.1506 +$B$H$$$&E@$O=EMW$G$9$N$GK:$l$J$$$h$&$K$7$F$/$@$5$$!#(B
393.1507 +$B%&%'%V%5!<%P$K$h$C$F5/F0$5$l$k(B
393.1508 +\sfilename{hgweb.cgi} $B$N$h$&$J(B
393.1509 +CGI $B%9%/%j%W%H$ODL>o!"(B
393.1510 +$B%&%'%V%5!<%P$HF10l$N%f!<%68"8B$G2TF0$7$^$9!#(B
393.1511 +
393.1512 +$B8D?M$N(B \hgrc $B%U%!%$%k$K(B
393.1513 +\rcsection{web} $B%;%/%7%g%s$r5-=R$7$F$b!"(B
393.1514 +CGI $B%9%/%j%W%H$O$=$N@_Dj$rFI$_9~$_$^$;$s!#(B
393.1515 +$B8D?M$N(B \hgrc $B%U%!%$%k$K5-=R$7$?@_Dj$O!"(B
393.1516 +$BEv3:%f!<%6<+?H$G(B \hgcmd{serve} 
393.1517 +$B%3%^%s%I$r<B9T$7$?>l9g$K$N$_8zNO$rH/4x$7$^$9!#(B
393.1518 +CGI $B%9%/%j%W%H$N5sF0$K=jK>$N@_Dj$rH?1G$9$k$K$O!"(B
393.1519 +$B%&%'%V%5!<%P$,2TF0$5$l$k:]$N%f!<%6$N%[!<%`%G%#%l%/%H%j$K(B
393.1520 +\hgrc $B%U%!%$%k$r:n@.$7$F=jK>$N@_Dj$r5-=R$9$k$+!"(B
393.1521 +$B$"$k$$$O%7%9%F%`%o%$%I$J(B \hgrc $B%U%!%$%k$K=jK>$N@_Dj$rDI2C$7$F$/$@$5$$!#(B
393.1522 +
393.1523 +
393.1524 +%%% Local Variables: 
393.1525 +%%% mode: latex
393.1526 +%%% TeX-master: "00book"
393.1527 +%%% End: 
   394.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   394.2 +++ b/ja/concepts.tex	Sun Aug 16 03:41:39 2009 +0200
   394.3 @@ -0,0 +1,764 @@
   394.4 +\chapter{Behind the scenes}
   394.5 +\label{chap:concepts}
   394.6 +
   394.7 +$BB?$/$N9=@.4IM}%7%9%F%`$H0[$J$j!"(B
   394.8 +Mercurial $B$,4p$K$7$F$$$k35G0$OHs>o$KC1=c$J$N$G!"(B
   394.9 +Mercurial $B$N%W%m%0%i%`$,<B:]$K$I$N$h$&$KF0:n$9$k$N$+$rM}2r$9$k$N$O4JC1$G$9!#(B
  394.10 +$B$=$N$h$&$JCN<1$OI,MWL5$$$+$b$7$l$^$;$s$,!"(B
  394.11 +$BI.<T$OFb>p$K4X$9$k(B``$B35G0M}2r(B''$B$,M-MQ$G$"$k$H9M$($F$$$^$9!#(B
  394.12 +
  394.13 +$BI.<T<+?H$O!"Fb>p$rM}2r$9$k$3$H$G!"(B
  394.14 +Mercurial $B$,(B\emph{$B0BA4@-(B}$B$H(B\emph{$B8zN((B}$B$KN10U$7$F@_7W$5$l$F$$$k!"(B
  394.15 +$B$H$$$&3N?.$rF@$k$3$H$,$G$-$^$7$?!#(B
  394.16 +$B$^$?!"(B
  394.17 +$B9=@.4IM}A`:n$r9T$C$?:]$K%=%U%H%&%'%"$,$I$N$h$&$K5!G=$9$k$N$+$r!"(B
  394.18 +$BMF0W$K3P$($F$*$1$k$N$G$"$l$P!"(B
  394.19 +$B9=@.4IM}%D!<%k$N?6$kIq$$$K6C$+$5$l$k5!2q$,8:$k!"(B
  394.20 +$B$H$$$&E@$bHs>o$K=EMW$G$9!#(B
  394.21 +
  394.22 +$B$3$N>O$G$O!"(B
  394.23 +$B:G=i$K(B
  394.24 +Mercurial $B$N@_7W$K$*$1$kCf3KE*$J35G0$K$D$$$F@bL@$7$?>e$G!"(B
  394.25 +$B<BAu$K$*$1$k6=L#?<$$E@$K4X$9$k>\:Y$r4v$D$+<h$j>e$2$h$&$H;W$$$^$9!#(B
  394.26 +
  394.27 +\section{Mercurial's historical record}
  394.28 +
  394.29 +\subsection{Tracking the history of a single file}
  394.30 +
  394.31 +$B%U%!%$%k$NJQ99$rDI@W$9$k>l9g!"(B
  394.32 +Mercurial $B$O%U%!%$%k$NMzNr$r(B
  394.33 +\emph{filelog} $B$H8F$P$l$k%a%?%G!<%?%*%V%8%'%/%H7A<0$GJ]B8$7$^$9!#(B
  394.34 +filelog $B$K5-O?$5$l$k8D!9$NMWAG$O!"(B
  394.35 +$BDI@WBP>]%U%!%$%k$N!"(B
  394.36 +$B$H$"$k%j%S%8%g%s$r:F8=$9$k$N$K==J,$J>pJs$rJ];}$7$F$$$^$9!#(B
  394.37 +filelog $B$O(B
  394.38 +\sdirname{.hg/store/data} $B%G%#%l%/%H%jG[2<$K%U%!%$%k$H$7$FJ]B8$5$l$F$*$j!"(B
  394.39 +$BMzNr>pJs$H!"(B
  394.40 +Mercurial $B$N%j%S%8%g%s8!:w$rJd=u$9$k%$%s%G%C%/%9$N!"(B
  394.41 +$B#2<oN`$N>pJs$rJ];}$7$F$$$^$9!#(B
  394.42 +
  394.43 +$B%5%$%:$,Bg$-$+$C$?$jJQ99MzNr$NB?$$%U%!%$%k$N>l9g!"(B
  394.44 +filelog $B$rMzNr>pJs!J3HD%;R(B ``\texttt{.d}''$B!K(B
  394.45 +$B$H%$%s%G%C%/%9!J3HD%;R(B ``\texttt{.i}''$B!K$N#2$D$KJ,N%$7$FJ]B8$5$l$^$9!#(B
  394.46 +$BJQ99MzNr$,$=$l$[$IL5$$>.$5$J%U%!%$%k$N>l9g!"(B
  394.47 +$BMzNr>pJs$H%$%s%G%C%/%9$O(B
  394.48 +``\texttt{.i}'' $B3HD%;R$r;}$DC10l$N%U%!%$%k$KJ]B8$5$l$^$9!#(B
  394.49 +$B:n6HNN0h%G%#%l%/%H%jCf$N%U%!%$%k$H!"(B
  394.50 +$B$=$NJQ99MzNr$rDI@W$9$k$?$a$N%j%]%8%H%jCf$N(B filelog $B%U%!%$%k$NBP1~$r!"(B
  394.51 +$B?^(B~\ref{fig:concepts:filelog}$B$K<($7$^$9!#(B
  394.52 +
  394.53 +\begin{figure}[ht]
  394.54 +  \centering
  394.55 +  \grafix{filelog}
  394.56 +  \caption{Relationships between files in working directory and
  394.57 +    filelogs in repository}
  394.58 +  \label{fig:concepts:filelog}
  394.59 +\end{figure}
  394.60 +
  394.61 +\subsection{Managing tracked files}
  394.62 +
  394.63 +
  394.64 +$BDI@WBP>]%U%!%$%k$N>pJs$r$^$H$a$k$?$a$K!"(B
  394.65 +Mercurial $B$O(B \emph{manifest} $B$H8F$P$l$k9=B$$r;HMQ$7$F$$$^$9!#(B
  394.66 +manifest $B$K5-O?$5$l$k8D!9$NMWAG$O!"(B
  394.67 +$BEv3:%A%'%s%8%;%C%H$K$*$1$k%U%!%$%k$N0lMw$d!"(B
  394.68 +$B3F%U%!%$%k$N%j%S%8%g%s!"(B
  394.69 +$B4v$D$+$N%U%!%$%k$N%a%?%G!<%?$H$$$C$?!"(B
  394.70 +$B8D!9$N%A%'%s%8%;%C%H$4$H$N%U%!%$%k$K4X$9$k>pJs$rJ];}$7$F$$$^$9!#(B
  394.71 +
  394.72 +\subsection{Recording changeset information}
  394.73 +
  394.74 +\emph{changelog} $B$O!"(B
  394.75 +$B%A%'%s%8%;%C%H$N%3%_%C%H<g$d!"(B
  394.76 +$B%3%_%C%H;~$N%m%0%a%C%;!<%8!"(B
  394.77 +$B$=$NB>%A%'%s%8%;%C%H$K4X$9$k4v$D$+$N>pJs$d!"(B
  394.78 +manifest $B$N%j%S%8%g%s$H$$$C$?!"(B
  394.79 +$B8D!9$N%A%'%s%8%;%C%H$K4X$9$k>pJs$rJ];}$7$F$$$^$9!#(B
  394.80 +
  394.81 +\subsection{Relationships between revisions}
  394.82 +
  394.83 +changelog$B!"(Bmanifest $B$J$$$7(B filelog $B$K$*$1$k8D!9$N%j%S%8%g%s$O!"(B
  394.84 +$BD>@\$N?F%j%S%8%g%s(B
  394.85 +$B!J%^!<%8$r9T$C$?%j%S%8%g%s$N>l9g$O!"(B
  394.86 +$B%^!<%8BP>]$H$J$C$?#2$D$N?F%j%S%8%g%s!K(B
  394.87 +$B$X$N;2>H$rJ];}$7$F$$$^$9!#(B
  394.88 +$B:#=R$Y$?$h$&$K!"(B
  394.89 +$B3F9=B$$K(B\emph{$B$^$?$,$C$?(B}$B4XO"@-$r$b$A!"(B
  394.90 +$B$=$l$i$OI,A3E*$K3,AX9=B$$r;}$C$F$$$^$9!#(B
  394.91 +
  394.92 +$B%j%]%8%H%jCf$NA4$F$N%A%'%s%8%;%C%H$K4X$7$F!"(B
  394.93 +changelog $B$K$O87L)$K#1$D$N%j%S%8%g%s$,J]B8$5$l$^$9!#(B
  394.94 +changelog $B$K$*$1$k3F%j%S%8%g%s$O!"(B
  394.95 +manifest $BCf$N%j%S%8%g%s$X$N;2>H$rJ];}$7$F$$$^$9!#(B
  394.96 +manifest $BCf$N3F%j%S%8%g%s$O!"(B
  394.97 +$B%A%'%s%8%;%C%H$,@8@.$5$l$?:]$N3F%U%!%$%k$N%j%S%8%g%s$KBP1~$9$k(B
  394.98 +filelog $BCf$N%j%S%8%g%s$X$N;2>H$rJ];}$7$F$$$^$9!#(B
  394.99 +$B$3$N4XO"@-$r?^(B~\ref{fig:concepts:metadata}$B$K<($7$^$9!#(B
 394.100 +
 394.101 +\begin{figure}[ht]
 394.102 +  \centering
 394.103 +  \grafix{metadata}
 394.104 +  \caption{Metadata relationships}
 394.105 +  \label{fig:concepts:metadata}
 394.106 +\end{figure}
 394.107 +
 394.108 +$B?^$+$i$b$o$+$k$h$&$K!"(B
 394.109 +changelog$B!"(Bmanifest $B$*$h$S(B 
 394.110 +filelog $B$,J];}$9$k%j%S%8%g%s>pJs4V$N4X78$O!"(B
 394.111 +$BI,$:$7$b(B``$B#1BP#1(B''$B$H$$$&$o$1$G$O$"$j$^$;$s!#(B
 394.112 +$B#2$D$N%A%'%s%8%;%C%H$N4V$G(B
 394.113 +manifest $B$,JQ99$5$l$F$$$J$$>l9g!"(B
 394.114 +$B$=$l$i$N%A%'%s%8%;%C%H$KBP1~$9$k(B changelog $BMWAG$O!"(B
 394.115 +manifest $BCf$NF1$8%j%S%8%g%s$r;2>H$7$^$9!#(B
 394.116 +$B#2$D$N%A%'%s%8%;%C%H$N4V$G(B
 394.117 +Mercurial $B$,DI@W$9$k%U%!%$%k$,JQ99$5$l$F$$$J$$>l9g!"(B
 394.118 +$B$=$l$i$N%A%'%s%8%;%C%H$KBP1~$9$k(B manifest $BMWAG$O!"(B
 394.119 +filelog $BCf$NF1$8%j%S%8%g%s$r;2>H$7$^$9!#(B
 394.120 +
 394.121 +\section{Safe, efficient storage}
 394.122 +
 394.123 +changelog$B!"(Bmanifest $B$*$h$S(B filelog $B$O!"(B
 394.124 +\emph{revlog} $B$H8F$P$l$kF1$89=B$$K$h$j9=@.$5$l$F$$$^$9!#(B
 394.125 +
 394.126 +\subsection{Efficient storage}
 394.127 +
 394.128 +revlog $B$O(B \emph{$B:9J,(B}$B<jK!$H$$$&;EAH$_$r;HMQ$7$F!"(B
 394.129 +$B%j%S%8%g%s>pJs$r8zN(E*$K3JG<$7$F$$$^$9!#(B
 394.130 +$B:9J,<jK!$G$O!"(B
 394.131 +$B%U%!%$%k$N3F%j%S%8%g%s$4$H$K40A4$JJ#@=$rJ];}$9$kBe$o$j$K!"(B
 394.132 +$B5l%j%S%8%g%s$+$i?7%j%S%8%g%s$X$NJQ7A$KI,MW$J>pJs$rJ];}$7$^$9!#(B
 394.133 +$BB?$/$N%U%!%$%k$G$N%G!<%?3JG<$K$*$$$F!"(B
 394.134 +$B:9J,<jK!$O0lHLE*$K40A4$JJ#@=$N>l9g$N?t%Q!<%;%s%HDxEY$N%5%$%:$K$J$j$^$9!#(B
 394.135 +
 394.136 +$B5l<0$N9=@.4IM}%7%9%F%`$G$O!"(B
 394.137 +$B%F%-%9%H7A<0$N%U%!%$%k$G$7$+:9J,<jK!$,E,MQ$G$-$J$$$b$N$b$"$j$^$9!#(B
 394.138 +$B$=$l$i$N%7%9%F%`$K$*$1$k%P%$%J%j%U%!%$%k$N3JG<$O!"(B
 394.139 +$B40A4$J%9%J%C%W%7%g%C%H$+!"(B
 394.140 +$B%F%-%9%HI=8=7A<0$X$NJQ49$K$h$C$F9T$o$l$^$9$,!"(B
 394.141 +$B$3$l$i$O6&$KIT7P:Q$J<jK!$G$9!#(B
 394.142 +$BG$0U$N%P%$%J%j%G!<%?$r4^$`%U%!%$%k$G$"$C$F$b!"(B
 394.143 +Mercurial $B$O:9J,$r8zN(E*$K07$&$3$H$,$G$-$^$9$N$G!"(B
 394.144 +$B%F%-%9%H$rFCJL07$$$9$kI,MW$O$"$j$^$;$s(B\footnote{$BLuCm(B:
 394.145 +<code>cvs add</code> $B$K$*$1$k(B
 394.146 +<code>-kb</code> $B;XDj$N7gMn$K$h$k%U%!%$%kFbMF$NGKB;!"(B
 394.147 +$B$H$$$C$??4G[$O$"$j$^$;$s!#(B
 394.148 +$BL`$b!"(BMercurial $B$N4pDlF0:n$G$O!"(B
 394.149 +$B%-!<%o!<%I$NCV49Ey$r9T$$$^$;$s$N$G!"(B
 394.150 +$B$=$b$=$b?4G[$9$kI,MW$,L5$$$N$G$9$,!D!#(B}$B!#(B
 394.151 +
 394.152 +\subsection{Safe operation}
 394.153 +\label{sec:concepts:txn}
 394.154 +
 394.155 +Mercurial $B$O(B revlog $B$NKvHx$K%G!<%?$r(B\emph{$BDI2C(B}$B$9$k$@$1$G!"(B
 394.156 +$B=q$-9~$^$l$?8e$+$i%U%!%$%k$N0lIt$r2~JQ$9$k$h$&$J$3$H$O9T$$$^$;$s!#(B
 394.157 +$B4{B8%G!<%?$N2~JQ$rI,MW$H$9$k;EAH$_$HHf3S$7$?>l9g!"(B
 394.158 +$B$3$N<jK!$O7xO43n$D8zN(E*$G$9!#(B
 394.159 +
 394.160 +$B$=$l$K2C$($F!"(B
 394.161 +Mercurial $B$OJ#?t$N%U%!%$%k$K$^$?$,$C$?A4$F$N=q$-9~$_$r!"(B
 394.162 +$BC10l$N(B\emph{$B%H%i%s%6%/%7%g%s(B}$B$N0lIt$H$7$F07$$$^$9!#(B
 394.163 +$B%H%i%s%6%/%7%g%s$O(B\emph{$BIT2DJ,(B}$B$J$b$N$H$7$F07$o$l$^$9$N$G!"(B
 394.164 +$B%H%i%s%6%/%7%g%sA4BN$,@.8y$9$l$P7k2L$NA4$F$,MxMQ<T$K8+$($k$h$&$K$J$j$^$9$,!"(B
 394.165 +$B%H%i%s%6%/%7%g%s$N0lIt$G$b<:GT$7$?>l9g$K$O!"(B
 394.166 +$BA4$F$N=q$-9~$_A`:n$O<h$j>C$5$l$^$9!#(B
 394.167 +$B0lJ}$O%G!<%?$NFI$_9~$_$r9T$$B>J}$O%G!<%?$N=q$-=P$7$r9T$&$h$&$J!"(B
 394.168 +$B#2$D$N(B Mercurial $B%W%m%;%9$rF1;~$K<B9T$7$?>l9g$G$b!"(B
 394.169 +$B$3$NIT2DJ,J]>Z$K$h$j!"(B
 394.170 +$BFI$_9~$_$r:.Mp$5$;$k$h$&$JItJ,E*$J=q$-9~$_%G!<%?$r!"(B
 394.171 +$B%G!<%?FI$_9~$_B&$N%W%m%;%9$,FI$_9~$`$3$H$O$"$j$^$;$s(B
 394.172 +\footnote{$BLuCm(B:
 394.173 +$B87L)$K$O$3$N5-=R$O@5$7$/$"$j$^$;$s!#(B
 394.174 +$B>\:Y$O(B \ref{sec:hook:carepretxn}~$B@a$r;2>H$7$F$/$@$5$$!#(B}$B!#(B
 394.175 +
 394.176 +Mercurial $B$,%U%!%$%k$X$NDI2C$7$+9T$o$J$$$3$H$,!"(B
 394.177 +$B%H%i%s%6%/%7%g%s$NIT2DJ,@-J]>Z$NDs6!$rMF0W$K$7$F$$$^$9!#(B
 394.178 +$B%H%i%s%6%/%7%g%sJ]>Z$,MF0W$G$"$kDx!"(B
 394.179 +$B$=$l$,@5$7$/5!G=$7$F$$$k$3$H$r3N?.$G$-$kH&$G$9!#(B
 394.180 +
 394.181 +\subsection{Fast retrieval}
 394.182 +
 394.183 +$B=i4|$N9=@.4IM}%7%9%F%`$,6&$K4Y$C$F$$$?(B\emph{$BHs8zN($JI|5l(B}$BLdBj$NMn$H$77j$r!"(B
 394.184 +Mercurial $B$O>e<j$K2sHr$7$F$$$^$9!#(B
 394.185 +$BKX$I$N9=@.4IM}%7%9%F%`$O!"(B
 394.186 +``$B%9%J%C%W%7%g%C%H(B''$B$KBP$9$kJQ99$NDI2CE*$JO"B3$H$7$F!"(B
 394.187 +$B%j%S%8%g%s$NFbMF$rJ];}$7$F$$$^$7$?!#(B
 394.188 +$B$3$N<jK!$N>l9g!"(B
 394.189 +$BFCDj$N%j%S%8%g%s$r:F9=C[$9$k$K$O!"(B
 394.190 +$B:G=i$K%9%J%C%W%7%g%C%H$rFI$_9~$_!"(B
 394.191 +$BB3$$$FBP>]%j%S%8%g%s$H$N4V$NA4$F$N:9J,%G!<%?$rFI$_9~$`I,MW$,$"$j$^$9!#(B
 394.192 +$B%U%!%$%k$NMzNr$,@Q$_=E$J$k$[$I!"(B
 394.193 +$B:9J,%G!<%?$rFI$_9~$^$J$1$l$P@.$i$J$$%j%S%8%g%s$,A}2C$7!"(B
 394.194 +$BFCDj$N%j%S%8%g%s$N:F9=C[$K;~4V$,I,MW$H$J$j$^$9!#(B
 394.195 +
 394.196 +\begin{figure}[ht]
 394.197 +  \centering
 394.198 +  \grafix{snapshot}
 394.199 +  \caption{Snapshot of a revlog, with incremental deltas}
 394.200 +  \label{fig:concepts:snapshot}
 394.201 +\end{figure}
 394.202 +
 394.203 +Mercurial $B$,$3$NLdBj$N2r7h$K;HMQ$7$F$$$k<jK!$O!"(B
 394.204 +$B4JC1$J$b$N$G$9$,8z2LE*$G$9!#(B
 394.205 +$BA02s$N%9%J%C%W%7%g%C%H:n@.;~E@$+$i!"(B
 394.206 +$B8GDj$5$l$?ogCM$rD6$($F:9J,>pJs$,C_@Q$5$l$?:]$K$O!"(B
 394.207 +$B:9J,>pJs$NC_@Q$G$O$J$/!"(B
 394.208 +$B?7$?$J%9%J%C%W%7%g%C%H!JL^O@05=L$O9T$$$^$9!K$rJ]B8$9$k!"(B
 394.209 +$B$H$$$&$b$N$G$9!#(B
 394.210 +$B$3$N<jK!$O!"(B
 394.211 +\emph{$BG$0U$N(B}$B%j%S%8%g%s$K$*$1$k%U%!%$%k$rAGAa$/:F9=C[$G$-$^$9!#(B
 394.212 +$B$3$N<jK!$OHs>o$KM-8z$G$"$k$?$a!"(B
 394.213 +$BB>$N4v$D$+$N9=@.4IM}%7%9%F%`$K$b<h$j9~$^$l$F$$$^$9!#(B
 394.214 +
 394.215 +$B?^(B~\ref{fig:concepts:snapshot}$B$N35MW$,<($9$h$&$K!"(B
 394.216 +Mercurial $B$O!"(B
 394.217 +revlog $B$N%$%s%G%C%/%9%U%!%$%k$K$*$1$k3FMWAG$K!"(B
 394.218 +$BFCDj$N%j%S%8%g%s$N:F9=C[$N:]$KFI$_9~$_$,I,MW$H$5$l$k!"(B
 394.219 +$B%G!<%?%U%!%$%kCf$NMWAG$NHO0O$r3JG<$7$^$9!#(B
 394.220 +
 394.221 +\subsubsection{Aside: the influence of video compression}
 394.222 +
 394.223 +$BF02h05=L$r=OCN$7$F$$$k$+!"(B
 394.224 +$B%1!<%V%k$J$$$71R@1$K$h$k%G%8%?%k%F%l%SG[?.$r;kD0$7$?$3$H$,$"$k$J$i$P!"(B
 394.225 +$B$?$$$F$$$NF02h05=L7A<0$K$*$$$F3FF02h%U%l!<%`$,!"(B
 394.226 +$B@h9T$9$k%U%l!<%`$H$N:9J,$GJ];}$5$l$F$$$k$3$H$r$4B8CN$+$b$7$l$^$;$s!#(B
 394.227 +$B2C$($F$=$l$i$N7A<0$G$O!"(B
 394.228 +$B05=LN($r8~>e$5$;$k$?$a$K(B``$BHs2D5U(B''$B05=L<jK!$rMQ$$$F$$$^$9$N$G!"(B
 394.229 +$B%U%l!<%`4V:9J,$N?t$K1~$8$F;k3PE*%(%i!<$,C_@Q$5$l$^$9!#(B
 394.230 +
 394.231 +$BF02hG[?.$N>l9g!"(B
 394.232 +$B;~@^$N?.9f0[>o$K$h$k(B``$B7gMn(B''$B$,M-$jF@$^$9$7!"(B
 394.233 +$B2D5U05=L2aDx$K$h$j@8$8$k8m:9$NC_@Q$r@)8B$9$kI,MW$b$"$k$?$a!"(B
 394.234 +$BF02h05=LB&$G$ODj4|E*$K40A4$J%U%l!<%`(B
 394.235 +$B!J(B``$B%-!<%U%l!<%`(B''$B$H8F$P$l$^$9!K$r05=L7A<0$NCf$KA^F~$7$^$9!#(B
 394.236 +$B$3$l$OF02h?.9f$,CfCG$5$l$F$b!"(B
 394.237 +$B<!$N%-!<%U%l!<%`$NE~Ce;~E@$+$i$N:F3+$,2DG=$G$"$k$3$H$r0UL#$7$^$9!#(B
 394.238 +$BId9f2=%(%i!<$NC_@Q$b!"(B
 394.239 +$B8D!9$N%-!<%U%l!<%`$G%/%j%"$5$l$^$9!#(B
 394.240 +
 394.241 +\subsection{Identification and strong integrity}
 394.242 +
 394.243 +$B:9J,$J$$$7%9%J%C%W%7%g%C%H>pJs$N%G!<%?$KBP$7$F!"(B
 394.244 +revlog $BMWAG$O0E9f2=$KMQ$$$i$l$k%O%C%7%eCM$r7W;;$7$FJ];}$7$F$$$^$9!#(B
 394.245 +$B$3$l$K$h$j!"(B
 394.246 +$B%j%S%8%g%s$K4X$9$k>pJs$N56B$$r:$Fq$K$9$k$HF1;~$K!"(B
 394.247 +$BITN8$NGKB;$N8!=P$,MF0W$K$J$j$^$9!#(B
 394.248 +
 394.249 +$B%O%C%7%eCM$N;;=P$O!"(B
 394.250 +$BC1$J$kGKB;$N8!=P0J>e$N$b$N$r$b$?$i$7$^$9!#(B
 394.251 +$B%O%C%7%eCM$O3F%j%S%8%g%s$N<1JL;R$H$7$F;HMQ$5$l$^$9!#(B
 394.252 +Mercurial $B$N%(%s%I%f!<%6$H$7$FL\$K$9$k%A%'%s%8%;%C%H<1JL;R$N%O%C%7%eCM$O!"(B
 394.253 +changelog $B$N%j%S%8%g%s$KM3Mh$9$kCM$G$9!#(B
 394.254 +filelog $B$d(B manifest $B$G$b%O%C%7%eCM$r;HMQ$7$F$$$^$9$,!"(B
 394.255 +Mercurial $B$G$O$3$l$i$OIqBfN"$N$_$G;HMQ$5$l$F$$$^$9!#(B
 394.256 +
 394.257 +$BFCDj%j%S%8%g%s$N%U%!%$%k$r:F9=C[$9$k>l9g$d!"(B
 394.258 +$BB>$N%j%]%8%H%j$+$i%A%'%s%8%;%C%H$r<h$j9~$s$@>l9g!"(B
 394.259 +Mercurial $B$O%O%C%7%eCM$,@5$7$$$3$H$r3NG'$7$^$9!#(B
 394.260 +$B0l4S@-$KLdBj$,$"$k$3$H$,8!=P$5$l$?>l9g!"(B
 394.261 +$B7Y9p$rH/$7$?>e$G!"(B
 394.262 +$B?J9TCf$NA4$F$N=hM}$rDd;_$7$^$9!#(B
 394.263 +
 394.264 +Mercurial $B$,Dj4|E*$K:9$79~$s$G$$$k%9%J%C%W%7%g%C%H$O!"(B
 394.265 +$BFCDj%j%S%8%g%s$N:F9=C[$N:]$N8zN($K2C$($F!"(B
 394.266 +$BItJ,E*$J%G!<%?$NGKB;$KBP$9$k7xO4@-$r$b$?$i$7$F$^$9!#(B
 394.267 +$B%O!<%I%&%'%"%(%i!<$d%7%9%F%`$N%P%0$K$h$C$F!"(B
 394.268 +revlog $B$,ItJ,E*$KGKB;$7$?>l9g!"(B
 394.269 +$BGKB;$rLH$l$?(B revlog $B$N%G!<%?$+$i!"(B
 394.270 +$BGKB;$7$?It0L$NA08e6&$K!"(B
 394.271 +$B0lIt!J$"$k$$$OKX$I$N!K%j%S%8%g%s$rI|5l$9$k$3$H$,2DG=$G$9!#(B
 394.272 +$B:9J,$N$_$rJ];}$9$k%b%G%k$r:NMQ$9$k9=@.4IM}%7%9%F%`$G$O!"(B
 394.273 +$B$3$N$h$&$J$3$H$O$G$-$^$;$s!#(B
 394.274 +
 394.275 +\section{Revision history, branching, and merging}
 394.276 +
 394.277 +$BA4$F$N(B Mercurial $B$N(B revlog $BMWAG$O!"(B
 394.278 +$BDL>o$O(B\emph{$B?F(B}$B$H8@$o$l$kD>A0$N%j%S%8%g%s$N<1JL;R$rJ];}$7$F$$$^$9!#(B
 394.279 +$B<B:]$K$O!"(B
 394.280 +$B3F(B revlog $BMWAG$O#1$D$G$O$J$/#2$D$N?F$N>pJs$rJ];}$G$-$^$9!#(B
 394.281 +Mercurial $B$O(B``$B6u<1JL;R(B''$B!J(Bnull ID$B!K$H8F$P$l$kFCJL$J%O%C%7%eCM$r;H$C$F!"(B
 394.282 +``$B?FIT:_(B''$B$rI=8=$7$^$9(B\footnote{$BLuCm(B:
 394.283 +$B$D$^$j!"B?$/$N(B revlog $BMWAG$O!"(B
 394.284 +$B0lJ}$N?F%j%S%8%g%s$H$7$F6u(BID$B$rJ];}$7$F$$$^$9!#(B}$B!#(B
 394.285 +$B$3$N%O%C%7%eCM$OC1=c$K(B0$B$,O"B3$7$?J8;zNs$G$9!#(B
 394.286 +
 394.287 +revlog $B$N35G0?^$r?^(B~\ref{fig:concepts:revlog}$B$K8+$k$3$H$,$G$-$^$9!#(B
 394.288 +filelog $B$d(B manifest$B!"(Bchangelog $B$NA4$F$,F1$89=B$$r;}$C$F$*$j!"(B
 394.289 +$B8D!9$NMWAG$,J];}$7$F$$$k!"(B
 394.290 +$B:9J,$d%9%J%C%W%7%g%C%H$H$$$C$?%G!<%?$N<oJL$,0[$J$k$@$1$G$9!#(B
 394.291 +
 394.292 +revlog $B$K$*$1$k:G=i$N%j%S%8%g%s(B
 394.293 +$B!J?^$K$*$1$kDl0LCV$N%j%S%8%g%s!K$O!"(B
 394.294 +$B#2$D$N?F%j%S%8%g%s3JG<NN0h$NN>J}$K6u<1JL;R$rJ];}$7$F$$$^$9!#(B
 394.295 +``$BDL>o$N(B''$B%j%S%8%g%s$G$O!"(B
 394.296 +$BBh#1?F$N3JG<NN0h$K$O?F%j%S%8%g%s$N<1JL;R$,!"(B
 394.297 +$BBh#2?F$N3JG<NN0h$K$O6u<1JL;R$,3JG<$5$l!"(B
 394.298 +$B?F%j%S%8%g%s$,#1$D$7$+$J$$$3$H$rI=$7$^$9!#(B
 394.299 +$B?F%j%S%8%g%s$N<1JL;R$H$7$FF1$8<1JL;R$r3JG<$9$k%j%S%8%g%sF1;N$O!"(B
 394.300 +$B8_$$$K%V%i%s%A$H$J$j$^$9!#(B
 394.301 +$B%V%i%s%A$r%^!<%8$7$?%j%S%8%g%s$O!"(B
 394.302 +$BE}9g$5$l$?N>J}$N%j%S%8%g%s$N<1JL;R$r?F%j%S%8%g%s$N<1JL;R$H$7$F3JG<$7$^$9!#(B
 394.303 +
 394.304 +\begin{figure}[ht]
 394.305 +  \centering
 394.306 +  \grafix{revlog}
 394.307 +  \caption{}
 394.308 +  \label{fig:concepts:revlog}
 394.309 +\end{figure}
 394.310 +
 394.311 +\section{The working directory}
 394.312 +
 394.313 +Mercurial $B$O!"(B
 394.314 +$B%j%]%8%H%j$G9=@.4IM}$5$l$F$$$k%U%!%$%k$N!"(B
 394.315 +$BFCDj$N%j%S%8%g%s$K$*$1$k%9%J%C%W%7%g%C%H$r:n6HNN0h%G%#%l%/%H%j$KJ];}$7$^$9!#(B
 394.316 +
 394.317 +$B:n6HNN0h%G%#%l%/%H%j$O!"(B
 394.318 +$B$I$N%j%S%8%g%s$N%9%J%C%W%7%g%C%H$rJ];}$7$F$$$k$N$+$r(B``$BCN$C$F$$$^$9(B''$B!#(B
 394.319 +$B:n6HNN0h%G%#%l%/%H%j$rFCDj$N%j%S%8%g%s$G99?7$7$h$&$H$7$?>l9g!"(B
 394.320 +Mercurial $B$O(B (1) $BAj1~$7$$%j%S%8%g%s$N(B manifest $B$r;2>H$7!"(B
 394.321 +(2) $BEv3:%j%S%8%g%s$N%3%_%C%H;~E@$G$N4IM}BP>]%U%!%$%k$rFCDj$7!"(B
 394.322 +(3) $B:n6HNN0h%G%#%l%/%H%jCf$N%U%!%$%k$,J];}$9$Y$-FbMF$r7hDj$7$^$9!#(B
 394.323 +$B$=$N>e$G!"(B
 394.324 +$BEv3:%A%'%s%8%;%C%H$N%3%_%C%H;~E@$HF1$8FbMF$r;}$D$h$&$K!"(B
 394.325 +$B:n6HNN0h%G%#%l%/%H%jCf$K3F%U%!%$%k$NJ#@=$r:F@8@.$7$^$9!#(B
 394.326 +
 394.327 +dirstate $B7A<0$K$O!"(B
 394.328 +$B:n6HNN0h%G%#%l%/%H%j$,$I$N%A%'%s%8%;%C%H$G99?7$5$l$F$$$k$+$H$+!"(B
 394.329 +$B:n6HNN0h$G(B Mercurial $B$K$h$j9=@.4IM}$5$l$F$$$k%U%!%$%k$N0lMw$J$I!"(B
 394.330 +$B:n6HNN0h%G%#%l%/%H%j$K4X$9$k(B
 394.331 +Mercurial $B$N4IM}>pJs$,3JG<$5$l$F$$$^$9!#(B
 394.332 +
 394.333 +$B8D!9$N%j%S%8%g%s$K4X$9$k(B revlog $BMWAG$O!"(B
 394.334 +$B#2$D$N?F%j%S%8%g%s<1JL;R$r3JG<$9$kNN0h$r;}$C$F$$$^$9$N$G!"(B
 394.335 +$BDL>o$N%j%S%8%g%s!J#1$D$N?F%j%S%8%g%s$@$1$r;2>H!K$b!"(B
 394.336 +$B#2$D$N%j%S%8%g%s$r%^!<%8$9$k%j%S%8%g%s$bI=8=2DG=$G$9$,!"(B
 394.337 +dirstate $B7A<0$b#2$D$N?F%j%S%8%g%s<1JL;R$r3JG<$9$kNN0h$r;}$C$F$$$^$9!#(B
 394.338 +\hgcmd{update} $B%3%^%s%I$r<B9T$7$?:]$K$O!"(B
 394.339 +$B;XDj$7$?%A%'%s%8%;%C%H$O(B``$BBh#1?F(B''$B!J(Bfirst parent$B!K$H$7$FJ];}$5$l!"(B
 394.340 +$BBh#2?F$O6u<1JL;R$rJ];}$7$^$9!#(B
 394.341 +$B%A%'%s%8%;%C%H$H$N(B \hgcmd{merge} $B$r9T$C$?:]$K$O!"(B
 394.342 +dirstate $B7A<0$,J];}$9$kBh#1?F$OJQ2=$7$^$;$s$,!"(B
 394.343 +$BBh#2?F$O(B \hgcmd{merge} $B%3%^%s%I$K;XDj$5$l$?%A%'%s%8%;%C%H$K@_Dj$5$l$^$9!#(B
 394.344 +\hgcmd{parents} $B%3%^%s%I$K$h$j!"(B
 394.345 +dirstate $B7A<0$,J];}$9$k?F%j%S%8%g%s$N<1JL;R$rI=<($G$-$^$9!#(B
 394.346 +
 394.347 +\subsection{What happens when you commit}
 394.348 +
 394.349 +dirstate $B7A<0$,?F%j%S%8%g%s>pJs$rJ];}$9$k$N$O!"(B
 394.350 +$B2?$b3P$(=q$-$N$?$a$@$1$G$O$"$j$^$;$s!#(B
 394.351 +Mercurial $B$O(B dirstate $B7A<0$N;}$D?F%j%S%8%g%s>pJs$r!"(B
 394.352 +$B%3%_%C%H$N:]$N(B\emph{$B?75,%A%'%s%8%;%C%H$N?F%A%'%s%8%;%C%H(B}$B$H$7$F;HMQ$7$^$9!#(B
 394.353 +
 394.354 +\begin{figure}[ht]
 394.355 +  \centering
 394.356 +  \grafix{wdir}
 394.357 +  \caption{The working directory can have two parents}
 394.358 +  \label{fig:concepts:wdir}
 394.359 +\end{figure}
 394.360 +
 394.361 +$B?^(B~\ref{fig:concepts:wdir}$B$O!"(B
 394.362 +$B#1$D$N?F%A%'%s%8%;%C%H$N$_$r;}$D!"(B
 394.363 +$BDL>o$N:n6HNN0h%G%#%l%/%H%j$rI=$7$F$$$^$9!#(B
 394.364 +$B?^$K$*$1$k:n6HNN0h%G%#%l%/%H%j$N?F%A%'%s%8%;%C%H$O!"(B
 394.365 +$B%j%]%8%H%j$K$*$1$k:G?7$G3n$D;R$r;}$?$J$$%A%'%s%8%;%C%H$G$9$N$G!"(B
 394.366 +\emph{tip} $B$H8F$P$l$^$9!#(B
 394.367 +
 394.368 +\begin{figure}[ht]
 394.369 +  \centering
 394.370 +  \grafix{wdir-after-commit}
 394.371 +  \caption{The working directory gains new parents after a commit}
 394.372 +  \label{fig:concepts:wdir-after-commit}
 394.373 +\end{figure}
 394.374 +
 394.375 +$B:n6HNN0h%G%#%l%/%H%j$=$N$b$N$r!"(B
 394.376 +``$B%3%_%C%H$7$h$&$H$7$F$$$k%A%'%s%8%;%C%H(B''
 394.377 +$B$HB*$($k$H$o$+$j$d$9$$$G$7$g$&!#(B
 394.378 +Mercurial $B$KBP$7$FDI2C!?:o=|!?2~L>$J$$$7J#@=$r;X<($7$?%U%!%$%k$O!"(B
 394.379 +$B4{$K(B Mercurial $B$K$h$j9=@.4IM}$5$l$F$$$k%U%!%$%k$X$NJQ99$HF1MM$K!"(B
 394.380 +$B$=$N%A%'%s%8%;%C%H$KH?1G$5$l$^$9!#(B
 394.381 +$B$=$N?7$?$J%A%'%s%8%;%C%H$K$O!"(B
 394.382 +$B:n6HNN0h%G%#%l%/%H%j$HF1$8?F%A%'%s%8%;%C%H$,@_Dj$5$l$^$9!#(B
 394.383 +
 394.384 +$B%3%_%C%H$,40N;$7$?$J$i!"(B
 394.385 +Mercurial $B$d:n6HNN0h%G%#%l%/%H%j$N?F%A%'%s%8%;%C%H$N>pJs$r99?7$7$^$9!#(B
 394.386 +$BBh#1?F$K$O%3%_%C%H$K$h$j?7$?$K@8@.$5$l$?%A%'%s%8%;%C%H$N<1JL;R$,@_Dj$5$l!"(B
 394.387 +$BBh#2?F$K$O6u<1JL;R$,@_Dj$5$l$^$9!#(B
 394.388 +$B%3%_%C%H8e$NLO<0?^$r!"(B
 394.389 +$B?^(B~\ref{fig:concepts:wdir-after-commit}$B$K<($7$^$9!#(B
 394.390 +Mercurial $B$O%3%_%C%H$N:]$K!"(B
 394.391 +$B:n6HNN0h%G%#%l%/%H%jCf$N%U%!%$%k$K$O0l@Z?($l$:!"(B
 394.392 +$BC1$K(B dirstate $B$N?F%A%'%s%8%;%C%H>pJs$r=q$-49$($k$@$1$G$9!#(B
 394.393 +
 394.394 +\subsection{Creating a new head}
 394.395 +
 394.396 +$B8=;~E@$G$N(B tip $B0J30$N%A%'%s%8%;%C%H$G$N:n6HNN0h%G%#%l%/%H%j$N99?7$O!"(B
 394.397 +$BNI$/$"$k$3$H$G$9!#(B
 394.398 +$BNc$($P!"(B
 394.399 +$B@h=52PMKF|;~E@$G$N%W%m%8%'%/%H$N>uBV$rD4$Y$?$j!"(B
 394.400 +$B$I$N%A%'%s%8%;%C%H$,%P%0$r;}$A9~$s$@$N$+$rD4$Y$k!"(B
 394.401 +$B$H$$$C$?>u67$G$9!#(B
 394.402 +$B$3$N$h$&$J>u67$G$N<+A3$J9T0Y$O!"(B
 394.403 +$B:n6HNN0h%G%#%l%/%H%j$r4uK>$N%A%'%s%8%;%C%H$G99?7$7!"(B
 394.404 +$BEv3:%A%'%s%8%;%C%H$r%3%_%C%H$7$?;~E@$G$N%U%!%$%k$NFbMF$r!"(B
 394.405 +$B:n6HNN0h%G%#%l%/%H%jCf$N%U%!%$%k$r;2>H$7$F3NG'$9$k!"(B
 394.406 +$B$H$$$&$b$N$G$7$g$&!#(B
 394.407 +$B$3$N9T0Y$K$h$k1F6A$r!"(B
 394.408 +$B?^(B~\ref{fig:concepts:wdir-pre-branch}$B$K<($7$^$9!#(B
 394.409 +
 394.410 +\begin{figure}[ht]
 394.411 +  \centering
 394.412 +  \grafix{wdir-pre-branch}
 394.413 +  \caption{The working directory, updated to an older changeset}
 394.414 +  \label{fig:concepts:wdir-pre-branch}
 394.415 +\end{figure}
 394.416 +
 394.417 +$B:n6HNN0h%G%#%l%/%H%j$r0JA0$N%A%'%s%8%;%C%H$G99?7$7$?>l9g!"(B
 394.418 +$B2?$i$+$NJQ99$r9T$C$F%3%_%C%H$7$?$J$i!"(B
 394.419 +Mercurial $B$O$I$N$h$&$K?6Iq$&$N$G$7$g$&$+!)(B
 394.420 +Mercurial $B$O$3$l$^$G$K@bL@$7$F$-$?>l9g$HF1$8$h$&$K?6Iq$$$^$9!#(B
 394.421 +$B:n6HNN0h%G%#%l%/%H%j$N?F%A%'%s%8%;%C%H$,!"(B
 394.422 +$B?75,$K:n@.$5$l$k%A%'%s%8%;%C%H$N?F$K$J$j$^$9!#(B
 394.423 +$B?75,:n@.$5$l$k%A%'%s%8%;%C%H$O;R$r;}$?$:!"(B
 394.424 +$B$h$C$F?7$?$J(B tip $B%A%'%s%8%;%C%H$H$J$j$^$9!#(B
 394.425 +$B%3%_%C%H$N7k2L!"(B
 394.426 +$B%j%]%8%H%j$K$O;R$r;}$?$J$$%A%'%s%8%;%C%H$,#2$DB8:_$7!"(B
 394.427 +$B$3$l$i$O(B \emph{head} $B$H8F$P$l$^$9!#(B
 394.428 +$B$3$N>u67$r?^(B~\ref{fig:concepts:wdir-branch} $B$K<($7$^$9!#(B
 394.429 +
 394.430 +\begin{figure}[ht]
 394.431 +  \centering
 394.432 +  \grafix{wdir-branch}
 394.433 +  \caption{After a commit made while synced to an older changeset}
 394.434 +  \label{fig:concepts:wdir-branch}
 394.435 +\end{figure}
 394.436 +
 394.437 +\begin{note}
 394.438 +  Mercurial $B$KFk@w$_$NL5$$J}$O!"(B
 394.439 +  $B0z?tL5$7$G(B \hgcmd{pull} $B%3%^%s%I$r<B9T$7$?>l9g$N!"(B
 394.440 +  $BNI$/$"$k!V4V0c$$!W$r5$$KN1$a$FCV$$$F$/$@$5$$!#(B
 394.441 +  \hgcmd{pull} $B%3%^%s%I$N4pDlF0:n$O!"(B
 394.442 +  $B:n6HNN0h%G%#%l%/%H%j$N99?7$r(B\emph{$B9T$$$^$;$s(B}$B$N$G!"(B
 394.443 +  $B%j%]%8%H%j$X$N?75,%A%'%s%8%;%C%H$N<h$j9~$_$O9T$o$l$F$b!"(B
 394.444 +  $B:n6HNN0h%G%#%l%/%H%j$O(B \hgcmd{pull} $B%3%^%s%I<B9TA0$N$^$^$G$9!#(B
 394.445 +  $B:n6HNN0h%G%#%l%/%H%j$OEv3:;~E@$G$N(B tip $B$HF14|$7$F$$$J$$$?$a!"(B
 394.446 +  \hgcmd{pull} $B$N<B9T8e$K2?$i$+$NJQ99$r9T$$%3%_%C%H$7$?>l9g!"(B
 394.447 +  $B7k2L$H$7$F?7$?$J(B head $B$r@8@.$9$k$3$H$K$J$j$^$9!#(B
 394.448 +
 394.449 +  $B3g8LIU$-$G!V4V0c$$!W$H=R$Y$?$N$O!"(B
 394.450 +  $B$3$N>u67$r=$I|$9$k$N$KI,MW$J$3$H$,!"(B
 394.451 +  \hgcmd{merge} $B$7$F$+$i(B \hgcmd{commit} $B$9$l$PNI$$$@$1$@$+$i$G$9!#(B
 394.452 +  $B8@$$49$($k$J$i!"(B
 394.453 +  $B$3$N$h$&$J%1!<%9$OA4A3?<9o$J>u67$G$O$J$$!"$H$$$&$3$H$G$9!#(B
 394.454 +  Mercurial $B$K47$l$F$$$J$$?M$O%S%C%/%j$9$k$+$b$7$l$^$;$s$,!D!#(B
 394.455 +  $B$3$N$h$&$J;vBV$r2sHr$9$kJL$NJ}K!$d!"(B
 394.456 +  $B=i?4<T$K$H$C$F0U30$K46$8$k$3$N$h$&$J?6$kIq$$$r(B Mercurial $B$,$H$kM}M3$K$D$$$F!"(B
 394.457 +  $B8e$[$I@bL@$7$?$$$H;W$$$^$9!#(B
 394.458 +\end{note}
 394.459 +
 394.460 +\subsection{Merging heads}
 394.461 +
 394.462 +\hgcmd{merge} $B%3%^%s%I<B9T$N:]$K!"(B
 394.463 +Mercurial $B$O:n6HNN0h%G%#%l%/%H%j$NBh#1?F$OJQ99$;$:$K!"(B
 394.464 +$BBh#2?F$r%^!<%8BP>]$H$7$F;XDj$7$?%A%'%s%8%;%C%H$KJQ99$7$^$9!#(B
 394.465 +$B$3$NMM;R$r?^(B~\ref{fig:concepts:wdir-merge}$B$K<($7$^$9!#(B
 394.466 +
 394.467 +\begin{figure}[ht]
 394.468 +  \centering
 394.469 +  \grafix{wdir-merge}
 394.470 +  \caption{Merging two heads}
 394.471 +  \label{fig:concepts:wdir-merge}
 394.472 +\end{figure}
 394.473 +
 394.474 +$B#2$D$N%A%'%s%8%;%C%H$K$*$$$F4IM}$5$l$k%U%!%$%k$r%^!<%8$9$k$?$a!"(B
 394.475 +Mercurial $B$O:n6HNN0h%G%#%l%/%H%j$rJQ99$7$^$9!#(B
 394.476 +$BB?>/4JJX2=$7$F@bL@$9$k$H!"(B
 394.477 +$BN>J}$N%A%'%s%8%;%C%H$N(B manifest $B$K4^$^$l$kA4$F$N%U%!%$%k$KBP$7$F!"(B
 394.478 +$B35$M0J2<$N$h$&$K%^!<%8=hM}$,<B;\$5$l$^$9!#(B
 394.479 +
 394.480 +\begin{itemize}
 394.481 +\item $B$I$A$i$N%A%'%s%8%;%C%H$G$b%U%!%$%k$rJQ99$7$F$$$J$$>l9g!"(B
 394.482 +  $B$=$N%U%!%$%k$KBP$7$F$O2?$b9T$o$l$^$;$s!#(B
 394.483 +
 394.484 +\item $B0lJ}$N%A%'%s%8%;%C%H$,JQ99$7$F$$$k%U%!%$%k$r!"(B
 394.485 +  $BB>J}$,JQ99$7$F$$$J$$>l9g!"(B
 394.486 +  $BJQ99FbMF$rH?1G$7$?%U%!%$%k$r:n6HNN0h%G%#%l%/%H%j$KJ#@=$7$^$9!#(B
 394.487 +
 394.488 +\item $B0lJ}$N%A%'%s%8%;%C%H$,:o=|$7$?%U%!%$%k$O!"(B
 394.489 +  $BB>J}$N:o=|$K4X$o$i$:!"(B
 394.490 +  $B:n6HNN0h%G%#%l%/%H%j$+$i:o=|$5$l$^$9!#(B
 394.491 +  
 394.492 +\item $B0lJ}$N%A%'%s%8%;%C%H$,:o=|$7$?%U%!%$%k$r!"(B
 394.493 +  $BB>J}$,JQ99$7$F$$$?>l9g!"(B
 394.494 +  $B%U%!%$%k$NJQ99$H:o=|$N$I$A$i$r:NMQ$9$k$N$+!"(B
 394.495 +  $B%f!<%6$KBP$7$FLd$$9g$o$;$^$9!#(B
 394.496 +
 394.497 +\item $BN>J}$N%A%'%s%8%;%C%H$,%U%!%$%k$rJQ99$7$F$$$k>l9g!"(B
 394.498 +  $BFbMF$N%^!<%87k2L$r%U%!%$%k$KJ]B8$9$k$?$a$K!"(B
 394.499 +  $B30It%^!<%8%W%m%0%i%`$,5/F0$5$l$^$9!#(B
 394.500 +  $B$3$N>l9g!"%f!<%6$K$h$kBPOCE*A`:n$,I,MW$K$J$k$+$b$7$l$^$;$s!#(B
 394.501 +
 394.502 +\item $B0lJ}$N%A%'%s%8%;%C%H$,JQ99$7$F$$$k%U%!%$%k$r!"(B
 394.503 +  $BB>J}$,2~L>$7$?$jJ#@=$7$?$j$7$F$$$k>l9g!"(B
 394.504 +  $BJQ99FbMF$,?7$7$$%U%!%$%k$K$bEAGE$9$k$h$&$K$7$^$9!#(B
 394.505 +
 394.506 +\end{itemize}
 394.507 +
 394.508 +$BB>$K$b:Y$+$$OC(B---$BFC$K%^!<%8$K4X$7$F$O:Y$+$$OC$,Bt;3$"$j$^$9(B---$B$,$"$j$^$9$,!"(B
 394.509 +$B%^!<%8$K4XO"$9$k0lHLE*$J?6$kIq$$$N<oN`$O$3$NDxEY$G$9!#(B
 394.510 +$B$4Mw$NMM$K!"KX$I$N>u67$,A4$/<+F0E*$K=hM}$5$l$^$9$7!"(B
 394.511 +$B<B:]$N%^!<%8$G$bKX$I$N>l9g!"(B
 394.512 +$B>WFM2r>C$N$?$a$NBPOCE*$JF~NOL5$7$K<+F0E*$K40N;$7$^$9!#(B
 394.513 +
 394.514 +$B%^!<%88e$N%3%_%C%H$N:]$K=hM}$5$l$k;vJA$r9M$($k>l9g$O!"(B
 394.515 +$B@h$K$b=R$Y$^$7$?$,!"(B
 394.516 +$B:n6HNN0h%G%#%l%/%H%j$r(B
 394.517 +``$B%3%_%C%H$7$h$&$H$7$F$$$k%A%'%s%8%;%C%H(B''
 394.518 +$B$HB*$($k$H$o$+$j$d$9$$$G$7$g$&!#(B
 394.519 +\hgcmd{merge} $B%3%^%s%I$,40N;$7$?8e$N:n6HNN0h%G%#%l%/%H%j$O!"(B
 394.520 +$B?F%A%'%s%8%;%C%H$r#2$D;}$A!"(B
 394.521 +$B%3%_%C%H$K$h$C$F@8@.$5$l$k?7$?$J%A%'%s%8%;%C%H$O!"(B
 394.522 +$B$3$l$i$r?F%A%'%s%8%;%C%H$H$7$^$9!#(B
 394.523 +
 394.524 +Mercurial $B$G$O7+$jJV$7%^!<%8$9$k$3$H$,2DG=$G$9$,!"(B
 394.525 +Mercurial $B$O$j%S%8%g%s$*$h$S:n6HNN0h%G%#%l%/%H%j$NN>J}$KBP$7$F!"(B
 394.526 +$B0lEY$K#2$D$N?F%j%S%8%g%s$7$+DI@W$G$-$J$$$?$a!"(B
 394.527 +$B8D!9$N%^!<%8$NETEY%3%_%C%H$9$kI,MW$,$"$j$^$9!#(B
 394.528 +$BJ#?t$N%A%'%s%8%;%C%H$N0l3g%^!<%8$O5;=QE*$K$O2DG=$G$7$g$&$,!"(B
 394.529 +$B%f!<%6$,:.Mp$7$?$j!"(B
 394.530 +$B$R$I$/Mp;($J%^!<%8$,9T$o$l$k$G$"$m$&$3$H$OL\$K8+$($F$$$^$9!#(B
 394.531 +
 394.532 +\section{Other interesting design features}
 394.533 +
 394.534 +$B$3$l$^$G$N@a$G!"(B
 394.535 +Mercurial $B$,?.Mj@-$H@-G=$XCm0U?<$/G[N8$rJ'$C$F$$$k$3$H$r@bL@$9$k$?$a$K!"(B
 394.536 +$B@_7W$K$*$1$k:G$b=EMW$JB&LL$N4v$D$+$K>GE@$rEv$F$F$-$^$7$?!#(B
 394.537 +$B$7$+$7!"(B
 394.538 +$B>\:Y;v9`$X$NG[N8$O!"(B
 394.539 +$B$3$l$@$1$KN1$^$j$^$;$s!#(B
 394.540 +Mercurial $B$N9=@.$K$*$$$FI.<T$N8D?ME*$J6=L#$r$=$=$kB&LL$,B??t$"$j$^$9!#(B
 394.541 +$B$3$l$^$G$N(B``big ticket''$B$JB&LL$H$OJL$K!"(B
 394.542 +$B$$$/$D$+$rA*$s$G>\:Y$r@bL@$7$h$&$H;W$$$^$9$N$G!"(B
 394.543 +$B$3$l$i$K6=L#$,$"$l$P!"(B
 394.544 +$BNI$$@_7W$N%7%9%F%`$N9M0F$N:]$KM-MQ$J!"(B
 394.545 +$B$h$jNI$$H/A[$rF@$k$3$H$,$G$-$k$G$7$g$&!#(B
 394.546 +
 394.547 +\subsection{Clever compression}
 394.548 +
 394.549 +Mercurial $B$O%9%J%C%W%7%g%C%H$H:9J,$N$=$l$>$l$KBP$7$F!"(B
 394.550 +$B05=L$,M-8z$G$"$k>l9g$K$O05=L7A<0$GJ]B8$7$^$9!#(B
 394.551 +Mercurial $B$O>o$K%9%J%C%W%7%g%C%H$J$$$7:9J,$N05=L$r(B\emph{$B;n9T(B}$B$7$^$9$,!"(B
 394.552 +$BHs05=L$J>uBV$h$j$b%5%$%:$,>.$5$$>l9g$K8B$j!"(B
 394.553 +$B05=L7A<0$G$NJ]B8$r9T$$$^$9!#(B
 394.554 +
 394.555 +$B$3$N$3$H$O!"(B
 394.556 +$BNc$($P(B \texttt{zip} $B%"!<%+%$%V$d(B JPEG $B2hA|$N$h$&$K!"(B
 394.557 +$B85!905=L7A<0$NFbMF$r;}$D%U%!%$%k$N3JG<$N:]$K!"(B
 394.558 +Mercurial $B$,(B``$BE,@Z$J=hCV(B''$B$r9T$&$3$H0UL#$7$^$9!#(B
 394.559 +$B$3$l$i$N%U%!%$%k$O(B Mercurial $B$K$h$k#2EYL\$N05=L$N:]$K$O!"(B
 394.560 +$B:G=i$N%5%$%:$h$j$bBg$-$/$J$k$N$,0lHLE*$G$9$N$G!"(B
 394.561 +Mercurial $B$O(B \texttt{zip} $B$d(B JPEG $B%U%!%$%k$r$=$N$^$^J]B8$7$^$9!#(B
 394.562 +
 394.563 +$B05=L7A<0$N%U%!%$%k$N%j%S%8%g%s4V$N:9J,$O!"(B
 394.564 +$B0lHLE*$K$O%9%J%C%W%7%g%C%H$h$j$bBg$-$/$J$j$^$9$N$G!"(B
 394.565 +$B$3$N>l9g$G$b(B Mercurial $B$O(B``$BE,@Z$J=hCV(B''$B$r9T$$$^$9!#(B
 394.566 +$B%U%!%$%k$N%9%J%C%W%7%g%C%H$=$N$b$N$rJ]B8$9$k>l9g$N5vMFHO0O$r!"(B
 394.567 +$B:9J,>pJs$N%5%$%:$,D6$($k$3$H$,H=L@$7$?>l9g!"(B
 394.568 +Mercurial $B$O%9%J%C%W%7%g%C%H$rJ]B8$7$^$9$N$G!"(B
 394.569 +$B7+$jJV$7$K$J$j$^$9$,!"(B
 394.570 +$B:9J,$N$_$rJ];}$9$k%b%G%k$h$j$b%G%#%9%/MFNL$,@aLs$G$-$^$9!#(B
 394.571 +
 394.572 +\subsubsection{Network recompression}
 394.573 +
 394.574 +Mercurial $B$O%G%#%9%/$X$NMzNrJ]B8$N:]$K!"(B
 394.575 +$B@-G=$KBP$9$k05=LN($,$=$3$=$3NI9%$G%P%i%s%9$N<h$l$F$$$k(B``$B<}=L(B''
 394.576 +$B!J(Bdeflate$B!K05=L%"%k%4%j%:%`(B
 394.577 +$B!JCxL>$J(B \texttt{zip} $B%"!<%+%$%V7A<0$,F1Ey$N$b$N$r;HMQ$7$F$$$^$9!K(B
 394.578 +$B$r;HMQ$7$F$$$^$9!#(B
 394.579 +$B$7$+$7!"(B
 394.580 +$B%M%C%H%o!<%/1[$7$N%G!<%?E>Aw$N:]$K$O!"(B
 394.581 +Mercurial $B$OMzNr%G!<%?$r05=L$7$^$;$s!#(B
 394.582 +
 394.583 +$B%M%C%H%o!<%/@\B3$,(B HTTP $B7PM3$N>l9g!"(B
 394.584 +Mercurial $B$O%G!<%?DL?.$N7PO)A4BN$r!"(B
 394.585 +$B$h$jNI$$05=LN($rF@$i$l$k05=L%"%k%4%j%:%`(B
 394.586 +$B!J(B\texttt{bzip2} $B05=L$H$7$F9-$/;HMQ$5$l$F$$$k(B
 394.587 +Burrows-Wheeler $B%"%k%4%j%:%`!K$G:F05=L$7$^$9!#(B
 394.588 +$B%j%S%8%g%s>pJs8DJL$N05=L$G$O$J$/!"(B
 394.589 +\texttt{bzip2} $B%"%k%4%j%:%`$HDL?.7PO)A4BN$N05=L$H$$$&AH$_9g$o$;$K$9$k$3$H$G!"(B
 394.590 +$BE>Aw%G!<%?NL$rBgI}$KDc8:$9$k$3$H$,$G$-$^$9$N$G!"(B
 394.591 +$BKX$IA4$F$N%M%C%H%o!<%/7ABV$K$*$$$FNI9%$J@-G=$rH/4x$G$-$^$9!#(B
 394.592 +
 394.593 +$B!J(B\command{ssh} $B$G$N@\B3$N>l9g!"(B
 394.594 +\command{ssh} $B<+?H$,05=L$r9T$&$3$H$,$G$-$k$N$G!"(B
 394.595 +Mercurial $B$O@\B37PO)$N:F05=L$r(B\emph{$B9T$$$^$;$s(B}
 394.596 +\footnote{$BLuCm(B: $BLu<T$N7P83$G$O!"(B
 394.597 +$B%5!<%PB&$N(B Python $B$,(B zlib $B$r;HMQ$G$-$J$$>l9g!"(B
 394.598 +ssh $B$G$N(B push/pull $B$,5!G=$7$J$+$C$?$N$G!"(B
 394.599 +Mercurial $B$N%5%$%H$K$bF1MM$N5-=R$,$"$j$^$9$,!"(B
 394.600 +$B$3$N5-=R$O>/!9DTjm$,9g$o$J$$5$$,$7$^$9!#(B}$B!K(B
 394.601 +
 394.602 +\subsection{Read/write ordering and atomicity}
 394.603 +
 394.604 +$BIT40A4$J=q$-9~$_FbMF$,MxMQ$5$l$k$3$H$N$J$$$h$&$KJ]>Z$9$k>e$G$O!"(B
 394.605 +$B%U%!%$%k$X$NDI2C=q$-9~$_$@$1$,A4$F$G$O$"$j$^$;$s!#(B
 394.606 +$B$b$&0lEY!"?^(B~\ref{fig:concepts:metadata}$B$r8+$F$$$?$@$1$l$P$o$+$k$h$&$K!"(B
 394.607 +changelog $BCf$N%j%S%8%g%sMWAG$O(B manifest $BCf$N%j%S%8%g%sMWAG$r!"(B
 394.608 +manifest $BCf$N%j%S%8%g%sMWAG$O(B filelog $BCf$N%j%S%8%g%sMWAG$r;X$7$F$$$^$9!#(B
 394.609 +$B$3$N3,AX9=B$$O0U?^E*$J$b$N$J$N$G$9!#(B
 394.610 +
 394.611 +$B%G!<%?=q$-9~$_$N:]$K$O!"(B
 394.612 +filelog $B$*$h$S(B manifest $B$X$N=q$-9~$_$G%H%i%s%6%/%7%g%s$,3+;O$5$l!"(B
 394.613 +$B$3$l$i$X$N=q$-9~$_$,40N;$9$k$^$G$O(B
 394.614 +changelog $B$X$N=q$-9~$_$O9T$o$l$^$;$s!#(B
 394.615 +$BFI$_9~$_$N:]$K$O!"(B
 394.616 +changelog $B$r5/E@$H$7$F(B manifest$B!"(Bfilelog $B$N=g=x$GFI$_9~$_$r9T$$$^$9!#(B
 394.617 +
 394.618 +changelog $B$X$N=q$-9~$_$K@hN)$C$F!"(B
 394.619 +$B>o$K(B filelog $B$*$h$S(B manifest $B$X$N=q$-9~$_$,40N;$7$F$$$k$N$G!"(B
 394.620 +changelog $B$+$i$NIT40A4$J(B manifest $B$X$N;2>H$rFI$_9~$`$3$H$b!"(B
 394.621 +manifest $B$+$i$NIT40A4$J(B filelog $B$X$N;2>H$rFI$_9~$`$3$H$b$"$j$^$;$s!#(B
 394.622 +
 394.623 +\subsection{Concurrent access}
 394.624 +
 394.625 +$BFI$_=q$-<j=g$HIT2DJ,@-J]>Z$K$h$j!"(B
 394.626 +$BNc$(FI$_9~$_$N:GCf$K=q$-9~$_$,9T$o$l$k$H$7$F$b!"(B
 394.627 +Mercurial $B$OFI$_9~$_$K$*$1$k%j%]%8%H%j$N(B\emph{$BGSB>(B}$B$rI,MW$H$7$^$;$s!#(B
 394.628 +$B$3$NFC@-$OBg5,LO2=$N:]$KHs>o$K1F6A$,$"$j$^$9!#(B
 394.629 +$BG$0U$N?t$N(B Mercurial $B%W%m%;%9$,!"(B
 394.630 +$B=q$-=P$7%W%m%;%9$NM-L5$K4X$o$i$:!"(B
 394.631 +$B%j%]%8%H%j$KBP$7$FF1;~FI$_=P$7$r0BA4$K9T$&$3$H$,$G$-$^$9!#(B
 394.632 +
 394.633 +$BFI$_=P$7$K$*$1$kGSB>ITMW$NFC@-$O!"(B
 394.634 +$BB?%f!<%6%7%9%F%`>e$G%j%]%8%H%j$r8x3+$7$F$$$k:]$K!"(B
 394.635 +$BJ#@=!J(B\hgcmd{clone}$B!K$dJQ99$N<h$j9~$_!J(B\hgcmd{pull}$B!K$N$?$a$K!"(B
 394.636 +$BB>$N%f!<%6$K!J$"$J$?$N!K(B
 394.637 +$B%j%]%8%H%j$X$N(B\emph{$B=q$-9~$_(B}$B$r5v2D$9$kI,MW(B\footnote{$BLuCm(B:
 394.638 +$B%W%m%;%94V$GGSB>$r9T$&>l9g!"(B
 394.639 +$BGSB>MQ$N%U%!%$%k$rMQ$$$k$+!"(B
 394.640 +$B%G%#%l%/%H%j$=$N$b$N$KGSB>@_Dj$r9T$&$N$,0lHLE*$G$9$,!"(B
 394.641 +$B$=$N$?$a$K$O=q$-9~$_8"8B$,I,MW$G$9!#(B}
 394.642 +$B$,L5$$$3$H$r0UL#$7$^$9!#(B
 394.643 +$BFI$_=P$7$r9T$&B>$N%f!<%6$K$O!"(B
 394.644 +\emph{$BFI$_=P$7(B}$B8"8B$N$_$N8x3+$G:Q$_$^$9(B
 394.645 +$B!J$3$N@-<A$O9=@.4IM}%7%9%F%`$K6&DL$NFC@-$G$O(B\emph{$B$"$j$^$;$s(B}$B$N$G!"(B
 394.646 +$B0lHLE*$J$b$N$@$H$O;W$o$J$$$G$/$@$5$$!#(B
 394.647 +$BB?$/$N9=@.4IM}%7%9%F%`$G$O!"(B
 394.648 +$BFI$_=P$7%f!<%6$G$"$C$F$b!"(B
 394.649 +$B0BA4$JFI$_=P$7$N$?$a$K$O%j%]%8%H%j$rGSB>$9$k8"8B$,I,MW$G$"$j!"(B
 394.650 +$B$=$N$?$a$K$O:GDc$G$b#1$D$N%G%#%l%/%H%j$KBP$9$k=q$-9~$_8"8B$,I,MW$J$?$a!"(B
 394.651 +$B0BA4@-$H4IM}>e$GLLE]$JLdBj$N860x$H$J$jF@$^$9!#!K!#(B
 394.652 +
 394.653 +Mercurial $B$,GSB>$r9T$&$N$O!"(B
 394.654 +$B0lEY$K#1$D$N%W%m%;%9$N$_$,%j%]%8%H%j$K=q$-9~$`$N$rJ]>Z>l9g$@$1$G$9(B
 394.655 +$B!JGSB>$KE,$5$J$$$H8@$o$l$k(B NFS $B$N$h$&$J%U%!%$%k%7%9%F%`(B\footnote{$BLuCm(B:
 394.656 +$B9=@.4IM}%7%9%F%`$K8B$i$:!"(B
 394.657 +$BGSB>$N<B8=$K(B <code>creat(EXCL)</code> 
 394.658 +$B$G@8@.$5$l$k%U%!%$%k$r;HMQ$7$F$$$k$?$a$K!"(B
 394.659 +NFS $B$G$OE,@Z$KGSB>$G$-$J$$%W%m%0%i%`$,B??tB8:_$7$^$9!#(B
 394.660 +}$B$G$"$C$F$b!"(B
 394.661 +$B0BA4$KGSB>$G$-$k;EAH$_$rMQ$$$F$$$^$9!K!#(B
 394.662 +$B%j%]%8%H%j$,B>$N%W%m%;%9$K$h$jGSB>$5$l$F$$$k>l9g!"(B
 394.663 +$B=q$-9~$_$r9T$&%W%m%;%9$O!"(B
 394.664 +$B%j%]%8%H%j$NGSB>$,2r=|$5$l$k$^$G;C$/BT$C$F:FEYGSB>$r;n9T$7$^$9$,!"(B
 394.665 +$BD9;~4V$KEO$C$FGSB>$5$l$?$^$^$N>l9g$O!"(B
 394.666 +$B;~4V@Z$l$H$_$J$5$l$^$9!#(B
 394.667 +$B$=$N$?$a!"(B
 394.668 +$BNc$($P?MCN$l$:%7%9%F%`$,Dd;_$7$?$H$7$F$b!"(B
 394.669 +$B<+F02=$5$l$?F|<!=hM}$,Dd;_$7$?$^$^$K$J$C$?$j!"(B
 394.670 +$BDd;_$7$J$$=hM}$,<!!9$H@Q$_>e$,$C$?$j$9$k$3$H$O$"$j$^$;$s!#(B
 394.671 +
 394.672 +\subsubsection{Safe dirstate access}
 394.673 +
 394.674 +dirstate $B7A<0%U%!%$%k$+$i$N%j%S%8%g%s>pJs$NFI$_=P$7$K:]$7$F!"(B
 394.675 +Mercurial $B$O%U%!%$%k$KBP$9$kGSB>$r9T$C$?$j$O$;$:!"(B
 394.676 +$B=q$-9~$_$N:]$K$N$_GSB>$r9T$$$^$9!#(B
 394.677 +$BIT40A4$J=q$-9~$_$r(B 
 394.678 +dirstate $B7A<0%U%!%$%k$+$iFI$_=P$7$F$7$^$&$3$H$r2sHr$9$k$?$a!"(B
 394.679 +Mercurial $B$O(B 
 394.680 +$BBP>](B dirstate $B7A<0%U%!%$%k$HF1$8%G%#%l%/%H%j$KFCM-$NL>A0$G%U%!%$%k$r=q$-=P$7!"(B
 394.681 +$B$3$N0l;~%U%!%$%k$r(B \filename{dirstate}
 394.682 +$B%U%!%$%k$X$HIT2DJ,$JA`:n$G2~L>$7$^$9!#(B
 394.683 +$B$=$N$?$a!"(B
 394.684 +\filename{dirstate} $B$H$$$&!VL>A0$N!W%U%!%$%k$O!"(B
 394.685 +$BIT40A4$J=q$-9~$_$r;}$?$J$$40A4$JFbMF$G$"$k$3$H$,J]>Z$5$l$^$9!#(B
 394.686 +
 394.687 +\subsection{Avoiding seeks}
 394.688 +
 394.689 +$BHf3SE*BgNL$N%G!<%?FI$_9~$_=hM}$KBP$7$F$9$i!"(B
 394.690 +$B%G%#%9%/%X%C%I$N%7!<%/$OHs>o$K%3%9%H$,9b$/$D$/$?$a!"(B
 394.691 +Mercurial $B$N@-G=3NJ]$N=EMW$JE@$O!"(B
 394.692 +$B%G%#%9%/%X%C%I$N%7!<%/$r6KNO2sHr$9$k$3$H$K$"$j$^$9!#(B
 394.693 +
 394.694 +$BNc$($P(B dirstate $B7A<0$N$h$&$J%G!<%?$,!"(B
 394.695 +$BC10l$N%U%!%$%k$KJ]B8$5$l$kM}M3$,$3$3$K$"$j$^$9!#(B
 394.696 +Mercurial $B$K$h$j9=@.4IM}$5$l$k%G%#%l%/%H%j$4$H$K(B
 394.697 +\filename{dirstate} $B%U%!%$%k$,B8:_$9$k>l9g$O!"(B
 394.698 +$B%G%#%l%/%H%j$4$H$K%G%#%9%/%X%C%I$N%7!<%/$,H/@8$7F@$^$9!#(B
 394.699 +$B$=$N$h$&$J%G%#%9%/%X%C%I$N%7!<%/$r2sHr$9$k$?$a$K!"(B
 394.700 +Mercurial $B$O0lEY$KC10l$N(B
 394.701 +\filename{dirstate} $B%U%!%$%kA4BN$rFI$_9~$_$^$9(B\footnote{$BLuCm(B:
 394.702 +$B%G%#%9%/$NMxMQ$,?J$s$G6u$-%V%m%C%/$,CGJR2=$5$l$?>l9g!"(B
 394.703 +$BITO"B3$J%V%m%C%/$,3d$jEv$F$i$l$^$9$+$i!"(B
 394.704 +$BI,$:$7$b!VC10l%U%!%$%k!W!a!V%X%C%I$N%7!<%/$,2sHr2DG=!W$G$O$"$j$^$;$s$,!"(B
 394.705 +$B>/$J$/$H$b!V%X%C%I$N%7!<%/$rDc8:!W$9$k$3$H$O2DG=$G$9!#(B}$B!#(B
 394.706 +
 394.707 +$B%m!<%+%k%9%H%l!<%8$K$*$1$k%j%]%8%H%j$NJ#@=$N:]$K$O!"(B
 394.708 +Mercurial $B$O(B``$B=q$-=P$7;~J#@=(B''$B$N;EAH$_$b;HMQ$7$^$9!#(B
 394.709 +$BJ#@=85%j%]%8%H%j$+$iJ#@=@h$K8D!9$N(B revlog $B%U%!%$%k$rJ#@=$9$kBe$o$j$K!"(B
 394.710 +``$B%O!<%I%j%s%/(B''$B$r;HMQ$9$k$3$H$G!"(B
 394.711 +``$B#2$D$N%U%!%$%kL>$,F10lFbMF$N%U%!%$%k$r;2>H(B''
 394.712 +$B$9$k$3$H$r<jAa$/I=L@$7$^$9!#(B
 394.713 +$B0lJ}$N(B revlog $B%U%!%$%k$K=q$-9~$_$r9T$&:]$K$O!"(B
 394.714 +Mercurial $B$OEv3:%U%!%$%k$N%O!<%I%j%s%/$r3NG'$7$^$9!#(B
 394.715 +$BEv3:%U%!%$%k$,J#?t$N%j%]%8%H%j$+$i;2>H$5$l$$$F$$$k>l9g!"(B
 394.716 +Mercurial $B$OEv3:%j%]%8%H%jMQ$K(B revlog $B$N?7$?$JJ#@=$r:n@.$7$^$9!#(B
 394.717 +
 394.718 +$B2??M$+$N9=@.4IM}%D!<%k$N3+H/<T$K$h$j!"(B
 394.719 +$B$3$NJ}K!(B---
 394.720 +$B40A4$K%j%]%8%H%j8GM-$N$b$N$H$7$F%U%!%$%k$rJ#@=$9$k(B---
 394.721 +$B$,%G%#%9%/;HMQNL:o8:$K$=$l$[$I8z2LE*$G$J$$$H$N;XE&$r<u$1$F$$$^$9!#(B
 394.722 +$B$=$l$O;v<B$G$O$"$j$^$9$,!"(B
 394.723 +$B%G%#%9%/MFNL$N3NJ]$O0B2A$G$"$j!"(B
 394.724 +OS $B$X$NJ#@=MW5a$rCY1d$9$k$3$H$K$h$j9b$$@-G=$rF@$k$3$H$,$G$-$^$9!#(B
 394.725 +$BJL$J;EAH$_$rMQ$$$k>l9g!"(B
 394.726 +$B@-G=$,Dc2<$7%=%U%H%&%'%"$NJ#;($5$,A}$7$^$9$N$G!"(B
 394.727 +$BF|!9$NMxMQ$K$*$1$k(B``$BBN46(B''$B$KHs>o$K1F6A$r5Z$\$7$^$9(B\footnote{$BLuCm(B:
 394.728 +$B$D$^$j!"(B
 394.729 +Mercurial $B$G$N%O!<%I%j%s%/$N;HMQ$O!"(B
 394.730 +$BJ#@=$r9T$&$3$H$K$h$k%G%#%9%/%X%C%I$N%7!<%/$rDc8:$9$k$N$,<g4c$G!"(B
 394.731 +$B%G%#%9%/;HMQNL$NDc8:$,<g4c$G$O$J$$!"(B
 394.732 +$B$H$$$&$3$H$G$9!#(B}$B!#(B
 394.733 +
 394.734 +\subsection{Other contents of the dirstate}
 394.735 +\label{sec:concepts:dirstate}
 394.736 +
 394.737 +$B%U%!%$%k$NJQ99$N:]$N(B Mercurial $B$X$NDLCN$,I,MW$J$$$3$H$+$i!"(B
 394.738 +$B%U%!%$%kJQ99$NM-L5$r8zN(E*$KH=Dj$9$k$?$a$K!"(B
 394.739 +$BFCJL$J>pJs$r3JG<$7$?(B dirstate $B7A<0%U%!%$%k$r;HMQ$7$^$9!#(B
 394.740 +$B:n6HNN0h%G%#%l%/%H%jCf$NA4$F$N%U%!%$%k$KBP$7$F!"(B
 394.741 +Mercurial $B$O%U%!%$%k$N:G=*JQ99F|;~$H$=$N;~E@$G$N%5%$%:$r(B
 394.742 +dirstate $B7A<0%U%!%$%k$K3JG<$7$F$$$^$9!#(B
 394.743 +
 394.744 +\hgcmd{add}$B!"(B\hgcmd{remove}$B!"(B\hgcmd{rename} $B$J$$$7(B
 394.745 +\hgcmd{copy} $B$rL@<(E*$K;HMQ$7$?>l9g!"(B
 394.746 +Mercurial $B$O$3$N>pJs$r99?7$7$^$9$N$G!"(B
 394.747 +$B%3%_%C%H;~$N?6$kIq$$$rFCDj$G$-$^$9!#(B
 394.748 +
 394.749 +Mercurial $B$,:n6HNN0h%G%#%l%/%H%jCf$N%U%!%$%k$r3NG'$9$k>l9g!"(B
 394.750 +$B:G=i$K%U%!%$%k$NJQ99F|;~$r3NG'$7$^$9!#(B
 394.751 +$BJQ99F|;~$,F10l$J$i$P!"%U%!%$%k$OJQ99$5$l$F$$$J$$H&$G$9!#(B
 394.752 +$B%U%!%$%k%5%$%:$,0[$J$C$F$$$k$J$i$P!"%U%!%$%k$OJQ99$5$l$F$$$kH&$G$9!#(B
 394.753 +$BJQ99F|;~$,0[$J$C$F$$$k$N$K%U%!%$%k%5%$%:$,F10l$N>l9g$K$N$_!"(B
 394.754 +$B%U%!%$%k$NFbMF$,0[$J$C$F$$$k$+H]$+$rH=Dj$9$k$?$a$K(B
 394.755 +Mercurial $B$O<B:]$K%U%!%$%k$NFbMF$rFI$_9~$_$^$9(B\footnote{$BLuCm(B:
 394.756 +Windows $B4D6-$G$N2~9TJQ49$r9T$C$F$$$k$h$&$J>l9g!"(B
 394.757 +$B%P%$%J%jHG$H%=!<%9HG$G%U%!%$%k%5%$%:$N;;=P<j=g$K0c$$$,$"$k$i$7$/!"(B
 394.758 +\hgcmd{diff} $B$,2?$b=PNO$7$J$$$N$K!"(B
 394.759 +\hgcmd{state} $B$G$O!VJQ99!W07$$$5$l$k$3$H$,5)$K$"$j$^$9!#(B}$B!#(B
 394.760 +$B$3$N$h$&$K6O$+$JDI2C>pJs$r3JG<$9$k$3$H$G!"(B
 394.761 +Mercurial $B$,I,MW$H$9$kFI$_9~$_%G!<%?NL$r7`E*$K8:$i$9$3$H$,$G$-!"(B
 394.762 +$BB>$N9=@.4IM}%7%9%F%`$HHf3S$7$FBgI}$K@-G=$,2~A1$5$l$F$$$^$9!#(B
 394.763 +
 394.764 +%%% Local Variables: 
 394.765 +%%% mode: latex
 394.766 +%%% TeX-master: "00book"
 394.767 +%%% End:
   395.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   395.2 +++ b/ja/custom.sty	Sun Aug 16 03:41:39 2009 +0200
   395.3 @@ -0,0 +1,67 @@
   395.4 +\newlength\kanjicharwidth
   395.5 +\settowidth{\kanjicharwidth}{$B$"(B}
   395.6 +
   395.7 +\newlength\kanjicharheight
   395.8 +\settoheight{\kanjicharheight}{$B$"(B}
   395.9 +
  395.10 +% in 10pt/jbook environment:
  395.11 +% kanjicharwidth=9.62216pt(= Cwd)
  395.12 +% kanjicharheight=7.77588pt
  395.13 +
  395.14 +\setlength{\intextsep}{3.0\kanjicharheight}
  395.15 +\setlength{\textfloatsep}{3.0\kanjicharheight}
  395.16 +
  395.17 +\newlength\defaultleftmargin
  395.18 +\setlength{\defaultleftmargin}{2.0\kanjicharwidth}
  395.19 +
  395.20 +\newlength\defaultrightmargin
  395.21 +\setlength{\defaultrightmargin}{2.0\kanjicharwidth}
  395.22 +
  395.23 +\newlength\defaulttopsep
  395.24 +\setlength{\defaulttopsep}{2.0\kanjicharheight}
  395.25 +
  395.26 +\setlength{\voffset}{-20mm}
  395.27 +\addtolength{\textheight}{30mm} %
  395.28 +\setlength{\hoffset}{-10mm}
  395.29 +\setlength{\oddsidemargin}{-8mm}
  395.30 +\setlength{\evensidemargin}{-8mm}
  395.31 +\addtolength{\textwidth}{16mm}
  395.32 +
  395.33 +%%%%%%%%%%%%%%%%%%%%
  395.34 +
  395.35 +\renewenvironment{itemize}{
  395.36 +  \ifnum \@itemdepth >\thr@@\@toodeep\else
  395.37 +    \advance\@itemdepth\@ne
  395.38 +    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}
  395.39 +    \list{
  395.40 +      \csname \@itemitem\endcsname
  395.41 +    }{
  395.42 +      \def\makelabel##1{\hss\llap{##1}}
  395.43 +      \setlength{\leftmargin}{\defaultleftmargin}
  395.44 +      \setlength{\rightmargin}{\defaultrightmargin}
  395.45 +      \setlength{\topsep}{\defaulttopsep}
  395.46 +    }
  395.47 +  \fi
  395.48 +}{
  395.49 +  \endlist
  395.50 +}
  395.51 +
  395.52 +\renewenvironment{enumerate}{
  395.53 +  \ifnum \@enumdepth >\thr@@\@toodeep\else
  395.54 +    \advance\@enumdepth\@ne
  395.55 +    \edef\@enumctr{enum\romannumeral\the\@enumdepth}
  395.56 +    \list{
  395.57 +      \csname label\@enumctr\endcsname
  395.58 +    }{
  395.59 +      \usecounter{\@enumctr}
  395.60 +      \def\makelabel##1{\hss\llap{##1}}
  395.61 +      \setlength{\leftmargin}{\defaultleftmargin}
  395.62 +      \setlength{\rightmargin}{\defaultrightmargin}
  395.63 +      \setlength{\topsep}{\defaulttopsep}
  395.64 +    }
  395.65 +  \fi
  395.66 +}{
  395.67 +  \endlist
  395.68 +}
  395.69 +
  395.70 +%%%%%%%%%%%%%%%%%%%%
   396.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   396.2 +++ b/ja/daily.tex	Sun Aug 16 03:41:39 2009 +0200
   396.3 @@ -0,0 +1,533 @@
   396.4 +\chapter{Mercurial in daily use}
   396.5 +\label{chap:daily}
   396.6 +
   396.7 +\section{Telling Mercurial which files to track}
   396.8 +
   396.9 +$B%U%!%$%k$N4IM}$r;X<($7$J$$8B$j!"(B
  396.10 +$B%j%]%8%H%jCf$N%U%!%$%k$KBP$7$F(B Mercurial $B$O2?$b9T$$$^$;$s!#(B
  396.11 +\hgcmd{status} $B%3%^%s%I$O!"(B
  396.12 +Mercurial $B$N4IM}2<$KL5$$%U%!%$%k$r(B
  396.13 +``\texttt{?}'' $B$rI=<($9$k$3$H$GCN$i$;$F$/$l$^$9(B
  396.14 +
  396.15 +Mercurial $B$K$h$k9=@.4IM}$r;X<($9$k$K$O!"(B
  396.16 +\hgcmd{add} $B%3%^%s%I$r;HMQ$7$^$9!#(B
  396.17 +$B%U%!%$%k$N9=@.4IM}$r;X<($7$?%U%!%$%k$N(B
  396.18 +\hgcmd{status} $B$K$h$kI=<($O!"(B
  396.19 +``\texttt{?}'' $B$+$i(B ``\texttt{A}'' $B$X$HJQ2=$7$^$9!#(B
  396.20 +
  396.21 +\interaction{daily.files.add}
  396.22 +
  396.23 +\hgcmd{commit} $B$r<B9T$7$?D>8e$O!"(B
  396.24 +$B%3%_%C%HA0$KDI2C$7$?%U%!%$%k$,(B
  396.25 +\hgcmd{status} $B$K$h$jI=<($5$l$k$3$H$O$"$j$^$;$s!#(B
  396.26 +$B$3$l$O!"(B
  396.27 +``$B6=L#?<$$(B''$B%U%!%$%k(B---
  396.28 +$BJQ99$7$?$j!"(BMercurial $B$K2?$i$+$NA`:n$rMW5a$7$?%U%!%$%k(B
  396.29 +---$B$K$D$$$FI=<($9$k$N$,(B
  396.30 +\hgcmd{status} $B$NLr3d$@$+$i$G$9!#(B
  396.31 +$B?t@i$N%U%!%$%k$+$i@.$k%j%]%8%H%j$,$"$k>l9g!"(B
  396.32 +$B9=@.4IM}$5$l$F$O$$$F$bFC$KJQ99$5$l$F$$$J$$%U%!%$%k$N0lMw(B
  396.33 +$B!J8e=R$9$k$h$&$K!"$=$N$h$&$J%U%!%$%k0lMw$N>pJs$rF@$k$3$H$b$G$-$^$9!K(B
  396.34 +$B$rM_$7$$$H;W$&$3$H$O5)$G$9!#(B
  396.35 +
  396.36 +$B0lC6%U%!%$%k$rDI2C$7$?$H$7$F$b!"(B
  396.37 +$B$=$N%U%!%$%k$KBP$7$F(B Mercurial $B$O$9$0$K$O2?$b9T$$$^$;$s!#(B
  396.38 +$B$=$NBe$o$j!"(B
  396.39 +$B<!$K%3%_%C%H$r9T$C$?:]$K%U%!%$%k>uBV$N%9%J%C%W%7%g%C%H$r:n@.$7$^$9!#(B
  396.40 +Mercurial $B$O$=$l0J9_!"(B
  396.41 +$B9=@.4IM}2<$+$i=|30$9$k$^$G!"(B
  396.42 +$B%3%_%C%H$N:]$K$O>o$KEv3:%U%!%$%k$NJQ99>u67$r3NG'$7$^$9!#(B
  396.43 +
  396.44 +\subsection{Explicit versus implicit file naming}
  396.45 +
  396.46 +Mercurial $B$NM-MQ$J?6$kIq$$$H$7$F!"(B
  396.47 +Mercurial $B$N%3%^%s%I$K%G%#%l%/%H%jL>$r;XDj$7$?>l9g!"(B
  396.48 +$B$=$N;XDj$r(B
  396.49 +``$BEv3:%G%#%l%/%H%jG[2<$NA4$F$N%U%!%$%k(B\footnote{$BLuCm(B:
  396.50 +$BEv3:%G%#%l%/%H%jD>2<$N%U%!%$%k$J$i$S$K!"(B
  396.51 +$B%5%V%G%#%l%/%H%j0J2<$N%U%!%$%kA4$F(B}$B$KBP$9$kA`:n$N<B;\(B''
  396.52 +$B$,MW5a$5$l$?$b$N$H$_$J$7$^$9!#(B
  396.53 +
  396.54 +\interaction{daily.files.add-dir}
  396.55 +
  396.56 +$B@h$NNc$G(B \filename{a} 
  396.57 +$B%U%!%$%k$r9=@.4IM}BP>]$KDI2C$7$?:]$K$O!"(B
  396.58 +Mercurial $B$ODI2C$5$l$?%U%!%$%k$N%U%!%$%kL>$rI=<($7$F$$$^$;$s$,!"(B
  396.59 +$B$3$NNc$G$O(B
  396.60 +$B9=@.4IM}BP>]$KDI2C$5$l$?%U%!%$%k$rI=<($7$F$$$kE@$KCm0U$7$F$/$@$5$$!#(B
  396.61 +
  396.62 +$B@h$NNc$G$O!"(B
  396.63 +$BDI2C$9$k%U%!%$%kL>$r%3%^%s%I%i%$%s$GL@<(E*$K;XDj$7$^$7$?$N$G!"(B
  396.64 +$B$=$N$h$&$J>l9g$OMxMQ<T<+?H$,<+J,$N?6$kIq$$$rM}2r$7$F$$$k$b$N$H$_$J$7!"(B
  396.65 +Mercurial $B$O2?$bI=<($7$^$;$s!#(B
  396.66 +
  396.67 +$B$7$+$7!"(B
  396.68 +$B%G%#%l%/%H%jL>$r;XDj$9$k$3$H$G%U%!%$%kL>$r(B\emph{$B0E<((B}$B$7$?>l9g!"(B
  396.69 +Mercurial $B$OFCJL$KA`:nBP>]$H$J$C$?8D!9$N%U%!%$%kL>$rI=<($7$^$9!#(B
  396.70 +$B$3$&$9$k$3$H$G2?$,<B;\$5$l$?$N$+$,L@3N$K$J$k$?$a!"(B
  396.71 +$B$R$C$=$j$H$d$C$+$$$JLdBj$,H/@8$9$k2DG=@-$rDc8:$7$^$9!#(B
  396.72 +$B$3$N?6$kIq$$$OKX$I$N(B
  396.73 +Mercurial $B%3%^%s%I$K6&DL$7$F$$$^$9!#(B
  396.74 +
  396.75 +\subsection{Aside: Mercurial tracks files, not directories}
  396.76 +
  396.77 +$B%G%#%l%/%H%j$O(B Mercurial $B$K$h$k9=@.4IM}$NBP>]$K$O$J$j$^$;$s!#(B
  396.78 +$B$=$NBe$o$j!"(B
  396.79 +Mercurial $B$O%U%!%$%k$N%Q%9$r9=@.4IM}$7$^$9!#(B
  396.80 +$B%U%!%$%k$N@8@.$N:]$K$O!"(B
  396.81 +$B$=$l$K@hN)$C$F%Q%9$K4^$^$l$kB8:_$7$J$$%G%#%l%/%H%j$rA4$F:n@.$7$^$9!#(B
  396.82 +$B%U%!%$%k$N:o=|$N:]$K$O!"(B
  396.83 +$B:o=|$5$l$?%U%!%$%k$X$N%Q%9$K4^$^$l$k6u%G%#%l%/%H%j$rA4$F:o=|$7$^$9!#(B
  396.84 +$B$?$o$$$bL5$$$3$H$KJ9$3$($k$+$b$7$l$^$;$s$,!"(B
  396.85 +Mercurial $B$,40A4$K6u$C$]$N%G%#%l%/%H%j$r<h$j07$($J$$!"(B
  396.86 +$B$H$$$&>.$5$$$J$,$i$b<BMQ>e=EBg$J@-<A$r<($7$F$$$^$9!#(B
  396.87 +
  396.88 +$B6u$N%G%#%l%/%H%j$,M-MQ$J$3$H$OLGB?$KL5$$$G$9$7!"(B
  396.89 +$BBEEv$J8z2L$rF@$k$?$a$N95$($a$J2sHrJ}K!$,$"$j$^$9!#(B
  396.90 +Empty directories are rarely useful, and there are unintrusive
  396.91 +workarounds that you can use to achieve an appropriate effect.  
  396.92 +$B$=$l8N$K!"(B
  396.93 +$B6u$N%G%#%l%/%H%j$r07$&$3$H$K$h$k8BDjE*$JM-1W@-$,!"(B
  396.94 +$B$=$l$KI,MW$H$5$l$kJ#;($5$K8+9g$&$b$N$G$O$J$$!"(B
  396.95 +$B$H(B Mercurial $B$N3+H/?X$OH=CG$7$^$7$?!#(B
  396.96 +
  396.97 +$B6u$N%G%#%l%/%H%j$r%j%]%8%H%j$G4IM}$7$?$$>l9g!"(B
  396.98 +$BJ#?t$N<B8=J}K!$,$"$j$^$9!#(B
  396.99 +$B#1$D$OEv3:%G%#%l%/%H%jD>2<$N(B``$B1#$7(B''$B%U%!%$%k$r(B 
 396.100 +\hgcmd{add} $B$9$k$3$H$G$9!#(B
 396.101 +UNIX $B%i%$%/$J%7%9%F%`$G$O!"(B
 396.102 +$B%T%j%*%I!J(B``\texttt{.}''$B!K$G;O$^$kL>A0$N%U%!%$%k$O!"(B
 396.103 +$BKX$I$N%3%^%s%I$d(B GUI $B%D!<%k$+$i1#$7%U%!%$%k$H$7$F07$o$l$^$9!#(B
 396.104 +$B$3$N<jK!$r?^(B~\ref{ex:daily:hidden}$B$K<($7$^$9!#(B
 396.105 +
 396.106 +\begin{figure}[ht]
 396.107 +  \interaction{daily.files.hidden}
 396.108 +  \caption{Simulating an empty directory using a hidden file}
 396.109 +  \label{ex:daily:hidden}
 396.110 +\end{figure}
 396.111 +
 396.112 +$B6u%G%#%l%/%H%j$rI,MW$H$9$k>l9g$N$b$&0l$D$N2r7hJ}K!$O!"(B
 396.113 +$B<+F02=$5$l$?%S%k%I%9%/%j%W%H$GI,MW$K$J$kETEY:n@.$9$k!"(B
 396.114 +$B$H$$$&$b$N$G$9!#(B
 396.115 +
 396.116 +\section{How to stop tracking a file}
 396.117 +
 396.118 +$B%j%]%8%H%j$K$H$C$FITMW$K$J$C$?(B\footnote{$BLuCm(B:
 396.119 +$B9=@.4IM}$NI,MW@-$,$J$/$J$C$?(B}$B%U%!%$%k$,$"$k>l9g$O!"(B
 396.120 +\hgcmd{remove} $B%3%^%s%I$r;HMQ$^$9!#(B
 396.121 +$B$3$N%3%^%s%I$O%U%!%$%k$r:o=|$7$D$D!"(B
 396.122 +Mercurial $B$K9=@.4IM}BP>]$+$i%U%!%$%k$r=|30$9$k;]$rDLCN$7$^$9!#(B
 396.123 +$B:o=|$5$l$?%U%!%$%k$O!"(B
 396.124 +\hgcmd{status} $B$N=PNO$G$O(B
 396.125 +``\texttt{R}'' $BIU$-$GI=<($5$l$^$9!#(B
 396.126 +
 396.127 +\interaction{daily.files.remove}
 396.128 +
 396.129 +\hgcmd{remove} $B$K$h$k%U%!%$%k$N:o=|$r9T$&$H!"(B
 396.130 +$B:n6HNN0h%G%#%l%/%H%j$KF1L>$N%U%!%$%k$r:FEY:n@.$7$?$H$7$F$b!"(B
 396.131 +Mercurial $B$O$=$N%U%!%$%k$r9=@.4IM}BP>]$+$i=|30$7$^$9!#(B
 396.132 +$BF1L>%U%!%$%k$r:F@8@.$7(B Mercurial $B$K$h$k9=@.4IM}$r9T$&>l9g$K$O!"(B
 396.133 +$BC1=c$K$=$N%U%!%$%k$r(B \hgcmd{add} $B$7$F$/$@$5$$!#(B
 396.134 +Mercurial $B$O?75,$K4IM}BP>]$K2C$($i$l$?%U%!%$%k$,!"(B
 396.135 +$B0JA04IM}$7$F$$$?F1L>$N%U%!%$%k$H$OL54X78$G$"$k$H$_$J$7$^$9!#(B
 396.136 +
 396.137 +\subsection{Removing a file does not affect its history}
 396.138 +
 396.139 +$B=EMW$J;v$G$9$N$G!"(B
 396.140 +\hgcmd{remove} $B%3%^%s%I$K$h$kA`:n$,;}$D1F6A$O#2$D$@$1$G$"$k!"(B
 396.141 +$B$HM}2r$7$F$/$@$5$$!#(B
 396.142 +
 396.143 +\begin{itemize}
 396.144 +\item $B:n6HNN0h%G%#%l%/%H%j$+$i!"8=;~E@$N%U%!%$%k$r:o=|$7$^$9(B
 396.145 +
 396.146 +\item Mercurial $B$KBP$7$F!"<!2s$N%3%_%C%H0J9_!"(B
 396.147 +  $BEv3:%U%!%$%k$r9=@.4IM}BP>]$+$i=|30$9$k$h$&$KDLCN$7$^$9(B
 396.148 +
 396.149 +\end{itemize}
 396.150 +
 396.151 +\hgcmd{remove} $B%3%^%s%I$K$h$kA`:n$O!"(B
 396.152 +$B%U%!%$%k$N(B\emph{$BJQ99MzNr(B}$B$K$O0l@ZJQ99$r2C$((B\emph{$B$^$;$s(B}$B!#(B
 396.153 +
 396.154 +$B:n6HNN0h%G%#%l%/%H%j$r(B
 396.155 +\hgcmd{remove} 
 396.156 +$B$G:o=|$7$?%U%!%$%k$,$^$@9=@.4IM}$5$l$F$$$?;~E@$N%A%'%s%8%;%C%H$G99?7$7$?>l9g!"(B
 396.157 +$B$=$N%A%'%s%8%;%C%H$,%3%_%C%H$5$l$?;~E@$NFbMF$G!"(B
 396.158 +$B:n6HNN0h%G%#%l%/%H%j$KEv3:%U%!%$%k$,:F@8@.$5$l$^$9!#(B
 396.159 +$B$=$N8e$G!"(B
 396.160 +$BEv3:%U%!%$%k$,(B \hgcmd{remove} 
 396.161 +$B$G:o=|$5$l$?;~E@$N%A%'%s%8%;%C%H$G99?7$9$k$H!"(B
 396.162 +Mercurial $B$O:F$SEv3:%U%!%$%k$r:n6HNN0h$+$i:o=|$7$^$9!#(B
 396.163 +
 396.164 +\subsection{Missing files}
 396.165 +
 396.166 +\hgcmd{remove} 
 396.167 +$B%3%^%s%I$r;HMQ$;$:$K:n6HNN0h%G%#%l%/%H%j$+$i:o=|$7$?%U%!%$%k$r!"(B
 396.168 +Mercurial $B$O(B\emph{$B9TJ}ITL@(B}$B$H$_$J$7$^$9!#(B
 396.169 +$B9TJ}ITL@$N%U%!%$%k$O!"(B
 396.170 +\hgcmd{status} $B$N=PNO$G$O(B
 396.171 +``\texttt{!}'' $BIU$-$GI=<($5$l$^$9!#(B
 396.172 +Mercurial $B$N%3%^%s%I72A4HL$O!"(B
 396.173 +$B9TJ}ITL@$N%U%!%$%k$K4X$7$F$O2?$b9T$$$^$;$s!#(B
 396.174 +
 396.175 +\interaction{daily.files.missing}
 396.176 +
 396.177 +\hgcmd{status} 
 396.178 +$B$,9TJ}ITL@$H$7$FI=<($9$k%U%!%$%k$,%j%]%8%H%jCf$K$"$k>l9g(B\footnote{$BLuCm(B:
 396.179 +$B$D$^$j<jF0$G%U%!%$%k$r:o=|$7$?>l9g(B}$B!"(B
 396.180 +$B%U%!%$%k:o=|8e$NG$0U$N;~E@$G(B
 396.181 +\hgcmdargs{remove}{\hgopt{remove}{--after}} $B$r<B9T$9$k$3$H$G(B
 396.182 +$BEv3:%U%!%$%k$r9=@.4IM}BP>]$+$i=|30$9$k0U;W$,$"$k$3$H$r(B
 396.183 +Mercurial $B$KDLCN$9$k$3$H$,$G$-$^$9!#(B
 396.184 +
 396.185 +\interaction{daily.files.remove-after}
 396.186 +
 396.187 +$B$=$N0lJ}$G!"(B
 396.188 +$B9TJ}ITL@$H$5$l$F$$$k%U%!%$%k$,0U?^$;$:$K:o=|$7$F$7$^$C$?$b$N$J$i!"(B
 396.189 +\hgcmd{revert} $B$KEv3:%U%!%$%kL>$r;XDj$9$k$3$H$G!"(B
 396.190 +$BJQ99$5$l$F$$$J$$>uBV$K%U%!%$%k$rI|5l$9$k$3$H$,$G$-$^$9!#(B
 396.191 +
 396.192 +\interaction{daily.files.recover-missing}
 396.193 +
 396.194 +\subsection{Aside: why tell Mercurial explicitly to remove a file?}
 396.195 +
 396.196 +$B%U%!%$%k:o=|$N0U;WI=<($r0l!9(B Mercurial $B$K<($9I,MW@-$K$D$$$F!"(B
 396.197 +$B5?Ld$K;W$o$l$k$+$b$7$l$^$;$s!#(B
 396.198 +Mercurial $B$N3+H/=i4|$K$*$1$k:o=|J}K!$O!"(B
 396.199 +$B$=$N$h$&$K;W$&?M$K$H$C$F$OK>$^$7$$$b$N$+$b$7$l$^$;$s!#(B
 396.200 +Mercurial $B$O(B \hgcmd{commit} $B%3%^%s%I<B9T;~$K%U%!%$%k$NIT:_$r<+F0E*$K8!CN$7!"(B
 396.201 +$BEv3:%U%!%$%k$r9=@.4IM}BP>]$+$i=|30$7$F$$$?$N$G$9!#(B
 396.202 +$B<B:]LdBj!"$3$N:o=|J}K!$G$O!"(B
 396.203 +$BITN8$N;vBV$GDLCN$bL5$/%U%!%$%k$,:o=|$5$l$k;vBV$,MF0W$K5/$3$jF@$^$9!#(B
 396.204 +
 396.205 +\subsection{Useful shorthand---adding and removing files in one step}
 396.206 +
 396.207 +Mercurial $B$O!"(B
 396.208 +$B9=@.4IM}BP>]$X$N%U%!%$%k$NDI2C$H=|30$r9T$&!"(B
 396.209 +$BAH$_9g$o$;%3%^%s%I$G$"$k(B \hgcmd{addremove} $B$rDs6!$7$F$$$^$9!#(B
 396.210 +
 396.211 +\interaction{daily.files.addremove}
 396.212 +
 396.213 +\hgcmd{commit} $B%3%^%s%I$b!"(B
 396.214 +$B%3%_%C%H<B;\$ND>A0$K(B
 396.215 +\hgcmd{addremove} $B$HF1$8J}?K$G9=@.4IM}BP>]$X$NDI2C!?=|30$r9T$&(B
 396.216 +\hgopt{commit}{-A} $B%*%W%7%g%s$rDs6!$7$F$$$^$9!#(B
 396.217 +
 396.218 +\interaction{daily.files.commit-addremove}
 396.219 +
 396.220 +\section{Copying files}
 396.221 +
 396.222 +Mercurial $B$O%U%!%$%k$NJ#@=$r9T$&(B
 396.223 +\hgcmd{copy} $B%3%^%s%I$rDs6!$7$F$$$^$9!#(B
 396.224 +$B$3$N%3%^%s%I$G%U%!%$%k$rJ#@=$7$?>l9g!"(B
 396.225 +Mercurial $B$O$=$N%U%!%$%k$,85%U%!%$%k$NJ#@=$G$"$k$3$H$r5-O?$7$^$9!#(B
 396.226 +$B%A%'%s%8%;%C%H$N%^!<%8$N:]$K$O!"(B
 396.227 +Mercurial $B$O$3$NJ#@=%U%!%$%k$rFCJL07$$$7$^$9!#(B
 396.228 +
 396.229 +\subsection{The results of copying during a merge}
 396.230 +
 396.231 +$BJ#@=%U%!%$%k$N%^!<%8$N:]$K$O!"(B
 396.232 +$BJQ99FbMF$,J#@=%U%!%$%k$^$G(B``$BDI=>(B''$B$7$F$-$^$9!#(B
 396.233 +$B$3$N$3$H$,;}$D0UL#$r>e<j$/@bL@$9$k$?$a$K!"(B
 396.234 +$B4JC1$JNc$r:n@.$7$^$7$g$&!#(B
 396.235 +$B$3$l$^$G$NNc$HF1MM$K!"(B
 396.236 +$B#1$D$@$1%U%!%$%k$r;}$D4J0WE*$J%j%]%8%H%j$r:n@.$7$^$9!#(B
 396.237 +
 396.238 +\interaction{daily.copy.init}
 396.239 +
 396.240 +$B%^!<%8$r9T$&$?$a$K$O!"(B
 396.241 +$BJL!9$N:n6H$rJ?9T$7$F9T$&I,MW$,$"$j$^$9$N$G!"(B
 396.242 +$B%j%]%8%H%j$rJ#@=$7$^$7$g$&!#(B
 396.243 +
 396.244 +\interaction{daily.copy.clone}
 396.245 +
 396.246 +$B:G=i$N%j%]%8%H%j$KLa$j!"(B
 396.247 +\hgcmd{copy} $B%3%^%s%I$G:G=i$K:n@.$7$?%U%!%$%k$rJ#@=$7$^$9!#(B
 396.248 +
 396.249 +\interaction{daily.copy.copy}
 396.250 +
 396.251 +$BJ#@=8e$N(B \hgcmd{status} $B%3%^%s%I$N=PNO$G$O!"(B
 396.252 +$BJ#@=$5$l$?%U%!%$%k$OC1$KDI2C$5$l$?IaDL$N%U%!%$%k$HF1$8$h$&$K8+$($^$9!#(B
 396.253 +
 396.254 +\interaction{daily.copy.status}
 396.255 +
 396.256 +$B$7$+$7(B
 396.257 +\hgopt{status}{-C} $B%*%W%7%g%sIU$-$G(B
 396.258 +\hgcmd{status} $B$r<B9T$9$k$3$H$G!"(B
 396.259 +$BJL$J9T$,I=<($5$l$^$9!#(B
 396.260 +$B$3$N9T$O!"?7$?$KDI2C$5$l$?%U%!%$%k$NJ#@=(B\emph{$B85(B}$B$G$"$k$3$H$r0UL#$7$^$9!#(B
 396.261 +
 396.262 +\interaction{daily.copy.status-copy}
 396.263 +
 396.264 +$BJ#@=$7$?%j%]%8%H%j$KLa$j!"(B
 396.265 +$BJ?9T$7$FJQ99:n6H$r9T$$$^$9!#(B
 396.266 +$BJ#@=85$K$J$C$?%U%!%$%k$KBP$7$F9T$rDI2C$7$^$9!#(B
 396.267 +
 396.268 +\interaction{daily.copy.other}
 396.269 +
 396.270 +$B$3$N%j%]%8%H%j$G$OJ#@=85$N(B \filename{file} $B$,JQ99$5$l$^$7$?!#(B
 396.271 +$B:G=i$N%j%]%8%H%j$+$iJQ99FbMF$r(B 
 396.272 +\hgcmd{pull} $B$7$F#2$D$N(B head $B$r%^!<%8$9$k:]$K(B Mercurial $B$O!"(B
 396.273 +\filename{file} $B$KBP$7$F$@$19T$C$?JQ99FbMF$r!"(B
 396.274 +$B$=$NJ#@=$G$"$k(B \filename{new-file} $B$K$^$GEAGE$5$;$^$9!#(B
 396.275 +
 396.276 +\interaction{daily.copy.merge}
 396.277 +
 396.278 +\subsection{Why should changes follow copies?}
 396.279 +\label{sec:daily:why-copy}
 396.280 +
 396.281 +$B%U%!%$%k$NJ#@=$KBP$7$F$kJQ99$,EAGE$5$l$k5sF0$O!"(B
 396.282 +$BFq2r$K;W$($k$+$b$7$l$^$;$s$,!"(B
 396.283 +$BB?$/$N>l9g$OHs>o$K9%$^$7$$?6$kIq$$$H$J$j$^$9!#(B
 396.284 +
 396.285 +$B$^$:$O!"(B
 396.286 +$B$3$NEAGE$,%^!<%8$N;~(B\emph{$B$@$1(B}$B$K9T$o$l$k!"(B
 396.287 +$B$H$$$&$3$H$KCm0U$7$F$/$@$5$$!#(B
 396.288 +$B%U%!%$%k$r(B \hgcmd{copy} $B$GJ#@=$7!"(B
 396.289 +$B$=$l$K0z$-B3$-J#@=85%U%!%$%k$rJQ99$9$k!"(B
 396.290 +$B$H$$$&DL=j$N:n6H$K$*$$$F$O2?$bFCJL$J$3$H$O9T$o$l$^$;$s!#(B
 396.291 +
 396.292 +$B$b$&0lE@!"(B
 396.293 +$BJQ99$r<h$j9~$s$@%j%]%8%H%j$,!"(B
 396.294 +$B%U%!%$%k$rJ#@=$7$?$3$H$r(B\emph{$BCN$i$J$+$C$?(B}$B>l9g$K8B$j!"(B
 396.295 +$BJQ99FbMF$,J#@=@h%U%!%$%k$KEAGE$9$k!"(B
 396.296 +$B$H$$$&$3$H$K$bCm0U$7$F$/$@$5$$!#(B
 396.297 +
 396.298 +Mercurial $B$,$3$N$h$&$K?6Iq$&$N$O0J2<$N$h$&$JM}M3$N$?$a$G$9!#(B
 396.299 +$BNc$($PI.<T$,!"(B
 396.300 +$B%=!<%9%U%!%$%k$KBP$7$F=EMW$J%P%0=$@5$r9T$$!"(B
 396.301 +$BJQ99FbMF$r%3%_%C%H$7$?$H$7$^$9!#(B
 396.302 +$B$=$NJQ99:n6H$,9T$o$l$F$$$k4V$K!"(B
 396.303 +$B%P%0$N82:_2=$d$=$N=$@5$rBT$D;vL5$/!"(B
 396.304 +$BEv3:%U%!%$%k$r(B \hgcmd{copy} $B$GJ#@=$7!"(B
 396.305 +$B$=$NJ#@=@h%U%!%$%k$NJQ99$rFI<T$,;O$a$F$7$^$&$+$b$7$l$^$;$s!#(B
 396.306 +
 396.307 +$BFI<T$,I.<T$NJQ99$r<h$j9~$s$G%^!<%8$7$?:]$K!"(B
 396.308 +Mercurial $B$,J#@=$X$NJQ99$NH?1G$r(B\emph{$B9T$o$J$$(B}$B>l9g!"(B
 396.309 +$BFI<T$NJ#@=@h%U%!%$%k$O%P%0$r4^$s$G$$$k$?$a!"(B
 396.310 +$B<jF0$G%P%0=$@5$rH?1G$5$;$kI,MW@-$r;W$$=P$5$J$$8B$j!"(B
 396.311 +$B%P%0$OJ#@=@h%U%!%$%k$K(B\emph{$B;D$jB3$1$k(B}$B$G$7$g$&!#(B
 396.312 +
 396.313 +$B%P%0=$@5$K4X$9$kJQ99FbMF$N!"(B
 396.314 +$BJ#@=85$+$iJ#@=@h$X$N<+F0H?1G$K$h$j!"(B
 396.315 +Mercurial $B$O$3$N<j$NLdBj$r2sHr$7$F$$$^$9!#(B
 396.316 +$BI.<T$NCN$k8B$j(B Mercurial $B$O!"(B
 396.317 +$BJ#@=%U%!%$%k$KBP$9$k$3$N$h$&$JJQ99EAGE$r9T$&(B\emph{$BM#0l$N(B}$B9=@.4IM}%7%9%F%`$G$9!#(B
 396.318 +
 396.319 +$B%U%!%$%k$NJ#@=$H$=$l$KB3$/%^!<%8$N<B;\$,0lC6JQ99MzNr$K5-O?$5$l$?$J$i!"(B
 396.320 +$BJ#@=85%U%!%$%k$+$iJ#@=@h%U%!%$%k$X$N$=$l0J>e$NJQ99H?1G$ODL>o$OITMW$J$N$G!"(B
 396.321 +Mercurial $B$O%^!<%8;~E@$^$G$OJ#@=$XJQ99$rEAGE$5$;$^$9$,!"(B
 396.322 +$B$=$l0J>e$O9T$$$^$;$s!#(B
 396.323 +
 396.324 +\subsection{How to make changes \emph{not} follow a copy}
 396.325 +
 396.326 +$B2>$K!"2?$i$+$NM}M3$K$h$j!"(B
 396.327 +$BJ#@=%U%!%$%k$X$N<+F0E*$JJQ99H?1G$,I,MW$J$$$HH=CG$7$?$J$i!"(B
 396.328 +$B%7%9%F%`$NDL>o$NJ}K!(B
 396.329 +$B!J(BUnix $BE*$J%7%9%F%`$N>l9g$J$i(B \command{cp}$B!K(B
 396.330 +$B$G%U%!%$%k$rJ#@=$7!"(B
 396.331 +\hgcmd{add} $B$K$h$j<jF0$GJ#@=%U%!%$%k$r9=@.4IM}BP>]$KDI2C$7$F$/$@$5$$!#(B
 396.332 +$B$G$9$,!"$=$NA0$K(B\ref{sec:daily:why-copy}$B@a$rFI$_D>$7$F!"(B
 396.333 +Mercurial $B$K$h$k<+F0JQ99H?1G$NE,@Z@-$r==J,$K8!F$$7$F$/$@$5$$!#(B
 396.334 +
 396.335 +\subsection{Behaviour of the \hgcmd{copy} command}
 396.336 +
 396.337 +\hgcmd{copy} $B%3%^%s%I$r;HMQ$7$?>l9g!"(B
 396.338 +Mercurial $B$OB(:B$K:n6HNN0h%G%#%l%/%H%j$K8D!9$N%U%!%$%k$NJ#@=$r:n@.$7$^$9!#(B
 396.339 +$B$=$N$?$a!"(B
 396.340 +$B%U%!%$%k$K=$@5$r2C$($?8e$G!"(B
 396.341 +$B$=$NJQ99$r%A%'%s%8%;%C%H$H$7$F%3%_%C%H$9$k$3$H$J$/(B
 396.342 +\hgcmd{copy} $B$r9T$C$?>l9g!"(B
 396.343 +$BJ#@=@h%U%!%$%k$O$=$N;~E@$^$G$NJQ99FbMF$b4^$s$G$$$k$3$H$K$J$j$^$9(B
 396.344 +$B!J$3$N?6$kIq$$$K$D$$$F$3$3$G=R$Y$?$N$O!"(B
 396.345 +$B>/!9D>46$KH?$9$k$h$&$K46$8$i$l$?$+$i$G$9!K!#(B
 396.346 +
 396.347 +\hgcmd{copy} $B$O(B
 396.348 +Unix $B$N(B \command{cp} $B%3%^%s%I$HF1MM$K?6Iq$$$^$9(B
 396.349 +$B!J(B\hgcmd{cp} $B$H$$$&JLL>J}$,9%$_$G$"$l$P!"$3$A$i$b;HMQ$G$-$^$9!K!#(B
 396.350 +$BKvHx$N0z?t$O(B\emph{$BJ#@=@h(B}$B$r!"(B
 396.351 +$B$=$l0J30$N@h9T$9$k0z?t$O(B\emph{$BJ#@=85(B}$B$r0UL#$7$^$9!#(B
 396.352 +$BJ#@=85$KC10l$N%U%!%$%k$r!"(B
 396.353 +$BJ#@=@h$KB8:_$7$J$$%Q%9$r;XDj$7$?>l9g!"(B
 396.354 +Mercurial $B$OJ#@=@h$K;XDj$7$?L>A0$G?7$?$J%U%!%$%k$r@8@.$7$^$9!#(B
 396.355 +
 396.356 +\interaction{daily.copy.simple}
 396.357 +
 396.358 +$BJ#@=@h$,%G%#%l%/%H%j$N>l9g!"(B
 396.359 +Mercurial $B$OJ#@=85%U%!%$%k$rEv3:%G%#%l%/%H%j$KJ#@=$7$^$9!#(B
 396.360 +
 396.361 +\interaction{daily.copy.dir-dest}
 396.362 +
 396.363 +$B%G%#%l%/%H%j$NJ#@=$N>l9g$O!"(B
 396.364 +$B:F5"E*3n$D%G%#%l%/%H%j9=@.$rJ];}$7$D$DJ#@=$5$l$^$9!#(B
 396.365 +
 396.366 +\interaction{daily.copy.dir-src}
 396.367 +
 396.368 +$BJ#@=85$HJ#@=@h$NN>J}$,%G%#%l%/%H%j$N>l9g(B\footnote{$BLuCm(B:
 396.369 +$B@h$N!V%G%#%l%/%H%j$NJ#@=$N>l9g!W$O!"(B
 396.370 +$B!VJ#@=@h%G%#%l%/%H%j$,B8:_$7$J$$>l9g!W$r;X$7$^$9!#(B}$B!"(B
 396.371 +$BJ#@=85$N%G%#%l%/%H%j9=B$$O!"(B
 396.372 +$BJ#@=@h%G%#%l%/%H%jG[2<$G:F9=C[$5$l$^$9!#(B
 396.373 +
 396.374 +\interaction{daily.copy.dir-src-dest}
 396.375 +
 396.376 +$B<jF0$G%U%!%$%k$rJ#@=$7$?8e$G!"(B
 396.377 +$BEv3:%U%!%$%k$,J#@=$G$"$k$3$H$r(B Mercurial $B$KDLCN$9$k$K$O!"(B
 396.378 +\hgcmd{remove} $B$N>l9g$HF1MM$K!"(B
 396.379 +\hgopt{copy}{--after} $BIU$-$G(B \hgcmd{copy} $B%3%^%s%I$r;HMQ$7$^$9!#(B
 396.380 +
 396.381 +\interaction{daily.copy.after}
 396.382 +
 396.383 +\section{Renaming files}
 396.384 +
 396.385 +$B%U%!%$%k$rJ#@=$9$k$h$j$b!"(B
 396.386 +$B$`$7$m2~L>$NJ}$,I,MW$H$5$l$k$N$G$O$J$$$G$7$g$&$+!#(B
 396.387 +$B%U%!%$%k$N2~L>$h$j$b(B
 396.388 +\hgcmd{copy} $B%3%^%s%I$NJ}$r@h$K@bL@$7$?$N$O!"(B
 396.389 +Mercurial $B$,J#@=$H2~L>$rK\<AE*$K$OF1Ey$K07$C$F$$$k$?$a$G$9!#(B
 396.390 +$B$=$N$?$a!"(B
 396.391 +$B%U%!%$%k$NJ#@=$K$*$1$k(B Mercurial $B$N5sF0$rCN$k$3$H$G!"(B
 396.392 +$B%U%!%$%k$N2~L>$G4|BT$5$l$k?6$kIq$$$rCN$k$3$H$,$G$-$^$9!#(B
 396.393 +
 396.394 +\hgcmd{rename} $B%3%^%s%I$r;HMQ$7$?>l9g!"(B
 396.395 +Mercurial $B$O8D!9$N2~L>85%U%!%$%k$NJ#@=$r:n@.$7!"(B
 396.396 +$B$=$N>e$G2~L>85%U%!%$%k$r:o=|$7!"(B
 396.397 +$B$=$l$i$r9=@.4IM}BP>]$+$i=|30$7$^$9!#(B
 396.398 +
 396.399 +\interaction{daily.rename.rename}
 396.400 +
 396.401 +\hgcmd{status} $B%3%^%s%I$N=PNO$+$i!"(B
 396.402 +$B?7$?$KJ#@=$5$l$?%U%!%$%k$,9=@.4IM}BP>]$KDI2C$5$l!"(B
 396.403 +$B2~L>85%U%!%$%k$,=|30$5$l$F$$$k$3$H$,FI$_<h$l$^$9!#(B
 396.404 +
 396.405 +\interaction{daily.rename.status}
 396.406 +
 396.407 +\hgcmd{copy} $B<B9T$N>l9g$HF1MM$K!"(B
 396.408 +\hgopt{status}{-C} $B%*%W%7%g%sIU$-$G(B \hgcmd{status} $B%3%^%s%I$r<B9T$9$k$3$H$G!"(B
 396.409 +$B9=@.4IM}BP>]$KDI2C$5$l$?%U%!%$%k$,<B:]$K$O!"(B
 396.410 +$B:#$O:o=|$5$l$F$7$^$C$?%U%!%$%k$NJ#@=%U%!%$%k!"(B
 396.411 +$B$H(B Mercurial $B$K$_$J$5$l$F$$$k$3$H$,$o$+$j$^$9!#(B
 396.412 +
 396.413 +\interaction{daily.rename.status-copy}
 396.414 +
 396.415 +\hgcmd{remove} $B$*$h$S(B \hgcmd{copy} $B$HF1MM$K!"(B
 396.416 +\hgopt{rename}{--after} $B%*%W%7%g%s$r;XDj$9$k$3$H$G!"(B
 396.417 +$B<B:]$K2~L>$7$?8e$G(B Mercurial $B$K$=$N;]$rDLCN$9$k$3$H$,$G$-$^$9!#(B
 396.418 +$B$=$l0J30$NKX$I$NE@$G!"(B
 396.419 +\hgcmd{rename} $B%3%^%s%I$N?6$kIq$$JB$S$K;XDj2DG=$J%*%W%7%g%s$O!"(B
 396.420 +\hgcmd{copy} $B%3%^%s%I$HF1$8$G$9!#(B
 396.421 +
 396.422 +\subsection{Renaming files and merging changes}
 396.423 +
 396.424 +Mercurial $B$N2~L>$,!VJ#@=$H:o=|!W$H$7$F<BAu$5$l$F$$$k$?$a!"(B
 396.425 +$BJ#@=$N8e$G$N%^!<%8$N>l9g$HF1MM$K!"(B
 396.426 +$B2~L>$N8e$G%^!<%8$r$7$?>l9g$K$OJQ99$,EAGE$5$l$^$9!#(B
 396.427 +
 396.428 +$B$"$k%f!<%6$,%U%!%$%k$r=$@5$7!"(B
 396.429 +$BJL$N%f!<%6$,$=$N%U%!%$%k$rJL$J%U%!%$%k$K2~L>$7$?>l9g!"(B
 396.430 +$BN><T$,$*8_$$$NJQ99$r%^!<%8$9$k$H!"(B
 396.431 +$B0lJ}$,9T$C$?2~L>85%U%!%$%k$X$N=$@5$O2~L>@h%U%!%$%k$X$HEAGE$7$^$9(B
 396.432 +$B!J$3$N?6$kIq$$$O(B``$BIaDL$N:n6H(B''$B$G4|BT$9$k$G$"$m$&N`$N$b$N$G$9$,!"(B
 396.433 +$BA4$F$N9=@.4IM}%7%9%F%`$,$3$N$h$&$K?6Iq$&$o$1$G$O$"$j$^$;$s!K!#(B
 396.434 +
 396.435 +$BJ#@=@h$KBP$9$kJQ99$NEAGE$,!"(B
 396.436 +$BMxMQ<T$K$H$C$F$*$=$i$/M-MQ$H;W$o$l$k5!G=$G$9$+$i!"(B
 396.437 +$B%U%!%$%k$N2~L>$K$*$$$F$bJQ99$NEAGE$,=EMW$G$"$m$&$3$H$O!"(B
 396.438 +$BL@$i$+$H$$$($k$G$7$g$&!#(B
 396.439 +$BJQ99EAGE5!G=$,L5$$>l9g!"(B
 396.440 +$B%U%!%$%k$N2~L>$K$h$C$FJQ99$O4JC1$K9T$/@h$r<:$C$F$7$^$&$3$H$G$7$g$&!#(B
 396.441 +
 396.442 +\subsection{Divergent renames and merging}
 396.443 +
 396.444 +$BL>A0$N9-$,$j!J(Bdiverging names$B!K$O!"(B
 396.445 +$BFs?M$N3+H/<T$,$H$"$k%U%!%$%k(B---
 396.446 +$B$3$l$r(B \filename{foo} $B$H8F$S$^$9(B---
 396.447 +$B$r3F<+$N%j%]%8%H%j$G07$&$3$H$GH/@8$7$^$9!#(B
 396.448 +
 396.449 +\interaction{rename.divergent.clone}
 396.450 +
 396.451 +Anne $B$,%U%!%$%k$r(B \filename{bar} $B$K2~L>$7$^$9!#(B
 396.452 +
 396.453 +\interaction{rename.divergent.rename.anne}
 396.454 +
 396.455 +$B$=$N0lJ}$G!"(BBob $B$,%U%!%$%k$r(B \filename{quux} $B$K2~L>$7$^$9!#(B
 396.456 +
 396.457 +\interaction{rename.divergent.rename.bob}
 396.458 +
 396.459 +$B8D!9$N3+H/<T$,%U%!%$%k$NL?L>$K4X$9$k0[$J$k0U8~$rI=L@$7$?$o$1$G$9$+$i!"(B
 396.460 +$BI.<T$O$3$N;vBV$r>WFM$HB*$($k$N$,NI$$$H;W$$$^$9!#(B
 396.461 +
 396.462 +$B$3$N>l9g$N%^!<%8$O$I$N$h$&$K?6Iq$&$Y$-$@$H;W$$$^$9$+!)(B
 396.463 +$B2~L>$K$h$k;^J,$+$l$,@8$8$k%A%'%s%8%;%C%H$N%^!<%8$N>l9g!"(B
 396.464 +Merging $B$O>o$K(B\emph{$BN>J}(B}$B$N2~L>@h%U%!%$%k$r0];}$7$^$9!#(B
 396.465 +
 396.466 +\interaction{rename.divergent.merge}
 396.467 +
 396.468 +$BI.<T8D?M$K$H$C$F$3$N?6$kIq$$$OBgJQ0U30$G$"$j!"(B
 396.469 +$B$=$l$,$3$3$G$3$N?6$kIq$$$r@bL@$7$F$$$kM}M3$G$b$"$j$^$9!#(B
 396.470 +$BI.<T$O(B Mercurial $B$K!"(B
 396.471 +\filename{bar} $B$r;D$9$+!"(B
 396.472 +\filename{quux} $B$r;D$9$+!"(B
 396.473 +$B$"$k$$$ON>J}$r;D$9$+!"(B
 396.474 +$B$H$$$&A*Br;h$K$h$k3NG'$r9T$&$3$H$r4|BT$7$F$$$?$N$G$9!#(B
 396.475 +
 396.476 +$B<B:]$K$O!"(B
 396.477 +$B%U%!%$%k$N2~L>$r9T$C$?>l9g!"(B
 396.478 +$B2~L>85%U%!%$%k$r;HMQ$7$?%S%k%I$r9T$&B>$N%U%!%$%k(B
 396.479 +$B!JNc$($P(B makefile$B!K$N=$@5$,9T$o$l$k$G$"$m$&$3$H$r0UL#$7$^$9!#(B
 396.480 +$B$=$N$?$a!"(B
 396.481 +Anne $B$,%U%!%$%k$r2~L>$7!"(B
 396.482 +$B2~L>8e$N%U%!%$%k$G%S%k%I$,<B;\$5$l$k$h$&$K(B
 396.483 +\filename{Makefile} $B$r=$@5$7$?>l9g!"(B
 396.484 +$B0lJ}$G(B Bob $B$,F1MM$N=$@5$rJL$JL>A0$G9T$C$F$$$^$9$+$i!"(B
 396.485 +$B%^!<%8$N:]$K$O:n6HNN0h%G%#%l%/%H%j$K0[$J$kL>A0$N%U%!%$%k$N%3%T!<$,B8:_$7!"(B
 396.486 +\emph{$B3n$D(B} Anne $B$H(B Bob $B$N(B
 396.487 +\filename{Makefile} $B$X$N=$@52U=j$,>WFM$7$F$$$kH&$G$9!#(B
 396.488 +
 396.489 +$BB>$NMxMQ<T$b$3$N?6$kIq$$$K0U30@-$r46$8$F$$$k$h$&$G$9!#(B
 396.490 +$B>\:Y$O(B \bug{455} $B$r;2>H$7$F$/$@$5$$!#(B
 396.491 +
 396.492 +\subsection{Convergent renames and merging}
 396.493 +
 396.494 +$B0[$J$k(B\emph{$BJ#@=85(B}$B%U%!%$%k$,F1$8%U%!%$%k$r(B\emph{$BJ#@=@h(B}$B$H$7$?:]$K!"(B
 396.495 +$B2~L>$K$h$kJL$J<oN`$N>WFM$,H/@8$7$^$9!#(B
 396.496 +$B$3$N>l9g!"(BMercurial $B$ODL>o$N%^!<%85!9=$r;HMQ$7!"(B
 396.497 +$BE,@Z$J2r7h$X$NM6F3$rMW5a$7$F$-$^$9!#(B
 396.498 +
 396.499 +\subsection{Other name-related corner cases}
 396.500 +
 396.501 +Mercurial $B$O!"(B
 396.502 +$B0lJ}$,%U%!%$%k$K;HMQ$7$?L>A0$rB>J}$,%G%#%l%/%H%j$K;HMQ$7$?>l9g$K!"(B
 396.503 +$B%^!<%8$,<:GT$9$k%P%0$,D9$$4V;D$C$F$$$^$9!#(B
 396.504 +$B$3$NLdBj$O(B \bug{29} $B$K>\:Y$,$"$j$^$9!#(B
 396.505 +
 396.506 +\interaction{issue29.go}
 396.507 +
 396.508 +\section{Recovering from mistakes}
 396.509 +
 396.510 +$B4v$D$+$N$"$j$,$A$J4V0c$$$+$iI|5l$9$k$?$a$K!"(B
 396.511 +Mercurial $B$OM-MQ$J%3%^%s%I$r4v$D$+Ds6!$7$F$$$^$9!#(B
 396.512 +
 396.513 +\hgcmd{revert} $B%3%^%s%I$O!"(B
 396.514 +$B:n6HNN0h%G%#%l%/%H%j$KBP$9$kJQ99$r<h$j>C$7$^$9!#(B
 396.515 +$BNc$($P!"$&$C$+$j%U%!%$%k$r(B \hgcmd{add} $B$7$F$7$^$C$?>l9g$K!"(B
 396.516 +$BDI2C$7$F$7$^$C$?%U%!%$%kL>$r;XDj$7$F(B
 396.517 +\hgcmd{revert} $B$r<B9T$9$k$3$H$G!"(B
 396.518 +$B%U%!%$%k$K$O0l@ZJQ99$r2C$($k;vL5$/(B
 396.519 +Mercurial $B$K$h$k9=@.4IM}BP>]$+$i=|30$9$k$3$H$,$G$-$^$9!#(B
 396.520 +$B%U%!%$%k$X$N4V0c$C$?JQ99$r<h$j>C$9$N$K$b(B
 396.521 +\hgcmd{revert} $B$,MxMQ$G$-$^$9!#(B
 396.522 +
 396.523 +\hgcmd{revert} $B%3%^%s%I$OL$%3%_%C%H$JJQ99$KBP$7$FM-8z$G$"$k!"(B
 396.524 +$B$H$$$&$3$H$O21$($F$*$-$^$7$g$&!#(B
 396.525 +$BC"$7!"(B
 396.526 +$B0lC6JQ99$r%3%_%C%H$7$?8e$GJQ99FbMF$,4V0c$$$G$"$k$3$H$K5$$,IU$$$?>l9g$G$b!"(B
 396.527 +$BA*Br;h$O8B$i$l$F$O$$$^$9$,BP=h$9$k$3$H$O$G$-$^$9!#(B
 396.528 +
 396.529 +\hgcmd{revert} $B%3%^%s%I$K4X$9$k>\:Y$H!"(B
 396.530 +$B%3%_%C%H:Q$_$NJQ99$K4X$9$kBP=h$N>\:Y$K4X$7$F$O!"(B
 396.531 +\ref{chap:undo}~$B>O$r;2>H$7$F$/$@$5$$!#(B
 396.532 +
 396.533 +%%% Local Variables: 
 396.534 +%%% mode: latex
 396.535 +%%% TeX-master: "00book"
 396.536 +%%% End: 
   397.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   397.2 +++ b/ja/examples/backout	Sun Aug 16 03:41:39 2009 +0200
   397.3 @@ -0,0 +1,83 @@
   397.4 +#!/bin/bash
   397.5 +
   397.6 +# We have to fake the merges here, because they cause conflicts with
   397.7 +# three-way command-line merge, and kdiff3 may not be available.
   397.8 +
   397.9 +export HGMERGE=$(mktemp)
  397.10 +echo '#!/bin/sh' >> $HGMERGE
  397.11 +echo 'echo first change > "$1"' >> $HGMERGE
  397.12 +echo 'echo third change >> "$1"' >> $HGMERGE
  397.13 +chmod 700 $HGMERGE
  397.14 +
  397.15 +#$ name: init
  397.16 +
  397.17 +hg init myrepo
  397.18 +cd myrepo
  397.19 +echo first change >> myfile
  397.20 +hg add myfile
  397.21 +hg commit -m 'first change'
  397.22 +echo second change >> myfile
  397.23 +hg commit -m 'second change'
  397.24 +
  397.25 +#$ name: simple
  397.26 +
  397.27 +hg backout -m 'back out second change' tip
  397.28 +cat myfile
  397.29 +
  397.30 +#$ name: simple.log
  397.31 +#$ ignore: \s+200[78]-.*
  397.32 +
  397.33 +hg log --style compact
  397.34 +
  397.35 +#$ name: non-tip.clone
  397.36 +
  397.37 +cd ..
  397.38 +hg clone -r1 myrepo non-tip-repo
  397.39 +cd non-tip-repo
  397.40 +
  397.41 +#$ name: non-tip.backout
  397.42 +
  397.43 +echo third change >> myfile
  397.44 +hg commit -m 'third change'
  397.45 +hg backout --merge -m 'back out second change' 1
  397.46 +
  397.47 +#$ name: non-tip.cat
  397.48 +cat myfile
  397.49 +
  397.50 +#$ name: manual.clone
  397.51 +
  397.52 +cd ..
  397.53 +hg clone -r1 myrepo newrepo
  397.54 +cd newrepo
  397.55 +
  397.56 +#$ name: manual.backout
  397.57 +
  397.58 +echo third change >> myfile
  397.59 +hg commit -m 'third change'
  397.60 +hg backout -m 'back out second change' 1
  397.61 +
  397.62 +#$ name: manual.log
  397.63 +
  397.64 +hg log --style compact
  397.65 +
  397.66 +#$ name: manual.parents
  397.67 +
  397.68 +hg parents
  397.69 +
  397.70 +#$ name: manual.heads
  397.71 +
  397.72 +hg heads
  397.73 +
  397.74 +#$ name: manual.cat
  397.75 +
  397.76 +cat myfile
  397.77 +
  397.78 +#$ name: manual.merge
  397.79 +
  397.80 +hg merge
  397.81 +hg commit -m 'merged backout with previous tip'
  397.82 +cat myfile
  397.83 +
  397.84 +#$ name:
  397.85 +
  397.86 +rm $HGMERGE
   398.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   398.2 +++ b/ja/examples/backout.init.out	Sun Aug 16 03:41:39 2009 +0200
   398.3 @@ -0,0 +1,7 @@
   398.4 +$ \textbf{hg init myrepo}
   398.5 +$ \textbf{cd myrepo}
   398.6 +$ \textbf{echo first change >> myfile}
   398.7 +$ \textbf{hg add myfile}
   398.8 +$ \textbf{hg commit -m 'first change'}
   398.9 +$ \textbf{echo second change >> myfile}
  398.10 +$ \textbf{hg commit -m 'second change'}
   399.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   399.2 +++ b/ja/examples/backout.manual.backout.out	Sun Aug 16 03:41:39 2009 +0200
   399.3 @@ -0,0 +1,7 @@
   399.4 +$ \textbf{echo third change >> myfile}
   399.5 +$ \textbf{hg commit -m 'third change'}
   399.6 +$ \textbf{hg backout -m 'back out second change' 1}
   399.7 +reverting myfile
   399.8 +changeset  backs out changeset 
   399.9 +the backout changeset is a new head - do not forget to merge
  399.10 +(use "backout --merge" if you want to auto-merge)
   400.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   400.2 +++ b/ja/examples/backout.manual.cat.out	Sun Aug 16 03:41:39 2009 +0200
   400.3 @@ -0,0 +1,2 @@
   400.4 +$ \textbf{cat myfile}
   400.5 +first change
   401.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   401.2 +++ b/ja/examples/backout.manual.clone.out	Sun Aug 16 03:41:39 2009 +0200
   401.3 @@ -0,0 +1,9 @@
   401.4 +$ \textbf{cd ..}
   401.5 +$ \textbf{hg clone -r1 myrepo newrepo}
   401.6 +requesting all changes
   401.7 +adding changesets
   401.8 +adding manifests
   401.9 +adding file changes
  401.10 +added 2 changesets with 2 changes to 1 files
  401.11 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  401.12 +$ \textbf{cd newrepo}
   402.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   402.2 +++ b/ja/examples/backout.manual.heads.out	Sun Aug 16 03:41:39 2009 +0200
   402.3 @@ -0,0 +1,13 @@
   402.4 +$ \textbf{hg heads}
   402.5 +changeset:   
   402.6 +tag:         tip
   402.7 +parent:      
   402.8 +user:        Bryan O'Sullivan <bos@serpentine.com>
   402.9 +
  402.10 +summary:     back out second change
  402.11 +
  402.12 +changeset:   
  402.13 +user:        Bryan O'Sullivan <bos@serpentine.com>
  402.14 +
  402.15 +summary:     third change
  402.16 +
   403.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   403.2 +++ b/ja/examples/backout.manual.log.out	Sun Aug 16 03:41:39 2009 +0200
   403.3 @@ -0,0 +1,13 @@
   403.4 +$ \textbf{hg log --style compact}
   403.5 +3[tip]:1   
   403.6 +  back out second change
   403.7 +
   403.8 +2   
   403.9 +  third change
  403.10 +
  403.11 +1   
  403.12 +  second change
  403.13 +
  403.14 +0   
  403.15 +  first change
  403.16 +
   404.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   404.2 +++ b/ja/examples/backout.manual.merge.out	Sun Aug 16 03:41:39 2009 +0200
   404.3 @@ -0,0 +1,8 @@
   404.4 +$ \textbf{hg merge}
   404.5 +merging myfile
   404.6 +0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   404.7 +(branch merge, don't forget to commit)
   404.8 +$ \textbf{hg commit -m 'merged backout with previous tip'}
   404.9 +$ \textbf{cat myfile}
  404.10 +first change
  404.11 +third change
   405.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   405.2 +++ b/ja/examples/backout.manual.parents.out	Sun Aug 16 03:41:39 2009 +0200
   405.3 @@ -0,0 +1,8 @@
   405.4 +$ \textbf{hg parents}
   405.5 +changeset:   
   405.6 +tag:         tip
   405.7 +parent:      
   405.8 +user:        Bryan O'Sullivan <bos@serpentine.com>
   405.9 +
  405.10 +summary:     back out second change
  405.11 +
   406.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   406.2 +++ b/ja/examples/backout.non-tip.backout.out	Sun Aug 16 03:41:39 2009 +0200
   406.3 @@ -0,0 +1,9 @@
   406.4 +$ \textbf{echo third change >> myfile}
   406.5 +$ \textbf{hg commit -m 'third change'}
   406.6 +$ \textbf{hg backout --merge -m 'back out second change' 1}
   406.7 +reverting myfile
   406.8 +changeset  backs out changeset 
   406.9 +merging with changeset 
  406.10 +merging myfile
  406.11 +0 files updated, 1 files merged, 0 files removed, 0 files unresolved
  406.12 +(branch merge, don't forget to commit)
   407.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   407.2 +++ b/ja/examples/backout.non-tip.cat.out	Sun Aug 16 03:41:39 2009 +0200
   407.3 @@ -0,0 +1,3 @@
   407.4 +$ \textbf{cat myfile}
   407.5 +first change
   407.6 +third change
   408.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   408.2 +++ b/ja/examples/backout.non-tip.clone.out	Sun Aug 16 03:41:39 2009 +0200
   408.3 @@ -0,0 +1,9 @@
   408.4 +$ \textbf{cd ..}
   408.5 +$ \textbf{hg clone -r1 myrepo non-tip-repo}
   408.6 +requesting all changes
   408.7 +adding changesets
   408.8 +adding manifests
   408.9 +adding file changes
  408.10 +added 2 changesets with 2 changes to 1 files
  408.11 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  408.12 +$ \textbf{cd non-tip-repo}
   409.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   409.2 +++ b/ja/examples/backout.simple.log.out	Sun Aug 16 03:41:39 2009 +0200
   409.3 @@ -0,0 +1,10 @@
   409.4 +$ \textbf{hg log --style compact}
   409.5 +2[tip]   
   409.6 +  back out second change
   409.7 +
   409.8 +1   
   409.9 +  second change
  409.10 +
  409.11 +0   
  409.12 +  first change
  409.13 +
   410.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   410.2 +++ b/ja/examples/backout.simple.out	Sun Aug 16 03:41:39 2009 +0200
   410.3 @@ -0,0 +1,5 @@
   410.4 +$ \textbf{hg backout -m 'back out second change' tip}
   410.5 +reverting myfile
   410.6 +changeset  backs out changeset 
   410.7 +$ \textbf{cat myfile}
   410.8 +first change
   411.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   411.2 +++ b/ja/examples/bisect	Sun Aug 16 03:41:39 2009 +0200
   411.3 @@ -0,0 +1,89 @@
   411.4 +#!/bin/bash
   411.5 +
   411.6 +echo '[extensions]' >> $HGRC
   411.7 +#echo 'hgext.bisect =' >> $HGRC
   411.8 +
   411.9 +# XXX There's some kind of horrible nondeterminism in the execution of
  411.10 +# bisect at the moment.  Ugh.
  411.11 +
  411.12 +#$ ignore: .*
  411.13 +
  411.14 +#$ name: init
  411.15 +
  411.16 +hg init mybug
  411.17 +cd mybug
  411.18 +
  411.19 +#$ name: commits
  411.20 +
  411.21 +buggy_change=22
  411.22 +
  411.23 +for (( i = 0; i < 35; i++ )); do
  411.24 +  if [[ $i = $buggy_change ]]; then
  411.25 +    echo 'i have a gub' > myfile$i
  411.26 +    hg commit -q -A -m 'buggy changeset'
  411.27 +  else
  411.28 +    echo 'nothing to see here, move along' > myfile$i
  411.29 +    hg commit -q -A -m 'normal changeset'
  411.30 +  fi
  411.31 +done
  411.32 +
  411.33 +#$ name: help
  411.34 +
  411.35 +hg help bisect
  411.36 +hg bisect help
  411.37 +
  411.38 +#$ name: search.init
  411.39 +
  411.40 +hg bisect init
  411.41 +
  411.42 +#$ name: search.bad-init
  411.43 +
  411.44 +hg bisect bad
  411.45 +
  411.46 +#$ name: search.good-init
  411.47 +
  411.48 +hg bisect good 10
  411.49 +
  411.50 +#$ name: search.step1
  411.51 +
  411.52 +if grep -q 'i have a gub' *
  411.53 +then
  411.54 +  result=bad
  411.55 +else
  411.56 +  result=good
  411.57 +fi
  411.58 +
  411.59 +echo this revision is $result
  411.60 +hg bisect $result
  411.61 +
  411.62 +#$ name: search.mytest
  411.63 +
  411.64 +mytest() {
  411.65 +  if grep -q 'i have a gub' *
  411.66 +  then
  411.67 +    result=bad
  411.68 +  else
  411.69 +    result=good
  411.70 +  fi
  411.71 +
  411.72 +  echo this revision is $result
  411.73 +  hg bisect $result
  411.74 +}
  411.75 +  
  411.76 +#$ name: search.step2
  411.77 +
  411.78 +mytest
  411.79 +
  411.80 +#$ name: search.rest
  411.81 +
  411.82 +mytest
  411.83 +mytest
  411.84 +mytest
  411.85 +
  411.86 +#$ name: search.reset
  411.87 +
  411.88 +hg bisect reset
  411.89 +
  411.90 +#$ name:
  411.91 +
  411.92 +exit 0
   412.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   412.2 +++ b/ja/examples/bisect.commits.out	Sun Aug 16 03:41:39 2009 +0200
   412.3 @@ -0,0 +1,10 @@
   412.4 +
   412.5 +
   412.6 +
   412.7 +
   412.8 +
   412.9 +
  412.10 +
  412.11 +
  412.12 +
  412.13 +
   413.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   413.2 +++ b/ja/examples/bisect.help.out	Sun Aug 16 03:41:39 2009 +0200
   413.3 @@ -0,0 +1,29 @@
   413.4 +
   413.5 +
   413.6 +
   413.7 +
   413.8 +
   413.9 +
  413.10 +
  413.11 +
  413.12 +
  413.13 +
  413.14 +
  413.15 +
  413.16 +
  413.17 +
  413.18 +
  413.19 +
  413.20 +
  413.21 +
  413.22 +
  413.23 +
  413.24 +
  413.25 +
  413.26 +
  413.27 +
  413.28 +
  413.29 +
  413.30 +
  413.31 +
  413.32 +
   414.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   414.2 +++ b/ja/examples/bisect.init.out	Sun Aug 16 03:41:39 2009 +0200
   414.3 @@ -0,0 +1,2 @@
   414.4 +
   414.5 +
   415.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   415.2 +++ b/ja/examples/bisect.search.bad-init.out	Sun Aug 16 03:41:39 2009 +0200
   415.3 @@ -0,0 +1,1 @@
   415.4 +
   416.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   416.2 +++ b/ja/examples/bisect.search.good-init.out	Sun Aug 16 03:41:39 2009 +0200
   416.3 @@ -0,0 +1,3 @@
   416.4 +
   416.5 +
   416.6 +
   417.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   417.2 +++ b/ja/examples/bisect.search.init.out	Sun Aug 16 03:41:39 2009 +0200
   417.3 @@ -0,0 +1,3 @@
   417.4 +
   417.5 +
   417.6 +
   418.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   418.2 +++ b/ja/examples/bisect.search.mytest.out	Sun Aug 16 03:41:39 2009 +0200
   418.3 @@ -0,0 +1,10 @@
   418.4 +
   418.5 +
   418.6 +
   418.7 +
   418.8 +
   418.9 +
  418.10 +
  418.11 +
  418.12 +
  418.13 +
   419.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   419.2 +++ b/ja/examples/bisect.search.reset.out	Sun Aug 16 03:41:39 2009 +0200
   419.3 @@ -0,0 +1,1 @@
   419.4 +
   420.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   420.2 +++ b/ja/examples/bisect.search.rest.out	Sun Aug 16 03:41:39 2009 +0200
   420.3 @@ -0,0 +1,20 @@
   420.4 +
   420.5 +
   420.6 +
   420.7 +
   420.8 +
   420.9 +
  420.10 +
  420.11 +
  420.12 +
  420.13 +
  420.14 +
  420.15 +
  420.16 +
  420.17 +
  420.18 +
  420.19 +
  420.20 +
  420.21 +
  420.22 +
  420.23 +
   421.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   421.2 +++ b/ja/examples/bisect.search.step1.out	Sun Aug 16 03:41:39 2009 +0200
   421.3 @@ -0,0 +1,11 @@
   421.4 +
   421.5 +
   421.6 +
   421.7 +
   421.8 +
   421.9 +
  421.10 +
  421.11 +
  421.12 +
  421.13 +
  421.14 +
   422.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   422.2 +++ b/ja/examples/bisect.search.step2.out	Sun Aug 16 03:41:39 2009 +0200
   422.3 @@ -0,0 +1,4 @@
   422.4 +
   422.5 +
   422.6 +
   422.7 +
   423.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   423.2 +++ b/ja/examples/branch-named	Sun Aug 16 03:41:39 2009 +0200
   423.3 @@ -0,0 +1,74 @@
   423.4 +#!/bin/bash
   423.5 +
   423.6 +hg init a
   423.7 +cd a
   423.8 +echo hello > myfile
   423.9 +hg commit -A -m 'Initial commit'
  423.10 +
  423.11 +#$ name: branches
  423.12 +
  423.13 +hg tip
  423.14 +hg branches
  423.15 +
  423.16 +#$ name: branch
  423.17 +
  423.18 +hg branch
  423.19 +
  423.20 +#$ name: create
  423.21 +
  423.22 +hg branch foo
  423.23 +hg branch
  423.24 +
  423.25 +#$ name: status
  423.26 +
  423.27 +hg status
  423.28 +hg tip
  423.29 +
  423.30 +#$ name: commit
  423.31 +
  423.32 +echo 'hello again' >> myfile
  423.33 +hg commit -m 'Second commit'
  423.34 +hg tip
  423.35 +
  423.36 +#$ name: rebranch
  423.37 +
  423.38 +hg branch
  423.39 +hg branch bar
  423.40 +echo new file > newfile
  423.41 +hg commit -A -m 'Third commit'
  423.42 +hg tip
  423.43 +
  423.44 +#$ name: parents
  423.45 +
  423.46 +hg parents
  423.47 +hg branches
  423.48 +
  423.49 +#$ name: update-switchy
  423.50 +
  423.51 +hg update foo
  423.52 +hg parents
  423.53 +hg update bar
  423.54 +hg parents
  423.55 +
  423.56 +#$ name: update-nothing
  423.57 +
  423.58 +hg update foo
  423.59 +hg update
  423.60 +
  423.61 +#$ name: foo-commit
  423.62 +
  423.63 +echo something > somefile
  423.64 +hg commit -A -m 'New file'
  423.65 +hg heads
  423.66 +
  423.67 +#$ name: update-bar
  423.68 +
  423.69 +hg update bar
  423.70 +hg update -C bar
  423.71 +
  423.72 +#$ name: merge
  423.73 +
  423.74 +hg branch
  423.75 +hg merge
  423.76 +hg commit -m 'Merge'
  423.77 +hg tip
   424.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   424.2 +++ b/ja/examples/branch-named.branch.out	Sun Aug 16 03:41:39 2009 +0200
   424.3 @@ -0,0 +1,2 @@
   424.4 +$ \textbf{hg branch}
   424.5 +default
   425.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   425.2 +++ b/ja/examples/branch-named.branches.out	Sun Aug 16 03:41:39 2009 +0200
   425.3 @@ -0,0 +1,9 @@
   425.4 +$ \textbf{hg tip}
   425.5 +changeset:   
   425.6 +tag:         tip
   425.7 +user:        Bryan O'Sullivan <bos@serpentine.com>
   425.8 +
   425.9 +summary:     Initial commit
  425.10 +
  425.11 +$ \textbf{hg branches}
  425.12 +default                        
   426.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   426.2 +++ b/ja/examples/branch-named.commit.out	Sun Aug 16 03:41:39 2009 +0200
   426.3 @@ -0,0 +1,10 @@
   426.4 +$ \textbf{echo 'hello again' >> myfile}
   426.5 +$ \textbf{hg commit -m 'Second commit'}
   426.6 +$ \textbf{hg tip}
   426.7 +changeset:   
   426.8 +branch:      foo
   426.9 +tag:         tip
  426.10 +user:        Bryan O'Sullivan <bos@serpentine.com>
  426.11 +
  426.12 +summary:     Second commit
  426.13 +
   427.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   427.2 +++ b/ja/examples/branch-named.create.out	Sun Aug 16 03:41:39 2009 +0200
   427.3 @@ -0,0 +1,4 @@
   427.4 +$ \textbf{hg branch foo}
   427.5 +marked working directory as branch foo
   427.6 +$ \textbf{hg branch}
   427.7 +foo
   428.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   428.2 +++ b/ja/examples/branch-named.foo-commit.out	Sun Aug 16 03:41:39 2009 +0200
   428.3 @@ -0,0 +1,18 @@
   428.4 +$ \textbf{echo something > somefile}
   428.5 +$ \textbf{hg commit -A -m 'New file'}
   428.6 +adding somefile
   428.7 +$ \textbf{hg heads}
   428.8 +changeset:   
   428.9 +branch:      foo
  428.10 +tag:         tip
  428.11 +parent:      
  428.12 +user:        Bryan O'Sullivan <bos@serpentine.com>
  428.13 +
  428.14 +summary:     New file
  428.15 +
  428.16 +changeset:   
  428.17 +branch:      bar
  428.18 +user:        Bryan O'Sullivan <bos@serpentine.com>
  428.19 +
  428.20 +summary:     Third commit
  428.21 +
   429.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   429.2 +++ b/ja/examples/branch-named.merge.out	Sun Aug 16 03:41:39 2009 +0200
   429.3 @@ -0,0 +1,16 @@
   429.4 +$ \textbf{hg branch}
   429.5 +bar
   429.6 +$ \textbf{hg merge}
   429.7 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   429.8 +(branch merge, don't forget to commit)
   429.9 +$ \textbf{hg commit -m 'Merge'}
  429.10 +$ \textbf{hg tip}
  429.11 +changeset:   
  429.12 +branch:      bar
  429.13 +tag:         tip
  429.14 +parent:      
  429.15 +parent:      
  429.16 +user:        Bryan O'Sullivan <bos@serpentine.com>
  429.17 +
  429.18 +summary:     Merge
  429.19 +
   430.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   430.2 +++ b/ja/examples/branch-named.parents.out	Sun Aug 16 03:41:39 2009 +0200
   430.3 @@ -0,0 +1,12 @@
   430.4 +$ \textbf{hg parents}
   430.5 +changeset:   
   430.6 +branch:      bar
   430.7 +tag:         tip
   430.8 +user:        Bryan O'Sullivan <bos@serpentine.com>
   430.9 +
  430.10 +summary:     Third commit
  430.11 +
  430.12 +$ \textbf{hg branches}
  430.13 +bar                            
  430.14 +foo                             (inactive)
  430.15 +default                         (inactive)
   431.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   431.2 +++ b/ja/examples/branch-named.rebranch.out	Sun Aug 16 03:41:39 2009 +0200
   431.3 @@ -0,0 +1,15 @@
   431.4 +$ \textbf{hg branch}
   431.5 +foo
   431.6 +$ \textbf{hg branch bar}
   431.7 +marked working directory as branch bar
   431.8 +$ \textbf{echo new file > newfile}
   431.9 +$ \textbf{hg commit -A -m 'Third commit'}
  431.10 +adding newfile
  431.11 +$ \textbf{hg tip}
  431.12 +changeset:   
  431.13 +branch:      bar
  431.14 +tag:         tip
  431.15 +user:        Bryan O'Sullivan <bos@serpentine.com>
  431.16 +
  431.17 +summary:     Third commit
  431.18 +
   432.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   432.2 +++ b/ja/examples/branch-named.status.out	Sun Aug 16 03:41:39 2009 +0200
   432.3 @@ -0,0 +1,8 @@
   432.4 +$ \textbf{hg status}
   432.5 +$ \textbf{hg tip}
   432.6 +changeset:   
   432.7 +tag:         tip
   432.8 +user:        Bryan O'Sullivan <bos@serpentine.com>
   432.9 +
  432.10 +summary:     Initial commit
  432.11 +
   433.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   433.2 +++ b/ja/examples/branch-named.update-bar.out	Sun Aug 16 03:41:39 2009 +0200
   433.3 @@ -0,0 +1,4 @@
   433.4 +$ \textbf{hg update bar}
   433.5 +abort: update spans branches, use 'hg merge' or 'hg update -C' to lose changes
   433.6 +$ \textbf{hg update -C bar}
   433.7 +1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   434.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   434.2 +++ b/ja/examples/branch-named.update-foo.out	Sun Aug 16 03:41:39 2009 +0200
   434.3 @@ -0,0 +1,13 @@
   434.4 +$ \textbf{hg update foo}
   434.5 +0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   434.6 +$ \textbf{hg update}
   434.7 +0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   434.8 +$ \textbf{hg parents}
   434.9 +changeset:   
  434.10 +branch:      foo
  434.11 +user:        Bryan O'Sullivan <bos@serpentine.com>
  434.12 +
  434.13 +summary:     Second commit
  434.14 +
  434.15 +$ \textbf{hg update bar}
  434.16 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   435.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   435.2 +++ b/ja/examples/branch-named.update-nothing.out	Sun Aug 16 03:41:39 2009 +0200
   435.3 @@ -0,0 +1,4 @@
   435.4 +$ \textbf{hg update foo}
   435.5 +0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   435.6 +$ \textbf{hg update}
   435.7 +0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   436.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   436.2 +++ b/ja/examples/branch-named.update-switchy.out	Sun Aug 16 03:41:39 2009 +0200
   436.3 @@ -0,0 +1,19 @@
   436.4 +$ \textbf{hg update foo}
   436.5 +0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   436.6 +$ \textbf{hg parents}
   436.7 +changeset:   
   436.8 +branch:      foo
   436.9 +user:        Bryan O'Sullivan <bos@serpentine.com>
  436.10 +
  436.11 +summary:     Second commit
  436.12 +
  436.13 +$ \textbf{hg update bar}
  436.14 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  436.15 +$ \textbf{hg parents}
  436.16 +changeset:   
  436.17 +branch:      bar
  436.18 +tag:         tip
  436.19 +user:        Bryan O'Sullivan <bos@serpentine.com>
  436.20 +
  436.21 +summary:     Third commit
  436.22 +
   437.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   437.2 +++ b/ja/examples/branch-named.update.out	Sun Aug 16 03:41:39 2009 +0200
   437.3 @@ -0,0 +1,13 @@
   437.4 +$ \textbf{hg update foo}
   437.5 +0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   437.6 +$ \textbf{hg update}
   437.7 +0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   437.8 +$ \textbf{hg parent}
   437.9 +changeset:   
  437.10 +branch:      foo
  437.11 +user:        Bryan O'Sullivan <bos@serpentine.com>
  437.12 +
  437.13 +summary:     Second commit
  437.14 +
  437.15 +$ \textbf{hg update bar}
  437.16 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   438.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   438.2 +++ b/ja/examples/branch-repo	Sun Aug 16 03:41:39 2009 +0200
   438.3 @@ -0,0 +1,48 @@
   438.4 +#!/bin/bash
   438.5 +
   438.6 +hg init myproject
   438.7 +cd myproject
   438.8 +echo hello > myfile
   438.9 +hg commit -A -m 'Initial commit'
  438.10 +cd ..
  438.11 +
  438.12 +#$ name: tag
  438.13 +
  438.14 +cd myproject
  438.15 +hg tag v1.0
  438.16 +
  438.17 +#$ name: clone
  438.18 +
  438.19 +cd ..
  438.20 +hg clone myproject myproject-1.0.1
  438.21 +
  438.22 +#$ name: bugfix
  438.23 +
  438.24 +hg clone myproject-1.0.1 my-1.0.1-bugfix
  438.25 +cd my-1.0.1-bugfix
  438.26 +echo 'I fixed a bug using only echo!' >> myfile
  438.27 +hg commit -m 'Important fix for 1.0.1'
  438.28 +#$ ignore: /tmp/branch-repo.*
  438.29 +hg push
  438.30 +
  438.31 +#$ name: new
  438.32 +
  438.33 +cd ..
  438.34 +hg clone myproject my-feature
  438.35 +cd my-feature
  438.36 +echo 'This sure is an exciting new feature!' > mynewfile
  438.37 +hg commit -A -m 'New feature'
  438.38 +hg push
  438.39 +
  438.40 +#$ name: pull
  438.41 +
  438.42 +cd ..
  438.43 +hg clone myproject myproject-merge
  438.44 +cd myproject-merge
  438.45 +hg pull ../myproject-1.0.1
  438.46 +
  438.47 +#$ name: merge
  438.48 +
  438.49 +hg merge
  438.50 +hg commit -m 'Merge bugfix from 1.0.1 branch'
  438.51 +hg push
   439.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   439.2 +++ b/ja/examples/branch-repo.bugfix.out	Sun Aug 16 03:41:39 2009 +0200
   439.3 @@ -0,0 +1,12 @@
   439.4 +$ \textbf{hg clone myproject-1.0.1 my-1.0.1-bugfix}
   439.5 +2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   439.6 +$ \textbf{cd my-1.0.1-bugfix}
   439.7 +$ \textbf{echo 'I fixed a bug using only echo!' >> myfile}
   439.8 +$ \textbf{hg commit -m 'Important fix for 1.0.1'}
   439.9 +$ \textbf{hg push}
  439.10 +pushing to /tmp/branch-repo4rF-PL/myproject-1.0.1
  439.11 +searching for changes
  439.12 +adding changesets
  439.13 +adding manifests
  439.14 +adding file changes
  439.15 +added 1 changesets with 1 changes to 1 files
   440.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   440.2 +++ b/ja/examples/branch-repo.clone.out	Sun Aug 16 03:41:39 2009 +0200
   440.3 @@ -0,0 +1,3 @@
   440.4 +$ \textbf{cd ..}
   440.5 +$ \textbf{hg clone myproject myproject-1.0.1}
   440.6 +2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   441.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   441.2 +++ b/ja/examples/branch-repo.merge.out	Sun Aug 16 03:41:39 2009 +0200
   441.3 @@ -0,0 +1,11 @@
   441.4 +$ \textbf{hg merge}
   441.5 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   441.6 +(branch merge, don't forget to commit)
   441.7 +$ \textbf{hg commit -m 'Merge bugfix from 1.0.1 branch'}
   441.8 +$ \textbf{hg push}
   441.9 +pushing to 
  441.10 +searching for changes
  441.11 +adding changesets
  441.12 +adding manifests
  441.13 +adding file changes
  441.14 +added 2 changesets with 1 changes to 1 files
   442.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   442.2 +++ b/ja/examples/branch-repo.new.out	Sun Aug 16 03:41:39 2009 +0200
   442.3 @@ -0,0 +1,14 @@
   442.4 +$ \textbf{cd ..}
   442.5 +$ \textbf{hg clone myproject my-feature}
   442.6 +2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   442.7 +$ \textbf{cd my-feature}
   442.8 +$ \textbf{echo 'This sure is an exciting new feature!' > mynewfile}
   442.9 +$ \textbf{hg commit -A -m 'New feature'}
  442.10 +adding mynewfile
  442.11 +$ \textbf{hg push}
  442.12 +pushing to 
  442.13 +searching for changes
  442.14 +adding changesets
  442.15 +adding manifests
  442.16 +adding file changes
  442.17 +added 1 changesets with 1 changes to 1 files
   443.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   443.2 +++ b/ja/examples/branch-repo.pull.out	Sun Aug 16 03:41:39 2009 +0200
   443.3 @@ -0,0 +1,12 @@
   443.4 +$ \textbf{cd ..}
   443.5 +$ \textbf{hg clone myproject myproject-merge}
   443.6 +3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   443.7 +$ \textbf{cd myproject-merge}
   443.8 +$ \textbf{hg pull ../myproject-1.0.1}
   443.9 +pulling from ../myproject-1.0.1
  443.10 +searching for changes
  443.11 +adding changesets
  443.12 +adding manifests
  443.13 +adding file changes
  443.14 +added 1 changesets with 1 changes to 1 files (+1 heads)
  443.15 +(run 'hg heads' to see heads, 'hg merge' to merge)
   444.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   444.2 +++ b/ja/examples/branch-repo.tag.out	Sun Aug 16 03:41:39 2009 +0200
   444.3 @@ -0,0 +1,2 @@
   444.4 +$ \textbf{cd myproject}
   444.5 +$ \textbf{hg tag v1.0}
   445.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   445.2 +++ b/ja/examples/branching	Sun Aug 16 03:41:39 2009 +0200
   445.3 @@ -0,0 +1,63 @@
   445.4 +#!/bin/bash
   445.5 +
   445.6 +#$ name: init
   445.7 +
   445.8 +hg init main
   445.9 +cd main
  445.10 +echo 'This is a boring feature.' > myfile
  445.11 +hg commit -A -m 'We have reached an important milestone!'
  445.12 +
  445.13 +#$ name: tag
  445.14 +
  445.15 +hg tag v1.0
  445.16 +hg tip
  445.17 +hg tags
  445.18 +
  445.19 +#$ name: main
  445.20 +
  445.21 +cd ../main
  445.22 +echo 'This is exciting and new!' >> myfile
  445.23 +hg commit -m 'Add a new feature'
  445.24 +cat myfile
  445.25 +
  445.26 +#$ name: update
  445.27 +
  445.28 +cd ..
  445.29 +hg clone -U main main-old
  445.30 +cd main-old
  445.31 +hg update v1.0
  445.32 +cat myfile
  445.33 +
  445.34 +#$ name: clone
  445.35 +
  445.36 +cd ..
  445.37 +hg clone -rv1.0 main stable
  445.38 +
  445.39 +#$ name: stable
  445.40 +
  445.41 +hg clone stable stable-fix
  445.42 +cd stable-fix
  445.43 +echo 'This is a fix to a boring feature.' > myfile
  445.44 +hg commit -m 'Fix a bug'
  445.45 +#$ ignore: /tmp/branching.*
  445.46 +hg push
  445.47 +
  445.48 +#$ name:
  445.49 +
  445.50 +export HGMERGE=$(mktemp)
  445.51 +echo '#!/bin/sh' > $HGMERGE
  445.52 +echo 'echo "This is a fix to a boring feature." > "$1"' >> $HGMERGE
  445.53 +echo 'echo "This is exciting and new!" >> "$1"' >> $HGMERGE
  445.54 +chmod 700 $HGMERGE
  445.55 +
  445.56 +#$ name: merge
  445.57 +
  445.58 +cd ../main
  445.59 +hg pull ../stable
  445.60 +hg merge
  445.61 +hg commit -m 'Bring in bugfix from stable branch'
  445.62 +cat myfile
  445.63 +
  445.64 +#$ name:
  445.65 +
  445.66 +rm $HGMERGE
   446.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   446.2 +++ b/ja/examples/branching.clone.out	Sun Aug 16 03:41:39 2009 +0200
   446.3 @@ -0,0 +1,8 @@
   446.4 +$ \textbf{cd ..}
   446.5 +$ \textbf{hg clone -rv1.0 main stable}
   446.6 +requesting all changes
   446.7 +adding changesets
   446.8 +adding manifests
   446.9 +adding file changes
  446.10 +added 1 changesets with 1 changes to 1 files
  446.11 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   447.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   447.2 +++ b/ja/examples/branching.init.out	Sun Aug 16 03:41:39 2009 +0200
   447.3 @@ -0,0 +1,5 @@
   447.4 +$ \textbf{hg init main}
   447.5 +$ \textbf{cd main}
   447.6 +$ \textbf{echo 'This is a boring feature.' > myfile}
   447.7 +$ \textbf{hg commit -A -m 'We have reached an important milestone!'}
   447.8 +adding myfile
   448.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   448.2 +++ b/ja/examples/branching.main.out	Sun Aug 16 03:41:39 2009 +0200
   448.3 @@ -0,0 +1,6 @@
   448.4 +$ \textbf{cd ../main}
   448.5 +$ \textbf{echo 'This is exciting and new!' >> myfile}
   448.6 +$ \textbf{hg commit -m 'Add a new feature'}
   448.7 +$ \textbf{cat myfile}
   448.8 +This is a boring feature.
   448.9 +This is exciting and new!
   449.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   449.2 +++ b/ja/examples/branching.merge.out	Sun Aug 16 03:41:39 2009 +0200
   449.3 @@ -0,0 +1,17 @@
   449.4 +$ \textbf{cd ../main}
   449.5 +$ \textbf{hg pull ../stable}
   449.6 +pulling from ../stable
   449.7 +searching for changes
   449.8 +adding changesets
   449.9 +adding manifests
  449.10 +adding file changes
  449.11 +added 1 changesets with 1 changes to 1 files (+1 heads)
  449.12 +(run 'hg heads' to see heads, 'hg merge' to merge)
  449.13 +$ \textbf{hg merge}
  449.14 +merging myfile
  449.15 +0 files updated, 1 files merged, 0 files removed, 0 files unresolved
  449.16 +(branch merge, don't forget to commit)
  449.17 +$ \textbf{hg commit -m 'Bring in bugfix from stable branch'}
  449.18 +$ \textbf{cat myfile}
  449.19 +This is a fix to a boring feature.
  449.20 +This is exciting and new!
   450.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   450.2 +++ b/ja/examples/branching.stable.out	Sun Aug 16 03:41:39 2009 +0200
   450.3 @@ -0,0 +1,12 @@
   450.4 +$ \textbf{hg clone stable stable-fix}
   450.5 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   450.6 +$ \textbf{cd stable-fix}
   450.7 +$ \textbf{echo 'This is a fix to a boring feature.' > myfile}
   450.8 +$ \textbf{hg commit -m 'Fix a bug'}
   450.9 +$ \textbf{hg push}
  450.10 +pushing to /tmp/branchingfJgZac/stable
  450.11 +searching for changes
  450.12 +adding changesets
  450.13 +adding manifests
  450.14 +adding file changes
  450.15 +added 1 changesets with 1 changes to 1 files
   451.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   451.2 +++ b/ja/examples/branching.tag.out	Sun Aug 16 03:41:39 2009 +0200
   451.3 @@ -0,0 +1,11 @@
   451.4 +$ \textbf{hg tag v1.0}
   451.5 +$ \textbf{hg tip}
   451.6 +changeset:   
   451.7 +tag:         tip
   451.8 +user:        Bryan O'Sullivan <bos@serpentine.com>
   451.9 +
  451.10 +summary:     Added tag v1.0 for changeset 
  451.11 +
  451.12 +$ \textbf{hg tags}
  451.13 +tip                                
  451.14 +v1.0                               
   452.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   452.2 +++ b/ja/examples/branching.update.out	Sun Aug 16 03:41:39 2009 +0200
   452.3 @@ -0,0 +1,7 @@
   452.4 +$ \textbf{cd ..}
   452.5 +$ \textbf{hg clone -U main main-old}
   452.6 +$ \textbf{cd main-old}
   452.7 +$ \textbf{hg update v1.0}
   452.8 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   452.9 +$ \textbf{cat myfile}
  452.10 +This is a boring feature.
   453.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   453.2 +++ b/ja/examples/cmdref	Sun Aug 16 03:41:39 2009 +0200
   453.3 @@ -0,0 +1,22 @@
   453.4 +#!/bin/bash
   453.5 +
   453.6 +hg init diff
   453.7 +cd diff
   453.8 +cat > myfile.c <<EOF
   453.9 +int myfunc()
  453.10 +{
  453.11 +    return 1;
  453.12 +}
  453.13 +EOF
  453.14 +hg ci -Ama
  453.15 +
  453.16 +sed -ie 's/return 1/return 10/' myfile.c
  453.17 +
  453.18 +#$ name: diff-p
  453.19 +
  453.20 +echo '[diff]' >> $HGRC
  453.21 +echo 'showfunc = False' >> $HGRC
  453.22 +
  453.23 +hg diff
  453.24 +
  453.25 +hg diff -p
   454.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   454.2 +++ b/ja/examples/cmdref.diff-p.out	Sun Aug 16 03:41:39 2009 +0200
   454.3 @@ -0,0 +1,22 @@
   454.4 +$ \textbf{echo '[diff]' >> $HGRC}
   454.5 +$ \textbf{echo 'showfunc = False' >> $HGRC}
   454.6 +$ \textbf{hg diff}
   454.7 +diff -r  myfile.c
   454.8 +
   454.9 +
  454.10 +@@ -1,4 +1,4 @@
  454.11 + int myfunc()
  454.12 + \{
  454.13 +-    return 1;
  454.14 ++    return 10;
  454.15 + \}
  454.16 +$ \textbf{hg diff -p}
  454.17 +diff -r  myfile.c
  454.18 +
  454.19 +
  454.20 +@@ -1,4 +1,4 @@ int myfunc()
  454.21 + int myfunc()
  454.22 + \{
  454.23 +-    return 1;
  454.24 ++    return 10;
  454.25 + \}
   455.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   455.2 +++ b/ja/examples/daily.copy	Sun Aug 16 03:41:39 2009 +0200
   455.3 @@ -0,0 +1,82 @@
   455.4 +#!/bin/bash
   455.5 +
   455.6 +#$ name: init
   455.7 +
   455.8 +hg init my-copy
   455.9 +cd my-copy
  455.10 +echo line > file
  455.11 +hg add file
  455.12 +hg commit -m 'Added a file'
  455.13 +
  455.14 +#$ name: clone
  455.15 +
  455.16 +cd ..
  455.17 +hg clone my-copy your-copy
  455.18 +
  455.19 +#$ name: copy
  455.20 +
  455.21 +cd my-copy
  455.22 +hg copy file new-file
  455.23 +
  455.24 +#$ name: status
  455.25 +
  455.26 +hg status
  455.27 +
  455.28 +#$ name: status-copy
  455.29 +
  455.30 +hg status -C
  455.31 +hg commit -m 'Copied file'
  455.32 +
  455.33 +#$ name: other
  455.34 +
  455.35 +cd ../your-copy
  455.36 +echo 'new contents' >> file
  455.37 +hg commit -m 'Changed file'
  455.38 +
  455.39 +#$ name: cat
  455.40 +
  455.41 +cat file
  455.42 +cat ../my-copy/new-file
  455.43 +
  455.44 +#$ name: merge
  455.45 +
  455.46 +hg pull ../my-copy
  455.47 +hg merge
  455.48 +cat new-file
  455.49 +
  455.50 +#$ name:
  455.51 +
  455.52 +cd ..
  455.53 +hg init copy-example
  455.54 +cd copy-example
  455.55 +echo a > a
  455.56 +echo b > b
  455.57 +mkdir c
  455.58 +mkdir c/a
  455.59 +echo c > c/a/c
  455.60 +hg ci -Ama
  455.61 +
  455.62 +#$ name: simple
  455.63 +
  455.64 +mkdir k
  455.65 +hg copy a k
  455.66 +ls k
  455.67 +
  455.68 +#$ name: dir-dest
  455.69 +
  455.70 +mkdir d
  455.71 +hg copy a b d
  455.72 +ls d
  455.73 +
  455.74 +#$ name: dir-src
  455.75 +
  455.76 +hg copy c e
  455.77 +
  455.78 +#$ name: dir-src-dest
  455.79 +
  455.80 +hg copy c d
  455.81 +
  455.82 +#$ name: after
  455.83 +
  455.84 +cp a z
  455.85 +hg copy --after a z
   456.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   456.2 +++ b/ja/examples/daily.copy.after.out	Sun Aug 16 03:41:39 2009 +0200
   456.3 @@ -0,0 +1,2 @@
   456.4 +$ \textbf{cp a z}
   456.5 +$ \textbf{hg copy --after a z}
   457.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   457.2 +++ b/ja/examples/daily.copy.cat.out	Sun Aug 16 03:41:39 2009 +0200
   457.3 @@ -0,0 +1,5 @@
   457.4 +$ \textbf{cat file}
   457.5 +line
   457.6 +new contents
   457.7 +$ \textbf{cat ../my-copy/new-file}
   457.8 +line
   458.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   458.2 +++ b/ja/examples/daily.copy.clone.out	Sun Aug 16 03:41:39 2009 +0200
   458.3 @@ -0,0 +1,3 @@
   458.4 +$ \textbf{cd ..}
   458.5 +$ \textbf{hg clone my-copy your-copy}
   458.6 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   459.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   459.2 +++ b/ja/examples/daily.copy.copy.out	Sun Aug 16 03:41:39 2009 +0200
   459.3 @@ -0,0 +1,2 @@
   459.4 +$ \textbf{cd my-copy}
   459.5 +$ \textbf{hg copy file new-file}
   460.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   460.2 +++ b/ja/examples/daily.copy.dir-dest.out	Sun Aug 16 03:41:39 2009 +0200
   460.3 @@ -0,0 +1,4 @@
   460.4 +$ \textbf{mkdir d}
   460.5 +$ \textbf{hg copy a b d}
   460.6 +$ \textbf{ls d}
   460.7 +a  b
   461.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   461.2 +++ b/ja/examples/daily.copy.dir-src-dest.out	Sun Aug 16 03:41:39 2009 +0200
   461.3 @@ -0,0 +1,2 @@
   461.4 +$ \textbf{hg copy c d}
   461.5 +copying c/a/c to d/c/a/c
   462.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   462.2 +++ b/ja/examples/daily.copy.dir-src.out	Sun Aug 16 03:41:39 2009 +0200
   462.3 @@ -0,0 +1,2 @@
   462.4 +$ \textbf{hg copy c e}
   462.5 +copying c/a/c to e/a/c
   463.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   463.2 +++ b/ja/examples/daily.copy.init.out	Sun Aug 16 03:41:39 2009 +0200
   463.3 @@ -0,0 +1,5 @@
   463.4 +$ \textbf{hg init my-copy}
   463.5 +$ \textbf{cd my-copy}
   463.6 +$ \textbf{echo line > file}
   463.7 +$ \textbf{hg add file}
   463.8 +$ \textbf{hg commit -m 'Added a file'}
   464.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   464.2 +++ b/ja/examples/daily.copy.merge.out	Sun Aug 16 03:41:39 2009 +0200
   464.3 @@ -0,0 +1,15 @@
   464.4 +$ \textbf{hg pull ../my-copy}
   464.5 +pulling from ../my-copy
   464.6 +searching for changes
   464.7 +adding changesets
   464.8 +adding manifests
   464.9 +adding file changes
  464.10 +added 1 changesets with 1 changes to 1 files (+1 heads)
  464.11 +(run 'hg heads' to see heads, 'hg merge' to merge)
  464.12 +$ \textbf{hg merge}
  464.13 +merging file and new-file
  464.14 +0 files updated, 1 files merged, 0 files removed, 0 files unresolved
  464.15 +(branch merge, don't forget to commit)
  464.16 +$ \textbf{cat new-file}
  464.17 +line
  464.18 +new contents
   465.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   465.2 +++ b/ja/examples/daily.copy.other.out	Sun Aug 16 03:41:39 2009 +0200
   465.3 @@ -0,0 +1,3 @@
   465.4 +$ \textbf{cd ../your-copy}
   465.5 +$ \textbf{echo 'new contents' >> file}
   465.6 +$ \textbf{hg commit -m 'Changed file'}
   466.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   466.2 +++ b/ja/examples/daily.copy.simple.out	Sun Aug 16 03:41:39 2009 +0200
   466.3 @@ -0,0 +1,4 @@
   466.4 +$ \textbf{mkdir k}
   466.5 +$ \textbf{hg copy a k}
   466.6 +$ \textbf{ls k}
   466.7 +a
   467.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   467.2 +++ b/ja/examples/daily.copy.status-copy.out	Sun Aug 16 03:41:39 2009 +0200
   467.3 @@ -0,0 +1,4 @@
   467.4 +$ \textbf{hg status -C}
   467.5 +A new-file
   467.6 +  file
   467.7 +$ \textbf{hg commit -m 'Copied file'}
   468.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   468.2 +++ b/ja/examples/daily.copy.status.out	Sun Aug 16 03:41:39 2009 +0200
   468.3 @@ -0,0 +1,2 @@
   468.4 +$ \textbf{hg status}
   468.5 +A new-file
   469.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   469.2 +++ b/ja/examples/daily.files	Sun Aug 16 03:41:39 2009 +0200
   469.3 @@ -0,0 +1,93 @@
   469.4 +#!/bin/bash
   469.5 +
   469.6 +#$ name: add
   469.7 +
   469.8 +hg init add-example
   469.9 +cd add-example
  469.10 +echo a > a
  469.11 +hg status
  469.12 +hg add a
  469.13 +hg status
  469.14 +hg commit -m 'Added one file'
  469.15 +hg status
  469.16 +
  469.17 +#$ name: add-dir
  469.18 +
  469.19 +mkdir b
  469.20 +echo b > b/b
  469.21 +echo c > b/c
  469.22 +mkdir b/d
  469.23 +echo d > b/d/d
  469.24 +hg add b
  469.25 +hg commit -m 'Added all files in subdirectory'
  469.26 +
  469.27 +#$ name:
  469.28 +
  469.29 +cd ..
  469.30 +
  469.31 +#$ name: hidden
  469.32 +
  469.33 +hg init hidden-example
  469.34 +cd hidden-example
  469.35 +mkdir empty
  469.36 +touch empty/.hidden
  469.37 +hg add empty/.hidden
  469.38 +hg commit -m 'Manage an empty-looking directory'
  469.39 +ls empty
  469.40 +cd ..
  469.41 +hg clone hidden-example tmp
  469.42 +ls tmp
  469.43 +ls tmp/empty
  469.44 +
  469.45 +#$ name: remove
  469.46 +
  469.47 +hg init remove-example
  469.48 +cd remove-example
  469.49 +echo a > a
  469.50 +mkdir b
  469.51 +echo b > b/b
  469.52 +hg add a b
  469.53 +hg commit -m 'Small example for file removal'
  469.54 +hg remove a
  469.55 +hg status
  469.56 +hg remove b
  469.57 +
  469.58 +#$ name:
  469.59 +
  469.60 +cd ..
  469.61 +
  469.62 +#$ name: missing
  469.63 +hg init missing-example
  469.64 +cd missing-example
  469.65 +echo a > a
  469.66 +hg add a
  469.67 +hg commit -m 'File about to be missing'
  469.68 +rm a
  469.69 +hg status
  469.70 +
  469.71 +#$ name: remove-after
  469.72 +
  469.73 +hg remove --after a
  469.74 +hg status
  469.75 +
  469.76 +#$ name: recover-missing
  469.77 +hg revert a
  469.78 +cat a
  469.79 +hg status
  469.80 +
  469.81 +#$ name:
  469.82 +
  469.83 +cd ..
  469.84 +
  469.85 +#$ name: addremove
  469.86 +
  469.87 +hg init addremove-example
  469.88 +cd addremove-example
  469.89 +echo a > a
  469.90 +echo b > b
  469.91 +hg addremove
  469.92 +
  469.93 +#$ name: commit-addremove
  469.94 +
  469.95 +echo c > c
  469.96 +hg commit -A -m 'Commit with addremove'
   470.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   470.2 +++ b/ja/examples/daily.files.add-dir.out	Sun Aug 16 03:41:39 2009 +0200
   470.3 @@ -0,0 +1,10 @@
   470.4 +$ \textbf{mkdir b}
   470.5 +$ \textbf{echo b > b/b}
   470.6 +$ \textbf{echo c > b/c}
   470.7 +$ \textbf{mkdir b/d}
   470.8 +$ \textbf{echo d > b/d/d}
   470.9 +$ \textbf{hg add b}
  470.10 +adding b/b
  470.11 +adding b/c
  470.12 +adding b/d/d
  470.13 +$ \textbf{hg commit -m 'Added all files in subdirectory'}
   471.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   471.2 +++ b/ja/examples/daily.files.add.out	Sun Aug 16 03:41:39 2009 +0200
   471.3 @@ -0,0 +1,10 @@
   471.4 +$ \textbf{hg init add-example}
   471.5 +$ \textbf{cd add-example}
   471.6 +$ \textbf{echo a > a}
   471.7 +$ \textbf{hg status}
   471.8 +? a
   471.9 +$ \textbf{hg add a}
  471.10 +$ \textbf{hg status}
  471.11 +A a
  471.12 +$ \textbf{hg commit -m 'Added one file'}
  471.13 +$ \textbf{hg status}
   472.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   472.2 +++ b/ja/examples/daily.files.addremove.out	Sun Aug 16 03:41:39 2009 +0200
   472.3 @@ -0,0 +1,7 @@
   472.4 +$ \textbf{hg init addremove-example}
   472.5 +$ \textbf{cd addremove-example}
   472.6 +$ \textbf{echo a > a}
   472.7 +$ \textbf{echo b > b}
   472.8 +$ \textbf{hg addremove}
   472.9 +adding a
  472.10 +adding b
   473.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   473.2 +++ b/ja/examples/daily.files.commit-addremove.out	Sun Aug 16 03:41:39 2009 +0200
   473.3 @@ -0,0 +1,3 @@
   473.4 +$ \textbf{echo c > c}
   473.5 +$ \textbf{hg commit -A -m 'Commit with addremove'}
   473.6 +adding c
   474.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   474.2 +++ b/ja/examples/daily.files.hidden.out	Sun Aug 16 03:41:39 2009 +0200
   474.3 @@ -0,0 +1,13 @@
   474.4 +$ \textbf{hg init hidden-example}
   474.5 +$ \textbf{cd hidden-example}
   474.6 +$ \textbf{mkdir empty}
   474.7 +$ \textbf{touch empty/.hidden}
   474.8 +$ \textbf{hg add empty/.hidden}
   474.9 +$ \textbf{hg commit -m 'Manage an empty-looking directory'}
  474.10 +$ \textbf{ls empty}
  474.11 +$ \textbf{cd ..}
  474.12 +$ \textbf{hg clone hidden-example tmp}
  474.13 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  474.14 +$ \textbf{ls tmp}
  474.15 +empty
  474.16 +$ \textbf{ls tmp/empty}
   475.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   475.2 +++ b/ja/examples/daily.files.missing.out	Sun Aug 16 03:41:39 2009 +0200
   475.3 @@ -0,0 +1,8 @@
   475.4 +$ \textbf{hg init missing-example}
   475.5 +$ \textbf{cd missing-example}
   475.6 +$ \textbf{echo a > a}
   475.7 +$ \textbf{hg add a}
   475.8 +$ \textbf{hg commit -m 'File about to be missing'}
   475.9 +$ \textbf{rm a}
  475.10 +$ \textbf{hg status}
  475.11 +! a
   476.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   476.2 +++ b/ja/examples/daily.files.recover-missing.out	Sun Aug 16 03:41:39 2009 +0200
   476.3 @@ -0,0 +1,4 @@
   476.4 +$ \textbf{hg revert a}
   476.5 +$ \textbf{cat a}
   476.6 +a
   476.7 +$ \textbf{hg status}
   477.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   477.2 +++ b/ja/examples/daily.files.remove-after.out	Sun Aug 16 03:41:39 2009 +0200
   477.3 @@ -0,0 +1,3 @@
   477.4 +$ \textbf{hg remove --after a}
   477.5 +$ \textbf{hg status}
   477.6 +R a
   478.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   478.2 +++ b/ja/examples/daily.files.remove.out	Sun Aug 16 03:41:39 2009 +0200
   478.3 @@ -0,0 +1,13 @@
   478.4 +$ \textbf{hg init remove-example}
   478.5 +$ \textbf{cd remove-example}
   478.6 +$ \textbf{echo a > a}
   478.7 +$ \textbf{mkdir b}
   478.8 +$ \textbf{echo b > b/b}
   478.9 +$ \textbf{hg add a b}
  478.10 +adding b/b
  478.11 +$ \textbf{hg commit -m 'Small example for file removal'}
  478.12 +$ \textbf{hg remove a}
  478.13 +$ \textbf{hg status}
  478.14 +R a
  478.15 +$ \textbf{hg remove b}
  478.16 +removing b/b
   479.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   479.2 +++ b/ja/examples/daily.rename	Sun Aug 16 03:41:39 2009 +0200
   479.3 @@ -0,0 +1,18 @@
   479.4 +#!/bin/bash
   479.5 +
   479.6 +hg init a
   479.7 +cd a
   479.8 +echo a > a
   479.9 +hg ci -Ama
  479.10 +
  479.11 +#$ name: rename
  479.12 +
  479.13 +hg rename a b
  479.14 +
  479.15 +#$ name: status
  479.16 +
  479.17 +hg status
  479.18 +
  479.19 +#$ name: status-copy
  479.20 +
  479.21 +hg status -C
   480.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   480.2 +++ b/ja/examples/daily.rename.rename.out	Sun Aug 16 03:41:39 2009 +0200
   480.3 @@ -0,0 +1,1 @@
   480.4 +$ \textbf{hg rename a b}
   481.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   481.2 +++ b/ja/examples/daily.rename.status-copy.out	Sun Aug 16 03:41:39 2009 +0200
   481.3 @@ -0,0 +1,4 @@
   481.4 +$ \textbf{hg status -C}
   481.5 +A b
   481.6 +  a
   481.7 +R a
   482.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   482.2 +++ b/ja/examples/daily.rename.status.out	Sun Aug 16 03:41:39 2009 +0200
   482.3 @@ -0,0 +1,3 @@
   482.4 +$ \textbf{hg status}
   482.5 +A b
   482.6 +R a
   483.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   483.2 +++ b/ja/examples/daily.revert	Sun Aug 16 03:41:39 2009 +0200
   483.3 @@ -0,0 +1,74 @@
   483.4 +#!/bin/bash
   483.5 +
   483.6 +hg init a
   483.7 +cd a
   483.8 +echo 'original content' > file
   483.9 +hg ci -Ama
  483.10 +
  483.11 +#$ name: modify
  483.12 +
  483.13 +cat file
  483.14 +echo unwanted change >> file
  483.15 +hg diff file
  483.16 +
  483.17 +#$ name: unmodify
  483.18 +
  483.19 +hg status
  483.20 +hg revert file
  483.21 +cat file
  483.22 +
  483.23 +#$ name: status
  483.24 +
  483.25 +hg status
  483.26 +cat file.orig
  483.27 +
  483.28 +#$ name:
  483.29 +
  483.30 +rm file.orig
  483.31 +
  483.32 +#$ name: add
  483.33 +
  483.34 +echo oops > oops
  483.35 +hg add oops
  483.36 +hg status oops
  483.37 +hg revert oops
  483.38 +hg status
  483.39 +
  483.40 +#$ name:
  483.41 +
  483.42 +rm oops
  483.43 +
  483.44 +#$ name: remove
  483.45 +
  483.46 +hg remove file
  483.47 +hg status
  483.48 +hg revert file
  483.49 +hg status
  483.50 +ls file
  483.51 +
  483.52 +#$ name: missing
  483.53 +
  483.54 +rm file
  483.55 +hg status
  483.56 +hg revert file
  483.57 +ls file
  483.58 +
  483.59 +#$ name: copy
  483.60 +
  483.61 +hg copy file new-file
  483.62 +hg revert new-file
  483.63 +hg status
  483.64 +
  483.65 +#$ name:
  483.66 +
  483.67 +rm new-file
  483.68 +
  483.69 +#$ name: rename
  483.70 +
  483.71 +hg rename file new-file
  483.72 +hg revert new-file
  483.73 +hg status
  483.74 +
  483.75 +#$ name: rename-orig
  483.76 +hg revert file
  483.77 +hg status
   484.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   484.2 +++ b/ja/examples/daily.revert.add.out	Sun Aug 16 03:41:39 2009 +0200
   484.3 @@ -0,0 +1,7 @@
   484.4 +$ \textbf{echo oops > oops}
   484.5 +$ \textbf{hg add oops}
   484.6 +$ \textbf{hg status oops}
   484.7 +A oops
   484.8 +$ \textbf{hg revert oops}
   484.9 +$ \textbf{hg status}
  484.10 +? oops
   485.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   485.2 +++ b/ja/examples/daily.revert.copy.out	Sun Aug 16 03:41:39 2009 +0200
   485.3 @@ -0,0 +1,4 @@
   485.4 +$ \textbf{hg copy file new-file}
   485.5 +$ \textbf{hg revert new-file}
   485.6 +$ \textbf{hg status}
   485.7 +? new-file
   486.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   486.2 +++ b/ja/examples/daily.revert.missing.out	Sun Aug 16 03:41:39 2009 +0200
   486.3 @@ -0,0 +1,6 @@
   486.4 +$ \textbf{rm file}
   486.5 +$ \textbf{hg status}
   486.6 +! file
   486.7 +$ \textbf{hg revert file}
   486.8 +$ \textbf{ls file}
   486.9 +file
   487.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   487.2 +++ b/ja/examples/daily.revert.modify.out	Sun Aug 16 03:41:39 2009 +0200
   487.3 @@ -0,0 +1,10 @@
   487.4 +$ \textbf{cat file}
   487.5 +original content
   487.6 +$ \textbf{echo unwanted change >> file}
   487.7 +$ \textbf{hg diff file}
   487.8 +diff -r  file
   487.9 +
  487.10 +
  487.11 +@@ -1,1 +1,2 @@ original content
  487.12 + original content
  487.13 ++unwanted change
   488.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   488.2 +++ b/ja/examples/daily.revert.remove.out	Sun Aug 16 03:41:39 2009 +0200
   488.3 @@ -0,0 +1,7 @@
   488.4 +$ \textbf{hg remove file}
   488.5 +$ \textbf{hg status}
   488.6 +R file
   488.7 +$ \textbf{hg revert file}
   488.8 +$ \textbf{hg status}
   488.9 +$ \textbf{ls file}
  488.10 +file
   489.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   489.2 +++ b/ja/examples/daily.revert.rename-orig.out	Sun Aug 16 03:41:39 2009 +0200
   489.3 @@ -0,0 +1,4 @@
   489.4 +$ \textbf{hg revert file}
   489.5 +no changes needed to file
   489.6 +$ \textbf{hg status}
   489.7 +? new-file
   490.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   490.2 +++ b/ja/examples/daily.revert.rename.out	Sun Aug 16 03:41:39 2009 +0200
   490.3 @@ -0,0 +1,4 @@
   490.4 +$ \textbf{hg rename file new-file}
   490.5 +$ \textbf{hg revert new-file}
   490.6 +$ \textbf{hg status}
   490.7 +? new-file
   491.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   491.2 +++ b/ja/examples/daily.revert.status.out	Sun Aug 16 03:41:39 2009 +0200
   491.3 @@ -0,0 +1,5 @@
   491.4 +$ \textbf{hg status}
   491.5 +? file.orig
   491.6 +$ \textbf{cat file.orig}
   491.7 +original content
   491.8 +unwanted change
   492.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   492.2 +++ b/ja/examples/daily.revert.unmodify.out	Sun Aug 16 03:41:39 2009 +0200
   492.3 @@ -0,0 +1,5 @@
   492.4 +$ \textbf{hg status}
   492.5 +M file
   492.6 +$ \textbf{hg revert file}
   492.7 +$ \textbf{cat file}
   492.8 +original content
   493.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   493.2 +++ b/ja/examples/data/check_whitespace.py	Sun Aug 16 03:41:39 2009 +0200
   493.3 @@ -0,0 +1,44 @@
   493.4 +#!/usr/bin/python
   493.5 +
   493.6 +import re
   493.7 +
   493.8 +def trailing_whitespace(difflines):
   493.9 +    added, linenum, header = [], 0, False
  493.10 +
  493.11 +    for line in difflines:
  493.12 +        if header:
  493.13 +            # remember the name of the file that this diff affects
  493.14 +            m = re.match(r'(?:---|\+\+\+) ([^\t]+)', line)
  493.15 +            if m and m.group(1) != '/dev/null':
  493.16 +                filename = m.group(1).split('/', 1)[-1]
  493.17 +            if line.startswith('+++ '):
  493.18 +                header = False
  493.19 +            continue
  493.20 +        if line.startswith('diff '):
  493.21 +            header = True
  493.22 +            continue
  493.23 +        # hunk header - save the line number
  493.24 +        m = re.match(r'@@ -\d+,\d+ \+(\d+),', line)
  493.25 +        if m:
  493.26 +            linenum = int(m.group(1))
  493.27 +            continue
  493.28 +        # hunk body - check for an added line with trailing whitespace
  493.29 +        m = re.match(r'\+.*\s$', line)
  493.30 +        if m:
  493.31 +            added.append((filename, linenum))
  493.32 +        if line and line[0] in ' +':
  493.33 +            linenum += 1
  493.34 +    return added
  493.35 +
  493.36 +if __name__ == '__main__':
  493.37 +    import os, sys
  493.38 +    
  493.39 +    added = trailing_whitespace(os.popen('hg export tip'))
  493.40 +    if added:
  493.41 +        for filename, linenum in added:
  493.42 +            print >> sys.stderr, ('%s, line %d: trailing whitespace added' %
  493.43 +                                  (filename, linenum))
  493.44 +        # save the commit message so we don't need to retype it
  493.45 +        os.system('hg tip --template "{desc}" > .hg/commit.save')
  493.46 +        print >> sys.stderr, 'commit message saved to .hg/commit.save'
  493.47 +        sys.exit(1)
   494.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   494.2 +++ b/ja/examples/data/remove-redundant-null-checks.patch	Sun Aug 16 03:41:39 2009 +0200
   494.3 @@ -0,0 +1,190 @@
   494.4 +
   494.5 +From: Jesper Juhl <jesper.juhl@gmail.com>
   494.6 +
   494.7 +Remove redundant NULL chck before kfree + tiny CodingStyle cleanup for
   494.8 +drivers/
   494.9 +
  494.10 +Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
  494.11 +Signed-off-by: Andrew Morton <akpm@osdl.org>
  494.12 +---
  494.13 +
  494.14 + drivers/char/agp/sgi-agp.c        |    5 ++---
  494.15 + drivers/char/hvcs.c               |   11 +++++------
  494.16 + drivers/message/fusion/mptfc.c    |    6 ++----
  494.17 + drivers/message/fusion/mptsas.c   |    3 +--
  494.18 + drivers/net/fs_enet/fs_enet-mii.c |    3 +--
  494.19 + drivers/net/wireless/ipw2200.c    |   22 ++++++----------------
  494.20 + drivers/scsi/libata-scsi.c        |    4 +---
  494.21 + drivers/video/au1100fb.c          |    3 +--
  494.22 + 8 files changed, 19 insertions(+), 38 deletions(-)
  494.23 +
  494.24 +diff -puN drivers/char/agp/sgi-agp.c~remove-redundant-null-checks-before-free-in-drivers drivers/char/agp/sgi-agp.c
  494.25 +--- a/drivers/char/agp/sgi-agp.c~remove-redundant-null-checks-before-free-in-drivers
  494.26 ++++ a/drivers/char/agp/sgi-agp.c
  494.27 +@@ -329,9 +329,8 @@ static int __devinit agp_sgi_init(void)
  494.28 + 
  494.29 + static void __devexit agp_sgi_cleanup(void)
  494.30 + {
  494.31 +-	if (sgi_tioca_agp_bridges)
  494.32 +-		kfree(sgi_tioca_agp_bridges);
  494.33 +-	sgi_tioca_agp_bridges=NULL;
  494.34 ++	kfree(sgi_tioca_agp_bridges);
  494.35 ++	sgi_tioca_agp_bridges = NULL;
  494.36 + }
  494.37 + 
  494.38 + module_init(agp_sgi_init);
  494.39 +diff -puN drivers/char/hvcs.c~remove-redundant-null-checks-before-free-in-drivers drivers/char/hvcs.c
  494.40 +--- a/drivers/char/hvcs.c~remove-redundant-null-checks-before-free-in-drivers
  494.41 ++++ a/drivers/char/hvcs.c
  494.42 +@@ -1320,11 +1320,12 @@ static struct tty_operations hvcs_ops = 
  494.43 + static int hvcs_alloc_index_list(int n)
  494.44 + {
  494.45 + 	int i;
  494.46 ++
  494.47 + 	hvcs_index_list = kmalloc(n * sizeof(hvcs_index_count),GFP_KERNEL);
  494.48 + 	if (!hvcs_index_list)
  494.49 + 		return -ENOMEM;
  494.50 + 	hvcs_index_count = n;
  494.51 +-	for(i = 0; i < hvcs_index_count; i++)
  494.52 ++	for (i = 0; i < hvcs_index_count; i++)
  494.53 + 		hvcs_index_list[i] = -1;
  494.54 + 	return 0;
  494.55 + }
  494.56 +@@ -1332,11 +1333,9 @@ static int hvcs_alloc_index_list(int n)
  494.57 + static void hvcs_free_index_list(void)
  494.58 + {
  494.59 + 	/* Paranoia check to be thorough. */
  494.60 +-	if (hvcs_index_list) {
  494.61 +-		kfree(hvcs_index_list);
  494.62 +-		hvcs_index_list = NULL;
  494.63 +-		hvcs_index_count = 0;
  494.64 +-	}
  494.65 ++	kfree(hvcs_index_list);
  494.66 ++	hvcs_index_list = NULL;
  494.67 ++	hvcs_index_count = 0;
  494.68 + }
  494.69 + 
  494.70 + static int __init hvcs_module_init(void)
  494.71 +diff -puN drivers/message/fusion/mptfc.c~remove-redundant-null-checks-before-free-in-drivers drivers/message/fusion/mptfc.c
  494.72 +--- a/drivers/message/fusion/mptfc.c~remove-redundant-null-checks-before-free-in-drivers
  494.73 ++++ a/drivers/message/fusion/mptfc.c
  494.74 +@@ -305,10 +305,8 @@ mptfc_GetFcDevPage0(MPT_ADAPTER *ioc, in
  494.75 + 	}
  494.76 + 
  494.77 +  out:
  494.78 +-	if (pp0_array)
  494.79 +-		kfree(pp0_array);
  494.80 +-	if (p0_array)
  494.81 +-		kfree(p0_array);
  494.82 ++	kfree(pp0_array);
  494.83 ++	kfree(p0_array);
  494.84 + 	return rc;
  494.85 + }
  494.86 + 
  494.87 +diff -puN drivers/message/fusion/mptsas.c~remove-redundant-null-checks-before-free-in-drivers drivers/message/fusion/mptsas.c
  494.88 +--- a/drivers/message/fusion/mptsas.c~remove-redundant-null-checks-before-free-in-drivers
  494.89 ++++ a/drivers/message/fusion/mptsas.c
  494.90 +@@ -1378,8 +1378,7 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc)
  494.91 + 	return 0;
  494.92 + 
  494.93 +  out_free_port_info:
  494.94 +-	if (hba)
  494.95 +-		kfree(hba);
  494.96 ++	kfree(hba);
  494.97 +  out:
  494.98 + 	return error;
  494.99 + }
 494.100 +diff -puN drivers/net/fs_enet/fs_enet-mii.c~remove-redundant-null-checks-before-free-in-drivers drivers/net/fs_enet/fs_enet-mii.c
 494.101 +--- a/drivers/net/fs_enet/fs_enet-mii.c~remove-redundant-null-checks-before-free-in-drivers
 494.102 ++++ a/drivers/net/fs_enet/fs_enet-mii.c
 494.103 +@@ -431,8 +431,7 @@ static struct fs_enet_mii_bus *create_bu
 494.104 + 	return bus;
 494.105 + 
 494.106 + err:
 494.107 +-	if (bus)
 494.108 +-		kfree(bus);
 494.109 ++	kfree(bus);
 494.110 + 	return ERR_PTR(ret);
 494.111 + }
 494.112 + 
 494.113 +diff -puN drivers/net/wireless/ipw2200.c~remove-redundant-null-checks-before-free-in-drivers drivers/net/wireless/ipw2200.c
 494.114 +--- a/drivers/net/wireless/ipw2200.c~remove-redundant-null-checks-before-free-in-drivers
 494.115 ++++ a/drivers/net/wireless/ipw2200.c
 494.116 +@@ -1229,12 +1229,6 @@ static struct ipw_fw_error *ipw_alloc_er
 494.117 + 	return error;
 494.118 + }
 494.119 + 
 494.120 +-static void ipw_free_error_log(struct ipw_fw_error *error)
 494.121 +-{
 494.122 +-	if (error)
 494.123 +-		kfree(error);
 494.124 +-}
 494.125 +-
 494.126 + static ssize_t show_event_log(struct device *d,
 494.127 + 			      struct device_attribute *attr, char *buf)
 494.128 + {
 494.129 +@@ -1296,10 +1290,9 @@ static ssize_t clear_error(struct device
 494.130 + 			   const char *buf, size_t count)
 494.131 + {
 494.132 + 	struct ipw_priv *priv = dev_get_drvdata(d);
 494.133 +-	if (priv->error) {
 494.134 +-		ipw_free_error_log(priv->error);
 494.135 +-		priv->error = NULL;
 494.136 +-	}
 494.137 ++
 494.138 ++	kfree(priv->error);
 494.139 ++	priv->error = NULL;
 494.140 + 	return count;
 494.141 + }
 494.142 + 
 494.143 +@@ -1970,8 +1963,7 @@ static void ipw_irq_tasklet(struct ipw_p
 494.144 + 				struct ipw_fw_error *error =
 494.145 + 				    ipw_alloc_error_log(priv);
 494.146 + 				ipw_dump_error_log(priv, error);
 494.147 +-				if (error)
 494.148 +-					ipw_free_error_log(error);
 494.149 ++				kfree(error);
 494.150 + 			}
 494.151 + #endif
 494.152 + 		} else {
 494.153 +@@ -11693,10 +11685,8 @@ static void ipw_pci_remove(struct pci_de
 494.154 + 		}
 494.155 + 	}
 494.156 + 
 494.157 +-	if (priv->error) {
 494.158 +-		ipw_free_error_log(priv->error);
 494.159 +-		priv->error = NULL;
 494.160 +-	}
 494.161 ++	kfree(priv->error);
 494.162 ++	priv->error = NULL;
 494.163 + 
 494.164 + #ifdef CONFIG_IPW2200_PROMISCUOUS
 494.165 + 	ipw_prom_free(priv);
 494.166 +diff -puN drivers/scsi/libata-scsi.c~remove-redundant-null-checks-before-free-in-drivers drivers/scsi/libata-scsi.c
 494.167 +--- a/drivers/scsi/libata-scsi.c~remove-redundant-null-checks-before-free-in-drivers
 494.168 ++++ a/drivers/scsi/libata-scsi.c
 494.169 +@@ -222,9 +222,7 @@ int ata_cmd_ioctl(struct scsi_device *sc
 494.170 + 	 && copy_to_user(arg + sizeof(args), argbuf, argsize))
 494.171 + 		rc = -EFAULT;
 494.172 + error:
 494.173 +-	if (argbuf)
 494.174 +-		kfree(argbuf);
 494.175 +-
 494.176 ++	kfree(argbuf);
 494.177 + 	return rc;
 494.178 + }
 494.179 + 
 494.180 +diff -puN drivers/video/au1100fb.c~remove-redundant-null-checks-before-free-in-drivers drivers/video/au1100fb.c
 494.181 +--- a/drivers/video/au1100fb.c~remove-redundant-null-checks-before-free-in-drivers
 494.182 ++++ a/drivers/video/au1100fb.c
 494.183 +@@ -743,8 +743,7 @@ void __exit au1100fb_cleanup(void)
 494.184 + {
 494.185 + 	driver_unregister(&au1100fb_driver);
 494.186 + 
 494.187 +-	if (drv_info.opt_mode)
 494.188 +-		kfree(drv_info.opt_mode);
 494.189 ++	kfree(drv_info.opt_mode);
 494.190 + }
 494.191 + 
 494.192 + module_init(au1100fb_init);
 494.193 +_
   495.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   495.2 +++ b/ja/examples/extdiff	Sun Aug 16 03:41:39 2009 +0200
   495.3 @@ -0,0 +1,28 @@
   495.4 +#!/bin/bash
   495.5 +
   495.6 +echo '[extensions]' >> $HGRC
   495.7 +echo 'extdiff =' >> $HGRC
   495.8 +
   495.9 +hg init a
  495.10 +cd a
  495.11 +echo 'The first line.' > myfile
  495.12 +hg ci -Ama
  495.13 +echo 'The second line.' >> myfile
  495.14 +
  495.15 +#$ name: diff
  495.16 +
  495.17 +hg diff
  495.18 +
  495.19 +#$ name: extdiff
  495.20 +
  495.21 +hg extdiff
  495.22 +
  495.23 +#$ name: extdiff-ctx
  495.24 +
  495.25 +#$ ignore: ^\*\*\* a.*
  495.26 +
  495.27 +hg extdiff -o -NprcC5
  495.28 +
  495.29 +#$ name:
  495.30 +
  495.31 +exit 0
   496.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   496.2 +++ b/ja/examples/extdiff.diff.out	Sun Aug 16 03:41:39 2009 +0200
   496.3 @@ -0,0 +1,7 @@
   496.4 +$ \textbf{hg diff}
   496.5 +diff -r  myfile
   496.6 +
   496.7 +
   496.8 +@@ -1,1 +1,2 @@ The first line.
   496.9 + The first line.
  496.10 ++The second line.
   497.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   497.2 +++ b/ja/examples/extdiff.extdiff-ctx.out	Sun Aug 16 03:41:39 2009 +0200
   497.3 @@ -0,0 +1,8 @@
   497.4 +$ \textbf{hg extdiff -o -NprcC5}
   497.5 +
   497.6 +
   497.7 +***************
   497.8 +*** 1 ****
   497.9 +
  497.10 +  The first line.
  497.11 ++ The second line.
   498.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   498.2 +++ b/ja/examples/extdiff.extdiff.out	Sun Aug 16 03:41:39 2009 +0200
   498.3 @@ -0,0 +1,6 @@
   498.4 +$ \textbf{hg extdiff}
   498.5 +
   498.6 +
   498.7 +@@ -1 +1,2 @@
   498.8 + The first line.
   498.9 ++The second line.
   499.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   499.2 +++ b/ja/examples/filenames	Sun Aug 16 03:41:39 2009 +0200
   499.3 @@ -0,0 +1,61 @@
   499.4 +#!/bin/bash
   499.5 +
   499.6 +hg init a
   499.7 +cd a
   499.8 +mkdir -p examples src/watcher
   499.9 +touch COPYING MANIFEST.in README setup.py
  499.10 +touch examples/performant.py examples/simple.py
  499.11 +touch src/main.py src/watcher/_watcher.c src/watcher/watcher.py src/xyzzy.txt
  499.12 +
  499.13 +#$ name: files
  499.14 +
  499.15 +hg add COPYING README examples/simple.py
  499.16 +
  499.17 +#$ name: dirs
  499.18 +
  499.19 +hg status src
  499.20 +
  499.21 +#$ name: wdir-subdir
  499.22 +
  499.23 +cd src
  499.24 +hg add -n
  499.25 +hg add -n .
  499.26 +
  499.27 +#$ name: wdir-relname
  499.28 +
  499.29 +hg status
  499.30 +hg status `hg root`
  499.31 +
  499.32 +#$ name: glob.star
  499.33 +
  499.34 +hg add 'glob:*.py'
  499.35 +
  499.36 +#$ name: glob.starstar
  499.37 +
  499.38 +cd ..
  499.39 +hg status 'glob:**.py'
  499.40 +
  499.41 +#$ name: glob.star-starstar
  499.42 +
  499.43 +hg status 'glob:*.py'
  499.44 +hg status 'glob:**.py'
  499.45 +
  499.46 +#$ name: glob.question
  499.47 +
  499.48 +hg status 'glob:**.?'
  499.49 +
  499.50 +#$ name: glob.range
  499.51 +
  499.52 +hg status 'glob:**[nr-t]'
  499.53 +
  499.54 +#$ name: glob.group
  499.55 +
  499.56 +hg status 'glob:*.{in,py}'
  499.57 +
  499.58 +#$ name: filter.include
  499.59 +
  499.60 +hg status -I '*.in'
  499.61 +
  499.62 +#$ name: filter.exclude
  499.63 +
  499.64 +hg status -X '**.py' src
   500.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   500.2 +++ b/ja/examples/filenames.dirs.out	Sun Aug 16 03:41:39 2009 +0200
   500.3 @@ -0,0 +1,5 @@
   500.4 +$ \textbf{hg status src}
   500.5 +? src/main.py
   500.6 +? src/watcher/_watcher.c
   500.7 +? src/watcher/watcher.py
   500.8 +? src/xyzzy.txt
   501.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   501.2 +++ b/ja/examples/filenames.files.out	Sun Aug 16 03:41:39 2009 +0200
   501.3 @@ -0,0 +1,1 @@
   501.4 +$ \textbf{hg add COPYING README examples/simple.py}
   502.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   502.2 +++ b/ja/examples/filenames.filter.exclude.out	Sun Aug 16 03:41:39 2009 +0200
   502.3 @@ -0,0 +1,3 @@
   502.4 +$ \textbf{hg status -X '**.py' src}
   502.5 +? src/watcher/_watcher.c
   502.6 +? src/xyzzy.txt
   503.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   503.2 +++ b/ja/examples/filenames.filter.include.out	Sun Aug 16 03:41:39 2009 +0200
   503.3 @@ -0,0 +1,2 @@
   503.4 +$ \textbf{hg status -I '*.in'}
   503.5 +? MANIFEST.in
   504.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   504.2 +++ b/ja/examples/filenames.glob.group.out	Sun Aug 16 03:41:39 2009 +0200
   504.3 @@ -0,0 +1,3 @@
   504.4 +$ \textbf{hg status 'glob:*.\{in,py\}'}
   504.5 +? MANIFEST.in
   504.6 +? setup.py
   505.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   505.2 +++ b/ja/examples/filenames.glob.question.out	Sun Aug 16 03:41:39 2009 +0200
   505.3 @@ -0,0 +1,2 @@
   505.4 +$ \textbf{hg status 'glob:**.?'}
   505.5 +? src/watcher/_watcher.c
   506.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   506.2 +++ b/ja/examples/filenames.glob.range.out	Sun Aug 16 03:41:39 2009 +0200
   506.3 @@ -0,0 +1,3 @@
   506.4 +$ \textbf{hg status 'glob:**[nr-t]'}
   506.5 +? MANIFEST.in
   506.6 +? src/xyzzy.txt
   507.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   507.2 +++ b/ja/examples/filenames.glob.star-starstar.out	Sun Aug 16 03:41:39 2009 +0200
   507.3 @@ -0,0 +1,8 @@
   507.4 +$ \textbf{hg status 'glob:*.py'}
   507.5 +? setup.py
   507.6 +$ \textbf{hg status 'glob:**.py'}
   507.7 +A examples/simple.py
   507.8 +A src/main.py
   507.9 +? examples/performant.py
  507.10 +? setup.py
  507.11 +? src/watcher/watcher.py
   508.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   508.2 +++ b/ja/examples/filenames.glob.star.out	Sun Aug 16 03:41:39 2009 +0200
   508.3 @@ -0,0 +1,2 @@
   508.4 +$ \textbf{hg add 'glob:*.py'}
   508.5 +adding main.py
   509.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   509.2 +++ b/ja/examples/filenames.glob.starstar.out	Sun Aug 16 03:41:39 2009 +0200
   509.3 @@ -0,0 +1,7 @@
   509.4 +$ \textbf{cd ..}
   509.5 +$ \textbf{hg status 'glob:**.py'}
   509.6 +A examples/simple.py
   509.7 +A src/main.py
   509.8 +? examples/performant.py
   509.9 +? setup.py
  509.10 +? src/watcher/watcher.py
   510.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   510.2 +++ b/ja/examples/filenames.wdir-relname.out	Sun Aug 16 03:41:39 2009 +0200
   510.3 @@ -0,0 +1,22 @@
   510.4 +$ \textbf{hg status}
   510.5 +A COPYING
   510.6 +A README
   510.7 +A examples/simple.py
   510.8 +? MANIFEST.in
   510.9 +? examples/performant.py
  510.10 +? setup.py
  510.11 +? src/main.py
  510.12 +? src/watcher/_watcher.c
  510.13 +? src/watcher/watcher.py
  510.14 +? src/xyzzy.txt
  510.15 +$ \textbf{hg status `hg root`}
  510.16 +A ../COPYING
  510.17 +A ../README
  510.18 +A ../examples/simple.py
  510.19 +? ../MANIFEST.in
  510.20 +? ../examples/performant.py
  510.21 +? ../setup.py
  510.22 +? main.py
  510.23 +? watcher/_watcher.c
  510.24 +? watcher/watcher.py
  510.25 +? xyzzy.txt
   511.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   511.2 +++ b/ja/examples/filenames.wdir-subdir.out	Sun Aug 16 03:41:39 2009 +0200
   511.3 @@ -0,0 +1,14 @@
   511.4 +$ \textbf{cd src}
   511.5 +$ \textbf{hg add -n}
   511.6 +adding ../MANIFEST.in
   511.7 +adding ../examples/performant.py
   511.8 +adding ../setup.py
   511.9 +adding main.py
  511.10 +adding watcher/_watcher.c
  511.11 +adding watcher/watcher.py
  511.12 +adding xyzzy.txt
  511.13 +$ \textbf{hg add -n .}
  511.14 +adding main.py
  511.15 +adding watcher/_watcher.c
  511.16 +adding watcher/watcher.py
  511.17 +adding xyzzy.txt
   512.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   512.2 +++ b/ja/examples/hook.msglen	Sun Aug 16 03:41:39 2009 +0200
   512.3 @@ -0,0 +1,14 @@
   512.4 +#!/bin/sh
   512.5 +
   512.6 +hg init a
   512.7 +cd a
   512.8 +echo '[hooks]' > .hg/hgrc
   512.9 +echo 'pretxncommit.msglen = test `hg tip --template {desc} | wc -c` -ge 10' >> .hg/hgrc
  512.10 +
  512.11 +#$ name: go
  512.12 +
  512.13 +cat .hg/hgrc
  512.14 +echo a > a
  512.15 +hg add a
  512.16 +hg commit -A -m 'too short'
  512.17 +hg commit -A -m 'long enough'
   513.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   513.2 +++ b/ja/examples/hook.msglen.go.out	Sun Aug 16 03:41:39 2009 +0200
   513.3 @@ -0,0 +1,10 @@
   513.4 +$ \textbf{cat .hg/hgrc}
   513.5 +[hooks]
   513.6 +pretxncommit.msglen = test `hg tip --template \{desc\} | wc -c` -ge 10
   513.7 +$ \textbf{echo a > a}
   513.8 +$ \textbf{hg add a}
   513.9 +$ \textbf{hg commit -A -m 'too short'}
  513.10 +transaction abort!
  513.11 +rollback completed
  513.12 +abort: pretxncommit.msglen hook exited with status 1
  513.13 +$ \textbf{hg commit -A -m 'long enough'}
   514.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   514.2 +++ b/ja/examples/hook.msglen.run.out	Sun Aug 16 03:41:39 2009 +0200
   514.3 @@ -0,0 +1,10 @@
   514.4 +$ \textbf{cat .hg/hgrc}
   514.5 +[hooks]
   514.6 +pretxncommit.msglen = test `hg tip --template \{desc\} | wc -c` -ge 10
   514.7 +$ \textbf{echo a > a}
   514.8 +$ \textbf{hg add a}
   514.9 +$ \textbf{hg commit -A -m 'too short'}
  514.10 +abort: pretxncommit.msglen hook exited with status 1
  514.11 +transaction abort!
  514.12 +rollback completed
  514.13 +$ \textbf{hg commit -A -m 'long enough'}
   515.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   515.2 +++ b/ja/examples/hook.simple	Sun Aug 16 03:41:39 2009 +0200
   515.3 @@ -0,0 +1,37 @@
   515.4 +#!/bin/bash
   515.5 +
   515.6 +#$ name: init
   515.7 +
   515.8 +hg init hook-test
   515.9 +cd hook-test
  515.10 +echo '[hooks]' >> .hg/hgrc
  515.11 +echo 'commit = echo committed $HG_NODE' >> .hg/hgrc
  515.12 +cat .hg/hgrc
  515.13 +echo a > a
  515.14 +hg add a
  515.15 +hg commit -m 'testing commit hook'
  515.16 +
  515.17 +#$ name: ext
  515.18 +#$ ignore: ^date of commit.*
  515.19 +
  515.20 +echo 'commit.when = echo -n "date of commit: "; date' >> .hg/hgrc
  515.21 +echo a >> a
  515.22 +hg commit -m 'i have two hooks'
  515.23 +
  515.24 +#$ name:
  515.25 +
  515.26 +echo '#!/bin/sh' >> check_bug_id
  515.27 +echo '# check that a commit comment mentions a numeric bug id' >> check_bug_id
  515.28 +echo 'hg log -r $1 --template {desc} | grep -q "\<bug *[0-9]"' >> check_bug_id
  515.29 +chmod +x check_bug_id
  515.30 +
  515.31 +#$ name: pretxncommit
  515.32 +
  515.33 +cat check_bug_id
  515.34 +
  515.35 +echo 'pretxncommit.bug_id_required = ./check_bug_id $HG_NODE' >> .hg/hgrc
  515.36 +
  515.37 +echo a >> a
  515.38 +hg commit -m 'i am not mentioning a bug id'
  515.39 +
  515.40 +hg commit -m 'i refer you to bug 666'
   516.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   516.2 +++ b/ja/examples/hook.simple.ext.out	Sun Aug 16 03:41:39 2009 +0200
   516.3 @@ -0,0 +1,5 @@
   516.4 +$ \textbf{echo 'commit.when = echo -n "date of commit: "; date' >> .hg/hgrc}
   516.5 +$ \textbf{echo a >> a}
   516.6 +$ \textbf{hg commit -m 'i have two hooks'}
   516.7 +committed 
   516.8 +
   517.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   517.2 +++ b/ja/examples/hook.simple.init.out	Sun Aug 16 03:41:39 2009 +0200
   517.3 @@ -0,0 +1,11 @@
   517.4 +$ \textbf{hg init hook-test}
   517.5 +$ \textbf{cd hook-test}
   517.6 +$ \textbf{echo '[hooks]' >> .hg/hgrc}
   517.7 +$ \textbf{echo 'commit = echo committed $HG_NODE' >> .hg/hgrc}
   517.8 +$ \textbf{cat .hg/hgrc}
   517.9 +[hooks]
  517.10 +commit = echo committed $HG_NODE
  517.11 +$ \textbf{echo a > a}
  517.12 +$ \textbf{hg add a}
  517.13 +$ \textbf{hg commit -m 'testing commit hook'}
  517.14 +committed 
   518.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   518.2 +++ b/ja/examples/hook.simple.pretxncommit.out	Sun Aug 16 03:41:39 2009 +0200
   518.3 @@ -0,0 +1,13 @@
   518.4 +$ \textbf{cat check_bug_id}
   518.5 +#!/bin/sh
   518.6 +# check that a commit comment mentions a numeric bug id
   518.7 +hg log -r $1 --template \{desc\} | grep -q "\textbackslash{}<bug *[0-9]"
   518.8 +$ \textbf{echo 'pretxncommit.bug_id_required = ./check_bug_id $HG_NODE' >> .hg/hgrc}
   518.9 +$ \textbf{echo a >> a}
  518.10 +$ \textbf{hg commit -m 'i am not mentioning a bug id'}
  518.11 +transaction abort!
  518.12 +rollback completed
  518.13 +abort: pretxncommit.bug_id_required hook exited with status 1
  518.14 +$ \textbf{hg commit -m 'i refer you to bug 666'}
  518.15 +committed 
  518.16 +
   519.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   519.2 +++ b/ja/examples/hook.ws	Sun Aug 16 03:41:39 2009 +0200
   519.3 @@ -0,0 +1,31 @@
   519.4 +#!/bin/bash
   519.5 +
   519.6 +hg init a
   519.7 +cd a
   519.8 +echo '[hooks]' > .hg/hgrc
   519.9 +echo "pretxncommit.whitespace = hg export tip | (! egrep -q '^\\+.*[ \\t]$')" >> .hg/hgrc
  519.10 +
  519.11 +#$ name: simple
  519.12 +
  519.13 +cat .hg/hgrc
  519.14 +echo 'a ' > a
  519.15 +hg commit -A -m 'test with trailing whitespace'
  519.16 +echo 'a' > a
  519.17 +hg commit -A -m 'drop trailing whitespace and try again'
  519.18 +
  519.19 +#$ name:
  519.20 +
  519.21 +echo '[hooks]' > .hg/hgrc
  519.22 +echo "pretxncommit.whitespace = .hg/check_whitespace.py" >> .hg/hgrc
  519.23 +cp $EXAMPLE_DIR/data/check_whitespace.py .hg
  519.24 +
  519.25 +#$ name: better
  519.26 +
  519.27 +cat .hg/hgrc
  519.28 +echo 'a ' >> a
  519.29 +hg commit -A -m 'add new line with trailing whitespace'
  519.30 +sed -i 's, *$,,' a
  519.31 +hg commit -A -m 'trimmed trailing whitespace'
  519.32 +
  519.33 +#$ name:
  519.34 +exit 0
   520.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   520.2 +++ b/ja/examples/hook.ws.better.out	Sun Aug 16 03:41:39 2009 +0200
   520.3 @@ -0,0 +1,17 @@
   520.4 +$ \textbf{cat .hg/hgrc}
   520.5 +[hooks]
   520.6 +pretxncommit.whitespace = .hg/check_whitespace.py
   520.7 +$ \textbf{echo 'a ' >> a}
   520.8 +$ \textbf{hg commit -A -m 'add new line with trailing whitespace'}
   520.9 +a, line 2: trailing whitespace added
  520.10 +commit message saved to .hg/commit.save
  520.11 +transaction abort!
  520.12 +rollback completed
  520.13 +abort: pretxncommit.whitespace hook exited with status 1
  520.14 +$ \textbf{sed -i 's, *$,,' a}
  520.15 +$ \textbf{hg commit -A -m 'trimmed trailing whitespace'}
  520.16 +a, line 2: trailing whitespace added
  520.17 +commit message saved to .hg/commit.save
  520.18 +transaction abort!
  520.19 +rollback completed
  520.20 +abort: pretxncommit.whitespace hook exited with status 1
   521.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   521.2 +++ b/ja/examples/hook.ws.simple.out	Sun Aug 16 03:41:39 2009 +0200
   521.3 @@ -0,0 +1,11 @@
   521.4 +$ \textbf{cat .hg/hgrc}
   521.5 +[hooks]
   521.6 +pretxncommit.whitespace = hg export tip | (! egrep -q '^\textbackslash{}+.*[ \textbackslash{}t]$')
   521.7 +$ \textbf{echo 'a ' > a}
   521.8 +$ \textbf{hg commit -A -m 'test with trailing whitespace'}
   521.9 +adding a
  521.10 +transaction abort!
  521.11 +rollback completed
  521.12 +abort: pretxncommit.whitespace hook exited with status 1
  521.13 +$ \textbf{echo 'a' > a}
  521.14 +$ \textbf{hg commit -A -m 'drop trailing whitespace and try again'}
   522.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   522.2 +++ b/ja/examples/issue29	Sun Aug 16 03:41:39 2009 +0200
   522.3 @@ -0,0 +1,22 @@
   522.4 +#!/bin/bash
   522.5 +
   522.6 +#$ name: go
   522.7 +
   522.8 +hg init issue29
   522.9 +cd issue29
  522.10 +echo a > a
  522.11 +hg ci -Ama
  522.12 +echo b > b
  522.13 +hg ci -Amb
  522.14 +hg up 0
  522.15 +mkdir b
  522.16 +echo b > b/b
  522.17 +hg ci -Amc
  522.18 +
  522.19 +#$ ignore: abort: Is a directory: .*
  522.20 +hg merge
  522.21 +
  522.22 +#$ name:
  522.23 +# This error is expected from the failed merge.
  522.24 +
  522.25 +exit 0
   523.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   523.2 +++ b/ja/examples/issue29.go.out	Sun Aug 16 03:41:39 2009 +0200
   523.3 @@ -0,0 +1,16 @@
   523.4 +$ \textbf{hg init issue29}
   523.5 +$ \textbf{cd issue29}
   523.6 +$ \textbf{echo a > a}
   523.7 +$ \textbf{hg ci -Ama}
   523.8 +adding a
   523.9 +$ \textbf{echo b > b}
  523.10 +$ \textbf{hg ci -Amb}
  523.11 +adding b
  523.12 +$ \textbf{hg up 0}
  523.13 +0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  523.14 +$ \textbf{mkdir b}
  523.15 +$ \textbf{echo b > b/b}
  523.16 +$ \textbf{hg ci -Amc}
  523.17 +adding b/b
  523.18 +$ \textbf{hg merge}
  523.19 +
   524.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   524.2 +++ b/ja/examples/mq.dodiff	Sun Aug 16 03:41:39 2009 +0200
   524.3 @@ -0,0 +1,14 @@
   524.4 +#!/bin/bash
   524.5 +
   524.6 +#$ name: diff
   524.7 +
   524.8 +echo 'this is my first line' > oldfile
   524.9 +echo 'my first line is here' > newfile
  524.10 +
  524.11 +diff -u oldfile newfile > tiny.patch
  524.12 +
  524.13 +cat tiny.patch
  524.14 +
  524.15 +patch < tiny.patch
  524.16 +
  524.17 +cat oldfile
   525.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   525.2 +++ b/ja/examples/mq.dodiff.diff.out	Sun Aug 16 03:41:39 2009 +0200
   525.3 @@ -0,0 +1,13 @@
   525.4 +$ \textbf{echo 'this is my first line' > oldfile}
   525.5 +$ \textbf{echo 'my first line is here' > newfile}
   525.6 +$ \textbf{diff -u oldfile newfile > tiny.patch}
   525.7 +$ \textbf{cat tiny.patch}
   525.8 +
   525.9 +
  525.10 +@@ -1 +1 @@
  525.11 +-this is my first line
  525.12 ++my first line is here
  525.13 +$ \textbf{patch < tiny.patch}
  525.14 +patching file oldfile
  525.15 +$ \textbf{cat oldfile}
  525.16 +my first line is here
   526.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   526.2 +++ b/ja/examples/mq.guards	Sun Aug 16 03:41:39 2009 +0200
   526.3 @@ -0,0 +1,67 @@
   526.4 +#!/bin/bash
   526.5 +
   526.6 +echo '[extensions]' >> $HGRC
   526.7 +echo 'hgext.mq =' >> $HGRC
   526.8 +
   526.9 +hg init a
  526.10 +cd a
  526.11 +
  526.12 +#$ name: init
  526.13 +
  526.14 +hg qinit
  526.15 +hg qnew hello.patch
  526.16 +echo hello > hello
  526.17 +hg add hello
  526.18 +hg qrefresh
  526.19 +hg qnew goodbye.patch
  526.20 +echo goodbye > goodbye
  526.21 +hg add goodbye
  526.22 +hg qrefresh
  526.23 +
  526.24 +#$ name: qguard
  526.25 +
  526.26 +hg qguard
  526.27 +
  526.28 +#$ name: qguard.pos
  526.29 +
  526.30 +hg qguard +foo
  526.31 +hg qguard
  526.32 +
  526.33 +#$ name: qguard.neg
  526.34 +
  526.35 +hg qguard hello.patch -quux
  526.36 +hg qguard hello.patch
  526.37 +
  526.38 +#$ name: series
  526.39 +
  526.40 +cat .hg/patches/series
  526.41 +
  526.42 +#$ name: qselect.foo
  526.43 +
  526.44 +hg qpop -a
  526.45 +hg qselect
  526.46 +hg qselect foo
  526.47 +hg qselect
  526.48 +
  526.49 +#$ name: qselect.cat
  526.50 +
  526.51 +cat .hg/patches/guards
  526.52 +
  526.53 +#$ name: qselect.qpush
  526.54 +hg qpush -a
  526.55 +
  526.56 +#$ name: qselect.error
  526.57 +
  526.58 +hg qselect +foo
  526.59 +
  526.60 +#$ name: qselect.quux
  526.61 +
  526.62 +hg qselect quux
  526.63 +hg qpop -a
  526.64 +hg qpush -a
  526.65 +
  526.66 +#$ name: qselect.foobar
  526.67 +
  526.68 +hg qselect foo bar
  526.69 +hg qpop -a
  526.70 +hg qpush -a
   527.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   527.2 +++ b/ja/examples/mq.guards.init.out	Sun Aug 16 03:41:39 2009 +0200
   527.3 @@ -0,0 +1,9 @@
   527.4 +$ \textbf{hg qinit}
   527.5 +$ \textbf{hg qnew hello.patch}
   527.6 +$ \textbf{echo hello > hello}
   527.7 +$ \textbf{hg add hello}
   527.8 +$ \textbf{hg qrefresh}
   527.9 +$ \textbf{hg qnew goodbye.patch}
  527.10 +$ \textbf{echo goodbye > goodbye}
  527.11 +$ \textbf{hg add goodbye}
  527.12 +$ \textbf{hg qrefresh}
   528.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   528.2 +++ b/ja/examples/mq.guards.qguard.neg.out	Sun Aug 16 03:41:39 2009 +0200
   528.3 @@ -0,0 +1,3 @@
   528.4 +$ \textbf{hg qguard hello.patch -quux}
   528.5 +$ \textbf{hg qguard hello.patch}
   528.6 +hello.patch: -quux
   529.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   529.2 +++ b/ja/examples/mq.guards.qguard.out	Sun Aug 16 03:41:39 2009 +0200
   529.3 @@ -0,0 +1,2 @@
   529.4 +$ \textbf{hg qguard}
   529.5 +goodbye.patch: unguarded
   530.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   530.2 +++ b/ja/examples/mq.guards.qguard.pos.out	Sun Aug 16 03:41:39 2009 +0200
   530.3 @@ -0,0 +1,3 @@
   530.4 +$ \textbf{hg qguard +foo}
   530.5 +$ \textbf{hg qguard}
   530.6 +goodbye.patch: +foo
   531.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   531.2 +++ b/ja/examples/mq.guards.qselect.cat.out	Sun Aug 16 03:41:39 2009 +0200
   531.3 @@ -0,0 +1,2 @@
   531.4 +$ \textbf{cat .hg/patches/guards}
   531.5 +foo
   532.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   532.2 +++ b/ja/examples/mq.guards.qselect.error.out	Sun Aug 16 03:41:39 2009 +0200
   532.3 @@ -0,0 +1,2 @@
   532.4 +$ \textbf{hg qselect +foo}
   532.5 +abort: guard '+foo' starts with invalid character: '+'
   533.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   533.2 +++ b/ja/examples/mq.guards.qselect.foo.out	Sun Aug 16 03:41:39 2009 +0200
   533.3 @@ -0,0 +1,8 @@
   533.4 +$ \textbf{hg qpop -a}
   533.5 +Patch queue now empty
   533.6 +$ \textbf{hg qselect}
   533.7 +no active guards
   533.8 +$ \textbf{hg qselect foo}
   533.9 +number of unguarded, unapplied patches has changed from 1 to 2
  533.10 +$ \textbf{hg qselect}
  533.11 +foo
   534.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   534.2 +++ b/ja/examples/mq.guards.qselect.foobar.out	Sun Aug 16 03:41:39 2009 +0200
   534.3 @@ -0,0 +1,8 @@
   534.4 +$ \textbf{hg qselect foo bar}
   534.5 +number of unguarded, unapplied patches has changed from 0 to 2
   534.6 +$ \textbf{hg qpop -a}
   534.7 +no patches applied
   534.8 +$ \textbf{hg qpush -a}
   534.9 +applying hello.patch
  534.10 +applying goodbye.patch
  534.11 +Now at: goodbye.patch
   535.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   535.2 +++ b/ja/examples/mq.guards.qselect.qpush.out	Sun Aug 16 03:41:39 2009 +0200
   535.3 @@ -0,0 +1,4 @@
   535.4 +$ \textbf{hg qpush -a}
   535.5 +applying hello.patch
   535.6 +applying goodbye.patch
   535.7 +Now at: goodbye.patch
   536.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   536.2 +++ b/ja/examples/mq.guards.qselect.quux.out	Sun Aug 16 03:41:39 2009 +0200
   536.3 @@ -0,0 +1,6 @@
   536.4 +$ \textbf{hg qselect quux}
   536.5 +number of guarded, applied patches has changed from 0 to 2
   536.6 +$ \textbf{hg qpop -a}
   536.7 +Patch queue now empty
   536.8 +$ \textbf{hg qpush -a}
   536.9 +patch series already fully applied
   537.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   537.2 +++ b/ja/examples/mq.guards.series.out	Sun Aug 16 03:41:39 2009 +0200
   537.3 @@ -0,0 +1,3 @@
   537.4 +$ \textbf{cat .hg/patches/series}
   537.5 +hello.patch #-quux
   537.6 +goodbye.patch #+foo
   538.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   538.2 +++ b/ja/examples/mq.id	Sun Aug 16 03:41:39 2009 +0200
   538.3 @@ -0,0 +1,28 @@
   538.4 +#!/bin/sh
   538.5 +
   538.6 +echo '[extensions]' >> $HGRC
   538.7 +echo 'hgext.mq =' >> $HGRC
   538.8 +
   538.9 +hg init a
  538.10 +cd a
  538.11 +hg qinit
  538.12 +echo 'int x;' > test.c
  538.13 +hg ci -Ama
  538.14 +
  538.15 +hg qnew first.patch
  538.16 +echo 'float c;' >> test.c
  538.17 +hg qrefresh
  538.18 +
  538.19 +hg qnew second.patch
  538.20 +echo 'double u;' > other.c
  538.21 +hg add other.c
  538.22 +hg qrefresh
  538.23 +
  538.24 +#$ name: output
  538.25 +
  538.26 +hg qapplied
  538.27 +hg log -r qbase:qtip
  538.28 +hg export second.patch
  538.29 +
  538.30 +#$ name:
  538.31 +exit 0
   539.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   539.2 +++ b/ja/examples/mq.id.out.out	Sun Aug 16 03:41:39 2009 +0200
   539.3 @@ -0,0 +1,32 @@
   539.4 +$ \textbf{hg qapplied}
   539.5 +first.patch
   539.6 +second.patch
   539.7 +$ \textbf{hg log -r qbase:qtip}
   539.8 +changeset:   
   539.9 +tag:         first.patch
  539.10 +tag:         qbase
  539.11 +user:        Bryan O'Sullivan <bos@serpentine.com>
  539.12 +
  539.13 +summary:     patch queue: first.patch
  539.14 +
  539.15 +changeset:   
  539.16 +tag:         second.patch
  539.17 +tag:         qtip
  539.18 +tag:         tip
  539.19 +user:        Bryan O'Sullivan <bos@serpentine.com>
  539.20 +
  539.21 +summary:     patch queue: second.patch
  539.22 +
  539.23 +$ \textbf{hg export second.patch}
  539.24 +# HG changeset patch
  539.25 +# User Bryan O'Sullivan <bos@serpentine.com>
  539.26 +
  539.27 +# Node ID 
  539.28 +# Parent  
  539.29 +patch queue: second.patch
  539.30 +
  539.31 +diff -r  -r  other.c
  539.32 +
  539.33 +
  539.34 +@@ -0,0 +1,1 @@
  539.35 ++double u;
   540.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   540.2 +++ b/ja/examples/mq.id.output.out	Sun Aug 16 03:41:39 2009 +0200
   540.3 @@ -0,0 +1,32 @@
   540.4 +$ \textbf{hg qapplied}
   540.5 +first.patch
   540.6 +second.patch
   540.7 +$ \textbf{hg log -r qbase:qtip}
   540.8 +changeset:   
   540.9 +tag:         first.patch
  540.10 +tag:         qbase
  540.11 +user:        Bryan O'Sullivan <bos@serpentine.com>
  540.12 +
  540.13 +summary:     [mq]: first.patch
  540.14 +
  540.15 +changeset:   
  540.16 +tag:         qtip
  540.17 +tag:         second.patch
  540.18 +tag:         tip
  540.19 +user:        Bryan O'Sullivan <bos@serpentine.com>
  540.20 +
  540.21 +summary:     [mq]: second.patch
  540.22 +
  540.23 +$ \textbf{hg export second.patch}
  540.24 +# HG changeset patch
  540.25 +# User Bryan O'Sullivan <bos@serpentine.com>
  540.26 +
  540.27 +# Node ID 
  540.28 +# Parent  
  540.29 +[mq]: second.patch
  540.30 +
  540.31 +diff -r  -r  other.c
  540.32 +
  540.33 +
  540.34 +@@ -0,0 +1,1 @@
  540.35 ++double u;
   541.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   541.2 +++ b/ja/examples/mq.qinit-help	Sun Aug 16 03:41:39 2009 +0200
   541.3 @@ -0,0 +1,7 @@
   541.4 +#!/bin/bash
   541.5 +
   541.6 +echo '[extensions]' >> $HGRC
   541.7 +echo 'hgext.mq =' >> $HGRC
   541.8 +
   541.9 +#$ name: help
  541.10 +hg help qinit
   542.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   542.2 +++ b/ja/examples/mq.qinit-help.help.out	Sun Aug 16 03:41:39 2009 +0200
   542.3 @@ -0,0 +1,16 @@
   542.4 +$ \textbf{hg help qinit}
   542.5 +hg qinit [-c]
   542.6 +
   542.7 +init a new queue repository
   542.8 +
   542.9 +    The queue repository is unversioned by default. If -c is
  542.10 +    specified, qinit will create a separate nested repository
  542.11 +    for patches (qinit -c may also be run later to convert
  542.12 +    an unversioned patch repository into a versioned one).
  542.13 +    You can use qcommit to commit changes to this queue repository.
  542.14 +
  542.15 +options:
  542.16 +
  542.17 + -c --create-repo  create queue repository
  542.18 +
  542.19 +use "hg -v help qinit" to show global options
   543.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   543.2 +++ b/ja/examples/mq.tarball	Sun Aug 16 03:41:39 2009 +0200
   543.3 @@ -0,0 +1,51 @@
   543.4 +#!/bin/bash
   543.5 +
   543.6 +cp $EXAMPLE_DIR/data/netplug-*.tar.bz2 .
   543.7 +ln -s /bin/true download
   543.8 +export PATH=`pwd`:$PATH
   543.9 +
  543.10 +#$ name: download
  543.11 +
  543.12 +download netplug-1.2.5.tar.bz2
  543.13 +tar jxf netplug-1.2.5.tar.bz2
  543.14 +cd netplug-1.2.5
  543.15 +hg init
  543.16 +hg commit -q --addremove --message netplug-1.2.5
  543.17 +cd ..
  543.18 +hg clone netplug-1.2.5 netplug
  543.19 +
  543.20 +#$ name:
  543.21 +
  543.22 +cd netplug
  543.23 +echo '[extensions]' >> $HGRC
  543.24 +echo 'hgext.mq =' >> $HGRC
  543.25 +cd ..
  543.26 +
  543.27 +#$ name: qinit
  543.28 +
  543.29 +cd netplug
  543.30 +hg qinit
  543.31 +hg qnew -m 'fix build problem with gcc 4' build-fix.patch
  543.32 +perl -pi -e 's/int addr_len/socklen_t addr_len/' netlink.c
  543.33 +hg qrefresh
  543.34 +hg tip -p
  543.35 +
  543.36 +#$ name: newsource
  543.37 +
  543.38 +hg qpop -a
  543.39 +cd ..
  543.40 +download netplug-1.2.8.tar.bz2
  543.41 +hg clone netplug-1.2.5 netplug-1.2.8
  543.42 +cd netplug-1.2.8
  543.43 +hg locate -0 | xargs -0 rm
  543.44 +cd ..
  543.45 +tar jxf netplug-1.2.8.tar.bz2
  543.46 +cd netplug-1.2.8
  543.47 +hg commit --addremove --message netplug-1.2.8
  543.48 +
  543.49 +#$ name: repush
  543.50 +
  543.51 +cd ../netplug
  543.52 +hg pull ../netplug-1.2.8
  543.53 +hg qpush -a
  543.54 +
   544.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   544.2 +++ b/ja/examples/mq.tarball.download.out	Sun Aug 16 03:41:39 2009 +0200
   544.3 @@ -0,0 +1,8 @@
   544.4 +$ \textbf{download netplug-1.2.5.tar.bz2}
   544.5 +$ \textbf{tar jxf netplug-1.2.5.tar.bz2}
   544.6 +$ \textbf{cd netplug-1.2.5}
   544.7 +$ \textbf{hg init}
   544.8 +$ \textbf{hg commit -q --addremove --message netplug-1.2.5}
   544.9 +$ \textbf{cd ..}
  544.10 +$ \textbf{hg clone netplug-1.2.5 netplug}
  544.11 +18 files updated, 0 files merged, 0 files removed, 0 files unresolved
   545.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   545.2 +++ b/ja/examples/mq.tarball.newsource.out	Sun Aug 16 03:41:39 2009 +0200
   545.3 @@ -0,0 +1,12 @@
   545.4 +$ \textbf{hg qpop -a}
   545.5 +Patch queue now empty
   545.6 +$ \textbf{cd ..}
   545.7 +$ \textbf{download netplug-1.2.8.tar.bz2}
   545.8 +$ \textbf{hg clone netplug-1.2.5 netplug-1.2.8}
   545.9 +18 files updated, 0 files merged, 0 files removed, 0 files unresolved
  545.10 +$ \textbf{cd netplug-1.2.8}
  545.11 +$ \textbf{hg locate -0 | xargs -0 rm}
  545.12 +$ \textbf{cd ..}
  545.13 +$ \textbf{tar jxf netplug-1.2.8.tar.bz2}
  545.14 +$ \textbf{cd netplug-1.2.8}
  545.15 +$ \textbf{hg commit --addremove --message netplug-1.2.8}
   546.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   546.2 +++ b/ja/examples/mq.tarball.qinit.out	Sun Aug 16 03:41:39 2009 +0200
   546.3 @@ -0,0 +1,28 @@
   546.4 +$ \textbf{cd netplug}
   546.5 +$ \textbf{hg qinit}
   546.6 +$ \textbf{hg qnew -m 'fix build problem with gcc 4' build-fix.patch}
   546.7 +$ \textbf{perl -pi -e 's/int addr_len/socklen_t addr_len/' netlink.c}
   546.8 +$ \textbf{hg qrefresh}
   546.9 +$ \textbf{hg tip -p}
  546.10 +changeset:   
  546.11 +tag:         qtip
  546.12 +tag:         build-fix.patch
  546.13 +tag:         tip
  546.14 +tag:         qbase
  546.15 +user:        Bryan O'Sullivan <bos@serpentine.com>
  546.16 +
  546.17 +summary:     fix build problem with gcc 4
  546.18 +
  546.19 +diff -r  -r  netlink.c
  546.20 +
  546.21 +
  546.22 +@@ -275,7 +275,7 @@ netlink_open(void)
  546.23 +         exit(1);
  546.24 +     \}
  546.25 + 
  546.26 +-    int addr_len = sizeof(addr);
  546.27 ++    socklen_t addr_len = sizeof(addr);
  546.28 + 
  546.29 +     if (getsockname(fd, (struct sockaddr *) &addr, &addr_len) == -1) \{
  546.30 +         do_log(LOG_ERR, "Could not get socket details: %m");
  546.31 +
   547.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   547.2 +++ b/ja/examples/mq.tarball.repush.out	Sun Aug 16 03:41:39 2009 +0200
   547.3 @@ -0,0 +1,12 @@
   547.4 +$ \textbf{cd ../netplug}
   547.5 +$ \textbf{hg pull ../netplug-1.2.8}
   547.6 +pulling from ../netplug-1.2.8
   547.7 +searching for changes
   547.8 +adding changesets
   547.9 +adding manifests
  547.10 +adding file changes
  547.11 +added 1 changesets with 12 changes to 12 files
  547.12 +(run 'hg update' to get a working copy)
  547.13 +$ \textbf{hg qpush -a}
  547.14 +applying build-fix.patch
  547.15 +Now at: build-fix.patch
   548.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   548.2 +++ b/ja/examples/mq.tools	Sun Aug 16 03:41:39 2009 +0200
   548.3 @@ -0,0 +1,11 @@
   548.4 +#!/bin/bash
   548.5 +
   548.6 +cp $EXAMPLE_DIR/data/remove-redundant-null-checks.patch .
   548.7 +
   548.8 +#$ name: tools
   548.9 +diffstat -p1 remove-redundant-null-checks.patch
  548.10 +
  548.11 +filterdiff -i '*/video/*' remove-redundant-null-checks.patch
  548.12 +
  548.13 +#$ name: lsdiff
  548.14 +lsdiff -nvv remove-redundant-null-checks.patch
   549.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   549.2 +++ b/ja/examples/mq.tools.lsdiff.out	Sun Aug 16 03:41:39 2009 +0200
   549.3 @@ -0,0 +1,21 @@
   549.4 +$ \textbf{lsdiff -nvv remove-redundant-null-checks.patch}
   549.5 +22	File #1  	a/drivers/char/agp/sgi-agp.c
   549.6 +	24	Hunk #1	static int __devinit agp_sgi_init(void)
   549.7 +37	File #2  	a/drivers/char/hvcs.c
   549.8 +	39	Hunk #1	static struct tty_operations hvcs_ops = 
   549.9 +	53	Hunk #2	static int hvcs_alloc_index_list(int n)
  549.10 +69	File #3  	a/drivers/message/fusion/mptfc.c
  549.11 +	71	Hunk #1	mptfc_GetFcDevPage0(MPT_ADAPTER *ioc, in
  549.12 +85	File #4  	a/drivers/message/fusion/mptsas.c
  549.13 +	87	Hunk #1	mptsas_probe_hba_phys(MPT_ADAPTER *ioc)
  549.14 +98	File #5  	a/drivers/net/fs_enet/fs_enet-mii.c
  549.15 +	100	Hunk #1	static struct fs_enet_mii_bus *create_bu
  549.16 +111	File #6  	a/drivers/net/wireless/ipw2200.c
  549.17 +	113	Hunk #1	static struct ipw_fw_error *ipw_alloc_er
  549.18 +	126	Hunk #2	static ssize_t clear_error(struct device
  549.19 +	140	Hunk #3	static void ipw_irq_tasklet(struct ipw_p
  549.20 +	150	Hunk #4	static void ipw_pci_remove(struct pci_de
  549.21 +164	File #7  	a/drivers/scsi/libata-scsi.c
  549.22 +	166	Hunk #1	int ata_cmd_ioctl(struct scsi_device *sc
  549.23 +178	File #8  	a/drivers/video/au1100fb.c
  549.24 +	180	Hunk #1	void __exit au1100fb_cleanup(void)
   550.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   550.2 +++ b/ja/examples/mq.tools.tools.out	Sun Aug 16 03:41:39 2009 +0200
   550.3 @@ -0,0 +1,23 @@
   550.4 +$ \textbf{diffstat -p1 remove-redundant-null-checks.patch}
   550.5 + drivers/char/agp/sgi-agp.c        |    5 ++---
   550.6 + drivers/char/hvcs.c               |   11 +++++------
   550.7 + drivers/message/fusion/mptfc.c    |    6 ++----
   550.8 + drivers/message/fusion/mptsas.c   |    3 +--
   550.9 + drivers/net/fs_enet/fs_enet-mii.c |    3 +--
  550.10 + drivers/net/wireless/ipw2200.c    |   22 ++++++----------------
  550.11 + drivers/scsi/libata-scsi.c        |    4 +---
  550.12 + drivers/video/au1100fb.c          |    3 +--
  550.13 + 8 files changed, 19 insertions(+), 38 deletions(-)
  550.14 +$ \textbf{filterdiff -i '*/video/*' remove-redundant-null-checks.patch}
  550.15 +
  550.16 +
  550.17 +@@ -743,8 +743,7 @@ void __exit au1100fb_cleanup(void)
  550.18 + \{
  550.19 + 	driver_unregister(&au1100fb_driver);
  550.20 + 
  550.21 +-	if (drv_info.opt_mode)
  550.22 +-		kfree(drv_info.opt_mode);
  550.23 ++	kfree(drv_info.opt_mode);
  550.24 + \}
  550.25 + 
  550.26 + module_init(au1100fb_init);
   551.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   551.2 +++ b/ja/examples/mq.tutorial	Sun Aug 16 03:41:39 2009 +0200
   551.3 @@ -0,0 +1,74 @@
   551.4 +#!/bin/bash
   551.5 +
   551.6 +echo '[extensions]' >> $HGRC
   551.7 +echo 'hgext.mq =' >> $HGRC
   551.8 +
   551.9 +#$ name: qinit
  551.10 +
  551.11 +hg init mq-sandbox
  551.12 +cd mq-sandbox
  551.13 +echo 'line 1' > file1
  551.14 +echo 'another line 1' > file2
  551.15 +hg add file1 file2
  551.16 +hg commit -m'first change'
  551.17 +
  551.18 +hg qinit
  551.19 +
  551.20 +#$ name: qnew
  551.21 +
  551.22 +hg tip
  551.23 +hg qnew first.patch
  551.24 +hg tip
  551.25 +ls .hg/patches
  551.26 +
  551.27 +#$ name: qrefresh
  551.28 +#$ ignore: \s+200[78]-.*
  551.29 +
  551.30 +echo 'line 2' >> file1
  551.31 +hg diff
  551.32 +hg qrefresh
  551.33 +hg diff
  551.34 +hg tip --style=compact --patch
  551.35 +
  551.36 +#$ name: qrefresh2
  551.37 +
  551.38 +echo 'line 3' >> file1
  551.39 +hg status
  551.40 +hg qrefresh
  551.41 +hg tip --style=compact --patch
  551.42 +
  551.43 +#$ name: qnew2
  551.44 +
  551.45 +hg qnew second.patch
  551.46 +hg log --style=compact --limit=2
  551.47 +echo 'line 4' >> file1
  551.48 +hg qrefresh
  551.49 +hg tip --style=compact --patch
  551.50 +hg annotate file1
  551.51 +
  551.52 +#$ name: qseries
  551.53 +
  551.54 +hg qseries
  551.55 +hg qapplied
  551.56 +
  551.57 +#$ name: qpop
  551.58 +
  551.59 +hg qapplied
  551.60 +hg qpop
  551.61 +hg qseries
  551.62 +hg qapplied
  551.63 +cat file1
  551.64 +
  551.65 +#$ name: qpush-a
  551.66 +
  551.67 +hg qpush -a
  551.68 +cat file1
  551.69 +
  551.70 +#$ name: add
  551.71 +
  551.72 +echo 'file 3, line 1' >> file3
  551.73 +hg qnew add-file3.patch
  551.74 +hg qnew -f add-file3.patch
  551.75 +
  551.76 +#$ name:
  551.77 +exit 0
   552.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   552.2 +++ b/ja/examples/mq.tutorial.add.out	Sun Aug 16 03:41:39 2009 +0200
   552.3 @@ -0,0 +1,4 @@
   552.4 +$ \textbf{echo 'file 3, line 1' >> file3}
   552.5 +$ \textbf{hg qnew add-file3.patch}
   552.6 +$ \textbf{hg qnew -f add-file3.patch}
   552.7 +abort: patch "add-file3.patch" already exists
   553.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   553.2 +++ b/ja/examples/mq.tutorial.qinit.out	Sun Aug 16 03:41:39 2009 +0200
   553.3 @@ -0,0 +1,7 @@
   553.4 +$ \textbf{hg init mq-sandbox}
   553.5 +$ \textbf{cd mq-sandbox}
   553.6 +$ \textbf{echo 'line 1' > file1}
   553.7 +$ \textbf{echo 'another line 1' > file2}
   553.8 +$ \textbf{hg add file1 file2}
   553.9 +$ \textbf{hg commit -m'first change'}
  553.10 +$ \textbf{hg qinit}
   554.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   554.2 +++ b/ja/examples/mq.tutorial.qnew.out	Sun Aug 16 03:41:39 2009 +0200
   554.3 @@ -0,0 +1,20 @@
   554.4 +$ \textbf{hg tip}
   554.5 +changeset:   
   554.6 +tag:         tip
   554.7 +user:        Bryan O'Sullivan <bos@serpentine.com>
   554.8 +
   554.9 +summary:     first change
  554.10 +
  554.11 +$ \textbf{hg qnew first.patch}
  554.12 +$ \textbf{hg tip}
  554.13 +changeset:   
  554.14 +tag:         qtip
  554.15 +tag:         first.patch
  554.16 +tag:         tip
  554.17 +tag:         qbase
  554.18 +user:        Bryan O'Sullivan <bos@serpentine.com>
  554.19 +
  554.20 +summary:     [mq]: first.patch
  554.21 +
  554.22 +$ \textbf{ls .hg/patches}
  554.23 +first.patch  series  status
   555.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   555.2 +++ b/ja/examples/mq.tutorial.qnew2.out	Sun Aug 16 03:41:39 2009 +0200
   555.3 @@ -0,0 +1,28 @@
   555.4 +$ \textbf{hg qnew second.patch}
   555.5 +$ \textbf{hg log --style=compact --limit=2}
   555.6 +2[qtip,second.patch,tip]   
   555.7 +  [mq]: second.patch
   555.8 +
   555.9 +1[first.patch,qbase]   
  555.10 +  [mq]: first.patch
  555.11 +
  555.12 +$ \textbf{echo 'line 4' >> file1}
  555.13 +$ \textbf{hg qrefresh}
  555.14 +$ \textbf{hg tip --style=compact --patch}
  555.15 +2[qtip,second.patch,tip]   
  555.16 +  [mq]: second.patch
  555.17 +
  555.18 +diff -r  -r  file1
  555.19 +
  555.20 +
  555.21 +@@ -1,3 +1,4 @@ line 1
  555.22 + line 1
  555.23 + line 2
  555.24 + line 3
  555.25 ++line 4
  555.26 +
  555.27 +$ \textbf{hg annotate file1}
  555.28 +0: line 1
  555.29 +1: line 2
  555.30 +1: line 3
  555.31 +2: line 4
   556.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   556.2 +++ b/ja/examples/mq.tutorial.qpop.out	Sun Aug 16 03:41:39 2009 +0200
   556.3 @@ -0,0 +1,14 @@
   556.4 +$ \textbf{hg qapplied}
   556.5 +first.patch
   556.6 +second.patch
   556.7 +$ \textbf{hg qpop}
   556.8 +Now at: first.patch
   556.9 +$ \textbf{hg qseries}
  556.10 +first.patch
  556.11 +second.patch
  556.12 +$ \textbf{hg qapplied}
  556.13 +first.patch
  556.14 +$ \textbf{cat file1}
  556.15 +line 1
  556.16 +line 2
  556.17 +line 3
   557.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   557.2 +++ b/ja/examples/mq.tutorial.qpush-a.out	Sun Aug 16 03:41:39 2009 +0200
   557.3 @@ -0,0 +1,8 @@
   557.4 +$ \textbf{hg qpush -a}
   557.5 +applying second.patch
   557.6 +Now at: second.patch
   557.7 +$ \textbf{cat file1}
   557.8 +line 1
   557.9 +line 2
  557.10 +line 3
  557.11 +line 4
   558.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   558.2 +++ b/ja/examples/mq.tutorial.qrefresh.out	Sun Aug 16 03:41:39 2009 +0200
   558.3 @@ -0,0 +1,21 @@
   558.4 +$ \textbf{echo 'line 2' >> file1}
   558.5 +$ \textbf{hg diff}
   558.6 +diff -r  file1
   558.7 +
   558.8 +
   558.9 +@@ -1,1 +1,2 @@ line 1
  558.10 + line 1
  558.11 ++line 2
  558.12 +$ \textbf{hg qrefresh}
  558.13 +$ \textbf{hg diff}
  558.14 +$ \textbf{hg tip --style=compact --patch}
  558.15 +1[qtip,first.patch,tip,qbase]   
  558.16 +  [mq]: first.patch
  558.17 +
  558.18 +diff -r  -r  file1
  558.19 +
  558.20 +
  558.21 +@@ -1,1 +1,2 @@ line 1
  558.22 + line 1
  558.23 ++line 2
  558.24 +
   559.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   559.2 +++ b/ja/examples/mq.tutorial.qrefresh2.out	Sun Aug 16 03:41:39 2009 +0200
   559.3 @@ -0,0 +1,16 @@
   559.4 +$ \textbf{echo 'line 3' >> file1}
   559.5 +$ \textbf{hg status}
   559.6 +M file1
   559.7 +$ \textbf{hg qrefresh}
   559.8 +$ \textbf{hg tip --style=compact --patch}
   559.9 +1[qtip,first.patch,tip,qbase]   
  559.10 +  [mq]: first.patch
  559.11 +
  559.12 +diff -r  -r  file1
  559.13 +
  559.14 +
  559.15 +@@ -1,1 +1,3 @@ line 1
  559.16 + line 1
  559.17 ++line 2
  559.18 ++line 3
  559.19 +
   560.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   560.2 +++ b/ja/examples/mq.tutorial.qseries.out	Sun Aug 16 03:41:39 2009 +0200
   560.3 @@ -0,0 +1,6 @@
   560.4 +$ \textbf{hg qseries}
   560.5 +first.patch
   560.6 +second.patch
   560.7 +$ \textbf{hg qapplied}
   560.8 +first.patch
   560.9 +second.patch
   561.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   561.2 +++ b/ja/examples/rename.divergent	Sun Aug 16 03:41:39 2009 +0200
   561.3 @@ -0,0 +1,33 @@
   561.4 +#!/bin/bash
   561.5 +
   561.6 +hg init orig
   561.7 +cd orig
   561.8 +echo foo > foo
   561.9 +hg ci -A -m 'First commit'
  561.10 +cd ..
  561.11 +
  561.12 +#$ name: clone
  561.13 +
  561.14 +hg clone orig anne
  561.15 +hg clone orig bob
  561.16 +
  561.17 +#$ name: rename.anne
  561.18 +
  561.19 +cd anne
  561.20 +hg mv foo bar
  561.21 +hg ci -m 'Rename foo to bar'
  561.22 +
  561.23 +#$ name: rename.bob
  561.24 +
  561.25 +cd ../bob
  561.26 +hg mv foo quux
  561.27 +hg ci -m 'Rename foo to quux'
  561.28 +
  561.29 +#$ name: merge
  561.30 +# See http://www.selenic.com/mercurial/bts/issue455
  561.31 +
  561.32 +cd ../orig
  561.33 +hg pull -u ../anne
  561.34 +hg pull ../bob
  561.35 +hg merge
  561.36 +ls
   562.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   562.2 +++ b/ja/examples/rename.divergent.clone.out	Sun Aug 16 03:41:39 2009 +0200
   562.3 @@ -0,0 +1,4 @@
   562.4 +$ \textbf{hg clone orig anne}
   562.5 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   562.6 +$ \textbf{hg clone orig bob}
   562.7 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   563.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   563.2 +++ b/ja/examples/rename.divergent.merge.out	Sun Aug 16 03:41:39 2009 +0200
   563.3 @@ -0,0 +1,26 @@
   563.4 +# See http://www.selenic.com/mercurial/bts/issue455
   563.5 +$ \textbf{cd ../orig}
   563.6 +$ \textbf{hg pull -u ../anne}
   563.7 +pulling from ../anne
   563.8 +searching for changes
   563.9 +adding changesets
  563.10 +adding manifests
  563.11 +adding file changes
  563.12 +added 1 changesets with 1 changes to 1 files
  563.13 +1 files updated, 0 files merged, 1 files removed, 0 files unresolved
  563.14 +$ \textbf{hg pull ../bob}
  563.15 +pulling from ../bob
  563.16 +searching for changes
  563.17 +adding changesets
  563.18 +adding manifests
  563.19 +adding file changes
  563.20 +added 1 changesets with 1 changes to 1 files (+1 heads)
  563.21 +(run 'hg heads' to see heads, 'hg merge' to merge)
  563.22 +$ \textbf{hg merge}
  563.23 +warning: detected divergent renames of foo to:
  563.24 + bar
  563.25 + quux
  563.26 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  563.27 +(branch merge, don't forget to commit)
  563.28 +$ \textbf{ls}
  563.29 +bar  quux
   564.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   564.2 +++ b/ja/examples/rename.divergent.rename.anne.out	Sun Aug 16 03:41:39 2009 +0200
   564.3 @@ -0,0 +1,3 @@
   564.4 +$ \textbf{cd anne}
   564.5 +$ \textbf{hg mv foo bar}
   564.6 +$ \textbf{hg ci -m 'Rename foo to bar'}
   565.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   565.2 +++ b/ja/examples/rename.divergent.rename.bob.out	Sun Aug 16 03:41:39 2009 +0200
   565.3 @@ -0,0 +1,3 @@
   565.4 +$ \textbf{cd ../bob}
   565.5 +$ \textbf{hg mv foo quux}
   565.6 +$ \textbf{hg ci -m 'Rename foo to quux'}
   566.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   566.2 +++ b/ja/examples/rollback	Sun Aug 16 03:41:39 2009 +0200
   566.3 @@ -0,0 +1,37 @@
   566.4 +#!/bin/bash
   566.5 +
   566.6 +hg init a
   566.7 +cd a
   566.8 +echo a > a
   566.9 +hg ci -A -m 'First commit'
  566.10 +
  566.11 +echo a >> a
  566.12 +
  566.13 +#$ name: tip
  566.14 +
  566.15 +#$ name: commit
  566.16 +
  566.17 +hg status
  566.18 +echo b > b
  566.19 +hg commit -m 'Add file b'
  566.20 +
  566.21 +#$ name: status
  566.22 +
  566.23 +hg status
  566.24 +hg tip
  566.25 +
  566.26 +#$ name: rollback
  566.27 +
  566.28 +hg rollback
  566.29 +hg tip
  566.30 +hg status
  566.31 +
  566.32 +#$ name: add
  566.33 +
  566.34 +hg add b
  566.35 +hg commit -m 'Add file b, this time for real'
  566.36 +
  566.37 +#$ name: twice
  566.38 +
  566.39 +hg rollback
  566.40 +hg rollback
   567.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   567.2 +++ b/ja/examples/rollback.add.out	Sun Aug 16 03:41:39 2009 +0200
   567.3 @@ -0,0 +1,2 @@
   567.4 +$ \textbf{hg add b}
   567.5 +$ \textbf{hg commit -m 'Add file b, this time for real'}
   568.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   568.2 +++ b/ja/examples/rollback.commit.out	Sun Aug 16 03:41:39 2009 +0200
   568.3 @@ -0,0 +1,4 @@
   568.4 +$ \textbf{hg status}
   568.5 +M a
   568.6 +$ \textbf{echo b > b}
   568.7 +$ \textbf{hg commit -m 'Add file b'}
   569.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   569.2 +++ b/ja/examples/rollback.rollback.out	Sun Aug 16 03:41:39 2009 +0200
   569.3 @@ -0,0 +1,12 @@
   569.4 +$ \textbf{hg rollback}
   569.5 +rolling back last transaction
   569.6 +$ \textbf{hg tip}
   569.7 +changeset:   
   569.8 +tag:         tip
   569.9 +user:        Bryan O'Sullivan <bos@serpentine.com>
  569.10 +
  569.11 +summary:     First commit
  569.12 +
  569.13 +$ \textbf{hg status}
  569.14 +M a
  569.15 +? b
   570.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   570.2 +++ b/ja/examples/rollback.status.out	Sun Aug 16 03:41:39 2009 +0200
   570.3 @@ -0,0 +1,9 @@
   570.4 +$ \textbf{hg status}
   570.5 +? b
   570.6 +$ \textbf{hg tip}
   570.7 +changeset:   
   570.8 +tag:         tip
   570.9 +user:        Bryan O'Sullivan <bos@serpentine.com>
  570.10 +
  570.11 +summary:     Add file b
  570.12 +
   571.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   571.2 +++ b/ja/examples/rollback.twice.out	Sun Aug 16 03:41:39 2009 +0200
   571.3 @@ -0,0 +1,4 @@
   571.4 +$ \textbf{hg rollback}
   571.5 +rolling back last transaction
   571.6 +$ \textbf{hg rollback}
   571.7 +no rollback information available
   572.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   572.2 +++ b/ja/examples/run-example	Sun Aug 16 03:41:39 2009 +0200
   572.3 @@ -0,0 +1,391 @@
   572.4 +#!/usr/bin/env python
   572.5 +#
   572.6 +# This program takes something that resembles a shell script and runs
   572.7 +# it, spitting input (commands from the script) and output into text
   572.8 +# files, for use in examples.
   572.9 +
  572.10 +import cStringIO
  572.11 +import errno
  572.12 +import getopt
  572.13 +import os
  572.14 +import pty
  572.15 +import re
  572.16 +import select
  572.17 +import shutil
  572.18 +import signal
  572.19 +import stat
  572.20 +import sys
  572.21 +import tempfile
  572.22 +import time
  572.23 +
  572.24 +tex_subs = {
  572.25 +    '\\': '\\textbackslash{}',
  572.26 +    '{': '\\{',
  572.27 +    '}': '\\}',
  572.28 +    }
  572.29 +
  572.30 +def gensubs(s):
  572.31 +    start = 0
  572.32 +    for i, c in enumerate(s):
  572.33 +        sub = tex_subs.get(c)
  572.34 +        if sub:
  572.35 +            yield s[start:i]
  572.36 +            start = i + 1
  572.37 +            yield sub
  572.38 +    yield s[start:]
  572.39 +
  572.40 +def tex_escape(s):
  572.41 +    return ''.join(gensubs(s))
  572.42 +        
  572.43 +def maybe_unlink(name):
  572.44 +    try:
  572.45 +        os.unlink(name)
  572.46 +        return True
  572.47 +    except OSError, err:
  572.48 +        if err.errno != errno.ENOENT:
  572.49 +            raise
  572.50 +    return False
  572.51 +
  572.52 +def find_path_to(program):
  572.53 +    for p in os.environ.get('PATH', os.defpath).split(os.pathsep):
  572.54 +        name = os.path.join(p, program)
  572.55 +        if os.access(name, os.X_OK):
  572.56 +            return p
  572.57 +    return None
  572.58 +        
  572.59 +class example:
  572.60 +    shell = '/usr/bin/env bash'
  572.61 +    ps1 = '__run_example_ps1__ '
  572.62 +    ps2 = '__run_example_ps2__ '
  572.63 +    pi_re = re.compile(r'#\$\s*(name|ignore):\s*(.*)$')
  572.64 +    
  572.65 +    timeout = 10
  572.66 +
  572.67 +    def __init__(self, name, verbose):
  572.68 +        self.name = name
  572.69 +        self.verbose = verbose
  572.70 +        self.poll = select.poll()
  572.71 +
  572.72 +    def parse(self):
  572.73 +        '''yield each hunk of input from the file.'''
  572.74 +        fp = open(self.name)
  572.75 +        cfp = cStringIO.StringIO()
  572.76 +        for line in fp:
  572.77 +            cfp.write(line)
  572.78 +            if not line.rstrip().endswith('\\'):
  572.79 +                yield cfp.getvalue()
  572.80 +                cfp.seek(0)
  572.81 +                cfp.truncate()
  572.82 +        
  572.83 +    def status(self, s):
  572.84 +        sys.stdout.write(s)
  572.85 +        if not s.endswith('\n'):
  572.86 +            sys.stdout.flush()
  572.87 +
  572.88 +    def send(self, s):
  572.89 +        if self.verbose:
  572.90 +            print >> sys.stderr, '>', self.debugrepr(s)
  572.91 +        while s:
  572.92 +            count = os.write(self.cfd, s)
  572.93 +            s = s[count:]
  572.94 +
  572.95 +    def debugrepr(self, s):
  572.96 +        rs = repr(s)
  572.97 +        limit = 60
  572.98 +        if len(rs) > limit:
  572.99 +            return ('%s%s ... [%d bytes]' % (rs[:limit], rs[0], len(s)))
 572.100 +        else:
 572.101 +            return rs
 572.102 +            
 572.103 +    timeout = 5
 572.104 +
 572.105 +    def read(self, hint):
 572.106 +        events = self.poll.poll(self.timeout * 1000)
 572.107 +        if not events:
 572.108 +            print >> sys.stderr, ('[%stimed out after %d seconds]' %
 572.109 +                                  (hint, self.timeout))
 572.110 +            os.kill(self.pid, signal.SIGHUP)
 572.111 +            return ''
 572.112 +        return os.read(self.cfd, 1024)
 572.113 +        
 572.114 +    def receive(self, hint):
 572.115 +        out = cStringIO.StringIO()
 572.116 +        while True:
 572.117 +            try:
 572.118 +                if self.verbose:
 572.119 +                    sys.stderr.write('< ')
 572.120 +                s = self.read(hint)
 572.121 +            except OSError, err:
 572.122 +                if err.errno == errno.EIO:
 572.123 +                    return '', ''
 572.124 +                raise
 572.125 +            if self.verbose:
 572.126 +                print >> sys.stderr, self.debugrepr(s)
 572.127 +            out.write(s)
 572.128 +            s = out.getvalue()
 572.129 +            if s.endswith(self.ps1):
 572.130 +                return self.ps1, s.replace('\r\n', '\n')[:-len(self.ps1)]
 572.131 +            if s.endswith(self.ps2):
 572.132 +                return self.ps2, s.replace('\r\n', '\n')[:-len(self.ps2)]
 572.133 +        
 572.134 +    def sendreceive(self, s, hint):
 572.135 +        self.send(s)
 572.136 +        ps, r = self.receive(hint)
 572.137 +        if r.startswith(s):
 572.138 +            r = r[len(s):]
 572.139 +        return ps, r
 572.140 +    
 572.141 +    def run(self):
 572.142 +        ofp = None
 572.143 +        basename = os.path.basename(self.name)
 572.144 +        self.status('running %s ' % basename)
 572.145 +        tmpdir = tempfile.mkdtemp(prefix=basename)
 572.146 +
 572.147 +        # remove the marker file that we tell make to use to see if
 572.148 +        # this run succeeded
 572.149 +        maybe_unlink(self.name + '.run')
 572.150 +
 572.151 +        rcfile = os.path.join(tmpdir, '.hgrc')
 572.152 +        rcfp = open(rcfile, 'w')
 572.153 +        print >> rcfp, '[ui]'
 572.154 +        print >> rcfp, "username = Bryan O'Sullivan <bos@serpentine.com>"
 572.155 +        
 572.156 +        rcfile = os.path.join(tmpdir, '.bashrc')
 572.157 +        rcfp = open(rcfile, 'w')
 572.158 +        print >> rcfp, 'PS1="%s"' % self.ps1
 572.159 +        print >> rcfp, 'PS2="%s"' % self.ps2
 572.160 +        print >> rcfp, 'unset HISTFILE'
 572.161 +        path = ['/usr/bin', '/bin']
 572.162 +        hg = find_path_to('hg')
 572.163 +        if hg and hg not in path:
 572.164 +            path.append(hg)
 572.165 +        def re_export(envar):
 572.166 +            v = os.getenv(envar)
 572.167 +            if v is not None:
 572.168 +                print >> rcfp, 'export ' + envar + '=' + v
 572.169 +        print >> rcfp, 'export PATH=' + ':'.join(path)
 572.170 +        re_export('PYTHONPATH')
 572.171 +        print >> rcfp, 'export EXAMPLE_DIR="%s"' % os.getcwd()
 572.172 +        print >> rcfp, 'export HGMERGE=merge'
 572.173 +        print >> rcfp, 'export LANG=C'
 572.174 +        print >> rcfp, 'export LC_ALL=C'
 572.175 +        print >> rcfp, 'export TZ=GMT'
 572.176 +        print >> rcfp, 'export HGRC="%s/.hgrc"' % tmpdir
 572.177 +        print >> rcfp, 'export HGRCPATH=$HGRC'
 572.178 +        print >> rcfp, 'cd %s' % tmpdir
 572.179 +        rcfp.close()
 572.180 +        sys.stdout.flush()
 572.181 +        sys.stderr.flush()
 572.182 +        self.pid, self.cfd = pty.fork()
 572.183 +        if self.pid == 0:
 572.184 +            cmdline = ['/usr/bin/env', '-i', 'bash', '--noediting',
 572.185 +                       '--noprofile', '--norc']
 572.186 +            try:
 572.187 +                os.execv(cmdline[0], cmdline)
 572.188 +            except OSError, err:
 572.189 +                print >> sys.stderr, '%s: %s' % (cmdline[0], err.strerror)
 572.190 +                sys.stderr.flush()
 572.191 +                os._exit(0)
 572.192 +        self.poll.register(self.cfd, select.POLLIN | select.POLLERR |
 572.193 +                           select.POLLHUP)
 572.194 +
 572.195 +        prompts = {
 572.196 +            '': '',
 572.197 +            self.ps1: '$',
 572.198 +            self.ps2: '>',
 572.199 +            }
 572.200 +
 572.201 +        ignore = [
 572.202 +            r'\d+:[0-9a-f]{12}', # changeset number:hash
 572.203 +            r'[0-9a-f]{40}', # long changeset hash
 572.204 +            r'[0-9a-f]{12}', # short changeset hash
 572.205 +            r'^(?:---|\+\+\+) .*', # diff header with dates
 572.206 +            r'^date:.*', # date
 572.207 +            #r'^diff -r.*', # "diff -r" is followed by hash
 572.208 +            r'^# Date \d+ \d+', # hg patch header
 572.209 +            ]
 572.210 +
 572.211 +        err = False
 572.212 +        read_hint = ''
 572.213 +
 572.214 +        try:
 572.215 +            try:
 572.216 +                # eat first prompt string from shell
 572.217 +                self.read(read_hint)
 572.218 +                # setup env and prompt
 572.219 +                ps, output = self.sendreceive('source %s\n' % rcfile,
 572.220 +                                              read_hint)
 572.221 +                for hunk in self.parse():
 572.222 +                    # is this line a processing instruction?
 572.223 +                    m = self.pi_re.match(hunk)
 572.224 +                    if m:
 572.225 +                        pi, rest = m.groups()
 572.226 +                        if pi == 'name':
 572.227 +                            self.status('.')
 572.228 +                            out = rest
 572.229 +                            if out in ('err', 'lxo', 'out', 'run', 'tmp'):
 572.230 +                                print >> sys.stderr, ('%s: illegal section '
 572.231 +                                                      'name %r' %
 572.232 +                                                      (self.name, out))
 572.233 +                                return 1
 572.234 +                            assert os.sep not in out
 572.235 +                            if ofp is not None:
 572.236 +                                ofp.close()
 572.237 +                                err |= self.rename_output(ofp_basename, ignore)
 572.238 +                            if out:
 572.239 +                                ofp_basename = '%s.%s' % (self.name, out)
 572.240 +                                read_hint = ofp_basename + ' '
 572.241 +                                ofp = open(ofp_basename + '.tmp', 'w')
 572.242 +                            else:
 572.243 +                                ofp = None
 572.244 +                        elif pi == 'ignore':
 572.245 +                            ignore.append(rest)
 572.246 +                    elif hunk.strip():
 572.247 +                        # it's something we should execute
 572.248 +                        newps, output = self.sendreceive(hunk, read_hint)
 572.249 +                        if not ofp:
 572.250 +                            continue
 572.251 +                        # first, print the command we ran
 572.252 +                        if not hunk.startswith('#'):
 572.253 +                            nl = hunk.endswith('\n')
 572.254 +                            hunk = ('%s \\textbf{%s}' %
 572.255 +                                    (prompts[ps],
 572.256 +                                     tex_escape(hunk.rstrip('\n'))))
 572.257 +                            if nl: hunk += '\n'
 572.258 +                        ofp.write(hunk)
 572.259 +                        # then its output
 572.260 +                        ofp.write(tex_escape(output))
 572.261 +                    ps = newps
 572.262 +                self.status('\n')
 572.263 +            except:
 572.264 +                print >> sys.stderr, '(killed)'
 572.265 +                os.kill(self.pid, signal.SIGKILL)
 572.266 +                pid, rc = os.wait()
 572.267 +                raise
 572.268 +            else:
 572.269 +                try:
 572.270 +                    ps, output = self.sendreceive('exit\n', read_hint)
 572.271 +                    if ofp is not None:
 572.272 +                        ofp.write(output)
 572.273 +                        ofp.close()
 572.274 +                        err |= self.rename_output(ofp_basename, ignore)
 572.275 +                    os.close(self.cfd)
 572.276 +                except IOError:
 572.277 +                    pass
 572.278 +                os.kill(self.pid, signal.SIGTERM)
 572.279 +                pid, rc = os.wait()
 572.280 +                err = err or rc
 572.281 +                if err:
 572.282 +                    if os.WIFEXITED(rc):
 572.283 +                        print >> sys.stderr, '(exit %s)' % os.WEXITSTATUS(rc)
 572.284 +                    elif os.WIFSIGNALED(rc):
 572.285 +                        print >> sys.stderr, '(signal %s)' % os.WTERMSIG(rc)
 572.286 +                else:
 572.287 +                    open(self.name + '.run', 'w')
 572.288 +                return err
 572.289 +        finally:
 572.290 +            shutil.rmtree(tmpdir)
 572.291 +
 572.292 +    def rename_output(self, base, ignore):
 572.293 +        mangle_re = re.compile('(?:' + '|'.join(ignore) + ')')
 572.294 +        def mangle(s):
 572.295 +            return mangle_re.sub('', s)
 572.296 +        def matchfp(fp1, fp2):
 572.297 +            while True:
 572.298 +                s1 = mangle(fp1.readline())
 572.299 +                s2 = mangle(fp2.readline())
 572.300 +                if cmp(s1, s2):
 572.301 +                    break
 572.302 +                if not s1:
 572.303 +                    return True
 572.304 +            return False
 572.305 +
 572.306 +        oldname = base + '.out'
 572.307 +        tmpname = base + '.tmp'
 572.308 +        errname = base + '.err'
 572.309 +        errfp = open(errname, 'w+')
 572.310 +        for line in open(tmpname):
 572.311 +            errfp.write(mangle_re.sub('', line))
 572.312 +        os.rename(tmpname, base + '.lxo')
 572.313 +        errfp.seek(0)
 572.314 +        try:
 572.315 +            oldfp = open(oldname)
 572.316 +        except IOError, err:
 572.317 +            if err.errno != errno.ENOENT:
 572.318 +                raise
 572.319 +            os.rename(errname, oldname)
 572.320 +            return False
 572.321 +        if matchfp(oldfp, errfp):
 572.322 +            os.unlink(errname)
 572.323 +            return False
 572.324 +        else:
 572.325 +            print >> sys.stderr, '\nOutput of %s has changed!' % base
 572.326 +            os.system('diff -u %s %s 1>&2' % (oldname, errname))
 572.327 +            return True
 572.328 +
 572.329 +def print_help(exit, msg=None):
 572.330 +    if msg:
 572.331 +        print >> sys.stderr, 'Error:', msg
 572.332 +    print >> sys.stderr, 'Usage: run-example [options] [test...]'
 572.333 +    print >> sys.stderr, 'Options:'
 572.334 +    print >> sys.stderr, '  -a --all       run all tests in this directory'
 572.335 +    print >> sys.stderr, '  -h --help      print this help message'
 572.336 +    print >> sys.stderr, '  -v --verbose   display extra debug output'
 572.337 +    sys.exit(exit)
 572.338 +
 572.339 +def main(path='.'):
 572.340 +    opts, args = getopt.getopt(sys.argv[1:], '?ahv',
 572.341 +                               ['all', 'help', 'verbose'])
 572.342 +    verbose = False
 572.343 +    run_all = False
 572.344 +    for o, a in opts:
 572.345 +        if o in ('-h', '-?', '--help'):
 572.346 +            print_help(0)
 572.347 +        if o in ('-a', '--all'):
 572.348 +            run_all = True
 572.349 +        if o in ('-v', '--verbose'):
 572.350 +            verbose = True
 572.351 +    errs = 0
 572.352 +    if args:
 572.353 +        for a in args:
 572.354 +            try:
 572.355 +                st = os.lstat(a)
 572.356 +            except OSError, err:
 572.357 +                print >> sys.stderr, '%s: %s' % (a, err.strerror)
 572.358 +                errs += 1
 572.359 +                continue
 572.360 +            if stat.S_ISREG(st.st_mode) and st.st_mode & 0111:
 572.361 +                if example(a, verbose).run():
 572.362 +                    errs += 1
 572.363 +            else:
 572.364 +                print >> sys.stderr, '%s: not a file, or not executable' % a
 572.365 +                errs += 1
 572.366 +    elif run_all:
 572.367 +        names = os.listdir(path)
 572.368 +        names.sort()
 572.369 +        for name in names:
 572.370 +            if name == 'run-example' or name.startswith('.'): continue
 572.371 +            if name.endswith('.out') or name.endswith('~'): continue
 572.372 +            if name.endswith('.run'): continue
 572.373 +            pathname = os.path.join(path, name)
 572.374 +            try:
 572.375 +                st = os.lstat(pathname)
 572.376 +            except OSError, err:
 572.377 +                # could be an output file that was removed while we ran
 572.378 +                if err.errno != errno.ENOENT:
 572.379 +                    raise
 572.380 +                continue
 572.381 +            if stat.S_ISREG(st.st_mode) and st.st_mode & 0111:
 572.382 +                if example(pathname, verbose).run():
 572.383 +                    errs += 1
 572.384 +        print >> open(os.path.join(path, '.run'), 'w'), time.asctime()
 572.385 +    else:
 572.386 +        print_help(1, msg='no test names given, and --all not provided')
 572.387 +    return errs
 572.388 +
 572.389 +if __name__ == '__main__':
 572.390 +    try:
 572.391 +        sys.exit(main())
 572.392 +    except KeyboardInterrupt:
 572.393 +        print >> sys.stderr, 'interrupted!'
 572.394 +        sys.exit(1)
   573.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   573.2 +++ b/ja/examples/svn-long.txt	Sun Aug 16 03:41:39 2009 +0200
   573.3 @@ -0,0 +1,11 @@
   573.4 +------------------------------------------------------------------------
   573.5 +r9653 | sean.hefty | 2006-09-27 14:39:55 -0700 (Wed, 27 Sep 2006) | 5 lines
   573.6 +Changed paths:
   573.7 +   M /gen2/trunk/src/linux-kernel/infiniband/core/cma.c
   573.8 +
   573.9 +On reporting a route error, also include the status for the error,
  573.10 +rather than indicating a status of 0 when an error has occurred.
  573.11 +
  573.12 +Signed-off-by: Sean Hefty <sean.hefty@intel.com>
  573.13 +
  573.14 +------------------------------------------------------------------------
   574.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   574.2 +++ b/ja/examples/svn-short.txt	Sun Aug 16 03:41:39 2009 +0200
   574.3 @@ -0,0 +1,9 @@
   574.4 +------------------------------------------------------------------------
   574.5 +r9653 | sean.hefty | 2006-09-27 14:39:55 -0700 (Wed, 27 Sep 2006) | 5 lines
   574.6 +
   574.7 +On reporting a route error, also include the status for the error,
   574.8 +rather than indicating a status of 0 when an error has occurred.
   574.9 +
  574.10 +Signed-off-by: Sean Hefty <sean.hefty@intel.com>
  574.11 +
  574.12 +------------------------------------------------------------------------
   575.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   575.2 +++ b/ja/examples/svn.style	Sun Aug 16 03:41:39 2009 +0200
   575.3 @@ -0,0 +1,2 @@
   575.4 +header = '------------------------------------------------------------------------\n\n'
   575.5 +changeset = svn.template
   576.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   576.2 +++ b/ja/examples/svn.template	Sun Aug 16 03:41:39 2009 +0200
   576.3 @@ -0,0 +1,5 @@
   576.4 +r{rev} | {author|user} | {date|isodate} ({date|rfc822date})
   576.5 +
   576.6 +{desc|strip|fill76}
   576.7 +
   576.8 +------------------------------------------------------------------------
   577.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   577.2 +++ b/ja/examples/tag	Sun Aug 16 03:41:39 2009 +0200
   577.3 @@ -0,0 +1,44 @@
   577.4 +#!/bin/bash
   577.5 +
   577.6 +#$ name: init
   577.7 +
   577.8 +hg init mytag
   577.9 +cd mytag
  577.10 +
  577.11 +echo hello > myfile
  577.12 +hg commit -A -m 'Initial commit'
  577.13 +
  577.14 +#$ name: tag
  577.15 +
  577.16 +hg tag v1.0
  577.17 +
  577.18 +#$ name: tags
  577.19 +
  577.20 +hg tags
  577.21 +
  577.22 +#$ name: log
  577.23 +
  577.24 +hg log
  577.25 +
  577.26 +#$ name: log.v1.0
  577.27 +
  577.28 +echo goodbye > myfile2
  577.29 +hg commit -A -m 'Second commit'
  577.30 +hg log -r v1.0
  577.31 +
  577.32 +#$ name: remove
  577.33 +
  577.34 +hg tag --remove v1.0
  577.35 +hg tags
  577.36 +
  577.37 +#$ name: replace
  577.38 +
  577.39 +hg tag -r 1 v1.1
  577.40 +hg tags
  577.41 +hg tag -r 2 v1.1
  577.42 +hg tag -f -r 2 v1.1
  577.43 +hg tags
  577.44 +
  577.45 +#$ name: tip
  577.46 +
  577.47 +hg tip
   578.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   578.2 +++ b/ja/examples/tag.init.out	Sun Aug 16 03:41:39 2009 +0200
   578.3 @@ -0,0 +1,5 @@
   578.4 +$ \textbf{hg init mytag}
   578.5 +$ \textbf{cd mytag}
   578.6 +$ \textbf{echo hello > myfile}
   578.7 +$ \textbf{hg commit -A -m 'Initial commit'}
   578.8 +adding myfile
   579.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   579.2 +++ b/ja/examples/tag.log.out	Sun Aug 16 03:41:39 2009 +0200
   579.3 @@ -0,0 +1,13 @@
   579.4 +$ \textbf{hg log}
   579.5 +changeset:   
   579.6 +tag:         tip
   579.7 +user:        Bryan O'Sullivan <bos@serpentine.com>
   579.8 +
   579.9 +summary:     Added tag v1.0 for changeset 
  579.10 +
  579.11 +changeset:   
  579.12 +tag:         v1.0
  579.13 +user:        Bryan O'Sullivan <bos@serpentine.com>
  579.14 +
  579.15 +summary:     Initial commit
  579.16 +
   580.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   580.2 +++ b/ja/examples/tag.log.v1.0.out	Sun Aug 16 03:41:39 2009 +0200
   580.3 @@ -0,0 +1,10 @@
   580.4 +$ \textbf{echo goodbye > myfile2}
   580.5 +$ \textbf{hg commit -A -m 'Second commit'}
   580.6 +adding myfile2
   580.7 +$ \textbf{hg log -r v1.0}
   580.8 +changeset:   
   580.9 +tag:         v1.0
  580.10 +user:        Bryan O'Sullivan <bos@serpentine.com>
  580.11 +
  580.12 +summary:     Initial commit
  580.13 +
   581.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   581.2 +++ b/ja/examples/tag.remove.out	Sun Aug 16 03:41:39 2009 +0200
   581.3 @@ -0,0 +1,3 @@
   581.4 +$ \textbf{hg tag --remove v1.0}
   581.5 +$ \textbf{hg tags}
   581.6 +tip                                
   582.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   582.2 +++ b/ja/examples/tag.replace.out	Sun Aug 16 03:41:39 2009 +0200
   582.3 @@ -0,0 +1,10 @@
   582.4 +$ \textbf{hg tag -r 1 v1.1}
   582.5 +$ \textbf{hg tags}
   582.6 +tip                                
   582.7 +v1.1                               
   582.8 +$ \textbf{hg tag -r 2 v1.1}
   582.9 +abort: a tag named v1.1 already exists (use -f to force)
  582.10 +$ \textbf{hg tag -f -r 2 v1.1}
  582.11 +$ \textbf{hg tags}
  582.12 +tip                                
  582.13 +v1.1                               
   583.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   583.2 +++ b/ja/examples/tag.tag.out	Sun Aug 16 03:41:39 2009 +0200
   583.3 @@ -0,0 +1,1 @@
   583.4 +$ \textbf{hg tag v1.0}
   584.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   584.2 +++ b/ja/examples/tag.tags.out	Sun Aug 16 03:41:39 2009 +0200
   584.3 @@ -0,0 +1,3 @@
   584.4 +$ \textbf{hg tags}
   584.5 +tip                                
   584.6 +v1.0                               
   585.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   585.2 +++ b/ja/examples/tag.tip.out	Sun Aug 16 03:41:39 2009 +0200
   585.3 @@ -0,0 +1,7 @@
   585.4 +$ \textbf{hg tip}
   585.5 +changeset:   
   585.6 +tag:         tip
   585.7 +user:        Bryan O'Sullivan <bos@serpentine.com>
   585.8 +
   585.9 +summary:     Added tag v1.1 for changeset 
  585.10 +
   586.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   586.2 +++ b/ja/examples/template.simple	Sun Aug 16 03:41:39 2009 +0200
   586.3 @@ -0,0 +1,96 @@
   586.4 +#!/bin/bash
   586.5 +
   586.6 +# So many different bits of random output, it would be a nightmare to
   586.7 +# ignore each individually.
   586.8 +#$ ignore: .*
   586.9 +
  586.10 +hg init myrepo
  586.11 +cd myrepo
  586.12 +echo hello > hello
  586.13 +hg commit -Am'added hello'
  586.14 +
  586.15 +echo hello >> hello
  586.16 +echo goodbye > goodbye
  586.17 +echo '   added line to end of <<hello>> file.' > ../msg
  586.18 +echo '' >> ../msg
  586.19 +echo 'in addition, added a file with the helpful name (at least i hope that some might consider it so) of goodbye.' >> ../msg
  586.20 +
  586.21 +hg commit -Al../msg
  586.22 +
  586.23 +hg tag mytag
  586.24 +hg tag v0.1
  586.25 +
  586.26 +#$ name: normal
  586.27 +
  586.28 +hg log -r1
  586.29 +
  586.30 +#$ name: compact
  586.31 +
  586.32 +hg log --style compact
  586.33 +
  586.34 +#$ name: changelog
  586.35 +
  586.36 +hg log --style changelog
  586.37 +
  586.38 +#$ name: simplest
  586.39 +
  586.40 +hg log -r1 --template 'i saw a changeset\n'
  586.41 +
  586.42 +#$ name: simplesub
  586.43 +
  586.44 +hg log --template 'i saw a changeset: {desc}\n'
  586.45 +
  586.46 +#$ name: keywords
  586.47 +
  586.48 +hg log -r1 --template 'author: {author}\n'
  586.49 +hg log -r1 --template 'desc:\n{desc}\n'
  586.50 +hg log -r1 --template 'files: {files}\n'
  586.51 +hg log -r1 --template 'file_adds: {file_adds}\n'
  586.52 +hg log -r1 --template 'file_dels: {file_dels}\n'
  586.53 +hg log -r1 --template 'node: {node}\n'
  586.54 +hg log -r1 --template 'parents: {parents}\n'
  586.55 +hg log -r1 --template 'rev: {rev}\n'
  586.56 +hg log -r1 --template 'tags: {tags}\n'
  586.57 +
  586.58 +#$ name: datekeyword
  586.59 +
  586.60 +hg log -r1 --template 'date: {date}\n'
  586.61 +hg log -r1 --template 'date: {date|isodate}\n'
  586.62 +
  586.63 +#$ name: manyfilters
  586.64 +
  586.65 +hg log -r1 --template '{author}\n'
  586.66 +hg log -r1 --template '{author|domain}\n'
  586.67 +hg log -r1 --template '{author|email}\n'
  586.68 +hg log -r1 --template '{author|obfuscate}\n' | cut -c-76
  586.69 +hg log -r1 --template '{author|person}\n'
  586.70 +hg log -r1 --template '{author|user}\n'
  586.71 +
  586.72 +hg log -r1 --template 'looks almost right, but actually garbage: {date}\n'
  586.73 +hg log -r1 --template '{date|age}\n'
  586.74 +hg log -r1 --template '{date|date}\n'
  586.75 +hg log -r1 --template '{date|hgdate}\n'
  586.76 +hg log -r1 --template '{date|isodate}\n'
  586.77 +hg log -r1 --template '{date|rfc822date}\n'
  586.78 +hg log -r1 --template '{date|shortdate}\n'
  586.79 +
  586.80 +hg log -r1 --template '{desc}\n' | cut -c-76
  586.81 +hg log -r1 --template '{desc|addbreaks}\n' | cut -c-76
  586.82 +hg log -r1 --template '{desc|escape}\n' | cut -c-76
  586.83 +hg log -r1 --template '{desc|fill68}\n'
  586.84 +hg log -r1 --template '{desc|fill76}\n'
  586.85 +hg log -r1 --template '{desc|firstline}\n'
  586.86 +hg log -r1 --template '{desc|strip}\n' | cut -c-76
  586.87 +hg log -r1 --template '{desc|tabindent}\n' | expand | cut -c-76
  586.88 +
  586.89 +hg log -r1 --template '{node}\n'
  586.90 +hg log -r1 --template '{node|short}\n'
  586.91 +
  586.92 +#$ name: combine
  586.93 +
  586.94 +hg log -r1 --template 'description:\n\t{desc|strip|fill68|tabindent}\n'
  586.95 +
  586.96 +#$ name: rev
  586.97 +
  586.98 +echo 'changeset = "rev: {rev}\n"' > rev
  586.99 +hg log -l1 --style ./rev
   587.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   587.2 +++ b/ja/examples/template.simple.changelog.out	Sun Aug 16 03:41:39 2009 +0200
   587.3 @@ -0,0 +1,22 @@
   587.4 +
   587.5 +
   587.6 +
   587.7 +
   587.8 +
   587.9 +
  587.10 +
  587.11 +
  587.12 +
  587.13 +
  587.14 +
  587.15 +
  587.16 +
  587.17 +
  587.18 +
  587.19 +
  587.20 +
  587.21 +
  587.22 +
  587.23 +
  587.24 +
  587.25 +
   588.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   588.2 +++ b/ja/examples/template.simple.combine.out	Sun Aug 16 03:41:39 2009 +0200
   588.3 @@ -0,0 +1,6 @@
   588.4 +
   588.5 +
   588.6 +
   588.7 +
   588.8 +
   588.9 +
   589.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   589.2 +++ b/ja/examples/template.simple.compact.out	Sun Aug 16 03:41:39 2009 +0200
   589.3 @@ -0,0 +1,13 @@
   589.4 +
   589.5 +
   589.6 +
   589.7 +
   589.8 +
   589.9 +
  589.10 +
  589.11 +
  589.12 +
  589.13 +
  589.14 +
  589.15 +
  589.16 +
   590.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   590.2 +++ b/ja/examples/template.simple.datekeyword.out	Sun Aug 16 03:41:39 2009 +0200
   590.3 @@ -0,0 +1,4 @@
   590.4 +
   590.5 +
   590.6 +
   590.7 +
   591.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   591.2 +++ b/ja/examples/template.simple.keywords.out	Sun Aug 16 03:41:39 2009 +0200
   591.3 @@ -0,0 +1,21 @@
   591.4 +
   591.5 +
   591.6 +
   591.7 +
   591.8 +
   591.9 +
  591.10 +
  591.11 +
  591.12 +
  591.13 +
  591.14 +
  591.15 +
  591.16 +
  591.17 +
  591.18 +
  591.19 +
  591.20 +
  591.21 +
  591.22 +
  591.23 +
  591.24 +
   593.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   593.2 +++ b/ja/examples/template.simple.normal.out	Sun Aug 16 03:41:39 2009 +0200
   593.3 @@ -0,0 +1,7 @@
   593.4 +
   593.5 +
   593.6 +
   593.7 +
   593.8 +
   593.9 +
  593.10 +
   594.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   594.2 +++ b/ja/examples/template.simple.rev.out	Sun Aug 16 03:41:39 2009 +0200
   594.3 @@ -0,0 +1,3 @@
   594.4 +
   594.5 +
   594.6 +
   595.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   595.2 +++ b/ja/examples/template.simple.simplest.out	Sun Aug 16 03:41:39 2009 +0200
   595.3 @@ -0,0 +1,2 @@
   595.4 +
   595.5 +
   596.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   596.2 +++ b/ja/examples/template.simple.simplesub.out	Sun Aug 16 03:41:39 2009 +0200
   596.3 @@ -0,0 +1,7 @@
   596.4 +
   596.5 +
   596.6 +
   596.7 +
   596.8 +
   596.9 +
  596.10 +
   597.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   597.2 +++ b/ja/examples/template.svnstyle	Sun Aug 16 03:41:39 2009 +0200
   597.3 @@ -0,0 +1,70 @@
   597.4 +#!/bin/bash
   597.5 +
   597.6 +svn() {
   597.7 +  cat $EXAMPLE_DIR/svn-short.txt
   597.8 +}
   597.9 +
  597.10 +#$ name: short
  597.11 +
  597.12 +svn log -r9653
  597.13 +
  597.14 +#$ name:
  597.15 +
  597.16 +hg init myrepo
  597.17 +cd myrepo
  597.18 +
  597.19 +echo hello > hello
  597.20 +hg commit -Am'added hello'
  597.21 +
  597.22 +echo hello >> hello
  597.23 +echo goodbye > goodbye
  597.24 +echo '   added line to end of <<hello>> file.' > ../msg
  597.25 +echo '' >> ../msg
  597.26 +echo 'in addition, added a file with the helpful name (at least i hope that some might consider it so) of goodbye.' >> ../msg
  597.27 +
  597.28 +hg commit -Al../msg
  597.29 +
  597.30 +hg tag mytag
  597.31 +hg tag v0.1
  597.32 +
  597.33 +echo 'changeset = "{node|short}\n"' > svn.style
  597.34 +
  597.35 +#$ name: id
  597.36 +
  597.37 +hg log -r0 --template '{node}'
  597.38 +
  597.39 +#$ name: simplest
  597.40 +
  597.41 +cat svn.style
  597.42 +hg log -r1 --style svn.style
  597.43 +
  597.44 +#$ name:
  597.45 +
  597.46 +echo 'changeset =' > broken.style
  597.47 +
  597.48 +#$ name: syntax.input
  597.49 +
  597.50 +cat broken.style
  597.51 +
  597.52 +#$ name: syntax.error
  597.53 +
  597.54 +hg log -r1 --style broken.style
  597.55 +
  597.56 +#$ name:
  597.57 +
  597.58 +cp $EXAMPLE_DIR/svn.style .
  597.59 +cp $EXAMPLE_DIR/svn.template .
  597.60 +
  597.61 +#$ name: template
  597.62 +
  597.63 +cat svn.template
  597.64 +
  597.65 +#$ name: style
  597.66 +
  597.67 +cat svn.style
  597.68 +
  597.69 +#$ name: result
  597.70 +#$ ignore: \| 200[78].*
  597.71 +
  597.72 +hg log -r1 --style svn.style
  597.73 +
   598.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   598.2 +++ b/ja/examples/template.svnstyle.id.out	Sun Aug 16 03:41:39 2009 +0200
   598.3 @@ -0,0 +1,1 @@
   598.4 +$ \textbf{hg log -r0 --template '\{node\}'}
   599.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   599.2 +++ b/ja/examples/template.svnstyle.result.out	Sun Aug 16 03:41:39 2009 +0200
   599.3 @@ -0,0 +1,11 @@
   599.4 +$ \textbf{hg log -r1 --style svn.style}
   599.5 +------------------------------------------------------------------------
   599.6 +
   599.7 +r1 | bos 
   599.8 +
   599.9 +added line to end of <<hello>> file.
  599.10 +
  599.11 +in addition, added a file with the helpful name (at least i hope that some
  599.12 +might consider it so) of goodbye.
  599.13 +
  599.14 +------------------------------------------------------------------------
   600.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   600.2 +++ b/ja/examples/template.svnstyle.short.out	Sun Aug 16 03:41:39 2009 +0200
   600.3 @@ -0,0 +1,10 @@
   600.4 +$ \textbf{svn log -r9653}
   600.5 +------------------------------------------------------------------------
   600.6 +r9653 | sean.hefty | 2006-09-27 14:39:55 -0700 (Wed, 27 Sep 2006) | 5 lines
   600.7 +
   600.8 +On reporting a route error, also include the status for the error,
   600.9 +rather than indicating a status of 0 when an error has occurred.
  600.10 +
  600.11 +Signed-off-by: Sean Hefty <sean.hefty@intel.com>
  600.12 +
  600.13 +------------------------------------------------------------------------
   601.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   601.2 +++ b/ja/examples/template.svnstyle.simplest.out	Sun Aug 16 03:41:39 2009 +0200
   601.3 @@ -0,0 +1,4 @@
   601.4 +$ \textbf{cat svn.style}
   601.5 +changeset = "\{node|short\}\textbackslash{}n"
   601.6 +$ \textbf{hg log -r1 --style svn.style}
   601.7 +
   602.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   602.2 +++ b/ja/examples/template.svnstyle.style.out	Sun Aug 16 03:41:39 2009 +0200
   602.3 @@ -0,0 +1,3 @@
   602.4 +$ \textbf{cat svn.style}
   602.5 +header = '------------------------------------------------------------------------\textbackslash{}n\textbackslash{}n'
   602.6 +changeset = svn.template
   603.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   603.2 +++ b/ja/examples/template.svnstyle.syntax.error.out	Sun Aug 16 03:41:39 2009 +0200
   603.3 @@ -0,0 +1,2 @@
   603.4 +$ \textbf{hg log -r1 --style broken.style}
   603.5 +abort: broken.style:1: parse error
   604.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   604.2 +++ b/ja/examples/template.svnstyle.syntax.input.out	Sun Aug 16 03:41:39 2009 +0200
   604.3 @@ -0,0 +1,2 @@
   604.4 +$ \textbf{cat broken.style}
   604.5 +changeset =
   605.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   605.2 +++ b/ja/examples/template.svnstyle.template.out	Sun Aug 16 03:41:39 2009 +0200
   605.3 @@ -0,0 +1,6 @@
   605.4 +$ \textbf{cat svn.template}
   605.5 +r\{rev\} | \{author|user\} | \{date|isodate\} (\{date|rfc822date\})
   605.6 +
   605.7 +\{desc|strip|fill76\}
   605.8 +
   605.9 +------------------------------------------------------------------------
   606.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   606.2 +++ b/ja/examples/tour	Sun Aug 16 03:41:39 2009 +0200
   606.3 @@ -0,0 +1,178 @@
   606.4 +#!/bin/bash
   606.5 +
   606.6 +#$ name: version
   606.7 +
   606.8 +hg version
   606.9 +
  606.10 +#$ name: help
  606.11 +
  606.12 +hg help init
  606.13 +
  606.14 +#$ name: clone
  606.15 +
  606.16 +hg clone http://hg.serpentine.com/tutorial/hello
  606.17 +
  606.18 +#$ name: ls
  606.19 +#$ ignore: ^drwx.*
  606.20 +#$ ignore: ^total \d+
  606.21 +
  606.22 +ls -l
  606.23 +ls hello
  606.24 +
  606.25 +#$ name: ls-a
  606.26 +
  606.27 +cd hello
  606.28 +ls -a
  606.29 +
  606.30 +#$ name: log
  606.31 +
  606.32 +hg log
  606.33 +
  606.34 +#$ name: log-r
  606.35 +
  606.36 +hg log -r 3
  606.37 +hg log -r ff5d7b70a2a9
  606.38 +hg log -r 1 -r 4
  606.39 +
  606.40 +#$ name: log.range
  606.41 +
  606.42 +hg log -r 2:4
  606.43 +
  606.44 +#$ name: log-v
  606.45 +
  606.46 +hg log -v -r 3
  606.47 +
  606.48 +#$ name: log-vp
  606.49 +
  606.50 +hg log -v -p -r 2
  606.51 +
  606.52 +#$ name: reclone
  606.53 +
  606.54 +cd ..
  606.55 +hg clone hello my-hello
  606.56 +cd my-hello
  606.57 +
  606.58 +#$ name: sed
  606.59 +
  606.60 +sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c
  606.61 +
  606.62 +#$ name: status
  606.63 +
  606.64 +ls
  606.65 +hg status
  606.66 +
  606.67 +#$ name: diff
  606.68 +
  606.69 +hg diff
  606.70 +
  606.71 +#$ name:
  606.72 +
  606.73 +export HGEDITOR='echo Added an extra line of output >'
  606.74 +
  606.75 +#$ name: commit
  606.76 +
  606.77 +hg commit
  606.78 +
  606.79 +#$ name: tip
  606.80 +
  606.81 +hg tip -vp
  606.82 +
  606.83 +#$ name: clone-pull
  606.84 +
  606.85 +cd ..
  606.86 +hg clone hello hello-pull
  606.87 +
  606.88 +#$ name: incoming
  606.89 +
  606.90 +cd hello-pull
  606.91 +hg incoming ../my-hello
  606.92 +
  606.93 +#$ name: pull
  606.94 +
  606.95 +hg tip
  606.96 +hg pull ../my-hello
  606.97 +hg tip
  606.98 +
  606.99 +#$ name: update
 606.100 +
 606.101 +grep printf hello.c
 606.102 +hg update tip
 606.103 +grep printf hello.c
 606.104 +
 606.105 +#$ name: parents
 606.106 +
 606.107 +hg parents
 606.108 +
 606.109 +#$ name: older
 606.110 +
 606.111 +hg update 2
 606.112 +hg parents
 606.113 +hg update
 606.114 +
 606.115 +#$ name: clone-push
 606.116 +
 606.117 +cd ..
 606.118 +hg clone hello hello-push
 606.119 +
 606.120 +#$ name: outgoing
 606.121 +
 606.122 +cd my-hello
 606.123 +hg outgoing ../hello-push
 606.124 +
 606.125 +#$ name: push
 606.126 +
 606.127 +hg push ../hello-push
 606.128 +
 606.129 +#$ name: push.nothing
 606.130 +
 606.131 +hg push ../hello-push
 606.132 +
 606.133 +#$ name: outgoing.net
 606.134 +
 606.135 +hg outgoing http://hg.serpentine.com/tutorial/hello
 606.136 +
 606.137 +#$ name: push.net
 606.138 +
 606.139 +hg push http://hg.serpentine.com/tutorial/hello
 606.140 +
 606.141 +#$ name: merge.clone
 606.142 +
 606.143 +cd ..
 606.144 +hg clone hello my-new-hello
 606.145 +cd my-new-hello
 606.146 +sed -i '/printf/i\\tprintf("once more, hello.\\n");' hello.c
 606.147 +hg commit -m 'A new hello for a new day.'
 606.148 +
 606.149 +#$ name: merge.cat
 606.150 +
 606.151 +cat hello.c
 606.152 +cat ../my-hello/hello.c
 606.153 +
 606.154 +#$ name: merge.pull
 606.155 +
 606.156 +hg pull ../my-hello
 606.157 +
 606.158 +#$ name: merge.heads
 606.159 +
 606.160 +hg heads
 606.161 +
 606.162 +#$ name: merge.update
 606.163 +
 606.164 +hg update
 606.165 +
 606.166 +#$ name: merge.merge
 606.167 +
 606.168 +hg merge
 606.169 +
 606.170 +#$ name: merge.parents
 606.171 +
 606.172 +hg parents
 606.173 +cat hello.c
 606.174 +
 606.175 +#$ name: merge.commit
 606.176 +
 606.177 +hg commit -m 'Merged changes'
 606.178 +
 606.179 +#$ name: merge.tip
 606.180 +
 606.181 +hg tip
   607.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   607.2 +++ b/ja/examples/tour-merge-conflict	Sun Aug 16 03:41:39 2009 +0200
   607.3 @@ -0,0 +1,72 @@
   607.4 +#!/bin/bash
   607.5 +
   607.6 +hg init scam
   607.7 +cd scam
   607.8 +
   607.9 +#$ name: wife
  607.10 +
  607.11 +cat > letter.txt <<EOF
  607.12 +Greetings!
  607.13 +
  607.14 +I am Mariam Abacha, the wife of former
  607.15 +Nigerian dictator Sani Abacha.
  607.16 +EOF
  607.17 +
  607.18 +hg add letter.txt
  607.19 +hg commit -m '419 scam, first draft'
  607.20 +
  607.21 +#$ name: cousin
  607.22 +
  607.23 +cd ..
  607.24 +hg clone scam scam-cousin
  607.25 +cd scam-cousin
  607.26 +
  607.27 +cat > letter.txt <<EOF
  607.28 +Greetings!
  607.29 +
  607.30 +I am Shehu Musa Abacha, cousin to the former
  607.31 +Nigerian dictator Sani Abacha.
  607.32 +EOF
  607.33 +
  607.34 +hg commit -m '419 scam, with cousin'
  607.35 +
  607.36 +#$ name: son
  607.37 +
  607.38 +cd ..
  607.39 +hg clone scam scam-son
  607.40 +cd scam-son
  607.41 +
  607.42 +cat > letter.txt <<EOF
  607.43 +Greetings!
  607.44 +
  607.45 +I am Alhaji Abba Abacha, son of the former
  607.46 +Nigerian dictator Sani Abacha.
  607.47 +EOF
  607.48 +
  607.49 +hg commit -m '419 scam, with son'
  607.50 +
  607.51 +#$ name: pull
  607.52 +
  607.53 +cd ..
  607.54 +hg clone scam-cousin scam-merge
  607.55 +cd scam-merge
  607.56 +hg pull -u ../scam-son
  607.57 +
  607.58 +#$ name: merge
  607.59 +#$ ignore: [<>]{7} /tmp/.*
  607.60 +
  607.61 +export HGMERGE=merge
  607.62 +hg merge
  607.63 +cat letter.txt
  607.64 +
  607.65 +#$ name: commit
  607.66 +
  607.67 +cat > letter.txt <<EOF
  607.68 +Greetings!
  607.69 +
  607.70 +I am Bryan O'Sullivan, no relation of the former
  607.71 +Nigerian dictator Sani Abacha.
  607.72 +EOF
  607.73 +
  607.74 +hg commit -m 'Send me your money'
  607.75 +hg tip
   608.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   608.2 +++ b/ja/examples/tour-merge-conflict.commit.out	Sun Aug 16 03:41:39 2009 +0200
   608.3 @@ -0,0 +1,15 @@
   608.4 +$ \textbf{cat > letter.txt <<EOF}
   608.5 +> \textbf{Greetings!}
   608.6 +> \textbf{I am Bryan O'Sullivan, no relation of the former}
   608.7 +> \textbf{Nigerian dictator Sani Abacha.}
   608.8 +> \textbf{EOF}
   608.9 +$ \textbf{hg commit -m 'Send me your money'}
  608.10 +$ \textbf{hg tip}
  608.11 +changeset:   
  608.12 +tag:         tip
  608.13 +parent:      
  608.14 +parent:      
  608.15 +user:        Bryan O'Sullivan <bos@serpentine.com>
  608.16 +
  608.17 +summary:     Send me your money
  608.18 +
   609.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   609.2 +++ b/ja/examples/tour-merge-conflict.cousin.out	Sun Aug 16 03:41:39 2009 +0200
   609.3 @@ -0,0 +1,10 @@
   609.4 +$ \textbf{cd ..}
   609.5 +$ \textbf{hg clone scam scam-cousin}
   609.6 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   609.7 +$ \textbf{cd scam-cousin}
   609.8 +$ \textbf{cat > letter.txt <<EOF}
   609.9 +> \textbf{Greetings!}
  609.10 +> \textbf{I am Shehu Musa Abacha, cousin to the former}
  609.11 +> \textbf{Nigerian dictator Sani Abacha.}
  609.12 +> \textbf{EOF}
  609.13 +$ \textbf{hg commit -m '419 scam, with cousin'}
   610.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   610.2 +++ b/ja/examples/tour-merge-conflict.merge.out	Sun Aug 16 03:41:39 2009 +0200
   610.3 @@ -0,0 +1,17 @@
   610.4 +$ \textbf{export HGMERGE=merge}
   610.5 +$ \textbf{hg merge}
   610.6 +merging letter.txt
   610.7 +merge: warning: conflicts during merge
   610.8 +merging letter.txt failed!
   610.9 +0 files updated, 0 files merged, 0 files removed, 1 files unresolved
  610.10 +There are unresolved merges, you can redo the full merge using:
  610.11 +  hg update -C 1
  610.12 +  hg merge 2
  610.13 +$ \textbf{cat letter.txt}
  610.14 +Greetings!
  610.15 +
  610.16 +I am Shehu Musa Abacha, cousin to the former
  610.17 +=======
  610.18 +I am Alhaji Abba Abacha, son of the former
  610.19 +
  610.20 +Nigerian dictator Sani Abacha.
   611.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   611.2 +++ b/ja/examples/tour-merge-conflict.pull.out	Sun Aug 16 03:41:39 2009 +0200
   611.3 @@ -0,0 +1,13 @@
   611.4 +$ \textbf{cd ..}
   611.5 +$ \textbf{hg clone scam-cousin scam-merge}
   611.6 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   611.7 +$ \textbf{cd scam-merge}
   611.8 +$ \textbf{hg pull -u ../scam-son}
   611.9 +pulling from ../scam-son
  611.10 +searching for changes
  611.11 +adding changesets
  611.12 +adding manifests
  611.13 +adding file changes
  611.14 +added 1 changesets with 1 changes to 1 files (+1 heads)
  611.15 +not updating, since new heads added
  611.16 +(run 'hg heads' to see heads, 'hg merge' to merge)
   612.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   612.2 +++ b/ja/examples/tour-merge-conflict.son.out	Sun Aug 16 03:41:39 2009 +0200
   612.3 @@ -0,0 +1,10 @@
   612.4 +$ \textbf{cd ..}
   612.5 +$ \textbf{hg clone scam scam-son}
   612.6 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   612.7 +$ \textbf{cd scam-son}
   612.8 +$ \textbf{cat > letter.txt <<EOF}
   612.9 +> \textbf{Greetings!}
  612.10 +> \textbf{I am Alhaji Abba Abacha, son of the former}
  612.11 +> \textbf{Nigerian dictator Sani Abacha.}
  612.12 +> \textbf{EOF}
  612.13 +$ \textbf{hg commit -m '419 scam, with son'}
   613.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   613.2 +++ b/ja/examples/tour-merge-conflict.wife.out	Sun Aug 16 03:41:39 2009 +0200
   613.3 @@ -0,0 +1,7 @@
   613.4 +$ \textbf{cat > letter.txt <<EOF}
   613.5 +> \textbf{Greetings!}
   613.6 +> \textbf{I am Mariam Abacha, the wife of former}
   613.7 +> \textbf{Nigerian dictator Sani Abacha.}
   613.8 +> \textbf{EOF}
   613.9 +$ \textbf{hg add letter.txt}
  613.10 +$ \textbf{hg commit -m '419 scam, first draft'}
   614.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   614.2 +++ b/ja/examples/tour.clone-pull.out	Sun Aug 16 03:41:39 2009 +0200
   614.3 @@ -0,0 +1,3 @@
   614.4 +$ \textbf{cd ..}
   614.5 +$ \textbf{hg clone hello hello-pull}
   614.6 +2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   615.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   615.2 +++ b/ja/examples/tour.clone-push.out	Sun Aug 16 03:41:39 2009 +0200
   615.3 @@ -0,0 +1,3 @@
   615.4 +$ \textbf{cd ..}
   615.5 +$ \textbf{hg clone hello hello-push}
   615.6 +2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   616.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   616.2 +++ b/ja/examples/tour.clone.out	Sun Aug 16 03:41:39 2009 +0200
   616.3 @@ -0,0 +1,8 @@
   616.4 +$ \textbf{hg clone http://hg.serpentine.com/tutorial/hello}
   616.5 +destination directory: hello
   616.6 +requesting all changes
   616.7 +adding changesets
   616.8 +adding manifests
   616.9 +adding file changes
  616.10 +added 5 changesets with 5 changes to 2 files
  616.11 +2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   617.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   617.2 +++ b/ja/examples/tour.commit.out	Sun Aug 16 03:41:39 2009 +0200
   617.3 @@ -0,0 +1,1 @@
   617.4 +$ \textbf{hg commit}
   618.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   618.2 +++ b/ja/examples/tour.diff.out	Sun Aug 16 03:41:39 2009 +0200
   618.3 @@ -0,0 +1,11 @@
   618.4 +$ \textbf{hg diff}
   618.5 +diff -r  hello.c
   618.6 +
   618.7 +
   618.8 +@@ -8,5 +8,6 @@ int main(int argc, char **argv)
   618.9 + int main(int argc, char **argv)
  618.10 + \{
  618.11 + 	printf("hello, world!\textbackslash{}");
  618.12 ++	printf("hello again!\textbackslash{}n");
  618.13 + 	return 0;
  618.14 + \}
   619.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   619.2 +++ b/ja/examples/tour.help.out	Sun Aug 16 03:41:39 2009 +0200
   619.3 @@ -0,0 +1,20 @@
   619.4 +$ \textbf{hg help init}
   619.5 +hg init [-e CMD] [--remotecmd CMD] [DEST]
   619.6 +
   619.7 +create a new repository in the given directory
   619.8 +
   619.9 +    Initialize a new repository in the given directory.  If the given
  619.10 +    directory does not exist, it is created.
  619.11 +
  619.12 +    If no directory is given, the current directory is used.
  619.13 +
  619.14 +    It is possible to specify an ssh:// URL as the destination.
  619.15 +    Look at the help text for the pull command for important details
  619.16 +    about ssh:// URLs.
  619.17 +
  619.18 +options:
  619.19 +
  619.20 + -e --ssh        specify ssh command to use
  619.21 +    --remotecmd  specify hg command to run on the remote side
  619.22 +
  619.23 +use "hg -v help init" to show global options
   620.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   620.2 +++ b/ja/examples/tour.incoming.out	Sun Aug 16 03:41:39 2009 +0200
   620.3 @@ -0,0 +1,10 @@
   620.4 +$ \textbf{cd hello-pull}
   620.5 +$ \textbf{hg incoming ../my-hello}
   620.6 +comparing with ../my-hello
   620.7 +searching for changes
   620.8 +changeset:   
   620.9 +tag:         tip
  620.10 +user:        Bryan O'Sullivan <bos@serpentine.com>
  620.11 +
  620.12 +summary:     Added an extra line of output
  620.13 +
   621.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   621.2 +++ b/ja/examples/tour.log-r.out	Sun Aug 16 03:41:39 2009 +0200
   621.3 @@ -0,0 +1,24 @@
   621.4 +$ \textbf{hg log -r 3}
   621.5 +changeset:   
   621.6 +user:        Bryan O'Sullivan <bos@serpentine.com>
   621.7 +
   621.8 +summary:     Get make to generate the final binary from a .o file.
   621.9 +
  621.10 +$ \textbf{hg log -r }
  621.11 +changeset:   
  621.12 +user:        Bryan O'Sullivan <bos@serpentine.com>
  621.13 +
  621.14 +summary:     Get make to generate the final binary from a .o file.
  621.15 +
  621.16 +$ \textbf{hg log -r 1 -r 4}
  621.17 +changeset:   
  621.18 +user:        mpm@selenic.com
  621.19 +
  621.20 +summary:     Create a makefile
  621.21 +
  621.22 +changeset:   
  621.23 +tag:         tip
  621.24 +user:        Bryan O'Sullivan <bos@serpentine.com>
  621.25 +
  621.26 +summary:     Trim comments.
  621.27 +
   622.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   622.2 +++ b/ja/examples/tour.log-v.out	Sun Aug 16 03:41:39 2009 +0200
   622.3 @@ -0,0 +1,9 @@
   622.4 +$ \textbf{hg log -v -r 3}
   622.5 +changeset:   
   622.6 +user:        Bryan O'Sullivan <bos@serpentine.com>
   622.7 +
   622.8 +files:       Makefile
   622.9 +description:
  622.10 +Get make to generate the final binary from a .o file.
  622.11 +
  622.12 +
   623.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   623.2 +++ b/ja/examples/tour.log-vp.out	Sun Aug 16 03:41:39 2009 +0200
   623.3 @@ -0,0 +1,21 @@
   623.4 +$ \textbf{hg log -v -p -r 2}
   623.5 +changeset:   
   623.6 +user:        Bryan O'Sullivan <bos@serpentine.com>
   623.7 +
   623.8 +files:       hello.c
   623.9 +description:
  623.10 +Introduce a typo into hello.c.
  623.11 +
  623.12 +
  623.13 +diff -r  -r  hello.c
  623.14 +
  623.15 +
  623.16 +@@ -11,6 +11,6 @@
  623.17 + 
  623.18 + int main(int argc, char **argv)
  623.19 + \{
  623.20 +-	printf("hello, world!\textbackslash{}n");
  623.21 ++	printf("hello, world!\textbackslash{}");
  623.22 + 	return 0;
  623.23 + \}
  623.24 +
   624.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   624.2 +++ b/ja/examples/tour.log.out	Sun Aug 16 03:41:39 2009 +0200
   624.3 @@ -0,0 +1,27 @@
   624.4 +$ \textbf{hg log}
   624.5 +changeset:   
   624.6 +tag:         tip
   624.7 +user:        Bryan O'Sullivan <bos@serpentine.com>
   624.8 +
   624.9 +summary:     Trim comments.
  624.10 +
  624.11 +changeset:   
  624.12 +user:        Bryan O'Sullivan <bos@serpentine.com>
  624.13 +
  624.14 +summary:     Get make to generate the final binary from a .o file.
  624.15 +
  624.16 +changeset:   
  624.17 +user:        Bryan O'Sullivan <bos@serpentine.com>
  624.18 +
  624.19 +summary:     Introduce a typo into hello.c.
  624.20 +
  624.21 +changeset:   
  624.22 +user:        mpm@selenic.com
  624.23 +
  624.24 +summary:     Create a makefile
  624.25 +
  624.26 +changeset:   
  624.27 +user:        mpm@selenic.com
  624.28 +
  624.29 +summary:     Create a standard "hello, world" program
  624.30 +
   625.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   625.2 +++ b/ja/examples/tour.log.range.out	Sun Aug 16 03:41:39 2009 +0200
   625.3 @@ -0,0 +1,17 @@
   625.4 +$ \textbf{hg log -r 2:4}
   625.5 +changeset:   
   625.6 +user:        Bryan O'Sullivan <bos@serpentine.com>
   625.7 +
   625.8 +summary:     Introduce a typo into hello.c.
   625.9 +
  625.10 +changeset:   
  625.11 +user:        Bryan O'Sullivan <bos@serpentine.com>
  625.12 +
  625.13 +summary:     Get make to generate the final binary from a .o file.
  625.14 +
  625.15 +changeset:   
  625.16 +tag:         tip
  625.17 +user:        Bryan O'Sullivan <bos@serpentine.com>
  625.18 +
  625.19 +summary:     Trim comments.
  625.20 +
   626.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   626.2 +++ b/ja/examples/tour.ls-a.out	Sun Aug 16 03:41:39 2009 +0200
   626.3 @@ -0,0 +1,3 @@
   626.4 +$ \textbf{cd hello}
   626.5 +$ \textbf{ls -a}
   626.6 +.  ..  .hg  Makefile  hello.c
   627.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   627.2 +++ b/ja/examples/tour.ls.out	Sun Aug 16 03:41:39 2009 +0200
   627.3 @@ -0,0 +1,5 @@
   627.4 +$ \textbf{ls -l}
   627.5 +total 4
   627.6 +
   627.7 +$ \textbf{ls hello}
   627.8 +Makefile  hello.c
   628.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   628.2 +++ b/ja/examples/tour.merge.cat.out	Sun Aug 16 03:41:39 2009 +0200
   628.3 @@ -0,0 +1,28 @@
   628.4 +$ \textbf{cat hello.c}
   628.5 +/*
   628.6 + * Placed in the public domain by Bryan O'Sullivan.  This program is
   628.7 + * not covered by patents in the United States or other countries.
   628.8 + */
   628.9 +
  628.10 +#include <stdio.h>
  628.11 +
  628.12 +int main(int argc, char **argv)
  628.13 +\{
  628.14 +	printf("once more, hello.\textbackslash{}n");
  628.15 +	printf("hello, world!\textbackslash{}");
  628.16 +	return 0;
  628.17 +\}
  628.18 +$ \textbf{cat ../my-hello/hello.c}
  628.19 +/*
  628.20 + * Placed in the public domain by Bryan O'Sullivan.  This program is
  628.21 + * not covered by patents in the United States or other countries.
  628.22 + */
  628.23 +
  628.24 +#include <stdio.h>
  628.25 +
  628.26 +int main(int argc, char **argv)
  628.27 +\{
  628.28 +	printf("hello, world!\textbackslash{}");
  628.29 +	printf("hello again!\textbackslash{}n");
  628.30 +	return 0;
  628.31 +\}
   629.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   629.2 +++ b/ja/examples/tour.merge.clone.out	Sun Aug 16 03:41:39 2009 +0200
   629.3 @@ -0,0 +1,6 @@
   629.4 +$ \textbf{cd ..}
   629.5 +$ \textbf{hg clone hello my-new-hello}
   629.6 +2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   629.7 +$ \textbf{cd my-new-hello}
   629.8 +$ \textbf{sed -i '/printf/i\textbackslash{}\textbackslash{}tprintf("once more, hello.\textbackslash{}\textbackslash{}n");' hello.c}
   629.9 +$ \textbf{hg commit -m 'A new hello for a new day.'}
   630.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   630.2 +++ b/ja/examples/tour.merge.commit.out	Sun Aug 16 03:41:39 2009 +0200
   630.3 @@ -0,0 +1,1 @@
   630.4 +$ \textbf{hg commit -m 'Merged changes'}
   631.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   631.2 +++ b/ja/examples/tour.merge.heads.out	Sun Aug 16 03:41:39 2009 +0200
   631.3 @@ -0,0 +1,13 @@
   631.4 +$ \textbf{hg heads}
   631.5 +changeset:   
   631.6 +tag:         tip
   631.7 +parent:      
   631.8 +user:        Bryan O'Sullivan <bos@serpentine.com>
   631.9 +
  631.10 +summary:     Added an extra line of output
  631.11 +
  631.12 +changeset:   
  631.13 +user:        Bryan O'Sullivan <bos@serpentine.com>
  631.14 +
  631.15 +summary:     A new hello for a new day.
  631.16 +
   632.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   632.2 +++ b/ja/examples/tour.merge.merge.out	Sun Aug 16 03:41:39 2009 +0200
   632.3 @@ -0,0 +1,4 @@
   632.4 +$ \textbf{hg merge}
   632.5 +merging hello.c
   632.6 +0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   632.7 +(branch merge, don't forget to commit)
   633.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   633.2 +++ b/ja/examples/tour.merge.parents.out	Sun Aug 16 03:41:39 2009 +0200
   633.3 @@ -0,0 +1,28 @@
   633.4 +$ \textbf{hg parents}
   633.5 +changeset:   
   633.6 +user:        Bryan O'Sullivan <bos@serpentine.com>
   633.7 +
   633.8 +summary:     A new hello for a new day.
   633.9 +
  633.10 +changeset:   
  633.11 +tag:         tip
  633.12 +parent:      
  633.13 +user:        Bryan O'Sullivan <bos@serpentine.com>
  633.14 +
  633.15 +summary:     Added an extra line of output
  633.16 +
  633.17 +$ \textbf{cat hello.c}
  633.18 +/*
  633.19 + * Placed in the public domain by Bryan O'Sullivan.  This program is
  633.20 + * not covered by patents in the United States or other countries.
  633.21 + */
  633.22 +
  633.23 +#include <stdio.h>
  633.24 +
  633.25 +int main(int argc, char **argv)
  633.26 +\{
  633.27 +	printf("once more, hello.\textbackslash{}n");
  633.28 +	printf("hello, world!\textbackslash{}");
  633.29 +	printf("hello again!\textbackslash{}n");
  633.30 +	return 0;
  633.31 +\}
   634.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   634.2 +++ b/ja/examples/tour.merge.pull.out	Sun Aug 16 03:41:39 2009 +0200
   634.3 @@ -0,0 +1,8 @@
   634.4 +$ \textbf{hg pull ../my-hello}
   634.5 +pulling from ../my-hello
   634.6 +searching for changes
   634.7 +adding changesets
   634.8 +adding manifests
   634.9 +adding file changes
  634.10 +added 1 changesets with 1 changes to 1 files (+1 heads)
  634.11 +(run 'hg heads' to see heads, 'hg merge' to merge)
   635.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   635.2 +++ b/ja/examples/tour.merge.tip.out	Sun Aug 16 03:41:39 2009 +0200
   635.3 @@ -0,0 +1,9 @@
   635.4 +$ \textbf{hg tip}
   635.5 +changeset:   
   635.6 +tag:         tip
   635.7 +parent:      
   635.8 +parent:      
   635.9 +user:        Bryan O'Sullivan <bos@serpentine.com>
  635.10 +
  635.11 +summary:     Merged changes
  635.12 +
   636.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   636.2 +++ b/ja/examples/tour.merge.update.out	Sun Aug 16 03:41:39 2009 +0200
   636.3 @@ -0,0 +1,2 @@
   636.4 +$ \textbf{hg update}
   636.5 +abort: update spans branches, use 'hg merge' or 'hg update -C' to lose changes
   637.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   637.2 +++ b/ja/examples/tour.older.out	Sun Aug 16 03:41:39 2009 +0200
   637.3 @@ -0,0 +1,10 @@
   637.4 +$ \textbf{hg update 2}
   637.5 +2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   637.6 +$ \textbf{hg parents}
   637.7 +changeset:   
   637.8 +user:        Bryan O'Sullivan <bos@serpentine.com>
   637.9 +
  637.10 +summary:     Introduce a typo into hello.c.
  637.11 +
  637.12 +$ \textbf{hg update}
  637.13 +2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   638.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   638.2 +++ b/ja/examples/tour.outgoing.net.out	Sun Aug 16 03:41:39 2009 +0200
   638.3 @@ -0,0 +1,9 @@
   638.4 +$ \textbf{hg outgoing http://hg.serpentine.com/tutorial/hello}
   638.5 +comparing with http://hg.serpentine.com/tutorial/hello
   638.6 +searching for changes
   638.7 +changeset:   
   638.8 +tag:         tip
   638.9 +user:        Bryan O'Sullivan <bos@serpentine.com>
  638.10 +
  638.11 +summary:     Added an extra line of output
  638.12 +
   639.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   639.2 +++ b/ja/examples/tour.outgoing.out	Sun Aug 16 03:41:39 2009 +0200
   639.3 @@ -0,0 +1,10 @@
   639.4 +$ \textbf{cd my-hello}
   639.5 +$ \textbf{hg outgoing ../hello-push}
   639.6 +comparing with ../hello-push
   639.7 +searching for changes
   639.8 +changeset:   
   639.9 +tag:         tip
  639.10 +user:        Bryan O'Sullivan <bos@serpentine.com>
  639.11 +
  639.12 +summary:     Added an extra line of output
  639.13 +
   640.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   640.2 +++ b/ja/examples/tour.parents.out	Sun Aug 16 03:41:39 2009 +0200
   640.3 @@ -0,0 +1,7 @@
   640.4 +$ \textbf{hg parents}
   640.5 +changeset:   
   640.6 +tag:         tip
   640.7 +user:        Bryan O'Sullivan <bos@serpentine.com>
   640.8 +
   640.9 +summary:     Added an extra line of output
  640.10 +
   641.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   641.2 +++ b/ja/examples/tour.pull.out	Sun Aug 16 03:41:39 2009 +0200
   641.3 @@ -0,0 +1,22 @@
   641.4 +$ \textbf{hg tip}
   641.5 +changeset:   
   641.6 +tag:         tip
   641.7 +user:        Bryan O'Sullivan <bos@serpentine.com>
   641.8 +
   641.9 +summary:     Trim comments.
  641.10 +
  641.11 +$ \textbf{hg pull ../my-hello}
  641.12 +pulling from ../my-hello
  641.13 +searching for changes
  641.14 +adding changesets
  641.15 +adding manifests
  641.16 +adding file changes
  641.17 +added 1 changesets with 1 changes to 1 files
  641.18 +(run 'hg update' to get a working copy)
  641.19 +$ \textbf{hg tip}
  641.20 +changeset:   
  641.21 +tag:         tip
  641.22 +user:        Bryan O'Sullivan <bos@serpentine.com>
  641.23 +
  641.24 +summary:     Added an extra line of output
  641.25 +
   642.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   642.2 +++ b/ja/examples/tour.push.net.out	Sun Aug 16 03:41:39 2009 +0200
   642.3 @@ -0,0 +1,4 @@
   642.4 +$ \textbf{hg push http://hg.serpentine.com/tutorial/hello}
   642.5 +pushing to http://hg.serpentine.com/tutorial/hello
   642.6 +searching for changes
   642.7 +ssl required
   643.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   643.2 +++ b/ja/examples/tour.push.nothing.out	Sun Aug 16 03:41:39 2009 +0200
   643.3 @@ -0,0 +1,4 @@
   643.4 +$ \textbf{hg push ../hello-push}
   643.5 +pushing to ../hello-push
   643.6 +searching for changes
   643.7 +no changes found
   644.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   644.2 +++ b/ja/examples/tour.push.out	Sun Aug 16 03:41:39 2009 +0200
   644.3 @@ -0,0 +1,7 @@
   644.4 +$ \textbf{hg push ../hello-push}
   644.5 +pushing to ../hello-push
   644.6 +searching for changes
   644.7 +adding changesets
   644.8 +adding manifests
   644.9 +adding file changes
  644.10 +added 1 changesets with 1 changes to 1 files
   645.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   645.2 +++ b/ja/examples/tour.reclone.out	Sun Aug 16 03:41:39 2009 +0200
   645.3 @@ -0,0 +1,4 @@
   645.4 +$ \textbf{cd ..}
   645.5 +$ \textbf{hg clone hello my-hello}
   645.6 +2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   645.7 +$ \textbf{cd my-hello}
   646.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   646.2 +++ b/ja/examples/tour.sed.out	Sun Aug 16 03:41:39 2009 +0200
   646.3 @@ -0,0 +1,1 @@
   646.4 +$ \textbf{sed -i '/printf/a\textbackslash{}\textbackslash{}tprintf("hello again!\textbackslash{}\textbackslash{}n");' hello.c}
   647.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   647.2 +++ b/ja/examples/tour.status.out	Sun Aug 16 03:41:39 2009 +0200
   647.3 @@ -0,0 +1,4 @@
   647.4 +$ \textbf{ls}
   647.5 +Makefile  hello.c
   647.6 +$ \textbf{hg status}
   647.7 +M hello.c
   648.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   648.2 +++ b/ja/examples/tour.tip.out	Sun Aug 16 03:41:39 2009 +0200
   648.3 @@ -0,0 +1,21 @@
   648.4 +$ \textbf{hg tip -vp}
   648.5 +changeset:   
   648.6 +tag:         tip
   648.7 +user:        Bryan O'Sullivan <bos@serpentine.com>
   648.8 +
   648.9 +files:       hello.c
  648.10 +description:
  648.11 +Added an extra line of output
  648.12 +
  648.13 +
  648.14 +diff -r  -r  hello.c
  648.15 +
  648.16 +
  648.17 +@@ -8,5 +8,6 @@ int main(int argc, char **argv)
  648.18 + int main(int argc, char **argv)
  648.19 + \{
  648.20 + 	printf("hello, world!\textbackslash{}");
  648.21 ++	printf("hello again!\textbackslash{}n");
  648.22 + 	return 0;
  648.23 + \}
  648.24 +
   649.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   649.2 +++ b/ja/examples/tour.update.out	Sun Aug 16 03:41:39 2009 +0200
   649.3 @@ -0,0 +1,7 @@
   649.4 +$ \textbf{grep printf hello.c}
   649.5 +	printf("hello, world!\textbackslash{}");
   649.6 +$ \textbf{hg update tip}
   649.7 +1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   649.8 +$ \textbf{grep printf hello.c}
   649.9 +	printf("hello, world!\textbackslash{}");
  649.10 +	printf("hello again!\textbackslash{}n");
   650.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   650.2 +++ b/ja/examples/tour.version.out	Sun Aug 16 03:41:39 2009 +0200
   650.3 @@ -0,0 +1,6 @@
   650.4 +$ \textbf{hg version}
   650.5 +Mercurial Distributed SCM (version )
   650.6 +
   650.7 +Copyright (C) 2005-2007 Matt Mackall <mpm@selenic.com> and others
   650.8 +This is free software; see the source for copying conditions. There is NO
   650.9 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   651.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   651.2 +++ b/ja/feature-branches.dot	Sun Aug 16 03:41:39 2009 +0200
   651.3 @@ -0,0 +1,8 @@
   651.4 +digraph feature_branches {
   651.5 +	master -> crypto;
   651.6 +	master -> filesystems;
   651.7 +	master -> ipc;
   651.8 +	master -> memory;
   651.9 +	master -> network;
  651.10 +	master -> security;
  651.11 +}
   652.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   652.2 +++ b/ja/filelog.svg	Sun Aug 16 03:41:39 2009 +0200
   652.3 @@ -0,0 +1,371 @@
   652.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   652.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   652.6 +<svg
   652.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   652.8 +   xmlns:cc="http://web.resource.org/cc/"
   652.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  652.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  652.11 +   xmlns="http://www.w3.org/2000/svg"
  652.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  652.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  652.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  652.15 +   width="744.09448819"
  652.16 +   height="1052.3622047"
  652.17 +   id="svg2"
  652.18 +   sodipodi:version="0.32"
  652.19 +   inkscape:version="0.44.1"
  652.20 +   sodipodi:docname="filelog.svg">
  652.21 +  <defs
  652.22 +     id="defs4">
  652.23 +    <marker
  652.24 +       inkscape:stockid="Arrow1Mend"
  652.25 +       orient="auto"
  652.26 +       refY="0.0"
  652.27 +       refX="0.0"
  652.28 +       id="Arrow1Mend"
  652.29 +       style="overflow:visible;">
  652.30 +      <path
  652.31 +         id="path3128"
  652.32 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  652.33 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  652.34 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  652.35 +    </marker>
  652.36 +    <linearGradient
  652.37 +       id="linearGradient2887">
  652.38 +      <stop
  652.39 +         style="stop-color:#91cfcf;stop-opacity:1;"
  652.40 +         offset="0"
  652.41 +         id="stop2889" />
  652.42 +      <stop
  652.43 +         style="stop-color:aqua;stop-opacity:0;"
  652.44 +         offset="1"
  652.45 +         id="stop2891" />
  652.46 +    </linearGradient>
  652.47 +    <linearGradient
  652.48 +       id="linearGradient2795">
  652.49 +      <stop
  652.50 +         style="stop-color:#ccc;stop-opacity:1;"
  652.51 +         offset="0"
  652.52 +         id="stop2797" />
  652.53 +      <stop
  652.54 +         style="stop-color:#ccc;stop-opacity:0;"
  652.55 +         offset="1"
  652.56 +         id="stop2799" />
  652.57 +    </linearGradient>
  652.58 +    <linearGradient
  652.59 +       inkscape:collect="always"
  652.60 +       xlink:href="#linearGradient2795"
  652.61 +       id="linearGradient3170"
  652.62 +       gradientUnits="userSpaceOnUse"
  652.63 +       gradientTransform="translate(121.2183,94.95434)"
  652.64 +       x1="81.322357"
  652.65 +       y1="404.34424"
  652.66 +       x2="201.52036"
  652.67 +       y2="373.03967" />
  652.68 +    <linearGradient
  652.69 +       inkscape:collect="always"
  652.70 +       xlink:href="#linearGradient2887"
  652.71 +       id="linearGradient3172"
  652.72 +       gradientUnits="userSpaceOnUse"
  652.73 +       gradientTransform="translate(0,12)"
  652.74 +       x1="62.634491"
  652.75 +       y1="503.3392"
  652.76 +       x2="248.49242"
  652.77 +       y2="462.94327" />
  652.78 +    <linearGradient
  652.79 +       inkscape:collect="always"
  652.80 +       xlink:href="#linearGradient2795"
  652.81 +       id="linearGradient3174"
  652.82 +       gradientUnits="userSpaceOnUse"
  652.83 +       gradientTransform="matrix(1.001035,0,0,0.653159,236.7075,153.0415)"
  652.84 +       x1="81.322357"
  652.85 +       y1="404.34424"
  652.86 +       x2="201.52036"
  652.87 +       y2="373.03967" />
  652.88 +    <linearGradient
  652.89 +       inkscape:collect="always"
  652.90 +       xlink:href="#linearGradient2887"
  652.91 +       id="linearGradient3176"
  652.92 +       gradientUnits="userSpaceOnUse"
  652.93 +       gradientTransform="translate(0,12)"
  652.94 +       x1="62.634491"
  652.95 +       y1="503.3392"
  652.96 +       x2="248.49242"
  652.97 +       y2="462.94327" />
  652.98 +    <linearGradient
  652.99 +       inkscape:collect="always"
 652.100 +       xlink:href="#linearGradient2795"
 652.101 +       id="linearGradient3208"
 652.102 +       gradientUnits="userSpaceOnUse"
 652.103 +       gradientTransform="matrix(1.001035,0,0,0.653159,236.7075,153.0415)"
 652.104 +       x1="81.322357"
 652.105 +       y1="404.34424"
 652.106 +       x2="201.52036"
 652.107 +       y2="373.03967" />
 652.108 +    <linearGradient
 652.109 +       inkscape:collect="always"
 652.110 +       xlink:href="#linearGradient2887"
 652.111 +       id="linearGradient3210"
 652.112 +       gradientUnits="userSpaceOnUse"
 652.113 +       gradientTransform="translate(0,12)"
 652.114 +       x1="62.634491"
 652.115 +       y1="503.3392"
 652.116 +       x2="248.49242"
 652.117 +       y2="462.94327" />
 652.118 +    <linearGradient
 652.119 +       inkscape:collect="always"
 652.120 +       xlink:href="#linearGradient2795"
 652.121 +       id="linearGradient3212"
 652.122 +       gradientUnits="userSpaceOnUse"
 652.123 +       gradientTransform="translate(121.2183,94.95434)"
 652.124 +       x1="81.322357"
 652.125 +       y1="404.34424"
 652.126 +       x2="201.52036"
 652.127 +       y2="373.03967" />
 652.128 +    <linearGradient
 652.129 +       inkscape:collect="always"
 652.130 +       xlink:href="#linearGradient2887"
 652.131 +       id="linearGradient3214"
 652.132 +       gradientUnits="userSpaceOnUse"
 652.133 +       gradientTransform="translate(0,12)"
 652.134 +       x1="62.634491"
 652.135 +       y1="503.3392"
 652.136 +       x2="248.49242"
 652.137 +       y2="462.94327" />
 652.138 +    <linearGradient
 652.139 +       inkscape:collect="always"
 652.140 +       xlink:href="#linearGradient2795"
 652.141 +       id="linearGradient3256"
 652.142 +       gradientUnits="userSpaceOnUse"
 652.143 +       gradientTransform="translate(121.2183,94.95434)"
 652.144 +       x1="81.322357"
 652.145 +       y1="404.34424"
 652.146 +       x2="201.52036"
 652.147 +       y2="373.03967" />
 652.148 +    <linearGradient
 652.149 +       inkscape:collect="always"
 652.150 +       xlink:href="#linearGradient2887"
 652.151 +       id="linearGradient3258"
 652.152 +       gradientUnits="userSpaceOnUse"
 652.153 +       gradientTransform="translate(0,12)"
 652.154 +       x1="62.634491"
 652.155 +       y1="503.3392"
 652.156 +       x2="248.49242"
 652.157 +       y2="462.94327" />
 652.158 +    <linearGradient
 652.159 +       inkscape:collect="always"
 652.160 +       xlink:href="#linearGradient2795"
 652.161 +       id="linearGradient3260"
 652.162 +       gradientUnits="userSpaceOnUse"
 652.163 +       gradientTransform="matrix(1.001035,0,0,0.653159,236.7075,153.0415)"
 652.164 +       x1="81.322357"
 652.165 +       y1="404.34424"
 652.166 +       x2="201.52036"
 652.167 +       y2="373.03967" />
 652.168 +    <linearGradient
 652.169 +       inkscape:collect="always"
 652.170 +       xlink:href="#linearGradient2887"
 652.171 +       id="linearGradient3262"
 652.172 +       gradientUnits="userSpaceOnUse"
 652.173 +       gradientTransform="translate(0,12)"
 652.174 +       x1="62.634491"
 652.175 +       y1="503.3392"
 652.176 +       x2="248.49242"
 652.177 +       y2="462.94327" />
 652.178 +  </defs>
 652.179 +  <sodipodi:namedview
 652.180 +     id="base"
 652.181 +     pagecolor="#ffffff"
 652.182 +     bordercolor="#666666"
 652.183 +     borderopacity="1.0"
 652.184 +     gridtolerance="10000"
 652.185 +     guidetolerance="10"
 652.186 +     objecttolerance="10"
 652.187 +     inkscape:pageopacity="0.0"
 652.188 +     inkscape:pageshadow="2"
 652.189 +     inkscape:zoom="0.98994949"
 652.190 +     inkscape:cx="455.8122"
 652.191 +     inkscape:cy="520"
 652.192 +     inkscape:document-units="px"
 652.193 +     inkscape:current-layer="layer1"
 652.194 +     inkscape:window-width="906"
 652.195 +     inkscape:window-height="620"
 652.196 +     inkscape:window-x="5"
 652.197 +     inkscape:window-y="49" />
 652.198 +  <metadata
 652.199 +     id="metadata7">
 652.200 +    <rdf:RDF>
 652.201 +      <cc:Work
 652.202 +         rdf:about="">
 652.203 +        <dc:format>image/svg+xml</dc:format>
 652.204 +        <dc:type
 652.205 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 652.206 +      </cc:Work>
 652.207 +    </rdf:RDF>
 652.208 +  </metadata>
 652.209 +  <g
 652.210 +     inkscape:label="Layer 1"
 652.211 +     inkscape:groupmode="layer"
 652.212 +     id="layer1">
 652.213 +    <rect
 652.214 +       style="opacity:1;fill:#abadf8;fill-opacity:1;stroke:#595959;stroke-width:0.86781615;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 652.215 +       id="rect3180"
 652.216 +       width="234.48758"
 652.217 +       height="199.13225"
 652.218 +       x="322.67767"
 652.219 +       y="351.75531" />
 652.220 +    <rect
 652.221 +       style="opacity:1;fill:#a2f69c;fill-opacity:1;stroke:#595959;stroke-width:0.86781615;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 652.222 +       id="rect3178"
 652.223 +       width="234.48756"
 652.224 +       height="199.13223"
 652.225 +       x="72.664886"
 652.226 +       y="351.75531" />
 652.227 +    <g
 652.228 +       id="g3144"
 652.229 +       transform="translate(34,0.71578)">
 652.230 +      <g
 652.231 +         id="g2940">
 652.232 +        <rect
 652.233 +           style="fill:url(#linearGradient3260);fill-opacity:1;stroke:black;stroke-width:0.80860078;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 652.234 +           id="rect2914"
 652.235 +           width="185.04932"
 652.236 +           height="39.587399"
 652.237 +           x="311.53635"
 652.238 +           y="395.04291" />
 652.239 +        <text
 652.240 +           xml:space="preserve"
 652.241 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 652.242 +           x="323.72824"
 652.243 +           y="416.7626"
 652.244 +           id="text2918"><tspan
 652.245 +             sodipodi:role="line"
 652.246 +             id="tspan2920"
 652.247 +             x="323.72824"
 652.248 +             y="416.7626"
 652.249 +             style="font-family:Courier">.hg/data/README.i</tspan></text>
 652.250 +      </g>
 652.251 +      <g
 652.252 +         transform="translate(3.79093e-5,-80.1853)"
 652.253 +         id="g2945">
 652.254 +        <g
 652.255 +           id="g2955">
 652.256 +          <rect
 652.257 +             y="475.44327"
 652.258 +             x="63.134491"
 652.259 +             height="39.395935"
 652.260 +             width="184.85793"
 652.261 +             id="rect2947"
 652.262 +             style="fill:url(#linearGradient3262);fill-opacity:1;stroke:black;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 652.263 +          <text
 652.264 +             id="text2949"
 652.265 +             y="498.35123"
 652.266 +             x="75.230644"
 652.267 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 652.268 +             xml:space="preserve"><tspan
 652.269 +               style="font-family:Courier"
 652.270 +               y="498.35123"
 652.271 +               x="75.230644"
 652.272 +               id="tspan2951"
 652.273 +               sodipodi:role="line">README</tspan></text>
 652.274 +        </g>
 652.275 +      </g>
 652.276 +      <path
 652.277 +         inkscape:connection-end="#g2940"
 652.278 +         inkscape:connection-start="#g2945"
 652.279 +         inkscape:connector-type="polyline"
 652.280 +         id="path2960"
 652.281 +         d="M 248.49245,414.91131 L 311.13205,414.88123"
 652.282 +         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 652.283 +    </g>
 652.284 +    <g
 652.285 +       id="g3156"
 652.286 +       transform="translate(34,0.71578)">
 652.287 +      <g
 652.288 +         transform="translate(116,0)"
 652.289 +         id="g2831">
 652.290 +        <rect
 652.291 +           style="fill:url(#linearGradient3256);fill-opacity:1;stroke:black;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 652.292 +           id="rect1906"
 652.293 +           width="184.85793"
 652.294 +           height="60.609138"
 652.295 +           x="195.96959"
 652.296 +           y="465.46356" />
 652.297 +        <g
 652.298 +           id="g2803"
 652.299 +           transform="translate(-0.893671,1.833581)">
 652.300 +          <text
 652.301 +             id="text1884"
 652.302 +             y="483.92801"
 652.303 +             x="208.95944"
 652.304 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 652.305 +             xml:space="preserve"><tspan
 652.306 +               style="font-family:Courier"
 652.307 +               y="483.92801"
 652.308 +               x="208.95944"
 652.309 +               id="tspan1886"
 652.310 +               sodipodi:role="line">.hg/data/src/hello.c.d</tspan></text>
 652.311 +          <text
 652.312 +             id="text1888"
 652.313 +             y="507.79309"
 652.314 +             x="208.95944"
 652.315 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 652.316 +             xml:space="preserve"><tspan
 652.317 +               style="font-family:Courier"
 652.318 +               y="507.79309"
 652.319 +               x="208.95944"
 652.320 +               id="tspan1890"
 652.321 +               sodipodi:role="line">.hg/data/src/hello.c.i</tspan></text>
 652.322 +        </g>
 652.323 +      </g>
 652.324 +      <g
 652.325 +         id="g2907">
 652.326 +        <rect
 652.327 +           style="fill:url(#linearGradient3258);fill-opacity:1;stroke:black;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 652.328 +           id="rect2843"
 652.329 +           width="184.85793"
 652.330 +           height="39.395935"
 652.331 +           x="63.134491"
 652.332 +           y="475.44327" />
 652.333 +        <text
 652.334 +           xml:space="preserve"
 652.335 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 652.336 +           x="75.230644"
 652.337 +           y="498.35123"
 652.338 +           id="text2847"><tspan
 652.339 +             sodipodi:role="line"
 652.340 +             id="tspan2849"
 652.341 +             x="75.230644"
 652.342 +             y="498.35123"
 652.343 +             style="font-family:Courier">src/hello.c</tspan></text>
 652.344 +      </g>
 652.345 +      <path
 652.346 +         inkscape:connection-end="#g2831"
 652.347 +         inkscape:connection-start="#g2907"
 652.348 +         inkscape:connector-type="polyline"
 652.349 +         id="path2962"
 652.350 +         d="M 248.49242,495.37535 L 311.46959,495.53401"
 652.351 +         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 652.352 +    </g>
 652.353 +    <text
 652.354 +       xml:space="preserve"
 652.355 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 652.356 +       x="96.476799"
 652.357 +       y="373.96353"
 652.358 +       id="text3216"><tspan
 652.359 +         sodipodi:role="line"
 652.360 +         id="tspan3218"
 652.361 +         x="96.476799"
 652.362 +         y="373.96353">Working directory</tspan></text>
 652.363 +    <text
 652.364 +       xml:space="preserve"
 652.365 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 652.366 +       x="344.92493"
 652.367 +       y="373.96353"
 652.368 +       id="text3228"><tspan
 652.369 +         sodipodi:role="line"
 652.370 +         id="tspan3230"
 652.371 +         x="344.92493"
 652.372 +         y="373.96353">Repository</tspan></text>
 652.373 +  </g>
 652.374 +</svg>
   653.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   653.2 +++ b/ja/filenames.tex	Sun Aug 16 03:41:39 2009 +0200
   653.3 @@ -0,0 +1,414 @@
   653.4 +\chapter{File names and pattern matching}
   653.5 +\label{chap:names}
   653.6 +
   653.7 +Mercurial $B$O!"(B
   653.8 +$B0l4S@-$HI=8=NO$r7s$MHw$($?J}K!$G%U%!%$%kL>$r07$&;EAH$_$rDs6!$7$F$$$^$9!#(B
   653.9 +
  653.10 +\section{Simple file naming}
  653.11 +
  653.12 +Mercurial $B$O(B
  653.13 +``under the hood''$B$K$*$$$F!"(B
  653.14 +$B%U%!%$%kL>$r<h$j07$&E}0l$5$l$?;EAH$_$rMQ$$$F$$$^$9!#(B
  653.15 +$B%U%!%$%kL>$K4X$9$kA4$F$N%3%^%s%I$N5sF0$OE}0l$5$l$F$$$^$9!#(B
  653.16 +$B%U%!%$%kL>$KBP$9$k%3%^%s%I$N5sF0$O!"0J2<$N$h$&$K$J$C$F$$$^$9!#(B
  653.17 +
  653.18 +$B%3%^%s%I9T$G<B%U%!%$%kL>$rL@<(E*$K;XDj$7$?>l9g!"(B
  653.19 +Mercurial $B$O;XDj$5$l$?%U%!%$%kL>$K87L)$K:nMQ$7$^$9!#(B
  653.20 +
  653.21 +\interaction{filenames.files}
  653.22 +
  653.23 +$B%G%#%l%/%H%jL>$r;XDj$7$?>l9g!"(B
  653.24 +Mercurial $B$O$=$N;XDj$r!"(B
  653.25 +``$BEv3:%G%#%l%/%H%j$J$i$S$K%5%V%G%#%l%/%H%jCf$NA4$F$N%U%!%$%k(B''
  653.26 +$B$H$_$J$7$^$9!#(B
  653.27 +Mercurial $B$OEv3:%G%#%l%/%H%jG[2<$N%U%!%$%k!&%5%V%G%#%l%/%H%j$r!"(B
  653.28 +$B%"%k%U%!%Y%C%H=g$KAv::$7$^$9!#(B
  653.29 +$B$"$k%G%#%l%/%H%j$NAv::Cf$K%5%V%G%#%l%/%H%j$KAx6x$7$?>l9g!"(B
  653.30 +$BEv3:%G%#%l%/%H%j$NAv::$h$j$b@h$K!"(B
  653.31 +$B%5%V%G%#%l%/%H%j$NAv::$r<B;\$7$^$9(B\footnote{$BLuCm(B: $B?<$5M%@h!J(Bdepth first$B!K(B}$B!#(B
  653.32 +
  653.33 +\interaction{filenames.dirs}
  653.34 +
  653.35 +\section{Running commands without any file names}
  653.36 +
  653.37 +$B%U%!%$%kL>$r0z?t$K<h$k(B Mercurial $B%3%^%s%I$O!"(B
  653.38 +$B0z?t$J$$$7%Q%?!<%s;XDjL5$7$G5/F0$5$l$?>l9g$b!"(B
  653.39 +$BM-MQ$J4pDl;~F0:n$,Dj$a$i$l$F$$$^$9!#(B
  653.40 +$B%3%^%s%I$K4|BT$5$l$k?6$kIq$$$O!"(B
  653.41 +$B%3%^%s%I$NMQES$K0MB8$7$^$9!#(B
  653.42 +$B%U%!%$%kL>;XDjL5$7$N5/F0$K$*$$$F!"(B
  653.43 +$B%3%^%s%I$,$I$N$h$&$K?6Iq$&$N$+$r?dB,$9$k$?$a$N!"(B
  653.44 +$B0lHLE*$JL\0B$H$J$k4v$D$+$N%k!<%k$r0J2<$K<($7$^$9!#(B
  653.45 +
  653.46 +\begin{itemize}
  653.47 +\item $BKX$I$N%3%^%s%I$O:n6HNN0h%G%#%l%/%H%jA4BN$K:nMQ$7$^$9!#(B
  653.48 +  $BNc$($P!"(B\hgcmd{add} $B%3%^%s%I$J$I$,$=$&$G$9!#(B
  653.49 +
  653.50 +\item $BI|5l$,:$Fq$"$k$$$OIT2DG=$J:nMQ$r5Z$\$9%3%^%s%I$N>l9g!"(B
  653.51 +  $B>/$J$/$H$b#1$D0J>e$NL>A0$J$$$7%Q%?!<%s!J8e=R$7$^$9!K(B
  653.52 +  $B$NL@<(E*$J;XDj$r5a$a$kH&$G$9!#(B
  653.53 +  $B$3$N5sF0$K$h$j!"(B
  653.54 +  $BNc$($P0z?tL5$7$N(B \hgcmd{remove} $B5/F0$N$h$&$J!"(B
  653.55 +  $BITN8$N;vBV$K$h$k%U%!%$%k$N:o=|Ey$rKI$0$3$H$,$G$-$^$9!#(B
  653.56 +
  653.57 +\end{itemize}
  653.58 +
  653.59 +$B$3$N?6$kIq$$$,$=$0$o$J$$>u67$G$"$l$P!"(B
  653.60 +$B4JC1$K?6$kIq$$$rJQ$($k$3$H$,$G$-$^$9!#(B
  653.61 +$B:n6HNN0h%G%#%l%/%H%jA4BN$K:nMQ$9$k%3%^%s%I$G$"$l$P!"(B
  653.62 +``\dirname{.}'' $B$r;XDj$9$k$3$H$G!"(B
  653.63 +$B%3%^%s%I$N:nMQ$r8=:_$N%G%#%l%/%H%j$*$h$S$=$NG[2<$K8BDj$9$k$3$H$,$G$-$^$9!#(B
  653.64 +
  653.65 +\interaction{filenames.wdir-subdir}
  653.66 +
  653.67 +$B%k!<%H0J30$N%G%#%l%/%H%j$G%3%^%s%I$r<B9T$7$?>l9g$G$b!"(B
  653.68 +$B%j%]%8%H%j$N%k!<%H$KBP$9$kAjBPE*$J%U%!%$%kL>$rI=<($9$k%3%^%s%I$b$"$j$^$9!#(B
  653.69 +$B$3$N$h$&$J%3%^%s%I$O!"(B
  653.70 +$BL@<(E*$JL>A0$r;XDj$9$k$3$H$G!"(B
  653.71 +$B8=:_$N%G%#%l%/%H%j0LCV$KBP$9$kAjBPE*$J%U%!%$%kL>$rI=<($9$k$h$&$K$J$j$^$9!#(B
  653.72 +$BHs%k!<%H%G%#%l%/%H%j$G$N(B \hgcmd{status} $B5/F0$N:]$K(B
  653.73 +\hgcmd{root} $B%3%^%s%I$N=PNO$r;XDj$9$k$3$H$G!"(B
  653.74 +$BBP>]$r:n6HNN0h%G%#%l%/%H%jA4BN$K0];}$7$?$^$^!"(B
  653.75 +$B8=:_$N%G%#%l%/%H%j0LCV$KBP$9$kAjBPE*$J%U%!%$%kL>$rI=<($5$;$k$3$H$,$G$-$^$9!#(B
  653.76 +
  653.77 +\interaction{filenames.wdir-relname}
  653.78 +
  653.79 +\section{Telling you what's going on}
  653.80 +
  653.81 +$B@h$N@a$K$*$1$k(B \hgcmd{add} $B%3%^%s%I<B9TNc$O!"(B
  653.82 +Mercurial $B%3%^%s%I$K4X$9$k$b$&0l$D$NM-1W$J;vJA$r<($7$F$$$^$9!#(B
  653.83 +$B%3%^%s%I9T$GL@<(E*$J;XDj$r$7$F$$$J$$%U%!%$%k$KBP$7$F%3%^%s%I$,:nMQ$9$k>l9g!"(B
  653.84 +$BDL>o$OBP>]%U%!%$%kL>$rI=<($7$^$9$N$G!"(B
  653.85 +$B;W$o$L%3%^%s%I$N<B9T7k2L$K8e$+$i6C$+$5$l$k$3$H$O$"$j$^$;$s!#(B
  653.86 +
  653.87 +$B$3$l$O(B\emph{$B6C$-$r:G>.(B}$B$K$9$k86B'$KB'$C$?$b$N$G$9!#(B
  653.88 +$B%3%^%s%I9T$G87L)$J%U%!%$%kL>$r;XDj$7$?>l9g$K$O!"(B
  653.89 +$B$=$l$rI|>'$9$kI,MW$OL5$$$G$7$g$&!#(B
  653.90 +$B%U%!%$%kL>!&%G%#%l%/%H%jL>$J$$$7%Q%?!<%s!J8e=R$7$^$9!K(B
  653.91 +$B$r;XDj$7$J$$$3$H$G(B\emph{$B0E$K;XDj$5$l$?(B}$BBP>]%U%!%$%k$K(B
  653.92 +Mercurial $B$,:nMQ$9$k>l9g!"(B
  653.93 +$B$I$N%U%!%$%k$rBP>]$H$9$k$N$+$rDLCN$9$k$N$O0BA4@-$N>e$GM-MQ$G$9!#(B
  653.94 +
  653.95 +$B>e5-J}?K$K1h$C$F?6Iq$&%3%^%s%I72$O!"(B
  653.96 +\hggopt{-q} $B%*%W%7%g%s$r;XDj$9$k$3$H$G!"(B
  653.97 +$B$=$N=PNO$rM^;_$9$k$3$H$,$G$-$^$9!#(B
  653.98 +$BL@<(E*$K%U%!%$%kL>Ey$r;XDj$7$?>l9g$G$b!"(B
  653.99 +\hggopt{-v} $B%*%W%7%g%s$r;XDj$9$k$3$H$G!"(B
 653.100 +$BA4$F$NBP>]%U%!%$%kL>$rI=<($5$;$k$3$H$,$G$-$^$9!#(B
 653.101 +
 653.102 +\section{Using patterns to identify files}
 653.103 +
 653.104 +$B%U%!%$%kL>!&%G%#%l%/%H%jL>$K$h$k;XDj$K2C$($F!"(B
 653.105 +Mercurial $B$G$O(B\emph{$B%Q%?!<%s(B}$B$K$h$k%U%!%$%k;XDj5!G=$,;HMQ$G$-$^$9!#(B
 653.106 +Mercurial $B$N%Q%?!<%sA`:n$OI=8=NO$KIY$s$@$b$N$G$9!#(B
 653.107 +
 653.108 +Linux $B$d(B MacOS $B$N$h$&$J(B Unix $BE*%7%9%F%`$G$O!"(B
 653.109 +$B%U%!%$%kL>$H%Q%?!<%s$H$N4V$NFM9g$;$ODL>o%7%'%k$,$=$NLrL\$rIi$$$^$9!#(B
 653.110 +$B$3$l$i$N%7%9%F%`$G$O!"(B
 653.111 +$B%Q%?!<%s$r;XDj$7$F$$$k;]$r(B 
 653.112 +Mercurial $B$KBP$7$FL@<(E*$K;X<($9$kI,MW$,$"$j$^$9(B\footnote{$BLuCm(B:
 653.113 +$B%7%'%k$K$h$kFC<lJ8;zE83+$NM^;_$NOC$G$"$l$P!"(B
 653.114 +``Mercurial $B$KBP$7$F(B''$B$G$O$J$/!"(B
 653.115 +``$B%7%'%k$KBP$7$F(B''$B$J$N$G$O!)(B
 653.116 +$B$=$l$H$b(B Windows $B%P%$%J%jHG$G$O?6$kIq$$$,0[$J$k!)(B}$B!#(B
 653.117 +Windows $B$K$*$$$F$O!"(B
 653.118 +$B%7%'%k$K$h$k%Q%?!<%s$NE83+$,9T$o$l$^$;$s$N$G!"(B
 653.119 +Mercurial $B$O<+F0E*$K;XDj$5$l$?$b$N$,%Q%?!<%s$G$"$k$HG'<1$7!"(B
 653.120 +$B%U%!%$%kL>$X$HE83+$7$^$9!#(B
 653.121 +
 653.122 +$B%3%^%s%I9T$K$*$$$F!"(B
 653.123 +$B%U%!%$%kL>$r;XDj$9$k>l=j$G%Q%?!<%s$r;HMQ$9$k$K$O!"(B
 653.124 +$B0J2<$N$h$&$K5-=R$7$^$9!#(B
 653.125 +
 653.126 +\begin{codesample2}
 653.127 +  syntax:patternbody
 653.128 +\end{codesample2}
 653.129 +
 653.130 +$B%Q%?!<%s$N5-=R$O!"(B
 653.131 +$B%Q%?!<%s$N<oN`$r<1JL$9$k$?$a$NC;$$J8;zNs!"%3%m%s!"(B
 653.132 +$B$=$7$F<B:]$N%Q%?!<%s$rO"7k$7$?$b$N$G$9!#(B
 653.133 +
 653.134 +Mercurial $B$O#2<oN`$N%Q%?!<%s7A<0$KBP1~$7$F$$$^$9!#(B
 653.135 +$B:G$bMxMQIQEY$,9b$$$b$N$O(B \texttt{glob} $B$H8F$P$l!"(B
 653.136 +Unix $B$N%7%'%k$K$h$k%Q%?!<%s%^%C%A%s%0$HF1MM$N5!G=$r;}$D$b$N$G!"(B
 653.137 +$B$=$N?6$kIq$$$O(B Windows $B$N%3%^%s%I%W%m%s%W%H%f!<%6$K$bFk@w$_$,$"$k$3$H$G$7$g$&!#(B
 653.138 +
 653.139 +Windows $B$K$*$$$F(B
 653.140 +Mercurial $B$,<+F0E*$K%Q%?!<%s%^%C%A%s%0$r9T$&>l9g!"(B
 653.141 +\texttt{glob} $B7A<0$H$_$J$5$l$^$9!#(B
 653.142 +$B$=$N$?$a!"(B
 653.143 +Windows $B$K$*$$$F$O(B ``\texttt{glob:}'' $B@\F,<-$r>JN,2DG=$G$9$,!"(B
 653.144 +$BL@<(E*$K;XDj$9$k$3$H$b2DG=$G$9!#(B
 653.145 +
 653.146 +\texttt{re} $B7A<0$O!"(B
 653.147 +\texttt{glob} $B7A<0$h$j$b6/NO$G!"(B
 653.148 +regexps $B$H$7$F$bCN$i$l$k@55,I=8=$r;HMQ$7$?%Q%?!<%s$N5-=R$,2DG=$G$9!#(B
 653.149 +
 653.150 +$B$A$J$_$K!"0J9_$NNc$G$O!"(B
 653.151 +$BA4$F$N%Q%?!<%s;XDj$rCm0U?<$/0zMQId$G0O$`$3$H$G!"(B
 653.152 +Mercurial $B$N=hM}$NA0$K%7%'%k$K$h$C$FE83+$5$l$F$7$^$&$3$H$rKI$$$G$$$k!"(B
 653.153 +$B$H$$$&E@$KCm0U$7$F$/$@$5$$!#(B
 653.154 +
 653.155 +\subsection{Shell-style \texttt{glob} patterns}
 653.156 +
 653.157 +\texttt{glob} $B7A<0$K$h$k%^%C%A%s%0$N:]$K!"(B
 653.158 +$B;HMQ2DG=$J%Q%?!<%s$K$D$$$F$N35MW$r0J2<$K<($7$^$9!#(B
 653.159 +
 653.160 +$B%Q%?!<%s(B ``\texttt{*}'' $B$O!"(B
 653.161 +$BF10l%G%#%l%/%H%jFb$GG$0U$NJ8;zNs$K9gCW$7$^$9!#(B
 653.162 +
 653.163 +\interaction{filenames.glob.star}
 653.164 +
 653.165 +$B%Q%?!<%s(B ``\texttt{**}'' $B$O!"(B
 653.166 +$B%G%#%l%/%H%j6-3&$rD6$($FG$0U$NJ8;zNs$K9gCW$7$^$9!#(B
 653.167 +$B$3$N%Q%?!<%s$O(B Unix $B$K$*$1$kI8=`E*$J$b$N$G$O$"$j$^$;$s$,!"(B
 653.168 +$B4v$D$+$NCxL>$J%7%'%k<BAu$G:NMQ$5$l$F$*$j!"(B
 653.169 +$BHs>o$KJXMx$G$9!#(B
 653.170 +
 653.171 +\interaction{filenames.glob.starstar}
 653.172 +
 653.173 +$B%Q%?!<%s(B ``\texttt{?}'' $B$O!"(B
 653.174 +$BC10l$NJ8;z$K9gCW$7$^$9!#(B
 653.175 +
 653.176 +\interaction{filenames.glob.question}
 653.177 +
 653.178 +$B%Q%?!<%s(B ``\texttt{[}'' $B$O!"(B
 653.179 +\emph{$BJ8;z=89g(B}$B!J(Bcharacter class$B!K$N3+;O$r0UL#$7$^$9!#(B
 653.180 +$B$3$N%Q%?!<%s$OEv3:=89g$KB0$9$kG$0U$N0lJ8;z$K9gCW$7$^$9!#(B
 653.181 +$B=89g;XDj$O(B ``\texttt{]}'' $B$K$h$C$F=*N;$7$^$9!#(B
 653.182 +$B=89g;XDj$K$O!"(B
 653.183 +``\texttt{abcdef}'' $B$N>JN,;XDj$G$"$k(B
 653.184 +``\texttt{a-f}'' $B7A<0$N(B\emph{$BHO0O(B}$B;XDj$r!"(B
 653.185 +$BJ#?t4^$a$k$3$H$,2DG=$G$9!#(B
 653.186 +
 653.187 +\interaction{filenames.glob.range}
 653.188 +
 653.189 +$BJ8;z=89g;XDj$K$*$$$F(B
 653.190 +``\texttt{[}'' $B$ND>8e$NJ8;z$,(B ``\texttt{!}'' \footnote{$BLuCm(B:
 653.191 +$B@55,I=8=$K$*$1$k(B ``\texttt{\^}'' $B$K$h$kH?E>$H0[$J$kE@$KCm0U(B}$B$N>l9g!"(B
 653.192 +$B=89g;XDj$O(B\emph{$BH?E>(B}$B$5$l!"(B
 653.193 +$B=89g$KB0$5$J$$G$0U$N0lJ8;z$K9gCW$7$^$9!#(B
 653.194 +
 653.195 +$B%Q%?!<%s(B ``\texttt{\{}'' $B$O%5%V%Q%?!<%s$N%0%k!<%W2=$N3+;O$r0UL#$7!"(B
 653.196 +$B%0%k!<%WCf$N2?$l$+$N%5%V%Q%?!<%s$,9gCW$7$?>l9g$O!"(B
 653.197 +$B%0%k!<%WA4BN$,9gCW$7$?$b$N$H$_$J$5$l$^$9!#(B
 653.198 +$B%0%k!<%W;XDj$K$*$1$k%5%V%Q%?!<%s$N6h@Z$j$K$O(B
 653.199 +``\texttt{,}'' $B$,;HMQ$5$l!"(B
 653.200 +``\texttt{\}}'' $B$,%0%k!<%W$N=*N;$r0UL#$7$^$9!#(B
 653.201 +
 653.202 +\interaction{filenames.glob.group}
 653.203 +
 653.204 +\subsubsection{Watch out!}
 653.205 +
 653.206 +$BG$0U$N%G%#%l%/%H%j$K$*$1$k%Q%?!<%s9gCW$,I,MW$J>l9g$O!"(B
 653.207 +$BC10l%G%#%l%/%H%jFb$G$N%^%C%A%s%0$7$+9T$o$J$$(B
 653.208 +``\texttt{*}'' $B$r;HMQ$9$Y$-$G$OL5$$!"(B
 653.209 +$B$H$$$&E@$OK:$l$J$$$h$&$K$7$F$/$@$5$$!#(B
 653.210 +``\texttt{*}'' $B$NBe$o$j$K(B ``\texttt{**}'' $B$r;HMQ$7$^$7$g$&!#(B
 653.211 +$BN><T$N0c$$$r0J2<$G@bL@$7$^$9!#(B
 653.212 +
 653.213 +\interaction{filenames.glob.star-starstar}
 653.214 +
 653.215 +\subsection{Regular expression matching with \texttt{re} patterns}
 653.216 +
 653.217 +Mercurial $B$O!J(BPython $B$NFbItE*$J@55,I=8=%(%s%8%s$rMxMQ$7$F$$$k$N$G!K(B
 653.218 +Python $B$,<u$1IU$1$k$N$HF1$8@55,I=8=$r<u$1IU$1$^$9!#(B
 653.219 +$B$3$N@55,I=8=$O(B Perl $B$N@55,I=8=J8K!$r4p$K$7$F$*$j!"(B
 653.220 +$B:G$bB?MQ$5$l$F$$$k!JNc$($P(B Java $B$G$b;HMQ$5$l$F$$$^$9!KJ}8@$G$9!#(B
 653.221 +
 653.222 +$B@55,I=8=%Q%?!<%s$O$=$l$[$IB?MQ$5$l$k$b$N$G$O$J$$$N$G!"(B
 653.223 +Mercurial $B$N@55,I=8=$N>\:Y$K4X$7$F$3$3$G$O@bL@$7$^$;$s!#(B
 653.224 +Perl $B7A<0$N@55,I=8=$OMM!9$J7A<0$G!"(B
 653.225 +$BB?$/$N%&%'%V%5%$%H$d=PHGJ*$K$*$$$FM>$9=jL5$/@bL@$5$l$F$$$^$9!#(B
 653.226 +$B$=$NBe$o$j$3$3$G$O!"(B
 653.227 +Mercurial $B$G@55,I=8=$r;HMQ$9$kI,MW$KGw$i$l$?:]$K!"(B
 653.228 +$BCN$C$F$*$/$Y$-4v$D$+$N;vJA$K$D$$$F@bL@$7$h$&$H$*$b$$$^$9!#(B
 653.229 +
 653.230 +$B@55,I=8=$O!"(B
 653.231 +$B%j%]%8%H%j%k!<%H$+$i$NAjBPE*$J%U%!%$%kL>A4BN$KBP$7$FE,MQ$5$l$^$9!#(B
 653.232 +$B8@$$49$($k$J$i!"(B
 653.233 +\dirname{foo} $B%5%V%G%#%l%/%H%j$G:n6H$7$F$$$k>l9g$G$b!"(B
 653.234 +$B$3$N%G%#%l%/%H%jG[2<$N%U%!%$%k$KBP$7$F%^%C%A%s%0$r9T$&$J$i!"(B
 653.235 +$B;XDj$9$k%Q%?!<%s$O(B
 653.236 +``\texttt{foo/}'' $B$G;O$^$C$F$$$J$1$l$P$J$j$^$;$s!#(B
 653.237 +
 653.238 +Perl $B7A<0$N@55,I=8=$KFk@w$s$G$$$k>l9g!"(B
 653.239 +Mercurial $B$N@55,I=8=$O(B \emph{rooted} $B$G$"$kE@$KCm0U$7$F$/$@$5$$(B\footnote{$BLuCm(B: 
 653.240 +$B0EL[$N$&$A$K(B ``\texttt{\^}'' $B$,IUM?$5$l$k!"$HM}2r$9$l$PNI$$$G$7$g$&!#(B}$B!#(B
 653.241 +$B@55,I=8=$OJ8;zNs@hF,$+$i%^%C%A%s%0$r<B;\$7$^$9$N$G!"(B
 653.242 +$BJ8;zNsESCf$KBP$9$k%^%C%A%s%0$O9T$o$l$^$;$s!#(B
 653.243 +$BG$0U$N0LCV$KBP$7$F%^%C%A%s%0$r<B;\$5$;$?$$>l9g!"(B
 653.244 +$B%Q%?!<%s$N5-=R$r(B ``\texttt{.*}'' $B$G;O$a$kI,MW$,$"$j$^$9!#(B
 653.245 +
 653.246 +\section{Filtering files}
 653.247 +
 653.248 +Mercurial $B$,B?MM$JJ}K!$rDs6!$7$F$$$k$b$N$O!"(B
 653.249 +$B%U%!%$%k$N;XDjJ}K!$@$1$G$O$"$j$^$;$s!#(B
 653.250 +Mercurial $B$O(B\emph{$B%U%#%k%?(B}$B$K$h$k%U%!%$%kA*JL$N5!G=$bDs6!$7$F$$$^$9!#(B
 653.251 +$B%U%!%$%kL>;XDj$r<u$1IU$1$k%3%^%s%I$O!"(B
 653.252 +$B0J2<$N#2$D$N%U%#%k%?%j%s%0%*%W%7%g%s$b<u$1IU$1$^$9!#(B
 653.253 +
 653.254 +\begin{itemize}
 653.255 +\item \hggopt{-I} $B$J$$$7(B \hggopt{--include} $B$K$h$j!"(B
 653.256 +  $B9gCW$7$?%U%!%$%k$N$_$r=hM}BP>]$H$_$J$9%Q%?!<%s$r;XDj$G$-$^$9!#(B
 653.257 +
 653.258 +\item \hggopt{-X} $B$J$$$7(B \hggopt{--exclude} $B$K$h$j!"(B
 653.259 +  $B9gCW$7$?%U%!%$%k$r=hM}BP>]$+$i(B\emph{$B=|30(B}$B$9$k%Q%?!<%s$r;XDj$G$-$^$9!#(B
 653.260 +
 653.261 +\end{itemize}
 653.262 +
 653.263 +$BJ#?t$N(B \hggopt{-I} $B$*$h$S(B \hggopt{-X} $B%*%W%7%g%s$r!"(B
 653.264 +$B%3%^%s%I9T$G9%$-$J$h$&$K:.:_$5$;$k$3$H$,$G$-$^$9!#(B
 653.265 +Mercurial $B$N4pDlF0$O!"(B
 653.266 +$B;XDj$5$l$?%Q%?!<%s$r(B ``\texttt{glob}'' $B7A<0$H$_$J$7$F2r<a$7$^$9(B
 653.267 +$B!JI,MW$G$"$l$PL@<(E*$K(B ``\texttt{glob}'' $B$r;XDj$9$k$3$H$b2DG=$G$9!K!#(B
 653.268 +
 653.269 +\hggopt{-I} $B%U%#%k%?$O!"(B
 653.270 +``$B9gCW$7$?%U%!%$%k$N$_$r=hM}BP>]$H$9$k(B''
 653.271 +$B$b$N$H2r<a$9$l$PNI$$$G$7$g$&!#(B
 653.272 +
 653.273 +\interaction{filenames.filter.include}
 653.274 +
 653.275 +\hggopt{-X} $B%U%#%k%?$O!"(B
 653.276 +``$B9gCW$7$J$$$b$N$r=hM}BP>]$H$9$k(B''
 653.277 +$B$b$N$H2r<a$9$k$3$H$,$G$-$^$9!#(B
 653.278 +
 653.279 +\interaction{filenames.filter.exclude}
 653.280 +
 653.281 +\section{Ignoring unwanted files and directories}
 653.282 +
 653.283 +$B"((B $B86J8L$9F(B
 653.284 +
 653.285 +\section{Case sensitivity}
 653.286 +\label{sec:names:case}
 653.287 +
 653.288 +Linux$B!J$J$$$7B>$N(B Unix $B7O(B OS$B!K$H!"(B
 653.289 +MacOS $B$J$$$7(B Windows $B$,:.:_$9$k3+H/4D6-$G:n6H$9$k>l9g!"(B
 653.290 +$B%U%!%$%kL>$K$*$1$kJ8;z$NBg>.!J(B``N'' $B$H(B ``n''$B!K$N07$$J}?K$,A4$/0[$J$k!"(B
 653.291 +$B$H$$$&CN<1$r?4$KN1$a$F$*$/I,MW$,$"$j$^$9!#(B
 653.292 +$BNI$/$"$k;v$G$OL5$$$+$b$7$l$^$;$s$7!"(B
 653.293 +$BMF0W$K2r7h$G$-$k2DG=@-$b$"$j$^$9$,!"(B
 653.294 +$BCN$i$J$$>u67$GAx6x$7$?>l9g!"(B
 653.295 +$BHs>o$K6C$+$5$l$kLdBj$G$b$"$j$^$9!#(B
 653.296 +
 653.297 +OS $B$*$h$S%U%!%$%k%7%9%F%`$K1~$8$F!"(B
 653.298 +$B%U%!%$%k$*$h$S%G%#%l%/%H%jL>$N(B\emph{$BJ8;z$NBg>.(B}$B$N07$$$O0[$J$j$^$9!#(B
 653.299 +$BL>A0$K$*$1$kJ8;z$NBg>.$N0lHLE*$J07$$J}$r!"(B
 653.300 +$B0J2<$K#3$D<($7$^$9!#(B
 653.301 +
 653.302 +\begin{itemize}
 653.303 +\item $B40A4$KJ8;z$NBg>.$rL5;k(B:
 653.304 +  $B%U%!%$%k$N@8@.$*$h$S$=$N8e$N07$$$K$*$$$F!"(B
 653.305 +  $BJ8;z$NBgJ8;z!&>.J8;z$OF1$8$b$N$H$7$F07$o$l$^$9!#(B
 653.306 +  $B8E$$(B DOS $BIw$N%7%9%F%`$G0lHLE*$J07$$J}$G$9!#(B
 653.307 +
 653.308 +\item $BJ8;z$NBg>.$OJ];}$5$l$k$,L5;k(B:
 653.309 +  $B%U%!%$%k$J$$$7%G%#%l%/%H%j@8@.$N:]$K$O!"(B
 653.310 +  $BL>A0$K$*$1$kJ8;z$NBg>.$OJ]B8$5$l!"(B
 653.311 +  OS $B$K$h$k8!:w$dI=<($,2DG=$G$9!#(B
 653.312 +  $BB8:_$9$k%U%!%$%k$,8!:w$5$l$k>l9g!"J8;z$NBg>.$OL5;k$5$l$^$9!#(B
 653.313 +  Windows $B$d(B MacOS $B$G$OI8=`E*$J;EMM$G$9!#(B
 653.314 +  \filename{foo} $B$H(B \filename{FoO} $B$OF1$8%U%!%$%k$H$_$J$5$l$^$9!#(B
 653.315 +  $BBgJ8;z$H>.J8;z$N8_49@-$"$k07$$$O!"(B
 653.316 +  \emph{$B%1!<%9%U%)!<%k%G%#%s%0(B}$B!J(Bcase folding$B!K$H$b8F$P$l$^$9!#(B
 653.317 +
 653.318 +\item $BJ8;z$NBg>.$r6hJL(B:
 653.319 +  $BL>A0$K$*$1$kJ8;z$NBg>.$O>o$K0UL#$r;}$A$^$9!#(B
 653.320 +  \filename{foo} $B$H(B \filename{FoO} $B$O0[$J$k%U%!%$%k$H$7$F6hJL$5$l$^$9!#(B
 653.321 +  $B$3$l$O(B Linux $B$d(B Unix $B$K$*$1$kDL>o$N?6$kIq$$$G$9!#(B
 653.322 +
 653.323 +\end{itemize}
 653.324 +
 653.325 +Unix $BE*$J%7%9%F%`$N>e$G$O!"(B
 653.326 +$B>e5-$NBgJ8;z!&>.J8;z$N<h$j07$$7A<0$N$&$A$N(B``$BG$0U(B''$B$N$b$N$,(B
 653.327 +$B!J$"$k$$$OA4$F$,F1;~$K!KMW5a$5$l$k2DG=@-$,$"$j$^$9!#(B
 653.328 +$BNc$($P!"(B
 653.329 +FAT32 $B%U%!%$%k%7%9%F%`$G%U%)!<%^%C%H$5$l$?(B
 653.330 +USB $B>.7?%a%b%j%b%8%e!<%k$r(B Linux $B$G;HMQ$9$k>l9g!"(B
 653.331 +$B$=$N%U%!%$%k%7%9%F%`>e$G$N(B Linux $B$N?6$kIq$$$O!"(B
 653.332 +$BJ8;z$NBg>.$OJ];}$7$D$DL5;k$9$k$b$N$H$J$j$^$9!#(B
 653.333 +
 653.334 +\subsection{Safe, portable repository storage}
 653.335 +
 653.336 +Mercurial $B$N%j%]%8%H%j3JG<5!G=$O!"(B
 653.337 +$BJ8;zBg>.$N6hJL$N2DH]$K(B\emph{$B1F6A$r<u$1$^$;$s(B}$B!#(B
 653.338 +$B%j%]%8%H%j$NJ]B8@h%U%!%$%kL>$O85%U%!%$%kL>$rJQ49$7$?$b$N$J$N$G!"(B
 653.339 +$B%U%!%$%k%7%9%F%`$K$*$1$kBgJ8;z>.J8;z$N6hJL$N2DH]$K4X$o$jL5$/!"(B
 653.340 +$B9=@.4IM}>pJs$r3JG<$G$-$^$9!#(B
 653.341 +$B$D$^$j!"(BOS $B$NI8=`E*$JJ#@=%D!<%k$r;HMQ$7$F!"(B
 653.342 +Mercurial $B$N%j%]%8%H%j$rNc$($P(B USB $B>.7?%a%b%j%b%8%e!<%k$KJ#@=$7!"(B
 653.343 +Mac$B!"(BWindows PC $B$*$h$S(B Linux $B$N4V$G;}$A1?$V$3$H$,$G$-$^$9!#(B
 653.344 +
 653.345 +\subsection{Detecting case conflicts}
 653.346 +
 653.347 +$B:n6HNN0h%G%#%l%/%H%j$K$*$1$kA`:n$N:]$K$O!"(B
 653.348 +Mercurial $B$O:n6HNN0h$r:\$;$F$$$k%U%!%$%k%7%9%F%`$NL?L>J}?K$K=>$$$^$9!#(B
 653.349 +$B%U%!%$%k%7%9%F%`$,J8;z$NBg>.$OJ];}$7$D$DL5;k$9$k$b$N$G$"$C$?>l9g!"(B
 653.350 +$BJ8;z$NBg>.$N$_$,0[$J$kL>A0$r(B Mercurial $B$OF1$8$b$N$H$_$J$7$^$9!#(B
 653.351 +
 653.352 +$B$3$NJ}?K$N=EMW$JE@$O!"(B
 653.353 +$BJ8;zBg>.$r6hJL$9$k!J0lHLE*$J(B Linux $B$d(B Unix $B$K$*$1$k!K(B
 653.354 +$B%U%!%$%k%7%9%F%`$K$*$$$F!"(B
 653.355 +$BJ8;zBg>.$r6hJL$G$-$J$$!J(BWindows $B$d(B MacOS $B$N!K(B
 653.356 +$B%f!<%6$,<h$j07$($J$$$h$&$J%A%'%s%8%;%C%H$r%3%_%C%H$9$k$3$H$,2DG=$G$"$kE@$G$9!#(B
 653.357 +Linux $B$NMxMQ<T$,(B
 653.358 +\filename{myfile.c} $B$H(B
 653.359 +\filename{MyFile.C} 
 653.360 +$B$H$$$&L>A0$N#2$D$N%U%!%$%k$KBP$9$kJQ99$r%3%_%C%H$7$?>l9g!"(B
 653.361 +$BJQ99FbMF$O%j%]%8%H%j$K@5$7$/J]B8$5$l$^$9!#(B
 653.362 +$BB>$N(B Linux $BMxMQ<T$N:n6HNN0h%G%#%l%/%H%j$K$*$$$F$b!"(B
 653.363 +$B$3$l$i$N%U%!%$%k$O0[$J$k%U%!%$%k$H$7$F@5$7$/B8:_$7$^$9!#(B
 653.364 +
 653.365 +Mercurial $B$N%j%]%8%H%j3JG<5!9=$,J8;zBg>.$N07$$$N2DH]$K1F6A$r<u$1$J$$$?$a!"(B
 653.366 +Windows $B$J$$$7(B MacOS $BMxMQ<T$,$3$NJQ99$r<h$j9~$s$G$b!"(B
 653.367 +$B:G=i$OLdBj$,H/@8$7$^$;$s!#(B
 653.368 +$B$7$+$7!"(B
 653.369 +$B:n6HNN0h%G%#%l%/%H%j$rEv3:%A%'%s%8%;%C%H$G(B \hgcmd{update}
 653.370 +$B$7$h$&$H$7$?>l9g!"(B
 653.371 +$B$"$k$$$OEv3:%A%'%s%8%;%C%H$H(B
 653.372 +\hgcmd{merge} $B$7$h$&$H$7$?>l9g!"(B
 653.373 +$B%U%!%$%k%7%9%F%`$,F1$8%U%!%$%k$H$7$F07$&#2$D$N%U%!%$%k$N>WFM$r8+$D$1$?(B
 653.374 +Mercurial $B$K$h$C$F!"(B
 653.375 +\hgcmd{update} $B$J$$$7(B \hgcmd{merge} $B$O6X;_$5$l$^$9!#(B
 653.376 +
 653.377 +\subsection{Fixing a case conflict}
 653.378 +
 653.379 +$BB>$N%a%s%P!<$,(B Linux $B$d(B Unix $B$r;HMQ$7$F$$$k:.:_4D6-$G(B
 653.380 +Windows $B$J$$$7(B MacOS $B$r;HMQ$7$F$$$F!"(B
 653.381 +\hgcmd{update} $B$"$k$$$O(B \hgcmd{merge} $B$N:]$K(B
 653.382 +Mercurial $B$,J8;zBg>.$N>WFM$rJs9p$9$k>l9g!"(B
 653.383 +$BLdBj$N2r7h<j=g$O4JC1$G$9!#(B
 653.384 +
 653.385 +$B<j6a$J(B Linux $B$J$$$7(B Unix $BMxMQ<T$rC5$7!"(B
 653.386 +$BLdBj$N%j%]%8%H%j$r(B \hgcmd{clone} $B$7$F$+$i!"(B
 653.387 +$BLdBj$N%U%!%$%k$J$$$7%G%#%l%/%H%j$rBgJ8;z>.J8;z$N>WFM$,H/@8$7$J$$$h$&$K!"(B
 653.388 +Mercurial $B$N(B \hgcmd{rename} $B%3%^%s%I$G2~L>$r$9$l$PNI$$$N$G$9!#(B
 653.389 +$B$=$N8e!"(B
 653.390 +$BJQ99$r%3%_%C%H$7!"(B
 653.391 +\hgcmd{pull} $B$J$$$7(B \hgcmd{push} $B$G(B
 653.392 +Windows $B$d(B MacOS $B$KJQ99$r<h$j9~$_!"(B
 653.393 +\hgcmd{update} $B$K$h$C$F>WFM$7$J$$L>A0$GJQ99FbMF$r<h$j=P$7$^$9!#(B
 653.394 +
 653.395 +$BBgJ8;z>.J8;z$N>WFM$r@8$8$5$;$k%A%'%s%8%;%C%H$=$N$b$N$O!"(B
 653.396 +$B%W%m%8%'%/%H$NMzNr$K;D$C$F$*$j!"(B
 653.397 +$BEv3:%A%'%s%8%;%C%H$r(B Windows $B$d(B
 653.398 +MacOS $B>e$G:n6HNN0h%G%#%l%/%H%j$K<h$j=P$9$3$H$O$G$-$^$;$s$,!"(B
 653.399 +$B3+H/$r7QB3$9$k$3$H$O2DG=$G$9(B\footnote{$BLuCm(B:
 653.400 +$BJ8;z$NBg>.$H$O4X78$"$j$^$;$s$,!"(B
 653.401 +Windows $B$O(B ``\texttt{con}'' $B$d(B
 653.402 +``\texttt{aux}'' $B$,FCJL07$$$5$l$k$?$a!"(B
 653.403 +$BNc$($P$3$l$i$NL>A0$rMxMQ$7$?%G%#%l%/%H%j$,$"$k>l9g$J$I$O!"(B
 653.404 +$B%j%]%8%H%j$N(B \hgcmd{pull} $B$=$N$b$N$,$G$-$^$;$s!#(B}$B!#(B
 653.405 +
 653.406 +\begin{note}
 653.407 +  0.9.3 $BHG0JA0$N(B Mercurial $B$O!"(B
 653.408 +  $BBgJ8;z>.J8;z$K1F6A$r<u$1$J$$%j%]%8%H%j3JG<5!9=$b!"(B
 653.409 +  $BBgJ8;z>.J8;z$NL>A0>WFM8!CN5!G=$b$"$j$^$;$s$G$7$?!#(B
 653.410 +  Mercurial $B$N5lHG$r(B Windows $B$d(B MacOS $B$G;HMQ$7$F$$$k>l9g!"(B
 653.411 +  Mercurial $B$N99?7$r$*A&$a$7$^$9!#(B
 653.412 +\end{note}
 653.413 +
 653.414 +%%% Local Variables: 
 653.415 +%%% mode: latex
 653.416 +%%% TeX-master: "00book"
 653.417 +%%% End: 
   654.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   654.2 +++ b/ja/fixhtml.py	Sun Aug 16 03:41:39 2009 +0200
   654.3 @@ -0,0 +1,50 @@
   654.4 +#!/usr/bin/env python
   654.5 +#
   654.6 +# This script attempts to work around some of the more bizarre and
   654.7 +# quirky behaviours of htlatex.
   654.8 +#
   654.9 +# - We've persuaded htlatex to produce UTF-8, which unfortunately
  654.10 +#   causes it to use huge character sequences to represent even the
  654.11 +#   safe 7-bit ASCII subset of UTF-8.  We fix that up.
  654.12 +#
  654.13 +# - BUT we have to treat angle brackets (for example, redirections in
  654.14 +#   shell script snippets) specially, otherwise they'll break the
  654.15 +#   generated HTML.  (Reported by Johannes Hoff.)
  654.16 +#
  654.17 +# - For some reason, htlatex gives a unique ID to each fancyvrb
  654.18 +#   environment, which makes writing a sane, small CSS stylesheet
  654.19 +#   impossible.  We squish all those IDs down to nothing.
  654.20 +
  654.21 +import os
  654.22 +import sys
  654.23 +import re
  654.24 +
  654.25 +angle_re = re.compile(r'(&#x003[CE];)')
  654.26 +unicode_re = re.compile(r'&#x00([0-7][0-9A-F]);')
  654.27 +fancyvrb_re = re.compile(r'id="fancyvrb\d+"', re.I)
  654.28 +ligature_re = re.compile(r'&#xFB0([0-4]);')
  654.29 +
  654.30 +tmpsuffix = '.tmp.' + str(os.getpid())
  654.31 +
  654.32 +def hide_angle(m):
  654.33 +    return m.group(1).lower()
  654.34 +
  654.35 +def fix_ascii(m):
  654.36 +    return chr(int(m.group(1), 16))
  654.37 +
  654.38 +ligatures = ['ff', 'fi', 'fl', 'ffi', 'ffl']
  654.39 +
  654.40 +def expand_ligature(m):
  654.41 +    return ligatures[int(m.group(1))]
  654.42 +
  654.43 +for name in sys.argv[1:]:
  654.44 +    tmpname = name + tmpsuffix
  654.45 +    ofp = file(tmpname, 'w')
  654.46 +    for line in file(name):
  654.47 +        line = angle_re.sub(hide_angle, line)
  654.48 +        line = unicode_re.sub(fix_ascii, line)
  654.49 +        line = ligature_re.sub(expand_ligature, line)
  654.50 +        line = fancyvrb_re.sub('id="fancyvrb"', line)
  654.51 +        ofp.write(line)
  654.52 +    ofp.close()
  654.53 +    os.rename(tmpname, name)
   655.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   655.2 +++ b/ja/hgbook.css	Sun Aug 16 03:41:39 2009 +0200
   655.3 @@ -0,0 +1,441 @@
   655.4 +body {
   655.5 +  font: 12px/1.5 Verdana, sans-serif;
   655.6 +  padding-top: 50px;
   655.7 +  padding-left: 80px;
   655.8 +  padding-right: 80px;
   655.9 +  padding-bottom: 90px;
  655.10 +}
  655.11 +.ptmr7t- {
  655.12 +  font-family: monospace;
  655.13 +}
  655.14 +.ptmr7t-x-x-172 {
  655.15 +  font-size: 172%;
  655.16 +  font-family: monospace;
  655.17 +}
  655.18 +.ptmr7t-x-x-120 {
  655.19 +  font-size: 120%;
  655.20 +}
  655.21 +.zpzccmry-x-x-120 {
  655.22 +  font-size: 120%;
  655.23 +  font-weight: bold;
  655.24 +  font-style: italic;
  655.25 +}
  655.26 +.zpzccmry-x-x-120 {
  655.27 +  font-weight: bold;
  655.28 +  font-style: italic;
  655.29 +}
  655.30 +.pcrr7tn- {
  655.31 +  font-family: monospace;
  655.32 +}
  655.33 +.ptmri7t- {
  655.34 +  font-style: italic;
  655.35 +}
  655.36 +.ptmr7t-x-x-50 {
  655.37 +  font-size: 50%;
  655.38 +  font-family: monospace;
  655.39 +}
  655.40 +.ptmb7t- {
  655.41 +  font-weight: bold;
  655.42 +}
  655.43 +.zptmcmr- {
  655.44 +  font-style: italic;
  655.45 +}
  655.46 +.zptmcmrm- {
  655.47 +  font-style: italic;
  655.48 +}
  655.49 +.zpzccmry- {
  655.50 +  font-weight: bold;
  655.51 +  font-style: italic;
  655.52 +}
  655.53 +.pcrb7t- {
  655.54 +  font-family: monospace;
  655.55 +  font-weight: bold;
  655.56 +}
  655.57 +.pcrro7t- {
  655.58 +  font-family: monospace;
  655.59 +  font-style: oblique;
  655.60 +}
  655.61 +p.noindent {
  655.62 +  text-indent: 0em;
  655.63 +  margin: 0em;
  655.64 +}
  655.65 +p.nopar {
  655.66 +  text-indent: 0em;
  655.67 +}
  655.68 +p.indent {
  655.69 +  text-indent: 1.5em;
  655.70 +  margin: 0em;
  655.71 +}
  655.72 +a img {
  655.73 +  border-top: 0;
  655.74 +  border-left: 0;
  655.75 +  border-right: 0;
  655.76 +}
  655.77 +center {
  655.78 +  margin-top: 1em;
  655.79 +  margin-bottom: 1em;
  655.80 +}
  655.81 +td center {
  655.82 +  margin-top: 0em;
  655.83 +  margin-bottom: 0em;
  655.84 +}
  655.85 +.Canvas {
  655.86 +  position: relative;
  655.87 +}
  655.88 +img.math {
  655.89 +  vertical-align: middle;
  655.90 +}
  655.91 +li p.indent {
  655.92 +  text-indent: 0em;
  655.93 +}
  655.94 +.enumerate1 {
  655.95 +  list-style-type: decimal;
  655.96 +}
  655.97 +.enumerate2 {
  655.98 +  list-style-type: lower-alpha;
  655.99 +}
 655.100 +.enumerate3 {
 655.101 +  list-style-type: lower-roman;
 655.102 +}
 655.103 +.enumerate4 {
 655.104 +  list-style-type: upper-alpha;
 655.105 +}
 655.106 +div.newtheorem {
 655.107 +  margin-bottom: 2em;
 655.108 +  margin-top: 2em;
 655.109 +}
 655.110 +.obeylines-h,.obeylines-v {
 655.111 +  white-space: nowrap;
 655.112 +}
 655.113 +div.obeylines-v p {
 655.114 +  margin-top: 0;
 655.115 +  margin-bottom: 0;
 655.116 +}
 655.117 +.overline {
 655.118 +  text-decoration: overline;
 655.119 +}
 655.120 +.overline img {
 655.121 +  border-top: 1px solid black;
 655.122 +}
 655.123 +td.displaylines {
 655.124 +  text-align: center;
 655.125 +  white-space: nowrap;
 655.126 +}
 655.127 +.centerline {
 655.128 +  text-align: center;
 655.129 +}
 655.130 +.rightline {
 655.131 +  text-align: right;
 655.132 +}
 655.133 +div.verbatim {
 655.134 +  font-family: monospace;
 655.135 +  white-space: nowrap;
 655.136 +}
 655.137 +table.verbatim {
 655.138 +  width: 100%;
 655.139 +}
 655.140 +.fbox {
 655.141 +  background: url(note.png) no-repeat #cec;
 655.142 +  padding-left: 65px;
 655.143 +  padding-top: 1em;
 655.144 +  padding-bottom: 1em;
 655.145 +  padding-right: 1em;
 655.146 +  text-indent: 0pt;
 655.147 +  border: dotted black 1px;
 655.148 +}
 655.149 +div.center div.fbox {
 655.150 +  text-align: center;
 655.151 +  clear: both;
 655.152 +  padding-left: 3.0pt;
 655.153 +  padding-right: 3.0pt;
 655.154 +  text-indent: 0pt;
 655.155 +  border: solid black 0.4pt;
 655.156 +}
 655.157 +table.minipage {
 655.158 +  width: 100%;
 655.159 +}
 655.160 +div.center, div.center div.center {
 655.161 +  text-align: center;
 655.162 +  margin-left: 1em;
 655.163 +  margin-right: 1em;
 655.164 +}
 655.165 +div.center div {
 655.166 +  text-align: left;
 655.167 +}
 655.168 +div.flushright, div.flushright div.flushright {
 655.169 +  text-align: right;
 655.170 +}
 655.171 +div.flushright div {
 655.172 +  text-align: left;
 655.173 +}
 655.174 +div.flushleft {
 655.175 +  text-align: left;
 655.176 +}
 655.177 +.underline {
 655.178 +  text-decoration: underline;
 655.179 +}
 655.180 +.underline img {
 655.181 +  border-bottom: 1px solid black;
 655.182 +  margin-bottom: 1pt;
 655.183 +}
 655.184 +.framebox-c, .framebox-l, .framebox-r {
 655.185 +  padding-left: 3.0pt;
 655.186 +  padding-right: 3.0pt;
 655.187 +  text-indent: 0pt;
 655.188 +  border: solid black 0.4pt;
 655.189 +}
 655.190 +.framebox-c {
 655.191 +  text-align: center;
 655.192 +}
 655.193 +.framebox-l {
 655.194 +  text-align: left;
 655.195 +}
 655.196 +.framebox-r {
 655.197 +  text-align: right;
 655.198 +}
 655.199 +span.thank-mark {
 655.200 +  vertical-align: super
 655.201 +}
 655.202 +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript {
 655.203 +  font-size: 80%;
 655.204 +}
 655.205 +div.tabular, div.center div.tabular {
 655.206 +  text-align: center;
 655.207 +  margin-top: 0.5em;
 655.208 +  margin-bottom: 0.5em;
 655.209 +}
 655.210 +table.tabular td p {
 655.211 +  margin-top: 0em;
 655.212 +}
 655.213 +table.tabular {
 655.214 +  margin-left: auto;
 655.215 +  margin-right: auto;
 655.216 +}
 655.217 +div.td00 {
 655.218 +  margin-left: 0pt;
 655.219 +  margin-right: 0pt;
 655.220 +}
 655.221 +div.td01 {
 655.222 +  margin-left: 0pt;
 655.223 +  margin-right: 5pt;
 655.224 +}
 655.225 +div.td10 {
 655.226 +  margin-left: 5pt;
 655.227 +  margin-right: 0pt;
 655.228 +}
 655.229 +div.td11 {
 655.230 +  margin-left: 5pt;
 655.231 +  margin-right: 5pt;
 655.232 +}
 655.233 +table[rules] {
 655.234 +  border-left: solid black 0.4pt;
 655.235 +  border-right: solid black 0.4pt;
 655.236 +}
 655.237 +td.td00 {
 655.238 +  padding-left: 0pt;
 655.239 +  padding-right: 0pt;
 655.240 +}
 655.241 +td.td01 {
 655.242 +  padding-left: 0pt;
 655.243 +  padding-right: 5pt;
 655.244 +}
 655.245 +td.td10 {
 655.246 +  padding-left: 5pt;
 655.247 +  padding-right: 0pt;
 655.248 +}
 655.249 +td.td11 {
 655.250 +  padding-left: 5pt;
 655.251 +  padding-right: 5pt;
 655.252 +}
 655.253 +table[rules] {
 655.254 +  border-left: solid black 0.4pt;
 655.255 +  border-right: solid black 0.4pt;
 655.256 +}
 655.257 +.hline hr, .cline hr {
 655.258 +  height : 1px;
 655.259 +  margin: 0px;
 655.260 +}
 655.261 +.tabbing-right {
 655.262 +  text-align: right;
 655.263 +}
 655.264 +span.TEX {
 655.265 +  letter-spacing: -0.125em;
 655.266 +}
 655.267 +span.TEX span.E {
 655.268 +  position: relative;top: 0.5ex;left: -0.0417em;
 655.269 +}
 655.270 +a span.TEX span.E {
 655.271 +  text-decoration: none;
 655.272 +}
 655.273 +span.LATEX span.A {
 655.274 +  position: relative;
 655.275 +  top: -0.5ex;
 655.276 +  left: -0.4em;
 655.277 +  font-size: 85%;
 655.278 +}
 655.279 +span.LATEX span.TEX {
 655.280 +  position: relative;
 655.281 +  left: -0.4em;
 655.282 +}
 655.283 +div.float img, div.float .caption {
 655.284 +  text-align: center;
 655.285 +}
 655.286 +div.figure img, div.figure .caption {
 655.287 +  text-align: center;
 655.288 +}
 655.289 +.marginpar {
 655.290 +  width: 20%;
 655.291 +  float: right;
 655.292 +  text-align: left;
 655.293 +  margin-left: auto;
 655.294 +  margin-top: 0.5em;
 655.295 +  font-size: 85%;
 655.296 +  text-decoration: underline;
 655.297 +}
 655.298 +.marginpar p {
 655.299 +  margin-top: 0.4em;
 655.300 +  margin-bottom: 0.4em;
 655.301 +}
 655.302 +table.equation {
 655.303 +  width: 100%;
 655.304 +}
 655.305 +.equation td {
 655.306 +  text-align: center;
 655.307 +}
 655.308 +td.equation {
 655.309 +  margin-top: 1em;
 655.310 +  margin-bottom: 1em;
 655.311 +} 
 655.312 +td.equation-label {
 655.313 +  width: 5%;
 655.314 +  text-align: center;
 655.315 +}
 655.316 +td.eqnarray4 {
 655.317 +  width: 5%;
 655.318 +  white-space: normal;
 655.319 +}
 655.320 +td.eqnarray2 {
 655.321 +  width: 5%;
 655.322 +}
 655.323 +table.eqnarray-star, table.eqnarray {
 655.324 +  width: 100%;
 655.325 +}
 655.326 +div.eqnarray {
 655.327 +  text-align: center;
 655.328 +}
 655.329 +div.array {
 655.330 +  text-align: center;
 655.331 +}
 655.332 +div.pmatrix {
 655.333 +  text-align: center;
 655.334 +}
 655.335 +table.pmatrix {
 655.336 +  width: 100%;
 655.337 +}
 655.338 +span.pmatrix img {
 655.339 +  vertical-align: middle;
 655.340 +}
 655.341 +div.pmatrix {
 655.342 +  text-align: center;
 655.343 +}
 655.344 +table.pmatrix {
 655.345 +  width: 100%;
 655.346 +}
 655.347 +img.cdots {
 655.348 +  vertical-align: middle;
 655.349 +}
 655.350 +.partToc a, .partToc, .likepartToc a, .likepartToc {
 655.351 +  line-height: 200%;
 655.352 +  font-weight: bold;
 655.353 +  font-size: 110%;
 655.354 +}
 655.355 +.chapterToc a, .chapterToc, .likechapterToc a, .likechapterToc, .appendixToc a, .appendixToc {
 655.356 +  line-height: 200%;
 655.357 +  font-weight: bold;
 655.358 +}
 655.359 +.caption td.id {
 655.360 +  font-weight: bold;
 655.361 +  white-space: nowrap;
 655.362 +}
 655.363 +table.caption {
 655.364 +  text-align: center;
 655.365 +}
 655.366 +h1.partHead {
 655.367 +  text-align: center;
 655.368 +}
 655.369 +p.bibitem {
 655.370 +  text-indent: -2em;
 655.371 +  margin-left: 2em;
 655.372 +  margin-top: 0.6em;
 655.373 +  margin-bottom: 0.6em;
 655.374 +}
 655.375 +p.bibitem-p {
 655.376 +  text-indent: 0em;
 655.377 +  margin-left: 2em;
 655.378 +  margin-top: 0.6em;
 655.379 +  margin-bottom: 0.6em;
 655.380 +}
 655.381 +.paragraphHead, .likeparagraphHead {
 655.382 +  margin-top: 2em;
 655.383 +  font-weight: bold;
 655.384 +}
 655.385 +.subparagraphHead, .likesubparagraphHead {
 655.386 +  font-weight: bold;
 655.387 +}
 655.388 +.quote {
 655.389 +  margin-bottom: 0.25em;
 655.390 +  margin-top: 0.25em;
 655.391 +  margin-left: 1em;
 655.392 +  margin-right: 1em;
 655.393 +  text-align: justify;
 655.394 +}
 655.395 +.verse {
 655.396 +  white-space: nowrap;
 655.397 +  margin-left: 2em}
 655.398 +div.maketitle {
 655.399 +  text-align: center;
 655.400 +}
 655.401 +h2.titleHead {
 655.402 +  text-align: center;
 655.403 +}
 655.404 +div.maketitle {
 655.405 +  margin-bottom: 2em;
 655.406 +}
 655.407 +div.author, div.date {
 655.408 +  text-align: center;
 655.409 +}
 655.410 +div.thanks {
 655.411 +  text-align: left;
 655.412 +  margin-left: 10%;
 655.413 +  font-size: 85%;
 655.414 +  font-style: italic;
 655.415 +}
 655.416 +div.author {
 655.417 +  white-space: nowrap;
 655.418 +}
 655.419 +.quotation {
 655.420 +  margin-bottom: 0.25em;
 655.421 +  margin-top: 0.25em;
 655.422 +  margin-left: 1em;
 655.423 +}
 655.424 +h1.partHead {
 655.425 +  text-align: center;
 655.426 +}
 655.427 +img.graphics {
 655.428 +  margin-left: 10%;
 655.429 +}
 655.430 +.figure {
 655.431 +  width: 100%;
 655.432 +}
 655.433 +P.fancyvrb {
 655.434 +  white-space: nowrap;
 655.435 +}
 655.436 +hr {
 655.437 +  border: 0;
 655.438 +  height: 1px;
 655.439 +}
 655.440 +div#fancyvrb {
 655.441 +  white-space: nowrap;
 655.442 +  background: #eee;
 655.443 +  padding: 1em;
 655.444 +}
   656.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   656.2 +++ b/ja/hgext.tex	Sun Aug 16 03:41:39 2009 +0200
   656.3 @@ -0,0 +1,591 @@
   656.4 +\chapter{Adding functionality with extensions}
   656.5 +\label{chap:hgext}
   656.6 +
   656.7 +Mercurial $B$O5!G=@-$N8+CO$+$i8+$?>l9g$K$O?=$7J,L5$$0lJ}$G!"(B
   656.8 +$BJQ$j<o$N5!G=72$O8N0U$K=|30$5$l$F$$$^$9!#(B
   656.9 +$B4J7i$5$rJ]$D8/$jJ}$O!"(B
  656.10 +$BJ]<iC4Ev$HMxMQ<T$NN>J}$KBP$7$F%=%U%H%&%'%"$N07$$$d$9$5$r0];}$7$^$9!#(B
  656.11 +
  656.12 +$B$7$+$7(B Mercurial $B$O!"(B
  656.13 +$BMxMQ<T$r<];RDj5,$J%3%^%s%I72$NB~Cf$KMxMQ<T$rJD$89~$a$k$h$&$J$3$H$O$7$^$;$s!#(B
  656.14 +\emph{$B%$%/%9%F%s%7%g%s(B}
  656.15 +$B!J$3$N<o$N$b$N$O(B\emph{$B%W%i%0%$%s(B}$B$H8F$P$l$k$3$H$b$"$j$^$9!K(B
  656.16 +$B$H$7$F5!G=$rDI2C$9$k$3$H$,$G$-$k$N$G$9!#(B
  656.17 +$B4v$D$+$N%$%/%9%F%s%7%g%s$K$D$$$F$O!"(B
  656.18 +$B4{$KA0$N>O$GOCBj$K$7$F$$$^$9!#(B
  656.19 +
  656.20 +\begin{itemize}
  656.21 +\item \ref{sec:tour-merge:fetch}~$B@a$G$O(B
  656.22 +  \hgext{fetch} $B%$%/%9%F%s%7%g%s$r<h$j>e$2$F$$$^$9!#(B
  656.23 +  $B$3$N%$%/%9%F%s%7%g%s$O!"?7$?$JJQ99$N<hF@$H<j85$NJQ99$X$N%^!<%8$r!"(B
  656.24 +  $BC10l$N%3%^%s%I(B \hgxcmd{fetch}{fetch} $B$G<B;\$7$^$9!#(B
  656.25 +
  656.26 +\item \hgext{bisect} $B$O!"(B
  656.27 +  $B%P%0$N860x$H$J$kJQ99$r8zN(E*$K8!:w$9$k%$%/%9%F%s%7%g%s$G!"(B
  656.28 +  \ref{sec:undo:bisect}~$B@a$G<h$j>e$2$^$7$?!#(B
  656.29 +
  656.30 +\item \ref{chap:hook}~$B>O$G$O!"(B
  656.31 +  $B%U%C%/$K4XO"$7$?M-MQ$J5!G=$r;}$D%$%/%9%F%s%7%g%s$r<h$j>e$2$^$7$?!#(B
  656.32 +  \hgext{acl} $B$O%"%/%;%9%3%s%H%m!<%k%j%9%H$N5!G=$r!"(B
  656.33 +  \hgext{bugzilla} $B$O(B Bugzilla $B%P%0DI@W%7%9%F%`$H$NE}9g$r!"(B
  656.34 +  \hgext{notify} $B$OJQ99DI2C;~$K$*$1$kEE;R%a!<%kDLCN$N5!G=$r!"(B
  656.35 +  Mercurial $B$KDI2C$7$^$9!#(B
  656.36 +
  656.37 +\item Mercurial Queues $B%Q%C%A4IM}%$%/%9%F%s%7%g%s$O!"(B
  656.38 +  $B#2$D$N>O$H#1$D$N(B appendix $B$r4]!9Hq$d$9$KCM$9$k2ACM$r;}$C$F$$$^$9!#(B
  656.39 +  \ref{chap:mq}~$B>O$O4pK\$r!"(B
  656.40 +  \ref{chap:mq-collab}~$B>O$O$h$j?J$s$@OCBj$r!"(B
  656.41 +  $B$=$7$F(B appendix~\ref{chap:mqref} $B$O3F%3%^%s%I$N>\:Y$r<h$j>e$2$F$$$^$9!#(B
  656.42 +
  656.43 +\end{itemize}
  656.44 +
  656.45 +$BK\>O$G$O!"(B
  656.46 +$B>e5-0J30$N(B Mercurial $B$GMxMQ2DG=$J4v$D$+$N%$%/%9%F%s%7%g%s$K$D$$$F<h$j>e$2!"(B
  656.47 +$B$=$N>e$G!"(B
  656.48 +$B<+J,$G%$%/%9%F%s%7%g%s$r<BAu$9$k:]$KI,MW$H;W$o$l$k;EAH$_$K$D$$$F!"(B
  656.49 +$B4JC1$K?($l$h$&$H;W$$$^$9!#(B
  656.50 +
  656.51 +\begin{itemize}
  656.52 +\item \ref{sec:hgext:inotify}~$B@a$G$O!"(B
  656.53 +  \hgext{inotify} 
  656.54 +  $B%$%/%9%F%s%7%g%s$K$h$k(B\emph{$B@dBg$J(B}$B@-G=2~A1$N2DG=@-$K$D$$$F<h$j>e$2$^$9!#(B
  656.55 +
  656.56 +\end{itemize}
  656.57 +
  656.58 +\section{Improve performance with the \hgext{inotify} extension}
  656.59 +\label{sec:hgext:inotify}
  656.60 +
  656.61 +$B0lHLE*$J(B Mercurial $B$NA`:n$,(B 100 $BG\B.$/$J$k$3$H$K6=L#$,$"$k$N$G$7$?$i!"(B
  656.62 +$B$<$R$3$N@a$rFI$s$G$/$@$5$$!#(B
  656.63 +
  656.64 +Mercurial $B$ODL>o$N4D6-$G$"$C$F$b9b$$@-G=$G$rH/4x$7$^$9!#(B
  656.65 +XXXX $BH]Dj$N@\B3$NH&(B XXXX
  656.66 +$BNc$($P(B \hgcmd{status} $B%3%^%s%I$N<B9T$N:]$K$O!"(B
  656.67 +$B%U%!%$%k$N>uBV$rI=<($9$k$?$a$K!"(B
  656.68 +$B%j%]%8%H%jG[2<$NKX$IA4$F$N%G%#%l%/%H%j$H%U%!%$%k$KBP$9$kAv::$,I,MW$G$9!#(B
  656.69 +$BB>$NB?$/$N(B Mercurial $B%3%^%s%I$b!"(B
  656.70 +$BIqBfN"$G$OF1MM$N:n6H$rI,MW$H$7$F$$$^$9!#(B
  656.71 +$BNc$($P(B \hgcmd{diff} $B%3%^%s%I$O!"(B
  656.72 +$B>uBVHf3S5!9=(B\footnote{$BLuCm(B: \ref{sec:concepts:dirstate}~$B@a;2>H(B
  656.73 +}$B$rMQ$$$k$3$H$G!"(B
  656.74 +$BL@$i$+$KJQ99$5$l$F$$$J$$%U%!%$%k$KBP$7$F!"(B
  656.75 +$B<B9T%3%9%H$N9b$$Hf3S=hM}$,<B;\$5$l$k$3$H$r2sHr$7$F$$$^$9!#(B
  656.76 +
  656.77 +$B%U%!%$%k>uBV$N<hF@$O@-G=3NJ]>e=EMW$J$3$H$J$N$G!"(B
  656.78 +Mercurial $B$N3+H/<TC#$O!"(B
  656.79 +$B%.%j%.%j$N$H$3$m$^$G$3$NItJ,$N<BAu$r:GE,2=$7$F$-$^$7$?!#(B
  656.80 +$B$7$+$7(B \hgcmd{status} $B<B9T$N:]$K$O!"(B
  656.81 +$BA02s$N3NG'0J9_$NJQ99$NM-L5$rCN$k$?$a$K!"(B
  656.82 +$B%3%9%H$N9b$$%7%9%F%`%3!<%k$r!"(B
  656.83 +Mercurial $B$N4IM}2<$K$"$k%U%!%$%kKh$K:GDc#12sH/9T$9$kI,MW$,$"$k!"(B
  656.84 +$B$H$$$&;v<B$O2sHr$7$h$&$,$"$j$^$;$s!#(B
  656.85 +$B0lDj0J>e$NBg$-$5$N%j%]%8%H%j$G$O!"(B
  656.86 +$B$3$N=hM}$K$OD9$$;~4V$,$+$+$j$^$9!#(B
  656.87 +
  656.88 +$B1F6A$NBg$-$5$r?tCM2=$9$Y$/!"(B
  656.89 +150,000 $B$N%U%!%$%k$r4IM}$9$k%j%]%8%H%j$G<B83$r9T$C$?7k2L!"(B
  656.90 +$B$$$:$l$N%U%!%$%k$bJQ99(B\emph{$B$5$l$F$$$J$$(B}$B>l9g$G$"$C$F$b!"(B
  656.91 +\hgcmd{status} $B$N<B9T$K$O#1#0IC$rMW$7$^$9!#(B
  656.92 +
  656.93 +$BB?$/$N6aBeE*(B OS $B$O!"%U%!%$%k99?7$NDLCN5!9=$rHw$($F$$$^$9!#(B
  656.94 +$BE,@Z$J%5!<%S%9$K%W%m%0%i%`$rEPO?$7$F$*$/$3$H$G!"(B
  656.95 +$BBP>]$H$J$k%U%!%$%k$K4X$9$k@8@.!&JQ99!&:o=|$H$$$C$?%$%Y%s%H$,H/@8$9$kETEY!"(B
  656.96 +OS $B$,DLCN$r$7$F$/$l$^$9!#(B
  656.97 +Linux $B4D6-$G$O!"(B
  656.98 +\texttt{inotify} 
  656.99 +$B$H8F$P$l$k%+!<%M%k%3%s%]%M%s%H$,DLCN5!9=$rDs6!$7$^$9!#(B
 656.100 +
 656.101 +Mercurial $B$N(B \hgext{inotify} $B%$%/%9%F%s%7%g%s$O!"(B
 656.102 +$B%+!<%M%k$N(B \texttt{inotify} $B$HO"7H$9$k$3$H$G!"(B
 656.103 +\hgcmd{status} $B%3%^%s%I$r:GE,2=$7$^$9!#(B
 656.104 +\hgext{inotify} $B%$%/%9%F%s%7%g%s$O#2$D$NMWAG$+$i9=@.$5$l$F$$$^$9!#(B
 656.105 +$B%G!<%b%sItJ,$,%P%C%/%0%i%&%s%I$G2TF0$9$k$3$H$G!"(B
 656.106 +\texttt{inotify} $B%+!<%M%k%3%s%]%M%s%H$+$iDLCN$r<u$1<h$j$^$9!#(B
 656.107 +$B%G!<%b%sItJ,$O!"(B
 656.108 +$BDL>o$N(B Mercurial $B%3%^%s%I$+$i$N@\B3MW5a$b<u$1IU$1$^$9!#(B
 656.109 +\hgext{inotify} $B%$%/%9%F%s%7%g%s$O!"(B
 656.110 +$B%U%!%$%k%7%9%F%`$NAv::$NBeBX$H$7$F%G!<%b%s$rI,MW$H$9$k$?$a!"(B
 656.111 +Mercurial $B$N5sF0$=$N$b$N$r2~JQ$7$^$9!#(B
 656.112 +$B%G!<%b%s$O%j%]%8%H%j>uBV$K4X$9$k40A4$J>pJs$rJ];}$7$F$$$k$N$G!"(B
 656.113 +$B%j%]%8%H%jG[2<$N%G%#%l%/%H%j$d%U%!%$%k$rAv::$9$k$3$HL5$7$K!"(B
 656.114 +$BB(:B$K1~Ez$rJV$9$3$H$,$G$-$^$9!#(B
 656.115 +
 656.116 +$B@h$K=R$Y$?$H$*$j!"(B
 656.117 +$BDL>o$N(B Mercurial $B$G$O!"(B
 656.118 +150,000 $B$N%U%!%$%k$r4IM}$9$k%j%]%8%H%j$G$N(B 
 656.119 +\hgcmd{status} $B<B9T$K#1#0IC$rMW$7$^$7$?!#(B
 656.120 +\hgext{inotify} $B%$%/%9%F%s%7%g%s$rM-8z$K$9$k$3$H$G!"(B
 656.121 +$B<B9T$KMW$9$k;~4V$O(B\emph{1000$BG\(B}$BAa$$(B0.1~$BIC$^$GDc8:$G$-$^$7$?!#(B
 656.122 +
 656.123 +$BOC$r@h$K?J$a$kA0$K!"(B
 656.124 +$B0J2<$NE@$KCm0U$7$F$/$@$5$$!#(B
 656.125 +
 656.126 +\begin{itemize}
 656.127 +\item \hgext{inotify} $B$O(B Linux $B4D6-8GM-$N%$%/%9%F%s%7%g%s$G$9!#(B
 656.128 +  Linux $B$N(B \texttt{inotify} $B%5%V%7%9%F%`$HD>@\O"7H$9$k$?$a!"(B
 656.129 +  $BB>$N(B OS $B4D6-2<$G$O5!G=$7$^$;$s!#(B
 656.130 +
 656.131 +\item 2005 $BG/=i=\0J8e$K%j%j!<%9$5$l$?(B 
 656.132 +  Linux $B%G%#%9%H%j%S%e!<%7%g%s$G$NMxMQ$r$*A&$a$7$^$9!#(B
 656.133 +  $B$=$l0JA0$N%G%#%9%H%j%S%e!<%7%g%s$O!"(B
 656.134 +  \texttt{inotify} $B$,AH$_9~$^$l$F$$$J$$$+!"(B
 656.135 +  $BI,MW$J(B API $B$r(B \texttt{glibc} $B$,Ds6!$7$F$$$J$$$b$N$H;W$o$l$^$9(B\footnote{
 656.136 +  $BLuCm(B: man $B%Z!<%8$K$h$l$P!"(B
 656.137 +  \texttt{inotify} $B$NMxMQ$KEv$?$C$F$O!"(B
 656.138 +  2.6.13 $BHG0J8e$N%+!<%M%k$H(B 2.4 $BHG0J8e$N(B \texttt{glibc} $B$,I,MW$@$=$&$G$9!#(B
 656.139 +  }$B!#(B
 656.140 +
 656.141 +\item $BA4$F$N%U%!%$%k%7%9%F%`$,(B
 656.142 +  \hgext{inotify} $B%$%/%9%F%s%7%g%s$NMxMQ$KE,$7$F$$$k$H$O8B$j$^$;$s!#(B
 656.143 +  $BE57?E*$JNc$H$7$F$O!"(B
 656.144 +  $BF10l$N%M%C%H%o!<%/%U%!%$%k%7%9%F%`$r!"(B
 656.145 +  Mercurial $B$r2TF0$5$;$kJ#?t$N%7%9%F%`$G%^%&%s%H$7$F$$$k$h$&$J>l9g$G$9!#(B
 656.146 +  $B%+!<%M%k$N(B \texttt{inotify} $B%5%V%7%9%F%`$O!"(B
 656.147 +  $B%j%b!<%H%[%9%H$G$NJQ99$rCN$k=Q$r;}$A$^$;$s!#(B
 656.148 +  $BKX$I$N%m!<%+%k%U%!%$%k%7%9%F%`!JNc$($P(B ext3$B!"(BXFS $B$d(B ReiserFS$B!K$O!"(B
 656.149 +  $B>e<j$/5!G=$9$kH&$G$9!#(B
 656.150 +
 656.151 +\end{itemize}
 656.152 +
 656.153 +\hgext{inotify} $B%$%/%9%F%s%7%g%s$O!"(B
 656.154 +2007 $BG/(B 5 $B7n$N;~E@$G$O(B Mercurial $B$KF1:-$5$l$F$$$^$;$s(B\footnote{$BLuCm(B:
 656.155 +2007 $BG/(B 10 $B7n$N(B 0.9.5 $BHGCJ3,$G$bF1:-$5$l$F$$$^$;$s(B}$B$N$G!"(B
 656.156 +$BB>$N%$%/%9%F%s%7%g%s$HHf3S$7$FB?>/$N=`Hw:n6H$,I,MW$G$9$,!"(B
 656.157 +$B@-G=8~>e$K$O$=$l$@$1$N2ACM$,$"$j$^$9!#(B
 656.158 +
 656.159 +\hgext{inotify} $B%$%/%9%F%s%7%g%s$OL\2<!"(B
 656.160 +Mercurial $B%=!<%9%3!<%I$X$N%Q%C%A$H!"(B
 656.161 +\texttt{inotify} $B%5%V%7%9%F%`O"7H$N(B 
 656.162 +Python $B%P%$%s%G%#%s%0%i%$%V%i%j$N#2$D$NMWAG$+$i9=@.$5$l$F$$$^$9!#(B
 656.163 +
 656.164 +\begin{note}
 656.165 +  \texttt{inotify} $B$N(B 
 656.166 +  Python $B%P%$%s%G%#%s%0%i%$%V%i%j$K$O(B\emph{$B#2<oN`(B}$B$"$j$^$9!#(B
 656.167 +  $B#1$D$O(B \texttt{pyinotify} $B$H8F$P$l$k$b$N$G!"(B
 656.168 +  $B4v$D$+$N(B Linux $B%G%#%9%H%j%S%e!<%7%g%s$K$O(B
 656.169 +  \texttt{python-inotify} $B$H$$$&L>A0$GF1:-$5$l$F$$$^$9!#(B
 656.170 +  $B<BMQ$K6!$9$k$K$OHs>o$K%P%0$,B?$/8zN($b0-$$$N$G!"(B
 656.171 +  $B$3$N%i%$%V%i%j$O;H$&$Y$-$G$O(B\emph{$B$"$j$^$;$s(B}$B!#(B
 656.172 +\end{note}
 656.173 +
 656.174 +$B;v$r?J$a$k$KEv$?$C$F$O!"(B
 656.175 +$B4{$K5!G=$7$F$$$k%$%s%9%H!<%k:Q$_(B
 656.176 +Mercurial $B$rJ#@=$9$k$N$,NI$$$G$7$g$&!#(B
 656.177 +To get going, it's best to already have a functioning copy of
 656.178 +Mercurial installed. XXXXXX
 656.179 +
 656.180 +\begin{note}
 656.181 +  $B0J2<$N<j=g$rF'$`>l9g!"(B
 656.182 +  $B:G$b:G?7$N(B``$B:G@hC<$J(B''Mercurial $B<BAu$G!"(B
 656.183 +  $B4{$K%$%s%9%H!<%k:Q$_$N(B Mercurial $B$r(B\emph{$BCV$-49$($k(B}$B$3$H$K$J$j$^$9!#(B
 656.184 +  $B$3$l$O7Y9p$G$9!#(B
 656.185 +\end{note}
 656.186 +
 656.187 +\begin{enumerate}
 656.188 +\item \texttt{inotify} $B$N(B Python $B%P%$%s%G%#%s%0$N%j%]%8%H%j$rJ#@=$7$^$9!#(B
 656.189 +  $B%S%k%I$*$h$S%$%s%9%H!<%k$r9T$C$F$/$@$5$$!#(B
 656.190 +
 656.191 +  \begin{codesample4}
 656.192 +    hg clone http://hg.kublai.com/python/inotify
 656.193 +    cd inotify
 656.194 +    python setup.py build --force
 656.195 +    sudo python setup.py install --skip-build
 656.196 +  \end{codesample4}
 656.197 +
 656.198 +\item Mercurial $B$N(B \dirname{crew} $B%j%]%8%H%j$rJ#@=$7$^$9!#(B
 656.199 +  Mercurial Queues $B$K$h$j(B
 656.200 +  \dirname{crew} $B%j%]%8%H%j$N%m!<%+%k%3%T!<(B\footnote{$BLuCm!'(B
 656.201 +  $B$3$3$G$O(B \dirname{crew} $B$+$i99$K(B \dirname{inotify} $B$rJ#@=$7$F$$$^$9$,!"(B
 656.202 +  \hgext{inotify} $B%$%/%9%F%s%7%g%sMxMQ$N$?$a$@$1$K%S%k%I$9$k>l9g!"(B
 656.203 +  $BD>@\(B \dirname{crew} $B$G:n6H$7$F$bLdBjL5$$H&$G$9!#(B
 656.204 +  }$B$K%Q%C%A$rEv$F$k0Y$K!"(B
 656.205 +  \hgext{inotify} $B%Q%C%A$N%j%]%8%H%j$bJ#@=$7$F$/$@$5$$!#(B
 656.206 +
 656.207 +  \begin{codesample4}
 656.208 +    hg clone http://hg.intevation.org/mercurial/crew
 656.209 +    hg clone crew inotify
 656.210 +    hg clone http://hg.kublai.com/mercurial/patches/inotify inotify/.hg/patches
 656.211 +  \end{codesample4}
 656.212 +
 656.213 +\item Mercurial Queues $B%$%/%9%F%s%7%g%s!J(B\hgext{mq}$B!K(B
 656.214 +  $B$,MxMQ2DG=$G$"$k$3$H$r3NG'$7$F$/$@$5$$!#(B
 656.215 +  MQ $B$rMxMQ$7$?$3$H$,L5$$>l9g!"(B
 656.216 +  $B$^$:$O(B \ref{sec:mq:start}~$B@a$rFI$s$G$/$@$5$$!#(B
 656.217 +
 656.218 +\item \dirname{inotify} $B!J%m!<%+%k!K%j%]%8%H%j$K0\F0$7$F!"(B
 656.219 +  \hgxcmd{mq}{qpush} $B%3%^%s%I$N(B \hgxopt{mq}{qpush}{-a} $B%*%W%7%g%s$r;HMQ$7$F!"(B
 656.220 +  $BA4$F$N(B \hgext{inotify} $B%Q%C%A$rE,MQ$7$F$/$@$5$$!#(B
 656.221 +
 656.222 +  \begin{codesample4}
 656.223 +    cd inotify
 656.224 +    hg qpush -a
 656.225 +  \end{codesample4}
 656.226 +
 656.227 +  \hgxcmd{mq}{qpush} $B$,%(%i!<%a%C%;!<%8$rI=<($7$?>l9g$O!"(B
 656.228 +  $B:n6H$r7QB3$;$:$K3+H/%3%_%e%K%F%#$K=u$1$r5a$a$F$/$@$5$$!#(B
 656.229 +
 656.230 +\item $B%Q%C%AE,MQHG$N(B Mercurial $B$r%S%k%I$*$h$S%$%s%9%H!<%k$7$^$9!#(B
 656.231 +
 656.232 +  \begin{codesample4}
 656.233 +    python setup.py build --force
 656.234 +    sudo python setup.py install --skip-build
 656.235 +  \end{codesample4}
 656.236 +
 656.237 +\end{enumerate}
 656.238 +
 656.239 +$BE,@Z$K%Q%C%A$,E,MQ$5$l$?HG$N(B Mercurial $B$,0lC6$G$-$F$7$^$($P!"(B
 656.240 +\hgext{inotify} $B%$%/%9%F%s%7%g%s$rM-8z$K$9$k$?$a$KI,MW$J$3$H$O!"(B
 656.241 +\hgrc $B%U%!%$%k$K0J2<$N5-=R$rDI2C$9$k$3$H$@$1$G$9!#(B
 656.242 +
 656.243 +\begin{codesample2}
 656.244 +  [extensions]
 656.245 +  inotify =
 656.246 +\end{codesample2}
 656.247 +
 656.248 +\hgext{inotify} $B%$%/%9%F%s%7%g%s$,M-8z2=$5$l$k$H!"(B
 656.249 +$B%j%]%8%H%j$N>uBV$rI,MW$H$9$k%3%^%s%I$N=i2s5/F0$N;~E@$G!"(B
 656.250 +Mercurial $B$O<+F0E*3n$DF)2aE*$K>uBV4IM}MQ%G!<%b%s$r5/F0$7$^$9!#(B
 656.251 +$B>uBV4IM}%G!<%b%s$O!"%j%]%8%H%j$4$H$K5/F0$5$l$^$9!#(B
 656.252 +
 656.253 +$B>uBV4IM}%G!<%b%s$O$R$=$d$+$K5/F0$5$l!"%P%C%/%0%i%&%s%I$G<B9T$7B3$1$^$9!#(B
 656.254 +\hgext{inotify} $B%$%/%9%F%s%7%g%s$rM-8z$K$7$?J#?t$N%j%]%8%H%j$G!"(B
 656.255 +$B4v$D$+$N%3%^%s%I$r<B9T$7$?8e$K!"(B
 656.256 +$B<B9TCf$N%W%m%;%90lMw$r8+$l$P!"(B
 656.257 +$B%+!<%M%k$+$i$NDLCN$H(B
 656.258 +Mercurial $B$+$i$NLd$$9g$o$;$NN>J}$rBT$C$F$$$kJ#?t$N(B 
 656.259 +\texttt{hg} $B%W%m%;%9$r8+$k$3$H$,$G$-$kH&$G$9!#(B
 656.260 +
 656.261 +\hgext{inotify} $B%$%/%9%F%s%7%g%s$rM-8z$K$7$?:]$G$b!"(B
 656.262 +$B%j%]%8%H%j$K$*$1$k(B Mercurial $B%3%^%s%I$N=i2s5/F0$O!"(B
 656.263 +$BDL>o$N(B Mercurial $B%3%^%s%I<B9T$HF1DxEY$N@-G=$G<B9T$5$l$^$9!#(B
 656.264 +$B$3$l$O>uBV4IM}%G!<%b%s$K$h$kDL>o$N>uBVAv::$,I,MW$J$?$a$G!"(B
 656.265 +$B8e$K%+!<%M%k$+$i$N99?7DLCN$r<u$1<h$k:]$N4pDl>uBV$H$J$j$^$9!#(B
 656.266 +$B$7$+$7!"$3$l0J9_$N>uBV3NG'$NI,MW$J(B\emph{$BA4$F$N(B}$B%3%^%s%I<B9T$O!"(B
 656.267 +$B$I$s$J$K>.$5$J%5%$%:$N%j%]%8%H%j$G$"$C$F$b!"(B
 656.268 +$BL\$K8+$($FB.$/$J$C$F$$$kH&$G$9!#(B
 656.269 +$B%j%]%8%H%j$,Bg$-$1$l$PBg$-$$$[$I!"(B
 656.270 +$BL\$K8+$($F@-G=$,Bg$-$/2~A1$5$l$k$3$H$G$7$g$&!#(B
 656.271 +\hgext{inotify} $B%G!<%b%s$O!"(B
 656.272 +$B$I$s$J%5%$%:$N%j%]%8%H%j$G$"$C$F$b!"(B
 656.273 +$B>uBV<hF@A`:n$rKX$I=V;~$K=*N;$5$;$k$3$H$,$G$-$^$9!#(B
 656.274 +
 656.275 +\hgxcmd{inotify}{inserve} $B%3%^%s%I$K$h$j!"(B
 656.276 +$B>uBV4IM}%G!<%b%s$r<jF0$G5/F0$9$k$3$H$b$G$-$^$9!#(B
 656.277 +$B<jF0$G$N5/F0$K$h$j!"(B
 656.278 +$B%G!<%b%s$N<B9T$K4X$7$F4vJ,L@NF$J@)8f$r<j$K$9$k$3$H$,$G$-$^$9!#(B
 656.279 +$B$3$N%3%^%s%I$N5/F0$O!"(B
 656.280 +$BEvA3(B \hgext{inotify} 
 656.281 +$B%$%/%9%F%s%7%g%s$,M-8z$K$J$C$F$$$k>l9g$K8B$j;HMQ2DG=$G$9!#(B
 656.282 +
 656.283 +\hgext{inotify} $B%$%/%9%F%s%7%g%s$r;HMQ$7$F$$$k:]$K$O!"(B
 656.284 +$B>uBV4XO"%3%^%s%I$N<B9TA4HL$,$=$l0JA0$HHf3S$7$FB.$/$J$C$F$$$kE@$r=|$1$P!"(B
 656.285 +Mercurial $B$N5sF0$O(B\emph{$BA4$/JQ$o$i$J$$(B}$BH&$G$9!#(B
 656.286 +
 656.287 +$B$H$j$o$1!"%3%^%s%I$N=PNO$O0[$J$i$:!"F1$87k2L$rJV$9H&$G$9!#(B
 656.288 +\hgext{inotify} $B%$%/%9%F%s%7%g%s$NM-L5$G0[$J$k7k2L$,JQ$($k>l9g!"(B
 656.289 +$B>c32$H$7$FJs9p$r$7$F$/$@$5$$!#(B
 656.290 +
 656.291 +\section{Flexible diff support with the \hgext{extdiff} extension}
 656.292 +\label{sec:hgext:extdiff}
 656.293 +
 656.294 +Mercurial $B$NAH$_9~$_(B \hgcmd{diff} $B%3%^%s%I$O!"(B
 656.295 +unified $B:9J,$r$=$N$^$^=PNO$7$^$9!#(B
 656.296 +
 656.297 +\interaction{extdiff.diff}
 656.298 +
 656.299 +$BJQ99FbMF$NI=<($K30It%D!<%k$r;H$$$?$$>l9g$O!"(B
 656.300 +\hgext{extdiff} $B%$%/%9%F%s%7%g%s$,NI$$$G$7$g$&!#(B
 656.301 +\hgext{extdiff} $B%$%/%9%F%s%7%g%s$K$h$j!"(B
 656.302 +$BJQ99FbMFI=<($KNc$($P%0%i%U%#%+%k$J30It:9J,%D!<%k$,MxMQ$G$-$k$h$&$K$J$j$^$9!#(B
 656.303 +
 656.304 +\hgext{extdiff} $B%$%/%9%F%s%7%g%s$O(B
 656.305 +Mercurial $B$KF1:-$5$l$F$$$k$N$G4JC1$KMxMQ$G$-$^$9!#(B
 656.306 +\hgrc $B%U%!%$%k$N(B
 656.307 +\rcsection{extensions} $B%;%/%7%g%s$K!"(B
 656.308 +$B%$%/%9%F%s%7%g%s$rM-8z$K$9$k5-=R$r#19TDI2C$9$k$@$1$GNI$$$N$G$9!#(B
 656.309 +
 656.310 +\begin{codesample2}
 656.311 +  [extensions]
 656.312 +  extdiff =
 656.313 +\end{codesample2}
 656.314 +
 656.315 +$B$3$N@_Dj$K$h$j!"(B
 656.316 +\hgxcmd{extdiff}{extdiff} $B%3%^%s%I$,MxMQ2DG=$K$J$j$^$9$,!"(B
 656.317 +$B4pDl>uBV$G$O$3$N%3%^%s%I$O!"(B
 656.318 +$BAH$_9~$_$N(B \hgcmd{diff} $B%3%^%s%I$HF1$87A<0$N(B unified $B:9J,$r!"(B
 656.319 +$B%7%9%F%`$N(B \command{diff} $B%3%^%s%I$K$h$j@8@.$7$^$9!#(B
 656.320 +
 656.321 +\interaction{extdiff.extdiff}
 656.322 +
 656.323 +$BAH$_9~$_$N(B \hgcmd{diff} $B%3%^%s%I$N7k2L=PNO$H87L)$K$O0lCW$7$^$;$s(B\footnote{
 656.324 +$BLuCm(B: $B$I$NItJ,$r;X$7$F!V0lCW$7$J$$!W$H8@$C$F$$$k$N$+!)(B}$B$,!"(B
 656.325 +$BF1$8%*%W%7%g%s$r;XDj$7$F$b%7%9%F%`(B\footnote{$BLuCm(B:
 656.326 +$B$3$3$G8@$&!V(Bsystem$B!W$H$O!)(B XXXXX}$B$4$H$K(B
 656.327 +$B!J%7%9%F%`$N!K(B\command{diff} $B%3%^%s%I$N=PNO$,0[$J$k$+$i$G$9!#(B
 656.328 +
 656.329 +$B>e5-$N=PNO7k2L$K(B ``\texttt{making snapshot}''
 656.330 +$B9T$,4^$^$l$F$$$k$3$H$+$i$b;!$9$k$3$H$,$G$-$^$9$,!"(B
 656.331 +\hgxcmd{extdiff}{extdiff} 
 656.332 +$B%3%^%s%I$O%=!<%9%D%j!<$K4X$9$k%9%J%C%W%7%g%C%H$r#2$D:n@.$7$^$9!#(B
 656.333 +$B#1$DL\$N%9%J%C%W%7%g%C%H$O%=!<%9$N%j%S%8%g%s$N$b$N$G!"(B
 656.334 +$B#2$DL\$O:n6HNN0h%G%#%l%/%H%j$K$*$1$kBP>]%j%S%8%g%s$N$b$N$G$9(B\footnote{$BLuCm(B:
 656.335 +$B:n6HNN0h%G%#%l%/%H%j$N!V?F%j%S%8%g%s!W$H!V8=9T>uBV!W(B}$B!#(B
 656.336 +\hgxcmd{extdiff}{extdiff} 
 656.337 +$B%3%^%s%I$O$3$l$i$N%9%J%C%W%7%g%C%H$r0l;~%G%#%l%/%H%j$K:n@.$7!"(B
 656.338 +$B$3$l$i$N%G%#%l%/%H%jL>$r0z?t$K$7$F30It$N:9J,I=<(%D!<%k$r5/F0$7!"(B
 656.339 +$B$=$N8e0l;~%G%#%l%/%H%j$r:o=|$7$^$9!#(B
 656.340 +$B<B9T8zN(>e!"(B
 656.341 +$B#2$D$N%j%S%8%g%s$N4V$G:9J,$N$"$k%G%#%l%/%H%j!&(B
 656.342 +$B%U%!%$%k$N%9%J%C%W%7%g%C%H$@$1$,:n@.$5$l$^$9!#(B
 656.343 +
 656.344 +$B%9%J%C%W%7%g%C%H%G%#%l%/%H%j$NL>A0$O!"(B
 656.345 +$B85$H$J$k%j%]%8%H%j$N%Y!<%9L>$HF1$8L>A0$r;}$A$^$9!#(B
 656.346 +\dirname{/quux/bar/foo} $B$H$$$&%j%]%8%H%j$N>l9g!"(B
 656.347 +$B8D!9$N%9%J%C%W%7%g%C%H$N%G%#%l%/%H%j!J%Y!<%9!KL>$O(B \dirname{foo} $B$H$J$j$^$9!#(B
 656.348 +$BBP1~$9$k%A%'%s%8%;%C%H(BID$B$,$"$k>l9g!"(B
 656.349 +$B%9%J%C%W%7%g%C%H$N%G%#%l%/%H%jL>$K$O%A%'%s%8%;%C%H(BID$B$,IUM?$5$l$^$9!#(B
 656.350 +\texttt{a631aca1083f} $BHG$KBP$9$k%9%J%C%W%7%g%C%H$N%G%#%l%/%H%jL>$O(B
 656.351 +\dirname{foo.a631aca1083f} $B$H$J$j$^$9!#(B
 656.352 +$B:n6HNN0h%G%#%l%/%H%j$N8=9T>uBV$KBP$9$k%9%J%C%W%7%g%C%H$O!"(B
 656.353 +$B%A%'%s%8%;%C%H(BID$B$,IUM?$5$l$^$;$s$N$G!"(B
 656.354 +$B$3$NNc$G$OC1$K(B \dirname{foo} $B$H$$$&L>A0$K$J$j$^$9!#(B
 656.355 +$B<B:]$N5sF0$r8+$k$?$a$K!"(B
 656.356 +$B:FEYA0=P$N(B \hgxcmd{extdiff}{extdiff} $B$N<B9TNc$r8+$F$_$^$7$g$&!#(B
 656.357 +$B:9J,=PNO$N%X%C%@It$K!"(B
 656.358 +$B%9%J%C%W%7%g%C%H%G%#%l%/%H%j$NL>A0$,Kd$a9~$^$l$F$$$k$N$K5$IU$/$3$H$G$7$g$&!#(B
 656.359 +
 656.360 +\hgxcmd{extdiff}{extdiff} $B%3%^%s%I$K$O!"(B
 656.361 +$B#2$D$N=EMW$J%*%W%7%g%s$,$"$j$^$9!#(B
 656.362 +\hgxopt{extdiff}{extdiff}{-p} $B%*%W%7%g%s$O!"(B
 656.363 +$B%7%9%F%`$N(B \command{diff} 
 656.364 +$B%3%^%s%I$NBeBX$H$7$F;HMQ$5$l$k:9J,I=<(%W%m%0%i%`$r;XDj$7$^$9!#(B
 656.365 +\hgxopt{extdiff}{extdiff}{-o} $B%*%W%7%g%s$O!"(B
 656.366 +\hgxcmd{extdiff}{extdiff} 
 656.367 +$B$,30It$N:9J,I=<(%W%m%0%i%`5/F0;~$K;XDj$9$k%*%W%7%g%s(B
 656.368 +$B!J%G%U%)%k%H$G$O(B ``\texttt{-Npru}'' $B$,;XDj$5$l!"(B
 656.369 +\command{diff} $B$r;HMQ$9$k>l9g$K$N$_0UL#$r;}$A$^$9!K(B
 656.370 +$B$r;XDj$7$^$9!#(B
 656.371 +$B$=$l0J30$NE@$G$O!"(B
 656.372 +\hgxcmd{extdiff}{extdiff} $B%3%^%s%I$O(B
 656.373 +$BAH$_9~$_$N(B \hgcmd{diff} $B%3%^%s%I$HF1MM$K?6Iq$$$^$9$N$G!"(B
 656.374 +$B%*%W%7%g%sL>$d%*%W%7%g%s;XDj$NJ8K!!"(B
 656.375 +$BHf3SBP>]%j%S%8%g%s$r;XDj$9$k0z?t!"(B
 656.376 +$BHf3S$7$?$$%U%!%$%kL>$N;XDj$J$I$O!"(B
 656.377 +$BAH$_9~$_$N(B \hgcmd{diff} $B$HF1$8$h$&$K;XDj$G$-$^$9!#(B
 656.378 +
 656.379 +$B<B9TNc$H$7$F!"(B
 656.380 +$B!JDL>o$N(B \hgcmd{diff} $B$K$h$k!K(Bunified $B:9J,$NBe$o$j$K!"(B
 656.381 +$B%7%9%F%`I8=`$N(B \command{diff} $B%3%^%s%I$K$h$k(B context $B:9J,(B
 656.382 +$B!J(B\cmdopt{diff}{-c} $B%*%W%7%g%s;HMQ!K$r!"(B
 656.383 +$B%G%U%)%k%H$N#39T$G$O$J$/#59T$N(B context $B9T(B
 656.384 +$B!J(B\cmdopt{diff}{-C} $B%*%W%7%g%s$G$N(B \texttt{5} $B;XDj!K(B
 656.385 +$B$GI=<($9$kJ}K!$r<($7$^$9!#(B
 656.386 +
 656.387 +\interaction{extdiff.extdiff-ctx}
 656.388 +
 656.389 +$B%0%i%U%#%+%k$J:9J,%D!<%k$N5/F0$OHs>o$K4JC1$G$9!#(B
 656.390 +\command{kdiff3} $B5/F0$NNc$r<($7$^$9!#(B
 656.391 +
 656.392 +\begin{codesample2}
 656.393 +  hg extdiff -p kdiff3 -o ''
 656.394 +\end{codesample2}
 656.395 +
 656.396 +$BMxMQ$9$k:9J,I=<(%3%^%s%I$,%G%#%l%/%H%j;XDj$r07$($J$$>l9g$G$b!"(B
 656.397 +$B4JC1$J%9%/%j%W%H$r;H$&$3$H$G$=$NLdBj$r2r7h$G$-$^$9!#(B
 656.398 +$B$=$N$h$&$J%9%/%j%W%H$K$h$k(B
 656.399 +\hgext{mq} $B%$%/%9%F%s%7%g%s$H(B
 656.400 +\command{interdiff} $B%3%^%s%I$NO"7HNc$O!"(B
 656.401 +\ref{mq-collab:tips:interdiff}~$B@a$r;2>H$7$F$/$@$5$$!#(B
 656.402 +
 656.403 +\subsection{Defining command aliases}
 656.404 +
 656.405 +\hgxcmd{extdiff}{extdiff} $B%3%^%s%I$dMxMQ$9$k:9J,I=<(%3%^%s%I$N!"(B
 656.406 +$BN>J}$N%*%W%7%g%s$r3P$($F$*$/$N$OLLE]$G$9$N$G!"(B
 656.407 +\hgext{extdiff} $B%$%/%9%F%s%7%g%s$O!"(B
 656.408 +$B;HMQ$9$k:9J,I=<(%3%^%s%I$r@5$7$$%*%W%7%g%s$G5/F0$9$k(B
 656.409 +\emph{$B?7$7$$(B}$B%3%^%s%I$rDj5A$G$-$k$h$&$K$J$C$F$$$^$9!#(B
 656.410 +
 656.411 +$B?7$7$$%3%^%s%IDj5A$N$?$a$KI,MW$J$N$O!"(B
 656.412 +\hgrc $B%U%!%$%k$rJT=8$7!"(B
 656.413 +\rcsection{extdiff} $B$H$$$&L>A0$N%;%/%7%g%s$rDI2C$9$k$@$1$G$9!#(B
 656.414 +$B$3$N%;%/%7%g%s$G$O!"(B
 656.415 +$BJ#?t$N%3%^%s%I$rDj5A$9$k$3$H$,$G$-$^$9!#(B
 656.416 +$B0J2<$K(B \texttt{kdiff3} $B%3%^%s%I$rDI2C$9$kNc$r<($7$^$9!#(B
 656.417 +$B0lC6Dj5A$7$F$7$^$($P!"(B
 656.418 +``\texttt{hg kdiff3}''$B$HF~NO$9$k$@$1$G(B
 656.419 +\hgext{extdiff} $B%$%/%9%F%s%7%g%s$,(B
 656.420 +\command{kdiff3} $B$r5/F0$7$^$9!#(B
 656.421 +
 656.422 +\begin{codesample2}
 656.423 +  [extdiff]
 656.424 +  cmd.kdiff3 =
 656.425 +\end{codesample2}
 656.426 +
 656.427 +$BDj5A$N1&JU$r>e5-Nc$N$h$&$K6u$K$7$?>l9g!"(B
 656.428 +\hgext{extdiff} $B%$%/%9%F%s%7%g%s$O!"(B
 656.429 +$BDj5A$7$?%3%^%s%I$NL>A0$r<B9T$9$Y$-30It%W%m%0%i%`$NL>A0$H8+$J$7$^$9!#(B
 656.430 +$B$7$+$7!"$3$l$i$NL>A0$,0lCW$7$F$$$kI,MW$O$"$j$^$;$s!#(B
 656.431 +$B0J2<$NNc$G$O!"(B
 656.432 +\command{kdiff3} $B$r<B9T$9$k%3%^%s%I$r(B
 656.433 +``\texttt{hg wibble}'' $B$H$$$&L>A0$GDj5A$7$F$$$^$9!#(B
 656.434 +
 656.435 +\begin{codesample2}
 656.436 +  [extdiff]
 656.437 +  cmd.wibble = kdiff3
 656.438 +\end{codesample2}
 656.439 +
 656.440 +$B:9J,I=<(%W%m%0%i%`5/F0$N:]$N%G%U%)%k%H%*%W%7%g%s$b;XDj$9$k$3$H$,$G$-$^$9!#(B
 656.441 +``\texttt{opts.}'' $B@\F,<-$KB3$$$F!"(B
 656.442 +$B%*%W%7%g%s$rE,MQ$7$?$$%3%^%s%IL>$r5-=R$7$F$/$@$5$$!#(B
 656.443 +$B0J2<$NNc$G$O!"(B
 656.444 +\command{vim} $B%(%G%#%?$N(B \texttt{DirDiff} $B3HD%$r<B9T$9$k(B
 656.445 +``\texttt{hg vimdiff}'' $B%3%^%s%I$rDj5A$7$F$$$^$9!#(B
 656.446 +
 656.447 +\begin{codesample2}
 656.448 +  [extdiff]  
 656.449 +  cmd.vimdiff = vim
 656.450 +  opts.vimdiff = -f '+next' '+execute "DirDiff" argv(0) argv(1)'
 656.451 +\end{codesample2}
 656.452 +
 656.453 +\section{Cherrypicking changes with the \hgext{transplant} extension}
 656.454 +\label{sec:hgext:transplant}
 656.455 +
 656.456 +$B"((B Brendan $B$H%A%c%C%H$G$NOC$79g$$$,I,MW(B
 656.457 +
 656.458 +\section{Send changes via email with the \hgext{patchbomb} extension}
 656.459 +\label{sec:hgext:patchbomb}
 656.460 +
 656.461 +$BB?$/$N%W%m%8%'%/%H$G$O!"(B
 656.462 +$B6&M-%j%]%8%H%j$K:G=*@.2L$r%3%_%C%H$9$kA0$K!"(B
 656.463 +$BJQ99FbMF$r%a!<%j%s%0%j%9%H$KEj9F$7$F::FI$dO@I>$r9T$&(B
 656.464 +``$BJQ99%l%S%e!<(B''$B$NJ82=$r;}$C$F$$$^$9!#(B
 656.465 +$B%j%]%8%H%j$X$N%"%/%;%98"$r;}$?$J$$?M!9$+$i$NJQ990MMj$rE,MQ$9$k!"(B
 656.466 +$BLgHV$NLr3d$r2L$?$9?M!9$,$$$k%W%m%8%'%/%H$b$"$j$^$9!#(B
 656.467 +
 656.468 +Mercurial $B$N(B \hgext{patchbomb} $B%$%/%9%F%s%7%g%s$rMxMQ$9$k$3$H$G!"(B
 656.469 +$B%l%S%e!<$dDs0F$N$?$a$NEE;R%a!<%k$K$h$kJQ99Aw?.$,MF0W$K$J$j$^$9!#(B
 656.470 +$B$3$N%$%/%9%F%s%7%g%s$NL>A0$O!"(B
 656.471 +$BJQ99$,%Q%C%A7A<0$G@07A$5$l!"(B
 656.472 +$B#1%A%'%s%8%;%C%HKh$K#1$D$NEE;R%a!<%k$GAw?.$5$l$k$3$H$KM3Mh$7$F$$$^$9!#(B
 656.473 +$BEE;R%a!<%k$K$h$k0lO"$NJQ99$NAw?.$,!"(B
 656.474 +$B<u?.<T$N%a!<%k%\%C%/%9$K$H$C$F(B``$BGz7b(B''$B!J(Bbombing$B!K(B
 656.475 +$B$N$h$&$G$"$k$3$H$+$i!"(B``patchbomb''$B$H8F$P$l$F$$$^$9!#(B
 656.476 +
 656.477 +\hgext{patchbomb} $B%$%/%9%F%s%7%g%s$N4pK\E*$J@_Dj5-=R$O!"(B
 656.478 +$B$$$D$b$N$h$&$K(B \hgrc $B$X$N#19T$+#29TDxEY$N5-=R$@$1$G$9!#(B
 656.479 +
 656.480 +\begin{codesample2}
 656.481 +  [extensions]
 656.482 +  patchbomb =
 656.483 +\end{codesample2}
 656.484 +
 656.485 +$B0lC6%$%/%9%F%s%7%g%s$rM-8z$K$7$?$J$i$P!"(B
 656.486 +\hgxcmd{patchbomb}{email} $B$H$$$&?7$?$J%3%^%s%I$,MxMQ2DG=$K$J$j$^$9!#(B
 656.487 +
 656.488 +\hgxcmd{patchbomb}{email} $B%3%^%s%I$N0BA43n$D:GA1$N<B9T<j=g$O!"(B
 656.489 +\emph{$BI,$:(B} \hgxopt{patchbomb}{email}{-n} 
 656.490 +$B%*%W%7%g%s$rIU$1$F0lC6<B9T$7$F$_$k$3$H$G$9!#(B
 656.491 +\hgxopt{patchbomb}{email}{-n} $B%*%W%7%g%sIU$-$N<B9T$O!"(B
 656.492 +$B<B:]$NEE;R%a!<%kAw?.$O9T$o$:$K!"(B
 656.493 +$BAw?.(B\emph{$B$5$l$k$G$"$m$&(B}$BFbMF$rI=<($7$^$9!#(B
 656.494 +$BJQ99FbMF$K$6$C$HL\$rDL$7$F!"(B
 656.495 +$BAw?.FbMF$,E,@Z$G$"$k$3$H$r3NG'$7$?$J$i$P!"(B
 656.496 +\hgxopt{patchbomb}{email}{-n} 
 656.497 +$B%*%W%7%g%sH4$-$G:FEY(B
 656.498 +\hgxcmd{patchbomb}{email} $B%3%^%s%I$r<B9T$7$F$/$@$5$$!#(B
 656.499 +
 656.500 +\hgxcmd{patchbomb}{email} $B%3%^%s%I$O!"(B
 656.501 +$BB>$N(B Mercurial $B%3%^%s%I$HF1MM$N%j%S%8%g%s;XDj$,2DG=$G$9!#(B
 656.502 +$BNc$($P0J2<$N<B9TNc$G$O!"(B
 656.503 +$B%j%S%8%g%s(B 7 $B$+$i(B \texttt{tip} $B$^$G$NA4$F$N%j%S%8%g%s(B
 656.504 +$B!J%j%S%8%g%s(B 7 $B$*$h$S(B \texttt{tip} $B$b4^$_$^$9!K$,Aw?.$5$l$^$9!#(B
 656.505 +
 656.506 +\begin{codesample2}
 656.507 +  hg email -n 7:tip
 656.508 +\end{codesample2}
 656.509 +
 656.510 +$BHf3SBP>]$N(B\emph{$B%j%]%8%H%j(B}$B$r;XDj$9$k$3$H$b$G$-$^$9!#(B
 656.511 +$B%j%S%8%g%s;XDjL5$7$G%j%]%8%H%j$r;XDj$7$?>l9g!"(B
 656.512 +\hgxcmd{patchbomb}{email} $B%3%^%s%I$O!"(B
 656.513 +$B1s3V%j%]%8%H%j$KB8:_$7$J$$%m!<%+%k%j%]%8%H%j$NA4$F$N%j%S%8%g%s$rAw?.$7$^$9!#(B
 656.514 +$B%j%S%8%g%s$J$$$7!J(B\hgxopt{patchbomb}{email}{-b} $B%*%W%7%g%s$K$h$k!K(B
 656.515 +$B%V%i%s%AL>$rDI2C;XDj$9$k$3$H$G!"(B
 656.516 +$BAw?.$5$l$k%j%S%8%g%s$r@)8B$9$k$3$H$,$G$-$^$9!#(B
 656.517 +
 656.518 +$BAw?.@h%"%I%l%9$r;XDj$7$J$$(B
 656.519 +\hgxcmd{patchbomb}{email} $B<B9T$O40`z$K0BA4$G!"(B
 656.520 +$B$=$N>l9g$K$O(B \hgxcmd{patchbomb}{email} $B$OBPOCE*$KF~NO$r5a$a$F$-$^$9(B
 656.521 +$B!J(BLinux $B$d(B Unix $B%i%$%/$J%7%9%F%`$rMxMQ$7$F$$$k>l9g!"(B
 656.522 +$B$3$l$i$N%X%C%@CMF~NO$N:]$K$O!"(B
 656.523 +\texttt{readline} $BMM<0$NJT=85!G=$,MxMQ2DG=$G$9!K!#(B
 656.524 +
 656.525 +$BC10l$N%j%S%8%g%s$@$1$rAw?.$9$k>l9g!"(B
 656.526 +\hgxcmd{patchbomb}{email} $B%3%^%s%I$N4pDlF0:n$G$O!"(B
 656.527 +$B%3%_%C%H%a%C%;!<%8$N:G=i$N#19T$rAw?.$9$kEE;R%a!<%k$N%5%V%8%'%/%H$KMxMQ$7$^$9!#(B
 656.528 +
 656.529 +$BJ#?t$N%j%S%8%g%s$rAw?.$9$k>l9g!"(B
 656.530 +\hgxcmd{patchbomb}{email} $B%3%^%s%I$O%A%'%s%8%;%C%HKh$KEE;R%a!<%k$rAw?.$7$^$9!#(B
 656.531 +$B$3$N>l9g!"(B
 656.532 +$BAw?.$7$h$&$H$9$k0lO"$NJQ99$NL\E*$r5-=R$7$?A0CV$-$NEE;R%a!<%k$r!"(B
 656.533 +$B0lO"$N%a!<%kAw?.$N@h?($l$H$7$FAw?.$7$^$9!#(B
 656.534 +
 656.535 +\subsection{Changing the behaviour of patchbombs}
 656.536 +
 656.537 +$BEE;R%a!<%k$K$h$kJQ99FbMFAw?.$N7A<0$,!"(B
 656.538 +$BA4$F$N%W%m%8%'%/%H$G87L)$KF1$8$o$1$G$OL5$$$3$H$+$i!"(B
 656.539 +\hgext{patchbomb} $B%$%/%9%F%s%7%g%s$O!"(B
 656.540 +$B%3%^%s%I9T$G$N%*%W%7%g%s;XDj$K$h$k4v$D$+$NE,9g=hM}$r<B;\$7$^$9!#(B
 656.541 +
 656.542 +\begin{itemize}
 656.543 +\item $B%3%^%s%I9T$G$N(B \hgxopt{patchbomb}{email}{-s} $B%*%W%7%g%s$K$h$j!"(B
 656.544 +  $BA0CV$-%a%C%;!<%8$N%5%V%8%'%/%H$r;XDj$G$-$^$9!#(B
 656.545 +  $B$3$N%*%W%7%g%s$K$O!"(B
 656.546 +  $B%5%V%8%'%/%H$H$7$F;HMQ$9$k%F%-%9%H$r;XDj$7$^$9!#(B
 656.547 +
 656.548 +\item \hgxopt{patchbomb}{email}{-f} $B%*%W%7%g%s$K$h$j!"(B
 656.549 +  $BEE;R%a!<%k$NAw?.85%"%I%l%9$rJQ99$G$-$^$9!#(B
 656.550 +  $B$3$N%*%W%7%g%s$K$O!"(B
 656.551 +  $BAw?.85%"%I%l%9$H$7$F;HMQ$9$kEE;R%a!<%k%"%I%l%9$r;XDj$7$^$9!#(B
 656.552 +
 656.553 +\item $B4pDlF0:n$G$O!"EE;R%a!<%k$4$H$K(B unified $B:9J,!J(B
 656.554 +  $B7A<0$N>\:Y$K4X$7$F$O(B \ref{sec:mq:patch}~$B@a$r;2>H$7$F$/$@$5$$!K(B
 656.555 +  $B$rAw?.$7$^$9!#(B
 656.556 +  \hgxopt{patchbomb}{email}{-b} $B%*%W%7%g%s$r;XDj$9$k$3$H$G!"(B
 656.557 +  $B%P%$%J%j%P%s%I%k7A<0$G$NAw?.$rA*Br$G$-$^$9!#(B
 656.558 +
 656.559 +\item unified $B:9J,$NDL>o$N=PNO(B\footnote{$BLuCm(B:
 656.560 +  $B!V(BMercurial $B$K$*$1$kDL>o$N=PNO!W$N0UL#!)(B
 656.561 +  $B$=$l$H$b!V(Bpatchbomb $B$K$*$1$kDL>o$N=PNO!W$N0UL#!)(B
 656.562 +  }$B$O%a%?%G!<%?%X%C%@$+$i;O$^$j$^$9!#(B
 656.563 +  \hgxopt{patchbomb}{email}{--plain} $B%*%W%7%g%s$r;XDj$9$k$3$H$G!"(B
 656.564 +  $B$3$l$i$r>JN,$7$?4JAG$J7A<0$N:9J,$rAw?.$9$k$3$H$,$G$-$^$9!#(B
 656.565 +
 656.566 +\item $B:9J,ItJ,$ODL>o!"(B
 656.567 +  $B%Q%C%A$N@bL@ItJ,$HF1$8(B MIME $B%Q!<%H$K(B``$BJB$Y$F(B''$BAw?.$5$l$^$9!#(B
 656.568 +  $B%a!<%k$N:G=i$N(B MIME $B%Q!<%H$+$i$7$+0zMQ$G$-$J$$%a!<%k%D!<%k$b$"$k$?$a!"(B
 656.569 +  $B:G$bB?$/$NFI$_<j$K$H$C$F!"(B
 656.570 +  $B0lHVMF0W$K:9J,$r0zMQ$7$FJV?.$G$-$k$N$,$3$N7A<0$G$9!#(B
 656.571 +  $B@bL@ItJ,$H:9J,ItJ,$rJL!9$N(B MIME $B%Q!<%H$H$7$FAw?.$7$?$$>l9g$O!"(B
 656.572 +  \hgxopt{patchbomb}{email}{-a} $B%*%W%7%g%s$r;XDj$7$F$/$@$5$$!#(B
 656.573 +
 656.574 +\item \hgxopt{patchbomb}{email}{-m} $B%*%W%7%g%s$r;XDj$9$k$3$H$G!"(B
 656.575 +  $BEE;R%a!<%k$G$NAw?.$NBX$o$j$K!"(B
 656.576 +  \texttt{mbox} $B7A<0$N%a!<%k%U%)%k%@$X$N=q$-9~$_$r9T$&$3$H$,$G$-$^$9!#(B
 656.577 +  $B$3$N%*%W%7%g%s$K$O!"=q$-9~$_@h%U%!%$%kL>$r;XDj$7$^$9!#(B
 656.578 +
 656.579 +\item $B3F%Q%C%A$*$h$SA0CV$-%a%C%;!<%8$KBP$7$F!"(B
 656.580 +  \command{diffstat} $B7A<0$NMWLs$rIUM?$7$?$$>l9g$O!"(B
 656.581 +  \hgxopt{patchbomb}{email}{-d} $B%*%W%7%g%s$r;XDj$7$F$/$@$5$$!#(B
 656.582 +  \command{diffstat} $B%3%^%s%I$O!"(B
 656.583 +  $B%Q%C%AE,MQ@h%U%!%$%kL>$H!"(B
 656.584 +  $B1F6A$r<u$1$k9T?t!"(B
 656.585 +  $B$*$h$S3F%U%!%$%kKh$NJQ99NL$rI=$9%R%9%H%0%i%`$r0lMwI=<($7$^$9!#(B
 656.586 +  $B%a!<%k$NFI$_<j$O!"(B
 656.587 +  $B$3$N>pJs$+$i%Q%C%A$NJ#;(EY$K4X$9$k<AE*$J0lMw@-$rF@$k$3$H$,$G$-$^$9!#(B
 656.588 +
 656.589 +\end{itemize}
 656.590 +
 656.591 +%%% Local Variables: 
 656.592 +%%% mode: latex
 656.593 +%%% TeX-master: "00book"
 656.594 +%%% End: 
   657.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   657.2 +++ b/ja/hook.tex	Sun Aug 16 03:41:39 2009 +0200
   657.3 @@ -0,0 +1,1910 @@
   657.4 +\chapter{Handling repository events with hooks}
   657.5 +\label{chap:hook}
   657.6 +
   657.7 +Mercurial $B$O!"%j%]%8%H%j$KH/@8$7$?%$%Y%s%H$K1~$8$F!"(B
   657.8 +$B<+F0E*$J=hM}$r<B9T$9$k6/NO$J;EAH$_$rDs6!$7$F$$$^$9!#(B
   657.9 +$B4v$D$+$N>u67$G$O!"(B
  657.10 +$B%$%Y%s%H$KBP$9$k(B Mercurial $B$N1~Ez7k2L$r@)8f$9$k$3$H$b$G$-$^$9!#(B
  657.11 +
  657.12 +Mercurial $B$,MxMQ$9$k$3$l$i$N=hM}$O!"(B
  657.13 +\emph{$B%U%C%/(B}$B!J(Bhook$B!K$H8F$P$l$F$$$^$9!#(B
  657.14 +$B9=@.4IM}%7%9%F%`$K$h$C$F$O%U%C%/$r(B``$B%H%j%,(B''$B$H8F$V$3$H$b$"$j$^$9$,!"(B
  657.15 +$B$3$l$i$O6&$KF1$89M$(J}$r;X$7$^$9!#(B
  657.16 +
  657.17 +\section{An overview of hooks in Mercurial}
  657.18 +
  657.19 +Mercurial $B$,Ds6!$9$k%U%C%/$N4JC1$J%j%9%H$r<($7$^$9!#(B
  657.20 +$B$3$l$i$N%U%C%/$K4X$9$k>\:Y$O(B \ref{sec:hook:ref}~$B@a$G@bL@$7$^$9!#(B
  657.21 +
  657.22 +\begin{description}
  657.23 +
  657.24 +\item[\small\hook{changegroup}]
  657.25 +  $B30It%j%]%8%H%j$+$i%A%'%s%8%;%C%H72$,;}$A9~$^$l$?8e$K<B9T$5$l$^$9!#(B
  657.26 +
  657.27 +\item[\small\hook{commit}] 
  657.28 +  $B%m!<%+%k%j%]%8%H%j$K$*$$$F?7$?$J%A%'%s%8%;%C%H$,:n@.$5$l$?8e$K<B9T$5$l$^$9!#(B
  657.29 +
  657.30 +\item[\small\hook{incoming}] 
  657.31 +  $B30It%j%]%8%H%j$+$i;}$A9~$^$l$??7$?$J%A%'%s%8%;%C%HKh$K#12s$E$D<B9T$5$l$^$9!#(B
  657.32 +  $B;}$A9~$^$l$?%A%'%s%8%;%C%H$N(B\emph{$B$^$H$^$j(B}$B$NC10L$G5/F0$5$l$k(B
  657.33 +  \hook{changegroup} $B$H$N0c$$$KCm0U$7$F$/$@$5$$!#(B
  657.34 +
  657.35 +\item[\small\hook{outgoing}] 
  657.36 +  $B30It%j%]%8%H%j$X%A%'%s%8%;%C%H72$,E>Aw$5$l$?8e$K<B9T$5$l$^$9!#(B
  657.37 +
  657.38 +\item[\small\hook{prechangegroup}] 
  657.39 +  $B30It%j%]%8%H%j$+$i%A%'%s%8%;%C%H72$,;}$A9~$^$l$kA0$K<B9T$5$l$^$9!#(B
  657.40 +
  657.41 +\item[\small\hook{precommit}] 
  657.42 +  $B@)8fMQ!#(B
  657.43 +  $B%m!<%+%k%j%]%8%H%j$X$N%3%_%C%HA0$K<B9T$5$l$^$9!#(B
  657.44 +
  657.45 +\item[\small\hook{preoutgoing}] 
  657.46 +  $B@)8fMQ!#(B
  657.47 +  $B30It%j%]%8%H%j$X%A%'%s%8%;%C%H72$,E>Aw$5$l$kA0$K<B9T$5$l$^$9!#(B
  657.48 +
  657.49 +\item[\small\hook{pretag}] 
  657.50 +  $B@)8fMQ!#%?%0@8@.A0$K<B9T$5$l$^$9!#(B
  657.51 +
  657.52 +\item[\small\hook{pretxnchangegroup}] 
  657.53 +  $B@)8fMQ!#(B
  657.54 +  $B30It$+$i%m!<%+%k%j%]%8%H%j$X$H%A%'%s%8%;%C%H72$,;}$A9~$^$l$?:]$K!"(B
  657.55 +  $BJQ99$r915WE*$J$b$N$K$9$k%H%i%s%6%/%7%g%s$,40N;$9$kA0$K<B9T$5$l$^$9!#(B
  657.56 +
  657.57 +\item[\small\hook{pretxncommit}] 
  657.58 +  $B@)8fMQ!#(B
  657.59 +  $B%m!<%+%k%j%]%8%H%j$K$*$$$F?7$?$J%A%'%s%8%;%C%H$,:n@.$5$l$?:]$K!"(B
  657.60 +  $BJQ99$r915WE*$J$b$N$K$9$k%H%i%s%6%/%7%g%s$,40N;$9$kA0$K<B9T$5$l$^$9!#(B
  657.61 +
  657.62 +\item[\small\hook{preupdate}] 
  657.63 +  $B@)8fMQ!#(B
  657.64 +  $B:n6HNN0h%G%#%l%/%H%j$N99?7!&%^!<%8$,<B;\$5$l$kA0$K<B9T$5$l$^$9!#(B
  657.65 +
  657.66 +\item[\small\hook{tag}] 
  657.67 +  $B%?%0$,@8@.$5$l$?8e$K<B9T$5$l$^$9!#(B
  657.68 +
  657.69 +\item[\small\hook{update}] 
  657.70 +  $B:n6HNN0h%G%#%l%/%H%j$N99?7!&%^!<%8$,40N;$7$?8e$K<B9T$5$l$^$9!#(B
  657.71 +
  657.72 +\end{description}
  657.73 +
  657.74 +``$B@)8fMQ(B''$B$H=q$+$l$F$$$k%U%C%/$O!"(B
  657.75 +$B=hM}$N7QB3@-$N2DH]$rH=Dj$9$k5!G=$r;}$C$F$$$^$9!#(B
  657.76 +$B%U%C%/$N<B9T$,@.8y$7$?>l9g!"(B
  657.77 +$B%U%C%/$KBP1~$9$k=hM}$O7QB3$5$l$^$9$,!"(B
  657.78 +$B%U%C%/$N<B9T$,<:GT$7$?>l9g!"(B
  657.79 +$BBP1~$9$k=hM}$O5v2D$5$l$J$$$+<B9T$7$J$+$C$?$3$H$K$J$j$^$9(B
  657.80 +$B!J$I$A$i$K$J$k$+$O%U%C%/$K1~$8$F7h$^$j$^$9!K!#(B
  657.81 +
  657.82 +\section{Hooks and security}
  657.83 +
  657.84 +\subsection{Hooks are run with your privileges}
  657.85 +
  657.86 +$B%j%]%8%H%j$K$*$$$F(B Mercurial $B$N%3%^%s%I$r<B9T$7!"(B
  657.87 +$B$=$N%3%^%s%I$,%U%C%/$r5/F0$9$k$3$H$K$J$C$?>l9g!"(B
  657.88 +\emph{$B%3%^%s%I<B9T<T$N(B}$B%7%9%F%`>e$K$*$$$F!"(B
  657.89 +\emph{$B%3%^%s%I<B9T<T$N(B}$B%f!<%6%"%+%&%s%H$K$h$j!"(B
  657.90 +\emph{$B%3%^%s%I<B9T<T$N(B}$B8"8B%l%Y%k$G<B9T$5$l$^$9!#(B
  657.91 +$B%U%C%/$OG$0U$N<B9T%3!<%I$G$9$+$i!"(B
  657.92 +$B==J,$JG[N8$r;}$C$F07$&I,MW$,$"$j$^$9!#(B
  657.93 +$BC/$,:n@.$7$F2?$r$9$k%U%C%/$J$N$+$r=OCN$7$F$$$k3N?.L5$7$K!"(B
  657.94 +$B%U%C%/$r%$%s%9%H!<%k$7$J$$$G$/$@$5$$!#(B
  657.95 +
  657.96 +$B;~$K$O!"(B
  657.97 +$B<+J,$G%$%s%9%H!<%k$7$?$N$G$O$J$$%U%C%/$K;/$5$l$k$+$b$7$l$^$;$s!#(B
  657.98 +$BFk@w$_$NL5$$%7%9%F%`>e$G(B Mercurial $B$r;HMQ$9$k:]$K$O!"(B
  657.99 +Mercurial $B$,%7%9%F%`6&DL$N(B \hgrc\ 
 657.100 +$B%U%!%$%k$GDj5A$5$l$?%U%C%/$r<B9T$9$k$+$b$7$l$^$;$s!#(B
 657.101 +
 657.102 +$BB>$N%f!<%6$,=jM-$9$k%j%]%8%H%j$G:n6H$9$k>l9g!"(B
 657.103 +Mercurial $B$O$=$N%f!<%6$N%j%]%8%H%j$GDj5A$5$l$?%U%C%/$r<B9T$G$-$^$9$,!"(B
 657.104 +$B$=$l$O(B``$B$"$J$?$N(B''$B8"8B$G<B9T$5$l$^$9!#(B
 657.105 +$BNc$($P!"$"$k%j%]%8%H%j$+$i(B \hgcmd{pull} $B$7$?:]$K!"(B
 657.106 +$B$=$N%j%]%8%H%j$N(B \sfilename{.hg/hgrc} $B%U%!%$%k$,(B
 657.107 +\hook{outgoing} $B%U%C%/$rDj5A$7$F$$$?>l9g!"(B
 657.108 +$B%j%b!<%H%j%]%8%H%j$N=jM-<T$GL5$+$C$?$H$7$F$b!"(B
 657.109 +$B%U%C%/$O$"$J$?$N%"%+%&%s%H$G<B9T$5$l$^$9!#(B
 657.110 +
 657.111 +\begin{note}
 657.112 +  $B$3$N86B'$O!"(B
 657.113 +  $B%m!<%+%k%U%!%$%k%7%9%F%`$+%M%C%H%o!<%/%U%!%$%k%7%9%F%`>e$N%j%]%8%H%j$+$i(B
 657.114 +  pull $B$7$?>l9g$K$N$_E,MQ$5$l$^$9!#(B
 657.115 +  http $B$d(B ssh $B7PM3$G(B pull $B$7$?>l9g!"(B
 657.116 +  $B%U%C%/$,<B9T$5$l$k:]$N%"%+%&%s%H$O!"(B
 657.117 +  $B%5!<%P>e$G%5!<%P%W%m%;%9$r<B9T$9$k%"%+%&%s%H$G$9!#(B
 657.118 +\end{note}
 657.119 +
 657.120 +$B%j%]%8%H%j$K$*$1$k%U%C%/$NDj5A>u67$r8+$k$K$O!"(B
 657.121 +\hgcmdargs{showconfig}{hooks} $B%3%^%s%I$,MxMQ$G$-$^$9!#(B
 657.122 +$B$"$k%j%]%8%H%j$G:n6HCf$K!"(B
 657.123 +$B<+J,$N=jM-$7$F$$$J$$JL$J%j%]%8%H%j(B
 657.124 +$B$H$NO"7H!JNc!'(B \hgcmd{pull} $B$J$$$7(B \hgcmd{incoming}$B!K$,I,MW$K$J$C$?>l9g!"(B
 657.125 +$B%j%]%8%H%j$N%U%C%/Dj5A>u67$r3NG'$9$Y$-$G$9(B\footnote{$BLuCm(B:
 657.126 +``XXX'' $B$,IUM?$5$l$F$$$k$3$H$+$i86J8L$40!)(B}$B!#(B
 657.127 +
 657.128 +\subsection{Hooks do not propagate}
 657.129 +
 657.130 +Mercurial $B$G$O!"%U%C%/@_Dj$N9=@.4IM}$O9T$o$l$J$$$?$a!"(B
 657.131 +$B%j%]%8%H%j$N(B clone $B$J$$$7(B pull $B$N:]$K!"(B
 657.132 +$B%U%C%/@_Dj$OEAGE$7$^$;$s!#(B
 657.133 +$B$=$NM}M3$O4JC1$G!"%U%C%/$O40A4$KG$0U$N<B9T%3!<%I$@$+$i$G$9!#(B
 657.134 +$B%U%C%/$O!"(B
 657.135 +$B%3%^%s%I<B9T<T$N%^%7%s>e$K$*$$$F!"(B
 657.136 +$B%3%^%s%I<B9T<T$N%f!<%6%"%+%&%s%H$K$h$j!"(B
 657.137 +$B%3%^%s%I<B9T<T$N8"8B%l%Y%k$G<B9T$5$l$^$9!#(B
 657.138 +
 657.139 +$B%U%C%/$N9=@.4IM}$N<BAu$O!"(B
 657.140 +$B9=@.4IM}%7%9%F%`MxMQ<T$N%"%+%&%s%H$r<eBN2=$5$;$k>e$G!"(B
 657.141 +$BMF0W$K0-MQ2DG=$JJ}K!$rDs6!$7$F$7$^$&$?$a!"(B
 657.142 +$B$"$i$f$kJ,;69=@.4IM}%7%9%F%`$K$H$C$F6K$a$FL5KE$H8@$($^$9!#(B
 657.143 +
 657.144 +Mercurial $B$O%U%C%/$rEAGE$7$J$$$?$a!"(B
 657.145 +$B6&DL$N%W%m%8%'%/%H$G$NB>$N%a%s%P!<$H$NO"7H$N:]$K$O!"(B
 657.146 +$BH`$i$,<+J,$HF1$8(B Mercurial $B$N%U%C%/$rMxMQ$7$F$$$k$3$H$d!"(B
 657.147 +$BH`$i$,%U%C%/$r@5$7$/@_Dj$7$F$$$k$3$H$r2>Dj$7$F$O$$$1$^$;$s!#(B
 657.148 +$BH`$i$K%U%C%/$N;HMQ$r4|BT$9$k$N$G$"$l$P!"(B
 657.149 +$B$=$l$rJ8=q2=$9$Y$-$G$9!#(B
 657.150 +
 657.151 +$B4k6H$N%$%s%H%i%M%C%H$N>l9g!"(B
 657.152 +$BNc$($P(B Mercurial $B$N(B``$BI8=`E*$J(B''$B%$%s%9%H!<%k$r(B NFS $B>e$G9T$$!"(B
 657.153 +$BAH?%$G6&DL$N(B \hgrc\ $B%U%!%$%k$GA4$F$N%f!<%6$,;HMQ$9$Y$-%U%C%/$rDj5A$9$k!"(B
 657.154 +$B$H$$$C$?$3$H$,2DG=$G$"$k$?$a!"(B
 657.155 +$B%U%C%/$N4IM}$O4vJ,MF0W$K$J$j$^$9!#(B
 657.156 +$B$7$+$7!"$=$l$G$b8e=R$9$k$h$&$J@)8B$,@8$8$^$9!#(B
 657.157 +
 657.158 +\subsection{Hooks can be overridden}
 657.159 +
 657.160 +Mercurial $B$O!":FDj5A$K$h$k%U%C%/$N>e=q$-$r5v$7$F$$$^$9!#(B
 657.161 +$B%U%C%/;XDj$K6uJ8;zNs$r@_Dj$9$k$3$H$G%U%C%/@_Dj$rL58z$K$9$k$3$H$b$G$-$^$9$7!"(B
 657.162 +$B4uK>DL$j$K?6$kIq$$$rJQ$($k$3$H$b$G$-$^$9!#(B
 657.163 +
 657.164 +$B4v$D$+$N%U%C%/$rDj5A$7$?!"(B
 657.165 +$B%^%7%s$J$$$7AH?%6&DL$N(B \hgrc\ $B%U%!%$%k$rG[Hw$7$?$H$7$F$b!"(B
 657.166 +$BMxMQ<T$K$h$k%U%C%/$NL58z2=$d>e=q$-$,9T$o$l$k2DG=@-$,$"$k$3$H$r!"(B
 657.167 +$BM}2r$7$F$*$/I,MW$,$"$j$^$9!#(B
 657.168 +
 657.169 +\subsection{Ensuring that critical hooks are run}
 657.170 +
 657.171 +$BB>$N%a%s%P!<$K<B;\$7$FM_$7$/$J$$;vJA$K$D$$$FE;$a$?J}?K$r!"(B
 657.172 +$B6/@)$7$?$$$3$H$b;~$K$O$"$k$+$b$7$l$^$;$s!#(B
 657.173 +$BNc$($P!"A4$F$N%A%'%s%8%;%C%H$K$OI,$:87L)$J%F%9%H0l<0$KDL$C$F$$$FM_$7$$!"(B
 657.174 +$B$H;W$&$+$b$7$l$^$;$s!#(B
 657.175 +$B$3$NMWK>$r<B8=$9$k$?$a$K!"(B
 657.176 +$BAH?%6&DL$N(B \hgrc\ $B%U%!%$%k$G%U%C%/$rDj5A$7$?$H$7$F$b!"(B
 657.177 +$B%b%P%$%k(B PC $B$+$i%"%/%;%9$9$k1s3V%f!<%6Ey$K$O5!G=$7$^$;$s$7!"(B
 657.178 +$BL^O@%m!<%+%k%f!<%6$K$H$C$F$b%U%C%/$N>e=q$-$K$h$C$FL58z2=$,2DG=$G$9!#(B
 657.179 +
 657.180 +$B!J%W%m%8%'%/%H$K$*$1$k!K(BMercurial $B$NMxMQJ}?K$H$7$F!"(B
 657.181 +$B%a%s%P!<$,JQ99EAGE$9$k:]$K$O!"(B
 657.182 +$B4XLg$N5!G=$r2L$?$9$h$&$KE,@Z$K@_Dj$5$l$?<~CN$N(B``$B@55,(B''$B%5!<%P$rDL$9!"(B
 657.183 +$B$H:vDj$9$k$3$H$G!"(B
 657.184 +$B%U%C%/$K$h$kMxMQJ}?K$N6/@)$rBeBX$9$k$3$H$,2DG=$G$9!#(B
 657.185 +
 657.186 +$B<B8=J}K!$N0l$D$H$7$F!"(B
 657.187 +$B%=!<%7%c%k%(%s%8%K%"%j%s%0$H5;=Q$NAH$_9g$o$;$K$h$k$b$N$,$"$j$^$9!#(B
 657.188 +$B%"%/%;%9@)8BIU$-%"%+%&%s%H$rMQ0U$7!"(B
 657.189 +$BEv3:%"%+%&%s%H$G4IM}$5$l$?%j%]%8%H%j$K!"(B
 657.190 +$B3F%a%s%P!<$O%M%C%H%o!<%/7PM3$GJQ99$r(B push $B$G$-$k$h$&$K$7$^$9$,!"(B
 657.191 +$B$=$N%"%+%&%s%H$G%m%0%$%s$7$?$j!"(B
 657.192 +$BDL>o$N%7%'%k%3%^%s%I$r<B9T$7$?$j$G$-$J$$$h$&$K$7$^$9!#(B
 657.193 +$B$3$N$^$^$G$O!"(B
 657.194 +$B%a%s%P!<$O!V%4%_!W$r4^$`$h$&$J%A%'%s%8%;%C%H$N%3%_%C%H$b2DG=$G$9!#(B
 657.195 +
 657.196 +$B%a%s%P!<$,(B pull $B$9$k%5!<%P!<$X$HC/$+$,%A%'%s%8%;%C%H$r(B push $B$7$?>l9g!"(B
 657.197 +$B$=$N%A%'%s%8%;%C%H$,1JB32=$5$l$kA0$K%5!<%P!<$O%F%9%H$r<B;\(B\footnote{
 657.198 +$BLuCm(B: $B%F%9%H<B;\$O%U%C%/$G<B8=$5$l$^$9$,!"(B
 657.199 +(1) $B%U%C%/$N<B9T$O%"%/%;%9@)8BIU$-%"%+%&%s%H$N8"8B$G<B9T$5$l!"(B
 657.200 +(2) $B%j%b!<%H$+$i$N(B push $B$N>l9g$O%U%C%/$N>e=q$-$,$G$-$J$$!"(B
 657.201 +$B$H$$$&$3$H$+$i!"%;%-%e%j%F%#!&%U%C%/@_Dj$NLdBj$,6&$K2r>C$5$l$^$9!#(B}$B$7!"(B
 657.202 +$B%F%9%H0l<0$KDL$i$J$1$l$P$=$N%A%'%s%8%;%C%H$r5qH]$7$^$9!#(B
 657.203 +$B%a%s%P!<$,$3$N%U%#%k%?%5!<%P$+$i$7$+%A%'%s%8%;%C%H$N(B pull $B$r$7$J$$$N$G$"$l$P!"(B
 657.204 +$B%a%s%P!<$,(B pull $B$9$kA4$F$N%A%'%s%8%;%C%H$O!"(B
 657.205 +$B<+F0E*$KE@8!$5$l$F$$$k$3$H$,J]>Z$5$l$^$9!#(B
 657.206 +
 657.207 +\section{Care with \texttt{pretxn} hooks in a shared-access repository}
 657.208 +\label{sec:hook:carepretxn}
 657.209 +
 657.210 +$BB?$/$N?M$K$h$j6&M-$5$l$F$$$k%j%]%8%H%j$KBP$7$F!"(B
 657.211 +$B%U%C%/$K$h$k<+F0<B9T$r@_Dj$9$k>l9g!"(B
 657.212 +$B<B;\J}<0$K$OCm0U$,I,MW$G$9!#(B
 657.213 +
 657.214 +Mercurial $B$,%j%]%8%H%j$K%m%C%/$r3]$1$k$N$O!"(B
 657.215 +$B%j%]%8%H%j$K=q$-9~$_$r9T$&;~$@$1$G$"$j!"(B
 657.216 +$B3n$D%m%C%/$KBP$7$FCm0U$rJ'$&$N$O!"(B
 657.217 +Mercurial $B$N=q$-9~$_=hM}$NItJ,E*$J2U=j$@$1$G$9!#(B
 657.218 +$B=q$-9~$_%m%C%/$O!"(B
 657.219 +$BJ#?t$N=hM}$NF1;~=q$-9~$_$K$h$k%j%]%8%H%jGKB;$rKI$0$3$H$G!"(B
 657.220 +$B$*8_$$$N=q$-9~$_FbMF$rJ]8n$7$^$9!#(B
 657.221 +
 657.222 +Mercurial $B$O%G!<%?$NFI$_9~$_=q$-=P$7=g=x$KCm0U$rJ'$C$F$$$^$9$+$i!"(B
 657.223 +$B%j%]%8%H%j$+$i$N%G!<%?FI$_9~$_$N:]$K%m%C%/$OI,MW$"$j$^$;$s!#(B
 657.224 +Mercurial $B$,%j%]%8%H%j$+$i%G!<%?$rFI$_9~$`:]$K$O!"(B
 657.225 +$B%m%C%/$KBP$7$FCm0U$rJ'$$$^$;$s!#(B
 657.226 +$B%m%C%/$rI,MW$H$7$J$$$3$N;EAH$_$O!"(B
 657.227 +$B@-G=$HJ?9T@-$rBg$-$/8~>e$5$;$F$$$^$9!#(B
 657.228 +
 657.229 +$B$7$+$7$J$,$i!"(B
 657.230 +$B!V%m%C%/$5$l$J$$!W$H$$$&$3$H$O!"(B
 657.231 +$B$=$l$rCN$i$J$$$H!"(B
 657.232 +$BBg$-$J@-G=8~>e$H0z$-49$($K%H%i%V%kH/@8$N@x:_E*$J4m81@-$r;}$C$F$$$^$9!#(B
 657.233 +$B$3$N4m81@-$K$D$$$F@bL@$9$k$K$O!"(B
 657.234 +$B%j%]%8%H%j$X$N%A%'%s%8%;%C%H$NDI2C!"(B
 657.235 +$B$*$h$S$=$l$i%A%'%s%8%;%C%H$NFI$_=P$7$r!"(B
 657.236 +Mercurial $B$,$I$&$$$C$?<j=g$G9T$&$+$K$D$$$F!"(B
 657.237 +$B4vJ,>\:Y$JCN<1$,I,MW$H$J$j$^$9!#(B
 657.238 +
 657.239 +Mercurial $B$,%a%?%G!<%?$r(B\emph{$B=q$-=P$9(B}$B:]$K$O!"(B
 657.240 +$BBP>]%U%!%$%k$K%a%?%G!<%?$rD>@\=q$-=P$7$^$9!#(B
 657.241 +$B:G=i$K(B filelog $B$K%a%?%G!<%?$r=q$-=P$7!"(B
 657.242 +$B<!$K(B manifest $B$N%G!<%?!J$3$l$K$O!"(B
 657.243 +filelog $B$K=q$-=P$7$??7$7$$%G!<%?$X$N%]%$%s%?$,4^$^$l$^$9!K!"(B
 657.244 +$B$=$7$F(Bchangelog$B$N%G!<%?!J$3$l$K$O!"(B
 657.245 +manifest $B$K=q$-=P$7$??7$7$$%G!<%?$X$N%]%$%s%?$,4^$^$l$^$9!K$,=q$-=P$5$l$^$9!#(B
 657.246 +$B8D!9$N%U%!%$%k$X$N:G=i$N=q$-=P$7$NA0$K!"(B
 657.247 +Mercurial $B$O8D!9$N%U%!%$%k$N=*C<0LCV>pJs$r%H%i%s%6%/%7%g%s%m%0$K5-O?$7$^$9!#(B
 657.248 +Mercurial $B$K$h$j%H%i%s%6%/%7%g%s$,4,$-La$5$l$k:]$K$O!"(B
 657.249 +$B%H%i%s%6%/%7%g%s3+;O;~E@$N%5%$%:$K$^$G8D!9$N%U%!%$%k$,@Z$j5M$a$i$l$^$9!#(B
 657.250 +
 657.251 +Mercurial $B$,%a%?%G!<%?$r(B\emph{$BFI$_9~$`(B}$B:]$K$O!"(B
 657.252 +changelog $B$rFI$_9~$s$@8e$G$=$NB>$N%U%!%$%k$NFI$_9~$_$r9T$$$^$9!#(B
 657.253 +$B%G!<%?FI$_9~$_$N:]$K$O!"(B
 657.254 +$B@h$KFI$_9~$s$@(B changelog $B$+$iE~C#2DG=$J(B
 657.255 +manifest $B$d(B filelog $B$NItJ,$K$7$+%"%/%;%9$7$J$$$N$G!"(B
 657.256 +$BIT==J,$J=q$-=P$7Cf$N%G!<%?$rFI$`$3$H$O$"$j$^$;$s!#(B
 657.257 +
 657.258 +$B4v$D$+$N@)8fMQ%U%C%/$N!J(B\hook{pretxncommit} $B$d(B \hook{pretxnchangegroup}$B!K(B
 657.259 +$B$O!"%H%i%s%6%/%7%g%s$N40N;D>A0$K<B9T$5$l$^$9!#(B
 657.260 +$B$3$N;~E@$GA4$F$N%a%?%G!<%?$O=q$-=P$7:Q$_$G$9$,!"(B
 657.261 +Mercurial $B$O%H%i%s%6%/%7%g%s$r4,$-La$9$3$H$G!"(B
 657.262 +$B?7$?$K=q$-=P$5$l$?%G!<%?$rGK4~$9$k$3$H$,$G$-$^$9!#(B
 657.263 +
 657.264 +$B%H%i%s%6%/%7%g%s40N;A0$N%A%'%s%8%;%C%H$O1JB3@-$,3NDj$7$F$*$i$:!"(B
 657.265 +$B$=$N$?$a(B``$BK\Ev$KB8:_$9$k(B''$B$H$_$J$9$3$H$,$G$-$J$$$3$H$+$i!"(B
 657.266 +$B%H%i%s%6%/%7%g%s40N;A0$K<B9T$5$l$k@)8fMQ%U%C%/$,=*N;$^$G$KD9;~4V$rMW$9$k>l9g!"(B
 657.267 +$B1JB3@-$,3NDj$7$F$$$J$$%A%'%s%8%;%C%H$N%a%?%G!<%?$,!"(B
 657.268 +$BJ?9T$7$FF0:n$7$F$$$kB>$N=hM}$K$h$jFI$_=P$5$l$k;~4VBS$,H/@8$7$^$9!#(B
 657.269 +$B%U%C%/$N<B9T;~4V$,D9$/$J$kDx!"$3$N;~4VBS$,D9$/$J$j$^$9!#(B
 657.270 +
 657.271 +\subsection{The problem illustrated}
 657.272 +
 657.273 +$B86B'E*$K(B \hook{pretxnchangegroup} $B%U%C%/$O!"(B
 657.274 +$B=8LsMQ%j%]%8%H%j$G$N<u$1F~$lA0$K!"(B
 657.275 +$B?75,%A%'%s%8%;%C%H$N%S%k%I$d%F%9%H$r<+F02=$9$k$N$KE,$7$F$$$^$9!#(B
 657.276 +$B$3$NMQK!$O(B
 657.277 +``$B%S%k%I$r<:GT$5$;$k(B''$BJQ99$,=8LsMQ%j%]%8%H%j$KH?1G$5$l$J$$$3$H$rJ]>Z$7$^$9!#(B
 657.278 +$B$7$+$7!"(B
 657.279 +\hook{pretxnchangegroup} $B%U%C%/$K$h$k%F%9%HES>e$NJQ99$r!"(B
 657.280 +$BB>$NMxMQ<T$,(B pull $B$G$-$F$7$^$&$h$&$G$O!"(B
 657.281 +$B%F%9%H$NM-MQ@-$,L5$/$J$C$F$7$^$$$^$9!#(B
 657.282 +$B%j%]%8%H%jFbMF$N@09g@-$K5?$$$r;}$?$J$$MxMQ<T$O!"(B
 657.283 +$B%S%k%I$r<:GT$5$;$k@x:_E*$J2DG=@-$r;}$D%F%9%HL$<B;\$NJQ99$r!"(B
 657.284 +$B<+?H$N%j%]%8%H%j$X$HH?1G$7$F$7$^$&$+$i$G$9!#(B
 657.285 +
 657.286 +$B$3$N$h$&$JFqBj$X$N:G$b0BA4$J5;=QE*2rK!$O!"(B
 657.287 +``$BLgHV(B''$B%j%]%8%H%j$NMxMQ$r(B\emph{$BC1J}8~(B}$B$K8BDj$7$F$7$^$&$3$H$G$9!#(B
 657.288 +$BLgHV%j%]%8%H%j$O!"(B
 657.289 +$B30It$+$i$N%A%'%s%8%;%C%H$N(B push $B$O5v$7$F$b!"(B
 657.290 +pull $B$O$G$-$J$$$h$&$K$7$^$9(B
 657.291 +$B!J(B\hook{preoutgoing} $B%U%C%/$G$=$N$h$&$J9T0Y$r6X;_$7$^$9!K!#(B
 657.292 +$B?7$7$$%A%'%s%8%;%C%H$K$*$1$k%S%k%I$J$$$7%F%9%H$,@.8y$7$?$J$i$P!"(B
 657.293 +$B$=$N%A%'%s%8%;%C%H$rJL$J%j%]%8%H%j$X$H(B push $B$9$k$h$&$K(B
 657.294 +\hook{changegroup} $B%U%C%/$r@_Dj$7!"(B
 657.295 +$BMxMQ<T$O$=$A$i$N%j%]%8%H%j$+$i(B pull \emph{$B$G$-$k(B}$B$h$&$K$7$^$7$g$&!#(B
 657.296 +
 657.297 +$B<B:]LdBj!"(B
 657.298 +$B$3$N$h$&$J=8Ls$5$l$?%\%H%k%M%C%/$r@_$1$k$3$H$O!"(B
 657.299 +$B$"$^$jNI$$%"%$%G%#%"$G$O$J$/(B(XXXX ?)$B!"(B
 657.300 +In practice, putting a centralised bottleneck like this in place is
 657.301 +not often a good idea
 657.302 +$B%H%i%s%6%/%7%g%s$NO31L(B\footnote{$BLuCm(B: 
 657.303 +$B1JB32=L$3NDj$N%A%'%s%8%;%C%H$,8+$($F$7$^$&$3$H(B}$B$OLdBj$K$J$j$^$;$s!#(B
 657.304 +$B%A%'%s%8%;%C%H$r<h$j07$&;~4V$h$j$b$=$l$r%F%9%H$9$k$N$K;~4V$rMW$9$k>u67$G$O!"(B
 657.305 +$B%W%m%8%'%/%H$NBg$-$5(B---$B$*$h$S%S%k%I!&%F%9%H$KMW$9$k;~4V(B
 657.306 +---$B$,A}2C$9$k$[$I!"(B
 657.307 +``$B9XF~A0$N;nMQ(B''$B<jK!$K$h$jJI$NFbB&$KAGAa$/Av$j$3$a$^$9!#(BXXXXX ????
 657.308 +As the size of a project---and the time it takes to
 657.309 +build and test---grows, you rapidly run into a wall with this ``try
 657.310 +before you buy'' approach, where you have more changesets to test than
 657.311 +time in which to deal with them.  
 657.312 +$BHr$1$i$l$J$$7k2L$O!"(B
 657.313 +$B$9$Y$F$,4,$-9~$^$l$?ItJ,$K$*$1$k%U%i%9%H%l!<%7%g%s$G$9!#(BXXXXXXX ????
 657.314 +The inevitable result is frustration
 657.315 +on the part of all involved.
 657.316 +
 657.317 +$B$h$jBg5,LO2=2DG=$J<jK!$O!"(B
 657.318 +push $BA0$K3F<+$G%S%k%I!&%F%9%H$r<B;\$7$F$b$i$$!"(B
 657.319 +push $B$N(B \emph{$B8e(B}$B$KCf1{$G<+F0E*$K%S%k%I!&%F%9%H$r9T$&$3$H$G!"(B
 657.320 +$BA4$F$N%A%'%s%8%;%C%H$,NI9%$G$"$k$3$H$r3NG'$9$k!"$H$$$&$b$N$G$9!#(B
 657.321 +$B$3$N<jK!$NMxE@$O!"(B
 657.322 +$B%j%]%8%H%j$K$*$1$k%A%'%s%8%;%C%H$N<uM}?JEY$K4X$7$F!"(B
 657.323 +$B@)8B$,2]$5$l$k$3$H$,L5$$E@$K$"$j$^$9!#(B
 657.324 +
 657.325 +\section{A short tutorial on using hooks}
 657.326 +\label{sec:hook:simple}
 657.327 +
 657.328 +Mercurial $B$N%U%C%/$O4JC1$K=q$1$^$9!#(B
 657.329 +\hgcmd{commit} $B$,40N;$7$?:]$K<B9T$5$l!"(B
 657.330 +$B:n@.$7$?$P$+$j$N%A%'%s%8%;%C%H$N%O%C%7%eCM$rI=<($9$k$@$1$N!"(B
 657.331 +$B4JC1$J%U%C%/$r=q$$$F$_$^$7$g$&!#(B
 657.332 +
 657.333 +\begin{figure}[ht]
 657.334 +  \interaction{hook.simple.init}
 657.335 +  \caption{A simple hook that runs when a changeset is committed}
 657.336 +  \label{ex:hook:init}
 657.337 +\end{figure}
 657.338 +
 657.339 +$BA4$F$N%U%C%/$O!"(B\ref{ex:hook:init} $B$NNc$K$*$1$k7A<0$rF'=1$7$^$9!#(B
 657.340 + \hgrc\ $B%U%!%$%k$N(B
 657.341 +\rcsection{hooks} $B%;%/%7%g%s$K%(%s%H%j$rDI2C$7$^$9!#(B
 657.342 +$B:8JU$O<B9T7@5!$K$J$k%$%Y%s%H$NL>A0$G!"(B
 657.343 +$B1&JU$O<B9T$5$l$k=hM}$G$9!#(B
 657.344 +$B8+$F$o$+$k$h$&$K!"(B
 657.345 +$B%U%C%/$K$*$$$F$OG$0U$N%7%'%k%3%^%s%I$r<B9T$G$-$^$9!#(B
 657.346 +$B4D6-JQ?t(B
 657.347 +$B!JNc$K$*$1$k(B \envar{HG\_NODE} $B$r;2>H$7$F$/$@$5$$!K$rMQ$$$F!"(B
 657.348 +Mercurial $B$O%U%C%/$KIU2C>pJs$rEO$7$^$9!#(B
 657.349 +
 657.350 +\subsection{Performing multiple actions per event}
 657.351 +
 657.352 +\ref{ex:hook:ext} $B$NNc$K<($9$h$&$J!"(B
 657.353 +$BFCDj$N<oN`$N%$%Y%s%H$KBP$7$F#1$D0J>e$N%U%C%/$rDj5A$7$?$$>u67$,!"(B
 657.354 +$B$7$P$7$PH/@8$9$k$3$H$G$7$g$&!#(B
 657.355 +Mercurial $B$G$O!"(B
 657.356 +$B%U%C%/L>$NKvHx$K(B\emph{$B3HD%;R(B}$B$rIUM?$9$k$3$H$G!"(B
 657.357 +$BF10l%$%Y%s%H$X$NJ#?t%U%C%/$NDj5A$,2DG=$K$J$j$^$9!#(B
 657.358 +$B3HD%;R$NIUM?$O!"(B
 657.359 +$B%U%C%/L>$K!"(B
 657.360 +$B%T%j%*%I!J(B``\texttt{.}'' $BJ8;z!K$HG$0U$KA*$s$@J8;zNs$rB3$1$k$3$H$G9T$$$^$9!#(B
 657.361 +$BNc$($P!"(B
 657.362 +\texttt{commit} $B$,H/@8$7$?>l9g!"(B
 657.363 +Mercurial $B$O(B 
 657.364 +\texttt{commit.foo} $B$*$h$S(B
 657.365 +\texttt{commit.bar} $B%U%C%/$r<B9T$7$^$9!#(B
 657.366 +
 657.367 +\begin{figure}[ht]
 657.368 +  \interaction{hook.simple.ext}
 657.369 +  \label{ex:hook:ext}
 657.370 +  \caption{Defining a second \hook{commit} hook}
 657.371 +\end{figure}
 657.372 +
 657.373 +$B$"$k%$%Y%s%H$KJ#?t$N%U%C%/$,Dj5A$5$l$F$$$k:]$K!"(B
 657.374 +$B$=$N<B9T=g=x$rL@3N$KDj5A$9$k$?$a$K!"(B
 657.375 +Mercurial $B$O%U%C%/$r3HD%;R$G@0Ns$5$;!"(B
 657.376 +$B%U%C%/%3%^%s%I$r$3$N@0Ns$5$l$?=g=x$G<B9T$7$^$9!#(B
 657.377 +$B>e5-$NNc$G$O!"(B
 657.378 +\texttt{commit.foo}
 657.379 +$B$NA0$K(B
 657.380 +\texttt{commit.bar} $B$r!"(B
 657.381 +$B$3$l$i$NA0$K(B
 657.382 +\texttt{commit} $B$r<B9T$7$^$9!#(B
 657.383 +
 657.384 +$B?7$7$$%U%C%/$rDj5A$9$k:]$K!"(B
 657.385 +$B2?$i$+$N@bL@E*$J3HD%;R$r;HMQ$9$k$N$ONI$$%"%$%G%#%"$G$9!#(B
 657.386 +$B$=$&$9$k$3$H$G!"(B
 657.387 +$B$=$N%U%C%/$,2?$r$9$k$?$a$N$b$N$+$r;W$$=P$7$d$9$/$J$j$^$9!#(B
 657.388 +$B%U%C%/$N<B9T$,<:GT$7$?>l9g!"(B
 657.389 +$B%U%C%/L>$H3HD%;R$r4^$`%(%i!<%a%C%;!<%8$,I=<($5$l$^$9$+$i!"(B
 657.390 +$B%U%C%/$,<:GT$7$?M}M3$K4X$7$F!"(B
 657.391 +$B@bL@E*$J3HD%;R$+$iB(@=$N%R%s%H$rF@$k$3$H$,$G$-$^$9(B
 657.392 +$B!JNc$K4X$7$F$O!"(B\ref{sec:hook:perm}~$B@a$r;2>H$7$F$/$@$5$$!K!#(B
 657.393 +
 657.394 +\subsection{Controlling whether an activity can proceed}
 657.395 +\label{sec:hook:perm}
 657.396 +
 657.397 +$B@h$NNc$G$O!"(B
 657.398 +$B%3%_%C%HA`:n$,40N;$7$?8e$G<B9T$5$l$k(B
 657.399 +\hook{commit} $B%U%C%/$r;HMQ$7$^$7$?!#(B
 657.400 +$B$3$N%U%C%/$O!"(B
 657.401 +$BA`:n$,40N;$7$?8e$G<B9T$5$l$k(B Mercurial $B$N%U%C%/$N#1$D$G$9!#(B
 657.402 +$B$3$l$i$N%U%C%/$O!"A`:n$=$N$b$N$K1F6A$r5Z$\$9$3$H$O$"$j$^$;$s!#(B
 657.403 +
 657.404 +Mercurial $B$G$O!"(B
 657.405 +$BA`:n$,3+;O$5$l$kA0$d!"(B
 657.406 +$BA`:n$,40N;$9$k$^$G$N4V$KH/@8$9$k%$%Y%s%H$,Dj5A$5$l$F$$$^$9!#(B
 657.407 +$B$3$l$i$N%$%Y%s%H$N:]$K5/F0$5$l$k%U%C%/$O!"(B
 657.408 +$BA`:n$r7QB32DG=$+CfCG$9$Y$-$+$rH=CG$9$k$3$H$,$G$-$^$9!#(B
 657.409 +
 657.410 +\hook{pretxncommit} $B%U%C%/$O!"(B
 657.411 +$B%3%_%C%HA`:n$,35$M=*N;$7$?8e!"%3%_%C%H$,40N;$9$kA0$NCJ3,$G5/F0$5$l$^$9!#(B
 657.412 +$B8@$$49$($k$J$i!"(B
 657.413 +$B%A%'%s%8%;%C%H$rI=$9%a%?%G!<%?$,%G%#%9%/$K=q$-9~$^$l$F$O$$$k$b$N$N!"(B
 657.414 +$B%H%i%s%6%/%7%g%s$,L$$@40N;$7$F$$$J$$>u67$G5/F0$5$l$^$9!#(B
 657.415 +\hook{pretxncommit} $B%U%C%/$O!"(B
 657.416 +$B%H%i%s%6%/%7%g%s$r40N;$5$;$k$N$+!"(B
 657.417 +$B$"$k$$$O4,$-La$9$Y$-$+$r7hDj$9$k$3$H$,$G$-$^$9!#(B
 657.418 +
 657.419 +\hook{pretxncommit} $B%U%C%/$,=*N;>uBVCM$H$7$F#0$rJV5Q$7$?>l9g!"(B
 657.420 +$B%H%i%s%6%/%7%g%s$O40N;$7!"%3%_%C%HA`:n$O=*N;$7$^$9$N$G!"(B
 657.421 +\hook{commit} $B%U%C%/$,<B9T$5$l$^$9!#(B
 657.422 +\hook{pretxncommit} $B%U%C%/$,=*N;>uBV$H$7$FHs#0$rJV5Q$7$?>l9g!"(B
 657.423 +$B%H%i%s%6%/%7%g%s$O4,$-La$5$l!"(B
 657.424 +$B%A%'%s%8%;%C%H$rI=$9%a%?%G!<%?$O:o=|$5$l!"(B
 657.425 +\hook{commit} $B%U%C%/$O<B9T$5$l$^$;$s!#(B
 657.426 +
 657.427 +\begin{figure}[ht]
 657.428 +  \interaction{hook.simple.pretxncommit}
 657.429 +  \label{ex:hook:pretxncommit}
 657.430 +  \caption{Using the \hook{pretxncommit} hook to control commits}
 657.431 +\end{figure}
 657.432 +
 657.433 +$BNc(B~\ref{ex:hook:pretxncommit} $BCf$N%U%C%/$O!"(B
 657.434 +$B%3%_%C%H;~$N%3%a%s%H$,%P%0(BID$B$r4^$s$G$$$k$3$H$r3NG'$7$F$$$^$9!#(B
 657.435 +$B%3%a%s%H$,%P%0(BID$B$r4^$s$G$$$k>l9g!"%3%_%C%H$O40N;$7$^$9!#(B
 657.436 +$B$=$&$G$J$1$l$P!"%3%_%C%HA`:n$O4,$-La$5$l$^$9!#(B
 657.437 +
 657.438 +\section{Writing your own hooks}
 657.439 +
 657.440 +\hggopt{-v} $B%*%W%7%g%sIU$-!"(B
 657.441 +$B$"$k$$$O(B\rcitem{ui}{verbose} $B@_Dj9`L\$r(B``true''$B$K$7$F(B
 657.442 +Mercurial $B$r<B9T$9$k$N$,!"(B
 657.443 +$B%U%C%/<BAu$N:]$K$OM-MQ$G$"$k$3$H$K5$IU$/$+$b$7$l$^$;$s!#(B
 657.444 +$B$3$N$h$&$K$7$F(B Mercurial $B$r<B9T$9$k$3$H$G!"(B
 657.445 +$B$=$l$>$l$N%U%C%/$r5/F0$9$k:]$K;vA0$K%a%C%;!<%8$rI=<($7$^$9!#(B
 657.446 +
 657.447 +\subsection{Choosing how your hook should run}
 657.448 +\label{sec:hook:lang}
 657.449 +
 657.450 +$B%U%C%/$r<BAu$9$k:]$K$O!"DL>o$N%W%m%0%i%`(B---$BE57?E*$K$O%7%'%k%9%/%j%W%H(B---
 657.451 +$B$H$7$F$b<BAu$G$-$^$9$,!"(B
 657.452 +Python $B4X?t$H$7$F$b<BAu$G$-!"(B
 657.453 +$B$=$N>l9g$O(B Mercurial $B%W%m%;%9Fb$G<B9T$5$l$^$9!#(B
 657.454 +
 657.455 +$B30It%W%m%0%i%`$H$7$F%U%C%/$r<BAu$9$kMxE@$O!"(B
 657.456 +Mercurial $B$NFbIt;v>p$K4X$7$FCN$kI,MW$,L5$$E@$K$"$j$^$9!#(B
 657.457 +$BIU2CE*$J>pJs$N<hF@$N$?$a$K!"(B
 657.458 +$BDL>o$N(B Mercurial $B%3%^%s%I$r5/F0$9$k$3$H$b$G$-$^$9!#(B
 657.459 +$B$=$NMxE@$H0z$-49$($K!"30It!J%W%m%0%i%`$H$7$F$N!K%U%C%/$O!"(B
 657.460 +$B%W%m%;%9Fb%U%C%/$h$j$bDcB.(B\footnote{$BLuCm(B:
 657.461 +$B8e=R$5$l$^$9$,!"(B
 657.462 +$B30It%W%m%0%i%`$K$h$k%U%C%/$,!VDcB.!W$G$"$k$N$O!"(B
 657.463 +(1)$B30It%W%m%;%9$H$7$F$N%U%C%/5/F0$H!"(B
 657.464 +(2)Mercurial $B%j%]%8%H%j$X$N%"%/%;%9$K4X$9$kItJ,$G!"(B
 657.465 +$B30It%W%m%;%9$N<B9T$=$N$b$N$,DcB.$J$o$1$G$O$"$j$^$;$s!#(B}$B$G$9!#(B
 657.466 +
 657.467 +Python $B4X?t$K$h$k%W%m%;%9Fb%U%C%/$O!"(B
 657.468 +$BA4$F$N(B Mercurial API $B$K%"%/%;%9$G$-!"(B
 657.469 +$BB>$N%W%m%;%9$r(B``$B@8@.(B''$B$9$kI,MW$O$"$j$^$;$s$N$G!"(B
 657.470 +$B4pK\E*$K30It%U%C%/$h$j$b9bB.$G$9!#(B
 657.471 +$B%U%C%/$,I,MW$H$9$kB?$/$N>pJs$NF~<j$b!"(B
 657.472 +Mercurial $B%3%^%s%I$+$iF@$k$h$j$b!"(B
 657.473 +Mercurial API $B$+$iF@$kJ}$,MF0W$G$9!#(B
 657.474 +
 657.475 +Python $B$NMxMQ$,6l$K$J$i$J$$$+!"(B
 657.476 +$B9b$$<B9T@-G=$,MW5a$5$l$k>l9g!"(B
 657.477 +Python $B$G$N%U%C%/<BAu$rA*Br$9$Y$-$G$9!#(B
 657.478 +$B$7$+$7$J$,$i!"(B
 657.479 +$B4JC1$J%U%C%/$G!"(B
 657.480 +$B@-G=$r5$$K$9$kI,MW$,L5$$!J$*$=$i$/B?$/$N%U%C%/$,$=$&$G$9!K$N$G$"$l$P!"(B
 657.481 +$B%7%'%k%9%/%j%W%H$G$N<BAu$G==J,$G$9!#(B
 657.482 +
 657.483 +\subsection{Hook parameters}
 657.484 +\label{sec:hook:param}
 657.485 +
 657.486 +Mercurial $B$,%U%C%/$r5/F0$9$k:]$K$O!"(B
 657.487 +$BL@3N$KDj5A$5$l$?%Q%i%a!<%?$,%U%C%/$KEO$5$l$^$9!#(B
 657.488 +Python $B$G$N%U%C%/<BAu$N>l9g!"(B
 657.489 +$B%Q%i%a!<%?$O%-!<%o!<%I0z?t$H$7$F%U%C%/4X?t$KEO$5$l$^$9!#(B
 657.490 +$B30It%W%m%0%i%`$G$N%U%C%/<BAu$N>l9g!"(B
 657.491 +$B%Q%i%a!<%?$O4D6-JQ?t$H$7$FEO$5$l$^$9!#(B
 657.492 +
 657.493 +$B%U%C%/<BAu$,(B Python $B!&%7%'%k%9%/%j%W%H$N$$$:$l$G$"$k$+$G!"(B
 657.494 +$B%U%C%/8GM-$N%Q%i%a!<%?L>$H$=$NCM$,7h$^$j$^$9(B\footnote{$BLuCm(B:
 657.495 +$B86J8$O(B
 657.496 +$B!V(BWhether your hook is written in Python or as a shell script, the
 657.497 +hook-specific parameter names and values will be the ``same''$B!W(B}
 657.498 +$B??56CM%Q%i%a!<%?$O!"(BPython $B%U%C%/$G$O??56CM7?$H$7$FI=8=$5$l$^$9$,!"(B
 657.499 +$B30It%U%C%/$KBP$7$F$O(B ``1''$B!J(B``true'' $BCM$H$7$F!K$J$$$7(B 
 657.500 +``0''$B!J(B``false'' $BCM$H$7$F!K$r;}$D4D6-JQ?t$GI=8=$5$l$^$9!#(B
 657.501 +$B%U%C%/%Q%i%a!<%?$,(B \texttt{foo} $B$H$$$&L>A0$G$"$k>l9g!"(B
 657.502 +Python $B%U%C%/$N%-!<%o!<%I0z?t$NL>A0$b(B \texttt{foo} $B$G$9$,!"(B
 657.503 +$B30It%U%C%/$N4D6-JQ?tL>$O(B \texttt{HG\_FOO} $B$H$J$j$^$9!#(B
 657.504 +
 657.505 +\subsection{Hook return values and activity control}
 657.506 +
 657.507 +$B<B9T$,@.8y$7$?%U%C%/$O!"30It%U%C%/$N>l9g$O=*N;%3!<%I#0$G!"(B
 657.508 +$B%W%m%;%9Fb%U%C%/$N>l9g$O??56CM(B``False''$B$G=*N;$7$J$1$l$P$J$j$^$;$s(B
 657.509 +\footnote{$BLuCm(B:Mercurial $B$NG[I[J*$K4^$^$l$k(B hgext $BG[2<$N%U%C%/$O!"(B
 657.510 +$B7k9=$J3NN($G!"(B
 657.511 +False $BL5$7$N(B return $B$d!"(B
 657.512 +$BL@<(E*$J(B return $BL5$7$N<BAu$G$9$,!"(B
 657.513 +Python $B$N8@8l;EMM>e!"(B
 657.514 +$B$3$l$i$O(B False $B$H(B``$B$[$\Ey2A(B''$B$J(B None $B$H$_$J$5$l$^$9!#(B}$B!#(B
 657.515 +$B%U%C%/$N<B9T<:GT$O!"(B
 657.516 +$B30It%U%C%/$N>l9g$OHs#0$N=*N;%3!<%I$G!"(B
 657.517 +$B%W%m%;%9Fb%U%C%/$N>l9g$O??56CM(B``true''$B$GI=$5$l$^$9!#(B
 657.518 +$B%W%m%;%9Fb$U$C$/$,Nc30$rIbMH$7$?>l9g!"(B
 657.519 +$B%U%C%/<B9T$O<:GT$7$?$H8+Pv$5$l$^$9!#(B
 657.520 +
 657.521 +$BA`:n$N7QB3@-$r@)8f$G$-$k%U%C%/$N>l9g!"(B
 657.522 +$B#0!?(Bfalse $B$O7QB3$N(B``$B5v2D(B''$B$r!"(B
 657.523 +$BHs#0!?(Btrue$B!?Nc30$O(B``$B5qH](B''$B$r0UL#$7$^$9!#(B
 657.524 +
 657.525 +\subsection{Writing an external hook}
 657.526 +
 657.527 +\hgrc\ $B%U%!%$%k$K30It%U%C%/$r5-=R$7$?>l9g!"(B
 657.528 +\hgrc\ $B%U%!%$%k$K5-=R$7$?%U%C%/$NFbMF$O!"(B
 657.529 +$B%7%'%k%W%m%;%9$KEO$5$l!"(B
 657.530 +$B$=$N%7%'%k%W%m%;%9$K$h$C$F2r<a$5$l$^$9!#(B
 657.531 +$B$3$l$O!"%U%C%/5-=R$NK\BN$K!"(B
 657.532 +$BDL>o$N%7%'%k%3%^%s%I%i%$%s$HF1MM$N9=B$$rMQ$$$k$3$H$,$G$-$k!"(B
 657.533 +$B$H$$$&$3$H$r0UL#$7$F$$$^$9!#(B
 657.534 +
 657.535 +$B<B9T2DG=$J%U%C%/$O!"(B
 657.536 +$B>o$K%j%]%8%H%j$N%k!<%H%G%#%l%/%H%jD>2<$G<B9T$5$l$^$9!#(B
 657.537 +
 657.538 +$B8D!9$N%U%C%/%Q%i%a!<%?$O4D6-JQ?t7PM3$GEO$5$l$^$9$,!"(B
 657.539 +$B4D6-JQ?tL>$K$O!"(B
 657.540 +$BBgJ8;z2=$5$l!"@\F,<-$H$7$F(B``\texttt{HG\_}''$B$,IUM?$5$l$?L>A0$,MQ$$$i$l$^$9!#(B
 657.541 +
 657.542 +$B%U%C%/%Q%i%a!<%?$rNc30$H$9$l$P!"(B
 657.543 +Mercurial $B$O%U%C%/<B9T;~$K4D6-JQ?t$N2~JQ$r9T$$$^$;$s!#(B
 657.544 +$B$=$l$>$l$K0[$J$k4D6-JQ?t@_Dj$r$7$F$$$kB?$/$N%f!<%6$K$h$C$F<B9T$5$l$k!"(B
 657.545 +$BAH?%A4BN$G6&MQ$5$l$k%U%C%/$r<BAu$9$k:]$K$O!"(B
 657.546 +$B$3$NCN<1$,Lr$KN)$D$G$7$g$&!#(B
 657.547 +$BJ#?t%f!<%6$K$h$j<B9T$5$l$k>u672<$G$O!"(B
 657.548 +$B%U%C%/$N;n834D6-$G@_Dj$5$l$F$$$?4D6-JQ?t$,!"(B
 657.549 +$B<B9T;~$K@_Dj$5$l$F$$$k$3$H$r4|BT$7$F$O$$$1$^$;$s!#(B
 657.550 +
 657.551 +\subsection{Telling Mercurial to use an in-process hook}
 657.552 +
 657.553 +$B%W%m%;%9Fb%U%C%/$r(B \hgrc\ $B%U%!%$%k$G@_Dj$9$k:]$NJ8K!$O!"(B
 657.554 +$B<B9T2DG=%U%C%/(B\footnote{$BLuCm(B: $B!V30It%U%C%/!W$N0U(B
 657.555 +}$B@_Dj$N:]$N$=$l$H$O>/!90[$J$j$^$9(B
 657.556 +$B%U%C%/@_Dj$O!"(B
 657.557 +$B@\F,<-(B``\texttt{python:}''$B$KB3$-!"(B
 657.558 +$B%U%C%/$H$7$F;HMQ$9$k8F$S=P$72DG=%*%V%8%'%/%H(B\footnote{$BLuCm(B: 
 657.559 +callable object}$B$N40A4=$>~$5$l$?L>A0$,5-=R$5$l$F$$$J$1$l$P$J$j$^$;$s!#(B
 657.560 +
 657.561 +$B%U%C%/Dj5A$,B8:_$9$k%b%8%e!<%k$O!"(B
 657.562 +$B%U%C%/<B9T;~$K<+F0E*$K(B import $B$5$l$^$9!#(B
 657.563 +$B%b%8%e!<%kL>$H(B \envar{PYTHONPATH} $B@_Dj$,@5$7$1$l$P!"(B
 657.564 +$B$-$C$HF0:n$9$kH&$G$9(B\footnote{$BLuCm(B: ``just work'' $B$N%K%e%"%s%9$O!)(B}$B!#(B
 657.565 +
 657.566 +$B0J2<$K<($9(B \hgrc\ $B%U%!%$%k$N0zMQNc$O!"(B
 657.567 +$BA0=R$7$?I=5-$K4X$9$kJ8K!$H0UL#$rNc<($7$F$$$^$9!#(B
 657.568 +
 657.569 +\begin{codesample2}
 657.570 +  [hooks]
 657.571 +  commit.example = python:mymodule.submodule.myhook
 657.572 +\end{codesample2}
 657.573 +
 657.574 +Mercurial $B$,(B \texttt{commit.example} $B%U%C%/$r5/F0$9$k:]$K$O!"(B
 657.575 +\texttt{mymodule.submodule} $B$r(B import $B$7!"(B
 657.576 +\texttt{myhook} $B$H$$$&L>A0$N8F$S=P$72DG=%*%V%8%'%/%H$rC5$7=P$7$F5/F0$7$^$9!#(B
 657.577 +
 657.578 +\subsection{Writing an in-process hook}
 657.579 +
 657.580 +$B0J2<$K<($9:G$bC1=c$J%W%m%;%9Fb%U%C%/$O!"(B
 657.581 +$B%U%C%/$H$7$F$O2?$b$7$^$;$s$,!"(B
 657.582 +$B%U%C%/(B API $B$N4pK\E*$J35MW$rNc<($G$-$^$9!#(B
 657.583 +
 657.584 +\begin{codesample2}
 657.585 +  def myhook(ui, repo, **kwargs):
 657.586 +      pass
 657.587 +\end{codesample2}
 657.588 +
 657.589 +Python $B%U%C%/(B\footnote{$BLuCm!'%W%m%;%9Fb%U%C%/$N0U(B}$B$N:G=i$N0z?t$O!"(B
 657.590 +$B>o$K(B \pymodclass{mercurial.ui}{ui} $B%*%V%8%'%/%H$G$9!#(B
 657.591 +$BBh#20z?t$O%j%]%8%H%j%*%V%8%'%/%H$G$9$,!"(B
 657.592 +$B8=:_$N(B Mercurial $B$N<BAu$G$O!"(B
 657.593 +$B$=$N%$%s%9%?%s%9$O>o$K(B \pymodclass{mercurial.localrepo}{localrepository} $B$G$9!#(B
 657.594 +$B$3$l$i$KB3$/$=$NB>$N0z?t$O%-!<%o!<%I0z?t$H$7$FEO$5$l$^$9!#(B
 657.595 +$BEO$5$l$kFbMF$O5/F0$5$l$k%U%C%/!J$N<oN`!K$K0MB8$7$^$9$,!"(B
 657.596 +$B>e5-Nc$K$*$1$k(B \texttt{**kwargs} $B$N$h$&$K!"(B
 657.597 +$B%-!<%o!<%I0z?t<-=q$KMn$H$79~$`(B\footnote{XXXXX:
 657.598 +Python $B8GM-$NLu8l$r3NG'(B}$B$3$H$G!"(B
 657.599 +$B6=L#$NL5$$0z?t$rL5;k$9$k$3$H$,$G$-$^$9!#(B
 657.600 +
 657.601 +\section{Some hook examples}
 657.602 +
 657.603 +\subsection{Writing meaningful commit messages}
 657.604 +
 657.605 +$BM-MQ$J%3%_%C%H%a%C%;!<%8$,Hs>o$KC;$$!"(B
 657.606 +$B$H$$$&>u67$OA[A|$7Fq$$$b$N$,$"$j$^$9!#(B
 657.607 +$B?^(B~\ref{ex:hook:msglen.go} $B$K<($9C1=c$J(B
 657.608 +\hook{pretxncommit} $B%U%C%/$O!"(B
 657.609 +$B#1#0%P%$%H$h$j$bC;$$%a%C%;!<%8$G$N%A%'%s%8%;%C%H$N%3%_%C%H$rK8$2$^$9!#(B
 657.610 +
 657.611 +\begin{figure}[ht]
 657.612 +  \interaction{hook.msglen.go}
 657.613 +  \caption{A hook that forbids overly short commit messages}
 657.614 +  \label{ex:hook:msglen.go}
 657.615 +\end{figure}
 657.616 +
 657.617 +\subsection{Checking for trailing whitespace}
 657.618 +
 657.619 +$B%3%_%C%H$K4X$9$k6=L#?<$$%U%C%/$NMxMQ$O!"(B
 657.620 +$Be:No$J%3!<%I$G$N<BAu$rJd=u$9$k$H$$$&$b$N$G$9!#(B
 657.621 +$B4JC1$J(B``$Be:No$J%3!<%I(B''$B$NNc$H$7$F$O!"(B
 657.622 +$BJQ99$,DI2C$9$k?7$7$$9T$K$O(B``$BKvHx6uGr(B''$B$,4^$^$l$F$$$F$O$J$i$J$$!"(B
 657.623 +$B$H$$$&3J8@$,$"$j$^$9!#(B
 657.624 +$BKvHx6uGr$H$O!"(B
 657.625 +$B6uGrJ8;z$*$h$S%?%V!J(Btab$B!KJ8;z$NO"B3$,9TKv$K$"$k$3$H$r0UL#$7$^$9!#(B
 657.626 +$BB?$/$N>l9g!"(B
 657.627 +$BKvHx6uGr$OI,MW$NL5$$IT2D;k$N;(2;$_$?$$$J$b$N$G$9$,!"(B
 657.628 +$B;~$K$OLdBj$r4^$`$3$H$+$i!"(B
 657.629 +$B$=$l$i$,<h$j=|$+$l$k$3$H$rK>$_$^$9!#(B
 657.630 +
 657.631 +\hook{precommit} $B$H(B \hook{pretxncommit} $B$N$$$:$l$N%U%C%/$G$b!"(B
 657.632 +$BKvHx6uGrLdBj$rDLCN$9$k$3$H$,2DG=$G$9!#(B
 657.633 +\hook{precommit} $B%U%C%/$r;HMQ$7$?>l9g!"(B
 657.634 +$B%U%C%/$O%3%_%C%HBP>]%U%!%$%k$rCN$k$3$H$,$G$-$J$$$N$G!"(B
 657.635 +$B%j%]%8%H%jCf$NJQ99$5$l$?%U%!%$%kA4$F$KBP$7$FKvHx6uGr$r3NG'$7$F$7$^$$$^$9!#(B
 657.636 +$B$=$&$9$k$H!"(B
 657.637 +$B%U%!%$%k(B \filename{foo} $B$NJQ99$N$_$r%3%_%C%H$7$?$$>l9g$G$b!"(B
 657.638 +\filename{bar} $B%U%!%$%k$,KvHx6uGr$r4^$s$G$$$?$J$i!"(B
 657.639 +\hook{precommit} $B%U%C%/$G$N%A%'%C%/$O!"(B
 657.640 +\filename{bar} $B$NLdBj$rM}M3$K(B \filename{foo} $B$N%3%_%C%H$rK8$2$F$7$^$$$^$9!#(B
 657.641 +$B$3$l$G$O$$$1$^$;$s!#(B
 657.642 +
 657.643 +\hook{pretxncommit} $B%U%C%/$G<B8=$9$k>l9g!"(B
 657.644 +$B%3%_%C%H$N%H%i%s%6%/%7%g%s$,40N;$9$kD>A0$^$G%A%'%C%/$,9T$o$l$^$;$s!#(B
 657.645 +$B$3$N$?$a!"KvHx6uGrLdBj$N3NG'$r!"(B
 657.646 +$B87L)$K%3%_%C%HBP>]$N%U%!%$%k$@$1$K9T$&$3$H$,$G$-$^$9!#(B
 657.647 +$B$7$+$7!"(B
 657.648 +$B%3%_%C%H%a%C%;!<%8$rBPOCE*$KF~NO$7$?8e$G$"$C$F$b!"(B
 657.649 +$B%U%C%/$N<B9T$,<:GT(B\footnote{
 657.650 +$BLuCm(B: $BKvHx6uGr$,8!=P$5$l$k$3$H$G$N!V<:GT!W(B}$B$7$?>l9g!"(B
 657.651 +$B%H%i%s%6%/%7%g%s$O4,$-La$5$l$F$7$^$$$^$9$N$G!"(B
 657.652 +$BKvHx6uGr$r<h$j=|$$$?8e$G:F$S(B \hgcmd{commit} $B%3%^%s%I<B9T$7$?:]$K$O!"(B
 657.653 +$B$b$&0lEY%3%_%C%H%a%C%;!<%8$rF~NO$9$kI,MW$,$"$j$^$9!#(B
 657.654 +
 657.655 +\begin{figure}[ht]
 657.656 +  \interaction{hook.ws.simple}
 657.657 +  \caption{A simple hook that checks for trailing whitespace}
 657.658 +  \label{ex:hook:ws.simple}
 657.659 +\end{figure}
 657.660 +
 657.661 +$B?^(B~\ref{ex:hook:ws.simple} $B$G$O!"(B
 657.662 +$BKvHx6uGr$r%A%'%C%/$9$k4JC1$J(B
 657.663 +\hook{pretxncommit} $B%U%C%/$r>R2p$7$F$$$^$9!#(B
 657.664 +$B$3$N%U%C%/$OC;$$$G$9$,!"Hs>o$KM-MQ$G$9!#(B
 657.665 +$BJQ99$K$h$j2?$l$+$N%U%!%$%k$KBP$7$FKvHx6uGr$r4^$`9T$,DI2C$5$l$?>l9g!"(B
 657.666 +$B$3$N%U%C%/$O%(%i!<%9%F!<%?%9$G=*N;$7$^$9$,!"(B
 657.667 +$BITL{2w$J%U%!%$%k$d9T$NFCDj$rJd=u$9$k>pJs$r2?$iI=<($7$^$;$s(B\footnote{$BLuCm!'(B
 657.668 +$B%U%C%/<B9T$N%3%^%s%I%i%$%s$+$i$o$+$k$h$&$K!"(B
 657.669 +export $B=PNO!J!a(B patch $B7A<0!K$KBP$7$F(B (e)grep $B$rE,MQ$7$F$$$^$9$+$i!"(B
 657.670 +$B%U%!%$%kL>$d9THV9f$KBP$7$F$O2?$iG'<1$5$l$F$$$^$;$s!#(B}$B!#(B
 657.671 +$B$3$N%U%C%/$O!"(B
 657.672 +$B2~JQ$5$l$F$$$J$$9T$K$OCm0U$rJ'$o$:!"(B
 657.673 +$BKvHx6uGrLdBj$r;}$A9~$`9T$K$N$_Cm0U$rJ'$&!"(B
 657.674 +$B$H$$$&M%$l$?FC<A$b;}$C$F$$$^$9!#(B
 657.675 +
 657.676 +\begin{figure}[ht]
 657.677 +  \interaction{hook.ws.better}
 657.678 +  \caption{A better trailing whitespace hook}
 657.679 +  \label{ex:hook:ws.better}
 657.680 +\end{figure}
 657.681 +
 657.682 +$B?^(B~\ref{ex:hook:ws.better} $B$O@h$NNc$h$j$OJ#;($G$9$,!"(B
 657.683 +$B$h$jM-MQ$J%U%C%/$NNc$r<($7$F$$$^$9(B\footnote{$BLuCm(B:
 657.684 +check\_whitespace.py $B$NFbMF$,ITL@!#(B
 657.685 +$B?^Cf$G%=!<%9$r(B cat $B$9$Y$-(B XXXX}$B!#(B
 657.686 +$B$3$N%U%C%/$O(B unified diff $B7A<0$r2r@O$7$F!"(B
 657.687 +$BKvHx6uGr$rDI2C$9$k9T$NM-L5$rH=Dj$7!"(B
 657.688 +$B$=$N$h$&$J%U%!%$%k$NL>A0$H9THV9f$rI=<($7$^$9!#(B
 657.689 +$B$=$l$K2C$($F$3$N%U%C%/$O!"(B
 657.690 +$B%A%'%s%8%;%C%H$,KvHx6uGr$rDI2C$9$k$3$H$r8!CN$7$?>l9g!"(B
 657.691 +$B<B9T$r=*N;$7$F(B Mercurial $B$K%H%i%s%6%/%7%g%s$N4,$-La$7$rEA$($kA0$K!"(B
 657.692 +$B%3%_%C%H%a%C%;!<%8$rJ]B8$7$F$=$N%U%!%$%kL>$rI=<($7$^$9$N$G!"(B
 657.693 +$BLdBjE@$r=$@5$7$?8e$N%3%_%C%H$N:]$K$O!"(B
 657.694 +\hgcmdargs{commit}{\hgopt{commit}{-l}~\emph{filename}}
 657.695 +$B$r;H$C$F%3%_%C%H%a%C%;!<%8$r:FMxMQ$9$k$3$H$,$G$-$^$9!#(B
 657.696 +
 657.697 +$B?^(B~\ref{ex:hook:ws.better}
 657.698 +$B%U%!%$%k$+$iKvHx6uGr$r<h$j=|$/(B
 657.699 +\command{perl} $B$N0l9T5-=R$NMQK!$r<($7$^$9!#(B
 657.700 +$B$3$NJ}K!$O$3$3$K:F7G$9$k$KB-$k$@$1$N!"(B
 657.701 +$B4J7i$5$HM-MQ@-$r;}$C$F$$$^$9(B\footnote{$BLuCm(B: 
 657.702 +$B%3!<%I$NI=<($,!J(BHTML $B7A<0$@$H!K#29T$KJ,3d$5$l$F$$$k(B XXXX}$B!#(B
 657.703 +
 657.704 +\begin{codesample2}
 657.705 +  perl -pi -e 's,\\s+\$,,' filename
 657.706 +\end{codesample2}
 657.707 +
 657.708 +\section{Bundled hooks}
 657.709 +
 657.710 +Mercurial $B$NG[I[HG$K$O!"4v$D$+$N%U%C%/$,E:IU$5$l$F$$$^$9!#(B
 657.711 +$BE:IU%U%C%/$O(B Mercurial $B%=!<%9%D%j!<$N(B
 657.712 +\dirname{hgext} $B%G%#%l%/%H%j$K3JG<$5$l$F$$$^$9!#(B
 657.713 +Mercurial $B$N%P%$%J%jG[I[HG$r;HMQ$7$F$$$k>l9g$K$O!"(B
 657.714 +$B%Q%C%1!<%8$N%$%s%9%H!<%i!<$,(B
 657.715 +Mercurial $B$r%$%s%9%H!<%k$7$?0LCV$K$"$k(B
 657.716 +\dirname{hgext} $B%G%#%l%/%H%j$K3JG<$5$l$F$$$^$9!#(B
 657.717 +
 657.718 +\subsection{\hgext{acl}---access control for parts of a repository}
 657.719 +
 657.720 +\hgext{acl} $B3HD%$K$h$j!"(B
 657.721 +$B%M%C%H%o!<%/>e$N%5!<%P$KBP$7$F%A%'%s%8%;%C%H$r(B
 657.722 +push $B2DG=$J1s3V%f!<%6$r@)8B$9$k$3$H$,$G$-$^$9!#(B
 657.723 +$B%j%]%8%H%j$N0lIt!JL^O@A4BN$b!K$rJ]8n$9$k$3$H$,$G$-$^$9$N$G!"(B
 657.724 +$BFCDj$N%f!<%6$KBP$7$F$O!"(B
 657.725 +$BJ]8n$5$l$?ItJ,$K1F6A$r5Z$\$5$J$$%A%'%s%8%;%C%H$N$_$N(B push $B$,2DG=$G$9!#(B
 657.726 +
 657.727 +$B$3$N3HD%$O(B
 657.728 +push $BBP>]$N%A%'%s%8%;%C%H$r%3%_%C%H$7$?%f!<%6(B\emph{$B$G$O$J$/(B}$B!"(B
 657.729 +push $B$r<B;\$9$k%f!<%6$N?H85>pJs$r85$K%"%/%;%9@)8f$r9T$$$^$9!#(B
 657.730 +$B1s3V%f!<%6$rG'>Z$9$k4F6X!J(Block-downed$B!K%5!<%P$,B8:_$9$k4D6-$G!"(B
 657.731 +$BFCDj$N%f!<%6$@$1$,4F6X%5!<%P$X$N%A%'%s%8%;%C%H$N(B
 657.732 +push $B$,5v$5$l$k$3$H$r3N<B$K$7$?$$>l9g$G$J$1$l$P!"(B
 657.733 +$B$3$N%U%C%/$N;HMQ$O0UL#$,$"$j$^$;$s!#(B
 657.734 +
 657.735 +\subsubsection{Configuring the \hook{acl} hook}
 657.736 +
 657.737 +$B;}$A9~$^$l$k%A%'%s%8%;%C%H$r4IM}$9$k$?$a$K!"(B
 657.738 +\hgext{acl} $B%U%C%/$O(B
 657.739 +\hook{pretxnchangegroup} $B%U%C%/$H$7$FMQ$$$^$9!#(B
 657.740 +\hook{pretxnchangegroup} $B%U%C%/$H$7$FMQ$$$i$l$k$3$H$G!"(B
 657.741 +$B30Mh$N%A%'%s%8%;%C%H$K$h$jJQ99$5$l$k%U%!%$%k$rCN$k$3$H$,$G$-$k$?$a!"(B
 657.742 +``$B6X;_$5$l$F$$$k(B''$B%U%!%$%k$X$NJQ99$r9T$&%A%'%s%8%;%C%H72$KBP$7$F$O!"(B
 657.743 +$B%H%i%s%6%/%7%g%s$N4,$-La$7$,9T$o$l$^$9!#(B
 657.744 +
 657.745 +\begin{codesample2}
 657.746 +  [hooks]
 657.747 +  pretxnchangegroup.acl = python:hgext.acl.hook
 657.748 +\end{codesample2}
 657.749 +
 657.750 +\hgext{acl} $B3HD%$O#3$D$N%;%/%7%g%s$G@_Dj$5$l$^$9!#(B
 657.751 +
 657.752 +\rcsection{acl} $B%;%/%7%g%s$K$O!"(B
 657.753 +$B%U%C%/$,Cm0U$rJ'$&$Y$-30Mh%A%'%s%8%;%C%H$N=P=j$rNs5s$9$k(B
 657.754 +\rcitem{acl}{sources} $B%(%s%H%j$@$1$,5-=R$5$l$^$9!#(B
 657.755 +$BDL>o$O$3$N%;%/%7%g%s$r@_Dj$9$kI,MW$O$"$j$^$;$s!#(B
 657.756 +
 657.757 +\begin{description}
 657.758 +\item[\rcitem{acl}{serve}] $B%j%b!<%H%j%]%8%H%j$+$i$N(B http $B$J$$$7(B ssh 
 657.759 +  $B7PM3$N%A%'%s%8%;%C%H$KBP$7$F@)8f$r9T$$$^$9!#(B
 657.760 +  $B$3$l$O(B \rcitem{acl}{sources} $B$N4{DjCM$G!"(B
 657.761 +  $BDL>o$O$3$N@_Dj9`L\$KBP$7$F9T$&M#0l$N@_Dj$G$9!#(B
 657.762 +
 657.763 +\item[\rcitem{acl}{pull}] $B%m!<%+%k%j%]%8%H%j$+$i$N(B
 657.764 +  pull $B7PM3$N%A%'%s%8%;%C%H$KBP$7$F@)8f$r9T$$$^$9!#(B
 657.765 +
 657.766 +\item[\rcitem{acl}{push}] $B%m!<%+%k%j%]%8%H%j$+$i$N(B
 657.767 +  push $B7PM3$N%A%'%s%8%;%C%H$KBP$7$F@)8f$r9T$$$^$9!#(B
 657.768 +
 657.769 +\item[\rcitem{acl}{bundle}] $BB>$N%j%]%8%H%j$+$i$N(B
 657.770 +  bundle $B7PM3$N%A%'%s%8%;%C%H$KBP$7$F@)8f$r9T$$$^$9!#(B
 657.771 +
 657.772 +\end{description}
 657.773 +
 657.774 +\rcsection{acl.allow} $B%;%/%7%g%s$O!"(B
 657.775 +$B%j%]%8%H%j$X$N%A%'%s%8%;%C%HDI2C$r5v2D$5$l$F$$$k%f!<%6$r7hDj$7$^$9!#(B
 657.776 +$B$3$N%;%/%7%g%s$,B8:_$7$J$$>l9g!"(B
 657.777 +$BL@<(E*$K6X;_$5$l$F$$$J$$%f!<%6$O!"(B
 657.778 +$BC/$G$b%A%'%s%8%;%C%H$NDI2C$r$G$-$^$9!#(B
 657.779 +$B$3$N%;%/%7%g%s$,B8:_$9$k>l9g!"(B
 657.780 +$BL@<(E*$K5v2D$5$l$F$$$J$$%f!<%6$O!"(B
 657.781 +$BC/$b%A%'%s%8%;%C%H$NDI2C$,$G$-$^$;$s!J(B
 657.782 +$B$G$9$N$G!"$3$N%;%/%7%g%s$r6u$K$7$?>l9g!"(B
 657.783 +$BA4$F$N%f!<%6$,%A%'%s%8%;%C%H$NDI2C$r6X;_$5$l$^$9!K!#(B
 657.784 +
 657.785 +\rcsection{acl.deny} $B%;%/%7%g%s$O!"(B
 657.786 +$B%j%]%8%H%j$X$N%A%'%s%8%;%C%HDI2C$r6X;_$5$l$F$$$k%f!<%6$r7hDj$7$^$9!#(B
 657.787 +$B$3$N%;%/%7%g%s$,5-=R$5$l$J$$>l9g!"(B
 657.788 +$BA4$F$N%f!<%6$O%A%'%s%8%;%C%H$NDI2C$r5v2D$5$l$^$9(B\footnote{$BLuCm!'(B 
 657.789 +$B86J8$O!V(Bno users are denied$B!W$G$9$,!"(B
 657.790 +acl.py $B$N<BAu>e$O!V6X;_$7$J$$!W$H!V5v2D!W$OEy2A$G$9!#(B}$B!#(B
 657.791 +
 657.792 +\rcsection{acl.allow} $B$*$h$S(B \rcsection{acl.deny} 
 657.793 +$B%;%/%7%g%s$NJ8K!$OF10l$G$9!#(B
 657.794 +$B3F%(%s%H%j$N:8JU$O!"(B
 657.795 +$B%j%]%8%H%j%k!<%HAjBP$G$N%U%!%$%k$J$$$7%G%#%l%/%H%j$N%^%C%A%s%0%Q%?!<%s$G!"(B
 657.796 +$B1&JU$O%f!<%6L>$H$J$C$F$$$^$9!#(B
 657.797 +
 657.798 +$B0J2<$NNc$G$O!"(B
 657.799 +$B%f!<%6(B \texttt{docwriter} $B$,%j%]%8%H%j$N(B
 657.800 +\dirname{docs} $BG[2<$KBP$9$kJQ99$N(B 
 657.801 +push $B$N$_$,5v2D$5$l$F$$$k0lJ}$G!"(B
 657.802 +$B%f!<%6(B \texttt{intern} $B$O(B
 657.803 +\dirname{source/sensitive} 
 657.804 +$B0J30$NG$0U$N%G%#%l%/%H%j!&%U%!%$%k$KBP$9$kJQ99$r(B
 657.805 +push $B2DG=$G$9(B
 657.806 +\footnote{$BLuCm!'(B
 657.807 +$B@_Dj$NH=Dj=g=x$O(B (1) $B6X;_(B (2) $B5v2D$N=g=x$G9T$o$l!"(B
 657.808 +(1) $B6X;_@_Dj$,$"$j!"Ev3:%f!<%6$N%"%/%;%9$,L@<(E*$K6X;_$5$l$F$$$k>l9g$H!"(B
 657.809 +(2) $B5v2D@_Dj$,$"$j!"Ev3:%f!<%6$N%"%/%;%9$,L@<(E*$K5v2D$5$l$F!V$$$J$$!W>l9g$K!"(B
 657.810 +$BIT@5%"%/%;%9$H$_$J$5$l!"(B
 657.811 +$B$=$l0J30$N>l9g$O%"%/%;%9$,5v2D$5$l$^$9!#(B}$B!#(B
 657.812 +
 657.813 +\begin{codesample2}
 657.814 +  [acl.allow]
 657.815 +  docs/** = docwriter
 657.816 +
 657.817 +  [acl.deny]
 657.818 +  source/sensitive/** = intern
 657.819 +\end{codesample2}
 657.820 +
 657.821 +\subsubsection{Testing and troubleshooting}
 657.822 +
 657.823 +\hgext{acl} $B%U%C%/$r;n$7$F$_$?$$>l9g!"(B
 657.824 +Mercurial $B$N%G%P%C%0=PNO$rM-8z$K$7$F<B9T$7$^$7$g$&!#(B
 657.825 +\hggopt{--debug} $B%*%W%7%g%s$r;XDj$7Fq$$!J$"$k$$$OIT2DG=$J!K(B
 657.826 +$B%5!<%P>e$G<B9T$9$k$3$H$b$"$k$G$7$g$&$+$i!"(B
 657.827 +$B%5!<%PB&$N(B \hgrc $B%U%!%$%k$G%G%P%C%0=PNO$rM-8z2=$G$-$k$3$H$r$*K:$l$J$/!#(B
 657.828 +
 657.829 +\begin{codesample2}
 657.830 +  [ui]
 657.831 +  debug = true
 657.832 +\end{codesample2}
 657.833 +
 657.834 +$B$3$l$rM-8z$K$9$k$3$H$G!"(B
 657.835 +$BEv3:%f!<%6$K$h$k(B push 
 657.836 +$B$r5v2D!&6X;_$9$kM}M3$rH=CG$9$k$KB-$k>pJs$rI=<($9$k$3$H$G$7$g$&!#(B
 657.837 +
 657.838 +\subsection{\hgext{bugzilla}---integration with Bugzilla}
 657.839 +
 657.840 +\hgext{bugzilla} $B3HD%$O!"(B
 657.841 +$B%3%_%C%H%a%C%;!<%8$K%P%0(BID$B$r8!CN$7$?:]$K(B
 657.842 +Bugzilla $B%P%0$X$N%3%a%s%HDI2C$r9T$$$^$9!#(B
 657.843 +$B$3$N%U%C%/$r6&M-%5!<%P$K@_Dj$9$k$3$H$G!"(B
 657.844 +$B$3$N%5!<%P$X$N%j%b!<%H$+$i$NJQ99EAGE$N:]$K$O!"(B
 657.845 +$B>o$K$3$N%U%C%/$,<B9T$5$l$^$9!#(B
 657.846 +
 657.847 +$B$3$N%U%C%/$O(B Bugzilla $B%P%0$K!"(B
 657.848 +$B0J2<$N$h$&$J%3%a%s%H$rDI2C$7$^$9(B
 657.849 +$B!JJ}K!$O8e=R$7$^$9$,!"%3%a%s%HFbMF$OJQ99$G$-$^$9!K!#(B
 657.850 +
 657.851 +\begin{codesample2}
 657.852 +  Changeset aad8b264143a, made by Joe User <joe.user@domain.com> in
 657.853 +  the frobnitz repository, refers to this bug.
 657.854 +
 657.855 +  For complete details, see
 657.856 +  http://hg.domain.com/frobnitz?cmd=changeset;node=aad8b264143a
 657.857 +
 657.858 +  Changeset description:
 657.859 +        Fix bug 10483 by guarding against some NULL pointers
 657.860 +\end{codesample2}
 657.861 +
 657.862 +$B$3$N%U%C%/$N2ACM$O!"(B
 657.863 +$B%A%'%s%8%;%C%H!J$N%3%_%C%H%a%C%;!<%8!K$,%P%0$r;2>H$7$F$$$k:]$K!"(B
 657.864 +$B%P%0>pJs$r99?7$9$k<j=g$r<+F02=$9$kE@$K$"$j$^$9!#(B
 657.865 +$B%U%C%/$N@_Dj$rE,@Z$K9T$&$3$H$G!"(B
 657.866 +Bugzilla $B%P%0$+$i;2>H85%A%'%s%8%;%C%H$X$H!"(B
 657.867 +$B0lD>@~$KE~C#$9$k$3$H$,MF0W$K$J$j$^$9!#(B
 657.868 +
 657.869 +$B$3$N%U%C%/$N<BAu$rB-3]$j$K$7$F!"(B
 657.870 +$B$h$j9bEY$J(B Bugzilla $B$H$NE}9g$r?^$k$3$H$b2DG=$G$9!#(B
 657.871 +$BNc$($P(B:
 657.872 +
 657.873 +\begin{itemize}
 657.874 +\item $B%5!<%P$K(B push $B$5$l$kA4$F$N%A%'%s%8%;%C%H$K$O!"(B
 657.875 +  $B%3%_%C%H%a%C%;!<%8$KE,@Z$J%P%0(B~ID$B$,4^$^$l$F$$$k$3$H$rMW5a(B:
 657.876 +  $B$3$N>l9g!"(B\hook{pretxncommit} 
 657.877 +  $B%U%C%/$KEv3:>r7o$r8!>Z$9$k%U%C%/$r@_Dj$9$k$N$,NI$$$G$7$g$&!#(B
 657.878 +  $B%3%_%C%H%a%C%;!<%8$,%P%0(B~ID$B$r4^$^$J$$%A%'%s%8%;%C%H$O!"(B
 657.879 +  $B%U%C%/$K$h$C$F5qH]$5$l$k$h$&$K$J$j$^$9!#(B
 657.880 +
 657.881 +\item $B?75,$N%A%'%s%8%;%C%H$KBP$7$F!"(B
 657.882 +  $B4JC1$J%3%a%s%H$NIUM?$HF1MM$K!"(B
 657.883 +  $B%P%0$N(B\emph{$B>uBV(B}$B$N<+F0E*$JJQ99$r5v2D(B:
 657.884 +  $BNc$($P!"(B``fixed bug 31337'' $B$H$$$&%3%_%C%H%a%C%;!<%8$NJ8;zNs$r!"(B
 657.885 +  $B%P%0(B 31337 $B$N>uBV$N(B ``requires testing'' $B$X$N99?7!"(B
 657.886 +  $B$HG'<1$5$;$k!"$H$$$C$?3HD%$b9M$($i$l$^$9!#(B
 657.887 +
 657.888 +\end{itemize}
 657.889 +
 657.890 +\subsubsection{Configuring the \hook{bugzilla} hook}
 657.891 +\label{sec:hook:bugzilla:config}
 657.892 +
 657.893 +\hook{bugzilla} $B%U%C%/$O!"(B
 657.894 +$B%5!<%PB&$N(B  \hgrc\ $BCf$G(B \hook{incoming} $B%U%C%/$H$7$F@_Dj$7$J$1$l$P$J$j$^$;$s!#(B
 657.895 +
 657.896 +\begin{codesample2}
 657.897 +  [hooks]
 657.898 +  incoming.bugzilla = python:hgext.bugzilla.hook
 657.899 +\end{codesample2}
 657.900 +
 657.901 +$B5!G=FC2=$5$l$?%U%C%/$N@-<A$H!"(B
 657.902 +Bugzilla $B$,85!9$3$N<o$NE}9g$rG0F,$KCV$$$F$$$J$$$3$H$+$i!"(B
 657.903 +$B$3$N%U%C%/$N@_Dj$O2?$+$HJ#;($K$J$j$^$9!#(B
 657.904 +
 657.905 +$B%U%C%/$N@_Dj$K@hN)$C$F!"(B
 657.906 +$B%U%C%/$,<B9T$5$l$k%[%9%H!J72!K$KBP$7$F!"(B
 657.907 +MySQL $B$N(B Python $B%P%$%s%G%#%s%0$r%$%s%9%H!<%k$7$F$/$@$5$$!#(B
 657.908 +$BBP>]%[%9%H$K$*$$$F%P%$%J%j%Q%C%1!<%8$,8+Ev$?$i$J$$>l9g!"(B
 657.909 +\cite{web:mysql-python} $B$+$i%@%&%s%m!<%I$G$-$^$9!#(B
 657.910 +
 657.911 +$B%U%C%/$N@_Dj$O!"(B
 657.912 + \hgrc\ $B%U%!%$%k$N(B
 657.913 +\rcsection{bugzilla} $B%;%/%7%g%s$K5-=R$5$l$^$9!#(B
 657.914 +
 657.915 +\begin{description}
 657.916 +
 657.917 +\item[\rcitem{bugzilla}{version}] $B%5!<%P$K%$%s%9%H!<%k$5$l$F$$$k(B
 657.918 +  Bugzilla $B$N%P!<%8%g%s!#(B
 657.919 +  Bugzilla $B$N%G!<%?%Y!<%9%9%-!<%^$O;~@^JQ99$5$l$^$9$N$G!"(B
 657.920 +  $B$I$N%9%-!<%^$,;HMQ$5$l$F$$$k$N$+$r87L)$KCN$C$F$$$kI,MW$,$"$j$^$9!#(B
 657.921 +  $B:#$N$H$3$m!"%5%]!<%HBP>]$O(B \texttt{2.16} $B$N$_$G$9!#(B
 657.922 +
 657.923 +\item[\rcitem{bugzilla}{host}] Bugzilla $B$N%G!<%?$,3JG<$5$l$F$$$k(B
 657.924 +  MySQL $B%5!<%P$,2TF0$7$F$$$k%[%9%HL>!#(B
 657.925 +  MySQL $B%5!<%P$O!"(B\hook{bugzilla} $B%U%C%/$,<B9T$5$l$kA4$F$N%[%9%H$KBP$7$F!"(B
 657.926 +  $B@\B3$r5v2D$7$F$$$kI,MW$,$"$j$^$9!#(B
 657.927 +
 657.928 +\item[\rcitem{bugzilla}{user}] MySQL $B%5!<%P$X$N@\B3;~$K;HMQ$9$k%f!<%6L>!#(B
 657.929 +  MySQL $B%5!<%P$O!"(B\hook{bugzilla} $B%U%C%/$,<B9T$5$l$kA4$F$N%[%9%H$KBP$7$F!"(B
 657.930 +  $B$3$N%f!<%6L>$G$N@\B3$r5v2D$7$F$$$kI,MW$,$"$j$^$9!#(B
 657.931 +  $B$3$N%f!<%6$O!"(B
 657.932 +  Bugzilla $B$,;HMQ$9$k%F!<%V%k$KBP$7$FFI$_<h$j!&JQ99$NN>J}$N8"8B$,I,MW$G$9!#(B
 657.933 +  $B$3$N9`L\$N4{DjCM$O!"(B
 657.934 +  MySQL $B%5!<%P$K$*$1$k(B Bugzilla $B$NI8=`E*$J%f!<%6L>$G$"$k(B
 657.935 + \texttt{bugs} $B$G$9!#(B
 657.936 +
 657.937 +\item[\rcitem{bugzilla}{password}] $B>e5-%f!<%6$N(B 
 657.938 +  MySQL $B%5!<%P$K$*$1$k%Q%9%o!<%I!#(B
 657.939 +  $B$3$NCM$OJ?J8$G3JG<$5$l$k$?$a!"(B
 657.940 +  $B8"8B$r;}$?$J$$%f!<%6$,$3$N>pJs$N=q$+$l$?(B \hgrc 
 657.941 +  $B%U%!%$%k$rGA$/$3$H$,L5$$$h$&$K$7$J$1$l$P$J$j$^$;$s!#(B
 657.942 +
 657.943 +\item[\rcitem{bugzilla}{db}] MySQL $B%5!<%P$K$*$1$k(B
 657.944 +  Bugzilla $B%G!<%?%Y!<%9$NL>A0!#(B
 657.945 +  $B$3$N9`L\$N4{DjCM$O!"(B
 657.946 +  MySQL $B%5!<%P$K$*$1$k(B Bugzilla $B$NI8=`E*$J%G!<%?%Y!<%9L>$G$"$k(B
 657.947 + \texttt{bugs} $B$G$9!#(B
 657.948 +
 657.949 +\item[\rcitem{bugzilla}{notify}] $B%U%C%/$K$h$k%P%0$X$N%3%a%s%HIUM?;~$K!"(B
 657.950 +  Bugzilla $B$K$h$k9XFI<T$X$NEE;R%a!<%kDLCN$r<B;\$7$?$$>l9g!"(B
 657.951 +  $B%G!<%?%Y!<%9$r99?7$9$kKh$K%3%^%s%I$r<B9T$5$;$kI,MW$,$"$j$^$9!#(B
 657.952 +  $B<B9T$9$k%3%^%s%I$O(B Bugzilla $B$N%$%s%9%H!<%k>l=j$K0MB8$7$^$9$,!"(B
 657.953 +  \dirname{/var/www/html/bugzilla} $B$K%$%s%9%H!<%k$7$?$H$9$k$H!"(B
 657.954 +  $BDL>o$O0J2<$N$h$&$K$J$j$^$9!#(B
 657.955 +
 657.956 +  \begin{codesample4}
 657.957 +    cd /var/www/html/bugzilla && ./processmail %s nobody@nowhere.com
 657.958 +  \end{codesample4}
 657.959 +
 657.960 +  Bugzilla $B$N(B \texttt{processmail} $B%W%m%0%i%`$O!"(B
 657.961 +  $B%P%0(B~ID$B!J%U%C%/$K$h$j(B ``\texttt{\%s}'' $B$,(B $B%P%0(B~ID $B$KCV49$5$l$^$9!K$H!"(B
 657.962 +  $BEE;R%a!<%k%"%I%l%9$rI,MW$H$7$^$9!#(B
 657.963 +  $B$3$N%W%m%0%i%`$O!"(B
 657.964 +  $B<B9T;~%G%#%l%/%H%j$X$N%U%!%$%k=q$-=P$7$N8"8B$bI,MW$H$7$^$9!#(B
 657.965 +  Bugzilla $B$H%U%C%/$,F1$8%5!<%P>e$K%$%s%9%H!<%k$5$l$F$$$J$$>l9g!"(B
 657.966 +  Bugzilla $B$,%$%s%9%H!<%k$5$l$F$$$k%5!<%P>e$G(B 
 657.967 +  \texttt{processmail} $B$r5/F0$9$kJ}K!$r8+$D$1=P$9I,MW$,$"$j$^$9!#(B
 657.968 +
 657.969 +\end{description}
 657.970 +
 657.971 +\subsubsection{Mapping committer names to Bugzilla user names}
 657.972 +
 657.973 +$B4{Dj>uBV$N(B \hgext{bugzilla} $B%U%C%/$O!"(B
 657.974 +$B%A%'%s%8%;%C%H$r%3%_%C%H$7$?%f!<%6$NEE;R%a!<%k%"%I%l%9$r!"(B
 657.975 +$B%P%0$N99?7$r9T$&(B Bugzilla $B%f!<%6L>$H$7$F;HMQ$9$k$3$H$r;n$_$^$9!#(B
 657.976 +$B$3$N5sF0$,>u67$KB($5$J$$>l9g!"(B
 657.977 +\rcsection{usermap} $B%;%/%7%g%s$r;HMQ$7$F!"(B
 657.978 +$B%A%'%s%8%;%C%H$r%3%_%C%H$7$?%f!<%6$NEE;R%a!<%k%"%I%l%9$r(B
 657.979 +Bugzilla $B$N%f!<%6L>$KJQ49$9$k$3$H$,$G$-$^$9!#(B
 657.980 +
 657.981 +\rcsection{usermap} $B%;%/%7%g%s$N8D!9$NMWAG$O!"(B
 657.982 +$B:8JU$KEE;R%a!<%k%"%I%l%9!"(B
 657.983 +$B1&JU$K(B Bugzilla $B%f!<%6L>$rJ];}$7$^$9!#(B
 657.984 +
 657.985 +\begin{codesample2}
 657.986 +  [usermap]
 657.987 +  jane.user@example.com = jane
 657.988 +\end{codesample2}
 657.989 +
 657.990 +$BDL>o$N(B \hgrc $B%U%!%$%k$K(B
 657.991 +\rcsection{usermap} $B%G!<%?$rD>@\J];}$9$k$3$H$b$G$-$^$9$,!"(B
 657.992 +\hgext{bugzilla} $B%U%C%/$K30It$N(B 
 657.993 +\filename{usermap} $B%U%!%$%k$+$i>pJs$rFI$_9~$`$h$&$K;X<($9$k$3$H$b$G$-$^$9!#(B
 657.994 +$B8e<T$N>l9g!"Nc$($P(B \filename{usermap} $B%G!<%?$=$N$b$N$r!"(B
 657.995 +$BMxMQ<T$,2~JQ2DG=$J%j%]%8%H%j$K3JG<$9$k$3$H$b$G$-$^$9!#(B
 657.996 +$B$=$&$9$k$3$H$G!"(B
 657.997 +$BMxMQ<T<+?H$,(B
 657.998 +\rcitem{bugzilla}{usermap} $BCf$N3F<+$NMWAG$rJ]<i$9$k$3$H$,$G$-$^$9!#(B
 657.999 +$B$3$N>l9g$N(B \hgrc\ $B%U%!%$%k$O0J2<$N$h$&$K5-=R$5$l$^$9!#(B
657.1000 +
657.1001 +\begin{codesample2}
657.1002 +  # $BDL>o$N(B hgrc $B%U%!%$%k$O(B usermap $B30It%U%!%$%k$r;2>H(B
657.1003 +  [bugzilla]
657.1004 +  usermap = /home/hg/repos/userdata/bugzilla-usermap.conf
657.1005 +\end{codesample2}
657.1006 +
657.1007 +\filename{usermap} $B$,;2>H$9$k%U%!%$%k$NFbMF$O!"(B
657.1008 +$B0J2<$N$h$&$K$J$j$^$9!#(B
657.1009 +
657.1010 +\begin{codesample2}
657.1011 +  # bugzilla-usermap.conf $B$O(B hg $B%j%]%8%H%jFb$KG[CV(B
657.1012 +  [usermap]
657.1013 +  stephanie@example.com = steph
657.1014 +\end{codesample2}
657.1015 +
657.1016 +\subsubsection{Configuring the text that gets added to a bug}
657.1017 +
657.1018 +Mercurial $B$N%F%s%W%l!<%H7A<0$G5-=R$9$k$3$H$G!"(B
657.1019 +\hgext{bugzilla} $B%U%C%/$,DI2C$9$k%3%a%s%H$NFbMF$r@_Dj$9$k$3$H$,2DG=$G$9!#(B
657.1020 +$B4v$D$+$N!J(B\rcsection{bugzilla} $B%;%/%7%g%s$K$*$1$k!K(B \hgrc\ $BMWAG$K$h$j!"(B
657.1021 +$B!J%F%s%W%l!<%H$N!)!K?6$kIq$$$r@)8f$9$k$3$H$,$G$-$^$9!#(B
657.1022 +
657.1023 +\begin{description}
657.1024 +\item[\texttt{strip}] URL $B$K$*$1$kItJ,%Q%9L>!J(Ba
657.1025 +  partial path for a URL$B!K$r@8@.$9$k:]$K!"(B
657.1026 +  $B%j%]%8%H%j$K$*$1$k%Q%9L>$+$i<h$j=|$/%Q%9MWAG$N?t$r;XDj$7$^$9!#(B
657.1027 +  $BNc$($P!"%5!<%P$K$*$1$k%j%]%8%H%j72$,(B \dirname{/home/hg/repos} $BG[2<$K$"$j!"(B
657.1028 +  \dirname{/home/hg/repos/app/tests} $B$N%j%]%8%H%j$rBP>]$H$9$k>l9g!"(B
657.1029 +  \texttt{strip} $B$r(B \texttt{4} $B$H$9$k$3$H$G!"(B
657.1030 +  \dirname{app/tests} $B$H$$$&ItJ,%Q%9$rF@$k$3$H$,$G$-$^$9!#(B
657.1031 +  \hgext{bugzilla} $B%U%C%/$O$3$NItJ,%Q%9L>$r!"(B
657.1032 +  $B%F%s%W%l!<%H$NE,MQ$N:]$K(B \texttt{webroot} $B$H$$$&L>A0$GMxMQ2DG=$K$7$^$9!#(B
657.1033 +
657.1034 +\item[\texttt{template}] $B;HMQ$9$k%F%s%W%l!<%H%F%-%9%H$r;XDj$7$^$9!#(B
657.1035 +  $BDL>o$N%A%'%s%8%;%C%H4XO"$NCV49$K2C$($F!"(B
657.1036 +  $B$3$N%F%s%W%l!<%H$G$O(B \texttt{hgweb}$B!J8e=RNc$K$"$k$h$&$K(B
657.1037 +  \texttt{hgweb} $B9`L\$G@_Dj$7$^$9!K(B
657.1038 +  $B$*$h$S(B \texttt{webroot}$B!JA0=R$N$h$&$K(B
657.1039 +  \texttt{strip} $B$K$h$C$F@8@.$5$l$k%Q%9$G$9!K$,;HMQ$G$-$^$9!#(B
657.1040 +
657.1041 +\end{description}
657.1042 +
657.1043 +$B$3$l$i$K2C$($F!"(B
657.1044 + \hgrc\ $B%U%!%$%k$N(B \rcsection{web} $B%;%/%7%g%s$K(B
657.1045 +\rcitem{web}{baseurl} $B9`L\$rDI2C$9$k$3$H$,$G$-$^$9!#(B
657.1046 +Bugzilla $B%3%a%s%H$+$i$N%A%'%s%8%;%C%H;2>H$K;HMQ$9$k%j%s%/$N(B
657.1047 +URL $B$r9=C[$9$k:]$N4pDlJ8;zNs$H$7$F(B
657.1048 +\hgext{bugzilla} $B%U%C%/$O%F%s%W%l!<%HE83+$N:]$K$3$NCM$r;HMQ$7$^$9!#(B
657.1049 +$BNc$($P!'(B
657.1050 +
657.1051 +\begin{codesample2}
657.1052 +  [web]
657.1053 +  baseurl = http://hg.domain.com/
657.1054 +\end{codesample2}
657.1055 +
657.1056 +\hgext{bugzilla} $B%U%C%/$N@_DjNc$r0J2<$K<($7$^$9(B\footnote{$BLuCm(B:
657.1057 +$B86J8$N(B ``\\n'' $B$,@5$7$/5!G=$7$F$$$J$$$?$a!"(B
657.1058 +$BNc<($N%l%$%"%&%H$,Mp$l$F$$$k(B}$B!#(B
657.1059 +
657.1060 +\begin{codesample2}
657.1061 +  [bugzilla]
657.1062 +  host = bugzilla.example.com
657.1063 +  password = mypassword
657.1064 +  version = 2.16
657.1065 +  # $B%5!<%PB&%j%]%8%H%j$O(B /home/hg/repos $B$K$"$k$?$a!"(B
657.1066 +  # $BKAF,$N(B 4 $B$D$N%;%Q%l!<%?(B\footnote{$BLuCm(B: $B%Q%96h@Z$j(B ``/''}$B$r=|30(B
657.1067 +  strip = 4
657.1068 +  hgweb = http://hg.example.com/
657.1069 +  usermap = /home/hg/repos/notify/bugzilla.conf
657.1070 +  template = Changeset \{node|short\}, made by \{author\} in the \{webroot\}
657.1071 +    repo, refers to this bug.\\nFor complete details, see 
657.1072 +    \{hgweb\}\{webroot\}?cmd=changeset;node=\{node|short\}\\nChangeset
657.1073 +    description:\\n\\t\{desc|tabindent\}
657.1074 +\end{codesample2}
657.1075 +
657.1076 +\subsubsection{Testing and troubleshooting}
657.1077 +
657.1078 +\hgext{bugzilla} $B%U%C%/@_Dj$K$*$$$F:G$bNI$/$"$kLdBj$O!"(B
657.1079 +Bugzilla $B$N(B \filename{processmail} $B%9%/%j%W%H<B9T$K4X$9$k$b$N$H!"(B
657.1080 +$B%3%_%C%H%f!<%6L>$+$i(B Bugzilla $B%f!<%6L>$X$NJQ49$K4X$9$k$b$N$G$9!#(B
657.1081 +
657.1082 +$B@h$N(B \ref{sec:hook:bugzilla:config}~$B@a$+$i$N@bL@$G=R$Y$?$h$&$K!"(B
657.1083 +Mercurial $B%W%m%;%9$r%5!<%P$G<B9T$9$k%f!<%6$,!"(B
657.1084 +\filename{processmail} $B%9%/%j%W%H$r<B9T$9$k%f!<%6$G$b$"$j$^$9!#(B
657.1085 +\filename{processmail} $B%9%/%j%W%H$O(B
657.1086 +Bugzilla $B$,@_Dj%G%#%l%/%H%jCf$N%U%!%$%k$K2?$i$+$N>pJs$r=q$-=P$97@5!$H$J$k$?$a!"(B
657.1087 +$BDL>o(B Bugzilla $B$N@_Dj%U%!%$%k$O(B
657.1088 +Bugzilla $B$,F0:n$9$k%&%'%V%5!<%P$N<B9T<T$N8"8B2<$K$"$j$^$9!#(B
657.1089 +
657.1090 +\filename{processmail} $B<B9T$N:]$K$O!"(B
657.1091 +\command{sudo} $B%3%^%s%I$rMxMQ$9$k$J$I$7$FE,@Z$J%f!<%68"8B$G<B9T$7$^$7$g$&!#(B
657.1092 +\filename{sudoers} $B%U%#%k$N@_DjNc$r0J2<$K<($7$^$9!#(B
657.1093 +
657.1094 +\begin{codesample2}
657.1095 +  hg_user = (httpd_user) NOPASSWD: /var/www/html/bugzilla/processmail-wrapper %s
657.1096 +\end{codesample2}
657.1097 +
657.1098 +$B$3$NNc$G$O!"(B\texttt{hg\_user} $B%f!<%6$O!"(B
657.1099 +\filename{processmail-wrapper} $B%W%m%0%i%`$r(B
657.1100 +\texttt{httpd\_user} $B%f!<%6$N8"8B2<$G<B9T$9$k$3$H$,$G$-$^$9!#(B
657.1101 +
657.1102 +\filename{processmail} $B%W%m%0%i%`$O(B
657.1103 +Bugzilla $B$r%$%s%9%H!<%k$7$?%G%#%l%/%H%jD>2<$G$N<B9T$,I,MW$G$9$,!"(B
657.1104 +\filename{sudoers} $B%U%!%$%k$K$O$=$N$h$&$J@)Ls$r5-=R$9$k$3$H$,$G$-$J$$$N$G!"(B
657.1105 +$B$3$N$h$&$J4V@\<B9T$N$?$a$N%i%C%Q!<%9%/%j%W%H$,I,MW$H$J$j$^$9!#(B
657.1106 +$B%i%C%Q!<%9%/%j%W%H$NFbMF$O0J2<$N$h$&$K4JC1$J$b$N$G$9!#(B
657.1107 +
657.1108 +\begin{codesample2}
657.1109 +  #!/bin/sh
657.1110 +  cd `dirname $0` && ./processmail "$1" nobody@example.com
657.1111 +\end{codesample2}
657.1112 +
657.1113 +\filename{processmail} 
657.1114 +$B$K;XDj$9$kEE;R%a!<%k%"%I%l%9$O!"(B
657.1115 +$B$I$N$h$&$J$b$N$G$b9=$$$^$;$s!#(B
657.1116 +
657.1117 +\rcsection{usermap} $B$,@5$7$/@_Dj$5$l$F$$$J$$>l9g!"(B
657.1118 +$B%A%'%s%8%;%C%H$r%5!<%P$K(B push $B$7$?:]$K(B
657.1119 +\hgext{bugzilla} $B%U%C%/$K$h$j%(%i!<%a%C%;!<%8$,I=<($5$l$^$9!#(B
657.1120 +$B%(%i!<%a%C%;!<%8$O0J2<$N$h$&$J$b$N$G$9!#(B
657.1121 +
657.1122 +\begin{codesample2}
657.1123 +  cannot find bugzilla user id for john.q.public@example.com
657.1124 +\end{codesample2}
657.1125 +
657.1126 +$B$3$N%a%C%;!<%8$O!"(B
657.1127 +$B%3%_%C%H$7$?%f!<%6$NEE;R%a!<%k%"%I%l%9(B
657.1128 +\texttt{john.q.public@example.com} 
657.1129 +$B$,M-8z$J(B Bugzilla $B%f!<%6L>$G$O$J$$$+!"(B
657.1130 +\texttt{john.q.public@example.com} 
657.1131 +$B$rM-8z$J(B Bugzilla $B%f!<%6L>$KJQ49$9$k%(%s%H%j$,(B
657.1132 +rcsection{usermap} $B$K5-=R$5$l$F$$$J$$$3$H$r0UL#$7$^$9!#(B
657.1133 +
657.1134 +\subsection{\hgext{notify}---send email notifications}
657.1135 +
657.1136 +Mercurial $B$NAH$_9~$_%&%'%V%5!<%P$K$h$j!"(B
657.1137 +$BA4$F$N%j%]%8%H%j$KBP$7$F%A%'%s%8%;%C%H>pJs$N(B RSS $BG[?.5!G=$,Ds6!$5$l$^$9$,!"(B
657.1138 +$BEE;R%a!<%k$K$h$kJQ99DLCN$,A*Br$5$l$k>l9g$,B?$$$G$9!#(B
657.1139 +\hgext{notify} $B%U%C%/$O!"(B
657.1140 +$B9XFI<T$,6=L#$r;}$D?7$?$J%A%'%s%8%;%C%H$4$H$K!"(B
657.1141 +$BEE;R%a!<%k%"%I%l%9!J72!K$K08$F$FDLCN$r9T$$$^$9!#(B
657.1142 +
657.1143 +\hgext{notify} $B$O%F%s%W%l!<%H6nF07?$N%U%C%/$G$9$N$G!"(B
657.1144 +\hgext{bugzilla} $B%U%C%/$HF1MM$K!"(B
657.1145 +$BAw?.$5$l$kDLCN$NFbMF$r%+%9%?%^%$%:$9$k$3$H$,$G$-$^$9!#(B
657.1146 +
657.1147 +$B4{Dj>uBV$G$O(B
657.1148 +\hgext{notify} $B%U%C%/$O%A%'%s%8%;%C%H$4$H$N:9J,>pJs$r<h$j9~$_$^$9$,!"(B
657.1149 +$B:9J,>pJs$NNL$r@)8B$7$?$j!"(B
657.1150 +$B$3$N5!G=$r40A4$KDd;_$9$k$3$H$b$G$-$^$9!#(B
657.1151 +$B9XFI<T$K$h$kJQ99$NB(;~%l%S%e!<$rA[Dj$9$k>l9g!"(B
657.1152 +$B;XDj$5$l$?(B URL $B$r%/%j%C%/$9$k$h$j$b!"(B
657.1153 +$B:9J,>pJs$r<h$j9~$`$[$&$,M-MQ$G$9!#(B
657.1154 +
657.1155 +\subsubsection{Configuring the \hgext{notify} hook}
657.1156 +
657.1157 +\hgext{notify} $B%U%C%/$O!"(B
657.1158 +$B?7$?$J%A%'%s%8%;%C%H$4$H$K#1DL$NEE;R%a!<%k$rAw?.$9$k$3$H$b$G$-$l$P!"(B
657.1159 +$B!JC1FH$N(B \hgcmd{pull} $B$J$$$7(B \hgcmd{push} $B$K$h$j%j%]%8%H%j$KDI2C$5$l$k(B
657.1160 +$B!K?7$?$J%A%'%s%8%;%C%H72$4$H$KAw?.$9$k$3$H$b$G$-$^$9!#(B
657.1161 +
657.1162 +\begin{codesample2}
657.1163 +  [hooks]
657.1164 +  # $B%A%'%s%8%;%C%H72$4$H$K#1DL$N%a!<%k$rAw?.(B
657.1165 +  changegroup.notify = python:hgext.notify.hook
657.1166 +  # $B%A%'%s%8%;%C%H$4$H$K#1DL$N%a!<%k$rAw?.(B
657.1167 +  incoming.notify = python:hgext.notify.hook
657.1168 +\end{codesample2}
657.1169 +
657.1170 +$B$3$N%U%C%/$N@_Dj>pJs$O!"(B
657.1171 + \hgrc\ $B%U%!%$%k$N(B
657.1172 +\rcsection{notify} $B%;%/%7%g%s$K5-=R$5$l$^$9!#(B
657.1173 +
657.1174 +\begin{description}
657.1175 +\item[\rcitem{notify}{test}] $B4{Dj>uBV$G$O!"(B
657.1176 +  $B$3$N%U%C%/$OA4$/%a!<%k$rAw?.$7$^$;$s!#(B
657.1177 +  $B$=$NBX$o$j!"Aw?.$9$k(B\emph{$B$G$"$m$&(B}$B%a%C%;!<%8$rI=<($7$^$9!#(B
657.1178 +  $B$3$N9`L\$r(B \texttt{false} $B$K$9$k$3$H$GEE;R%a!<%k$,Aw?.$5$l$k$h$&$K$J$j$^$9!#(B
657.1179 +  $B4pDl>uBV$GEE;R%a!<%k$NAw?.$,Dd;_$5$l$F$$$k$N$O!"(B
657.1180 +  $B$3$N3HD%!J!?%U%C%/!K$r$-$A$s$H@_Dj$9$k$N$K$O4vJ,$+$N;n9T:x8m$,I,MW$J$N$G!"(B
657.1181 +  $B@_Dj;n9TCf$K(B``$B2u$l$?(B''$BDLCN$r9XFI<T$KAw?.$7$F$7$^$&$?$a$G$9!#(B
657.1182 +
657.1183 +\item[\rcitem{notify}{config}] $B9XFI>pJs$rJ];}$7$F$$$k@_Dj%U%!%$%k$X$N%Q%9!#(B
657.1184 +  $B$3$N>pJs$O(B \hgrc\ $B$H$OJ,N%$5$l$F$$$k$N$G!"(B
657.1185 +  $B$3$N%U%!%$%k$=$N$b$N$rBP>]%j%]%8%H%j$G4IM}$9$k$3$H$b2DG=$G$9!#(B
657.1186 +  $B$3$&$9$k$3$H$G!"(B
657.1187 +  $BBP>]%j%]%8%H%j$rJ#@=$7!"9XFI@_Dj$r99?7$7$?>e$G!"(B
657.1188 +  $BJQ99$r%5!<%P$K(B \hgcmd{push} $B$GLa$9$3$H$,$G$-$^$9!#(B
657.1189 +
657.1190 +\item[\rcitem{notify}{strip}] $B%j%]%8%H%j$KBP$9$k9XFI<T$NM-L5$rH=Dj$9$k:]$K!"(B
657.1191 +  $B%j%]%8%H%j$N%Q%9KAF,$+$i<h$j=|$/%Q%96h@Z$j$N?t(B\footnote{$BLuCm(B:
657.1192 +  $B$3$3$G$O(B strip $BBP>]$r(B
657.1193 +  ``leading path separator characters'' $B$HI=8=$7$F$$$k$,!"(B
657.1194 +  \rcsection{bugzilla} $B$N@bL@$G$O(B
657.1195 +  ``leading path elements'' $B$HI=8=$7$F$$$k!#(B
657.1196 +  $BE}0lE*$JI=8=$,I,MW$H;W$o$l$k!#(B}$B!#(B
657.1197 +  $BNc$($P!"(B
657.1198 +  $B%5!<%P>e$N%j%]%8%H%j$,(B \dirname{/home/hg/repos} $BG[2<$K$"$j!"(B
657.1199 +  \hgext{notify} $B$,(B
657.1200 +  \dirname{/home/hg/repos/shared/test} $B$H$$$&%j%]%8%H%j$rG'<1$7$F$$$k>l9g!"(B
657.1201 +  \rcitem{notify}{strip} $B$r(B \texttt{4} $B$K@_Dj$9$k$3$H$G(B
657.1202 +  \hgext{notify} $B$K$h$k9XFI<T$H$N%Q%?!<%s%^%C%A%s%0$O!"(B
657.1203 +  $B%Q%9$r(B \dirname{shared/test} $B$HG'<1$7$?>e$G9T$o$l$^$9!#(B
657.1204 +
657.1205 +\item[\rcitem{notify}{template}] 
657.1206 +  $B%a%C%;!<%8Aw?.$N:]$K;HMQ$5$l$k%F%s%W%l!<%H%F%-%9%H!#(B
657.1207 +  $B$3$N%F%s%W%l!<%H$O!"%a%C%;!<%8$N%X%C%@$H%\%G%#$NN>J}$NFbMF$r;XDj$7$^$9!#(B
657.1208 +
657.1209 +\item[\rcitem{notify}{maxdiff}] 
657.1210 +  $B%a%C%;!<%8KvHx$KIUM?$5$l$k:9J,%G!<%?$N:GBg9T?t!#(B
657.1211 +  $B$3$N9T?t$h$j$bBg$-$$>l9g!":9J,%G!<%?$O@Z$j5M$a$i$l$^$9!#(B
657.1212 +  $B$3$NCM$N4{DjCM$O(B 300 $B$K@_Dj$5$l$F$$$^$9!#(B
657.1213 +  $B$3$NCM$r(B \texttt{0} $B$K$7$?>l9g!"(B
657.1214 +  $BDLCN$NEE;R%a!<%k$K:9J,%G!<%?$OIUM?$5$l$^$;$s!#(B
657.1215 +
657.1216 +\item[\rcitem{notify}{sources}] $BG[N8$9$Y$-%A%'%s%8%;%C%H$NM3Mh85$N0lMw!#(B
657.1217 +  $B$3$N@_Dj$K$h$jNc$($P!"(B
657.1218 +  $B1s3V%f!<%6$,%5!<%P$r7PM3$7$FEv3:%j%]%8%H%j$X(B
657.1219 +  \hgcmd{push} $B$7$?%A%'%s%8%;%C%H$KBP$7$F$N$_(B
657.1220 +  \hgext{notify} $B$,EE;R%a!<%k$GDLCN$9$k!"(B
657.1221 +  $B$H$$$C$?@_Dj$r$9$k$3$H$,$G$-$^$9!#(B
657.1222 +  $B$3$3$G5-=R2DG=$JM3Mh85$N0lMw$O!"(B\ref{sec:hook:sources}~$B@a$r;2>H$7$F$/$@$5$$!#(B
657.1223 +
657.1224 +\end{description}
657.1225 +
657.1226 +\rcsection{web} $B%;%/%7%g%s$G(B
657.1227 +\rcitem{web}{baseurl} $B9`L\$r@_Dj$7$F$$$k>l9g!"(B
657.1228 +$B%F%s%W%l!<%HCf$G(B \texttt{webroot} $B$H$7$F;HMQ$9$k$3$H$,$G$-$^$9!#(B
657.1229 +
657.1230 +\hgext{notify} $B@_Dj>pJs$N0l<0$r0J2<$K<($7$^$9!#(B
657.1231 +
657.1232 +\begin{codesample2}
657.1233 +  [notify]
657.1234 +  # $B<B:]$KEE;R%a!<%k$rAw$k$+H]$+(B
657.1235 +  test = false
657.1236 +  # $BDLCN$r9T$&%j%]%8%H%j<+?H$NCf$KCV$+$l$F$$$k9XFI<T>pJs(B
657.1237 +  config = /home/hg/repos/notify/notify.conf
657.1238 +  # $B%j%]%8%H%j$,(B /home/hg/repos $BG[2<$K$"$k$N$G(B "/" $BJ8;z$r(B4$B$D=|5n(B
657.1239 +  strip = 4
657.1240 +  template = X-Hg-Repo: \{webroot\}\\n\\\\
657.1241 +    Subject: \{webroot\}: \{desc|firstline|strip\}\\n\\\\
657.1242 +    From: \{author\}\\n\\\\
657.1243 +    \\n\\\\
657.1244 +    changeset \{node|short\} in \{root\}\\n\\\\
657.1245 +    details: \{baseurl\}\{webroot\}?cmd=changeset;node=\{node|short\}\\n\\\\
657.1246 +    description:\\n\\\\
657.1247 +    \\t\{desc|tabindent|strip\}
657.1248 +
657.1249 +  [web]
657.1250 +  baseurl = http://hg.example.com/
657.1251 +\end{codesample2}
657.1252 +
657.1253 +$B$3$N@_Dj$K$h$j!"(B
657.1254 +$B0J2<$N$h$&$J%a%C%;!<%8$,@8@.$5$l$^$9!#(B
657.1255 +
657.1256 +\begin{codesample2}
657.1257 +  X-Hg-Repo: tests/slave
657.1258 +  Subject: tests/slave: Handle error case when slave has no buffers
657.1259 +  Date: Wed,  2 Aug 2006 15:25:46 -0700 (PDT)
657.1260 +
657.1261 +  changeset 3cba9bfe74b5 in /home/hg/repos/tests/slave
657.1262 +  details: http://hg.example.com/tests/slave?cmd=changeset;node=3cba9bfe74b5
657.1263 +  description:
657.1264 +          Handle error case when slave has no buffers
657.1265 +  diffs (54 lines):
657.1266 +
657.1267 +  diff -r 9d95df7cf2ad -r 3cba9bfe74b5 include/tests.h
657.1268 +  --- a/include/tests.h      Wed Aug 02 15:19:52 2006 -0700
657.1269 +  +++ b/include/tests.h      Wed Aug 02 15:25:26 2006 -0700
657.1270 +  @@ -212,6 +212,15 @@ static __inline__ void test_headers(void *h)
657.1271 +  [...snip...]
657.1272 +\end{codesample2}
657.1273 +
657.1274 +\subsubsection{Testing and troubleshooting}
657.1275 +
657.1276 +$B4{DjCM$N$^$^$G$O(B \hgext{notify} $B3HD%$O(B
657.1277 +\emph{$B0l@Z$N%a!<%k$rAw?.$7$^$;$s(B}$B$N$G!"(B
657.1278 +\rcitem{notify}{test} $B9`L\$rL@<(E*$K(B
657.1279 +\texttt{false} $B$G@_Dj$9$k$3$H$rK:$l$J$$$G$/$@$5$$!#(B
657.1280 +$B$3$N@_Dj$r9T$&$^$G$O!"(B
657.1281 +\hgext{notify} $B3HD%$OAw?.$9$k(B\emph{$B$G$"$m$&(B}$B%a%C%;!<%8$rI=<($7$^$9!#(B
657.1282 +
657.1283 +\section{Information for writers of hooks}
657.1284 +\label{sec:hook:ref}
657.1285 +
657.1286 +\subsection{In-process hook execution}
657.1287 +
657.1288 +$B%W%m%;%9Fb%U%C%/$O!"0J2<$N0z?t7A<0$G5/F0$5$l$^$9!#(B
657.1289 +
657.1290 +\begin{codesample2}
657.1291 +  def myhook(ui, repo, **kwargs):
657.1292 +      pass
657.1293 +\end{codesample2}
657.1294 +
657.1295 +\texttt{ui} $B0z?t$O(B
657.1296 +\pymodclass{mercurial.ui}{ui} $B%*%V%8%'%/%H!"(B
657.1297 +\texttt{repo} $B0z?t$O(B
657.1298 +\pymodclass{mercurial.localrepo}{localrepository} $B%*%V%8%'%/%H$G$9!#(B
657.1299 +\texttt{**kwargs} $B%Q%i%a!<%?$N;}$DL>A0$HCM$O!"(B
657.1300 +$B5/F0$5$l$k%U%C%/$N<oN`$K0MB8$7!"(B
657.1301 +$B0J2<$N6&DL$NFCD'$r;}$C$F$$$^$9!#(B
657.1302 +
657.1303 +\begin{itemize}
657.1304 +\item \texttt{node} $B$J$$$7(B \texttt{parent\emph{N}} $B$H$$$&L>A0$N0z?t$O!"(B
657.1305 +  16$B?J?t$N%A%'%s%8%;%C%H(BID$B$rJ];}$7$F$$$^$9!#(B
657.1306 +  $B6u$NJ8;zNs$O!"(B
657.1307 +  0 $BB3$-$NJ8;zNs$NBe$o$j$K(B ``null $B%A%'%s%8%;%C%H(BID'' $B$r0UL#$7$^$9!#(B
657.1308 +
657.1309 +\item \texttt{url} $B$H$$$&L>A0$N0z?t$O!"(B
657.1310 +  $B$=$l$,FCDj2DG=$G$"$l$P!"1s3V%j%]%8%H%j$N(B URL $B$rI=$7$^$9!#(B
657.1311 +
657.1312 +\item $B??56CM0z?t$O!"(BPython $B$N(B \texttt{bool} $B%*%V%8%'%/%H$GI=$5$l$^$9!#(B
657.1313 +
657.1314 +\end{itemize}
657.1315 +
657.1316 +$B%W%m%;%9Fb%U%C%/$O!"(B
657.1317 +$B!J30It%U%C%/$,%j%]%8%H%jD>2<$G<B9T$5$l$k$N$H0c$$!K(B
657.1318 +$B%W%m%;%9$N:n6H%G%#%l%/%H%j$rJQ99$;$:$K5/F0$5$l$^$9!#(B
657.1319 +$B%W%m%;%9$N:n6H%G%#%l%/%H%j$r0\F0$5$;$k$H!"(B
657.1320 +Mercurial API $B$N8F$S=P$7$,<:GT$9$kMW0x$H@.$j$($^$9$N$G!"(B
657.1321 +$B%W%m%;%9Fb%U%C%/$O:n6H%G%#%l%/%H%j$rJQ99$7$F$O$$$1$^$;$s!#(B
657.1322 +
657.1323 +$B!J%W%m%;%9Fb!K%U%C%/$,??56CM(B ``false'' $B$rJV5Q$7$?>l9g!"(B
657.1324 +$B%U%C%/8F$S=P$7$O@.8y$7$?$b$N$H$_$J$5$l$^$9!#(B
657.1325 +$B??56CM(B ``true'' $B$,JV5Q$5$l$k$+!"(B
657.1326 +$BNc30$,IbMH$5$l$?>l9g!"(B
657.1327 +$B%U%C%/8F$S=P$7$O<:GT$7$?$b$N$H$_$J$5$l$^$9!#(B
657.1328 +$B5/F0$N47=,$rM}2r$9$k$K$O!"(B
657.1329 +``$B<:GT$7$?$+H]$+$rDLCN$9$k(B''$B$H3P$($k$N$,NI$$$G$7$g$&!#(B
657.1330 +
657.1331 +$B%A%'%s%8%;%C%H(BID$B$O!"(B
657.1332 +Mercurial API $B$,>oMQ$7$F$$$k%P%$%J%j%O%C%7%e7A<0$G$O$J$/!"(B
657.1333 +Python $B%U%C%/$K(B16$B?JJ8;zNs$N7A<0$GEO$5$l$kE@$KCm0U$7$F$/$@$5$$!#(B
657.1334 +16$B?J%O%C%7%eCM$r%P%$%J%j%O%C%7%eCM7A<0$KJQ49$9$k$K$O!"(B
657.1335 +\pymodfunc{mercurial.node}{bin} $B4X?t$r;HMQ$7$F$/$@$5$$!#(B
657.1336 +
657.1337 +\subsection{External hook execution}
657.1338 +
657.1339 +$B%W%m%;%930%U%C%/!J$N5/F0J8;zNs!K$O!"(B
657.1340 +Mercurial $B$r<B9T$7$F$$$k%7%'%k$KEO$5$l$^$9!#(B
657.1341 +$B$=$N$?$a!"(B
657.1342 +$BJQ?tCV49$d%3%^%s%I=PNO$N%j%@%$%l%/%H$H$$$C$?!"(B
657.1343 +$B%7%'%k$N5!G=$,MxMQ2DG=$G$9!#(B
657.1344 +$B%W%m%;%930%U%C%/$O!"(B
657.1345 +$B!J%W%m%;%9Fb%U%C%/$,(B Mercurial $B$,5/F0$5$l$?%G%#%l%/%H%j$G<B9T$5$l$k$N$H0c$$!K(B
657.1346 +$B%j%]%8%H%j%k!<%HD>2<$G<B9T$5$l$^$9!#(B
657.1347 +
657.1348 +$B%U%C%/0z?t$O!"4D6-JQ?t$r7PM3$7$FEO$5$l$^$9!#(B
657.1349 +$B8D!9$N4D6-JQ?t$NL>A0$O!"(B
657.1350 +$BBgJ8;z$G3n$D(B ``\texttt{HG\_}'' $B@\F,<-$,IUM?$5$l$?7A<0$KJQ49$5$l$^$9!#(B
657.1351 +$BNc$($P!"(B
657.1352 +$B0z?tL>$,(B ``\texttt{node}'' $B$N>l9g!"(B
657.1353 +$BEv3:0z?t$rI=$94D6-JQ?t$NL>A0$O(B ``\texttt{HG\_NODE}'' $B$H$J$j$^$9!#(B
657.1354 +
657.1355 +$B??56CM0z?t$O!"(B
657.1356 +``true'' $B$,J8;zNs(B ``\texttt{1}'' $B$G!"(B
657.1357 +``false'' $B$,J8;zNs(B ``\texttt{0}'' $B$GI=$5$l$^$9!#(B
657.1358 +$B4D6-JQ?t(B
657.1359 +\envar{HG\_NODE}$B!"(B\envar{HG\_PARENT1} $B$J$$$7(B \envar{HG\_PARENT2} $B$O!"(B
657.1360 +$B%A%'%s%8%;%C%H(BID$B$r(B16$B?JJ8;zNs$GJ];}$7$^$9!#(B
657.1361 +``$B6u$N%A%'%s%8%;%C%H(BID''$B$O!"(B
657.1362 +``0'' $B$NO"B3$G$O$J$/6u$NJ8;zNs$H$7$FI=8=$5$l$^$9!#(B
657.1363 +$B4D6-JQ?t(B \envar{HG\_URL} $B$O!"(B
657.1364 +$B$=$l$,FCDj2DG=$J>l9g$K8B$j!"1s3V%j%]%8%H%j$N(B URL $B$rJ];}$7$^$9!#(B
657.1365 +
657.1366 +$B%W%m%;%930%U%C%/$,=*N;%3!<%I(B0$B$G=*N;$7$?>l9g!"(B
657.1367 +$B%U%C%/$N<B9T$O@.8y$7$?$b$N$H$_$J$5$l$^$9!#(B
657.1368 +$B=*N;%3!<%I$,(B0$B0J30$N>l9g!"(B
657.1369 +$B%U%C%/$N<B9T$O<:GT$7$?$b$N$H$_$J$5$l$^$9!#(B
657.1370 +
657.1371 +\subsection{Finding out where changesets come from}
657.1372 +
657.1373 +$B%m!<%+%k%j%]%8%H%j$HB>$N%j%]%8%H%j$N4V$N%A%'%s%8%;%C%H$NE>Aw$K4X$o$k%U%C%/$O!"(B
657.1374 +``$B8~$3$&B&(B''$B$N>pJs$rCN$k$3$H$,$G$-$k>l9g$,$"$j$^$9!#(B
657.1375 +Mercurial $B$O!"(B
657.1376 +$B%A%'%s%8%;%C%H$,(B\emph{$B$I$N$h$&$K$7$F(B}$BE>Aw$5$l$?$N$+$H!"(B
657.1377 +$BB?$/$N>l9g!"(B
657.1378 +\emph{$B$I$N%j%]%8%H%j(B}$B$H$N4V$G%A%'%s%8%;%C%H$,E>Aw$5$l$k$N$+$bCN$C$F$$$^$9!#(B
657.1379 +
657.1380 +\subsubsection{Sources of changesets}
657.1381 +\label{sec:hook:sources}
657.1382 +
657.1383 +Mercurial $B$O%j%]%8%H%j4V$G%A%'%s%8%;%C%H$rE>Aw$9$k0U?^$r!"(B
657.1384 +$B%U%C%/$KBP$7$F;vA0!J$J$$$7;v8e$K!KDLCN$7$^$9!#(B
657.1385 +$B$3$N>pJs$O!"(B
657.1386 +Python $B$K$h$k%W%m%;%9Fb%U%C%/$N>l9g$O(B \texttt{source} $B$H$$$&L>A0$N0z?t$G!"(B
657.1387 +$B30It%U%C%/$N>l9g$O(B \envar{HG\_SOURCE} $B$H$$$&L>A0$N4D6-JQ?t$G!"(B
657.1388 +Mercurial $B$+$i%U%C%/$KEO$5$l$^$9!#(B
657.1389 +
657.1390 +\begin{description}
657.1391 +\item[\texttt{serve}] $B1s3V%j%]%8%H%j$H$N4V$r!"(B
657.1392 +  http $B$J$$$7(B ssh $B7PM3$G%A%'%s%8%;%C%H$,E>Aw$5$l$^$9!#(B
657.1393 +
657.1394 +\item[\texttt{pull}] $B$"$k%j%]%8%H%j$+$iB>$N%j%]%8%H%j$X!"(B
657.1395 +  \hgcmd{pull} $B$K$h$j%A%'%s%8%;%C%H$,E>Aw$5$l$^$9!#(B
657.1396 +
657.1397 +\item[\texttt{push}] $B$"$k%j%]%8%H%j$+$iB>$N%j%]%8%H%j$X!"(B
657.1398 +  \hgcmd{push} $B$K$h$j%A%'%s%8%;%C%H$,E>Aw$5$l$^$9!#(B
657.1399 +
657.1400 +\item[\texttt{bundle}] $B$"$k%j%]%8%H%j$+$iB>$N%j%]%8%H%j$X!"(B
657.1401 +  \hgcmd{bundle} $B$K$h$j%A%'%s%8%;%C%H$,E>Aw$5$l$^$9!#(B
657.1402 +
657.1403 +\end{description}
657.1404 +
657.1405 +\subsubsection{Where changes are going---remote repository URLs}
657.1406 +\label{sec:hook:url}
657.1407 +
657.1408 +Mercurial $B$O!"(B
657.1409 +$B%j%]%8%H%j4V$G$N%A%'%s%8%;%C%HE>Aw=hM}$K$*$1$k(B``$B8~$3$&B&(B''$B$N0LCV$r!"(B
657.1410 +$B2DG=$G$"$l$P%U%C%/$KCN$i$;$^$9!#(B
657.1411 +$B$3$N>pJs$O!"(B
657.1412 +Python $B$K$h$k%W%m%;%9Fb%U%C%/$N>l9g$O(B \texttt{url} $B$H$$$&L>A0$N0z?t$G!"(B
657.1413 +$B30It%U%C%/$N>l9g$O(B \envar{HG\_URL} $B$H$$$&L>A0$N4D6-JQ?t$G!"(B
657.1414 +Mercurial $B$+$i%U%C%/$KEO$5$l$^$9!#(B
657.1415 +
657.1416 +$B$3$N>pJs$O>o$K$o$+$k$H$$$&$o$1$G$O$"$j$^$;$s!#(B
657.1417 +http $B$J$$$7(B ssh 
657.1418 +$B7PM3$G%5!<%S%9$rDs6!$7$F$$$k%j%]%8%H%j$K$*$$$F%U%C%/$,5/F0$5$l$?>l9g!"(B
657.1419 +Mercurial $B$O1s3V%j%]%8%H%j$rFCDj$9$k$3$H$O$G$-$^$;$s$,!"(B
657.1420 +$B%/%i%$%"%s%H$,$I$N%"%I%l%9$+$i@\B3$7$F$$$k$N$+$OFCDj$9$k$3$H$,$G$-$^$9!#(B
657.1421 +$B$3$N$h$&$J>l9g!"(BURL $B$O0J2<$N$$$:$l$+$N7A<0$K$J$j$^$9!#(B
657.1422 +
657.1423 +\begin{itemize}
657.1424 +\item \texttt{remote:ssh:\emph{ip-address}}---$BM?$($i$l$?(B IP $B%"%I%l%9$+$i$N(B
657.1425 +  ssh $B1s3V@\B3!#(B
657.1426 +
657.1427 +\item \texttt{remote:http:\emph{ip-address}}---$BM?$($i$l$?(B IP $B%"%I%l%9$+$i$N(B
657.1428 +  http $B1s3V@\B3!#(B
657.1429 +  $B%/%i%$%"%s%H$,(B SSL $B$r;HMQ$7$?>l9g!"(B
657.1430 +  \texttt{remote:https:\emph{ip-address}} $B7A<0$K$J$j$^$9!#(B
657.1431 +
657.1432 +\item Empty---$B1s3V@\B3$K4X$9$k>pJs$r<hF@$G$-$J$+$C$?>l9g!#(B
657.1433 +
657.1434 +\end{itemize}
657.1435 +
657.1436 +\section{Hook reference}
657.1437 +
657.1438 +\subsection{\hook{changegroup}---after remote changesets added}
657.1439 +\label{sec:hook:changegroup}
657.1440 +
657.1441 +$B$3$N%U%C%/$O!"(B
657.1442 +$BNc$($P(B \hgcmd{pull} $B$J$$$7(B \hgcmd{unbundle} $B$K$h$C$F!"(B
657.1443 +$B$"$i$+$8$aB8:_$7$F$$$k%A%'%s%8%;%C%H$N0l72$,!"(B
657.1444 +$B%j%]%8%H%j$KDI2C$5$l$?8e$K<B9T$5$l$^$9!#(B
657.1445 +$B$3$l$i$NA`:n$OG$0U8D$N%A%'%s%8%;%C%H$rDI2C$G$-$^$9$,!"(B
657.1446 +$B$3$N%U%C%/$O3FA`:nKh$K#12s$E$D<B9T$5$l$^$9!#(B
657.1447 +$B$3$N$3$H$O!"(B
657.1448 +$B%A%'%s%8%;%C%H$,$^$H$^$C$FDI2C$5$l$k$+H]$+$K4X$o$i$:!"(B
657.1449 +\hook{incoming} $B%U%C%/$N<B9T$,%A%'%s%8%;%C%HKh$K<B9T$5$l$k$N$HBP>HE*$G$9!#(B
657.1450 +
657.1451 +$BDI2C$5$l$?%A%'%s%8%;%C%H$KBP$9$k<+F02=$5$l$?%S%k%I!&%F%9%H$N3+;O7@5!$H$7$?$j!"(B
657.1452 +$B%P%0%G!<%?%Y!<%9$N99?7!"(B
657.1453 +$B%j%]%8%H%j$,?7$?$J%A%'%s%8%;%C%H$r<h$j9~$s$@$3$H$N9XFI<T$X$NDLCN!"(B
657.1454 +$B$H$$$C$?$b$N$,!"(B
657.1455 +$B$3$N%U%C%/$KA[Dj$5$l$kMQES$N0lIt$G$9!#(B
657.1456 +
657.1457 +$B$3$N%U%C%/$KEO$5$l$k%Q%i%a!<%?$O(B:
657.1458 +
657.1459 +\begin{description}
657.1460 +\item[\texttt{node}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1461 +  $BDI2C$5$l$k0l72$NCf$N:G=i$N%A%'%s%8%;%C%H$N(BID$B!#(B
657.1462 +  $B$3$N%A%'%s%8%;%C%H$+$i(B
657.1463 +  \index{tags!\texttt{tip}}\texttt{tip} 
657.1464 +  $B$^$G!J(B\texttt{tip} $B<+?H$b4^$`!K$NA4$F$N%A%'%s%8%;%C%H$,!"(B
657.1465 +  $BC1FH$N(B \hgcmd{pull}$B!"(B\hgcmd{push} $B$J$$$7(B \hgcmd{unbundle}
657.1466 +  $BA`:n$K$h$jDI2C$5$l$?$3$H$K$J$j$^$9!#(B
657.1467 +
657.1468 +\item[\texttt{source}] $BJ8;zNs!#(B
657.1469 +  $B%A%'%s%8%;%C%H$NM3Mh85$rI=$7$^$9!#(B
657.1470 +  $B>\:Y$O(B\ref{sec:hook:sources}~$B@a$r;2>H$7$F$/$@$5$$!#(B
657.1471 +
657.1472 +\item[\texttt{url}] URL$B!#(B
657.1473 +  $BFCDj$G$-$k>l9g$K8B$j!"1s3V%j%]%8%H%j$N>l=j$rI=$7$^$9!#(B
657.1474 +  $B>\:Y$O(B\ref{sec:hook:url}~$B@a$r;2>H$7$F$/$@$5$$!#(B
657.1475 +
657.1476 +\end{description}
657.1477 +
657.1478 +$BMWJLES;2>H(B:
657.1479 +\hook{incoming} $B!J(B\ref{sec:hook:incoming}~$B@a!K!"(B
657.1480 +\hook{prechangegroup} $B!J(B\ref{sec:hook:prechangegroup}~$B@a!K!"(B
657.1481 +\hook{pretxnchangegroup} $B!J(B\ref{sec:hook:pretxnchangegroup}~$B@a!K(B
657.1482 +
657.1483 +\subsection{\hook{commit}---after a new changeset is created}
657.1484 +\label{sec:hook:commit}
657.1485 +
657.1486 +$B$3$N%U%C%/$O!"?7$7$$%A%'%s%8%;%C%H$,:n@.$5$l$?8e$G<B9T$5$l$^$9!#(B
657.1487 +
657.1488 +$B$3$N%U%C%/$KEO$5$l$k%Q%i%a!<%?$O(B:
657.1489 +
657.1490 +\begin{description}
657.1491 +\item[\texttt{node}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1492 +  $B?7$7$/%3%_%C%H$5$l$?%A%'%s%8%;%C%H$N(BID$B!#(B
657.1493 +
657.1494 +\item[\texttt{parent1}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1495 +  $B?7$7$/%3%_%C%H$5$l$?%A%'%s%8%;%C%H$K$H$C$F!"(B
657.1496 +  $BBh#1?F$H$J$k%A%'%s%8%;%C%H$N(BID$B!#(B
657.1497 +
657.1498 +\item[\texttt{parent2}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1499 +  $B?7$7$/%3%_%C%H$5$l$?%A%'%s%8%;%C%H$K$H$C$F!"(B
657.1500 +  $BBh#2?F$H$J$k%A%'%s%8%;%C%H$N(BID$B!#(B
657.1501 +
657.1502 +\end{description}
657.1503 +
657.1504 +$BMWJLES;2>H(B: \hook{precommit} $B!J(B\ref{sec:hook:precommit}~$B@a!K!"(B
657.1505 +\hook{pretxncommit} $B!J(B\ref{sec:hook:pretxncommit}~$B@a!K(B
657.1506 +
657.1507 +\subsection{\hook{incoming}---after one remote changeset is added}
657.1508 +\label{sec:hook:incoming}
657.1509 +
657.1510 +$B$3$N%U%C%/$O!"(B
657.1511 +$BNc$($P(B \hgcmd{push} $B$K$h$C$F!"(B
657.1512 +$B$"$i$+$8$aB8:_$7$F$$$k%A%'%s%8%;%C%H$,!"(B
657.1513 +$B%j%]%8%H%j$KDI2C$5$l$?8e$K<B9T$5$l$^$9!#(B
657.1514 +$BJ#?t$N%A%'%s%8%;%C%H$,C10l$NA`:n$GDI2C$5$l$?>l9g$G$b!"(B
657.1515 +$B$3$N%U%C%/$ODI2C$5$l$?8D!9$N%A%'%s%8%;%C%HKh$K<B9T$5$l$^$9!#(B
657.1516 +
657.1517 +$B$3$N%U%C%/$r(B \hook{changegroup} $B%U%C%/!J(B\ref{sec:hook:changegroup}~$B@a;2>H!K(B
657.1518 +$B$HF1MM$NL\E*$K;HMQ$9$k$3$H$,$G$-$^$9!#(B
657.1519 +$B0l72$N%A%'%s%8%;%C%HKh$N%U%C%/5/F0$NJ}$,JXMx$J>l9g$b$"$j$^$9$,!"(B
657.1520 +$B;~$K$O%A%'%s%8%;%C%H$4$H$N%U%C%/5/F0$bJXMx$G$9!#(B
657.1521 +
657.1522 +$B$3$N%U%C%/$KEO$5$l$k%Q%i%a!<%?$O(B:
657.1523 +
657.1524 +\begin{description}
657.1525 +\item[\texttt{node}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1526 +  $B?7$7$/DI2C$5$l$?%A%'%s%8%;%C%H$N(BID$B!#(B
657.1527 +
657.1528 +\item[\texttt{source}] $BJ8;zNs!#(B
657.1529 +  $B%A%'%s%8%;%C%H$NM3Mh85$rI=$7$^$9!#(B
657.1530 +  $B>\:Y$O(B\ref{sec:hook:sources}~$B@a$r;2>H$7$F$/$@$5$$!#(B
657.1531 +
657.1532 +\item[\texttt{url}] URL$B!#(B
657.1533 +  $BFCDj$G$-$k>l9g$K8B$j!"1s3V%j%]%8%H%j$N>l=j$rI=$7$^$9!#(B
657.1534 +  $B>\:Y$O(B\ref{sec:hook:url}~$B@a$r;2>H$7$F$/$@$5$$!#(B
657.1535 +
657.1536 +\end{description}
657.1537 +
657.1538 +$BMWJLES;2>H(B: 
657.1539 +\hook{changegroup} $B!J(B\ref{sec:hook:changegroup}~$B@a!K!"(B
657.1540 +\hook{prechangegroup} $B!J(B\ref{sec:hook:prechangegroup}~$B@a!K!"(B
657.1541 +\hook{pretxnchangegroup} $B!J(B\ref{sec:hook:pretxnchangegroup}~$B@a!K(B
657.1542 +
657.1543 +\subsection{\hook{outgoing}---after changesets are propagated}
657.1544 +\label{sec:hook:outgoing}
657.1545 +
657.1546 +$B$3$N%U%C%/$O!"(B
657.1547 +$BNc$($P(B \hgcmd{push} $B$J$$$7(B \hgcmd{bundle} $B$K$h$C$F!"(B
657.1548 +$BB>$N%j%]%8%H%j$X$H%A%'%s%8%;%C%H$N0l72$,EAGE$7$?8e$K<B9T$5$l$^$9!#(B
657.1549 +
657.1550 +$B%A%'%s%8%;%C%H$,30It$KEAGE$7$?$3$H$N4IM}<T$X$NDLCN$J$I$O!"(B
657.1551 +$B$3$N%U%C%/$KA[Dj$5$l$kMQES$N#1$D$G$9!#(B
657.1552 +
657.1553 +$B$3$N%U%C%/$KEO$5$l$k%Q%i%a!<%?$O(B:
657.1554 +
657.1555 +\begin{description}
657.1556 +\item[\texttt{node}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1557 +  $BB>$N%j%]%8%H%j$X$HEAGE$9$k0l72$NCf$N:G=i$N%A%'%s%8%;%C%H$N(BID$B!#(B
657.1558 +
657.1559 +\item[\texttt{source}] $BJ8;zNs!#(B
657.1560 +  $BEAGEA`:n$NH/9TM3Mh$rI=$7$^$9!J(B\ref{sec:hook:sources}~$B@a$r;2>H$7$F$/$@$5$$!K!#(B
657.1561 +  $B1s3V%/%i%$%"%s%H$+$i$N(B \hgcmd{pull} $BMW5a$N>l9g!"(B
657.1562 +  \texttt{source} $B$O(B \texttt{serve} $B$H$J$j$^$9!#(B
657.1563 +  $B%A%'%s%8%;%C%H72$r<hF@$7$h$&$H$9$k%/%i%$%"%s%H$,%m!<%+%k%[%9%H>e$K5o$k>l9g!"(B
657.1564 +  $B%/%i%$%"%s%H$NA`:n<oJL$K1~$8$F!"(B
657.1565 +  \texttt{source} $B$NCM$O(B
657.1566 +  \texttt{bundle}$B!"(B\texttt{pull} $B$J$$$7(B \texttt{push} $B$N$$$:$l$+$K$J$j$^$9!#(B
657.1567 +
657.1568 +\item[\texttt{url}] URL$B!#(B
657.1569 +  $BFCDj$G$-$k>l9g$K8B$j!"1s3V%j%]%8%H%j$N>l=j$rI=$7$^$9!#(B
657.1570 +  $B>\:Y$O(B\ref{sec:hook:url}~$B@a$r;2>H$7$F$/$@$5$$!#(B
657.1571 +
657.1572 +\end{description}
657.1573 +
657.1574 +$BMWJLES;2>H!'(B
657.1575 +\hook{preoutgoing} $B!J(B\ref{sec:hook:preoutgoing}~$B@a!K(B
657.1576 +
657.1577 +\subsection{\hook{prechangegroup}---before starting to add remote changesets}
657.1578 +\label{sec:hook:prechangegroup}
657.1579 +
657.1580 +$B$3$N@)8fMQ%U%C%/$O!"(B
657.1581 +$BB>$N%j%]%8%H%j$+$i$N%A%'%s%8%;%C%H72$NDI2C$,(B
657.1582 +Mercurial $B$K$h$j3+;O$5$l$kD>A0$K<B9T$5$l$^$9!#(B
657.1583 +
657.1584 +$B$3$N%U%C%/$O%A%'%s%8%;%C%H72$NE>Aw3+;O$,5v2D$5$l$kA0$K<B9T$5$l$k$?$a!"(B
657.1585 +$B%U%C%/<+BN$ODI2C$5$l$k%A%'%s%8%;%C%H$K4X$9$k>pJs$rF@$k$3$H$,$G$-$^$;$s!#(B
657.1586 +$B$3$N%U%C%/$N<B9T$,<:GT$7$?>l9g!"%A%'%s%8%;%C%H72$OE>Aw$5$l$^$;$s!#(B
657.1587 +
657.1588 +$B$3$N%U%C%/$NMQES$N0l$D$K!"(B
657.1589 +$B%j%]%8%H%j$KBP$9$k30It$+$i$N%A%'%s%8%;%C%HDI2C$N6X;_$,$"$j$^$9!#(B
657.1590 +$BNc$($P!"(B
657.1591 +$B%m!<%+%k%[%9%H>e$N4IM}<T$,%j%]%8%H%j$rJQ99$G$-$k0lJ}$G!"(B
657.1592 +$BMxMQ<T$,%5!<%P7PM3$GJQ99$r(B \hgcmd{push} $B$G$-$J$$$h$&$K!"(B
657.1593 +$B0l;~E*$J$$$71J5W$K(B``$BE`7k(B''$B$9$k$3$H$b$G$-$^$9!#(B
657.1594 +
657.1595 +$B$3$N%U%C%/$KEO$5$l$k%Q%i%a!<%?$O(B:
657.1596 +
657.1597 +\begin{description}
657.1598 +
657.1599 +\item[\texttt{source}] $BJ8;zNs!#(B
657.1600 +  $B%A%'%s%8%;%C%H$NM3Mh85$rI=$7$^$9!#(B
657.1601 +  $B>\:Y$O(B\ref{sec:hook:sources}~$B@a$r;2>H$7$F$/$@$5$$!#(B
657.1602 +
657.1603 +\item[\texttt{url}] URL$B!#(B
657.1604 +  $BFCDj$G$-$k>l9g$K8B$j!"1s3V%j%]%8%H%j$N>l=j$rI=$7$^$9!#(B
657.1605 +  $B>\:Y$O(B\ref{sec:hook:url}~$B@a$r;2>H$7$F$/$@$5$$!#(B
657.1606 +
657.1607 +\end{description}
657.1608 +
657.1609 +$BMWJLES;2>H!'(B
657.1610 +\hook{changegroup} $B!J(B\ref{sec:hook:changegroup}~$B@a!K!"(B
657.1611 +\hook{incoming} $B!J(B\ref{sec:hook:incoming}~$B@a!K!"(B
657.1612 +\hook{pretxnchangegroup} $B!J(B\ref{sec:hook:pretxnchangegroup}~$B@a!K(B
657.1613 +
657.1614 +\subsection{\hook{precommit}---before starting to commit a changeset}
657.1615 +\label{sec:hook:precommit}
657.1616 +
657.1617 +$B$3$N%U%C%/$O!"(B
657.1618 +Mercurial $B$,?7$?$J%A%'%s%8%;%C%H$r%3%_%C%H$9$kA0$K<B9T$5$l$^$9!#(B
657.1619 +$B%3%_%C%H$5$l$k%U%!%$%k!"%3%_%C%H%a%C%;!<%8$J$$$7F|IU$H$$$C$?!"(B
657.1620 +$B%3%_%C%H$K4X$9$k%a%?%G!<%?$r(B
657.1621 +Mercurial $B$,B7$($kA0$K<B9T$5$l$^$9!#(B
657.1622 +
657.1623 +$B$3$N%U%C%/$NMQES$N0l$D$K!"(B
657.1624 +$B%A%'%s%8%;%C%H$N<u$1F~$l$r5v$90lJ}$G$N!"(B
657.1625 +$B?7$?$J%A%'%s%8%;%C%H$N%3%_%C%H$N6X;_$,$"$j$^$9!#(B
657.1626 +$BB>$NMQES$H$H$7$F$O!"(B
657.1627 +$B%S%k%I$d%F%9%H$r<B;\$7!"(B
657.1628 +$B$=$l$i$,@.8y$7$?>l9g$K$N$_%3%_%C%H$r5v2D$9$k!"(B
657.1629 +$B$H$$$&$b$N$b$"$j$^$9!#(B
657.1630 +
657.1631 +$B$3$N%U%C%/$KEO$5$l$k%Q%i%a!<%?$O(B:
657.1632 +
657.1633 +\begin{description}
657.1634 +\item[\texttt{parent1}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1635 +  $B:n6HNN0h%G%#%l%/%H%j$K$H$C$F!"(B
657.1636 +  $BBh#1?F$H$J$k%A%'%s%8%;%C%H$N(BID$B!#(B
657.1637 +
657.1638 +\item[\texttt{parent2}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1639 +  $B:n6HNN0h%G%#%l%/%H%j$K$H$C$F!"(B
657.1640 +  $BBh#2?F$H$J$k%A%'%s%8%;%C%H$N(BID$B!#(B
657.1641 +
657.1642 +\end{description}
657.1643 +
657.1644 +$B%3%_%C%H$,?J9T$7$?>l9g!"(B
657.1645 +$B:n6HNN0h%G%#%l%/%H%j$N!JN>!K?F$,!"(B
657.1646 +$B?7$?$J%A%'%s%8%;%C%H$N?F$H$J$j$^$9!#(B
657.1647 +
657.1648 +$BMWJLES;2>H!'(B
657.1649 +\hook{commit} $B!J(B\ref{sec:hook:commit}~$B@a!K!"(B
657.1650 +\hook{pretxncommit} $B!J(B\ref{sec:hook:pretxncommit}~$B@a!K(B
657.1651 +
657.1652 +\subsection{\hook{preoutgoing}---before starting to propagate changesets}
657.1653 +\label{sec:hook:preoutgoing}
657.1654 +
657.1655 +$B$3$N%U%C%/$O!"(B
657.1656 +Mercurial $B$,30It$KE>Aw$5$l$k%A%'%s%8%;%C%H$rFCDj$9$kD>A0$K<B9T$5$l$^$9!#(B
657.1657 +
657.1658 +$B%A%'%s%8%;%C%H$,B>$N%j%]%8%H%j$XE>Aw$5$l$k$N$rKI$0$3$H$O!"(B
657.1659 +$B$3$N%U%C%/$KA[Dj$5$l$kMQES$N#1$&$G$9!#(B
657.1660 +
657.1661 +$B$3$N%U%C%/$KEO$5$l$k%Q%i%a!<%?$O(B:
657.1662 +
657.1663 +\begin{description}
657.1664 +\item[\texttt{source}] $BJ8;zNs!#(B
657.1665 +  $BEv3:%j%]%8%H%j$KBP$9$k%A%'%s%8%;%C%H$N<hF@MW5a$NH/9TM3Mh$rI=$7$^$9(B
657.1666 +  $B!J(B\ref{sec:hook:sources}~$B@a$r;2>H$7$F$/$@$5$$!K!#(B
657.1667 +  $B$3$N%Q%i%a!<%?$,<h$jF@$kCM$K4X$7$F$O!"(B
657.1668 +  \hook{outgoing} $B$N(B \texttt{source} $B%Q%i%a!<%?$K4X$9$k(B
657.1669 +  \ref{sec:hook:outgoing}~$B@a$N5-=R$r;2>H$7$F$/$@$5$$!#(B
657.1670 +
657.1671 +\item[\texttt{url}] URL$B!#(B
657.1672 +  $BFCDj$G$-$k>l9g$K8B$j!"1s3V%j%]%8%H%j$N>l=j$rI=$7$^$9!#(B
657.1673 +  $B>\:Y$O(B\ref{sec:hook:url}~$B@a$r;2>H$7$F$/$@$5$$!#(B
657.1674 +
657.1675 +\end{description}
657.1676 +
657.1677 +$BMWJLES;2>H(B:
657.1678 +\hook{outgoing} $B!J(B\ref{sec:hook:outgoing}~$B@a!K(B
657.1679 +
657.1680 +\subsection{\hook{pretag}---before tagging a changeset}
657.1681 +\label{sec:hook:pretag}
657.1682 +
657.1683 +$B$3$N@)8f%U%C%/$O!"(B
657.1684 +$B%?%0$,@8@.$5$l$kA0$K<B9T$5$l$^$9!#(B
657.1685 +$B%U%C%/$N<B9T$,@.8y$7$?>l9g!"%?%0$N@8@.$O7QB3$5$l!"(B
657.1686 +$B%U%C%/$N<B9T$,<:GT$7$?>l9g!"%?%0$O@8@.$5$l$^$;$s!#(B
657.1687 +
657.1688 +$B$3$N%U%C%/$KEO$5$l$k%Q%i%a!<%?$O(B:
657.1689 +
657.1690 +\begin{description}
657.1691 +\item[\texttt{local}] $B??56CM!#(B
657.1692 +  $B%?%0$,%j%]%8%H%j$KBP$7$F%m!<%+%k$J$b$N(B
657.1693 +  $B!J(B\sfilename{.hg/localtags} $B$K>pJs$,3JG<$5$l$k!K$J$N$+!"(B
657.1694 +  Mercurial $B$K4IM}$5$l$k$b$N!J(B\sfilename{.hgtags} $B$K>pJs$,3JG<!K(B
657.1695 +  $B$J$N$+$rI=$7$^$9!#(B
657.1696 +
657.1697 +\item[\texttt{node}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1698 +  $B%?%0IU$1$5$l$k%A%'%s%8%;%C%H$N(BID$B!#(B
657.1699 +
657.1700 +\item[\texttt{tag}] $BJ8;zNs!#(B
657.1701 +  $B:n@.$5$l$k%?%0$NL>A0!#(B
657.1702 +
657.1703 +\end{description}
657.1704 +
657.1705 +$B@8@.$5$l$k%?%0$,9=@.4IM}BP>]$H$J$k>l9g!"(B
657.1706 +\hook{precommit} $B!J(B\ref{sec:hook:commit}~$B@a!K$*$h$S(B
657.1707 +\hook{pretxncommit} $B!J(B\ref{sec:hook:pretxncommit}~$B@a!K(B
657.1708 +$B%U%C%/$b<B9T$5$l$^$9!#(B
657.1709 +
657.1710 +$BMWJLES;2>H!'(B
657.1711 +\hook{tag} $B!J(B\ref{sec:hook:tag}~$B@a!K(B
657.1712 +
657.1713 +\subsection{\hook{pretxnchangegroup}---before completing addition of
657.1714 +  remote changesets}
657.1715 +\label{sec:hook:pretxnchangegroup}
657.1716 +
657.1717 +$B$3$N@)8f%U%C%/$O!"(B
657.1718 +$B%H%i%s%6%/%7%g%s(B---
657.1719 +$B$3$N%H%i%s%6%/%7%g%s$O!"(B
657.1720 +$BB>$N%j%]%8%H%j$+$i$N0l72$N%A%'%s%8%;%C%H$NDI2C$r4IM}$7$^$9(B
657.1721 +---$B$,40N;$9$kA0$K<B9T$5$l$^$9!#(B
657.1722 +$B%U%C%/$N<B9T$,@.8y$7$?>l9g!"%H%i%s%6%/%7%g%s$O40N;$7!"(B
657.1723 +$BA4$F$N%A%'%s%8%;%C%H$,%j%]%8%H%j$K$*$$$F1JB32=$5$l$^$9!#(B
657.1724 +$B%U%C%/$N<B9T$,<:GT$7$?>l9g!"(B
657.1725 +$B%H%i%s%6%/%7%g%s$O4,$-La$5$l!"(B
657.1726 +$B%A%'%s%8%;%C%H$K4X$9$k%G!<%?$OGK4~$5$l$^$9!#(B
657.1727 +
657.1728 +$B$3$N%U%C%/$O!"(B
657.1729 +$B!V$[$\DI2C$5$l$?!W%A%'%s%8%;%C%H$K4X$9$k%a%?%G!<%?$K%"%/%;%9$G$-$^$9$,!"(B
657.1730 +$B1JB32=$5$l$k$h$&$JA`:n(B\footnote{$BLuCm(B:
657.1731 +$BNc$($P!"30It$N(B DBMS $B$X$N%G!<%?3JG<$d!"(B
657.1732 +$B8x3+MQ%U%!%$%k$X$N=q$-=P$7Ey!#(B}
657.1733 +$B$r$3$l$i$N%G!<%?$K4p$E$$$F9T$&$Y$-$G$O$"$j$^$;$s(B
657.1734 +$B:n6H%G%#%l%/%H%j$bJQ99$9$Y$-$G$O$"$j$^$;$s!#(B
657.1735 +
657.1736 +$B$3$N%U%C%/$N<B9TCf$K!"(B
657.1737 +$BB>$N(B Mercurial $B%W%m%;%9$,F1$8%j%]%8%H%j$K%"%/%;%9$7$F$-$?>l9g!"(B
657.1738 +$B$3$N%W%m%;%9$+$i$O!"(B
657.1739 +$B!V$[$\DI2C$5$l$?!W%A%'%s%8%;%C%H$,1JB32=$5$l$?$b$N$N$h$&$K8+$($^$9!#(B
657.1740 +$B$3$N>u67$r2sHr$9$k<j=g$rF'$^$J$$$H!"(B
657.1741 +$B6%9g>uBV$K$J$j$+$M$^$;$s!#(B
657.1742 +
657.1743 +$B$3$N%U%C%/$O!"%A%'%s%8%;%C%H72$KBP$9$k?GCG$KMxMQ2DG=$G$9!#(B
657.1744 +$B%U%C%/$N<B9T$,<:GT$7$?>l9g!"(B
657.1745 +$B%H%i%s%6%/%7%g%s$,4,$-La$5$l!"(B
657.1746 +$BA4$F$N%A%'%s%8%;%C%H$,(B``$B5qH](B''$B$5$l$^$9!#(B
657.1747 +
657.1748 +$B$3$N%U%C%/$KEO$5$l$k%Q%i%a!<%?$O(B:
657.1749 +
657.1750 +\begin{description}
657.1751 +\item[\texttt{node}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1752 +  $BDI2C$5$l$k0l72$NCf$N:G=i$N%A%'%s%8%;%C%H$N(BID$B!#(B
657.1753 +  $B$3$N%A%'%s%8%;%C%H$+$i(B
657.1754 +  \index{tags!\texttt{tip}}\texttt{tip} 
657.1755 +  $B$^$G!J(B\texttt{tip} $B<+?H$b4^$`!K$NA4$F$N%A%'%s%8%;%C%H$,!"(B
657.1756 +  $BC1FH$N(B \hgcmd{pull}$B!"(B\hgcmd{push} $B$J$$$7(B \hgcmd{unbundle}
657.1757 +  $BA`:n$K$h$jDI2C$5$l$?$3$H$K$J$j$^$9!#(B
657.1758 +
657.1759 +\item[\texttt{source}] $BJ8;zNs!#(B
657.1760 +  $B%A%'%s%8%;%C%H$NM3Mh85$rI=$7$^$9!#(B
657.1761 +  $B>\:Y$O(B\ref{sec:hook:sources}~$B@a$r;2>H$7$F$/$@$5$$!#(B
657.1762 +
657.1763 +\item[\texttt{url}] URL$B!#(B
657.1764 +  $BFCDj$G$-$k>l9g$K8B$j!"1s3V%j%]%8%H%j$N>l=j$rI=$7$^$9!#(B
657.1765 +  $B>\:Y$O(B\ref{sec:hook:url}~$B@a$r;2>H$7$F$/$@$5$$!#(B
657.1766 +
657.1767 +\end{description}
657.1768 +
657.1769 +$BMWJLES;2>H!'(B
657.1770 +\hook{changegroup} $B!J(B\ref{sec:hook:changegroup}$B!K!"(B
657.1771 +\hook{incoming} $B!J(B\ref{sec:hook:incoming}$B!K!"(B
657.1772 +\hook{prechangegroup} $B!J(B\ref{sec:hook:prechangegroup}$B!K(B
657.1773 +
657.1774 +\subsection{\hook{pretxncommit}---before completing commit of new changeset}
657.1775 +\label{sec:hook:pretxncommit}
657.1776 +
657.1777 +$B$3$N@)8f%U%C%/$O!"(B
657.1778 +$B%H%i%s%6%/%7%g%s(B---
657.1779 +$B$3$N%H%i%s%6%/%7%g%s$O!"(B
657.1780 +$B?7$?$J%A%'%s%8%;%C%H$N%3%_%C%H$r4IM}$7$^$9(B
657.1781 +---$B$,40N;$9$kA0$K<B9T$5$l$^$9!#(B
657.1782 +$B%U%C%/$N<B9T$,@.8y$7$?>l9g!"%H%i%s%6%/%7%g%s$O40N;$7!"(B
657.1783 +$B%A%'%s%8%;%C%H$,%j%]%8%H%j$K$*$$$F1JB32=$5$l$^$9!#(B
657.1784 +$B%U%C%/$N<B9T$,<:GT$7$?>l9g!"(B
657.1785 +$B%H%i%s%6%/%7%g%s$O4,$-La$5$l!"(B
657.1786 +$B%3%_%C%H$K4X$9$k%G!<%?$OGK4~$5$l$^$9!#(B
657.1787 +
657.1788 +$B$3$N%U%C%/$O!"(B
657.1789 +$B!V$[$\?75,:n@.$5$l$?!W%A%'%s%8%;%C%H$K4X$9$k%a%?%G!<%?$K%"%/%;%9$G$-$^$9$,!"(B
657.1790 +$B1JB32=$5$l$k$h$&$JA`:n$r$3$l$i$N%G!<%?$K4p$E$$$F9T$&$Y$-$G$O$"$j$^$;$s(B
657.1791 +$B:n6H%G%#%l%/%H%j$bJQ99$9$Y$-$G$O$"$j$^$;$s!#(B
657.1792 +
657.1793 +$B$3$N%U%C%/$N<B9TCf$K!"(B
657.1794 +$BB>$N(B Mercurial $B%W%m%;%9$,F1$8%j%]%8%H%j$K%"%/%;%9$7$F$-$?>l9g!"(B
657.1795 +$B$3$N%W%m%;%9$+$i$O!"(B
657.1796 +$B!V$[$\?75,:n@.$5$l$?!W%A%'%s%8%;%C%H$,1JB32=$5$l$?$b$N$N$h$&$K8+$($^$9!#(B
657.1797 +$B$3$N>u67$r2sHr$9$k<j=g$rF'$^$J$$$H!"(B
657.1798 +$B6%9g>uBV$K$J$j$+$M$^$;$s!#(B
657.1799 +
657.1800 +$B$3$N%U%C%/$KEO$5$l$k%Q%i%a!<%?$O(B:
657.1801 +
657.1802 +\begin{description}
657.1803 +
657.1804 +\item[\texttt{node}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1805 +  $B?7$7$/%3%_%C%H$5$l$?%A%'%s%8%;%C%H$N(BID$B!#(B
657.1806 +
657.1807 +\item[\texttt{parent1}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1808 +  $B?7$7$/%3%_%C%H$5$l$?%A%'%s%8%;%C%H$K$H$C$F!"(B
657.1809 +  $BBh#1?F$H$J$k%A%'%s%8%;%C%H$N(BID$B!#(B
657.1810 +
657.1811 +\item[\texttt{parent2}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1812 +  $B?7$7$/%3%_%C%H$5$l$?%A%'%s%8%;%C%H$K$H$C$F!"(B
657.1813 +  $BBh#2?F$H$J$k%A%'%s%8%;%C%H$N(BID$B!#(B
657.1814 +
657.1815 +\end{description}
657.1816 +
657.1817 +$BMWJLES;2>H!'(B
657.1818 +\hook{precommit} $B!J(B\ref{sec:hook:precommit}~$B@a!K(B
657.1819 +
657.1820 +\subsection{\hook{preupdate}---before updating or merging working directory}
657.1821 +\label{sec:hook:preupdate}
657.1822 +
657.1823 +$B$3$N@)8f%U%C%/$O!"(B
657.1824 +$B:n6HNN0h%G%#%l%/%H%j$K$*$1$k(B \hgcmd{update} $B$J$$$7(B \hgcmd{merge}
657.1825 +$B$N<B;\A0$K<B9T$5$l$^$9!#(B
657.1826 +$B$3$N%U%C%/$O!"(B
657.1827 +Mercurial $B$N(B \hgcmd{update} 
657.1828 +$B<B;\A03NG'$,(B \hgcmd{update} $B$J$$$7(B \hgcmd{merge} 
657.1829 +$B$r<B9T2DG=$HH=CG$7$?>l9g$K$7$+<B9T$5$l$^$;$s!#(B
657.1830 +$B%U%C%/$N<B9T$,@.8y$7$?>l9g!"(B
657.1831 +\hgcmd{update} $B$J$$$7(B \hgcmd{merge} $B$N<B9T$O7QB3$5$l$^$9$,!"(B
657.1832 +$B%U%C%/$N<B9T$,<:GT$7$?>l9g!"(B
657.1833 +\hgcmd{update} $B$J$$$7(B \hgcmd{merge} $B$O<B9T$5$l$^$;$s!#(B
657.1834 +
657.1835 +$B$3$N%U%C%/$KEO$5$l$k%Q%i%a!<%?$O(B:
657.1836 +
657.1837 +\begin{description}
657.1838 +\item[\texttt{parent1}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1839 +  $B:n6HNN0h%G%#%l%/%H%j$,(B \hgcmd{update} $B$5$l$k?F%A%'%s%8%;%C%H$N(BID$B!#(B
657.1840 +  $B:n6HNN0h%G%#%l%/%H%j$,(B \hgcmd{merge} $B$5$l$k>l9g$O!"(B
657.1841 +  $B8=:_$N?F%A%'%s%8%;%C%H$HF1$8$K$J$j$^$9!#(B
657.1842 +
657.1843 +\item[\texttt{parent2}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1844 +  $B:n6HNN0h%G%#%l%/%H%j$,(B \hgcmd{merge} $B$5$l$k>l9g$K$N$_@_Dj$5$l$^$9!#(B
657.1845 +  $B:n6HNN0h%G%#%l%/%H%j$N(B \hgcmd{merge} $BBP>]$H$J$k%A%'%s%8%;%C%H$N(BID$B!#(B
657.1846 +
657.1847 +\end{description}
657.1848 +
657.1849 +$BMWJLES;2>H!'(B
657.1850 +\hook{update} $B!J(B\ref{sec:hook:update}~$B@a!K(B
657.1851 +
657.1852 +\subsection{\hook{tag}---after tagging a changeset}
657.1853 +\label{sec:hook:tag}
657.1854 +
657.1855 +$B$3$N%U%C%/$O!"%?%0$,@8@.$5$l$?8e$G<B9T$5$l$^$9!#(B
657.1856 +
657.1857 +$B$3$N%U%C%/$KEO$5$l$k%Q%i%a!<%?$O(B:
657.1858 +
657.1859 +\begin{description}
657.1860 +\item[\texttt{local}] $B??56CM!#(B
657.1861 +  $B%?%0$,%j%]%8%H%j$KBP$7$F%m!<%+%k$J$b$N(B
657.1862 +  $B!J(B\sfilename{.hg/localtags} $B$K>pJs$,3JG<$5$l$k!K$J$N$+!"(B
657.1863 +  Mercurial $B$K4IM}$5$l$k$b$N!J(B\sfilename{.hgtags} $B$K>pJs$,3JG<!K(B
657.1864 +  $B$J$N$+$rI=$7$^$9!#(B
657.1865 +
657.1866 +\item[\texttt{node}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1867 +  $B%?%0IU$1$5$l$k%A%'%s%8%;%C%H$N(BID$B!#(B
657.1868 +
657.1869 +\item[\texttt{tag}] $BJ8;zNs!#(B
657.1870 +  $B:n@.$5$l$k%?%0$NL>A0!#(B
657.1871 +
657.1872 +\end{description}
657.1873 +
657.1874 +$B@8@.$5$l$k%?%0$,9=@.4IM}BP>]$H$J$k>l9g!"(B
657.1875 +$B$3$N%U%C%/$N<B9T$K@hN)$C$F(B
657.1876 +\hook{commit} $B%U%C%/!J(B\ref{sec:hook:commit}~$B@a!K$,<B9T$5$l$^$9!#(B
657.1877 +
657.1878 +$BMWJLES;2>H!'(B
657.1879 +\hook{pretag} $B!J(B\ref{sec:hook:pretag}~$B@a!K(B
657.1880 +
657.1881 +\subsection{\hook{update}---after updating or merging working directory}
657.1882 +\label{sec:hook:update}
657.1883 +
657.1884 +$B$3$N%U%C%/$O!"(B
657.1885 +$B:n6HNN0h%G%#%l%/%H%j$K$*$1$k(B \hgcmd{update} $B$J$$$7(B \hgcmd{merge}
657.1886 +$B$,40N;$7$?:]$K<B9T$5$l$^$9!#(B
657.1887 +\hgcmd{merge} $B$O<:GT$7F@$k(B
657.1888 +$B!J30It%3%^%s%I$N(B \command{hgmerge} 
657.1889 +$B$,3F%U%!%$%k$K$*$1$k>WFM$N2r>C$K<:GT$7$?>l9g!K$N$G!"(B
657.1890 +$B$3$N%U%C%/$K$O(B \hgcmd{update} $B$J$$$7(B \hgcmd{merge} 
657.1891 +$B$N@.H]$,EA$($i$l$^$9!#(B
657.1892 +
657.1893 +\begin{description}
657.1894 +\item[\texttt{error}] $B??56CM!#(B
657.1895 +   \hgcmd{update} $B$J$$$7(B \hgcmd{merge} $B<B9T$,@.8y$7$?$+H]$+$rI=$7$^$9!#(B
657.1896 +
657.1897 +\item[\texttt{parent1}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1898 +  $B?7$7$/%3%_%C%H$5$l$?%A%'%s%8%;%C%H$K$H$C$F!"(B
657.1899 +  $BBh#1?F$H$J$k%A%'%s%8%;%C%H$N(BID$B!#(B
657.1900 +
657.1901 +\item[\texttt{parent2}] $B%A%'%s%8%;%C%H(BID$B!#(B
657.1902 +  $B?7$7$/%3%_%C%H$5$l$?%A%'%s%8%;%C%H$K$H$C$F!"(B
657.1903 +  $BBh#2?F$H$J$k%A%'%s%8%;%C%H$N(BID$B!#(B
657.1904 +
657.1905 +\end{description}
657.1906 +
657.1907 +$BMWJLES;2>H!'(B
657.1908 +\hook{preupdate} $B!J(B\ref{sec:hook:preupdate}$B@a!K(B
657.1909 +
657.1910 +%%% Local Variables: 
657.1911 +%%% mode: latex
657.1912 +%%% TeX-master: "00book"
657.1913 +%%% End: 
   658.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   658.2 +++ b/ja/htlatex.sh	Sun Aug 16 03:41:39 2009 +0200
   658.3 @@ -0,0 +1,8 @@
   658.4 +#!/bin/sh
   658.5 +
   658.6 +# USAGE: htlatex.sh <html-target> <????> <latex-option>
   658.7 +#LATEX=latex
   658.8 +#LATEX=platex
   658.9 +LATEX=jlatex
  658.10 +
  658.11 +${LATEX} $3 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
   659.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   659.2 +++ b/ja/intro.tex	Sun Aug 16 03:41:39 2009 +0200
   659.3 @@ -0,0 +1,648 @@
   659.4 +\chapter{Introduction}
   659.5 +\label{chap:intro}
   659.6 +
   659.7 +\section{About revision control}
   659.8 +
   659.9 +$B9=@.4IM}$H$O!"(B
  659.10 +$BJ#?t$NHG$r;}$D>pJs72$r4IM}$9$k<j=g$N$3$H$G$9!#(B
  659.11 +$B:G$bC1=c$J<jK!$G$O!"(B
  659.12 +$BB?$/$N?M!9$,$3$l$r<jF0$G9T$$$^$9!#(B
  659.13 +$B%U%!%$%k99?7;~$K$O!"(B
  659.14 +$BD>A0$NHG$KMxMQ$7$?CM$h$j$bBg$-$JCM$r3d$jEv$F$F$+$i!"(B
  659.15 +$B$=$NCM$r4^$a$??7$7$$L>A0$G%U%!%$%k$rJ]B8$9$k!"(B
  659.16 +$B$H$$$C$?6q9g$G$9!#(B
  659.17 +
  659.18 +$B$7$+$7$J$,$i!"$?$C$?#1$D$N%U%!%$%k$G$"$C$F$b!"(B
  659.19 +$BJ#?t$NHG$r<jF0$G4IM}$9$k:n6H$O4V0c$$$,$A$G$9$N$G!"(B
  659.20 +$B$3$N<j=g$r<+F02=$9$k%=%U%H%&%'%"%D!<%k$K$OD9$$Nr;K$,$"$j$^$9!#(B
  659.21 +$B=i4|$N9=@.4IM}$r<+F02=$9$k%D!<%k$O!"(B
  659.22 +$BC10l%f!<%6$K$h$kC10l%U%!%$%k$NHG4IM}$NJd=u$r0U?^$7$F$$$^$7$?!#(B
  659.23 +$B$3$3?t==G/$N4V$K!"(B
  659.24 +$B9=@.4IM}%D!<%k$NE,MQHO0O$OBgJQ3HBg$5$l$F$-$^$7$?!#(B
  659.25 +$B8=:_$G$O!"(B
  659.26 +$BJ#?t$N%U%!%$%k$KBP$9$kJ#?t$N%f!<%6$N6&F1:n6H$r4IM}$9$k$^$G$K$J$C$F$$$^$9!#(B
  659.27 +$B:#;~$N:GA1$N9=@.4IM}%D!<%k$O!"(B
  659.28 +$B6&F1:n6H$9$k?t@i?M$N%f!<%6$K$h$C$F!"(B
  659.29 +$B?t==K|$N%U%#%k$+$i$J$k%W%m%8%'%/%H$N%G!<%?$,J#@=$5$l$F$b!"(B
  659.30 +$B$S$/$H$b$7$^$;$s!#(B
  659.31 +
  659.32 +\subsection{Why use revision control?}
  659.33 +
  659.34 +$B%W%m%8%'%/%H$K$*$$$F!"FI<T$G$"$k$"$J$?$d!"(B
  659.35 +$B$"$J$?$N%A!<%`$,<+F02=$5$l$?9=@.4IM}%D!<%k$r;HMQ$7$?$/$J$k$N$O!"(B
  659.36 +$B0J2<$N$h$&$JM}M3$,$"$k$+$i$G$O$J$$$G$7$g$&$+!#(B
  659.37 +
  659.38 +\begin{itemize}
  659.39 +\item $B%W%m%8%'%/%H$NNr;K$HH/E8$r5-O?$7$F$/$l$k$N$G!"(B
  659.40 +  $B<+J,$G$=$l$r5-O?$9$kI,MW$,L5$$$?$a!#(B
  659.41 +  $B9=@.4IM}%D!<%k$r;HMQ$9$k$3$H$G!"(B
  659.42 +  $BJQ99Kh$K!"(B\emph{$B2?;~(B}$B!"(B\emph{$BC/$,(B}$B!"(B\emph{$B2?8N(B}$B!"(B
  659.43 +  \emph{$B2?$r(B}$BJQ99$7$?$+$N5-O?$r8+$k$3$H$,$G$-$^$9!#(B
  659.44 +
  659.45 +\item $BB>$N%a%s%P!<$H$N6&F1:n6H$,MF0W$K$J$k$?$a!#(B  
  659.46 +  $BNc$($P!"@x:_E*$KN>N)$7$J$$JQ99$,$[$\F1;~$K9T$o$l$?:]$K!"(B
  659.47 +  $B9=@.4IM}%D!<%k$O$=$N$3$H$r8!=P$7$?>e$G!"(B
  659.48 +  $B$3$N$h$&$J>WFM$N2r>C$r<j=u$1$7$F$/$l$^$9!#(B
  659.49 +
  659.50 +\item $B4V0c$$$+$i$NI|5l$r<j=u$1$7$F$/$l$k$?$a!#(B
  659.51 +  $BJQ99<B;\$7$?8e$G4V0c$$$K5$IU$$$?>l9g!"(B
  659.52 +  $BJ#?t$N%U%!%$%k$KEO$k4V0c$$$G$"$C$F$b!"(B
  659.53 +  $B0JA0$N>uBV$KI|5l$9$k$3$H$,$G$-$^$9!#(B
  659.54 +  $B<B$N$H$3$m!"(B
  659.55 +  \emph{$BK\Ev$K(B}$BNI$$9=@.4IM}%D!<%k$G$"$l$P!"(B
  659.56 +  $BLdBj$,:.F~$7$?;~E@$N87L)$J3d$j=P$7$r8z2LE*$KC5$7=P$9$3$H$,$G$-$k$G$7$g$&(B
  659.57 +  $B!J>\:Y$O!"(B\ref{sec:undo:bisect}~$B@a$r;2>H$7$F$/$@$5$$!K(B\footnote{$BLuCm(B:
  659.58 +  $B$D$^$j!"$=$l$,$G$-$k(B Mercurial $B$O(B\emph{$BK\Ev$K(B}$BNI$$9=@.4IM}%D!<%k$@!"(B
  659.59 +  $B$H$$$&$3$H$G$9$M!J>P!K(B}$B!#(B
  659.60 +
  659.61 +\item $B%W%m%8%'%/%H$NJ#?t$NHG$N4V$G$NF1;~:n6H$d!"(B
  659.62 +  $BHG$N4V$G$N9T$-Mh$rJd=u$7$F$/$l$k$?$a!#(B
  659.63 +
  659.64 +\end{itemize}
  659.65 +
  659.66 +$B$3$l$i$NM}M3$NKX$I$,(B---
  659.67 +$B>/$J$/$H$bM}6~$N>e$G$O(B
  659.68 +---$B0l?M$-$j$N%W%m%8%'%/%H$G$b!"(B
  659.69 +$BI4?M$H6&F1:n6H$9$k%W%m%8%'%/%H$G$bM-8z$G$9!#(B
  659.70 +
  659.71 +$B$3$l$i#2$D$N5,LO$N0[$J$k%1!<%9(B
  659.72 +$B!J(B``lone hacker'' $B$H(B ``huge team''$B!K$N$=$l$>$l$K$*$$$F!"(B
  659.73 +$B9=@.4IM}%D!<%k$N<BMQ@-$K4X$9$k=EMW$JLdBj$O!"(B
  659.74 +$B%D!<%k$+$iF@$i$l$k(B\emph{$BMx1W(B}$B$H$=$N(B\emph{$B%3%9%H(B}$B$r$I$N$h$&$KHf3S$9$k$+!"(B
  659.75 +$B$H$$$&E@$K$"$j$^$9!#(B
  659.76 +$BM}2r$d;HMQ$,Fq$7$$9=@.4IM}%D!<%k$O!"(B
  659.77 +$B%3%9%H$,9b$/IU$/$G$7$g$&!#(B
  659.78 +
  659.79 +$B9=@.4IM}$N%D!<%k$H%W%m%;%9H4$-$G$O!"(B
  659.80 +500 $B?M$+$i$J$k%W%m%8%'%/%H$O$*$=$i$/<+J,<+?H$N=E$_$G!"(B
  659.81 +$B$9$0$K$G$bJx$l$F$7$^$&$G$7$g$&!#(B
  659.82 +$B$3$N>l9g!"(B
  659.83 +$B9=@.4IM}%D!<%k(B\emph{$BH4$-(B}$B$K$O<:GT$,J]>Z$5$l$?$h$&$J$b$N$G$9$+$i!"(B
  659.84 +$B$=$l$r;W$($P!"(B
  659.85 +$B9=@.4IM}%D!<%k$rMxMQ$9$k%3%9%H$K$D$$$F$O9M$($k$^$G$bL5$$$G$7$g$&!#(B
  659.86 +
  659.87 +$B0lJ}$G!"0l?M$G$N(B``quick hack''$B$N>l9g!"(B
  659.88 +$B9=@.4IM}%D!<%k$r;H$&%3%9%H$O%W%m%8%'%/%HA4BN$N%3%9%H$HF10l$NH&$G$9$+$i!"(B
  659.89 +$B9=@.4IM}$r;H$&M>CO$OKX$IL5$$$h$&$K8+$($k$+$b$7$l$^$;$s!#(B
  659.90 +$B$7$+$7!"$=$l$OK\Ev$G$7$g$+!)(B
  659.91 +
  659.92 +Mercurial $B$O$3$l$i(B\emph{$BN>J}(B}$B$N5,LO$N3+H/$r>e<j$K%5%]!<%H$7$^$9!#(B
  659.93 +$B$o$:$+?tJ,$G4pK\$r=,F@$G$-!"(B
  659.94 +$B$=$NDc%*!<%P%X%C%I$N$*1"$G(B
  659.95 +$B:G$b>.$5$J%W%m%8%'%/%H$K$b4JC1$K9=@.4IM}$rE,MQ$G$-$^$9!#(B
  659.96 +
  659.97 +$B9=@.4IM}%D!<%k$NC1=c$5$O!"(B
  659.98 +$BFq2r$J35G0$d!"(B
  659.99 +\emph{$BK\Ev$K(B}$B$d$m$&$H$7$F$$$k$3$H$H?4M}E*$K6%9g$9$k%3%^%s%INs$H$$$C$?$b$N$r!"(B
 659.100 +$BBgNL$K?H$KIU$1$kI,MW$,L5$$$3$H$r0UL#$7$^$9!#(B
 659.101 +$BF1;~$K!"(B
 659.102 +Mercurial $B$N9b@-G=$5$H(B P2P $BE*FC@-$O!"(B
 659.103 +$BBg$-$J%W%m%8%'%/%H$X$NMxMQ$X$H6l$bL5$/3HBg$G$-$^$9!#(B
 659.104 +
 659.105 +$B1?1D$N2<<j$J%W%m%8%'%/%H$r5_$($k9=@.4IM}%D!<%k$O$"$j$^$;$s$,!"(B
 659.106 +$BNI$$%D!<%k$rA*Br$9$k$3$H$G!"(B
 659.107 +$B%W%m%8%'%/%H$G$N:n6H$K$*$1$k3j$i$+$5$,A4$/0c$C$F$-$^$9!#(B
 659.108 +
 659.109 +\subsection{The many names of revision control}
 659.110 +
 659.111 +$B9=@.4IM}$OB?MM$JNN0h$J$N$G!"(B
 659.112 +$B<B:]$K$OE}0l$5$l$?L>A0$dF,;z8l8l$,$"$j$^$;$s!#(B
 659.113 +
 659.114 +$B$h$/L\$K$9$k0lHLE*$JL>>N$*$h$SN,>N$r0J2<$KNs5s$7$^$9!#(B
 659.115 +
 659.116 +\begin{itemize}
 659.117 +\item Revision control (RCS)
 659.118 +\item Software configuration management (SCM), or configuration management
 659.119 +\item Source code management
 659.120 +\item Source code control, or source control
 659.121 +\item Version control (VCS)
 659.122 +\end{itemize}
 659.123 +
 659.124 +$B$3$l$i$NMQ8l$O<B:]$K$O$=$l$>$l0[$J$k0UL#$r;}$C$F$$$k!"(B
 659.125 +$B$H<gD%$9$k?M$b$$$^$9$,!"(B
 659.126 +$B<B:]$K$O$*8_$$$KHs>o$K=EJ#$7$?0UL#$r;}$C$F$$$k$N$G!"(B
 659.127 +$B$3$l$i$KBP$7$F8DJL$K$"$l$3$l8@$&$3$H$K$O;?F1$b$G$-$^$;$s$7!"(B
 659.128 +$BM-MQ@-$b$"$j$^$;$s(B\footnote{$BLuCm!'(B
 659.129 +$B:r:#$N%=%U%H%&%'%"3+H/$K$*$1$kMQK!$r4U$_$F!"(B
 659.130 +$B86J8$G(B ``revision control'' $B$H$J$C$F$$$k2U=j$O!"(B
 659.131 +$B0U?^E*$K(B``$B9=@.4IM}(B''(configuration management)$B$HLu$7$F$$$^$9!#(B}$B!#(B
 659.132 +
 659.133 +\section{A short history of revision control}
 659.134 +
 659.135 +$B:G$bM-L>$J@N$N9=@.4IM}%D!<%k$O!"(B
 659.136 +Bell Labs $B$N(B Marc Rochkind $B$,(B 1970 $BG/Be=iF,$K<BAu$7$?(B
 659.137 +SCCS $B!J(BSource Code Control System$B!K$G$9!#(B
 659.138 +SCCS $B$O8DJL$N%U%!%$%k$KBP$7$F5!G=$7!"(B
 659.139 +$B%W%m%8%'%/%H$K=>;v$9$kA4$F$N:n6H<T$O!"(B
 659.140 +$BC10l%7%9%F%`>e$N6&M-:n6HNN0h$X$N%"%/%;%98"$,I,MW$G$7$?!#(B
 659.141 +$B$"$k;~E@$G$N$"$k%U%!%$%k$NJQ99$O!"$?$@0l?M$N:n6H<T$N$_$,2DG=$G!"(B
 659.142 +$B%U%!%$%k$N%"%/%;%9$O%m%C%/$K$h$jD4Dd$5$l$F$$$^$7$?!#(B
 659.143 +$B%U%!%$%k$r%m%C%/$7$?$^$^3+J|$7K:$l$F$7$^$$!"(B
 659.144 +$B4IM}<T$NJd=uL5$7$K$OB>$N?M$,%U%!%$%k$rJQ99$G$-$J$/$7$F$7$^$&$3$H$O!"(B
 659.145 +$BNI$/$"$k$3$H$G$7$?!#(B
 659.146 +
 659.147 +SCCS $B$N%U%j!<$JBeBX%D!<%k$H$7$F(B
 659.148 +1980 $BG/Be=iF,$K(B Walter Tichy $B$,(B
 659.149 +RCS $B!J(BRevison Control System$B!K$H8F$V%W%m%0%i%`$r3+H/$7$^$7$?!#(B
 659.150 +SCCS $B$HF1MM!"(B
 659.151 +RCS $B$NMxMQ$K$O!"(B
 659.152 +$BC10l$N6&M-:n6HNN0h$G$N:n6H$H!"(B
 659.153 +$BJ#?t$N:n6H<T$,F1;~$K2~JQ$9$k$N$rKI$0$?$a$N%m%C%/$,I,MW$G$7$?!#(B
 659.154 +
 659.155 +1980 $BG/Be8e4|!"(BDick Grune $B$O(B RCS $B$rMQ$$$F!"(B
 659.156 +$BEv=i(B cmt $B$H8F$P$l$k%7%'%k%9%/%j%W%H72$r<BAu$7!"(B
 659.157 +$B8e$K$3$l$i$O(B CVS $B!J(BConcurrent Versions System$B!K$H2~L>$5$l$^$7$?!#(B
 659.158 +CVS $B$K$*$1$kBg$-$JJQ3W$O!"(B
 659.159 +$B3F3+H/<T$4$H$N:n6HNN0h$K$*$$$F!"(B
 659.160 +$B3+H/<T$,J?9T3n$D4vJ,FHN)$7$?:n6H$,$G$-$k$h$&$K$J$C$?$3$H$G$9!#(B
 659.161 +SCCS $B$d(B RCS $B$G$ONI$/$"$C$?!"(B
 659.162 +$B$$$D$G$bB>?M$NB-$rF'$s$G$7$^$&>u67$,!"(B
 659.163 +$B3+H/<T$4$H$N:n6HNN0h$NF3F~$K$h$C$FKI$,$l$k$h$&$K$J$j$^$7$?!#(B
 659.164 +$B3F3+H/<T$O!"(B
 659.165 +$B%W%m%8%'%/%H$K4X$9$kA4$F$N%U%!%$%k$NJ#@=$r;}$A!"(B
 659.166 +$B3F<+$NJ#@=$rFHN)$7$FJQ99$9$k$3$H$,$G$-$^$7$?!#(B
 659.167 +$BCf1{$N%j%]%8%H%j$X$NJQ99$N%3%_%C%H$K@hN)$C$F!"(B
 659.168 +$BJQ99FbMF$N%^!<%8$r$9$kI,MW$,$"$j$^$7$?!#(B
 659.169 +
 659.170 +Brian Berliner $B$O(B
 659.171 +Grune $B$N%*%j%8%J%k%9%/%j%W%H$r85$K(B C $B$G=q$-D>$7!"(B
 659.172 +$B0JMh8=BeHG$N(B CVS $B$X$HH/E8$9$k%3!<%I$r(B 1989 $B$K%j%j!<%9$7$^$7$?!#(B
 659.173 +CVS $B$O$=$N8e!"(B
 659.174 +$B!V%/%i%$%"%s%H!&%5!<%P!W%"!<%-%F%/%A%c$NF3F~$K$h$j!"(B
 659.175 +$B%M%C%H%o!<%/@\B31[$7$NA`:n$r2DG=$H$9$k5!G=$r3MF@$7$^$7$?!#(B
 659.176 +CVS $B$N%"!<%-%F%/%A%c$OCf1{=8LsE*$J$b$N$G!"(B
 659.177 +$B%5!<%P$N$_$,%W%m%8%'%/%H$NMzNr$N$3$T!<$r;}$C$F$$$^$9!#(B
 659.178 +$B%/%i%$%"%s%HB&$N:n6HNN0h$O!"(B
 659.179 +$B%W%m%8%'%/%H%U%!%$%k$N:G?7HG$rJ#@=$7$?$b$N$H!"(B
 659.180 +$B%5!<%P$N>l=jEy$rCN$k$?$a$N$o$:$+$J%a%?%G!<%?$r;}$C$F$$$k$@$1$G$9!#(B
 659.181 +CVS $B$OHs>o$K@.8y$7$F$$$F!"(B
 659.182 +$B$*$=$i$/@$3&$G:G$b9-$/;HMQ$5$l$F$$$k9=@.4IM}%7%9%F%`$G$7$g$&!#(B
 659.183 +
 659.184 +Sun Microsystems $B$O(B 1990 $BG/Be=iF,$K!"(B
 659.185 +TeamWare $B$H8F$P$l$kJ,;69=@.4IM}%7%9%F%`$N$O$7$j$H$J$k$b$N$r3+H/$7$^$7$?!#(B
 659.186 +TeamWare $B$K$*$1$k!J8D?M$N!K:n6HNN0h$O!"(B
 659.187 +$B%W%m%8%'%/%H$N40A4$JJ#@=$r3JG<$7$F$$$^$9!#(B
 659.188 +TeamWare $B$K$O!VCf1{%j%]%8%H%j!W$H$$$&35G0$,$"$j$^$;$s(B
 659.189 +$B!J(BCVS $B$OMzNr3JG<$r(B RCS $B$K0MB8$7$F$$$^$7$?$,!"(B
 659.190 +TeamWare $B$O(B SCCS $B$rMxMQ$7$F$$$^$7$?!K!#(B
 659.191 +
 659.192 +1990 $BG/Be$,?J$`$K$D$l$F!"(B
 659.193 +$BLdBj0U<1$+$i(B CVS $B$K4X$9$kLdBj$,B?$/82:_2=$7$F$-$^$7$?!#(B
 659.194 +$BNc$($P(B CVS $B$O!"(B
 659.195 +$BJ#?t$N%U%!%$%k$KBP$9$kF1;~99?7$r!"(B
 659.196 +$BO@M}E*$KIT2DJ,$JC10l$N:nMQ$H$7$F$^$H$a$kBX$o$j$K!"(B
 659.197 +$B%U%!%$%k$4$H$K8DJL$K5-O?$7$F$$$^$9!#(B
 659.198 +$B$^$?!"%U%!%$%k3,AX$r>e<j$/4IM}$G$-$J$$$?$a!"(B
 659.199 +$B%U%!%$%k$d%G%#%l%/%H%j$r2~L>$9$k$3$H$G!"(B
 659.200 +$BMF0W$K%j%]%8%H%j$r:.Mp$5$;$k$3$H$,$G$-$^$9!#(B
 659.201 +$B$J$*0-$$$3$H$K!"(B
 659.202 +CVS $B<+?H$N%=!<%9%3!<%I$OFI$`$K$bJ]<i$9$k$K$bFq2r$J$?$a!"(B
 659.203 +$B%"!<%-%F%/%A%c>e$NLdBjE@$r=$@5$9$k(B``$B6lDKEY(B''$B$OK!30$J$b$N$G$7$?!#(B
 659.204 +
 659.205 +CVS $B$N3+H/$r9T$C$F$$$?(B
 659.206 +Jim Blandy $B$*$h$S(B Karl Fogel $B$NFs?M$O!"(B
 659.207 +$B$h$jNI$$%"!<%-%F%/%A%c$r;}$A!"(B
 659.208 +$B>03n$D%3!<%I$,e:No$J%D!<%k$G(B CVS $B$rCV$-49$($k%W%m%8%'%/%H$r!"(B
 659.209 +2001 $BG/$K;O$a$^$7$?!#(B
 659.210 +$B7k2L$H$7$F@8$_=P$5$l$?(B Subversion $B$O!"(B
 659.211 +CVS $B$NCf1{=8Ls7?%/%i%$%"%s%H!?%5!<%P%b%G%k$+$i$ON%$l$J$+$C$?$b$N$N!"(B
 659.212 +$BJ#?t%U%!%$%k$NIT2DJ,%3%_%C%H$d!"(B
 659.213 +$B$h$jNI$$L>A06u4V$N4IM}!"(B
 659.214 +$B$*$h$S(B CVS $B$h$j$b35$MNI9%$J%D!<%k$H8@$&$KB-$k$=$NB>$NB?$/$N5!G=$r;}$C$F$$$^$9!#(B
 659.215 +$B=i2s$N%j%j!<%90JMh!"$=$N?M5$$OB.$d$+$K>e>:$7$F$$$^$9!#(B
 659.216 +
 659.217 +$B$=$l$H35$MF1;~4|$K!"(B
 659.218 +Graydon Hoare $B$O(B Monotone 
 659.219 +$B$H8F$P$l$kLn?4E*$JJ,;69=@.4IM}%7%9%F%`$K<h$j3]$+$j;O$a$^$7$?!#(B
 659.220 +Monotone $B$O!"(B
 659.221 +CVS $B@_7W>e$NB?$/$NLdBj$K<h$jAH$_!"(BP2P $B%"!<%-%F%/%A%c$r;}$D0lJ}$G!"(B
 659.222 +$BB?$/$N3W?7E*$JE@$K$*$$$F=i4|$N!J$=$7$F$=$N8e$N!K(B
 659.223 +$B9=@.4IM}%D!<%k$+$iHt$SH4$1$F$$$^$9!#(B
 659.224 +Monotone $B$O!"(B
 659.225 +$B0E9f$GMQ$$$i$l$k%O%C%7%eCM$r<1JL;R$H$7$F;HMQ$7$F$*$j!"(B
 659.226 +$B0[$J$kM3Mh$N%3!<%I$K$H$C$FIT2D7g$J(B``$B?.Mj(B''$B$N35G0$r;}$C$F$$$^$9!#(B
 659.227 +
 659.228 +Mercurial $B$O(B 2005 $BG/$KCB@8$7$^$7$?!#(B
 659.229 +$B@_7W>e$N4v$D$+$N8+CO$K$*$$$F(B Monotone $B$+$i1F6A$r<u$1$k0lJ}$G!"(B
 659.230 +Mercurial $B$OMxMQ$N4JJX@-!"@-G=$N9b$5!"(B
 659.231 +$B$*$h$SBg5,LO%W%m%8%'%/%H$X$NE,MQ@-$K<g4c$rCV$$$F$$$^$9!#(B
 659.232 +
 659.233 +\section{Trends in revision control}
 659.234 +
 659.235 +$B2a5n#4#0G/$KEO$k9=@.4IM}%D!<%k$N3+H/$HMxMQ$K$*$1$kJ6$l$bL5$$798~$H$7$F!"(B
 659.236 +$B9=@.4IM}%D!<%k$NMxMQ<T$O!"(B
 659.237 +$BMxMQ$7$F$$$k%D!<%k$N5!G=$K@:DL$9$k$H6&$K!"(B
 659.238 +$B%D!<%k$N@)Ls$K$h$C$FM^@)$5$l$k$h$&$G$9!#(BXXXXXX
 659.239 +There has been an unmistakable trend in the development and use of
 659.240 +revision control tools over the past four decades, as people have
 659.241 +become familiar with the capabilities of their tools and constrained
 659.242 +by their limitations.
 659.243 +
 659.244 +$B:G=i$N@$Be$O!"(B
 659.245 +$BC10l%U%!%$%k$r3F<+$N%3%s%T%e!<%?$G4IM}$9$k$3$H$+$i;O$^$j$^$7$?!#(B
 659.246 +$B$3$N@$Be$N%D!<%k$O!"(B
 659.247 +$B<jF0$K$h$k>lEv$?$j$J9=@.4IM}$KHf$Y$l$PBg$-$JA0?J$G$O$"$j$^$7$?$,!"(B
 659.248 +$BGSB>$K$h$kA`:n%b%G%k$H!"(B
 659.249 +$BC10l%3%s%T%e!<%?>e$G$NMxMQ$rA0Ds$H$7$?@_7W$N$?$a!"(B
 659.250 +$B>.$5$/6[L)$J%A!<%`$G$NMxMQ$K8BDj$5$l$F$$$^$7$?!#(B
 659.251 +
 659.252 +$BBhFs@$Be$O!"(B
 659.253 +$B%M%C%H%o!<%/<gBN$N%"!<%-%F%/%A%c$X$N0\9T$H!"(B
 659.254 +$B%W%m%8%'%/%HA4BN$N0l3g4IM}$K$h$C$F!"(B
 659.255 +$B$3$l$i$N@)Ls$r4KOB$7$^$7$?!#(B
 659.256 +$B$7$+$7!"%W%m%8%'%/%H5,LO$,Bg$-$/$J$l$P$J$k$[$I!"?7$?$JLdBj$,H/@8$7$^$7$?!#(B
 659.257 +$B%/%i%$%"%s%H$O%5!<%P$HIQHK$KO"7H$9$kI,MW$,$"$k$?$a!"(B
 659.258 +$B%5!<%P$OBg5,LO%W%m%8%'%/%H$X$NE,MQ$,LdBj$K$J$j$^$7$?!#(B
 659.259 +$B?.Mj@-$NDc$$%M%C%H%o!<%/@\B3$G$O!"(B
 659.260 +$B1s3V%f!<%6$,%5!<%P$HA4$/O"7H$,$G$-$J$$$3$H$b$"$j$^$7$?!#(B
 659.261 +$B%*!<%W%s%=!<%9%W%m%8%'%/%H$,F?L>$NFI$_9~$_@lMQ%"%/%;%9$r3+J|$9$k$K$D$l!"(B
 659.262 +$B%j%]%8%H%j$X$N%3%_%C%H8"8B$r;}$?$J$$?M!9$O!"(B
 659.263 +$B9=@.4IM}%D!<%k$NDL>o$NJ}K!$G$O<+J,$?$A$NJQ99$,5-O?$G$-$:!"(B
 659.264 +$B$=$l8N$K%W%m%8%'%/%H$KBP$7$FF/$-$+$1$k$3$H$,$G$-$J$$$3$H$K5$IU$-;O$a$^$7$?!#(B
 659.265 +
 659.266 +$B8=@$Be$N9=@.4IM}%D!<%k$O!";v<B>e(B P2P $B$G$9!#(B
 659.267 +$B$3$l$i$O!"(B
 659.268 +$BC10l$NCf1{%5!<%P$KBP$9$k0MB8$r;}$?$:!"(B
 659.269 +$B$=$N$?$a9=@.4IM}%G!<%?$rI,MW$J>l=j$KJ,;6$9$k$3$H$,2DG=$G$9!#(B
 659.270 +$B%$%s%?!<%M%C%H$r2p$7$?O"7H$K$*$1$k2]Bj$O!"(B
 659.271 +$B5;=QE*$J@)Ls$K4X$9$k$b$N$+$i!"(B
 659.272 +$BA*Br(B(of what ?)$B$H9g0U(B(of what)$B7A@.$NLdBj$X$H0\9T$7$D$D$"$j$^$9(B XXXX$B!#(B
 659.273 +Collaboration over the Internet
 659.274 +has moved from constrained by technology to a matter of choice and
 659.275 +consensus.
 659.276 +$B:G?7$N%D!<%k$O!"(B
 659.277 +$B%*%U%i%$%s>u67$G$bL5@)8B$KFHN)$7$FA`:n$G$-!"(B
 659.278 +$B%M%C%H%o!<%/@\B3$OB>$N%j%]%8%H%j$H$NF14|$K$N$_I,MW$H$5$l$^$9!#(B
 659.279 +
 659.280 +\section{A few of the advantages of distributed revision control}
 659.281 +
 659.282 +$BA0@$Be$X$NBP93GO$H$7$F!"(B
 659.283 +$B$3$3?tG/$N4V$KJ,;69=@.4IM}%D!<%k$,7xO43n$DJXMx$K$J$C$F$-$F$O$$$k$b$N$N!"(B
 659.284 +$B8E$$%D!<%k$rMxMQ$7$F$$$k?M!9$O!"(B
 659.285 +$BI,$:$7$bJ,;69=@.4IM}%D!<%k$ND9=j$K5$IU$$$F$$$k$o$1$G$O$"$j$^$;$s!#(B
 659.286 +$BCf1{=8LsE*7?!J%D!<%k!K$HHf3S$7$F!"(B
 659.287 +$BJ,;67?!J%D!<%k!K$NM%$l$F$$$kE@$,4v$D$+$"$j$^$9!#(B
 659.288 +
 659.289 +$B3+H/<T8D?M$K$H$C$F$O!"(B
 659.290 +$BCf1{=8Ls7?$HHf3S$7$?>l9g!"(B
 659.291 +$B35$M$$$D$G$bJ,;67?$NJ}$,9bB.$G$9!#(B
 659.292 +$B$3$l$O!"(B
 659.293 +$BCf1{=8Ls7?$G$OKX$I$N%a%?%G!<%?$,Cf1{%5!<%P>e$K$7$+B8:_$7$J$$$?$a!"(B
 659.294 +$BB?$/$NDj7?=hM}$NEY$K%M%C%H%o!<%/1[$7$K%5!<%P$H$NDL?.$,I,MW!"(B
 659.295 +$B$H$$$&C1=c$JM}M3$N$?$a$G$9!#(B
 659.296 +$BJ,;67?$N>l9g$O!"A4$F$N%a%?%G!<%?$r<j85$K3JG<$7$F$$$^$9!#(B
 659.297 +$BB>$NA4$F$,F1$8$@$H$7$F$b!"(B
 659.298 +$B%M%C%H%o!<%/1[$7$NDL?.$OCf1{=8Ls7?$K$H$C$F$N%*!<%P%X%C%I$H$J$j$^$9!#(B
 659.299 +$B9=@.4IM}%D!<%k$H$NBPOC$KB?$/$N;~4V$rHq$d$=$&$H8@$&$N$G$9$+$i!"(B
 659.300 +$B%F%-%Q%-$HF0$/1~Ez@-$NNI$$%D!<%k$N2ACM$r7Z;k$7$F$O$$$1$^$;$s!#(B
 659.301 +
 659.302 +$B7+$jJV$7$K$J$j$^$9$,!"(B
 659.303 +$BJ,;67?$O%a%?%G!<%?$r2?2U=j$K$bJ#@=$G$-$k$N$G!"(B
 659.304 +$B%5!<%P4D6-$N5$$^$0$l(B\footnote{$BLuCm(B: 
 659.305 +$BFCDj$N%5!<%P$NF0:nITNIEy(B}$B$O5$$K$J$j$^$;$s!#(B
 659.306 +$BCf1{=8Ls7?$G%5!<%P$,2P$rJ.$$$?>l9g$K$O!"(B
 659.307 +$B%P%C%/%"%C%W%a%G%#%"$N?.Mj@-$H!"(B
 659.308 +$B:G8e$N%P%C%/%"%C%W$,:G6a$N$b$N$G$"$k$3$H$r5'$k$K0c$$$"$j$^$;$s!#(B
 659.309 +$BJ,;67?$N>l9g!"(B
 659.310 +$B3F3+H/<T$N%3%s%T%e!<%?>e$KL5?t$N%P%C%/%"%C%W$,B8:_$9$k$3$H$K$J$j$^$9!#(B
 659.311 +
 659.312 +$BJ,;67?$OCf1{=8Ls7?$N>l9g$h$j$b!"(B
 659.313 +$B%M%C%H%o!<%/$N?.Mj@-$K$h$k1F6A$r<u$1$^$;$s!#(B
 659.314 +$B$=$l$I$3$m$+!"(B
 659.315 +$BHs>o$K8BDjE*$J4v$D$+$N%3%^%s%I$r=|$1$P!"(B
 659.316 +$BCf1{=8Ls7?$G$O%M%C%H%o!<%/@\B3H4$-$K$O2?$b$G$-$^$;$s!#(B
 659.317 +$BJ,;67?$N>l9g!"(B
 659.318 +$B:n6HCf$K%M%C%H%o!<%/@\B3$,@Z$l$F$b!"(B
 659.319 +$B$=$N;v$K5$IU$+$J$$$+$b$7$l$^$;$s!#(B
 659.320 +$BB>$N%3%s%T%e!<%?>e$N%j%]%8%H%j$H$NO"7H$@$1$O$G$-$J$/$J$j$^$9$,!"(B
 659.321 +$B<j85$N%j%]%8%H%j$H$NO"7H$HHf$Y$l$P!"(B
 659.322 +$B$=$N$h$&$JO"7H$,I,MW$J;vBV$O$o$:$+$J$b$N$G$9!#(B
 659.323 +$BJ,;6$7$F$$$k$J6&F1:n6H%A!<%`$N>l9g$K$O!"(B
 659.324 +$B$3$l$O=EMW$G$9!#(B
 659.325 +
 659.326 +\subsection{Advantages for open source projects}
 659.327 +
 659.328 +$B%=!<%9$r%O%C%-%s%0$7$F$_$h$&$H;W$C$?%*!<%W%s%=!<%9$N%W%m%8%'%/%H$,!"(B
 659.329 +$BJ,;69=@.4IM}%D!<%k$r;HMQ$7$F$$$?>l9g!"(B
 659.330 +$B<+?H$r%W%m%8%'%/%H$N(B``$BCf3K(B''$B$H$_$J$9?MC#$HD>$A$KBPEy$K$J$l$^$9!#(B
 659.331 +$BH`$i$,%j%]%8%H%j$r8x3+$7$F$$$l$P!"(B
 659.332 +$BFbIt$N?MC#$HF1$8%D!<%k!&F1$8<j=g$G!"(B
 659.333 +$B%W%m%8%'%/%H$NMzNr$N%3%T!<$d!"JQ99$N<B;\!":n6H$N5-O?$H$$$C$?$3$H$r!"(B
 659.334 +$B$9$0$K$G$b9T$&$3$H$,$G$-$^$9!#(B
 659.335 +$BCf1{=8Ls7?$N>l9g$O$=$l$H$OBP>HE*$K!"(B
 659.336 +$BCf1{$N%5!<%P$KBP$9$kJQ99%3%_%C%H$N8"8B$rM?$($i$l$J$$8B$j!"(B
 659.337 +``$BFI$_9~$_@lMQ(B''$B%b!<%I$G$7$+;H$&$3$H$,$G$-$^$;$s!#(B
 659.338 +$B%3%_%C%H8"8B$,IUM?$5$l$k$^$G$OJQ99$N5-O?$O$G$-$:!"(B
 659.339 +$BCf1{$N%j%]%8%H%j$H$NF14|$N:]$K$O>o$K<j85$G$NJQ99$,GKB;$9$k4m81$rJz$($F$$$^$9!#(B
 659.340 +
 659.341 +\subsubsection{The forking non-problem}
 659.342 +
 659.343 +$BJ,;69=@.4IM}%D!<%k$O!"(B
 659.344 +$B%W%m%8%'%/%H$r(B``$BJ,Nv(B''$B$5$;0W$/$7$F$7$^$&$?$a!"(B
 659.345 +$B%*!<%W%s%=!<%9%W%m%8%'%/%H$K$H$C$F$"$k<o$N4m81MW0x$H$J$k!"(B
 659.346 +$B$H8@$o$l$F$-$^$7$?!#(B
 659.347 +$BJ,Nv$O!"(B
 659.348 +$B$3$l0J>e0l=o$K3+H/$r7QB3$G$-$J$$$H7kO@IU$1$k860x$H$J$k$h$&$J!"(B
 659.349 +$B3+H/%0%k!<%W4V$G$N0U8+$dFC@-$NAj0c$N$,$"$k>l9g$KH/@8$7$^$9!#(B
 659.350 +$BN>?X1D$O!"(B
 659.351 +$B%W%m%8%'%/%H$N%=!<%9%3!<%I$N35$M40A4$J%3%T!<$r;}$C$F!"(B
 659.352 +$B$*8_$$$NJ}8~$X$HJ,$+$l$F$f$-$^$9!#(B
 659.353 +
 659.354 +$B;~$K$O!"J,Nv$7$?3F?X1D$,!"(B
 659.355 +$B$*8_$$$NAj0c$K@^$j9g$$$rIU$1$k7hDj$r$9$k$3$H$,$"$j$^$9!#(B
 659.356 +$BCf1{=8Ls7?$N9=@.4IM}%7%9%F%`$G$O!"(B
 659.357 +$B@^$j9g$$$rIU$1$k$?$a$N(B\emph{$B5;=QE*$J(B}$B=hM}$,6l$7$/!"(B
 659.358 +$BBgItJ,$O<jF0$G<B;\$7$J$1$l$P$J$j$^$;$s!#(B
 659.359 +$BC/$NJQ99MzNr$,(B``$B@8$-;D$k(B''$B$N$+$r7hDj$7$?>e$G!"(B
 659.360 +$B2?$H$+$7$FB>$N%A!<%`$NJQ99$r%=!<%9%D%j!<$K0\?"$7$J$1$l$P$J$j$^$;$s!#(B
 659.361 +$B$3$N:n6H$ODL>o!"(B
 659.362 +$BB>J}$NMzNr>pJs$N0lIt$J$$$7A4It$r<:$&$3$H$K$J$j$^$9!#(B
 659.363 +
 659.364 +$BJ,;67?$K$H$C$F$O!"(B
 659.365 +$BJ,Nv$3$=$,%W%m%8%'%/%H$rH/E8$5$;$k(B\emph{$BM#0l$N(B}$BJ}K!$J$N$G$9!#(B
 659.366 +$B8D!9$NJQ99$O!"A4$F@x:_E*$JJ,NvE@$J$N$G$9!#(B
 659.367 +$BJ,Nv$O>o$KH/@8$7$F$$$kA4$/4pK\E*$J;v>]$J$N$G!"(B
 659.368 +$BJ,;69=@.4IM}$O<B:]$KJ,Nv$r>e<j$/(B\emph{$B%^!<%8(B}$B$G$-$J$1$l$P$J$i$J$$!"(B
 659.369 +$B$H$$$&E@$K$3$N9M$(J}$N6/$_$,$"$j$^$9!#(B
 659.370 +
 659.371 +$BA4$F$N?M$NA4$F$N:n6H$,!"(B
 659.372 +$B>o$KJ,Nv$H%^!<%8$N4QE@$+$iAH$_N)$F$i$l$?>l9g!"(B
 659.373 +$B%*!<%W%s%=!<%9@$3&$,(B``$BJ,Nv(B''$B$H$7$F8@5Z$9$k$b$N$O!"(B
 659.374 +\emph{$B=c?h$K(B}$B<R2qE*$JLdBj$H$J$k$G$7$g$&!#(B
 659.375 +$B$I$A$i$+$H$$$($P!"(B
 659.376 +$BJ,;67?$OJ,Nv$N2DG=@-$r(B\emph{$BDc2<(B}$B$5$;$F$$$^$9!#(B
 659.377 +
 659.378 +\begin{itemize}
 659.379 +\item $BCf1{=8Ls7?$,>7$$$F$7$^$&(B``$BFbIt(B''$B!J%3%_%C%H8"8B$r;}$D?M!9!K(B
 659.380 +  $B$H(B``$B30It(B''$B!J;}$?$6$k?M!9!K$H$$$C$?<R2qE*6hJ,$rL5$/$7$^$9!#(B
 659.381 +
 659.382 +\item $B9=@.4IM}%=%U%H%&%'%"$N;kE@$G$O!"C1$J$k%^!<%8$K2a$.$^$;$s$N$G!"(B
 659.383 +  $B<R2qE*J,Nv$N8e$NOB2r$rMF0W$K$7$^$9!#(B
 659.384 +
 659.385 +\end{itemize}
 659.386 +
 659.387 +$B%W%m%8%'%/%HA4HL$X$N6[L)$JE}<#$N0];}$,Cf1{=8Ls7?%D!<%k$K$h$C$FF@$i$l$k!"(B
 659.388 +$B$H?.$8$F$$$k$?$a$K!"J,;67?$KDq93$9$k?M$b$$$^$9!#(B
 659.389 +$B$7$+$7!"$=$&$$$C$?4|BT$N85$G(B
 659.390 +CVS $B$J$$$7(B Subversion $B$K$h$k%j%]%8%H%j$r8x3+$7$F$b!"(B
 659.391 +$BL5?t$KB8:_$9$k%D!<%k$K$h$C$F!"(B
 659.392 +$B%W%m%8%'%/%HA4BN$NMzNr$r!JNc$(CY$$$H$O8@$(!K<h$j=P$7!"(B
 659.393 +$B$"$J$?$N@)8f$N5Z$P$J$$>l=j$G:F9=C[$9$k$3$H$,$G$-$F$7$^$$$^$9!#(B
 659.394 +``$B%W%m%8%'%/%HA4HL$X$N6[L)$JE}<#$N0];}(B''$B$,:x3P$G$"$k0lJ}!"(B
 659.395 +So while your control in this case is illusory, you are
 659.396 +foregoing the ability to fluidly collaborate with whatever people feel
 659.397 +compelled to mirror and fork your history.
 659.398 +XXXXXX
 659.399 +
 659.400 +\subsection{Advantages for commercial projects}
 659.401 +
 659.402 +$BB?$/$N>&6H%W%m%8%'%/%H$O!"(B
 659.403 +$B@$3&Cf$K;6$i$P$C$?%A!<%`$,@A$1Ii$C$F$$$^$9!#(B
 659.404 +$BCf1{$N%5!<%P$+$i1s$/N%$l$?%a%s%P!<$O!"(B
 659.405 +$B%3%^%s%I<B9T$NCY$5$d!"(B
 659.406 +$B$*$=$i$/KX$I?.Mj@-$NL5$$%5!<%P$H$N@\B3$rL\$K$9$k$3$H$G$7$g$&!#(B
 659.407 +$B>&6HE*$J9=@.4IM}%7%9%F%`$O!"(B
 659.408 +$B1s3V%5%$%HJ#@=(B\footnote{$BLuCm!'(B
 659.409 +``$BJ]<i$,BgJQ(B''$B$H8@$C$F$$$k$3$H$+$i!"(B
 659.410 +$B$3$N>l9g$NJ#@=$O(B``$B%5!<%P$NJ#@=(B''$B$r;X$7$F$$$k$N$+$J!)(B
 659.411 +}$B$NDI2C5!G=$K$h$k$3$l$i$NLdBj$r2r7h$7$h$&$H$7$F$$$^$9$,!"(B
 659.412 +$BDL>o!"$3$&$$$C$?5!G=$O9b2A$GJ]<i$,BgJQ$G$9!#(B
 659.413 +$BJ,;67?$N>l9g$O!"(B
 659.414 +$B$=$b$=$b$3$&$$$C$?LdBj$GG:$`I,MW$,$"$j$^$;$s!#(B
 659.415 +$B99$K!"Nc$($P%5%$%H$4$H$K0lBf$:$D$H$$$&1vG_$G!"(B
 659.416 +$B?.Mj$G$-$k%5!<%P$rJ#?tN)$A>e$2$k$3$H$b4JC1$G$9$N$G!"(B
 659.417 +$B9b2A$G5wN%$N$"$k%M%C%H%o!<%/7PO)1[$7$N%j%]%8%H%j4V$G!"(B
 659.418 +$BM>7W$JDL?.$r$9$kI,MW$O$"$j$^$;$s!#(B
 659.419 +
 659.420 +$BCf1{=8Ls7?$N9=@.4IM}%7%9%F%`$O!"(B
 659.421 +$BAjBPE*$K%9%1!<%i%S%j%F%#$,Dc$$798~$K$"$j$^$9!#(B
 659.422 +$B9b2A$JCf1{=8Ls%7%9%F%`$@$+$i$H$$$C$F!"(B
 659.423 +$BJ?9TMxMQ$9$k?t%@!<%9$N%f!<%6$NIi2Y$K$h$C$F%@%&%s$7$F$7$^$&$3$H$O!"(B
 659.424 +$BM-$jF@$J$$$3$H$G$O$"$j$^$;$s!#(B
 659.425 +$B7+$jJV$7$K$J$j$^$9$,!"(B
 659.426 +$B9bIi2Y$K$*$1$k%@%&%s$KBP$9$kE57?E*$JBP1~$O!"(B
 659.427 +$B9b2A$G8E=-$$J#@=5!G=$NMxMQ$G$9!#(B
 659.428 +$BJ,;67?%D!<%k$r;HMQ$9$k>l9g!"Cf1{%5!<%P(B--
 659.429 +$B2>$K;}$C$F$$$k$H$7$F$b0lBf$@$1$G$7$g$&$,(B
 659.430 +--$B$K$*$1$kIi2Y$OHs>o$KDc$$$N$G!"(B
 659.431 +$B$b$C$HBg?M?t$N%A!<%`$NMW5a$rC10l$N0B2A$J%5!<%P$G;+$/$3$H$,$G$-$^$9$7!"(B
 659.432 +$BIi2YJ,;6$OC1$K%9%/%j%W%H:n@.$NLdBj$H$J$j$^$9!#(B
 659.433 +
 659.434 +$B8\5R$N85$K=P$FLdBjBP1~$9$k%a%s%P!<$,$$$k>l9g!"(B
 659.435 +$BJ,;69=@.4IM}$OM-1W$G$9!#(B
 659.436 +$BB>$N%S%k%I$+$i$O3VN%$5$l$?>uBV$GFCJL$J%S%k%I$N$?$a$KJ#?t$N=$@5$r;n$7$?$j!"(B
 659.437 +$B>c32$dB`9T$NMW0x$r%=!<%9$N=$@5MzNr$+$i8z2LE*$K8!:w$7$?$j$H$$$C$?$3$H$r!"(B
 659.438 +$B5R@h4D6-$G<+<R$N%M%C%H%o!<%/$K@\B3$9$k$3$HL5$7$K9T$&$3$H$,$G$-$^$9!#(B
 659.439 +
 659.440 +\section{Why choose Mercurial?}
 659.441 +
 659.442 +Mercurial $B$O!"(B
 659.443 +$B$H$j$o$19=@.4IM}%7%9%F%`$H$7$FNI$$A*Br$r$7$?$H8@$($k!"(B
 659.444 +$BN`$r8+$J$$FCD'$r;}$C$F$$$^$9!#(B
 659.445 +
 659.446 +\begin{itemize}
 659.447 +\item $B=,F@!&MxMQ$,MF0W(B
 659.448 +\item $B7ZNL(B
 659.449 +\item $B5,LO3HBg$KBQ$(F@$k(B
 659.450 +\item $B2~B$$,MF0W(B
 659.451 +\end{itemize}
 659.452 +
 659.453 +$B9=@.4IM}%7%9%F%`$K47$l?F$7$s$G$$$k$N$G$"$l$P!"(B
 659.454 +Mercurial $B$r;H$($k$h$&$K$J$k$N$K#5J,$b3]$+$i$J$$H&$G$9!#(B
 659.455 +$B$=$&$G$J$$>l9g$G$b!"(B
 659.456 +$B99$K?tJ,0J>e$O3]$+$i$J$$$G$7$g$&!#(B
 659.457 +Mercurial $B$N%3%^%s%I$d5!G=72$O!"(B
 659.458 +$BA4BNE*$KE}0l@-$H0l4S@-$,J]$?$l$F$$$^$9$N$G!"(B
 659.459 +$BBt;3$NNc30;v9`$G$O$J$/!"(B
 659.460 +$B>/?t$N0lHLE*$JJ}K!$@$1$r3P$($F$*$1$PNI$$$N$G$9!#(B
 659.461 +
 659.462 +$B>.$5$J%W%m%8%'%/%H$N>l9g!"(B
 659.463 +$B$9$0$K$G$b(B Mercurial $B$r;H$$;O$a$k$3$H$,$G$-$k$G$7$g$&!#(B
 659.464 +$B?7$?$JJQ99$d%V%i%s%A$r@8@.$7!"(B
 659.465 +$BJQ99$r!JF10l%[%9%H$J$$$7%M%C%H%o!<%/1[$7$G!K;}$AJb$$$?$j!"(B
 659.466 +$BMzNr;2>H$d>uBV3NG'$H$$$C$?A4$F$NA`:n$,9bB.$G$9!#(B
 659.467 +$B85MhHs>o$K9bB.$JA`:n$K2C$($F!"(B
 659.468 +$BL\$K8+$($k%*!<%P!<%X%C%I$,>/$J$$$?$a$K!"(B
 659.469 +Mercurial $B$O=SIR$5$rJ]$A!"(B
 659.470 +$BMxMQ<T$N:n6H$rK8$2$k$3$H$rHr$1$k$3$H$,$G$-$^$9!#(B
 659.471 +
 659.472 +Mercurial $B$NM-MQ@-$O>.$5$J%W%m%8%'%/%H$K8BDj$5$l$^$;$s!#(B
 659.473 +$B?tI4$+$i?t@i$N%a%s%P$r;}$A!"(B
 659.474 +$B%=!<%9%3!<%I$,?tK|%U%!%$%k!&(B
 659.475 +$B?tI4%a%,%P%$%H$K5Z$V%W%m%8%'%/%H$G$b:NMQ$5$l$F$$$^$9!#(B
 659.476 +
 659.477 +Mercurial $B$N4pK\5!G=$KK~B-$G$-$J$$>l9g$G$b!"(B
 659.478 +$BMF0W$K3HD%$9$k$3$H$,$G$-$^$9!#(B
 659.479 +Mercurial $B$O=hM}$N%9%/%j%W%H2=$KE,$7$F$*$j!"(B
 659.480 +Python $B$r;H$C$Fe:No$K<BAu$5$l$F$$$k$3$H$,!"(B
 659.481 +$B!V%$%/%9%F%s%7%g%s!W$H$$$&7A<0$G$N5!G=DI2C$rMF0W$K$7$F$$$^$9!#(B
 659.482 +$B!V>c32FCDj$NJd=u!W$+$i!V@-G=8~>e!W$H$$$C$?9-$$HO0O$G!"(B
 659.483 +$BI>H=$NNI$$M-MQ$JB?$/$N%$%/%9%F%s%7%g%s$,4{$KDs6!$5$l$F$$$^$9!#(B
 659.484 +
 659.485 +\section{Mercurial compared with other tools}
 659.486 +
 659.487 +$B$3$N@h$rFI$`A0$K!"(B
 659.488 +$BCx<T<+?H$N7P83!?4X?4!?!J$"$($F8@$$$^$9$,!KJP8+$H$$$C$?$b$N$,!"(B
 659.489 +$BK\@a$KH?1G$;$6$k$rF@$J$$E@$r$4M}2r$/$@$5$$!#(B
 659.490 +$BCx<T$O!"0J2<$K$"$2$k9=@.4IM}%D!<%k$N$=$l$>$l$r!"(B
 659.491 +$B:GD9$G?tG/DxEY;HMQ$7$?7P83$,$"$j$^$9!#(B
 659.492 +
 659.493 +\subsection{Subversion}
 659.494 +
 659.495 +Subversion $B$O(B CVS $B$NCV$-49$($rL\;X$7$F3+H/$5$l$?!"(B
 659.496 +$BI>H=$N$h$$9=@.4IM}%D!<%k$G$9!#(B
 659.497 +Subversion $B$OCf1{=8Ls7?$N!V%/%i%$%"%s%H!?%5!<%P!W(B
 659.498 +$B%"!<%-%F%/%A%c$r;}$C$F$$$^$9!#(B
 659.499 +
 659.500 +Subversion $B$H(B Mercurial $B$O!"(B
 659.501 +$BF1$8:nMQ$r;}$D;w$?$h$&$JL>A0$N%3%^%s%I$r;}$C$F$$$k$N$G!"(B
 659.502 +$B0lJ}$KFk@w$_$N$"$k%f!<%6$OB>J}$NMQK!$rMF0W$K=,F@$G$-$^$9!#(B
 659.503 +$B$3$l$i$ON>J}$H$bA4$F$NCxL>$J(B OS $B>e$GMxMQ2DG=$G$9!#(B
 659.504 +
 659.505 +Subversion $B$OMzNr$r0U<1$7$?%^!<%85!G=$r;}$C$F$$$J$$$N$G!"(B
 659.506 +$B$I$N%j%S%8%g%s$N%V%i%s%A4V$G%^!<%8$9$Y$-$+$r!"(B
 659.507 +$B%f!<%6<+?H$,87L)$K;XDj$9$k$3$H$r6/@)$7$^$9!#(B
 659.508 +$B$3$N;XDj$,$G$-$J$+$C$?$j4V0c$($?$j$7$?>l9g!"(B
 659.509 +$B%^!<%8$K$*$1$kITI,MW$J>WFM$r<jF0$G2r7h$9$k1)L\$K$J$j$^$9!#(B
 659.510 +
 659.511 +$BCx<T$,%Y%s%A%^!<%/7WB,$7$?8B$j$G$O!"(B
 659.512 +Subversion $B$NA4$F$N9=@.4IM}A`:n$K$*$$$F!"(B
 659.513 +Mercurial $B$O@-G=$NLL$GAjEv$KM%0L$K$$$^$9!#(B
 659.514 +$BI.<T$NHf3S$K$h$k$H!"(B
 659.515 +Subversion $B$N(B 1.4.3~$BHG$K$*$1$k(B
 659.516 +\emph{ra\_local} $B%U%!%$%k3JG<(B
 659.517 +$B!JMxMQ2DG=$J:GB.$N%"%/%;%95!G=!K$HHf3S$7$?>l9g!"(B
 659.518 +$B#2G\$+$i#6G\DxEY$NM%0L@-$,$"$j$^$7$?!#(B
 659.519 +$B%M%C%H%o!<%/1[$7$N%j%]%8%H%j$rI,MW$H$9$k!"(B
 659.520 +$B$h$j8=<BE*$JG[CV$N>l9g!"(B
 659.521 +Subversion $B$OAjEv$KITMx$J>u67$K$J$k$G$7$g$&!#(B
 659.522 +$BB?$/$N(B Subversion $B%3%^%s%I$O%5!<%P$H$NO"7H$,I,MW$J>e$K!"(B
 659.523 +Subversion $B$OM-MQ$JJ#@=5!G=$r;}$C$F$$$J$$$?$a!"(B
 659.524 +$B>/!9Bg$-$a$N%W%m%8%'%/%H$N>l9g!"(B
 659.525 +$B%5!<%P$N@-G=$,%\%H%k%M%C%/$H$J$k$G$7$g$&!#(B
 659.526 +
 659.527 +$B$=$l$K2C$($F!"(B
 659.528 +$B%U%!%$%k$N99?7$N8!:w!J(B\texttt{status}$B!K(B
 659.529 +$B$d8=9THG$H$N:9J,I=<(!J(B\texttt{diff}$B!K$H$$$C$?!"(B
 659.530 +$B4v$D$+$N6&DLA`:n$K$*$1$k%M%C%H%o!<%/=hM}$r2sHr$9$k$?$a$K!"(B
 659.531 +Subversion $B$OAjEv$J3JG<%*!<%P%X%C%I$rJz$(9~$s$G$$$^$9!#(B
 659.532 +Mercurial $B$N%j%]%8%H%j$,%W%m%8%'%/%H$N40A4$JMzNr$rJ];}$7$F$$$k$K$b4X$o$i$:!"(B
 659.533 +Subversion $B$,Jz$(9~$`:n6H%3%T!<$O!"(B
 659.534 +Mercurial $B%j%]%8%H%j$H:n6HNN0h%G%#%l%/%H%j$N%5%$%:$H!"(B
 659.535 +$B7k2L$H$7$F$*$*$h$=F1%5%$%:$+!"$"$k$$$O$=$l0J>e$K$J$k$3$H$,B?$$$G$9!#(B
 659.536 +
 659.537 +$B9=@.4IM}4XO"$N%5!<%I%Q!<%F%#%D!<%k$K4X$7$F$O!"(B
 659.538 +$B$=$N:9$O=y!9$KKd$^$C$F$O$$$k$b$N!"(B
 659.539 +Mercurial $B$HHf3S$7$F!"(B
 659.540 +$B8=;~E@$G$O(B Subversion $B$NJ}$,$h$jB?$/$N%5%]!<%H$r<u$1$k$3$H$,$G$-$^$9!#(B
 659.541 +$B$^$?!"(BMercurial $B$HF1MM$K(B
 659.542 +Subversion $B$OAG@2$i$7$$%f!<%6%^%K%e%"%k$,$"$j$^$9!#(B
 659.543 +
 659.544 +Subversion $B%j%]%8%H%j$+$i(B Mercurial $B%j%]%8%H%j$X$N!"(B
 659.545 +$B@53N$G40A4$JJQ99MzNr$N<h$j9~$_$r9T$&%D!<%k$,4v$D$b$"$j$^$9$N$G!"(B
 659.546 +$B8E$$%D!<%k$+$i$N0\9T$OHf3SE*MF0W$G$9!#(B
 659.547 +
 659.548 +\subsection{Git}
 659.549 +
 659.550 +git $B$O!"(B
 659.551 +Linux $B%+!<%M%k%=!<%9%D%j!<$r4IM}$9$k$?$a$K3+H/$5$l$?J,;69=@.4IM}%D!<%k$G$9!#(B
 659.552 +Mercurial $B$HF1MM$K!"(B
 659.553 +$B$=$N=i4|$N@_7W$O(B Monotone $B$+$i1F6A$r<u$1$F$$$^$9!#(B
 659.554 +
 659.555 +git $B$O05E]E*$J$^$G$N%3%^%s%I72$r;}$C$F$*$j!"(B
 659.556 +1.5.0~$BHG$K$*$$$F$O(B 139~$B8D$NFHN)$7$?%3%^%s%I$,$"$j$^$9!#(B
 659.557 +$B$3$l$i$O=,F@$,Fq$7$$$H$NI>H=$G$9!#(B
 659.558 +$B%f!<%6%^%K%e%"%k$,B8:_$;$:!"(B
 659.559 +$B8DJL$N%3%^%s%I$K4X$9$kJ8=q$,$"$k$N$_$G$9!#(B
 659.560 +
 659.561 +$B@-G=$NLL$G$O(B git $B$OHs>o$K9bB.$G$9!#(B
 659.562 +$B>/$J$/$H$b(B Linux $B$K$*$$$F$O!"(B
 659.563 +Mercurial $B$h$j$b(B git $B$NJ}$,Aa$$%1!<%9$,4v$D$+$"$j$^$9!#(B
 659.564 +$B$7$+$7$J$,$iK\=q$N<9I.;~E@$G$O!"(B
 659.565 +Windows $B4D6-$K$*$1$k@-G=!J$*$h$S0lHLE*$J%5%]!<%H!K$K4X$7$F$O(B
 659.566 +Mercurial $B$K5Z$S$^$;$s!#(B
 659.567 +
 659.568 +Mercurial $B$N%j%]%8%H%j$OJ]<i$NI,MW$,$"$j$^$;$s$,!"(B
 659.569 +git $B%j%]%8%H%j$O<jF0$K$h$k%a%?%G!<%?$N(B``$B5M$aD>$7(B''$B$rIQHK$K9T$&I,MW$,$"$j$^$9!#(B
 659.570 +$B$3$N5M$aD>$7$r$7$J$$>l9g!"(B
 659.571 +$BMxMQNN0h$,B.$d$+$KA}2C$9$k0lJ}$G!"@-G=$,Dc2<$7$F$7$^$$$^$9!#(B
 659.572 +$B873J3n$DIQHK$K5M$aD>$7$r$7$J$$(B git $B%j%]%8%H%j$rBt;3Jz$($k%5!<%P$O!"(B
 659.573 +$B%P%C%/%"%C%W$N4V!"Hs>o$K(B disk-bound $B$K$J$j$^$9$7!"(B
 659.574 +$B7k2L$H$7$F!"(B
 659.575 +$BF|;~%P%C%/%"%C%W=hM}$K#2#4;~4V0J>e$rMW$9$k$h$&$K$J$C$F$7$^$C$?Nc$,!"(B
 659.576 +$B$$$/$D$b$"$j$^$9!#(B
 659.577 +$B5M$aBX$($K$h$C$FA/EY$,J]$?$l$F$$$k(B git $B%j%]%8%H%j$O!"(B
 659.578 +Mercurial $B$N%j%]%8%H%j$h$j$b$o$:$+$K>.$5$$$G$9$,!"(B
 659.579 +$B5M$aBX$($5$l$F$$$J$$>l9g$O$+$J$j$NBg$-$5$G$9!#(B
 659.580 +
 659.581 +git $B$N4pK\ItJ,$O(B C $B$G<BAu$5$l$F$$$^$9!#(B
 659.582 +$BB?$/$N(B git $B%3%^%s%I$O%7%'%k$J$$$7(B Perl $B$N%9%/%j%W%H$K$h$j<BAu$5$l$F$$$^$9$,!"(B
 659.583 +$B$=$NIJ<A$OHs>o$KI}$,9-$$$G$9!#(B
 659.584 +$BCWL?E*$H$_$J$9$Y$-%(%i!<$,H/@8$7$F$$$kCf$G0G1@$K=hM}$rB3$1$k%9%/%j%W%H$r!"(B
 659.585 +$B2?EY$+8+$+$1$?$3$H$,$"$j$^$9!#(B
 659.586 +
 659.587 +\subsection{CVS}
 659.588 +
 659.589 +CVS $B$O$*$=$i$/@$3&Cf$G:G$b9-$/;HMQ$5$l$F$$$k9=@.4IM}%D!<%k$G$9!#(B
 659.590 +$B$=$NNr;K$ND9$5$H!"FbItE*$J$^$H$^$j$NL5$5$+$i!"(B
 659.591 +$BD9$$4V!"K\<AE*$K$OJ]<i$5$l$F$-$^$;$s$G$7$?!#(B
 659.592 +
 659.593 +CVS $B$OCf1{=8Ls7?$N!V%/%i%$%"%s%H!?%5!<%P!W(B
 659.594 +$B%"!<%-%F%/%A%c$r;}$C$F$$$^$9!#(B
 659.595 +CVS $B$O4XO"$9$k%U%!%$%k$NJQ99$rIT2DJ,%3%_%C%H$X$H%0%k!<%W2=$7$J$$$?$a!"(B
 659.596 +$BNc$($P!"(B
 659.597 +$B!V$"$kMxMQ<T$K$h$k@.2L$N%3%_%C%H$,!"(B
 659.598 +$B%^!<%8$NI,MW@-$+$iItJ,E*$K$7$+@.8y$7$J$+$C$?>l9g!"(B
 659.599 +$BB>$NMxMQ<T$+$i$OH`$N0U?^$7$?JQ99$N0lIt$7$+8+$k$3$H$,$G$-$J$$!W$H$$$C$?!"(B
 659.600 +``$B%S%k%I$rMp$9(B''$B9T0Y$,MF0W$K9T$($F$7$^$$$^$9!#(B
 659.601 +$B$3$l$O!"%W%m%8%'%/%HMzNr$KBP$9$k:n6H$N?J$aJ}$K$b1F6A$7$^$9!#(B
 659.602 +$B$H$"$k%?%9%/$N0lIt$H$7$F!"(B
 659.603 +$B$"$k%a%s%P$,9T$C$?JQ99$rA4$FI=<($7$h$&$H$7$?>l9g!"(B
 659.604 +$B4XO"$9$k3F%U%!%$%k!J$I$N%U%!%$%k$,$=$&$G$"$k$+$rCN$C$F$$$l$P!"(B
 659.605 +$B$NOC$G$9$,!K$KBP$7$F9T$o$l$?JQ99$N!"(B
 659.606 +$B8D!9$N%3%_%C%H%m%0$HF|IU$r<jF0$G3NG'$9$kI,MW$,$"$j$^$9!#(B
 659.607 +
 659.608 +CVS $B$N%?%0$d%V%i%s%A$N9M$(J}$O:.Mp$7$F$$$k$?$a!"(B
 659.609 +$B$=$l$K$D$$$F@bL@$9$k5$$K$b$J$l$^$;$s!#(B
 659.610 +$B%U%!%$%k$d%G%#%l%/%H%j$N2~L>$,%5%]!<%H$5$l$F$$$J$$$?$a!"(B
 659.611 +$B%j%]%8%H%j$,4JC1$K;(A3$H$7$F$7$^$$$^$9!#(B
 659.612 +$BFbItE*$J@09g@-$r%A%'%C%/$9$k5!G=$b;}$?$J$$$?$a!"(B
 659.613 +$B%j%]%8%H%j$,GKB;$7$F$$$k$N$+H]$+$rH=Dj$7$?$j!"(B
 659.614 +$B$I$N$h$&$KGKB;$7$F$$$k$N$+$r$7$k$3$H$O!"0lHL$K$OIT2DG=$G$9!#(B
 659.615 +$B8=B8!&?75,$N$$$:$l$N%W%m%8%'%/%H$KBP$7$F$b!"(B
 659.616 +CVS $B$O$*A&$a$G$-$^$;$s!#(B
 659.617 +
 659.618 +Mercurial $B$O(B CVS $B$N%j%]%8%H%j$r<h$j9~$`$3$H$,$G$-$^$9!#(B
 659.619 +$B$7$+$7!"$$$/$D$+$NCm0U$,I,MW$G!"(B
 659.620 +$B$3$l$O(B CVS $B$N%j%]%8%H%j$r<h$j9~$`$3$H$N$G$-$k!"(B
 659.621 +$BB>$N9=@.4IM}%D!<%k$KBP$7$F$bF1MM$G$9!#(B
 659.622 +CVS $B$OIT2DJ,%3%_%C%H$r;}$C$F$*$i$:!"(B
 659.623 +$B%U%!%$%k%7%9%F%`3,AX$NMzNr4IM}$b9T$C$F$$$J$$$?$a!"(B
 659.624 +CVS $B$+$iMzNr$r@53N3n$D87L)$K:F9=C[$9$k$3$H$OIT2DG=$G$9!#(B
 659.625 +$B4vJ,$+$N?dB,$,I,MW$G$"$j!"2~L>$ODL>o8!CN$G$-$^$;$s!#(B
 659.626 +$B9bEY$J(B CVS $B4IM}$NB?$/$,<jF0$G9T$o$l!"$=$l8N$K4V0c$$$d$9$$$3$H$+$i!"(B
 659.627 +CVS $B$+$i$N<h$j9~$_$r9T$&%D!<%k$K$H$C$F!"(B
 659.628 +$BGKB;$7$?%j%]%8%H%j$+$i$N<h$j9~$_$OJ#?t$NLdBj$K9T$-Ev$?$k$N$,>o$G$9(B
 659.629 +$B!JI.<T$N8D?ME*7P83$+$i;W$$=P$;$k!"LLGr$/$bL5$$LdBj$NNc$H$7$F$O!"(B
 659.630 +$B40A4$K56J*$N%?%$%`%9%?%s%W$d!"(B
 659.631 +$B#1#0G/0J>e%m%C%/$5$l$?$^$^$N%U%!%$%k$J$I$,$"$j$^$9!K!#(B
 659.632 +
 659.633 +\subsection{Commercial tools}
 659.634 +
 659.635 +Perforce $B$OCf1{=8Ls7?$N!V%/%i%$%"%s%H!?%5!<%P!W(B
 659.636 +$B%"!<%-%F%/%A%c$r;}$C$F$$$^$9$,!"(B
 659.637 +$B%/%i%$%"%s%HB&$G$OA4$/%-%c%C%7%e$r9T$C$F$$$^$;$s!#(B
 659.638 +$B6aG/$N9=@.4IM}%D!<%k$H0[$J$j!"(B
 659.639 +$BJT=8BP>]$H$J$kA4$F$N%U%!%$%k$K4X$7$F!"(B
 659.640 +Perforce $B$O%3%^%s%I<B9T$K$h$k%5!<%P$X$NDLCN$r%f!<%6$KBP$7$FMW5a$7$^$9!#(B
 659.641 +
 659.642 +Perforce $B$N@-G=$O>.5,LO$J%A!<%`$G$OHs>o$KNI9%$G$9$,!"(B
 659.643 +$B%f!<%6?t$,?t%@!<%9$rD6$($k:"$+$i5^B.$KDc2<$7$^$9!#(B
 659.644 +$B>/!9Bg5,LO$J3+H/8~$1$N(B Perforce $B%$%s%9%H!<%k$O!"(B
 659.645 +$B%f!<%6%"%/%;%9$K$h$kIi2Y$r>e<j$/=hM}$9$k$?$a$K!"(B
 659.646 +$B!V%W%m%-%7!W$NG[CV$,MW5a$5$l$^$9!#(B
 659.647 +
 659.648 +%%% Local Variables: 
 659.649 +%%% mode: latex
 659.650 +%%% TeX-master: "00book"
 659.651 +%%% End: 
   660.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   660.2 +++ b/ja/license.tex	Sun Aug 16 03:41:39 2009 +0200
   660.3 @@ -0,0 +1,139 @@
   660.4 +\chapter{Open Publication License}
   660.5 +\label{cha:opl}
   660.6 +
   660.7 +Version 1.0, 8 June 1999
   660.8 +
   660.9 +\section{Requirements on both unmodified and modified versions}
  660.10 +
  660.11 +The Open Publication works may be reproduced and distributed in whole
  660.12 +or in part, in any medium physical or electronic, provided that the
  660.13 +terms of this license are adhered to, and that this license or an
  660.14 +incorporation of it by reference (with any options elected by the
  660.15 +author(s) and/or publisher) is displayed in the reproduction.
  660.16 +
  660.17 +Proper form for an incorporation by reference is as follows:
  660.18 +
  660.19 +\begin{quote}
  660.20 +  Copyright (c) \emph{year} by \emph{author's name or designee}. This
  660.21 +  material may be distributed only subject to the terms and conditions
  660.22 +  set forth in the Open Publication License, v\emph{x.y} or later (the
  660.23 +  latest version is presently available at
  660.24 +  \url{http://www.opencontent.org/openpub/}).
  660.25 +\end{quote}
  660.26 +
  660.27 +The reference must be immediately followed with any options elected by
  660.28 +the author(s) and/or publisher of the document (see
  660.29 +section~\ref{sec:opl:options}).
  660.30 +
  660.31 +Commercial redistribution of Open Publication-licensed material is
  660.32 +permitted.
  660.33 +
  660.34 +Any publication in standard (paper) book form shall require the
  660.35 +citation of the original publisher and author. The publisher and
  660.36 +author's names shall appear on all outer surfaces of the book. On all
  660.37 +outer surfaces of the book the original publisher's name shall be as
  660.38 +large as the title of the work and cited as possessive with respect to
  660.39 +the title.
  660.40 +
  660.41 +\section{Copyright}
  660.42 +
  660.43 +The copyright to each Open Publication is owned by its author(s) or
  660.44 +designee.
  660.45 +
  660.46 +\section{Scope of license}
  660.47 +
  660.48 +The following license terms apply to all Open Publication works,
  660.49 +unless otherwise explicitly stated in the document.
  660.50 +
  660.51 +Mere aggregation of Open Publication works or a portion of an Open
  660.52 +Publication work with other works or programs on the same media shall
  660.53 +not cause this license to apply to those other works. The aggregate
  660.54 +work shall contain a notice specifying the inclusion of the Open
  660.55 +Publication material and appropriate copyright notice.
  660.56 +
  660.57 +\textbf{Severability}. If any part of this license is found to be
  660.58 +unenforceable in any jurisdiction, the remaining portions of the
  660.59 +license remain in force.
  660.60 +
  660.61 +\textbf{No warranty}. Open Publication works are licensed and provided
  660.62 +``as is'' without warranty of any kind, express or implied, including,
  660.63 +but not limited to, the implied warranties of merchantability and
  660.64 +fitness for a particular purpose or a warranty of non-infringement.
  660.65 +
  660.66 +\section{Requirements on modified works}
  660.67 +
  660.68 +All modified versions of documents covered by this license, including
  660.69 +translations, anthologies, compilations and partial documents, must
  660.70 +meet the following requirements:
  660.71 +
  660.72 +\begin{enumerate}
  660.73 +\item The modified version must be labeled as such.
  660.74 +\item The person making the modifications must be identified and the
  660.75 +  modifications dated.
  660.76 +\item Acknowledgement of the original author and publisher if
  660.77 +  applicable must be retained according to normal academic citation
  660.78 +  practices.
  660.79 +\item The location of the original unmodified document must be
  660.80 +  identified.
  660.81 +\item The original author's (or authors') name(s) may not be used to
  660.82 +  assert or imply endorsement of the resulting document without the
  660.83 +  original author's (or authors') permission.
  660.84 +\end{enumerate}
  660.85 +
  660.86 +\section{Good-practice recommendations}
  660.87 +
  660.88 +In addition to the requirements of this license, it is requested from
  660.89 +and strongly recommended of redistributors that:
  660.90 +
  660.91 +\begin{enumerate}
  660.92 +\item If you are distributing Open Publication works on hardcopy or
  660.93 +  CD-ROM, you provide email notification to the authors of your intent
  660.94 +  to redistribute at least thirty days before your manuscript or media
  660.95 +  freeze, to give the authors time to provide updated documents. This
  660.96 +  notification should describe modifications, if any, made to the
  660.97 +  document.
  660.98 +\item All substantive modifications (including deletions) be either
  660.99 +  clearly marked up in the document or else described in an attachment
 660.100 +  to the document.
 660.101 +\item Finally, while it is not mandatory under this license, it is
 660.102 +  considered good form to offer a free copy of any hardcopy and CD-ROM
 660.103 +  expression of an Open Publication-licensed work to its author(s).
 660.104 +\end{enumerate}
 660.105 +
 660.106 +\section{License options}
 660.107 +\label{sec:opl:options}
 660.108 +
 660.109 +The author(s) and/or publisher of an Open Publication-licensed
 660.110 +document may elect certain options by appending language to the
 660.111 +reference to or copy of the license. These options are considered part
 660.112 +of the license instance and must be included with the license (or its
 660.113 +incorporation by reference) in derived works.
 660.114 +
 660.115 +\begin{enumerate}
 660.116 +\item To prohibit distribution of substantively modified versions
 660.117 +  without the explicit permission of the author(s). ``Substantive
 660.118 +  modification'' is defined as a change to the semantic content of the
 660.119 +  document, and excludes mere changes in format or typographical
 660.120 +  corrections.
 660.121 +
 660.122 +  To accomplish this, add the phrase ``Distribution of substantively
 660.123 +  modified versions of this document is prohibited without the
 660.124 +  explicit permission of the copyright holder.'' to the license
 660.125 +  reference or copy.
 660.126 +
 660.127 +\item To prohibit any publication of this work or derivative works in
 660.128 +  whole or in part in standard (paper) book form for commercial
 660.129 +  purposes is prohibited unless prior permission is obtained from the
 660.130 +  copyright holder.
 660.131 +
 660.132 +  To accomplish this, add the phrase ``Distribution of the work or
 660.133 +  derivative of the work in any standard (paper) book form is
 660.134 +  prohibited unless prior permission is obtained from the copyright
 660.135 +  holder.'' to the license reference or copy.
 660.136 +
 660.137 +\end{enumerate}
 660.138 +
 660.139 +%%% Local Variables: 
 660.140 +%%% mode: latex
 660.141 +%%% TeX-master: "00book"
 660.142 +%%% End: 
   661.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   661.2 +++ b/ja/metadata.svg	Sun Aug 16 03:41:39 2009 +0200
   661.3 @@ -0,0 +1,328 @@
   661.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   661.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   661.6 +<svg
   661.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   661.8 +   xmlns:cc="http://web.resource.org/cc/"
   661.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  661.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  661.11 +   xmlns="http://www.w3.org/2000/svg"
  661.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  661.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  661.14 +   width="744.09448819"
  661.15 +   height="1052.3622047"
  661.16 +   id="svg2"
  661.17 +   sodipodi:version="0.32"
  661.18 +   inkscape:version="0.44.1"
  661.19 +   sodipodi:docname="metadata.svg"
  661.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en">
  661.21 +  <defs
  661.22 +     id="defs4">
  661.23 +    <marker
  661.24 +       inkscape:stockid="Arrow1Mend"
  661.25 +       orient="auto"
  661.26 +       refY="0.0"
  661.27 +       refX="0.0"
  661.28 +       id="Arrow1Mend"
  661.29 +       style="overflow:visible;">
  661.30 +      <path
  661.31 +         id="path2944"
  661.32 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  661.33 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  661.34 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  661.35 +    </marker>
  661.36 +  </defs>
  661.37 +  <sodipodi:namedview
  661.38 +     id="base"
  661.39 +     pagecolor="#ffffff"
  661.40 +     bordercolor="#666666"
  661.41 +     borderopacity="1.0"
  661.42 +     gridtolerance="10000"
  661.43 +     guidetolerance="10"
  661.44 +     objecttolerance="10"
  661.45 +     inkscape:pageopacity="0.0"
  661.46 +     inkscape:pageshadow="2"
  661.47 +     inkscape:zoom="1.4"
  661.48 +     inkscape:cx="232.14286"
  661.49 +     inkscape:cy="490.68696"
  661.50 +     inkscape:document-units="px"
  661.51 +     inkscape:current-layer="layer1"
  661.52 +     inkscape:window-width="906"
  661.53 +     inkscape:window-height="620"
  661.54 +     inkscape:window-x="181"
  661.55 +     inkscape:window-y="58" />
  661.56 +  <metadata
  661.57 +     id="metadata7">
  661.58 +    <rdf:RDF>
  661.59 +      <cc:Work
  661.60 +         rdf:about="">
  661.61 +        <dc:format>image/svg+xml</dc:format>
  661.62 +        <dc:type
  661.63 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  661.64 +      </cc:Work>
  661.65 +    </rdf:RDF>
  661.66 +  </metadata>
  661.67 +  <g
  661.68 +     inkscape:label="Layer 1"
  661.69 +     inkscape:groupmode="layer"
  661.70 +     id="layer1">
  661.71 +    <path
  661.72 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#a7a7a7;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1;display:inline"
  661.73 +       d="M 326.94646,467.18359 L 326.94646,510.98123"
  661.74 +       id="path1910"
  661.75 +       inkscape:connector-type="polyline"
  661.76 +       inkscape:connection-end="#rect2962"
  661.77 +       inkscape:connection-start="#rect2764" />
  661.78 +    <path
  661.79 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#a7a7a7;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1;display:inline"
  661.80 +       d="M 326.94646,531.98123 L 326.94646,591.77887"
  661.81 +       id="path1912"
  661.82 +       inkscape:connector-type="polyline"
  661.83 +       inkscape:connection-start="#rect2962"
  661.84 +       inkscape:connection-end="#rect3000" />
  661.85 +    <path
  661.86 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#a7a7a7;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1;display:inline"
  661.87 +       d="M 316.1622,531.98123 L 192.30212,652.57648"
  661.88 +       id="path1916"
  661.89 +       inkscape:connector-type="polyline"
  661.90 +       inkscape:connection-end="#rect3038"
  661.91 +       inkscape:connection-start="#rect2962" />
  661.92 +    <path
  661.93 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#484848;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1"
  661.94 +       d="M 254.23217,467.18359 L 254.23216,510.98123"
  661.95 +       id="path3088"
  661.96 +       inkscape:connector-type="polyline"
  661.97 +       inkscape:connection-start="#rect1872"
  661.98 +       inkscape:connection-end="#rect2960" />
  661.99 +    <path
 661.100 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#484848;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1"
 661.101 +       d="M 254.23215,531.98123 L 254.23215,591.77887"
 661.102 +       id="path3090"
 661.103 +       inkscape:connector-type="polyline"
 661.104 +       inkscape:connection-start="#rect2960"
 661.105 +       inkscape:connection-end="#rect2998" />
 661.106 +    <path
 661.107 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#484848;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4.5, 1.5;stroke-dashoffset:0;stroke-opacity:1"
 661.108 +       d="M 248.84002,531.98123 L 186.90999,652.57648"
 661.109 +       id="path3092"
 661.110 +       inkscape:connector-type="polyline"
 661.111 +       inkscape:connection-start="#rect2960"
 661.112 +       inkscape:connection-end="#rect3038" />
 661.113 +    <rect
 661.114 +       style="fill:#7b7df5;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.115 +       id="rect1872"
 661.116 +       width="51.42857"
 661.117 +       height="20"
 661.118 +       x="228.51788"
 661.119 +       y="446.68359" />
 661.120 +    <rect
 661.121 +       style="fill:#cacbfb;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.122 +       id="rect2764"
 661.123 +       width="51.42857"
 661.124 +       height="20"
 661.125 +       x="301.23218"
 661.126 +       y="446.68359" />
 661.127 +    <rect
 661.128 +       style="fill:#cacbfb;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.129 +       id="rect2766"
 661.130 +       width="51.42857"
 661.131 +       height="20"
 661.132 +       x="155.80359"
 661.133 +       y="446.68359" />
 661.134 +    <rect
 661.135 +       style="fill:#cacbfb;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.136 +       id="rect2768"
 661.137 +       width="51.42857"
 661.138 +       height="20"
 661.139 +       x="83.089294"
 661.140 +       y="446.68359" />
 661.141 +    <path
 661.142 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 661.143 +       d="M 135.01786,456.68359 L 155.30359,456.68359"
 661.144 +       id="path2770"
 661.145 +       inkscape:connector-type="polyline"
 661.146 +       inkscape:connection-start="#rect2768"
 661.147 +       inkscape:connection-end="#rect2766" />
 661.148 +    <path
 661.149 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 661.150 +       d="M 207.73216,456.68359 L 228.01788,456.68359"
 661.151 +       id="path2772"
 661.152 +       inkscape:connector-type="polyline"
 661.153 +       inkscape:connection-start="#rect2766"
 661.154 +       inkscape:connection-end="#rect1872" />
 661.155 +    <path
 661.156 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 661.157 +       d="M 280.44645,456.68359 L 300.73218,456.68359"
 661.158 +       id="path2774"
 661.159 +       inkscape:connector-type="polyline"
 661.160 +       inkscape:connection-start="#rect1872"
 661.161 +       inkscape:connection-end="#rect2764" />
 661.162 +    <path
 661.163 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
 661.164 +       d="M 62.303571,456.68359 L 82.589294,456.68359"
 661.165 +       id="path2778"
 661.166 +       inkscape:connector-type="polyline"
 661.167 +       inkscape:connection-end="#rect2768" />
 661.168 +    <rect
 661.169 +       style="fill:#84f57b;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.170 +       id="rect2960"
 661.171 +       width="51.42857"
 661.172 +       height="20"
 661.173 +       x="228.51787"
 661.174 +       y="511.48123" />
 661.175 +    <rect
 661.176 +       style="fill:#cefbca;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.177 +       id="rect2962"
 661.178 +       width="51.42857"
 661.179 +       height="20"
 661.180 +       x="301.23218"
 661.181 +       y="511.48123" />
 661.182 +    <rect
 661.183 +       style="fill:#cefbca;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.184 +       id="rect2964"
 661.185 +       width="51.42857"
 661.186 +       height="20"
 661.187 +       x="155.80357"
 661.188 +       y="511.48123" />
 661.189 +    <rect
 661.190 +       style="fill:#cefbca;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.191 +       id="rect2966"
 661.192 +       width="51.42857"
 661.193 +       height="20"
 661.194 +       x="83.089287"
 661.195 +       y="511.48123" />
 661.196 +    <path
 661.197 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 661.198 +       d="M 135.01786,521.48121 L 155.30359,521.48121"
 661.199 +       id="path2968"
 661.200 +       inkscape:connector-type="polyline" />
 661.201 +    <path
 661.202 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 661.203 +       d="M 207.73216,521.48121 L 228.01788,521.48121"
 661.204 +       id="path2970"
 661.205 +       inkscape:connector-type="polyline" />
 661.206 +    <path
 661.207 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 661.208 +       d="M 280.44645,521.48121 L 300.73218,521.48121"
 661.209 +       id="path2972"
 661.210 +       inkscape:connector-type="polyline" />
 661.211 +    <path
 661.212 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
 661.213 +       d="M 62.30358,521.48121 L 82.5893,521.48121"
 661.214 +       id="path2974"
 661.215 +       inkscape:connector-type="polyline" />
 661.216 +    <rect
 661.217 +       style="fill:#f57b8f;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.218 +       id="rect2998"
 661.219 +       width="51.42857"
 661.220 +       height="20"
 661.221 +       x="228.51787"
 661.222 +       y="592.27887" />
 661.223 +    <rect
 661.224 +       style="fill:#fbcad2;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.225 +       id="rect3000"
 661.226 +       width="51.42857"
 661.227 +       height="20"
 661.228 +       x="301.23218"
 661.229 +       y="592.27887" />
 661.230 +    <rect
 661.231 +       style="fill:#fbcad2;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.232 +       id="rect3002"
 661.233 +       width="51.42857"
 661.234 +       height="20"
 661.235 +       x="155.80357"
 661.236 +       y="592.27887" />
 661.237 +    <rect
 661.238 +       style="fill:#fbcad2;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.239 +       id="rect3004"
 661.240 +       width="51.42857"
 661.241 +       height="20"
 661.242 +       x="83.089287"
 661.243 +       y="592.27887" />
 661.244 +    <path
 661.245 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 661.246 +       d="M 135.01786,602.27884 L 155.30359,602.27884"
 661.247 +       id="path3006"
 661.248 +       inkscape:connector-type="polyline" />
 661.249 +    <path
 661.250 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 661.251 +       d="M 207.73216,602.27884 L 228.01788,602.27884"
 661.252 +       id="path3008"
 661.253 +       inkscape:connector-type="polyline" />
 661.254 +    <path
 661.255 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 661.256 +       d="M 280.44645,602.27884 L 300.73218,602.27884"
 661.257 +       id="path3010"
 661.258 +       inkscape:connector-type="polyline" />
 661.259 +    <path
 661.260 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
 661.261 +       d="M 62.30358,602.27884 L 82.5893,602.27884"
 661.262 +       id="path3012"
 661.263 +       inkscape:connector-type="polyline" />
 661.264 +    <rect
 661.265 +       style="fill:#ffced6;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.266 +       id="rect3034"
 661.267 +       width="51.42857"
 661.268 +       height="20"
 661.269 +       x="228.51787"
 661.270 +       y="653.07648" />
 661.271 +    <rect
 661.272 +       style="fill:#f57b8f;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.273 +       id="rect3038"
 661.274 +       width="51.42857"
 661.275 +       height="20"
 661.276 +       x="155.80357"
 661.277 +       y="653.07648" />
 661.278 +    <rect
 661.279 +       style="fill:#fbcad2;fill-opacity:1;stroke:#595959;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 661.280 +       id="rect3040"
 661.281 +       width="51.42857"
 661.282 +       height="20"
 661.283 +       x="83.089287"
 661.284 +       y="653.07648" />
 661.285 +    <path
 661.286 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 661.287 +       d="M 135.01786,663.07646 L 155.30359,663.07646"
 661.288 +       id="path3042"
 661.289 +       inkscape:connector-type="polyline" />
 661.290 +    <path
 661.291 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 661.292 +       d="M 207.73216,663.07646 L 228.01788,663.07646"
 661.293 +       id="path3044"
 661.294 +       inkscape:connector-type="polyline" />
 661.295 +    <path
 661.296 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#747474;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:3, 3;stroke-dashoffset:0;stroke-opacity:1"
 661.297 +       d="M 62.30358,663.07646 L 82.5893,663.07646"
 661.298 +       id="path3048"
 661.299 +       inkscape:connector-type="polyline" />
 661.300 +    <text
 661.301 +       xml:space="preserve"
 661.302 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 661.303 +       x="82.072548"
 661.304 +       y="432.64789"
 661.305 +       id="text3094"><tspan
 661.306 +         sodipodi:role="line"
 661.307 +         id="tspan3096"
 661.308 +         x="82.072548"
 661.309 +         y="432.64789">Changelog</tspan></text>
 661.310 +    <text
 661.311 +       xml:space="preserve"
 661.312 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 661.313 +       x="82.306923"
 661.314 +       y="498.97327"
 661.315 +       id="text3098"><tspan
 661.316 +         sodipodi:role="line"
 661.317 +         id="tspan3100"
 661.318 +         x="82.306923"
 661.319 +         y="498.97327">Manifest</tspan></text>
 661.320 +    <text
 661.321 +       xml:space="preserve"
 661.322 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 661.323 +       x="82.14286"
 661.324 +       y="580.08569"
 661.325 +       id="text3102"><tspan
 661.326 +         sodipodi:role="line"
 661.327 +         id="tspan3104"
 661.328 +         x="82.14286"
 661.329 +         y="580.08569">Filelogs</tspan></text>
 661.330 +  </g>
 661.331 +</svg>
   662.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   662.2 +++ b/ja/mq-collab.tex	Sun Aug 16 03:41:39 2009 +0200
   662.3 @@ -0,0 +1,524 @@
   662.4 +\chapter{Advanced uses of Mercurial Queues}
   662.5 +\label{chap:mq-collab}
   662.6 +
   662.7 +Mercurial Queues $B$NMQK!$r??$C@5D>$KOCBj$K$9$k$N$O4JC1$G$9$,!"(B
   662.8 +$B>/!9M^@)$r8z$+$;$F!"9~$_F~$C$?3+H/4D6-$G$N:n6H$KLrN)$D$h$&$J!"(B
   662.9 +$B$"$^$jMxMQ$5$l$J$$5!G=$r4v$D$+@bL@$7$h$&$H;W$$$^$9!#(B
  662.10 +
  662.11 +$B$3$N>O$G$O!"(B
  662.12 +Linux $B%+!<%M%k8~$1$N(B Infiniband $B%G%P%$%9%I%i%$%P3+H/$K$*$$$F!"(B
  662.13 +$B4IM}$KMQ$$$F$$$?5;K!$r;HMQNc$H$7$F<h$j>e$2$^$9!#(B
  662.14 +$B$3$N%G%P%$%9%I%i%$%P$O(B
  662.15 +$B!J0lHL$N%G%P%$%9%I%i%$%PDxEY$K$O!KBg$-$/!"(B
  662.16 +35 $B$N%=!<%9%U%!%$%k$K$^$?$,$C$?(B 25,000 $B9T$+$i$J$C$F$*$j!"(B
  662.17 +$B>/?t$N3+H/%A!<%`$K$h$jJ]<i$5$l$F$$$^$9!#(B
  662.18 +
  662.19 +$B$3$N>O$G07$C$F$$$kBP>]$O(B Linux $B$KFC2=$7$?$b$N$G$9$,!"(B
  662.20 +$B<+?H$,=jM-$7$F$$$J$$%3!<%I$r85$KB?$/$N3+H/$r9T$&I,MW$,$"$k6ILL$G!"(B
  662.21 +$BF1MM$NJ}?K$,E,MQ$G$-$k$G$7$g$&!#(B
  662.22 +
  662.23 +\section{The problem of many targets}
  662.24 +
  662.25 +Linux $B%+!<%M%k$OIQHK$KJQ99$5$l!"(B
  662.26 +$BFbItE*$K$O7h$7$F0BDj$7$F$$$^$;$s!#(B
  662.27 +$B3+H/<T$O%j%j!<%9$N4V$KEY!9;W$$@Z$C$?JQ99$r9T$$$^$9!#(B
  662.28 +$B$3$N$?$a!"(B
  662.29 +Linux $B%+!<%M%k$NFCDj$N%j%j!<%9HG$G5!G=$9$k%I%i%$%P!<$NHG$O!"(B
  662.30 +$B35$7$FB>$NHG$K$*$$$F$O(B\emph{$B%3%s%Q%$%k(B}$B$9$iDL$i$J$$>l9g$,$"$j$^$9!#(B
  662.31 +
  662.32 +$B%I%i%$%P$NJ]<i$r9T$&$?$a$K$O!"(B
  662.33 +$B$$$/$D$+$N8DJL$N(B Linux $B$NHG$r0U<1$9$kI,MW$,$"$j$^$9!#(B
  662.34 +
  662.35 +\begin{itemize}
  662.36 +\item $BBh0l$K$O!"%a%$%s$N(B Linux $B%+!<%M%k3+H/%D%j!<$G$9!#(B
  662.37 +  $B$3$N>l9g$N%3!<%I$NJ]<i$O!"%+!<%M%k%3%_%e%K%F%#$NB>$N3+H/<T$H6&M-$5$l!"(B
  662.38 +  $BH`$i$,%+!<%M%k$N%5%V%7%9%F%`$KBP$7$F9T$&$N$HF1DxEY$K!"(B
  662.39 +  ``$B3+H/$7$J$,$i$N(B''$BJQ99$,9T$o$l$^$9!#(B
  662.40 +
  662.41 +\item $B3+H/$7$F$$$k%I%i%$%P$rMxMQ$9$k$3$H$,$G$-$J$$8E$$(B 
  662.42 +  Linux $B%G%#%9%H%j%S%e!<%7%g%s$r;HMQ$7$F$$$k8\5R$NMWK>$K1~$($k$?$a$K!"(B
  662.43 +  $B8E$$(B Linux $B%+!<%M%k$NHG$KBP$9$k4v$D$+$N(B``$B%P%C%/%]!<%H(B''$B$NJ]<i$bI,MW$G$9!#(B
  662.44 +  $B!J%3!<%I$N(B\emph{$B%P%C%/%]!<%H(B}$B$K$O!"(B
  662.45 +  $B$=$N%3!<%I$N3+H/BP>]$H$J$kHG$h$j$b8E$$HG$N4D6-$G2TF0$5$;$k$?$a$N!"(B
  662.46 +  $B%3!<%I$N2~JQ$,I,MW$G$9!K(B
  662.47 +
  662.48 +\item $B:G8e$K$J$j$^$9$,!"8\5R$NMxMQ$7$F$$$k%+!<%M%k$d%G%#%9%H%j%S%e!<%7%g%s$N!"(B
  662.49 +  $BA4BN$KBP$9$k99?7$r6/$$$k$3$H$J$/?75,5!G=$rDs6!$9$k$?$a$K!"(B
  662.50 +  $B%=%U%H%&%'%"$N%j%j!<%9%9%1%8%e!<%k$O!"(B
  662.51 +  Linux $B%G%#%9%H%j%S%e!<%7%g%s$d%+!<%M%k3+H/<T$,MxMQ$7$F$$$k%+!<%M%k$H!"(B
  662.52 +  $BI,$:$7$bB-JB$_$rB7$($k$o$1$G$O$"$j$^$;$s!#(B
  662.53 +  
  662.54 +\end{itemize}
  662.55 +
  662.56 +\subsection{Tempting approaches that don't work well}
  662.57 +
  662.58 +$BJ#?t$N0[$J$k4D6-$rBP>]$H$7$J$1$l$P$J$i$J$$0lO"$N%=%U%H%&%'%"$NJ]<i$K$O!"(B
  662.59 +$B#2$D$N(B``$BI8=`E*$J(B''$BJ}K!$,$"$j$^$9!#(B
  662.60 +
  662.61 +$B#1$DL\$NJ}K!$O!"(B
  662.62 +$B$=$l$>$l$,C10l$N4D6-$rBP>]$H$9$kJ#?t$N%V%i%s%A$r4IM}$9$kJ}K!$G$9!#(B
  662.63 +$B$3$NJ}K!$NLdBjE@$O!"(B
  662.64 +$B%j%]%8%H%j4V$G$NJQ99$N1}Mh(B\footnote{$BLuCm(B: $B$$$o$f$k!V%^!<%8!W$N$3$H(B}$B$K$*$$$F!"(B
  662.65 +$BE4$N5,N'$G$b$C$FK>$`I,MW$,M-$k$3$H$G$9!#(B
  662.66 +$B?7$7$$5!G=$d%P%0$N=$@5$O(B``$B???7$7$$(B''$B%j%]%8%H%j$G;O$a$J$1$l$P$J$i$:!"(B
  662.67 +$B$=$N8e$GA4$F$N%P%C%/%]!<%HMQ%j%]%8%H%j$K?;F)$5$;$^$9!#(B
  662.68 +$B%P%C%/%]!<%H$G$NJQ99$O!"$=$NEAGE$,99$K%V%i%s%A8BDj$5$l$^$9!#(B
  662.69 +$B=jB030$N%V%i%s%A$KE,MQ$5$l$k$h$&$J%P%C%/%]!<%H8~$1$NJQ99$O!"(B
  662.70 +$B$*$=$i$/%I%i%$%P$N%3%s%Q%$%k$rK8$2$k$G$7$g$&!#(B
  662.71 +
  662.72 +$B#2$DL\$NJ}K!$O!"(B
  662.73 +$B8D!9$N%3!<%IJR$NM-8z!?L58z$r!"(B
  662.74 +$B0U?^$9$kBP>]$K0MB8$7$F@Z$jBX$($k$?$a$N>r7oJ8$GKd$a$i$l$?!"(B
  662.75 +$BC10l$N%=!<%9%D%j!<$rJ]<i$9$kJ}K!$G$9!#(B
  662.76 +$B$3$l$i$N(B``ifdef''$B5-=R$O!"(B
  662.77 +Linux $B%+!<%M%k%D%j!<$G$O5v$5$l$F$$$J$$$N$G!"(B
  662.78 +$B$3$l$i$r<h$j=|$$$Fe:No$J%D%j!<$r@8@.$9$k$?$a$N!"(B
  662.79 +$B<jF0$J$$$7<+F0$N<j=g$,I,MW$G$9!#(B
  662.80 +$B$3$NN.57$GJ]<i$5$l$k%3!<%I%Y!<%9$OAa!9$K!"(B
  662.81 +$BM}2r$bJ]<i$b:$Fq$J>r7oJ,4t$N!VAM$NAc!W$H$J$k$G$7$g$&!#(B
  662.82 +
  662.83 +$B$3$l$i$N$$$:$l$N<jK!$b!"(B
  662.84 +$B@5Ev$J%=!<%9%D%j!<$N%3%T!<$r(B``$B=jM-(B''$B$7$F$$$J$$>u67$K$OE,9g$7$^$;$s!#(B
  662.85 +$BI8=`%+!<%M%k$H6&$KG[I[$5$l$k(B Linux $B%I%i%$%P$N>l9g!"(B
  662.86 +Linus $B;a$N%=!<%9%D%j!<$O!"(B
  662.87 +$B@$3&Cf$,@5E}$H$_$J$9%3!<%I$N%3%T!<$+$i9=@.$5$l$^$9!#(B
  662.88 +$B>eN.%j%]%8%H%j$K$*$1$k(B``$B;d$N(B''$B%I%i%$%P$O!"(B
  662.89 +Linus $B;a$N%=!<%9%D%j!<>e$K2~JQFbMF$,H?1G$5$l$k$^$G$K$O!"(B
  662.90 +$BCN$i$J$$$&$A$K8+CN$i$L?M!9$K$h$C$F0[$J$kHG$K2~JQ$5$l$F$$$k$+$b$7$l$^$;$s!#(B
  662.91 +
  662.92 +$B$3$l$i$N<jK!$O!"(B
  662.93 +$B>eN.%j%]%8%H%j$X$N%Q%C%A$NBN:[$r@0$($k$N$rFq$7$/$7$F$7$^$&!"(B
  662.94 +$B$H$$$&7gE@$b;}$C$F$$$^$9!#(B
  662.95 +
  662.96 +Mercurial Queues $B$O!"(B
  662.97 +$B$3$l$^$G=R$Y$F$-$?>u67$G$N3+H/$r4IM}$9$k$?$a$N!"(B
  662.98 +$BNI$$8uJd$H8@$($^$9!#(B
  662.99 +$B$^$5$K$3$N$h$&$J>u67$K$*$$$F!"(B
 662.100 +MQ $B$O:n6H$r2wE,$K$9$k99$K4v$D$+$NIU2CE*5!G=$r;}$C$F$$$^$9!#(B
 662.101 +
 662.102 +\section{$B%,!<%I$K$h$k>r7oIU$-%Q%C%AE,MQ(B}
 662.103 +
 662.104 +$B$*$=$i$/!"(B
 662.105 +$BB?$/$NBP>]4D6-$KBP$9$k7rA4@-$rJ]<i$9$kJ}K!$O!"(B
 662.106 +$B=jDj$N>u67$4$H$KE,MQ$5$l$kFCDj$N%Q%C%A$rA*Br$G$-$k$3$H!"(B
 662.107 +$B$H8@$($k$G$7$g$&!#(B
 662.108 +MQ $B$O!"(B
 662.109 +$B>e5-$N5!G=$r;}$D(B``$B%,!<%I(B''$B!J(Bquilt $B$N(B \texttt{guards} $B%3%^%s%I$KM3Mh$7$^$9!K(B
 662.110 +$B$H8F$P$l$k5!G=$rDs6!$7$^$9!#(B
 662.111 +$B$^$:$O$8$a$K!"(B
 662.112 +$B<B83$N$?$a$N4JAG$J%j%]%8%H%j$r:n@.$7$^$7$g$&!#(B
 662.113 +
 662.114 +\interaction{mq.guards.init}
 662.115 +
 662.116 +$B$3$N<j=g$K$h$j!"(B
 662.117 +$B0[$J$k%U%!%$%k$rA`:n$9$k$N$G8_$$$K$O0MB8@-$NL5$$#2$D$N%Q%C%A$r;}$D!"(B
 662.118 +$B>.$5$J%j%]%8%H%j$,F@$i$l$^$9!#(B
 662.119 +
 662.120 +$B>r7oIU$-E,MQ$N9M$(J}$O!"(B
 662.121 +$BG$0U$NC1=c$JJ8;zNs$+$i$J$k(B\emph{$B%,!<%I(B}$B$5$l$?(B``$B;%(B''
 662.122 +(tag)$B$r%Q%C%A$KIUM?$7$F$*$-!"(B
 662.123 +$B%Q%C%AE,MQ$N:]$K!";HMQ$9$Y$-FCDj$N%,!<%I$r(B MQ $B$KBP$7$F65$($k!"(B
 662.124 +$B$H$$$&$b$N$G$9!#(B
 662.125 +$B$"$i$+$8$aA*Br$7$F$*$$$?%,!<%I$K1~$8$F!"(B
 662.126 +MQ $B$O%,!<%I$5$l$?%Q%C%A$rE,MQ$9$k$+8+Aw$k$+$r7hDj$7$^$9!#(B
 662.127 +
 662.128 +$B8D!9$N%Q%C%A$OG$0U$N?t$N%,!<%I$r;}$D$3$H$,$G$-!"(B
 662.129 +$B$=$l$>$l$N%,!<%I$O(B\emph{$B%]%8%F%#%V(B}
 662.130 +$B!J(B``$B%,!<%IA*Br;~$K%Q%C%A$rE,MQ$9$k>l9g(B''$B!K$+(B\emph{$B%M%,%F%#%V(B}
 662.131 +$B!J(B``$B%,!<%IA*Br;~$K%Q%C%AE,MQ$r8+Aw$k(B''$B!K$N$I$A$i$+$G$9!#(B
 662.132 +$B%,!<%I$r;}$?$J$$%Q%C%A$O>o$KE,MQ$5$l$^$9!#(B
 662.133 +
 662.134 +\section{$B%Q%C%A$N%,!<%I$r@)8f$9$k(B}
 662.135 +
 662.136 +\hgxcmd{mq}{qguard} $B%3%^%s%I$O!"(B
 662.137 +$B$I$N%,!<%I$r%Q%C%A$KE,MQ$9$k$+$r7hDj$9$k$+!"(B
 662.138 +$B$5$b$J$/$P8=;~E@$GM-8z$J%,!<%I$rI=<($7$^$9!#(B
 662.139 +$B0z?t$,L5$$>l9g!"8=:_$N:G>e0L%Q%C%A$N%,!<%I$rI=<($7$^$9!#(B
 662.140 +
 662.141 +\interaction{mq.guards.qguard}
 662.142 +
 662.143 +$B%Q%C%A$K%]%8%F%#%V$J%,!<%I$r@_Dj$9$k$K$O!"(B
 662.144 +$B%,!<%IL>$N@\F,<-$H$7$F(B ``\texttt{+}'' $B$rIUM?$7$^$9!#(B
 662.145 +
 662.146 +\interaction{mq.guards.qguard.pos}
 662.147 +
 662.148 +$B%Q%C%A$K%M%,%F%#%V$J%,!<%I$r@_Dj$9$k$K$O!"(B
 662.149 +$B%,!<%IL>$N@\F,<-$H$7$F(B ``\texttt{-}'' $B$rIUM?$7$^$9!#(B
 662.150 +
 662.151 +\interaction{mq.guards.qguard.neg}
 662.152 +
 662.153 +\begin{note}
 662.154 +  \hgxcmd{mq}{qguard} $B%3%^%s%I$O!"%Q%C%A$K%,!<%I$r@_Dj$7$^$9$,!"(B
 662.155 +  $B%Q%C%A$N%,!<%I@_Dj$r(B\emph{$BJQ99(B}$B$7$?$j$O$7$^$;$s!#(B
 662.156 +  $B$D$^$j!"(B
 662.157 +  $B%Q%C%A$K(B \hgcmdargs{qguard}{+a +b} $B$rE,MQ$7$?8e$K!"(B
 662.158 +  $BF1$8%Q%C%A$K(B \hgcmdargs{qguard}{+c} $B$rE,MQ$7$?>l9g!"(B
 662.159 +  $B$3$N%Q%C%A$K@_Dj$5$l$F$$$k%,!<%I$O(B \texttt{+c} \emph{$B$@$1(B}$B$H$J$j$^$9!#(B
 662.160 +\end{note}
 662.161 +
 662.162 +Mercurial $B$O!"(B
 662.163 +$B2r<a!&<jF0JT=8$,6&$KMF0W$J7A<0$G!"(B
 662.164 +$B%,!<%I>pJs$r(B \sfilename{series} $B$K3JG<$7$^$9(B
 662.165 +$B!J8@$$49$($k$J$i!"(B
 662.166 +\hgxcmd{mq}{qguard} $B%3%^%s%I$rMxMQ$9$kI,MW$OL5$/!"(B
 662.167 +\sfilename{series} $B%U%!%$%k$rD>@\JT=8$7$F$b9=$$$^$;$s!K!#(B
 662.168 +
 662.169 +\interaction{mq.guards.series}
 662.170 +
 662.171 +\section{$B;HMQ$9$k%,!<%I$NA*Br(B}
 662.172 +
 662.173 +\hgxcmd{mq}{qselect} $B%3%^%s%I$O!"M-8z$K$9$k%,!<%I$r7hDj$7$^$9!#(B
 662.174 +$B%,!<%I$,7hDj$9$k$3$H$G!"(B
 662.175 +$B<!$K(B \hgxcmd{mq}{qpush} $B$r<B9T$7$?:]$K(B MQ $B$,E,MQ$9$k%Q%C%A$,7hDj$5$l$^$9!#(B
 662.176 +$B$3$N%3%^%s%I$O$=$l0J30$NF/$-$r$7$^$;$s!#(B
 662.177 +$BFC$K!"4{$KE,MQ:Q$_$N%Q%C%A$KBP$7$F$O!"0l@Z2?$b9T$$$^$;$s!#(B
 662.178 +
 662.179 +$B0z?t$,;XDj$5$l$J$$>l9g!"(B
 662.180 +\hgxcmd{mq}{qselect} $B%3%^%s%I$O!"(B
 662.181 +$B8=;~E@$GM-8z$K$J$C$F$$$k%,!<%I$r#19T$K#1$D$E$DI=<($7$^$9!#(B
 662.182 +$B8D!9$N0z?t$O!"E,MQ$5$l$k%,!<%I$NL>A0$H$_$J$5$l$^$9!#(B
 662.183 +
 662.184 +\interaction{mq.guards.qselect.foo}
 662.185 +
 662.186 +$B8=:_A*Br$5$l$F$$$k%,!<%I$N0lMw$,(B
 662.187 +\sfilename{guards} $B%U%!%$%k$K3JG<$5$l$F$$$^$9$N$G!"(B
 662.188 +$B6=L#$,$"$l$P8+$F$_$k$N$bNI$$$G$7$g$&!#(B
 662.189 +
 662.190 +\interaction{mq.guards.qselect.cat}
 662.191 +
 662.192 +\hgxcmd{mq}{qpush} $B$r<B9T$9$k$3$H$G!"(B
 662.193 +$B%,!<%IA*Br$N8z2L$r8+$k$3$H$,$G$-$^$9!#(B
 662.194 +
 662.195 +\interaction{mq.guards.qselect.qpush}
 662.196 +
 662.197 +
 662.198 +``\texttt{+}'' $B$J$$$7(B ``\texttt{-}'' 
 662.199 +$B$G;O$^$kL>A0$O%,!<%IL>$K$O$G$-$^$;$s!#(B
 662.200 +$B6uGrJ8;z$r4^$`$b$N$b%,!<%IL>$K$O$J$l$^$;$s$,!"(B
 662.201 +$B$=$l$$$,$$$NBgDq$NJ8;z$O;HMQ2DG=$G$9!#(B
 662.202 +$BIT@5$J%,!<%IL>$N;HMQ$O!"(BMQ $B$K$h$j7Y9p$5$l$^$9!#(B
 662.203 +
 662.204 +\interaction{mq.guards.qselect.error} 
 662.205 +
 662.206 +$B%,!<%IA*Br$NJQ99$O!"E,MQ$5$l$k%Q%C%A$r@Z$jBX$($^$9!#(B
 662.207 +
 662.208 +\interaction{mq.guards.qselect.quux} 
 662.209 +
 662.210 +$B%M%,%F%#%V$J%,!<%I$,%]%8%F%#%V$J%,!<%I$KM%@h$9$k$3$H$r!"(B
 662.211 +$B0J2<$NNc$G8+$k$3$H$,$G$-$^$9!#(B
 662.212 +
 662.213 +\interaction{mq.guards.qselect.foobar}
 662.214 +
 662.215 +\section{MQ $B$N%Q%C%AE,MQ%k!<%k(B}
 662.216 +
 662.217 +$B%Q%C%AE,MQ$NM-L5$rH=Dj$9$k:]$K!"(BMQ $B$O0J2<$N%k!<%k$r;HMQ$7$^$9!#(B
 662.218 +
 662.219 +\begin{itemize}
 662.220 +\item $B%,!<%IL5$7%Q%C%A$O>o$KE,MQ$5$l$^$9!#(B
 662.221 +
 662.222 +\item $B8=:_A*Br$5$l$F$$$k%,!<%I$K%^%C%A$9$k%M%,%F%#%V%,!<%I$,$"$k>l9g!"(B
 662.223 +  $B%Q%C%A$OE,MQ$5$l$^$;$s!#(B
 662.224 +
 662.225 +\item $B8=:_A*Br$5$l$F$$$k%,!<%I$K%^%C%A$9$k%]%8%F%#%V%,!<%I$,$"$k>l9g!"(B
 662.226 +  $B%Q%C%A$OE,MQ$5$l$^$9!#(B
 662.227 +
 662.228 +\item $B8=:_A*Br$5$l$F$$$k%,!<%I$K%^%C%A$9$k%,!<%I$,2?$bL5$$>l9g!"(B
 662.229 +  $B%Q%C%A$OE,MQ$5$l$^$;$s!#(B
 662.230 +
 662.231 +\end{itemize}
 662.232 +
 662.233 +\section{Trimming the work environment}
 662.234 +
 662.235 +$B@h$K=R$Y$?(B
 662.236 +Linux $B%+!<%M%k8~$1$N(B Infiniband
 662.237 +$B%G%P%$%9%I%i%$%P3+H/$G$N%Q%C%AE,MQ$G$O!"(B
 662.238 +Linux $B%+!<%M%k$NDL>o$N%=!<%9%D%j!<$O;HMQ$7$^$;$s!#(B
 662.239 +$B$=$NBe$o$j!"(B
 662.240 +Infiniband $B%G%P%$%9%I%i%$%P3+H/$K4XO"$9$k%=!<%9!?(B
 662.241 +$B%X%C%@$N$_$r4^$`%j%]%8%H%j$r:n@.$7!"(B
 662.242 +$B$=$3$KBP$7$F%Q%C%A$rE,MQ$9$k$h$&$K$7$^$9!#(B
 662.243 +$B$3$N%j%]%8%H%j$N%5%$%:$O%+!<%M%k%j%]%8%H%j$N(B 1\% $B$K<}$^$k$?$a!"(B
 662.244 +$B:n6H$r9T$&$N$b4JC1$G$9!#(B
 662.245 +
 662.246 +$B=L>.HG$N%j%]%8%H%j$r:n@.$7$?$J$i$P!"(B
 662.247 +$B%Q%C%A$N(B``$BE,MQBP>](B''$B$H$J$k%P!<%8%g%s$rA*Br$7$^$9(B\footnote{$BLuCm(B:
 662.248 +$B$3$3$G8@$&!V(Bchoose$B!W!JA*Br!K$O!"(B
 662.249 +\hgcmd{update} $B<B9T$r;X$9$N$G$O$J$$$+!)(B
 662.250 +$B$=$&$G$"$l$P!"<!J8$,!V$3$l$O!A%9%J%C%W%7%g%C%H$@!W$H$$$&$N$bM}2r$G$-$k!#(B}$B!#(B
 662.251 +XXXXXXXXXXXX
 662.252 +This is a snapshot of the Linux kernel tree as of a revision
 662.253 +of my choosing.
 662.254 +XXXXXXXXXXXX
 662.255 +$BE,MQBP>]$rA*Br$9$k:]$KI.<T$O!"(B
 662.256 +$BEv3:%j%S%8%g%s$N%+!<%M%k%j%]%8%H%j$K$*$1$k%A%'%s%8%;%C%H(BID$B$r!"(B
 662.257 +$B%3%_%C%H%a%C%;!<%8(B\footnote{$BLuCm(B: $B%Q%C%A$N!)(B XXXXXX}$BCf$K5-O?$7$F$*$-$^$9!#(B
 662.258 +$B%+!<%M%k%D%j!<Cf$N3+H/$K4XO"$9$kIt0L$K4X$7$F!"(B
 662.259 +$B%9%J%C%W%7%g%C%H$K$h$C$F(B``$B>u67(B''$B$HFbMF$,FCDj$G$-$k$?$a!"(B
 662.260 +$B=L>.HG%j%]%8%H%j$HDL>oHG$N%+!<%M%k%D%j!<$N$$$:$l$KBP$7$F$b!"(B
 662.261 +$B%Q%C%A$NE,MQ$,2DG=$K$J$j$^$9!#(BXXXXXX
 662.262 +Since the snapshot
 662.263 +preserves the ``shape'' and content of the relevant parts of the
 662.264 +kernel tree, I can apply my patches on top of either my tiny
 662.265 +repository or a normal kernel tree.
 662.266 +
 662.267 +$BDL>o$O!"(B
 662.268 +$B%Q%C%A$NE,MQBP>]$H$J$k%=!<%9%D%j!<$N%Y!<%9$K$O!"(B
 662.269 +$B>eN.%j%]%8%H%j$ND>6a$N%9%J%C%W%7%g%C%H$r;HMQ$9$Y$-$G$9!#(B
 662.270 +$B$=$&$9$k$3$H$G!"(B
 662.271 +$B:n@.$7$?%Q%C%A$r>eN.%j%]%8%H%j$NC4Ev<T$XAwIU$9$k:]$K!"(B
 662.272 +$BKX$I!J$"$k$$$OA4$/!K2~JQ$NI,MW$,L5$/$J$k$G$7$g$&!#(B
 662.273 +
 662.274 +\section{Dividing up the \sfilename{series} file}
 662.275 +
 662.276 +$BI.<T$O!"(B\sfilename{series} $B$KNs5s$5$l$k%Q%C%A$r!"(B
 662.277 +$B4v$D$+$NO@M}E*$J$^$H$^$j$KJ,N`$7$F$$$^$9!#(B
 662.278 +$B$=$l$>$l$N%Q%C%AJ,N`$O!"(B
 662.279 +$B$=$N8e$KNs5s$5$l$k%Q%C%A$N0U?^$r5-=R$7$?%3%a%s%H%V%m%C%/$G3+;O$5$l$^$9!#(B
 662.280 +
 662.281 +$BI.<T$N07$C$F$$$k%Q%C%AJ,N`$O!"0J2<$N$h$&$JJB$S$K$J$C$F$$$^$9!#(B
 662.282 +$BJ,N`$N=g=x$O=EMW$J$N$G!"J,N`$r>R2p$7$?8e$G@bL@$7$^$9!#(B
 662.283 +
 662.284 +\begin{itemize}
 662.285 +\item ``$B<uM}:Q$_(B(accepted)''$BJ,N`(B: 
 662.286 +  $B3+H/%A!<%`$,(B Infiniband $B%5%V%7%9%F%`$NJ]<iC4Ev$KAwIU$7$F!"(B
 662.287 +  $B4{$K<uM}$O$5$l$F$$$k$b$N$N!"(B
 662.288 +  $B=L>.HG%j%]%8%H%j$,85$K$7$F$$$k%9%J%C%W%7%g%C%H$K$O!"(B
 662.289 +  $B$^$@H?1G$5$l$F$$$J$$%Q%C%A$NJ,N`$G$9!#(B
 662.290 +  $B$3$l$i$O!"(B
 662.291 +  $B>eN.%j%]%8%H%j$NJ]<iC4Ev$N%j%]%8%H%j$HF1$8>uBV$rF@$k$?$a$K!"(B
 662.292 +  $B%=!<%9%D%j!<$rJQ49$9$k(B``$BFI$_=P$78BDj(B''$B%Q%C%A$G$9!#(B
 662.293 +
 662.294 +\item ``$B:F:n6H(B(rework)''$BJ,N`(B:
 662.295 +  $B>eN.%j%]%8%H%j$NJ]<iC4Ev$KAwIU$7$?$b$N$N!"(B
 662.296 +  $B<uM}$KEv$?$C$FJQ99$rMW5a$5$l$?%Q%C%A$NJ,N`!#(B
 662.297 +
 662.298 +\item ``$BJ]N1(B(pending)''$BJ,N`(B:
 662.299 +  $B>eN.%j%]%8%H%j$NJ]<iC4Ev$KAwIU$3$=$7$F$$$J$$$b$N$N!"(B
 662.300 +  $B4{$K:n6H$r=*$($?%Q%C%A$NJ,N`!#(B
 662.301 +  $B$7$P$i$/$N4V$O(B``$BFI$_=P$78BDj(B''$B$H$7$F07$o$l$^$9!#(B
 662.302 +  $B>eN.%j%]%8%H%j$NJ]<iC4Ev$K$h$j<uM}$5$l$l$P!"(B
 662.303 +  $B$3$N%Q%C%A$r(B``$B<uM}:Q$_(B''$BJ,N`$NKvHx$X$H0\F0$7$^$9!#(B
 662.304 +  $B<uM}$KEv$?$C$FJQ99$,MW5a$5$l$?>l9g!"(B
 662.305 +  ``$B:F:n6H(B''$BJ,N`$N@hF,$X$H0\F0$7$^$9!#(B
 662.306 +
 662.307 +\item ``$B:n6HCf(B(in progress)''$BJ,N`(B:
 662.308 +  $BL\2<$N$H$3$m3hH/$K:n6H$,9T$o$l$F$$$k%Q%C%A$NJ,N`!#(B
 662.309 +  $B$3$NJ,N`$N%Q%C%A$O!"30It$K8x3+$9$Y$-$G$O$"$j$^$;$s!#(B
 662.310 +
 662.311 +\item ``$B%P%C%/%]!<%H(B(backport)''$BJ,N`(B:
 662.312 +  $B8E$$HG$N%+!<%M%k$N%=!<%9%D%j!<$KE,9g$5$;$k$?$a$N%Q%C%A$NJ,N`!#(B
 662.313 +
 662.314 +\item ``$BFbItMQ(B(do not ship)''$BJ,N`(B:
 662.315 +  $B2?$i$+$NM}M3$K$h$j!">eN.%j%]%8%H%j$NJ]<iC4Ev$X$OAwIU$5$l$J$$%Q%C%A$NJ,N`!#(B
 662.316 +  $B$3$N$h$&$J%Q%C%A$NNc$H$7$F$O!"(B
 662.317 +  $B%I%i%$%P<1JLMQ$NKd$a9~$_J8;zNs$NJQ99$r9T$&$3$H$G!"(B
 662.318 +  $B%=!<%9%D%j!<$N$b$N$H$O0[$J$k%I%i%$%P<BAu$NHG(B
 662.319 +  \footnote{$BLuCm(B: $B3+H/Cf$N%I%i%$%P$N$3$H!)(B}$B$H!"(B
 662.320 +  $B%G%#%9%H%j%S%e!<%7%g%s%Y%s%@$K$h$C$FG[I[$5$l$k%I%i%$%P<BAu$NHG$N4V$G!"(B
 662.321 +  $BF0:n3NG'Ey$K$*$1$k6hJL$rMF0W$K$9$k%Q%C%A$,$"$j$^$9!#(B
 662.322 +
 662.323 +\end{itemize}
 662.324 +
 662.325 +$B$G$O$3$3$G!"%Q%C%AJ,N`Hx$r$3$N=gHV$K$9$kM}M3$KLa$j$^$7$g$&!#(B
 662.326 +$B%3%s%F%-%9%H$NJQ99$,H/@8$9$k$3$H$G!"(B
 662.327 +$B%9%?%C%/>eJ}$N%Q%C%A$X$N:F:n6H(B
 662.328 +\footnote{$BLuCm(B: \hgxcmd{mq}{qrefresh} $B$N<B9T$K$h$k%Q%C%A$N=$@5$N$3$H(B}
 662.329 +$B$,I,MW$K$J$k$3$H$,L5$$$h$&$K!"(B
 662.330 +$B%9%?%C%/Cf$GDl$K$"$k%Q%C%A$[$I0BDj$7$F$$$FM_$7$$$b$N$G$9!#(B
 662.331 +$BJQ99$5$l$K$/$$%Q%C%A72$r(B
 662.332 +\sfilename{series} $B%U%!%$%k$NKAF,$KCV$/$3$H$G!"(B
 662.333 +$B$3$NL\E*$rC#@.$9$k$3$H$,$G$-$^$9!#(B
 662.334 +
 662.335 +$BB>$N%Q%C%A$NE,MQ$r6KNO>eN.%j%]%8%H%j$N>uBV$K6a$$%=!<%9%D%j!<$X9T$&$?$a$K!"(B
 662.336 +$B%=!<%9%D%j!<$NJQ49$KI,MW$H;W$o$l$k%Q%C%A$b=EMW$G$9!#(B
 662.337 +$B<uM}:Q$_$N%Q%C%A$b;C$/$N4VJ];}$7$F$$$k$N$O$=$N$?$a$G$9!#(B
 662.338 +
 662.339 +``$B%P%C%/%]!<%H(B''$B$*$h$S(B``$BFbItMQ(B''$B%Q%C%A$O!"(B
 662.340 +\sfilename{series} $BKvHx6aJU$rE>!9$H$7$^$9!#(B
 662.341 +$B%P%C%/%]!<%H%Q%C%A$OB>$NA4$F$N%Q%C%AE,MQ$N>e$GE,MQ$5$l$J$1$l$P$J$j$^$;$s$7!"(B
 662.342 +$B$=$N>e!"(B
 662.343 +``$BFbItMQ(B''$B%Q%C%A$OITET9g$,L5$$$h$&$KFbIt$KN1$^$jB3$1$kI,MW$,$"$j$^$9!#(B
 662.344 +
 662.345 +\section{Maintaining the patch series}
 662.346 +
 662.347 +$BI.<T$N:n6H$N:]$K$O!"(B
 662.348 +$B%Q%C%AE,MQ$r@)8f$9$k$?$a$KJ#?t$N%,!<%I$r;HMQ$7$F$$$^$9!#(B
 662.349 +
 662.350 +\begin{itemize}
 662.351 +\item ``$B<uM}:Q$_(B''$B%Q%C%A$K$O!"(B\texttt{accepted} $B%,!<%I$,IUM?$5$l$^$9!#(B
 662.352 +  $B$3$N%,!<%I$OKX$I$N>l9g$KM-8z$H$5$l$^$9!#(B
 662.353 +  $B4{$K%Q%C%A$,E,MQ$5$l$F$$$k%=!<%9%D%j!<$K%Q%C%A$rE,MQ$9$k:]$K$O!"(B
 662.354 +  $B%Q%C%A$rE,MQ$5$;$J$$$h$&$K$9$k$3$H$,(B
 662.355 +  \footnote{$BLuCm(B: \texttt{accepted} $B%,!<%IIU$-%Q%C%A$rL58z$K$9$k$3$H$G(B}
 662.356 +  $B$G$-$k$N$G!"(B
 662.357 +  $B8eB3$N%Q%C%A72$Oe:No$KE,MQ$5$l$^$9!#(B
 662.358 +
 662.359 +\item $B:n6H$O(B``$B40N;(B''$B$7$F$$$k$b$N$N!"(B
 662.360 +  $B>eN.%j%]%8%H%j$NJ]<iC4Ev$KAwIU$5$l$F$$$J$$%Q%C%A(B
 662.361 +  \footnote{$BLuCm(B: $B@h$NJ,N`$G8@$&$H$3$m$N(B``$BJ]N1(B(pending)''}$B$K$O!"(B
 662.362 +  $B2?$b%,!<%I$,IUM?$5$l$^$;$s!#(B
 662.363 +  $B>eN.%j%]%8%H%j$N%3%T!<$KBP$7$F%Q%C%A%9%?%C%/$rE,MQ$9$k>l9g!"(B
 662.364 +  $BFC$K2?$b%,!<%I$r;XDj$7$J$/$F$b!"(B
 662.365 +  $BE,EY$K0BA4$J%=!<%9%D%j!<$rF@$k$3$H$,$G$-$^$9!#(B
 662.366 +
 662.367 +\item $B>eN.%j%]%8%H%j$NJ]<iC4Ev$X$N!J:F!KAwIU$KEv$?$C$F!"(B
 662.368 +  $B:F:n6H$,I,MW$J%Q%C%A$K$O(B \texttt{rework} $B%,!<%I$,IUM?$5$l$^$9!#(B
 662.369 +
 662.370 +\item $BL\2<3+H/:n6HCf$K$"$k%Q%C%A(B
 662.371 +  \footnote{$BLuCm(B: $B@h$NJ,N`$G8@$&$H$3$m$N(B``$B:n6HCf(B(in progress)''}$B$K$O!"(B
 662.372 +  \texttt{devel} $B%,!<%I$,IUM?$5$l$^$9!#(B
 662.373 +
 662.374 +\item $B%P%C%/%]!<%H%Q%C%A$K$O!"(B
 662.375 +  $BE,MQBP>]%+!<%M%k$N%P!<%8%g%s$r;XDj$9$kJ#?t$N%,!<%I$,IUM?$5$l$^$9!#(B
 662.376 +  $BNc$($P!"(B~2.6.9 $BHG$X$N%P%C%/%]!<%H$r9T$&%Q%C%A$K$O!"(B
 662.377 +  \texttt{2.6.9} $B%,!<%I$,IUM?$5$l$^$9!#(B
 662.378 +
 662.379 +\end{itemize}
 662.380 +
 662.381 +$B$3$l$i$N%,!<%IJ,N`$K$h$j!"(B
 662.382 +$B:G=*E*$K$I$N$h$&$J%=!<%9%D%j!<$,F@$i$l$k$+$r7hDj$9$k:]$K!"(B
 662.383 +$B>/$J$+$i$L=@Fp@-$rF@$k$3$H$,$G$-$^$9!#(B
 662.384 +$BB?$/$N>l9g!"(B
 662.385 +$BE,@Z$J%,!<%I$NA*Br$O9=C[<j=g$NCf$G<+F02=$5$l$F$$$^$9$,!"(B
 662.386 +$BFCJL$J>u678~$1$K%,!<%I$ND4@0$r<jF0$G9T$&$3$H$b2DG=$G$9!#(B
 662.387 +
 662.388 +\subsection{The art of writing backport patches}
 662.389 +
 662.390 +MQ $B$r;HMQ$9$k$3$H$G!"(B
 662.391 +$B%P%C%/%]!<%H%Q%C%A$N:n@.$OC1=c$J:n6H$H$J$j$^$9!#(B
 662.392 +$B5lHG$N%+!<%M%kG[2<$K$*$$$F$b%I%i%$%P$,@5>o$K2TF0$9$k$h$&$K!"(B
 662.393 +$B5lHG$N%+!<%M%k$K$*$$$FDs6!$5$l$F$$$J$$5!G=$r;HMQ$9$k%3!<%I$NJQ99$,!"(B
 662.394 +$B%P%C%/%]!<%H%Q%C%A$N$9$Y$-$3$H$NA4$F$G$9!#(B
 662.395 +
 662.396 +$BNI$$%P%C%/%]!<%H%Q%C%A$r=q$/:]$N%4!<%k$O!"(B
 662.397 +$BBP>]$H$9$k5lHG%+!<%M%k8~$1$K=q$$$?$+$N$h$&$K!"(B
 662.398 +$B$"$J$?$N%3!<%I$rJQ99$9$k$h$&$J%Q%C%A$K$9$k$3$H$G$9!#(B
 662.399 +$B%Q%C%A$,$G$7$c$P$i$J$$Dx!"M}2r$HJ]<i$,MF0W$K$J$j$^$9!#(B
 662.400 +$B%3!<%ICf$NBgNL$N(B \texttt{\#ifdef}$B!J>r7o$K1~$8$FE,MQ$5$l$k%3!<%IJR!K(B
 662.401 +$B$K$h$k(B``$BAM$NAc(B''$B2=$rHr$1$k$?$a$K%P%C%/%]!<%H%Q%C%A72$r=q$/$N$G$"$l$P!"(B
 662.402 +$B%P!<%8%g%s0MB8$J(B \texttt{\#ifdef} $B$r%Q%C%A$K;}$A9~$`$Y$-$G$O$"$j$^$;$s!#(B
 662.403 +$B%P!<%8%g%s0MB8$J(B \texttt{\#ifdef} $B$r;HMQ$9$kBX$o$j$K!"(B
 662.404 +$B8D!9$N%Q%C%A$O%P!<%8%g%s$K0MB8$7$J$$JQ99$r9T$&$h$&$K$7$F!"(B
 662.405 +$B%Q%C%A$NE,MQ$r%,!<%I$K$h$C$F@)8f$9$Y$-$G$9!#(B
 662.406 +
 662.407 +``$BDL>o(B''$B$N%Q%C%A$H!"(B
 662.408 +$B$=$NE,MQ7k2L$r99$KJQ99$9$k%P%C%/%]!<%H%Q%C%A$H$r!"(B
 662.409 +$BJL8D$N%0%k!<%W$KJ,N%$9$k$N$K$O#2$D$NM}M3$,$"$j$^$9!#(B
 662.410 +$BBh#1$NM}M3$O!"(B
 662.411 +$B$3$l$i$N%Q%C%A$,:.$6$j9g$C$?>l9g$K!"(B
 662.412 +$B>eN.%j%]%8%H%j$NJ]<iC4Ev$X$N%Q%C%AAwIU$N<+F02=$N:]$K!"(B
 662.413 +\hgext{patchbomb} $B3HD%$N$h$&$J%D!<%k$r;H$&$3$H$,Fq$7$/$J$k$?$a$G$9!#(B
 662.414 +$BBh#2$NM}M3$O!"(B
 662.415 +$B8eB3$NDL>o%Q%C%A$NE,MQ%3%s%F%-%9%H(B
 662.416 +\footnote{$BLuCm(B: \command{patch} $B%U%!%$%k$K$*$1$k!V%3%s%F%-%9%H!W(B}
 662.417 +$B$r%P%C%/%]!<%H%Q%C%A$,:.Mp$5$;$F$7$^$$!"(B
 662.418 +$BDL>o%Q%C%A$NE,MQA0$KE,MQ$5$l$?%P%C%/%]!<%H%Q%C%A(B\emph{$BH4$-(B}$B$G$O!"(B
 662.419 +$BDL>o%Q%C%A$re:No$KE,MQ$9$k$3$H$,$G$-$J$/$J$C$F$7$^$&$?$a$G$9!#(B
 662.420 +
 662.421 +\section{Useful tips for developing with MQ}
 662.422 +
 662.423 +\subsection{Organising patches in directories}
 662.424 +
 662.425 +MQ $B$rMxMQ$7$?<B:_$9$k%W%m%8%'%/%H$G:n6H$r$7$F$$$k$N$G$"$l$P!"(B
 662.426 +$BB?$/$N%Q%C%A$rC_@Q$9$k$3$H$bFq$7$$$3$H$G$O$"$j$^$;$s!#(B
 662.427 +$BNc$($P!"I.<T$O(B 250 $B$rD6$($k%Q%C%A$rJz$($?%Q%C%A%j%]%8%H%j$r;}$C$F$$$^$9!#(B
 662.428 +
 662.429 +$B%Q%C%A$r8DJL$NO@M}E*$J$^$H$^$j$KJ,N`$G$-$k$N$G$"$l$P!"(B
 662.430 +MQ $B$O%Q%C%AL>$K%Q%96h@Z$j$,4^$^$l$F$$$F$bLdBj$J$$$N$G!"(B
 662.431 +$B$=$l$>$l$N%Q%C%A$r0[$J$k%G%#%l%/%H%j$K3JG<$9$k$3$H$b$G$-$^$9(B
 662.432 +\footnote{$BLuCm(B: MQ $B$O%Q%C%AFbMF$NJ]B8@h$H$7$F!"(B
 662.433 +$B%Q%C%AL>$HF1L>$N%U%!%$%k$r:n@.$9$k$?$a!"(B
 662.434 +$B%Q%C%AL>$K%Q%96h@Z$j$,4^$^$l$k>l9g!"(B
 662.435 +MQ $B$O<+F0E*$K%5%V%G%#%l%/%H%j$r:n@.$7$^$9(B}$B!#(B
 662.436 +
 662.437 +\subsection{Viewing the history of a patch}
 662.438 +\label{mq-collab:tips:interdiff}
 662.439 +
 662.440 +$BD94|4V$K$o$?$C$F%Q%C%A$N3+H/$r9T$&>l9g!"(B
 662.441 +\ref{sec:mq:repo} $B@a$G=R$Y$?$h$&$K!"(B
 662.442 +$B%Q%C%A$r%j%]%8%H%j$G4IM}$9$k$N$,NI$$$G$7$g$&!#(B
 662.443 +$B$=$N>l9g$OAa!9$K!"(B
 662.444 +$B%Q%C%A$NJQ99MzNr$N;2>H$K(B 
 662.445 +\hgcmd{diff} $B$,;H$($J$$$3$H$K5$IU$/$3$H$G$7$g$&!#(B
 662.446 +$B$3$l$O<B:]$N%3!<%I$NFs<!GI@8J*(B($B:9J,$N:9J,(B)$B$r8+$F$$$k$3$H0J30$K$b!"(B
 662.447 +$B%?%$%`%9%?%s%W$d%Q%C%A99?7;~$N%G%#%l%/%H%jL>Ey$r2~JQ$9$k$3$H$G(B
 662.448 +MQ $B$,;(2;$r2C$($F$7$^$C$F$$$k$3$H$K860x$,$"$j$^$9!#(B
 662.449 +
 662.450 +Mercurial $B$KF1:-$5$l$F$$$k(B \hgext{extdiff} $B3HD%$r;H$&$3$H$G!"(B
 662.451 +$B#2$D$NHG$N%Q%C%A:9J,$r4vJ,FI$_$d$9$$$b$N$K$9$k$3$H$,$G$-$^$9!#(B
 662.452 +$B$3$N3HD%$r;H$&$?$a$K$O!"(B
 662.453 +$B%5!<%I%Q!<%F%#!<%Q%C%1!<%8$G$"$k(B
 662.454 +\package{patchutils}~\cite{web:patchutils} $B$,I,MW$G$9!#(B
 662.455 +$B$3$N%Q%C%1!<%8$,Ds6!$9$k(B \command{interdiff} $B$H$$$&%3%^%s%I$O!"(B
 662.456 +$B:9J,4V$N:9J,$r#1$D$N:9J,$H$7$FI=<($7$^$9!#(B
 662.457 +$BF1$8:9J,$N#2$D$NHG(B
 662.458 +\footnote{$BLuCm(B: $B!VF1$8%Q%C%A$N0[$J$kHG!W$N0U$+!)(B}
 662.459 +$B$KBP$7$F$3$N%3%^%s%I$rE,MQ$9$k$H!"(B
 662.460 +$B:G=i$NHG$+$i<!$NHG$X$HJQ99$9$k$?$a$N:9J,$r@8@.$7$^$9!#(B
 662.461 +
 662.462 +$B$$$D$b$N$h$&$K!"(B
 662.463 +\hgrc $B%U%!%$%k$N(B \rcsection{extensions} 
 662.464 +$B%;%/%7%g%s$K9T$rDI2C$9$k$3$H$G!"(B
 662.465 +\hgext{extdiff} $B3HD%$rM-8z2=$9$k$3$H$,$G$-$^$9!#(B
 662.466 +
 662.467 +\begin{codesample2}
 662.468 +  [extensions]
 662.469 +  extdiff =
 662.470 +\end{codesample2}
 662.471 +
 662.472 +\command{interdiff} $B%3%^%s%I$O#2$D$N%U%!%$%kL>$N;XDj$,I,MW$G$9$,!"(B
 662.473 +\hgext{extdiff} $B3HD%$O!"(B
 662.474 +$B$=$l$>$lG$0U$N?t$N%U%!%$%k$rG[2<$K;}$D!"(B
 662.475 +$B#2$D$N%G%#%l%/%H%j$KBP$7$FF0:n$9$k%W%m%0%i%`$N;XDj$,I,MW$G$9!#(B
 662.476 +$B$=$N$?$a!"(B
 662.477 +$B$3$l$i#2$D$N%G%#%l%/%H%jG[2<$N8D!9$N%U%!%$%kBP$KBP$7$F(B
 662.478 +\command{interdiff} $B$r<B9T$9$k>.$5$J%W%m%0%i%`$,I,MW$G$9!#(B
 662.479 +$BK\=q$N%=!<%9%3!<%I%j%]%8%H%j$K$*$1$k(B
 662.480 +\dirname{examples} $B%G%#%l%/%H%jG[2<$K!"(B
 662.481 +\sfilename{hg-interdiff} $B$H$7$F3JG<$5$l$F$$$^$9!#(B
 662.482 +
 662.483 +\excode{hg-interdiff}
 662.484 +
 662.485 +\sfilename{hg-interdiff} $B$,%7%'%k$N%3%^%s%I8!:w%Q%9>e$KM-$k>l9g!"(B
 662.486 +MQ $B$N%Q%C%A%G%#%l%/%H%j$+$i0J2<$N$h$&$K$7$F5/F0$9$k$3$H$,$G$-$^$9!#(B
 662.487 +
 662.488 +\begin{codesample2}
 662.489 +  hg extdiff -p hg-interdiff -r A:B my-change.patch
 662.490 +\end{codesample2}
 662.491 +
 662.492 +$B$*$=$i$/$3$ND9$?$i$7$$%3%^%s%I$r2?EY$b;H$&$3$H$K$J$k$G$7$g$&$+$i!"(B
 662.493 +$B:FEY(B \hgrc $B$rJT=8$7$F!"(B
 662.494 +\hgext{hgext} $B$r(B Mercurial $B$NIaDL$N%3%^%s%IJB$K;H$($k$h$&$K$7$^$7$g$&!#(B
 662.495 +
 662.496 +\begin{codesample2}
 662.497 +  [extdiff]
 662.498 +  cmd.interdiff = hg-interdiff
 662.499 +\end{codesample2}
 662.500 +
 662.501 +$B$3$N5-=R$K$h$j(B \texttt{interdiff} $B$,(B
 662.502 +\hgext{hgext} $B$+$iMxMQ$G$-$k$h$&$K$J$j$^$9$N$G!"(B
 662.503 +$B@h$N(B \hgxcmd{extdiff}{extdiff} $B5/F0$bC;$/$J$C$F4vJ,;H$$$d$9$/$J$k$G$7$g$&!#(B
 662.504 +
 662.505 +\begin{codesample2}
 662.506 +  hg interdiff -r A:B my-change.patch
 662.507 +\end{codesample2}
 662.508 +
 662.509 +\begin{note}
 662.510 +  \command{interdiff} $B%3%^%s%I$O!"(B
 662.511 +  $B>l9g$@$1@5$7$/5!G=$7$^$9!#(B
 662.512 +  The \command{interdiff} command works well only if the underlying
 662.513 +  files against which versions of a patch are generated remain the
 662.514 +  same.  
 662.515 +  $B%Q%C%A$N@8@.!&%U%!%$%k$NJQ99$*$h$S%Q%C%A$N99?7$r9T$C$?>l9g!"(B
 662.516 +  \command{interdiff} $B$OM-MQ$J=PNO$r@8@.$7$J$$$3$H$,$"$j$^$9!#(B
 662.517 +\end{note}
 662.518 +
 662.519 +\hgext{extdiff} $B3HD%$O!"(B
 662.520 +MQ $B%Q%C%A$NI=<(5!G=$N8~>e$KN1$^$i$J$$M-MQ$J$b$N$G$9!#(B
 662.521 +\hgext{extdiff} $B3HD%$K4X$9$k>\:Y$O!"(B
 662.522 +\ref{sec:hgext:extdiff} $B@a$r;2>H$7$F$/$@$5$$!#(B
 662.523 +
 662.524 +%%% Local Variables: 
 662.525 +%%% mode: latex
 662.526 +%%% TeX-master: "00book"
 662.527 +%%% End: 
   663.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   663.2 +++ b/ja/mq-stack.svg	Sun Aug 16 03:41:39 2009 +0200
   663.3 @@ -0,0 +1,270 @@
   663.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   663.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   663.6 +<svg
   663.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   663.8 +   xmlns:cc="http://web.resource.org/cc/"
   663.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  663.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  663.11 +   xmlns="http://www.w3.org/2000/svg"
  663.12 +   xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
  663.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  663.14 +   width="744.09448819"
  663.15 +   height="1052.3622047"
  663.16 +   id="svg2"
  663.17 +   sodipodi:version="0.32"
  663.18 +   inkscape:version="0.43"
  663.19 +   sodipodi:docname="mq-stack.svg"
  663.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en">
  663.21 +  <defs
  663.22 +     id="defs4" />
  663.23 +  <sodipodi:namedview
  663.24 +     id="base"
  663.25 +     pagecolor="#ffffff"
  663.26 +     bordercolor="#666666"
  663.27 +     borderopacity="1.0"
  663.28 +     inkscape:pageopacity="0.0"
  663.29 +     inkscape:pageshadow="2"
  663.30 +     inkscape:zoom="1.4142136"
  663.31 +     inkscape:cx="299.33323"
  663.32 +     inkscape:cy="815.646"
  663.33 +     inkscape:document-units="px"
  663.34 +     inkscape:current-layer="layer1"
  663.35 +     inkscape:window-width="1014"
  663.36 +     inkscape:window-height="689"
  663.37 +     inkscape:window-x="0"
  663.38 +     inkscape:window-y="25" />
  663.39 +  <metadata
  663.40 +     id="metadata7">
  663.41 +    <rdf:RDF>
  663.42 +      <cc:Work
  663.43 +         rdf:about="">
  663.44 +        <dc:format>image/svg+xml</dc:format>
  663.45 +        <dc:type
  663.46 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  663.47 +      </cc:Work>
  663.48 +    </rdf:RDF>
  663.49 +  </metadata>
  663.50 +  <g
  663.51 +     inkscape:label="Layer 1"
  663.52 +     inkscape:groupmode="layer"
  663.53 +     id="layer1">
  663.54 +    <rect
  663.55 +       style="fill:#0000ff;fill-opacity:0.75;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  663.56 +       id="rect1307"
  663.57 +       width="202.93683"
  663.58 +       height="24.243662"
  663.59 +       x="230.01944"
  663.60 +       y="221.70146" />
  663.61 +    <text
  663.62 +       xml:space="preserve"
  663.63 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
  663.64 +       x="237.89606"
  663.65 +       y="237.13383"
  663.66 +       id="text1309"><tspan
  663.67 +         sodipodi:role="line"
  663.68 +         id="tspan1311"
  663.69 +         x="237.89606"
  663.70 +         y="237.13383">prevent-compiler-reorder.patch</tspan></text>
  663.71 +    <rect
  663.72 +       style="fill:#7979ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  663.73 +       id="rect1320"
  663.74 +       width="202.93683"
  663.75 +       height="24.243662"
  663.76 +       x="230.01936"
  663.77 +       y="251.34325" />
  663.78 +    <text
  663.79 +       xml:space="preserve"
  663.80 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
  663.81 +       x="237.89598"
  663.82 +       y="266.77563"
  663.83 +       id="text1322"><tspan
  663.84 +         sodipodi:role="line"
  663.85 +         id="tspan1324"
  663.86 +         x="237.89598"
  663.87 +         y="266.77563">namespace-cleanup.patch</tspan></text>
  663.88 +    <rect
  663.89 +       style="fill:#7979ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  663.90 +       id="rect2217"
  663.91 +       width="202.93683"
  663.92 +       height="24.243662"
  663.93 +       x="230.01936"
  663.94 +       y="280.98505" />
  663.95 +    <text
  663.96 +       xml:space="preserve"
  663.97 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
  663.98 +       x="237.89598"
  663.99 +       y="296.41742"
 663.100 +       id="text2219"><tspan
 663.101 +         sodipodi:role="line"
 663.102 +         id="tspan2221"
 663.103 +         x="237.89598"
 663.104 +         y="296.41742">powerpc-port-fixes.patch</tspan></text>
 663.105 +    <rect
 663.106 +       style="fill:#7979ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#3c3c3c;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 663.107 +       id="rect3114"
 663.108 +       width="202.93683"
 663.109 +       height="24.243662"
 663.110 +       x="230.01936"
 663.111 +       y="310.6268" />
 663.112 +    <text
 663.113 +       xml:space="preserve"
 663.114 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 663.115 +       x="237.89598"
 663.116 +       y="326.05917"
 663.117 +       id="text3116"><tspan
 663.118 +         sodipodi:role="line"
 663.119 +         id="tspan3118"
 663.120 +         x="237.89598"
 663.121 +         y="326.05917">report-devinfo-correctly.patch</tspan></text>
 663.122 +    <text
 663.123 +       xml:space="preserve"
 663.124 +       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 663.125 +       x="200.01021"
 663.126 +       y="191.68094"
 663.127 +       id="text3170"
 663.128 +       sodipodi:linespacing="125%"><tspan
 663.129 +         sodipodi:role="line"
 663.130 +         id="tspan3172"
 663.131 +         x="200.01021"
 663.132 +         y="191.68094"
 663.133 +         style="font-size:48px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans">{</tspan></text>
 663.134 +    <text
 663.135 +       xml:space="preserve"
 663.136 +       style="font-size:15.25329685px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 663.137 +       x="255.26627"
 663.138 +       y="248.79449"
 663.139 +       id="text3190"
 663.140 +       sodipodi:linespacing="125%"
 663.141 +       transform="scale(0.786716,1.271107)"><tspan
 663.142 +         sodipodi:role="line"
 663.143 +         id="tspan3192"
 663.144 +         x="255.26627"
 663.145 +         y="248.79449"
 663.146 +         style="font-size:61.01318741px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Bitstream Vera Sans">{</tspan></text>
 663.147 +    <text
 663.148 +       xml:space="preserve"
 663.149 +       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 663.150 +       x="195.86807"
 663.151 +       y="173.17117"
 663.152 +       id="text4085"
 663.153 +       sodipodi:linespacing="125%"><tspan
 663.154 +         sodipodi:role="line"
 663.155 +         id="tspan4087"
 663.156 +         x="195.86807"
 663.157 +         y="173.17117"
 663.158 +         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">present in series,</tspan><tspan
 663.159 +         sodipodi:role="line"
 663.160 +         x="195.86807"
 663.161 +         y="188.17117"
 663.162 +         id="tspan4089"
 663.163 +         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">but not applied</tspan></text>
 663.164 +    <text
 663.165 +       xml:space="preserve"
 663.166 +       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 663.167 +       x="195.0712"
 663.168 +       y="288.91745"
 663.169 +       id="text4091"
 663.170 +       sodipodi:linespacing="125%"><tspan
 663.171 +         sodipodi:role="line"
 663.172 +         id="tspan4093"
 663.173 +         x="195.0712"
 663.174 +         y="288.91745"
 663.175 +         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">patches applied,</tspan><tspan
 663.176 +         sodipodi:role="line"
 663.177 +         x="195.0712"
 663.178 +         y="303.91745"
 663.179 +         id="tspan4111"
 663.180 +         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">changesets present</tspan></text>
 663.181 +    <text
 663.182 +       xml:space="preserve"
 663.183 +       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 663.184 +       x="195.0712"
 663.185 +       y="229.28813"
 663.186 +       id="text4095"
 663.187 +       sodipodi:linespacing="125%"><tspan
 663.188 +         sodipodi:role="line"
 663.189 +         id="tspan4097"
 663.190 +         x="195.0712"
 663.191 +         y="229.28813"
 663.192 +         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">topmost</tspan><tspan
 663.193 +         sodipodi:role="line"
 663.194 +         x="195.0712"
 663.195 +         y="244.28813"
 663.196 +         id="tspan4109"
 663.197 +         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;font-family:Bitstream Vera Sans">applied patch</tspan></text>
 663.198 +    <text
 663.199 +       xml:space="preserve"
 663.200 +       style="font-size:12px;font-style:normal;font-weight:normal;opacity:1;fill:#666666;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 663.201 +       x="450.4975"
 663.202 +       y="238.29692"
 663.203 +       id="text4137"><tspan
 663.204 +         sodipodi:role="line"
 663.205 +         id="tspan4139"
 663.206 +         x="450.4975"
 663.207 +         y="238.29692">201ad3209902</tspan></text>
 663.208 +    <text
 663.209 +       xml:space="preserve"
 663.210 +       style="font-size:12px;font-style:normal;font-weight:normal;opacity:1;fill:#989898;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 663.211 +       x="450.05804"
 663.212 +       y="267.93872"
 663.213 +       id="text4141"><tspan
 663.214 +         sodipodi:role="line"
 663.215 +         id="tspan4143"
 663.216 +         x="450.05804"
 663.217 +         y="267.93872">126b84e593ae</tspan></text>
 663.218 +    <text
 663.219 +       xml:space="preserve"
 663.220 +       style="font-size:12px;font-style:normal;font-weight:normal;opacity:1;fill:#989898;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 663.221 +       x="450.6557"
 663.222 +       y="297.58051"
 663.223 +       id="text4145"><tspan
 663.224 +         sodipodi:role="line"
 663.225 +         id="tspan4147"
 663.226 +         x="450.6557"
 663.227 +         y="297.58051">a655daf15409</tspan></text>
 663.228 +    <text
 663.229 +       xml:space="preserve"
 663.230 +       style="font-size:12px;font-style:normal;font-weight:normal;opacity:1;fill:#989898;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 663.231 +       x="450.71429"
 663.232 +       y="327.22226"
 663.233 +       id="text4149"><tspan
 663.234 +         sodipodi:role="line"
 663.235 +         id="tspan4151"
 663.236 +         x="450.71429"
 663.237 +         y="327.22226">e50d59aaea3a</tspan></text>
 663.238 +    <rect
 663.239 +       style="fill:#d7d7ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#a6a6a6;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 663.240 +       id="rect3106"
 663.241 +       width="202.93683"
 663.242 +       height="24.243662"
 663.243 +       x="230.01936"
 663.244 +       y="150.41792" />
 663.245 +    <text
 663.246 +       xml:space="preserve"
 663.247 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#808080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 663.248 +       x="237.89598"
 663.249 +       y="165.8503"
 663.250 +       id="text3108"><tspan
 663.251 +         sodipodi:role="line"
 663.252 +         id="tspan3110"
 663.253 +         x="237.89598"
 663.254 +         y="165.8503">forbid-illegal-params.patch</tspan></text>
 663.255 +    <rect
 663.256 +       style="fill:#d7d7ff;fill-opacity:0.875;fill-rule:evenodd;stroke:#a6a6a6;stroke-width:1.05063355px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 663.257 +       id="rect2241"
 663.258 +       width="202.93683"
 663.259 +       height="24.243662"
 663.260 +       x="230.16466"
 663.261 +       y="180.05968" />
 663.262 +    <text
 663.263 +       xml:space="preserve"
 663.264 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#808080;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
 663.265 +       x="238.04128"
 663.266 +       y="195.49205"
 663.267 +       id="text2243"><tspan
 663.268 +         sodipodi:role="line"
 663.269 +         id="tspan2245"
 663.270 +         x="238.04128"
 663.271 +         y="195.49205">fix-memory-leak.patch</tspan></text>
 663.272 +  </g>
 663.273 +</svg>
   664.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   664.2 +++ b/ja/mq.tex	Sun Aug 16 03:41:39 2009 +0200
   664.3 @@ -0,0 +1,1235 @@
   664.4 +\chapter{Managing change with Mercurial Queues}
   664.5 +\label{chap:mq}
   664.6 +
   664.7 +\section{$B%Q%C%A4IM}LdBj(B}
   664.8 +\label{sec:mq:patch-mgmt}
   664.9 +
  664.10 +$B%=%U%H%&%'%"%Q%C%1!<%8$r%=!<%9$+$i%$%s%9%H!<%k$9$kI,MW$,$"$k$N$K!"(B
  664.11 +$B%Q%C%1!<%8;HMQA0$K=$@5$7$F$*$+$J$1$l$P$J$i$J$$%P%0$r%=!<%9Cf$KH/8+$7$F$7$^$&!"(B
  664.12 +$B$H$$$&$h$&$J;vBV$O$h$/$"$k$3$H$G$9!#(B
  664.13 +  $BJQ99$N8e!";C$/%Q%C%1!<%8$N$3$H$rK:$l$F$$$k$H!"(B
  664.14 +$B?t%u7n8e$K%Q%C%1!<%8$r?7$7$$HG$G99?7$9$kI,MW$,=P$F$-$?$H$7$^$9!#(B
  664.15 +  $B%Q%C%1!<%8$N?7$7$$HG$,L$$@$K%P%0$r;D$7$F$$$?$J$i!"(B
  664.16 +$B8E$$HG$N%=!<%9%D%j!<$+$i=$@5FbMF$rCj=P$7$F!"(B
  664.17 +$B?7$7$$HG$KE,MQ$7$J$1$l$P$J$j$^$;$s!#(B
  664.18 +  $B$3$N$h$&$J:n6H$OB`6~$G4V0c$$$r5/$3$7$d$9$$$b$N$G$9!#(B
  664.19 +
  664.20 +$B$3$l$O(B``$B%Q%C%A4IM}(B''$BLdBj$NC1=c$J%1!<%9$G$9!#(B
  664.21 +  $B<+J,$G$OJQ99$9$k$3$H$,$G$-$J$$(B``$B>eN.(B''$B$N%=!<%9%D%j!<$,$"$k$H$7$^$9!#(B
  664.22 +$B>eN.$N%=!<%9%D%j!<$N>e$G%m!<%+%k$J=$@5$r9T$&I,MW$,$"$k$J$i!"(B
  664.23 +$B>eN.%=!<%9$N?7$7$$HG$KBP$7$F%m!<%+%k$J=$@5$rE,MQ$G$-$k$h$&$K!"(B
  664.24 +$B$=$&$$$C$?=$@5$rJLES4IM}$7$?$$$H;W$&$G$7$g$&!#(B
  664.25 +
  664.26 +$B%Q%C%A4IM}LdBj$O$5$^$6$^$J>u67$GH/@8$7$^$9!#(B
  664.27 +$B%*!<%W%s%=!<%9%=%U%H%&%'%"%W%m%8%'%/%H$N%f!<%6$,!"(B
  664.28 +$B%W%m%8%'%/%H$N%a%s%F%J%s%9C4Ev$X!"(B
  664.29 +$B%P%0=$@5$d?75,5!G=$r%Q%C%A7A<0$GAwIU$9$k>u67$,!"(B
  664.30 +$B$*$=$i$/:G$b$o$+$j$d$9$$>u67$G$7$g$&!#(B
  664.31 +
  664.32 +$B%*!<%W%s%=!<%9%=%U%H%&%'%"$r4^$`%*%Z%l!<%F%#%s%0%7%9%F%`$NG[I[<T$O!"(B
  664.33 +$BG[I[$9$k%Q%C%1!<%8$KBP$9$kJQ99$rIQHK$K9T$&$N$G!"(B
  664.34 +$B<+J,$?$A$N4D6-$K$*$$$F%S%k%I$r9T$&$N$OEvA3$N$3$H$G$9!#(B
  664.35 +
  664.36 +$B@0Hw$N>e$G4v$D$+JQ99$r9T$$$?$$>l9g!"(B
  664.37 +$BI8=`E*$J(B
  664.38 +\command{diff} $B$*$h$S(B \command{patch} $B%W%m%0%i%`(B
  664.39 +$B!J$3$l$i$N%D!<%k$K4X$9$k5DO@$O(B \ref{sec:mq:patch} $B@a$r;2>H$N$3$H!K(B
  664.40 +$B$r;HMQ$7$F!"C10l$N%Q%C%A$r4IM}$9$k$3$H$O4JC1$G$9!#(B
  664.41 +$B$7$+$7!"0lC6JQ99$N?t$,A}$(;O$a$k$H!"(B
  664.42 +$BC10l$N%Q%C%A$N4IM}$O4XO"@-$NL5$$(B``$B@.2L$N2t(B''$B$K46$8;O$a$k$?$a!"(B
  664.43 +$BNc$($P!"C10l$N%Q%C%A$OC10l$N%P%0=$@5$N$_$r4^$`(B
  664.44 +$B!J%Q%C%A$OJ#?t$N%U%!%$%k$r=$@5$9$k$+$b$7$l$^$;$s$,!"(B
  664.45 +``$BC10l$N;v(B''$B$7$+9T$o$J$$!K$h$&$K$J$k$G$7$g$&$+$i!"(B
  664.46 +$B0[$J$k%P%0$d%m!<%+%k$J=$@5$KI,MW$H$5$l$k%Q%C%A$r!"(B
  664.47 +$B$$$/$D$bJz$($k$3$H$K$J$k$+$b$7$l$^$;$s!#(B
  664.48 +  $B$3$N$h$&$J>u67$G!"(B
  664.49 +$B>eN.$N%Q%C%1!<%8J]<iC4Ev<T$K%P%0=$@5$N%Q%C%A$rAw$C$?$H$9$k$H!"(B
  664.50 +$BH`$i$O$=$N8e$N%j%j!<%9$K$*$$$F$=$N=$@5$r<h$j9~$`$G$7$g$&$+$i!"(B
  664.51 +$B?7$7$$HG$X$N99?7$N:]$K$O!"(B
  664.52 +$B$=$N%Q%C%A$NE,MQ$r<h$j$d$a$k$3$H$,$G$-$^$9!#(B
  664.53 +
  664.54 +$B>eN.$N%=!<%9%D%j!<$KBP$7$FC10l$N%Q%C%A$rJ]<i$9$k$3$H$O!"(B
  664.55 +$BB`6~$G4V0c$$$d$9$$$G$9$,Fq$7$/$O$"$j$^$;$s!#(B
  664.56 +  $B$7$+$7!"J]<i$7$J$1$l$P$J$i$J$$%Q%C%A$N?t$,A}$($k$K$7$?$,$$!"(B
  664.57 +$BLdBj$NJ#;($5$O$9$_$d$+$KA}2C$7$^$9!#(B
  664.58 +  $B$9$/$J$+$i$L%Q%C%A$rJz$(9~$`$3$H$G!"(B
  664.59 +$BE,MQ$NM-L5$rGD0.$7$?$j!"$=$l$i$rJ]<i$9$k$3$H$,!"(B
  664.60 +$B!VLLE]$J$3$H!W$+$i!V05E]$5$l$k$3$H!W$X$HJQ2=$9$k$G$7$g$&!#(B
  664.61 +
  664.62 +$B9,$$$J$3$H$K!"(BMercurial $B$O(B
  664.63 +Mercurial Queues
  664.64 +$B!J$"$k$$$OC1$K(B ``MQ''$B!K$H8F$P$l$k!"(B
  664.65 +$B%Q%C%A4IM}LdBj$r4JAG2=$9$k6/NO$J3HD%5!G=$r;}$C$F$$$^$9!#(B
  664.66 +
  664.67 +\section{Mercurial Queues $B0JA0(B}
  664.68 +\label{sec:mq:history}
  664.69 +
  664.70 +1990 $BG/Be8eH>!"2??M$+$N(B Linux $B%+!<%M%k3+H/<TC#$O!"(B
  664.71 +Linux $B%+!<%M%k$N5sF0$rJQ$($k(B``$B%Q%C%A7ONs(B''$B$NJ]<i$r;O$a$F$$$^$7$?!#(B
  664.72 +$B4v$D$+$N7ONs$O0BDj@-$K!"4v$D$+$OLVMe@-$K!"(B
  664.73 +$B$=$NB>$N7ONs$O$h$j<B83E*$JItJ,$K>GE@$rEv$F$F$$$^$7$?!#(B
  664.74 +
  664.75 +$B$3$l$i$N%Q%C%A$N%5%$%:$OB.$d$+$K5pBg2=$7$^$7$?!#(B
  664.76 +2002 $BG/!"(BAndrew Morton $B$,!"(B
  664.77 +$B<+J,$N%Q%C%A%-%e!<4IM}:n6H$r<+F02=$9$k$N$KMQ$$$F$$$?!"(B
  664.78 +$B4v$D$+$N%7%'%k%9%/%j%W%H$rH/I=$7$^$7$?!#(B
  664.79 +Andrew $B$O!"(B
  664.80 +Linux $B%+!<%M%k%=!<%9>e$G$N?tI4!J;~$K$O?t@i!K$N%Q%C%A$N4IM}$K!"(B
  664.81 +$B$3$l$i$N%9%/%j%W%H$r>e<j$KMxMQ$7$F$$$^$7$?!#(B
  664.82 +
  664.83 +\subsection{A patchwork quilt$B!JLuCm!'7Q$.$O$.$N>e3]$1!K(B}
  664.84 +\label{sec:mq:quilt}
  664.85 +
  664.86 +2003 $BG/$N=iF,!"(B
  664.87 +Andreas Gruenbacher $B$H(B Martin Quinson $B$O!"(B
  664.88 +Andrew $B$K$h$k%9%/%j%W%H$N<jK!$r<h$jF~$l$F!"(B
  664.89 +
  664.90 +``patchwork quilt''~\cite{web:quilt} $B$"$k$$$OC1$K(B ``quilt''
  664.91 +($B$3$l$K$D$$$F=R$Y$?O@J8$O(B~\cite{gruenbacher:2005}$B$r;2>H$N$3$H(B)
  664.92 +$B$H8F$P$l$k%D!<%k$rH/I=$7$^$7$?!#(B
  664.93 +  $B%Q%C%A4IM}$,BgI}$K<+F02=$5$l$k$3$H$+$i!"(B
  664.94 +quilt $B$O%*!<%W%s%=!<%93+H/<T$N4V$G=V$/4V$KBg$-$J;Y;}$rF@$^$7$?!#(B
  664.95 +
  664.96 +quilt $B$O!"(B
  664.97 +$B:G>e0L$N%G%#%l%/%H%j$K$*$$$F(B\emph{$B%Q%C%A$N%9%?%C%/(B}$B$r4IM}$7$^$9!#(B
  664.98 +$B4IM}3+;O$N:]$K$O!"(B
  664.99 +quilt $B$KBP$7$F%G%#%l%/%H%j%D%j!<$r4IM}$9$k;]$H!"(B
 664.100 +$B$I$N%U%!%$%k$r4IM}$7$?$$$N$+$rEA$($^$9!#(B
 664.101 +quilt $B$O$3$l$i$N%U%!%$%k$NL>A0$HFbMF$rJL$J>l=j$KJ]B8$7$^$9!#(B
 664.102 +  $B%P%0$N=$@5$N:]$K$O!"(B
 664.103 +$B?7$7$$%Q%C%A$r!JC10l$N%3%^%s%I$r;HMQ$7$F!K:n@.$7!"(B
 664.104 +$B=$@5$9$kI,MW$NM-$k%U%!%$%k$NJT=8$r9T$$!"(B
 664.105 +$B%Q%C%A$r(B``refresh''$B$7$^$9!#(B
 664.106 +
 664.107 +refresh $B$NCJ3,$G(B quilt $B$O%G%#%l%/%H%j%D%j!<$rAv::$7$^$9!#(B
 664.108 +quilt $B$O<B;\$5$l$?A4$F$NJQ99$G%Q%C%A$r99?7$7$^$9!#(B
 664.109 +$B:G>e0L$N%G%#%l%/%H%j$K$*$$$F:n@.$7$?JL$J%Q%C%A$rMQ$$$k$3$H$G!"(B
 664.110 +``$B#1$D$N%Q%C%A$,E,MQ$5$l$?%D%j!<(B''$B$+$i(B
 664.111 +``$B#2$D$N%Q%C%A$,E,MQ$5$l$?%D%j!<(B''$B$X$HJQ2=$5$;$k$?$a$KI,MW$JJQ99$r!"(B
 664.112 +$BDI@W$9$k$3$H$,$G$-$^$9!#(B
 664.113 +
 664.114 +$B%D%j!<$KBP$9$k%Q%C%A$NE,MQ>u67$r(B\emph{$BJQ99(B}$B$9$k$3$H$b$G$-$^$9!#(B
 664.115 +$B%Q%C%A$r(B``pop''$B$9$k$H!"(B
 664.116 +$B$=$N%Q%C%A$K$h$kJQ99$O%G%#%l%/%H%j%D%j!<$+$i<h$j=|$+$l$^$9!#(B
 664.117 +$B$7$+$7!"(B
 664.118 +quilt $B$O$I$N%Q%C%A$,<h$j=|$+$l$?$N$+$r3P$($F$$$k$N$G!"(B
 664.119 +$B<h$j=|$+$l$?%Q%C%A$r:F$S(B``push''$B$9$k$3$H$,$G$-!"(B
 664.120 +$B%G%#%l%/%H%j%D%j!<$K$OEv3:%Q%C%A$K$h$kJQ99$,I|85$5$l$^$9!#(B
 664.121 +$B:G$b=EMW$JE@$O!"(B
 664.122 +``refresh''$B%3%^%s%I$N<B9T$H!"(B
 664.123 +$B$=$l$K$h$k:G>e0L$N%Q%C%A$NFbMF99?7$,G$0U$N;~E@$K$G$-$k$3$H$G$9!#(B
 664.124 +$B$3$l$O!"(B
 664.125 +$B%Q%C%A$NE,MQ>u67$H!"$=$N%Q%C%A$K$h$kJQ99FbMF$NN>J}$r!"(B
 664.126 +$BG$0U$N;~E@$GJQ99$G$-$k$3$H$r0UL#$7$^$9!#(B
 664.127 +
 664.128 +quilt $B$OJQ99@)8f%D!<%k$r0U<1$7$J$$$?$a!"(B
 664.129 +$BE83+$5$l$?(B tarball $B$N:G>e0L%G%#%l%/%H%j$K$*$$$F$b!"(B
 664.130 +Subversion $B%j%]%8%H%j$K$*$$$F$bF1Ey$K5!G=$7$^$9!#(B
 664.131 +
 664.132 +\subsection{patchwork quilt $B$+$i(B Mercurial Queues $B$X(B}
 664.133 +\label{sec:mq:quilt-mq}
 664.134 +
 664.135 +2005 $BG/Cf=\!"(B
 664.136 +quilt $BE*$J?6$kIq$$$r(B Mercurial $B$KDI2C$9$k$?$a$N!"(B
 664.137 +Mercurial Queues $B$H8F$P$l$k3HD%5!G=$,!"(B
 664.138 +Chris Mason $B$K$h$j<BAu$5$l$^$7$?!#(B
 664.139 +
 664.140 +quilt $B$H(B MQ $B$NBg$-$J0c$$$O!"(B
 664.141 +quilt $B$,JQ99@)8f%7%9%F%`$r0U<1$7$J$$$N$KBP$7$F!"(B
 664.142 +MQ $B$,(B Mercurial $B$K(B\emph{$BE}9g(B}$B$5$l$F$$$k$3$H$G$9!#(B
 664.143 +  push $B$5$l$k8D!9$N%Q%C%A$O!"(B
 664.144 +Mercurial $B$N%A%'%s%8%;%C%H$H$7$FI=8=$5$l$^$9!#(B
 664.145 +  $B%Q%C%A$r(B pop $B$9$k$3$H$G!"%A%'%s%8%;%C%H$O<h$j=|$+$l$^$9!#(B
 664.146 +
 664.147 +$BJQ99@)8f%7%9%F%`$r0U<1$7$J$$$3$H$+$i!"(B
 664.148 +Mercurial $B$H(B MQ $B$rMxMQ$G$-$J$$>u67$K$D$$$FCN$k>e$G!"(B
 664.149 +$B0MA3$H$7$F(B quilt $B$OHs>o$KM-MQ$J%=%U%H%&%'%"$G$9!#(B
 664.150 +
 664.151 +\section{MQ $B$NBg$-$JMxE@(B}
 664.152 +
 664.153 +$B%Q%C%A$HJQ994IM}$NE}0l$rDL$7$F(B MQ $B$,Ds6!$9$k$b$N$N2ACM$r!"(B
 664.154 +$B8XD%$72a$.$k$3$H$O$"$j$^$;$s!#(B
 664.155 +
 664.156 +$B%U%j!<%=%U%H%&%'%"$*$h$S%*!<%W%s%=!<%9$N@$3&$G%Q%C%A$,MxMQ$5$lB3$1$k$N$O!"(B
 664.157 +$BJQ994IM}%D!<%k$,G/!9$=$N5!G=$r8~>e$5$;$F$$$k$K$b4X$o$i$:!"(B
 664.158 +$B%Q%C%A$,(B\emph{$B7Z2w$5(B}$B$r;}$C$F$$$k$3$H$,Bg$-$JM}M3$N0l$D$G$9!#(B
 664.159 +
 664.160 +$BEAE}E*$JJQ99@)8f%D!<%k$O!"(B
 664.161 +$B<B;\$7$?$3$H$K4X$9$kA4$F$r!"(B
 664.162 +$B1JB3E*$G<h$j>C$7$N=PMh$J$$$b$N$H$7$F5-O?$7$^$9!#(B
 664.163 +$B$3$N?6$kIq$$$KBg$-$J2ACM$,$"$k0lJ}$G!"(B
 664.164 +$B4vJ,7x6l$7$/$b$"$j$^$9!#(B
 664.165 +$B2a7c$J<B83$r9T$*$&$H$9$k>l9g!"(B
 664.166 +$B<+J,$,9T$*$&$H$9$k$3$H$K?5=E$K$J$k$+!"(B
 664.167 +$BI,MW$H$5$l$J$$!A$J$*0-$$$3$H$K$O!"8m2r$dIT0BDj$N85$H$J$k!A(B
 664.168 +$B<:GT$H4V0c$$$N5-O?$r!"(B
 664.169 +$B1JB3E*$JMzNr5-O?Cf$K;D$94m81$rKA$9I,MW$,$"$j$^$9!#(B
 664.170 +
 664.171 +$BBP>HE*$K!"(B
 664.172 +MQ $B$K$*$1$kJ,;6MzNr4IM}$H%Q%C%A$N7k9g$K$h$j!"(B
 664.173 +$B$"$J$?$N:n6H$rMF0W$K3VN%$9$k$3$H$,$G$-$^$9!#(B
 664.174 +$B$"$J$?$N%Q%C%A$ODL>o$NJQ99MzNr$N>e$GB8B3$7B3$1!"(B
 664.175 +$BK>$`;~$K$=$l$i$N<B;\!?<h$j>C$7$r9T$&$3$H$,=PMh$^$9!#(B
 664.176 +$B$=$N%Q%C%A$,5$$KF~$i$J$$>l9g!"$=$l$r<h$j$d$a$k$3$H$,$G$-$^$9!#(B
 664.177 +$B$=$N%Q%C%A$,40A4$K$OK>$`$b$N$G$J$$>l9g!"(B
 664.178 +$BK>$`;Q$K@vN}$5$;$k$^$G!"I,MW$J$@$12?EY$G$b=$@5$9$k$3$H$,=PMh$^$9!#(B
 664.179 +
 664.180 +$BNc$($P!"(B
 664.181 +$B%Q%C%A$HJQ994IM}$NE}9g$K$h$j!"(B
 664.182 +$B%Q%C%A$NM}2r$H$=$N8z2L!A$*$h$S85$K$J$C$?%3!<%I$H$NO"7H!A$N%G%P%C%0$,!"(B
 664.183 +\emph{$BHs>o$K(B}$B4JC1$K$J$j$^$9!#(B
 664.184 +$BA4$F$NE,MQ:Q$_%Q%C%A$,4XO"$7$?%A%'%s%8%;%C%H$r;}$C$F$$$k$N$G!"(B
 664.185 +$B$I$N%A%'%s%8%;%C%H$H%Q%C%A$,$=$N%U%!%$%k$K1F6A$r5Z$\$7$F$$$k$N$+$r!"(B
 664.186 +\hgcmdargs{log}{\emph{filename}} $B$K$h$C$F8+$k$3$H$,=PMh$^$9!#(B
 664.187 +\hgext{bisect} $B3HD%$rMQ$$$k$3$H$G!"(B
 664.188 +$B%P%0$,;}$A9~$^$l$?$j=$@5$5$l$?;~E@$r8+$k$?$a$K!"(B
 664.189 +$BA4$F$N%A%'%s%8%;%C%H$HE,MQ:Q$_%Q%C%A$rDL$7$F$NFsJ,C5:w$r9T$&$3$H$,$G$-$^$9!#(B
 664.190 +\hgcmd{annotate} $B%3%^%s%I$rMQ$$$k$3$H$G!"(B
 664.191 +$B%=!<%9%U%!%$%k$NFCDj$N9T$rJQ99$7$?$N$,!"(B
 664.192 +$B$I$N%A%'%s%8%;%C%H$d%Q%C%A$G$"$k$+$r8+$k$3$H$,=PMh$^$9!#(B
 664.193 +
 664.194 +\section{$B%Q%C%A$NM}2r(B}
 664.195 +\label{sec:mq:patch}
 664.196 +
 664.197 +MQ $B$O!"$=$l$,%Q%C%A;X8~$NFC@-$r;}$D$3$H$rI=$K=P$7$F$$$k$?$a!"(B
 664.198 +$B%Q%C%A$,$I$&$$$C$?$b$N$G$"$k$+$d!"(B
 664.199 +$B%Q%C%A$H$H$b$K5!G=$9$k%D!<%k$K4X$9$k$3$H$,$i$rM}2r$9$k<j=u$1$K$J$j$^$9!#(B
 664.200 +
 664.201 +$BEAE}E*$J(B Unix $B$N(B \command{diff} $B%3%^%s%I$O!"(B
 664.202 +$B#2$D$N%U%!%$%k$rHf3S$7N><T$N0c$$$rI=<($7$^$9!#(B
 664.203 +\command{patch} $B%3%^%s%I$O!"(B
 664.204 +$B$3$N0c$$$r%U%!%$%k$KBP$9$k(B\emph{$BJQ99(B}$B$H$_$J$7$^$9!#(B
 664.205 +$B$3$l$i$N%3%^%s%I$N4JC1$JF0:nNc$H$7$F!"(B
 664.206 +$B?^(B~\ref{ex:mq:diff}$B$r8+$F$/$@$5$$!#(B
 664.207 +
 664.208 +\begin{figure}[ht]
 664.209 +  \interaction{mq.dodiff.diff}
 664.210 +  \label{ex:mq:diff}
 664.211 +  \caption{\command{diff} $B$*$h$S(B \command{patch} $B%3%^%s%I$NMxMQNc(B}
 664.212 +\end{figure}
 664.213 +
 664.214 +\command{diff} $B$,@8@.$9$k!J$=$7$F!"(B\command{patch} $B$,F~NO$9$k!K(B
 664.215 +$B%U%!%$%k$N7A<0$O(B``$B%Q%C%A!J(Bpatch$B!K(B''$B$J$$$7(B``$B:9J,!J(Bdiff$B!K(B''$B$H8F$P$l$^$9!#(B
 664.216 +$B%Q%C%A$H:9J,$N4V$K0c$$$O$"$j$^$;$s(B
 664.217 +$B!J0J8e$O!"$h$j0lHLE*$K;HMQ$5$l$k(B``$B%Q%C%A(B''$B$H$$$&8F>N$r;HMQ$7$^$9!K!#(B
 664.218 +
 664.219 +$B%Q%C%A%U%!%$%k$O!"G$0U$N%F%-%9%H$+$i;O$a$k$3$H$,$G$-$^$9!#(B
 664.220 +\command{patch} $B%3%^%s%I$O$3$N%F%-%9%H$rL5;k$7$^$9$,!"(B
 664.221 +MQ $B$O%A%'%s%8%;%C%H$r@8@.$9$k:]$N%3%_%C%H%a%C%;!<%8$H$_$J$7$^$9!#(B
 664.222 +$B%Q%C%AFbMF$r3+;O$r8+$D$1$k$?$a$K!"(B
 664.223 +\command{patch} $B$O(B ``\texttt{diff~-}'' $B$G;O$^$k:G=i$N9T$rC5$7$^$9!#(B
 664.224 +
 664.225 +MQ $B$O(B \emph{unified} $B:9J,$H6&$K5!G=$7$^$9(B
 664.226 +$B!J(B\command{patch} $B$O$=$l0J30$N2?<oN`$+$N:9J,7A<0$G$b5!G=$7$^$9$,!"(B
 664.227 +MQ $B$O(B \emph{unified} $B:9J,$G$J$$$H5!G=$7$^$;$s!K!#(B
 664.228 +unified $B:9J,$O#2<oN`$N%X%C%@$r;}$C$F$$$^$9!#(B
 664.229 +\emph{$B%U%!%$%k%X%C%@(B header}$B$K$O!"(B
 664.230 +$BJQ99BP>]$H$J$k%U%!%$%k$N%U%!%$%kL>$,5-=R$5$l!"(B
 664.231 +\command{patch} $B%3%^%s%I$,?75,$N%U%!%$%k%X%C%@$r8+$D$1$?:]$K$O!"(B
 664.232 +$BJQ99$r9T$&$?$a$KEv3:$9$kL>A0$N%U%!%$%k$rC5$7$^$9!#(B
 664.233 +
 664.234 +$B%U%!%$%k%X%C%@$KB3$$$F!"(B\emph{hunk} $BNs$,5-=R$5$l$^$9!#(B
 664.235 +$B$=$l$>$l$N(B hunk $B$O%X%C%@$G3+;O$5$l!"(B
 664.236 +$B$=$N(B hunk $B$K$h$jJQ99$5$l$kBP>]$N!"(B
 664.237 +$B%U%!%$%k$K$*$1$k9THV9f$NHO0O$r<1JL$7$^$9!#(B
 664.238 +$B%X%C%@$KB3$/(B hunk $B$O!"(B
 664.239 +$B%U%!%$%k$N2~JQ$5$l$J$$ItJ,$+$i$J$k?t9T$N%F%-%9%H$,A08e$KIU2C$5$l$^$9!#(B
 664.240 +$B$3$l$i$N2~JQ$5$l$J$$ItJ,$N$3$H$r!"(Bhunk $B$KBP$9$k(B\emph{$B%3%s%F%-%9%H(B}$B$H8F$S$^$9!#(B
 664.241 +$B8eB3$N(B hunk $B$H$N4V$K>/NL$N%3%s%F%-%9%H$7$+$J$$>l9g!"(B
 664.242 +\command{diff} $B$O?7$?$J(B hunk $B%X%C%@$rI=<($7$^$;$s!#(B
 664.243 +$BJQ99FbMF$N4V$K?t9T$N%3%s%F%-%9%H9T$rCV$$$F!"(B
 664.244 +hunk $B$r$=$N$^$^B3$1$^$9!#(B
 664.245 +
 664.246 +$B%3%s%F%-%9%H$N8D!9$N9T$O6uGrJ8;z$G;O$^$j$^$9!#(B
 664.247 +hunk $BFbIt$G$O!"(B
 664.248 +``\texttt{-}'' $B$G;O$^$k9T$O(B``$B:o=|$5$l$k9T(B''$B$r!"(B
 664.249 +``\texttt{+}'' $B$G;O$^$k9T$O(B``$BA^F~$5$l$k9T(B''$B$r0UL#$7$^$9!#(B
 664.250 +$BNc$($P!"JQ99$5$l$k9T$O!"#19T$N:o=|$H#19T$NA^F~$GI=8=$5$l$^$9!#(B
 664.251 +
 664.252 +$B%Q%C%A$N$h$jHyL/$JB&LL$K4X$7$F$O8e$[$I!J(B~\ref{sec:mq:adv-patch}$B@a$K$F!K(B
 664.253 +$B@bL@$7$^$9$,!"(BMQ $B$rMxMQ$9$k$KEv$?$C$F$O$3$3$^$G$NCN<1$G==J,$G$9!#(B
 664.254 +
 664.255 +\section{Mercurial Queues $B$NMxMQ(B}
 664.256 +\label{sec:mq:start}
 664.257 +
 664.258 +MQ $B$O(B Mercurial $B$N3HD%$H$7$F<BAu$5$l$F$$$k$N$G!"(B
 664.259 +$BMxMQ$NA0$KL@<(E*$KM-8z2=$9$kI,MW$,$"$j$^$9(B
 664.260 +$B!J%@%&%s%m!<%I$NI,MW$O$"$j$^$;$s!#(B
 664.261 +MQ $B$ODL>o$N(B Mercurial $B$NG[I[J*$K4^$^$l$F$$$^$9!K!#(B
 664.262 +MQ $B$rM-8z$K$9$k$K$O!"(B
 664.263 +\tildefile{.hgrc} $B%U%!%$%k$rJT=8$7!"(B
 664.264 +~\ref{ex:mq:config} $B$K<($99T$rDI2C$7$F$/$@$5$$!#(B
 664.265 +
 664.266 +\begin{figure}[ht]
 664.267 +  \begin{codesample4}
 664.268 +    [extensions]
 664.269 +    hgext.mq =
 664.270 +  \end{codesample4}
 664.271 +  \label{ex:mq:config}
 664.272 +  \caption{MQ $B3HD%M-8z2=$N$?$a$K(B \tildefile{.hgrc} $B$KDI2C$9$kFbMF(B}
 664.273 +\end{figure}
 664.274 +
 664.275 +$B3HD%$,M-8z2=$5$l$k$H!"(B
 664.276 +$B$$$/$D$+$N?7$7$$%3%^%s%I$,M-8z2=$5$l$^$9!#(B
 664.277 +\hgcmd{help} $B$r;H$C$F(B \hgxcmd{mq}{qinit} $B%3%^%s%I$NMxMQ2DH]$r8+$k$3$H$G!"(B
 664.278 +$B3HD%$,5!G=$9$k$3$H$r3NG'$G$-$^$9!#(B
 664.279 +~\ref{ex:mq:enabled} $B$NNc$r;2>H$7$F$/$@$5$$!#(B
 664.280 +
 664.281 +\begin{figure}[ht]
 664.282 +  \interaction{mq.qinit-help.help}
 664.283 +  \caption{MQ $BMxMQ2DH]$N3NG'(B}
 664.284 +  \label{ex:mq:enabled}
 664.285 +\end{figure}
 664.286 +
 664.287 +MQ $B$O(B\emph{$BA4$F$N(B} Mercurial $B%j%]%8%H%j$GMxMQ$G$-!"(B
 664.288 +$B%3%^%s%I$O$=$N%j%]%8%H%j$K$7$+:nMQ$7$^$;$s!#(B
 664.289 +$BMxMQ3+;O$N:]$K$O!"(B
 664.290 +\hgxcmd{mq}{qinit} $B%3%^%s%I$K$h$j%j%]%8%H%j$N=`Hw$r9T$$$^$9(B
 664.291 +$B!J(B~\ref{ex:mq:qinit} $B;2>H!K!#(B
 664.292 +$B$3$N%3%^%s%I$O!"(B\sdirname{.hg/patches} $B$H8F$P$l$k6u$N%G%#%l%/%H%j$r:n@.$7!"(B
 664.293 +MQ $B$O$3$N%G%#%l%/%H%j$K%a%?%G!<%?$r3JG<$7$^$9!#(B
 664.294 +$BB?$/$N(B Mercurial $B%3%^%s%I$HF1MM!"(B
 664.295 +\hgxcmd{mq}{qinit} $B%3%^%s%I$O<B9T$,@5>o$K=*N;$7$?>l9g$K$O!"(B
 664.296 +$BFC$K2?$bI=<($7$^$;$s!#(B
 664.297 +
 664.298 +\begin{figure}[ht]
 664.299 +  \interaction{mq.tutorial.qinit}
 664.300 +  \caption{MQ $BMxMQ$K8~$1$?%j%]%8%H%j$N=`Hw(B}
 664.301 +  \label{ex:mq:qinit}
 664.302 +\end{figure}
 664.303 +
 664.304 +\begin{figure}[ht]
 664.305 +  \interaction{mq.tutorial.qnew}
 664.306 +  \caption{$B?7$7$$%Q%C%A$N:n@.(B}
 664.307 +  \label{ex:mq:qnew}
 664.308 +\end{figure}
 664.309 +
 664.310 +\subsection{$B?7$7$$%Q%C%A$N:n@.(B}
 664.311 +
 664.312 +$B?7$7$$%Q%C%A$G:n6H$r3+;O$9$k$K$O!"(B
 664.313 +\hgxcmd{mq}{qnew} $B%3%^%s%I$r;H$$$^$9!#(B
 664.314 +$B$3$N%3%^%s%I$O:n@.$9$k%Q%C%A$NL>A0$r0z?t$K<h$j$^$9!#(B
 664.315 +$BNc(B~\ref{ex:mq:qnew}$B$K<($9$h$&$K!"(B
 664.316 +MQ $B$O$3$l$r(B \sdirname{.hg/patches} 
 664.317 +$B%G%#%l%/%H%jCf$N<B%U%!%$%k$NL>A0$H$_$J$7$^$9!#(B
 664.318 +
 664.319 +\sdirname{.hg/patches} $B%G%#%l%/%H%jG[2<$K$O$=$l0J30$K$b!"(B
 664.320 +\sfilename{series} $B$H(B \sfilename{status} 
 664.321 +$B$H$$$&#2$D$N?7$7$$%U%!%$%k$,:n@.$5$l$^$9!#(B
 664.322 +\sfilename{series} $B$O!"(B
 664.323 +$B$=$N%j%]%8%H%j$K$*$$$F(B MQ $B$,4IM}$9$kA4$F$N%Q%C%A$N0lMw$r!"(B
 664.324 +$B#19T#1%Q%C%A$GJ];}$7$F$$$^$9!#(B
 664.325 +\sfilename{status} $B$O(B
 664.326 +$B$=$N%j%]%8%H%j$K$*$$$F(B MQ $B$,(B\emph{$BE,MQ(B}$B$7$?A4$F$N%Q%C%A$rDI@W$9$k$?$a$N!"(B
 664.327 +$BFbItD"JmE*$JMQES$K;HMQ$5$l$^$9!#(B
 664.328 +
 664.329 +\begin{note}
 664.330 +  $BNc$($P!"%Q%C%A$NE,MQ=g=x$rJQ99$7$?$$$h$&$J>l9g!"(B
 664.331 +  \sfilename{series} $B$r<jF0$GJQ99$7$?$$>l9g$,$"$k$+$b$7$l$^$;$s!#(B
 664.332 +  $B$7$+$7!"(BMQ $B$NG'<1>u67$rMF0W$KB;$J$&$3$H$+$i!"(B
 664.333 +  $B<jF0$G$N(B \sfilename{status} $BJT=8$OKX$IA4$F$N>l9g$K$*$$$FITE,@Z$G$9!#(B
 664.334 +\end{note}
 664.335 +
 664.336 +$B?7$7$$%Q%C%A$r:n@.$7$?$J$i$P!"(B
 664.337 +$BIaCJ$HF1$8$h$&$K:n6HNN0h%G%#%l%/%H%j$N%U%!%$%k$rJT=8$G$-$^$9!#(B
 664.338 +\hgcmd{diff} $B$d(B \hgcmd{annotate} $B$H$$$C$?!"(B
 664.339 +Mercurial $B$NA4$F$NDL>o%3%^%s%I$O$=$l0JA0$HA4$/F1MM$K5!G=$7$^$9!#(B
 664.340 +
 664.341 +\subsection{$B%Q%C%A$N(B refresh}
 664.342 +
 664.343 +$B:n6HFbMF$rJ]B8$9$kCJ3,$K$J$C$?$J$i!"(B
 664.344 +$B:n6HCf$N%Q%C%A$r99?7$9$k$?$a$K(B \hgxcmd{mq}{qrefresh} $B$r;HMQ$7$^$9(B
 664.345 +$B!J?^(B~\ref{ex:mq:qnew}$B;2>H!K!#(B
 664.346 +$B$3$N%3%^%s%I$O!"(B
 664.347 +$B:n6HNN0h%G%#%l%/%H%j$G$NJQ99FbMF$r%Q%C%A$X$H3JG<$7!"(B
 664.348 +$BBP1~$9$k%A%'%s%8%;%C%H$r!"$=$l$i$NJQ99FbMF$rJ];}$9$k$h$&$K99?7$7$^$9!#(B
 664.349 +
 664.350 +\begin{figure}[ht]
 664.351 +  \interaction{mq.tutorial.qrefresh}
 664.352 +  \caption{$B%Q%C%A$N(B refresh}
 664.353 +  \label{ex:mq:qrefresh}
 664.354 +\end{figure}
 664.355 +
 664.356 +\hgxcmd{mq}{qrefresh} $B%3%^%s%I$O$$$D$G$b2?EY$G$b<B9T$G$-$k$N$G!"(B
 664.357 +$B:n6H$N(B``$B%A%'%C%/%]%$%s%H(B''$B$H$7$FMxMQ$9$k$N$bNI$$$G$7$g$&!#(B
 664.358 +$BET9g$NNI$$;~$K%Q%C%A$N(B refresh $B$r<B;\$9$k$3$H$G!"(B
 664.359 +$B<B83E*$J:n6H$r9T$C$F$_$F!"$=$l$,$&$^$/5!G=$7$J$$>l9g$K$O!"(B
 664.360 +$BD>6a$N(B refresh $B;~E@$^$G$NJQ99$r!"(B
 664.361 +\hgcmd{revert} $B%3%^%s%I$K$h$j<h$j>C$9$3$H$,$G$-$^$9!#(B
 664.362 +
 664.363 +\begin{figure}[ht]
 664.364 +  \interaction{mq.tutorial.qrefresh2}
 664.365 +  \caption{$BJ#?t2s$N%Q%C%A(B refresh $B$K$h$kJQ99$NC_@Q(B}
 664.366 +  \label{ex:mq:qrefresh2}
 664.367 +\end{figure}
 664.368 +
 664.369 +\subsection{$B%Q%C%A$N@Q$_=E$M$HDI@W(B}
 664.370 +
 664.371 +$B%Q%C%A$KBP$9$k:n6H$r=*$($k$+!"(B
 664.372 +$BB>$N%Q%C%A$KBP$9$k:n6H$,I,MW$K$J$C$?$J$i!"(B
 664.373 +$B:FEY(B \hgxcmd{mq}{qnew} $B%3%^%s%I$r<B9T$9$k$3$H$G!"(B
 664.374 +$B?7$7$$%Q%C%A$r:n@.$7$^$9!#(B
 664.375 +Mercurial $B$O!"?75,$K:n@.$7$?$3$N%Q%C%A$r!"(B
 664.376 +$B4{B8$N%Q%C%A$N:G>e0L$KE,MQ$7$^$9!#(B
 664.377 +$B?^(B~\ref{ex:mq:qnew2}$B$r;2>H$7$F$/$@$5$$!#(B
 664.378 +$B@h$K:n6H$7$F$$$?%Q%C%A$K4^$^$l$kJQ99$O!"(B
 664.379 +$B$3$N?7$7$$%Q%C%A$NJ8L.$N0lIt$H$7$F4^$^$l$^$9(B
 664.380 +$B!J(B\hgcmd{annotate} $B=PNO$r8+$l$P!"$3$N$3$H$OL@$i$+$G$9!K!#(B
 664.381 +
 664.382 +\begin{figure}[ht]
 664.383 +  \interaction{mq.tutorial.qnew2}
 664.384 +  \caption{$B#1$DL\$N>e$K@Q$_=E$M$i$l$k#2$DL\$N%Q%C%A(B}
 664.385 +  \label{ex:mq:qnew2}
 664.386 +\end{figure}
 664.387 +
 664.388 +$B$3$l$^$G$O!"(B
 664.389 +\hgxcmd{mq}{qnew} $B$H(B \hgxcmd{mq}{qrefresh} $B$r=|$$$F!"(B
 664.390 +Mercurial $B$NDL>o%3%^%s%I$N$_$r;HMQ$9$k$h$&$KCm0U$7$F$-$^$7$?!#(B
 664.391 +$B$7$+$7!"(B
 664.392 +$B?^(B~\ref{ex:mq:qseries} $B$K<($9$h$&$K!"(B
 664.393 +$B%Q%C%A$K4X$9$k:n6H$r9T$&:]$K$h$jJXMx$JB?$/$N%3%^%s%I$r!"(B
 664.394 +MQ $B$ODs6!$7$F$$$^$9!#(B
 664.395 +
 664.396 +\begin{itemize}
 664.397 +\item \hgxcmd{mq}{qseries} $B%3%^%s%I$O(B
 664.398 +  MQ $B$,Ev3:%j%]%8%H%jCf$G4IM}$7$F$$$kA4$F$N%Q%C%A$N0lMw$r!"(B
 664.399 +  $B8E$$$b$N$+$i?7$7$$$b$N!J:G$b:G6a(B\emph{$B:n@.$5$l$?$b$N(B}$B!K(B
 664.400 +  $B$N=g=x$G0lMwI=<($7$^$9!#(B
 664.401 +
 664.402 +\item \hgxcmd{mq}{qapplied} $B%3%^%s%I$O!"(B
 664.403 +  MQ $B$,Ev3:%j%]%8%H%j$G(B\emph{$BE,MQ$7$?(B}$BA4$F$N%Q%C%A$N0lMw$r!"(B
 664.404 +  $B8E$$$b$N$+$i?7$7$$$b$N!J:G$b:G6aE,MQ$5$l$?$b$N!K(B
 664.405 +  $B$N=g=x$G0lMwI=<($7$^$9!#(B
 664.406 +\end{itemize}
 664.407 +
 664.408 +\begin{figure}[ht]
 664.409 +  \interaction{mq.tutorial.qseries}
 664.410 +  \label{ex:mq:qseries}
 664.411 +  \caption{\hgxcmd{mq}{qseries} $B$*$h$S(B 
 664.412 +   \hgxcmd{mq}{qapplied} $B$K$h$k%Q%C%A$N@Q$_=E$M$N=,F@(B}
 664.413 +\end{figure}
 664.414 +
 664.415 +\subsection{$B%Q%C%A$N@Q$_=E$M$NA`:n(B}
 664.416 +
 664.417 +``$B4IM}$5$l$F$$$k(B''$B%Q%C%A$H(B``$BE,MQ$5$l$F$$$k(B''$B$=$l$N4V$K0c$$$,$"$k$3$H$r!"(B
 664.418 +$B@h$N5-=R$G$O0E$K<($7$F$$$^$9$,!"(B
 664.419 +$B<B:]$KN><T$N4V$K$O0c$$$,$"$j$^$9!#(B
 664.420 +MQ $B$OE,MQ$9$k$3$HL5$7$K!"%Q%C%A$r%j%]%8%H%jCf$G4IM}$9$k$3$H$,$G$-$^$9!#(B
 664.421 +
 664.422 +\emph{$BE,MQ$5$l$?(B}$B%Q%C%A$O!"(B
 664.423 +$B%j%]%8%H%jCf$KBP1~$9$k%A%'%s%8%;%C%H$r;}$A!"(B
 664.424 +$B%Q%C%A$H%A%'%s%8%;%C%H$N8z2L$O:n6HNN0h%G%#%l%/%H%j$K$*$$$F8+$k$3$H$,$G$-$^$9!#(B
 664.425 +\hgxcmd{mq}{qpop} $B%3%^%s%I$r;HMQ$7$F!"(B
 664.426 +$B%Q%C%A$NE,MQ$r<h$j>C$9$3$H$b$G$-$^$9!#(B
 664.427 +
 664.428 +MQ $B$O<h$j=|$+$l$?%Q%C%A$r(B\emph{$B4IM}(B}$B$7B3$1$^$9$,!"(B
 664.429 +$B$=$N%Q%C%A$O$b$O$d%j%]%8%H%jCf$KBP1~$9$k%A%'%s%8%;%C%H$r;}$?$:!"(B
 664.430 +$B:n6HNN0h%G%#%l%/%H%j$K$O%Q%C%A$K$h$kJQ99$N:/@W$O;D$5$l$F$$$^$;$s!#(B
 664.431 +$B?^(B~\ref{fig:mq:stack}$B$K!"(B
 664.432 +$BE,MQ$5$l$?%Q%C%A$HDI@W$5$l$F$$$k$=$l$N0c$$$r<($7$^$9!#(B
 664.433 +
 664.434 +\begin{figure}[ht]
 664.435 +  \centering
 664.436 +  \grafix{mq-stack}
 664.437 +  \caption{MQ $B$N%Q%C%A$N@Q$_=E$M$K$*$1$kE,MQ:Q$_%Q%C%A$HL$E,MQ%Q%C%A(B}
 664.438 +  \label{fig:mq:stack}
 664.439 +\end{figure}
 664.440 +
 664.441 +\hgxcmd{mq}{qpush} $B%3%^%s%I$r;HMQ$9$k$3$H$G!"(B
 664.442 +$BL$E,MQ%Q%C%A$N:FE,MQ!"$J$$$7<h$j=|$-$r9T$&$3$H$,$G$-$^$9!#(B
 664.443 +$B$3$NA`:n$K$h$j%Q%C%A$KBP1~$9$k?7$7$$%A%'%s%8%;%C%H$,:n@.$5$l!"(B
 664.444 +$B%Q%C%A$K$h$kJQ99$O:F$S:n6HNN0h%G%#%l%/%H%j$K8=$l$^$9!#(B
 664.445 +$B?^(B~\ref{ex:mq:qpop}$B$K!"(B
 664.446 +\hgxcmd{mq}{qpop} $B$*$h$S(B \hgxcmd{mq}{qpush} $B$N<B;\Nc$r<($7$^$9!#(B
 664.447 +$B?^$N$h$&$K#1$D$J$$$7#2$D$N%Q%C%A$r0lEY<h$j=|$$$F$b!"(B
 664.448 +\hgxcmd{mq}{qseries} $B$N=PNO$OJQ2=$7$^$;$s$,!"(B
 664.449 +$B$=$N0lJ}$G(B \hgxcmd{mq}{qapplied} $B$N=PNO$OJQ2=$7$^$9!#(B
 664.450 +
 664.451 +\begin{figure}[ht]
 664.452 +  \interaction{mq.tutorial.qpop}
 664.453 +  \caption{$BE,MQ%Q%C%A$N@Q$_=E$M$NJQ99(B}
 664.454 +  \label{ex:mq:qpop}
 664.455 +\end{figure}
 664.456 +
 664.457 +\subsection{$BJ#?t%Q%C%A$NE,MQ(B(push)$B$*$h$S<h$j>C$7(B(pop)}
 664.458 +
 664.459 +\hgxcmd{mq}{qpush} $B$*$h$S(B \hgxcmd{mq}{qpop} $B$N$=$l$>$l$,!"(B
 664.460 +$B%G%U%)%k%H$G$O0lEY$K0l$D$N%Q%C%A$KBP$7$F=hM}$r9T$&0lJ}$G!"(B
 664.461 +$B0lEY$KJ#?t$N%Q%C%A$NE,MQ$d<h$j>C$7$r9T$&$3$H$b$G$-$^$9!#(B
 664.462 +\hgxcmd{mq}{qpush} $B$K(B
 664.463 +\hgxopt{mq}{qpush}{-a} $B%*%W%7%g%s$r;XDj$9$k$3$H$K$h$j!"(B
 664.464 +$BA4$F$NL$E,MQ%Q%C%A$NE,MQ$,!"(B
 664.465 +\hgxcmd{mq}{qpop} $B$K(B
 664.466 +\hgxopt{mq}{qpop}{-a} $B%*%W%7%g%s$r;XDj$9$k$3$H$K$h$j!"(B
 664.467 +$BA4$F$NE,MQ:Q$_%Q%C%A$N<h$j>C$7$r9T$&$3$H$,$G$-$^$9!#(B
 664.468 +$B!J$=$l0J30$NJ#?t%Q%C%A$NE,MQ!?<h$j>C$7$NJ}K!$K4X$7$F$O!"(B
 664.469 +~\ref{sec:mq:perf} $B@a$r;2>H$7$F$/$@$5$$!#!K(B
 664.470 +
 664.471 +\begin{figure}[ht]
 664.472 +  \interaction{mq.tutorial.qpush-a}
 664.473 +  \caption{$BA4$F$NL$E,MQ%Q%C%A$NE,MQ(B}
 664.474 +  \label{ex:mq:qpush-a}
 664.475 +\end{figure}
 664.476 +
 664.477 +\subsection{$B0BA43NG'$H$=$NL58z2=(B}
 664.478 +
 664.479 +$B$$$/$D$+$N(B MQ $B%3%^%s%I$O!"(B
 664.480 +$B=hM}$NA0$K:n6HNN0h%G%#%l%/%H%j$N3NG'$r9T$$!"(B
 664.481 +$B2?$i$+$N2~JQ$,8!=P$5$l$?>l9g$K$O=hM}$rCfCG$7$^$9!#(B
 664.482 +$B$3$N3NG'$O!"(B
 664.483 +$B%Q%C%A$K<h$j9~$^$l$F$$$J$$JQ99FbMF$r<:$o$J$$$?$a$K9T$o$l$^$9!#(B
 664.484 +$B?^(B~\ref{ex:mq:add} $B$KNc$r<($7$^$9!#(B
 664.485 +\hgxcmd{mq}{qnew} $B%3%^%s%I$OL$<h$j9~$_$NJQ99(B
 664.486 +$B!J$3$N%1!<%9$G$O(B \filename{file3} $B$N(B \hgcmd{add} $B$K5/0x$9$k$b$N!K$,$"$k>l9g!"(B
 664.487 +$B?7$7$$%Q%C%A$r@8@.$7$^$;$s!#(B
 664.488 +
 664.489 +\begin{figure}[ht]
 664.490 +  \interaction{mq.tutorial.add}
 664.491 +  \caption{$B6/@)E*$J%Q%C%A$N@8@.(B}
 664.492 +  \label{ex:mq:add}
 664.493 +\end{figure}
 664.494 +
 664.495 +$B:n6HNN0h%G%#%l%/%H%j$r3NG'$9$k%3%^%s%I$O!"(B
 664.496 +$B$9$Y$F(B``$BN;2r:Q$_(B''$B%*%W%7%g%s$r<h$k$3$H$,$G$-!"(B
 664.497 +$B$=$N%*%W%7%g%s$O>o$K(B \option{-f} $B$HL>$E$1$i$l$F$$$^$9!#(B
 664.498 +\option{-f} $B%*%W%7%g%s$N87L)$J0UL#$O%3%^%s%I$4$H$K0[$J$j$^$9!#(B
 664.499 +$BNc$($P!"(B
 664.500 +\hgcmdargs{qnew}{\hgxopt{mq}{qnew}{-f}} 
 664.501 +$B$O?7$?$K@8@.$5$l$k%Q%C%A$KL$<h$j9~$_$NJQ99$rA4$F<h$j9~$_$^$9$,!"(B
 664.502 +\hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-f}} 
 664.503 +$B$O<h$j>C$5$l$k%Q%C%A$,1F6A$r5Z$\$9%U%!%$%k$KBP$9$kJQ99$r85$KLa$7$^$9(B
 664.504 +\footnote{$BLuCm(B:
 664.505 +$B!V%Q%C%A$N1F6A$r85$KLa$9!W$N$G$O$J$/!"(B
 664.506 +$B!V%Q%C%A$,1F6A$r5Z$\$9%U%!%$%k!W$rA4$F85$KLa$9!"$N0U(B}$B!#(B
 664.507 +$BMxMQ$9$kA0$K3F%3%^%s%I$N(B \option{-f} $B%*%W%7%g%s$N%I%-%e%a%s%H$r3NG'$7$^$7$g$&!*(B
 664.508 +
 664.509 +\subsection{$BJ#?t%Q%C%A$N0l3g=hM}(B}
 664.510 +
 664.511 +\hgxcmd{mq}{qrefresh} $B%3%^%s%I$O!"(B
 664.512 +$B>o$K(B\emph{$B:G>e0L$N(B}$BE,MQ:Q$_%Q%C%A$r99?7$7$^$9!#(B
 664.513 +$B$3$l$O!"$"$k%Q%C%A$KBP$9$kA`:n$r!J(Brefresh $B$9$k$3$H$G!KCfCG$7!"(B
 664.514 +$B<h$j>C$7!J(Bpop$B!K$J$$$7E,MQ!J(Bpush$B!K$K$h$jJL$N%Q%C%A$r:G>e0L$K;}$C$F$/$k$3$H$G!"(B
 664.515 +$B$=$N%Q%C%A$KBP$7$F:n6H$9$k$3$H$,$G$-$k$3$H$r0UL#$7$^$9!#(B
 664.516 +
 664.517 +$B$3$N5!G=$K$h$C$F2DG=$K$J$k$3$H$rNc$K$h$C$F<($7$^$9!#(B
 664.518 +$B#2$D$N%Q%C%A$K$h$C$F?7$7$$5!G=$r3+H/$7$F$$$k$b$N$H$7$^$7$g$&!#(B
 664.519 +$B#1$DL\$N%Q%C%A$O%=%U%H%&%'%"$NCf3K5!G=$NJQ99$r!"(B
 664.520 +$B$=$7$F#2$DL\$N%Q%C%A$O(B --- $B#1$DL\$N%Q%C%A$N>e$G(B ---
 664.521 +$BCf3K5!G=$NJQ99$r;HMQ$9$k$?$a$N%f!<%6!<%$%s%?%U%'!<%9(B(UI)$B$NJQ99$r9T$$$^$9!#(B
 664.522 +UI $B$X$N%Q%C%A$N:n6HCf$K!"(B
 664.523 +$BCf3K5!G=$X$N%Q%C%A$K%P%0$r8+$D$1$?$H$7$F$b!"(B
 664.524 +$B$=$l$r=$@5$9$k$N$O4JC1$J$3$H$G$9!#(B
 664.525 +UI $B$X$N%Q%C%A$KBP$9$k(B \hgxcmd{mq}{qrefresh} $B$K$h$j:n6HCf$NJQ99$rJ]B8$7$?8e$K!"(B
 664.526 +\hgxcmd{mq}{qpop} $B$K$h$jA`:nBP>]%Q%C%A$rCf3K5!G=$X$N$=$l$KJQ99$7$^$9(B
 664.527 +$B!J%Q%C%A%9%?%C%/$r2<$X$H0\F0$7$^$9!K!#(B
 664.528 +$BCf3K5!G=$X$N%Q%C%A$N%P%0$r=$@5$7!"(B
 664.529 +\hgxcmd{mq}{qrefresh} $B$K$h$C$F%Q%C%A$X$NH?1G$r9T$C$?8e$K!"(B
 664.530 +\hgxcmd{mq}{qpush} $B$K$h$jA`:nBP>]%Q%C%A$r(B UI $B$X$N%Q%C%A$KLa$9$3$H$G!"(B
 664.531 +$B$d$j$+$1$N:n6H$r7QB3$9$k$3$H$,$G$-$^$9!#(B
 664.532 +
 664.533 +\section{$B%Q%C%A$K4X$7$F99$K>\$7$/(B}
 664.534 +\label{sec:mq:adv-patch}
 664.535 +
 664.536 +MQ $B$O%Q%C%A$NE,MQ$K(B GNU \command{patch} $B%3%^%s%I$r;HMQ$7$^$9$N$G!"(B
 664.537 +\command{patch} $B%3%^%s%I$NF0:n$H%Q%C%A$=$N$b$N$K4X$7$F!"(B
 664.538 +$B$h$j>\:Y$J>pJs$rCN$k$3$H$OM-MQ$G$9!#(B
 664.539 +
 664.540 +\subsection{$B=|5n?t(B}
 664.541 +
 664.542 +$B%Q%C%A$N%U%!%$%k%X%C%@$r8+$k$H!"(B
 664.543 +$B<B:]$N%Q%9L>$K$O8=$l$J$$M>J,$JMWAG$r@hF,$K;}$C$F$$$k$3$H$K5$$,IU$/$G$7$g$&!#(B
 664.544 +$B$3$l$O0JA0$K%Q%C%A$,@8@.$5$l$F$$$?J}K!$NL>;D$G$9(B
 664.545 +$B!J:#$G$b$3$NJ}K!$rMQ$$$F$$$^$9$,!"(B
 664.546 +$B6aG/$N9=@.4IM}%D!<%k$G$O5)$G$9!K!#(B
 664.547 +
 664.548 +Alice $B$,(B tarball $B$rE83+$7$F%U%!%$%k$rJT=8$7$?8e$G!"(B
 664.549 +$B%Q%C%A$r:n@.$7$h$&$H9M$($?$H$7$^$9!#(B
 664.550 +$B:n6HNN0h%G%#%l%/%H%j$r2~L>$7!"(B
 664.551 +$B:FEY(B tarball $B$rE83+!J$3$NE83+$N$?$a$K2~L>$9$k$3$H$,I,MW$K$J$j$^$9!K$7!"(B
 664.552 +\command{diff} $B%3%^%s%I$K(B
 664.553 +\cmdopt{diff}{-r} $B$*$h$S(B \cmdopt{diff}{-N} $B%*%W%7%g%s$r;XDj$9$k$3$H$G!"(B
 664.554 +$B2~JQA0$N%G%#%l%/%H%j$H2~JQ8e$N%G%#%l%/%H%j$N4V$G:F5"E*$K%Q%C%A$r@8@.$7$^$9!#(B
 664.555 +$B0lJ}$K$O2~JQA0$N%G%#%l%/%H%jL>$,A4$F$N%U%!%$%k$N%Q%9KAF,$KIU2C$5$l!"(B
 664.556 +$BB>J}$K$O2~JQ8e$N%G%#%l%/%H%jL>$,F1MM$KIU2C$5$l$^$9!#(B
 664.557 +
 664.558 +Alices $B$+$i%Q%C%A$r<u$1<h$C$??MJ*$N4D6-$K!"(B
 664.559 +$B2~JQA0$H2~JQ8e%G%#%l%/%H%j$NN>J}$H87L)$K0lCW$9$kL>A0$N%G%#%l%/%H%j$,$"$k!"(B
 664.560 +$B$H$$$&$N$O$"$j$=$&$b$J$$;v$G$9$+$i!"(B
 664.561 +\command{patch} $B%3%^%s%I$O!"(B
 664.562 +$B%Q%C%AE,MQ;~$K%Q%9L>MWAG$N2?HVL\$^$G$r<h$j=|$/$+$r;X$9(B
 664.563 +\cmdopt{patch}{-p} $B%*%W%7%g%s$r;}$C$F$$$^$9!#(B
 664.564 +$B$3$N%*%W%7%g%s$K;XDj$5$l$k?t$r(B\emph{$B=|5n?t(B}$B!J(Bstrip count$B!K$H8F$S$^$9!#(B
 664.565 +
 664.566 +``\texttt{-p1}'' $B%*%W%7%g%s$O!"(B
 664.567 +``$B=|5n?t$r#1$H$_$J$9(B''$B$3$H$r0UL#$7$^$9!#(B
 664.568 +\command{patch} $B%3%^%s%I$,!"(B
 664.569 +$B%U%!%$%k%X%C%@$K$*$$$F%U%!%$%kL>(B \filename{foo/bar/baz} $B$r8!CN$7$?>l9g!"(B
 664.570 +\filename{foo} $BItJ,$r=|5n$7$?(B 
 664.571 +\filename{bar/baz} $B$H$$$&%U%!%$%k$KBP$7$F%Q%C%A$r$"$F$^$9(B
 664.572 +$B!J87L)$J$3$H$r8@$($P!"(B
 664.573 +$B=|5n?t$O=|5n$5$l$k(B\emph{$B%Q%96h@Z$j(B}$B!J$*$h$S$=$l$KIU?o$9$kMWAG!K$N?t$r;X$7$^$9!#(B
 664.574 +$B=|5n?t#1$O!"(B\filename{foo/bar} $B$r(B \filename{bar} $B$K$7$^$9$,!"(B
 664.575 +\filename{/foo/bar}$B!J@hF,$N%9%i%C%7%e$KCm0U!K$O(B 
 664.576 +\filename{foo/bar} $B$K$J$j$^$9!K!#(B
 664.577 +
 664.578 +$B%Q%C%A$K$*$1$k(B``$BI8=`$N(B''$B=|5n?t$O#1$G$9$N$G!"(B
 664.579 +$B$[$H$s$IA4$F$N%Q%C%A$O<h$j=|$+$l$k@hF,MWAG$r#1$D4^$s$G$$$^$9!#(B
 664.580 +Mercurial $B$N(B \hgcmd{diff} $B%3%^%s%I$O$3$N7A<0$G%Q%9L>$r@8@.$7$^$9$N$G!"(B
 664.581 +\hgcmd{import} $B%3%^%s%I$d(B MQ $B$O=|5n?t#1$N%Q%C%A$r4|BT$7$F$$$^$9!#(B
 664.582 +
 664.583 +$B=|5n?t$,#1$G$O$J$$%Q%C%A$r%Q%C%A%-%e!<$KDI2C$7$h$&$H$7$?>l9g!"(B
 664.584 +$B8=;~E@$G(B \texttt{-p} $B%*%W%7%g%s$r;}$C$F$$$J$$(B
 664.585 +\hgxcmd{mq}{qimport} $B!J(B~\bug{311} $B;2>H$N$3$H!K$G$O<h$j9~$`$3$H$,$G$-$^$;$s!#(B
 664.586 +$B$=$N>l9g!"(B
 664.587 +\hgxcmd{mq}{qnew} $B$G?75,%Q%C%A$r(B MQ $B>e$K:n@.$7!"(B
 664.588 +\cmdargs{patch}{-p\emph{N}} $B$K$h$j%Q%C%A$rE,MQ!"(B
 664.589 +\hgcmd{addremove} $B$G%Q%C%A$K$h$jDI2C!?:o=|$5$l$?%U%!%$%k$rFCDj$7!"(B
 664.590 +\hgxcmd{mq}{qrefresh} $B$r9T$&$N$,:GA1$NJ}K!$G$9!#(B
 664.591 +$B$3$N$h$&$JLLE]$J<j=g$O$$$:$lITMW$K$J$k$+$b$7$l$^$;$s!#(B
 664.592 +$B>\:Y$O(B ~\bug{311} $B$r;2>H$7$F$/$@$5$$!#(B
 664.593 +
 664.594 +\subsection{$B%Q%C%AE,MQ<j=g(B}
 664.595 +
 664.596 +\command{patch} $B$,(B hunk $B$rE,MQ$9$k:]$K$O!"(B
 664.597 +it tries a handful of
 664.598 +(successively $B$O$I$3$K3]$+$k!)(B)
 664.599 +successively less accurate strategies to try to make the hunk apply XXXXX
 664.600 +$BMQ?4?<$$$3$NJ}K!$K$h$j!"8E$$HG$N%U%!%$%k$G@8@.$5$l$?%Q%C%A$G$"$C$F$b!"(B
 664.601 +$B?7$7$$HG$N%U%!%$%k$KE,MQ$9$k$3$H$,!"B?$/$N>l9g$G2DG=$H$J$j$^$9!#(B
 664.602 +
 664.603 +\command{patch} $B%3%^%s%I$O!"(B
 664.604 +$B:G=i$O(B hunk $B$K$*$1$k9THV9f!"(B
 664.605 +$B%3%s%F%-%9%H$*$h$SJQ99BP>]%F%-%9%H$N87L)0lCW$r;n$_$^$9!#(B
 664.606 +$B87L)0lCW$,$G$-$J$$>l9g!"(B
 664.607 +$B9THV9f$K4X$9$k>pJs$rL5;k$7!"(B
 664.608 +$B%3%s%F%-%9%H$N$_$N87L)0lCW$r;n$_$^$9!#(B
 664.609 +$B$3$l$,@.8y$7$?>l9g!"(B
 664.610 +\command{patch} $B%3%^%s%I$O!"(B
 664.611 +hunk $B$,E,MQ$5$l$?$3$H$H!"(B
 664.612 +$B85$N9THV9f$+$i(B\emph{$B%*%U%;%C%HJ,(B}$B$:$l$F$$$k$3$H$rI=<($7$^$9!#(B
 664.613 +
 664.614 +$B%3%s%F%-%9%H$N$_$K$h$k0lCW$,<:GT$7$?>l9g!"(B
 664.615 +\command{patch} $B$OKAF,$*$h$SKvHx9T$r<h$j=|$$$?%3%s%F%-%9%H$rMQ$$$F!"(B
 664.616 +\emph{$B=L>.(B}$B%3%s%F%-%9%H$N$_$K$h$k0lCW$r;n$_$^$9!#(B
 664.617 +$B=L>.%3%s%F%-%9%H$K$h$k(B hunk $BE,MQ$,@.8y$7$?>l9g!"(B
 664.618 +\emph{$B$"$$$^$$$JMW0x(B}$B$r85$K(B hunk $B$,E,MQ$5$l$?$3$H$rI=<($7$^$9(B
 664.619 +$B!J$3$N;~<($5$l$k?tCM$O!"(B
 664.620 +\command{patch} $B%3%^%s%I$,%Q%C%AE,MQA0$K%3%s%F%-%9%H$+$i<h$j=|$$$?9T?t$G$9!K!#(B
 664.621 +
 664.622 +$B$3$l$i$N$I$N5;K!$G$bE,MQ$G$-$J$$>l9g!"(B
 664.623 +\command{patch} $B%3%^%s%I$OAhE@$H$J$C$F$$$k(B hunk $B$,5Q2<$5$l$?;]$rI=<($7$^$9!#(B
 664.624 +\command{patch} $B%3%^%s%I$O5Q2<$5$l$?(B hunk $B!JC1$K(B ``reject'' $B$H$b8F$P$l$^$9!K(B
 664.625 +$B$rF1L>$G(B \sfilename{.rej} $B3HD%;R$r;}$D%U%!%$%k$KJ]B8$7$^$9!#(B
 664.626 +$B99$K$=$N>e$G!"(B
 664.627 +$B%Q%C%AE,MQA0$N%U%!%$%k$N%3%T!<$r(B \sfilename{.orig} $B3HD%;RIU$-$GJ]B8$7$^$9!#(B
 664.628 +$B3HD%;RL5$7$N%U%!%$%k$O!"(B
 664.629 +$BE,@Z$K$NE,MQ(B\emph{$B$5$l$?(B} hunk $B$K$h$kJQ99$r4^$s$G$$$^$9!#(B
 664.630 +$B%U%!%$%k(B \filename{foo} $B$rJQ99$9$k#6$D$N(B hunk $B$r;}$D%Q%C%A$,$"$j!"(B
 664.631 +$B$=$N$&$A$N#1$D$,E,MQ$G$-$J$+$C$?>l9g!"(B
 664.632 +$BJQ99A0$NFbMF$r;}$D(B \filename{foo.orig}$B!"(B
 664.633 +$BE,MQ$G$-$J$+$C$?(B hunk $B$r#1$D;}$D(B \filename{foo.rej} $B$*$h$S(B
 664.634 +$BE,MQ$G$-$?#5$D$N(B hynk $B$K$h$kJQ99$r4^$`(B \filename{foo} 
 664.635 +$B$N#3$D$N%U%!%$%k$,$G$-$^$9!#(B
 664.636 +
 664.637 +\subsection{$B%Q%C%A$N<B8=>e$NJJ(B}
 664.638 +
 664.639 +\command{patch} $B%3%^%s%I$N%U%!%$%k$X$N:nMQ$rCN$k>e$G!"(B
 664.640 +$BM-MQ$J;v$,$$$/$D$+$"$j$^$9!#(B
 664.641 +
 664.642 +\begin{itemize}
 664.643 +\item $B$o$+$j$-$C$?;v$G$9$,!"(B\command{patch} $B$O%P%$%J%j%U%!%$%k$r07$($^$;$s!#(B
 664.644 +
 664.645 +\item $B<B9T%S%C%H$b07$($^$;$s$N$G!"?7$7$$%U%!%$%k$r:n@.$9$k:]$K$O!"(B
 664.646 +  $BFI$_<h$j2DG=$K$O$7$^$9$,!"<B9T2DG=$K$O$7$^$;$s!#(B
 664.647 +
 664.648 +\item \command{patch} $B$O!":o=|BP>]%U%!%$%k$H6u%U%!%$%k$N:9J,$r$b$C$F!"(B
 664.649 +  $B%U%!%$%k$N:o=|$rI=$7$^$9!#(B
 664.650 +  $B$=$N$?$a!"(B``$B%U%!%$%k$r:o=|$9$k(B''$B$3$H$O!"(B
 664.651 +   $B%Q%C%A$K$*$$$F$O(B``$BA4$F$N9T$,:o=|$5$l$k(B''$B$h$&$K8+$($^$9!#(B
 664.652 +
 664.653 +\item $B6u$N%U%!%$%k$HDI2CBP>]%U%!%$%k$N:9J,$r$b$C$F!"(B
 664.654 +  $B%U%!%$%k$NDI2C$rI=$7$^$9!#(B
 664.655 +  $B$=$N$?$a!"(B``$B%U%!%$%k$rDI2C$9$k(B''$B$3$H$O!"(B
 664.656 +  $B%Q%C%A$K$*$$$F$O(B``$BA4$F$N9T$,DI2C$5$l$k(B''$B$h$&$K8+$($^$9!#(B
 664.657 +
 664.658 +\item $B8E$$L>A0$N%U%!%$%k$N:o=|$H?7$7$$L>A0$N%U%!%$%k$NDI2C$r$b$C$F!"(B
 664.659 +  $B%U%!%$%k$N2~L>$rI=$7$^$9!#(B
 664.660 +  $B$3$l$O!"%U%!%$%k$N2~L>$r9T$&%Q%C%A$N%5%$%:(B
 664.661 +  $B!J(Bfootprint$B!K$,Bg$-$/$J$k$3$H$r0UL#$7$^$9(B
 664.662 +  $B!J%Q%C%A$K$*$1$k%U%!%$%k$N2~L>$d%3%T!<$r(B Mercurial $B$,?dB,$9$k$3$H$O!"(B
 664.663 +  $B8=>u$G$O9T$o$l$J$$$3$H$K$bN10U$7$F$/$@$5$$!K(B $B!#(B
 664.664 +
 664.665 +\item \command{patch} $B$O6u$N%U%!%$%k$rI=8=$G$-$^$;$s$N$G!"(B
 664.666 +  ``$B6u$N%U%!%$%k$r%D%j!<$KDI2C$9$k(B''$B$3$H$r%Q%C%A$GI=8=$9$k$3$H$O=PMh$^$;$s!#(B
 664.667 +
 664.668 +\end{itemize}
 664.669 +
 664.670 +\subsection{$B$"$$$^$$$5$KCm0U(B}
 664.671 +
 664.672 +$B%*%U%;%C%HIU$-$d!"$"$$$^$$$JMW0x$r85$K$7$F$$$k>l9g$G$"$C$F$b!"(B
 664.673 +$B%Q%C%A$NE,MQ$O40A4$K@.8y$9$k$3$H$,B?$$$N$G$9$,!"(B
 664.674 +$B0lJ}$G$3$N$h$&$J87L)@-$r7g$$$?E,MQ<jK!$O!"(B
 664.675 +$B$*$N$:$H%U%!%$%k$X$N%Q%C%AE,MQ$,IT40A4$G$"$k2DG=@-$r;D$7$F$7$^$$$^$9!#(B
 664.676 +$B:G$bE57?E*$J;vNc$O!"(B
 664.677 +$B%Q%C%A$r#2EYE,MQ$7$F$7$^$&$3$H$d!"(B
 664.678 +$BITE,@Z$J0LCV$KE,MQ$7$F$7$^$&$3$H$G$9!#(B
 664.679 +\command{patch} $B$d(B \hgxcmd{mq}{qpush} 
 664.680 +$B$,%*%U%;%C%H$d$"$$$^$$MW0x$K4X$7$F8@5Z$7$?:]$K$O!"(B
 664.681 +$B%U%!%$%k$,E,@Z$KJQ99$5$l$F$$$k$3$H$r8e$+$i3NG'$7$F$/$@$5$$!#(B
 664.682 +
 664.683 +$B%*%U%;%C%HIU$-$d!"$"$$$"$^$$$JMW0x$r85$KE,MQ$5$l$?%Q%C%A$r(B refresh $B$9$k$N$,!"(B
 664.684 +$BB?$/$N>l9g$K$*$$$F$*$9$9$a$J$N$O!"(B
 664.685 +$B%Q%C%A$N(B refresh $B$,!"(B
 664.686 +$B%Q%C%A$re:No$KE,MQ$9$k$?$a$N?7$7$$%3%s%F%-%9%H>pJs$r@8@.$9$k$+$i$G$9!#(B
 664.687 +$B$?$@$7!"%Q%C%A$r(B refresh $B$9$k$3$H$G!"(B
 664.688 +$B85%U%!%$%k$N0[$J$kHG$KBP$7$F%Q%C%A$NE,MQ$,<:GT$9$k$h$&$K$J$k>l9g$,$"$k$?$a!"(B
 664.689 +``$BB?$/$N>l9g(B''$B$*$9$9$a$G$9$,!"(B``$B>o$K(B''$B$G$O$"$j$^$;$s!#(B
 664.690 +$B%=!<%9%D%j!<$NJ#?t$NHG$KBP$7$FE,MQ2DG=$J%Q%C%A$rJ]<i$9$k$h$&$J>l9g!"(B
 664.691 +$B%Q%C%AE,MQ=hM}$N7k2L$r8!>Z$9$k5!2q$rF@$k$3$H$,=PMh$k$N$G!"(B
 664.692 +$B%Q%C%A$K$"$$$^$$MW0x$r;}$?$;$F$*$/$N$O5vMFHO0O$G$9!#(B
 664.693 +
 664.694 +\subsection{$B5Q2<$5$l$?(B hunk $B$N<h$j07$$(B}
 664.695 +
 664.696 +$B%Q%C%A$NE,MQ$K<:GT$9$k$H!"(B
 664.697 +\hgxcmd{mq}{qpush} $B$O%(%i!<%a%C%;!<%8$rI=<($7$F=*N;$7$^$9!#(B
 664.698 +\sfilename{.rej} $B%U%!%$%k$,;D$5$l$F$$$k>l9g!"(B
 664.699 +$B$=$l0J>e$N%Q%C%A$r(B push $B$7$?$jB>$N:n6H$r$9$kA0$K!"(B
 664.700 +$B5Q2<$5$l$?(B hunk $B$N=$@5$r9T$&$3$H$,0lHLE*$K$O:GA1$G$9!#(B
 664.701 +
 664.702 +$B%Q%C%A$NE,MQBP>]$G$"$k%=!<%9$N99?7$K$h$j!"(B
 664.703 +\emph{$B$=$l$^$G$O(B}$B$-$A$s$HE,MQ$G$-$F$$$?%Q%C%A$,E,MQ$G$-$J$/$J$C$?>l9g$N(B
 664.704 +Mercurial Queues $B$N;H$$J}$N>\:Y$K4X$7$F$O!"(B
 664.705 +~\ref{sec:mq:merge} $B@a$r;2>H$7$F$/$@$5$$!#(B
 664.706 +
 664.707 +$B;DG0$J$3$H$K!"5Q2<$5$l$?(B hunk $B$r07$&$?$a$N7hDjE*$J5;K!$OB8:_$7$^$;$s!#(B
 664.708 +$BB?$/$N>l9g!"(B\sfilename{.rej} $B%U%!%$%k$r;2>H$7$J$,$i!"(B
 664.709 +$BBP>]%U%!%$%k$rJT=8$7!"(B
 664.710 +$B5Q2<$5$l$?(B hunk $B$r<jF0$GE,MQ$7$J$1$l$P$J$j$^$;$s!#(B
 664.711 +
 664.712 +$B;W$$@Z$C$?;v$b<-$5$J$$$N$G$"$l$P!"(B
 664.713 +$B%Q%C%A$NE,MQ$K4X$7$F$O(B \command{patch} $B$h$j$b6/NO$J!"(B
 664.714 +\command{wiggle}~\cite{web:wiggle} $B$H8F$P$l$k%D!<%k$,!"(B
 664.715 +Linux $B%+!<%M%k%O%C%+!<$N(B Neil Brown $B$K$h$j=q$+$l$F$$$^$9!#(B
 664.716 +
 664.717 +\command{patch} $B$K$h$j5Q2<$5$l$?(B hunk $B$NE,MQ$r<+F02=$9$k$?$a$K!"(B
 664.718 +$B4JJX$J<jK!$rMQ$$$k(B \command{mpatch}~\cite{web:mpatch} $B$H8F$P$l$k%D!<%k$b!"(B
 664.719 +$BJL$N(B Linux $B%+!<%M%k%O%C%+!<$N(B Chris Mason
 664.720 +$B!J(BMercurial Queues $B$N:n<T$G$9!K$K$h$j=q$+$l$F$$$^$9!#(B
 664.721 +\command{mpatch} $B$O!"(B
 664.722 +$B#4$D$N$h$/$"$kM}M3$G5Q2<$5$l$?(B hunk $B$NE,MQ$r=u$1$k$3$H$,$G$-$^$9!#(B
 664.723 +
 664.724 +\begin{itemize}
 664.725 +\item hunk $BCfDx$N%3%s%F%-%9%H$,JQ99$5$l$?!#(B
 664.726 +\item hunk $B$N%3%s%F%-%9%H$N!"@hF,$"$k$$$OKvHx$N0lJ}$,8+Ev$?$i$J$$!#(B
 664.727 +\item $BBg$-$J(B hunk $B$h$j$b(B---$BA4It$J$j0lIt$J$j$,(B---
 664.728 +  $B>.$5$J(B hunk $B$KJ,3d$5$l$?J}$,E,MQ$7$d$9$$!#(B
 664.729 +\item $B8=;~E@$G$N%U%!%$%k$H$o$:$+$KFbMF$N0[$J$k9T$r(B 
 664.730 +  hunk $B$,:o=|$7$h$&$H$7$F$$$k!#(B
 664.731 +\end{itemize}
 664.732 +
 664.733 +\command{wiggle} $B$J$$$7(B \command{mpatch} $B$r;HMQ$9$k:]$K$O!"(B
 664.734 +$B<B;\7k2L$KBP$7$FFs=E$KCm0U$rJ'$&I,MW$,$"$j$^$9!#(B
 664.735 +$B<B$N$H$3$m(B \command{mpatch} $B$O!"(B
 664.736 +$B=hM}$N40N;;~$K<+F0E*$K%^!<%8%W%m%0%i%`$X$HM6F3$9$k$3$H$G!"(B
 664.737 +$B%D!<%k=PNO$NFs=E3NG'$N<jK!$r6/MW$7$F$$$^$9$N$G!"(B
 664.738 +\command{mpatch} $B$N<B9T7k2L$r3NG'$7!"(B
 664.739 +$B;D$5$l$?%^!<%8=hM}$r40N;$5$;$k$3$H$,=PMh$^$9!#(B
 664.740 +
 664.741 +\section{MQ $B$G:G9b@-G=$r=P$9$?$a$K(B}
 664.742 +\label{sec:mq:perf}
 664.743 +
 664.744 +MQ $B$OBgNL$N%Q%C%A$N<h$j07$$$r8zN($h$/<B;\$7$^$9!#(B
 664.745 +2006 EuroPython conference~\cite{web:europython} $B$G$N9V1i$N$?$a$K!"(B
 664.746 +2006 $BG/Cf=\$K@-G=<B83$r<B;\$7$^$7$?!#(B
 664.747 +$BE,MQ%Q%C%A$H$7$F!"(B
 664.748 +1,738 $B8D$N%Q%C%A$r;}$D(B Linux 2.6.17-mm1 $B%Q%C%A7ONs$r;HMQ$7$F$$$^$9!#(B
 664.749 +Linux 2.6.12-rc2 $B$+$i(B Linux 2.6.17 $B$K$+$1$F$N!"(B
 664.750 +27,472 $B$N%j%S%8%g%sA4$F$r;}$D(B Linux $B%+!<%M%k%j%]%8%H%j$KBP$7$F!"(B
 664.751 +$B$3$l$i$N%Q%C%A$rE,MQ$7$?$N$G$9!#(B
 664.752 +
 664.753 +$B5l<0$NCY$$%i%C%W%H%C%W(B PC $B>e$G!"(B
 664.754 +1,738 $B8D$N%Q%C%AA4$F$r(B
 664.755 +\hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} $B$9$k$N$K(B 3.5 $BJ,!"(B
 664.756 +$B$=$l$i$r(B \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} $B$9$k$N$K(B 30 $BIC$+$+$j$^$7$?(B
 664.757 +$B!J?7$7$$%i%C%W%H%C%W$J$i!"(B
 664.758 +$BA4$F$N%Q%C%A$r(B push $B$9$k;~4V$O#2J,$^$G2<$,$j$^$7$?!K!#(B
 664.759 +$B:G$bBg$-$J%Q%C%A$N#1$D!J(B22,779 $B9T$NJQ99$r(B 287 $B$N%U%!%$%k$KBP$7$F9T$$$^$9!K(B
 664.760 +$B$r(B 6.6 $BIC$G(B \hgxcmd{mq}{qrefresh} $B$G$-$F$$$^$9!#(B
 664.761 +
 664.762 +MQ $B$,5pBg$J%=!<%9%D%j!<$G:n6H$9$k$N$KE,$7$F$$$k$N$OL@$i$+$G$9$,!"(B
 664.763 +$B:G9b$N@-G=$r=P$9$?$a$KCN$C$F$*$$$?$[$&$,NI$$4v$D$+$N%3%D$,$"$j$^$9!#(B
 664.764 +
 664.765 +$B:G=i$N%3%D$O!"(B``$B0l3g(B''$BA`:n$r9T$&$3$H$G$9!#(B
 664.766 +\hgxcmd{mq}{qpush} $B$*$h$S(B \hgxcmd{mq}{qpop} $B$N<B9T$N:]$K$O!"(B
 664.767 +$B2?$iJQ99$,$5$l$F$$$J$$$3$H$H!"(B
 664.768 +\hgxcmd{mq}{qrefresh} $B$7K:$l$,$J$$$3$H$r3NG'$9$k$?$a$K!"(B
 664.769 +$B>o$K:n6HNN0h%G%#%l%/%H%j$rAv::$7$F$$$^$9!#(B
 664.770 +$B>.$5$J%=!<%9%D%j!<$N>l9g$O!"(B
 664.771 +$B$3$NAv::$KMW$9$k;~4V$O5$$K$J$j$^$;$s!#(B
 664.772 +$B$7$+$7!"CfDxEY!J(B10,000 $B%U%!%$%kDxEY!K$N%=!<%9%D%j!<$G$O!"(B
 664.773 +$B#1IC$+$i$=$l0J>e$N;~4V$,I,MW$G$9!#(B
 664.774 +
 664.775 +\hgxcmd{mq}{qpush} $B$*$h$S(B \hgxcmd{mq}{qpop} $B%3%^%s%I$G$O!"(B
 664.776 +$BJ#?t%Q%C%A$r0l3g$7$F(B push $B$*$h$S(B pop $B$9$k:]$K!"(B
 664.777 +$B:n6H$r@Z$j>e$2$k(B``$BE~C#%Q%C%A(B''$B$r;XDj$9$k$3$H$,$G$-$^$9!#(B
 664.778 +$BE~C#%Q%C%A;XDjIU$-$G<B9T$9$k$3$H$G!"(B
 664.779 +\hgxcmd{mq}{qpush} 
 664.780 +$B$O;XDj$7$?%Q%C%A$,E,MQ%9%?%C%/$N:G>e0L$K$J$k$^$G%Q%C%A$NE,MQ$r9T$$$^$9!#(B
 664.781 +\hgxcmd{mq}{qpop} $B$N>l9g$O!"(B
 664.782 +$BE~C#%Q%C%A$,E,MQ%9%?%C%/$N:G>e0L$K$J$k$^$G%Q%C%A$N<h$j>C$7$r9T$$$^$9!#(B
 664.783 +
 664.784 +$BE~C#%Q%C%A$N;XDj$K$O!"%Q%C%A$NL>A0$+?tCM$,;HMQ$G$-$^$9!#(B
 664.785 +$B?tCM;XDj$N>l9g!"%Q%C%A$O#0$+$i?t$(;O$a$k$?$a!"(B
 664.786 +$B:G=i$N%Q%C%A$O#0!"<!$N%Q%C%A$N#1$H$J$j$^$9!#(B
 664.787 +
 664.788 +\section{$B85%=!<%9JQ99;~$N%Q%C%A$N99?7(B}
 664.789 +\label{sec:mq:merge}
 664.790 +
 664.791 +$BD>@\JQ99$9$k$3$H$N$G$-$J$$%j%]%8%H%j$KBP$7$F!"(B
 664.792 +$B%Q%C%A%9%?%C%/$r;}$D$3$H$O$h$/$"$k;v$G$9!#(B
 664.793 +$BBh;0<T$N%=!<%9$KBP$9$kJQ99$d!"(B
 664.794 +$B85%=!<%9$N99?7IQEY$h$j$b3+H/$K;~4V$N3]$+$k5!G=$r<BAu$7$F$$$k>l9g!"(B
 664.795 +$B85%=!<%9$N99?7$H$NF14|$d!"(B
 664.796 +$BE,MQ$G$-$J$/$J$C$?%Q%C%A$N(B hunk $B$r=$@5$9$kI,MW$,$"$j$^$9!#(B
 664.797 +$B$3$N$h$&$J:n6H$O!"%Q%C%A7ONs$N(B\emph{$B%j%Y!<%9(B}$B$H8F$P$l$^$9!#(B
 664.798 +
 664.799 +$B%j%Y!<%9$N0lHVC1=c$JJ}K!$O!"(B
 664.800 +$B%Q%C%A$KBP$7$F(B \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} $B$r9T$$!"(B
 664.801 +\hgcmd{pull} $B$G85%=!<%9$NJQ99$r%j%]%8%H%j$K<h$j9~$_!"(B
 664.802 +$B:G8e$K(B \hgcmdargs{qpush}{\hgxopt{mq}{qpop}{-a}} $B$G%Q%C%A$r:FE,MQ$7$^$9!#(B
 664.803 +MQ $B$K$h$k%Q%C%AE,MQ$G$O!"(B
 664.804 +$B>WFM$,8!=P$5$l$F$$$k4V$OE,MQ$G$-$J$$%Q%C%A$NE,MQ$r;_$a$k$3$H$G!"(B
 664.805 +$B>WFM$N2r>C$H%Q%C%A$N(B \hgxcmd{mq}{qrefresh} $B$r9T$&5!2q$r@_$1$D$D!"(B
 664.806 +$B%Q%C%A%9%?%C%/Cf$NA4$F$N%Q%C%A$r99?7$7=*$o$k$^$G%Q%C%A$NE,MQ$r7QB3$7$^$9!#(B
 664.807 +
 664.808 +$B85%=!<%9$NJQ99$,%Q%C%A$NE,MQ6q9g$K0-1F6A$r5Z$\$9?4G[$,L5$$$N$G$"$l$P!"(B
 664.809 +$B$3$N<jK!$O<j7Z$G3n$D>e<j$/5!G=$9$k$G$7$g$&!#(B
 664.810 +$B$7$+$7$J$,$i!"(B
 664.811 +$B85%=!<%9$GIQHK$K99?7$5$l$kItJ,$K?($l$k$h$&$J%Q%C%A%9%?%C%/$N>l9g!"(B
 664.812 +$B5Q2<$5$l$?(B hunk $B$N<jF0$G$N=$@5$O!"(B
 664.813 +$B$9$0$K$G$bLLE]$J:n6H$H2=$9$G$7$g$&!#(B
 664.814 +
 664.815 +$B%j%Y!<%9=hM}$rItJ,E*$K<+F02=$9$k;v$O2DG=$G$9!#(B
 664.816 +$B85%=!<%9$N4v$D$+$N%j%S%8%g%s$KBP$7$F$-$A$s$HE,MQ$G$-$k%Q%C%A$G$"$l$P!"(B
 664.817 +$B0[$J$k%j%S%8%g%s$H%Q%C%A$H$N4V$G$N>WFM$KBP$7$F!"(B
 664.818 +$B;vA0$NE,MQ>pJs$rMQ$$$?2r>C$r(B MQ $B$K$h$j9T$&$3$H$,$G$-$^$9!#(B
 664.819 +
 664.820 +$B<j=g$O>/!99~$_F~$C$F$$$^$9!#(B
 664.821 +
 664.822 +\begin{enumerate}
 664.823 +\item $B3+;O$KEv$?$C$F!"(B
 664.824 +  $B%Q%C%A$,$-$A$s$HE,MQ$G$-$F$$$k:G>e0L%j%S%8%g%s$KBP$7$F(B
 664.825 +  \hgcmdargs{qpush}{-a} $B$K$h$jA4$F$N%Q%C%A$rE,MQ$7$^$9!#(B
 664.826 +
 664.827 +\item \hgcmdargs{qsave}{\hgxopt{mq}{qsave}{-e} \hgxopt{mq}{qsave}{-c}} 
 664.828 +  $B$rMQ$$$F%Q%C%A%G%#%l%/%H%j$N%P%C%/%"%C%W$rJ]B8$7$^$9!#(B
 664.829 +  $B$3$N%3%^%s%I$N<B9T$N:]$K$O!"%Q%C%A$rJ]B8$7$?%G%#%l%/%H%j$NL>A0$rI=<($7$^$9!#(B
 664.830 +  \texttt{\emph{N}} $B$r>.$5$$@0?t$H$7$?>l9g!"(B
 664.831 +  \sdirname{.hg/patches.\emph{N}} 
 664.832 +  $B$H$$$&7A<0$NL>A0$N%G%#%l%/%H%j$K%Q%C%A$,J]B8$5$l$^$9!#(B
 664.833 +  $BE,MQ$5$l$?%Q%C%A0J30$K!"(B
 664.834 +  ``$BJ]B8$5$l$?%A%'%s%8%;%C%H(B''$B$b%3%_%C%H$7$^$9$,!"(B
 664.835 +  $B$3$l$OFbItE*$J>pJs$H!"(B
 664.836 +  \sfilename{series} $B$*$h$S(B \sfilename{status} $B$N>uBV$r5-O?$9$k$?$a$G$9!#(B
 664.837 +
 664.838 +\item hgcmd{pull} $B$K$h$j!"99?7$r%j%]%8%H%j$K<h$j9~$_$^$9(B
 664.839 +  $B!J(B\hgcmdargs{pull}{-u} $B$rMQ$$$J$$M}M3$O!"0J9_$N5-=R$r;2>H$7$F$/$@$5$$!K!#(B
 664.840 +
 664.841 +\item \hgcmdargs{update}{\hgopt{update}{-C}} $B$rMQ$$$F:G?7$N(B 
 664.842 +  tip $B%j%S%8%g%s$K99?7$9$k$3$H$G!"E,MQ$7$?%Q%C%A$rL58z$K$7$F$/$@$5$$!#(B
 664.843 +
 664.844 +\item \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-m}
 664.845 +    \hgxopt{mq}{qpush}{-a}} $B$rMQ$$$FA4$F$N%Q%C%A$r%^!<%8$7$^$9!#(B
 664.846 +  \hgxcmd{mq}{qpush} $B$X$N(B \hgxopt{mq}{qpush}{-m} $B%*%W%7%g%s;XDj$K$h$j!"(B
 664.847 +  $B%Q%C%AE,MQ$K<:GT$7$?:]$K!"(BMQ $B$O(B 3-way $B%^!<%8$r<B;\$7$^$9!#(B
 664.848 +
 664.849 +\end{enumerate}
 664.850 +
 664.851 +\hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-m}} $B<B;\$N:]$K$O!"(B
 664.852 +\sfilename{series} 
 664.853 +$B%U%!%$%k$KNs5s$5$l$?$=$l$>$l$N%Q%C%A$ODL>oDL$jE,MQ$5$l$^$9!#(B
 664.854 +$B$"$$$^$$MW0x$r85$K%Q%C%A$,E,MQ$5$l$?$j!"%Q%C%A$NE,MQ$,5Q2<$5$l$?>l9g!"(B
 664.855 +MQ $B$O(B \hgxcmd{mq}{qsave} $B$K$h$jJ]B8$5$l$?%Q%C%A%-%e!<$r;2>H$7!"(B
 664.856 +$B%Q%C%A$KBP1~$9$k%A%'%s%8%;%C%H$rMQ$$$?(B 3-way $B%^!<%8$r9T$$$^$9!#(B
 664.857 +$B$3$N%^!<%8=hM}$K$O(B Mercurial $B$NDL>o$N%^!<%85!9=$,MxMQ$5$l$^$9$N$G!"(B
 664.858 +$B>WFM$N2r>C$N:]$K$O(B GUI $B%^!<%8%D!<%k$,5/F0$5$l$k$+$b$7$l$^$;$s!#(B
 664.859 +
 664.860 +$B%Q%C%A$N1F6A$r2r>C$7=*$($k$H!"(B
 664.861 +$B%^!<%87k2L$r85$K(B MQ $B$K$h$k%Q%C%A$N(B refresh $B$,9T$o$l$^$9!#(B
 664.862 +
 664.863 +$B$3$N<j=g$r=*$($?%j%]%8%H%j$K$O!"(B
 664.864 +$B8E$$%Q%C%A%-%e!<$KAjEv$9$k%A%'%s%8%;%C%H$r85$K$7$?M>J,$J(B head $B$H!"(B
 664.865 +\sdirname{.hg/patches.\emph{N}} $B$KJ]B8$5$l$?8E$$%Q%C%A%-%e!<$,;D$j$^$9!#(B
 664.866 +$BM>J,$J(B head $B$N:o=|$O!"(B
 664.867 +\hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a} \hgxopt{mq}{qpop}{-n} patches.\emph{N}}
 664.868 +$B$J$$$7(B \hgcmd{strip} $B$G9T$&$3$H$,$G$-$^$9!#(B
 664.869 +$B%P%C%/%"%C%W$H$7$F$NI,MW@-$,$J$/$J$C$?$J$i!"(B
 664.870 +\sdirname{.hg/patches.\emph{N}} $B$b:o=|$7$F$7$^$C$F9=$$$^$;$s!#(B
 664.871 +
 664.872 +\section{$B%Q%C%A$N;XDj(B}
 664.873 +
 664.874 +$B%Q%C%A$rA`:n$9$k(B MQ $B%3%^%s%I$K$*$1$k%Q%C%A$N;XDj$O!"(B
 664.875 +$B%Q%C%A$NL>A0$+?tCM$G9T$$$^$9!#(B
 664.876 +$BL>A0$K$h$k;XDj$OHs>o$K$o$+$j$d$9$$$G$7$g$&!#(B
 664.877 +$BNc$($P!"(B\hgxcmd{mq}{qpush} $B%3%^%s%I$X$N(B
 664.878 +\filename{foo.patch} $B$N;XDj$K$h$j!"(B
 664.879 +\filename{foo.patch} $B$,E,MQ$5$l$k$^$G%Q%C%A$NE,MQ$,7+$jJV$5$l$^$9!#(B
 664.880 +
 664.881 +$BC;=L7A<0$H$7$F!"L>A0$H?tCM%*%U%;%C%H$NN>J}$r;XDj$9$k$3$H$b$G$-$^$9!#(B
 664.882 +\texttt{foo.patch-2} $B$O(B
 664.883 +``\texttt{foo.patch} $B%Q%C%A$N#2$DA0(B''$B$r!"(B
 664.884 +\texttt{bar.patch+4} $B$O(B
 664.885 +``\texttt{bar.patch} $B%Q%C%A$N#4$D8e$m(B''$B$r0UL#$7$^$9!#(B
 664.886 +
 664.887 +$B?tCM$K$h$k%Q%C%A$N;XDj$O$=$l$[$IFq$7$/$"$j$^$;$s!#(B
 664.888 +\hgxcmd{mq}{qseries} $B$K$h$j:G=i$KI=<($5$l$k%Q%C%A$O#0!"(B
 664.889 +$B#2HVL\$O#1!"$H$J$C$F$$$^$9(B
 664.890 +$B!J$=$&!"#0$+$i?t$(;O$a$k;EAH$_$G$9!K!#(B
 664.891 +
 664.892 +MQ $B$O!"DL>o$N(B Mercurial $B%3%^%s%I$NMxMQ;~$K$*$1$k%Q%C%AA`:n$b4JJX$K$7$^$9!#(B
 664.893 +$B%A%'%s%8%;%C%H<1JL;R$r<u$1IU$1$kA4$F$N%3%^%s%I$O!"(B
 664.894 +$BE,MQ:Q$_$N%Q%C%AL>$b<u$1IU$1$^$9!#(B
 664.895 +$B%j%]%8%H%jCf$K85!9$"$C$?DL>o$N%?%0$K2C$($F!"(B
 664.896 +$B%Q%C%AE,MQ$N:]$N5/E@$H$J$k%j%S%8%g%s$K%?%0(B\footnote{
 664.897 +\index{tags!$BFC<l%?%0L>(B!\texttt{qbase}}\texttt{qparent}
 664.898 +}$B$,IUM?$5$l$^$9!#(B
 664.899 +$B$=$l$K2C$($F!"(B
 664.900 +\index{tags!$BFC<l%?%0L>(B!\texttt{qbase}}\texttt{qbase} $B$*$h$S(B
 664.901 +\index{tags!$BFC<l%?%0L>(B!\texttt{qtip}}\texttt{qtip} $B%?%0$K$h$j!"(B
 664.902 +$B:G2<0L$*$h$S:G>e0L$NE,MQ$:$_%Q%C%A$r$=$l$>$l;XDj$G$-$^$9!#(B
 664.903 +
 664.904 +Mercurial $B$NDL>o%?%0$KBP$9$k$3$l$i$N3HD%$O!"(B
 664.905 +$B%Q%C%A$N<h$j07$$$r$h$j4JJX$K$7$^$9!#(B
 664.906 +
 664.907 +\begin{itemize}
 664.908 +
 664.909 +\item $B:G?7$N0lO"$NJQ99$r85$K!"%a!<%j%s%0%j%9%H$X%Q%C%AGzCF!J(Bpatchbomb$B!K(B
 664.910 +  $B$rEj9F$7$?$$>l9g$K$O!)(B
 664.911 +  \begin{codesample4}
 664.912 +    hg email qbase:qtip
 664.913 +  \end{codesample4}
 664.914 +  $B!J(B``$B%Q%C%AGzCF(B''$B$K$D$$$F$O(B \ref{sec:hgext:patchbomb} $B@a$r;2>H$7$F$/$@$5$$!K(B
 664.915 +
 664.916 +\item \texttt{foo.patch} $B0J9_$N%Q%C%A$G!"(B
 664.917 +  $BFCDj$N%G%#%l%/%H%jG[2<$N%U%!%$%k$K4XM?$7$F$$$k$b$N$r!"(B
 664.918 +  $BA4$FCN$j$?$$>l9g$K$O!)(B
 664.919 +  \begin{codesample4}
 664.920 +    hg log -r foo.patch:qtip \emph{subdir}
 664.921 +  \end{codesample4}
 664.922 +
 664.923 +\end{itemize}
 664.924 +
 664.925 +$B%Q%C%A$NL>A0$rMxMQ2DG=$K$9$k$?$a$K!"(B
 664.926 +MQ $B$O(B Mercurial $B$N;}$DFbIt%?%05!G=$r;HMQ$7$F$$$k$N$G!"(B
 664.927 +$B%Q%C%A$rL>A0$G;XDj$9$k>l9g$K$O!"(B
 664.928 +$B$=$NL>A0$rA4$FF~NO$9$kI,MW$O$"$j$^$;$s!#(B
 664.929 +
 664.930 +\begin{figure}[ht]
 664.931 +  \interaction{mq.id.output}
 664.932 +  \caption{MQ $B$N%?%05!G=$r;HMQ$7$?%Q%C%A$NA`:n(B}
 664.933 +  \label{ex:mq:id}
 664.934 +\end{figure}
 664.935 +
 664.936 +$B%Q%C%A$NL>A0$r%?%0$G<B8=$9$k$3$H$G!"(B
 664.937 +\hgcmd{log} $B%3%^%s%I$N<B9T;~$K!"(B
 664.938 +$B$=$N=PNO$N0lIt$H$7$F%?%0$H$7$F$N%Q%C%AL>$,I=<($5$l$k!"(B
 664.939 +$B$H$$$&I{:nMQ$bF@$i$l$^$9!#(B
 664.940 +$B$3$N$3$H$K$h$j!"(B
 664.941 +$BE,MQ:Q$_$N%Q%C%A$H(B``$BDL>o$N(B''$B%j%S%8%g%s$r!"(B
 664.942 +$B;k3PE*$K<1JL$9$k$3$H$rMF0W$K$7$^$9!#(B
 664.943 +$BE,MQ:Q$_%Q%C%A$HO"7H$9$k(B Mercurial $B$NDL>o%3%^%s%I$N<B9TNc$r(B
 664.944 +$B?^(B ~\ref{ex:mq:id} $B$K<($7$^$9!#(B
 664.945 +
 664.946 +\section{$BCN$C$F$*$/$HJXMx$J;vJA(B}
 664.947 +
 664.948 +MQ $B$NMxMQ$K4X$7$F!"FHN)$7$?@a$r@_$1$kDx$G$O$J$$$b$N$N!"(B
 664.949 +$BCN$C$F$*$$$?$[$&$,NI$$;vJA$,4v$D$+$"$j$^$9!#(B
 664.950 +$B$3$3$G$O!"$=$&$$$C$?;vJA$r=8$a$F$_$^$7$?!#(B
 664.951 +
 664.952 +\begin{itemize}
 664.953 +\item \hgxcmd{mq}{qpop} $B$G%Q%C%A$r<h$j>C$7$?8e$K!"(B
 664.954 +  \hgxcmd{mq}{qpush} $B$G:FEYE,MQ$7$?>l9g!"(B
 664.955 +  $B$=$N;~E@$G$NE,MQ:Q$_%Q%C%A$KAjEv$9$k%A%'%s%8%;%C%H$O!"(B
 664.956 +  pop/push $B$9$kA0$N%A%'%s%8%;%C%H$H$O(B\emph{$B0[$J$k<1JL;R(B}$B$r;}$A$^$9!#(B
 664.957 +  $B<1JL;R$,0[$J$kM}M3$O(B ~\ref{sec:mqref:cmd:qpush} $B@a$r;2>H$7$F$/$@$5$$!#(B
 664.958 +
 664.959 +\item $B>/$J$/$H$b!"(B
 664.960 +  $B%Q%C%A%9%?%C%/>e$N%Q%C%A$K$h$k%A%'%s%8%;%C%H72$N(B
 664.961 +  ``$B%Q%C%A@-(B''$B$rJ]$A$?$$$N$G$"$l$P!"(B
 664.962 +  $BB>$N%V%i%s%A$H$=$l$i$r(B\hgcmd{$B%^!<%8(B}$B$9$Y$-$G$O$"$j$^$;$s!#(B
 664.963 +  \hgcmd{$B%^!<%8(B}$B$7$?>l9g!"$=$l<+BN$O@.8y$9$k$G$7$g$&$,!"(B
 664.964 +  $B7k2L$H$7$F(B MQ $B$,:.Mp$7$F$7$^$&$G$7$g$&!#(B
 664.965 +\end{itemize}
 664.966 +
 664.967 +\section{$B%j%]%8%H%j$K$*$1$k%Q%C%A$N4IM}(B}
 664.968 +\label{sec:mq:repo}
 664.969 +
 664.970 +MQ $B$,MxMQ$9$k(B \sdirname{.hg/patches} $B%G%#%l%/%H%j$,(B
 664.971 +Mercurial $B$N:n6HNN0h%G%#%l%/%H%j$N30$K$"$k$?$a!"(B
 664.972 +MQ $B$N(B``$B2<$K$"$k(B''Mercurial $B$N%j%]%8%H%j$O!"(B
 664.973 +$B%Q%C%A$N4IM}$dB8:_$K4X$7$F2?$bG'<1$7$F$$$^$;$s!#(B
 664.974 +
 664.975 +$B$3$N$3$H$O!"(B
 664.976 +$B%Q%C%A%G%#%l%/%H%j$NFbMF$r$=$l<+?H$N(B Mercurial $B%j%]%8%H%j$rMQ$$$F4IM}$G$-$k!"(B
 664.977 +$B$H$$$&6=L#?<$$2DG=@-$r$b$?$i$7$^$9!#(B
 664.978 +$BNc$($P!"(B
 664.979 +$B%Q%C%A$K4X$9$k:n6H$r9T$$!"(B\hgxcmd{mq}{qrefresh} $B$r$7$?8e$G!"(B
 664.980 +$B%Q%C%A$N8=>u$r(B \hgcmd{commit} $B$9$k$3$H$G!"(B
 664.981 +$B8e$+$i$=$N>uBV$X$H%Q%C%A$r(B``$B4,$-La$9(B''$B!J(Broll back$B!K$9$k$3$H$,$G$-$k$J$I!"(B
 664.982 +$BM-MQ$J5!G=$rDs6!$7$^$9!#(B
 664.983 +
 664.984 +$BJ#?t$N%j%]%8%H%j$N4V$G!"(B
 664.985 +$BF10l%Q%C%A%9%?%C%/$N0[$J$kHG$r6&M-$9$k$3$H$b=PMh$^$9!#(B
 664.986 +$BI.<T$O(B Linux $B%+!<%M%k5!G=$N3+H/$N:]$K$3$N<jK!$r;HMQ$7$F$$$^$9!#(B
 664.987 +$BJ#?t$N(B CPU $B%"!<%-%F%/%A%c$4$H$K$=$l$>$l???7$7$$%+!<%M%k%=!<%9$N%3%T!<$rMQ0U$7!"(B
 664.988 +$B$=$l$>$l$K:n6HCf$N%Q%C%A$r4^$`%j%]%8%H%j$rJ#@=$7$^$9!#(B
 664.989 +$BJL$J%"!<%-%F%/%A%c$GJQ99FbMF$N;n83$r9T$&:]$K$O!"(B
 664.990 +$BBP1~$9$k%+!<%M%k%=!<%9$N%Q%C%A%j%]%8%H%j$X8=;~E@$N%Q%C%A$r(B push $B$7!"(B
 664.991 +$BA4$F$N%Q%C%A$r:GE,MQ!J(Bpop $B8e$K(B push$B!K$7$?8e$K!"(B
 664.992 +$B$=$N%+!<%M%k$N%S%k%I$*$h$S;n83$r9T$$$^$9!#(B
 664.993 +
 664.994 +$B%j%]%8%H%j7A<0$N>e$G%Q%C%A$r4IM}$9$k$3$H$G!"(B
 664.995 +$BE,MQBP>]$N%=!<%9$KBP$9$k@)8f$N2DH]$K4X$o$jL5$/!"(B
 664.996 +$B3+H/<TF1;N$G$*8_$$$K>WFM$9$k$3$HL5$7$K!"(B
 664.997 +$BF1$8%Q%C%A7ONs$KBP$9$k:n6H$r<B;\$G$-$^$9(B
 664.998 +
 664.999 +\subsection{MQ $B$N%Q%C%A%j%]%8%H%j%5%]!<%H(B}
664.1000 +
664.1001 +MQ $B$O(B \sdirname{.hg/patches} $B%G%#%l%/%H%j$r<+?H$N%j%]%8%H%j$H$7$F!"(B
664.1002 +$B%Q%C%AA`:n$rJd=u$7$^$9$,!"(B
664.1003 +\hgxcmd{mq}{qinit} $B$G$N=i4|2=$N:]$K(B
664.1004 +\hgxopt{mq}{qinit}{-c} $B%*%W%7%g%s$r;XDj$9$k$3$H$G!"(B
664.1005 +\sdirname{.hg/patches} $B%G%#%l%/%H%j$r(B
664.1006 +Mercurial $B%j%]%8%H%j$H$7$F:n@.$9$k$3$H$,=PMh$^$9!#(B
664.1007 +
664.1008 +\begin{note}
664.1009 +  \hgxopt{mq}{qinit}{-c} $B%*%W%7%g%s$N;XDj$rK:$l$?>l9g!"(B
664.1010 +  $BG$0U$N;~E@$G(B \sdirname{.hg/patches} $B%G%#%l%/%H%j$G(B
664.1011 +  \hgcmd{init} $B$r<B9T$7$F$/$@$5$$!#(B
664.1012 +  \sfilename{status} $B$rMzNr4IM}$7$h$&$H;W$&$3$H$O(B\emph{$BK\Ev$K(B}$B$"$j$^$;$s$+$i!"(B
664.1013 +  \sfilename{.hgignore} $B%U%!%$%k$K(B 
664.1014 +  \sfilename{status} $B$rDI2C$9$k$N$rK:$l$J$$$G$/$@$5$$(B
664.1015 +  $B!J(B\hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}} $B$O!"(B
664.1016 +  $B$3$N:n6H$r<+F0E*$K9T$$$^$9!K!#(B
664.1017 +\end{note}
664.1018 +
664.1019 +$BMxJX@->e!"(B
664.1020 +\dirname{.hg/patches} $B%G%#%l%/%H%j$,(B
664.1021 +Mercurial $B%j%]%8%H%j$G$"$k>l9g!"(B
664.1022 +MQ $B$O:n@.!&<h$j9~$_$r9T$C$?%Q%C%A$NA4$F$r<+F0E*$K(B
664.1023 +\hgcmd{add} $B$7$^$9!#(B
664.1024 +
664.1025 +$B:G8e$K$J$j$^$9$,!"(B
664.1026 +MQ $B$O(B \sdirname{.hg/patches} $B$K$*$$$F(B 
664.1027 +\hgcmd{commit} $B$r<B9T$9$kC;=L%3%^%s%I(B 
664.1028 +\hgxcmd{mq}{qcommit} $B$rDs6!$7$F$$$^$9$N$G!"(B
664.1029 +$B!J%G%#%l%/%H%j0\F0Ey$N!KHQ$o$7$$%-!<F~NO$,>JN,$G$-$^$9!#(B
664.1030 +
664.1031 +\subsection{$B4v$D$+$NCm0UE@(B}
664.1032 +
664.1033 +MQ $B$K$h$k%Q%C%A$N%j%]%8%H%j4IM}$N%5%]!<%H$O!"8BDjE*$J$b$N$G$9!#(B
664.1034 +
664.1035 +MQ $B$O!"%Q%C%A%G%#%l%/%H%j$KBP$7$F9T$o$l$?JQ99$r!"(B
664.1036 +$B<+F0E*$K8!=P$9$k$3$H$O$G$-$^$;$s!#(B
664.1037 +\hgcmd{pull} $B$N<B9T$d!"<jF0$G$NJT=8!"(B
664.1038 +$B$"$k$$$O(B \hgcmd{update} $B$N<B9T$K$h$k%Q%C%A$d(B 
664.1039 +\sfilename{series} $B$NJQ99$r9T$C$?>l9g!"(B
664.1040 +$B%Q%C%AE,MQBP>]$N%j%]%8%H%j$K$*$$$F(B
664.1041 +\hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} $B$N8e$K(B
664.1042 +\hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} $B$r9T$C$F!"(B
664.1043 +$B$=$l$i$NJQ99$rM-8z$K$9$kI,MW$,$"$j$^$9!#(B
664.1044 +$B$3$N:n6H$rK:$l$?>l9g!"(B
664.1045 +MQ $B$OE,MQ$5$l$F$$$k%Q%C%A$,$I$l$J$N$+:.Mp$7$F$7$^$&$G$7$g$&!#(B
664.1046 +
664.1047 +\section{$B%Q%C%AA`:n$N$?$a$N%5!<%I%Q!<%F%#!<@=%D!<%k(B}
664.1048 +\label{sec:mq:tools}
664.1049 +
664.1050 +$B;C$/$N4V!"%Q%C%A$r;H$C$?:n6H$r$7$F$$$k$H!"(B
664.1051 +$B07$C$F$$$k%Q%C%A$N2r<a$dA`:n$rJd=u$9$k%D!<%k$,!"(B
664.1052 +$BM_$7$/$F$?$^$i$J$/$J$C$F$$$k$K0c$$$"$j$^$;$s!#(B
664.1053 +
664.1054 +\command{diffstat} $B%3%^%s%I(B ~\cite{web:diffstat} $B$O!"(B
664.1055 +$B%Q%C%A$K$h$C$F3F%U%!%$%k$,$I$l$@$1JQ99$5$l$k$+$rI=$9%R%9%H%0%i%`$r@8@.$7$^$9!#(B
664.1056 +$B$I$N%U%!%$%k$,!"$I$NDxEY$N1F6A$r<u$1$k$N$+!"(B
664.1057 +$B$H$$$C$?A4BNE*$J(B``$B463P$rDO$`(B''$B$K$ONI$$J}K!$G$9(B
664.1058 +$B!J(B\command{diffstat} $B$N(B 
664.1059 +\cmdopt{diffstat}{-p} $B%*%W%7%g%sMxMQ$OL^O@NI$$$N$G$9$,!"(B
664.1060 +$B%U%!%$%kL>$NA0CV;l$KBP$7$F9T$&(B \cmdopt{diffstat}{-p} $B%*%W%7%g%s$N9*L/$J=hM}$O!"(B
664.1061 +$B>/$J$/$H$bI.<T$K$H$C$F$O$o$+$j$K$/$$$G$9!K!#(B
664.1062 +
664.1063 +\begin{figure}[ht]
664.1064 +  \interaction{mq.tools.tools}
664.1065 +  \label{ex:mq:tools}
664.1066 +  \caption{\command{diffstat}$B!"(B\command{filterdiff} $B$*$h$S(B \command{lsdiff} $B%3%^%s%I(B}
664.1067 +\end{figure}
664.1068 +
664.1069 +\package{patchutils} $B%Q%C%1!<%8(B ~\cite{web:patchutils} $B$O5.=E$JB8:_$G$9!#(B
664.1070 +$B$3$N%Q%C%1!<%8$O!"(B
664.1071 +``Unix $B$NM}G0(B''$B$K=>$C$F!"(B
664.1072 +$B$=$l$>$l$,%Q%C%A$KBP$7$FC10l$N=hM}$r9T$&>.$5$J%D!<%k$N=8$^$j$G$9!#(B
664.1073 +\package{patchutils} $B$NCf$GI.<T$,:G$bMxMQ$7$F$$$k$N$O!"(B
664.1074 +$B%Q%C%A%U%!%$%k$+$i0lIt$rE83+$9$k(B \command{filterdiff} $B$G$9!#(B
664.1075 +$BNc$($P!"(B
664.1076 +$B$"$k%Q%C%A$,?t%@!<%9$N%G%#%l%/%H%j$KEO$C$F?tI4$N%U%!%$%k$rJQ99$9$k>l9g!"(B
664.1077 +\command{filterdiff} $B$r5/F0$9$k$3$H$G!"(B
664.1078 +$B;XDj$7$?%Q%?!<%s$KL>A0$,9gCW$9$k%U%!%$%k$K$@$1JQ99$r9T$&!"(B
664.1079 +$B>.$5$J%Q%C%A$r@8@.$9$k$3$H$,=PMh$^$9!#(B
664.1080 +$B$=$l0J30$NNc$K$D$$$F$O!"(B
664.1081 +~\ref{mq-collab:tips:interdiff} $B@a$r;2>H$7$F$/$@$5$$!#(B
664.1082 +
664.1083 +\section{$B%Q%C%A$r07$&NI$$J}K!(B}
664.1084 +
664.1085 +$B0lO"$N%Q%C%A$,!"(B
664.1086 +$B%U%j!<%=%U%H%&%'%"$d%*!<%W%s%=!<%9%W%m%8%'%/%H$XAwIU$9$k$b$N$G$"$m$&$H!"(B
664.1087 +$B$"$J$?$N:n6H$K$*$1$kDj4|E*$JJQ99<jB3$-$H$_$J$5$l$k$b$N$G$"$m$&$H$b!"(B
664.1088 +$B$h$jNI$/:n6H$9$k$?$a$N!"(B
664.1089 +$B4JC1$KMxMQ$G$-$k<jK!$,$"$j$^$9!#(B
664.1090 +
664.1091 +$B$^$:$O!"%Q%C%A$K@bL@E*$JL>A0$r$D$1$^$7$g$&!#(B
664.1092 +$BNc$($P(B \filename{rework-device-alloc.patch} $B$H$$$C$?L>A0$O!"(B
664.1093 +$B$=$N%Q%C%A$,2?$r9T$&$b$N$+$H$$$&%R%s%H$r$9$P$d$/M?$($F$/$l$k$N$G!"(B
664.1094 +$BNI$$L>A0$H8@$($k$G$7$g$&!#(B
664.1095 +$BL>A0$OD9$/$F$bLdBj$K$O$J$j$^$;$s!#(B
664.1096 +$BL>A0$rF~NO$9$k$3$H$O$=$l$[$IB?$/$O$J$$$G$7$g$&$,!"(B
664.1097 +\hgxcmd{mq}{qapplied} $B$d(B \hgxcmd{mq}{qtop} $B$H$$$C$?%3%^%s%I$O!"(B
664.1098 +$B2?EY$b2?EY$b<B9T$9$k$b$N$G$9$+$i!#(B
664.1099 +$BB?$/$N%Q%C%A$r07$&>l9g$d!"(B
664.1100 +$BB?$/$N0[$J$k%?%9%/$K<j0lGU$G%Q%C%A$KB?$/$NCm0U$r3d$1$J$$$h$&$J>l9g!"(B
664.1101 +$BL>A0$NE,@Z$5$O$H$j$o$1=EMW$G$9!#(B
664.1102 +
664.1103 +$B<!$K!"$I$N%Q%C%A$KBP$7$F:n6H$7$F$$$k$N$+$KCm0U$7$^$7$g$&!#(B
664.1104 +\hgxcmd{mq}{qtop} $B%3%^%s%I$r(B
664.1105 +---$BNc$($P!"(B\hgcmdargs{tip}{\hgopt{tip}{-p}} $B$r;XDj$7$D$D(B---
664.1106 +$B;HMQ$7$FIQHK$K%Q%C%A$NL>A0$r8+$k$3$H$G!"(B
664.1107 +$B$I$s$J:n6H$r$7$F$$$k$N$+$r3NG'$7$^$7$g$&!#(B
664.1108 +$BI.<T$O:n6HCf$K2?EY$b0U?^$7$J$$%Q%C%A$KBP$7$F(B
664.1109 +\hgxcmd{mq}{qrefresh} $B$r<B9T$7$F$7$^$C$?$3$H$,$"$j$^$9$,!"(B
664.1110 +$B4V0c$C$?%Q%C%A$K<h$j9~$s$G$7$^$C$?JQ99$r@5$7$$%Q%C%A$K0\F0$5$;$k$N$O!"(B
664.1111 +$B1}!9$K$7$F<j$N$+$+$k$b$N$G$9!#(B
664.1112 +
664.1113 +$B>e5-$NM}M3$+$i!"(B
664.1114 +~\ref{sec:mq:tools} $B@a$G>R2p$7$F$$$k(B
664.1115 +\command{diffstat} $B$d(B \command{filterdiff} 
664.1116 +$B$N$h$&$J%5!<%I%Q!<%F%#!<@=%D!<%k$N3X=,$K!"(B
664.1117 +$B>/$7$G$bNI$$$N$G;~4V$rHq$d$9$Y$-$G$9!#(B
664.1118 +$BA0<T$O%Q%C%A$N5Z$\$9JQ99$K4X$7$F$9$P$d$$8+2r$rF@$k$3$H$,!"(B
664.1119 +$B8e<T$O%Q%C%ACf$N(B hunk 
664.1120 +$B$rA*BrE*$K7Q$.9g$o$;$F0[$J$k%Q%C%A$KAH$_>e$2$k$3$H$,$G$-$^$9!#(B
664.1121 +
664.1122 +\section{MQ $B%/%C%/%V%C%/(B}
664.1123 +
664.1124 +\subsection{``$B:3:Y$J(B''$B%Q%C%A$N4IM}(B}
664.1125 +
664.1126 +$B???7$7$$(B Mercurial $B%j%]%8%H%j$K%U%!%$%k$rEjF~$9$k$N$O!"(B
664.1127 +$BHs>o$K%*!<%P!<%X%C%I$,Dc$$$N$G!"(B
664.1128 +$BC1$K%@%&%s%m!<%I$7$?%=!<%9(B tarball $B$KBP$7$FJQ99$r2C$($k$N$@$H$7$F$b!"(B
664.1129 +MQ $B$K$h$j%Q%C%A4IM}$r9T$&$3$H$OHs>o$KM}$K$+$J$C$F$$$^$9!#(B
664.1130 +
664.1131 +$B$^$:$O%=!<%9(B tarball $B$N%@%&%s%m!<%I$HE83+$r9T$$!"(B
664.1132 +Mercurial $B%j%]%8%H%j$KEjF~$7$^$9!#(B
664.1133 +
664.1134 +\interaction{mq.tarball.download}
664.1135 +
664.1136 +$B<!$K%Q%C%A%9%?%C%/$r:n@.$7!"JQ99$r9T$$$^$9!#(B
664.1137 +
664.1138 +\interaction{mq.tarball.qinit}
664.1139 +
664.1140 +$B?t=54V$+$i?t%u7n7P$C$F$+$i!"(B
664.1141 +$B$=$N%Q%C%1!<%8$NCx<T$,?7$7$$HG$r%j%j!<%9$7$?$H$7$^$9!#(B
664.1142 +$B$^$:$O%j%]%8%H%j$KJQ99$r<h$j9~$_$^$9!#(B
664.1143 +
664.1144 +\interaction{mq.tarball.newsource}
664.1145 +
664.1146 +$B>e5-<j=g$G(B \hgcmd{locate} $B$K$h$j;O$^$k%Q%$%W%i%$%s$O!"(B
664.1147 +$B:n6HNN0h%G%#%l%/%H%jCf$NA4$F$N%U%!%$%k$r:o=|$7$^$9$N$G!"(B
664.1148 +\hgcmd{commit} $B$N(B \hgopt{commit}{--addremove} $B%*%W%7%g%s$O!"(B
664.1149 +$B?7$7$$HG$K$*$$$F$I$N%U%!%$%k$,K\Ev$KDI2C!?:o=|$5$l$?$N$+$rH=Dj$G$-$^$9!#(B
664.1150 +
664.1151 +$B:G8e$K!"?7$7$/$J$C$?%=!<%9%D%j!<$N:G>e0L$G%Q%C%A$rE,MQ$7$^$9!#(B
664.1152 +
664.1153 +\interaction{mq.tarball.repush}
664.1154 +
664.1155 +\subsection{$B%Q%C%AA4BN$N7k9g(B}
664.1156 +\label{sec:mq:combine}
664.1157 +
664.1158 +MQ $B$O%Q%C%AA4BN$r7k9g$9$k(B
664.1159 +\hgxcmd{mq}{qfold} $B%3%^%s%I$rDs6!$7$F$$$^$9!#(B
664.1160 +$B$3$N%3%^%s%I$O!"(B
664.1161 +$BL>A0$r;XDj$7$?%Q%C%A$r;XDj$7$?=g=x$G!"(B
664.1162 +$B:G>e0L$NE,MQ:Q$_%Q%C%A$X$H(B``$B7k9g(B''$B$7!"(B
664.1163 +$B$=$l$i$N@bL@J8$r:G>e0L%Q%C%A$N@bL@J8KvHx$XDI2C$7$^$9!#(B
664.1164 +$B7k9gBP>]$N%Q%C%A$O!"7k9g$N;~E@$GL$E,MQ$G$J$1$l$P$J$j$^$;$s!#(B
664.1165 +
664.1166 +$B%Q%C%A$N7k9g=g=x$O=EMW$G$9!#(B
664.1167 +$B:G>e0L$NE,MQ:Q$_%Q%C%A$,(B \texttt{foo} $B$G!"(B
664.1168 +$B$=$3$K(B \hgxcmd{mq}{qfold} $B$H(B \texttt{quux} $B$r(B
664.1169 +\hgxcmd{mq}{qfold} $B$9$k>l9g!"(B
664.1170 +$B=g$K(B \texttt{foo}$B!"(B\texttt{bar} $B$=$7$F(B \texttt{quux} 
664.1171 +$B$HE,MQ$9$k$N$HF1$88z2L$r;}$D%Q%C%A$,$G$-$"$,$j$^$9!#(B
664.1172 +
664.1173 +\subsection{$B%Q%C%A$N0lIt$NB>$N%Q%C%A$X$NJ;9g(B}
664.1174 +
664.1175 +$B%Q%C%A$N(B\emph{$B0lIt(B}$B$rB>$N%Q%C$XJ;9g$9$k$N$O!"(B
664.1176 +$B%Q%C%AA4BN$r7k9g$9$k$h$j$bLLE]$G$9!#(B
664.1177 +
664.1178 +$B$"$k%U%!%$%k!J72!K$KBP$9$kJQ99A4BN$r0\F0$7$?$$>l9g!"(B
664.1179 +\command{filterdiff} $B$N(B \cmdopt{filterdiff}{-i} $B$*$h$S(B
664.1180 +\cmdopt{filterdiff}{-x} $B%*%W%7%g%s$rMQ$$$k$3$H$G!"(B
664.1181 +$B%Q%C%A$+$i@Z$j=P$9JQ99E@$rA*Br$7$F!"(B
664.1182 +$B$=$N7k2L$rJ;9g@h%Q%C%A$X$H<h$j9~$`$3$H$G$,$G$-$^$9!#(B
664.1183 +$BDL>o$O<h$j9~$_85$H$J$C$?%Q%C%A$=$N$b$N$OJQ99$7$?$/$J$$$b$N$G$9!#(B
664.1184 +$B$=$3$G!"(B
664.1185 +MQ $B$O<h$j9~$_85%Q%C%A$r(B \hgxcmd{mq}{qpush} $B$9$k:]$K!"(B
664.1186 +$B<h$j9~$^$l$?J,$N(B hunk $B$,5qH]$5$l$?$3$H$,Js9p$5$l$^$9$+$i!"(B
664.1187 +\hgxcmd{mq}{qrefresh} $B$G%Q%C%A$r99?7$9$k$3$H$G!"(B
664.1188 +$B=EJ#$7$?(B hunk $B$r<h$j=|$/$3$H$,$G$-$^$9!#(B
664.1189 +
664.1190 +$B#1$D$N%U%!%$%k$KBP$9$kJ#?t$N(B hunk $B$r;}$D%Q%C%A$N0lIt$@$1$,M_$7$$>l9g!"(B
664.1191 +$B;vBV$O$b$&>/$7Lq2p$G$9$,!"(B
664.1192 +$B$=$l$G$bItJ,E*$K<+F02=$9$k$3$H$,$G$-$^$9!#(B
664.1193 +\cmdargs{lsdiff}{-nvv} $B$r;H$&$3$H$G!"(B
664.1194 +$B%Q%C%A$K4X$9$k%a%?%G!<%?$rI=<($5$;$^$9!#(B
664.1195 +
664.1196 +\interaction{mq.tools.lsdiff}
664.1197 +
664.1198 +$B$3$N%3%^%s%I$O!"#3$D$N0[$J$k?tCM$NN`$rI=<($7$^$9!#(B
664.1199 +
664.1200 +\begin{itemize}
664.1201 +\item $B!J:G=i$N%+%i%`$O!K2~JQBP>]$N8D!9$N%U%!%$%k$r%Q%C%ACf$G<1JL$9$k$?$a$N(B
664.1202 + \emph{$B%U%!%$%kHV9f(B}$B$G!"(B
664.1203 +
664.1204 +\item $B!J;z2<$2$5$l$?<!$N9T$K$O!KJQ99$5$l$k%U%!%$%k$G$N(B hunk $B$N3+;O9THV9f$H!"(B
664.1205 +
664.1206 +\item $B!JF1$89T$K!K(Bhunk $B$r<1JL$9$k$?$a$N(B \emph{hunk $BHV9f(B}
664.1207 +
664.1208 +\end{itemize}
664.1209 +
664.1210 +$BI,MW$J%U%!%$%kHV9f$d(B hunk $BHV9f$rFCDj$9$k$?$a$K$O!"(B
664.1211 +$B;k3PE*$J@:::$d%Q%C%A$NFI2r$,I,MW$H$5$l$^$9$,!"(B
664.1212 +$B$=$l$i$N?tCM$r(B \command{filterdiff} $B$N(B
664.1213 +\cmdopt{filterdiff}{--files} $B$d(B
664.1214 +\cmdopt{filterdiff}{--hunks} $B$H$$$C$?%*%W%7%g%s$K;XDj$9$k$3$H$G!"(B
664.1215 +$B%U%!%$%k$d(B hunk $B$r@53N$KA*Br$9$k$3$H$,$G$-$^$9!#(B
664.1216 +
664.1217 +$B0lEY(B hunk $B$r<h$j=P$7$F$7$^$($P!"(B
664.1218 +$B7k9g@h%Q%C%A$NKvHx$K7k9g$7$F(B
664.1219 +~\ref{sec:mq:combine} $B@a$N;D$j$N:n6H$r:F3+$9$k$3$H$,$G$-$^$9!#(B
664.1220 +
664.1221 +\section{quilt $B$H(B MQ $B$N0c$$(B}
664.1222 +
664.1223 +$B4{$K(B quilt $B$r=OCN$7$F$$$k$N$G$"$l$P!"(B
664.1224 +MQ $B$OF1MM$N%3%^%s%I72$r;}$C$F$$$^$9$,!"(B
664.1225 +$B$=$NF/$-$K$O$$$/$i$+$N0c$$$,$"$j$^$9!#(B
664.1226 +
664.1227 +$BKX$I$N(B quilt $B%3%^%s%I$KBP$7$F!"(B
664.1228 +``\texttt{q}'' $B$G;O$^$kBP1~$9$k(B 
664.1229 +MQ $B$N%3%^%s%I$,$"$k$3$H$K5$IU$/$3$H$G$7$g$&!#(B
664.1230 +$BC"$7!"(B
664.1231 +quilt $B$N(B \texttt{add} $B$*$h$S(B \texttt{remove} $B%3%^%s%I$KBP1~$9$k$N$,!"(B
664.1232 +Mercurial $B$NDL>o$N(B \hgcmd{add} $B$*$h$S(B \hgcmd{remove} $B$G$"$k$N$,Nc30$G$9!#(B
664.1233 +$B$^$?!"(BMQ $B$K$O(B quilt $B$N(B \texttt{edit} $B$KBP1~$9$k%3%^%s%I$O$"$j$^$;$s!#(B
664.1234 +
664.1235 +%%% Local Variables: 
664.1236 +%%% mode: latex
664.1237 +%%% TeX-master: "00book"
664.1238 +%%% End: 
   665.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   665.2 +++ b/ja/preface.tex	Sun Aug 16 03:41:39 2009 +0200
   665.3 @@ -0,0 +1,86 @@
   665.4 +\chapter*{Preface}
   665.5 +\addcontentsline{toc}{chapter}{Preface}
   665.6 +\label{chap:preface}
   665.7 +
   665.8 +$BJ,;69=@.4IM}$O!"Hf3SE*?7$7$$NN0h$G$"$j!"(B
   665.9 +$BL$3+$NCO$r@Z$j3+$3$&$H$9$k?M!9$N0UM_$K$h$C$F!"(B
  665.10 +$BH/E8Cx$7$$$b$N$,$"$j$^$9!#(B
  665.11 +
  665.12 +$B;d$,J,;69=@.4IM}$K4X$7$FI.$r<9$C$F$$$k$N$O!"(B
  665.13 +$B$3$NJ,Ln$,<j0z$-=q$r=q$/2ACM$N$"$k=EMW$J%F!<%^$G$"$k$H$$$&3N?.$+$i$G$9!#(B
  665.14 +$B<9I.$NBj:`$H$7$F(B Mercurial $B$rA*Br$7$?$N$O!"(B
  665.15 +$BJ,;69=@.4IM}$N35MW$r3X=,$9$k$N$KE,$7$?MF0W$5$H!"(B
  665.16 +$BB>$NB?$/$N9=@.4IM}%D!<%k$G$OE,MQ$NFq$7$$<BA)$N>l$+$i$NMWK>$X$NE,MQ@-$N!"(B
  665.17 +$B#2$D$rJ;$;;}$C$F$$$k$?$a$G$9!#(B
  665.18 +
  665.19 +\section{This book is a work in progress}
  665.20 +
  665.21 +$BK\=q$O!"(B
  665.22 +$BFI<T$NLr$KN)$D$3$H$r4j$C$F!"(B
  665.23 +$B<9I.ESCf$+$i8x3+$7$F$$$^$9!#(B
  665.24 +$B$=$N0lJ}$G!"(B
  665.25 +$BFI<T$,K\=q$rMxMQ$9$k$3$H$,!"(B
  665.26 +$B0l<o$N::FI$H$7$F5!G=$9$k$3$H$b4|BT$7$F$$$^$9!#(B
  665.27 +
  665.28 +\section{About the examples in this book}
  665.29 +\label{sec:automated-example-running}
  665.30 +
  665.31 +$BK\=q$G$O!"(B
  665.32 +$B%3!<%I$N%5%s%W%k$K4X$7$F!"(B
  665.33 +$BDLNc$H$O0[$J$k<jK!$r:NMQ$7$F$$$^$9!#(B
  665.34 +$BA4$F$N%5%s%W%k$O(B``$B@8$-$?(B''---
  665.35 +$B%7%'%k%9%/%j%W%H$K$h$j<B:]$K(B
  665.36 +Mercurial $B%3%^%s%I$r<B9T$7$?7k2L$r;HMQ$7$?(B
  665.37 +---$B%5%s%W%k$G$9!#(B
  665.38 +$BK\=q$O>o$K%=!<%9%U%!%$%k$+$i!V%S%k%I!W$5$l!"(B
  665.39 +$BA4$F$N%5%s%W%k%9%/%j%W%H$N<+F0<B9T$H!"(B
  665.40 +$B$=$N7k2L$H4|BT$9$k7k2L$H$NHf3S$,9T$o$l$^$9!#(B
  665.41 +
  665.42 +$B$3$N<jK!$NMxE@$O!"(B
  665.43 +$BK\=q$,KAF,$G8@5Z$7$F$$$k(B 
  665.44 +Mercurial $B$NHG$K$*$1$k?6$kIq$$$r(B\emph{$B87L)$K(B}$B5-=R$7$F$$$k$3$H$K$J$k$?$a!"(B
  665.45 +$B%5%s%W%k$,>o$K@53N$G$"$kE@$K$"$j$^$9!#(B
  665.46 +$B<9I.BP>]$H$J$k(B Mercurial $B$NHG$rJQ99$7!"(B
  665.47 +$B$=$N7k2L%3%^%s%I$N=PNO$,JQ2=$7$?>l9g!"(B
  665.48 +$BK\=q$N%S%k%I$O<:GT$7$^$9!#(B
  665.49 +
  665.50 +$B$3$N<jK!$N$o$:$+$J7gE@$O!"(B
  665.51 +$B%5%s%W%k$K$*$$$FL\$K$9$kF|;~>pJs$,!"(B
  665.52 +$BF1$8%3%^%s%I$r?M<j$GF~NO$7$?:]$H$O0[$J$kJ}K!$G!"(B
  665.53 +``$B2!$7DY$5$l(B''$B$,$A$JE@$G$9!#(B
  665.54 +$BJ#?t$N%3%^%s%I$rKhICF~NO$7B3$1$k$N$O?M<j$G$OL5M}$G$9$,!"(B
  665.55 +$BNc<($5$l$F$$$k<B9T7k2L$NF|;~>pJs$K$h$l$P!"(B
  665.56 +$BK\=q$N%S%k%I$K;HMQ$5$l$k<+F02=%9%/%j%W%H$O!"(B
  665.57 +$B#1IC4V$K<B$KB?$/$N%3%^%s%I$r<B9T$7$F$$$^$9!#(B
  665.58 +
  665.59 +$B$3$N$?$a!"(B
  665.60 +$BK\=q$N%5%s%W%k$K$*$1$kO"B3$7$?J#?t2s$N%3%_%C%H$O!"(B
  665.61 +$B$^$k$GF10l;~9o$K5/$-$?$3$H$N$h$&$K8+$($^$9!#(B
  665.62 +$B$3$N8=>]$O(B
  665.63 +\ref{sec:undo:bisect}~$B@a$K$*$1$k(B
  665.64 +\hgext{bisect} $B$NNc$K8+$k$3$H$,$G$-$^$9!#(B
  665.65 +
  665.66 +$B0J>e$N$3$H$+$i!"(B
  665.67 +$BK\=q$N%5%s%W%k$r8+$k:]$K$O!"(B
  665.68 +$B%3%^%s%I$N=PNO$K$*$1$kF|;~>pJs$K!"(B
  665.69 +$BI,MW0J>e$NCm0U$rJ'$o$J$$$h$&$K$7$F$/$@$5$$!#(B
  665.70 +$B$=$NBe$o$j!"(B
  665.71 +$B%5%s%W%k$K$*$$$FL\$K$9$k5sF0$d!"$=$N:F8=@-$K4X$7$F$O!"(B
  665.72 +\emph{$B3N?.(B}$B$r;}$C$F$$$?$@$$$F9=$$$^$;$s!#(B
  665.73 +
  665.74 +\section{Colophon---this book is Free}
  665.75 +
  665.76 +$BK\=q$O(B
  665.77 +Open Publication License $B2<$K$*$1$kMxMQ$r5v2D$7!"(B
  665.78 +$B$b$C$Q$i(B Free Software $B%D!<%k$r;HMQ$7$F@8@.$5$l$^$9!#(B
  665.79 +$BAHHG$K$O(B \LaTeX{}$B!"(B
  665.80 +$B?^HG$K$O(B \href{http://www.inkscape.org/}{Inkscape} $B$r;HMQ$7$F$$$^$9!#(B
  665.81 +
  665.82 +$BK\=q$NA4%=!<%9%3!<%I$O!"(B
  665.83 +\url{http://hg.serpentine.com/mercurial/book} 
  665.84 +$B$K$"$k(B Mercurial $B%j%]%8%H%j$G8x3+$5$l$F$$$^$9!#(B
  665.85 +
  665.86 +%%% Local Variables: 
  665.87 +%%% mode: latex
  665.88 +%%% TeX-master: "00book"
  665.89 +%%% End: 
   666.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   666.2 +++ b/ja/revlog.svg	Sun Aug 16 03:41:39 2009 +0200
   666.3 @@ -0,0 +1,1155 @@
   666.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   666.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   666.6 +<svg
   666.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   666.8 +   xmlns:cc="http://web.resource.org/cc/"
   666.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  666.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  666.11 +   xmlns="http://www.w3.org/2000/svg"
  666.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  666.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  666.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  666.15 +   width="744.09448819"
  666.16 +   height="1052.3622047"
  666.17 +   id="svg2"
  666.18 +   sodipodi:version="0.32"
  666.19 +   inkscape:version="0.44.1"
  666.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  666.21 +   sodipodi:docname="revlog.svg">
  666.22 +  <defs
  666.23 +     id="defs4">
  666.24 +    <marker
  666.25 +       inkscape:stockid="Arrow1Mend"
  666.26 +       orient="auto"
  666.27 +       refY="0.0"
  666.28 +       refX="0.0"
  666.29 +       id="Arrow1Mend"
  666.30 +       style="overflow:visible;">
  666.31 +      <path
  666.32 +         id="path4852"
  666.33 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  666.34 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  666.35 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  666.36 +    </marker>
  666.37 +    <linearGradient
  666.38 +       id="linearGradient3092">
  666.39 +      <stop
  666.40 +         style="stop-color:#44436f;stop-opacity:1;"
  666.41 +         offset="0"
  666.42 +         id="stop3094" />
  666.43 +      <stop
  666.44 +         style="stop-color:#abade5;stop-opacity:1;"
  666.45 +         offset="1"
  666.46 +         id="stop3096" />
  666.47 +    </linearGradient>
  666.48 +    <linearGradient
  666.49 +       inkscape:collect="always"
  666.50 +       xlink:href="#linearGradient3092"
  666.51 +       id="linearGradient3118"
  666.52 +       gradientUnits="userSpaceOnUse"
  666.53 +       x1="176.16635"
  666.54 +       y1="405.21934"
  666.55 +       x2="417.11935"
  666.56 +       y2="405.21934" />
  666.57 +    <linearGradient
  666.58 +       inkscape:collect="always"
  666.59 +       xlink:href="#linearGradient3092"
  666.60 +       id="linearGradient3120"
  666.61 +       gradientUnits="userSpaceOnUse"
  666.62 +       x1="176.16635"
  666.63 +       y1="405.21934"
  666.64 +       x2="417.11935"
  666.65 +       y2="405.21934" />
  666.66 +    <linearGradient
  666.67 +       inkscape:collect="always"
  666.68 +       xlink:href="#linearGradient3092"
  666.69 +       id="linearGradient3129"
  666.70 +       gradientUnits="userSpaceOnUse"
  666.71 +       x1="176.16635"
  666.72 +       y1="405.21934"
  666.73 +       x2="417.11935"
  666.74 +       y2="405.21934"
  666.75 +       gradientTransform="translate(-0.928574,-1.428574)" />
  666.76 +    <linearGradient
  666.77 +       inkscape:collect="always"
  666.78 +       xlink:href="#linearGradient3092"
  666.79 +       id="linearGradient3133"
  666.80 +       gradientUnits="userSpaceOnUse"
  666.81 +       x1="176.16635"
  666.82 +       y1="405.21934"
  666.83 +       x2="417.11935"
  666.84 +       y2="405.21934"
  666.85 +       gradientTransform="translate(-0.928574,-1.428574)" />
  666.86 +    <linearGradient
  666.87 +       inkscape:collect="always"
  666.88 +       xlink:href="#linearGradient3092"
  666.89 +       id="linearGradient3708"
  666.90 +       gradientUnits="userSpaceOnUse"
  666.91 +       gradientTransform="matrix(0.423343,0,0,0.423343,138.874,-67.01732)"
  666.92 +       x1="175.23776"
  666.93 +       y1="509.98154"
  666.94 +       x2="416.29077"
  666.95 +       y2="297.49997" />
  666.96 +    <linearGradient
  666.97 +       inkscape:collect="always"
  666.98 +       xlink:href="#linearGradient3092"
  666.99 +       id="linearGradient5164"
 666.100 +       gradientUnits="userSpaceOnUse"
 666.101 +       gradientTransform="matrix(0.423343,0,0,0.423343,198.249,247.4358)"
 666.102 +       x1="175.23776"
 666.103 +       y1="509.98154"
 666.104 +       x2="416.29077"
 666.105 +       y2="297.49997" />
 666.106 +    <linearGradient
 666.107 +       inkscape:collect="always"
 666.108 +       xlink:href="#linearGradient3092"
 666.109 +       id="linearGradient5584"
 666.110 +       gradientUnits="userSpaceOnUse"
 666.111 +       gradientTransform="matrix(0.423343,0,0,0.423343,143.9081,371.2915)"
 666.112 +       x1="175.23776"
 666.113 +       y1="509.98154"
 666.114 +       x2="416.29077"
 666.115 +       y2="297.49997" />
 666.116 +    <linearGradient
 666.117 +       inkscape:collect="always"
 666.118 +       xlink:href="#linearGradient3092"
 666.119 +       id="linearGradient5784"
 666.120 +       gradientUnits="userSpaceOnUse"
 666.121 +       gradientTransform="matrix(0.423343,0,0,0.423343,76.37397,152.137)"
 666.122 +       x1="175.23776"
 666.123 +       y1="509.98154"
 666.124 +       x2="416.29077"
 666.125 +       y2="297.49997" />
 666.126 +    <linearGradient
 666.127 +       inkscape:collect="always"
 666.128 +       xlink:href="#linearGradient3092"
 666.129 +       id="linearGradient5786"
 666.130 +       gradientUnits="userSpaceOnUse"
 666.131 +       gradientTransform="matrix(0.423343,0,0,0.423343,198.249,152.137)"
 666.132 +       x1="175.23776"
 666.133 +       y1="509.98154"
 666.134 +       x2="416.29077"
 666.135 +       y2="297.49997" />
 666.136 +    <linearGradient
 666.137 +       inkscape:collect="always"
 666.138 +       xlink:href="#linearGradient3092"
 666.139 +       id="linearGradient5895"
 666.140 +       gradientUnits="userSpaceOnUse"
 666.141 +       gradientTransform="matrix(0.423343,0,0,0.423343,198.0215,261.7142)"
 666.142 +       x1="175.23776"
 666.143 +       y1="509.98154"
 666.144 +       x2="416.29077"
 666.145 +       y2="297.49997" />
 666.146 +    <linearGradient
 666.147 +       inkscape:collect="always"
 666.148 +       xlink:href="#linearGradient3092"
 666.149 +       id="linearGradient5958"
 666.150 +       gradientUnits="userSpaceOnUse"
 666.151 +       gradientTransform="matrix(0.423343,0,0,0.423343,137.1978,42.55987)"
 666.152 +       x1="175.23776"
 666.153 +       y1="509.98154"
 666.154 +       x2="416.29077"
 666.155 +       y2="297.49997" />
 666.156 +  </defs>
 666.157 +  <sodipodi:namedview
 666.158 +     id="base"
 666.159 +     pagecolor="#ffffff"
 666.160 +     bordercolor="#666666"
 666.161 +     borderopacity="1.0"
 666.162 +     gridtolerance="10000"
 666.163 +     guidetolerance="10"
 666.164 +     objecttolerance="10"
 666.165 +     inkscape:pageopacity="0.0"
 666.166 +     inkscape:pageshadow="2"
 666.167 +     inkscape:zoom="0.64"
 666.168 +     inkscape:cx="566.02368"
 666.169 +     inkscape:cy="688.16826"
 666.170 +     inkscape:document-units="px"
 666.171 +     inkscape:current-layer="layer1"
 666.172 +     inkscape:window-width="906"
 666.173 +     inkscape:window-height="620"
 666.174 +     inkscape:window-x="29"
 666.175 +     inkscape:window-y="79"
 666.176 +     inkscape:connector-spacing="11" />
 666.177 +  <metadata
 666.178 +     id="metadata7">
 666.179 +    <rdf:RDF>
 666.180 +      <cc:Work
 666.181 +         rdf:about="">
 666.182 +        <dc:format>image/svg+xml</dc:format>
 666.183 +        <dc:type
 666.184 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 666.185 +      </cc:Work>
 666.186 +    </rdf:RDF>
 666.187 +  </metadata>
 666.188 +  <g
 666.189 +     inkscape:label="Layer 1"
 666.190 +     inkscape:groupmode="layer"
 666.191 +     id="layer1">
 666.192 +    <rect
 666.193 +       y="168.74846"
 666.194 +       x="211.58516"
 666.195 +       height="89.506805"
 666.196 +       width="101.60232"
 666.197 +       id="rect3068"
 666.198 +       style="fill:url(#linearGradient5958);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 666.199 +    <g
 666.200 +       id="g3215"
 666.201 +       transform="matrix(0.423343,0,0,0.423343,137.1977,42.55985)">
 666.202 +      <rect
 666.203 +         y="447.71451"
 666.204 +         x="299.67859"
 666.205 +         height="48.571426"
 666.206 +         width="103.14286"
 666.207 +         id="rect2899"
 666.208 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 666.209 +      <text
 666.210 +         id="text2903"
 666.211 +         y="464.8139"
 666.212 +         x="308.89639"
 666.213 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.214 +         xml:space="preserve"><tspan
 666.215 +           y="464.8139"
 666.216 +           x="308.89639"
 666.217 +           sodipodi:role="line"
 666.218 +           id="tspan2905">Second parent</tspan></text>
 666.219 +      <text
 666.220 +         id="text2907"
 666.221 +         y="485.50256"
 666.222 +         x="308.20175"
 666.223 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.224 +         xml:space="preserve"><tspan
 666.225 +           style="font-family:Courier"
 666.226 +           y="485.50256"
 666.227 +           x="308.20175"
 666.228 +           id="tspan2909"
 666.229 +           sodipodi:role="line">32bf9a5f22c0</tspan></text>
 666.230 +    </g>
 666.231 +    <g
 666.232 +       id="g3250"
 666.233 +       transform="matrix(0.423343,0,0,0.423343,137.1977,42.55986)">
 666.234 +      <rect
 666.235 +         y="311.28598"
 666.236 +         x="188.6071"
 666.237 +         height="48.571426"
 666.238 +         width="103.14286"
 666.239 +         id="rect2936"
 666.240 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 666.241 +      <text
 666.242 +         id="text2940"
 666.243 +         y="328.38538"
 666.244 +         x="197.82495"
 666.245 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.246 +         xml:space="preserve"><tspan
 666.247 +           y="328.38538"
 666.248 +           x="197.82495"
 666.249 +           sodipodi:role="line"
 666.250 +           id="tspan2942">Revision hash</tspan></text>
 666.251 +      <text
 666.252 +         id="text2944"
 666.253 +         y="349.07404"
 666.254 +         x="197.13031"
 666.255 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.256 +         xml:space="preserve"><tspan
 666.257 +           style="font-family:Courier"
 666.258 +           y="349.07404"
 666.259 +           x="197.13031"
 666.260 +           id="tspan2946"
 666.261 +           sodipodi:role="line">34b8b7a15ea1</tspan></text>
 666.262 +    </g>
 666.263 +    <g
 666.264 +       id="g3243"
 666.265 +       transform="matrix(0.423343,0,0,0.423343,137.6664,43.91853)">
 666.266 +      <rect
 666.267 +         y="363.07654"
 666.268 +         x="187.5"
 666.269 +         height="75"
 666.270 +         width="213.85715"
 666.271 +         id="rect2950"
 666.272 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 666.273 +      <text
 666.274 +         id="text2958"
 666.275 +         y="400.86459"
 666.276 +         x="196.02321"
 666.277 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.278 +         xml:space="preserve"><tspan
 666.279 +           style="fill:black;fill-opacity:1;font-family:Courier"
 666.280 +           y="400.86459"
 666.281 +           x="196.02321"
 666.282 +           id="tspan2960"
 666.283 +           sodipodi:role="line">...</tspan></text>
 666.284 +      <text
 666.285 +         id="text2954"
 666.286 +         y="380.17593"
 666.287 +         x="196.71785"
 666.288 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.289 +         xml:space="preserve"><tspan
 666.290 +           y="380.17593"
 666.291 +           x="196.71785"
 666.292 +           sodipodi:role="line"
 666.293 +           id="tspan2956"
 666.294 +           style="fill:black;fill-opacity:1">Revision data (delta or snapshot)</tspan></text>
 666.295 +    </g>
 666.296 +    <g
 666.297 +       id="g5529"
 666.298 +       transform="translate(-6.710312,-8.165836e-6)">
 666.299 +      <rect
 666.300 +         style="fill:url(#linearGradient5584);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.301 +         id="rect3509"
 666.302 +         width="101.60232"
 666.303 +         height="89.506805"
 666.304 +         x="218.29547"
 666.305 +         y="497.4801" />
 666.306 +      <g
 666.307 +         transform="matrix(0.423343,0,0,0.423343,143.908,371.2915)"
 666.308 +         id="g3513">
 666.309 +        <g
 666.310 +           id="g3515">
 666.311 +          <rect
 666.312 +             y="447.72418"
 666.313 +             x="188.6071"
 666.314 +             height="48.571426"
 666.315 +             width="103.14286"
 666.316 +             id="rect3517"
 666.317 +             style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 666.318 +          <text
 666.319 +             id="text3519"
 666.320 +             y="464.82358"
 666.321 +             x="197.82495"
 666.322 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.323 +             xml:space="preserve"><tspan
 666.324 +               y="464.82358"
 666.325 +               x="197.82495"
 666.326 +               sodipodi:role="line"
 666.327 +               id="tspan3521">First parent</tspan></text>
 666.328 +          <text
 666.329 +             id="text3523"
 666.330 +             y="485.51224"
 666.331 +             x="197.13031"
 666.332 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.333 +             xml:space="preserve"><tspan
 666.334 +               style="font-family:Courier"
 666.335 +               y="485.51224"
 666.336 +               x="197.13031"
 666.337 +               id="tspan3525"
 666.338 +               sodipodi:role="line">000000000000</tspan></text>
 666.339 +        </g>
 666.340 +        <g
 666.341 +           id="g3527">
 666.342 +          <rect
 666.343 +             y="447.71451"
 666.344 +             x="299.67859"
 666.345 +             height="48.571426"
 666.346 +             width="103.14286"
 666.347 +             id="rect3529"
 666.348 +             style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 666.349 +          <text
 666.350 +             id="text3531"
 666.351 +             y="464.8139"
 666.352 +             x="308.89639"
 666.353 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.354 +             xml:space="preserve"><tspan
 666.355 +               y="464.8139"
 666.356 +               x="308.89639"
 666.357 +               sodipodi:role="line"
 666.358 +               id="tspan3533">Second parent</tspan></text>
 666.359 +          <text
 666.360 +             id="text3535"
 666.361 +             y="485.50256"
 666.362 +             x="308.20175"
 666.363 +             style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.364 +             xml:space="preserve"><tspan
 666.365 +               style="font-family:Courier"
 666.366 +               y="485.50256"
 666.367 +               x="308.20175"
 666.368 +               id="tspan3537"
 666.369 +               sodipodi:role="line">000000000000</tspan></text>
 666.370 +        </g>
 666.371 +      </g>
 666.372 +      <g
 666.373 +         transform="matrix(0.423343,0,0,0.423343,143.908,371.2915)"
 666.374 +         id="g3539">
 666.375 +        <rect
 666.376 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.377 +           id="rect3541"
 666.378 +           width="103.14286"
 666.379 +           height="48.571426"
 666.380 +           x="188.6071"
 666.381 +           y="311.28598" />
 666.382 +        <text
 666.383 +           xml:space="preserve"
 666.384 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.385 +           x="197.82495"
 666.386 +           y="328.38538"
 666.387 +           id="text3543"><tspan
 666.388 +             id="tspan3545"
 666.389 +             sodipodi:role="line"
 666.390 +             x="197.82495"
 666.391 +             y="328.38538">Revision hash</tspan></text>
 666.392 +        <text
 666.393 +           xml:space="preserve"
 666.394 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.395 +           x="197.13031"
 666.396 +           y="349.07404"
 666.397 +           id="text3547"><tspan
 666.398 +             sodipodi:role="line"
 666.399 +             id="tspan3549"
 666.400 +             x="197.13031"
 666.401 +             y="349.07404"
 666.402 +             style="font-family:Courier">ff9dc8bc2a8b</tspan></text>
 666.403 +      </g>
 666.404 +      <g
 666.405 +         transform="matrix(0.423343,0,0,0.423343,144.3767,372.6502)"
 666.406 +         id="g3551">
 666.407 +        <rect
 666.408 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.409 +           id="rect3553"
 666.410 +           width="213.85715"
 666.411 +           height="75"
 666.412 +           x="187.5"
 666.413 +           y="363.07654" />
 666.414 +        <text
 666.415 +           xml:space="preserve"
 666.416 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.417 +           x="196.02321"
 666.418 +           y="400.86459"
 666.419 +           id="text3555"><tspan
 666.420 +             sodipodi:role="line"
 666.421 +             id="tspan3557"
 666.422 +             x="196.02321"
 666.423 +             y="400.86459"
 666.424 +             style="fill:black;fill-opacity:1;font-family:Courier">...</tspan></text>
 666.425 +        <text
 666.426 +           xml:space="preserve"
 666.427 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.428 +           x="196.71785"
 666.429 +           y="380.17593"
 666.430 +           id="text3559"><tspan
 666.431 +             style="fill:black;fill-opacity:1"
 666.432 +             id="tspan3561"
 666.433 +             sodipodi:role="line"
 666.434 +             x="196.71785"
 666.435 +             y="380.17593">Revision data (delta or snapshot)</tspan></text>
 666.436 +      </g>
 666.437 +    </g>
 666.438 +    <g
 666.439 +       id="g4868"
 666.440 +       transform="translate(-1.676208,-2.342463e-5)">
 666.441 +      <rect
 666.442 +         style="fill:url(#linearGradient3708);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.443 +         id="rect3567"
 666.444 +         width="101.60232"
 666.445 +         height="89.506805"
 666.446 +         x="213.26137"
 666.447 +         y="59.171272" />
 666.448 +      <g
 666.449 +         transform="matrix(0.423343,0,0,0.423343,138.8739,-67.01734)"
 666.450 +         id="g3573">
 666.451 +        <rect
 666.452 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.453 +           id="rect3575"
 666.454 +           width="103.14286"
 666.455 +           height="48.571426"
 666.456 +           x="188.6071"
 666.457 +           y="447.72418" />
 666.458 +        <text
 666.459 +           xml:space="preserve"
 666.460 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.461 +           x="197.82495"
 666.462 +           y="464.82358"
 666.463 +           id="text3577"><tspan
 666.464 +             id="tspan3579"
 666.465 +             sodipodi:role="line"
 666.466 +             x="197.82495"
 666.467 +             y="464.82358">First parent</tspan></text>
 666.468 +        <text
 666.469 +           xml:space="preserve"
 666.470 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.471 +           x="197.13031"
 666.472 +           y="485.51224"
 666.473 +           id="text3581"><tspan
 666.474 +             sodipodi:role="line"
 666.475 +             id="tspan3583"
 666.476 +             x="197.13031"
 666.477 +             y="485.51224"
 666.478 +             style="font-family:Courier">34b8b7a15ea1</tspan></text>
 666.479 +      </g>
 666.480 +      <g
 666.481 +         transform="matrix(0.423343,0,0,0.423343,138.8739,-67.01734)"
 666.482 +         id="g3585">
 666.483 +        <rect
 666.484 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.485 +           id="rect3587"
 666.486 +           width="103.14286"
 666.487 +           height="48.571426"
 666.488 +           x="299.67859"
 666.489 +           y="447.71451" />
 666.490 +        <text
 666.491 +           xml:space="preserve"
 666.492 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.493 +           x="308.89639"
 666.494 +           y="464.8139"
 666.495 +           id="text3589"><tspan
 666.496 +             id="tspan3591"
 666.497 +             sodipodi:role="line"
 666.498 +             x="308.89639"
 666.499 +             y="464.8139">Second parent</tspan></text>
 666.500 +        <text
 666.501 +           xml:space="preserve"
 666.502 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.503 +           x="308.20175"
 666.504 +           y="485.50256"
 666.505 +           id="text3593"><tspan
 666.506 +             sodipodi:role="line"
 666.507 +             id="tspan3595"
 666.508 +             x="308.20175"
 666.509 +             y="485.50256"
 666.510 +             style="font-family:Courier">000000000000</tspan></text>
 666.511 +      </g>
 666.512 +      <g
 666.513 +         transform="matrix(0.423343,0,0,0.423343,138.8739,-67.01733)"
 666.514 +         id="g3597">
 666.515 +        <rect
 666.516 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.517 +           id="rect3599"
 666.518 +           width="103.14286"
 666.519 +           height="48.571426"
 666.520 +           x="188.6071"
 666.521 +           y="311.28598" />
 666.522 +        <text
 666.523 +           xml:space="preserve"
 666.524 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.525 +           x="197.82495"
 666.526 +           y="328.38538"
 666.527 +           id="text3601"><tspan
 666.528 +             id="tspan3603"
 666.529 +             sodipodi:role="line"
 666.530 +             x="197.82495"
 666.531 +             y="328.38538">Revision hash</tspan></text>
 666.532 +        <text
 666.533 +           xml:space="preserve"
 666.534 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.535 +           x="197.13031"
 666.536 +           y="349.07404"
 666.537 +           id="text3605"><tspan
 666.538 +             sodipodi:role="line"
 666.539 +             id="tspan3607"
 666.540 +             x="197.13031"
 666.541 +             y="349.07404"
 666.542 +             style="font-family:Courier">1b67dc96f27a</tspan></text>
 666.543 +      </g>
 666.544 +      <g
 666.545 +         transform="matrix(0.423343,0,0,0.423343,139.3426,-65.65866)"
 666.546 +         id="g3609">
 666.547 +        <rect
 666.548 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.549 +           id="rect3611"
 666.550 +           width="213.85715"
 666.551 +           height="75"
 666.552 +           x="187.5"
 666.553 +           y="363.07654" />
 666.554 +        <text
 666.555 +           xml:space="preserve"
 666.556 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.557 +           x="196.02321"
 666.558 +           y="400.86459"
 666.559 +           id="text3613"><tspan
 666.560 +             sodipodi:role="line"
 666.561 +             id="tspan3615"
 666.562 +             x="196.02321"
 666.563 +             y="400.86459"
 666.564 +             style="fill:black;fill-opacity:1;font-family:Courier">...</tspan></text>
 666.565 +        <text
 666.566 +           xml:space="preserve"
 666.567 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.568 +           x="196.71785"
 666.569 +           y="380.17593"
 666.570 +           id="text3617"><tspan
 666.571 +             style="fill:black;fill-opacity:1"
 666.572 +             id="tspan3619"
 666.573 +             sodipodi:role="line"
 666.574 +             x="196.71785"
 666.575 +             y="380.17593">Revision data (delta or snapshot)</tspan></text>
 666.576 +      </g>
 666.577 +    </g>
 666.578 +    <path
 666.579 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Mend)"
 666.580 +       d="M 240.78255,143.08593 L 241.42595,171.75349"
 666.581 +       id="path3801"
 666.582 +       inkscape:connector-type="polyline"
 666.583 +       inkscape:connection-start="#g3573"
 666.584 +       inkscape:connection-end="#g3250" />
 666.585 +    <g
 666.586 +       id="g5677">
 666.587 +      <rect
 666.588 +         style="fill:url(#linearGradient5784);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.589 +         id="rect3393"
 666.590 +         width="101.60232"
 666.591 +         height="89.506805"
 666.592 +         x="150.76137"
 666.593 +         y="278.32565" />
 666.594 +      <g
 666.595 +         transform="matrix(0.423343,0,0,0.423343,76.37397,152.137)"
 666.596 +         id="g3399">
 666.597 +        <rect
 666.598 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.599 +           id="rect3401"
 666.600 +           width="103.14286"
 666.601 +           height="48.571426"
 666.602 +           x="188.6071"
 666.603 +           y="447.72418" />
 666.604 +        <text
 666.605 +           xml:space="preserve"
 666.606 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.607 +           x="197.82495"
 666.608 +           y="464.82358"
 666.609 +           id="text3403"><tspan
 666.610 +             id="tspan3405"
 666.611 +             sodipodi:role="line"
 666.612 +             x="197.82495"
 666.613 +             y="464.82358">First parent</tspan></text>
 666.614 +        <text
 666.615 +           xml:space="preserve"
 666.616 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.617 +           x="197.13031"
 666.618 +           y="485.51224"
 666.619 +           id="text3407"><tspan
 666.620 +             sodipodi:role="line"
 666.621 +             id="tspan3409"
 666.622 +             x="197.13031"
 666.623 +             y="485.51224"
 666.624 +             style="font-family:Courier">ff9dc8bc2a8b</tspan></text>
 666.625 +      </g>
 666.626 +      <g
 666.627 +         transform="matrix(0.423343,0,0,0.423343,76.37397,152.137)"
 666.628 +         id="g3411">
 666.629 +        <rect
 666.630 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.631 +           id="rect3413"
 666.632 +           width="103.14286"
 666.633 +           height="48.571426"
 666.634 +           x="299.67859"
 666.635 +           y="447.71451" />
 666.636 +        <text
 666.637 +           xml:space="preserve"
 666.638 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.639 +           x="308.89639"
 666.640 +           y="464.8139"
 666.641 +           id="text3415"><tspan
 666.642 +             id="tspan3417"
 666.643 +             sodipodi:role="line"
 666.644 +             x="308.89639"
 666.645 +             y="464.8139">Second parent</tspan></text>
 666.646 +        <text
 666.647 +           xml:space="preserve"
 666.648 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.649 +           x="308.20175"
 666.650 +           y="485.50256"
 666.651 +           id="text3419"><tspan
 666.652 +             sodipodi:role="line"
 666.653 +             id="tspan3421"
 666.654 +             x="308.20175"
 666.655 +             y="485.50256"
 666.656 +             style="font-family:Courier">000000000000</tspan></text>
 666.657 +      </g>
 666.658 +      <g
 666.659 +         transform="matrix(0.423343,0,0,0.423343,76.37397,152.137)"
 666.660 +         id="g3423">
 666.661 +        <rect
 666.662 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.663 +           id="rect3425"
 666.664 +           width="103.14286"
 666.665 +           height="48.571426"
 666.666 +           x="188.6071"
 666.667 +           y="311.28598" />
 666.668 +        <text
 666.669 +           xml:space="preserve"
 666.670 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.671 +           x="197.82495"
 666.672 +           y="328.38538"
 666.673 +           id="text3427"><tspan
 666.674 +             id="tspan3429"
 666.675 +             sodipodi:role="line"
 666.676 +             x="197.82495"
 666.677 +             y="328.38538">Revision hash</tspan></text>
 666.678 +        <text
 666.679 +           xml:space="preserve"
 666.680 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.681 +           x="197.13031"
 666.682 +           y="349.07404"
 666.683 +           id="text3431"><tspan
 666.684 +             sodipodi:role="line"
 666.685 +             id="tspan3433"
 666.686 +             x="197.13031"
 666.687 +             y="349.07404"
 666.688 +             style="font-family:Courier">5b80c922ebdd</tspan></text>
 666.689 +      </g>
 666.690 +      <g
 666.691 +         transform="matrix(0.423343,0,0,0.423343,76.84265,153.4957)"
 666.692 +         id="g3435">
 666.693 +        <rect
 666.694 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.695 +           id="rect3437"
 666.696 +           width="213.85715"
 666.697 +           height="75"
 666.698 +           x="187.5"
 666.699 +           y="363.07654" />
 666.700 +        <text
 666.701 +           xml:space="preserve"
 666.702 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.703 +           x="196.02321"
 666.704 +           y="400.86459"
 666.705 +           id="text3439"><tspan
 666.706 +             sodipodi:role="line"
 666.707 +             id="tspan3441"
 666.708 +             x="196.02321"
 666.709 +             y="400.86459"
 666.710 +             style="fill:black;fill-opacity:1;font-family:Courier">...</tspan></text>
 666.711 +        <text
 666.712 +           xml:space="preserve"
 666.713 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.714 +           x="196.71785"
 666.715 +           y="380.17593"
 666.716 +           id="text3443"><tspan
 666.717 +             style="fill:black;fill-opacity:1"
 666.718 +             id="tspan3445"
 666.719 +             sodipodi:role="line"
 666.720 +             x="196.71785"
 666.721 +             y="380.17593">Revision data (delta or snapshot)</tspan></text>
 666.722 +      </g>
 666.723 +    </g>
 666.724 +    <g
 666.725 +       id="g5646"
 666.726 +       transform="translate(-0.227432,0)">
 666.727 +      <rect
 666.728 +         style="fill:url(#linearGradient5786);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.729 +         id="rect3451"
 666.730 +         width="101.60232"
 666.731 +         height="89.506805"
 666.732 +         x="272.63638"
 666.733 +         y="278.32565" />
 666.734 +      <g
 666.735 +         transform="matrix(0.423343,0,0,0.423343,198.2489,152.137)"
 666.736 +         id="g3457">
 666.737 +        <rect
 666.738 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.739 +           id="rect3459"
 666.740 +           width="103.14286"
 666.741 +           height="48.571426"
 666.742 +           x="188.6071"
 666.743 +           y="447.72418" />
 666.744 +        <text
 666.745 +           xml:space="preserve"
 666.746 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.747 +           x="197.82495"
 666.748 +           y="464.82358"
 666.749 +           id="text3461"><tspan
 666.750 +             id="tspan3463"
 666.751 +             sodipodi:role="line"
 666.752 +             x="197.82495"
 666.753 +             y="464.82358">First parent</tspan></text>
 666.754 +        <text
 666.755 +           xml:space="preserve"
 666.756 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.757 +           x="197.13031"
 666.758 +           y="485.51224"
 666.759 +           id="text3465"><tspan
 666.760 +             sodipodi:role="line"
 666.761 +             id="tspan3467"
 666.762 +             x="197.13031"
 666.763 +             y="485.51224"
 666.764 +             style="font-family:Courier">ecacb6b4c9fd</tspan></text>
 666.765 +      </g>
 666.766 +      <g
 666.767 +         transform="matrix(0.423343,0,0,0.423343,198.2489,152.137)"
 666.768 +         id="g3469">
 666.769 +        <rect
 666.770 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.771 +           id="rect3471"
 666.772 +           width="103.14286"
 666.773 +           height="48.571426"
 666.774 +           x="299.67859"
 666.775 +           y="447.71451" />
 666.776 +        <text
 666.777 +           xml:space="preserve"
 666.778 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.779 +           x="308.89639"
 666.780 +           y="464.8139"
 666.781 +           id="text3473"><tspan
 666.782 +             id="tspan3475"
 666.783 +             sodipodi:role="line"
 666.784 +             x="308.89639"
 666.785 +             y="464.8139">Second parent</tspan></text>
 666.786 +        <text
 666.787 +           xml:space="preserve"
 666.788 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.789 +           x="308.20175"
 666.790 +           y="485.50256"
 666.791 +           id="text3477"><tspan
 666.792 +             sodipodi:role="line"
 666.793 +             id="tspan3479"
 666.794 +             x="308.20175"
 666.795 +             y="485.50256"
 666.796 +             style="font-family:Courier">000000000000</tspan></text>
 666.797 +      </g>
 666.798 +      <g
 666.799 +         transform="matrix(0.423343,0,0,0.423343,198.2489,152.137)"
 666.800 +         id="g3481">
 666.801 +        <rect
 666.802 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.803 +           id="rect3483"
 666.804 +           width="103.14286"
 666.805 +           height="48.571426"
 666.806 +           x="188.6071"
 666.807 +           y="311.28598" />
 666.808 +        <text
 666.809 +           xml:space="preserve"
 666.810 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.811 +           x="197.82495"
 666.812 +           y="328.38538"
 666.813 +           id="text3485"><tspan
 666.814 +             id="tspan3487"
 666.815 +             sodipodi:role="line"
 666.816 +             x="197.82495"
 666.817 +             y="328.38538">Revision hash</tspan></text>
 666.818 +        <text
 666.819 +           xml:space="preserve"
 666.820 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.821 +           x="197.13031"
 666.822 +           y="349.07404"
 666.823 +           id="text3489"><tspan
 666.824 +             sodipodi:role="line"
 666.825 +             id="tspan3491"
 666.826 +             x="197.13031"
 666.827 +             y="349.07404"
 666.828 +             style="font-family:Courier">32bf9a5f22c0</tspan></text>
 666.829 +      </g>
 666.830 +      <g
 666.831 +         transform="matrix(0.423343,0,0,0.423343,198.7176,153.4957)"
 666.832 +         id="g3493">
 666.833 +        <rect
 666.834 +           style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 666.835 +           id="rect3495"
 666.836 +           width="213.85715"
 666.837 +           height="75"
 666.838 +           x="187.5"
 666.839 +           y="363.07654" />
 666.840 +        <text
 666.841 +           xml:space="preserve"
 666.842 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.843 +           x="196.02321"
 666.844 +           y="400.86459"
 666.845 +           id="text3497"><tspan
 666.846 +             sodipodi:role="line"
 666.847 +             id="tspan3499"
 666.848 +             x="196.02321"
 666.849 +             y="400.86459"
 666.850 +             style="fill:black;fill-opacity:1;font-family:Courier">...</tspan></text>
 666.851 +        <text
 666.852 +           xml:space="preserve"
 666.853 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.854 +           x="196.71785"
 666.855 +           y="380.17593"
 666.856 +           id="text3501"><tspan
 666.857 +             style="fill:black;fill-opacity:1"
 666.858 +             id="tspan3503"
 666.859 +             sodipodi:role="line"
 666.860 +             x="196.71785"
 666.861 +             y="380.17593">Revision data (delta or snapshot)</tspan></text>
 666.862 +      </g>
 666.863 +    </g>
 666.864 +    <rect
 666.865 +       y="387.90286"
 666.866 +       x="272.40894"
 666.867 +       height="89.506805"
 666.868 +       width="101.60232"
 666.869 +       id="rect5081"
 666.870 +       style="fill:url(#linearGradient5895);fill-opacity:1;stroke:black;stroke-width:0.48811448;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 666.871 +    <g
 666.872 +       id="g5087"
 666.873 +       transform="matrix(0.423343,0,0,0.423343,198.0214,261.7142)">
 666.874 +      <rect
 666.875 +         y="447.72418"
 666.876 +         x="188.6071"
 666.877 +         height="48.571426"
 666.878 +         width="103.14286"
 666.879 +         id="rect5089"
 666.880 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 666.881 +      <text
 666.882 +         id="text5091"
 666.883 +         y="464.82358"
 666.884 +         x="197.82495"
 666.885 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.886 +         xml:space="preserve"><tspan
 666.887 +           y="464.82358"
 666.888 +           x="197.82495"
 666.889 +           sodipodi:role="line"
 666.890 +           id="tspan5093">First parent</tspan></text>
 666.891 +      <text
 666.892 +         id="text5095"
 666.893 +         y="485.51224"
 666.894 +         x="197.13031"
 666.895 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.896 +         xml:space="preserve"><tspan
 666.897 +           style="font-family:Courier"
 666.898 +           y="485.51224"
 666.899 +           x="197.13031"
 666.900 +           id="tspan5097"
 666.901 +           sodipodi:role="line">ff9dc8bc2a8b</tspan></text>
 666.902 +    </g>
 666.903 +    <g
 666.904 +       id="g5099"
 666.905 +       transform="matrix(0.423343,0,0,0.423343,198.0214,261.7142)">
 666.906 +      <rect
 666.907 +         y="447.71451"
 666.908 +         x="299.67859"
 666.909 +         height="48.571426"
 666.910 +         width="103.14286"
 666.911 +         id="rect5101"
 666.912 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 666.913 +      <text
 666.914 +         id="text5103"
 666.915 +         y="464.8139"
 666.916 +         x="308.89639"
 666.917 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.918 +         xml:space="preserve"><tspan
 666.919 +           y="464.8139"
 666.920 +           x="308.89639"
 666.921 +           sodipodi:role="line"
 666.922 +           id="tspan5105">Second parent</tspan></text>
 666.923 +      <text
 666.924 +         id="text5107"
 666.925 +         y="485.50256"
 666.926 +         x="308.20175"
 666.927 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.928 +         xml:space="preserve"><tspan
 666.929 +           style="font-family:Courier"
 666.930 +           y="485.50256"
 666.931 +           x="308.20175"
 666.932 +           id="tspan5109"
 666.933 +           sodipodi:role="line">000000000000</tspan></text>
 666.934 +    </g>
 666.935 +    <g
 666.936 +       id="g5111"
 666.937 +       transform="matrix(0.423343,0,0,0.423343,198.0214,261.7142)">
 666.938 +      <rect
 666.939 +         y="311.28598"
 666.940 +         x="188.6071"
 666.941 +         height="48.571426"
 666.942 +         width="103.14286"
 666.943 +         id="rect5113"
 666.944 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 666.945 +      <text
 666.946 +         id="text5115"
 666.947 +         y="328.38538"
 666.948 +         x="197.82495"
 666.949 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.950 +         xml:space="preserve"><tspan
 666.951 +           y="328.38538"
 666.952 +           x="197.82495"
 666.953 +           sodipodi:role="line"
 666.954 +           id="tspan5117">Revision hash</tspan></text>
 666.955 +      <text
 666.956 +         id="text5119"
 666.957 +         y="349.07404"
 666.958 +         x="197.13031"
 666.959 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.960 +         xml:space="preserve"><tspan
 666.961 +           style="font-family:Courier"
 666.962 +           y="349.07404"
 666.963 +           x="197.13031"
 666.964 +           id="tspan5121"
 666.965 +           sodipodi:role="line">ecacb6b4c9fd</tspan></text>
 666.966 +    </g>
 666.967 +    <g
 666.968 +       id="g5123"
 666.969 +       transform="matrix(0.423343,0,0,0.423343,198.4901,263.0729)">
 666.970 +      <rect
 666.971 +         y="363.07654"
 666.972 +         x="187.5"
 666.973 +         height="75"
 666.974 +         width="213.85715"
 666.975 +         id="rect5125"
 666.976 +         style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 666.977 +      <text
 666.978 +         id="text5127"
 666.979 +         y="400.86459"
 666.980 +         x="196.02321"
 666.981 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.982 +         xml:space="preserve"><tspan
 666.983 +           style="fill:black;fill-opacity:1;font-family:Courier"
 666.984 +           y="400.86459"
 666.985 +           x="196.02321"
 666.986 +           id="tspan5129"
 666.987 +           sodipodi:role="line">...</tspan></text>
 666.988 +      <text
 666.989 +         id="text5131"
 666.990 +         y="380.17593"
 666.991 +         x="196.71785"
 666.992 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 666.993 +         xml:space="preserve"><tspan
 666.994 +           y="380.17593"
 666.995 +           x="196.71785"
 666.996 +           sodipodi:role="line"
 666.997 +           id="tspan5133"
 666.998 +           style="fill:black;fill-opacity:1">Revision data (delta or snapshot)</tspan></text>
 666.999 +    </g>
666.1000 +    <path
666.1001 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
666.1002 +       d="M 299.69935,362.24027 L 299.69931,393.49494"
666.1003 +       id="path5203"
666.1004 +       inkscape:connector-type="polyline"
666.1005 +       inkscape:connection-start="#g3457"
666.1006 +       inkscape:connection-end="#g5111" />
666.1007 +    <path
666.1008 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
666.1009 +       d="M 182.35357,362.22647 L 241.2842,503.07224"
666.1010 +       id="path5271"
666.1011 +       inkscape:connector-type="polyline"
666.1012 +       inkscape:connection-start="#g3399"
666.1013 +       inkscape:connection-end="#g3539" />
666.1014 +    <path
666.1015 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
666.1016 +       d="M 287.63109,471.81747 L 250.9438,503.07223"
666.1017 +       id="path5285"
666.1018 +       inkscape:connector-type="polyline"
666.1019 +       inkscape:connection-start="#g5087"
666.1020 +       inkscape:connection-end="#g3539" />
666.1021 +    <path
666.1022 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
666.1023 +       d="M 290.80419,250.07192 L 297.80065,283.90394"
666.1024 +       id="path5077"
666.1025 +       inkscape:connector-type="polyline"
666.1026 +       inkscape:connection-start="#g3215"
666.1027 +       inkscape:connection-end="#g3481" />
666.1028 +    <path
666.1029 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
666.1030 +       d="M 229.63373,250.07601 L 190.07484,283.90394"
666.1031 +       id="path5075"
666.1032 +       inkscape:connector-type="polyline"
666.1033 +       inkscape:connection-end="#g3423" />
666.1034 +    <text
666.1035 +       xml:space="preserve"
666.1036 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
666.1037 +       x="131.5625"
666.1038 +       y="100.79968"
666.1039 +       id="text5897"><tspan
666.1040 +         sodipodi:role="line"
666.1041 +         id="tspan5899"
666.1042 +         x="131.5625"
666.1043 +         y="100.79968"
666.1044 +         style="text-align:end;text-anchor:end">Head revision</tspan><tspan
666.1045 +         sodipodi:role="line"
666.1046 +         x="131.5625"
666.1047 +         y="115.79968"
666.1048 +         id="tspan5901"
666.1049 +         style="text-align:end;text-anchor:end">(no children)</tspan></text>
666.1050 +    <text
666.1051 +       xml:space="preserve"
666.1052 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
666.1053 +       x="131.5625"
666.1054 +       y="207.04968"
666.1055 +       id="text5903"><tspan
666.1056 +         sodipodi:role="line"
666.1057 +         id="tspan5905"
666.1058 +         x="131.5625"
666.1059 +         y="207.04968"
666.1060 +         style="text-align:end;text-anchor:end">Merge revision</tspan><tspan
666.1061 +         sodipodi:role="line"
666.1062 +         x="131.5625"
666.1063 +         y="222.04968"
666.1064 +         id="tspan5907"
666.1065 +         style="text-align:end;text-anchor:end">(two parents)</tspan></text>
666.1066 +    <text
666.1067 +       xml:space="preserve"
666.1068 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
666.1069 +       x="131.92578"
666.1070 +       y="451.58093"
666.1071 +       id="text5909"><tspan
666.1072 +         sodipodi:role="line"
666.1073 +         id="tspan5911"
666.1074 +         x="131.92578"
666.1075 +         y="451.58093"
666.1076 +         style="text-align:end;text-anchor:end">Branches</tspan><tspan
666.1077 +         sodipodi:role="line"
666.1078 +         x="131.92578"
666.1079 +         y="466.58093"
666.1080 +         id="tspan5913"
666.1081 +         style="text-align:end;text-anchor:end">(two revisions,</tspan><tspan
666.1082 +         sodipodi:role="line"
666.1083 +         x="131.92578"
666.1084 +         y="481.58093"
666.1085 +         id="tspan5915"
666.1086 +         style="text-align:end;text-anchor:end">same parent)</tspan></text>
666.1087 +    <path
666.1088 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
666.1089 +       d="M 111.71875,433.61218 L 154.7268,368.52294"
666.1090 +       id="path5917"
666.1091 +       inkscape:connector-type="polyline" />
666.1092 +    <path
666.1093 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
666.1094 +       d="M 134.375,464.86218 L 277.86691,440.37816"
666.1095 +       id="path5919"
666.1096 +       inkscape:connector-type="polyline"
666.1097 +       inkscape:connection-end="#g5123" />
666.1098 +    <text
666.1099 +       xml:space="preserve"
666.1100 +       style="font-size:12px;font-style:normal;font-weight:normal;text-align:end;text-anchor:end;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
666.1101 +       x="131.5625"
666.1102 +       y="536.73718"
666.1103 +       id="text5927"><tspan
666.1104 +         sodipodi:role="line"
666.1105 +         id="tspan5929"
666.1106 +         x="131.5625"
666.1107 +         y="536.73718">First revision</tspan><tspan
666.1108 +         sodipodi:role="line"
666.1109 +         x="131.5625"
666.1110 +         y="551.73718"
666.1111 +         id="tspan5931">(both parents null)</tspan></text>
666.1112 +    <rect
666.1113 +       style="fill:#bbb4ff;fill-opacity:1;stroke:none;stroke-width:0.95291203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
666.1114 +       id="rect2830"
666.1115 +       width="43.664806"
666.1116 +       height="20.562374"
666.1117 +       x="217.0432"
666.1118 +       y="232.10075" />
666.1119 +    <text
666.1120 +       xml:space="preserve"
666.1121 +       style="font-size:5.0801158px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
666.1122 +       x="220.94551"
666.1123 +       y="239.33966"
666.1124 +       id="text2832"><tspan
666.1125 +         id="tspan2836"
666.1126 +         sodipodi:role="line"
666.1127 +         x="220.94551"
666.1128 +         y="239.33966">First parent</tspan></text>
666.1129 +    <text
666.1130 +       xml:space="preserve"
666.1131 +       style="font-size:5.0801158px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
666.1132 +       x="220.65144"
666.1133 +       y="248.09805"
666.1134 +       id="text2879"><tspan
666.1135 +         sodipodi:role="line"
666.1136 +         id="tspan2881"
666.1137 +         x="220.65144"
666.1138 +         y="248.09805"
666.1139 +         style="font-family:Courier">5b80c922ebdd</tspan></text>
666.1140 +    <path
666.1141 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
666.1142 +       d="M 139.84375,107.83093 L 210.15625,107.83093"
666.1143 +       id="path5965"
666.1144 +       inkscape:connector-type="polyline" />
666.1145 +    <path
666.1146 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
666.1147 +       d="M 137.5,213.29968 L 210.49036,214.09055"
666.1148 +       id="path5967"
666.1149 +       inkscape:connector-type="polyline" />
666.1150 +    <path
666.1151 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1;display:inline"
666.1152 +       d="M 136.34375,544.54968 L 206.65625,544.54968"
666.1153 +       id="path5969"
666.1154 +       inkscape:connector-type="polyline"
666.1155 +       inkscape:transform-center-y="-171.09375"
666.1156 +       inkscape:transform-center-x="53.90625" />
666.1157 +  </g>
666.1158 +</svg>
   667.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   667.2 +++ b/ja/snapshot.svg	Sun Aug 16 03:41:39 2009 +0200
   667.3 @@ -0,0 +1,202 @@
   667.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   667.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   667.6 +<svg
   667.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   667.8 +   xmlns:cc="http://web.resource.org/cc/"
   667.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  667.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  667.11 +   xmlns="http://www.w3.org/2000/svg"
  667.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  667.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  667.14 +   width="744.09448819"
  667.15 +   height="1052.3622047"
  667.16 +   id="svg2807"
  667.17 +   sodipodi:version="0.32"
  667.18 +   inkscape:version="0.44.1"
  667.19 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  667.20 +   sodipodi:docname="snapshots.svg">
  667.21 +  <defs
  667.22 +     id="defs2809" />
  667.23 +  <sodipodi:namedview
  667.24 +     id="base"
  667.25 +     pagecolor="#ffffff"
  667.26 +     bordercolor="#666666"
  667.27 +     borderopacity="1.0"
  667.28 +     gridtolerance="10000"
  667.29 +     guidetolerance="10"
  667.30 +     objecttolerance="10"
  667.31 +     inkscape:pageopacity="0.0"
  667.32 +     inkscape:pageshadow="2"
  667.33 +     inkscape:zoom="1.4"
  667.34 +     inkscape:cx="252.04111"
  667.35 +     inkscape:cy="605.75448"
  667.36 +     inkscape:document-units="px"
  667.37 +     inkscape:current-layer="layer1"
  667.38 +     inkscape:window-width="906"
  667.39 +     inkscape:window-height="721"
  667.40 +     inkscape:window-x="0"
  667.41 +     inkscape:window-y="25" />
  667.42 +  <metadata
  667.43 +     id="metadata2812">
  667.44 +    <rdf:RDF>
  667.45 +      <cc:Work
  667.46 +         rdf:about="">
  667.47 +        <dc:format>image/svg+xml</dc:format>
  667.48 +        <dc:type
  667.49 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  667.50 +      </cc:Work>
  667.51 +    </rdf:RDF>
  667.52 +  </metadata>
  667.53 +  <g
  667.54 +     inkscape:label="Layer 1"
  667.55 +     inkscape:groupmode="layer"
  667.56 +     id="layer1">
  667.57 +    <rect
  667.58 +       style="opacity:1;fill:#d3ceff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.88795626;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
  667.59 +       id="rect2817"
  667.60 +       width="118.18347"
  667.61 +       height="245.32632"
  667.62 +       x="243.05112"
  667.63 +       y="315.4133"
  667.64 +       inkscape:transform-center-x="136.84403"
  667.65 +       inkscape:transform-center-y="-66.529183" />
  667.66 +    <rect
  667.67 +       y="315.04153"
  667.68 +       x="46.965065"
  667.69 +       height="97.803009"
  667.70 +       width="108.92702"
  667.71 +       id="rect2815"
  667.72 +       style="fill:#ffced6;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.14441991;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
  667.73 +    <g
  667.74 +       id="g3814">
  667.75 +      <rect
  667.76 +         y="348.94302"
  667.77 +         x="59.285713"
  667.78 +         height="30"
  667.79 +         width="84.285713"
  667.80 +         id="rect2819"
  667.81 +         style="fill:#ff6e86;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
  667.82 +         ry="0" />
  667.83 +      <text
  667.84 +         id="text2821"
  667.85 +         y="368.02701"
  667.86 +         x="72.717636"
  667.87 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
  667.88 +         xml:space="preserve"><tspan
  667.89 +           y="368.02701"
  667.90 +           x="72.717636"
  667.91 +           id="tspan2823"
  667.92 +           sodipodi:role="line">Index, rev 7</tspan></text>
  667.93 +    </g>
  667.94 +    <text
  667.95 +       id="text3722"
  667.96 +       y="301.29074"
  667.97 +       x="46.187778"
  667.98 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
  667.99 +       xml:space="preserve"><tspan
 667.100 +         y="301.29074"
 667.101 +         x="46.187778"
 667.102 +         id="tspan3724"
 667.103 +         sodipodi:role="line">Revlog index (.i file)</tspan></text>
 667.104 +    <text
 667.105 +       id="text3726"
 667.106 +       y="301.29074"
 667.107 +       x="241.90207"
 667.108 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 667.109 +       xml:space="preserve"><tspan
 667.110 +         y="301.29074"
 667.111 +         x="241.90207"
 667.112 +         id="tspan3728"
 667.113 +         sodipodi:role="line">Revlog data (.d file)</tspan></text>
 667.114 +    <path
 667.115 +       style="fill:#c695ff;fill-opacity:0.60109288;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 667.116 +       d="M 143.57143,348.07647 L 255,368.07646 L 255.71429,544.50504 L 142.85714,379.50504 L 143.57143,348.07647 z "
 667.117 +       id="path3839"
 667.118 +       sodipodi:nodetypes="ccccc" />
 667.119 +    <rect
 667.120 +       style="fill:#4733ff;fill-opacity:1;stroke:#a7a7a7;stroke-width:2.35124183;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 667.121 +       id="rect3752"
 667.122 +       width="92.720184"
 667.123 +       height="67.005905"
 667.124 +       x="255.42564"
 667.125 +       y="368.64264" />
 667.126 +    <text
 667.127 +       xml:space="preserve"
 667.128 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 667.129 +       x="264.45859"
 667.130 +       y="387.30099"
 667.131 +       id="text3754"><tspan
 667.132 +         sodipodi:role="line"
 667.133 +         id="tspan3756"
 667.134 +         x="264.45859"
 667.135 +         y="387.30099">Snapshot, rev 4</tspan></text>
 667.136 +    <rect
 667.137 +       style="fill:#7c6eff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.57776296;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 667.138 +       id="rect3761"
 667.139 +       width="93.49366"
 667.140 +       height="29.922237"
 667.141 +       x="255.03891"
 667.142 +       y="442.04395" />
 667.143 +    <text
 667.144 +       xml:space="preserve"
 667.145 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 667.146 +       x="263.2662"
 667.147 +       y="460.17206"
 667.148 +       id="text3763"><tspan
 667.149 +         sodipodi:role="line"
 667.150 +         id="tspan3765"
 667.151 +         x="263.2662"
 667.152 +         y="460.17206">Delta, rev 4 to 5</tspan></text>
 667.153 +    <rect
 667.154 +       style="fill:#7c6eff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.57776296;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 667.155 +       id="rect3774"
 667.156 +       width="93.49366"
 667.157 +       height="29.922237"
 667.158 +       x="255.03891"
 667.159 +       y="477.97485" />
 667.160 +    <text
 667.161 +       xml:space="preserve"
 667.162 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 667.163 +       x="263.2662"
 667.164 +       y="496.10297"
 667.165 +       id="text3776"><tspan
 667.166 +         sodipodi:role="line"
 667.167 +         id="tspan3778"
 667.168 +         x="263.2662"
 667.169 +         y="496.10297">Delta, rev 5 to 6</tspan></text>
 667.170 +    <rect
 667.171 +       style="fill:#7c6eff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.57776296;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 667.172 +       id="rect3782"
 667.173 +       width="93.49366"
 667.174 +       height="29.922237"
 667.175 +       x="255.03891"
 667.176 +       y="513.90576" />
 667.177 +    <text
 667.178 +       xml:space="preserve"
 667.179 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 667.180 +       x="263.2662"
 667.181 +       y="532.03387"
 667.182 +       id="text3784"><tspan
 667.183 +         sodipodi:role="line"
 667.184 +         id="tspan3786"
 667.185 +         x="263.2662"
 667.186 +         y="532.03387">Delta, rev 6 to 7</tspan></text>
 667.187 +    <rect
 667.188 +       style="fill:#7c6eff;fill-opacity:1;stroke:#a7a7a7;stroke-width:1.57776296;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 667.189 +       id="rect3889"
 667.190 +       width="93.49366"
 667.191 +       height="29.922237"
 667.192 +       x="255.03891"
 667.193 +       y="332.32489" />
 667.194 +    <text
 667.195 +       xml:space="preserve"
 667.196 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 667.197 +       x="263.2662"
 667.198 +       y="350.453"
 667.199 +       id="text3891"><tspan
 667.200 +         sodipodi:role="line"
 667.201 +         id="tspan3893"
 667.202 +         x="263.2662"
 667.203 +         y="350.453">Delta, rev 2 to 3</tspan></text>
 667.204 +  </g>
 667.205 +</svg>
   668.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   668.2 +++ b/ja/srcinstall.tex	Sun Aug 16 03:41:39 2009 +0200
   668.3 @@ -0,0 +1,75 @@
   668.4 +\chapter{Installing Mercurial from source}
   668.5 +\label{chap:srcinstall}
   668.6 +
   668.7 +\section{On a Unix-like system}
   668.8 +\label{sec:srcinstall:unixlike}
   668.9 +
  668.10 +$B!J(B2.3 $B$J$$$7$=$l0J8e$N!K?7$7$$HG$N(B Python $B$,MxMQ2DG=$J(B
  668.11 +Unix $BE*$J%7%9%F%`$rMxMQ$7$F$$$k>l9g$O!"(B
  668.12 +Mercurial $B$r%=!<%9%U%!%$%k$+$i%$%s%9%H!<%k$9$k$N$O4JC1$G$9!#(B
  668.13 +
  668.14 +\begin{enumerate}
  668.15 +\item $B:G?7HG$N(B tar $B%"!<%+%$%V!J(Btarball$B!K$r(B
  668.16 +  \url{http://www.selenic.com/mercurial/download}
  668.17 +  $B$+$i%@%&%s%m!<%I!#(B
  668.18 +
  668.19 +\item tar $B%"!<%+%$%V$rE83+(B:
  668.20 +  \begin{codesample4}
  668.21 +    gzip -dc mercurial-\emph{version}.tar.gz | tar xf -
  668.22 +  \end{codesample4}
  668.23 +
  668.24 +\item $B%=!<%9%G%#%l%/%H%j$K0\F0$7$F!"%$%s%9%H!<%kMQ%9%/%j%W%H$r<B9T!#(B
  668.25 +  $B0J2<$N<j=g$O!"(B
  668.26 +  $B%S%k%I$7$?(B Mercurial $B$r%[!<%`%G%#%l%/%H%jG[2<$K%$%s%9%H!<%k$7$^$9!#(B
  668.27 +
  668.28 +  \begin{codesample4}
  668.29 +    cd mercurial-\emph{version}
  668.30 +    python setup.py install --force --home=\$HOME
  668.31 +  \end{codesample4}
  668.32 +
  668.33 +\end{enumerate}
  668.34 +
  668.35 +$B%$%s%9%H!<%k$,40N;$7$?$J$i!"(B
  668.36 +$B%[!<%`%G%#%l%/%H%jD>2<$N(B
  668.37 +\texttt{bin} $B%G%#%l%/%H%j$K(B
  668.38 +Mercurial $B$,%$%s%9%H!<%k$5$l$^$9!#(B
  668.39 +$B%7%'%k$N%3%^%s%I8!:w%Q%9$X$N(B
  668.40 +\texttt{bin} $B%G%#%l%/%H%j$NDI2C$rK:$l$J$$$h$&$K$7$F$/$@$5$$!#(B
  668.41 +
  668.42 +Mercurial $B$N<B9T$KI,MW$J(B Mercurial $B%Q%C%1!<%8$rC5$7=P$;$k$h$&$K!"(B
  668.43 +\envar{PYTHONPATH} $B4D6-JQ?t$N@_Dj$bI,MW$H$J$k$G$7$g$&!#(B
  668.44 +$BNc$($PCx<T$N%i%C%W%H%C%W$G$O!"(B
  668.45 +\envar{PYTHONPATH} $B4D6-JQ?t$K(B
  668.46 +\texttt{/home/bos/lib/python}
  668.47 +$B$r@_Dj$7$F$$$^$9!#(B
  668.48 +$B<B:]$K(B \envar{PYTHONPATH} $B4D6-JQ?t$K@_Dj$9$kCM$O!"(B
  668.49 +$B3F<+$N4D6-$G(B Python $B$,$I$N$h$&$K@_Dj$5$l$F$$$k$+$K0MB8$7$^$9$,!"(B
  668.50 +$B@_Dj$9$Y$-CM$rF@$k$N$O4JC1$G$9!#(B
  668.51 +$B@_DjCM$K3N?.$,;}$F$J$$>l9g!"(B
  668.52 +$B>e5-$N%$%s%9%H!<%kMQ%9%/%j%W%H$N=PNO$r8+$F!"(B
  668.53 +\texttt{mercurial} 
  668.54 +$B%G%#%l%/%H%j$NFbMF$,%$%s%9%H!<%k$5$l$k@h$r3NG'$7$F$/$@$5$$!#(B
  668.55 +
  668.56 +\section{On Windows}
  668.57 +
  668.58 +Windows $B>e$G(B Mercurial $B$r%=!<%9$+$i%S%k%I$9$k$K$O!"(B
  668.59 +$BMM!9$J%D!<%k!"AjEv$J5;=QE*CN<1$K2C$($F!"(B
  668.60 +$B>/$J$+$i$LG&BQ$,MW5a$5$l$^$9!#(B
  668.61 +``$B5$7Z$K;H$C$F$_$?$$(B''$B>l9g$K$O!"(B
  668.62 +$B%=!<%9$+$i$N%S%k%I$O(B\emph{$BA4$/$*A&$a$G$-$^$;$s(B}$B!#(B
  668.63 +Mercurial $B$=$N$b$N$r%O%C%/$9$k$N$GL5$$8B$j!"(B
  668.64 +$B%P%$%J%jHG$NMxMQ$r$*A&$a$7$^$9(B\footnote{$BLuCm(B:
  668.65 +$B$I$&$7$F$b:G?7$N(B Mercurial $B%=!<%9$rMxMQ$7$?$$>l9g!"(B
  668.66 +Windows $B%M%$%F%#%V$J?6$kIq$$$O4|BT$G$-$^$;$s$,!"(B
  668.67 +Cygwin $B>e$G(B Mercurial $B$r%S%k%I$9$k$H$$$&<j$b$"$j$^$9!#(B}$B!#(B
  668.68 +
  668.69 +Windows $B>e$G(B Mercurial $B$r%=!<%9$+$i%S%k%I$9$k>l9g!"(B
  668.70 +$BB?$/$NLq2p;v$,5/$-$k$3$H$r3P8g$7$?>e$G!"(B
  668.71 +Mercurial $B$N(B Wiki $B>e$K$"$k(B
  668.72 +\url{http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall}
  668.73 +$B$K<($5$l$F$$$k(B``$B6lFq$NF;(B''$B$rC)$C$F$/$@$5$$!#(B
  668.74 +
  668.75 +%%% Local Variables: 
  668.76 +%%% mode: latex
  668.77 +%%% TeX-master: "00book"
  668.78 +%%% End: 
   669.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   669.2 +++ b/ja/svg2eps.sh	Sun Aug 16 03:41:39 2009 +0200
   669.3 @@ -0,0 +1,3 @@
   669.4 +#!/bin/sh
   669.5 +
   669.6 +inkscape -E $1 $2
   670.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   670.2 +++ b/ja/svg2eps_w32.sh	Sun Aug 16 03:41:39 2009 +0200
   670.3 @@ -0,0 +1,3 @@
   670.4 +#!/bin/sh
   670.5 +
   670.6 +inkscape -E `cygpath -w -a $1` `cygpath -w -a $2`
   671.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   671.2 +++ b/ja/svg2png.sh	Sun Aug 16 03:41:39 2009 +0200
   671.3 @@ -0,0 +1,3 @@
   671.4 +#!/bin/sh
   671.5 +
   671.6 +inkscape -D -e $1 $2
   672.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   672.2 +++ b/ja/svg2png_w32.sh	Sun Aug 16 03:41:39 2009 +0200
   672.3 @@ -0,0 +1,3 @@
   672.4 +#!/bin/sh
   672.5 +
   672.6 +inkscape -D -e `cygpath -w -a $1` `cygpath -w -a $2`
   673.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   673.2 +++ b/ja/template.tex	Sun Aug 16 03:41:39 2009 +0200
   673.3 @@ -0,0 +1,600 @@
   673.4 +\chapter{Customising the output of Mercurial}
   673.5 +\label{chap:template}
   673.6 +
   673.7 +Mercurial $B$O!"(B
   673.8 +$B>pJsI=<($NBN:[$r@)8f$9$k6/NO$J;EAH$_$rDs6!$7$F$$$^$9!#(B
   673.9 +$B$3$N;EAH$_$O%F%s%W%l!<%H$K4p$E$$$F$*$j!"(B
  673.10 +$B%F%s%W%l!<%H$r;HMQ$9$k$3$H$G!"(B
  673.11 +$BC1H/$N%3%^%s%I=PNO$N8GM-2=$b!"(B
  673.12 +Mercurial $BAH$_9~$_$N%&%'%V%$%s%?%U%'!<%9$N8+$+$1A4BN$N%+%9%?%^%$%:$b$G$-$^$9!#(B
  673.13 +
  673.14 +\section{Using precanned output styles}
  673.15 +\label{sec:style}
  673.16 +
  673.17 +Mercurial $B$K$OB(;HMQ$G$-$k=PNO!VMM<0!W$N4v$D$+$,F1:-$5$l$F$$$^$9!#(B
  673.18 +$B!VMM<0!W$H$O!"(B
  673.19 +$BC/$+$K$h$C$F=q$+$l$F!"(B
  673.20 +Mercurial $B$,C5$7=P$;$k2?=h$+$K%$%s%9%H!<%k$5$l$?!"(B
  673.21 +$B;vA0$KMQ0U$5$l$?%F%s%W%l!<%H$N$3$H$G$9!#(B
  673.22 +
  673.23 +Mercurial $B$KF1:-$5$l$?!VMM<0!W$r8+$kA0$K!"(B
  673.24 +Mercurial $B$NI8=`E*$J=PNO$r8+$F$_$^$7$g$&!#(B
  673.25 +
  673.26 +\interaction{template.simple.normal}
  673.27 +
  673.28 +$B$3$N=PNO$OM-1W$G$O$"$j$^$9$,!"(B
  673.29 +$B%A%'%s%8%;%C%HKh$K#59T$H$$$&B?$/$NI=<(NN0h$,I,MW$G$9(B
  673.30 +\texttt{compact} $BMM<0$O!"(B
  673.31 +$BI=BjEy$r>J$/$3$H$G!"(B
  673.32 +$B$3$N=PNO$r#39T$KDc8:$7$^$9!#(B
  673.33 +
  673.34 +\interaction{template.simple.compact}
  673.35 +
  673.36 +\texttt{changelog} $BMM<0$+$i$O!"(B
  673.37 +Mercurial $B$N%F%s%W%l!<%H%(%s%8%s$N;}$DI=8=NO$r3@4V8+$k$3$H$,$G$-$^$9!#(B
  673.38 +$B$3$NMM<0$O!"(B
  673.39 +GNU $B%W%m%8%'%/%H$N(B 
  673.40 +changelog $B%,%$%I%i%$%s(B\cite{web:changelog}$B$K1h$C$?=PNO$r9T$$$^$9!#(B
  673.41 +
  673.42 +\interaction{template.simple.changelog}
  673.43 +
  673.44 +Mercurial $B$N4{Dj=PNOMM<0$,(B
  673.45 +\texttt{default} $B$H$$$&L>A0$G$"$k$3$H$rCN$C$F$b6C$/$[$I$N$3$H$OL5$$$G$7$g$&!#(B
  673.46 +
  673.47 +\subsection{Setting a default style}
  673.48 +
  673.49 +$B9%$_$NMM<0$NL>A0$r(B \hgrc\ $B%U%!%$%k$G;XDj$9$k$3$H$G!"(B
  673.50 +Mercurial $B$,%3%^%s%I<B9T$N:]$K;HMQ$9$k=PNOMM<0$rJQ$($k;v$,$G$-$^$9!#(B
  673.51 +
  673.52 +\begin{codesample2}
  673.53 +  [ui]
  673.54 +  style = compact
  673.55 +\end{codesample2}
  673.56 +
  673.57 +$B<+J,<+?H$GMM<0$rDj5A$7$?>l9g!"(B
  673.58 +$B<+J,$NMM<0%U%!%$%k$X$N%Q%9$r;XDj$9$kJ}K!$H!"(B
  673.59 +$B<+J,$NMM<0%U%!%$%k$r(B Mercurial $B$,C5$7=P$;$k>l=j$X%3%T!<$9$kJ}K!(B
  673.60 +$B!J0lHL$K$O(B Mercurial $B$,%$%s%9%H!<%k$5$l$?%G%#%l%/%H%jD>2<$N(B
  673.61 +\texttt{templates} $B%G%#%l%/%H%j!K$N$I$A$i$G$G$b!"(B
  673.62 +$B<+J,$NMM<0%U%!%$%k$r;H$&$3$H$,$G$-$^$9!#(B
  673.63 +
  673.64 +\section{Commands that support styles and templates}
  673.65 +
  673.66 +``\texttt{log}$BE*$J(B'' $BA4$F$N(B Mercurial $B%3%^%s%I$KBP$7$F!"(B
  673.67 +$BMM<0$d%F%s%W%l!<%H$rE,MQ$G$-$^$9!#(B
  673.68 +$BNc$($P!"(B\hgcmd{incoming}$B!"(B\hgcmd{log}$B!"(B\hgcmd{outgoing}
  673.69 +$B$*$h$S(B \hgcmd{tip} $B$,$=$&$G$9(B\footnote{$BLuCm(B:
  673.70 +Mercurial 0.9.5 $BHG;~E@$G$O!"$3$l0J30$K(B
  673.71 +\hgcmd{heads} $B$*$h$S(B \hgcmd{parents} 
  673.72 +$B$,%F%s%W%l!<%H$r%5%]!<%H$7$F$$$^$9!#(B}$B!#(B
  673.73 +
  673.74 +$BI.<T$,$3$N%^%K%e%"%k$r<9I.$7$F$$$k;~E@$G$O!"(B
  673.75 +$BMM<0$d%F%s%W%l!<%H$KBP1~$7$F$$$k%3%^%s%I$O!"(B
  673.76 +$B$=$lDxB?$/$"$j$^$;$s!#(B
  673.77 +$B$7$+$7!"BP1~:Q$_$N%3%^%s%I$O!"(B
  673.78 +$B=PNO$N%+%9%?%^%$%:$,I,MW@-$,Hs>o$K9b$$%3%^%s%I72$G$7$?$N$G!"(B
  673.79 +Mercurial $B%f!<%6$N%3%_%e%K%F%#$+$i$O!"(B
  673.80 +$BB>$N%3%^%s%I$K$*$1$kMM<0$d%F%s%W%l!<%H$X$NBP1~$NMWK>$O!"(B
  673.81 +$B:#$N$H$3$m$"$^$j$"$j$^$;$s!#(B
  673.82 +
  673.83 +\section{The basics of templating}
  673.84 +
  673.85 +Mercurial $B$G8@$&%F%s%W%l!<%H$H$O!"(B
  673.86 +$BBg;(GD$K8@$&$J$i0lJR$N%F%-%9%H$G$9!#(B
  673.87 +$B7h$7$FJQ99$5$l$J$$ItJ,$,$"$k0lJ}$G!"(B
  673.88 +$BI,MW$K1~$8$F(B\emph{$BE83+(B}$B$d?7$?$J%F%-%9%H$G$NCV49$,<B;\$5$l$^$9!#(B
  673.89 +
  673.90 +$B>\:Y$r@bL@$9$kA0$K!"(B
  673.91 +Mercurial $B$NDL>o=PNO$N4JC1$JNc$r$b$&0lEY8+$F$_$^$7$g$&!#(B
  673.92 +
  673.93 +\interaction{template.simple.normal}
  673.94 +
  673.95 +$B$=$l$G$O!"(B
  673.96 +$B=PNO$rJQ$($k$?$a$N%F%s%W%l!<%H$r;XDj$7$F!"(B
  673.97 +$BF1$8%3%^%s%I$r<B9T$7$F$_$^$7$g$&!#(B
  673.98 +
  673.99 +\interaction{template.simple.simplest}
 673.100 +
 673.101 +$B>e5-$NNc$O!"2DG=$J8B$j:G$b4JC1$J%F%s%W%l!<%H$H$7$F!"(B
 673.102 +$B%A%'%s%8%;%C%HKh$KI=<($5$l$k@EE*$J%F%-%9%H$r;XDj$9$k$@$1$NNc$G$9!#(B
 673.103 +\hgcmd{log} $B%3%^%s%I$KBP$9$k(B
 673.104 +\hgopt{log}{--template} $B%*%W%7%g%s;XDj$O!"(B
 673.105 +$B%A%'%s%8%;%C%HKh$NI=<($N:]$K;HMQ$9$k%F%s%W%l!<%H$H$7$F!"(B
 673.106 +$B;XDj$5$l$?%F%-%9%H$r;HMQ$9$k$3$H$r(B Mercurial $B$K;X<($7$^$9!#(B
 673.107 +
 673.108 +$B>e5-$N%F%s%W%l!<%HJ8;zNs$O!"(B``\Verb+\n+'' $B$G=*N;$7$F$$$kE@$KCm0U$7$F$/$@$5$$!#(B
 673.109 +$B$3$l$O(B\emph{$B%(%9%1!<%W%7!<%1%s%9(B}$B$H8F$P$l$k$b$N$G!"(B
 673.110 +$B8D!9$N%F%s%W%l!<%HMWAG$N=*C<$G2~9T$rI=<($9$k$3$H$r(B
 673.111 +Mercurial $B$K;X<($7$^$9!#(B
 673.112 +$B$3$N2~9T$r>JN,$7$?>l9g!"(B
 673.113 +Mercurial $B$O8D!9$N=PNOMWAG$rC10l9T$G=PNO$7$^$9!#(B
 673.114 +$B%(%9%1!<%W%7!<%1%s%9$K4X$9$k>\:Y$O!"(B
 673.115 +\ref{sec:template:escape}~$B@a$r;2>H$7$F$/$@$5$$!#(B
 673.116 +
 673.117 +$B>o$K8GDj$5$l$?J8;zNs$rI=<($9$k%F%s%W%l!<%H$O!"$"$^$jM-MQ$H$O8@$($^$;$s$N$G!"(B
 673.118 +$B$b$&>/$7J#;($J$b$N$KD)@o$7$F$_$^$7$g$&!#(B
 673.119 +
 673.120 +\interaction{template.simple.simplesub}
 673.121 +
 673.122 +$B$4Mw$NDL$j!"(B
 673.123 +$B%F%s%W%l!<%HCf$N(B ``\Verb+{desc}+'' $BJ8;zNs$O!"(B
 673.124 +$B%A%'%s%8%;%C%HKh$N%m%0%a%C%;!<%8$GCV49$5$l$F=PNO$5$l$^$9!#(B
 673.125 +$BGH3g8L!J(B``\texttt{\{}'' $B5Z$S(B ``\texttt{\}}''$B!K(B
 673.126 +$B$G0O$^$l$?%F%-%9%H$,8!=P$5$l$?:]$K$O!"(B
 673.127 +$B$I$s$J%F%-%9%H$,0O$^$l$F$$$?>l9g$G$b>o$K!"(B
 673.128 +$B3g8L$*$h$S%F%-%9%HItJ,$NE83+$,(B Mercurial $B$K$h$j;n$_$i$l$^$9!#(B
 673.129 +$BGH3g8L$=$N$b$N$rI=<($7$?$$>l9g$O!"(B
 673.130 +\ref{sec:template:escape}~$B@a$G=R$Y$kJ}K!$G!"(B
 673.131 +$BGH3g8L$r%(%9%1!<%W$7$J$1$l$P$J$j$^$;$s!#(B
 673.132 +
 673.133 +\section{Common template keywords}
 673.134 +\label{sec:template:keyword}
 673.135 +
 673.136 +$B0J2<$N%-!<%o!<%I$r;HMQ$9$k$3$H$G!"(B
 673.137 +$B$9$0$K$G$b4JC1$J%F%s%W%l!<%H$r=q$/$3$H$,$G$-$^$9!#(B
 673.138 +
 673.139 +\begin{description}
 673.140 +
 673.141 +\item[\tplkword{author}] $BJ8;zNs!#(B
 673.142 +  $B%A%'%s%8%;%C%H$N:n@.<T!#(B
 673.143 +  $B%A%'%s%8%;%C%H:n@.8e$OJQ99$5$l$^$;$s!#(B
 673.144 +
 673.145 +\item[\tplkword{branches}] $BJ8;zNs!#(B
 673.146 +  $B%A%'%s%8%;%C%H$,%3%_%C%H$5$l$?%V%i%s%A$NL>A0!#(B
 673.147 +  $B%V%i%s%AL>$,(B \texttt{default} $B$N>l9g$O6u$G$9!#(B
 673.148 +
 673.149 +\item[\tplkword{date}] $BF|IU>pJs!#(B
 673.150 +  $B%A%'%s%8%;%C%H$,%3%_%C%H$5$l$?F|;~!#(B
 673.151 +  $B$3$NCM$O2DFI@-$,(B\emph{$B$"$j$^$;$s(B}$B$N$G!"(B
 673.152 +  $BE,@Z$KJ8;zNs2=$9$k%U%#%k%?$KEO$9I,MW$,$"$j$^$9!#(B
 673.153 +  $B%U%#%k%?$K4X$9$k>\:Y$O(B\ref{sec:template:filter}~$B@a$r;2>H$7$F$/$@$5$$!#(B
 673.154 +  $BF|;~$O?tCM$NBP$H$7$FI=$5$l$^$9!#(B
 673.155 +  $B:G=i$N?tCM$O(B Unix UTC $B%?%$%`%9%?%s%W!J(B1970 $BG/(B 1 $B7n(B 1 $BF|$+$i$N7P2aIC!K$G!"(B
 673.156 +  $B#2$DL\$N?tCM$O%3%_%C%H$N:]$N(B UTC $B$+$i$N%?%$%`%>!<%s%*%U%;%C%HIC?t$G$9!#(B
 673.157 +
 673.158 +\item[\tplkword{desc}] $BJ8;zNs!#(B
 673.159 +  $B%A%'%s%8%;%C%H$N%m%0%a%C%;!<%8!#(B
 673.160 +
 673.161 +\item[\tplkword{files}] $BJ8;zNs%j%9%H!#(B
 673.162 +  $BEv3:%A%'%s%8%;%C%H$GJQ99!&DI2C$J$$$7:o=|$5$l$?A4$F$N%U%!%$%k!#(B
 673.163 +
 673.164 +\item[\tplkword{file\_adds}] $BJ8;zNs%j%9%H!#(B
 673.165 +  $BEv3:%A%'%s%8%;%C%H$GDI2C$5$l$?%U%!%$%k!#(B
 673.166 +
 673.167 +\item[\tplkword{file\_dels}] $BJ8;zNs%j%9%H!#(B
 673.168 +  $BEv3:%A%'%s%8%;%C%H$G:o=|$5$l$?%U%!%$%k!#(B
 673.169 +
 673.170 +\item[\tplkword{node}] $BJ8;zNs!#(B
 673.171 +  $B%A%'%s%8%;%C%H<1JLMQ%O%C%7%eCM$r#4#0J8;z$N#1#6?J?tJ8;zNs2=$7$?$b$N!#(B
 673.172 +
 673.173 +\item[\tplkword{parents}] $BJ8;zNs%j%9%H!#(B
 673.174 +  $B%A%'%s%8%;%C%H$N?F!#(B
 673.175 +
 673.176 +\item[\tplkword{rev}] $B@0?tCM!#(B
 673.177 +  $B%j%]%8%H%j%m!<%+%k$J%A%'%s%8%;%C%H$N%j%S%8%g%sHV9f!#(B
 673.178 +
 673.179 +\item[\tplkword{tags}] $BJ8;zNs%j%9%H!#(B
 673.180 +  $BEv3:%A%'%s%8%;%C%H$K4XO"IU$1$i$l$?%?%0!#(B
 673.181 +
 673.182 +\end{description}
 673.183 +
 673.184 +$B4v$D$+<B83$7$F$_$k$3$H$G!"(B
 673.185 +$B$3$l$i$N%-!<%o!<%I$r;HMQ$7$?:]$K4|BT$5$l$kF0:n$r8+$k$3$H$,$G$-$^$9!#(B
 673.186 +$B?^(B~\ref{fig:template:keywords}$B$r;2>H$7$F$/$@$5$$!#(B
 673.187 +
 673.188 +\begin{figure}
 673.189 +  \interaction{template.simple.keywords}
 673.190 +  \caption{Template keywords in use}
 673.191 +  \label{fig:template:keywords}
 673.192 +\end{figure}
 673.193 +
 673.194 +$BA0=R$7$?$h$&$K!"(B
 673.195 +\tplkword{date} $B%-!<%o!<%I$O2DFI@-$N$"$k=PNO$r@8@.$7$^$;$s$N$G!"(B
 673.196 +$BFCJL07$$$9$kI,MW$,$"$j$^$9!#(B
 673.197 +$B$=$N$?$a$K$O(B \emph{filter} $B$r;H$&I,MW$,$"$j$^$9$,!"(B
 673.198 +$B>\:Y$O(B \ref{sec:template:filter}~$B@a$r;2>H$7$F$/$@$5$$!#(B
 673.199 +
 673.200 +\interaction{template.simple.datekeyword}
 673.201 +
 673.202 +\section{Escape sequences}
 673.203 +\label{sec:template:escape}
 673.204 +
 673.205 +Mercurial $B$N%F%s%W%l!<%H%(%s%8%s$O!"(B
 673.206 +$B:G$b9-$/;H$o$l$F$$$kJ8;zNs%(%9%1!<%W%7!<%1%s%9$rG'<1$7$^$9!#(B
 673.207 +$B%P%C%/%9%i%C%7%e!J(B``\Verb+\+''$B!K$r8!CN$7$?:]$K$O!"(B
 673.208 +$B$=$l$KB3$/J8;z$r8+$F!"(B
 673.209 +$B$=$l$i#2$D$NJ8;z$r0J2<$K<($9$h$&$JC1FH$NJ8;z$KCV49$7$^$9!#(B
 673.210 +
 673.211 +\begin{description}
 673.212 +\item[\Verb+\textbackslash\textbackslash+] $B%P%C%/%9%i%C%7%e!J(B``\Verb+\+''$B!K(B
 673.213 +  $B!?(BASCII~134$B!#(B
 673.214 +\item[\Verb+\textbackslash n+] $B2~9T!?(BASCII~12.
 673.215 +\item[\Verb+\textbackslash r+] $B9TF,!?(BASCII~15.
 673.216 +\item[\Verb+\textbackslash t+] $B%?%V!?(BASCII~11.
 673.217 +\item[\Verb+\textbackslash v+] $B?bD>%?%V!?(BASCII~13.
 673.218 +\item[\Verb+\textbackslash \{+] $B3+$-GH3g8L!J(B``\Verb+{+''$B!K!?(BASCII~173.
 673.219 +\item[\Verb+\textbackslash \}+] $BJD$8GH3g8L!J(B``\Verb+}+''$B!K!?(BASCII~175.
 673.220 +\end{description}
 673.221 +
 673.222 +$B>e5-$N$h$&$K!"(B
 673.223 +``\Verb+\+''$B!"(B``\Verb+{+'' $B$J$$$7(B ``\Verb+{+'' 
 673.224 +$B$=$N$b$N$r4^$`%F%s%W%l!<%H$r;HMQ$7$?$$>l9g!"(B
 673.225 +$B$3$l$i$O%(%9%1!<%W$5$l$J$1$l$P$J$j$^$;$s!#(B
 673.226 +
 673.227 +\section{Filtering keywords to change their results}
 673.228 +\label{sec:template:filter}
 673.229 +
 673.230 +$B%F%s%W%l!<%HE83+$K$*$1$k7k2L$N$&$A$N4v$D$+$O!"(B
 673.231 +$BD>$A$K;H$($k$[$I4JJX$J$b$N$G$O$"$j$^$;$s!#(B
 673.232 +Mercurial $B$O!"(B
 673.233 +$B%-!<%o!<%I$NE83+7k2L$rJQ99$9$k$?$a$K!"(B
 673.234 +$BG$0U$N(B\emph{$B%U%#%k%?(B}$B$NO":?$r;XDj$9$k$3$H$r5a$a$F$-$^$9!#(B
 673.235 +$B>e5-$N<B9TNc$K$*$$$F4{$K!"(B
 673.236 +$B0lHLE*$J%U%#%k%?$G$"$k(B \tplkwfilt{date}{isodate} $B$r!"(B
 673.237 +$BF|IU$rFI$a$k$h$&$K$9$k$?$a$K;HMQ$7$F$$$^$9!#(B
 673.238 +
 673.239 +Mercurial $B$,%5%]!<%H$9$k:G$b0lHLE*$K;HMQ$5$l$k%U%#%k%?$N%j%9%H$r!"(B
 673.240 +$B0J2<$K<($7$^$9!#(B
 673.241 +$BG$0U$N%F%-%9%H$KE,MQ$G$-$k%U%#%k%?$b$"$l$P!"(B
 673.242 +$BFCDj$N>u672<$G$N$_E,MQ2DG=$J$b$N$b$"$j$^$9!#(B
 673.243 +$B8D!9$N%U%#%k%?$N@bL@$O!"L>A0$KB3$$$FMxMQ2DG=$J>u67$rDs<($7!"(B
 673.244 +$B$=$l$K8z2L$N@bL@$,B3$/7A<0$H$J$C$F$$$^$9!#(B
 673.245 +
 673.246 +\begin{description}
 673.247 +\item[\tplfilter{addbreaks}] $BG$0U$N%F%-%9%H$KE,MQ2DG=!#(B
 673.248 +  XHTML $B$N(B ``\Verb+<br/>+'' $B%?%0$r!":G=*9T$r=|$/3F9T$NKvHx$KIUM?$7$^$9!#(B
 673.249 +  $BNc$($P(B ``\Verb+foo\nbar+'' $B$O(B ``\Verb+foo<br/>\nbar+'' $B$H$J$j$^$9!#(B
 673.250 +
 673.251 +\item[\tplkwfilt{date}{age}] \tplkword{date} $B%-!<%o!<%I$KE,MQ2DG=!#(B
 673.252 +  $B8=:_;~9o$KBP$9$kF|IU$NG/Np$rIA2h$7$^$9!#(B
 673.253 +  ``\Verb+10 minutes+'' $B$N$h$&$JJ8;zNs$r@8@.$7$^$9!#(B
 673.254 +
 673.255 +\item[\tplfilter{basename}] $BG$0U$N%F%-%9%H$KE,MQ2DG=$G$9$,!"(B
 673.256 +  \tplkword{files} $B%-!<%o!<%I$d$=$NAjBPCM$KBP$7$FE,MQ$9$k$N$,:G$bM-MQ$G$9!#(B
 673.257 +  $B%F%-%9%H$r%Q%9$H$7$F07$$!"$=$N%Y!<%9%M!<%`$rJV$7$^$9!#(B
 673.258 +  $BNc$($P(B ``\Verb+foo/bar/baz+'' $B$O(B ``\Verb+baz+'' $B$H$J$j$^$9!#(B
 673.259 +
 673.260 +\item[\tplkwfilt{date}{date}] \tplkword{date} $B%-!<%o!<%I$KE,MQ2DG=!#(B
 673.261 +  Unix $B$N(B \tplkword{date} $B%3%^%s%I$HF1Ey$N%U%)!<%^%C%H$GF|IU$rIA2h$7$^$9$,!"(B
 673.262 +  $B%?%$%`%>!<%s$r4^$_$^$9!#(B
 673.263 +  ``\Verb+Mon Sep 04 15:13:13 2006 -0700+'' $B$N$h$&$JJ8;zNs$r@8@.$7$^$9!#(B
 673.264 +
 673.265 +\item[\tplkwfilt{author}{domain}] $BG$0U$N%F%-%9%H$KE,MQ2DG=$G$9$,!"(B
 673.266 +  \tplkword{author} $B%-!<%o!<%I$KBP$7$FE,MQ$9$k$N$,:G$bM-MQ$G$9!#(B
 673.267 +  $BEE;R%a!<%k%"%I%l%9$H;W$7$-:G=i$NJ8;zNs$r8+$D$1=P$7!"(B
 673.268 +  $B%I%a%$%sItJ,$N$_$r<h$j=P$7$^$9!#(B
 673.269 +  $BNc$($P(B ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' $B$O(B
 673.270 +  ``\Verb+serpentine.com+'' $B$H$J$j$^$9!#(B
 673.271 +
 673.272 +\item[\tplkwfilt{author}{email}] $BG$0U$N%F%-%9%H$KE,MQ2DG=$G$9$,!"(B
 673.273 +  \tplkword{author} $B%-!<%o!<%I$KBP$7$FE,MQ$9$k$N$,:G$bM-MQ$G$9!#(B
 673.274 +  $BEE;R%a!<%k%"%I%l%9$H;W$7$-:G=i$NJ8;zNs$r8+$D$1=P$7$^$9!#(B
 673.275 +  $BNc$($P(B ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' $B$O(B
 673.276 +  ``\Verb+bos@serpentine.com+'' $B$H$J$j$^$9!#(B
 673.277 +
 673.278 +\item[\tplfilter{escape}] $BG$0U$N%F%-%9%H$KE,MQ2DG=!#(B
 673.279 +  XML/XHTML $B$NFC<lJ8;z$G$"$k(B
 673.280 +  ``\Verb+&+''$B!"(B``\Verb+<+'' $B$*$h$S(B ``\Verb+>+'' $B$r!"(B
 673.281 +  XML $B$N<BBN;2>H7A<0$GCV$-49$($^$9!#(B
 673.282 +
 673.283 +\item[\tplfilter{fill68}] $BG$0U$N%F%-%9%H$KE,MQ2DG=!#(B
 673.284 +  $B%F%-%9%H$r(B 68 $B7e$K<}$^$k$h$&$K9T$r@^$jJV$7$^$9!#(B
 673.285 +  \tplfilter{tabindent} $B%U%#%k%?<B;\8e$b(B 
 673.286 +  80 $B7e$N8GDj%U%)%s%HI}$N2hLL$K<}$a$?$$>l9g!"(B
 673.287 +  \tplfilter{tabindent} $B%U%#%k%?$KEO$9A0$N%F%-%9%H$KE,MQ$9$k$N$,NI$$$G$7$g$&!#(B
 673.288 +
 673.289 +\item[\tplfilter{fill76}] $BG$0U$N%F%-%9%H$KE,MQ2DG=!#(B
 673.290 +  76 $B7e$K<}$^$k$h$&$K9T$r@^$jJV$7$^$9!#(B
 673.291 +
 673.292 +\item[\tplfilter{firstline}] $BG$0U$N%F%-%9%H$KE,MQ2DG=!#(B
 673.293 +  $B%F%-%9%H$N:G=i$N9T$r!"2~9TEy$r4^$^$J$$7A<0$G<h$j=P$7$^$9!#(B
 673.294 +
 673.295 +\item[\tplkwfilt{date}{hgdate}] \tplkword{date} $B%-!<%o!<%I$KE,MQ2DG=!#(B
 673.296 +  $B2DFI@-$N$"$k?tCM$NAH$H$7$FF|IU$rIA2h$7$^$9!#(B
 673.297 +  ``\Verb+1157407993 25200+'' $B$N$h$&$JJ8;zNs$r@8@.$7$^$9!#(B
 673.298 +
 673.299 +\item[\tplkwfilt{date}{isodate}] \tplkword{date} $B%-!<%o!<%I$KE,MQ2DG=!#(B
 673.300 +  ISO~8601 $B7A<0$NJ8;zNs$H$7$FF|IU$rIA2h$7$^$9!#(B
 673.301 +  ``\Verb+2006-09-04 15:13:13 -0700+'' $B$N$h$&$JJ8;zNs$r@8@.$7$^$9!#(B
 673.302 +
 673.303 +\item[\tplfilter{obfuscate}] $BG$0U$N%F%-%9%H$KE,MQ2DG=$G$9$,!"(B
 673.304 +  \tplkword{author} $B%-!<%o!<%I$KBP$7$FE,MQ$9$k$N$,:G$bM-MQ$G$9!#(B
 673.305 +  $BF~NO%F%-%9%H$KBP1~$9$k(B XML $B<BBN;2>H%7!<%1%s%9$r@8@.$7$^$9!#(B
 673.306 +  $BE57?E*$JEE;R%a!<%k%"%I%l%9<}=8$r9T$&%9%Q%`%\%C%H(B
 673.307 +  $B!J(Bspambot$B!K$KBP$9$kBP93:v$N#1$D$H$7$FMxMQ2DG=$G$9!#(B
 673.308 +
 673.309 +\item[\tplkwfilt{author}{person}] $BG$0U$NJ8;zNs$KE,MQ2DG=$G$9$,!"(B
 673.310 +  \tplkword{author} $B%-!<%o!<%I$KBP$7$FE,MQ$9$k$N$,:G$bM-MQ$G$9!#(B
 673.311 +  $BEE;R%a!<%k%"%I%l%9$h$jA0$NItJ,$r<h$j=P$7$^$9!#(B
 673.312 +  $BNc$($P(B ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' $B$O(B
 673.313 +  ``\Verb+Bryan O'Sullivan+'' $B$H$J$j$^$9!#(B
 673.314 +
 673.315 +\item[\tplkwfilt{date}{rfc822date}] \tplkword{date} $B%-!<%o!<%I$KE,MQ2DG=!#(B
 673.316 +  $BEE;R%a!<%k%X%C%@$HF1$87A<0$GF|IU$rIA2h$7$^$9!#(B
 673.317 +  ``\Verb+Mon, 04 Sep 2006 15:13:13 -0700+'' $B$N$h$&$JJ8;zNs$r@8@.$7$^$9!#(B
 673.318 +
 673.319 +\item[\tplkwfilt{node}{short}] $B%A%'%s%8%;%C%H%O%C%7%eCM$KE,MQ2DG=$G$9!#(B
 673.320 +  $B%A%'%s%8%;%C%H%O%C%7%e$NC;=L7A<0!"B($A(B 12 $B7e$N(B 16 $B?JJ8;zNs$r@8@.$7$^$9!#(B
 673.321 +
 673.322 +\item[\tplkwfilt{date}{shortdate}] \tplkword{date} $B%-!<%o!<%I$KE,MQ2DG=!#(B
 673.323 +  $BG/7nF|7A<0$GF|IU$rIA2h$7$^$9!#(B
 673.324 +  ``\Verb+2006-09-04+'' $B$N$h$&$JJ8;zNs$r@8@.$7$^$9!#(B
 673.325 +
 673.326 +\item[\tplfilter{strip}] $BG$0U$N%F%-%9%H$KE,MQ2DG=!#(B
 673.327 +  $BKAF,$J$i$S$KKvHx$N6uGrJ8;z$rA4$F=|30$7$^$9!#(B
 673.328 +
 673.329 +\item[\tplfilter{tabindent}] $BG$0U$N%F%-%9%H$KE,MQ2DG=!#(B
 673.330 +  $B:G=i$N9T$r=|$/A4$F$N9T$,%?%VJ8;z$G;O$^$k$h$&$K$7$^$9!#(B
 673.331 +
 673.332 +\item[\tplfilter{urlescape}] $BG$0U$N%F%-%9%H$KE,MQ2DG=!#(B
 673.333 +  URL $B2r@O$N:]$K(B``$BFC<lJ8;z(B''$B$H$5$l$kJ8;z$r%(%9%1!<%W$7$^$9!#(B
 673.334 +  $BNc$($P(B \Verb+foo bar+ $B$O(B \Verb+foo%20bar+ $B$K$J$j$^$9!#(B
 673.335 +
 673.336 +\item[\tplkwfilt{author}{user}] $BG$0U$NJ8;zNs$KE,MQ2DG=$G$9$,!"(B
 673.337 +  \tplkword{author} $B%-!<%o!<%I$KBP$7$FE,MQ$9$k$N$,:G$bM-MQ$G$9!#(B
 673.338 +  $BEE;R%a!<%k%"%I%l%9$+$i(B``$B%f!<%6(B''$BItJ,$r<h$j=P$7$^$9!#(B
 673.339 +  $BNc$($P(B ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' $B$O(B
 673.340 +  ``\Verb+bos+'' $B$H$J$j$^$9!#(B
 673.341 +
 673.342 +\end{description}
 673.343 +
 673.344 +\begin{figure}
 673.345 +  \interaction{template.simple.manyfilters}
 673.346 +  \caption{Template filters in action}
 673.347 +  \label{fig:template:filters}
 673.348 +\end{figure}
 673.349 +
 673.350 +\begin{note}
 673.351 +  $BE,MQBP>]30$N%G!<%?$KBP$7$F%U%#%k%?$NE,MQ$r;n$_$?>l9g!"(B
 673.352 +  Mercurial $B$O<B9T$K<:GT$7$F(B Python $B$NNc30$rI=<($7$^$9!#(B
 673.353 +  $BNc$($P!"(B\tplkword{desc} $B%-!<%o!<%I$K(B
 673.354 +  \tplkwfilt{date}{isodate} $B%U%#%k%?$rE,MQ$9$k$N$O$h$m$7$/$"$j$^$;$s!#(B
 673.355 +\end{note}
 673.356 +
 673.357 +\subsection{Combining filters}
 673.358 +
 673.359 +$B=jDj$N7A<0$G$N=PNO$rF@$k$?$a$K!"(B
 673.360 +$B4JC1$K%U%#%k%?$rAH$_9g$o$;$k$3$H$,$G$-$^$9!#(B
 673.361 +$B0J2<$NNc$G$O!"%m%0%a%C%;!<%8$NKAF,!&KvHx$N6uGr$r=|30$7!"(B
 673.362 +68 $B7e$K<}$^$k$h$&$K2~9T$7$?8e$G!"(B
 673.363 +$B$5$i$K#8J8;zJ,!J%?%VJ8;z$,47=,E*$K#8J8;z$H$7$F07$o$l$k(B
 673.364 +Unix $BE*$J4D6-$G$O!K$N;z2<$2$,!"(B
 673.365 +$B%U%#%k%?O":?$K$h$j<B;\$5$l$^$9!#(B
 673.366 +
 673.367 +\interaction{template.simple.combine}
 673.368 +
 673.369 +$B%F%s%W%l!<%H$K$*$1$k(B``\Verb+\t+''$B!J%?%VJ8;z!K$NMxMQ$O!"(B
 673.370 +$B:G=i$N9T$N6/@)E*$J;z2<$2$r9T$&$?$a$N$b$N$G$"$k$3$H$KCm0U$7$F$/$@$5$$!#(B
 673.371 +\tplkword{tabindent} $B$,:G=i$N9T(B\emph{$B0J30$N(B}$BA4$F$N9T$r;z2<$2$9$k$?$a$K!"(B
 673.372 +$B$3$N%?%VJ8;z$,I,MW$G$9!#(B
 673.373 +
 673.374 +$BO":?$K$*$1$k%U%#%k%?$N=g=x$,=EMW$G$"$kE@$KN10U$7$F$/$@$5$$!#(B
 673.375 +$B:G=i$N%U%#%k%?$,%-!<%o!<%I$NCV497k2L$KE,MQ$5$l!"(B
 673.376 +$B#2$DL\$N%U%#%k%?$,:G=i$N%U%#%k%?$NE,MQ7k2L$KE,MQ$5$l$k!"(B
 673.377 +$B$H$$$&6q9g$G$9!#(B
 673.378 +$BNc$($P!"(B
 673.379 +\Verb+fill68|tabindent+ $B$H$$$&5-=R$O(B
 673.380 +\Verb+tabindent|fill68+ $B$H$OA4$/0c$C$?7k2L$H$J$j$^$9!#(B
 673.381 +
 673.382 +\section{From templates to styles}
 673.383 +
 673.384 +$B%3%^%s%I9T$G$N%F%s%W%l!<%H;XDj$O!"(B
 673.385 +$B<jAa$/4JC1$K=PNO$r@07A$9$k<jCJ$rDs6!$7$^$9!#(B
 673.386 +$B$7$+$7!"%F%s%W%l!<%H$O>iD9$K@.$j$,$A$G$9$+$i!"(B
 673.387 +$B%F%s%W%l!<%H$KL>A0IU$1$G$-$l$PJXMx$K$J$j$^$9!#(B
 673.388 +$BMM<0!J(Bsytle$B!K%U%!%$%k$O!"L>A0$,IU$1$i$l!"(B
 673.389 +$B%U%!%$%k$KJ]B8$5$l$?%F%s%W%l!<%H$N$3$H$G$9!#(B
 673.390 +
 673.391 +$B$=$l0J>e$K!"(B
 673.392 +$B%3%^%s%I9T$G$N(B \hgopt{log}{--template} $B%*%W%7%g%s;HMQ$G$O0z$-=P$;$J$+$C$?(B
 673.393 +Mercurial $B$N%F%s%W%l!<%H%(%s%8%s$NG=NO$r!"(B
 673.394 +$BMM<0%U%!%$%k$rMQ$$$k$3$H$G0z$-=P$9$3$H$,$G$-$^$9!#(B
 673.395 +
 673.396 +\subsection{The simplest of style files}
 673.397 +
 673.398 +$B0J2<$K<($94JC1$JMM<0%U%!%$%k$O!"(B
 673.399 +$B#19T$@$1$N$b$N$G$9!#(B
 673.400 +
 673.401 +\interaction{template.simple.rev}
 673.402 +
 673.403 +$B$3$NMM<05-=R$O!"(B
 673.404 +``$B%A%'%s%8%;%C%H$rI=<($9$k:]$K$O!"(B
 673.405 +$B1&JU$N%F%-%9%H$r%F%s%W%l!<%H$H$7$F;HMQ$;$h(B''
 673.406 +$B$H(B Mercurial $B$K;X<($7$^$9!#(B
 673.407 +
 673.408 +\subsection{Style file syntax}
 673.409 +
 673.410 +$BMM<0%U%!%$%k$NJ8K!$O4JC1$G$9!#(B
 673.411 +
 673.412 +\begin{itemize}
 673.413 +\item $B%U%!%$%k$O0l9T$E$D=hM}$5$l$^$9!#(B
 673.414 +
 673.415 +\item $B9TF,$*$h$S9TKv$N6uGr$OL5;k$5$l$^$9!#(B
 673.416 +
 673.417 +\item $B6u9T$OFI$_Ht$P$5$l$^$9!#(B
 673.418 +
 673.419 +\item ``\texttt{\#}'' $B$J$$$7(B ``\texttt{;}'' $B$N$$$:$l$+$G;O$^$k9T$O!"(B
 673.420 +  $B9TA4BN$,%3%a%s%H$H$_$J$5$l!"6u9T$HF1MM$KFI$_Ht$P$5$l$^$9!#(B
 673.421 +
 673.422 +\item $B9T$O%-!<%o!<%I$G3+;O$5$l$^$9!#(B
 673.423 +  $B%-!<%o!<%I$O1Q;z$J$$$72<@~!J(Bunderscore$B!K$G3+;O$5$l!"(B
 673.424 +  $BG$0U8D?t$N1Q?t;z$J$$$72<@~$,B3$-$^$9(B
 673.425 +  $B!J@55,I=8=$G=q$/$J$i!"(B
 673.426 +  $B%-!<%o!<%I$O(B ``\Verb+[A-Za-z_][A-Za-z0-9_]*+.'' 
 673.427 +  $B$K9gCW$7$J$1$l$P$J$j$^$;$s!K!#(B
 673.428 +
 673.429 +\item $B%-!<%o!<%I$KB3$/MWAG$OJ8;z(B ``\texttt{=}'' $B$G$J$1$l$P$J$j$^$;$s$,!"(B
 673.430 +  $BA08e$KG$0U8D$N6uGrJ8;z$,$"$C$F$b9=$$$^$;$s!#(B
 673.431 +
 673.432 +\item $B9T$N;D$jItJ,$,0zMQId!J%7%s%0%k%/%)!<%H$J$$$7%@%V%k%/%)!<%H!K(B
 673.433 +  $B$G0O$^$l$F$$$k>l9g!"(B
 673.434 +  $B$=$NItJ,$O%F%s%W%l!<%H$NK\BN$H$_$J$5$l$^$9!#(B
 673.435 +
 673.436 +\item $B9T$N>h$jItJ,$,0zMQId$G0O$^$l$F(B\emph{$B$$$J$$(B}$B>l9g!"(B
 673.437 +  $B$=$NItJ,$O!"(B
 673.438 +  $B%F%s%W%l!<%HK\BN$rFbMF$H$7$F;}$D%U%!%$%k$N%U%!%$%kL>$H$_$J$5$l$^$9!#(B
 673.439 +
 673.440 +\end{itemize}
 673.441 +
 673.442 +\section{Style files by example}
 673.443 +
 673.444 +$BMM<0%U%!%$%k$N5-=R$r@bL@$9$k$?$a$K!"(B
 673.445 +$B4v$D$+$NNc$r<($7$^$9!#(B
 673.446 +$BMM<0%U%!%$%k0l<0$rDL$7$FFI$`$h$j$b!"(B
 673.447 +$BHs=j$K4JC1$JNc$+$i;O$a$F!"(B
 673.448 +$B4v$D$+$NJ#;($JNc$rDL$7FI$_$9$k$3$H$G!"(B
 673.449 +$BDL>o$NMM<0%U%!%$%k:n@.<j=g$r<($=$&$H;W$$$^$9!#(B
 673.450 +
 673.451 +\subsection{Identifying mistakes in style files}
 673.452 +
 673.453 +$BMM<0%U%!%$%kCf$KLdBj$,$"$C$?>l9g!"(B
 673.454 +Mercurial $B$O$=$C$1$J$$%(%i!<%a%C%;!<%8$rI=<($7$^$9$,!"(B
 673.455 +$B0UL#$9$k$H$3$m$,$o$+$C$F$7$^$($P!"(B
 673.456 +$B$=$N%a%C%;!<%8$OHs>o$KM-MQ$G$9!#(B
 673.457 +
 673.458 +\interaction{template.svnstyle.syntax.input}
 673.459 +
 673.460 +\filename{broken.style} $B$O!"(B
 673.461 +\texttt{changeset} $B%-!<%o!<%I$rDj5A$7$h$&$H$7$F$$$k$b$N$N!"(B
 673.462 +$B$=$NFbMF$,5-=R$5$l$F$$$J$$E@$KCmL\$7$F$/$@$5$$!#(B
 673.463 +$B$3$N$h$&$JMM<0%U%!%$%k$,;XDj$5$l$?>l9g!"(B
 673.464 +Mercurial $B$OB(:B$K%a%C%;!<%8$rI=<($7$^$9!#(B
 673.465 +
 673.466 +\interaction{template.svnstyle.syntax.error}
 673.467 +
 673.468 +$B$3$N%a%C%;!<%8$O0R05E*$K8+$($^$9$,!"(B
 673.469 +$BFI$_2r$/$N$O$=$l$[$IFq$7$/$"$j$^$;$s!#(B
 673.470 +
 673.471 +\begin{itemize}
 673.472 +\item $B:G=i$NMWAG$O!"C1$K(B Mercurial $B$,(B``$B<B9T$r$"$-$i$a$^$7$?(B''
 673.473 +  $B$HDLCN$7$F$$$^$9!#(B
 673.474 +  \begin{codesample4}
 673.475 +    \textbf{abort:} broken.style:1: parse error
 673.476 +  \end{codesample4}
 673.477 +
 673.478 +\item $B<!$NMWAG$O!"%(%i!<$NMW0x$,3JG<$5$l$?MM<0%U%!%$%k$NL>A0$G$9!#(B
 673.479 +  \begin{codesample4}
 673.480 +    abort: \textbf{broken.style}:1: parse error
 673.481 +  \end{codesample4}
 673.482 +
 673.483 +\item $B%U%!%$%kL>$N<!$O!"%(%i!<$,H/@8$7$?9THV9f$K$J$j$^$9!#(B
 673.484 +  \begin{codesample4}
 673.485 +    abort: broken.style:\textbf{1}: parse error
 673.486 +  \end{codesample4}
 673.487 +
 673.488 +\item $B:G8e$K!"LdBj$N@bL@$,5-=R$5$l$^$9!#(B
 673.489 +  \begin{codesample4}
 673.490 +    abort: broken.style:1: \textbf{parse error}
 673.491 +  \end{codesample4}
 673.492 +  $BLdBj$N@bL@$O!J$3$NNc$N$h$&$K!K>o$KL@3N$G$"$k$H$O8B$j$^$;$s$,!"(B
 673.493 +  $B0E9f$a$$$?$b$N$G$"$C$?$H$7$F$b!"(B
 673.494 +  $BMM<0%U%!%$%kCf$NLdBj$H$J$k9T$rL\;k3NG'$7$F4V0c$$$r8+$D$1$k>e$G$O!"(B
 673.495 +  $BKX$I$N>l9g$O<h$k$KB-$i$J$$@bL@$G$9!#(B
 673.496 +
 673.497 +\end{itemize}
 673.498 +
 673.499 +\subsection{Uniquely identifying a repository}
 673.500 +
 673.501 +$BC;$$J8;zNs$r<1JL;R$H$7$F(B
 673.502 +Mercurial $B%j%]%8%H%j$r(B``$B35$M0l0U$K(B''$B<1JL(B\footnote{$BLuCm(B:
 673.503 +$B$3$3$G8@$&!V%j%]%8%H%j$N<1JL!W$O!"(B
 673.504 +$B$`$7$m!V%W%m%8%'%/%H$N<1JL!W$K6a$$%K%e%"%s%9$H;W$o$l$^$9!#(B
 673.505 +}$B$7$?$$>l9g!"(B
 673.506 +$B%j%]%8%H%j$N:G=i$N%j%S%8%g%s$r;HMQ$9$k$N$,NI$$$G$7$g$&!#(B
 673.507 +
 673.508 +\interaction{template.svnstyle.id} 
 673.509 +
 673.510 +$B$3$NCM$O0l0U$G$"$k$3$H$,J]>Z$5$l$F$$$^$;$s$,!"(B
 673.511 +$B$=$l$G$bB?$/$N>l9g$K$*$$$FM-MQ$G$9!#(B
 673.512 +
 673.513 +\begin{itemize}
 673.514 +\item $B40A4$K6u$N%j%]%8%H%j$G$O%j%S%8%g%s(B~0$B$,B8:_$7$J$$$?$a!"(B
 673.515 +  $B$3$NJ}K!$O5!G=$7$^$;$s!#(B
 673.516 +
 673.517 +\item $B0JA0$OJL!9$@$C$?J#?t$N%j%]%8%H%j$r%^!<%8$7$?$b$N$H!"(B
 673.518 +  $B%^!<%8A0$N%j%]%8%H%j$rJ;MQ$7$F$$$k>l9g(B
 673.519 +  $B!J$3$N$h$&$J;vBV$OHs>o$K5)$G$O$"$j$^$9$,!K!"(B
 673.520 +  $B$=$l$i$N%j%]%8%H%j$N4V$G$O!"(B
 673.521 +  $B$3$NJ}K!$K$h$k<1JL$O5!G=$7$^$;$s!#(B
 673.522 +
 673.523 +\end{itemize}
 673.524 +
 673.525 +$B%j%]%8%H%j<1JL;R$NMxMQNc$r0J2<$K<($7$^$9!#(B
 673.526 +
 673.527 +\begin{itemize}
 673.528 +\item $B%5!<%P>e$N%j%]%8%H%j$r4IM}$7$F$$$k%G!<%?%Y!<%9$G$N!"(B
 673.529 +  $B%F!<%V%k$K$*$1$k%-!<$H$7$F$N;HMQ(B
 673.530 +
 673.531 +\item \{\emph{$B%j%]%8%H%j<1JL;R(B}, \emph{$B%j%S%8%g%s<1JL;R(B}\} 
 673.532 +  $B$H$$$&%?%W%k$N0lIt$H$7$F$N;HMQ!#(B
 673.533 +  $B%S%k%I$dB>$N<+F02=$5$l$?=hM}$r<B;\$9$k:]$K!"(B
 673.534 +  $B$3$N%?%W%k>pJs$rJ]B8$7$F$*$/$3$H$G!"(B
 673.535 +  $B8e$K=hM}$r(B``$B:F8=(B''$B$9$k$3$H$,2DG=$G$9!#(B
 673.536 +
 673.537 +\end{itemize}
 673.538 +
 673.539 +\subsection{Mimicking Subversion's output}
 673.540 +
 673.541 +$BNc$($P(B Subversion $B$N$h$&$J!"(B
 673.542 +$BB>$N9=@.4IM}%D!<%k$N%G%U%)%k%H=PNO7A<0$r$^$M$F$_$^$7$g$&!#(B
 673.543 +
 673.544 +\interaction{template.svnstyle.short}
 673.545 +
 673.546 +Subversion $B$N=PNOMM<0$O$+$J$jC1=c$G$9$N$G!"(B
 673.547 +$B=PNOFbMF$r%U%!%$%k$KJ]B8$7!"(B
 673.548 +$B=PNO%F%-%9%HCf$G(B Subversion $B$K$h$j!JF0E*$K!K@8@.$5$l$kItJ,$r!"(B
 673.549 +$BE83+$5$l$k%F%s%W%l!<%HCM(B\footnote{$BLuCm!'(B $B%-!<%o!<%I$N$3$H!)(B
 673.550 +}$B$GCV$-49$($k$N$OMF0W$G$7$g$&!#(B
 673.551 +
 673.552 +\interaction{template.svnstyle.template}
 673.553 +
 673.554 +$B$3$N%F%s%W%l!<%H$K$h$k=PNO$,!"(B
 673.555 +Subversion $B$K$h$j@8@.$5$l$k=PNOMM<0$+$i0oC&$9$k>l9g(B\footnote{
 673.556 +$BLuCm!'(B ``a few small ways'' $B$h$j$O(B ``a few small point'' $B$G!"(B
 673.557 +$B!V0oC&$9$k2U=j!W$NJ}$,NI$/$J$$$+!)(B}$B$,4v$D$+$"$j$^$9!#(B
 673.558 +
 673.559 +\begin{itemize}
 673.560 +\item Subversion $B$O!"(B``$B2DFI@-$N$"$k(B''$BF|IU(B
 673.561 +  $B!J>e5-$N=PNONc$K$*$1$k(B ``\texttt{Wed, 27 Sep 2006}''$B!K(B
 673.562 +  $B$r4]3g8L$NCf$KI=<($7$^$9!#(B
 673.563 +  Mercurial $B$N%F%s%W%l!<%H%(%s%8%s$O!"(B
 673.564 +  $B;~9o$H%?%$%`%>!<%s$NL5$$$3$N7A<0$GF|IU$rI=<($9$k<jCJ$rDs6!$7$F$$$^$;$s!#(B
 673.565 +
 673.566 +\item $B%F%s%W%l!<%HKvHx$K(B
 673.567 +  ``\texttt{-}''$BJ8;z$r0lGU$K;H$C$?9T$NI=<($rG[CV$9$k$3$H$G(B
 673.568 +  Subversion $B$N(B``$BJ,N%(B''$B@~$r$^$M$F$$$^$9!#(B
 673.569 +  Subversion $B$N=PNO$K;w$;$k$?$a!"(B
 673.570 +  $B=PNO$N:G=i$NJ,N%@~I=<($K$O!"(B
 673.571 +  $B%F%s%W%l!<%H%(%s%8%s$N(B
 673.572 +  \tplkword{header} $B%-!<%o!<%I$r;HMQ$7$F$$$^$9!J8e=R$7$^$9!K!#(B\footnote{
 673.573 +  $BLuCm!'$3$l$O(B deviate $B$JE@$G$O$J$$5$$,!D(B }
 673.574 +
 673.575 +\item Subversion $B$N=PNO$O!"(B
 673.576 +  $B%X%C%@It$K%3%_%C%H%a%C%;!<%8$N9T?t$,I=<($5$l$^$9!#(B
 673.577 +  Mercurial $B$G$O$3$l$KAjEv$9$k>pJs$rI=<($9$k$3$H$,$G$-$^$;$s!#(B
 673.578 +  $B=hM}BP>]$H$J$k%G!<%?$N9T?t$r?t$(>e$2$k%U%#%k%?$r!"(B
 673.579 +  $B%F%s%W%l!<%H%(%s%8%s$,8=;~E@$G$ODs6!$7$F$$$J$$$?$a$G$9!#(B
 673.580 +
 673.581 +\end{itemize}
 673.582 +
 673.583 +Subversion $B$N=PNONc$r85$K!"(B
 673.584 +$B>e5-%F%s%W%l!<%H$N$h$&$J%-!<%o!<%I!&%U%#%k%?$X$NCV$-49$($r9T$&:n6H$O!"(B
 673.585 +$B$;$$$<$$$,#1!A#2J,$G:Q$`:n6H$G$9!#(B
 673.586 +$BMM<0%U%!%$%k$O!"C1$K$3$N%F%s%W%l!<%H$r;2>H$9$l$PNI$$$N$G$9!#(B
 673.587 +
 673.588 +\interaction{template.svnstyle.style}
 673.589 +
 673.590 +$B%F%s%W%l!<%H%U%!%$%k%F%-%9%H$rMM<0%U%!%$%k$GD>@\@_Dj$9$k$K$O!"(B
 673.591 +$B0zMQId$G0O$_!"2~9TJ8;z$r(B ``\texttt{\\n}'' $B$GCV$-49$($l$PNI$$$N$G$9$,!"(B
 673.592 +$BMM<0%U%!%$%k$rHs>o$KFI$_Fq$/$7$F$7$^$$$^$9!#(B
 673.593 +$B%F%s%W%l!<%H$rMM<0%U%!%$%k$KD>@\5-=R$9$k$+!"(B
 673.594 +$B%F%s%W%l!<%H%U%!%$%k$K5-=R$7$?$b$N$rMM<0%U%!%$%k$+$i;2>H$9$k$+$r7h$a$k:]$K$O!"(B
 673.595 +$B2DFI@-$r4p=`$H$9$k$N$,NI$$$G$7$g$&!#(B
 673.596 +$BMM<0%U%!%$%k$NBg$-$5$dJ#;($5$,9b$^$k>l9g$O!"(B
 673.597 +$B%F%s%W%l!<%H%F%-%9%H$r5-=R$9$k$N$G$O$J$/!"(B
 673.598 +$B30It%U%!%$%k$K=P$7$F$7$^$$$^$7$g$&!#(B
 673.599 +
 673.600 +%%% Local Variables: 
 673.601 +%%% mode: latex
 673.602 +%%% TeX-master: "00book"
 673.603 +%%% End: 
   674.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   674.2 +++ b/ja/tour-basic.tex	Sun Aug 16 03:41:39 2009 +0200
   674.3 @@ -0,0 +1,846 @@
   674.4 +\chapter{A tour of Mercurial: the basics}
   674.5 +\label{chap:tour-basic}
   674.6 +
   674.7 +\section{Installing Mercurial on your system}
   674.8 +\label{sec:tour:install}
   674.9 +
  674.10 +$B0lHLE*$JA4$F$N(B OS $B8~$1$K!"(B
  674.11 +$B%S%k%I:Q$_$N(B Mercurial $B%P%$%J%jHG$,Ds6!$5$l$F$$$^$9!#(B
  674.12 +$B%P%$%J%jHG$r;HMQ$9$k$3$H$G!"(B
  674.13 +$B4JC1$K(B Mercurial $B$r%;%C%H%"%C%W$9$k$3$H$,$G$-$^$9!#(B
  674.14 +
  674.15 +\subsection{Linux}
  674.16 +
  674.17 +Linux $B%G%#%9%H%j%S%e!<%7%g%s$O!"(B
  674.18 +$B$=$l$>$l8GM-$N%Q%C%1!<%84IM}%D!<%k!"(B
  674.19 +$B%Q%C%1!<%8:n@.J}?K!"$J$i$S$K3+H/%Z!<%9$r;}$C$F$$$^$9$N$G!"(B
  674.20 +$BA4$F$N%P%$%J%jHG(B Mercurial 
  674.21 +$B$N%$%s%9%H!<%k<j=g$K4X$9$kJq3gE*$J@bL@$r9T$&$N$O:$Fq$G$9!#(B
  674.22 +$B$^$?!"(B
  674.23 +$B%P%$%J%jHG$N%$%s%9%H!<%k$K$h$C$FMxMQ2DG=$J(B Mercurial $B$N%P!<%8%g%s$O!"(B
  674.24 +$BEv3:%G%#%9%H%j%S%e!<%7%g%s$N%Q%C%1!<%8J]<iC4Ev<T$,!"(B
  674.25 +$B$I$NDxEY3hH/$G$"$k$+$K$h$C$F0[$J$j$^$9!#(B
  674.26 +
  674.27 +$B4JJX2=$N$?$a!"(B
  674.28 +$BCxL>$J(B Linux $B%G%#%9%H%j%S%e!<%7%g%s$K$*$1$k!"(B
  674.29 +$B%3%^%s%I%i%$%s$rMQ$$$?(B Mercurial $B$N%$%s%9%H!<%k$K8BDj$7$F@bL@$7$^$9!#(B
  674.30 +$BKX$I$N%G%#%9%H%j%S%e!<%7%g%s$G$O!"(B
  674.31 +\texttt{mercurial} $B$H$$$&L>A0$N%Q%C%1!<%8$rC5$7$?$J$i$P!"(B
  674.32 +$B%/%j%C%/$R$H$D$G(B Mercurial $B$,%$%s%9%H!<%k$G$-$k$h$&$J!"(B
  674.33 +$B%0%i%U%#%+%k$J%Q%C%1!<%84IM}%D!<%k$,Ds6!$5$l$F$$$^$9!#(B
  674.34 +
  674.35 +\begin{description}
  674.36 +\item[Debian]
  674.37 +  \begin{codesample4}
  674.38 +    apt-get install mercurial
  674.39 +  \end{codesample4}
  674.40 +
  674.41 +\item[Fedora Core]
  674.42 +  \begin{codesample4}
  674.43 +    yum install mercurial
  674.44 +  \end{codesample4}
  674.45 +
  674.46 +\item[Gentoo]
  674.47 +  \begin{codesample4}
  674.48 +    emerge mercurial
  674.49 +  \end{codesample4}
  674.50 +
  674.51 +\item[OpenSUSE]
  674.52 +  \begin{codesample4}
  674.53 +    yum install mercurial
  674.54 +  \end{codesample4}
  674.55 +
  674.56 +\item[Ubuntu] Ubuntu $B$N(B Mercurial $B%Q%C%1!<%8$OHs>o$K8E$$$N$G!"(B
  674.57 +  $B;HMQ$9$Y$-$G$O$"$j$^$;$s!#(B
  674.58 +  $B$G$-$l$P!"(BDebian $B%Q%C%1!<%8$r%j%S%k%I$7$F%$%s%9%H!<%k$7$F$/$@$5$$!#(B
  674.59 +  $B$*$=$i$/(B Mercurial $B$r%=!<%9$+$i%S%k%I$9$kJ}$,4JC1$G$7$g$&!#(B
  674.60 +  $B$=$N>l9g$N>\:Y$O!"(B\ref{sec:srcinstall:unixlike}~$B@a$r;2>H$7$F$/$@$5$$!#(B
  674.61 +
  674.62 +\end{description}
  674.63 +
  674.64 +\subsection{Mac OS X}
  674.65 +
  674.66 +Mac OS~X $B8~$1$N(B Mercurial $B%$%s%9%H!<%i$O!"(B
  674.67 +Lee Cantey $B$K$h$C$F(B
  674.68 +\url{http://mercurial.berkwood.com} $B$G8x3+$5$l$F$$$^$9!#(B
  674.69 +$B$3$N%Q%C%1!<%8$O!"(BIntel $B$*$h$S(B Power $B$NN>(B Mac $B$GF0:n$7$^$9!#(B
  674.70 +$B$3$N%$%s%9%H!<%i$r;HMQ$9$kA0$K!"(B
  674.71 +Universal MacPython~\cite{web:macpython} 
  674.72 +$B$H8_49@-$N$"$k(B Python $B$r%$%s%9%H!<%k$9$kI,MW$,$"$j$^$9!#(B
  674.73 +Lee $B;a$N%5%$%H$K$"$k<j=g$rF'$a$P!"4JC1$K%$%s%9%H!<%k$G$-$^$9!#(B
  674.74 +
  674.75 +\subsection{Solaris}
  674.76 +
  674.77 +$BL$9;!#(BXXX
  674.78 +
  674.79 +\subsection{Windows}
  674.80 +
  674.81 +Windows $B8~$1$N(B Mercurial $B%$%s%9%H!<%i$O!"(B
  674.82 +Lee Cantey $B$K$h$C$F(B
  674.83 +\url{http://mercurial.berkwood.com} $B$G8x3+$5$l$F$$$^$9!#(B
  674.84 +$B$3$N%Q%C%1!<%8$OB>$N%Q%C%1!<%8$X$N0MB8@-$,$"$j$^$;$s$N$G!"(B
  674.85 +$BC1FH$GMxMQ$G$-$^$9!#(B
  674.86 +
  674.87 +\begin{note}
  674.88 +  $B4pDl>uBV$N(B Windows $BHG(B Mercurial $B$O!"(B
  674.89 +  Windows $B$H(B Unix $B$N2~9T7A<0$N<+F0JQ49$O9T$$$^$;$s!#(B
  674.90 +  Unix $BMxMQ<T$HJQ99@.2L$r6&M-$7$?$$>l9g$O!"(B
  674.91 +  $B>/!9DI2C@_Dj$r9T$&I,MW$,$"$j$^$9!#(B
  674.92 +  $B>\:YL$9;(B XXX$B!#(B
  674.93 +\end{note}
  674.94 +
  674.95 +\section{Getting started}
  674.96 +
  674.97 +Mercurial $B$r;H$$;O$a$k$K$"$?$j!"(B
  674.98 +$B<B:]$KMxMQ2DG=$J(B Mercurial $B%3%^%s%I$N%P!<%8%g%s$r3NG'$9$k$?$a!"(B
  674.99 +\hgcmd{version} $B%3%^%s%I$r;H$C$F$_$^$7$g$&!#(B
 674.100 +$B<B:]$N%P!<%8%g%s>pJs$K$O$=$l$[$I=EMW@-$O$"$j$^$;$s$,!"(B
 674.101 +$B2?$bI=<($5$l$J$$>l9g$OBP=h$,I,MW$G$9!#(B
 674.102 +
 674.103 +\interaction{tour.version}
 674.104 +
 674.105 +\subsection{Built-in help}
 674.106 +
 674.107 +Mercurial $B$OAH$_9~$_%X%k%W5!G=$r;}$C$F$$$^$9!#(B
 674.108 +$B$3$N5!G=$O!"(B
 674.109 +$B%3%^%s%I$N<B9TJ}K!$r;W$$=P$;$J$$>l9g$KM-MQ$G$9!#(B
 674.110 +$B2?$r$7$FNI$$$N$+40A4$K$o$+$i$J$/$J$C$F$7$^$C$?>l9g$O!"(B
 674.111 +$BC1$K(B \hgcmd{help} $B$r<B9T$9$k$3$H$G!"(B
 674.112 +$B$=$l$>$l$,$I$N$h$&$J5!G=$r;}$C$F$$$k$+$N@bL@$,IU$$$?!"(B
 674.113 +$B4JC1$J%3%^%s%I0lMw$,I=<($5$l$^$9!#(B
 674.114 +$B0J2<$K<($9$h$&$J7A<0$G!"(B
 674.115 +$BFCDj$N%3%^%s%I$K$D$$$F(B \hgcmd{help} $B$r<B9T$7$?>l9g!"(B
 674.116 +$B$=$N%3%^%s%I$K4X$9$k>\:Y$J>pJs$,I=<($5$l$^$9!#(B
 674.117 +
 674.118 +\interaction{tour.help}
 674.119 +
 674.120 +$B99$KB?$/$N>\:Y$J!JDL>o$OI,MW$H$7$J$$!K>pJs$rI=<($9$k$K$O!"(B
 674.121 +\hgcmdargs{help}{\hggopt{-v}} $B$r<B9T$7$^$9!#(B
 674.122 +\hggopt{-v} $B%*%W%7%g%s$O(B \hggopt{--verbose} $B$N>JN,7A$G!"(B
 674.123 +$BDL>o$h$j$bB?$/$N>pJs$r(B Mercurial $B$KI=<($5$;$^$9!#(B
 674.124 +
 674.125 +\section{Working with a repository}
 674.126 +
 674.127 +Mercurial $B$G$O!"(B
 674.128 +$BA4$F$,(B\emph{$B%j%]%8%H%j(B}$B$KJD$8$F$$$^$9!#(B
 674.129 +$BNc$($P!"$"$k%W%m%8%'%/%H$N$?$a$K:n@.$7$?%j%]%8%H%j$K$O!"(B
 674.130 +$B%W%m%8%'%/%H$K(B``$BB0$9$k(B''$BA4$F$N%U%!%$%k$@$1$G$J$/!"(B
 674.131 +$B%U%!%$%k$K4X$9$kMzNr>pJs$b3JG<$5$l$F$$$^$9!#(B
 674.132 +
 674.133 +$B%j%]%8%H%j$O%U%!%$%k%7%9%F%`>e$K$"$kB~$N%G%#%l%/%H%j%D%j!<$G$9$N$G!"(B
 674.134 +Mercurial $B$,FCJL07$$$9$k$H$$$&$3$H0J30$K$O!"(B
 674.135 +$BDL>o$N%G%#%l%/%H%j$d%U%!%$%k$HHf3S$7$FFC$KJQ$o$C$F$$$kE@$O$"$j$^$;$s!#(B
 674.136 +$B%3%^%s%I9T$d%U%!%$%k%V%i%&%6$rMxMQ$7$F!"(B
 674.137 +$BG$0U$N;~E@$G2~L>$d:o=|$9$k$3$H$,$G$-$^$9!#(B
 674.138 +
 674.139 +\subsection{Making a local copy of a repository}
 674.140 +
 674.141 +$B%j%]%8%H%j$N(B\emph{$BJ#@=(B}$B$O!">/!9FCJL$G$9!#(B
 674.142 +$BDL>o$N%G%#%l%/%H%jJ#@=$N%3%^%s%I$G$b%j%]%8%H%j$rJ#@=$G$-$^$9$,!"(B
 674.143 +Mercurial $BAH$_9~$_$NJ#@=%3%^%s%I$r;HMQ$7$?J}$,NI$$$G$7$g!#(B
 674.144 +$B$3$N%3%^%s%I$O!"(B
 674.145 +$B4{B8$N%j%]%8%H%j$HF10l$NJ#@=$r@8@.$9$k$?$a!"(B
 674.146 +\hgcmd{clone} $B$H8F$P$l$F$$$^$9!#(B
 674.147 +
 674.148 +\interaction{tour.clone}
 674.149 +
 674.150 +$B%A%e!<%H%j%"%kMQ$N%j%]%8%H%j$+$i$NJ#@=$K@.8y$7$?$J$i!"(B
 674.151 +$B%m!<%+%k%U%!%$%k%7%9%F%`>e$K(B
 674.152 +\dirname{hello} $B$H$$$&L>A0$N%G%#%l%/%H%j$,$"$kH&$G$9!#(B
 674.153 +$B$3$N%G%#%l%/%H%j$K$O%U%!%$%k$,4v$D$+3JG<$5$l$F$$$k$3$H$G$7$g$&!#(B
 674.154 +This directory will contain some files.
 674.155 +
 674.156 +\interaction{tour.ls}
 674.157 +
 674.158 +$B$3$l$i$N%U%!%$%k$O!"(B
 674.159 +$BJ#@=85$K$J$C$?%j%]%8%H%j$K$*$1$k%U%!%$%k$H!"(B
 674.160 +$BA4$/F1$8FbMF$HMzNr>pJs$r;}$C$F$$$^$9!#(B
 674.161 +
 674.162 +$BA4$F$N(B Mercurial $B%j%]%8%H%j$O!"(B
 674.163 +$B5!G=Ds6!$KI,MW$J$b$N$rA4$F3JG<$7$F$$$k$?$a!"(B
 674.164 +$B$=$l<+BN$G407k$7$F$$$k!"FHN)$7$?B8:_$G$9!#(B
 674.165 +$B%j%]%8%H%j$K$O!"(B
 674.166 +$B%W%m%8%'%/%H$KB0$9$k%U%!%$%k$N;dE*$JJ#@=$HMzNr>pJs$,3JG<$5$l$^$9!#(B
 674.167 +$BJ#@=$5$l$?%j%]%8%H%j$O!"(B
 674.168 +$BJ#@=85$H$J$C$?%j%]%8%H%j$N0LCV$r5-21$7$F$$$^$9$,!"(B
 674.169 +$BFC$KL@<(E*$J;X<($r$7$J$$8B$j!"(B
 674.170 +$BJ#@=85%j%]%8%H%j$H$NO"7H!J$*$h$S!"$=$l0J30$N%j%]%8%H%j$H$NO"7H$b!K(B
 674.171 +$B$O9T$o$l$^$;$s!#(B
 674.172 +
 674.173 +$B$=$l$>$l$N%j%]%8%H%j$O!"(B
 674.174 +$BB>$N%j%]%8%H%j$K1F6A$r5Z$\$9$3$H$NL5$$!"(B
 674.175 +$B;dE*$J(B``$BH"Dm(B''$B$H8@$($^$9$+$i!"(B
 674.176 +$B<+?H$N%j%]%8%H%j$G<+M3$K<B83$,$G$-$k$o$1$G$9!#(B
 674.177 +
 674.178 +\subsection{What's in a repository?}
 674.179 +
 674.180 +$B%j%]%8%H%jFbIt$r;F:Y$K8+$F$_$k$H!"(B
 674.181 +\dirname{.hg} $B$H$$$&L>A0$N%G%#%l%/%H%j$,$"$k$3$H$K5$$,IU$/$3$H$G$7$g$&!#(B
 674.182 +$B$3$N%G%#%l%/%H%j$O!"(B
 674.183 +Mercurial $B$,%j%]%8%H%j$N%a%?%G!<%?$r3JG<$7$F$$$k%G%#%l%/%H%j$G$9!#(B
 674.184 +
 674.185 +\interaction{tour.ls-a}
 674.186 +
 674.187 +\dirname{.hg} $B$*$h$S$=$NG[2<$N%G%#%l%/%H%j$NFbMF$O!"(B
 674.188 +Mercurial $B$,;dE*$K;HMQ$9$k$b$N$G$9!#(B
 674.189 +$B%j%]%8%H%j$K$*$1$k$=$l0J30$N%G%#%l%/%H%j!&%U%!%$%k$O!"(B
 674.190 +$B<+M3$KMxMQ$7$F9=$$$^$;$s!#(B
 674.191 +
 674.192 +$BMQ8l$NDj5A$r$9$k$K$"$?$j!"(B
 674.193 +\dirname{.hg} $B%G%#%l%/%H%j$r(B``$BK\Ev$N(B''$B%j%]%8%H%j$H$9$k$J$i!"(B
 674.194 +$B$=$l$H6&B8$9$kB>$N%U%!%$%k!&%G%#%l%/%H%j$O(B
 674.195 +\emph{$B:n6HNN0h%G%#%l%/%H%j(B}$B$K$"$k$b$N!"$H8F$P$l$^$9!#(B
 674.196 +$BN><T$N6hJ,$r4JC1$K8@$&$J$i!"(B
 674.197 +\emph{$B%j%]%8%H%j(B}$B$,%W%m%8%'%/%H$N(B\emph{$BMzNr(B}$B$rJ];}$9$k0lJ}$G!"(B
 674.198 +\emph{$B:n6HNN0h%G%#%l%/%H%j(B}$B$O!"(B
 674.199 +$BMzNr>e$N$H$"$k;~E@$K$*$1$k%W%m%8%'%/%H$N(B\emph{$B%9%J%C%W%7%g%C%H(B}$B$rJ];}$9$k!"(B
 674.200 +$B$H8@$($^$9!#(B
 674.201 +
 674.202 +\section{A tour through history}
 674.203 +
 674.204 +$BFk@w$_$NL5$$?7$7$$%j%]%8%H%j$KBP$7$F$O!"(B
 674.205 +$B$^$:$O$=$NMzNr$r;2>H$7$F$_$h$&$H;W$&$3$H$G$7$g$&!#(B
 674.206 +\hgcmd{log} $B%3%^%s%I$O!"MzNr>pJs$r=PNO$7$^$9!#(B
 674.207 +
 674.208 +\interaction{tour.log}
 674.209 +
 674.210 +$B$3$N%3%^%s%I$N4pDlF0:n$G$O!"(B
 674.211 +$B%W%m%8%'%/%H$K2C$($i$l$?8D!9$NJQ99$N5-O?$KBP$7$F4JC1$J=PNO$r9T$$$^$9!#(B
 674.212 +Mercurial $B$NMQ8l$G$O!"(B
 674.213 +$BJ#?t$N%U%!%$%k$KBP$9$kJQ99$rJ];}$7F@$k$3$H$+$i!"(B
 674.214 +$B5-O?$5$l$?$3$l$i$N=PMh;v$r(B\emph{$B%A%'%s%8%;%C%H(B}$B$H8F>N$7$^$9!#(B
 674.215 +
 674.216 +\hgcmd{log} $B$N=PNO7A<0$K$*$1$k3FMs$O!"(B
 674.217 +$B0J2<$N$h$&$K$J$C$F$$$^$9!#(B
 674.218 +
 674.219 +\begin{description}
 674.220 +\item[\texttt{changeset}] $B$3$NMs$O!"(B10 $B?J?t!"%3%m%s!J(Bcolon: \texttt{:}$B!K(B
 674.221 +  $B$*$h$S(B 16 $B?J?t$NO"B37A<0$H$J$C$F$$$^$9!#(B
 674.222 +  $B#2$D$N?tCM$O6&$K%A%'%s%8%;%C%H$N(B\emph{$B<1JL;R(B}$B$G$9!#(B
 674.223 +  16 $B?J?t$N$b$N$h$j$b!"(B10 $B?J?t$NJ}$,C;$/!"F~NO$,MF0W$G$"$k$3$H$+$i!"(B
 674.224 +  $B#2$D$N<1JL;a$,B8:_$7$^$9!#(B
 674.225 +
 674.226 +\item[\texttt{user}] $B%A%'%s%8%;%C%H$N:n@.<T$K4X$9$k<1JL>pJs$G$9!#(B
 674.227 +  $B$3$NMs$O<+M37A<0$G$9$,!"KX$I$N>l9g!"(B
 674.228 +  $B?ML>$HEE;R%a!<%k%"%I%l%9$,3JG<$5$l$^$9!#(B
 674.229 +
 674.230 +\item[\texttt{date}] $B%A%'%s%8%;%C%H$,:n@.$5$l$?F|;~$H!"$=$N%?%$%`%>!<%s$G$9(B
 674.231 +  $B!JF|;~$OEv3:%?%$%`%>!<%s$K$*$1$kCM$G$9$N$G!"(B
 674.232 +  $B%A%'%s%8%;%C%H$N:n@.<T$K$H$C$F$NF|;~$rI=$7$^$9!K!#(B
 674.233 +
 674.234 +\item[\texttt{summary}] $B%A%'%s%8%;%C%H:n@.<T$,!"(B
 674.235 +  $B:n@.$N:]$K%A%'%s%8%;%C%H$N@bL@$H$7$FF~NO$7$?%a%C%;!<%8$N:G=i$N9T$G$9!#(B
 674.236 +
 674.237 +\end{description}
 674.238 +
 674.239 +$B4pDlF0:n$K$*$1$k(B \hgcmd{log} $B$N=PNO$O!"(B
 674.240 +$BC1=c$JMWLs$G$9$N$G!"(B
 674.241 +$BB?$/$N>\:Y%G!<%?$,7g$1$F$$$^$9!#(B
 674.242 +
 674.243 +$B?^(B~\ref{fig:tour-basic:history} $B$O!"(B
 674.244 +$BMzNr$N(B``$BF08~(B''$B$rGD0.$70W$/$9$k$?$a$K!"(B
 674.245 +\dirname{hello} $B%j%]%8%H%j$K$*$1$kMzNr$r?^<($7$?$b$N$G$9!#(B
 674.246 +$BK\>O$*$h$S0J9_$N>O$K$*$$$F!"(B
 674.247 +$B2?EY$+$3$N?^$KN)$AJV$k$3$H$K$J$k$3$H$G$7$g$&!#(B
 674.248 +
 674.249 +\begin{figure}[ht]
 674.250 +  \centering
 674.251 +  \grafix{tour-history}
 674.252 +  \label{fig:tour-basic:history}
 674.253 +  \caption{Graphical history of the \dirname{hello} repository}
 674.254 +\end{figure}
 674.255 +
 674.256 +\subsection{Changesets, revisions, and talking to other people}
 674.257 +
 674.258 +$B1Q8l$,IT@53N$5$G0-L>9b$$8@8l$G$"$j!"(B
 674.259 +$B7W;;5!2J3X$G$OMQ8l$N:.Mp$O$$$D$b$N$3$H$G$9$N$G!"(B
 674.260 +$B9=@.4IM}$NJ,Ln$G$O!"(B
 674.261 +$BF1$8$3$H$rI=$9J#?t$NMQ8l$d8@$$2s$7$,B8:_$7$^$9!#(B
 674.262 +Mercurial $B$G$NMzNr4IM}$K$D$$$FOC$r$9$k>l9g!"(B
 674.263 +``$B%A%'%s%8%;%C%H(B''$B!J(Bchangeset$B!K$H$$$&MQ8l$,;~$K$O(B
 674.264 +``$B%A%'%s%8(B''$B!J(Bchange$B!K$d(B
 674.265 +$B!JJ8=q$N>l9g$O!K(B``cset''$B$J$I$H>JN,$5$l$F$$$?$j!"(B
 674.266 +$B%A%'%s%8%;%C%H$H$$$&8@$$2s$7$,!"(B
 674.267 +``$B%j%S%8%g%s(B''$B!J(Brevision$B!K$J$$$7(B``rev''
 674.268 +$B$rI=$9$b$N$H$7$F;HMQ$5$l$?$j$9$k$N$rL\$K$9$k$+$b$7$l$^$;$s!#(B
 674.269 +
 674.270 +``$B%A%'%s%8%;%C%H(B''$B$N35G0$r$I$N$h$&$J(B\emph{$BMQ8l(B}$B$GI=$=$&$,LdBj$G$O$"$j$^$;$s$,!"(B
 674.271 +``\emph{$BFCDj$N(B}$B%A%'%s%8%;%C%H(B''$B$r;X$9$?$a$N(B\emph{$B<1JL;R(B}$B$OHs>o$K=EMW$G$9!#(B
 674.272 +\hgcmd{log} $B$N=PNO$K$*$1$k(B \texttt{changeset} $BMs$,!"(B
 674.273 +10 $B?J?t$H(B 16 $B?J?t$NN>J}$N<1JL;R$r;H$C$F%A%'%s%8%;%C%H$r<1JL$7$F$$$k!"(B
 674.274 +$B$H$$$&$3$H$r;W$$=P$7$F$/$@$5$$!#(B
 674.275 +
 674.276 +\begin{itemize}
 674.277 +\item 10 $B?J?t$N<1JL;R!J!a(B $B%j%S%8%g%sHV9f!K$,!"(B
 674.278 +  \emph{$BEv3:%j%]%8%H%j$G$N$_M-8z$JCM(B}$B$G$"$k0lJ}$G!"(B
 674.279 +
 674.280 +\item 16 $B?J?t$N<1JL;R$O!"(B\emph{$BA4$F$N(B}$BJ#@=%j%]%8%H%j$KEO$C$F!"(B
 674.281 +  $B87L)$K%A%'%s%8%;%C%H$r<1JL2DG=$J(B\emph{$B915WIaJW$N<1JL;R(B}$B$G$9!#(B
 674.282 +
 674.283 +\end{itemize}
 674.284 +
 674.285 +$B$3$N6hJL$O=EMW$G$9!#(B
 674.286 +$BEE;R%a!<%k$GB>$N?M$H(B``$B%j%S%8%g%s(B~33''$B$NOC$r$7$?>l9g!"(B
 674.287 +$BAj<j$N%j%S%8%g%s(B~33$B$O!"(B
 674.288 +$B<+J,$N0U?^$9$k$=$l$H$O9b$$3NN($G(B\emph{$B0[$J$j$^$9(B}$B!#(B
 674.289 +$B$3$l$O!"(B
 674.290 +$B%j%S%8%g%sHV9f$N3d$jIU$1$,!"(B
 674.291 +$BEv3:%A%'%s%8%;%C%H$,%j%]%8%H%j$KG'<1$5$l$?=g=x$K0MB8$7$F$*$j!"(B
 674.292 +$B%A%'%s%8%;%C%H$NG'<1=g=x$,F10l$G$"$k$3$H$r!"(B
 674.293 +$B0[$J$k%j%]%8%H%j$N4V$G$OJ]>c$G$-$J$$$?$a$G$9!#(B
 674.294 +$B#3$D$N%A%'%s%8%;%C%H(B $a,b,c$ $B$,!"(B
 674.295 +$B$H$"$k%j%]%8%H%j$G$O(B $0,1,2$ $B$N=g=x$GG'<1$5$l$k0lJ}$G!"(B
 674.296 +$BJL$J%j%]%8%H%j$G$O(B $1,0,2$ $B$N=g=x$GG'<1$5$l$k!"(B
 674.297 +$B$H$$$C$?$3$H$OMF0W$K5/$3$jF@$^$9!#(B
 674.298 +
 674.299 +Mercurial $B$,%j%S%8%g%sHV9f$r;HMQ$7$F$$$k$N$O!"(B
 674.300 +$B=c?h$K5-=R4JN,2=$NMxJX@-$N$?$a$G$9!#(B
 674.301 +$BB>$N?M$H%A%'%s%8%;%C%H$K4X$7$FOC$r$9$k>l9g$d!"(B
 674.302 +$B2?$i$+$NM}M3!JNc$($P!">c32Js9p$K$*$1$k5-O?!K(B
 674.303 +$B$K$h$C$F%A%'%s%8%;%C%H$K4X$9$k5-O?$r;D$9>l9g$O!"(B
 674.304 +16 $B?J?t$N<1JL;R$r;H$$$^$7$g$&!#(B
 674.305 +
 674.306 +\subsection{Viewing specific revisions}
 674.307 +
 674.308 +\hgcmd{log} $B$N=PNO$rC10l$N%j%S%8%g%s$N$b$N$K8BDj$9$k>l9g!"(B
 674.309 +\hgopt{log}{-r}$B!J$J$$$7(B \hgopt{log}{--rev}$B!K%*%W%7%g%s$r;HMQ$7$^$9!#(B
 674.310 +10 $B?J?t$N%j%S%8%g%sHV9f$H!"(B
 674.311 +16 $B?J?t$N%A%'%s%8%;%C%H<1JL;R$N$I$A$i$b;HMQ$G$-$^$9$7!"(B
 674.312 +$BI,MW$K1~$8$FJ#?t$N%j%S%8%g%s$r;XDj$9$k$3$H$b$G$-$^$9!#(B
 674.313 +
 674.314 +\interaction{tour.log-r}
 674.315 +
 674.316 +$B8DJL$KNs5s$9$k$3$HL5$7$KJ#?t$N%j%S%8%g%s$NMzNr$r;2>H$7$?$$>l9g$O!"(B
 674.317 +\emph{$BHO0O5-K!(B}$B$r;HMQ$7$^$9!#(B
 674.318 +$B$3$N5-K!$O!"(B
 674.319 +``$a$ $B$+$i(B $b$ $B$N4V$NA4$F$N%j%S%8%g%s(B''
 674.320 +$B$H$$$&0U?^$rI=8=$7$^$9!#(B
 674.321 +
 674.322 +\interaction{tour.log.range}
 674.323 +
 674.324 +Mercurial $B$O$j%S%8%g%s$N5-=R=g=x$KCi<B$K?6Iq$$$^$9$N$G!"(B
 674.325 +\hgcmdargs{log}{-r 2:4} $B$H$$$&%3%^%s%I5/F0$,(B
 674.326 +$2,3,4$ $B$N=g=x$GI=<($9$k0lJ}!"(B
 674.327 +\hgcmdargs{log}{-r 4:2} $B$H$$$&%3%^%s%I5/F0$O(B
 674.328 +$4,3,2$ $B$N=g=x$GI=<($7$^$9!#(B
 674.329 +
 674.330 +\subsection{More detailed information}
 674.331 +
 674.332 +$BL\Ev$F$N%A%'%s%8%;%C%H$,4{$KH=L@$7$F$$$k>l9g$O(B
 674.333 +\hgcmd{log} $B$,=PNO$9$k35MW>pJs$OM-MQ$G$9$,!"(B
 674.334 +$B$"$k%A%'%s%8%;%C%H$,L\Ev$F$N$b$N$+H]$+$rH=Dj$7$h$&$H$9$k>l9g$K$O!"(B
 674.335 +$BJQ99$K$D$$$F$N40A4$J@bL@J8$d!"(B
 674.336 +$BJQ99$5$l$?%U%!%$%k$N0lMw$,I,MW$K$J$k$3$H$G$7$g$&!#(B
 674.337 +\hgcmd{log} $B%3%^%s%I$N(B
 674.338 +\hggopt{-v}$B!J$J$$$7(B \hggopt{--verbose}$B!K%*%W%7%g%s$O!"(B
 674.339 +$B$3$l$iDI2C$N>\:Y>pJs$rI=<($7$^$9!#(B
 674.340 +
 674.341 +\interaction{tour.log-v}
 674.342 +
 674.343 +$B@bL@J8$HJQ99FbMF$NN>J}$r8+$?$$>l9g$O!"(B
 674.344 +\hgopt{log}{-p} $B!J$J$$$7(B \hgopt{log}{--patch}$B!K(B
 674.345 +$B%*%W%7%g%s$rIU2C$7$F$/$@$5$$!#(B
 674.346 +$B$3$N%*%W%7%g%s$K$h$j!"(B
 674.347 +$BJQ99FbMF$,(B \emph{unified diff} $B7A<0(B
 674.348 +$B!J$3$l$^$G$K(B unified diff $B7A<0$r8+$?$3$H$,L5$$$N$G$7$?$i!"(B
 674.349 +\ref{sec:mq:patch}~$B@a$K35MW$N@bL@$,$"$j$^$9!K$G=PNO$5$l$^$9!#(B
 674.350 +
 674.351 +\interaction{tour.log-vp}
 674.352 +
 674.353 +\section{All about command options}
 674.354 +
 674.355 +Mercurial $B$N%3%^%s%IC58!$r$3$3$G>/!9CfCG$7$F!"(B
 674.356 +Mercurial $B%3%^%s%I$NF0:n%Q%?!<%s$K$D$$$F@bL@$7$^$7$g$&!#(B
 674.357 +$BK\>O$K$*$1$k%D%"!<$rB3$1$k$K$D$l$F!"(B
 674.358 +$B$3$N$3$H$r3P$($F$*$$$FNI$+$C$?$H;W$&$3$H$G$7$g$&!#(B
 674.359 +
 674.360 +Mercurial $B$O!"(B
 674.361 +$B%3%^%s%I$KBP$7$F;XDj2DG=$J%*%W%7%g%s$N<h$j07$$$K4X$7$F!"(B
 674.362 +$B6aG/$N(B Linux $B$*$h$S(B Unix $B%7%9%F%`$K6&DL$N%*%W%7%g%s5-=R47=,$rF'=1$7$?!"(B
 674.363 +$B0l4S$7$?AGD>$J07$$J}$r:NMQ$7$F$$$^$9!#(B
 674.364 +
 674.365 +\begin{itemize}
 674.366 +\item $BA4$F$N%*%W%7%g%s$O%m%s%0%M!<%`!J(Blong name$B!K$r;}$C$F$$$^$9!#(B
 674.367 +  $BNc$($P!"4{$K8+$F$-$?$h$&$K!"(B
 674.368 +  \hgcmd{log} $B%3%^%s%I$O(B \hgopt{log}{--rev} $B%*%W%7%g%s$r<u$1IU$1$^$9!#(B
 674.369 +
 674.370 +\item $BKX$I$N%*%W%7%g%s$,%7%g!<%H%M!<%`!J(Bshort name$B!K$b;}$C$F$$$^$9!#(B
 674.371 +  \hgopt{log}{--rev} $B%*%W%7%g%s$NBe$o$j$K(B
 674.372 +  \hgopt{log}{-r} $B$r;HMQ$G$-$^$9(B
 674.373 +  $B!J%7%g!<%H%M!<%`$r;}$?$J$$%*%W%7%g%s$,$"$k$N$O!"(B
 674.374 +  $B$=$l$i$N%*%W%7%g%s$,LGB?$KMxMQ$5$l$J$$$?$a$G$9(B\footnote{$BLuCm(B:
 674.375 +  $BLu<T$N%3%^%s%I3+H/7P83$G$O!"(B
 674.376 +  $B%7%g!<%H%M!<%`$N8uJd$H$J$k%"%k%U%!%Y%C%H$,J#?t$N%*%W%7%g%s$N4V$G=E$J$k>l9g!"(B
 674.377 +  $B$"$($F%7%g!<%H%M!<%`$r@_Dj$7$J$$!"(B
 674.378 +  $B$H$$$&>l9g$b$"$j$^$9!#(B}$B!K!#(B
 674.379 +
 674.380 +\item $B%m%s%0%M!<%`%*%W%7%g%s$O#2$D$N%^%$%J%95-9f(B\footnote{$BLuCm(B:
 674.381 +  $B86J8$G$O(B ``dash(es)'' $B$G$9$,!"(B
 674.382 +  $B!V%@%C%7%e!J%@!<%7!K!W$d!V%O%$%U%s!W$h$j$b!"(B
 674.383 +  PC $B$K$*$1$kF~NO$G$OD>@\E*$J!"(B
 674.384 +  $B!V%^%$%J%95-9f!W$rLu8l$KEv$F$^$7$?!#(B}$B$G;O$^$j$^$9(B
 674.385 +  $B!JNc(B: \hgopt{log}{--rev}$B!K$,(B
 674.386 +  $B%7%g!<%H%M!<%`%*%W%7%g%s$O#1$D$N%^%$%J%95-9f$G;O$^$j$^$9(B
 674.387 +  $B!JNc(B: \hgopt{log}{-r}$B!K!#(B
 674.388 +
 674.389 +\item $B%*%W%7%g%s$NL?L>$HMQK!$O!"%3%^%s%I4V$G0l4S@-$,<h$i$l$F$$$^$9(B\footnote{
 674.390 +  $BLuCm!'(B $BLu<T$,0JA0!"%*%W%7%g%s$rDI2C$9$k%Q%C%A$rDs0F$7$?:]$K$O!"(B
 674.391 +  $B%Q%C%A$N5!G=E*$JOC$H$OJL$K!"(B
 674.392 +  $B!V!{!{$N%3%^%s%I$G$O!_!_$H$$$&$&L?L>$K$J$C$F$$$k$+$i!"$=$l$KJo$C$F$M!W(B
 674.393 +  $B$H;XE&$5$l$?$3$H$,$"$j!"(B
 674.394 +  $B!V0l4S@-$,$H$i$l$F$$$k!W$H$N<gD%$O0KC#$G$O$"$j$^$;$s!#(B}$B!#(B
 674.395 +  $BNc$($P!"%A%'%s%8%;%C%H<1JL;R$d$j%S%8%g%sHV9f$r;XDj2DG=$J%3%^%s%I$O!"(B
 674.396 +  $BA4$F(B \hgopt{log}{-r} $B$*$h$S(B \hgopt{log}{--rev} $B%*%W%7%g%s$r<uM}$7$^$9!#(B
 674.397 +
 674.398 +\end{itemize}
 674.399 +
 674.400 +$BK\=q$N<B9TNc$G$O!"(B
 674.401 +$B%m%s%0%M!<%`%*%W%7%g%s$NBe$o$j$K%7%g!<%H%M!<%`%*%W%7%g%s$r;HMQ$7$^$9!#(B
 674.402 +$B$3$l$OC1$KI.<T$N9%$_$H$$$&$@$1$N$3$H$G$9$N$G!"(B
 674.403 +$BFC$K5$$K$9$kI,MW$O$"$j$^$;$s!#(B
 674.404 +
 674.405 +$B2?$i$+$NI=<($r9T$&%3%^%s%I$NB?$/$O!"(B
 674.406 +\hggopt{-v}$B!J$J$$$7(B \hggopt{--verbose}$B!K(B
 674.407 +$B%*%W%7%g%s$rIUM?$9$k$3$H$G$h$jB?$/$N>pJs$NI=<($r!"(B
 674.408 +\hggopt{-q}$B!J$J$$$7(B \hggopt{--quiet}$B!K(B
 674.409 +$B%*%W%7%g%s$rIUM?$9$k$3$H$GI=<($rM^;_$9$k$3$H$,$G$-$^$9!#(B
 674.410 +
 674.411 +\section{Making and reviewing changes}
 674.412 +
 674.413 +$B$3$N;~E@$G!"(BMercurial $B$K$*$1$kMzNr$rGD0.$G$-$F$$$^$9$N$G!"(B
 674.414 +$BJQ99$N<B;\$d!"$=$N8!>Z$r9T$C$F$_$^$7$g$&!#(B
 674.415 +
 674.416 +$B$^$:;O$a$K$9$Y$-$3$H$O!"(B
 674.417 +$BFH<+$N<B83$r85!9$N%j%]%8%H%j$+$i3VN%$9$k$3$H$G$9!#(B
 674.418 +$B%j%]%8%H%j$NJ#@=$K!"@hDx$O(B \hgcmd{clone} $B$r;HMQ$7$^$7$?$,!"(B
 674.419 +$B$3$N;~E@$G$N1s3V%j%]%8%H%j$+$i$NJ#@=$OI,MW$"$j$^$;$s!#(B
 674.420 +$B4{$K<j85$K$"$kJ#@=%j%]%8%H%j$+$iJ#@=$9$l$PNI$$$N$G$9!#(B
 674.421 +$B%m!<%+%k%j%]%8%H%j$NJ#@=$O!"(B
 674.422 +$B%M%C%H%o!<%/1[$7$NJ#@=$h$j$bHs>o$K9bB.$G$9$7!"(B
 674.423 +$BB?$/$N>l9g$K$*$$$F%G%#%9%/NN0h>CHq$b>/$J$/$F:Q$_$^$9(B\footnote{$BLuCm(B:
 674.424 +$B>\:Y$O(B ``Avoiding seeks'' $B$K$"$j$^$9$,!"(B
 674.425 +Mercurial $B$O%m!<%+%k%j%]%8%H%j$NJ#@=$N:]$K!"(B
 674.426 +$B%G%#%9%/%X%C%I$N%7!<%/2sHr$N$?$a$K!"(B
 674.427 +$B%U%!%$%k$NJ#@=$G$O$J$/=j0b(B``$B%O!<%I%j%s%/(B''$B$r<B;\$7$^$9!#(B}$B!#(B
 674.428 +
 674.429 +\interaction{tour.reclone}
 674.430 +
 674.431 +$BOC$O0o$l$^$9$,!"(B
 674.432 +$B:n6H$KCe<j$7$h$&$H$7$?:]$K!"(B
 674.433 +$B:n6HMQ%5%s%I%\%C%/%9$H$7$F$N0l;~E*$JJ#@=$r2?;~$G$b:n@.$G$-$^$9$N$G!"(B
 674.434 +$B1s3V%j%]%8%H%j$NJ#@=$r(B``$B$^$C$5$i$J(B''$B>uBV$GJ]$D$h$&$K?43]$1$k$N$,NI$$$G$7$g!#(B
 674.435 +$B$3$&$9$k$3$H$G!"(B
 674.436 +$BJ#?t$N:n6H$rJ?9T$K9T$&$3$H$,$G$-$^$9$7!"(B
 674.437 +$B:n6H40N;8e$K$=$l$i$rE}9g$9$k$^$G$O!"(B
 674.438 +$B8_$$$N:n6H$r3VN%$5$l$?>uBV$K$9$k$3$H$,$G$-$^$9!#(B
 674.439 +$B%m!<%+%k%j%]%8%H%j$NJ#@=$ODc%3%9%H$G$9$+$i!"(B
 674.440 +$B%j%]%8%H%j$NJ#@=$*$h$SGK4~$K$O%*!<%P%X%C%I$,KX$I$"$j$^$;$s!#(B
 674.441 +
 674.442 +\dirname{my-hello} $B%j%]%8%H%j$K$O!"(B
 674.443 +$BE57?E*$J(B ``hello, world'' $B%W%m%0%i%`$,3JG<$5$l$?(B
 674.444 +\filename{hello.c} $B%U%!%$%k$,$"$j$^$9!#(B
 674.445 +$B$G$O$3$3$G!"(B
 674.446 +$B$$$K$7$($N(B \command{sed} $B%3%^%s%I$r;HMQ$7$F!"(B
 674.447 +$B#29TL\$r=PNO$9$k$h$&$KJQ99$7$F$_$^$7$g$&!#(B
 674.448 +$B!JJQ99$N$?$a$K(B \command{sed} $B$r;HMQ$9$k$N$O!"(B
 674.449 +$BC1$K%9%/%j%W%H$K$h$k<+F02=$,4JC1$G$"$k$+$i$G$9!#(B
 674.450 +$B<+F02=$NI,MW$,L5$1$l$P!"(B
 674.451 +$B$*$=$i$/(B \command{sed} $B$r;HMQ$9$kI,MW$OL5$$$G$7$g$&!#(B
 674.452 +$B9%$_$N%(%G%#%?$GJT=8$r$7$F$/$@$5$$!#!K!#(B
 674.453 +
 674.454 +\interaction{tour.sed}
 674.455 +
 674.456 +\hgcmd{status} $B%3%^%s%I$K$h$j!"(B
 674.457 +$B%j%]%8%H%jG[2<$N%U%!%$%k$N>u67$K4X$9$k(B
 674.458 +Mercurial $B$NG'<1$,I=<($5$l$^$9!#(B
 674.459 +
 674.460 +\interaction{tour.status}
 674.461 +
 674.462 +$B4v$D$+$N%U%!%$%k$KBP$7$F$O!"(B
 674.463 +\hgcmd{status} $B%3%^%s%I$OFC$K2?$bI=<($7$^$;$s$,!"(B
 674.464 +\filename{hello.c} $B$KBP$7$F$O(B
 674.465 +``\texttt{M}'' $B$G;O$^$k9T$rI=<($7$^$9!#(B
 674.466 +$BL@<(E*$K;XDj$7$J$$8B$j!"(B
 674.467 +$BJQ99$5$l$F$$$J$$%U%!%$%k$KBP$7$F(B
 674.468 +\hgcmd{status} $B$O2?$bI=<($7$^$;$s!#(B
 674.469 +
 674.470 +``\texttt{M}'' $BI=<($O!"(B
 674.471 +Mercurial $B$,(B \filename{hello.c} $B%U%!%$%k$NJQ99$r8!CN$7$F$$$k$3$H$rI=$7$^$9!#(B
 674.472 +$B%U%!%$%k$NJQ99$K@hN)$C$F!J$"$k$$$OJQ99$N8e$K!K!"(B
 674.473 +Mercurial $B$KBP$7$F(B\emph{$BDLCN(B}$B$9$kI,MW$O$"$j$^$;$s!#(B
 674.474 +Mercurial $B<+?H$GJQ99$N<B;\$r8!CN$9$k$3$H$,$G$-$^$9!#(B
 674.475 +
 674.476 +\hgcmd{status} $B$NI=<($O!"(B
 674.477 +\filename{hello.c} $B$rJQ99$7$?$3$H$rCN$k$N$KLrN)$A$^$9$,!"(B
 674.478 +\emph{$B$I$N$h$&$J(B}$BJQ99$r9T$C$?$N$+$r87L)$KCN$j$?$$>l9g$bM-$k$G$7$g$&!#(B
 674.479 +$BJQ99FbMF$rCN$k$?$a$K$O!"(B
 674.480 +\hgcmd{diff} $B%3%^%s%I$r;HMQ$7$^$9!#(B
 674.481 +
 674.482 +\interaction{tour.diff}
 674.483 +
 674.484 +\section{Recording changes in a new changeset}
 674.485 +
 674.486 +$BJQ99FbMF$KK~B-$7$F!"(B
 674.487 +$B?75,%A%'%s%8%;%C%H$KJQ99FbMF$r5-O?$9$k$KB-$k>u67$KE~C#$9$k$^$G$O!"(B
 674.488 +$B%U%!%$%k$NFbMF$rJQ99$7!"(B
 674.489 +$B%S%k%I$HJQ99FbMF$KBP$9$k;n83$r9T$$!"(B
 674.490 +\hgcmd{status} $B$*$h$S(B \hgcmd{diff} $B$K$h$kJQ99FbMF$r3NG'$9$k!"(B
 674.491 +$B$H$$$&:n6H$r7+$jJV$7$^$9!#(B
 674.492 +
 674.493 +\hgcmd{commit} $B%3%^%s%I$rMQ$$$k$3$H$G!"(B
 674.494 +$B%A%'%s%8%;%C%H$r?7$?$K:n@.$9$k$3$H$,$G$-$^$9!#(B
 674.495 +$BDL>o$3$l$r(B``$B%3%_%C%H$N<B;\(B''$B!J(B``making a commit''$B!K$J$$$7(B
 674.496 +``$B%3%_%C%H$9$k(B''$B!J(B``committing''$B!K$H8@$$$^$9!#(B
 674.497 +
 674.498 +\subsection{Setting up a username}
 674.499 +
 674.500 +$B:G=i$K(B \hgcmd{commit} $B<B9T$r9T$&:]$K$O!"(B
 674.501 +$BI,$:$7$b<B9T$,@.8y(B\footnote{$BLuCm(B:
 674.502 +$B$3$3$G8@$&(B``$B@.8y(B''$B$H$O!"(B
 674.503 +$B%3%^%s%I<B9T$=$N$b$N$N@.8y$H$$$&$h$j$O!"(B
 674.504 +``$B;W$C$?DL$j$N%A%'%s%8%;%C%H$r@8@.(B''$B$9$k$3$H$KBP$9$k@.8y$K6a$$%K%e%"%s%9$G$9!#(B
 674.505 +}$B$9$k$H$O8B$j$^$;$s!#(B
 674.506 +$B%A%'%s%8%;%C%H$N%3%_%C%H$N:]$K(B Mercurial $B$O!"(B
 674.507 +$B%3%_%C%H$7$?%f!<%6$NL>A0$HEE;R%a!<%k%"%I%l%9$r!"(B
 674.508 +$B%A%'%s%8%;%C%HKh$K5-O?$7$^$9$N$G!"(B
 674.509 +$BC/$b$,8e$+$i%A%'%s%8%;%C%H:n@.<T$rCN$k$3$H$,$G$-$^$9!#(B
 674.510 +Mercurial $B$O0J2<$N<j=g$G!"(B
 674.511 +$BJQ99FbMF$H6&$K5-O?$9$kBEEv$J%f!<%6L>$r<+F0E*$K8!=P$7$h$&$H$7$^$9!#(B
 674.512 +
 674.513 +\begin{enumerate}
 674.514 +\item \hgcmd{commit} $B%3%^%s%I5/F0$N:]$K(B
 674.515 +  \hgopt{commit}{-u} $B%*%W%7%g%s$K$h$C$F%f!<%6L>$r;XDj$7$?>l9g!"(B
 674.516 +  $B>o$K$=$NCM$,M%@hE*$K;HMQ$5$l$^$9!#(B
 674.517 +
 674.518 +\item $B<!$K(B \envar{HGUSER} $B4D6-JQ?t@_Dj$NM-L5$,3NG'$5$l$^$9!#(B
 674.519 +
 674.520 +\item $B%[!<%`%G%#%l%/%H%jD>2<$K!"(B
 674.521 +  \rcitem{ui}{username} $BMWAG$r;}$D(B
 674.522 +  \sfilename{.hgrc}\footnote{$BLuCm(B:
 674.523 +  Windows $B8~$1%P%$%J%jHG$N>l9g!"(B
 674.524 +  \envar{HOME} $B4D6-JQ?t$,;X$9%G%#%l%/%H%j!"(B
 674.525 +  $B$J$$$7(B \dirname{C:\\Documents and Settings\\USERNAME}
 674.526 +  $BG[2<$N(B \sfilename{Mercurial.ini} $B$,MQ$$$i$l$^$9!#(B}
 674.527 +  $B$,$"$k>l9g!"$=$NCM$,;HMQ$5$l$^$9!#(B
 674.528 +  $B$3$N%U%!%$%k$K=q$/$Y$-FbMF$K4X$7$F$O!"(B
 674.529 +  \ref{sec:tour-basic:username}$B@a$r;2>H$7$F$/$@$5$$!#(B
 674.530 +
 674.531 +\item \envar{EMAIL} $B4D6-JQ?t$,@_Dj$5$l$F$$$k>l9g$O!"(B
 674.532 +  $B$=$NCM$,;HMQ$5$l$^$9!#(B
 674.533 +
 674.534 +\item $B$=$l0J30$N>l9g!"(B
 674.535 +  Mercurial $B$O2TF0$7$F$$$k%7%9%F%`$K%f!<%6$H%[%9%H$NL>A0$rLd$$9g$o$;$?>e$G!"(B
 674.536 +  $BEE;R%a!<%k%"%I%l%97A<0$N%f!<%6L>$r@8@.$7!"$3$l$r;HMQ$7$^$9!#(B
 674.537 +  $B$3$NJ}K!$G@8@.$5$l$?%f!<%6L>$O1}!9$K$7$FLr$KN)$?$J$$$?$a!"(B
 674.538 +  Mercurial $B$O7Y9p$rI=<($7$^$9!#(B
 674.539 +
 674.540 +\end{enumerate}
 674.541 +
 674.542 +$B>e5-$NJ}K!$,A4$F<:GT$7$?>l9g!"(B
 674.543 +Mercurial $B$K$h$k%3%_%C%H$O<:GT$7!"(B
 674.544 +$B%(%i!<%a%C%;!<%8$rI=<($7$^$9!#(B
 674.545 +$B$=$N$h$&$J>l9g$G$O!"L@<(E*$K%f!<%6L>$r;XDj$7$J$$8B$j!"(B
 674.546 +$B%3%_%C%H$O@.8y$7$J$$$G$7$g$&!#(B
 674.547 +
 674.548 +\envar{HGUSER} $B4D6-JQ?t$H(B
 674.549 +\hgcmd{commit} $B%3%^%s%I$X$N(B
 674.550 +\hgopt{commit}{-u} $B%*%W%7%g%s;XDj$O!"(B
 674.551 +Mercurial $B@_Dj%U%!%$%kCf$N(B username $B@_Dj$r(B
 674.552 +\emph{$BL58z$K$9$k(B}$BE@$KCm0U$7$F$/$@$5$$!#(B
 674.553 +$BDL>o$N;HMQ$K$*$$$F!"(B
 674.554 +$B<+?H$N%f!<%6L>$r4JC13n$D3N<B$K;XDj$9$k$K$O!"(B
 674.555 +\sfilename{.hgrc} $B%U%!%$%k$G;XDj$9$k$N$,NI$$$G$7$g!#(B
 674.556 +$B5-=RJ}K!$K4X$9$k>\:Y$O8e=R$7$^$9!#(B
 674.557 +
 674.558 +\subsubsection{Creating a Mercurial configuration file}
 674.559 +\label{sec:tour-basic:username}
 674.560 +
 674.561 +$B%f!<%6L>$r@_Dj$9$k$K$O!"(B
 674.562 +$B$^$:$O9%$_$N%(%G%#%?$r;H$C$F!"(B
 674.563 +$B%[!<%`%G%#%l%/%H%jD>2<$K(B
 674.564 +\sfilename{.hgrc}$B%U%!%$%k$r:n@.$7$^$9!#(B
 674.565 +Mercurial $B$O$3$N%U%!%$%k$+$iMxMQ<T$N8D?M@_Dj$r;2>H$7$^$9!#(B
 674.566 +\sfilename{.hgrc} $B$NFbMF$O!"(B
 674.567 +$B$^$:$O0J2<$N$h$&$K$J$k$G$7$g$&!#(B
 674.568 +
 674.569 +\begin{codesample2}
 674.570 +  # This is a Mercurial configuration file.
 674.571 +  [ui]
 674.572 +  username = Firstname Lastname <email.address@domain.net>
 674.573 +\end{codesample2}
 674.574 +
 674.575 +``\texttt{[ui]}'' $B9T$O!"(B
 674.576 +$B@_Dj%U%!%$%k$N(B\emph{$B%;%/%7%g%s(B}$B3+;O$r0UL#$7!"(B
 674.577 +``\texttt{username = ...}'' $B$H$$$&5-=R9T$O(B
 674.578 +``\texttt{ui} $B%;%/%7%g%s$K$*$1$k(B \texttt{username} $B9`L\$X$NCM$N@_Dj(B''
 674.579 +$B$H$_$J$5$l$^$9!#(B
 674.580 +$B0lEY%;%/%7%g%s$,3+;O$5$l$?$J$i!"(B
 674.581 +$B?7$?$J%;%/%7%g%s$,3+;O$5$l$k$+!"(B
 674.582 +$B%U%!%$%k$NKvHx$KC#$9$k$^$GEv3:%;%/%7%g%s$,B3$-$^$9!#(B
 674.583 +$B6u$N9T$H!"(B
 674.584 +``\texttt{\#}'' $B$N<!$NJ8;z$+$i9TKv$^$G$O!"(B
 674.585 +Mercurial $B$K$h$C$F%3%a%s%H$H$_$J$5$lL5;k$5$l$^$9!#(B
 674.586 +
 674.587 +\subsubsection{Choosing a user name}
 674.588 +
 674.589 +\texttt{username} $B@_Dj9`L\$O!"(B
 674.590 +Mercurial $B$KM?$($kCM$G$O$"$j$^$9$,!"(B
 674.591 +$B%j%]%8%H%j$r;2>H$9$kB>$NMxMQ<T$N$?$a$N>pJs$G$9$N$G!"(B
 674.592 +$BG$0U$NJ8;z$r;HMQ2DG=$G$9!#(B
 674.593 +$BKX$I$NMxMQ<T$O!"(B
 674.594 +$BL>A0$HEE;R%a!<%k%"%I%l%9$rMQ$$$?A0=R$N$h$&$J7A<0$rMQ$$$F$$$^$9!#(B
 674.595 +
 674.596 +\begin{note}
 674.597 +  Mercurial $B$NAH$_9~$_%&%'%V%5!<%P5!G=$G$O!"(B
 674.598 +  $B%9%Q%`%a!<%k$NAwIU<T$,MxMQ$9$kEE;R%a!<%k%"%I%l%9<+F0<}=8%D!<%k$KBP$7$F!"(B
 674.599 +  $BEE;R%a!<%k%"%I%l%9$rFqFI2=$9$k$3$H$,2DG=$G$9!#(B
 674.600 +  $B$3$N5!G=$rMQ$$$k$3$H$G!"(B
 674.601 +  Mercurial $B%j%]%8%H%j$r%&%'%V>e$K8x3+$7$?:]$K!"(B
 674.602 +  $B1WBN$bL5$$%a!<%k<u?.$NA}2C$rM^;_$9$k$3$H$,$G$-$^$9!#(B
 674.603 +\end{note}
 674.604 +
 674.605 +\subsection{Writing a commit message}
 674.606 +
 674.607 +$BEv3:%A%'%s%8%;%C%H$G$NJQ99FbMF$r@bL@$9$k%a%C%;!<%8$rF~NO$9$k$?$a$K!"(B
 674.608 +Mercurial $B$O%3%_%C%H$N:]$K%(%G%#%?$r5/F0$7$^$9!#(B
 674.609 +$B$3$N%a%C%;!<%8$r(B\emph{$B%3%_%C%H%a%C%;!<%8(B}$B$H8F$S!"(B
 674.610 +$BFI$_<j$KJQ99$NFbMF$HM}M3$rEA$($k$?$a$K5-O?$5$l$k$b$N$G!"(B
 674.611 +$B%3%_%C%H8e$N(B \hgcmd{log} $B%3%^%s%I$K$h$jI=<($5$l$^$9!#(B
 674.612 +
 674.613 +\interaction{tour.commit}
 674.614 +
 674.615 +\hgcmd{commit} $B%3%^%s%I$,5/F0$9$k%(%G%#%?$O!"(B
 674.616 +``\texttt{HG:}''$B$G;O$^$k?t9T$,8e$KB3$/6u9T$rI=<($7$F$$$k$3$H$G$7$g$&!#(B
 674.617 +
 674.618 +\begin{codesample2}
 674.619 +  \emph{$B6u9T(B}
 674.620 +  HG: changed hello.c
 674.621 +\end{codesample2}
 674.622 +
 674.623 +Mercurial $B$O(B
 674.624 +``\texttt{HG:}'' $B$G;O$^$k9T$rL5;k$7$^$9!#(B
 674.625 +$B$3$l$i$N9T$O!"(B
 674.626 +$B%A%'%s%8%;%C%H$X$NJQ995-O?BP>]$H$J$k%U%!%$%k$N0lMw$r!"(B
 674.627 +$B%3%_%C%H$7$h$&$H$7$F$$$k%f!<%6$KCN$i$;$k$?$a$@$1$N$b$N$G$9!#(B
 674.628 +$B$=$N$?$a!"$3$l$i$N9T$NJQ99$d:o=|$O2?$b0UL#$r;}$A$^$;$s!#(B
 674.629 +
 674.630 +\subsection{Writing a good commit message}
 674.631 +
 674.632 +\hgcmd{log} $B$O%3%_%C%H%a%C%;!<%8$N:G=i$N#19T$7$+I=<($7$^$;$s$N$G!"(B
 674.633 +$B:G=i$N#19T$@$1$G0UL#$NDL$8$kFbMF$K$9$k$N$,NI$$$G$7$g$&!#(B
 674.634 +$B$3$NJ}?K$+$i(B\emph{$B30$l$F$$$k(B}$B$?$a$K!"(B
 674.635 +$BFI$_Fq$$%3%_%C%H%a%C%;!<%8$N<BNc$r0J2<$K<($7$^$9!#(B
 674.636 +
 674.637 +\begin{codesample2}
 674.638 +  changeset:   73:584af0e231be
 674.639 +  user:        Censored Person <censored.person@example.org>
 674.640 +  date:        Tue Sep 26 21:37:07 2006 -0700
 674.641 +  summary:     include buildmeister/commondefs.   Add an exports and install
 674.642 +\end{codesample2}
 674.643 +
 674.644 +$B%3%_%C%H%a%C%;!<%8$N#29TL\0J9_$K4X$7$F$O!"(B
 674.645 +$BFC$K87L)$J%k!<%k$OB8:_$7$^$;$s!#(B
 674.646 +$B%3%_%C%H%a%C%;!<%8$KBP$7$F!"(B
 674.647 +$B%W%m%8%'%/%H1?MQ>e$NJ}?K$H$7$F2?$i$+$N7A<0$rMW5a$9$k$+$b$7$l$^$;$s$,!"(B
 674.648 +Mercurial $B<+?H$,2r<a$dWVEY$r$9$k$3$H$O$"$j$^$;$s!#(B
 674.649 +
 674.650 +$BI.<T$N8D?ME*$J9%$_$O!"(B
 674.651 +\hgcmdargs{log}{--patch} $B$r0lJM$7$?$@$1$G$OH=CG$G$-$J$$;vJA$K$D$$$F!"(B
 674.652 +$B4J7i$G$"$j$J$,$iM-1W$J>pJs$r$b$?$i$9$h$&$J%3%_%C%H%a%C%;!<%8$G$9!#(B
 674.653 +
 674.654 +\subsection{Aborting a commit}
 674.655 +
 674.656 +$B%3%_%C%H%a%C%;!<%8$N5-=RCf$K%3%_%C%H$r<h$j$d$a$r7h0U$7$?>l9g$K$O!"(B
 674.657 +$BJT=8Cf$N%U%!%$%k$rJ]B8$;$:$K%(%G%#%?$r=*N;$9$l$PNI$$$N$G$9!#(B
 674.658 +$B$3$N>l9g!"%j%]%8%H%j$H:n6HNN0h%G%#%l%/%H%j$N$$$:$l$KBP$7$F$b!"(B
 674.659 +$B2?$iA`:n$O2C$($i$l$^$;$s!#(B
 674.660 +
 674.661 +$B0z?tL5$7$G(B \hgcmd{commit} $B%3%^%s%I$r<B9T$7$?>l9g!"(B
 674.662 +\hgcmd{status} $B$*$h$S(B \hgcmd{diff} 
 674.663 +$B$K$h$C$FJs9p$5$l$?A4$F$NJQ99FbMF$,5-O?$5$l$^$9!#(B
 674.664 +
 674.665 +\subsection{Admiring our new handiwork}
 674.666 +
 674.667 +$B%3%_%C%H$,40N;$7$?$J$i!"(B
 674.668 +$B:#$7$,$??75,:n@.$7$?%A%'%s%8%;%C%H$r(B
 674.669 +\hgcmd{tip} $B%3%^%s%I$GI=<($9$k$3$H$,$G$-$^$9!#(B
 674.670 +$B$3$N%3%^%s%I$O(B \hgcmd{log} $B$HF10l$N=PNO$r9T$$$^$9$,!"(B
 674.671 +$BI=<($5$l$k$N$O%j%]%8%H%j$K$*$1$k:G?7$N%j%S%8%g%s$@$1$G$9!#(B
 674.672 +
 674.673 +\interaction{tour.tip}
 674.674 +
 674.675 +$B%j%]%8%H%j$K$*$1$k:G?7$N%j%S%8%g%s$r(B tip $B%j%S%8%g%s!"(B
 674.676 +$B$"$k$$$OC1$K(B tip $B$H8F$S$^$9!#(B
 674.677 +
 674.678 +\section{Sharing changes}
 674.679 +
 674.680 +$B@h$N5-=R$G!"(BMercurial $B$K$*$1$k%j%]%8%H%j$O!"(B
 674.681 +$B$=$l<+?H$G407k$7$F$$$k;]=R$Y$^$7$?!#(B
 674.682 +$B$3$l$OB($A!"(B
 674.683 +$B$?$C$?:#?75,$K:n@.$7$?%A%'%s%8%;%C%H$O!"(B
 674.684 +$B<j85$N(B \dirname{my-hello} $B%j%]%8%H%j$K$7$+B8:_$7$J$$$3$H$r0UL#$7$^$9!#(B
 674.685 +$B$3$NJQ99FbMF$rB>$N%j%]%8%H%j$X$HEAGE$9$kJ}K!$r!"(B
 674.686 +$B=g$K8+$F$f$-$^$7$g$&!#(B
 674.687 +
 674.688 +\subsection{Pulling changes from another repository}
 674.689 +\label{sec:tour:pull}
 674.690 +
 674.691 +$B$^$:;O$a$K!"(B
 674.692 +$B85!9$N(B \dirname{hello} $B%j%]%8%H%j$rJ#@=$7$F!"(B
 674.693 +$B$?$C$?:#?75,$K:n@.$7$?JQ99$N%3%_%C%H$5$l$F$$$J$$%j%]%8%H%j$r:n@.$7$^$7$g$&!#(B
 674.694 +$B$3$NJ#@=$7$?%j%]%8%H%j$r!"(B
 674.695 +\dirname{hello-pull} $B$H8F$S$^$9!#(B
 674.696 +
 674.697 +\interaction{tour.clone-pull}
 674.698 +
 674.699 +\hgcmd{pull} $B%3%^%s%I$K$h$j!"(B
 674.700 +\dirname{my-hello} $B$+$i(B
 674.701 +\dirname{hello-pull} $B$X$HJQ99$r<h$j9~$_$^$9!#(B
 674.702 +$B$7$+$7$J$,$i!"L$CN$NJQ99$r0G1@$K%j%]%8%H%j$K<h$j9~$`$N$O!"(B
 674.703 +$B$"$^$j$>$C$H$7$^$;$s!#(B
 674.704 +Mercurial $B$,Ds6!$9$k(B \hgcmd{incoming} $B%3%^%s%I$O!"(B
 674.705 +$B<B:]$KJQ99$r<h$j9~$`;vL5$/!"(B
 674.706 +\hgcmd{pull} 
 674.707 +$B$K$h$C$F%j%]%8%H%j$K<h$j9~$^$l$k(B\emph{$BM=Dj(B}$B$N%A%'%s%8%;%C%H$rI=<($7$^$9!#(B
 674.708 +
 674.709 +\interaction{tour.incoming}
 674.710 +
 674.711 +$B!JL^O@!"(B
 674.712 +\hgcmd{incoming} $B%3%^%s%I$r<B9T$7$?%j%]%8%H%j$KBP$7$F!"(B
 674.713 +\hgcmd{pull} $B$K$h$kJQ99<h$j9~$_$N5!2q$h$j$bA0$K!"(B
 674.714 +$B$h$jB?$/$NJQ99$rDI2C$9$k$3$H$O2DG=$G$9$N$G!"(B
 674.715 +$B<B:]$NJQ99<h$j9~$_$OM=Dj$H$O0[$J$k2DG=@-$,M-$j$^$9!#!K(B
 674.716 +
 674.717 +$B%j%]%8%H%j$X$NJQ99$N<h$j9~$_$O!"(B
 674.718 +$B$I$N%j%]%8%H%j$+$i<h$j9~$`$+$r;X<($7$D$D!"(B
 674.719 +\hgcmd{pull} $B%3%^%s%I$r<B9T$9$k$H$$$&4JC1$J$b$N$G$9!#(B
 674.720 +
 674.721 +\interaction{tour.pull}
 674.722 +
 674.723 +$B<B;\A08e$N(B \hgcmd{tip} $B=PNO$+$i8+$F<h$l$k$h$&$K!"(B
 674.724 +$B<j85$N%j%]%8%H%j$X$NJQ99FbMF$NH?1G$,@.8y$7$F$$$^$9!#(B
 674.725 +$B<h$j9~$s$@JQ99FbMF$r:n6HNN0h%G%#%l%/%H%j$K$*$$$F;2>H$9$k$?$a$K$O!"(B
 674.726 +$B$b$&$R$H<j=gI,MW$G$9!#(B
 674.727 +
 674.728 +\subsection{Updating the working directory}
 674.729 +
 674.730 +$B%j%]%8%H%j$H:n6HNN0h%G%#%l%/%H%j$N4X78$K$D$$$F!"(B
 674.731 +$B$3$l$^$G$OBg;(GD$K$7$+@bL@$7$F$-$^$;$s$G$7$?!#(B
 674.732 +\ref{sec:tour:pull}~$B@a$G<B9T$7$?(B
 674.733 +\hgcmd{pull} $B%3%^%s%I$O!"(B
 674.734 +$B%j%]%8%H%j$X$NJQ99$N<h$j9~$_$r9T$$$^$9$,!"(B
 674.735 +$B3NG'$7$F$_$l$P$o$+$k$h$&$K!"(B
 674.736 +$B:n6HNN0h$K$O2?$i1F6A$r5Z$\$7$^$;$s!#(B
 674.737 +$B$3$l$O!"(B
 674.738 +\hgcmd{pull} $B$N!J4pDl$N!K5sF0$,!"(B
 674.739 +$B:n6HNN0h$K1F6A$r5Z$\$5$J$$$b$N$G$"$k$?$a$G$9!#(B
 674.740 +$B:n6HNN0h$N99?7$K$O!"(B
 674.741 +\hgcmd{pull} $B$G$O$J$/(B \hgcmd{update} $B$rMQ$$$^$9!#(B
 674.742 +
 674.743 +\interaction{tour.update}
 674.744 +
 674.745 +\hgcmd{pull} $B<B9T;~$K:n6HNN0h$r<+F0E*$K99?7$7$J$$$3$H$O!"(B
 674.746 +$B0l8+4q0[$K8+$($k$+$b$7$l$^$;$s$,!"(B
 674.747 +$B<B$O$=$l$K$OM}M3$,M-$j$^$9!#(B
 674.748 +\hgcmd{update} $B$rMQ$$$k$3$H$G!"(B
 674.749 +$B%j%]%8%H%j$K5-O?$5$l$?(B\emph{$BG$0U$NHG(B}$B$N>uBV$X$H!"(B
 674.750 +$B:n6HNN0h%G%#%l%/%H%j$NFbMF$r99?7$9$k$3$H$,$G$-$^$9!#(B
 674.751 +$B:n6HNN0h%G%#%l%/%H%j$r(B
 674.752 +---$BNc$($P!"%P%0$N860xD4::$J$I$N$?$a$K(B---
 674.753 +$B8E$$HG$K$7$F:n6H$7$F$$$?>l9g$J$I$O!"(B
 674.754 +\hgcmd{pull} $B<B9T$,:n6HNN0h%G%#%l%/%H%j$r:G?7$NHG$K<+F0E*$K99?7$7$F$7$^$&$N$O!"(B
 674.755 +$B$"$^$j$h$m$7$/$J$$$G$7$g$&!#(B
 674.756 +
 674.757 +$B$7$+$7!"(B\hgcmd{pull} $B!A(B \hgcmd{update} $B$H$$$&N.$l$OHs>o$KIQHK$J:n6H$G$9$+$i!"(B
 674.758 +\hgcmd{pull} $B$K(B \hgopt{pull}{-u} $B%*%W%7%g%s$r;XDj$9$k$3$H$G!"(B
 674.759 +Mercurial $B$O$3$l$i#2$D$rAH$_9g$o$;$?5!G=$rDs6!$7$^$9!#(B
 674.760 +
 674.761 +\begin{codesample2}
 674.762 +  hg pull -u
 674.763 +\end{codesample2}
 674.764 +
 674.765 +\ref{sec:tour:pull}~$B@a$G$N(B
 674.766 +\hgopt{pull}{-u} $B%*%W%7%g%s$r;XDj$7$J$$(B
 674.767 +\hgcmd{pull} $B<B9T$N=PNO$K$O!"(B
 674.768 +$B:n6HNN0h%G%#%l%/%H%j$N99?7$KL@<(E*$J<j=g$,I,MW$G$"$k$3$H$r<($9!"(B
 674.769 +$BCm0U4-5/$N%a%C%;!<%8$,I=<($5$l$F$$$k$N$,8+$F<h$l$^$9!#(B
 674.770 +
 674.771 +\begin{codesample2}
 674.772 +  (run 'hg update' to get a working copy)
 674.773 +\end{codesample2}
 674.774 +
 674.775 +$B:n6HNN0h%G%#%l%/%H%j$,$I$NHG$NFbMF$K4p$E$$$F$$$k$+$r8+$k$K$O!"(B
 674.776 +\hgcmd{parents} $B%3%^%s%I$r;HMQ$7$^$9!#(B
 674.777 +
 674.778 +\interaction{tour.parents}
 674.779 +
 674.780 +$B?^(B~\ref{fig:tour-basic:history} $B$G$O!"(B
 674.781 +$B8D!9$N%A%'%s%8%;%C%H$r7R$0Lp0u$,IA$+$l$F$$$^$9!#(B
 674.782 +$BLp0u$N(B\emph{$B:,85(B}$B$K$"$?$k%A%'%s%8%;%C%H$,?F$r!"(B
 674.783 +$B$=$7$FLp0u$N(B\emph{$B@h(B}$B$K$"$?$k%A%'%s%8%;%C%H$,;R$rI=$7$F$$$^$9!#(B
 674.784 +$BF1$8$h$&$K!":n6HNN0h%G%#%l%/%H%j$b?F$r;}$C$F$*$j!"(B
 674.785 +$B8=;~E@$GJ];}$7$F$$$k:n6HNN0h%G%#%l%/%H%j$NFbMF$O!"(B
 674.786 +$B$=$N%A%'%s%8%;%C%H$K4p$E$$$?$b$N$G$9!#(B
 674.787 +
 674.788 +$B:n6HNN0h%G%#%l%/%H%j$NFbMF$rFCDj$NHG$N$b$N$K$9$k>l9g!"(B
 674.789 +\hgcmd{update} $B%3%^%s%I$K%j%S%8%g%sHV9f$J$$$7%A%'%s%8%;%C%H(B~ID$B$r;XDj$7$^$9!#(B
 674.790 +
 674.791 +\interaction{tour.older}
 674.792 +
 674.793 +$BL@<(E*$JHG;XDj$r$7$J$+$C$?>l9g!"(B
 674.794 +$B>e5-$NNc$K$*$1$k#2$DL\$N(B \hgcmd{update} $B<B9T$G8+$F<h$l$k$h$&$K!"(B
 674.795 +\hgcmd{update} $B$O(B tip $B$,;XDj$5$l$?$b$N$H$7$F?6Iq$$$^$9!#(B
 674.796 +
 674.797 +\subsection{Pushing changes to another repository}
 674.798 +
 674.799 +Mercurial $B$G$O!"(B
 674.800 +$B8=:_:n6H$r9T$C$F$$$k%j%]%8%H%j$+$iB>$N%j%]%8%H%j$X$N!"(B
 674.801 +$BJQ99FbMF$NH?1G$,2DG=$G$9!#(B
 674.802 +$B@h$K<($7$?(B \hgcmd{pull} $B$NNc$HF1MM$K!"(B
 674.803 +$B$^$:$OJQ99H?1G@h$H$9$k$?$a$N0l;~E*$J%j%]%8%H%j$r:n@.$7$^$9!#(B
 674.804 +
 674.805 +\interaction{tour.clone-push}
 674.806 +
 674.807 +\hgcmd{outgoing} $B%3%^%s%I$O!"(B
 674.808 +$BB>$N%j%]%8%H%j$X$NH?1GBP>]$H$J$k%A%'%s%8%;%C%H$r0lMwI=<($7$^$9!#(B
 674.809 +
 674.810 +\interaction{tour.outgoing}
 674.811 +
 674.812 +$B$=$7$F(B \hgcmd{push} $B%3%^%s%I$,<B:]$NH?1G:n6H$r9T$$$^$9!#(B
 674.813 +
 674.814 +\interaction{tour.push}
 674.815 +
 674.816 +\hgcmd{pull} $B$HF1MM$K!"(B
 674.817 +\hgcmd{push} $B%3%^%s%I$OJQ99H?1G@h$N%j%]%8%H%jB&$K$*$$$F!"(B
 674.818 +$B:n6HNN0h%G%#%l%/%H%j$N99?7$O9T$$$^$;$s(B
 674.819 +$B!J(B\hgcmd{pull} $B$H0c$$!"(B
 674.820 +\hgcmd{push} $B$OJQ99H?1G@h$N%j%]%8%H%jB&$G$N:n6HNN0h%G%#%l%/%H%j$r99?7$9$k(B
 674.821 +\texttt{-u} $B%*%W%7%g%s$r;}$A$^$;$s!K!#(B
 674.822 +
 674.823 +$BEv3:%j%]%8%H%j$,4{$KAjEv$9$k%A%'%s%8%;%C%H$r;}$C$F$$$k>l9g!"(B
 674.824 +$BJQ99$N<h$j9~$_$"$k$$$OH?1G$r9T$&$H$I$&$J$k$N$G$7$g$&!)(B
 674.825 +$B6C$/$h$&$J$3$H$O2?$b5/$3$j$^$;$s!#(B
 674.826 +
 674.827 +\interaction{tour.push.nothing}
 674.828 +
 674.829 +\subsection{Sharing changes over a network}
 674.830 +
 674.831 +$B@h$N4v$D$+$N@a$G?($l$?%3%^%s%I$NMxMQ$O!"(B
 674.832 +$B<j85$K$"$k%j%]%8%H%j$K$N$_8BDj$5$l$F$$$k$o$1$G$O$"$j$^$;$s!#(B
 674.833 +$BA4$/F1MM$N7A<0$G!"(B
 674.834 +$B%M%C%H%o!<%/@\B37PM3$G$b5!G=$7$^$9!#(B
 674.835 +$B%m!<%+%k%U%!%$%k%7%9%F%`$N%Q%9$NBe$o$j$K!"(B
 674.836 +URL $B$r;XDj$9$l$PNI$$$N$G$9!#(B
 674.837 +
 674.838 +\interaction{tour.outgoing.net}
 674.839 +
 674.840 +$B$3$NNc$G$O!"(B
 674.841 +$B1s3V%j%]%8%H%j$KBP$7$FH?1G2DG=$JJQ99$N0lMw$r8+$k$3$H$,$G$-$^$9$,!"(B
 674.842 +$B$3$N%j%]%8%H%j$OF?L>$G$NJQ99H?1G$r5v$9$h$&$K$OEvA3$G$9$,@_Dj$5$l$F$$$^$;$s!#(B
 674.843 +
 674.844 +\interaction{tour.push.net}
 674.845 +
 674.846 +%%% Local Variables: 
 674.847 +%%% mode: latex
 674.848 +%%% TeX-master: "00book"
 674.849 +%%% End: 
   675.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   675.2 +++ b/ja/tour-history.svg	Sun Aug 16 03:41:39 2009 +0200
   675.3 @@ -0,0 +1,289 @@
   675.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   675.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   675.6 +<svg
   675.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   675.8 +   xmlns:cc="http://web.resource.org/cc/"
   675.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  675.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  675.11 +   xmlns="http://www.w3.org/2000/svg"
  675.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  675.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  675.14 +   width="744.09448819"
  675.15 +   height="1052.3622047"
  675.16 +   id="svg2"
  675.17 +   sodipodi:version="0.32"
  675.18 +   inkscape:version="0.44.1"
  675.19 +   sodipodi:docname="tour-history.svg">
  675.20 +  <defs
  675.21 +     id="defs4">
  675.22 +    <marker
  675.23 +       inkscape:stockid="Arrow1Mstart"
  675.24 +       orient="auto"
  675.25 +       refY="0.0"
  675.26 +       refX="0.0"
  675.27 +       id="Arrow1Mstart"
  675.28 +       style="overflow:visible">
  675.29 +      <path
  675.30 +         id="path2973"
  675.31 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  675.32 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  675.33 +         transform="scale(0.4) translate(10,0)" />
  675.34 +    </marker>
  675.35 +    <marker
  675.36 +       inkscape:stockid="Arrow1Mend"
  675.37 +       orient="auto"
  675.38 +       refY="0.0"
  675.39 +       refX="0.0"
  675.40 +       id="Arrow1Mend"
  675.41 +       style="overflow:visible;">
  675.42 +      <path
  675.43 +         id="path3066"
  675.44 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  675.45 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  675.46 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  675.47 +    </marker>
  675.48 +  </defs>
  675.49 +  <sodipodi:namedview
  675.50 +     id="base"
  675.51 +     pagecolor="#ffffff"
  675.52 +     bordercolor="#666666"
  675.53 +     borderopacity="1.0"
  675.54 +     gridtolerance="10000"
  675.55 +     guidetolerance="10"
  675.56 +     objecttolerance="10"
  675.57 +     inkscape:pageopacity="0.0"
  675.58 +     inkscape:pageshadow="2"
  675.59 +     inkscape:zoom="1.4"
  675.60 +     inkscape:cx="232.14286"
  675.61 +     inkscape:cy="672.75296"
  675.62 +     inkscape:document-units="px"
  675.63 +     inkscape:current-layer="layer1"
  675.64 +     inkscape:window-width="906"
  675.65 +     inkscape:window-height="620"
  675.66 +     inkscape:window-x="5"
  675.67 +     inkscape:window-y="49" />
  675.68 +  <metadata
  675.69 +     id="metadata7">
  675.70 +    <rdf:RDF>
  675.71 +      <cc:Work
  675.72 +         rdf:about="">
  675.73 +        <dc:format>image/svg+xml</dc:format>
  675.74 +        <dc:type
  675.75 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  675.76 +      </cc:Work>
  675.77 +    </rdf:RDF>
  675.78 +  </metadata>
  675.79 +  <g
  675.80 +     inkscape:label="Layer 1"
  675.81 +     inkscape:groupmode="layer"
  675.82 +     id="layer1">
  675.83 +    <rect
  675.84 +       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
  675.85 +       id="rect1878"
  675.86 +       width="94.285713"
  675.87 +       height="20.714285"
  675.88 +       x="138"
  675.89 +       y="479.50504" />
  675.90 +    <text
  675.91 +       xml:space="preserve"
  675.92 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
  675.93 +       x="162.09892"
  675.94 +       y="493.12619"
  675.95 +       id="text1872"><tspan
  675.96 +         sodipodi:role="line"
  675.97 +         id="tspan1874"
  675.98 +         x="162.09892"
  675.99 +         y="493.12619"
 675.100 +         style="font-family:Courier"><tspan
 675.101 +   style="font-weight:bold"
 675.102 +   id="tspan1876">0</tspan>: 0a04</tspan></text>
 675.103 +    <rect
 675.104 +       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 675.105 +       id="rect2800"
 675.106 +       width="94.285713"
 675.107 +       height="20.714285"
 675.108 +       x="138"
 675.109 +       y="432.63004" />
 675.110 +    <text
 675.111 +       xml:space="preserve"
 675.112 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 675.113 +       x="162.09892"
 675.114 +       y="446.25119"
 675.115 +       id="text2794"><tspan
 675.116 +         sodipodi:role="line"
 675.117 +         id="tspan2796"
 675.118 +         x="162.09892"
 675.119 +         y="446.25119"
 675.120 +         style="font-family:Courier"><tspan
 675.121 +   id="tspan2868"
 675.122 +   style="font-weight:bold">1</tspan>: 82e5</tspan></text>
 675.123 +    <rect
 675.124 +       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 675.125 +       id="rect2810"
 675.126 +       width="94.285713"
 675.127 +       height="20.714285"
 675.128 +       x="138"
 675.129 +       y="385.75504" />
 675.130 +    <text
 675.131 +       xml:space="preserve"
 675.132 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 675.133 +       x="162.09892"
 675.134 +       y="399.37619"
 675.135 +       id="text2804"><tspan
 675.136 +         sodipodi:role="line"
 675.137 +         id="tspan2806"
 675.138 +         x="162.09892"
 675.139 +         y="399.37619"
 675.140 +         style="font-family:Courier"><tspan
 675.141 +   style="font-weight:bold"
 675.142 +   id="tspan2866">2</tspan>: 057d</tspan></text>
 675.143 +    <rect
 675.144 +       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 675.145 +       id="rect2820"
 675.146 +       width="94.285713"
 675.147 +       height="20.714285"
 675.148 +       x="138"
 675.149 +       y="338.88007" />
 675.150 +    <text
 675.151 +       xml:space="preserve"
 675.152 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 675.153 +       x="162.09892"
 675.154 +       y="352.50122"
 675.155 +       id="text2814"><tspan
 675.156 +         sodipodi:role="line"
 675.157 +         id="tspan2816"
 675.158 +         x="162.09892"
 675.159 +         y="352.50122"
 675.160 +         style="font-family:Courier"><tspan
 675.161 +   style="font-weight:bold"
 675.162 +   id="tspan2864">3</tspan>: ff5d</tspan></text>
 675.163 +    <rect
 675.164 +       style="opacity:1;fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 675.165 +       id="rect2830"
 675.166 +       width="94.285713"
 675.167 +       height="20.714285"
 675.168 +       x="138"
 675.169 +       y="292.00504" />
 675.170 +    <text
 675.171 +       xml:space="preserve"
 675.172 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 675.173 +       x="162.09892"
 675.174 +       y="305.62619"
 675.175 +       id="text2824"><tspan
 675.176 +         sodipodi:role="line"
 675.177 +         id="tspan2826"
 675.178 +         x="162.09892"
 675.179 +         y="305.62619"
 675.180 +         style="font-family:Courier"><tspan
 675.181 +   style="font-weight:bold"
 675.182 +   id="tspan2862">4</tspan>: b57f</tspan></text>
 675.183 +    <text
 675.184 +       xml:space="preserve"
 675.185 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 675.186 +       x="173.57143"
 675.187 +       y="443.79074"
 675.188 +       id="text2832"><tspan
 675.189 +         sodipodi:role="line"
 675.190 +         id="tspan2834"
 675.191 +         x="173.57143"
 675.192 +         y="443.79074" /></text>
 675.193 +    <path
 675.194 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 675.195 +       d="M 185.14286,478.50504 L 185.14286,454.34432"
 675.196 +       id="path2894"
 675.197 +       inkscape:connector-type="polyline" />
 675.198 +    <path
 675.199 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 675.200 +       d="M 185.14286,431.63004 L 185.14286,407.46932"
 675.201 +       id="path2896"
 675.202 +       inkscape:connector-type="polyline" />
 675.203 +    <path
 675.204 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 675.205 +       d="M 185.14286,384.75504 L 185.14286,360.59435"
 675.206 +       id="path2898"
 675.207 +       inkscape:connector-type="polyline" />
 675.208 +    <path
 675.209 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 675.210 +       d="M 185.14286,337.88007 L 185.14286,313.71932"
 675.211 +       id="path2900"
 675.212 +       inkscape:connector-type="polyline" />
 675.213 +    <text
 675.214 +       xml:space="preserve"
 675.215 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times"
 675.216 +       x="244.60992"
 675.217 +       y="305.245"
 675.218 +       id="text1902"><tspan
 675.219 +         sodipodi:role="line"
 675.220 +         id="tspan1904"
 675.221 +         x="244.60992"
 675.222 +         y="305.245">(newest)</tspan></text>
 675.223 +    <text
 675.224 +       xml:space="preserve"
 675.225 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times"
 675.226 +       x="244.60992"
 675.227 +       y="492.745"
 675.228 +       id="text1906"><tspan
 675.229 +         sodipodi:role="line"
 675.230 +         id="tspan1908"
 675.231 +         x="244.60992"
 675.232 +         y="492.745">(oldest)</tspan></text>
 675.233 +    <rect
 675.234 +       style="opacity:1;fill:#d2e1e4;fill-opacity:1;stroke:#b1cbd0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 675.235 +       id="rect1907"
 675.236 +       width="94.285713"
 675.237 +       height="20.714285"
 675.238 +       x="309.28571"
 675.239 +       y="324.86218" />
 675.240 +    <text
 675.241 +       xml:space="preserve"
 675.242 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 675.243 +       x="333.38464"
 675.244 +       y="338.48334"
 675.245 +       id="text1909"><tspan
 675.246 +         sodipodi:role="line"
 675.247 +         id="tspan1911"
 675.248 +         x="333.38464"
 675.249 +         y="338.48334"
 675.250 +         style="font-family:Courier"><tspan
 675.251 +   style="font-weight:bold"
 675.252 +   id="tspan1913">4</tspan>: b57f</tspan></text>
 675.253 +    <path
 675.254 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 675.255 +       d="M 332.14286,375.21932 L 335.71429,347.36218"
 675.256 +       id="path2802" />
 675.257 +    <path
 675.258 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 675.259 +       d="M 372.69968,375.21932 L 369.12825,347.36218"
 675.260 +       id="path2986" />
 675.261 +    <text
 675.262 +       xml:space="preserve"
 675.263 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times"
 675.264 +       x="335.14285"
 675.265 +       y="387.21933"
 675.266 +       id="text2988"><tspan
 675.267 +         sodipodi:role="line"
 675.268 +         x="335.14285"
 675.269 +         y="387.21933"
 675.270 +         id="tspan3020"
 675.271 +         style="text-align:end;text-anchor:end">revision</tspan><tspan
 675.272 +         sodipodi:role="line"
 675.273 +         x="335.14285"
 675.274 +         y="402.21933"
 675.275 +         id="tspan3014"
 675.276 +         style="text-align:end;text-anchor:end">number</tspan></text>
 675.277 +    <text
 675.278 +       xml:space="preserve"
 675.279 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times"
 675.280 +       x="368.71429"
 675.281 +       y="387.21933"
 675.282 +       id="text2994"><tspan
 675.283 +         sodipodi:role="line"
 675.284 +         id="tspan2996"
 675.285 +         x="368.71429"
 675.286 +         y="387.21933">changeset</tspan><tspan
 675.287 +         sodipodi:role="line"
 675.288 +         x="368.71429"
 675.289 +         y="402.21933"
 675.290 +         id="tspan2998">identifier</tspan></text>
 675.291 +  </g>
 675.292 +</svg>
   676.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   676.2 +++ b/ja/tour-merge-conflict.svg	Sun Aug 16 03:41:39 2009 +0200
   676.3 @@ -0,0 +1,210 @@
   676.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   676.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   676.6 +<svg
   676.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   676.8 +   xmlns:cc="http://web.resource.org/cc/"
   676.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  676.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  676.11 +   xmlns="http://www.w3.org/2000/svg"
  676.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  676.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  676.14 +   width="744.09448819"
  676.15 +   height="1052.3622047"
  676.16 +   id="svg2"
  676.17 +   sodipodi:version="0.32"
  676.18 +   inkscape:version="0.44.1"
  676.19 +   sodipodi:docname="tour-merge-conflict.svg">
  676.20 +  <defs
  676.21 +     id="defs4">
  676.22 +    <marker
  676.23 +       inkscape:stockid="Arrow1Mend"
  676.24 +       orient="auto"
  676.25 +       refY="0.0"
  676.26 +       refX="0.0"
  676.27 +       id="Arrow1Mend"
  676.28 +       style="overflow:visible;">
  676.29 +      <path
  676.30 +         id="path3053"
  676.31 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  676.32 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  676.33 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  676.34 +    </marker>
  676.35 +  </defs>
  676.36 +  <sodipodi:namedview
  676.37 +     id="base"
  676.38 +     pagecolor="#ffffff"
  676.39 +     bordercolor="#666666"
  676.40 +     borderopacity="1.0"
  676.41 +     gridtolerance="10000"
  676.42 +     guidetolerance="10"
  676.43 +     objecttolerance="10"
  676.44 +     inkscape:pageopacity="0.0"
  676.45 +     inkscape:pageshadow="2"
  676.46 +     inkscape:zoom="1.4"
  676.47 +     inkscape:cx="164.78349"
  676.48 +     inkscape:cy="590.07679"
  676.49 +     inkscape:document-units="px"
  676.50 +     inkscape:current-layer="layer1"
  676.51 +     inkscape:window-width="906"
  676.52 +     inkscape:window-height="620"
  676.53 +     inkscape:window-x="5"
  676.54 +     inkscape:window-y="49" />
  676.55 +  <metadata
  676.56 +     id="metadata7">
  676.57 +    <rdf:RDF>
  676.58 +      <cc:Work
  676.59 +         rdf:about="">
  676.60 +        <dc:format>image/svg+xml</dc:format>
  676.61 +        <dc:type
  676.62 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  676.63 +      </cc:Work>
  676.64 +    </rdf:RDF>
  676.65 +  </metadata>
  676.66 +  <g
  676.67 +     inkscape:label="Layer 1"
  676.68 +     inkscape:groupmode="layer"
  676.69 +     id="layer1">
  676.70 +    <g
  676.71 +       id="g1988"
  676.72 +       transform="translate(84.85711,0)">
  676.73 +      <g
  676.74 +         id="g1876">
  676.75 +        <path
  676.76 +           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  676.77 +           d="M 118.57143,458.21933 L 118.57143,563.79075 L 191.42857,563.79075 L 204.28571,550.93361 L 203.57142,459.6479 L 118.57143,458.21933 z "
  676.78 +           id="path1872"
  676.79 +           sodipodi:nodetypes="cccccc" />
  676.80 +        <path
  676.81 +           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
  676.82 +           d="M 191.55484,563.36862 L 191.6923,560.98794 L 192.69126,552.44884 L 203.80416,551.31242"
  676.83 +           id="path1874"
  676.84 +           sodipodi:nodetypes="cccc" />
  676.85 +      </g>
  676.86 +      <flowRoot
  676.87 +         style="font-size:8px;font-family:Times New Roman"
  676.88 +         id="flowRoot1898"
  676.89 +         xml:space="preserve"><flowRegion
  676.90 +           id="flowRegion1900"><rect
  676.91 +             style="font-size:8px;font-family:Times New Roman"
  676.92 +             y="464.50504"
  676.93 +             x="122.85714"
  676.94 +             height="93.571426"
  676.95 +             width="76.428574"
  676.96 +             id="rect1902" /></flowRegion><flowPara
  676.97 +           id="flowPara1904">Greetings!</flowPara><flowPara
  676.98 +           id="flowPara1906" /><flowPara
  676.99 +           id="flowPara1908">I am Mariam Abacha, the wife of former Nigerian dictator Sani Abacha. I am contacting you in confidence, and as a means of developing</flowPara></flowRoot>    </g>
 676.100 +    <g
 676.101 +       id="g1966"
 676.102 +       transform="translate(82,0.35715)">
 676.103 +      <g
 676.104 +         transform="translate(-77.85718,-140.0714)"
 676.105 +         id="g1910">
 676.106 +        <path
 676.107 +           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 676.108 +           d="M 118.57143,458.21933 L 118.57143,563.79075 L 191.42857,563.79075 L 204.28571,550.93361 L 203.57142,459.6479 L 118.57143,458.21933 z "
 676.109 +           id="path1912"
 676.110 +           sodipodi:nodetypes="cccccc" />
 676.111 +        <path
 676.112 +           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 676.113 +           d="M 191.55484,563.36862 L 191.6923,560.98794 L 192.69126,552.44884 L 203.80416,551.31242"
 676.114 +           id="path1914"
 676.115 +           sodipodi:nodetypes="cccc" />
 676.116 +      </g>
 676.117 +      <flowRoot
 676.118 +         transform="translate(-77.85718,-140.0714)"
 676.119 +         style="font-size:8px;font-family:Times New Roman"
 676.120 +         id="flowRoot1916"
 676.121 +         xml:space="preserve"><flowRegion
 676.122 +           id="flowRegion1918"><rect
 676.123 +             style="font-size:8px;font-family:Times New Roman"
 676.124 +             y="464.50504"
 676.125 +             x="122.85714"
 676.126 +             height="93.571426"
 676.127 +             width="76.428574"
 676.128 +             id="rect1920" /></flowRegion><flowPara
 676.129 +           id="flowPara1922">Greetings!</flowPara><flowPara
 676.130 +           id="flowPara1924" /><flowPara
 676.131 +           id="flowPara1926">I am <flowSpan
 676.132 +   style="font-style:italic;fill:red"
 676.133 +   id="flowSpan3094">Shehu Musa Abacha, cousin to</flowSpan> the former Nigerian dictator Sani Abacha. I am contacting you in confidence, and as a means of developing</flowPara></flowRoot>    </g>
 676.134 +    <g
 676.135 +       id="g1977"
 676.136 +       transform="translate(81.99999,-0.35715)">
 676.137 +      <g
 676.138 +         transform="translate(83.57141,-139.3571)"
 676.139 +         id="g1932">
 676.140 +        <path
 676.141 +           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 676.142 +           d="M 118.57143,458.21933 L 118.57143,563.79075 L 191.42857,563.79075 L 204.28571,550.93361 L 203.57142,459.6479 L 118.57143,458.21933 z "
 676.143 +           id="path1934"
 676.144 +           sodipodi:nodetypes="cccccc" />
 676.145 +        <path
 676.146 +           style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 676.147 +           d="M 191.55484,563.36862 L 191.6923,560.98794 L 192.69126,552.44884 L 203.80416,551.31242"
 676.148 +           id="path1936"
 676.149 +           sodipodi:nodetypes="cccc" />
 676.150 +      </g>
 676.151 +      <flowRoot
 676.152 +         transform="translate(83.57141,-139.3571)"
 676.153 +         style="font-size:8px;font-family:Times New Roman"
 676.154 +         id="flowRoot1938"
 676.155 +         xml:space="preserve"><flowRegion
 676.156 +           id="flowRegion1940"><rect
 676.157 +             style="font-size:8px;font-family:Times New Roman"
 676.158 +             y="464.50504"
 676.159 +             x="122.85714"
 676.160 +             height="93.571426"
 676.161 +             width="76.428574"
 676.162 +             id="rect1942" /></flowRegion><flowPara
 676.163 +           id="flowPara1944">Greetings!</flowPara><flowPara
 676.164 +           id="flowPara1946" /><flowPara
 676.165 +           id="flowPara1948">I am <flowSpan
 676.166 +   style="font-style:italic;fill:red"
 676.167 +   id="flowSpan3096">Alhaji Abba Abacha, son of</flowSpan> the former Nigerian dictator Sani Abacha. I am contacting you in confidence, and as a means of developing</flowPara></flowRoot>    </g>
 676.168 +    <path
 676.169 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 676.170 +       d="M 215.502,457.71933 L 196.35507,424.5765"
 676.171 +       id="path1999"
 676.172 +       inkscape:connector-type="polyline"
 676.173 +       inkscape:connection-start="#g1988"
 676.174 +       inkscape:connection-end="#g1966" />
 676.175 +    <path
 676.176 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 676.177 +       d="M 277.06936,457.71933 L 296.21629,424.5765"
 676.178 +       id="path2001"
 676.179 +       inkscape:connector-type="polyline"
 676.180 +       inkscape:connection-start="#g1988"
 676.181 +       inkscape:connection-end="#g1977" />
 676.182 +    <text
 676.183 +       xml:space="preserve"
 676.184 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 676.185 +       x="302.42859"
 676.186 +       y="515.08905"
 676.187 +       id="text1905"><tspan
 676.188 +         sodipodi:role="line"
 676.189 +         id="tspan1907"
 676.190 +         x="302.42859"
 676.191 +         y="515.08905">Base version</tspan></text>
 676.192 +    <text
 676.193 +       xml:space="preserve"
 676.194 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 676.195 +       x="45.57143"
 676.196 +       y="374.1619"
 676.197 +       id="text1917"><tspan
 676.198 +         sodipodi:role="line"
 676.199 +         id="tspan1919"
 676.200 +         x="45.57143"
 676.201 +         y="374.1619">Our changes</tspan></text>
 676.202 +    <text
 676.203 +       xml:space="preserve"
 676.204 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 676.205 +       x="385.71429"
 676.206 +       y="374.1619"
 676.207 +       id="text1921"><tspan
 676.208 +         sodipodi:role="line"
 676.209 +         id="tspan1923"
 676.210 +         x="385.71429"
 676.211 +         y="374.1619">Their changes</tspan></text>
 676.212 +  </g>
 676.213 +</svg>
   677.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   677.2 +++ b/ja/tour-merge-merge.svg	Sun Aug 16 03:41:39 2009 +0200
   677.3 @@ -0,0 +1,380 @@
   677.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   677.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   677.6 +<svg
   677.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   677.8 +   xmlns:cc="http://web.resource.org/cc/"
   677.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  677.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  677.11 +   xmlns="http://www.w3.org/2000/svg"
  677.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  677.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  677.14 +   width="744.09448819"
  677.15 +   height="1052.3622047"
  677.16 +   id="svg2"
  677.17 +   sodipodi:version="0.32"
  677.18 +   inkscape:version="0.44.1"
  677.19 +   sodipodi:docname="tour-merge-merge.svg">
  677.20 +  <defs
  677.21 +     id="defs4">
  677.22 +    <marker
  677.23 +       inkscape:stockid="Arrow1Mstart"
  677.24 +       orient="auto"
  677.25 +       refY="0.0"
  677.26 +       refX="0.0"
  677.27 +       id="Arrow1Mstart"
  677.28 +       style="overflow:visible">
  677.29 +      <path
  677.30 +         id="path2973"
  677.31 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  677.32 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  677.33 +         transform="scale(0.4) translate(10,0)" />
  677.34 +    </marker>
  677.35 +    <marker
  677.36 +       inkscape:stockid="Arrow1Mend"
  677.37 +       orient="auto"
  677.38 +       refY="0.0"
  677.39 +       refX="0.0"
  677.40 +       id="Arrow1Mend"
  677.41 +       style="overflow:visible;">
  677.42 +      <path
  677.43 +         id="path3066"
  677.44 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  677.45 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  677.46 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  677.47 +    </marker>
  677.48 +  </defs>
  677.49 +  <sodipodi:namedview
  677.50 +     id="base"
  677.51 +     pagecolor="#ffffff"
  677.52 +     bordercolor="#666666"
  677.53 +     borderopacity="1.0"
  677.54 +     gridtolerance="10000"
  677.55 +     guidetolerance="10"
  677.56 +     objecttolerance="10"
  677.57 +     inkscape:pageopacity="0.0"
  677.58 +     inkscape:pageshadow="2"
  677.59 +     inkscape:zoom="1.4"
  677.60 +     inkscape:cx="247.53795"
  677.61 +     inkscape:cy="871.05738"
  677.62 +     inkscape:document-units="px"
  677.63 +     inkscape:current-layer="layer1"
  677.64 +     inkscape:window-width="906"
  677.65 +     inkscape:window-height="620"
  677.66 +     inkscape:window-x="38"
  677.67 +     inkscape:window-y="95" />
  677.68 +  <metadata
  677.69 +     id="metadata7">
  677.70 +    <rdf:RDF>
  677.71 +      <cc:Work
  677.72 +         rdf:about="">
  677.73 +        <dc:format>image/svg+xml</dc:format>
  677.74 +        <dc:type
  677.75 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  677.76 +      </cc:Work>
  677.77 +    </rdf:RDF>
  677.78 +  </metadata>
  677.79 +  <g
  677.80 +     inkscape:label="Layer 1"
  677.81 +     inkscape:groupmode="layer"
  677.82 +     id="layer1">
  677.83 +    <rect
  677.84 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
  677.85 +       id="rect2995"
  677.86 +       width="94.285713"
  677.87 +       height="20.714285"
  677.88 +       x="532.85718"
  677.89 +       y="203.0479" />
  677.90 +    <text
  677.91 +       xml:space="preserve"
  677.92 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
  677.93 +       x="173.57143"
  677.94 +       y="443.79074"
  677.95 +       id="text2832"><tspan
  677.96 +         sodipodi:role="line"
  677.97 +         id="tspan2834"
  677.98 +         x="173.57143"
  677.99 +         y="443.79074" /></text>
 677.100 +    <rect
 677.101 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 677.102 +       id="rect2830"
 677.103 +       width="94.285713"
 677.104 +       height="20.714285"
 677.105 +       x="138"
 677.106 +       y="297.76227" />
 677.107 +    <text
 677.108 +       xml:space="preserve"
 677.109 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 677.110 +       x="162.09892"
 677.111 +       y="311.38342"
 677.112 +       id="text2824"><tspan
 677.113 +         sodipodi:role="line"
 677.114 +         id="tspan2826"
 677.115 +         x="162.09892"
 677.116 +         y="311.38342"
 677.117 +         style="font-family:Courier"><tspan
 677.118 +   style="font-weight:bold"
 677.119 +   id="tspan2862">4</tspan>: b57f</tspan></text>
 677.120 +    <path
 677.121 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 677.122 +       d="M 185.14286,343.63731 L 185.14286,319.47656"
 677.123 +       id="path2900"
 677.124 +       inkscape:connector-type="polyline" />
 677.125 +    <rect
 677.126 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 677.127 +       id="rect2863"
 677.128 +       width="94.285713"
 677.129 +       height="20.714285"
 677.130 +       x="91.428574"
 677.131 +       y="250.47656" />
 677.132 +    <text
 677.133 +       xml:space="preserve"
 677.134 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 677.135 +       x="116.09886"
 677.136 +       y="264.56592"
 677.137 +       id="text1965"
 677.138 +       transform="scale(1.000002,0.999998)"><tspan
 677.139 +         sodipodi:role="line"
 677.140 +         id="tspan1967"
 677.141 +         x="116.09886"
 677.142 +         y="264.56592"
 677.143 +         style="font-family:Courier"><tspan
 677.144 +   style="font-weight:bold"
 677.145 +   id="tspan1973">5</tspan>: ae13</tspan></text>
 677.146 +    <path
 677.147 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 677.148 +       d="M 173.95727,296.76228 L 149.75702,272.19085"
 677.149 +       id="path1971"
 677.150 +       inkscape:connector-type="polyline"
 677.151 +       inkscape:connection-end="#rect2863"
 677.152 +       inkscape:connection-start="#rect2830" />
 677.153 +    <rect
 677.154 +       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 677.155 +       id="rect2911"
 677.156 +       width="94.285995"
 677.157 +       height="20.714283"
 677.158 +       x="186.71414"
 677.159 +       y="204.40514" />
 677.160 +    <text
 677.161 +       xml:space="preserve"
 677.162 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 677.163 +       x="210.81311"
 677.164 +       y="218.02673"
 677.165 +       id="text2913"
 677.166 +       transform="scale(1.000002,0.999998)"><tspan
 677.167 +         sodipodi:role="line"
 677.168 +         id="tspan2915"
 677.169 +         x="210.81311"
 677.170 +         y="218.02673"
 677.171 +         style="font-family:Courier"><tspan
 677.172 +   id="tspan1966"
 677.173 +   style="font-weight:bold">6</tspan>: d2b5</tspan></text>
 677.174 +    <path
 677.175 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 677.176 +       d="M 191.06908,296.76228 L 227.93092,226.11942"
 677.177 +       id="path2919"
 677.178 +       inkscape:connector-type="polyline"
 677.179 +       inkscape:connection-start="#rect2830" />
 677.180 +    <text
 677.181 +       xml:space="preserve"
 677.182 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 677.183 +       x="295.28571"
 677.184 +       y="217.56711"
 677.185 +       id="text2871"><tspan
 677.186 +         sodipodi:role="line"
 677.187 +         id="tspan2873"
 677.188 +         x="295.28571"
 677.189 +         y="217.56711">tip (and head)</tspan></text>
 677.190 +    <text
 677.191 +       xml:space="preserve"
 677.192 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 677.193 +       x="76"
 677.194 +       y="264.91769"
 677.195 +       id="text2875"><tspan
 677.196 +         sodipodi:role="line"
 677.197 +         id="tspan2877"
 677.198 +         x="76"
 677.199 +         y="264.91769"
 677.200 +         style="text-align:end;text-anchor:end">head</tspan></text>
 677.201 +    <rect
 677.202 +       style="fill:#c8aaa5;fill-opacity:1;stroke:#a07163;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:2, 4;stroke-dashoffset:0;stroke-opacity:1"
 677.203 +       id="rect1913"
 677.204 +       width="94.285713"
 677.205 +       height="20.714285"
 677.206 +       x="138"
 677.207 +       y="156.90514" />
 677.208 +    <path
 677.209 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 2;stroke-dashoffset:0;stroke-opacity:1"
 677.210 +       d="M 144.22399,249.47657 L 179.49029,178.61943"
 677.211 +       id="path1915"
 677.212 +       inkscape:connector-type="polyline"
 677.213 +       inkscape:connection-start="#rect2863"
 677.214 +       inkscape:connection-end="#rect1913" />
 677.215 +    <path
 677.216 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:2, 2;stroke-dashoffset:0;stroke-opacity:1"
 677.217 +       d="M 222.20966,203.40514 L 196.79033,178.61943"
 677.218 +       id="path1917"
 677.219 +       inkscape:connector-type="polyline"
 677.220 +       inkscape:connection-start="#rect2911"
 677.221 +       inkscape:connection-end="#rect1913" />
 677.222 +    <text
 677.223 +       xml:space="preserve"
 677.224 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 677.225 +       x="166.16823"
 677.226 +       y="168.52228"
 677.227 +       id="text2806"><tspan
 677.228 +         sodipodi:role="line"
 677.229 +         id="tspan2808"
 677.230 +         x="166.16823"
 677.231 +         y="168.52228"
 677.232 +         style="font-family:Courier">merge</tspan></text>
 677.233 +    <text
 677.234 +       xml:space="preserve"
 677.235 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 677.236 +       x="246"
 677.237 +       y="162.63338"
 677.238 +       id="text2810"><tspan
 677.239 +         sodipodi:role="line"
 677.240 +         id="tspan2812"
 677.241 +         x="246"
 677.242 +         y="162.63338">working directory</tspan><tspan
 677.243 +         sodipodi:role="line"
 677.244 +         x="246"
 677.245 +         y="177.63338"
 677.246 +         id="tspan2814">during merge</tspan></text>
 677.247 +    <rect
 677.248 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 677.249 +       id="rect2816"
 677.250 +       width="94.285713"
 677.251 +       height="20.714285"
 677.252 +       x="483.14636"
 677.253 +       y="297.76227" />
 677.254 +    <text
 677.255 +       xml:space="preserve"
 677.256 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 677.257 +       x="507.24527"
 677.258 +       y="311.38342"
 677.259 +       id="text2818"><tspan
 677.260 +         sodipodi:role="line"
 677.261 +         id="tspan2820"
 677.262 +         x="507.24527"
 677.263 +         y="311.38342"
 677.264 +         style="font-family:Courier"><tspan
 677.265 +   style="font-weight:bold"
 677.266 +   id="tspan2822">4</tspan>: b57f</tspan></text>
 677.267 +    <path
 677.268 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 677.269 +       d="M 530.28921,343.6373 L 530.28921,319.47655"
 677.270 +       id="path2824"
 677.271 +       inkscape:connector-type="polyline" />
 677.272 +    <rect
 677.273 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 677.274 +       id="rect2826"
 677.275 +       width="94.285713"
 677.276 +       height="20.714285"
 677.277 +       x="436.57492"
 677.278 +       y="250.47656" />
 677.279 +    <text
 677.280 +       xml:space="preserve"
 677.281 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 677.282 +       x="461.24484"
 677.283 +       y="264.56613"
 677.284 +       id="text2828"
 677.285 +       transform="scale(1.000002,0.999998)"><tspan
 677.286 +         sodipodi:role="line"
 677.287 +         id="tspan2830"
 677.288 +         x="461.24484"
 677.289 +         y="264.56613"
 677.290 +         style="font-family:Courier"><tspan
 677.291 +   style="font-weight:bold"
 677.292 +   id="tspan2832">5</tspan>: ae13</tspan></text>
 677.293 +    <path
 677.294 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 677.295 +       d="M 519.10362,296.76227 L 494.90337,272.19084"
 677.296 +       id="path2834"
 677.297 +       inkscape:connector-type="polyline" />
 677.298 +    <rect
 677.299 +       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 677.300 +       id="rect2836"
 677.301 +       width="94.285995"
 677.302 +       height="20.714283"
 677.303 +       x="483.14001"
 677.304 +       y="156.548" />
 677.305 +    <text
 677.306 +       xml:space="preserve"
 677.307 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 677.308 +       x="555.95911"
 677.309 +       y="218.02698"
 677.310 +       id="text2838"
 677.311 +       transform="scale(1.000002,0.999998)"><tspan
 677.312 +         sodipodi:role="line"
 677.313 +         id="tspan2840"
 677.314 +         x="555.95911"
 677.315 +         y="218.02698"
 677.316 +         style="font-family:Courier"><tspan
 677.317 +   id="tspan2842"
 677.318 +   style="font-weight:bold">6</tspan>: d2b5</tspan></text>
 677.319 +    <path
 677.320 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 677.321 +       d="M 536.21543,296.76227 L 574.03453,224.76218"
 677.322 +       id="path2844"
 677.323 +       inkscape:connector-type="polyline" />
 677.324 +    <text
 677.325 +       xml:space="preserve"
 677.326 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 677.327 +       x="594.43207"
 677.328 +       y="169.78796"
 677.329 +       id="text2846"><tspan
 677.330 +         sodipodi:role="line"
 677.331 +         id="tspan2848"
 677.332 +         x="594.43207"
 677.333 +         y="169.78796">tip</tspan></text>
 677.334 +    <path
 677.335 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
 677.336 +       d="M 489.37034,249.47656 L 524.65575,178.26229"
 677.337 +       id="path2856"
 677.338 +       inkscape:connector-type="polyline"
 677.339 +       inkscape:connection-end="#rect2836" />
 677.340 +    <path
 677.341 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
 677.342 +       d="M 567.85714,202.0479 L 542.42591,178.26229"
 677.343 +       id="path2858"
 677.344 +       inkscape:connector-type="polyline"
 677.345 +       inkscape:connection-end="#rect2836"
 677.346 +       inkscape:connection-start="#rect2995" />
 677.347 +    <text
 677.348 +       xml:space="preserve"
 677.349 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 677.350 +       x="504.54507"
 677.351 +       y="170.39714"
 677.352 +       id="text2860"><tspan
 677.353 +         sodipodi:role="line"
 677.354 +         id="tspan2863"
 677.355 +         x="504.54507"
 677.356 +         y="170.39714"
 677.357 +         style="font-family:Courier"><tspan
 677.358 +   style="font-weight:bold"
 677.359 +   id="tspan2997">7</tspan>: dba3</tspan></text>
 677.360 +    <text
 677.361 +       xml:space="preserve"
 677.362 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 677.363 +       x="90.323105"
 677.364 +       y="120.21933"
 677.365 +       id="text2929"><tspan
 677.366 +         sodipodi:role="line"
 677.367 +         id="tspan2931"
 677.368 +         x="90.323105"
 677.369 +         y="120.21933"
 677.370 +         style="font-weight:bold">Working directory during merge</tspan></text>
 677.371 +    <text
 677.372 +       xml:space="preserve"
 677.373 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 677.374 +       x="435.35226"
 677.375 +       y="120.21933"
 677.376 +       id="text2937"><tspan
 677.377 +         sodipodi:role="line"
 677.378 +         id="tspan2939"
 677.379 +         x="435.35226"
 677.380 +         y="120.21933"
 677.381 +         style="font-weight:bold">Repository after merge committed</tspan></text>
 677.382 +  </g>
 677.383 +</svg>
   678.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   678.2 +++ b/ja/tour-merge-pull.svg	Sun Aug 16 03:41:39 2009 +0200
   678.3 @@ -0,0 +1,288 @@
   678.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   678.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   678.6 +<svg
   678.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   678.8 +   xmlns:cc="http://web.resource.org/cc/"
   678.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  678.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  678.11 +   xmlns="http://www.w3.org/2000/svg"
  678.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  678.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  678.14 +   width="744.09448819"
  678.15 +   height="1052.3622047"
  678.16 +   id="svg2"
  678.17 +   sodipodi:version="0.32"
  678.18 +   inkscape:version="0.44.1"
  678.19 +   sodipodi:docname="tour-merge-pull.svg"
  678.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en">
  678.21 +  <defs
  678.22 +     id="defs4">
  678.23 +    <marker
  678.24 +       inkscape:stockid="Arrow1Mstart"
  678.25 +       orient="auto"
  678.26 +       refY="0.0"
  678.27 +       refX="0.0"
  678.28 +       id="Arrow1Mstart"
  678.29 +       style="overflow:visible">
  678.30 +      <path
  678.31 +         id="path2973"
  678.32 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  678.33 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  678.34 +         transform="scale(0.4) translate(10,0)" />
  678.35 +    </marker>
  678.36 +    <marker
  678.37 +       inkscape:stockid="Arrow1Mend"
  678.38 +       orient="auto"
  678.39 +       refY="0.0"
  678.40 +       refX="0.0"
  678.41 +       id="Arrow1Mend"
  678.42 +       style="overflow:visible;">
  678.43 +      <path
  678.44 +         id="path3066"
  678.45 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  678.46 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  678.47 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  678.48 +    </marker>
  678.49 +  </defs>
  678.50 +  <sodipodi:namedview
  678.51 +     id="base"
  678.52 +     pagecolor="#ffffff"
  678.53 +     bordercolor="#666666"
  678.54 +     borderopacity="1.0"
  678.55 +     gridtolerance="10000"
  678.56 +     guidetolerance="10"
  678.57 +     objecttolerance="10"
  678.58 +     inkscape:pageopacity="0.0"
  678.59 +     inkscape:pageshadow="2"
  678.60 +     inkscape:zoom="1.4"
  678.61 +     inkscape:cx="233.63208"
  678.62 +     inkscape:cy="832.54381"
  678.63 +     inkscape:document-units="px"
  678.64 +     inkscape:current-layer="layer1"
  678.65 +     inkscape:window-width="906"
  678.66 +     inkscape:window-height="620"
  678.67 +     inkscape:window-x="237"
  678.68 +     inkscape:window-y="103" />
  678.69 +  <metadata
  678.70 +     id="metadata7">
  678.71 +    <rdf:RDF>
  678.72 +      <cc:Work
  678.73 +         rdf:about="">
  678.74 +        <dc:format>image/svg+xml</dc:format>
  678.75 +        <dc:type
  678.76 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  678.77 +      </cc:Work>
  678.78 +    </rdf:RDF>
  678.79 +  </metadata>
  678.80 +  <g
  678.81 +     inkscape:label="Layer 1"
  678.82 +     inkscape:groupmode="layer"
  678.83 +     id="layer1">
  678.84 +    <text
  678.85 +       xml:space="preserve"
  678.86 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
  678.87 +       x="173.57143"
  678.88 +       y="443.79074"
  678.89 +       id="text2832"><tspan
  678.90 +         sodipodi:role="line"
  678.91 +         id="tspan2834"
  678.92 +         x="173.57143"
  678.93 +         y="443.79074" /></text>
  678.94 +    <rect
  678.95 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
  678.96 +       id="rect1878"
  678.97 +       width="94.285713"
  678.98 +       height="20.714285"
  678.99 +       x="138"
 678.100 +       y="479.50504" />
 678.101 +    <text
 678.102 +       xml:space="preserve"
 678.103 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 678.104 +       x="162.09892"
 678.105 +       y="493.12619"
 678.106 +       id="text1872"><tspan
 678.107 +         sodipodi:role="line"
 678.108 +         id="tspan1874"
 678.109 +         x="162.09892"
 678.110 +         y="493.12619"
 678.111 +         style="font-family:Courier"><tspan
 678.112 +   style="font-weight:bold"
 678.113 +   id="tspan1876">0</tspan>: 0a04</tspan></text>
 678.114 +    <rect
 678.115 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 678.116 +       id="rect2800"
 678.117 +       width="94.285713"
 678.118 +       height="20.714285"
 678.119 +       x="138"
 678.120 +       y="432.63004" />
 678.121 +    <text
 678.122 +       xml:space="preserve"
 678.123 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 678.124 +       x="162.09892"
 678.125 +       y="446.25119"
 678.126 +       id="text2794"><tspan
 678.127 +         sodipodi:role="line"
 678.128 +         id="tspan2796"
 678.129 +         x="162.09892"
 678.130 +         y="446.25119"
 678.131 +         style="font-family:Courier"><tspan
 678.132 +   id="tspan2868"
 678.133 +   style="font-weight:bold">1</tspan>: 82e5</tspan></text>
 678.134 +    <rect
 678.135 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 678.136 +       id="rect2810"
 678.137 +       width="94.285713"
 678.138 +       height="20.714285"
 678.139 +       x="138"
 678.140 +       y="385.75504" />
 678.141 +    <text
 678.142 +       xml:space="preserve"
 678.143 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 678.144 +       x="162.09892"
 678.145 +       y="399.37619"
 678.146 +       id="text2804"><tspan
 678.147 +         sodipodi:role="line"
 678.148 +         id="tspan2806"
 678.149 +         x="162.09892"
 678.150 +         y="399.37619"
 678.151 +         style="font-family:Courier"><tspan
 678.152 +   style="font-weight:bold"
 678.153 +   id="tspan2866">2</tspan>: 057d</tspan></text>
 678.154 +    <rect
 678.155 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 678.156 +       id="rect2820"
 678.157 +       width="94.285713"
 678.158 +       height="20.714285"
 678.159 +       x="138"
 678.160 +       y="338.88007" />
 678.161 +    <text
 678.162 +       xml:space="preserve"
 678.163 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 678.164 +       x="162.09892"
 678.165 +       y="352.50122"
 678.166 +       id="text2814"><tspan
 678.167 +         sodipodi:role="line"
 678.168 +         id="tspan2816"
 678.169 +         x="162.09892"
 678.170 +         y="352.50122"
 678.171 +         style="font-family:Courier"><tspan
 678.172 +   style="font-weight:bold"
 678.173 +   id="tspan2864">3</tspan>: ff5d</tspan></text>
 678.174 +    <rect
 678.175 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 678.176 +       id="rect2830"
 678.177 +       width="94.285713"
 678.178 +       height="20.714285"
 678.179 +       x="138"
 678.180 +       y="292.00504" />
 678.181 +    <text
 678.182 +       xml:space="preserve"
 678.183 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 678.184 +       x="162.09892"
 678.185 +       y="305.62619"
 678.186 +       id="text2824"><tspan
 678.187 +         sodipodi:role="line"
 678.188 +         id="tspan2826"
 678.189 +         x="162.09892"
 678.190 +         y="305.62619"
 678.191 +         style="font-family:Courier"><tspan
 678.192 +   style="font-weight:bold"
 678.193 +   id="tspan2862">4</tspan>: b57f</tspan></text>
 678.194 +    <path
 678.195 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 678.196 +       d="M 185.14286,478.50504 L 185.14286,454.34432"
 678.197 +       id="path2894"
 678.198 +       inkscape:connector-type="polyline" />
 678.199 +    <path
 678.200 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 678.201 +       d="M 185.14286,431.63004 L 185.14286,407.46932"
 678.202 +       id="path2896"
 678.203 +       inkscape:connector-type="polyline" />
 678.204 +    <path
 678.205 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 678.206 +       d="M 185.14286,384.75504 L 185.14286,360.59435"
 678.207 +       id="path2898"
 678.208 +       inkscape:connector-type="polyline" />
 678.209 +    <path
 678.210 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 678.211 +       d="M 185.14286,337.88007 L 185.14286,313.71932"
 678.212 +       id="path2900"
 678.213 +       inkscape:connector-type="polyline" />
 678.214 +    <rect
 678.215 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 678.216 +       id="rect2863"
 678.217 +       width="94.285713"
 678.218 +       height="20.714285"
 678.219 +       x="91.428574"
 678.220 +       y="244.71933" />
 678.221 +    <text
 678.222 +       xml:space="preserve"
 678.223 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 678.224 +       x="116.09886"
 678.225 +       y="258.80865"
 678.226 +       id="text1965"
 678.227 +       transform="scale(1.000002,0.999998)"><tspan
 678.228 +         sodipodi:role="line"
 678.229 +         id="tspan1967"
 678.230 +         x="116.09886"
 678.231 +         y="258.80865"
 678.232 +         style="font-family:Courier"><tspan
 678.233 +   style="font-weight:bold"
 678.234 +   id="tspan1973">5</tspan>: ae13</tspan></text>
 678.235 +    <path
 678.236 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 678.237 +       d="M 173.95727,291.00504 L 149.75702,266.43361"
 678.238 +       id="path1971"
 678.239 +       inkscape:connector-type="polyline"
 678.240 +       inkscape:connection-end="#rect2863"
 678.241 +       inkscape:connection-start="#rect2830" />
 678.242 +    <rect
 678.243 +       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 678.244 +       id="rect2911"
 678.245 +       width="94.285995"
 678.246 +       height="20.714283"
 678.247 +       x="186.71414"
 678.248 +       y="198.6479" />
 678.249 +    <text
 678.250 +       xml:space="preserve"
 678.251 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 678.252 +       x="210.81311"
 678.253 +       y="212.26949"
 678.254 +       id="text2913"
 678.255 +       transform="scale(1.000002,0.999998)"><tspan
 678.256 +         sodipodi:role="line"
 678.257 +         id="tspan2915"
 678.258 +         x="210.81311"
 678.259 +         y="212.26949"
 678.260 +         style="font-family:Courier"><tspan
 678.261 +   id="tspan1966"
 678.262 +   style="font-weight:bold">6</tspan>: d2b5</tspan></text>
 678.263 +    <path
 678.264 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 678.265 +       d="M 191.06908,291.00504 L 227.93092,220.36218"
 678.266 +       id="path2919"
 678.267 +       inkscape:connector-type="polyline"
 678.268 +       inkscape:connection-start="#rect2830" />
 678.269 +    <text
 678.270 +       xml:space="preserve"
 678.271 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 678.272 +       x="295.28571"
 678.273 +       y="211.80988"
 678.274 +       id="text2871"><tspan
 678.275 +         sodipodi:role="line"
 678.276 +         id="tspan2873"
 678.277 +         x="295.28571"
 678.278 +         y="211.80988">tip (and head)</tspan></text>
 678.279 +    <text
 678.280 +       xml:space="preserve"
 678.281 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 678.282 +       x="76"
 678.283 +       y="259.16046"
 678.284 +       id="text2875"><tspan
 678.285 +         sodipodi:role="line"
 678.286 +         id="tspan2877"
 678.287 +         x="76"
 678.288 +         y="259.16046"
 678.289 +         style="text-align:end;text-anchor:end">head</tspan></text>
 678.290 +  </g>
 678.291 +</svg>
   679.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   679.2 +++ b/ja/tour-merge-sep-repos.svg	Sun Aug 16 03:41:39 2009 +0200
   679.3 @@ -0,0 +1,466 @@
   679.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   679.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   679.6 +<svg
   679.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   679.8 +   xmlns:cc="http://web.resource.org/cc/"
   679.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  679.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  679.11 +   xmlns="http://www.w3.org/2000/svg"
  679.12 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  679.13 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  679.14 +   width="744.09448819"
  679.15 +   height="1052.3622047"
  679.16 +   id="svg2"
  679.17 +   sodipodi:version="0.32"
  679.18 +   inkscape:version="0.44.1"
  679.19 +   sodipodi:docname="tour-merge-sep-repos.svg">
  679.20 +  <defs
  679.21 +     id="defs4">
  679.22 +    <marker
  679.23 +       inkscape:stockid="Arrow1Mstart"
  679.24 +       orient="auto"
  679.25 +       refY="0.0"
  679.26 +       refX="0.0"
  679.27 +       id="Arrow1Mstart"
  679.28 +       style="overflow:visible">
  679.29 +      <path
  679.30 +         id="path2973"
  679.31 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  679.32 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  679.33 +         transform="scale(0.4) translate(10,0)" />
  679.34 +    </marker>
  679.35 +    <marker
  679.36 +       inkscape:stockid="Arrow1Mend"
  679.37 +       orient="auto"
  679.38 +       refY="0.0"
  679.39 +       refX="0.0"
  679.40 +       id="Arrow1Mend"
  679.41 +       style="overflow:visible;">
  679.42 +      <path
  679.43 +         id="path3066"
  679.44 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  679.45 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  679.46 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  679.47 +    </marker>
  679.48 +  </defs>
  679.49 +  <sodipodi:namedview
  679.50 +     id="base"
  679.51 +     pagecolor="#ffffff"
  679.52 +     bordercolor="#666666"
  679.53 +     borderopacity="1.0"
  679.54 +     gridtolerance="10000"
  679.55 +     guidetolerance="10"
  679.56 +     objecttolerance="10"
  679.57 +     inkscape:pageopacity="0.0"
  679.58 +     inkscape:pageshadow="2"
  679.59 +     inkscape:zoom="1.4"
  679.60 +     inkscape:cx="307.20351"
  679.61 +     inkscape:cy="716.87911"
  679.62 +     inkscape:document-units="px"
  679.63 +     inkscape:current-layer="layer1"
  679.64 +     inkscape:window-width="906"
  679.65 +     inkscape:window-height="620"
  679.66 +     inkscape:window-x="5"
  679.67 +     inkscape:window-y="49" />
  679.68 +  <metadata
  679.69 +     id="metadata7">
  679.70 +    <rdf:RDF>
  679.71 +      <cc:Work
  679.72 +         rdf:about="">
  679.73 +        <dc:format>image/svg+xml</dc:format>
  679.74 +        <dc:type
  679.75 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  679.76 +      </cc:Work>
  679.77 +    </rdf:RDF>
  679.78 +  </metadata>
  679.79 +  <g
  679.80 +     inkscape:label="Layer 1"
  679.81 +     inkscape:groupmode="layer"
  679.82 +     id="layer1">
  679.83 +    <text
  679.84 +       xml:space="preserve"
  679.85 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
  679.86 +       x="173.57143"
  679.87 +       y="443.79074"
  679.88 +       id="text2832"><tspan
  679.89 +         sodipodi:role="line"
  679.90 +         id="tspan2834"
  679.91 +         x="173.57143"
  679.92 +         y="443.79074" /></text>
  679.93 +    <rect
  679.94 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
  679.95 +       id="rect1878"
  679.96 +       width="94.285713"
  679.97 +       height="20.714285"
  679.98 +       x="138"
  679.99 +       y="479.50504" />
 679.100 +    <text
 679.101 +       xml:space="preserve"
 679.102 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 679.103 +       x="162.09892"
 679.104 +       y="493.12619"
 679.105 +       id="text1872"><tspan
 679.106 +         sodipodi:role="line"
 679.107 +         id="tspan1874"
 679.108 +         x="162.09892"
 679.109 +         y="493.12619"
 679.110 +         style="font-family:Courier"><tspan
 679.111 +   style="font-weight:bold"
 679.112 +   id="tspan1876">0</tspan>: 0a04</tspan></text>
 679.113 +    <rect
 679.114 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 679.115 +       id="rect2800"
 679.116 +       width="94.285713"
 679.117 +       height="20.714285"
 679.118 +       x="138"
 679.119 +       y="432.63004" />
 679.120 +    <text
 679.121 +       xml:space="preserve"
 679.122 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 679.123 +       x="162.09892"
 679.124 +       y="446.25119"
 679.125 +       id="text2794"><tspan
 679.126 +         sodipodi:role="line"
 679.127 +         id="tspan2796"
 679.128 +         x="162.09892"
 679.129 +         y="446.25119"
 679.130 +         style="font-family:Courier"><tspan
 679.131 +   id="tspan2868"
 679.132 +   style="font-weight:bold">1</tspan>: 82e5</tspan></text>
 679.133 +    <rect
 679.134 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 679.135 +       id="rect2810"
 679.136 +       width="94.285713"
 679.137 +       height="20.714285"
 679.138 +       x="138"
 679.139 +       y="385.75504" />
 679.140 +    <text
 679.141 +       xml:space="preserve"
 679.142 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 679.143 +       x="162.09892"
 679.144 +       y="399.37619"
 679.145 +       id="text2804"><tspan
 679.146 +         sodipodi:role="line"
 679.147 +         id="tspan2806"
 679.148 +         x="162.09892"
 679.149 +         y="399.37619"
 679.150 +         style="font-family:Courier"><tspan
 679.151 +   style="font-weight:bold"
 679.152 +   id="tspan2866">2</tspan>: 057d</tspan></text>
 679.153 +    <rect
 679.154 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 679.155 +       id="rect2820"
 679.156 +       width="94.285713"
 679.157 +       height="20.714285"
 679.158 +       x="138"
 679.159 +       y="338.88007" />
 679.160 +    <text
 679.161 +       xml:space="preserve"
 679.162 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 679.163 +       x="162.09892"
 679.164 +       y="352.50122"
 679.165 +       id="text2814"><tspan
 679.166 +         sodipodi:role="line"
 679.167 +         id="tspan2816"
 679.168 +         x="162.09892"
 679.169 +         y="352.50122"
 679.170 +         style="font-family:Courier"><tspan
 679.171 +   style="font-weight:bold"
 679.172 +   id="tspan2864">3</tspan>: ff5d</tspan></text>
 679.173 +    <rect
 679.174 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 679.175 +       id="rect2830"
 679.176 +       width="94.285713"
 679.177 +       height="20.714285"
 679.178 +       x="138"
 679.179 +       y="292.00504" />
 679.180 +    <text
 679.181 +       xml:space="preserve"
 679.182 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 679.183 +       x="162.09892"
 679.184 +       y="305.62619"
 679.185 +       id="text2824"><tspan
 679.186 +         sodipodi:role="line"
 679.187 +         id="tspan2826"
 679.188 +         x="162.09892"
 679.189 +         y="305.62619"
 679.190 +         style="font-family:Courier"><tspan
 679.191 +   style="font-weight:bold"
 679.192 +   id="tspan2862">4</tspan>: b57f</tspan></text>
 679.193 +    <path
 679.194 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 679.195 +       d="M 185.14286,478.50504 L 185.14286,454.34432"
 679.196 +       id="path2894"
 679.197 +       inkscape:connector-type="polyline" />
 679.198 +    <path
 679.199 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 679.200 +       d="M 185.14286,431.63004 L 185.14286,407.46932"
 679.201 +       id="path2896"
 679.202 +       inkscape:connector-type="polyline" />
 679.203 +    <path
 679.204 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 679.205 +       d="M 185.14286,384.75504 L 185.14286,360.59435"
 679.206 +       id="path2898"
 679.207 +       inkscape:connector-type="polyline" />
 679.208 +    <path
 679.209 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 679.210 +       d="M 185.14286,337.88007 L 185.14286,313.71932"
 679.211 +       id="path2900"
 679.212 +       inkscape:connector-type="polyline" />
 679.213 +    <rect
 679.214 +       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 679.215 +       id="rect1963"
 679.216 +       width="94.285995"
 679.217 +       height="20.714283"
 679.218 +       x="138"
 679.219 +       y="245.18723" />
 679.220 +    <text
 679.221 +       xml:space="preserve"
 679.222 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 679.223 +       x="162.09877"
 679.224 +       y="258.80865"
 679.225 +       id="text1965"
 679.226 +       transform="scale(1.000002,0.999998)"><tspan
 679.227 +         sodipodi:role="line"
 679.228 +         id="tspan1967"
 679.229 +         x="162.09877"
 679.230 +         y="258.80865"
 679.231 +         style="font-family:Courier"><tspan
 679.232 +   style="font-weight:bold"
 679.233 +   id="tspan1973">5</tspan>: ae13</tspan></text>
 679.234 +    <path
 679.235 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 679.236 +       d="M 185.143,291.06218 L 185.143,266.90143"
 679.237 +       id="path1971"
 679.238 +       inkscape:connector-type="polyline" />
 679.239 +    <text
 679.240 +       xml:space="preserve"
 679.241 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 679.242 +       x="136.90039"
 679.243 +       y="232.25546"
 679.244 +       id="text2921"><tspan
 679.245 +         sodipodi:role="line"
 679.246 +         id="tspan2923"
 679.247 +         x="136.90039"
 679.248 +         y="232.25546">my-hello</tspan></text>
 679.249 +    <rect
 679.250 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 679.251 +       id="rect2863"
 679.252 +       width="94.285713"
 679.253 +       height="20.714285"
 679.254 +       x="370.71414"
 679.255 +       y="479.49289" />
 679.256 +    <text
 679.257 +       xml:space="preserve"
 679.258 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 679.259 +       x="394.81305"
 679.260 +       y="493.11404"
 679.261 +       id="text2865"><tspan
 679.262 +         sodipodi:role="line"
 679.263 +         id="tspan2867"
 679.264 +         x="394.81305"
 679.265 +         y="493.11404"
 679.266 +         style="font-family:Courier"><tspan
 679.267 +   style="font-weight:bold"
 679.268 +   id="tspan2869">0</tspan>: 0a04</tspan></text>
 679.269 +    <rect
 679.270 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 679.271 +       id="rect2871"
 679.272 +       width="94.285713"
 679.273 +       height="20.714285"
 679.274 +       x="370.71414"
 679.275 +       y="432.61789" />
 679.276 +    <text
 679.277 +       xml:space="preserve"
 679.278 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 679.279 +       x="394.81305"
 679.280 +       y="446.23904"
 679.281 +       id="text2873"><tspan
 679.282 +         sodipodi:role="line"
 679.283 +         id="tspan2875"
 679.284 +         x="394.81305"
 679.285 +         y="446.23904"
 679.286 +         style="font-family:Courier"><tspan
 679.287 +   id="tspan2877"
 679.288 +   style="font-weight:bold">1</tspan>: 82e5</tspan></text>
 679.289 +    <rect
 679.290 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 679.291 +       id="rect2879"
 679.292 +       width="94.285713"
 679.293 +       height="20.714285"
 679.294 +       x="370.71414"
 679.295 +       y="385.74289" />
 679.296 +    <text
 679.297 +       xml:space="preserve"
 679.298 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 679.299 +       x="394.81305"
 679.300 +       y="399.36404"
 679.301 +       id="text2881"><tspan
 679.302 +         sodipodi:role="line"
 679.303 +         id="tspan2883"
 679.304 +         x="394.81305"
 679.305 +         y="399.36404"
 679.306 +         style="font-family:Courier"><tspan
 679.307 +   style="font-weight:bold"
 679.308 +   id="tspan2885">2</tspan>: 057d</tspan></text>
 679.309 +    <rect
 679.310 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 679.311 +       id="rect2887"
 679.312 +       width="94.285713"
 679.313 +       height="20.714285"
 679.314 +       x="370.71414"
 679.315 +       y="338.86792" />
 679.316 +    <text
 679.317 +       xml:space="preserve"
 679.318 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 679.319 +       x="394.81305"
 679.320 +       y="352.48907"
 679.321 +       id="text2889"><tspan
 679.322 +         sodipodi:role="line"
 679.323 +         id="tspan2891"
 679.324 +         x="394.81305"
 679.325 +         y="352.48907"
 679.326 +         style="font-family:Courier"><tspan
 679.327 +   style="font-weight:bold"
 679.328 +   id="tspan2893">3</tspan>: ff5d</tspan></text>
 679.329 +    <rect
 679.330 +       style="fill:#a5c3c8;fill-opacity:1;stroke:#6396a0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 679.331 +       id="rect2895"
 679.332 +       width="94.285713"
 679.333 +       height="20.714285"
 679.334 +       x="370.71414"
 679.335 +       y="291.99289" />
 679.336 +    <text
 679.337 +       xml:space="preserve"
 679.338 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 679.339 +       x="394.81305"
 679.340 +       y="305.61404"
 679.341 +       id="text2897"><tspan
 679.342 +         sodipodi:role="line"
 679.343 +         id="tspan2899"
 679.344 +         x="394.81305"
 679.345 +         y="305.61404"
 679.346 +         style="font-family:Courier"><tspan
 679.347 +   style="font-weight:bold"
 679.348 +   id="tspan2901">4</tspan>: b57f</tspan></text>
 679.349 +    <path
 679.350 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 679.351 +       d="M 417.85701,478.4929 L 417.85701,454.33218"
 679.352 +       id="path2903"
 679.353 +       inkscape:connector-type="polyline" />
 679.354 +    <path
 679.355 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 679.356 +       d="M 417.85701,431.6179 L 417.85701,407.45718"
 679.357 +       id="path2905"
 679.358 +       inkscape:connector-type="polyline" />
 679.359 +    <path
 679.360 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 679.361 +       d="M 417.85701,384.7429 L 417.85701,360.58221"
 679.362 +       id="path2907"
 679.363 +       inkscape:connector-type="polyline" />
 679.364 +    <path
 679.365 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 679.366 +       d="M 417.85701,337.86793 L 417.85701,313.70718"
 679.367 +       id="path2909"
 679.368 +       inkscape:connector-type="polyline" />
 679.369 +    <rect
 679.370 +       style="fill:#78a5ad;fill-opacity:1;stroke:#507b84;stroke-width:2.00000286;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 679.371 +       id="rect2911"
 679.372 +       width="94.285995"
 679.373 +       height="20.714283"
 679.374 +       x="370.71414"
 679.375 +       y="245.17511" />
 679.376 +    <text
 679.377 +       xml:space="preserve"
 679.378 +       style="font-size:12.00001812px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier"
 679.379 +       x="394.81274"
 679.380 +       y="258.79678"
 679.381 +       id="text2913"
 679.382 +       transform="scale(1.000002,0.999998)"><tspan
 679.383 +         sodipodi:role="line"
 679.384 +         id="tspan2915"
 679.385 +         x="394.81274"
 679.386 +         y="258.79678"
 679.387 +         style="font-family:Courier"><tspan
 679.388 +   style="font-weight:bold"
 679.389 +   id="tspan2917">5</tspan>: d2b5</tspan></text>
 679.390 +    <path
 679.391 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1.00000143px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 679.392 +       d="M 417.85715,291.05004 L 417.85715,266.88929"
 679.393 +       id="path2919"
 679.394 +       inkscape:connector-type="polyline" />
 679.395 +    <text
 679.396 +       xml:space="preserve"
 679.397 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 679.398 +       x="369.61453"
 679.399 +       y="232.25546"
 679.400 +       id="text2925"><tspan
 679.401 +         sodipodi:role="line"
 679.402 +         id="tspan2927"
 679.403 +         x="369.61453"
 679.404 +         y="232.25546">my-new-hello</tspan></text>
 679.405 +    <text
 679.406 +       xml:space="preserve"
 679.407 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 679.408 +       x="300.54352"
 679.409 +       y="252.12723"
 679.410 +       id="text2933"><tspan
 679.411 +         sodipodi:role="line"
 679.412 +         id="tspan2935"
 679.413 +         x="300.54352"
 679.414 +         y="252.12723"
 679.415 +         style="text-align:center;text-anchor:middle">newest changes</tspan><tspan
 679.416 +         sodipodi:role="line"
 679.417 +         x="300.54352"
 679.418 +         y="267.12723"
 679.419 +         style="text-align:center;text-anchor:middle"
 679.420 +         id="tspan3132">differ</tspan></text>
 679.421 +    <text
 679.422 +       xml:space="preserve"
 679.423 +       style="font-size:12px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 679.424 +       x="262.15436"
 679.425 +       y="398.37112"
 679.426 +       id="text2929"><tspan
 679.427 +         sodipodi:role="line"
 679.428 +         x="262.15436"
 679.429 +         y="398.37112"
 679.430 +         id="tspan3013"
 679.431 +         style="text-align:start;text-anchor:start">common history</tspan></text>
 679.432 +    <g
 679.433 +       id="g3107"
 679.434 +       transform="translate(0,0.855744)">
 679.435 +      <path
 679.436 +         id="path3101"
 679.437 +         d="M 300.35713,381.29075 L 300.35713,304.50504"
 679.438 +         style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:0;stroke-opacity:1" />
 679.439 +      <path
 679.440 +         id="path3105"
 679.441 +         d="M 291.07142,301.64789 L 309.28571,301.64789"
 679.442 +         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#bfbfbf;stroke-width:0.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
 679.443 +    </g>
 679.444 +    <path
 679.445 +       style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:0;stroke-opacity:1"
 679.446 +       d="M 300.53571,486.38926 L 300.53571,409.60355"
 679.447 +       id="path3113" />
 679.448 +    <path
 679.449 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#bfbfbf;stroke-width:0.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 679.450 +       d="M 291.25,488.49641 L 309.46429,488.49641"
 679.451 +       id="path3115" />
 679.452 +    <text
 679.453 +       xml:space="preserve"
 679.454 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 679.455 +       x="480.71429"
 679.456 +       y="250.91507"
 679.457 +       id="text1949"><tspan
 679.458 +         sodipodi:role="line"
 679.459 +         id="tspan1951"
 679.460 +         x="480.71429"
 679.461 +         y="250.91507"
 679.462 +         style="text-align:start;text-anchor:start">head revision</tspan><tspan
 679.463 +         sodipodi:role="line"
 679.464 +         x="480.71429"
 679.465 +         y="265.91507"
 679.466 +         id="tspan1953"
 679.467 +         style="text-align:start;text-anchor:start">(has no children)</tspan></text>
 679.468 +  </g>
 679.469 +</svg>
   680.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   680.2 +++ b/ja/tour-merge.tex	Sun Aug 16 03:41:39 2009 +0200
   680.3 @@ -0,0 +1,398 @@
   680.4 +\chapter{A tour of Mercurial: merging work}
   680.5 +\label{chap:tour-merge}
   680.6 +
   680.7 +$BA0>O$K$*$$$F$O!"(B
   680.8 +$B%j%]%8%H%j$NJ#@=!"(B
   680.9 +$B%j%]%8%H%j$G$N%A%'%s%8%;%C%H$N@8@.!"(B
  680.10 +$B$J$i$S$K(B \hgcmd{push} $B$*$h$S(B \hgcmd{pull} 
  680.11 +$B$K$h$k%j%]%8%H%j4V$G$N%A%'%s%8%;%C%H$N<x<u$r8+$F$-$^$7$?!#(B
  680.12 +$B<!$NCJ3,$H$7$F!"JL!9$N%j%]%8%H%j$K$*$1$kJQ99$N(B\emph{$B%^!<%8(B}
  680.13 +$B!J(Bmerge$B!K$K$D$$$F8+$F$_$^$7$g$&!#(B
  680.14 +
  680.15 +\section{Merging streams of work}
  680.16 +
  680.17 +$BJ,;69=@.4IM}%D!<%k$K$*$$$F!"%^!<%8$O:n6H$N4pK\$G$9!#(B
  680.18 +
  680.19 +\begin{itemize}
  680.20 +\item Alice $B$H(B Bob $B$,!"(B
  680.21 +  $B6&F1:n6H$7$F$$$k%W%m%8%'%/%H$N%j%]%8%H%j$+$iJ#@=$7$?!"(B
  680.22 +  $B8D?ME*$J%j%]%8%H%j$r;}$C$F$$$k$b$N$H$7$^$9!#(B
  680.23 +  Alice $B$O<+J,$N%j%]%8%H%j$K$*$$$F%P%0$r=$@5$7$^$7$?!#(B
  680.24 +  Bob $B$O<+J,$N%j%]%8%H%j$K$*$$$F5!G=$rDI2C$7$^$7$?!#(B
  680.25 +  $BFs?M$O!"(B
  680.26 +  $B%P%0%U%#%C%/%9$H?75!G=$NN>J}$r4^$`%j%]%8%H%j$r6&M-$7$?$$$H;W$&$G$7$g$&!#(B
  680.27 +
  680.28 +\item $BI.<T$O!"(B
  680.29 +  $B8DJL$N%j%]%8%H%j$K$h$C$F!"(B
  680.30 +  $B$*8_$$$,0BA4$K3VN%$5$l$?J#?t$N0[$J$k:n6H$r!"(B
  680.31 +  $BF10l%W%m%8%'%/%H$K$*$$$FF1;~$K<B;\$9$k$3$H$,IQHK$K$"$j$^$9!#(B
  680.32 +  $B$3$N7A<0$G$N:n6H$G$O!"(B
  680.33 +  $B$"$k%j%]%8%H%j$K$*$1$k@.2L$r!"(B
  680.34 +  $BB>$N%j%]%8%H%j$KBP$7$FIQHK$K%^!<%8$9$kI,MW$,$"$j$^$9!#(B
  680.35 +
  680.36 +\end{itemize}
  680.37 +
  680.38 +$B%^!<%8$OI,MW$K1~$8$F<B;\$9$k$"$j$U$l$?:n6H$G$9$N$G!"(B
  680.39 +Mercurial $B$G$O4JC1$K9T$($k$h$&$K$J$C$F$$$^$9!#(B
  680.40 +$B$=$l$G$O!"%^!<%8<j=g$r8+$F9T$-$^$7$g$&!#(B
  680.41 +$B$b$&0lEY%j%]%8%H%j$NJ#@=$r9T$$!J$b$&2?EY$bJ#@=$7$^$7$?$h$M!)!K!"(B
  680.42 +$B$=$N%j%]%8%H%j$K$*$$$FJQ99$r9T$$$^$9!#(B
  680.43 +
  680.44 +\interaction{tour.merge.clone}
  680.45 +
  680.46 +$B$3$N;~E@$G!"(B
  680.47 +$BFbMF$N0[$J$k#2$D$N(B \filename{hello.c} $B$N%3%T!<$,B8:_$9$k$O$:$G$9!#(B
  680.48 +$B#2$D$N%j%]%8%H%j$NMzNr$O!"(B
  680.49 +$B?^(B~\ref{fig:tour-merge:sep-repos} $B$K<($9$h$&$K!"(B
  680.50 +$B;^J,$+$l$7$F$$$^$9!#(B
  680.51 +
  680.52 +\interaction{tour.merge.cat}
  680.53 +
  680.54 +\begin{figure}[ht]
  680.55 +  \centering
  680.56 +  \grafix{tour-merge-sep-repos}
  680.57 +  \caption{Divergent recent histories of the \dirname{my-hello} and
  680.58 +    \dirname{my-new-hello} repositories}
  680.59 +  \label{fig:tour-merge:sep-repos}
  680.60 +\end{figure}
  680.61 +
  680.62 +\hgcmd{pull} $B$r9T$C$F$b!"(B
  680.63 +$B:n6HNN0h%G%#%l%/%H%j$K$O1F6A$r5Z$\$5$J$$$3$H$O4{$K@bL@$7$?$H$*$j$G$9$N$G!"(B
  680.64 +\dirname{my-hello} $B$+$i(B \hgcmd{pull} $B$7$F$_$^$7$g$&!#(B
  680.65 +
  680.66 +\interaction{tour.merge.pull}
  680.67 +
  680.68 +$B:n6HNN0h%G%#%l%/%H%j$K$O1F6A$r5Z$\$7$F$$$^$;$s$,!"(B
  680.69 +\hgcmd{pull} $B%3%^%s%I$O(B ``heads'' $B$K$D$$$F2?$+7Y9p$7$F$$$^$9!#(B
  680.70 +
  680.71 +\subsection{Head changesets}
  680.72 +
  680.73 +``head'' $B$H$O!"(B
  680.74 +$B%j%]%8%H%jCf$K$*$$$F!"(B
  680.75 +$B;RB9!J$J$$$7;R6!!K$H$J$k%A%'%s%8%;%C%H$,B8:_$7$J$$%A%'%s%8%;%C%H$N$3$H$G$9!#(B
  680.76 +$B%j%]%8%H%j$K$*$1$k:G$b:G?7$N%j%S%8%g%s$O!"(B
  680.77 +$B0l@Z$N;R%A%'%s%8%;%C%H$r;}$A$^$;$s$+$i!"(B
  680.78 +$B=>$C$F(B tip $B%j%S%8%g%s$O(B head $B$H$J$j$^$9$,!"(B
  680.79 +$B#1$D$N%j%]%8%H%j$K$OJ#?t$N(B head $B$,B8:_$7$($^$9!#(B
  680.80 +
  680.81 +\begin{figure}[ht]
  680.82 +  \centering
  680.83 +  \grafix{tour-merge-pull}
  680.84 +  \caption{Repository contents after pulling from \dirname{my-hello} into
  680.85 +    \dirname{my-new-hello}}
  680.86 +  \label{fig:tour-merge:pull}
  680.87 +\end{figure}
  680.88 +
  680.89 +\dirname{my-hello} $B$+$i(B \dirname{my-new-hello} $B$X$N(B
  680.90 +\hgcmd{pull} $B$K$h$k1F6A$r!"(B
  680.91 +$B?^(B~\ref{fig:tour-merge:pull} $B$G8+$k$3$H$,$G$-$^$9!#(B
  680.92 +$B4{$K(B \dirname{my-new-hello} $B$KB8:_$7$F$$$?MzNr$K$O<j$,IU$1$i$l$F$$$^$;$s$,!"(B
  680.93 +$B?7$7$$%j%S%8%g%s$,DI2C$5$l$F$$$^$9!#(B
  680.94 +$B?^(B~\ref{fig:tour-merge:pull} $B$+$i$O!"(B
  680.95 +$B?7$7$$%j%]%8%H%j!J(B\dirname{my-new-hello}$B!K$K$*$$$F!"(B
  680.96 +\emph{$B%A%'%s%8%;%C%H<1JL;R(B}$B$OF1$8$^$^$G$b!"(B
  680.97 +\emph{$B%j%S%8%g%sHV9f(B}$B$,0[$J$kMM$,FI$_<h$l$^$9(B
  680.98 +$B!J$=$7$F!"?^$i$:$b!"%A%'%s%8%;%C%H$K$D$$$FOC$r$9$k:]$K!"(B
  680.99 +$B%j%S%8%g%sHV9f$r;HMQ$9$k$N$,NI$/$J$$!"$H$$$&9%Nc$K$J$C$F$$$^$9!K!#(B
 680.100 +\hgcmd{heads} $B%3%^%s%I$K$h$j!"(B
 680.101 +$B%j%]%8%H%j$N(B head $B$r8+$k$3$H$,$G$-$^$9!#(B
 680.102 +
 680.103 +\interaction{tour.merge.heads}
 680.104 +
 680.105 +\subsection{Performing the merge}
 680.106 +
 680.107 +$B:n6HNN0h%G%#%l%/%H%j$r!"(B
 680.108 +$B!J(B\dirname{my-hello} $B$+$i<h$j9~$s$@!K?7$?$J(B tip $B%j%S%8%g%s$K99?7$9$k$?$a$K!"(B
 680.109 +$B$$$D$b$N$h$&$K(B \hgcmd{update} $B%3%^%s%I$r<B9T$9$k$H!"(B
 680.110 +$B$I$&$J$k$G$7$g$&!)(B
 680.111 +
 680.112 +\interaction{tour.merge.update}
 680.113 +
 680.114 +Mercurial $B$+$i!"(B
 680.115 +\hgcmd{update} $B%3%^%s%I$G$O%^!<%8$,9T$o$l$J$$;]$,DLC#$5$l$^$9!#(B
 680.116 +$B%^!<%8$N<B;\$,I,MW$H;W$o$l$k>l9g!"(B
 680.117 +$B6/@)E*$J<B9T$r$7$J$$8B$j$O(B 
 680.118 +\hgcmd{update} $B%3%^%s%I$K$h$k:n6HNN0h%G%#%l%/%H%j$N99?7$O9T$o$l$^$;$s!#(B
 680.119 +\hgcmd{update} $B%3%^%s%I$NBe$o$j$K!"(B
 680.120 +\hgcmd{merge} $B%3%^%s%I$rMQ$$$F#2$D$N(B head $B$r%^!<%8$7$^$9!#(B
 680.121 +
 680.122 +\interaction{tour.merge.merge}
 680.123 +
 680.124 +\begin{figure}[ht]
 680.125 +  \centering
 680.126 +  \grafix{tour-merge-merge}
 680.127 +  \caption{Working directory and repository during merge, and
 680.128 +    following commit}
 680.129 +  \label{fig:tour-merge:merge}
 680.130 +\end{figure}
 680.131 +
 680.132 +\hgcmd{merge} $B%3%^%s%I$K$h$C$F!"(B
 680.133 +\hgcmd{parents} $B%3%^%s%I$N=PNO!"(B
 680.134 +$B$*$h$S(B \filename{hello.c} $B$NFbMF$NJQ99$H$$$&7A$G!"(B
 680.135 +\emph{$BN>J}(B}$B$N(B head $B$NJQ99FbMF$,:n6HNN0h%G%#%l%/%H%j$KH?1G$5$l$^$9!#(B
 680.136 +
 680.137 +\interaction{tour.merge.parents}
 680.138 +
 680.139 +\subsection{Committing the results of the merge}
 680.140 +
 680.141 +$B7k2L$r(B \hgcmd{commit} $B$9$k$^$G$O!"(B
 680.142 +\hgcmd{parents} $B$O%^!<%8$N:]$K$O>o$K#2$D$N?F!J%A%'%s%8%;%C%H!K$rI=<($7$^$9!#(B
 680.143 +
 680.144 +\interaction{tour.merge.commit}
 680.145 +
 680.146 +$B$3$l$G!"?7$7$$(B tip $B%j%S%8%g%s$,:n@.$5$l$^$7$?!#(B
 680.147 +$B@h=R$7$?#2$D$N(B head $B$N(B\emph{$BN>J}(B}$B$r?F$K;}$DE@$KCm0U$7$F$/$@$5$$!#(B
 680.148 +$B$3$l$i$O!"@h$K(B \hgcmd{parents} $B$GI=<($7$?%j%S%8%g%s$H0lCW$7$^$9!#(B
 680.149 +
 680.150 +\interaction{tour.merge.tip}
 680.151 +
 680.152 +$B:n6HNN0h%G%#%l%/%H%j$,%^!<%8$N:]$K$I$N$h$&$K$J$C$F$$$k$N$+!"(B
 680.153 +$B$=$7$F%3%_%C%H$K$h$C$F$I$N$h$&$K%j%]%8%H%j$K:nMQ$9$k$N$+$r!"(B
 680.154 +$B?^(B~\ref{fig:tour-merge:merge} $B$+$iFI$_<h$k$3$H$,$G$-$^$9!#(B
 680.155 +$B%^!<%8$N:]$K:n6HNN0h%G%#%l%/%H%j$N?F$G$"$C$?#2$D$N%A%'%s%8%;%C%H$O!"(B
 680.156 +$B%3%_%C%H$N:]$K$O?7$?$J%A%'%s%8%;%C%H$K$H$C$F$N?F%A%'%s%8%;%C%H$H$J$j$^$9!#(B
 680.157 +
 680.158 +\section{Merging conflicting changes}
 680.159 +
 680.160 +$BKX$I$N%^!<%8:n6H$O4JC1$K:Q$_$^$9$,!"(B
 680.161 +$B;~$K$O%^!<%8BP>]$N%A%'%s%8%;%C%HF1;N$,!"(B
 680.162 +$BF1$8%U%!%$%k$NF1$8It0L$rJQ99$7$F$$$k>l9g$,$"$j$^$9!#(B
 680.163 +$BN><T$NJQ99FbMF$,F10l$GL5$1$l$P!"(B
 680.164 +$B%^!<%8$O(B\emph{$B>WFM(B}$B!J(Bconflict$B!K$r@8$8$k$?$a!"(B
 680.165 +$BN><T$N0[$J$kJQ99FbMF$rN>N)$5$;$F(B
 680.166 +$B2?$i$+$N0l4S@-$N<h$l$?>uBV$K$9$k$?$a$N7hCG$,I,MW$G$9!#(B
 680.167 +
 680.168 +\begin{figure}[ht]
 680.169 +  \centering
 680.170 +  \grafix{tour-merge-conflict}
 680.171 +  \caption{Conflicting changes to a document}
 680.172 +  \label{fig:tour-merge:conflict}
 680.173 +\end{figure}
 680.174 +
 680.175 +$BJ8=q$KBP$9$k#2$D$NJQ99$N>WFM$NNc$r!"(B
 680.176 +$B?^(B~\ref{fig:tour-merge:conflict} $B$,?^<($7$F$$$^$9!#(B
 680.177 +$BN><T$O%U%!%$%k$NF1$8HG$r85$K$7$F$$$^$9$,!"(B
 680.178 +$B0lJ}$,JQ99$r9T$&K5$i!"(B
 680.179 +$BB>J}$,F1$8CJMn$KBP$7$F0[$J$kJQ99$r$7$F$7$^$$$^$9!#(B
 680.180 +$BJQ99$N>WFM$r2r>C$9$k:n6H$H$O!"(B
 680.181 +$B$=$N%U%!%$%k$,$I$N$h$&$K$J$C$F$$$k$Y$-$+$r7hDj$9$k$3$H$KB>$J$j$^$;$s!#(B
 680.182 +
 680.183 +Mercurial $B$K$O>WFM$r07$&5!G=$,AH$_9~$^$l$F$$$^$;$s!#(B
 680.184 +$B$=$NBe$o$j$K!"(B
 680.185 +\command{hgmerge} $B$H8F$P$l$k30It%W%m%0%i%`$r<B9T$7$^$9!#(B
 680.186 +$B$3$N%W%m%0%i%`$O!"(B
 680.187 +Mercurial $B$KE:IU$5$l$k%7%'%k%9%/%j%W%H(B\footnote{$BLuCm(B:
 680.188 +\command{/bin/sh} $B8~$1$@$+$i!"$H$$$&$3$H$J$N$G$7$g$&$,!"(B
 680.189 +Windows $B$N%P%$%J%jHG$K$OE:IU$5$l$F$$$^$;$s!#(B}$B$G$9$,!"(B
 680.190 +$BJL$J%W%m%0%i%`$r5/F0$5$;$k$3$H$b$G$-$^$9!#(B
 680.191 +\command{hgmerge} $B$N4pDlF0:n$G$O!"(B
 680.192 +$B4v$D$+$NCxL>$J%^!<%8%D!<%k$N$&$A!"(B
 680.193 +$B2TF/4D6-$K$*$$$F%$%s%9%H!<%k$5$l$F$$$k$H;W$o$l$k$b$N$rC5$7$^$9!#(B
 680.194 +$B$^$:;O$a$K!"(B
 680.195 +$BHsBPOCE*%^!<%8%D!<%k(B\footnote{$BLuCm(B:
 680.196 +\command{diff3} $B$d(B \command{merge} $B$J$I(B}$B$r<B9T$7$F$_$^$9$,!"(B
 680.197 +$B!J?M<j$K$h$C$F2r7h$9$kI,MW@-$,$"$k$?$a$K!K$=$l$,<:GT$7$?>l9g$d!"(B
 680.198 +$B$=$b$=$b$=$l$i$N%D!<%k$,Ds6!$5$l$F$$$J$$>l9g!"(B
 680.199 +$BB>$N%0%i%U%#%+%k$J%^!<%8%D!<%k$N5/F0$r;n$_$^$9(B
 680.200 +\footnote{$BLuCm(B: $BNc$($P!"(B
 680.201 +\command{diff3} $B$K$h$k%^!<%8$r9T$$!"(B
 680.202 +$B>WFM$,8!=P$5$l$?>l9g$O$=$N%U%!%$%k$4$H$K!"(B
 680.203 +\envar{EDITOR} $B4D6-JQ?t$GDj5A$5$l$k%(%G%#%?!J$J$$$7(B \command{vi}$B!K(B
 680.204 +$B$r5/F0$7$F!"(B
 680.205 +$B$=$l$>$l$N%A%'%s%8%;%C%H$KM3Mh$9$kJQ99$N4V$G$ND4Dd$rMW5a$7$F$-$^$9!#(B
 680.206 +}$B!#(B
 680.207 +
 680.208 +\envar{HGMERGE} 
 680.209 +$B4D6-JQ?t$K5/F0BP>]%W%m%0%i%`$J$$$7%9%/%j%W%HL>$r@_Dj$9$k$3$H$G!"(B
 680.210 +Mercurial $B$K(B \command{hgmerge} $B0J30$r5/F0$5$;$k;v$b$G$-$^$9(B
 680.211 +
 680.212 +\subsection{Using a graphical merge tool}
 680.213 +
 680.214 +$BCx<T$N$*A&$a$N%0%i%U%#%+%k$J%^!<%8%D!<%k$O(B \command{kdiff3} $B$J$N$G!"(B
 680.215 +$B%0%i%U%#%+%k$J%U%!%$%k%^!<%8%D!<%k$K5a$a$i$l$k5!G=$K$D$$$F!"(B
 680.216 +$B$3$l$rBj:`$K@bL@$7$h$&$H;W$$$^$9!#(B
 680.217 +$B:n6HCf$N2hLL%$%a!<%8$,?^(B~\ref{fig:tour-merge:kdiff3}$B$K$"$j$^$9!#(B
 680.218 +$BCeL\$7$F$$$k#1$D$N%U%!%$%k$KBP$7$F!"(B
 680.219 +$B#3$D$N0[$J$k%j%S%8%g%s$,B8:_$9$k$3$H$+$i!"(B
 680.220 +$B%^!<%8J}K!$O(B\emph{$B#3J}8~%^!<%8(B}$B!J(Bthree-way merge$B!K$H8F$P$l$F$$$^$9!#(B
 680.221 +$B$=$l$f$(!"%^!<%8%D!<%k$O%&%#%s%I%&>eIt$r#3$D$N6h2h$KJ,3d$7$F$$$^$9!#(B
 680.222 +
 680.223 +\begin{itemize}
 680.224 +\item $B:8C<$KI=<($5$l$F$$$k$N$O!"(B
 680.225 +  $B%U%!%$%k$N(B\emph{$B85(B}$B!J(Bbase$B!K$NHG!"(B
 680.226 +  $B$D$^$j%^!<%8BP>]$H$7$F$$$k#2$D$NHG$K$H$C$F!"(B
 680.227 +  $B:G$b?7$7$$J,4t85$H$J$C$F$$$kHG$G$9!#(B
 680.228 +
 680.229 +\item $BCf1{$KI=<($5$l$F$$$k$N$O!"(B
 680.230 +  $B%^!<%8(B``$B@h(B''$B$NHG(B\footnote{$BLuCm(B: $B86J8$G$O!V(B``our'' version$B!W(B}$B$G$9$N$G!"(B
 680.231 +  $B:n6HNN0h%G%#%l%/%H%j$K$*$1$kJQ99FbMF$,I=<($5$l$^$9!#(B
 680.232 +
 680.233 +\item $B1&C<$KI=<($5$l$F$$$k$N$O!"(B
 680.234 +  $B%^!<%8(B``$B85(B''\footnote{$BLuCm(B: $B86J8$G$O!V(B``their'' version$B!W(B}$B$G$9$N$G!"(B
 680.235 +  $B%^!<%8$7$h$&$H$7$F$$$k%A%'%s%8%;%C%H$KM3Mh$9$kFbMF$,I=<($5$l$^$9!#(B
 680.236 +
 680.237 +\end{itemize}
 680.238 +
 680.239 +$B$3$l$i$N6h2h$N2<J}$KI=<($5$l$F$$$k$N$O!"(B
 680.240 +$B8=;~E@$G$N%^!<%8(B\emph{$B7k2L(B}$B$G$9!#(B
 680.241 +$B%^!<%8$K$*$1$k:n6H$H$O!"(B
 680.242 +$B2hLL>e$K@V;z$GI=<($5$l$?(B\footnote{$BLuCm(B:
 680.243 +\command{diff3} $B$,9TC10L$G$N>WFMI=<($G$"$k$N$KHf$Y$F!"(B
 680.244 +GUI $B$G$"$kMxE@$,@8$-$F$$$^$9!#(B}$B!"(B
 680.245 +$B?5=E$J%U%!%$%k$N%^!<%8$,I,MW$H$5$l$kL$2r7h$N>WFM$r!"(B
 680.246 +$BBEEv$JFbMF$GCV$-49$($k$3$H$G$9!#(B
 680.247 +
 680.248 +$B$3$l$i#4$D$N6h2h$O(B\emph{$B8_$$$K8GDj(B}$B$5$l$F$$$k$N$G!"(B
 680.249 +$B$$$:$l$+$N6h2h$r%9%/%m!<%k$5$;$?>l9g$K$O!"(B
 680.250 +$BB>$N6h2h$bAj1~$N>l=j$rI=<($9$k$h$&$K99?7$5$l$^$9!#(B
 680.251 +
 680.252 +\begin{figure}[ht]
 680.253 +  \centering
 680.254 +  \grafixL{kdiff3}
 680.255 +  \label{fig:tour-merge:kdiff3}
 680.256 +  \caption{Using \command{kdiff3} to merge versions of a file}
 680.257 +\end{figure}
 680.258 +
 680.259 +$B%U%!%$%kCf$N8D!9$N>WFM2U=j$K$*$$$F!"(B
 680.260 +$B>WFM$r2r>C$9$k$?$a$K!"(B
 680.261 +$B85HG!?%^!<%8@hHG!?%^!<%885HG$N%F%-%9%H$r(B
 680.262 +$B!J$=$l$i$NAH$_9g$o$;$b4^$a$F!KG$0U$KA*Br$9$k$3$H$,$G$-$^$9!#(B
 680.263 +$B$^$?!"99$J$kJQ99$r9T$&$?$a$K!"(B
 680.264 +$B%^!<%87k2L$rD>@\<j$GF~NO$9$k$3$H$b$G$-$^$9!#(B
 680.265 +
 680.266 +$B$3$3$G>R2p$7@Z$l$J$$$[$I(B\emph{$BB?$/$N(B}$B%U%!%$%k%^!<%8%D!<%k$,B8:_$7$^$9!#(B
 680.267 +$B$3$l$i$O$=$l$>$l!"2TF02DG=%W%i%C%H%[!<%`$d!"(B
 680.268 +$BFCD'E*$JF@<jITF@<j$J$I$NE@$G0[$J$j$^$9!#(B
 680.269 +$BKX$I$N%D!<%k$O%F%-%9%H%U%!%$%k$N%^!<%8$KFC2=$7$F$$$^$9$,!"(B
 680.270 +$BCf$K$OFCDj$N%U%!%$%k%U%)!<%^%C%H!J0lHL$K$O(B XML$B!K(B
 680.271 +$B$KFC2=$7$?$b$N$b$"$j$^$9!#(B
 680.272 +
 680.273 +\subsection{A worked example}
 680.274 +
 680.275 +$BK\@a$G$NNc$G$O!"(B
 680.276 +$BA0=R$N?^(B~\ref{fig:tour-merge:conflict} 
 680.277 +$B$K$*$1$k%U%!%$%k99?7$NMzNr$r:F8=$7$^$9!#(B
 680.278 +$B85$H$J$kHG$N%U%!%$%k$r3JG<$7$?%j%]%8%H%j$r:n@.$9$k$3$H$+$i;O$a$^$7$g$&(B
 680.279 +\footnote{$BLuCm(B: $B<B9TNc$G$O!"(B
 680.280 +$B?75,$N%j%]%8%H%j$G$"$k(B \dirname{scam} $B$N(B \hgcmd{init} $B$,H4$1$F$$$^$9!#(B}$B!#(B
 680.281 +
 680.282 +\interaction{tour-merge-conflict.wife}
 680.283 +
 680.284 +$B<!$K!"%j%]%8%H%j$rJ#@=$7!"%U%!%$%k$rJQ99$7$^$9!#(B
 680.285 +
 680.286 +\interaction{tour-merge-conflict.cousin}
 680.287 +
 680.288 +$B$b$&0l$D%j%]%8%H%j$rJ#@=$7!"(B
 680.289 +$BB>$NMxMQ<T$K$h$k%U%!%$%k$X$NJQ99$rLO5<E*$K:F8=$7$^$9(B
 680.290 +$B!J$3$NLO5<E*$J<B9T$O!"(B
 680.291 +$B%?%9%/$4$H$K3VN%$7$?%j%]%8%H%j$N4V$G$N%^!<%8$I$3$m$+!"(B
 680.292 +$B$=$l$i$N%^!<%8$N:]$N>WFM$r2r>C$9$k$3$H$G$9$i!"(B
 680.293 +$B7h$7$FDA$7$$$3$H$G$O$J$$!"(B
 680.294 +$B$H$$$&$3$H$r0E<($7$F$$$^$9!K!#(B
 680.295 +
 680.296 +\interaction{tour-merge-conflict.son}
 680.297 +
 680.298 +$BF10l%U%!%$%k$K#2$D$N0[$J$kHG$,$G$-$?$N$G!"(B
 680.299 +$B%^!<%8<B;\$N4D6-$,@0$$$^$7$?!#(B
 680.300 +
 680.301 +\interaction{tour-merge-conflict.pull}
 680.302 +
 680.303 +$B%^!<%8$K$*$1$kBPOCE*$J=hM}$NItJ,$,!"(B
 680.304 +$BK\=q$K$*$1$k<B9TNc$N<+F0<B9T5!9=(B~ref{sec:automated-example-running
 680.305 +}$B$rB;$M$k$?$a!"(B
 680.306 +$B$3$NNc$G$O(B Mercurial $B$N(B \command{hgmerge} $B$r;HMQ$7$^$;$s!#(B
 680.307 +$B$=$NBe$o$j$K!"(B
 680.308 +\envar{HGMERGE} $B$r@_Dj$9$k$3$H$G!"(B
 680.309 +Mercurial $B$KHsBPOCE*$J(B \command{merge} $B%3%^%s%I$r<B9T$5$;$^$9!#(B
 680.310 +$B$3$N%3%^%s%I$OB?$/$N(B Unix $BE*$J%7%9%F%`$KF1:-$5$l$F$$$^$9!#(B
 680.311 +$B0J2<$NNc$r<B:]$K;n$9:]$K$O!"(B
 680.312 +\envar{HGMERGE} $B$r$o$6$o$6@_Dj$9$kI,MW$O$"$j$^$;$s!#(B
 680.313 +
 680.314 +\interaction{tour-merge-conflict.merge}
 680.315 +
 680.316 +\command{merge} $B%3%^%s%I$O>WFM$r2r>C$;$:$K!"(B
 680.317 +$B$I$N9T$K$*$1$kJQ99$,>WFM$7$F$$$F!"(B
 680.318 +$B$=$NJQ99$,$I$N%A%'%s%8%;%C%H$KM3Mh$9$k$N$+$r<($9(B\emph{$B%^!<%8%^!<%/(B}$B$r!"(B
 680.319 +$B>WFM$,8!=P$5$l$?%U%!%$%k$K=q$-9~$_$^$9!#(B
 680.320 +
 680.321 +Mercurial $B$O!"(B
 680.322 +\command{merge} $B$N=*N;%3!<%I$,%^!<%8=hM}(B\footnote{$BLuCm(B:
 680.323 +$B$h$j@53N$K$O!V%^!<%8$K$*$1$k>WFM$N2r>C!W(B}$B<:GT$r<($9>l9g!"(B
 680.324 +$B%^!<%8=hM}$r:F<B9T$9$k<j=g$rI=<($7$^$9!#(B
 680.325 +$B$3$3$GDs<($5$l$k<j=g$O!"(B
 680.326 +$B%^!<%8:n6H$NESCf$G:.Mp$7$F$7$^$C$?$j!"(B
 680.327 +$B4V0c$C$F$7$^$C$?$3$H$K5$IU$$$F!"(B
 680.328 +$B%0%i%U%#%+%k$J%^!<%8%D!<%k$rCfES=*N;$5$;$?>l9g$J$I$KLrN)$A$^$9!#(B
 680.329 +
 680.330 +$B<+F0$J$$$7<jF0$N%^!<%8$,<:GT$7$?>l9g$G$"$C$F$b!"(B
 680.331 +$B4XO"$NM-$k%U%!%$%k$rD>@\(B``$B=$@5(B''$B$7$?>e$G!"(B
 680.332 +$B%^!<%87k2L$r%3%_%C%H$9$k$3$H$b2DG=$G$9!#(B
 680.333 +
 680.334 +\interaction{tour-merge-conflict.commit}
 680.335 +
 680.336 +\section{Simplifying the pull-merge-commit sequence}
 680.337 +\label{sec:tour-merge:fetch}
 680.338 +
 680.339 +$B$3$3$^$G$K=R$Y$F$-$?JQ99%^!<%8$N<j=g$OC1=c$J$b$N$G$9$,!"(B
 680.340 +$B#3$D$N%3%^%s%I$r=g$K<B9T$9$kI,MW$,$"$j$^$9!#(B
 680.341 +
 680.342 +\begin{codesample2}
 680.343 +  hg pull
 680.344 +  hg merge
 680.345 +  hg commit -m 'Merged remote changes'
 680.346 +\end{codesample2}
 680.347 +
 680.348 +$B:G8e$N%3%_%C%H$N:]$K$O!"(B
 680.349 +$BDL>o$OLLGr$/$bL5$$(B``$B7h$^$j$-$C$?(B''$BFbMF$K$J$i$6$k$rF@$^$;$s$,!"(B
 680.350 +$B%3%_%C%H%a%C%;!<%8$rF~NO$9$kI,MW$,$"$j$^$9!#(B
 680.351 +
 680.352 +$B2DG=$G$"$l$P!"I,MW$H$5$l$k<j=g$rDc8:$5$;$?$$$b$N$G$9!#(B
 680.353 +$B<B:]$K(B Mercurial $B$O!"$3$l$r2DG=$H$9$k(B \hgext{fetch} 
 680.354 +$B$H8F$P$l$k%$%/%9%F%s%7%g%s$,F1:-$5$l$F$$$^$9!#(B
 680.355 +
 680.356 +Mercurial $B$O!"(B
 680.357 +$B<h$j07$$$NMxJX@->e$+$iCf3K5!G=$r>.$5$/4J7i$KJ]$D0lJ}$G!"(B
 680.358 +$B5!G=DI2C$r2DG=$K$9$k$?$a$N=@Fp$J3HD%!J%$%/%9%F%s%7%g%s!K5!9=$rDs6!$7$F$$$^$9!#(B
 680.359 +$B%3%^%s%I%i%$%s$+$iMxMQ$G$-$k(B 
 680.360 +Mercurial $B%3%^%s%I$rDI2C$9$k%$%/%9%F%s%7%g%s$b$"$l$P!"(B
 680.361 +$BNc$($P%5!<%P5!G=$r3HD%$9$k$h$&$J!"(B
 680.362 +``$BIqBfN"(B''$B$G5!G=$9$k%$%/%9%F%s%7%g%s$b$"$j$^$9!#(B
 680.363 +
 680.364 +\hgext{fetch} $B%$%/%9%F%s%7%g%s$O!"(B
 680.365 +$BM=A[$7$?$3$H$H$O;W$$$^$9$,!"(B
 680.366 +\hgcmd{fetch} $B$H8F$P$l$k?7$7$$%3%^%s%I$rDI2C$7$^$9!#(B
 680.367 +\hgcmd{fetch} $B%3%^%s%I$O!"(B
 680.368 +\hgcmd{pull}$B!?(B\hgcmd{update}$B!?(B\hgcmd{merge}$B!?(B\hgcmd{commit}
 680.369 +$B$NAH$_9g$o$;$N$h$&$K?6Iq$$$^$9!#(B
 680.370 +$B$^$:$OB>$N%j%]%8%H%j$+$i:n6HCf$N%j%]%8%H%j$XJQ99$r<h$j9~$_$^$9!#(B
 680.371 +$B<h$j9~$s$@%A%'%s%8%;%C%H$K$h$k?7$?$J(B head $B$NDI2C$,8!CN(B\footnote{$BLuCm(B:
 680.372 +$BB>$N%j%]%8%H%j$+$i$N<h$j9~$_$K$h$j!"(B
 680.373 +$B#3$D0J>e$N(B head $B$,%j%]%8%H%j$KB8:_$9$k$h$&$K$J$C$?>l9g$O!"(B
 680.374 +$B%^!<%8BP>]$NFCDj$,$G$-$J$$$?$a!"(B
 680.375 +$B<h$j9~$_$N$_$G=hM}$rCfCG$7$^$9!#(B}$B$5$l$?>l9g!"(B
 680.376 +$B%^!<%8$r3+;O$7!"(B
 680.377 +$B<+F0E*$K@8@.$5$l$?%3%_%C%H%a%C%;!<%8$r;H$C$F%3%_%C%H$r9T$$$^$9!#(B
 680.378 +$B?7$?$J(B head $B$NDI2C$,L5$+$C$?>l9g!"(B
 680.379 +\hgcmd{fetch} $B%3%^%s%I$O:n6HNN0h%G%#%l%/%H%j$r(B
 680.380 +tip $B%j%S%8%g%s$G99?7$7$^$9!#(B
 680.381 +
 680.382 +\hgext{fetch} $B%$%/%9%F%s%7%g%s$O4JC1$KM-8z2=$G$-$^$9!#(B
 680.383 +\sfilename{.hgrc} $B%U%!%$%k$rJT=8$7!"(B
 680.384 +\rcsection{extensions} $B%;%/%7%g%s(B
 680.385 +$B!JL5$$>l9g$O:n@.$7$F$/$@$5$$!K$K0\F0$7!"(B
 680.386 +``\Verb+fetch +'' $B$G;O$^$k9T$rDI2C$7$^$9!#(B
 680.387 +
 680.388 +\begin{codesample2}
 680.389 +  [extensions]
 680.390 +  fetch =
 680.391 +\end{codesample2}
 680.392 +
 680.393 +$B!JDL>o$O!"(B
 680.394 +``\texttt{=}'' $B$N1&JU$K%$%/%9%F%s%7%g%s$N0LCV$r;XDj$7$^$9$,!"(B
 680.395 +\hgext{fetch} $B%$%/%9%F%s%7%g%s$OI8=`$NG[I[J*$KF1:-$5$l$F$$$k$N$G!"(B
 680.396 +Mercurial $B$O(B \hgext{fetch} $B$rC5$7=P$9$3$H$,$G$-$^$9!K(B
 680.397 +
 680.398 +%%% Local Variables: 
 680.399 +%%% mode: latex
 680.400 +%%% TeX-master: "00book"
 680.401 +%%% End: 
   681.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   681.2 +++ b/ja/undo-manual-merge.dot	Sun Aug 16 03:41:39 2009 +0200
   681.3 @@ -0,0 +1,8 @@
   681.4 +digraph undo_manual {
   681.5 +	"first change" -> "second change";
   681.6 +	"second change" -> "third change";
   681.7 +	backout [label="back out\nsecond change", shape=box];
   681.8 +	"second change" -> backout;
   681.9 +	"third change" -> "manual\nmerge";
  681.10 +	backout -> "manual\nmerge";
  681.11 +}
   682.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   682.2 +++ b/ja/undo-manual.dot	Sun Aug 16 03:41:39 2009 +0200
   682.3 @@ -0,0 +1,6 @@
   682.4 +digraph undo_manual {
   682.5 +	"first change" -> "second change";
   682.6 +	"second change" -> "third change";
   682.7 +	backout [label="back out\nsecond change", shape=box];
   682.8 +	"second change" -> backout;
   682.9 +}
   683.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   683.2 +++ b/ja/undo-non-tip.dot	Sun Aug 16 03:41:39 2009 +0200
   683.3 @@ -0,0 +1,9 @@
   683.4 +digraph undo_non_tip {
   683.5 +	"first change" -> "second change";
   683.6 +	"second change" -> "third change";
   683.7 +	backout [label="back out\nsecond change", shape=box];
   683.8 +	"second change" -> backout;
   683.9 +	merge [label="automated\nmerge", shape=box];
  683.10 +	"third change" -> merge;
  683.11 +	backout -> merge;
  683.12 +}
   684.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   684.2 +++ b/ja/undo-simple.dot	Sun Aug 16 03:41:39 2009 +0200
   684.3 @@ -0,0 +1,4 @@
   684.4 +digraph undo_simple {
   684.5 +	"first change" -> "second change";
   684.6 +	"second change" -> "back out\nsecond change";
   684.7 +}
   685.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   685.2 +++ b/ja/undo.tex	Sun Aug 16 03:41:39 2009 +0200
   685.3 @@ -0,0 +1,1051 @@
   685.4 +\chapter{Finding and fixing your mistakes}
   685.5 +\label{chap:undo}
   685.6 +
   685.7 +$B?M$O4V0c$($k$b$N$G$9$,!"$=$N7k2L$r$h$j>e<j$K07$C$F$3$=!"(B
   685.8 +$BM%$l$?9=@.4IM}%7%9%F%`$H8@$($^$9!#(B
   685.9 +$B$3$N>O$G$O!"(B
  685.10 +$B%W%m%8%'%/%H$KG&$S9~$s$@LdBj$rH/8+$7$?:]$K!"(B
  685.11 +$B;H$($k<jK!$K$D$$$F@bL@$7$^$9!#(B
  685.12 +Mercurial $B$O!"(B
  685.13 +$BLdBj$N85$r3VN%$7E,@Z$K=hM}$9$k$?$a$NM%$l$?5!G=$r;}$C$F$$$^$9!#(B
  685.14 +
  685.15 +\section{Erasing local history}
  685.16 +
  685.17 +\subsection{The accidental commit}
  685.18 +
  685.19 +$BI.<T$O!";~$H$7$F9M$($k$h$j$b@h$KF~NO$7$F$7$^$&!"(B
  685.20 +$B$H$$$&:,?<$$LdBj$rJz$($F$$$k$?$a!"(B
  685.21 +$BIT40A4$G$"$C$?$j!"(B
  685.22 +$BC1=c$K4V0c$C$?FbMF$N%A%'%s%8%;%C%H$r%3%_%C%H$7$F$7$^$&$3$H$,$"$j$^$9!#(B
  685.23 +$BI.<T$N>l9g!"(B
  685.24 +$BIT40A4$J%A%'%s%8%;%C%H$r%3%_%C%H$7$F$7$^$&$N$O!"(B
  685.25 +$B?7$7$$%=!<%9%U%!%$%k$r:n@.$7$?$N$K(B
  685.26 +\hgcmd{add} $B$N<B9T$rK:$l$F$$$k>l9g$,KX$I$G$9!#(B
  685.27 +``$BC1=c$K4V0c$C$F$$$k(B''$B%A%'%s%8%;%C%H$r%3%_%C%H$7$F$7$^$&%1!<%9$K$O!"(B
  685.28 +$BFC$K6&DLE@$O$"$j$^$;$s$,!"(Bbut $BHs>o$KLBOG(B(no less annoying) XXXXX$B!#(B
  685.29 +
  685.30 +\subsection{Rolling back a transaction}
  685.31 +\label{sec:undo:rollback}
  685.32 +
  685.33 +Mercurial $B$,!"(B
  685.34 +$B%j%]%8%H%j$X$N8D!9$NJQ99$r(B\emph{$B%H%i%s%6%/%7%g%s(B}$B$H$7$F07$C$F$$$k$3$H$r(B
  685.35 +\ref{sec:concepts:txn} $B@a$G=R$Y$^$7$?!#(B
  685.36 +$B%A%'%s%8%;%C%H$r%3%_%C%H$7$?$j!"(B
  685.37 +$BB>$N%j%]%8%H%j$+$iJQ99$r(B pull $B$9$k:]$K!"(B
  685.38 +Mercurial $B$O>o$K=hM}$7$?$3$H$r5-O?$7$F$$$^$9!#(B
  685.39 +\hgcmd{rollback} $B%3%^%s%I$r;HMQ$9$k$3$H$G!"(B
  685.40 +$B$-$C$A$j0l2sJ,$N=hM}$r85$KLa$9!"(B
  685.41 +$BJL$J8@$$J}$r$9$k$J$i!"(B\emph{$B4,$-La$9(B}$B$3$H$,$G$-$^$9(B
  685.42 +$B!J$3$N%3%^%s%I$r;HMQ$9$k:]$N=EMW$JCm0U$,=R$Y$i$l$F$$$^$9$N$G!"(B
  685.43 +\ref{sec:undo:rollback-after-push} $B@a$r;2>H$7$F$/$@$5$$!K!#(B
  685.44 +
  685.45 +$B?7$7$/%U%!%$%k$r:n@.$7$?$N$K!"(B
  685.46 +$B$=$N%U%!%$%k$KBP$7$F(B \hgcmd{add} 
  685.47 +$B%3%^%s%I$r<B9T$9$k$N$rK:$l$F%3%_%C%H$7$F$7$^$&!"(B
  685.48 +$B$H$$$&I.<T$N$h$/$d$k4V0c$$$O!"0J2<$N$h$&$J$b$N$G$9!#(B
  685.49 +
  685.50 +\interaction{rollback.commit}
  685.51 +
  685.52 +$B%3%_%C%H8e$N(B \hgcmd{status} $B=PNO$r8+$l$P!"(B
  685.53 +$B$9$0$5$^4V0c$$$r3N>Z$G$-$^$9!#(B
  685.54 +
  685.55 +\interaction{rollback.status}
  685.56 +
  685.57 +$B@h$N%3%_%C%H$O!"(B
  685.58 +\filename{a} $B$NJQ99$OB*$($F$$$^$9$,!"(B
  685.59 +$B?75,$N%U%!%$%k(B \filename{b} $B$OGD0.$7$F$$$^$;$s!#(B
  685.60 +$BF1N=$H6&M-$7$F$$$k%j%]%8%H%j$K!"(B
  685.61 +$B$3$N%A%'%s%8%;%C%H$rH?1G$7$F$7$^$C$?$i!"(B
  685.62 +$BF1N=$,$3$N%A%'%s%8%;%C%H$r<h$j9~$s$@:]$K!"(B
  685.63 +\filename{a} $BCf$N2?$+$,!"(B
  685.64 +$BF1N=$N%j%]%8%H%j$K$OB8:_$7$J$$(B \filename{b} $B$r;2>H$7$F$7$^$$$^$9!#(B
  685.65 +$B$=$&$J$l$P!";d$OF1N=$NJ0$j$NBP>]$K$J$C$F$7$^$&$G$7$g$&!#(B
  685.66 +
  685.67 +$B$7$+$7!"9,$$$J$3$H$K!"(B
  685.68 +$B%A%'%s%8%;%C%H$r6&M-%j%]%8%H%j$X$HH?1G$9$kA0$K!"(B
  685.69 +$B<+J,$N4V0c$$$r8+$D$1$F$$$^$9!#(B
  685.70 +\hgcmd{rollback} $B%3%^%s%I$r;H$&$3$H$G!"(B
  685.71 +Mercurial $B$O:G8e$N%A%'%s%8%;%C%H$r>C$7$F$/$l$^$9!#(B
  685.72 +
  685.73 +\interaction{rollback.rollback}
  685.74 +
  685.75 +$B%j%]%8%H%j$NMzNr>e!":GAa:GA0$N%A%'%s%8%;%C%H$OB8:_$7$^$;$s$N$G!"(B
  685.76 +$B:n6HNN0h%G%#%l%/%H%j$O!"(B
  685.77 +$B:F$S(B \filename{a} $B%U%!%$%k$,JQ99$5$l$F$$$k>uBV$@$H$_$J$5$l$^$9!#(B
  685.78 +$B%3%_%C%H8e$N%m!<%k%P%C%/$O!"(B
  685.79 +$B:n6HNN0h%G%#%l%/%H%j$r%3%_%C%HA0$N>uBV$=$N$^$^$KLa$7!"(B
  685.80 +$B%A%'%s%8%;%C%H$O40A4$K>C5n$5$l$^$9!#(B
  685.81 +$B$=$&$J$C$?$J$i!"(B
  685.82 +$B0BA4$K(B \filename{b} $B%U%!%$%k$r(B \hgcmd{add} $B$7!"(B
  685.83 +$B:FEY%3%_%C%H$9$k$3$H$,$G$-$^$9!#(B
  685.84 +
  685.85 +\interaction{rollback.add}
  685.86 +
  685.87 +\subsection{The erroneous pull}
  685.88 +
  685.89 +$B#1$D$N(B $B%W%m%8%'%/%H$G!"(B
  685.90 +$BJL!9$K3+H/$N?J$s$G$$$k%V%i%s%A$r(B Mercurial $B$GJ]<i$9$k>l9g!"(B
  685.91 +$B$=$l$>$l0[$J$k%j%]%8%H%j$GJ]<i$9$k$3$H$,0lHLE*$J47=,$H$J$C$F$$$^$9!#(B
  685.92 +$B3+H/%A!<%`$O!"(B
  685.93 +$B%W%m%8%'%/%H$N(B ``0.9'' $B%j%j!<%9MQ$K6&M-%j%]%8%H%j$r;}$D0lJ}$G!"(B
  685.94 +$B0[$J$kJQ99MzNr$r;}$D(B ``1.0'' $B%j%j!<%9MQ$N%j%]%8%H%j$rJLES;}$D$+$b$7$l$^$;$s!#(B
  685.95 +
  685.96 +$B$3$N>l9g!"(B
  685.97 +$B%m!<%+%k$J(B ``0.9'' $B%j%]%8%H%j$,$"$C$F!"(B
  685.98 +$B$=$3$K6vA3(B ``1.0'' $BMQ6&M-%j%]%8%H%j$N@.2L$r<h$j9~$s$@>l9g!"(B
  685.99 +$BLLE]$J;vBV$K$J$k$3$H$,A[A|$G$-$^$9!#(B
 685.100 +$B:G0-$N>l9g!"(B
 685.101 +$B==J,$JCm0U$rJ'$o$J$$$?$a$K!"(B
 685.102 +``1.0'' $B$N%j%]%8%H%j$+$i<h$j9~$s$@JQ99$r(B
 685.103 +``0.9'' $B$N6&MQ%j%]%8%H%j$X$HH?1G$7$F$7$^$C$?(B
 685.104 +$B%A!<%`A4BN$r:.Mp$5$;$F$7$^$&$G$7$g$&(B
 685.105 +$B!J$3$N62$m$7$$%1!<%9$K4X$7$F$O!"(B
 685.106 +$B8e$[$I2r7hJ}K!$r<($7$^$9$N$G8f0B?4$r!#!K!#(B
 685.107 +$B$7$+$7!"(B
 685.108 +Mercurial $B$O@.2L<h$j9~$_@h$N(B URL $B$rI=<($9$k$+!"(B
 685.109 +Mercurial 
 685.110 +$B$,2x$7$2$JBgNL$NJQ99$r%j%]%8%H%j$K<h$j9~$s$@$3$H$,I=<($5$l$^$9$+$i!"(B
 685.111 +$B$9$0$K5$IU$/J}$,$"$jF@$^$9(B
 685.112 +\footnote{$BLuCm(B: ``display the URL it's pulling from''
 685.113 +$B$N4X78$,$h$/$o$+$i$J$$(B}$B!#(B
 685.114 +
 685.115 +\hgcmd{rollback} $B%3%^%s%I$O!"(B
 685.116 +$B:#$^$5$K<h$j9~$s$@A4$F$N%A%'%s%8%;%C%H$r!"(B
 685.117 +$B$-$A$s$He:No$K$7$^$9!#(B
 685.118 +Mercurial $B$O!"0l2s$N(B \hgcmd{pull} $B5/F0$K$h$j<h$j9~$^$l$k%A%'%s%8%;%C%HA4BN$r!"(B
 685.119 +$BC10l$N%H%i%s%6%/%7%g%s$KJ,N`$9$k$N$G!"(B
 685.120 +$B0l2s$N(B \hgcmd{rollback} $B5/F0$G$3$N<:GT$r<h$j>C$9$3$H$,$G$-$^$9!#(B
 685.121 +
 685.122 +\subsection{Rolling back is useless once you've pushed}
 685.123 +\label{sec:undo:rollback-after-push}
 685.124 +
 685.125 +\hgcmd{rollback} $B$O!"(B
 685.126 +$B0lC6B>$N%j%]%8%H%j$KH?1G$7$?JQ99$G$b!"(B
 685.127 +$B!J<j85$N%j%]%8%H%j$K$*$$$F$O!KL5$+$C$?$3$H$K$G$-$^$9!#(B
 685.128 +$B<h$j>C$7$K$h$jJQ99$O40A4$K>C$5$l$^$9$,!"(B
 685.129 +$B$=$l$,$G$-$k$N$O!"(B
 685.130 +\hgcmd{rollback}  $B$r<B;\$7$?%j%]%8%H%j$K$*$1$k<h$j>C$7(B\emph{$B$N$_(B}$B$G$9!#(B
 685.131 +$B<h$j>C$7$OMzNr$r:o=|$7$^$9$N$G!"(B
 685.132 +$BJQ99$N<h$j>C$7$r%j%]%8%H%j4V$GEAGE$9$k<jCJ$,L5$$$N$G$9!#(B
 685.133 +
 685.134 +$BJQ99$rB>$N%j%]%8%H%j(B--$BE57?E*$JNc$G$O6&M-%j%]%8%H%j(B--$B$KH?1G$7$?>l9g!"(B
 685.135 +$BK\<AE*$K$O!"$=$NJQ99$O(B``$BLn@8$KF($2=P$7(B''$B$F$*$j!"(B
 685.136 +$B<h$j>C$7$H$OJL$JJ}K!$G4V0c$$$rKd$a9g$o$;$kI,MW$,$"$j$^$9!#(B
 685.137 +$BJQ99$rB>$N%j%]%8%H%j$KH?1G$7!"(B
 685.138 +$B!J<j85$N%j%]%8%H%j$G!K$=$NJQ99$r<h$j>C$7$?8e$G!"(B
 685.139 +$BJQ99$rH?1G$7$?%j%]%8%H%j$+$iJQ99$r<h$j9~$s$@;~$K$O!"(B
 685.140 +$B<h$j>C$7$?JQ99$,!J<j85$N%j%]%8%H%j$K!K:F$S8=$l$^$9!#(B
 685.141 +
 685.142 +$B!J<h$j>C$7$?$$JQ99$,!"JQ99$rH?1G$7$?%j%]%8%H%j$K$*$1$k:G?7$N$b$N$G!"(B
 685.143 +\emph{$B3n$D(B}$B!"(B
 685.144 +$BC/$b$=$l$r$=$N%j%]%8%H%j$+$i<h$j9~$s$G$$$J$$$3$H$,3N<B$G$"$k>l9g!"(B
 685.145 +$B$=$NJQ99$r<h$j>C$9$3$H$b$G$-$^$9$,!"(B
 685.146 +$B<h$j>C$7$,5!G=$9$k$3$H$K$O0MB8$7$J$$$h$&$K$7$F$/$@$5$$!#(B
 685.147 +$BCY$+$lAa$+$lJQ99$OD>@\?($k$3$H$N$G$-$J$$(B
 685.148 +$B!J$"$k$$$OB8:_$rK:$l$F$$$?!K%j%]%8%H%j$X$HH?1G$5$l!"(B
 685.149 +$B2s$j$^$o$C$FLa$C$F$-$?;~$K3z$_IU$+$l$F$7$^$$$^$9!#(B
 685.150 +$B!K(B
 685.151 +
 685.152 +\subsection{You can only roll back once}
 685.153 +
 685.154 +Mercurial $B$O!"(B
 685.155 +$BEv3:%j%]%8%H%j$K$*$1$k:G$b:G?7$N%H%i%s%6%/%7%g%s$r!"(B
 685.156 +$B#1$D$@$1%H%i%s%6%/%7%g%s%m%0$K5-O?$7$^$9!#(B
 685.157 +$B$=$N$?$a!"<h$j>C$;$k%H%i%s%6%/%7%g%s$O#1$DJ,$@$1$G$9!#(B
 685.158 +$B%H%i%s%6%/%7%g%s$r#1$D<h$j>C$7$?8e$G!"(B
 685.159 +$B$=$NA0$N%H%i%s%6%/%7%g%s$b<h$j>C$;$k$3$H$r4|BT$7$F$b!"(B
 685.160 +$B4|BTDL$j$N7k2L$OF@$i$l$^$;$s!#(B
 685.161 +
 685.162 +\interaction{rollback.twice}
 685.163 +
 685.164 +$B$"$k%j%]%8%H%j$G%H%i%s%6%/%7%g%s$N<h$j>C$7$r9T$C$?>l9g!"(B
 685.165 +$BJL$JJQ99$r%3%_%C%H$9$k$J$j<h$j9~$`$J$j$7$J$$8B$j!"(B
 685.166 +$B$=$N%j%]%8%H%j$G<h$j>C$7$r9T$&$3$H$O$G$-$^$;$s!#(B
 685.167 +
 685.168 +\section{Reverting the mistaken change}
 685.169 +
 685.170 +$B%U%!%$%k$rJQ99$7$?8e$G!"(B
 685.171 +$B%U%!%$%k$NJQ99$,A4$/I,MW$J$$$3$H$K5$IU$$$?>l9g!"(B
 685.172 +$BJQ99$r%3%_%C%H$9$kA0$G$"$l$P!"(B
 685.173 +\hgcmd{revert} $B%3%^%s%I$,MxMQ$G$-$^$9!#(B
 685.174 +$B$3$N%3%^%s%I$O!"(B
 685.175 +$B:n6HNN0h%G%#%l%/%H%j$N?F%A%'%s%8%;%C%H$r;2>H$7!"(B
 685.176 +$B%U%!%$%k$NFbMF$r85$N>uBV$KLa$7$^$9!#(B
 685.177 +$B!J@bL@$9$k$HD9$/$J$j$^$9$,!"(B
 685.178 +$BDL>o$N>l9g!"$3$N%3%^%s%I$OJQ99$r<h$j>C$7$^$9!#!K(B
 685.179 +
 685.180 +\hgcmd{revert} $B%3%^%s%I$N5!G=$r!"(B
 685.181 +$B$A$g$C$H$7$?%5%s%W%k$G@bL@$7$^$9!#(B
 685.182 +Mercurial $B$K$h$j4{$K9=@.4IM}$5$l$F$$$k%U%!%$%k$rJQ99$7$^$9!#(B
 685.183 +
 685.184 +\interaction{daily.revert.modify}
 685.185 +
 685.186 +$BJQ99$,I,MW$J$$>l9g!"(B
 685.187 +$BC1=c$K(B \hgcmd{revert} $B%3%^%s%I$r%U%!%$%k$KE,MQ$7$^$9!#(B
 685.188 +
 685.189 +\interaction{daily.revert.unmodify}
 685.190 +
 685.191 +\hgcmd{revert} $B%3%^%s%I$O!"(B
 685.192 +$B$"$kDxEY$N0BA4@-$r3NJ]$9$k$?$a$K!"(B
 685.193 +\filename{.orig} $B3HD%;RIU$-$N%U%!%$%k$K!"(B
 685.194 +$BJQ99$5$l$?%U%!%$%k$NFbMF$rJ]B8$7$^$9!#(B
 685.195 +
 685.196 +\interaction{daily.revert.status}
 685.197 +
 685.198 +\hgcmd{revert} $B%3%^%s%I$,07$&$3$H$N$G$-$k>u67$r0J2<$K$^$H$a$^$9!#(B
 685.199 +$B8D!9$N>u67$K4X$9$k>\:Y$O!"0J8e$N@a$G@bL@$7$^$9!#(B
 685.200 +
 685.201 +\begin{itemize}
 685.202 +\item $B%U%!%$%k$,JQ99$5$l$F$$$?$J$i!"JQ99A0$N>uBV$KLa$7$^$9!#(B
 685.203 +
 685.204 +\item $B%U%!%$%k$,(B \hgcmd{add} $B$5$l$F$$$?$J$i!"(B
 685.205 +  $B%U%!%$%k$N(B``$BDI2C(B''$B$5$l$F$$$k>uBV$r<h$j>C$7$^$9$,!"(B
 685.206 +  $B%U%!%$%k$=$N$b$N$K$O2?$bJQ99$r9T$$$^$;$s!#(B
 685.207 +
 685.208 +\item Mercurial $B$X$N;X<(L5$/%U%!%$%k$r:o=|$7$F$$$?$J$i!"(B
 685.209 +  $BJQ99A0(B\footnote{$BLuCm(B: ``$B:o=|A0(B''$B$G$O$J$$E@$KCm0U(B}$B$N>uBV$KLa$7$^$9!#(B
 685.210 +
 685.211 +\item \hgcmd{remove} $B%3%^%s%I$G%U%!%$%k$r:o=|$7$F$$$?$J$i!"(B
 685.212 +  $B%U%!%$%k$N(B``$B:o=|$5$l$?(B''$B>uBV$r<h$j>C$7!"(B
 685.213 +  $BJQ99A0$N>uBV$KLa$7$^$9!#(B
 685.214 +
 685.215 +\end{itemize}
 685.216 +
 685.217 +\subsection{File management errors}
 685.218 +\label{sec:undo:mgmt}
 685.219 +
 685.220 +\hgcmd{revert} $B$OJQ99$5$l$?%U%!%$%k0J30$KBP$7$F$bM-MQ$J%3%^%s%I$G$9!#(B
 685.221 +$B$3$N%3%^%s%I$O!"(B
 685.222 +Mercurial $B$NA4$F$N%U%!%$%k4IM}%3%^%s%I(B
 685.223 +---\hgcmd{add} $B$d(B \hgcmd{remove} $B$J$I(B---
 685.224 +$B$N<B;\$rH?E>$5$;$^$9!#(B
 685.225 +
 685.226 +$B%U%!%$%k$KBP$7$F(B \hgcmd{add} $B$r9T$C$?8e$G!"(B
 685.227 +$B$=$N%U%!%$%k$r(B Mercurial $B$G9=@.4IM}$9$kI,MW$,L5$$$3$H$K5$IU$$$?$J$i!"(B
 685.228 +\hgcmd{revert} $B$K$h$j%U%!%$%k$NDI2C$r<h$j>C$;$^$9!#(B
 685.229 +Mercurial $B$O%U%!%$%k<+BN$K$O2?$bJQ99$r9T$$$^$;$s$N$G0B?4$7$F$/$@$5$$!#(B
 685.230 +$B%U%!%$%kDI2C$N<h$j>C$7$O!"(B
 685.231 +$B%U%!%$%k$KBP$7$F(B``$B0u$r>C$9(B''$B$@$1$G$9!#(B
 685.232 +
 685.233 +\interaction{daily.revert.add}
 685.234 +
 685.235 +$BF1MM$K!"(B
 685.236 +$B%U%!%$%k$KBP$7$F(B \hgcmd{remove} $B$r9T$C$?8e$G$b!"(B
 685.237 +\hgcmd{revert} $B$r;H$&$3$H$G!"(B
 685.238 +$B:n6HNN0h%G%#%l%/%H%j$N?F%A%'%s%8%;%C%H$K$*$1$k>uBV$K!"(B
 685.239 +$B%U%!%$%k$NFbMF$rI|5l$9$k$3$H$,$G$-$^$9!#(B
 685.240 +
 685.241 +\interaction{daily.revert.remove}
 685.242 +
 685.243 +$B$3$l$O!"(BMercurial $B$rDL$5$:$K<jF0$G:o=|$7$?%U%!%$%k(B
 685.244 +$B!J(BMercurial $B$NMQ8l$G$O$3$N<o$N%U%!%$%k$,(B``$BJ6<:(B''(missing)
 685.245 +$B$H8F$P$l$k$3$H$r;W$$=P$7$F$/$@$5$$!K$G$"$C$F$b5!G=$7$^$9!#(B
 685.246 +
 685.247 +\interaction{daily.revert.missing}
 685.248 +
 685.249 +\hgcmd{copy} $B$5$l$?%U%!%$%k$K<h$j>C$7$r9T$C$?>l9g!"(B
 685.250 +$BJ#@=@h%U%!%$%k$O:n6HNN0h%G%#%l%/%H%j$K!"(B
 685.251 +$B9=@.4IM}$5$l$J$$>uBV$G$=$N$^$^;D$j$^$9!#(B
 685.252 +$BJ#@=A`:n$OJ#@=85%U%!%$%k$K$O2?$b:nMQ$7$J$$$N$G!"(B
 685.253 +$B<h$j>C$7$N:]$K(B Mercurial $B$OJ#@=85%U%!%$%k$KBP$7$FFC$K2?$b$7$^$;$s!#(B
 685.254 +
 685.255 +\interaction{daily.revert.copy}
 685.256 +
 685.257 +\subsubsection{A slightly special case: reverting a rename}
 685.258 +
 685.259 +
 685.260 +$B%U%!%$%k$KBP$7$F(B \hgcmd{rename} $B$r9T$C$?>l9g!"(B
 685.261 +$B3P$($F$$$FM_$7$$$3$H$,$"$j$^$9!#(B
 685.262 +\hgcmd{rename} $B<B9T$KBP$7$F(B \hgcmd{revert} $B$r9T$&:]$K$O!"(B
 685.263 +$B0J2<$K<($9$h$&$K!"(B
 685.264 +$BJQ998e$N%U%!%$%kL>$r;XDj$7$?$@$1$G$OIT==J,$G$9!#(B
 685.265 +
 685.266 +\interaction{daily.revert.rename}
 685.267 +
 685.268 +\hgcmd{status} $B%3%^%s%I$N=PNO$+$i$b$o$+$k$h$&$K!"(B
 685.269 +$BJQL>8e$N%U%!%$%k$O4{$KL$DI2C>uBV$HG'<1$5$l$F$$$^$9$,!"(B
 685.270 +$BJQL>(B\emph{$BA0(B}$B$N%U%!%$%k$OL$$@$K:o=|>uBV$HG'<1$5$l$F$$$^$9!*(B
 685.271 +$B$3$l$O!J>/$J$/$H$bCx<T$K$H$C$F$O!KD>46$KH?$7$^$9$,!"(B
 685.272 +$B07$$$O4JC1$G$9!#(B
 685.273 +
 685.274 +\interaction{daily.revert.rename-orig}
 685.275 +
 685.276 +\hgcmd{rename} $B$N<h$j>C$7$r9T$&$K$O!"(B
 685.277 +$BJQL>A08e$N%U%!%$%kL>$r(B\emph{$BN>J}(B}$B;XDj$9$k$3$H$rK:$l$J$$$G$/$@$5$$!#(B
 685.278 +
 685.279 +$B!J$A$J$_$K!"(B
 685.280 +$B%U%!%$%k$NJQL>8e$K!"JQL>8e$N%U%!%$%k$rJQ99$7!"(B
 685.281 +$B$=$l$+$iJQL>A08e$N%U%!%$%kL>$NN>J}$r;XDj$7$F<h$j>C$7$r9T$C$?>l9g!"(B
 685.282 +Mercurial $B$OJQL>$N:]$K:o=|$5$l$?%U%!%$%k(B\footnote{$BLuCm(B: $BJQL>A0$N%U%!%$%k(B
 685.283 +}$B$r2?$bJQ99$5$l$F$$$J$$>uBV$KLa$7$^$9!#(B
 685.284 +$BJQL>8e$N%U%!%$%k$KBP$9$kJQ99$rJQL>A0%U%!%$%k$KH?1G$7$?$$>l9g$K$O!"(B
 685.285 +$BJQL>8e%U%!%$%k$+$iJQL>A0%U%!%$%k$X$N%3%T!<$rK:$l$J$$$G$/$@$5$$!#(B
 685.286 +$B!K(B
 685.287 +
 685.288 +$BJQL>$N<h$j>C$7$K$*$1$k$3$l$i$NLq2p$JB&LL$O!"(B
 685.289 +$B$*$=$i$/(B Mercurial $B$N>.$5$J%P%0$KM3Mh$9$k$b$N$G$9!#(B
 685.290 +
 685.291 +\section{Dealing with committed changes}
 685.292 +
 685.293 +$B$"$kJQ99(B $a$ $B$r%3%_%C%H$7!"$=$N>e$GJL$NJQ99(B $b$ $B$r%3%_%C%H$7$?8e$G!"(B
 685.294 +$BJQ99(B $a$ $B$,4V0c$C$F$$$?$3$H$K5$IU$$$?$H$7$^$9!#(B
 685.295 +Mercurial $B$K$O!"(B
 685.296 +$B%A%'%s%8%;%C%H$=$N$b$N$r<+F0E*$K(B``$BL5$+$C$?$3$H$K$9$k(B''$B5!G=$d!"(B
 685.297 +$B%A%'%s%8%;%C%H$N0lIt$r<jF0$GL58z$K$9$k$?$a$N>pJs$rDs6!$9$k5!G=$,$"$j$^$9!#(B
 685.298 +
 685.299 +$B$3$N@a$rFI$`A0$K!"3P$($F$*$$$FM_$7$$$3$H$,4v$D$+$"$j$^$9!#(B
 685.300 +\hgcmd{backout} $B%3%^%s%I$K$h$kJQ99$N<h$j>C$7$O!"(B
 685.301 +$BMzNr$r(B\emph{$BDI2C(B}$B$9$k$3$H$G9T$o$l$k$b$N$G$"$j!"(B
 685.302 +$BJQ99$=$N$b$N$r=$@5$7$?$j:o=|$7$?$j$9$k$b$N$G$O$"$j$^$;$s!#(B
 685.303 +$B$=$N$?$a!"%P%0$N=$@5$r$9$k$N$K$O8~$$$F$$$^$9$,!"(B
 685.304 +$BGK2uE*$J7k2L$rH<$&<h$j>C$7$H$$$C$?MQES$K$O8~$$$F$$$^$;$s!#(B
 685.305 +$B$=$N$h$&$J<h$j>C$7$K4X$7$F$O!"(B
 685.306 +~\ref{sec:undo:aaaiiieee} $B@a$r;2>H$7$F$/$@$5$$!#(B
 685.307 +
 685.308 +\subsection{Backing out a changeset}
 685.309 +
 685.310 +\hgcmd{backout} $B%3%^%s%I$O!"(B
 685.311 +$B<+F02=$5$l$?7A<0$G%A%'%s%8%;%C%H$N8z2LA4BN$r(B``$B<h$j>C$7(B''$B$^$9!#(B
 685.312 +Mercurial $B$NMzNr$O2~JQ$G$-$J$$$N$G!"(B
 685.313 +$B$3$N%3%^%s%I$O<h$j>C$7$?$$%A%'%s%8%;%C%H$r<h$j=|$$$?$j$O(B\emph{$B$7$^$;$s(B}$B!#(B
 685.314 +$B$=$NBe$o$j$K$3$N%3%^%s%I$O!"(B
 685.315 +$B<h$j>C$7$?$$%A%'%s%8%;%C%H$K$h$k2~JQFbMF$r(B\emph{$BH?E>(B}$B$5$;$k!"(B
 685.316 +$B?7$?$J%A%'%s%8%;%C%H$r:n@.$7$^$9!#(B
 685.317 +
 685.318 +\hgcmd{backout} $B%3%^%s%I$NA`:n$O>/!9J#;($G$9$N$G!"Nc$r;H$C$F@bL@$7$^$9!#(B
 685.319 +$B$^$:$OC1=c$J%A%'%s%8%;%C%H$r4v$D$+;}$D%j%]%8%H%j$r:n@.$7$^$9!#(B
 685.320 +
 685.321 +\interaction{backout.init}
 685.322 +
 685.323 +\hgcmd{backout} $B%3%^%s%I$O!"(B
 685.324 +``bakc out''$BBP>]$H$9$kC10l$N%A%'%s%8%;%C%H<1JL;R$r0z?t$K<h$j$^$9!#(B
 685.325 +$BDL>o!"(B
 685.326 +\hgcmd{backout} 
 685.327 +$B$O%3%_%C%H%a%C%;!<%8$r=q$/$?$a$K%F%-%9%H%(%G%#%?$r5/F0$7$^$9$N$G!"(B
 685.328 +$BJQ99$r(B back out $B$9$kM}M3$r5-O?$9$k$3$H$,$G$-$^$9!#(B
 685.329 +$B$3$NNc$G$O!"(B
 685.330 +\hgopt{backout}{-m} $B%*%W%7%g%s$rMQ$$$k$3$H$G!"(B
 685.331 +$B%3%^%s%I%i%$%s$+$i%3%_%C%H%a%C%;!<%8$rM?$($F$$$^$9!#(B
 685.332 +
 685.333 +\subsection{Backing out the tip changeset}
 685.334 +
 685.335 +$B0J2<$NNc$G$O!"(B
 685.336 +$B:G8e$K%3%_%C%H$7$?%A%'%s%8%;%C%H$r(B back out $B$7$^$9!#(B
 685.337 +
 685.338 +\interaction{backout.simple}
 685.339 +
 685.340 +\filename{myfile} $B$,4{$K#29TL\$r;}$?$J$$$3$H$,$*$o$+$j$G$7$g$&!#(B
 685.341 +\hgcmd{log} $B=PNO$r8+$l$P!"(B
 685.342 +\hgcmd{backout} $B%3%^%s%I$,2?$r9T$C$?$+$rM}2r$G$-$^$9!#(B
 685.343 +
 685.344 +\interaction{backout.simple.log}
 685.345 +
 685.346 +\hgcmd{backout} $B$,@8@.$7$??7$7$$%A%'%s%8%;%C%H$O!"(B
 685.347 +back out $B$7$?%A%'%s%8%;%C%H$N;R%A%'%s%8%;%C%H$H$J$kE@$KCm0U$7$F$/$@$5$$!#(B
 685.348 +$BJQ99MzNr$r?^<($7$?(B \ref{fig:undo:backout}~$B?^$r8+$l$P!"(B
 685.349 +$B$3$N$3$H$,$o$+$k$G$7$g$&!#(B
 685.350 +$B$4Mw$NDL$j!"MzNr$O8+;v$K0lD>@~$G$9!#(B
 685.351 +
 685.352 +\begin{figure}[htb]
 685.353 +  \centering
 685.354 +  \grafix{undo-simple}
 685.355 +  \label{fig:undo:backout}
 685.356 +  \caption{Backing out a change using the \hgcmd{backout} command}
 685.357 +\end{figure}
 685.358 +
 685.359 +\subsection{Backing out a non-tip change}
 685.360 +
 685.361 +$B:G8e$K%3%_%C%H$7$?%A%'%s%8%;%C%H0J30$r(B back out $B$7$?$$>l9g!"(B
 685.362 +\hgcmd{backout} $B%3%^%s%I$K(B
 685.363 +\hgopt{backout}{--merge} $B%*%W%7%g%s$r;XDj$7$F$/$@$5$$!#(B
 685.364 +
 685.365 +\interaction{backout.non-tip.clone}
 685.366 +
 685.367 +$B$3$N%3%^%s%I<B9T$O!"(B
 685.368 +$BG$0U$N%A%'%s%8%;%C%H$r!"(B
 685.369 +$B4JC1$GAGAa$$(B``$B0l2s8B$j$N(B''$BA`:n$G(B back out $B$G$-$^$9!#(B
 685.370 +
 685.371 +\interaction{backout.non-tip.backout}
 685.372 +
 685.373 +back out $B40N;8e$N(B \filename{myfile} $B$NFbMF$K$O!"(B
 685.374 +$B#12sL\$H#32sL\$NJQ99$KAjEv$9$kFbMF$O8+$k$3$H$,$G$-$^$9$,!"(B
 685.375 +$B#22sL\$NJQ99$KAjEv$9$kFbMF$O8+$k$3$H$,$G$-$J$$$G$7$g$&!#(B
 685.376 +
 685.377 +\interaction{backout.non-tip.cat}
 685.378 +
 685.379 +$BMzNr$r?^<($7$?(B \ref{fig:undo:backout-non-tip}~$B?^$K8+$i$l$k$h$&$K!"(B
 685.380 +$B$3$N$h$&$J>u67$N>l9g!"(B
 685.381 +Mercurial $B$O<B:]$K$O(B\emph{$B#2$D(B}$B$N%A%'%s%8%;%C%H$r%3%_%C%H$7$^$9(B
 685.382 +$B!J(BMercurial $B$,<+F0E*$K%3%_%C%H$7$?$b(B\footnote{$BLuCm(B: 
 685.383 +$B<B9TNc$G(B Mercurial $B$,=PNO$9$k%a%C%;!<%8$r8+$l$P$o$+$k$h$&$K!"(B
 685.384 +$B%^!<%8$5$l$?%A%'%s%8%;%C%H$N%3%_%C%H$OMxMQ<T@UG$$H$J$C$F$$$k$?$a!"(B
 685.385 +$B!V<+F0E*$K%3%_%C%H!W$7$?$b$N$G$O$J$/(B
 685.386 +$B!V<+F0E*$K@8@.$7$?$b$N!W$,@5$7$$I=8=$G$9!#(B}$B$N$O6k7A$G<($7$F$"$j$^$9!K!#(B
 685.387 +Mercurial $B$O(B back out $B=hM}$r;O$a$kA0$K!"(B
 685.388 +$B8=;~E@$G$N:n6HNN0h%G%#%l%/%H%j$K$*$1$k?F%A%'%s%8%;%C%H$r3P$($F$*$-$^$9!#(B
 685.389 +$B$=$N>e$GBP>]%A%'%s%8%;%C%H$r(B back out $B$7!"(B
 685.390 +$B%A%'%s%8%;%C%H$H$7$F%3%_%C%H$7$^$9!#(B
 685.391 +$B:G8e$K!"(B
 685.392 +$B:n6HNN0h%G%#%l%/%H%j$N?F%A%'%s%8%;%C%H$H%^!<%8$7$?7k2L$r%3%_%C%H$7$^$9(B
 685.393 +footnote{$BLuCm(B: $BA0=R$N$h$&$K!"<+F0E*$K$O%3%_%C%H$5$l$^$;$s(B}$B!#(B
 685.394 +
 685.395 +\begin{figure}[htb]
 685.396 +  \centering
 685.397 +  \grafix{undo-non-tip}
 685.398 +  \label{fig:undo:backout-non-tip}
 685.399 +  \caption{Automated backout of a non-tip change using the \hgcmd{backout} command}
 685.400 +\end{figure}
 685.401 +
 685.402 +$B7k2L$H$7$F!"(B
 685.403 +back out $B$7$?$$%A%'%s%8%;%C%H$K$h$kJQ99FbMF$r<h$j>C$9$?$a$N!"(B
 685.404 +$B4v$D$+$NM>J,$JMzNr$N$_$rH<$C$F!"(B
 685.405 +``$B0JA0$N>uBV$X$NI|5l(B''$B$,9T$o$l$^$9!#(B
 685.406 +
 685.407 +\subsubsection{Always use the \hgopt{backout}{--merge} option}
 685.408 +
 685.409 +$B<B$N$H$3$m!"(B
 685.410 +back out $BBP>]$N%A%'%s%8%;%C%H$,(B tip $B$+H]$+$K4X$o$i$:!"(B
 685.411 +\hgopt{backout}{--merge} $B%*%W%7%g%s$O(B``$B@5$7$/5!G=(B''$B$7$^$9(B
 685.412 +$B!J(Bback out $BBP>]$,(B tip $B$N>l9g$O!"I,MW$,L5$$$N$G%^!<%8$7$h$&$H$O$7$^$;$s!K(B
 685.413 +$B$N$G!"(B
 685.414 +\hgcmd{backout} $B%3%^%s%I$r<B9T$9$k:]$K$O(B\emph{$B>o$K(B}
 685.415 +\hgopt{backout}{--merge} $B%*%W%7%g%s$r;XDj$9$k$Y$-$G$7$g$&!#(B
 685.416 +
 685.417 +\subsection{Gaining more control of the backout process}
 685.418 +
 685.419 +$B@h$N5-=R$G$O!"JQ99$N(B back out $B$N:]$N(B
 685.420 +\hgopt{backout}{--merge} $B%*%W%7%g%s$N>oMQ$r?d>)$7$^$7$?$,!"(B
 685.421 +$B$=$N0lJ}$G!"(B
 685.422 +back out $BBP>]$H$J$k%A%'%s%8%;%C%H$N%^!<%8J}K!$r!"(B
 685.423 +\hgcmd{backout} $B%3%^%s%I$NMxMQ<T$,7hDj$9$k$3$H$b$G$-$^$9!#(B
 685.424 +back out $B=hM}$r<jF0$G@)8f$9$kI,MW$OLGB?$K$"$j$^$;$s$,!"(B
 685.425 +$B<jF0@)8f$NJ}K!$rCN$k$3$H$O!"(B
 685.426 +\hgcmd{backout} $B$,<+F0E*$K9T$C$F$$$k$3$H$NFb>p$rM}2r$9$k>e$GM-MQ$G$9!#(B
 685.427 +$B<jF0@)8f$N@bL@$N$?$a$K!"(B
 685.428 +$B:G=i$K:n@.$7$?%j%]%8%H%j$rJ#@=$7$^$9$,!"(B
 685.429 +$B$3$3$G$O(B back out $B$O9T$$$^$;$s!#(B
 685.430 +
 685.431 +\interaction{backout.manual.clone}
 685.432 +
 685.433 +$B@h$NNc$HF1MM$K!"(B
 685.434 +$BBh#3$N%A%'%s%8%;%C%H$r%3%_%C%H$7!"(B
 685.435 +$B$=$N>e$G$=$N?F$r(B back out $B$7$?7k2L$r8+$F$_$^$7$g$&!#(B
 685.436 +
 685.437 +\interaction{backout.manual.backout} 
 685.438 +
 685.439 +$B?7$?$J%A%'%s%8%;%C%H$bBh#3$N%A%'%s%8%;%C%HF1MM$K!"(B
 685.440 +back out $BBP>]$N%A%'%s%8%;%C%H$N;R$K$J$j$^$9$N$G!"(B
 685.441 +$B$=$l$^$G(B tip $B$@$C$?%A%'%s%8%;%C%H(B\footnote{$BLuCm(B: $BBh#3$N%A%'%s%8%;%C%H$N$3$H(B}
 685.442 +$B$N;R(B\emph{$B$G$O$J$/(B}$B!"?7$?$J%X%C%I$K$J$j$^$9!#(B
 685.443 +\hgcmd{backout} $B%3%^%s%I$O!"(B
 685.444 +$B$3$N$3$H$r9p$2$kHs>o$K$O$C$-$j$H$7$?%a%C%;!<%8$rI=<($7$F$$$^$9!#(B
 685.445 +
 685.446 +\interaction{backout.manual.log}
 685.447 +
 685.448 +$B$3$3$G$b!"(B
 685.449 +$BMzNr$r?^<($7$?(B\ref{fig:undo:backout-manual}~$B?^$r8+$k$3$H$G!"(B
 685.450 +$B$I$&$$$C$?>u67$K$"$k$N$+$,M}2r$70W$$$H;W$$$^$9!#(B
 685.451 +$B$3$N?^$+$i!"(B
 685.452 +\hgcmd{backout} $B%3%^%s%I$r(B tip $B0J30$N%A%'%s%8%;%C%H$KE,MQ$7$?:]$K!"(B
 685.453 +Mercurial $B$,?7$7$$%X%C%I$r%j%]%8%H%j$KDI2C$9$k(B
 685.454 +$B!J(BMercurial $B$K$h$jDI2C$5$l$?%A%'%s%8%;%C%H$O6k7A$GI=$7$F$$$^$9!K(B
 685.455 +$B$3$H$,$h$/$o$+$j$^$9!#(B
 685.456 +
 685.457 +\begin{figure}[htb]
 685.458 +  \centering
 685.459 +  \grafix{undo-manual}
 685.460 +  \label{fig:undo:backout-manual}
 685.461 +  \caption{Backing out a change using the \hgcmd{backout} command}
 685.462 +\end{figure}
 685.463 +
 685.464 +\hgcmd{backout} $B%3%^%s%I$N<B9T$,40N;$9$k$H!"(B
 685.465 +$B:n6HNN0h%G%#%l%/%H%j$N?F%A%'%s%8%;%C%H$,!"(B
 685.466 +$B?7$7$$(B ``backout'' $B%A%'%s%8%;%C%H$K$J$j$^$9!#(B
 685.467 +
 685.468 +\interaction{backout.manual.parents}
 685.469 +
 685.470 +$B$3$N;~E@$G!"#2$D$NFHN)$7$?JQ99$N$^$H$^$j(B
 685.471 +\footnote{$BLuCm(B: $B%^!<%8$,I,MW$J!VJ#?t%X%C%I>uBV!W$N$3$H$r;X$7$F$$$k$H;W$o$l$^$9(B}
 685.472 +$B$,B8:_$7$^$9!#(B
 685.473 +
 685.474 +\interaction{backout.manual.heads}
 685.475 +
 685.476 +$B$3$N;~E@$G!"(B\filename{myfile} 
 685.477 +$B$O$I$N$h$&$JFbMF$G$"$k$3$H$,4|BT$5$l$k$+$r9M$($F$_$^$7$g$&!#(B
 685.478 +$BBh#1$NJQ99$O(B back out $B$7$F$$$^$;$s$+$i!"(B
 685.479 +$B$=$l$K4X$9$kFbMF$OB8:_$7$F$$$J$1$l$P$J$j$^$;$s!#(B
 685.480 +$BBh#2$NJQ99$O(B back out $B$7$^$7$?$N$G!"(B
 685.481 +$B$=$l$K4X$9$kFbMF$O>C<:$7$F$$$J$1$l$P$J$j$^$;$s!#(B
 685.482 +$BMzNr?^$GJL8D$N%X%C%I$H$7$F?^<($5$l$F$$$k$h$&$K!"(B
 685.483 +$BBh#3$NJQ99$K4X$9$kFbMF$,(B
 685.484 +\filename{myfile} $B$KB8:_$7$F$O(B\emph{$B$J$j$^$;$s(B}$B!#(B
 685.485 +
 685.486 +\interaction{backout.manual.cat}
 685.487 +
 685.488 +$BBh#3$NJQ99$NFbMF$r%U%!%$%k$K<h$j9~$`$K$O!"(B
 685.489 +$B#2$D$N%X%C%I$r$$$D$b$N$h$&$K%^!<%8$9$l$PNI$$$N$G$9!#(B
 685.490 +
 685.491 +\interaction{backout.manual.merge}
 685.492 +
 685.493 +$B%^!<%8$9$k$3$H$G!"(B
 685.494 +$B%j%]%8%H%jCf$NMzNr$O(B
 685.495 +\ref{fig:undo:backout-manual-merge}~$B?^$K<($9$h$&$K$J$j$^$9!#(B
 685.496 +
 685.497 +\begin{figure}[htb]
 685.498 +  \centering
 685.499 +  \grafix{undo-manual-merge}
 685.500 +  \caption{Manually merging a backout change}
 685.501 +  \label{fig:undo:backout-manual-merge}
 685.502 +\end{figure}
 685.503 +
 685.504 +\subsection{Why \hgcmd{backout} works as it does}
 685.505 +
 685.506 +\hgcmd{backout} $B%3%^%s%I$N?6$kIq$$$r4JC1$K$^$H$a$k$H0J2<$N$h$&$K$J$j$^$9!#(B
 685.507 +
 685.508 +\begin{enumerate}
 685.509 +\item $B:n6HNN0h%G%#%l%/%H%j$,(B``$B%/%j!<%s(B''$B$J>uBV!"(B
 685.510 +  $BB($A(B \hgcmd{status} $B$N=PNO$,6u$G$"$k$3$H$r3NG'$7$^$9!#(B
 685.511 +
 685.512 +\item $B$=$N;~E@$G$N:n6HNN0h%G%#%l%/%H%j$N?F%A%'%s%8%;%C%H$r3P$($F$*$-$^$9!#(B
 685.513 +  $B0J2<!"$3$N%A%'%s%8%;%C%H$r(B \texttt{orig} $B$H8F>N$7$^$9!#(B
 685.514 +
 685.515 +\item $B:n6HNN0h%G%#%l%/%H%j$r(B back out $BBP>]%A%'%s%8%;%C%H$KF14|$9$k$?$a$K!"(B
 685.516 +  \hgcmd{update} $B$HF1Ey$N=hM}$r9T$$$^$9!#(B
 685.517 +  $B0J2<!"$3$N%A%'%s%8%;%C%H$r(B \texttt{backout} $B$H8F>N$7$^$9!#(B
 685.518 +
 685.519 +\item \texttt{backout} $B$N?F%A%'%s%8%;%C%H$rD4$Y$^$9!#(B
 685.520 +  $B0J2<!"$3$N?F%A%'%s%8%;%C%H$r(B \texttt{parent} $B$H8F>N$7$^$9!#(B
 685.521 +
 685.522 +\item \texttt{backout} $B%A%'%s%8%;%C%H$,1F6A$9$k8D!9$N%U%!%$%k$KBP$7$F!"(B
 685.523 +  \hgcmdargs{revert}{-r parent} $BAjEv$N=hM}$r9T$$!"(B
 685.524 +  \texttt{backout} $B%A%'%s%8%;%C%H$,%3%_%C%H$5$l$kA0$NFbMF$KI|85$7$^$9!#(B
 685.525 +
 685.526 +\item $BI|857k2L$r?7$7$$%A%'%s%8%;%C%H$H$7$F%3%_%C%H$7$^$9!#(B
 685.527 +  $B$3$N%A%'%s%8%;%C%H$N?F$O(B \texttt{backout} $B$G$9!#(B
 685.528 +
 685.529 +\item $B%3%^%s%I%i%$%s$G(B \hgopt{backout}{--merge} $B$,;XDj$5$l$F$$$?>l9g!"(B
 685.530 +  $B?7$7$$%A%'%s%8%;%C%H$H(B \texttt{orig} $B$r%^!<%8$7!"(B
 685.531 +  $B$=$N7k2L$r%3%_%C%H$7$^$9!#(B
 685.532 +
 685.533 +\end{enumerate}
 685.534 +
 685.535 +$B:n6HNN0h%G%#%l%/%H%j$rO.7+$j2s$9$3$H$J$/(B
 685.536 +\hgcmd{backout} $B%3%^%s%IAjEv$N8z2L$rF@$k$b$&0l$D$NJ}K!$O!"(B
 685.537 +back out $B$5$l$k%A%'%s%8%;%C%H$KBP$7$F(B \hgcmd{export}
 685.538 +$B$9$k$3$H$GF@$?(B diff $B%U%!%$%k$r!"(B
 685.539 +$B:nMQ$rH?E>$5$;$k(B
 685.540 +\cmdopt{patch}{--reverse} $B%*%W%7%g%s$r;XDj$7$?(B
 685.541 +\command{patch} $B%3%^%s%I$KMQ$$$k$3$H$G$9!#(B
 685.542 +$B$3$NJ}K!$OHs>o$K4JC1$K46$8$k$G$7$g$&$,!"(B
 685.543 +$BA4$/>e<j$/5!G=$7$^$;$s!#(B
 685.544 +
 685.545 +\hgcmd{backout} $B$,(B update$B!"(Bcommit$B!"(Bmerge $B$*$h$S:FEY$N(B commit $B$r9T$&$N$O!"(B
 685.546 +back out $BBP>]$N%A%'%s%8%;%C%H$H8=:_$N(B tip 
 685.547 +$B$N(B\emph{$B4V(B}$B$NA4$F$N%A%'%s%8%;%C%H$r07$&:]$K!"(B
 685.548 +$BNI9%$J7k2L$rF@$k$?$a$N:GA1$N5!2q$r(B Mercurial $B$N%^!<%85!9=$KM?$($k$?$a$G$9!#(B
 685.549 +
 685.550 +$BNc$($P!"(B
 685.551 +$B%W%m%8%'%/%H$NMzNr$+$i!"(B100 $B%j%S%8%g%sJ,A0$N%A%'%s%8%;%C%H$r(B
 685.552 +back out $B$7$h$&$H$7$?>l9g!"(B
 685.553 +\command{patch} $B$,%Q%C%A$NE,MQ2DH]$rH=Dj$9$k%3%s%F%-%9%H>pJs$r!"(B
 685.554 +back out $BBP>]$H$N4V$K$"$k%A%'%s%8%;%C%H$,(B``$BGK2u(B''$B$7$F$7$^$&$+$b$7$l$J$$(B
 685.555 +$B!J$3$N0UL#$,$o$+$i$J$$>l9g$O!"(B
 685.556 +\ref{sec:mq:patch}~$B@a$N(B \command{patch} $B$K4X$9$k@bL@$r;2>H$7$F$/$@$5$$!K(B
 685.557 +$B$N$G!"(B
 685.558 +\command{patch} $B%3%^%s%I$,H?E>(B diff $B$re:No$KE,MQ$G$-$k$3$H$O4|BT$G$-$^$;$s!#(B
 685.559 +Mercurial $B$N%^!<%85!9=$O!"(B
 685.560 +$B%U%!%$%k$d%G%#%l%/%H%j$NJQL>!"(B
 685.561 +$B%U%!%$%k8"8B$NJQ99$d!"(B
 685.562 +$B%P%$%J%j%U%!%$%k$NJQ99$H$$$C$?(B
 685.563 +\command{patch} $B%3%^%s%I$,07$&$3$H$N$G$-$J$$$b$N$b07$&$3$H$,$G$-$^$9!#(B
 685.564 +
 685.565 +\section{Changes that should never have been}
 685.566 +\label{sec:undo:aaaiiieee}
 685.567 +
 685.568 +$BJQ99FbMF$r<h$j>C$=$&$H$7$?>l9g$NKX$I$O!"(B
 685.569 +\hgcmd{backout} $B%3%^%s%I$NMxMQ$,BEEv$G$9!#(B
 685.570 +\hgcmd{backout} $B%3%^%s%I$O!"(B
 685.571 +$B85$N%A%'%s%8%;%C%H$N%3%_%C%H$H!"(B
 685.572 +$B8e$+$i$=$l$r<h$j>C$7$?:]$NN>J}$K4X$7$F!"(B
 685.573 +$B@53N$G1JB3E*$J5-O?$r;D$7$^$9!#(B
 685.574 +
 685.575 +$B$7$+$7!"Hs>o$K5)$J>u67$G$9$,!"(B
 685.576 +$B%j%]%8%H%jCf$KB8:_$7$FM_$7$/$J$$JQ99$r%3%_%C%H$7$F$7$^$&$+$b$7$l$^$;$s!#(B
 685.577 +$BNc$($P!"(B
 685.578 +$B%=!<%9%U%!%$%k$HF1MM$K%*%V%8%'%/%H%U%!%$%k$r%3%_%C%H$7$F$7$^$&$h$&$J;vBV$O!"(B
 685.579 +$BLGB?$KL5$$$N$GDL>o$O!V4V0c$$!W$H$_$J$5$l$^$9!#(B
 685.580 +$B%*%V%8%'%/%H%U%!%$%k$K$OK\<AE*$J2ACM$O$"$j$^$;$s$7!"(B
 685.581 +$BHs>o$K(B\emph{$B%5%$%:$,Bg$-$$(B}$B$G$9$+$i!"(B
 685.582 +$B%j%]%8%H%5%$%:$dJ#@=!?JQ99<h$j9~$_$KMW$9$k;~4V$,A}2C$7$F$7$^$$$^$9!#(B
 685.583 +
 685.584 +XXXXXXXXXX
 685.585 +Before I discuss the options that you have if you commit a ``brown
 685.586 +paper bag'' change (the kind that's so bad that you want to pull a
 685.587 +brown paper bag over your head), let me first discuss some approaches
 685.588 +that probably won't work.
 685.589 +XXXXXXXXXX
 685.590 +
 685.591 +Mercurial $B$OMzNr$r!VC_@QE*$J$b$N!W(B---
 685.592 +$BA4$F$NJQ99$,@h9T$9$kJQ99$N>e$KE,MQ$5$l$k(B---$B$H$7$F07$$$^$9$N$G!"(B
 685.593 +$BGK2uE*$J1F6A$r;}$D%A%'%s%8%;%C%H$KBP$7$F$G$"$C$F$b!"(B
 685.594 +$B$=$l$rGK4~$9$k$3$H$ODL>o$O$G$-$^$;$s!#(B
 685.595 +\ref{sec:undo:rollback}~$B@a$G>\:Y$r=R$Y$^$9$,!"(B
 685.596 +$BNc30E*$K(B \hgcmd{rollback} $B%3%^%s%I$r0BA4$K;HMQ$G$-$k$N$O!"(B
 685.597 +$BJQ99$r%3%_%C%H$7$?D>8e$G!"(B
 685.598 +$BJL$J%j%]%8%H%j$X(B \hgcmd{push} $B$b(B \hgcmd{pull} $B$b$5$l$F$$$J$$>l9g$@$1$G$9!#(B
 685.599 +
 685.600 +$BITE,@Z$J%A%'%s%8%;%C%H$rB>$N%j%]%8%H%j$X(B 
 685.601 +\hgcmd{push} $B$7$F$7$^$C$?(B\emph{$B8e$G$b(B}$B!"(B
 685.602 +\hgcmd{rollback} $B%3%^%s%I$K$h$j!"(B
 685.603 +$B%m!<%+%k$J%j%]%8%H%j$G$=$N%A%'%s%8%;%C%H$rGK4~$9$k$3$H$O$G$-$^$9$,!"(B
 685.604 +$B$=$l$O$*$=$i$/K\Mh$d$j$?$+$C$?$3$H$G$OL5$$H&$G$9!#(B
 685.605 +$B1s3V%j%]%8%H%jCf$K$OITE,@Z$J%A%'%s%8%;%C%H$,B8:_$7B3$1$^$9$N$G!"(B
 685.606 +$B<!$KJQ99$N<h$j9~$_$r9T$C$?:]$K$O!"(B
 685.607 +$B$=$NJQ99$,:F$S%m!<%+%k%j%]%8%H%j$K8=$l$k$+$b$7$l$^$;$s!#(B
 685.608 +
 685.609 +$B$3$N$h$&$J>u67$,H/@8$7$?>l9g!"(B
 685.610 +$B$I$N%j%]%8%H%j$,ITE,@Z$J%A%'%s%8%;%C%H$rJ];}$7$F$$$k$+$rGD0.$7$F$$$k$J$i!"(B
 685.611 +$B$=$l$i(B\emph{$BA4$F$N(B}$B%j%]%8%H%j$+$i$NITE,@Z$J%A%'%s%8%;%C%H$N=|5n$r!"(B
 685.612 +\emph{$B;n$_$k(B}$B$3$H$,2DG=$G$9!#(B
 685.613 +$BL^O@!"$3$l$O?=$7J,$NL5$$2rK!$G$O$"$j$^$;$s!#(B
 685.614 +$B$?$C$?0l$D$G$bKu>C$7B;$M$?%j%]%8%H%j$,$"$l$P!"(B
 685.615 +``$BLn$KJ|$?$l$?(B''$B$^$^$N%A%'%s%8%;%C%H$O99$KEAGE$7$F$7$^$&$G$7$g$&!#(B
 685.616 +
 685.617 +$B=|5n$7$?$$%A%'%s%8%;%C%H$N(B\emph{$B8e$K(B}$B!"(B
 685.618 +$B4v$D$+$N%A%'%s%8%;%C%H$r%3%_%C%H$7$F$7$^$C$?>l9g!"(B
 685.619 +$B<h$jF@$kA*Br;h$O99$K8B$i$l$F$7$^$$$^$9!#(B
 685.620 +Mercurial $B$O!"(B
 685.621 +$B%A%'%s%8%;%C%H$K<j$r$D$1$J$$$^$^$G!"(B
 685.622 +$BMzNr$K(B``$B7j$r3+$1$k(B''$B5!G=$ODs6!$7$F$$$^$;$s!#(B
 685.623 +
 685.624 +XXX This needs filling out.  
 685.625 +\texttt{examples} $B%G%#%l%/%H%jG[2<$N(B
 685.626 +\texttt{hg-replay} $B%9%/%j%W%H$O5!G=$7$^$9$,!"(B
 685.627 +$B%A%'%s%8%;%C%H$N%^!<%8$r9T$$$^$;$s!#(B
 685.628 +$B=EBg$J<jH4$-$G$9!#(B
 685.629 +
 685.630 +\subsection{Protect yourself from ``escaped'' changes}
 685.631 +
 685.632 +$B%m!<%+%k%j%]%8%H%j$K%3%_%C%H$7$?4v$D$+$N%A%'%s%8%;%C%H$,!"(B
 685.633 +\hgcmd{push} $B$J$$$7(B \hgcmd{pull} 
 685.634 +$BEy$K$h$C$F$=$l$i$,B>$N%j%]%8%H%j$X$HH?1G$5$l$?$+$i$H$$$C$F!"(B
 685.635 +$B$=$N$3$H<+BN$OI,$:$7$bBg<:GT$H$$$&$o$1$G$O$"$j$^$;$s!#(B
 685.636 +$B$"$k<o$NIT@5$J%A%'%s%8%;%C%H$KBP$7$F!"(B
 685.637 +$B$"$i$+$8$a<+8JKI1R$9$k$3$H$b2DG=$G$9!#(B
 685.638 +$B3+H/%A!<%`$,JQ99$rCf1{$N%j%]%8%H%j$+$i(B \hgcmd{pull} $B$9$k$h$&$JBN@)$N>l9g!"(B
 685.639 +$B;v8NKI1R$OHs>o$K4JC1$G$9!#(B
 685.640 +
 685.641 +$BCf1{$N%j%]%8%H%j$N4v$D$+$N%U%C%/$r!"(B
 685.642 +$BDI2C$5$l$k%A%'%s%8%;%C%H$N8!>Z$r9T$&$h$&$K@_Dj$9$k(B
 685.643 +$B!J(B\ref{chap:hook}~$B>O$r;2>H$7$F$/$@$5$$!K$3$H$G!"(B
 685.644 +$B$"$k<o$NIT@5$J%A%'%s%8%;%C%H$,!"(B
 685.645 +$BCf1{%j%]%8%H%j$KA4$/H?1G$5$l$J$$$h$&$K<+F02=$9$k$3$H$,$G$-$^$9!#(B
 685.646 +$B@_Dj$,E,@Z$G$"$l$PCf1{$N%j%]%8%H%j$KH?1G$G$-$J$/$J$k$?$a!"(B
 685.647 +$B$3$N$h$&$J%A%'%s%8%;%C%H$O<+A3$H(B``$B;`$K@d$((B''$B$^$9!#(B
 685.648 +$B$J$*NI$$$3$H$K!"$3$N<jK!$OL@<(E*$J2pF~$rI,MW$H$7$^$;$s!#(B
 685.649 +
 685.650 +$BNc$($P!"Ev3:%A%'%s%8%;%C%H$,<B:]$K%3%s%Q%$%k2DG=$+$I$&$+$r8!>Z$9$k(B
 685.651 +incoming $B%U%C%/$O!"(B
 685.652 +$B$&$C$+$j(B``$B%S%k%I$G$-$J$/$7$F$7$^$&(B''$B$3$H$rKI;_$G$-$^$9!#(B
 685.653 +
 685.654 +\section{Finding the source of a bug}
 685.655 +\label{sec:undo:bisect}
 685.656 +
 685.657 +$B%P%0$r$b$?$i$7$?%A%'%s%8%;%C%H$r(B back out $B$G$-$k$N$OHs>o$K7k9=$J$N$G$9$,!"(B
 685.658 +$B$I$N%A%'%s%8%;%C%H$r(B back out $B$9$Y$-$+$rCN$C$F$$$kI,MW$,$"$j$^$9!#(B
 685.659 +Mercurial $B$K$O!"(B
 685.660 +$B%A%'%s%8%;%C%HFCDj$N<+F02=$HHs>o$K8zN(E*$J<B;\$rJd=u$9$k!"(B
 685.661 +\hgext{bisect} $B$H8F$P$l$k=EMW$J3HD%$,$"$j$^$9!#(B
 685.662 +
 685.663 +$B%A%'%s%8%;%C%H$K$h$kJQ99$O?6$kIq$$$KJQ2=$r$b$?$i$9$N$G!"(B
 685.664 +$B$=$NJQ2=$r4JC1$J#2CM%F%9%H$K$h$j$=$l$rFCDj$9$k$3$H$,$G$-$k!"(B
 685.665 +$B$H$$$&$N$,(B \hgext{bisect} $B3HD%$N86M}$G$9!#(B
 685.666 +$B$I$N%3!<%IJR$,JQ2=$r$b$?$i$7$F$$$k$N$+$O$o$+$i$J$/$F$b!"(B
 685.667 +$B%P%0$NM-L5$r;n83$9$kJ}K!$O$o$+$k$G$7$g$&!#(B
 685.668 +\hgext{bisect} $B3HD%$O!"(B
 685.669 +$B%P%0$N860x$H$J$C$?%3!<%I$r$b$?$i$7$?%A%'%s%8%;%C%H$rC5$9$N$K!"(B
 685.670 +$B$"$J$?$N%F%9%H%W%m%0%i%`$rD>@\;HMQ$7$^$9!#(B
 685.671 +
 685.672 +\hgext{bisect} $B3HD%$NE,MQJ}K!$rM}2r$7$d$9$$$h$&$K!"(B
 685.673 +$B4v$D$+$N%7%J%j%*$rNc<($7$^$9!#(B
 685.674 +
 685.675 +\begin{itemize}
 685.676 +\item $B?t=54VA0$K$O8+$i$l$J$+$C$?%P%0$,!":G?7$NHG$GH/8+$5$l$^$7$?$,!"(B
 685.677 +  $B2?;~$=$l$,:.F~$5$l$?$N$+$,$o$+$j$^$;$s!#(B
 685.678 +  $B$3$N>l9g!"(Bbinary test $B$G%P%0$NM-L5$rD4$Y$k$3$H$,$G$-$^$9(B
 685.679 +  \footnote{$BLuCm(B: $B!V%P%0$NM-L5!W$H$$$&#2CM$rH=Dj$9$k%F%9%H$rMQ$$$k$3$H$G!"(B
 685.680 +  $B%P%0$N:.F~$7$?%A%'%s%8%;%C%H$rC5$7$^$9(B}$B!#(B
 685.681 +
 685.682 +\item $BBg5^$.$G%P%0$r=$@5$7!"(B
 685.683 +  $B3+H/%A!<%`$N%P%0%G!<%?%Y!<%9$N>uBV$r!V%/%m!<%:!W$K$G$-$k$h$&$K$J$j$^$7$?!#(B
 685.684 +  $B!V%/%m!<%:!W>uBV$K$9$k:]$K!"(B
 685.685 +  $B%P%0%G!<%?%Y!<%9$,%A%'%s%8%;%C%H(BID$B$r5a$a$F$-$^$7$?$,!"(B
 685.686 +  $B$I$N%A%'%s%8%;%C%H$G%P%0$r=$@5$7$?$N$+3P$($F$$$^$;$s$G$7$?!#(B
 685.687 +  $B$3$3$G:F$S(B binary test  $B$G%P%0$NM-L5$rD4$Y$k$3$H$,$G$-$^$9!#(B
 685.688 +
 685.689 +\item $B%=%U%H%&%'%"$,@5$7$/F0:n$7$F$$$^$9$,!"(B
 685.690 +  $B0JA07WB,$7$?;~$h$j$b(B 15\% $BCY$/$J$C$F$^$7$?!#(B
 685.691 +  $B$I$N%A%'%s%8%;%C%H$,@-G=Dc2<$NMW0x$H$J$C$F$$$k$N$+$rCN$j$?$$$G$9!#(B
 685.692 +  $B$3$N>l9g!"(Bbinary test $B$O%=%U%H%&%'%"$N@-G=$r7WB,$7!"(B
 685.693 +  ``$BAa$$(B''$B$N$+(B``$BCY$$(B''$B$N$+$rH=Dj$7$^$9!#(B
 685.694 +
 685.695 +\item $B$3$3:G6a!"(B
 685.696 +  $B=P2Y$7$?%W%m%8%'%/%H$N9=@.MWAG$N%5%$%:$,GzH/E*$KBg$-$/$J$C$F$$$F!"(B
 685.697 +  $B%W%m%8%'%/%H$N%S%k%I<j=g$N2?$i$+$,JQ99$5$l$?$N$G$O$J$$$+$H?dB,$7$F$$$^$9(B
 685.698 +  \footnote{$BLuCm(B: $B%S%k%I7k2L$N!V9=@.MWAG%5%$%:$NBg>.!W(B
 685.699 +  $B$H$$$&#2CM$rH=Dj$9$k%F%9%H$rMQ$$$k$3$H$G!"(B
 685.700 +  $BJQ99$,:.F~$5$l$?%A%'%s%8%;%C%H$rC5$7$^$9(B}$B!#(B
 685.701 +
 685.702 +\end{itemize}
 685.703 +
 685.704 +$B$3$l$i$NNc$+$i!"(B
 685.705 +\hgext{bisect} $B3HD%$,%P%0$N85$rC5$9$@$1$N$b$N$G$J$$$3$H$OL@$i$+$G$7$g$&!#(B
 685.706 +$B$=$NFC@-$K4X$9$k#2CM%F%9%H$r=q$1$k$J$i!"(B
 685.707 +$B%j%]%8%H%j$K$*$1$k(B
 685.708 +$B!J%=!<%9%D%j!<Cf$N%U%!%$%k$KBP$9$kC1=c$JJ8;zNs8!:w$G$OC5$7=P$;$J$$!K(B
 685.709 +$BG$0U$N(B``$BFC@-$N=P8=(B''$B$rC5$7=P$9$3$H$,$G$-$^$9!#(B
 685.710 +
 685.711 +$BMxMQ<T$H(B Mercurial $B$N$=$l$>$l$,!"(B
 685.712 +$B8!:w=hM}$K$*$$$F$I$NItJ,$K@UG$$rIi$&$N$+$r$O$C$-$j$H$5$;$k$?$a$K!"(B
 685.713 +$B$3$3$G$b$&>/$7MQ8l$N@bL@$r$7$^$7$g$&!#(B
 685.714 +\emph{$B%F%9%H(B}(test)$B$H$O!"(B
 685.715 +\hgext{bisect} $B3HD%$,%A%'%s%8%;%C%H$rA*Br$9$k:]$K!"(B
 685.716 +\emph{$BMxMQ<T(B}$B$,<B9T$9$k$b$N$G$9!#(B
 685.717 +\emph{$BD4::(B}(probe)$B$H$O!"(B
 685.718 +$B$"$k%j%S%8%g%s$NNIH]$rH=Dj$9$k$?$a$K(B \hgext{bisect} $B$,<B9T$9$k$b$N$G$9!#(B
 685.719 +$B:G8e$K!"(B
 685.720 +``bisect'' $B$H$$$&8@MU$r!"(B
 685.721 +``\hgext{bisect} $B3HD%$rMQ$$$?8!:w(B''$B$NBeMQ$H$7$F!"(B
 685.722 +$BL>;l$*$h$SF0;l$H$7$F;HMQ$7$^$9!#(B
 685.723 +
 685.724 +$B8!:w=hM}$r<+F02=$9$k4JC1$JJ}K!$N0l$D$,!"(B
 685.725 +$BA4$F$N%A%'%s%8%;%C%H$rD4::$9$k8/$jJ}$G$9!#(B
 685.726 +$B$7$+$7$J$,$i!"$3$N8/$jJ}$K$OKX$I%9%1!<%i%S%j%F%#$,$"$j$^$;$s!#(B
 685.727 +$B#1$D$N%A%'%s%8%;%C%H$N%F%9%H$K#1#0J,I,MW$G!"(B
 685.728 +$B%j%]%8%H%j$K#1K|$N%A%'%s%8%;%C%H$,$"$C$?$H$9$k$H!"(B
 685.729 +$BE0DlE*$KD4::$9$k8/$jJ}$G$O!"(B
 685.730 +$B%P%0$r$b$?$i$7$?%A%'%s%8%;%C%H$r8+$D$1$k$N$K!"(B
 685.731 +$BJ?6Q$G#3#5(B~\emph{$BF|(B}$BI,MW$G$9!#(B
 685.732 +$B8!:wBP>]$r:G?7$N#5#0#0%A%'%s%8%;%C%H$K8BDj$G$-$k$H$7$F$b!"(B
 685.733 +$B%P%0$r$b$?$i$7$?%A%'%s%8%;%C%H$r8+$D$1$k$N$K$O!"(B
 685.734 +$B$=$l$G$b$J$*#4#0;~4VI,MW$G$9!#(B
 685.735 +
 685.736 +\emph{bisect} $B3HD%$O!"(B
 685.737 +$B3NG'$9$k%A%'%s%8%;%C%H?t$KBP$7$F(B\emph{$BBP?t(B}$B$N%*!<%@!<$G8!:w(B
 685.738 +$B!J$3$N<o$N8!:w$O(B``$BFsJ,C5:w(B''$B$H8F$P$l$^$9!K$G$-$k$h$&$K!"(B
 685.739 +$B%W%m%8%'%/%HMzNr$N(B``$B7A(B''$B$K4X$9$k>pJs$rMxMQ$7$^$9!#(B
 685.740 +$B$3$NJ}K!$K$h$j!"(B
 685.741 +$B2>$K%F%9%H$"$?$j$N=jMW;~4V$,#1#0J,3]$+$k$H$7$F$b!"(B
 685.742 +$B#1K|%A%'%s%8%;%C%H$KBP$9$k8!:w$O#2;~4V0JFb$G=*$o$j$^$9!#(B
 685.743 +$B8!:wBP>]$r:G?7$N#5#0#0%A%'%s%8%;%C%H$K8BDj$G$-$k$J$i$P!"(B
 685.744 +$B#1;~4V0JFb$K8!:w$G$-$k$G$7$g$&!#(B
 685.745 +
 685.746 +\hgext{bisect} $B3HD%$O!"(B
 685.747 +Mercurial $B$G4IM}$5$l$F$$$k%W%m%8%'%/%H$NMzNr$N;}$D(B
 685.748 +``$B;^J,$+$l(B''$B$NFC<A$r$o$+$C$F$$$^$9$N$G!"(B
 685.749 +$B%j%]%8%H%j$K$*$1$k;^J,$+$l!&%^!<%8!&J#?t%X%C%I$N07$$$bLdBj$"$j$^$;$s!#(B
 685.750 +$BC10l$ND4::$GMzNr$N;^J,$+$lA4BN$r4"$j<h$k(B\footnote{$BLuCm(B:
 685.751 +$B!V;^J,$+$l@hA4BN$r8!:wBP>]$+$i=|30$9$k!W$N0U(B}$B$3$H$,$G$-$k$?$a!"(B
 685.752 +\hgext{bisect} $B3HD%$O8zN(E*$K8!:w$9$k$3$H$,$G$-$k$N$G$9!#(B
 685.753 +
 685.754 +\subsection{Using the \hgext{bisect} extension}
 685.755 +
 685.756 +$B$3$3$G$O(B \hgext{bisect} $B3HD%$N<B9TNc$r<($7$^$9!#(B
 685.757 +Mercurial $B<+BN$N4JJX@-$r0];}$9$k$?$a$K!"(B
 685.758 +\hgext{bisect} $B$O3HD%5!G=$H$7$FDs6!$5$l$^$9!#(B
 685.759 +$B$=$N$?$a!"L@<(E*$KM-8z$K$7$J$1$l$P!"$=$N5!G=$ODs6!$5$l$^$;$s!#(B
 685.760 +\hgext{bisect} $B3HD%$rM-8z$K$9$k$K$O!"(B
 685.761 +$B!JB8:_$7$J$$>l9g$K$O!K(B \hgrc\ $B$K0J2<$N%;%/%7%g%s%X%C%@$rDI2C$7!'(B
 685.762 +
 685.763 +\begin{codesample2}
 685.764 +  [extensions]
 685.765 +\end{codesample2}
 685.766 +
 685.767 +$BB3$$$F!"(B\hgext{bisect} $B3HD%$rM-8z2=$9$k$?$a$N9T$r$3$N%;%/%7%g%s$KDI2C$7$^$9(B
 685.768 +\footnote{1.0 $BHG0J9_$N(B Mercurial $B$G$O!"(B
 685.769 +\hgext{bisect} $B5!G=$O4pK\5!G=$K<h$j9~$^$l$F$$$^$9$N$G!"(B
 685.770 +$B!V3HD%5!G=$NM-8z2=!W$OITMW$G$9(B}$B!#(B
 685.771 +
 685.772 +\begin{codesample2}
 685.773 +  hbisect =
 685.774 +\end{codesample2}
 685.775 +
 685.776 +\begin{note}
 685.777 +  \hgext{bisect} $B3HD%$NL>A0$N@hF,$K(B``\texttt{h}''$B$,IU$/$N$O4V0c$C$F$$$^$;$s!#(B
 685.778 +  $B$3$NJ8;z$,IU$/$N$O!"(BMercurial $B$,(B Python $B$G<BAu$5$l$F$$$F!"(B
 685.779 +  Python $B$NI8=`%i%$%V%i%j$N(B \texttt{bisect} $B$r;HMQ$7$F$$$k$?$a$G$9!#(B
 685.780 +  $B8m$C$F(B ``\texttt{hbisect}''$B$+$i(B``\texttt{h}''$B$r>JN,$7$?>l9g!"(B
 685.781 +  \hgrc $B%U%!%$%k$N5-=R$N%9%Z%k$r=$@5$9$k$^$G$O!"(B
 685.782 +  Mercurial $B$O(B Python $BI8=`$N(B \texttt{bisect} $B%Q%C%1!<%8$r8+$D$1=P$7!"(B
 685.783 +  $B$=$l$r(B Mercurial $B3HD%$H$7$FMxMQ$7$h$&$H$7$F%/%i%C%7%e$7B3$1$k$3$H$G$7$g$&!#(B
 685.784 +\end{note}
 685.785 +
 685.786 +\hgext{bisect} $B3HD%$r3VN%$7$FMxMQ$9$k$?$a$K!"(B
 685.787 +$B%j%]%8%H%j$r:n@.$7$^$7$g$&!#(B
 685.788 +
 685.789 +\interaction{bisect.init}
 685.790 +
 685.791 +$B%k!<%W$K$h$C$F4v$D$+$N:3:Y$JJQ99$r9T$$!"(B
 685.792 +$B$=$NCf$NFCDj$NJQ99$,(B``$B%P%0(B''$B$r;}$D$h$&$K$9$k!"(B
 685.793 +$B$H$$$&C1=c$JJ}K!$G!"(B
 685.794 +$B%P%0$r;}$C$?%W%m%8%'%/%H$N%7%_%e%l!<%7%g%s$r9T$$$^$9!#(B
 685.795 +$B$3$N%k!<%W$O(B 50 $B$N%A%'%s%8%;%C%H$r@8@.$7!"(B
 685.796 +$B$=$l$>$l$,#1$D$N%U%!%$%k$r%j%]%8%H%j$KDI2C$7$^$9!#(B
 685.797 +$B$3$3$G$O!"(B
 685.798 +$B%U%!%$%k$,(B``i have a gub''$B$H$$$&%F%-%9%H$r4^$s$G$$$k$3$H$r$b$C$F!"(B
 685.799 +``$B%P%0(B''$B$H$_$J$7$^$9!#(B
 685.800 +
 685.801 +\interaction{bisect.commits}
 685.802 +
 685.803 +$B$=$l$G$O!"(B\hgext{bisect} $B3HD%$N;HMQJ}K!$rM}2r$7$^$7$g$&!#(B
 685.804 +\hgext{bisect} $B3HD%$K4X$7$F$b!"(B
 685.805 +$BDL>o$N(B Mercurial $B$NAH$_9~$_(B help $B5!G=$,;HMQ$G$-$^$9!#(B
 685.806 +
 685.807 +\interaction{bisect.help}
 685.808 +
 685.809 +\hgext{bisect} $B3HD%$OCJ3,$rF'$s$G5!G=$7$^$9!#(B
 685.810 +$B3FCJ3,$O0J2<$N$h$&$K?J$_$^$9!#(B
 685.811 +
 685.812 +\begin{enumerate}
 685.813 +\item $B#2CM%F%9%H$r<B9T$7$^$9!#(B
 685.814 +  \begin{itemize}
 685.815 +  \item $B%F%9%H$,@.8y$7$?>l9g!"(B
 685.816 +    \hgcmdargs{bisect}{good} $B%3%^%s%I$K$h$j(B 
 685.817 +    \hgext{bisect} $B3HD%$K$=$N$3$H$rEA$($^$9!#(B
 685.818 +  \item $B%F%9%H$,<:GT$7$?>l9g!"(B
 685.819 +    \hgcmdargs{bisect}{bad} $B%3%^%s%I$K$h$j(B
 685.820 +    \hgext{bisect} $B3HD%$K$=$N$3$H$rEA$($^$9!#(B
 685.821 +  \end{itemize}
 685.822 +\item \hgext{bisect} $B3HD%$OEA$($i$l$?>pJs$r85$K!"(B
 685.823 +  $B<!$K%F%9%H$9$Y$-%A%'%s%8%;%C%H$r7hDj$7$^$9!#(B
 685.824 +
 685.825 +\item \hgext{bisect} $B3HD%$O!"(B
 685.826 +  $B:n6HNN0h%G%#%l%/%H%j$r$=$N%A%'%s%8%;%C%H$G99?7$7$^$9$N$G!"(B
 685.827 +  $B0J>e$N<j=g$r7+$jJV$7$^$9!#(B
 685.828 +
 685.829 +\end{enumerate}
 685.830 +
 685.831 +$B#2CM%F%9%H$N7k2L$,(B``$B@.8y(B''$B$+$i(B``$B<:GT(B''$B$KJQ2=$7$?E@$r<($9!"(B
 685.832 +$B0l0U$J%A%'%s%8%;%C%H$r(B \hgext{bisect} $B3HD%$,FCDj$G$-$?;~E@$G!"(B
 685.833 +$B$3$N<j=g$O=*N;$7$^$9!#(B
 685.834 +
 685.835 +$B8!:w$N3+;O$KEv$?$C$F$O!"(B
 685.836 +\hgcmdargs{bisect}{init} $B%3%^%s%I$N<B9T$,I,MW$G$9!#(B
 685.837 +
 685.838 +\interaction{bisect.search.init}
 685.839 +
 685.840 +$B:#2s$N<B9TNc$G;HMQ$9$k#2CM%F%9%H$O4JC1$J$b$N$G!"(B
 685.841 +$B%j%]%8%H%jCf$N2?$l$+$N%U%!%$%k$,(B
 685.842 +``i have a gub'' $BJ8;zNs$r4^$s$G$$$k$+H]$+$rH=Dj$7$^$9!#(B
 685.843 +$B4^$s$G$$$k>l9g!"$=$N%A%'%s%8%;%C%H$O(B
 685.844 +``$B%P%0$NMW0x$H$J$k(B''$B%A%'%s%8%;%C%H$G$9!#(B
 685.845 +$B47=,>e!"(B
 685.846 +$B8!:wBP>]$H$J$kFC@-$r;}$C$F$$$k%A%'%s%8%;%C%H$r(B ``bad''$B!"(B
 685.847 +$B;}$C$F$$$J$$%A%'%s%8%;%C%H$r(B ``good'' $B$H8F$S$^$9!#(B
 685.848 +$BB?$/$N>l9g!"(B
 685.849 +$B:n6HNN0h%G%#%l%/%H%j$,F14|$7$F$$$k%j%S%8%g%s!JDL>o$O(B tip$B!K(B
 685.850 +$B$O%P%0$r;}$D%A%'%s%8%;%C%H$K$h$jLdBj$rJz$($F$$$k$b$N$G$9$+$i!"(B
 685.851 +$B$3$l$r(B``bad''$B$H$_$J$7$^$9!#(B
 685.852 +
 685.853 +\interaction{bisect.search.bad-init}
 685.854 +
 685.855 +$B<!$N:n6H$O!"(B
 685.856 +$B%P%0$,(B\emph{$BL5$$(B}$B%A%'%s%8%;%C%H$r;XDj$9$k$3$H$G$9!#(B
 685.857 +\hgext{bisect} $B3HD%$O(B
 685.858 +$B:G=i$N(B ``good'' $B$H(B ``bad'' $B$N%A%'%s%8%;%C%H4V$N8!::>u67$r(B
 685.859 +``$B3g8L(B''$B$G3g$C$FI=<($9$k$G$7$g$&!#(B
 685.860 +$B:#2s$N;vNc$G$O!"(B
 685.861 +$B%j%S%8%g%s(B 10 $B$K$O%P%0$,$"$j$^$;$s(B
 685.862 +$B!J:G=i$N(B ``good'' $B%A%'%s%8%;%C%H$NA*Br$K4X$7$F$O!"(B
 685.863 +$B8e$[$IJdB-$,$"$j$^$9!K!#(B
 685.864 +
 685.865 +\interaction{bisect.search.good-init}
 685.866 +
 685.867 +$B%3%^%s%I=PNO$K$O0J2<$N0UL#$,$"$j$^$9!#(B
 685.868 +
 685.869 +\begin{itemize}
 685.870 +\item $B%P%0$r$b$?$i$7$?%A%'%s%8%;%C%H$NFCDj$^$G$K!"(B
 685.871 +  $B$I$l$@$1$N%A%'%s%8%;%C%H$KBP$7$F9MN8$,I,MW$G$"$k$+!"(B
 685.872 +  $B$^$?!"$I$l$@$1$N%F%9%H$rMW5a$9$k$+$rI=<($7$^$9!#(B
 685.873 +
 685.874 +\item \hgext{bisect} 
 685.875 +  $B3HD%$O<!$K%F%9%H$9$Y$-%A%'%s%8%;%C%H$X$H:n6HNN0h%G%#%l%/%H%j$r99?7$7!"(B
 685.876 +  $B$I$N%A%'%s%8%;%C%H$,%F%9%HBP>]$G$"$k$N$+$rI=<($7$^$9!#(B
 685.877 +
 685.878 +\end{itemize}
 685.879 +
 685.880 +$BAaB.:n6HNN0h%G%#%l%/%H%j$G%F%9%H$r$7$F$_$^$7$g$&!#(B
 685.881 +\command{grep} $B$r;HMQ$7$F!"(B
 685.882 +$B:n6HNN0h%G%#%l%/%H%j$N(B``bad''$B%U%!%$%k$NM-L5$rD4$Y!"(B
 685.883 +$B%U%!%$%k$,L5$1$l$P$=$N%j%S%8%g%s$O(B``good''$B$G$9!#(B
 685.884 +
 685.885 +\interaction{bisect.search.step1}
 685.886 +
 685.887 +$B$3$N%F%9%H$O40A4$K<+F02=$G$-$=$&$G$9$N$G!"(B
 685.888 +$B%7%'%k4X?t$K$7$F$7$^$$$^$7$g$&!#(B
 685.889 +
 685.890 +\interaction{bisect.search.mytest}
 685.891 +
 685.892 +$B$3$l$G!"(B
 685.893 +$B%F%9%H<j=gA4BN$rC10l$N(B
 685.894 +\texttt{mytest} $B%3%^%s%I$G<B9T$G$-$^$9!#(B
 685.895 +
 685.896 +\interaction{bisect.search.step2}
 685.897 +
 685.898 +$B%F%9%H<j=g$,5-O?$5$l$?%3%^%s%I$r$"$H?t2s5/F0$9$k$3$H$G!"(B
 685.899 +$BEv=i$NL\E*$,C#@.$5$l$^$9!#(B
 685.900 +
 685.901 +\interaction{bisect.search.rest}
 685.902 +
 685.903 +40 $BDx$N%A%'%s%8%;%C%HA4BN$N8!:w$K$b4X$o$i$:!"(B
 685.904 +\hgext{bisect} 
 685.905 +$B3HD%$O$o$:$+#52s$N%F%9%H$G(B``$B%P%0(B''$B$r$b$?$i$7$?%A%'%s%8%;%C%H$rFCDj$G$-$^$7$?!#(B
 685.906 +$BD4::BP>]%A%'%s%8%;%C%H?t$KBP$7$F!"(B
 685.907 +\hgext{bisect} $B3HD%$OBP?t$N%*!<%@!<$G%F%9%HBP>]$rA*Dj$9$k$N$G!"(B
 685.908 +$B%A%'%s%8%;%C%H$rDI2C$7$?$@$1%F%9%H2s?t$,A}2C$9$k(B
 685.909 +``$BNO?T$/(B''$B$N<jK!$h$j$bM-Mx$G$9!#(B
 685.910 +
 685.911 +\subsection{Cleaning up after your search}
 685.912 +
 685.913 +$B%j%]%8%H%j$K$*$1$k(B \hgext{bisect} $B3HD%$N;HMQ$,=*$o$C$?$J$i!"(B
 685.914 +$B8!:w$K;HMQ$7$F$$$?>pJs$r(B
 685.915 +\hgcmdargs{bisect}{reset} $B%3%^%s%I$K$h$jGK4~$9$k$3$H$,$G$-$^$9!#(B
 685.916 +\hgext{bisect} $B3HD%$O$=$l$[$IB?$/$NNN0h$r>CHq$9$k$o$1$G$O$"$j$^$;$s$N$G!"(B
 685.917 +$B$3$N:n6H$rK:$l$F$bLdBj$K$O$J$j$^$;$s!#(B
 685.918 +$B$7$+$7!"(B\hgcmdargs{bisect}{reset} $B$r<B9T$9$k$^$G$O!"(B
 685.919 +\hgext{bisect} $B$O$=$N%j%]%8%H%j$GJL$N8!:w$r3+;O$5$;$F$/$l$^$;$s!#(B
 685.920 +
 685.921 +\interaction{bisect.search.reset}
 685.922 +
 685.923 +\section{Tips for finding bugs effectively}
 685.924 +
 685.925 +\subsection{Give consistent input}
 685.926 +
 685.927 +\hgext{bisect} $B3HD%$K$O!"(B
 685.928 +$B<B;\$7$?A4$F$N%F%9%H$N7k2L$,@5$7$/;XDj$5$l$J$1$l$P$J$j$^$;$s!#(B
 685.929 +$BK\Ev$O%F%9%H$,@.8y$7$F$$$?$K$b4X$o$i$:!"(B
 685.930 +$B%F%9%H$N<:GT$r(B \hgext{bisect} $B3HD%$KEA$($?>l9g!"(B
 685.931 +$BL7=b$7$?7k2L$r=P$9(B\emph{$B$+$b(B}$B$7$l$^$;$s!#(B
 685.932 +$B%F%9%H7k2L$KBP$7$FL7=b$,8!CN$5$l$?>l9g!"(B
 685.933 +\hgext{bisect} $B$O!"(B
 685.934 +$BFCDj$N%A%'%s%8%;%C%H$,(B``good''$B$G$b(B``bad''$B$G$b$"$k!"(B
 685.935 +$B$H8@$C$F$-$^$9!#(B
 685.936 +$B$7$+$7!"$3$N8!CN$O40`z$K9T$o$l$k$o$1$G$O$J$$$N$G!"(B
 685.937 +$B4V0c$C$?%A%'%s%8%;%C%H$r%P%0$NMW0x$H$7$FJs9p$9$k$G$7$g$&!#(B
 685.938 +
 685.939 +\subsection{Automate as much as possible}
 685.940 +
 685.941 +$BI.<T$,(B \hgext{bisect} $B3HD%$r;H$$;O$a$?:"$O!"(B
 685.942 +$B8!:w$N$?$a$N%F%9%H$r%3%^%s%I%i%$%s$G<jF0$G<B9T$7$F$$$^$7$?$,!"(B
 685.943 +$B>/$J$/$H$b;d$K$O!"$3$N<jK!$OFk@w$_$^$;$s!#(B
 685.944 +$B2?EY$+(B \hgext{bisect} $B$r;HMQ$7$?8e$G!"(B
 685.945 +$B:G=*E*$K@5$7$$7k2L$rF@$kA0$K!"(B
 685.946 +$B$$$D$b<j0c$$$N$?$a$K2?EY$b8!:w$r$d$jD>$7$F$$$k$3$H$K5$IU$-$^$7$?!#(B
 685.947 +
 685.948 +\hgext{bisect} $B3HD%$r<jF0$G6nF0$7$F$$$?:]$K$O!"(B
 685.949 +$B>.$5$J%j%]%8%H%j$K$*$1$kC1=c$J8!:w$G$"$C$F$bLdBj$,H/@8$7$F$$$^$7$?!#(B
 685.950 +$B%F%9%H$NFbMF$,J#;($G$"$C$?$j!"(B
 685.951 +\hgext{bisect} $B$,MW5a$9$k%F%9%H<B9T2s?t$,A}$($l$P!"(B
 685.952 +$B$=$l$@$1%F%9%H<B9T$K$*$1$kA`:n%_%9$N2DG=@-$O9b$^$j$^$9!#(B
 685.953 +$B%F%9%H$r<+F02=$9$k$h$&$K$J$C$F0JMh!"(B
 685.954 +$BHs>o$KNI9%$J7k2L$rF@$i$l$F$$$^$9!#(B
 685.955 +
 685.956 +$B%F%9%H<+F02=$N$?$a$N80$O#2$D$"$j$^$9!#(B
 685.957 +
 685.958 +\begin{itemize}
 685.959 +\item $B>o$KF1$8!V>I>u!W$r%F%9%H$9$k$3$H$H!"(B
 685.960 +\item $B>o$K0l4S$7$?F~NO$r(B \hgcmd{bisect} $B%3%^%s%I$KM?$($k$3$H(B
 685.961 +\end{itemize}
 685.962 +
 685.963 +$BA0=R$N<B9TNc$G$O!"(B
 685.964 +\command{grep} $B%3%^%s%I$K$h$j!V>I>u!W$rD4$Y$F$$$F!"(B
 685.965 +\texttt{if} $B%9%F!<%H%a%s%H$,!V8!::!W$N7k2L$r<u$1$F(B
 685.966 +\hgcmd{bisect} $B%3%^%s%I$KF1$8F~NO$rM?$($k$3$H$rJ]>Z$7$F$$$^$7$?!#(B
 685.967 +\texttt{mytest} $B4X?t$,!"(B
 685.968 +$B$3$l$i$r:F8=$7$d$9$$7A<0$KE}9g$7$?$3$H$G!"(B
 685.969 +$BA4$F$N%F%9%H$,6Q0l$G@09g@-$N<h$l$?$b$N$K$J$C$F$$$^$9!#(B
 685.970 +
 685.971 +\subsection{Check your results}
 685.972 +
 685.973 +\hgext{bisect} $B$K$h$k8!:w$N=PNO7k2L$OM?$($?>pJsDxEY$K$7$+@5$7$/$J$$$N$G!"(B
 685.974 +\hgext{bisect} $B$K$h$j(B ``good'' $B$HJs9p$5$l$?%A%'%s%8%;%C%H$r!"(B
 685.975 +$B@dBPE*$K@5$7$$$b$N$H$_$J$5$J$$$G$/$@$5$$!#(B
 685.976 +$BJs9pFbMF$r%/%m%9%A%'%C%/$9$k4JC1$JJ}K!$O!"(B
 685.977 +$B0J2<$N$h$&$J%A%'%s%8%;%C%H$N$=$l$>$l$KBP$7$F!"(B
 685.978 +$B<jF0$G<+?H$N%F%9%H$r<B9T$7$F$_$k$3$H$G$9!#(B
 685.979 +
 685.980 +\begin{itemize}
 685.981 +\item $B:G=i$N(B ``bad'' $B%j%S%8%g%s$G$"$k$HJs9p$5$l$?$b$N(B
 685.982 +  $B!J0J2<!"!V>c32%A%'%s%8%;%C%H!W$H8F>N!K!#(B
 685.983 +  $B$"$J$?$N%F%9%H$O$3$l$K4X$7$F(B ``bad'' $B$HJs9p$7$J$1$l$P$J$j$^$;$s!#(B
 685.984 +
 685.985 +\item $B>e5-%A%'%s%8%;%C%H$N?F%A%'%s%8%;%C%H(B
 685.986 +  $B!J%^!<%8$5$l$?>l9g$ON>J}$N?F!K!#(B
 685.987 +  $B$"$J$?$N%F%9%H$O$3$l!J$3$l$i!K$K4X$7$F(B ``good'' $B$HJs9p$7$J$1$l$P$J$j$^$;$s!#(B
 685.988 +
 685.989 +\item $B>c32%A%'%s%8%;%C%H$N;R%A%'%s%8%;%C%H!#(B
 685.990 +  $B$"$J$?$N%F%9%H$O$3$l$K4X$7$F(B ``bad'' $B$HJs9p$7$J$1$l$P$J$j$^$;$s!#(B
 685.991 +
 685.992 +\end{itemize}
 685.993 +
 685.994 +\subsection{Beware interference between bugs}
 685.995 +
 685.996 +$B$"$k%P%0$rC5$9:]$K!"(B
 685.997 +$BB>$N%P%0$NB8:_$K$h$j:.Mp$5$;$i$l$k2DG=@-$b$"$j$^$9!#(B
 685.998 +$BNc$($P!"(B
 685.999 +$B%j%S%8%g%s(B 100 $B$G%=%U%H%&%'%"$,%/%i%C%7%e$7!"(B
685.1000 +$B%j%S%8%g%s(B 50 $B$G$O@5$7$/F0:n$7$F$$$?$H$7$^$9!#(B
685.1001 +$B$"$J$?$NCN$i$J$$4V$K!"(B
685.1002 +$B%=%U%H%&%'%"$r%/%i%C%7%e$5$;$kJL$N%P%0$r!"(B
685.1003 +$BB>$N?M$,%j%S%8%g%s(B 60 $B$GF~$l$F$7$^$$!"(B
685.1004 +$B$=$l$r%j%S%8%g%s(B 80 $B$G=$@5$7$?>l9g!"(B
685.1005 +$B$J$s$i$+$NJ}K!$G8!:w7k2L$r:.Mp$5$;$k$+$b$7$l$^$;$s!#(B
685.1006 +
685.1007 +$BB>$N%P%0$NB8:_$K$h$C$F!"(B
685.1008 +$BC5$7$F$$$k%P%0$,40A4$K(B``$BJ$$$1#$5$l$k(B''$B$+$b$7$l$:!"(B
685.1009 +$BC5$7$F$$$k%P%0$,$=$NB8:_$r<($95!2q$rF@$kA0$KB>$N%P%0$,H/@8$7$F$$$k!"(B
685.1010 +$B$H8@$($^$9!#(B
685.1011 +$BB>$N%P%0$r2sHr$7$?%F%9%H$,(B
685.1012 +$B!JNc$($P!"$=$N%P%0$,%W%m%8%'%/%H$N%S%k%I$rAK32$9$k$J$I$NM}M3$G!K(B
685.1013 +$B$G$-$J$$$?$a$K!"(B
685.1014 +$BFCDj$N%A%'%s%8%;%C%H$K$*$1$k8!:wBP>]$N%P%0$NM-L5$rL@8@$G$-$J$$>l9g!"(B
685.1015 +\hgext{bisect} $B3HD%$N=u$1$rD>@\<u$1$k$3$H$O$G$-$^$;$s!#(B
685.1016 +$B$=$NBX$o$j!"(B
685.1017 +$BB>$N%P%0$,B8:_$9$k%A%'%s%8%;%C%H$r<jF0$G<h$j=|$/$3$H$G!"(B
685.1018 +``$B<~JU(B''$B$G$NJL$J8!:w$r9T$$$^$7$g$&!#(B
685.1019 +
685.1020 +$B%P%0$NB8:_$K4X$9$k%F%9%H$,==J,L@3N$G$J$$>l9g$K$O!"(B
685.1021 +$BJL$JLdBj$,H/@8$7F@$^$9!#(B
685.1022 +``$B%W%m%0%i%`$N%/%i%C%7%e(B''$B$G%P%0$NM-L5$r3NG'$7$F$$$k>l9g!"(B
685.1023 +$B%=%U%H%&%'%"$r%/%i%C%7%e$5$;$kA4A34X78$J$$%P%0$K$h$j!"(B
685.1024 +$B8!:wBP>]$G$"$k%P%0$,J$$$1#$5$l$F$7$^$$!"(B
685.1025 +$BN>J}$H$bF1$8$b$N$H$_$J$5$l$k$?$a$K!"(B
685.1026 +\hgext{bisect} $B$,OG$o$5$l$F$7$^$$$^$9!#(B
685.1027 +
685.1028 +\subsection{Bracket your search lazily}
685.1029 +
685.1030 +$B8!:w$K$*$1$k=*C<$N0u$H$J$k(B
685.1031 +``good'' $B$*$h$S(B ``bad'' $B$J%A%'%s%8%;%C%H$N:G=i$NA*Br$O!"(B
685.1032 +$BDL>o$O4JC1$J$3$H$G$9$,!"(B
685.1033 +$B$=$&$G$"$C$F$bB?>/$O5DO@$NM>CO$,$"$j$^$9!#(B
685.1034 +\hgext{bisect} $B$NN)>l$+$i8+$?>l9g!"(B
685.1035 +``$B:G?7(B''$B$N%A%'%s%8%;%C%H$ODLNc$G$O(B``bad''$B$G!"(B
685.1036 +$B:G8E$N%A%'%s%8%;%C%H$O(B``good''$B$G$9!#(B
685.1037 +
685.1038 +\hgext{bisect} $B$N;HMQ$KEv$?$C$F(B
685.1039 +``good''$B$K$U$5$o$7$$%A%'%s%8%;%C%H$,$I$l$+$r;W$$=P$9$N$,Fq$7$$>l9g$K$O!"(B
685.1040 +$B$G$?$i$a$K%F%9%H$9$k$N$b0-$/$O$J$$$G$7$g$&!#(B
685.1041 +$B$I$&$"$C$F$b%P%0$NC{8u$,8+=P$;$J$$(B
685.1042 +$B!JNc$($P!"%P%0$NH/@8$K4XO"$9$k5!G=$,$^$@Ds6!$5$l$F$$$J$$!K$b$N$d!"(B
685.1043 +$BB>$NLdBj$,!JA0=R$7$?$h$&$K!K%P%0$rJ$$$1#$7$F$7$^$&$h$&$J$b$N$r!"(B
685.1044 +$B%F%9%H8uJd$N%A%'%s%8%;%C%H$+$i=|30$9$k$N$rK:$l$J$$$h$&$K$7$^$7$g$&!#(B
685.1045 +
685.1046 +$B?t@i$N%A%'%s%8%;%C%H!"(B
685.1047 +$B$J$$$7?t%v7n$NMzNr$N(B``$B=i4|(B''$B$N$b$N$,:G=*7k2L$@$C$?$H$7$F$b!"(B
685.1048 +$BBP?t%*!<%@!<$N?6$kIq$$$N$*1"$G!"(B
685.1049 +\hgext{bisect} $B$,<B;\$7$J$1$l$P$J$i$J$$Am2s?t$,?t2sA}$($k$@$1$G$9!#(B
685.1050 +
685.1051 +%%% Local Variables: 
685.1052 +%%% mode: latex
685.1053 +%%% TeX-master: "00book"
685.1054 +%%% End: 
   686.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   686.2 +++ b/ja/variant.el	Sun Aug 16 03:41:39 2009 +0200
   686.3 @@ -0,0 +1,54 @@
   686.4 +(setq wellknown
   686.5 +      '(("write" "$B<BAu(B")
   686.6 +        ("writing" "$B<BAu(B")
   686.7 +
   686.8 +        ("tarball" "tarball")
   686.9 +
  686.10 +        ("patch queue" "$B%Q%C%A%-%e!<(B(?)")
  686.11 +        ("patch" "$B%Q%C%A(B")
  686.12 +        ("patches" "$B%Q%C%A(B")
  686.13 +        
  686.14 +        ("extension" "$B%$%/%9%F%s%7%g%s(B")
  686.15 +        ("daemon" "$B%G!<%b%s(B")
  686.16 +
  686.17 +        ("configuration item" "$B@_Dj9`L\(B")
  686.18 +        ("by default" "$B4pDlF0:n(B") ;; !$B4{Dj(B
  686.19 +
  686.20 +        ("revision control" "$B9=@.4IM}(B")
  686.21 +        ("revision" "$B%j%S%8%g%s(B")
  686.22 +        ("revisions" "$B%j%S%8%g%s(B")
  686.23 +        ("working directory" "$B:n6HNN0h%G%#%l%/%H%j(B")
  686.24 +        ("refresh" "refresh")
  686.25 +        ("refreshes" "refresh")
  686.26 +        ("refreshing" "refresh")
  686.27 +        ("stack" "$B@Q$_=E$M(B" "$B%9%?%C%/(B")
  686.28 +        ("popped" "$B<h$j=|$+$l$?(B")
  686.29 +        ("branch" "$B%V%i%s%A(B")
  686.30 +
  686.31 +        ("hunk" "hunk")
  686.32 +        ("context" "$B%3%s%F%-%9%H(B")
  686.33 +        ("offset" "$B%*%U%;%C%H(B")
  686.34 +
  686.35 +        ("fuzz" "$B$"$$$^$$(B")
  686.36 +        ("rejection" "$B5Q2<(B")
  686.37 +        ("reject" "$B5Q2<(B")
  686.38 +
  686.39 +        ("rebase" "$B%j%Y!<%9(B")
  686.40 +
  686.41 +        ("commit" "$B%3%_%C%H(B")
  686.42 +        ("merge" "$B%^!<%8(B")
  686.43 +        ("head" "head? $B%X%C%I(B?" )
  686.44 +
  686.45 +        ("backport" "$B%P%C%/%]!<%H(B")
  686.46 +        ("distribution" "$B%G%#%9%H%j%S%e!<%7%g%s(B")
  686.47 +        ("platform" "$B%W%i%C%H%[!<%`(B")
  686.48 +        ))
  686.49 +
  686.50 +(setq japanese-variant
  686.51 +      '(("$B$G$-$k(B" "$B=PMh(B")
  686.52 +        ("$B$$$k(B" "$B5o$k(B")
  686.53 +        ("$B$$$/$D(B" "$B4v$D(B")
  686.54 +        ("$B?7$7$$(B" "$B?75,(B")
  686.55 +        ("$B$[$H$s$I(B" "$BKX$I(B")
  686.56 +        ("$B$"$$$^$$(B" "$B[#Kf(B")
  686.57 +        ))
  686.58 \ No newline at end of file
   687.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   687.2 +++ b/ja/wdir-after-commit.svg	Sun Aug 16 03:41:39 2009 +0200
   687.3 @@ -0,0 +1,394 @@
   687.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   687.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   687.6 +<svg
   687.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   687.8 +   xmlns:cc="http://web.resource.org/cc/"
   687.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  687.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  687.11 +   xmlns="http://www.w3.org/2000/svg"
  687.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  687.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  687.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  687.15 +   width="744.09448819"
  687.16 +   height="1052.3622047"
  687.17 +   id="svg5971"
  687.18 +   sodipodi:version="0.32"
  687.19 +   inkscape:version="0.44.1"
  687.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  687.21 +   sodipodi:docname="wdir-after-commit.svg">
  687.22 +  <defs
  687.23 +     id="defs5973">
  687.24 +    <linearGradient
  687.25 +       inkscape:collect="always"
  687.26 +       xlink:href="#linearGradient6049"
  687.27 +       id="linearGradient6445"
  687.28 +       gradientUnits="userSpaceOnUse"
  687.29 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  687.30 +       x1="333.91171"
  687.31 +       y1="488.79077"
  687.32 +       x2="508.94543"
  687.33 +       y2="263.79077" />
  687.34 +    <marker
  687.35 +       inkscape:stockid="Arrow1Mstart"
  687.36 +       orient="auto"
  687.37 +       refY="0.0"
  687.38 +       refX="0.0"
  687.39 +       id="Arrow1Mstart"
  687.40 +       style="overflow:visible">
  687.41 +      <path
  687.42 +         id="path4855"
  687.43 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  687.44 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  687.45 +         transform="scale(0.4) translate(10,0)" />
  687.46 +    </marker>
  687.47 +    <linearGradient
  687.48 +       id="linearGradient6049">
  687.49 +      <stop
  687.50 +         style="stop-color:#686868;stop-opacity:1;"
  687.51 +         offset="0"
  687.52 +         id="stop6051" />
  687.53 +      <stop
  687.54 +         style="stop-color:#f0f0f0;stop-opacity:1;"
  687.55 +         offset="1"
  687.56 +         id="stop6053" />
  687.57 +    </linearGradient>
  687.58 +    <marker
  687.59 +       inkscape:stockid="Arrow1Mend"
  687.60 +       orient="auto"
  687.61 +       refY="0.0"
  687.62 +       refX="0.0"
  687.63 +       id="Arrow1Mend"
  687.64 +       style="overflow:visible;">
  687.65 +      <path
  687.66 +         id="path4852"
  687.67 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  687.68 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  687.69 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  687.70 +    </marker>
  687.71 +    <linearGradient
  687.72 +       inkscape:collect="always"
  687.73 +       xlink:href="#linearGradient6049"
  687.74 +       id="linearGradient6083"
  687.75 +       gradientUnits="userSpaceOnUse"
  687.76 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  687.77 +       x1="333.91171"
  687.78 +       y1="488.79077"
  687.79 +       x2="508.94543"
  687.80 +       y2="263.79077" />
  687.81 +    <linearGradient
  687.82 +       inkscape:collect="always"
  687.83 +       xlink:href="#linearGradient6049"
  687.84 +       id="linearGradient6142"
  687.85 +       gradientUnits="userSpaceOnUse"
  687.86 +       gradientTransform="translate(-42.00893,-30.49544)"
  687.87 +       x1="333.91171"
  687.88 +       y1="488.79077"
  687.89 +       x2="508.94543"
  687.90 +       y2="263.79077" />
  687.91 +    <linearGradient
  687.92 +       inkscape:collect="always"
  687.93 +       xlink:href="#linearGradient6049"
  687.94 +       id="linearGradient6193"
  687.95 +       gradientUnits="userSpaceOnUse"
  687.96 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  687.97 +       x1="333.91171"
  687.98 +       y1="488.79077"
  687.99 +       x2="508.94543"
 687.100 +       y2="263.79077" />
 687.101 +    <linearGradient
 687.102 +       inkscape:collect="always"
 687.103 +       xlink:href="#linearGradient6049"
 687.104 +       id="linearGradient6216"
 687.105 +       gradientUnits="userSpaceOnUse"
 687.106 +       gradientTransform="translate(-6.0462,-0.664361)"
 687.107 +       x1="333.91171"
 687.108 +       y1="488.79077"
 687.109 +       x2="508.94543"
 687.110 +       y2="263.79077" />
 687.111 +    <linearGradient
 687.112 +       inkscape:collect="always"
 687.113 +       xlink:href="#linearGradient6049"
 687.114 +       id="linearGradient6232"
 687.115 +       gradientUnits="userSpaceOnUse"
 687.116 +       gradientTransform="matrix(1.000474,0,0,0.790947,222.8399,50.85693)"
 687.117 +       x1="333.91171"
 687.118 +       y1="488.79077"
 687.119 +       x2="508.94543"
 687.120 +       y2="263.79077" />
 687.121 +    <linearGradient
 687.122 +       inkscape:collect="always"
 687.123 +       xlink:href="#linearGradient6049"
 687.124 +       id="linearGradient6772"
 687.125 +       gradientUnits="userSpaceOnUse"
 687.126 +       gradientTransform="matrix(1.000474,0,0,0.790947,222.8399,50.85693)"
 687.127 +       x1="333.91171"
 687.128 +       y1="488.79077"
 687.129 +       x2="508.94543"
 687.130 +       y2="263.79077" />
 687.131 +  </defs>
 687.132 +  <sodipodi:namedview
 687.133 +     id="base"
 687.134 +     pagecolor="#ffffff"
 687.135 +     bordercolor="#666666"
 687.136 +     borderopacity="1.0"
 687.137 +     gridtolerance="10000"
 687.138 +     guidetolerance="10"
 687.139 +     objecttolerance="10"
 687.140 +     inkscape:pageopacity="0.0"
 687.141 +     inkscape:pageshadow="2"
 687.142 +     inkscape:zoom="0.90509668"
 687.143 +     inkscape:cx="390.0539"
 687.144 +     inkscape:cy="690.49342"
 687.145 +     inkscape:document-units="px"
 687.146 +     inkscape:current-layer="layer1"
 687.147 +     showguides="true"
 687.148 +     inkscape:guide-bbox="true"
 687.149 +     inkscape:window-width="906"
 687.150 +     inkscape:window-height="620"
 687.151 +     inkscape:window-x="0"
 687.152 +     inkscape:window-y="25">
 687.153 +    <sodipodi:guide
 687.154 +       orientation="vertical"
 687.155 +       position="-1.4285714"
 687.156 +       id="guide6022" />
 687.157 +  </sodipodi:namedview>
 687.158 +  <metadata
 687.159 +     id="metadata5976">
 687.160 +    <rdf:RDF>
 687.161 +      <cc:Work
 687.162 +         rdf:about="">
 687.163 +        <dc:format>image/svg+xml</dc:format>
 687.164 +        <dc:type
 687.165 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 687.166 +      </cc:Work>
 687.167 +    </rdf:RDF>
 687.168 +  </metadata>
 687.169 +  <g
 687.170 +     inkscape:label="Layer 1"
 687.171 +     inkscape:groupmode="layer"
 687.172 +     id="layer1">
 687.173 +    <rect
 687.174 +       y="245.98355"
 687.175 +       x="328.23956"
 687.176 +       height="258.57144"
 687.177 +       width="174.28572"
 687.178 +       id="rect6047"
 687.179 +       style="fill:url(#linearGradient6216);fill-opacity:1;stroke:#686868;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 687.180 +    <g
 687.181 +       id="g6261"
 687.182 +       transform="translate(234,0)">
 687.183 +      <rect
 687.184 +         y="258.7149"
 687.185 +         x="114.11369"
 687.186 +         height="44.537449"
 687.187 +         width="134.53746"
 687.188 +         id="rect5983"
 687.189 +         style="fill:#b1b1b1;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 687.190 +      <text
 687.191 +         id="text5985"
 687.192 +         y="284.47562"
 687.193 +         x="138.7962"
 687.194 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 687.195 +         xml:space="preserve"><tspan
 687.196 +           style="font-family:Courier"
 687.197 +           y="284.47562"
 687.198 +           x="138.7962"
 687.199 +           id="tspan5987"
 687.200 +           sodipodi:role="line">dfbbb33f3fa3</tspan></text>
 687.201 +    </g>
 687.202 +    <rect
 687.203 +       style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 687.204 +       id="rect5996"
 687.205 +       width="134.53746"
 687.206 +       height="44.537449"
 687.207 +       x="348.11371"
 687.208 +       y="320.38159" />
 687.209 +    <text
 687.210 +       xml:space="preserve"
 687.211 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 687.212 +       x="372.7962"
 687.213 +       y="346.1423"
 687.214 +       id="text5998"><tspan
 687.215 +         sodipodi:role="line"
 687.216 +         id="tspan6000"
 687.217 +         x="372.7962"
 687.218 +         y="346.1423"
 687.219 +         style="font-family:Courier">e7639888bb2f</tspan></text>
 687.220 +    <rect
 687.221 +       style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 687.222 +       id="rect6004"
 687.223 +       width="134.53746"
 687.224 +       height="44.537449"
 687.225 +       x="348.11371"
 687.226 +       y="382.04825" />
 687.227 +    <text
 687.228 +       xml:space="preserve"
 687.229 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 687.230 +       x="370.65421"
 687.231 +       y="407.80896"
 687.232 +       id="text6006"><tspan
 687.233 +         sodipodi:role="line"
 687.234 +         id="tspan6008"
 687.235 +         x="370.65421"
 687.236 +         y="407.80896"
 687.237 +         style="font-family:Courier">7b064d8bac5e</tspan></text>
 687.238 +    <path
 687.239 +       inkscape:connector-type="polyline"
 687.240 +       id="path6018"
 687.241 +       d="M 415.38242,303.62646 L 415.38242,320.00744"
 687.242 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 687.243 +    <path
 687.244 +       inkscape:connection-end="#rect6004"
 687.245 +       inkscape:connector-type="polyline"
 687.246 +       id="path6020"
 687.247 +       d="M 415.38242,365.29315 L 415.38243,381.67412"
 687.248 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 687.249 +    <rect
 687.250 +       style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 687.251 +       id="rect6039"
 687.252 +       width="134.53746"
 687.253 +       height="44.537449"
 687.254 +       x="348.11359"
 687.255 +       y="443.71487" />
 687.256 +    <text
 687.257 +       xml:space="preserve"
 687.258 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 687.259 +       x="372.79706"
 687.260 +       y="469.47556"
 687.261 +       id="text6041"><tspan
 687.262 +         sodipodi:role="line"
 687.263 +         id="tspan6043"
 687.264 +         x="372.79706"
 687.265 +         y="469.47556"
 687.266 +         style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 687.267 +    <path
 687.268 +       inkscape:connection-end="#rect6039"
 687.269 +       inkscape:connector-type="polyline"
 687.270 +       id="path6045"
 687.271 +       d="M 415.38238,426.95981 L 415.38235,443.34087"
 687.272 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 687.273 +    <text
 687.274 +       xml:space="preserve"
 687.275 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 687.276 +       x="327.66046"
 687.277 +       y="231.36218"
 687.278 +       id="text6102"><tspan
 687.279 +         sodipodi:role="line"
 687.280 +         id="tspan6104"
 687.281 +         x="327.66046"
 687.282 +         y="231.36218">History in repository</tspan></text>
 687.283 +    <rect
 687.284 +       y="245.94225"
 687.285 +       x="557.28418"
 687.286 +       height="204.51619"
 687.287 +       width="174.36833"
 687.288 +       id="rect6140"
 687.289 +       style="fill:url(#linearGradient6232);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 687.290 +    <g
 687.291 +       id="g6130"
 687.292 +       transform="translate(262.3254,24.38544)">
 687.293 +      <rect
 687.294 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 687.295 +         id="rect6106"
 687.296 +         width="134.53746"
 687.297 +         height="44.537449"
 687.298 +         x="314.87415"
 687.299 +         y="257.95059" />
 687.300 +      <text
 687.301 +         xml:space="preserve"
 687.302 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 687.303 +         x="339.55664"
 687.304 +         y="283.7113"
 687.305 +         id="text6108"><tspan
 687.306 +           sodipodi:role="line"
 687.307 +           id="tspan6110"
 687.308 +           x="339.55664"
 687.309 +           y="283.7113"
 687.310 +           style="font-family:Courier">dfbbb33f3fa3</tspan></text>
 687.311 +    </g>
 687.312 +    <g
 687.313 +       id="g6135"
 687.314 +       transform="translate(263.0396,49.83106)">
 687.315 +      <rect
 687.316 +         inkscape:transform-center-y="102.85714"
 687.317 +         inkscape:transform-center-x="129.28571"
 687.318 +         style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 687.319 +         id="rect6112"
 687.320 +         width="134.53746"
 687.321 +         height="44.537449"
 687.322 +         x="314.15985"
 687.323 +         y="326.52203" />
 687.324 +      <text
 687.325 +         inkscape:transform-center-y="102.7311"
 687.326 +         inkscape:transform-center-x="128.69672"
 687.327 +         xml:space="preserve"
 687.328 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 687.329 +         x="338.84335"
 687.330 +         y="352.28271"
 687.331 +         id="text6114"><tspan
 687.332 +           sodipodi:role="line"
 687.333 +           id="tspan6116"
 687.334 +           x="338.84335"
 687.335 +           y="352.28271"
 687.336 +           style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 687.337 +    </g>
 687.338 +    <text
 687.339 +       xml:space="preserve"
 687.340 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 687.341 +       x="576.63208"
 687.342 +       y="270.479"
 687.343 +       id="text6118"><tspan
 687.344 +         sodipodi:role="line"
 687.345 +         id="tspan6120"
 687.346 +         x="576.63208"
 687.347 +         y="270.479">First parent</tspan></text>
 687.348 +    <text
 687.349 +       xml:space="preserve"
 687.350 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 687.351 +       x="576.07544"
 687.352 +       y="364.49615"
 687.353 +       id="text6122"><tspan
 687.354 +         sodipodi:role="line"
 687.355 +         id="tspan6124"
 687.356 +         x="576.07544"
 687.357 +         y="364.49615">Second parent</tspan></text>
 687.358 +    <text
 687.359 +       xml:space="preserve"
 687.360 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 687.361 +       x="556.61743"
 687.362 +       y="231.36218"
 687.363 +       id="text6195"><tspan
 687.364 +         sodipodi:role="line"
 687.365 +         id="tspan6197"
 687.366 +         x="556.61743"
 687.367 +         y="231.36218">Parents of working directory</tspan></text>
 687.368 +    <path
 687.369 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 687.370 +       d="M 576.82542,297.63008 L 483.02528,287.95831"
 687.371 +       id="path6266"
 687.372 +       inkscape:connector-type="polyline"
 687.373 +       inkscape:connection-start="#g6130"
 687.374 +       inkscape:connection-end="#g6261" />
 687.375 +    <path
 687.376 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 687.377 +       d="M 665.12232,418.17579 L 665.12232,418.17579"
 687.378 +       id="path6270"
 687.379 +       inkscape:connector-type="polyline" />
 687.380 +    <text
 687.381 +       xml:space="preserve"
 687.382 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 687.383 +       x="316.86407"
 687.384 +       y="275.6496"
 687.385 +       id="text6573"><tspan
 687.386 +         sodipodi:role="line"
 687.387 +         id="tspan6575"
 687.388 +         x="316.86407"
 687.389 +         y="275.6496"
 687.390 +         style="text-align:end;text-anchor:end">New</tspan><tspan
 687.391 +         sodipodi:role="line"
 687.392 +         x="316.86407"
 687.393 +         y="290.6496"
 687.394 +         id="tspan6577"
 687.395 +         style="text-align:end;text-anchor:end">changeset</tspan></text>
 687.396 +  </g>
 687.397 +</svg>
   688.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   688.2 +++ b/ja/wdir-branch.svg	Sun Aug 16 03:41:39 2009 +0200
   688.3 @@ -0,0 +1,418 @@
   688.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   688.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   688.6 +<svg
   688.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   688.8 +   xmlns:cc="http://web.resource.org/cc/"
   688.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  688.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  688.11 +   xmlns="http://www.w3.org/2000/svg"
  688.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  688.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  688.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  688.15 +   width="744.09448819"
  688.16 +   height="1052.3622047"
  688.17 +   id="svg5971"
  688.18 +   sodipodi:version="0.32"
  688.19 +   inkscape:version="0.44.1"
  688.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  688.21 +   sodipodi:docname="wdir-branch.svg">
  688.22 +  <defs
  688.23 +     id="defs5973">
  688.24 +    <marker
  688.25 +       inkscape:stockid="Arrow1Mstart"
  688.26 +       orient="auto"
  688.27 +       refY="0.0"
  688.28 +       refX="0.0"
  688.29 +       id="Arrow1Mstart"
  688.30 +       style="overflow:visible">
  688.31 +      <path
  688.32 +         id="path4855"
  688.33 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  688.34 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  688.35 +         transform="scale(0.4) translate(10,0)" />
  688.36 +    </marker>
  688.37 +    <linearGradient
  688.38 +       id="linearGradient6049">
  688.39 +      <stop
  688.40 +         style="stop-color:#686868;stop-opacity:1;"
  688.41 +         offset="0"
  688.42 +         id="stop6051" />
  688.43 +      <stop
  688.44 +         style="stop-color:#f0f0f0;stop-opacity:1;"
  688.45 +         offset="1"
  688.46 +         id="stop6053" />
  688.47 +    </linearGradient>
  688.48 +    <marker
  688.49 +       inkscape:stockid="Arrow1Mend"
  688.50 +       orient="auto"
  688.51 +       refY="0.0"
  688.52 +       refX="0.0"
  688.53 +       id="Arrow1Mend"
  688.54 +       style="overflow:visible;">
  688.55 +      <path
  688.56 +         id="path4852"
  688.57 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  688.58 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  688.59 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  688.60 +    </marker>
  688.61 +    <linearGradient
  688.62 +       inkscape:collect="always"
  688.63 +       xlink:href="#linearGradient6049"
  688.64 +       id="linearGradient6083"
  688.65 +       gradientUnits="userSpaceOnUse"
  688.66 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  688.67 +       x1="333.91171"
  688.68 +       y1="488.79077"
  688.69 +       x2="508.94543"
  688.70 +       y2="263.79077" />
  688.71 +    <linearGradient
  688.72 +       inkscape:collect="always"
  688.73 +       xlink:href="#linearGradient6049"
  688.74 +       id="linearGradient6142"
  688.75 +       gradientUnits="userSpaceOnUse"
  688.76 +       gradientTransform="translate(-42.00893,-30.49544)"
  688.77 +       x1="333.91171"
  688.78 +       y1="488.79077"
  688.79 +       x2="508.94543"
  688.80 +       y2="263.79077" />
  688.81 +    <linearGradient
  688.82 +       inkscape:collect="always"
  688.83 +       xlink:href="#linearGradient6049"
  688.84 +       id="linearGradient6193"
  688.85 +       gradientUnits="userSpaceOnUse"
  688.86 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  688.87 +       x1="333.91171"
  688.88 +       y1="488.79077"
  688.89 +       x2="508.94543"
  688.90 +       y2="263.79077" />
  688.91 +    <linearGradient
  688.92 +       inkscape:collect="always"
  688.93 +       xlink:href="#linearGradient6049"
  688.94 +       id="linearGradient6216"
  688.95 +       gradientUnits="userSpaceOnUse"
  688.96 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  688.97 +       x1="333.91171"
  688.98 +       y1="488.79077"
  688.99 +       x2="508.94543"
 688.100 +       y2="263.79077" />
 688.101 +    <linearGradient
 688.102 +       inkscape:collect="always"
 688.103 +       xlink:href="#linearGradient6049"
 688.104 +       id="linearGradient6232"
 688.105 +       gradientUnits="userSpaceOnUse"
 688.106 +       gradientTransform="matrix(1.000473,0,0,0.790947,-11.16012,50.85693)"
 688.107 +       x1="333.91171"
 688.108 +       y1="488.79077"
 688.109 +       x2="508.94543"
 688.110 +       y2="263.79077" />
 688.111 +    <linearGradient
 688.112 +       inkscape:collect="always"
 688.113 +       xlink:href="#linearGradient6049"
 688.114 +       id="linearGradient6445"
 688.115 +       gradientUnits="userSpaceOnUse"
 688.116 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
 688.117 +       x1="333.91171"
 688.118 +       y1="488.79077"
 688.119 +       x2="508.94543"
 688.120 +       y2="263.79077" />
 688.121 +    <linearGradient
 688.122 +       inkscape:collect="always"
 688.123 +       xlink:href="#linearGradient6049"
 688.124 +       id="linearGradient6974"
 688.125 +       gradientUnits="userSpaceOnUse"
 688.126 +       gradientTransform="matrix(1.911882,0,0,0.789965,-574.7896,51.22599)"
 688.127 +       x1="333.91171"
 688.128 +       y1="488.79077"
 688.129 +       x2="508.94543"
 688.130 +       y2="263.79077" />
 688.131 +    <linearGradient
 688.132 +       inkscape:collect="always"
 688.133 +       xlink:href="#linearGradient6049"
 688.134 +       id="linearGradient6996"
 688.135 +       gradientUnits="userSpaceOnUse"
 688.136 +       gradientTransform="matrix(1.000473,0,0,0.790947,112.8399,50.85693)"
 688.137 +       x1="333.91171"
 688.138 +       y1="488.79077"
 688.139 +       x2="508.94543"
 688.140 +       y2="263.79077" />
 688.141 +  </defs>
 688.142 +  <sodipodi:namedview
 688.143 +     id="base"
 688.144 +     pagecolor="#ffffff"
 688.145 +     bordercolor="#666666"
 688.146 +     borderopacity="1.0"
 688.147 +     gridtolerance="10000"
 688.148 +     guidetolerance="10"
 688.149 +     objecttolerance="10"
 688.150 +     inkscape:pageopacity="0.0"
 688.151 +     inkscape:pageshadow="2"
 688.152 +     inkscape:zoom="0.90509668"
 688.153 +     inkscape:cx="345.85973"
 688.154 +     inkscape:cy="690.49342"
 688.155 +     inkscape:document-units="px"
 688.156 +     inkscape:current-layer="layer1"
 688.157 +     showguides="true"
 688.158 +     inkscape:guide-bbox="true"
 688.159 +     inkscape:window-width="906"
 688.160 +     inkscape:window-height="620"
 688.161 +     inkscape:window-x="0"
 688.162 +     inkscape:window-y="25">
 688.163 +    <sodipodi:guide
 688.164 +       orientation="vertical"
 688.165 +       position="-1.4285714"
 688.166 +       id="guide6022" />
 688.167 +  </sodipodi:namedview>
 688.168 +  <metadata
 688.169 +     id="metadata5976">
 688.170 +    <rdf:RDF>
 688.171 +      <cc:Work
 688.172 +         rdf:about="">
 688.173 +        <dc:format>image/svg+xml</dc:format>
 688.174 +        <dc:type
 688.175 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 688.176 +      </cc:Work>
 688.177 +    </rdf:RDF>
 688.178 +  </metadata>
 688.179 +  <g
 688.180 +     inkscape:label="Layer 1"
 688.181 +     inkscape:groupmode="layer"
 688.182 +     id="layer1">
 688.183 +    <rect
 688.184 +       y="246.06918"
 688.185 +       x="64.325172"
 688.186 +       height="204.26233"
 688.187 +       width="333.2135"
 688.188 +       id="rect6047"
 688.189 +       style="fill:url(#linearGradient6974);fill-opacity:1;stroke:#686868;stroke-width:0.91925466;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 688.190 +    <g
 688.191 +       id="g1935">
 688.192 +      <rect
 688.193 +         y="266.24374"
 688.194 +         x="84.113708"
 688.195 +         height="44.537449"
 688.196 +         width="134.53746"
 688.197 +         id="rect5996"
 688.198 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 688.199 +      <text
 688.200 +         id="text5998"
 688.201 +         y="292.00446"
 688.202 +         x="108.7962"
 688.203 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 688.204 +         xml:space="preserve"><tspan
 688.205 +           style="font-family:Courier"
 688.206 +           y="292.00446"
 688.207 +           x="108.7962"
 688.208 +           id="tspan6000"
 688.209 +           sodipodi:role="line">e7639888bb2f</tspan></text>
 688.210 +    </g>
 688.211 +    <g
 688.212 +       id="g6976"
 688.213 +       transform="translate(70,0)">
 688.214 +      <rect
 688.215 +         y="327.9104"
 688.216 +         x="40.113693"
 688.217 +         height="44.537449"
 688.218 +         width="134.53746"
 688.219 +         id="rect6004"
 688.220 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 688.221 +      <text
 688.222 +         id="text6006"
 688.223 +         y="353.67111"
 688.224 +         x="62.654205"
 688.225 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 688.226 +         xml:space="preserve"><tspan
 688.227 +           style="font-family:Courier"
 688.228 +           y="353.67111"
 688.229 +           x="62.654205"
 688.230 +           id="tspan6008"
 688.231 +           sodipodi:role="line">7b064d8bac5e</tspan></text>
 688.232 +    </g>
 688.233 +    <path
 688.234 +       inkscape:connector-type="polyline"
 688.235 +       id="path6020"
 688.236 +       d="M 160.92915,311.15532 L 167.83571,327.53627"
 688.237 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 688.238 +       inkscape:connection-end="#g6976"
 688.239 +       inkscape:connection-start="#g1935" />
 688.240 +    <rect
 688.241 +       style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 688.242 +       id="rect6039"
 688.243 +       width="134.53746"
 688.244 +       height="44.537449"
 688.245 +       x="110.11359"
 688.246 +       y="389.57703" />
 688.247 +    <text
 688.248 +       xml:space="preserve"
 688.249 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 688.250 +       x="134.79706"
 688.251 +       y="415.33771"
 688.252 +       id="text6041"><tspan
 688.253 +         sodipodi:role="line"
 688.254 +         id="tspan6043"
 688.255 +         x="134.79706"
 688.256 +         y="415.33771"
 688.257 +         style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 688.258 +    <path
 688.259 +       inkscape:connection-end="#rect6039"
 688.260 +       inkscape:connector-type="polyline"
 688.261 +       id="path6045"
 688.262 +       d="M 177.38238,372.82195 L 177.38235,389.20303"
 688.263 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 688.264 +    <rect
 688.265 +       y="245.94225"
 688.266 +       x="447.28412"
 688.267 +       height="204.51619"
 688.268 +       width="174.36833"
 688.269 +       id="rect6140"
 688.270 +       style="fill:url(#linearGradient6996);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 688.271 +    <g
 688.272 +       id="g6130"
 688.273 +       transform="translate(152.3254,24.38544)">
 688.274 +      <rect
 688.275 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 688.276 +         id="rect6106"
 688.277 +         width="134.53746"
 688.278 +         height="44.537449"
 688.279 +         x="314.87415"
 688.280 +         y="257.95059" />
 688.281 +      <text
 688.282 +         xml:space="preserve"
 688.283 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 688.284 +         x="339.55664"
 688.285 +         y="283.7113"
 688.286 +         id="text6108"><tspan
 688.287 +           sodipodi:role="line"
 688.288 +           id="tspan6110"
 688.289 +           x="339.55664"
 688.290 +           y="283.7113"
 688.291 +           style="font-family:Courier">ffb20e1701ea</tspan></text>
 688.292 +    </g>
 688.293 +    <g
 688.294 +       id="g6135"
 688.295 +       transform="translate(153.0396,49.83106)">
 688.296 +      <rect
 688.297 +         inkscape:transform-center-y="102.85714"
 688.298 +         inkscape:transform-center-x="129.28571"
 688.299 +         style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 688.300 +         id="rect6112"
 688.301 +         width="134.53746"
 688.302 +         height="44.537449"
 688.303 +         x="314.15985"
 688.304 +         y="326.52203" />
 688.305 +      <text
 688.306 +         inkscape:transform-center-y="102.7311"
 688.307 +         inkscape:transform-center-x="128.69672"
 688.308 +         xml:space="preserve"
 688.309 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 688.310 +         x="338.84335"
 688.311 +         y="352.28271"
 688.312 +         id="text6114"><tspan
 688.313 +           sodipodi:role="line"
 688.314 +           id="tspan6116"
 688.315 +           x="338.84335"
 688.316 +           y="352.28271"
 688.317 +           style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 688.318 +    </g>
 688.319 +    <text
 688.320 +       xml:space="preserve"
 688.321 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 688.322 +       x="466.63208"
 688.323 +       y="270.479"
 688.324 +       id="text6118"><tspan
 688.325 +         sodipodi:role="line"
 688.326 +         id="tspan6120"
 688.327 +         x="466.63208"
 688.328 +         y="270.479">First parent</tspan></text>
 688.329 +    <text
 688.330 +       xml:space="preserve"
 688.331 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 688.332 +       x="466.07544"
 688.333 +       y="364.49615"
 688.334 +       id="text6122"><tspan
 688.335 +         sodipodi:role="line"
 688.336 +         id="tspan6124"
 688.337 +         x="466.07544"
 688.338 +         y="364.49615">Second parent</tspan></text>
 688.339 +    <text
 688.340 +       xml:space="preserve"
 688.341 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 688.342 +       x="446.61743"
 688.343 +       y="231.36218"
 688.344 +       id="text6195"><tspan
 688.345 +         sodipodi:role="line"
 688.346 +         id="tspan6197"
 688.347 +         x="446.61743"
 688.348 +         y="231.36218">Parents of working directory</tspan></text>
 688.349 +    <path
 688.350 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 688.351 +       d="M 466.82542,300.21999 L 377.00207,294.39744"
 688.352 +       id="path6266"
 688.353 +       inkscape:connector-type="polyline"
 688.354 +       inkscape:connection-start="#g6130"
 688.355 +       inkscape:connection-end="#rect1925" />
 688.356 +    <path
 688.357 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 688.358 +       d="M 665.12232,418.17579 L 665.12232,418.17579"
 688.359 +       id="path6270"
 688.360 +       inkscape:connector-type="polyline" />
 688.361 +    <g
 688.362 +       id="g2845">
 688.363 +      <rect
 688.364 +         y="266.24374"
 688.365 +         x="242.09048"
 688.366 +         height="44.537449"
 688.367 +         width="134.53746"
 688.368 +         id="rect1925"
 688.369 +         style="fill:#9f9f9f;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 688.370 +      <text
 688.371 +         id="text1927"
 688.372 +         y="292.00446"
 688.373 +         x="266.77298"
 688.374 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 688.375 +         xml:space="preserve"><tspan
 688.376 +           style="font-family:Courier"
 688.377 +           y="292.00446"
 688.378 +           x="266.77298"
 688.379 +           id="tspan1929"
 688.380 +           sodipodi:role="line">ffb20e1701ea</tspan></text>
 688.381 +    </g>
 688.382 +    <path
 688.383 +       inkscape:connector-type="polyline"
 688.384 +       id="path1933"
 688.385 +       d="M 260.89978,311.15532 L 225.84185,327.53627"
 688.386 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 688.387 +       inkscape:connection-end="#g6976" />
 688.388 +    <text
 688.389 +       xml:space="preserve"
 688.390 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 688.391 +       x="109.45568"
 688.392 +       y="231.4554"
 688.393 +       id="text2837"><tspan
 688.394 +         sodipodi:role="line"
 688.395 +         id="tspan2839"
 688.396 +         x="109.45568"
 688.397 +         y="231.4554">Pre-existing head</tspan></text>
 688.398 +    <text
 688.399 +       xml:space="preserve"
 688.400 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 688.401 +       x="237.54184"
 688.402 +       y="231.4554"
 688.403 +       id="text2841"><tspan
 688.404 +         sodipodi:role="line"
 688.405 +         id="tspan2843"
 688.406 +         x="237.54184"
 688.407 +         y="231.4554">Newly created head (and tip)</tspan></text>
 688.408 +    <path
 688.409 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 688.410 +       d="M 148.05048,235.87482 L 149.94915,265.86962"
 688.411 +       id="path2850"
 688.412 +       inkscape:connector-type="polyline"
 688.413 +       inkscape:connection-end="#g1935" />
 688.414 +    <path
 688.415 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 688.416 +       d="M 303.83495,238.08453 L 306.87874,265.86962"
 688.417 +       id="path2852"
 688.418 +       inkscape:connector-type="polyline"
 688.419 +       inkscape:connection-end="#g2845" />
 688.420 +  </g>
 688.421 +</svg>
   689.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   689.2 +++ b/ja/wdir-merge.svg	Sun Aug 16 03:41:39 2009 +0200
   689.3 @@ -0,0 +1,425 @@
   689.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   689.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   689.6 +<svg
   689.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   689.8 +   xmlns:cc="http://web.resource.org/cc/"
   689.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  689.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  689.11 +   xmlns="http://www.w3.org/2000/svg"
  689.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  689.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  689.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  689.15 +   width="744.09448819"
  689.16 +   height="1052.3622047"
  689.17 +   id="svg5971"
  689.18 +   sodipodi:version="0.32"
  689.19 +   inkscape:version="0.44.1"
  689.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  689.21 +   sodipodi:docname="wdir-merge.svg">
  689.22 +  <defs
  689.23 +     id="defs5973">
  689.24 +    <marker
  689.25 +       inkscape:stockid="Arrow1Mstart"
  689.26 +       orient="auto"
  689.27 +       refY="0.0"
  689.28 +       refX="0.0"
  689.29 +       id="Arrow1Mstart"
  689.30 +       style="overflow:visible">
  689.31 +      <path
  689.32 +         id="path4855"
  689.33 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  689.34 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  689.35 +         transform="scale(0.4) translate(10,0)" />
  689.36 +    </marker>
  689.37 +    <linearGradient
  689.38 +       id="linearGradient6049">
  689.39 +      <stop
  689.40 +         style="stop-color:#686868;stop-opacity:1;"
  689.41 +         offset="0"
  689.42 +         id="stop6051" />
  689.43 +      <stop
  689.44 +         style="stop-color:#f0f0f0;stop-opacity:1;"
  689.45 +         offset="1"
  689.46 +         id="stop6053" />
  689.47 +    </linearGradient>
  689.48 +    <marker
  689.49 +       inkscape:stockid="Arrow1Mend"
  689.50 +       orient="auto"
  689.51 +       refY="0.0"
  689.52 +       refX="0.0"
  689.53 +       id="Arrow1Mend"
  689.54 +       style="overflow:visible;">
  689.55 +      <path
  689.56 +         id="path4852"
  689.57 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  689.58 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  689.59 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  689.60 +    </marker>
  689.61 +    <linearGradient
  689.62 +       inkscape:collect="always"
  689.63 +       xlink:href="#linearGradient6049"
  689.64 +       id="linearGradient6083"
  689.65 +       gradientUnits="userSpaceOnUse"
  689.66 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  689.67 +       x1="333.91171"
  689.68 +       y1="488.79077"
  689.69 +       x2="508.94543"
  689.70 +       y2="263.79077" />
  689.71 +    <linearGradient
  689.72 +       inkscape:collect="always"
  689.73 +       xlink:href="#linearGradient6049"
  689.74 +       id="linearGradient6142"
  689.75 +       gradientUnits="userSpaceOnUse"
  689.76 +       gradientTransform="translate(-42.00893,-30.49544)"
  689.77 +       x1="333.91171"
  689.78 +       y1="488.79077"
  689.79 +       x2="508.94543"
  689.80 +       y2="263.79077" />
  689.81 +    <linearGradient
  689.82 +       inkscape:collect="always"
  689.83 +       xlink:href="#linearGradient6049"
  689.84 +       id="linearGradient6193"
  689.85 +       gradientUnits="userSpaceOnUse"
  689.86 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  689.87 +       x1="333.91171"
  689.88 +       y1="488.79077"
  689.89 +       x2="508.94543"
  689.90 +       y2="263.79077" />
  689.91 +    <linearGradient
  689.92 +       inkscape:collect="always"
  689.93 +       xlink:href="#linearGradient6049"
  689.94 +       id="linearGradient6216"
  689.95 +       gradientUnits="userSpaceOnUse"
  689.96 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  689.97 +       x1="333.91171"
  689.98 +       y1="488.79077"
  689.99 +       x2="508.94543"
 689.100 +       y2="263.79077" />
 689.101 +    <linearGradient
 689.102 +       inkscape:collect="always"
 689.103 +       xlink:href="#linearGradient6049"
 689.104 +       id="linearGradient6232"
 689.105 +       gradientUnits="userSpaceOnUse"
 689.106 +       gradientTransform="matrix(1.000473,0,0,0.790947,-11.16012,50.85693)"
 689.107 +       x1="333.91171"
 689.108 +       y1="488.79077"
 689.109 +       x2="508.94543"
 689.110 +       y2="263.79077" />
 689.111 +    <linearGradient
 689.112 +       inkscape:collect="always"
 689.113 +       xlink:href="#linearGradient6049"
 689.114 +       id="linearGradient6445"
 689.115 +       gradientUnits="userSpaceOnUse"
 689.116 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
 689.117 +       x1="333.91171"
 689.118 +       y1="488.79077"
 689.119 +       x2="508.94543"
 689.120 +       y2="263.79077" />
 689.121 +    <linearGradient
 689.122 +       inkscape:collect="always"
 689.123 +       xlink:href="#linearGradient6049"
 689.124 +       id="linearGradient6974"
 689.125 +       gradientUnits="userSpaceOnUse"
 689.126 +       gradientTransform="matrix(1.911882,0,0,0.789965,-574.7896,51.22599)"
 689.127 +       x1="333.91171"
 689.128 +       y1="488.79077"
 689.129 +       x2="508.94543"
 689.130 +       y2="263.79077" />
 689.131 +    <linearGradient
 689.132 +       inkscape:collect="always"
 689.133 +       xlink:href="#linearGradient6049"
 689.134 +       id="linearGradient6996"
 689.135 +       gradientUnits="userSpaceOnUse"
 689.136 +       gradientTransform="matrix(1.000473,0,0,0.790947,112.8399,50.85693)"
 689.137 +       x1="333.91171"
 689.138 +       y1="488.79077"
 689.139 +       x2="508.94543"
 689.140 +       y2="263.79077" />
 689.141 +  </defs>
 689.142 +  <sodipodi:namedview
 689.143 +     id="base"
 689.144 +     pagecolor="#ffffff"
 689.145 +     bordercolor="#666666"
 689.146 +     borderopacity="1.0"
 689.147 +     gridtolerance="10000"
 689.148 +     guidetolerance="10"
 689.149 +     objecttolerance="10"
 689.150 +     inkscape:pageopacity="0.0"
 689.151 +     inkscape:pageshadow="2"
 689.152 +     inkscape:zoom="1.28"
 689.153 +     inkscape:cx="345.85973"
 689.154 +     inkscape:cy="690.49342"
 689.155 +     inkscape:document-units="px"
 689.156 +     inkscape:current-layer="layer1"
 689.157 +     showguides="true"
 689.158 +     inkscape:guide-bbox="true"
 689.159 +     inkscape:window-width="906"
 689.160 +     inkscape:window-height="620"
 689.161 +     inkscape:window-x="0"
 689.162 +     inkscape:window-y="25">
 689.163 +    <sodipodi:guide
 689.164 +       orientation="vertical"
 689.165 +       position="-1.4285714"
 689.166 +       id="guide6022" />
 689.167 +  </sodipodi:namedview>
 689.168 +  <metadata
 689.169 +     id="metadata5976">
 689.170 +    <rdf:RDF>
 689.171 +      <cc:Work
 689.172 +         rdf:about="">
 689.173 +        <dc:format>image/svg+xml</dc:format>
 689.174 +        <dc:type
 689.175 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 689.176 +      </cc:Work>
 689.177 +    </rdf:RDF>
 689.178 +  </metadata>
 689.179 +  <g
 689.180 +     inkscape:label="Layer 1"
 689.181 +     inkscape:groupmode="layer"
 689.182 +     id="layer1">
 689.183 +    <rect
 689.184 +       y="246.06918"
 689.185 +       x="64.325172"
 689.186 +       height="204.26233"
 689.187 +       width="333.2135"
 689.188 +       id="rect6047"
 689.189 +       style="fill:url(#linearGradient6974);fill-opacity:1;stroke:#686868;stroke-width:0.91925466;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 689.190 +    <g
 689.191 +       id="g6976"
 689.192 +       transform="translate(70,0)">
 689.193 +      <rect
 689.194 +         y="327.9104"
 689.195 +         x="40.113693"
 689.196 +         height="44.537449"
 689.197 +         width="134.53746"
 689.198 +         id="rect6004"
 689.199 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 689.200 +      <text
 689.201 +         id="text6006"
 689.202 +         y="353.67111"
 689.203 +         x="62.654205"
 689.204 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 689.205 +         xml:space="preserve"><tspan
 689.206 +           style="font-family:Courier"
 689.207 +           y="353.67111"
 689.208 +           x="62.654205"
 689.209 +           id="tspan6008"
 689.210 +           sodipodi:role="line">7b064d8bac5e</tspan></text>
 689.211 +    </g>
 689.212 +    <path
 689.213 +       inkscape:connector-type="polyline"
 689.214 +       id="path6020"
 689.215 +       d="M 160.92915,311.15532 L 167.83571,327.53627"
 689.216 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 689.217 +       inkscape:connection-end="#g6976"
 689.218 +       inkscape:connection-start="#g1935" />
 689.219 +    <rect
 689.220 +       style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 689.221 +       id="rect6039"
 689.222 +       width="134.53746"
 689.223 +       height="44.537449"
 689.224 +       x="110.11359"
 689.225 +       y="389.57703" />
 689.226 +    <text
 689.227 +       xml:space="preserve"
 689.228 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 689.229 +       x="134.79706"
 689.230 +       y="415.33771"
 689.231 +       id="text6041"><tspan
 689.232 +         sodipodi:role="line"
 689.233 +         id="tspan6043"
 689.234 +         x="134.79706"
 689.235 +         y="415.33771"
 689.236 +         style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 689.237 +    <path
 689.238 +       inkscape:connection-end="#rect6039"
 689.239 +       inkscape:connector-type="polyline"
 689.240 +       id="path6045"
 689.241 +       d="M 177.38238,372.82195 L 177.38235,389.20303"
 689.242 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 689.243 +    <rect
 689.244 +       y="245.94225"
 689.245 +       x="447.28412"
 689.246 +       height="204.51619"
 689.247 +       width="174.36833"
 689.248 +       id="rect6140"
 689.249 +       style="fill:url(#linearGradient6996);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 689.250 +    <g
 689.251 +       id="g6130"
 689.252 +       transform="translate(152.3254,24.38544)">
 689.253 +      <rect
 689.254 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 689.255 +         id="rect6106"
 689.256 +         width="134.53746"
 689.257 +         height="44.537449"
 689.258 +         x="314.87415"
 689.259 +         y="257.95059" />
 689.260 +      <text
 689.261 +         xml:space="preserve"
 689.262 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 689.263 +         x="339.55664"
 689.264 +         y="283.7113"
 689.265 +         id="text6108"><tspan
 689.266 +           sodipodi:role="line"
 689.267 +           id="tspan6110"
 689.268 +           x="339.55664"
 689.269 +           y="283.7113"
 689.270 +           style="font-family:Courier">ffb20e1701ea</tspan></text>
 689.271 +    </g>
 689.272 +    <g
 689.273 +       id="g6135"
 689.274 +       transform="translate(153.0396,49.83106)">
 689.275 +      <rect
 689.276 +         inkscape:transform-center-y="102.85714"
 689.277 +         inkscape:transform-center-x="129.28571"
 689.278 +         style="fill:#d4d4d4;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 689.279 +         id="rect6112"
 689.280 +         width="134.53746"
 689.281 +         height="44.537449"
 689.282 +         x="314.15985"
 689.283 +         y="326.52203" />
 689.284 +      <text
 689.285 +         inkscape:transform-center-y="102.7311"
 689.286 +         inkscape:transform-center-x="128.69672"
 689.287 +         xml:space="preserve"
 689.288 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 689.289 +         x="338.84335"
 689.290 +         y="352.28271"
 689.291 +         id="text6114"><tspan
 689.292 +           sodipodi:role="line"
 689.293 +           id="tspan6116"
 689.294 +           x="338.84335"
 689.295 +           y="352.28271"
 689.296 +           style="fill:black;fill-opacity:1;font-family:Courier">e7639888bb2f</tspan></text>
 689.297 +    </g>
 689.298 +    <text
 689.299 +       xml:space="preserve"
 689.300 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 689.301 +       x="466.63208"
 689.302 +       y="270.479"
 689.303 +       id="text6118"><tspan
 689.304 +         sodipodi:role="line"
 689.305 +         id="tspan6120"
 689.306 +         x="466.63208"
 689.307 +         y="270.479">First parent (unchanged)</tspan></text>
 689.308 +    <text
 689.309 +       xml:space="preserve"
 689.310 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 689.311 +       x="466.07544"
 689.312 +       y="364.49615"
 689.313 +       id="text6122"><tspan
 689.314 +         sodipodi:role="line"
 689.315 +         id="tspan6124"
 689.316 +         x="466.07544"
 689.317 +         y="364.49615">Second parent</tspan></text>
 689.318 +    <text
 689.319 +       xml:space="preserve"
 689.320 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 689.321 +       x="446.61743"
 689.322 +       y="231.36218"
 689.323 +       id="text6195"><tspan
 689.324 +         sodipodi:role="line"
 689.325 +         id="tspan6197"
 689.326 +         x="446.61743"
 689.327 +         y="231.36218">Parents of working directory</tspan></text>
 689.328 +    <path
 689.329 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 689.330 +       d="M 466.82542,300.21999 L 377.00207,294.39744"
 689.331 +       id="path6266"
 689.332 +       inkscape:connector-type="polyline"
 689.333 +       inkscape:connection-start="#g6130"
 689.334 +       inkscape:connection-end="#rect1925" />
 689.335 +    <path
 689.336 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 689.337 +       d="M 665.12232,418.17579 L 665.12232,418.17579"
 689.338 +       id="path6270"
 689.339 +       inkscape:connector-type="polyline" />
 689.340 +    <g
 689.341 +       id="g2845">
 689.342 +      <rect
 689.343 +         y="266.24374"
 689.344 +         x="242.09048"
 689.345 +         height="44.537449"
 689.346 +         width="134.53746"
 689.347 +         id="rect1925"
 689.348 +         style="fill:#9f9f9f;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 689.349 +      <text
 689.350 +         id="text1927"
 689.351 +         y="292.00446"
 689.352 +         x="266.77298"
 689.353 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 689.354 +         xml:space="preserve"><tspan
 689.355 +           style="font-family:Courier"
 689.356 +           y="292.00446"
 689.357 +           x="266.77298"
 689.358 +           id="tspan1929"
 689.359 +           sodipodi:role="line">ffb20e1701ea</tspan></text>
 689.360 +    </g>
 689.361 +    <path
 689.362 +       inkscape:connector-type="polyline"
 689.363 +       id="path1933"
 689.364 +       d="M 260.89978,311.15532 L 225.84185,327.53627"
 689.365 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1;display:inline"
 689.366 +       inkscape:connection-end="#g6976" />
 689.367 +    <text
 689.368 +       xml:space="preserve"
 689.369 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 689.370 +       x="109.45568"
 689.371 +       y="231.4554"
 689.372 +       id="text2837"><tspan
 689.373 +         sodipodi:role="line"
 689.374 +         id="tspan2839"
 689.375 +         x="109.45568"
 689.376 +         y="231.4554">Pre-existing head</tspan></text>
 689.377 +    <text
 689.378 +       xml:space="preserve"
 689.379 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 689.380 +       x="237.54184"
 689.381 +       y="231.4554"
 689.382 +       id="text2841"><tspan
 689.383 +         sodipodi:role="line"
 689.384 +         id="tspan2843"
 689.385 +         x="237.54184"
 689.386 +         y="231.4554">Newly created head (and tip)</tspan></text>
 689.387 +    <path
 689.388 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 689.389 +       d="M 148.05048,235.87482 L 149.94915,265.86962"
 689.390 +       id="path2850"
 689.391 +       inkscape:connector-type="polyline"
 689.392 +       inkscape:connection-end="#g1935" />
 689.393 +    <path
 689.394 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
 689.395 +       d="M 303.83495,238.08453 L 306.87874,265.86962"
 689.396 +       id="path2852"
 689.397 +       inkscape:connector-type="polyline"
 689.398 +       inkscape:connection-end="#g2845" />
 689.399 +    <path
 689.400 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 689.401 +       d="M 466.82545,379.17944 L 219.0253,307.95488"
 689.402 +       id="path3016"
 689.403 +       inkscape:connector-type="polyline"
 689.404 +       inkscape:connection-start="#g6135"
 689.405 +       inkscape:connection-end="#g1935" />
 689.406 +    <g
 689.407 +       id="g1935">
 689.408 +      <rect
 689.409 +         y="266.24374"
 689.410 +         x="84.113708"
 689.411 +         height="44.537449"
 689.412 +         width="134.53746"
 689.413 +         id="rect5996"
 689.414 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 689.415 +      <text
 689.416 +         id="text5998"
 689.417 +         y="292.00446"
 689.418 +         x="108.7962"
 689.419 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 689.420 +         xml:space="preserve"><tspan
 689.421 +           style="font-family:Courier"
 689.422 +           y="292.00446"
 689.423 +           x="108.7962"
 689.424 +           id="tspan6000"
 689.425 +           sodipodi:role="line">e7639888bb2f</tspan></text>
 689.426 +    </g>
 689.427 +  </g>
 689.428 +</svg>
   690.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   690.2 +++ b/ja/wdir-pre-branch.svg	Sun Aug 16 03:41:39 2009 +0200
   690.3 @@ -0,0 +1,364 @@
   690.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   690.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   690.6 +<svg
   690.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   690.8 +   xmlns:cc="http://web.resource.org/cc/"
   690.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  690.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  690.11 +   xmlns="http://www.w3.org/2000/svg"
  690.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  690.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  690.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  690.15 +   width="744.09448819"
  690.16 +   height="1052.3622047"
  690.17 +   id="svg5971"
  690.18 +   sodipodi:version="0.32"
  690.19 +   inkscape:version="0.44.1"
  690.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  690.21 +   sodipodi:docname="wdir-branch.svg">
  690.22 +  <defs
  690.23 +     id="defs5973">
  690.24 +    <marker
  690.25 +       inkscape:stockid="Arrow1Mstart"
  690.26 +       orient="auto"
  690.27 +       refY="0.0"
  690.28 +       refX="0.0"
  690.29 +       id="Arrow1Mstart"
  690.30 +       style="overflow:visible">
  690.31 +      <path
  690.32 +         id="path4855"
  690.33 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  690.34 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  690.35 +         transform="scale(0.4) translate(10,0)" />
  690.36 +    </marker>
  690.37 +    <linearGradient
  690.38 +       id="linearGradient6049">
  690.39 +      <stop
  690.40 +         style="stop-color:#686868;stop-opacity:1;"
  690.41 +         offset="0"
  690.42 +         id="stop6051" />
  690.43 +      <stop
  690.44 +         style="stop-color:#f0f0f0;stop-opacity:1;"
  690.45 +         offset="1"
  690.46 +         id="stop6053" />
  690.47 +    </linearGradient>
  690.48 +    <marker
  690.49 +       inkscape:stockid="Arrow1Mend"
  690.50 +       orient="auto"
  690.51 +       refY="0.0"
  690.52 +       refX="0.0"
  690.53 +       id="Arrow1Mend"
  690.54 +       style="overflow:visible;">
  690.55 +      <path
  690.56 +         id="path4852"
  690.57 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  690.58 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  690.59 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  690.60 +    </marker>
  690.61 +    <linearGradient
  690.62 +       inkscape:collect="always"
  690.63 +       xlink:href="#linearGradient6049"
  690.64 +       id="linearGradient6083"
  690.65 +       gradientUnits="userSpaceOnUse"
  690.66 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  690.67 +       x1="333.91171"
  690.68 +       y1="488.79077"
  690.69 +       x2="508.94543"
  690.70 +       y2="263.79077" />
  690.71 +    <linearGradient
  690.72 +       inkscape:collect="always"
  690.73 +       xlink:href="#linearGradient6049"
  690.74 +       id="linearGradient6142"
  690.75 +       gradientUnits="userSpaceOnUse"
  690.76 +       gradientTransform="translate(-42.00893,-30.49544)"
  690.77 +       x1="333.91171"
  690.78 +       y1="488.79077"
  690.79 +       x2="508.94543"
  690.80 +       y2="263.79077" />
  690.81 +    <linearGradient
  690.82 +       inkscape:collect="always"
  690.83 +       xlink:href="#linearGradient6049"
  690.84 +       id="linearGradient6193"
  690.85 +       gradientUnits="userSpaceOnUse"
  690.86 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  690.87 +       x1="333.91171"
  690.88 +       y1="488.79077"
  690.89 +       x2="508.94543"
  690.90 +       y2="263.79077" />
  690.91 +    <linearGradient
  690.92 +       inkscape:collect="always"
  690.93 +       xlink:href="#linearGradient6049"
  690.94 +       id="linearGradient6216"
  690.95 +       gradientUnits="userSpaceOnUse"
  690.96 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  690.97 +       x1="333.91171"
  690.98 +       y1="488.79077"
  690.99 +       x2="508.94543"
 690.100 +       y2="263.79077" />
 690.101 +    <linearGradient
 690.102 +       inkscape:collect="always"
 690.103 +       xlink:href="#linearGradient6049"
 690.104 +       id="linearGradient6232"
 690.105 +       gradientUnits="userSpaceOnUse"
 690.106 +       gradientTransform="matrix(1.000473,0,0,0.790947,-11.16012,50.85693)"
 690.107 +       x1="333.91171"
 690.108 +       y1="488.79077"
 690.109 +       x2="508.94543"
 690.110 +       y2="263.79077" />
 690.111 +    <linearGradient
 690.112 +       inkscape:collect="always"
 690.113 +       xlink:href="#linearGradient6049"
 690.114 +       id="linearGradient6445"
 690.115 +       gradientUnits="userSpaceOnUse"
 690.116 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
 690.117 +       x1="333.91171"
 690.118 +       y1="488.79077"
 690.119 +       x2="508.94543"
 690.120 +       y2="263.79077" />
 690.121 +    <linearGradient
 690.122 +       inkscape:collect="always"
 690.123 +       xlink:href="#linearGradient6049"
 690.124 +       id="linearGradient6974"
 690.125 +       gradientUnits="userSpaceOnUse"
 690.126 +       gradientTransform="matrix(1.000474,0,0,0.790947,-314.246,50.85694)"
 690.127 +       x1="333.91171"
 690.128 +       y1="488.79077"
 690.129 +       x2="508.94543"
 690.130 +       y2="263.79077" />
 690.131 +    <linearGradient
 690.132 +       inkscape:collect="always"
 690.133 +       xlink:href="#linearGradient6049"
 690.134 +       id="linearGradient6996"
 690.135 +       gradientUnits="userSpaceOnUse"
 690.136 +       gradientTransform="matrix(1.000473,0,0,0.790947,-85.16012,50.85693)"
 690.137 +       x1="333.91171"
 690.138 +       y1="488.79077"
 690.139 +       x2="508.94543"
 690.140 +       y2="263.79077" />
 690.141 +  </defs>
 690.142 +  <sodipodi:namedview
 690.143 +     id="base"
 690.144 +     pagecolor="#ffffff"
 690.145 +     bordercolor="#666666"
 690.146 +     borderopacity="1.0"
 690.147 +     gridtolerance="10000"
 690.148 +     guidetolerance="10"
 690.149 +     objecttolerance="10"
 690.150 +     inkscape:pageopacity="0.0"
 690.151 +     inkscape:pageshadow="2"
 690.152 +     inkscape:zoom="0.90509668"
 690.153 +     inkscape:cx="390.0539"
 690.154 +     inkscape:cy="690.49342"
 690.155 +     inkscape:document-units="px"
 690.156 +     inkscape:current-layer="layer1"
 690.157 +     showguides="true"
 690.158 +     inkscape:guide-bbox="true"
 690.159 +     inkscape:window-width="906"
 690.160 +     inkscape:window-height="620"
 690.161 +     inkscape:window-x="0"
 690.162 +     inkscape:window-y="25">
 690.163 +    <sodipodi:guide
 690.164 +       orientation="vertical"
 690.165 +       position="-1.4285714"
 690.166 +       id="guide6022" />
 690.167 +  </sodipodi:namedview>
 690.168 +  <metadata
 690.169 +     id="metadata5976">
 690.170 +    <rdf:RDF>
 690.171 +      <cc:Work
 690.172 +         rdf:about="">
 690.173 +        <dc:format>image/svg+xml</dc:format>
 690.174 +        <dc:type
 690.175 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 690.176 +      </cc:Work>
 690.177 +    </rdf:RDF>
 690.178 +  </metadata>
 690.179 +  <g
 690.180 +     inkscape:label="Layer 1"
 690.181 +     inkscape:groupmode="layer"
 690.182 +     id="layer1">
 690.183 +    <rect
 690.184 +       y="245.94225"
 690.185 +       x="20.198257"
 690.186 +       height="204.51619"
 690.187 +       width="174.36833"
 690.188 +       id="rect6047"
 690.189 +       style="fill:url(#linearGradient6974);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 690.190 +    <rect
 690.191 +       style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 690.192 +       id="rect5996"
 690.193 +       width="134.53746"
 690.194 +       height="44.537449"
 690.195 +       x="40.113693"
 690.196 +       y="266.24374" />
 690.197 +    <text
 690.198 +       xml:space="preserve"
 690.199 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 690.200 +       x="64.796204"
 690.201 +       y="292.00446"
 690.202 +       id="text5998"><tspan
 690.203 +         sodipodi:role="line"
 690.204 +         id="tspan6000"
 690.205 +         x="64.796204"
 690.206 +         y="292.00446"
 690.207 +         style="font-family:Courier">e7639888bb2f</tspan></text>
 690.208 +    <g
 690.209 +       id="g6976">
 690.210 +      <rect
 690.211 +         y="327.9104"
 690.212 +         x="40.113693"
 690.213 +         height="44.537449"
 690.214 +         width="134.53746"
 690.215 +         id="rect6004"
 690.216 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 690.217 +      <text
 690.218 +         id="text6006"
 690.219 +         y="353.67111"
 690.220 +         x="62.654205"
 690.221 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 690.222 +         xml:space="preserve"><tspan
 690.223 +           style="font-family:Courier"
 690.224 +           y="353.67111"
 690.225 +           x="62.654205"
 690.226 +           id="tspan6008"
 690.227 +           sodipodi:role="line">7b064d8bac5e</tspan></text>
 690.228 +    </g>
 690.229 +    <path
 690.230 +       inkscape:connection-end="#rect6004"
 690.231 +       inkscape:connector-type="polyline"
 690.232 +       id="path6020"
 690.233 +       d="M 107.38242,311.15529 L 107.38242,327.53626"
 690.234 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 690.235 +    <rect
 690.236 +       style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 690.237 +       id="rect6039"
 690.238 +       width="134.53746"
 690.239 +       height="44.537449"
 690.240 +       x="40.113571"
 690.241 +       y="389.57703" />
 690.242 +    <text
 690.243 +       xml:space="preserve"
 690.244 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 690.245 +       x="64.797073"
 690.246 +       y="415.33771"
 690.247 +       id="text6041"><tspan
 690.248 +         sodipodi:role="line"
 690.249 +         id="tspan6043"
 690.250 +         x="64.797073"
 690.251 +         y="415.33771"
 690.252 +         style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 690.253 +    <path
 690.254 +       inkscape:connection-end="#rect6039"
 690.255 +       inkscape:connector-type="polyline"
 690.256 +       id="path6045"
 690.257 +       d="M 107.38238,372.82195 L 107.38235,389.20301"
 690.258 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1" />
 690.259 +    <text
 690.260 +       xml:space="preserve"
 690.261 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 690.262 +       x="19.660461"
 690.263 +       y="231.36218"
 690.264 +       id="text6102"><tspan
 690.265 +         sodipodi:role="line"
 690.266 +         id="tspan6104"
 690.267 +         x="19.660461"
 690.268 +         y="231.36218">History in repository</tspan></text>
 690.269 +    <rect
 690.270 +       y="245.94225"
 690.271 +       x="249.28412"
 690.272 +       height="204.51619"
 690.273 +       width="174.36833"
 690.274 +       id="rect6140"
 690.275 +       style="fill:url(#linearGradient6996);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 690.276 +    <g
 690.277 +       id="g6130"
 690.278 +       transform="translate(-45.67459,24.38544)">
 690.279 +      <rect
 690.280 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1"
 690.281 +         id="rect6106"
 690.282 +         width="134.53746"
 690.283 +         height="44.537449"
 690.284 +         x="314.87415"
 690.285 +         y="257.95059" />
 690.286 +      <text
 690.287 +         xml:space="preserve"
 690.288 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 690.289 +         x="339.55664"
 690.290 +         y="283.7113"
 690.291 +         id="text6108"><tspan
 690.292 +           sodipodi:role="line"
 690.293 +           id="tspan6110"
 690.294 +           x="339.55664"
 690.295 +           y="283.7113"
 690.296 +           style="font-family:Courier">7b064d8bac5e</tspan></text>
 690.297 +    </g>
 690.298 +    <g
 690.299 +       id="g6135"
 690.300 +       transform="translate(-44.96042,49.83106)">
 690.301 +      <rect
 690.302 +         inkscape:transform-center-y="102.85714"
 690.303 +         inkscape:transform-center-x="129.28571"
 690.304 +         style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 690.305 +         id="rect6112"
 690.306 +         width="134.53746"
 690.307 +         height="44.537449"
 690.308 +         x="314.15985"
 690.309 +         y="326.52203" />
 690.310 +      <text
 690.311 +         inkscape:transform-center-y="102.7311"
 690.312 +         inkscape:transform-center-x="128.69672"
 690.313 +         xml:space="preserve"
 690.314 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 690.315 +         x="338.84335"
 690.316 +         y="352.28271"
 690.317 +         id="text6114"><tspan
 690.318 +           sodipodi:role="line"
 690.319 +           id="tspan6116"
 690.320 +           x="338.84335"
 690.321 +           y="352.28271"
 690.322 +           style="fill:#979797;fill-opacity:1;font-family:Courier">000000000000</tspan></text>
 690.323 +    </g>
 690.324 +    <text
 690.325 +       xml:space="preserve"
 690.326 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 690.327 +       x="268.63208"
 690.328 +       y="270.479"
 690.329 +       id="text6118"><tspan
 690.330 +         sodipodi:role="line"
 690.331 +         id="tspan6120"
 690.332 +         x="268.63208"
 690.333 +         y="270.479">First parent</tspan></text>
 690.334 +    <text
 690.335 +       xml:space="preserve"
 690.336 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 690.337 +       x="268.07544"
 690.338 +       y="364.49615"
 690.339 +       id="text6122"><tspan
 690.340 +         sodipodi:role="line"
 690.341 +         id="tspan6124"
 690.342 +         x="268.07544"
 690.343 +         y="364.49615">Second parent</tspan></text>
 690.344 +    <text
 690.345 +       xml:space="preserve"
 690.346 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 690.347 +       x="248.61746"
 690.348 +       y="231.36218"
 690.349 +       id="text6195"><tspan
 690.350 +         sodipodi:role="line"
 690.351 +         id="tspan6197"
 690.352 +         x="248.61746"
 690.353 +         y="231.36218">Parents of working directory</tspan></text>
 690.354 +    <path
 690.355 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 690.356 +       d="M 268.82543,318.06163 L 175.02528,336.72225"
 690.357 +       id="path6266"
 690.358 +       inkscape:connector-type="polyline"
 690.359 +       inkscape:connection-end="#g6976"
 690.360 +       inkscape:connection-start="#g6130" />
 690.361 +    <path
 690.362 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 690.363 +       d="M 665.12232,418.17579 L 665.12232,418.17579"
 690.364 +       id="path6270"
 690.365 +       inkscape:connector-type="polyline" />
 690.366 +  </g>
 690.367 +</svg>
   691.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   691.2 +++ b/ja/wdir.svg	Sun Aug 16 03:41:39 2009 +0200
   691.3 @@ -0,0 +1,348 @@
   691.4 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
   691.5 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
   691.6 +<svg
   691.7 +   xmlns:dc="http://purl.org/dc/elements/1.1/"
   691.8 +   xmlns:cc="http://web.resource.org/cc/"
   691.9 +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  691.10 +   xmlns:svg="http://www.w3.org/2000/svg"
  691.11 +   xmlns="http://www.w3.org/2000/svg"
  691.12 +   xmlns:xlink="http://www.w3.org/1999/xlink"
  691.13 +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  691.14 +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  691.15 +   width="744.09448819"
  691.16 +   height="1052.3622047"
  691.17 +   id="svg5971"
  691.18 +   sodipodi:version="0.32"
  691.19 +   inkscape:version="0.44.1"
  691.20 +   sodipodi:docbase="/home/bos/hg/hgbook/en"
  691.21 +   sodipodi:docname="wdir.svg">
  691.22 +  <defs
  691.23 +     id="defs5973">
  691.24 +    <marker
  691.25 +       inkscape:stockid="Arrow1Mstart"
  691.26 +       orient="auto"
  691.27 +       refY="0.0"
  691.28 +       refX="0.0"
  691.29 +       id="Arrow1Mstart"
  691.30 +       style="overflow:visible">
  691.31 +      <path
  691.32 +         id="path4855"
  691.33 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  691.34 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
  691.35 +         transform="scale(0.4) translate(10,0)" />
  691.36 +    </marker>
  691.37 +    <linearGradient
  691.38 +       id="linearGradient6049">
  691.39 +      <stop
  691.40 +         style="stop-color:#686868;stop-opacity:1;"
  691.41 +         offset="0"
  691.42 +         id="stop6051" />
  691.43 +      <stop
  691.44 +         style="stop-color:#f0f0f0;stop-opacity:1;"
  691.45 +         offset="1"
  691.46 +         id="stop6053" />
  691.47 +    </linearGradient>
  691.48 +    <marker
  691.49 +       inkscape:stockid="Arrow1Mend"
  691.50 +       orient="auto"
  691.51 +       refY="0.0"
  691.52 +       refX="0.0"
  691.53 +       id="Arrow1Mend"
  691.54 +       style="overflow:visible;">
  691.55 +      <path
  691.56 +         id="path4852"
  691.57 +         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
  691.58 +         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
  691.59 +         transform="scale(0.4) rotate(180) translate(10,0)" />
  691.60 +    </marker>
  691.61 +    <linearGradient
  691.62 +       inkscape:collect="always"
  691.63 +       xlink:href="#linearGradient6049"
  691.64 +       id="linearGradient6083"
  691.65 +       gradientUnits="userSpaceOnUse"
  691.66 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  691.67 +       x1="333.91171"
  691.68 +       y1="488.79077"
  691.69 +       x2="508.94543"
  691.70 +       y2="263.79077" />
  691.71 +    <linearGradient
  691.72 +       inkscape:collect="always"
  691.73 +       xlink:href="#linearGradient6049"
  691.74 +       id="linearGradient6142"
  691.75 +       gradientUnits="userSpaceOnUse"
  691.76 +       gradientTransform="translate(-42.00893,-30.49544)"
  691.77 +       x1="333.91171"
  691.78 +       y1="488.79077"
  691.79 +       x2="508.94543"
  691.80 +       y2="263.79077" />
  691.81 +    <linearGradient
  691.82 +       inkscape:collect="always"
  691.83 +       xlink:href="#linearGradient6049"
  691.84 +       id="linearGradient6193"
  691.85 +       gradientUnits="userSpaceOnUse"
  691.86 +       gradientTransform="translate(-240.0462,-8.633237e-6)"
  691.87 +       x1="333.91171"
  691.88 +       y1="488.79077"
  691.89 +       x2="508.94543"
  691.90 +       y2="263.79077" />
  691.91 +    <linearGradient
  691.92 +       inkscape:collect="always"
  691.93 +       xlink:href="#linearGradient6049"
  691.94 +       id="linearGradient6216"
  691.95 +       gradientUnits="userSpaceOnUse"
  691.96 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
  691.97 +       x1="333.91171"
  691.98 +       y1="488.79077"
  691.99 +       x2="508.94543"
 691.100 +       y2="263.79077" />
 691.101 +    <linearGradient
 691.102 +       inkscape:collect="always"
 691.103 +       xlink:href="#linearGradient6049"
 691.104 +       id="linearGradient6232"
 691.105 +       gradientUnits="userSpaceOnUse"
 691.106 +       gradientTransform="matrix(1.000473,0,0,0.790947,-11.16012,50.85693)"
 691.107 +       x1="333.91171"
 691.108 +       y1="488.79077"
 691.109 +       x2="508.94543"
 691.110 +       y2="263.79077" />
 691.111 +    <linearGradient
 691.112 +       inkscape:collect="always"
 691.113 +       xlink:href="#linearGradient6049"
 691.114 +       id="linearGradient6445"
 691.115 +       gradientUnits="userSpaceOnUse"
 691.116 +       gradientTransform="matrix(1.000474,0,0,0.790947,-240.246,50.9948)"
 691.117 +       x1="333.91171"
 691.118 +       y1="488.79077"
 691.119 +       x2="508.94543"
 691.120 +       y2="263.79077" />
 691.121 +  </defs>
 691.122 +  <sodipodi:namedview
 691.123 +     id="base"
 691.124 +     pagecolor="#ffffff"
 691.125 +     bordercolor="#666666"
 691.126 +     borderopacity="1.0"
 691.127 +     gridtolerance="10000"
 691.128 +     guidetolerance="10"
 691.129 +     objecttolerance="10"
 691.130 +     inkscape:pageopacity="0.0"
 691.131 +     inkscape:pageshadow="2"
 691.132 +     inkscape:zoom="0.90509668"
 691.133 +     inkscape:cx="390.0539"
 691.134 +     inkscape:cy="690.49342"
 691.135 +     inkscape:document-units="px"
 691.136 +     inkscape:current-layer="layer1"
 691.137 +     showguides="true"
 691.138 +     inkscape:guide-bbox="true"
 691.139 +     inkscape:window-width="906"
 691.140 +     inkscape:window-height="620"
 691.141 +     inkscape:window-x="0"
 691.142 +     inkscape:window-y="25">
 691.143 +    <sodipodi:guide
 691.144 +       orientation="vertical"
 691.145 +       position="-1.4285714"
 691.146 +       id="guide6022" />
 691.147 +  </sodipodi:namedview>
 691.148 +  <metadata
 691.149 +     id="metadata5976">
 691.150 +    <rdf:RDF>
 691.151 +      <cc:Work
 691.152 +         rdf:about="">
 691.153 +        <dc:format>image/svg+xml</dc:format>
 691.154 +        <dc:type
 691.155 +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 691.156 +      </cc:Work>
 691.157 +    </rdf:RDF>
 691.158 +  </metadata>
 691.159 +  <g
 691.160 +     inkscape:label="Layer 1"
 691.161 +     inkscape:groupmode="layer"
 691.162 +     id="layer1">
 691.163 +    <g
 691.164 +       id="g6431"
 691.165 +       transform="translate(0,-0.137863)">
 691.166 +      <rect
 691.167 +         style="fill:url(#linearGradient6445);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 691.168 +         id="rect6047"
 691.169 +         width="174.36833"
 691.170 +         height="204.51619"
 691.171 +         x="94.198257"
 691.172 +         y="246.08011" />
 691.173 +      <rect
 691.174 +         y="266.38159"
 691.175 +         x="114.11369"
 691.176 +         height="44.537449"
 691.177 +         width="134.53746"
 691.178 +         id="rect5996"
 691.179 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 691.180 +      <text
 691.181 +         id="text5998"
 691.182 +         y="292.1423"
 691.183 +         x="138.7962"
 691.184 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 691.185 +         xml:space="preserve"><tspan
 691.186 +           style="font-family:Courier"
 691.187 +           y="292.1423"
 691.188 +           x="138.7962"
 691.189 +           id="tspan6000"
 691.190 +           sodipodi:role="line">e7639888bb2f</tspan></text>
 691.191 +      <rect
 691.192 +         y="328.04825"
 691.193 +         x="114.11369"
 691.194 +         height="44.537449"
 691.195 +         width="134.53746"
 691.196 +         id="rect6004"
 691.197 +         style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 691.198 +      <text
 691.199 +         id="text6006"
 691.200 +         y="353.80896"
 691.201 +         x="136.65421"
 691.202 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 691.203 +         xml:space="preserve"><tspan
 691.204 +           style="font-family:Courier"
 691.205 +           y="353.80896"
 691.206 +           x="136.65421"
 691.207 +           id="tspan6008"
 691.208 +           sodipodi:role="line">7b064d8bac5e</tspan></text>
 691.209 +      <path
 691.210 +         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 691.211 +         d="M 181.38242,311.29315 L 181.38242,327.67412"
 691.212 +         id="path6020"
 691.213 +         inkscape:connector-type="polyline"
 691.214 +         inkscape:connection-end="#rect6004" />
 691.215 +      <rect
 691.216 +         y="389.71487"
 691.217 +         x="114.11357"
 691.218 +         height="44.537449"
 691.219 +         width="134.53746"
 691.220 +         id="rect6039"
 691.221 +         style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
 691.222 +      <text
 691.223 +         id="text6041"
 691.224 +         y="415.47556"
 691.225 +         x="138.79707"
 691.226 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 691.227 +         xml:space="preserve"><tspan
 691.228 +           style="fill:#979797;fill-opacity:1;font-family:Courier"
 691.229 +           y="415.47556"
 691.230 +           x="138.79707"
 691.231 +           id="tspan6043"
 691.232 +           sodipodi:role="line">000000000000</tspan></text>
 691.233 +      <path
 691.234 +         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#686868;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
 691.235 +         d="M 181.38238,372.95981 L 181.38235,389.34087"
 691.236 +         id="path6045"
 691.237 +         inkscape:connector-type="polyline"
 691.238 +         inkscape:connection-end="#rect6039" />
 691.239 +    </g>
 691.240 +    <text
 691.241 +       xml:space="preserve"
 691.242 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 691.243 +       x="93.660484"
 691.244 +       y="231.36218"
 691.245 +       id="text6102"><tspan
 691.246 +         sodipodi:role="line"
 691.247 +         id="tspan6104"
 691.248 +         x="93.660484"
 691.249 +         y="231.36218">History in repository</tspan></text>
 691.250 +    <g
 691.251 +       id="g6416">
 691.252 +      <rect
 691.253 +         style="fill:url(#linearGradient6232);fill-opacity:1;stroke:#686868;stroke-width:0.66539276;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 691.254 +         id="rect6140"
 691.255 +         width="174.36833"
 691.256 +         height="204.51619"
 691.257 +         x="323.28412"
 691.258 +         y="245.94225" />
 691.259 +      <g
 691.260 +         transform="translate(28.32541,24.38544)"
 691.261 +         id="g6130">
 691.262 +        <rect
 691.263 +           y="257.95059"
 691.264 +           x="314.87415"
 691.265 +           height="44.537449"
 691.266 +           width="134.53746"
 691.267 +           id="rect6106"
 691.268 +           style="fill:#d4d4d4;fill-opacity:1;stroke:black;stroke-width:0.7482574;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.49651474, 0.74825737;stroke-dashoffset:0;stroke-opacity:1" />
 691.269 +        <text
 691.270 +           id="text6108"
 691.271 +           y="283.7113"
 691.272 +           x="339.55664"
 691.273 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 691.274 +           xml:space="preserve"><tspan
 691.275 +             style="font-family:Courier"
 691.276 +             y="283.7113"
 691.277 +             x="339.55664"
 691.278 +             id="tspan6110"
 691.279 +             sodipodi:role="line">e7639888bb2f</tspan></text>
 691.280 +      </g>
 691.281 +      <g
 691.282 +         transform="translate(29.03958,49.83106)"
 691.283 +         id="g6135">
 691.284 +        <rect
 691.285 +           y="326.52203"
 691.286 +           x="314.15985"
 691.287 +           height="44.537449"
 691.288 +           width="134.53746"
 691.289 +           id="rect6112"
 691.290 +           style="fill:#ededed;fill-opacity:1;stroke:#797979;stroke-width:0.74800003;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 691.291 +           inkscape:transform-center-x="129.28571"
 691.292 +           inkscape:transform-center-y="102.85714" />
 691.293 +        <text
 691.294 +           id="text6114"
 691.295 +           y="352.28271"
 691.296 +           x="338.84335"
 691.297 +           style="font-size:12px;font-style:normal;font-weight:normal;fill:#979797;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 691.298 +           xml:space="preserve"
 691.299 +           inkscape:transform-center-x="128.69672"
 691.300 +           inkscape:transform-center-y="102.7311"><tspan
 691.301 +             style="fill:#979797;fill-opacity:1;font-family:Courier"
 691.302 +             y="352.28271"
 691.303 +             x="338.84335"
 691.304 +             id="tspan6116"
 691.305 +             sodipodi:role="line">000000000000</tspan></text>
 691.306 +      </g>
 691.307 +      <text
 691.308 +         id="text6118"
 691.309 +         y="270.479"
 691.310 +         x="342.63208"
 691.311 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 691.312 +         xml:space="preserve"><tspan
 691.313 +           y="270.479"
 691.314 +           x="342.63208"
 691.315 +           id="tspan6120"
 691.316 +           sodipodi:role="line">First parent</tspan></text>
 691.317 +      <text
 691.318 +         id="text6122"
 691.319 +         y="364.49615"
 691.320 +         x="342.07544"
 691.321 +         style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 691.322 +         xml:space="preserve"><tspan
 691.323 +           y="364.49615"
 691.324 +           x="342.07544"
 691.325 +           id="tspan6124"
 691.326 +           sodipodi:role="line">Second parent</tspan></text>
 691.327 +    </g>
 691.328 +    <text
 691.329 +       xml:space="preserve"
 691.330 +       style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Times New Roman"
 691.331 +       x="322.61746"
 691.332 +       y="231.36218"
 691.333 +       id="text6195"><tspan
 691.334 +         sodipodi:role="line"
 691.335 +         id="tspan6197"
 691.336 +         x="322.61746"
 691.337 +         y="231.36218">Parents of working directory</tspan></text>
 691.338 +    <path
 691.339 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
 691.340 +       d="M 342.82543,299.89384 L 249.02528,293.36123"
 691.341 +       id="path6266"
 691.342 +       inkscape:connector-type="polyline"
 691.343 +       inkscape:connection-start="#g6130"
 691.344 +       inkscape:connection-end="#rect5996" />
 691.345 +    <path
 691.346 +       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 691.347 +       d="M 665.12232,418.17579 L 665.12232,418.17579"
 691.348 +       id="path6270"
 691.349 +       inkscape:connector-type="polyline" />
 691.350 +  </g>
 691.351 +</svg>
   692.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   692.2 +++ b/po/zh.po	Sun Aug 16 03:41:39 2009 +0200
   692.3 @@ -0,0 +1,18479 @@
   692.4 +#
   692.5 +# Simplified Chinese translation for hgbook
   692.6 +# This file is distributed under the same license as the hgbook.
   692.7 +#
   692.8 +# Authors:
   692.9 +# Dongsheng Song <dongsheng.song@gmail.com>, 2009
  692.10 +#
  692.11 +# Check translation:
  692.12 +#    msgfmt --statistics -c -o zh.mo zh.po
  692.13 +#
  692.14 +# Please format your translation before commit:
  692.15 +#    msgcat --sort-by-file --width=80 -o zh_new.po zh.po
  692.16 +#    mv -f zh_new.po zh.po
  692.17 +#
  692.18 +# Dictionary:
  692.19 +# blame             追溯
  692.20 +# branch            分支
  692.21 +# changes           修改
  692.22 +# changeset         修改集
  692.23 +# checkout          检出
  692.24 +# remove            移除(从版本库删除)
  692.25 +# delete            删除(只从文件系统删除)
  692.26 +# filelog           文件日志
  692.27 +# patchset          补丁集
  692.28 +# pushing to        推到
  692.29 +# pulling from      拉自,抓取
  692.30 +# rename            改名
  692.31 +# repository        版本库
  692.32 +# revert            恢复
  692.33 +# revision          版本
  692.34 +# revlog            版本日志
  692.35 +# tag               标签
  692.36 +# tip               顶点
  692.37 +# undo              撤销
  692.38 +# unversioned       未版本控制
  692.39 +# updated           更新到,同步到(适用于旧版本)
  692.40 +# versioned         受版本控制
  692.41 +# working copy      工作副本
  692.42 +# ...
  692.43 +#
  692.44 +msgid ""
  692.45 +msgstr ""
  692.46 +"Project-Id-Version: hgbook 1.2\n"
  692.47 +"POT-Creation-Date: 2009-05-21 14:26+0800\n"
  692.48 +"PO-Revision-Date: 2009-05-21 16:42+0800\n"
  692.49 +"Last-Translator: 宋冬生 <songdonogsheng@live.cn>\n"
  692.50 +"Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n"
  692.51 +"MIME-Version: 1.0\n"
  692.52 +"Content-Type: text/plain; charset=UTF-8\n"
  692.53 +"Content-Transfer-Encoding: 8bit\n"
  692.54 +"X-Poedit-Language: Chinese\n"
  692.55 +"X-Poedit-Country: CHINA\n"
  692.56 +"X-Poedit-SourceCharset: utf-8\n"
  692.57 +
  692.58 +#. type: Content of: <book><title>
  692.59 +#: ../en/00book.xml:42
  692.60 +msgid "Mercurial: The Definitive Guide"
  692.61 +msgstr "Mercurial 权威指南"
  692.62 +
  692.63 +#. type: Content of: <book><subtitle>
  692.64 +#: ../en/00book.xml:47
  692.65 +msgid "Compiled from $rev_id$"
  692.66 +msgstr "编译自 $rev_id$"
  692.67 +
  692.68 +#. type: Content of: <book><bookinfo>
  692.69 +#: ../en/00book.xml:49
  692.70 +msgid "<edition>1</edition> <isbn>9780596800673</isbn>"
  692.71 +msgstr "<edition>1</edition> <isbn>9780596800673</isbn>"
  692.72 +
  692.73 +#. type: Content of: <book><bookinfo><authorgroup><author><firstname>
  692.74 +#: ../en/00book.xml:53
  692.75 +msgid "Bryan"
  692.76 +msgstr "Bryan"
  692.77 +
  692.78 +#. type: Content of: <book><bookinfo><authorgroup><author><surname>
  692.79 +#: ../en/00book.xml:54
  692.80 +msgid "O'Sullivan"
  692.81 +msgstr "O'Sullivan"
  692.82 +
  692.83 +#. type: Content of: <book><bookinfo>
  692.84 +#: ../en/00book.xml:58
  692.85 +msgid ""
  692.86 +"<editor> <firstname>Mike</firstname> <surname>Loukides</surname> </editor> "
  692.87 +"<copyright> <year>2006</year> <year>2007</year> <year>2008</year> <year>2009</"
  692.88 +"year> <holder>Bryan O'Sullivan</holder> </copyright>"
  692.89 +msgstr ""
  692.90 +"<editor> <firstname>Mike</firstname> <surname>Loukides</surname> </editor> "
  692.91 +"<copyright> <year>2006</year> <year>2007</year> <year>2008</year> <year>2009</"
  692.92 +"year> <holder>Bryan O'Sullivan</holder> </copyright>"
  692.93 +
  692.94 +#. type: Content of: <book><appendix><title>
  692.95 +#: ../en/appA-svn.xml:5
  692.96 +msgid "Migrating to Mercurial"
  692.97 +msgstr "迁移到 Mercurial"
  692.98 +
  692.99 +#. type: Content of: <book><appendix><para>
 692.100 +#: ../en/appA-svn.xml:7
 692.101 +msgid ""
 692.102 +"A common way to test the waters with a new revision control tool is to "
 692.103 +"experiment with switching an existing project, rather than starting a new "
 692.104 +"project from scratch."
 692.105 +msgstr ""
 692.106 +
 692.107 +#. type: Content of: <book><appendix><para>
 692.108 +#: ../en/appA-svn.xml:11
 692.109 +msgid ""
 692.110 +"In this appendix, we discuss how to import a project's history into "
 692.111 +"Mercurial, and what to look out for if you are used to a different revision "
 692.112 +"control system."
 692.113 +msgstr ""
 692.114 +
 692.115 +#. type: Content of: <book><appendix><sect1><title>
 692.116 +#: ../en/appA-svn.xml:16
 692.117 +msgid "Importing history from another system"
 692.118 +msgstr "从其它版本控制系统导入历史"
 692.119 +
 692.120 +#. type: Content of: <book><appendix><sect1><para>
 692.121 +#: ../en/appA-svn.xml:18
 692.122 +msgid ""
 692.123 +"Mercurial ships with an extension named <literal>convert</literal>, which can "
 692.124 +"import project history from most popular revision control systems.  At the "
 692.125 +"time this book was written, it could import history from the following "
 692.126 +"systems:"
 692.127 +msgstr ""
 692.128 +
 692.129 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><thead><row><entry>
 692.130 +#: ../en/appA-svn.xml:25 ../en/appA-svn.xml:369 ../en/ch01-intro.xml:416
 692.131 +#: ../en/ch01-intro.xml:627
 692.132 +msgid "Subversion"
 692.133 +msgstr "Subversion"
 692.134 +
 692.135 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para>
 692.136 +#: ../en/appA-svn.xml:28 ../en/ch01-intro.xml:532 ../en/ch01-intro.xml:628
 692.137 +msgid "CVS"
 692.138 +msgstr "CVS"
 692.139 +
 692.140 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para>
 692.141 +#: ../en/appA-svn.xml:31
 692.142 +msgid "git"
 692.143 +msgstr "git"
 692.144 +
 692.145 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para>
 692.146 +#: ../en/appA-svn.xml:34 ../en/ch01-intro.xml:630
 692.147 +msgid "Darcs"
 692.148 +msgstr "Darcs"
 692.149 +
 692.150 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para>
 692.151 +#: ../en/appA-svn.xml:37
 692.152 +msgid "Bazaar"
 692.153 +msgstr "Bazaar"
 692.154 +
 692.155 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para>
 692.156 +#: ../en/appA-svn.xml:40
 692.157 +msgid "Monotone"
 692.158 +msgstr "Monotone"
 692.159 +
 692.160 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para>
 692.161 +#: ../en/appA-svn.xml:43
 692.162 +msgid "GNU Arch"
 692.163 +msgstr "GNU Arch"
 692.164 +
 692.165 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><thead><row><entry>
 692.166 +#: ../en/appA-svn.xml:46 ../en/appA-svn.xml:370
 692.167 +msgid "Mercurial"
 692.168 +msgstr "Mercurial"
 692.169 +
 692.170 +#. type: Content of: <book><appendix><sect1><para>
 692.171 +#: ../en/appA-svn.xml:50
 692.172 +msgid ""
 692.173 +"(To see why Mercurial itself is supported as a source, see <xref linkend="
 692.174 +"\"svn.filemap\"/>.)"
 692.175 +msgstr ""
 692.176 +
 692.177 +#. type: Content of: <book><appendix><sect1><para>
 692.178 +#: ../en/appA-svn.xml:53
 692.179 +msgid ""
 692.180 +"You can enable the extension in the usual way, by editing your <filename>~/."
 692.181 +"hgrc</filename> file."
 692.182 +msgstr ""
 692.183 +
 692.184 +#. type: Content of: <book><appendix><sect1><para>
 692.185 +#: ../en/appA-svn.xml:59
 692.186 +msgid ""
 692.187 +"This will make a <command>hg convert</command> command available.  The "
 692.188 +"command is easy to use.  For instance, this command will import the "
 692.189 +"Subversion history for the Nose unit testing framework into Mercurial."
 692.190 +msgstr ""
 692.191 +
 692.192 +#. type: Content of: <book><appendix><sect1><screen><prompt>
 692.193 +#: ../en/appA-svn.xml:64 ../en/appA-svn.xml:207 ../en/appA-svn.xml:212
 692.194 +#: ../en/appA-svn.xml:213 ../en/appA-svn.xml:218 ../en/appA-svn.xml:224
 692.195 +#: ../en/appA-svn.xml:229 ../en/appA-svn.xml:532
 692.196 +msgid "$"
 692.197 +msgstr "$"
 692.198 +
 692.199 +#. type: Content of: <book><appendix><sect1><screen><userinput>
 692.200 +#: ../en/appA-svn.xml:64
 692.201 +msgid "hg convert http://python-nose.googlecode.com/svn/trunk"
 692.202 +msgstr ""
 692.203 +
 692.204 +#. type: Content of: <book><appendix><sect1><para>
 692.205 +#: ../en/appA-svn.xml:66
 692.206 +msgid ""
 692.207 +"The <literal>convert</literal> extension operates incrementally.  In other "
 692.208 +"words, after you have run <command>hg convert</command> once, running it "
 692.209 +"again will import any new revisions committed after the first run began.  "
 692.210 +"Incremental conversion will only work if you run <command>hg convert</"
 692.211 +"command> in the same Mercurial repository that you originally used, because "
 692.212 +"the <literal>convert</literal> extension saves some private metadata in a non-"
 692.213 +"revision-controlled file named <filename>.hg/shamap</filename> inside the "
 692.214 +"target repository."
 692.215 +msgstr ""
 692.216 +
 692.217 +#. type: Content of: <book><appendix><sect1><para>
 692.218 +#: ../en/appA-svn.xml:78
 692.219 +msgid ""
 692.220 +"When you want to start making changes using Mercurial, it's best to clone the "
 692.221 +"tree in which you are doing your conversions, and leave the original tree for "
 692.222 +"future incremental conversions.  This is the safest way to let you pull and "
 692.223 +"merge future commits from the source revision control system into your newly "
 692.224 +"active Mercurial project."
 692.225 +msgstr ""
 692.226 +
 692.227 +#. type: Content of: <book><appendix><sect1><sect2><title>
 692.228 +#: ../en/appA-svn.xml:86
 692.229 +msgid "Converting multiple branches"
 692.230 +msgstr "转换多个分支"
 692.231 +
 692.232 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.233 +#: ../en/appA-svn.xml:88
 692.234 +msgid ""
 692.235 +"The <command>hg convert</command> command given above converts only the "
 692.236 +"history of the <literal>trunk</literal> branch of the Subversion repository.  "
 692.237 +"If we instead use the URL <literal>http://python-nose.googlecode.com/svn</"
 692.238 +"literal>, Mercurial will automatically detect the <literal>trunk</literal>, "
 692.239 +"<literal>tags</literal> and <literal>branches</literal> layout that "
 692.240 +"Subversion projects usually use, and it will import each as a separate "
 692.241 +"Mercurial branch."
 692.242 +msgstr ""
 692.243 +
 692.244 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.245 +#: ../en/appA-svn.xml:98
 692.246 +msgid ""
 692.247 +"By default, each Subversion branch imported into Mercurial is given a branch "
 692.248 +"name.  After the conversion completes, you can get a list of the active "
 692.249 +"branch names in the Mercurial repository using <command>hg branches -a</"
 692.250 +"command>. If you would prefer to import the Subversion branches without "
 692.251 +"names, pass the <option>--config convert.hg.usebranchnames=false</option> "
 692.252 +"option to <command>hg convert</command>."
 692.253 +msgstr ""
 692.254 +
 692.255 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.256 +#: ../en/appA-svn.xml:107
 692.257 +msgid ""
 692.258 +"Once you have converted your tree, if you want to follow the usual Mercurial "
 692.259 +"practice of working in a tree that contains a single branch, you can clone "
 692.260 +"that single branch using <command>hg clone -r mybranchname</command>."
 692.261 +msgstr ""
 692.262 +
 692.263 +#. type: Content of: <book><appendix><sect1><sect2><title>
 692.264 +#: ../en/appA-svn.xml:114
 692.265 +msgid "Mapping user names"
 692.266 +msgstr "映射用户名称"
 692.267 +
 692.268 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.269 +#: ../en/appA-svn.xml:116
 692.270 +msgid ""
 692.271 +"Some revision control tools save only short usernames with commits, and these "
 692.272 +"can be difficult to interpret.  The norm with Mercurial is to save a "
 692.273 +"committer's name and email address, which is much more useful for talking to "
 692.274 +"them after the fact."
 692.275 +msgstr ""
 692.276 +
 692.277 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.278 +#: ../en/appA-svn.xml:122
 692.279 +msgid ""
 692.280 +"If you are converting a tree from a revision control system that uses short "
 692.281 +"names, you can map those names to longer equivalents by passing a <option>--"
 692.282 +"authors</option> option to <command>hg convert</command>.  This option "
 692.283 +"accepts a file name that should contain entries of the following form."
 692.284 +msgstr ""
 692.285 +
 692.286 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.287 +#: ../en/appA-svn.xml:132
 692.288 +msgid ""
 692.289 +"Whenever <literal>convert</literal> encounters a commit with the username "
 692.290 +"<literal>arist</literal> in the source repository, it will use the name "
 692.291 +"<literal>Aristotle &lt;aristotle@phil.example.gr&gt;</literal> in the "
 692.292 +"converted Mercurial revision.  If no match is found for a name, it is used "
 692.293 +"verbatim."
 692.294 +msgstr ""
 692.295 +
 692.296 +#. type: Content of: <book><appendix><sect1><sect2><title>
 692.297 +#: ../en/appA-svn.xml:141
 692.298 +msgid "Tidying up the tree"
 692.299 +msgstr "清理目录树"
 692.300 +
 692.301 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.302 +#: ../en/appA-svn.xml:143
 692.303 +msgid ""
 692.304 +"Not all projects have pristine history.  There may be a directory that should "
 692.305 +"never have been checked in, a file that is too big, or a whole hierarchy that "
 692.306 +"needs to be refactored."
 692.307 +msgstr ""
 692.308 +
 692.309 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.310 +#: ../en/appA-svn.xml:148
 692.311 +msgid ""
 692.312 +"The <literal>convert</literal> extension supports the idea of a <quote>file "
 692.313 +"map</quote> that can reorganize the files and directories in a project as it "
 692.314 +"imports the project's history.  This is useful not only when importing "
 692.315 +"history from other revision control systems, but also to prune or refactor a "
 692.316 +"Mercurial tree."
 692.317 +msgstr ""
 692.318 +
 692.319 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.320 +#: ../en/appA-svn.xml:155
 692.321 +msgid ""
 692.322 +"To specify a file map, use the <option>--filemap</option> option and supply a "
 692.323 +"file name.  A file map contains lines of the following forms."
 692.324 +msgstr ""
 692.325 +
 692.326 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.327 +#: ../en/appA-svn.xml:169
 692.328 +msgid ""
 692.329 +"The <literal>include</literal> directive causes a file, or all files under a "
 692.330 +"directory, to be included in the destination repository.  This also excludes "
 692.331 +"all other files and dirs not explicitely included.  The <literal>exclude</"
 692.332 +"literal> directive causes files or directories to be omitted, and others not "
 692.333 +"explicitly mentioned to be included."
 692.334 +msgstr ""
 692.335 +
 692.336 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.337 +#: ../en/appA-svn.xml:176
 692.338 +msgid ""
 692.339 +"To move a file or directory from one location to another, use the "
 692.340 +"<literal>rename</literal> directive.  If you need to move a file or directory "
 692.341 +"from a subdirectory into the root of the repository, use <literal>.</literal> "
 692.342 +"as the second argument to the <literal>rename</literal> directive."
 692.343 +msgstr ""
 692.344 +
 692.345 +#. type: Content of: <book><appendix><sect1><sect2><title>
 692.346 +#: ../en/appA-svn.xml:184
 692.347 +msgid "Improving Subversion conversion performance"
 692.348 +msgstr "改进 Subversion 的转换性能"
 692.349 +
 692.350 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.351 +#: ../en/appA-svn.xml:186
 692.352 +msgid ""
 692.353 +"You will often need several attempts before you hit the perfect combination "
 692.354 +"of user map, file map, and other conversion parameters.  Converting a "
 692.355 +"Subversion repository over an access protocol like <literal>ssh</literal> or "
 692.356 +"<literal>http</literal> can proceed thousands of times more slowly than "
 692.357 +"Mercurial is capable of actually operating, due to network delays.  This can "
 692.358 +"make tuning that perfect conversion recipe very painful."
 692.359 +msgstr ""
 692.360 +
 692.361 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.362 +#: ../en/appA-svn.xml:195
 692.363 +msgid ""
 692.364 +"The <ulink url=\"http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt"
 692.365 +"\"><command>svnsync</command></ulink> command can greatly speed up the "
 692.366 +"conversion of a Subversion repository.  It is a read-only mirroring program "
 692.367 +"for Subversion repositories.  The idea is that you create a local mirror of "
 692.368 +"your Subversion tree, then convert the mirror into a Mercurial repository."
 692.369 +msgstr ""
 692.370 +
 692.371 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.372 +#: ../en/appA-svn.xml:203
 692.373 +msgid ""
 692.374 +"Suppose we want to convert the Subversion repository for the popular "
 692.375 +"Memcached project into a Mercurial tree.  First, we create a local Subversion "
 692.376 +"repository."
 692.377 +msgstr ""
 692.378 +
 692.379 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput>
 692.380 +#: ../en/appA-svn.xml:207
 692.381 +msgid "svnadmin create memcached-mirror"
 692.382 +msgstr "svnadmin create memcached-mirror"
 692.383 +
 692.384 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.385 +#: ../en/appA-svn.xml:209
 692.386 +msgid "Next, we set up a Subversion hook that <command>svnsync</command> needs."
 692.387 +msgstr ""
 692.388 +
 692.389 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput>
 692.390 +#: ../en/appA-svn.xml:212
 692.391 +msgid "echo '#!/bin/sh' > memcached-mirror/hooks/pre-revprop-change"
 692.392 +msgstr "echo '#!/bin/sh' > memcached-mirror/hooks/pre-revprop-change"
 692.393 +
 692.394 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput>
 692.395 +#: ../en/appA-svn.xml:213
 692.396 +msgid "chmod +x memcached-mirror/hooks/pre-revprop-change"
 692.397 +msgstr "chmod +x memcached-mirror/hooks/pre-revprop-change"
 692.398 +
 692.399 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.400 +#: ../en/appA-svn.xml:215
 692.401 +msgid "We then initialize <command>svnsync</command> in this repository."
 692.402 +msgstr ""
 692.403 +
 692.404 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput>
 692.405 +#: ../en/appA-svn.xml:218
 692.406 +msgid ""
 692.407 +"svnsync --init file://`pwd`/memcached-mirror \\ http://code.sixapart.com/svn/"
 692.408 +"memcached"
 692.409 +msgstr ""
 692.410 +"svnsync --init file://`pwd`/memcached-mirror \\ http://code.sixapart.com/svn/"
 692.411 +"memcached"
 692.412 +
 692.413 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.414 +#: ../en/appA-svn.xml:221
 692.415 +msgid ""
 692.416 +"Our next step is to begin the <command>svnsync</command> mirroring process."
 692.417 +msgstr ""
 692.418 +
 692.419 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput>
 692.420 +#: ../en/appA-svn.xml:224
 692.421 +msgid "svnsync sync file://`pwd`/memcached-mirror"
 692.422 +msgstr "svnsync sync file://`pwd`/memcached-mirror"
 692.423 +
 692.424 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.425 +#: ../en/appA-svn.xml:226
 692.426 +msgid ""
 692.427 +"Finally, we import the history of our local Subversion mirror into Mercurial."
 692.428 +msgstr ""
 692.429 +
 692.430 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput>
 692.431 +#: ../en/appA-svn.xml:229
 692.432 +msgid "hg convert memcached-mirror"
 692.433 +msgstr ""
 692.434 +
 692.435 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.436 +#: ../en/appA-svn.xml:231
 692.437 +msgid ""
 692.438 +"We can use this process incrementally if the Subversion repository is still "
 692.439 +"in use.  We run <command>svnsync</command> to pull new changes into our "
 692.440 +"mirror, then <command>hg convert</command> to import them into our Mercurial "
 692.441 +"tree."
 692.442 +msgstr ""
 692.443 +
 692.444 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.445 +#: ../en/appA-svn.xml:237
 692.446 +msgid ""
 692.447 +"There are two advantages to doing a two-stage import with <command>svnsync</"
 692.448 +"command>.  The first is that it uses more efficient Subversion network "
 692.449 +"syncing code than <command>hg convert</command>, so it transfers less data "
 692.450 +"over the network.  The second is that the import from a local Subversion tree "
 692.451 +"is so fast that you can tweak your conversion setup repeatedly without having "
 692.452 +"to sit through a painfully slow network-based conversion process each time."
 692.453 +msgstr ""
 692.454 +
 692.455 +#. type: Content of: <book><appendix><sect1><title>
 692.456 +#: ../en/appA-svn.xml:249
 692.457 +msgid "Migrating from Subversion"
 692.458 +msgstr "从 Subversion 迁移"
 692.459 +
 692.460 +#. type: Content of: <book><appendix><sect1><para>
 692.461 +#: ../en/appA-svn.xml:251
 692.462 +msgid ""
 692.463 +"Subversion is currently the most popular open source revision control system. "
 692.464 +"Although there are many differences between Mercurial and Subversion, making "
 692.465 +"the transition from Subversion to Mercurial is not particularly difficult.  "
 692.466 +"The two have similar command sets and generally uniform interfaces."
 692.467 +msgstr ""
 692.468 +
 692.469 +#. type: Content of: <book><appendix><sect1><sect2><title>
 692.470 +#: ../en/appA-svn.xml:259
 692.471 +msgid "Philosophical differences"
 692.472 +msgstr "哲学的差别"
 692.473 +
 692.474 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.475 +#: ../en/appA-svn.xml:261
 692.476 +msgid ""
 692.477 +"The fundamental difference between Subversion and Mercurial is of course that "
 692.478 +"Subversion is centralized, while Mercurial is distributed.  Since Mercurial "
 692.479 +"stores all of a project's history on your local drive, it only needs to "
 692.480 +"perform a network access when you want to explicitly communicate with another "
 692.481 +"repository. In contrast, Subversion stores very little information locally, "
 692.482 +"and the client must thus contact its server for many common operations."
 692.483 +msgstr ""
 692.484 +
 692.485 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.486 +#: ../en/appA-svn.xml:270
 692.487 +msgid ""
 692.488 +"Subversion more or less gets away without a well-defined notion of a branch: "
 692.489 +"which portion of a server's namespace qualifies as a branch is a matter of "
 692.490 +"convention, with the software providing no enforcement.  Mercurial treats a "
 692.491 +"repository as the unit of branch management."
 692.492 +msgstr ""
 692.493 +
 692.494 +#. type: Content of: <book><appendix><sect1><sect2><sect3><title>
 692.495 +#: ../en/appA-svn.xml:277
 692.496 +msgid "Scope of commands"
 692.497 +msgstr "命令作用域"
 692.498 +
 692.499 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para>
 692.500 +#: ../en/appA-svn.xml:279
 692.501 +msgid ""
 692.502 +"Since Subversion doesn't know what parts of its namespace are really "
 692.503 +"branches, it treats most commands as requests to operate at and below "
 692.504 +"whatever directory you are currently visiting.  For instance, if you run "
 692.505 +"<command>svn log</command>, you'll get the history of whatever part of the "
 692.506 +"tree you're looking at, not the tree as a whole."
 692.507 +msgstr ""
 692.508 +
 692.509 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para>
 692.510 +#: ../en/appA-svn.xml:286
 692.511 +msgid ""
 692.512 +"Mercurial's commands behave differently, by defaulting to operating over an "
 692.513 +"entire repository.  Run <command>hg log</command> and it will tell you the "
 692.514 +"history of the entire tree, no matter what part of the working directory "
 692.515 +"you're visiting at the time.  If you want the history of just a particular "
 692.516 +"file or directory, simply supply it by name, e.g. <command>hg log src</"
 692.517 +"command>."
 692.518 +msgstr ""
 692.519 +
 692.520 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para>
 692.521 +#: ../en/appA-svn.xml:294
 692.522 +msgid ""
 692.523 +"From my own experience, this difference in default behaviors is probably the "
 692.524 +"most likely to trip you up if you have to switch back and forth frequently "
 692.525 +"between the two tools."
 692.526 +msgstr ""
 692.527 +
 692.528 +#. type: Content of: <book><appendix><sect1><sect2><sect3><title>
 692.529 +#: ../en/appA-svn.xml:301
 692.530 +msgid "Multi-user operation and safety"
 692.531 +msgstr "多用户操作与安全"
 692.532 +
 692.533 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para>
 692.534 +#: ../en/appA-svn.xml:303
 692.535 +msgid ""
 692.536 +"With Subversion, it is normal (though slightly frowned upon) for multiple "
 692.537 +"people to collaborate in a single branch.  If Alice and Bob are working "
 692.538 +"together, and Alice commits some changes to their shared branch, Bob must "
 692.539 +"update his client's view of the branch before he can commit.  Since at this "
 692.540 +"time he has no permanent record of the changes he has made, he can corrupt or "
 692.541 +"lose his modifications during and after his update."
 692.542 +msgstr ""
 692.543 +
 692.544 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para>
 692.545 +#: ../en/appA-svn.xml:312
 692.546 +msgid ""
 692.547 +"Mercurial encourages a commit-then-merge model instead.  Bob commits his "
 692.548 +"changes locally before pulling changes from, or pushing them to, the server "
 692.549 +"that he shares with Alice.  If Alice pushed her changes before Bob tries to "
 692.550 +"push his, he will not be able to push his changes until he pulls hers, merges "
 692.551 +"with them, and commits the result of the merge.  If he makes a mistake during "
 692.552 +"the merge, he still has the option of reverting to the commit that recorded "
 692.553 +"his changes."
 692.554 +msgstr ""
 692.555 +
 692.556 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para>
 692.557 +#: ../en/appA-svn.xml:321
 692.558 +msgid ""
 692.559 +"It is worth emphasizing that these are the common ways of working with these "
 692.560 +"tools. Subversion supports a safer work-in-your-own-branch model, but it is "
 692.561 +"cumbersome enough in practice to not be widely used.  Mercurial can support "
 692.562 +"the less safe mode of allowing changes to be pulled in and merged on top of "
 692.563 +"uncommitted edits, but this is considered highly unusual."
 692.564 +msgstr ""
 692.565 +
 692.566 +#. type: Content of: <book><appendix><sect1><sect2><sect3><title>
 692.567 +#: ../en/appA-svn.xml:331
 692.568 +msgid "Published vs local changes"
 692.569 +msgstr "已发布的修改与本地修改"
 692.570 +
 692.571 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para>
 692.572 +#: ../en/appA-svn.xml:333
 692.573 +msgid ""
 692.574 +"A Subversion <command>svn commit</command> command immediately publishes "
 692.575 +"changes to a server, where they can be seen by everyone who has read access."
 692.576 +msgstr ""
 692.577 +
 692.578 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para>
 692.579 +#: ../en/appA-svn.xml:337
 692.580 +msgid ""
 692.581 +"With Mercurial, commits are always local, and must be published via a "
 692.582 +"<command>hg push</command> command afterwards."
 692.583 +msgstr ""
 692.584 +
 692.585 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para>
 692.586 +#: ../en/appA-svn.xml:341
 692.587 +msgid ""
 692.588 +"Each approach has its advantages and disadvantages.  The Subversion model "
 692.589 +"means that changes are published, and hence reviewable and usable, "
 692.590 +"immediately.  On the other hand, this means that a user must have commit "
 692.591 +"access to a repository in order to use the software in a normal way, and "
 692.592 +"commit access is not lightly given out by most open source projects."
 692.593 +msgstr ""
 692.594 +
 692.595 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para>
 692.596 +#: ../en/appA-svn.xml:349
 692.597 +msgid ""
 692.598 +"The Mercurial approach allows anyone who can clone a repository to commit "
 692.599 +"changes without the need for someone else's permission, and they can then "
 692.600 +"publish their changes and continue to participate however they see fit.  The "
 692.601 +"distinction between committing and pushing does open up the possibility of "
 692.602 +"someone committing changes to their laptop and walking away for a few days "
 692.603 +"having forgotten to push them, which in rare cases might leave collaborators "
 692.604 +"temporarily stuck."
 692.605 +msgstr ""
 692.606 +
 692.607 +#. type: Content of: <book><appendix><sect1><sect2><title>
 692.608 +#: ../en/appA-svn.xml:362
 692.609 +msgid "Quick reference"
 692.610 +msgstr "快速参考"
 692.611 +
 692.612 +#. type: Content of: <book><appendix><sect1><sect2><table><title>
 692.613 +#: ../en/appA-svn.xml:365
 692.614 +msgid "Subversion commands and Mercurial equivalents"
 692.615 +msgstr "Subversion 命令与 Mercurial 对照表"
 692.616 +
 692.617 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><thead><row><entry>
 692.618 +#: ../en/appA-svn.xml:371
 692.619 +msgid "Notes"
 692.620 +msgstr "备注"
 692.621 +
 692.622 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.623 +#: ../en/appA-svn.xml:376
 692.624 +msgid "<command>svn add</command>"
 692.625 +msgstr "<command>svn add</command>"
 692.626 +
 692.627 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.628 +#: ../en/appA-svn.xml:377
 692.629 +msgid "<command>hg add</command>"
 692.630 +msgstr "<command>hg add</command>"
 692.631 +
 692.632 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.633 +#: ../en/appA-svn.xml:381
 692.634 +msgid "<command>svn blame</command>"
 692.635 +msgstr "<command>svn blame</command>"
 692.636 +
 692.637 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.638 +#: ../en/appA-svn.xml:382
 692.639 +msgid "<command>hg annotate</command>"
 692.640 +msgstr "<command>hg annotate</command>"
 692.641 +
 692.642 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.643 +#: ../en/appA-svn.xml:386
 692.644 +msgid "<command>svn cat</command>"
 692.645 +msgstr "<command>svn cat</command>"
 692.646 +
 692.647 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.648 +#: ../en/appA-svn.xml:387
 692.649 +msgid "<command>hg cat</command>"
 692.650 +msgstr "<command>hg cat</command>"
 692.651 +
 692.652 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.653 +#: ../en/appA-svn.xml:391
 692.654 +msgid "<command>svn checkout</command>"
 692.655 +msgstr "<command>svn checkout</command>"
 692.656 +
 692.657 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.658 +#: ../en/appA-svn.xml:392 ../en/appA-svn.xml:409
 692.659 +msgid "<command>hg clone</command>"
 692.660 +msgstr "<command>hg clone</command>"
 692.661 +
 692.662 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.663 +#: ../en/appA-svn.xml:396
 692.664 +msgid "<command>svn cleanup</command>"
 692.665 +msgstr "<command>svn cleanup</command>"
 692.666 +
 692.667 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.668 +#: ../en/appA-svn.xml:397 ../en/appA-svn.xml:472
 692.669 +msgid "n/a"
 692.670 +msgstr "n/a"
 692.671 +
 692.672 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.673 +#: ../en/appA-svn.xml:398
 692.674 +msgid "No cleanup needed"
 692.675 +msgstr "不需要清理"
 692.676 +
 692.677 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.678 +#: ../en/appA-svn.xml:401
 692.679 +msgid "<command>svn commit</command>"
 692.680 +msgstr "<command>svn commit</command>"
 692.681 +
 692.682 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.683 +#: ../en/appA-svn.xml:402
 692.684 +msgid "<command>hg commit</command>; <command>hg push</command>"
 692.685 +msgstr "<command>hg commit</command>; <command>hg push</command>"
 692.686 +
 692.687 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.688 +#: ../en/appA-svn.xml:404
 692.689 +msgid "<command>hg push</command> publishes after commit"
 692.690 +msgstr "提交后使用 <command>hg push</command> 发布"
 692.691 +
 692.692 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.693 +#: ../en/appA-svn.xml:408 ../en/appA-svn.xml:413
 692.694 +msgid "<command>svn copy</command>"
 692.695 +msgstr "<command>svn copy</command>"
 692.696 +
 692.697 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.698 +#: ../en/appA-svn.xml:410
 692.699 +msgid "To create a new branch"
 692.700 +msgstr "创建新补丁"
 692.701 +
 692.702 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.703 +#: ../en/appA-svn.xml:414
 692.704 +msgid "<command>hg copy</command>"
 692.705 +msgstr "<command>hg copy</command>"
 692.706 +
 692.707 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.708 +#: ../en/appA-svn.xml:415
 692.709 +msgid "To copy files or directories"
 692.710 +msgstr "复制文件或目录"
 692.711 +
 692.712 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.713 +#: ../en/appA-svn.xml:418
 692.714 +msgid "<command>svn delete</command> (<command>svn remove</command>)"
 692.715 +msgstr "<command>svn delete</command> (<command>svn remove</command>)"
 692.716 +
 692.717 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.718 +#: ../en/appA-svn.xml:420
 692.719 +msgid "<command>hg remove</command>"
 692.720 +msgstr "<command>hg remove</command>"
 692.721 +
 692.722 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.723 +#: ../en/appA-svn.xml:424
 692.724 +msgid "<command>svn diff</command>"
 692.725 +msgstr "<command>svn diff</command>"
 692.726 +
 692.727 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.728 +#: ../en/appA-svn.xml:425
 692.729 +msgid "<command>hg diff</command>"
 692.730 +msgstr "<command>hg diff</command>"
 692.731 +
 692.732 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.733 +#: ../en/appA-svn.xml:429
 692.734 +msgid "<command>svn export</command>"
 692.735 +msgstr "<command>svn export</command>"
 692.736 +
 692.737 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.738 +#: ../en/appA-svn.xml:430
 692.739 +msgid "<command>hg archive</command>"
 692.740 +msgstr "<command>hg archive</command>"
 692.741 +
 692.742 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.743 +#: ../en/appA-svn.xml:434
 692.744 +msgid "<command>svn help</command>"
 692.745 +msgstr "<command>svn help</command>"
 692.746 +
 692.747 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.748 +#: ../en/appA-svn.xml:435
 692.749 +msgid "<command>hg help</command>"
 692.750 +msgstr "<command>hg help</command>"
 692.751 +
 692.752 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.753 +#: ../en/appA-svn.xml:439
 692.754 +msgid "<command>svn import</command>"
 692.755 +msgstr "<command>svn import</command>"
 692.756 +
 692.757 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.758 +#: ../en/appA-svn.xml:440
 692.759 +msgid "<command>hg addremove</command>; <command>hg commit</command>"
 692.760 +msgstr "<command>hg addremove</command>; <command>hg commit</command>"
 692.761 +
 692.762 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.763 +#: ../en/appA-svn.xml:445 ../en/appA-svn.xml:450
 692.764 +msgid "<command>svn info</command>"
 692.765 +msgstr "<command>svn info</command>"
 692.766 +
 692.767 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.768 +#: ../en/appA-svn.xml:446
 692.769 +msgid "<command>hg parents</command>"
 692.770 +msgstr "<command>hg parents</command>"
 692.771 +
 692.772 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.773 +#: ../en/appA-svn.xml:447
 692.774 +msgid "Shows what revision is checked out"
 692.775 +msgstr "显示检出的版本信息"
 692.776 +
 692.777 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.778 +#: ../en/appA-svn.xml:451
 692.779 +msgid "<command>hg showconfig paths.parent</command>"
 692.780 +msgstr "<command>hg showconfig paths.parent</command>"
 692.781 +
 692.782 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.783 +#: ../en/appA-svn.xml:453
 692.784 +msgid "Shows what URL is checked out"
 692.785 +msgstr "显示检出的 URL"
 692.786 +
 692.787 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.788 +#: ../en/appA-svn.xml:456
 692.789 +msgid "<command>svn list</command>"
 692.790 +msgstr "<command>svn list</command>"
 692.791 +
 692.792 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.793 +#: ../en/appA-svn.xml:457
 692.794 +msgid "<command>hg manifest</command>"
 692.795 +msgstr "<command>hg manifest</command>"
 692.796 +
 692.797 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.798 +#: ../en/appA-svn.xml:461
 692.799 +msgid "<command>svn log</command>"
 692.800 +msgstr "<command>svn log</command>"
 692.801 +
 692.802 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.803 +#: ../en/appA-svn.xml:462
 692.804 +msgid "<command>hg log</command>"
 692.805 +msgstr "<command>hg log</command>"
 692.806 +
 692.807 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.808 +#: ../en/appA-svn.xml:466
 692.809 +msgid "<command>svn merge</command>"
 692.810 +msgstr ""
 692.811 +
 692.812 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.813 +#: ../en/appA-svn.xml:467
 692.814 +msgid "<command>hg merge</command>"
 692.815 +msgstr "<command>hg merge</command>"
 692.816 +
 692.817 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.818 +#: ../en/appA-svn.xml:471
 692.819 +msgid "<command>svn mkdir</command>"
 692.820 +msgstr "<command>svn mkdir</command>"
 692.821 +
 692.822 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.823 +#: ../en/appA-svn.xml:473
 692.824 +msgid "Mercurial does not track directories"
 692.825 +msgstr "Mercurial 不跟踪目录"
 692.826 +
 692.827 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.828 +#: ../en/appA-svn.xml:476
 692.829 +msgid "<command>svn move</command> (<command>svn rename</command>)"
 692.830 +msgstr "<command>svn move</command> (<command>svn rename</command>)"
 692.831 +
 692.832 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.833 +#: ../en/appA-svn.xml:478
 692.834 +msgid "<command>hg rename</command>"
 692.835 +msgstr "<command>hg rename</command>"
 692.836 +
 692.837 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.838 +#: ../en/appA-svn.xml:482
 692.839 +msgid "<command>svn resolved</command>"
 692.840 +msgstr "<command>svn resolved</command>"
 692.841 +
 692.842 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.843 +#: ../en/appA-svn.xml:483
 692.844 +msgid "<command>hg resolve -m</command>"
 692.845 +msgstr "<command>hg resolve -m</command>"
 692.846 +
 692.847 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.848 +#: ../en/appA-svn.xml:487
 692.849 +msgid "<command>svn revert</command>"
 692.850 +msgstr "<command>svn revert</command>"
 692.851 +
 692.852 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.853 +#: ../en/appA-svn.xml:488
 692.854 +msgid "<command>hg revert</command>"
 692.855 +msgstr "<command>hg revert</command>"
 692.856 +
 692.857 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.858 +#: ../en/appA-svn.xml:492
 692.859 +msgid "<command>svn status</command>"
 692.860 +msgstr "<command>svn status</command>"
 692.861 +
 692.862 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.863 +#: ../en/appA-svn.xml:493
 692.864 +msgid "<command>hg status</command>"
 692.865 +msgstr "<command>hg status</command>"
 692.866 +
 692.867 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.868 +#: ../en/appA-svn.xml:497
 692.869 +msgid "<command>svn update</command>"
 692.870 +msgstr "<command>svn update</command>"
 692.871 +
 692.872 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry>
 692.873 +#: ../en/appA-svn.xml:498
 692.874 +msgid "<command>hg pull -u</command>"
 692.875 +msgstr "<command>hg pull -u</command>"
 692.876 +
 692.877 +#. type: Content of: <book><appendix><sect1><title>
 692.878 +#: ../en/appA-svn.xml:508
 692.879 +msgid "Useful tips for newcomers"
 692.880 +msgstr "新手需要了解的技巧"
 692.881 +
 692.882 +#. type: Content of: <book><appendix><sect1><para>
 692.883 +#: ../en/appA-svn.xml:510
 692.884 +msgid ""
 692.885 +"Under some revision control systems, printing a diff for a single committed "
 692.886 +"revision can be painful. For instance, with Subversion, to see what changed "
 692.887 +"in revision 104654, you must type <command>svn diff -r104653:104654</"
 692.888 +"command>. Mercurial eliminates the need to type the revision ID twice in this "
 692.889 +"common case. For a plain diff, <command>hg export 104654</command>. For a log "
 692.890 +"message followed by a diff, <command>hg log -r104654 -p</command>."
 692.891 +msgstr ""
 692.892 +
 692.893 +#. type: Content of: <book><appendix><sect1><para>
 692.894 +#: ../en/appA-svn.xml:519
 692.895 +msgid ""
 692.896 +"When you run <command>hg status</command> without any arguments, it prints "
 692.897 +"the status of the entire tree, with paths relative to the root of the "
 692.898 +"repository.  This makes it tricky to copy a file name from the output of "
 692.899 +"<command>hg status</command> into the command line.  If you supply a file or "
 692.900 +"directory name to <command>hg status</command>, it will print paths relative "
 692.901 +"to your current location instead.  So to get tree-wide status from "
 692.902 +"<command>hg status</command>, with paths that are relative to your current "
 692.903 +"directory and not the root of the repository, feed the output of <command>hg "
 692.904 +"root</command> into <command>hg status</command>.  You can easily do this as "
 692.905 +"follows on a Unix-like system:"
 692.906 +msgstr ""
 692.907 +
 692.908 +#. type: Content of: <book><appendix><sect1><screen><userinput>
 692.909 +#: ../en/appA-svn.xml:532
 692.910 +msgid "hg status `hg root`"
 692.911 +msgstr "hg status `hg root`"
 692.912 +
 692.913 +#. type: Content of: <book><appendix><title>
 692.914 +#: ../en/appB-mq-ref.xml:5
 692.915 +msgid "Mercurial Queues reference"
 692.916 +msgstr "Mercurial 队列参考"
 692.917 +
 692.918 +#. type: Content of: <book><appendix><sect1><title>
 692.919 +#: ../en/appB-mq-ref.xml:8
 692.920 +msgid "MQ command reference"
 692.921 +msgstr "MQ 命令参考"
 692.922 +
 692.923 +#. type: Content of: <book><appendix><sect1><para>
 692.924 +#: ../en/appB-mq-ref.xml:10
 692.925 +msgid ""
 692.926 +"For an overview of the commands provided by MQ, use the command <command role="
 692.927 +"\"hg-cmd\">hg help mq</command>."
 692.928 +msgstr ""
 692.929 +
 692.930 +#. type: Content of: <book><appendix><sect1><sect2><title>
 692.931 +#: ../en/appB-mq-ref.xml:14
 692.932 +msgid ""
 692.933 +"<command role=\"hg-ext-mq\">qapplied</command>&emdash;print applied patches"
 692.934 +msgstr "<command role=\"hg-ext-mq\">qapplied</command>—显示已应用的补丁"
 692.935 +
 692.936 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.937 +#: ../en/appB-mq-ref.xml:17
 692.938 +msgid ""
 692.939 +"The <command role=\"hg-ext-mq\">qapplied</command> command prints the current "
 692.940 +"stack of applied patches.  Patches are printed in oldest-to-newest order, so "
 692.941 +"the last patch in the list is the <quote>top</quote> patch."
 692.942 +msgstr ""
 692.943 +
 692.944 +#. type: Content of: <book><appendix><sect1><sect2><title>
 692.945 +#: ../en/appB-mq-ref.xml:24
 692.946 +msgid ""
 692.947 +"<command role=\"hg-ext-mq\">qcommit</command>&emdash;commit changes in the "
 692.948 +"queue repository"
 692.949 +msgstr "<command role=\"hg-ext-mq\">qcommit</command>—提交队列中的修改"
 692.950 +
 692.951 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.952 +#: ../en/appB-mq-ref.xml:27
 692.953 +msgid ""
 692.954 +"The <command role=\"hg-ext-mq\">qcommit</command> command commits any "
 692.955 +"outstanding changes in the <filename role=\"special\" class=\"directory\">.hg/"
 692.956 +"patches</filename> repository.  This command only works if the <filename role="
 692.957 +"\"special\" class=\"directory\">.hg/patches</filename> directory is a "
 692.958 +"repository, i.e. you created the directory using <command role=\"hg-cmd\">hg "
 692.959 +"qinit <option role=\"hg-ext-mq-cmd-qinit-opt\">-c</option></command> or ran "
 692.960 +"<command role=\"hg-cmd\">hg init</command> in the directory after running "
 692.961 +"<command role=\"hg-ext-mq\">qinit</command>."
 692.962 +msgstr ""
 692.963 +
 692.964 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.965 +#: ../en/appB-mq-ref.xml:39
 692.966 +msgid ""
 692.967 +"This command is shorthand for <command role=\"hg-cmd\">hg commit --cwd .hg/"
 692.968 +"patches</command>."
 692.969 +msgstr ""
 692.970 +
 692.971 +#. type: Content of: <book><appendix><sect1><sect2><title>
 692.972 +#: ../en/appB-mq-ref.xml:43
 692.973 +msgid ""
 692.974 +"<command role=\"hg-ext-mq\">qdelete</command>&emdash;delete a patch from the "
 692.975 +"<filename role=\"special\">series</filename> file"
 692.976 +msgstr ""
 692.977 +"<command role=\"hg-ext-mq\">qdelete</command>—从文件 <filename role=\"special"
 692.978 +"\">series</filename> 中删除补丁"
 692.979 +
 692.980 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.981 +#: ../en/appB-mq-ref.xml:48
 692.982 +msgid ""
 692.983 +"The <command role=\"hg-ext-mq\">qdelete</command> command removes the entry "
 692.984 +"for a patch from the <filename role=\"special\">series</filename> file in the "
 692.985 +"<filename role=\"special\" class=\"directory\">.hg/patches</filename> "
 692.986 +"directory.  It does not pop the patch if the patch is already applied.  By "
 692.987 +"default, it does not delete the patch file; use the <option role=\"hg-ext-mq-"
 692.988 +"cmd-qdel-opt\">-f</option> option to do that."
 692.989 +msgstr ""
 692.990 +
 692.991 +#. type: Content of: <book><appendix><sect1><sect2><para>
 692.992 +#: ../en/appB-mq-ref.xml:57 ../en/appB-mq-ref.xml:109 ../en/appB-mq-ref.xml:167
 692.993 +#: ../en/appB-mq-ref.xml:207 ../en/appB-mq-ref.xml:274
 692.994 +#: ../en/appB-mq-ref.xml:345 ../en/appB-mq-ref.xml:414
 692.995 +#: ../en/appB-mq-ref.xml:492
 692.996 +msgid "Options:"
 692.997 +msgstr "选项:"
 692.998 +
 692.999 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1000 +#: ../en/appB-mq-ref.xml:59
692.1001 +msgid ""
692.1002 +"<option role=\"hg-ext-mq-cmd-qdel-opt\">-f</option>: Delete the patch file."
692.1003 +msgstr ""
692.1004 +
692.1005 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1006 +#: ../en/appB-mq-ref.xml:66
692.1007 +msgid ""
692.1008 +"<command role=\"hg-ext-mq\">qdiff</command>&emdash;print a diff of the "
692.1009 +"topmost applied patch"
692.1010 +msgstr "<command role=\"hg-ext-mq\">qdiff</command>—显示最新应用补丁的差异"
692.1011 +
692.1012 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1013 +#: ../en/appB-mq-ref.xml:69
692.1014 +msgid ""
692.1015 +"The <command role=\"hg-ext-mq\">qdiff</command> command prints a diff of the "
692.1016 +"topmost applied patch. It is equivalent to <command role=\"hg-cmd\">hg diff -"
692.1017 +"r-2:-1</command>."
692.1018 +msgstr ""
692.1019 +
692.1020 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1021 +#: ../en/appB-mq-ref.xml:75
692.1022 +msgid ""
692.1023 +"<command role=\"hg-ext-mq\">qfold</command>&emdash;move applied patches into "
692.1024 +"repository history"
692.1025 +msgstr ""
692.1026 +"<command role=\"hg-ext-mq\">qfold</command>&emdash;将已应用的补丁提交到版本库"
692.1027 +
692.1028 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1029 +#: ../en/appB-mq-ref.xml:78
692.1030 +msgid ""
692.1031 +"The <command>hg qfinish</command> command converts the specified applied "
692.1032 +"patches into permanent changes by moving them out of MQ's control so that "
692.1033 +"they will be treated as normal repository history."
692.1034 +msgstr ""
692.1035 +
692.1036 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1037 +#: ../en/appB-mq-ref.xml:85
692.1038 +msgid ""
692.1039 +"<command role=\"hg-ext-mq\">qfold</command>&emdash;merge (<quote>fold</"
692.1040 +"quote>) several patches into one"
692.1041 +msgstr ""
692.1042 +"<command role=\"hg-ext-mq\">qfold</command>—将多个补丁合并(<quote>折叠</"
692.1043 +"quote>)成一个"
692.1044 +
692.1045 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1046 +#: ../en/appB-mq-ref.xml:88
692.1047 +msgid ""
692.1048 +"The <command role=\"hg-ext-mq\">qfold</command> command merges multiple "
692.1049 +"patches into the topmost applied patch, so that the topmost applied patch "
692.1050 +"makes the union of all of the changes in the patches in question."
692.1051 +msgstr ""
692.1052 +
692.1053 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1054 +#: ../en/appB-mq-ref.xml:93
692.1055 +msgid ""
692.1056 +"The patches to fold must not be applied; <command role=\"hg-ext-mq\">qfold</"
692.1057 +"command> will exit with an error if any is.  The order in which patches are "
692.1058 +"folded is significant; <command role=\"hg-cmd\">hg qfold a b</command> means "
692.1059 +"<quote>apply the current topmost patch, followed by <literal>a</literal>, "
692.1060 +"followed by <literal>b</literal></quote>."
692.1061 +msgstr ""
692.1062 +
692.1063 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1064 +#: ../en/appB-mq-ref.xml:101
692.1065 +msgid ""
692.1066 +"The comments from the folded patches are appended to the comments of the "
692.1067 +"destination patch, with each block of comments separated by three asterisk "
692.1068 +"(<quote><literal>*</literal></quote>) characters.  Use the <option role=\"hg-"
692.1069 +"ext-mq-cmd-qfold-opt\">-e</option> option to edit the commit message for the "
692.1070 +"combined patch/changeset after the folding has completed."
692.1071 +msgstr ""
692.1072 +
692.1073 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1074 +#: ../en/appB-mq-ref.xml:111
692.1075 +msgid ""
692.1076 +"<option role=\"hg-ext-mq-cmd-qfold-opt\">-e</option>: Edit the commit message "
692.1077 +"and patch description for the newly folded patch."
692.1078 +msgstr ""
692.1079 +
692.1080 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1081 +#: ../en/appB-mq-ref.xml:116
692.1082 +msgid ""
692.1083 +"<option role=\"hg-ext-mq-cmd-qfold-opt\">-l</option>: Use the contents of the "
692.1084 +"given file as the new commit message and patch description for the folded "
692.1085 +"patch."
692.1086 +msgstr ""
692.1087 +
692.1088 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1089 +#: ../en/appB-mq-ref.xml:121
692.1090 +msgid ""
692.1091 +"<option role=\"hg-ext-mq-cmd-qfold-opt\">-m</option>: Use the given text as "
692.1092 +"the new commit message and patch description for the folded patch."
692.1093 +msgstr ""
692.1094 +
692.1095 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1096 +#: ../en/appB-mq-ref.xml:129
692.1097 +msgid ""
692.1098 +"<command role=\"hg-ext-mq\">qheader</command>&emdash;display the header/"
692.1099 +"description of a patch"
692.1100 +msgstr "<command role=\"hg-ext-mq\">qheader</command>—显示补丁头部描述"
692.1101 +
692.1102 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1103 +#: ../en/appB-mq-ref.xml:133
692.1104 +msgid ""
692.1105 +"The <command role=\"hg-ext-mq\">qheader</command> command prints the header, "
692.1106 +"or description, of a patch.  By default, it prints the header of the topmost "
692.1107 +"applied patch. Given an argument, it prints the header of the named patch."
692.1108 +msgstr ""
692.1109 +
692.1110 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1111 +#: ../en/appB-mq-ref.xml:140
692.1112 +msgid ""
692.1113 +"<command role=\"hg-ext-mq\">qimport</command>&emdash;import a third-party "
692.1114 +"patch into the queue"
692.1115 +msgstr "<command role=\"hg-ext-mq\">qimport</command>—将第三方补丁导入队列"
692.1116 +
692.1117 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1118 +#: ../en/appB-mq-ref.xml:143
692.1119 +msgid ""
692.1120 +"The <command role=\"hg-ext-mq\">qimport</command> command adds an entry for "
692.1121 +"an external patch to the <filename role=\"special\">series</filename> file, "
692.1122 +"and copies the patch into the <filename role=\"special\" class=\"directory\">."
692.1123 +"hg/patches</filename> directory.  It adds the entry immediately after the "
692.1124 +"topmost applied patch, but does not push the patch."
692.1125 +msgstr ""
692.1126 +
692.1127 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1128 +#: ../en/appB-mq-ref.xml:151
692.1129 +msgid ""
692.1130 +"If the <filename role=\"special\" class=\"directory\">.hg/patches</filename> "
692.1131 +"directory is a repository, <command role=\"hg-ext-mq\">qimport</command> "
692.1132 +"automatically does an <command role=\"hg-cmd\">hg add</command> of the "
692.1133 +"imported patch."
692.1134 +msgstr ""
692.1135 +
692.1136 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1137 +#: ../en/appB-mq-ref.xml:159
692.1138 +msgid ""
692.1139 +"<command role=\"hg-ext-mq\">qinit</command>&emdash;prepare a repository to "
692.1140 +"work with MQ"
692.1141 +msgstr "<command role=\"hg-ext-mq\">qinit</command>—为使用 MQ 配置版本库"
692.1142 +
692.1143 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1144 +#: ../en/appB-mq-ref.xml:162
692.1145 +msgid ""
692.1146 +"The <command role=\"hg-ext-mq\">qinit</command> command prepares a repository "
692.1147 +"to work with MQ.  It creates a directory called <filename role=\"special\" "
692.1148 +"class=\"directory\">.hg/patches</filename>."
692.1149 +msgstr ""
692.1150 +
692.1151 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1152 +#: ../en/appB-mq-ref.xml:169
692.1153 +msgid ""
692.1154 +"<option role=\"hg-ext-mq-cmd-qinit-opt\">-c</option>: Create <filename role="
692.1155 +"\"special\" class=\"directory\">.hg/patches</filename> as a repository in its "
692.1156 +"own right.  Also creates a <filename role=\"special\">.hgignore</filename> "
692.1157 +"file that will ignore the <filename role=\"special\">status</filename> file."
692.1158 +msgstr ""
692.1159 +
692.1160 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1161 +#: ../en/appB-mq-ref.xml:179
692.1162 +msgid ""
692.1163 +"When the <filename role=\"special\" class=\"directory\">.hg/patches</"
692.1164 +"filename> directory is a repository, the <command role=\"hg-ext-mq\">qimport</"
692.1165 +"command> and <command role=\"hg-ext-mq\">qnew</command> commands "
692.1166 +"automatically <command role=\"hg-cmd\">hg add</command> new patches."
692.1167 +msgstr ""
692.1168 +
692.1169 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1170 +#: ../en/appB-mq-ref.xml:188
692.1171 +msgid "<command role=\"hg-ext-mq\">qnew</command>&emdash;create a new patch"
692.1172 +msgstr "<command role=\"hg-ext-mq\">qnew</command>—创建新补丁"
692.1173 +
692.1174 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1175 +#: ../en/appB-mq-ref.xml:191
692.1176 +msgid ""
692.1177 +"The <command role=\"hg-ext-mq\">qnew</command> command creates a new patch.  "
692.1178 +"It takes one mandatory argument, the name to use for the patch file.  The "
692.1179 +"newly created patch is created empty by default.  It is added to the "
692.1180 +"<filename role=\"special\">series</filename> file after the current topmost "
692.1181 +"applied patch, and is immediately pushed on top of that patch."
692.1182 +msgstr ""
692.1183 +
692.1184 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1185 +#: ../en/appB-mq-ref.xml:199
692.1186 +msgid ""
692.1187 +"If <command role=\"hg-ext-mq\">qnew</command> finds modified files in the "
692.1188 +"working directory, it will refuse to create a new patch unless the <option "
692.1189 +"role=\"hg-ext-mq-cmd-qnew-opt\">-f</option> option is used (see below).  This "
692.1190 +"behavior allows you to <command role=\"hg-ext-mq\">qrefresh</command> your "
692.1191 +"topmost applied patch before you apply a new patch on top of it."
692.1192 +msgstr ""
692.1193 +
692.1194 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1195 +#: ../en/appB-mq-ref.xml:209
692.1196 +msgid ""
692.1197 +"<option role=\"hg-ext-mq-cmd-qnew-opt\">-f</option>: Create a new patch if "
692.1198 +"the contents of the working directory are modified.  Any outstanding "
692.1199 +"modifications are added to the newly created patch, so after this command "
692.1200 +"completes, the working directory will no longer be modified."
692.1201 +msgstr ""
692.1202 +
692.1203 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1204 +#: ../en/appB-mq-ref.xml:216
692.1205 +msgid ""
692.1206 +"<option role=\"hg-ext-mq-cmd-qnew-opt\">-m</option>: Use the given text as "
692.1207 +"the commit message. This text will be stored at the beginning of the patch "
692.1208 +"file, before the patch data."
692.1209 +msgstr ""
692.1210 +
692.1211 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1212 +#: ../en/appB-mq-ref.xml:225
692.1213 +msgid ""
692.1214 +"<command role=\"hg-ext-mq\">qnext</command>&emdash;print the name of the next "
692.1215 +"patch"
692.1216 +msgstr "<command role=\"hg-ext-mq\">qnext</command>—显示下个补丁的名称"
692.1217 +
692.1218 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1219 +#: ../en/appB-mq-ref.xml:228
692.1220 +msgid ""
692.1221 +"The <command role=\"hg-ext-mq\">qnext</command> command prints the name name "
692.1222 +"of the next patch in the <filename role=\"special\">series</filename> file "
692.1223 +"after the topmost applied patch.  This patch will become the topmost applied "
692.1224 +"patch if you run <command role=\"hg-ext-mq\">qpush</command>."
692.1225 +msgstr ""
692.1226 +
692.1227 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1228 +#: ../en/appB-mq-ref.xml:237
692.1229 +msgid ""
692.1230 +"<command role=\"hg-ext-mq\">qpop</command>&emdash;pop patches off the stack"
692.1231 +msgstr "<command role=\"hg-ext-mq\">qpop</command>—删除堆栈顶部的补丁"
692.1232 +
692.1233 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1234 +#: ../en/appB-mq-ref.xml:240
692.1235 +msgid ""
692.1236 +"The <command role=\"hg-ext-mq\">qpop</command> command removes applied "
692.1237 +"patches from the top of the stack of applied patches.  By default, it removes "
692.1238 +"only one patch."
692.1239 +msgstr ""
692.1240 +
692.1241 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1242 +#: ../en/appB-mq-ref.xml:244
692.1243 +msgid ""
692.1244 +"This command removes the changesets that represent the popped patches from "
692.1245 +"the repository, and updates the working directory to undo the effects of the "
692.1246 +"patches."
692.1247 +msgstr ""
692.1248 +
692.1249 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1250 +#: ../en/appB-mq-ref.xml:248
692.1251 +msgid ""
692.1252 +"This command takes an optional argument, which it uses as the name or index "
692.1253 +"of the patch to pop to.  If given a name, it will pop patches until the named "
692.1254 +"patch is the topmost applied patch.  If given a number, <command role=\"hg-"
692.1255 +"ext-mq\">qpop</command> treats the number as an index into the entries in the "
692.1256 +"series file, counting from zero (empty lines and lines containing only "
692.1257 +"comments do not count).  It pops patches until the patch identified by the "
692.1258 +"given index is the topmost applied patch."
692.1259 +msgstr ""
692.1260 +
692.1261 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1262 +#: ../en/appB-mq-ref.xml:258
692.1263 +msgid ""
692.1264 +"The <command role=\"hg-ext-mq\">qpop</command> command does not read or write "
692.1265 +"patches or the <filename role=\"special\">series</filename> file.  It is thus "
692.1266 +"safe to <command role=\"hg-ext-mq\">qpop</command> a patch that you have "
692.1267 +"removed from the <filename role=\"special\">series</filename> file, or a "
692.1268 +"patch that you have renamed or deleted entirely.  In the latter two cases, "
692.1269 +"use the name of the patch as it was when you applied it."
692.1270 +msgstr ""
692.1271 +
692.1272 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1273 +#: ../en/appB-mq-ref.xml:267
692.1274 +msgid ""
692.1275 +"By default, the <command role=\"hg-ext-mq\">qpop</command> command will not "
692.1276 +"pop any patches if the working directory has been modified.  You can override "
692.1277 +"this behavior using the <option role=\"hg-ext-mq-cmd-qpop-opt\">-f</option> "
692.1278 +"option, which reverts all modifications in the working directory."
692.1279 +msgstr ""
692.1280 +
692.1281 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1282 +#: ../en/appB-mq-ref.xml:276
692.1283 +msgid ""
692.1284 +"<option role=\"hg-ext-mq-cmd-qpop-opt\">-a</option>: Pop all applied "
692.1285 +"patches.  This returns the repository to its state before you applied any "
692.1286 +"patches."
692.1287 +msgstr ""
692.1288 +
692.1289 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1290 +#: ../en/appB-mq-ref.xml:281
692.1291 +msgid ""
692.1292 +"<option role=\"hg-ext-mq-cmd-qpop-opt\">-f</option>: Forcibly revert any "
692.1293 +"modifications to the working directory when popping."
692.1294 +msgstr ""
692.1295 +
692.1296 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1297 +#: ../en/appB-mq-ref.xml:286
692.1298 +msgid ""
692.1299 +"<option role=\"hg-ext-mq-cmd-qpop-opt\">-n</option>: Pop a patch from the "
692.1300 +"named queue."
692.1301 +msgstr ""
692.1302 +
692.1303 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1304 +#: ../en/appB-mq-ref.xml:291
692.1305 +msgid ""
692.1306 +"The <command role=\"hg-ext-mq\">qpop</command> command removes one line from "
692.1307 +"the end of the <filename role=\"special\">status</filename> file for each "
692.1308 +"patch that it pops."
692.1309 +msgstr ""
692.1310 +
692.1311 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1312 +#: ../en/appB-mq-ref.xml:298
692.1313 +msgid ""
692.1314 +"<command role=\"hg-ext-mq\">qprev</command>&emdash;print the name of the "
692.1315 +"previous patch"
692.1316 +msgstr "<command role=\"hg-ext-mq\">qprev</command>—显示上个补丁的名称"
692.1317 +
692.1318 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1319 +#: ../en/appB-mq-ref.xml:301
692.1320 +msgid ""
692.1321 +"The <command role=\"hg-ext-mq\">qprev</command> command prints the name of "
692.1322 +"the patch in the <filename role=\"special\">series</filename> file that comes "
692.1323 +"before the topmost applied patch. This will become the topmost applied patch "
692.1324 +"if you run <command role=\"hg-ext-mq\">qpop</command>."
692.1325 +msgstr ""
692.1326 +
692.1327 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1328 +#: ../en/appB-mq-ref.xml:310
692.1329 +msgid ""
692.1330 +"<command role=\"hg-ext-mq\">qpush</command>&emdash;push patches onto the stack"
692.1331 +msgstr "<command role=\"hg-ext-mq\">qpush</command>—增加补丁到堆栈"
692.1332 +
692.1333 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1334 +#: ../en/appB-mq-ref.xml:313
692.1335 +msgid ""
692.1336 +"The <command role=\"hg-ext-mq\">qpush</command> command adds patches onto the "
692.1337 +"applied stack.  By default, it adds only one patch."
692.1338 +msgstr ""
692.1339 +
692.1340 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1341 +#: ../en/appB-mq-ref.xml:317
692.1342 +msgid ""
692.1343 +"This command creates a new changeset to represent each applied patch, and "
692.1344 +"updates the working directory to apply the effects of the patches."
692.1345 +msgstr ""
692.1346 +
692.1347 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1348 +#: ../en/appB-mq-ref.xml:321
692.1349 +msgid "The default data used when creating a changeset are as follows:"
692.1350 +msgstr ""
692.1351 +
692.1352 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1353 +#: ../en/appB-mq-ref.xml:324
692.1354 +msgid ""
692.1355 +"The commit date and time zone are the current date and time zone.  Because "
692.1356 +"these data are used to compute the identity of a changeset, this means that "
692.1357 +"if you <command role=\"hg-ext-mq\">qpop</command> a patch and <command role="
692.1358 +"\"hg-ext-mq\">qpush</command> it again, the changeset that you push will have "
692.1359 +"a different identity than the changeset you popped."
692.1360 +msgstr ""
692.1361 +
692.1362 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1363 +#: ../en/appB-mq-ref.xml:332
692.1364 +msgid ""
692.1365 +"The author is the same as the default used by the <command role=\"hg-cmd\">hg "
692.1366 +"commit</command> command."
692.1367 +msgstr ""
692.1368 +
692.1369 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1370 +#: ../en/appB-mq-ref.xml:336
692.1371 +msgid ""
692.1372 +"The commit message is any text from the patch file that comes before the "
692.1373 +"first diff header.  If there is no such text, a default commit message is "
692.1374 +"used that identifies the name of the patch."
692.1375 +msgstr ""
692.1376 +
692.1377 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1378 +#: ../en/appB-mq-ref.xml:341
692.1379 +msgid ""
692.1380 +"If a patch contains a Mercurial patch header, the information in the patch "
692.1381 +"header overrides these defaults."
692.1382 +msgstr ""
692.1383 +
692.1384 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1385 +#: ../en/appB-mq-ref.xml:347
692.1386 +msgid ""
692.1387 +"<option role=\"hg-ext-mq-cmd-qpush-opt\">-a</option>: Push all unapplied "
692.1388 +"patches from the <filename role=\"special\">series</filename> file until "
692.1389 +"there are none left to push."
692.1390 +msgstr ""
692.1391 +
692.1392 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1393 +#: ../en/appB-mq-ref.xml:353
692.1394 +msgid ""
692.1395 +"<option role=\"hg-ext-mq-cmd-qpush-opt\">-l</option>: Add the name of the "
692.1396 +"patch to the end of the commit message."
692.1397 +msgstr ""
692.1398 +
692.1399 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1400 +#: ../en/appB-mq-ref.xml:357
692.1401 +msgid ""
692.1402 +"<option role=\"hg-ext-mq-cmd-qpush-opt\">-m</option>: If a patch fails to "
692.1403 +"apply cleanly, use the entry for the patch in another saved queue to compute "
692.1404 +"the parameters for a three-way merge, and perform a three-way merge using the "
692.1405 +"normal Mercurial merge machinery.  Use the resolution of the merge as the new "
692.1406 +"patch content."
692.1407 +msgstr ""
692.1408 +
692.1409 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1410 +#: ../en/appB-mq-ref.xml:365
692.1411 +msgid ""
692.1412 +"<option role=\"hg-ext-mq-cmd-qpush-opt\">-n</option>: Use the named queue if "
692.1413 +"merging while pushing."
692.1414 +msgstr ""
692.1415 +
692.1416 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1417 +#: ../en/appB-mq-ref.xml:370
692.1418 +msgid ""
692.1419 +"The <command role=\"hg-ext-mq\">qpush</command> command reads, but does not "
692.1420 +"modify, the <filename role=\"special\">series</filename> file.  It appends "
692.1421 +"one line to the <command role=\"hg-cmd\">hg status</command> file for each "
692.1422 +"patch that it pushes."
692.1423 +msgstr ""
692.1424 +
692.1425 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1426 +#: ../en/appB-mq-ref.xml:378
692.1427 +msgid ""
692.1428 +"<command role=\"hg-ext-mq\">qrefresh</command>&emdash;update the topmost "
692.1429 +"applied patch"
692.1430 +msgstr "<command role=\"hg-ext-mq\">qrefresh</command>—更新最新的补丁"
692.1431 +
692.1432 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1433 +#: ../en/appB-mq-ref.xml:382
692.1434 +msgid ""
692.1435 +"The <command role=\"hg-ext-mq\">qrefresh</command> command updates the "
692.1436 +"topmost applied patch.  It modifies the patch, removes the old changeset that "
692.1437 +"represented the patch, and creates a new changeset to represent the modified "
692.1438 +"patch."
692.1439 +msgstr ""
692.1440 +
692.1441 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1442 +#: ../en/appB-mq-ref.xml:388
692.1443 +msgid ""
692.1444 +"The <command role=\"hg-ext-mq\">qrefresh</command> command looks for the "
692.1445 +"following modifications:"
692.1446 +msgstr ""
692.1447 +
692.1448 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1449 +#: ../en/appB-mq-ref.xml:391
692.1450 +msgid ""
692.1451 +"Changes to the commit message, i.e. the text before the first diff header in "
692.1452 +"the patch file, are reflected in the new changeset that represents the patch."
692.1453 +msgstr ""
692.1454 +
692.1455 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1456 +#: ../en/appB-mq-ref.xml:396
692.1457 +msgid ""
692.1458 +"Modifications to tracked files in the working directory are added to the "
692.1459 +"patch."
692.1460 +msgstr ""
692.1461 +
692.1462 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1463 +#: ../en/appB-mq-ref.xml:399
692.1464 +msgid ""
692.1465 +"Changes to the files tracked using <command role=\"hg-cmd\">hg add</command>, "
692.1466 +"<command role=\"hg-cmd\">hg copy</command>, <command role=\"hg-cmd\">hg "
692.1467 +"remove</command>, or <command role=\"hg-cmd\">hg rename</command>.  Added "
692.1468 +"files and copy and rename destinations are added to the patch, while removed "
692.1469 +"files and rename sources are removed."
692.1470 +msgstr ""
692.1471 +
692.1472 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1473 +#: ../en/appB-mq-ref.xml:408
692.1474 +msgid ""
692.1475 +"Even if <command role=\"hg-ext-mq\">qrefresh</command> detects no changes, it "
692.1476 +"still recreates the changeset that represents the patch.  This causes the "
692.1477 +"identity of the changeset to differ from the previous changeset that "
692.1478 +"identified the patch."
692.1479 +msgstr ""
692.1480 +
692.1481 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1482 +#: ../en/appB-mq-ref.xml:416
692.1483 +msgid ""
692.1484 +"<option role=\"hg-ext-mq-cmd-qrefresh-opt\">-e</option>: Modify the commit "
692.1485 +"and patch description, using the preferred text editor."
692.1486 +msgstr ""
692.1487 +
692.1488 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1489 +#: ../en/appB-mq-ref.xml:421
692.1490 +msgid ""
692.1491 +"<option role=\"hg-ext-mq-cmd-qrefresh-opt\">-m</option>: Modify the commit "
692.1492 +"message and patch description, using the given text."
692.1493 +msgstr ""
692.1494 +
692.1495 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1496 +#: ../en/appB-mq-ref.xml:426
692.1497 +msgid ""
692.1498 +"<option role=\"hg-ext-mq-cmd-qrefresh-opt\">-l</option>: Modify the commit "
692.1499 +"message and patch description, using text from the given file."
692.1500 +msgstr ""
692.1501 +
692.1502 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1503 +#: ../en/appB-mq-ref.xml:434
692.1504 +msgid "<command role=\"hg-ext-mq\">qrename</command>&emdash;rename a patch"
692.1505 +msgstr "<command role=\"hg-ext-mq\">qrename</command>—改名补丁"
692.1506 +
692.1507 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1508 +#: ../en/appB-mq-ref.xml:437
692.1509 +msgid ""
692.1510 +"The <command role=\"hg-ext-mq\">qrename</command> command renames a patch, "
692.1511 +"and changes the entry for the patch in the <filename role=\"special\">series</"
692.1512 +"filename> file."
692.1513 +msgstr ""
692.1514 +
692.1515 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1516 +#: ../en/appB-mq-ref.xml:441
692.1517 +msgid ""
692.1518 +"With a single argument, <command role=\"hg-ext-mq\">qrename</command> renames "
692.1519 +"the topmost applied patch.  With two arguments, it renames its first argument "
692.1520 +"to its second."
692.1521 +msgstr ""
692.1522 +
692.1523 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1524 +#: ../en/appB-mq-ref.xml:448
692.1525 +msgid ""
692.1526 +"<command role=\"hg-ext-mq\">qseries</command>&emdash;print the entire patch "
692.1527 +"series"
692.1528 +msgstr "<command role=\"hg-ext-mq\">qseries</command>—显示补丁序列"
692.1529 +
692.1530 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1531 +#: ../en/appB-mq-ref.xml:451
692.1532 +msgid ""
692.1533 +"The <command role=\"hg-ext-mq\">qseries</command> command prints the entire "
692.1534 +"patch series from the <filename role=\"special\">series</filename> file.  It "
692.1535 +"prints only patch names, not empty lines or comments.  It prints in order "
692.1536 +"from first to be applied to last."
692.1537 +msgstr ""
692.1538 +
692.1539 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1540 +#: ../en/appB-mq-ref.xml:459
692.1541 +msgid ""
692.1542 +"<command role=\"hg-ext-mq\">qtop</command>&emdash;print the name of the "
692.1543 +"current patch"
692.1544 +msgstr "<command role=\"hg-ext-mq\">qtop</command>—显示当前补丁的名称"
692.1545 +
692.1546 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1547 +#: ../en/appB-mq-ref.xml:462
692.1548 +msgid ""
692.1549 +"The <command role=\"hg-ext-mq\">qtop</command> prints the name of the topmost "
692.1550 +"currently applied patch."
692.1551 +msgstr ""
692.1552 +
692.1553 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1554 +#: ../en/appB-mq-ref.xml:467
692.1555 +msgid ""
692.1556 +"<command role=\"hg-ext-mq\">qunapplied</command>&emdash;print patches not yet "
692.1557 +"applied"
692.1558 +msgstr "<command role=\"hg-ext-mq\">qunapplied</command>—显示尚未应用的补丁"
692.1559 +
692.1560 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1561 +#: ../en/appB-mq-ref.xml:471
692.1562 +msgid ""
692.1563 +"The <command role=\"hg-ext-mq\">qunapplied</command> command prints the names "
692.1564 +"of patches from the <filename role=\"special\">series</filename> file that "
692.1565 +"are not yet applied.  It prints them in order from the next patch that will "
692.1566 +"be pushed to the last."
692.1567 +msgstr ""
692.1568 +
692.1569 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1570 +#: ../en/appB-mq-ref.xml:479
692.1571 +msgid ""
692.1572 +"<command role=\"hg-cmd\">hg strip</command>&emdash;remove a revision and "
692.1573 +"descendants"
692.1574 +msgstr "<command role=\"hg-cmd\">hg strip</command>—删除一个版本及其后继"
692.1575 +
692.1576 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1577 +#: ../en/appB-mq-ref.xml:482
692.1578 +msgid ""
692.1579 +"The <command role=\"hg-cmd\">hg strip</command> command removes a revision, "
692.1580 +"and all of its descendants, from the repository.  It undoes the effects of "
692.1581 +"the removed revisions from the repository, and updates the working directory "
692.1582 +"to the first parent of the removed revision."
692.1583 +msgstr ""
692.1584 +
692.1585 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1586 +#: ../en/appB-mq-ref.xml:488
692.1587 +msgid ""
692.1588 +"The <command role=\"hg-cmd\">hg strip</command> command saves a backup of the "
692.1589 +"removed changesets in a bundle, so that they can be reapplied if removed in "
692.1590 +"error."
692.1591 +msgstr ""
692.1592 +
692.1593 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1594 +#: ../en/appB-mq-ref.xml:494
692.1595 +msgid ""
692.1596 +"<option role=\"hg-opt-strip\">-b</option>: Save unrelated changesets that are "
692.1597 +"intermixed with the stripped changesets in the backup bundle."
692.1598 +msgstr ""
692.1599 +
692.1600 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1601 +#: ../en/appB-mq-ref.xml:498
692.1602 +msgid ""
692.1603 +"<option role=\"hg-opt-strip\">-f</option>: If a branch has multiple heads, "
692.1604 +"remove all heads."
692.1605 +msgstr ""
692.1606 +
692.1607 +#. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para>
692.1608 +#: ../en/appB-mq-ref.xml:501
692.1609 +msgid "<option role=\"hg-opt-strip\">-n</option>: Do not save a backup bundle."
692.1610 +msgstr ""
692.1611 +
692.1612 +#. type: Content of: <book><appendix><sect1><title>
692.1613 +#: ../en/appB-mq-ref.xml:508
692.1614 +msgid "MQ file reference"
692.1615 +msgstr "MQ 文件参考"
692.1616 +
692.1617 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1618 +#: ../en/appB-mq-ref.xml:511
692.1619 +msgid "The <filename role=\"special\">series</filename> file"
692.1620 +msgstr "<filename role=\"special\">序列</filename>文件"
692.1621 +
692.1622 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1623 +#: ../en/appB-mq-ref.xml:514
692.1624 +msgid ""
692.1625 +"The <filename role=\"special\">series</filename> file contains a list of the "
692.1626 +"names of all patches that MQ can apply.  It is represented as a list of "
692.1627 +"names, with one name saved per line.  Leading and trailing white space in "
692.1628 +"each line are ignored."
692.1629 +msgstr ""
692.1630 +
692.1631 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1632 +#: ../en/appB-mq-ref.xml:520
692.1633 +msgid ""
692.1634 +"Lines may contain comments.  A comment begins with the <quote><literal>#</"
692.1635 +"literal></quote> character, and extends to the end of the line.  Empty lines, "
692.1636 +"and lines that contain only comments, are ignored."
692.1637 +msgstr ""
692.1638 +
692.1639 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1640 +#: ../en/appB-mq-ref.xml:525
692.1641 +msgid ""
692.1642 +"You will often need to edit the <filename role=\"special\">series</filename> "
692.1643 +"file by hand, hence the support for comments and empty lines noted above.  "
692.1644 +"For example, you can comment out a patch temporarily, and <command role=\"hg-"
692.1645 +"ext-mq\">qpush</command> will skip over that patch when applying patches.  "
692.1646 +"You can also change the order in which patches are applied by reordering "
692.1647 +"their entries in the <filename role=\"special\">series</filename> file."
692.1648 +msgstr ""
692.1649 +
692.1650 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1651 +#: ../en/appB-mq-ref.xml:534
692.1652 +msgid ""
692.1653 +"Placing the <filename role=\"special\">series</filename> file under revision "
692.1654 +"control is also supported; it is a good idea to place all of the patches that "
692.1655 +"it refers to under revision control, as well.  If you create a patch "
692.1656 +"directory using the <option role=\"hg-ext-mq-cmd-qinit-opt\">-c</option> "
692.1657 +"option to <command role=\"hg-ext-mq\">qinit</command>, this will be done for "
692.1658 +"you automatically."
692.1659 +msgstr ""
692.1660 +
692.1661 +#. type: Content of: <book><appendix><sect1><sect2><title>
692.1662 +#: ../en/appB-mq-ref.xml:544
692.1663 +msgid "The <filename role=\"special\">status</filename> file"
692.1664 +msgstr "<filename role=\"special\">状态</filename>文件"
692.1665 +
692.1666 +#. type: Content of: <book><appendix><sect1><sect2><para>
692.1667 +#: ../en/appB-mq-ref.xml:547
692.1668 +msgid ""
692.1669 +"The <filename role=\"special\">status</filename> file contains the names and "
692.1670 +"changeset hashes of all patches that MQ currently has applied.  Unlike the "
692.1671 +"<filename role=\"special\">series</filename> file, this file is not intended "
692.1672 +"for editing.  You should not place this file under revision control, or "
692.1673 +"modify it in any way.  It is used by MQ strictly for internal book-keeping."
692.1674 +msgstr ""
692.1675 +
692.1676 +#. type: Content of: <book><appendix><title>
692.1677 +#: ../en/appC-srcinstall.xml:5
692.1678 +msgid "Installing Mercurial from source"
692.1679 +msgstr "从源代码安装 Mercurial"
692.1680 +
692.1681 +#. type: Content of: <book><appendix><sect1><title>
692.1682 +#: ../en/appC-srcinstall.xml:8
692.1683 +msgid "On a Unix-like system"
692.1684 +msgstr "类 Unix 系统"
692.1685 +
692.1686 +#. type: Content of: <book><appendix><sect1><para>
692.1687 +#: ../en/appC-srcinstall.xml:10
692.1688 +msgid ""
692.1689 +"If you are using a Unix-like system that has a sufficiently recent version of "
692.1690 +"Python (2.3 or newer) available, it is easy to install Mercurial from source."
692.1691 +msgstr ""
692.1692 +"如果你使用类 Unix 系统,并且有足够新的 Python (2.3 更新),从源代码安装 "
692.1693 +"Mercurial 就很容易了。"
692.1694 +
692.1695 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.1696 +#: ../en/appC-srcinstall.xml:14
692.1697 +msgid ""
692.1698 +"Download a recent source tarball from <ulink url=\"http://www.selenic.com/"
692.1699 +"mercurial/download\">http://www.selenic.com/mercurial/download</ulink>."
692.1700 +msgstr ""
692.1701 +"从 <ulink url=\"http://www.selenic.com/mercurial/download\">http://www."
692.1702 +"selenic.com/mercurial/download</ulink> 下载最新的源代码。"
692.1703 +
692.1704 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.1705 +#: ../en/appC-srcinstall.xml:17
692.1706 +msgid "Unpack the tarball:"
692.1707 +msgstr "解压:"
692.1708 +
692.1709 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.1710 +#: ../en/appC-srcinstall.xml:20
692.1711 +msgid ""
692.1712 +"Go into the source directory and run the installer script.  This will build "
692.1713 +"Mercurial and install it in your home directory."
692.1714 +msgstr "进入源代码目录,执行安装教本。这会构建 Mercurial,安装到你的家目录。"
692.1715 +
692.1716 +#. type: Content of: <book><appendix><sect1><para>
692.1717 +#: ../en/appC-srcinstall.xml:27
692.1718 +msgid ""
692.1719 +"Once the install finishes, Mercurial will be in the <literal>bin</literal> "
692.1720 +"subdirectory of your home directory.  Don't forget to make sure that this "
692.1721 +"directory is present in your shell's search path."
692.1722 +msgstr ""
692.1723 +"安装完成后,Mercurial 就位于家目录的 <literal>bin</literal> 子目录。不要忘记将"
692.1724 +"这个目录加入到你的可执行文件搜索路径中。"
692.1725 +
692.1726 +#. type: Content of: <book><appendix><sect1><para>
692.1727 +#: ../en/appC-srcinstall.xml:32
692.1728 +msgid ""
692.1729 +"You will probably need to set the <envar>PYTHONPATH</envar> environment "
692.1730 +"variable so that the Mercurial executable can find the rest of the Mercurial "
692.1731 +"packages.  For example, on my laptop, I have set it to <literal>/home/bos/lib/"
692.1732 +"python</literal>.  The exact path that you will need to use depends on how "
692.1733 +"Python was built for your system, but should be easy to figure out.  If "
692.1734 +"you're uncertain, look through the output of the installer script above, and "
692.1735 +"see where the contents of the <literal>mercurial</literal> directory were "
692.1736 +"installed to."
692.1737 +msgstr ""
692.1738 +"你可能需要设置环境变量 <envar>PYTHONPATH</envar>,以便 Mercurial 可执行文件能"
692.1739 +"找到 Mercurial 包。例如,在我的笔记本电脑中,必须设置为 <literal>/home/bos/"
692.1740 +"lib/python</literal>。你需要使用的路径依赖于 Python 的构建方式,这很容易找出"
692.1741 +"来。如果你不确定,仔细察看上面的安装脚本输出,检查包含 <literal>mercurial</"
692.1742 +"literal> 目录的内容的安装位置。"
692.1743 +
692.1744 +#. type: Content of: <book><appendix><sect1><title>
692.1745 +#: ../en/appC-srcinstall.xml:44
692.1746 +msgid "On Windows"
692.1747 +msgstr "Windows 系统"
692.1748 +
692.1749 +#. type: Content of: <book><appendix><sect1><para>
692.1750 +#: ../en/appC-srcinstall.xml:46
692.1751 +msgid ""
692.1752 +"Building and installing Mercurial on Windows requires a variety of tools, a "
692.1753 +"fair amount of technical knowledge, and considerable patience.  I very much "
692.1754 +"<emphasis>do not recommend</emphasis> this route if you are a <quote>casual "
692.1755 +"user</quote>.  Unless you intend to hack on Mercurial, I strongly suggest "
692.1756 +"that you use a binary package instead."
692.1757 +msgstr ""
692.1758 +"在 Windows 中构建和安装 Mercurial 需要各种工具,相当多的技术背景,以及足够的耐"
692.1759 +"心。如果你是一个<quote>初级用户</quote>,我<emphasis>很不赞成</emphasis>这个方"
692.1760 +"法。我强烈建议你使用二进制安装包,除非你想深入研究 Mercurial 本身。"
692.1761 +
692.1762 +#. type: Content of: <book><appendix><sect1><para>
692.1763 +#: ../en/appC-srcinstall.xml:53
692.1764 +msgid ""
692.1765 +"If you are intent on building Mercurial from source on Windows, follow the "
692.1766 +"<quote>hard way</quote> directions on the Mercurial wiki at <ulink url="
692.1767 +"\"http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall\">http://www."
692.1768 +"selenic.com/mercurial/wiki/index.cgi/WindowsInstall</ulink>, and expect the "
692.1769 +"process to involve a lot of fiddly work."
692.1770 +msgstr ""
692.1771 +"If you are intent on building Mercurial from source on Windows, follow the "
692.1772 +"<quote>hard way</quote> directions on the Mercurial wiki at <ulink url="
692.1773 +"\"http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall\">http://www."
692.1774 +"selenic.com/mercurial/wiki/index.cgi/WindowsInstall</ulink>, and expect the "
692.1775 +"process to involve a lot of fiddly work."
692.1776 +
692.1777 +#. type: Content of: <book><appendix><title>
692.1778 +#: ../en/appD-license.xml:5
692.1779 +msgid "Open Publication License"
692.1780 +msgstr "开放出版协议"
692.1781 +
692.1782 +#. type: Content of: <book><appendix><para>
692.1783 +#: ../en/appD-license.xml:7
692.1784 +msgid "Version 1.0, 8 June 1999"
692.1785 +msgstr "版本 1.0,1999 年 6 月 8 日。"
692.1786 +
692.1787 +#. type: Content of: <book><appendix><sect1><title>
692.1788 +#: ../en/appD-license.xml:10
692.1789 +msgid "Requirements on both unmodified and modified versions"
692.1790 +msgstr ""
692.1791 +
692.1792 +#. type: Content of: <book><appendix><sect1><para>
692.1793 +#: ../en/appD-license.xml:13
692.1794 +msgid ""
692.1795 +"The Open Publication works may be reproduced and distributed in whole or in "
692.1796 +"part, in any medium physical or electronic, provided that the terms of this "
692.1797 +"license are adhered to, and that this license or an incorporation of it by "
692.1798 +"reference (with any options elected by the author(s) and/or publisher) is "
692.1799 +"displayed in the reproduction."
692.1800 +msgstr ""
692.1801 +
692.1802 +#. type: Content of: <book><appendix><sect1><para>
692.1803 +#: ../en/appD-license.xml:20
692.1804 +msgid "Proper form for an incorporation by reference is as follows:"
692.1805 +msgstr ""
692.1806 +
692.1807 +#. type: Content of: <book><appendix><sect1><blockquote><para>
692.1808 +#: ../en/appD-license.xml:24
692.1809 +msgid ""
692.1810 +"Copyright (c) <emphasis>year</emphasis> by <emphasis>author's name or "
692.1811 +"designee</emphasis>. This material may be distributed only subject to the "
692.1812 +"terms and conditions set forth in the Open Publication License, v<emphasis>x."
692.1813 +"y</emphasis> or later (the latest version is presently available at <ulink "
692.1814 +"url=\"http://www.opencontent.org/openpub/\">http://www.opencontent.org/"
692.1815 +"openpub/</ulink>)."
692.1816 +msgstr ""
692.1817 +
692.1818 +#. type: Content of: <book><appendix><sect1><para>
692.1819 +#: ../en/appD-license.xml:33
692.1820 +msgid ""
692.1821 +"The reference must be immediately followed with any options elected by the "
692.1822 +"author(s) and/or publisher of the document (see <xref linkend=\"sec:opl:"
692.1823 +"options\"/>)."
692.1824 +msgstr ""
692.1825 +
692.1826 +#. type: Content of: <book><appendix><sect1><para>
692.1827 +#: ../en/appD-license.xml:37
692.1828 +msgid ""
692.1829 +"Commercial redistribution of Open Publication-licensed material is permitted."
692.1830 +msgstr ""
692.1831 +
692.1832 +#. type: Content of: <book><appendix><sect1><para>
692.1833 +#: ../en/appD-license.xml:40
692.1834 +msgid ""
692.1835 +"Any publication in standard (paper) book form shall require the citation of "
692.1836 +"the original publisher and author. The publisher and author's names shall "
692.1837 +"appear on all outer surfaces of the book. On all outer surfaces of the book "
692.1838 +"the original publisher's name shall be as large as the title of the work and "
692.1839 +"cited as possessive with respect to the title."
692.1840 +msgstr ""
692.1841 +
692.1842 +#. type: Content of: <book><appendix><sect1><title>
692.1843 +#: ../en/appD-license.xml:49
692.1844 +msgid "Copyright"
692.1845 +msgstr ""
692.1846 +
692.1847 +#. type: Content of: <book><appendix><sect1><para>
692.1848 +#: ../en/appD-license.xml:51
692.1849 +msgid ""
692.1850 +"The copyright to each Open Publication is owned by its author(s) or designee."
692.1851 +msgstr ""
692.1852 +
692.1853 +#. type: Content of: <book><appendix><sect1><title>
692.1854 +#: ../en/appD-license.xml:56
692.1855 +msgid "Scope of license"
692.1856 +msgstr ""
692.1857 +
692.1858 +#. type: Content of: <book><appendix><sect1><para>
692.1859 +#: ../en/appD-license.xml:58
692.1860 +msgid ""
692.1861 +"The following license terms apply to all Open Publication works, unless "
692.1862 +"otherwise explicitly stated in the document."
692.1863 +msgstr ""
692.1864 +
692.1865 +#. type: Content of: <book><appendix><sect1><para>
692.1866 +#: ../en/appD-license.xml:62
692.1867 +msgid ""
692.1868 +"Mere aggregation of Open Publication works or a portion of an Open "
692.1869 +"Publication work with other works or programs on the same media shall not "
692.1870 +"cause this license to apply to those other works. The aggregate work shall "
692.1871 +"contain a notice specifying the inclusion of the Open Publication material "
692.1872 +"and appropriate copyright notice."
692.1873 +msgstr ""
692.1874 +
692.1875 +#. type: Content of: <book><appendix><sect1><para>
692.1876 +#: ../en/appD-license.xml:69
692.1877 +msgid ""
692.1878 +"<emphasis role=\"bold\">Severability</emphasis>. If any part of this license "
692.1879 +"is found to be unenforceable in any jurisdiction, the remaining portions of "
692.1880 +"the license remain in force."
692.1881 +msgstr ""
692.1882 +
692.1883 +#. type: Content of: <book><appendix><sect1><para>
692.1884 +#: ../en/appD-license.xml:74
692.1885 +msgid ""
692.1886 +"<emphasis role=\"bold\">No warranty</emphasis>. Open Publication works are "
692.1887 +"licensed and provided <quote>as is</quote> without warranty of any kind, "
692.1888 +"express or implied, including, but not limited to, the implied warranties of "
692.1889 +"merchantability and fitness for a particular purpose or a warranty of non-"
692.1890 +"infringement."
692.1891 +msgstr ""
692.1892 +
692.1893 +#. type: Content of: <book><appendix><sect1><title>
692.1894 +#: ../en/appD-license.xml:83
692.1895 +msgid "Requirements on modified works"
692.1896 +msgstr ""
692.1897 +
692.1898 +#. type: Content of: <book><appendix><sect1><para>
692.1899 +#: ../en/appD-license.xml:85
692.1900 +msgid ""
692.1901 +"All modified versions of documents covered by this license, including "
692.1902 +"translations, anthologies, compilations and partial documents, must meet the "
692.1903 +"following requirements:"
692.1904 +msgstr ""
692.1905 +
692.1906 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.1907 +#: ../en/appD-license.xml:90
692.1908 +msgid "The modified version must be labeled as such."
692.1909 +msgstr ""
692.1910 +
692.1911 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.1912 +#: ../en/appD-license.xml:93
692.1913 +msgid ""
692.1914 +"The person making the modifications must be identified and the modifications "
692.1915 +"dated."
692.1916 +msgstr ""
692.1917 +
692.1918 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.1919 +#: ../en/appD-license.xml:96
692.1920 +msgid ""
692.1921 +"Acknowledgement of the original author and publisher if applicable must be "
692.1922 +"retained according to normal academic citation practices."
692.1923 +msgstr ""
692.1924 +
692.1925 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.1926 +#: ../en/appD-license.xml:100
692.1927 +msgid "The location of the original unmodified document must be identified."
692.1928 +msgstr ""
692.1929 +
692.1930 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.1931 +#: ../en/appD-license.xml:103
692.1932 +msgid ""
692.1933 +"The original author's (or authors') name(s) may not be used to assert or "
692.1934 +"imply endorsement of the resulting document without the original author's (or "
692.1935 +"authors')  permission."
692.1936 +msgstr ""
692.1937 +
692.1938 +#. type: Content of: <book><appendix><sect1><title>
692.1939 +#: ../en/appD-license.xml:111
692.1940 +msgid "Good-practice recommendations"
692.1941 +msgstr ""
692.1942 +
692.1943 +#. type: Content of: <book><appendix><sect1><para>
692.1944 +#: ../en/appD-license.xml:113
692.1945 +msgid ""
692.1946 +"In addition to the requirements of this license, it is requested from and "
692.1947 +"strongly recommended of redistributors that:"
692.1948 +msgstr ""
692.1949 +
692.1950 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.1951 +#: ../en/appD-license.xml:118
692.1952 +msgid ""
692.1953 +"If you are distributing Open Publication works on hardcopy or CD-ROM, you "
692.1954 +"provide email notification to the authors of your intent to redistribute at "
692.1955 +"least thirty days before your manuscript or media freeze, to give the authors "
692.1956 +"time to provide updated documents. This notification should describe "
692.1957 +"modifications, if any, made to the document."
692.1958 +msgstr ""
692.1959 +
692.1960 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.1961 +#: ../en/appD-license.xml:125
692.1962 +msgid ""
692.1963 +"All substantive modifications (including deletions) be either clearly marked "
692.1964 +"up in the document or else described in an attachment to the document."
692.1965 +msgstr ""
692.1966 +
692.1967 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.1968 +#: ../en/appD-license.xml:129
692.1969 +msgid ""
692.1970 +"Finally, while it is not mandatory under this license, it is considered good "
692.1971 +"form to offer a free copy of any hardcopy and CD-ROM expression of an Open "
692.1972 +"Publication-licensed work to its author(s)."
692.1973 +msgstr ""
692.1974 +
692.1975 +#. type: Content of: <book><appendix><sect1><title>
692.1976 +#: ../en/appD-license.xml:137
692.1977 +msgid "License options"
692.1978 +msgstr ""
692.1979 +
692.1980 +#. type: Content of: <book><appendix><sect1><para>
692.1981 +#: ../en/appD-license.xml:139
692.1982 +msgid ""
692.1983 +"The author(s) and/or publisher of an Open Publication-licensed document may "
692.1984 +"elect certain options by appending language to the reference to or copy of "
692.1985 +"the license.  These options are considered part of the license instance and "
692.1986 +"must be included with the license (or its incorporation by reference) in "
692.1987 +"derived works."
692.1988 +msgstr ""
692.1989 +
692.1990 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.1991 +#: ../en/appD-license.xml:147
692.1992 +msgid ""
692.1993 +"To prohibit distribution of substantively modified versions without the "
692.1994 +"explicit permission of the author(s). <quote>Substantive modification</quote> "
692.1995 +"is defined as a change to the semantic content of the document, and excludes "
692.1996 +"mere changes in format or typographical corrections."
692.1997 +msgstr ""
692.1998 +
692.1999 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.2000 +#: ../en/appD-license.xml:154
692.2001 +msgid ""
692.2002 +"To accomplish this, add the phrase <quote>Distribution of substantively "
692.2003 +"modified versions of this document is prohibited without the explicit "
692.2004 +"permission of the copyright holder.</quote> to the license reference or copy."
692.2005 +msgstr ""
692.2006 +
692.2007 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.2008 +#: ../en/appD-license.xml:160
692.2009 +msgid ""
692.2010 +"To prohibit any publication of this work or derivative works in whole or in "
692.2011 +"part in standard (paper)  book form for commercial purposes is prohibited "
692.2012 +"unless prior permission is obtained from the copyright holder."
692.2013 +msgstr ""
692.2014 +
692.2015 +#. type: Content of: <book><appendix><sect1><orderedlist><listitem><para>
692.2016 +#: ../en/appD-license.xml:165
692.2017 +msgid ""
692.2018 +"To accomplish this, add the phrase <quote>Distribution of the work or "
692.2019 +"derivative of the work in any standard (paper) book form is prohibited unless "
692.2020 +"prior permission is obtained from the copyright holder.</quote> to the "
692.2021 +"license reference or copy."
692.2022 +msgstr ""
692.2023 +
692.2024 +#. type: Content of: <book><preface><title>
692.2025 +#: ../en/ch00-preface.xml:5
692.2026 +msgid "Preface"
692.2027 +msgstr "序言"
692.2028 +
692.2029 +#. type: Content of: <book><preface><sect1><title>
692.2030 +#: ../en/ch00-preface.xml:8
692.2031 +msgid "Technical storytelling"
692.2032 +msgstr "技术背景"
692.2033 +
692.2034 +#. type: Content of: <book><preface><sect1><para>
692.2035 +#: ../en/ch00-preface.xml:10
692.2036 +msgid ""
692.2037 +"A few years ago, when I wanted to explain why I believed that distributed "
692.2038 +"revision control is important, the field was then so new that there was "
692.2039 +"almost no published literature to refer people to."
692.2040 +msgstr ""
692.2041 +
692.2042 +#. type: Content of: <book><preface><sect1><para>
692.2043 +#: ../en/ch00-preface.xml:15
692.2044 +msgid ""
692.2045 +"Although at that time I spent some time working on the internals of Mercurial "
692.2046 +"itself, I switched to writing this book because that seemed like the most "
692.2047 +"effective way to help the software to reach a wide audience, along with the "
692.2048 +"idea that revision control ought to be distributed in nature.  I publish the "
692.2049 +"book online under a liberal license for the same reason: to get the word out."
692.2050 +msgstr ""
692.2051 +
692.2052 +#. type: Content of: <book><preface><sect1><para>
692.2053 +#: ../en/ch00-preface.xml:23
692.2054 +msgid ""
692.2055 +"There's a familiar rhythm to a good software book that closely resembles "
692.2056 +"telling a story: What is this thing? Why does it matter? How will it help me? "
692.2057 +"How do I use it? In this book, I try to answer those questions for "
692.2058 +"distributed revision control in general, and for Mercurial in particular."
692.2059 +msgstr ""
692.2060 +
692.2061 +#. type: Content of: <book><preface><sect1><title>
692.2062 +#: ../en/ch00-preface.xml:31
692.2063 +msgid "Thank you for supporting Mercurial"
692.2064 +msgstr "谢谢你支持 Mercurial"
692.2065 +
692.2066 +#. type: Content of: <book><preface><sect1><para>
692.2067 +#: ../en/ch00-preface.xml:33
692.2068 +msgid ""
692.2069 +"By purchasing a copy of this book, you are supporting the continued "
692.2070 +"development and freedom of Mercurial in particular, and of open source and "
692.2071 +"free software in general. O'Reilly Media and I are donating my royalties on "
692.2072 +"the sales of this book to the Software Freedom Conservancy (<ulink url="
692.2073 +"\"http://www.softwarefreedom.org/\">http://www.softwarefreedom.org/</ulink>)  "
692.2074 +"which provides clerical and legal support to Mercurial and a number of other "
692.2075 +"prominent and worthy open source software projects."
692.2076 +msgstr ""
692.2077 +
692.2078 +#. type: Content of: <book><preface><sect1><title>
692.2079 +#: ../en/ch00-preface.xml:45
692.2080 +msgid "Acknowledgments"
692.2081 +msgstr "致谢"
692.2082 +
692.2083 +#. type: Content of: <book><preface><sect1><para>
692.2084 +#: ../en/ch00-preface.xml:47
692.2085 +msgid ""
692.2086 +"This book would not exist were it not for the efforts of Matt Mackall, the "
692.2087 +"author and project lead of Mercurial.  He is ably assisted by hundreds of "
692.2088 +"volunteer contributors across the world."
692.2089 +msgstr ""
692.2090 +
692.2091 +#. type: Content of: <book><preface><sect1><para>
692.2092 +#: ../en/ch00-preface.xml:52
692.2093 +msgid ""
692.2094 +"My children, Cian and Ruairi, always stood ready to help me to unwind with "
692.2095 +"wonderful, madcap little-boy games.  I'd also like to thank my ex-wife, "
692.2096 +"Shannon, for her support."
692.2097 +msgstr ""
692.2098 +
692.2099 +#. type: Content of: <book><preface><sect1><para>
692.2100 +#: ../en/ch00-preface.xml:56
692.2101 +msgid ""
692.2102 +"My colleagues and friends provided help and support in innumerable ways.  "
692.2103 +"This list of people is necessarily very incomplete: Stephen Hahn, Karyn "
692.2104 +"Ritter, Bonnie Corwin, James Vasile, Matt Norwood, Eben Moglen, Bradley Kuhn, "
692.2105 +"Robert Walsh, Jeremy Fitzhardinge, Rachel Chalmers."
692.2106 +msgstr ""
692.2107 +
692.2108 +#. type: Content of: <book><preface><sect1><para>
692.2109 +#: ../en/ch00-preface.xml:62
692.2110 +msgid ""
692.2111 +"I developed this book in the open, posting drafts of chapters to the book web "
692.2112 +"site as I completed them.  Readers then submitted feedback using a web "
692.2113 +"application that I developed.  By the time I finished writing the book, more "
692.2114 +"than 100 people had submitted comments, an amazing number considering that "
692.2115 +"the comment system was live for only about two months towards the end of the "
692.2116 +"writing process."
692.2117 +msgstr ""
692.2118 +
692.2119 +#. type: Content of: <book><preface><sect1><para>
692.2120 +#: ../en/ch00-preface.xml:70
692.2121 +msgid ""
692.2122 +"I would particularly like to recognize the following people, who between them "
692.2123 +"contributed over a third of the total number of comments.  I would like to "
692.2124 +"thank them for their care and effort in providing so much detailed feedback."
692.2125 +msgstr ""
692.2126 +
692.2127 +#. type: Content of: <book><preface><sect1><para>
692.2128 +#: ../en/ch00-preface.xml:75
692.2129 +msgid ""
692.2130 +"Martin Geisler, Damien Cassou, Alexey Bakhirkin, Till Plewe, Dan Himes, Paul "
692.2131 +"Sargent, Gokberk Hamurcu, Matthijs van der Vleuten, Michael Chermside, John "
692.2132 +"Mulligan, Jordi Fita, Jon Parise."
692.2133 +msgstr ""
692.2134 +
692.2135 +#. type: Content of: <book><preface><sect1><para>
692.2136 +#: ../en/ch00-preface.xml:80
692.2137 +msgid ""
692.2138 +"I also want to acknowledge the help of the many people who caught errors and "
692.2139 +"provided helpful suggestions throughout the book."
692.2140 +msgstr ""
692.2141 +
692.2142 +#. type: Content of: <book><preface><sect1><para>
692.2143 +#: ../en/ch00-preface.xml:84
692.2144 +msgid ""
692.2145 +"Jeremy W. Sherman, Brian Mearns, Vincent Furia, Iwan Luijks, Billy Edwards, "
692.2146 +"Andreas Sliwka, Paweł Sołyga, Eric Hanchrow, Steve Nicolai, Michał Masłowski, "
692.2147 +"Kevin Fitch, Johan Holmberg, Hal Wine, Volker Simonis, Thomas P Jakobsen, Ted "
692.2148 +"Stresen-Reuter, Stephen Rasku, Raphael Das Gupta, Ned Batchelder, Lou Keeble, "
692.2149 +"Li Linxiao, Kao Cardoso Félix, Joseph Wecker, Jon Prescot, Jon Maken, John "
692.2150 +"Yeary, Jason Harris, Geoffrey Zheng, Fredrik Jonson, Ed Davies, David "
692.2151 +"Zumbrunnen, David Mercer, David Cabana, Ben Karel, Alan Franzoni, Yousry "
692.2152 +"Abdallah, Whitney Young, Vinay Sajip, Tom Towle, Tim Ottinger, Thomas "
692.2153 +"Schraitle, Tero Saarni, Ted Mielczarek, Svetoslav Agafonkin, Shaun Rowland, "
692.2154 +"Rocco Rutte, Polo-Francois Poli, Philip Jenvey, Petr Tesałék, Peter R. "
692.2155 +"Annema, Paul Bonser, Olivier Scherler, Olivier Fournier, Nick Parker, Nick "
692.2156 +"Fabry, Nicholas Guarracino, Mike Driscoll, Mike Coleman, Mietek Bák, Michael "
692.2157 +"Maloney, László Nagy, Kent Johnson, Julio Nobrega, Jord Fita, Jonathan March, "
692.2158 +"Jonas Nockert, Jim Tittsler, Jeduan Cornejo Legorreta, Jan Larres, James "
692.2159 +"Murphy, Henri Wiechers, Hagen Möbius, Gábor Farkas, Fabien Engels, Evert Rol, "
692.2160 +"Evan Willms, Eduardo Felipe Castegnaro, Dennis Decker Jensen, Deniz Dogan, "
692.2161 +"David Smith, Daed Lee, Christine Slotty, Charles Merriam, Guillaume Catto, "
692.2162 +"Brian Dorsey, Bob Nystrom, Benoit Boissinot, Avi Rosenschein, Andrew Watts, "
692.2163 +"Andrew Donkin, Alexey Rodriguez, Ahmed Chaudhary."
692.2164 +msgstr ""
692.2165 +
692.2166 +#. type: Content of: <book><preface><sect1><title>
692.2167 +#: ../en/ch00-preface.xml:111
692.2168 +msgid "Conventions Used in This Book"
692.2169 +msgstr "本书的约定"
692.2170 +
692.2171 +#. type: Content of: <book><preface><sect1><para>
692.2172 +#: ../en/ch00-preface.xml:113
692.2173 +msgid "The following typographical conventions are used in this book:"
692.2174 +msgstr "本书使用如下的印刷约定:"
692.2175 +
692.2176 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><term>
692.2177 +#: ../en/ch00-preface.xml:118
692.2178 +msgid "Italic"
692.2179 +msgstr "斜体"
692.2180 +
692.2181 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><listitem><para>
692.2182 +#: ../en/ch00-preface.xml:121
692.2183 +msgid ""
692.2184 +"Indicates new terms, URLs, email addresses, filenames, and file extensions."
692.2185 +msgstr "标识新术语,URL,电子邮件地址,文件名称与扩展名。"
692.2186 +
692.2187 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><term>
692.2188 +#: ../en/ch00-preface.xml:127
692.2189 +msgid "<literal>Constant width</literal>"
692.2190 +msgstr "<literal>等宽</literal>"
692.2191 +
692.2192 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><listitem><para>
692.2193 +#: ../en/ch00-preface.xml:130
692.2194 +msgid ""
692.2195 +"Used for program listings, as well as within paragraphs to refer to program "
692.2196 +"elements such as variable or function names, databases, data types, "
692.2197 +"environment variables, statements, and keywords."
692.2198 +msgstr ""
692.2199 +"用于程序列表,以及段内引用的程序元素,例如变量、函数名称、数据库、数据类型、环"
692.2200 +"境变量、声明和关键字。"
692.2201 +
692.2202 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><term>
692.2203 +#: ../en/ch00-preface.xml:138
692.2204 +msgid "<userinput>Constant width bold</userinput>"
692.2205 +msgstr "<userinput>等宽粗体</userinput>"
692.2206 +
692.2207 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><listitem><para>
692.2208 +#: ../en/ch00-preface.xml:141
692.2209 +msgid "Shows commands or other text that should be typed literally by the user."
692.2210 +msgstr "标识命令或者其它用户应该逐字输入的文本。"
692.2211 +
692.2212 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><term>
692.2213 +#: ../en/ch00-preface.xml:147
692.2214 +msgid "<replaceable>Constant width italic</replaceable>"
692.2215 +msgstr "<replaceable>等宽斜体</replaceable>"
692.2216 +
692.2217 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><listitem><para>
692.2218 +#: ../en/ch00-preface.xml:150
692.2219 +msgid ""
692.2220 +"Shows text that should be replaced with user-supplied values or by values "
692.2221 +"determined by context."
692.2222 +msgstr "标识应该被用户提供的值或者取决于上下文的值替换的文本。"
692.2223 +
692.2224 +#. type: Content of: <book><preface><sect1><tip><para>
692.2225 +#: ../en/ch00-preface.xml:157
692.2226 +msgid "This icon signifies a tip, suggestion, or general note."
692.2227 +msgstr "此图标表示提示,建议或者一般的的注释。"
692.2228 +
692.2229 +#. type: Content of: <book><preface><sect1><caution><para>
692.2230 +#: ../en/ch00-preface.xml:162
692.2231 +msgid "This icon indicates a warning or caution."
692.2232 +msgstr "此图标表示警告。"
692.2233 +
692.2234 +#. type: Content of: <book><preface><sect1><title>
692.2235 +#: ../en/ch00-preface.xml:167
692.2236 +msgid "Using Code Examples"
692.2237 +msgstr "使用样例代码"
692.2238 +
692.2239 +#. type: Content of: <book><preface><sect1><para>
692.2240 +#: ../en/ch00-preface.xml:169
692.2241 +msgid ""
692.2242 +"This book is here to help you get your job done. In general, you may use the "
692.2243 +"code in this book in your programs and documentation. You do not need to "
692.2244 +"contact us for permission unless you’re reproducing a significant portion of "
692.2245 +"the code. For example, writing a program that uses several chunks of code "
692.2246 +"from this book does not require permission. Selling or distributing a CD-ROM "
692.2247 +"of examples from O’Reilly books does require permission.  Answering a "
692.2248 +"question by citing this book and quoting example code does not require "
692.2249 +"permission. Incorporating a significant amount of example code from this book "
692.2250 +"into your product’s documentation does require permission."
692.2251 +msgstr ""
692.2252 +
692.2253 +#. type: Content of: <book><preface><sect1><para>
692.2254 +#: ../en/ch00-preface.xml:181
692.2255 +msgid ""
692.2256 +"We appreciate, but do not require, attribution. An attribution usually "
692.2257 +"includes the title, author, publisher, and ISBN. For example: “<emphasis>Book "
692.2258 +"Title</emphasis> by Some Author. Copyright 2008 O’Reilly Media, Inc., 978-0-"
692.2259 +"596-xxxx-x.”"
692.2260 +msgstr ""
692.2261 +
692.2262 +#. type: Content of: <book><preface><sect1><para>
692.2263 +#: ../en/ch00-preface.xml:187
692.2264 +msgid ""
692.2265 +"If you feel your use of code examples falls outside fair use or the "
692.2266 +"permission given above, feel free to contact us at <email>permissions@oreilly."
692.2267 +"com</email>."
692.2268 +msgstr ""
692.2269 +
692.2270 +#. type: Content of: <book><preface><sect1><title>
692.2271 +#: ../en/ch00-preface.xml:193
692.2272 +msgid "Safari® Books Online"
692.2273 +msgstr "Safari® 在线书库"
692.2274 +
692.2275 +#. type: Content of: <book><preface><sect1><note><para>
692.2276 +#: ../en/ch00-preface.xml:196
692.2277 +msgid ""
692.2278 +"When you see a Safari® Books Online icon on the cover of your favorite "
692.2279 +"technology book, that means the book is available online through the O’Reilly "
692.2280 +"Network Safari Bookshelf."
692.2281 +msgstr ""
692.2282 +
692.2283 +#. type: Content of: <book><preface><sect1><para>
692.2284 +#: ../en/ch00-preface.xml:202
692.2285 +msgid ""
692.2286 +"Safari offers a solution that’s better than e-books. It’s a virtual library "
692.2287 +"that lets you easily search thousands of top tech books, cut and paste code "
692.2288 +"samples, download chapters, and find quick answers when you need the most "
692.2289 +"accurate, current information. Try it for free at <ulink role=\"orm:hideurl:"
692.2290 +"ital\" url=\"http://my.safaribooksonline.com/?portal=oreilly\">http://my."
692.2291 +"safaribooksonline.com</ulink>."
692.2292 +msgstr ""
692.2293 +
692.2294 +#. type: Content of: <book><preface><sect1><title>
692.2295 +#: ../en/ch00-preface.xml:211
692.2296 +msgid "How to Contact Us"
692.2297 +msgstr "联系我们"
692.2298 +
692.2299 +#. type: Content of: <book><preface><sect1><para>
692.2300 +#: ../en/ch00-preface.xml:213
692.2301 +msgid ""
692.2302 +"Please address comments and questions concerning this book to the publisher:"
692.2303 +msgstr ""
692.2304 +
692.2305 +#. type: Content of: <book><preface><sect1><simplelist><member>
692.2306 +#: ../en/ch00-preface.xml:217
692.2307 +msgid "O’Reilly Media, Inc."
692.2308 +msgstr ""
692.2309 +
692.2310 +#. type: Content of: <book><preface><sect1><simplelist><member>
692.2311 +#: ../en/ch00-preface.xml:219
692.2312 +msgid "1005 Gravenstein Highway North"
692.2313 +msgstr ""
692.2314 +
692.2315 +#. type: Content of: <book><preface><sect1><simplelist><member>
692.2316 +#: ../en/ch00-preface.xml:221
692.2317 +msgid "Sebastopol, CA 95472"
692.2318 +msgstr ""
692.2319 +
692.2320 +#. type: Content of: <book><preface><sect1><simplelist><member>
692.2321 +#: ../en/ch00-preface.xml:223
692.2322 +msgid "800-998-9938 (in the United States or Canada)"
692.2323 +msgstr ""
692.2324 +
692.2325 +#. type: Content of: <book><preface><sect1><simplelist><member>
692.2326 +#: ../en/ch00-preface.xml:225
692.2327 +msgid "707-829-0515 (international or local)"
692.2328 +msgstr ""
692.2329 +
692.2330 +#. type: Content of: <book><preface><sect1><simplelist><member>
692.2331 +#: ../en/ch00-preface.xml:227
692.2332 +msgid "707 829-0104 (fax)"
692.2333 +msgstr ""
692.2334 +
692.2335 +#. type: Content of: <book><preface><sect1><para>
692.2336 +#: ../en/ch00-preface.xml:230
692.2337 +msgid ""
692.2338 +"We have a web page for this book, where we list errata, examples, and any "
692.2339 +"additional information. You can access this page at:"
692.2340 +msgstr ""
692.2341 +
692.2342 +#. type: Content of: <book><preface><sect1><simplelist><member>
692.2343 +#: ../en/ch00-preface.xml:235
692.2344 +msgid ""
692.2345 +"<ulink url=\"http://www.oreilly.com/catalog/&lt;catalog page&gt;\"></ulink>"
692.2346 +msgstr ""
692.2347 +
692.2348 +#. type: Content of: <book><preface><sect1><remark>
692.2349 +#: ../en/ch00-preface.xml:239
692.2350 +msgid "Don’t forget to update the &lt;url&gt; attribute, too."
692.2351 +msgstr ""
692.2352 +
692.2353 +#. type: Content of: <book><preface><sect1><para>
692.2354 +#: ../en/ch00-preface.xml:242
692.2355 +msgid "To comment or ask technical questions about this book, send email to:"
692.2356 +msgstr ""
692.2357 +
692.2358 +#. type: Content of: <book><preface><sect1><simplelist><member>
692.2359 +#: ../en/ch00-preface.xml:246
692.2360 +msgid "<email>bookquestions@oreilly.com</email>"
692.2361 +msgstr "<email>bookquestions@oreilly.com</email>"
692.2362 +
692.2363 +#. type: Content of: <book><preface><sect1><para>
692.2364 +#: ../en/ch00-preface.xml:249
692.2365 +msgid ""
692.2366 +"For more information about our books, conferences, Resource Centers, and the "
692.2367 +"O’Reilly Network, see our web site at:"
692.2368 +msgstr ""
692.2369 +
692.2370 +#. type: Content of: <book><preface><sect1><simplelist><member>
692.2371 +#: ../en/ch00-preface.xml:253
692.2372 +msgid "<ulink url=\"http://www.oreilly.com\"></ulink>"
692.2373 +msgstr "<ulink url=\"http://www.oreilly.com\"></ulink>"
692.2374 +
692.2375 +#. type: Content of: <book><chapter><title>
692.2376 +#: ../en/ch01-intro.xml:5
692.2377 +msgid "How did we get here?"
692.2378 +msgstr ""
692.2379 +
692.2380 +#. type: Content of: <book><chapter><sect1><title>
692.2381 +#: ../en/ch01-intro.xml:8
692.2382 +msgid "Why revision control? Why Mercurial?"
692.2383 +msgstr "为什么使用版本控制? 为什么使用 Mercurial?"
692.2384 +
692.2385 +#. type: Content of: <book><chapter><sect1><para>
692.2386 +#: ../en/ch01-intro.xml:10
692.2387 +msgid ""
692.2388 +"Revision control is the process of managing multiple versions of a piece of "
692.2389 +"information.  In its simplest form, this is something that many people do by "
692.2390 +"hand: every time you modify a file, save it under a new name that contains a "
692.2391 +"number, each one higher than the number of the preceding version."
692.2392 +msgstr ""
692.2393 +
692.2394 +#. type: Content of: <book><chapter><sect1><para>
692.2395 +#: ../en/ch01-intro.xml:16
692.2396 +msgid ""
692.2397 +"Manually managing multiple versions of even a single file is an error-prone "
692.2398 +"task, though, so software tools to help automate this process have long been "
692.2399 +"available.  The earliest automated revision control tools were intended to "
692.2400 +"help a single user to manage revisions of a single file.  Over the past few "
692.2401 +"decades, the scope of revision control tools has expanded greatly; they now "
692.2402 +"manage multiple files, and help multiple people to work together.  The best "
692.2403 +"modern revision control tools have no problem coping with thousands of people "
692.2404 +"working together on projects that consist of hundreds of thousands of files."
692.2405 +msgstr ""
692.2406 +
692.2407 +#. type: Content of: <book><chapter><sect1><para>
692.2408 +#: ../en/ch01-intro.xml:27
692.2409 +msgid ""
692.2410 +"The arrival of distributed revision control is relatively recent, and so far "
692.2411 +"this new field has grown due to people's willingness to explore ill-charted "
692.2412 +"territory."
692.2413 +msgstr ""
692.2414 +
692.2415 +#. type: Content of: <book><chapter><sect1><para>
692.2416 +#: ../en/ch01-intro.xml:31
692.2417 +msgid ""
692.2418 +"I am writing a book about distributed revision control because I believe that "
692.2419 +"it is an important subject that deserves a field guide. I chose to write "
692.2420 +"about Mercurial because it is the easiest tool to learn the terrain with, and "
692.2421 +"yet it scales to the demands of real, challenging environments where many "
692.2422 +"other revision control tools buckle."
692.2423 +msgstr ""
692.2424 +
692.2425 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.2426 +#: ../en/ch01-intro.xml:39
692.2427 +msgid "Why use revision control?"
692.2428 +msgstr "为什么使用版本控制?"
692.2429 +
692.2430 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2431 +#: ../en/ch01-intro.xml:41
692.2432 +msgid ""
692.2433 +"There are a number of reasons why you or your team might want to use an "
692.2434 +"automated revision control tool for a project."
692.2435 +msgstr ""
692.2436 +
692.2437 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.2438 +#: ../en/ch01-intro.xml:46
692.2439 +msgid ""
692.2440 +"It will track the history and evolution of your project, so you don't have "
692.2441 +"to.  For every change, you'll have a log of <emphasis>who</emphasis> made it; "
692.2442 +"<emphasis>why</emphasis> they made it; <emphasis>when</emphasis> they made "
692.2443 +"it; and <emphasis>what</emphasis> the change was."
692.2444 +msgstr ""
692.2445 +
692.2446 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.2447 +#: ../en/ch01-intro.xml:53
692.2448 +msgid ""
692.2449 +"When you're working with other people, revision control software makes it "
692.2450 +"easier for you to collaborate.  For example, when people more or less "
692.2451 +"simultaneously make potentially incompatible changes, the software will help "
692.2452 +"you to identify and resolve those conflicts."
692.2453 +msgstr ""
692.2454 +
692.2455 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.2456 +#: ../en/ch01-intro.xml:59
692.2457 +msgid ""
692.2458 +"It can help you to recover from mistakes.  If you make a change that later "
692.2459 +"turns out to be in error, you can revert to an earlier version of one or more "
692.2460 +"files.  In fact, a <emphasis>really</emphasis> good revision control tool "
692.2461 +"will even help you to efficiently figure out exactly when a problem was "
692.2462 +"introduced (see <xref linkend=\"sec:undo:bisect\"/> for details)."
692.2463 +msgstr ""
692.2464 +
692.2465 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.2466 +#: ../en/ch01-intro.xml:66
692.2467 +msgid ""
692.2468 +"It will help you to work simultaneously on, and manage the drift between, "
692.2469 +"multiple versions of your project."
692.2470 +msgstr ""
692.2471 +
692.2472 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2473 +#: ../en/ch01-intro.xml:71
692.2474 +msgid ""
692.2475 +"Most of these reasons are equally valid&emdash;at least in theory&emdash;"
692.2476 +"whether you're working on a project by yourself, or with a hundred other "
692.2477 +"people."
692.2478 +msgstr ""
692.2479 +
692.2480 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2481 +#: ../en/ch01-intro.xml:76
692.2482 +msgid ""
692.2483 +"A key question about the practicality of revision control at these two "
692.2484 +"different scales (<quote>lone hacker</quote> and <quote>huge team</quote>) is "
692.2485 +"how its <emphasis>benefits</emphasis> compare to its <emphasis>costs</"
692.2486 +"emphasis>.  A revision control tool that's difficult to understand or use is "
692.2487 +"going to impose a high cost."
692.2488 +msgstr ""
692.2489 +
692.2490 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2491 +#: ../en/ch01-intro.xml:84
692.2492 +msgid ""
692.2493 +"A five-hundred-person project is likely to collapse under its own weight "
692.2494 +"almost immediately without a revision control tool and process. In this case, "
692.2495 +"the cost of using revision control might hardly seem worth considering, since "
692.2496 +"<emphasis>without</emphasis> it, failure is almost guaranteed."
692.2497 +msgstr ""
692.2498 +
692.2499 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2500 +#: ../en/ch01-intro.xml:91
692.2501 +msgid ""
692.2502 +"On the other hand, a one-person <quote>quick hack</quote> might seem like a "
692.2503 +"poor place to use a revision control tool, because surely the cost of using "
692.2504 +"one must be close to the overall cost of the project.  Right?"
692.2505 +msgstr ""
692.2506 +
692.2507 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2508 +#: ../en/ch01-intro.xml:96
692.2509 +msgid ""
692.2510 +"Mercurial uniquely supports <emphasis>both</emphasis> of these scales of "
692.2511 +"development.  You can learn the basics in just a few minutes, and due to its "
692.2512 +"low overhead, you can apply revision control to the smallest of projects with "
692.2513 +"ease.  Its simplicity means you won't have a lot of abstruse concepts or "
692.2514 +"command sequences competing for mental space with whatever you're "
692.2515 +"<emphasis>really</emphasis> trying to do.  At the same time, Mercurial's high "
692.2516 +"performance and peer-to-peer nature let you scale painlessly to handle large "
692.2517 +"projects."
692.2518 +msgstr ""
692.2519 +
692.2520 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2521 +#: ../en/ch01-intro.xml:106
692.2522 +msgid ""
692.2523 +"No revision control tool can rescue a poorly run project, but a good choice "
692.2524 +"of tools can make a huge difference to the fluidity with which you can work "
692.2525 +"on a project."
692.2526 +msgstr ""
692.2527 +
692.2528 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.2529 +#: ../en/ch01-intro.xml:113
692.2530 +msgid "The many names of revision control"
692.2531 +msgstr "版本控制的别名"
692.2532 +
692.2533 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2534 +#: ../en/ch01-intro.xml:115
692.2535 +msgid ""
692.2536 +"Revision control is a diverse field, so much so that it is referred to by "
692.2537 +"many names and acronyms.  Here are a few of the more common variations you'll "
692.2538 +"encounter:"
692.2539 +msgstr ""
692.2540 +
692.2541 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.2542 +#: ../en/ch01-intro.xml:119
692.2543 +msgid "Revision control (RCS)"
692.2544 +msgstr "版本控制(RCS)"
692.2545 +
692.2546 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.2547 +#: ../en/ch01-intro.xml:120
692.2548 +msgid "Software configuration management (SCM), or configuration management"
692.2549 +msgstr "软件配置管理(SCM),或配置管理"
692.2550 +
692.2551 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.2552 +#: ../en/ch01-intro.xml:122
692.2553 +msgid "Source code management"
692.2554 +msgstr "源代码管理"
692.2555 +
692.2556 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.2557 +#: ../en/ch01-intro.xml:123
692.2558 +msgid "Source code control, or source control"
692.2559 +msgstr "源代码控制,或源控制"
692.2560 +
692.2561 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.2562 +#: ../en/ch01-intro.xml:125
692.2563 +msgid "Version control (VCS)"
692.2564 +msgstr "版本控制(VCS)"
692.2565 +
692.2566 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2567 +#: ../en/ch01-intro.xml:127
692.2568 +msgid ""
692.2569 +"Some people claim that these terms actually have different meanings, but in "
692.2570 +"practice they overlap so much that there's no agreed or even useful way to "
692.2571 +"tease them apart."
692.2572 +msgstr ""
692.2573 +
692.2574 +#. type: Content of: <book><chapter><sect1><title>
692.2575 +#: ../en/ch01-intro.xml:135
692.2576 +msgid "About the examples in this book"
692.2577 +msgstr "本书的例子"
692.2578 +
692.2579 +#. type: Content of: <book><chapter><sect1><para>
692.2580 +#: ../en/ch01-intro.xml:137
692.2581 +msgid ""
692.2582 +"This book takes an unusual approach to code samples.  Every example is "
692.2583 +"<quote>live</quote>&emdash;each one is actually the result of a shell script "
692.2584 +"that executes the Mercurial commands you see.  Every time an image of the "
692.2585 +"book is built from its sources, all the example scripts are automatically "
692.2586 +"run, and their current results compared against their expected results."
692.2587 +msgstr ""
692.2588 +
692.2589 +#. type: Content of: <book><chapter><sect1><para>
692.2590 +#: ../en/ch01-intro.xml:144
692.2591 +msgid ""
692.2592 +"The advantage of this approach is that the examples are always accurate; they "
692.2593 +"describe <emphasis>exactly</emphasis> the behavior of the version of "
692.2594 +"Mercurial that's mentioned at the front of the book.  If I update the version "
692.2595 +"of Mercurial that I'm documenting, and the output of some command changes, "
692.2596 +"the build fails."
692.2597 +msgstr ""
692.2598 +
692.2599 +#. type: Content of: <book><chapter><sect1><para>
692.2600 +#: ../en/ch01-intro.xml:151
692.2601 +msgid ""
692.2602 +"There is a small disadvantage to this approach, which is that the dates and "
692.2603 +"times you'll see in examples tend to be <quote>squashed</quote> together in a "
692.2604 +"way that they wouldn't be if the same commands were being typed by a human.  "
692.2605 +"Where a human can issue no more than one command every few seconds, with any "
692.2606 +"resulting timestamps correspondingly spread out, my automated example scripts "
692.2607 +"run many commands in one second."
692.2608 +msgstr ""
692.2609 +
692.2610 +#. type: Content of: <book><chapter><sect1><para>
692.2611 +#: ../en/ch01-intro.xml:159
692.2612 +msgid ""
692.2613 +"As an instance of this, several consecutive commits in an example can show up "
692.2614 +"as having occurred during the same second.  You can see this occur in the "
692.2615 +"<literal role=\"hg-ext\">bisect</literal> example in <xref linkend=\"sec:undo:"
692.2616 +"bisect\"/>, for instance."
692.2617 +msgstr ""
692.2618 +
692.2619 +#. type: Content of: <book><chapter><sect1><para>
692.2620 +#: ../en/ch01-intro.xml:165
692.2621 +msgid ""
692.2622 +"So when you're reading examples, don't place too much weight on the dates or "
692.2623 +"times you see in the output of commands.  But <emphasis>do</emphasis> be "
692.2624 +"confident that the behavior you're seeing is consistent and reproducible."
692.2625 +msgstr ""
692.2626 +
692.2627 +#. type: Content of: <book><chapter><sect1><title>
692.2628 +#: ../en/ch01-intro.xml:173
692.2629 +msgid "Trends in the field"
692.2630 +msgstr "版本控制的发展趋势"
692.2631 +
692.2632 +#. type: Content of: <book><chapter><sect1><para>
692.2633 +#: ../en/ch01-intro.xml:175
692.2634 +msgid ""
692.2635 +"There has been an unmistakable trend in the development and use of revision "
692.2636 +"control tools over the past four decades, as people have become familiar with "
692.2637 +"the capabilities of their tools and constrained by their limitations."
692.2638 +msgstr ""
692.2639 +
692.2640 +#. type: Content of: <book><chapter><sect1><para>
692.2641 +#: ../en/ch01-intro.xml:180
692.2642 +msgid ""
692.2643 +"The first generation began by managing single files on individual computers.  "
692.2644 +"Although these tools represented a huge advance over ad-hoc manual revision "
692.2645 +"control, their locking model and reliance on a single computer limited them "
692.2646 +"to small, tightly-knit teams."
692.2647 +msgstr ""
692.2648 +
692.2649 +#. type: Content of: <book><chapter><sect1><para>
692.2650 +#: ../en/ch01-intro.xml:186
692.2651 +msgid ""
692.2652 +"The second generation loosened these constraints by moving to network-"
692.2653 +"centered architectures, and managing entire projects at a time.  As projects "
692.2654 +"grew larger, they ran into new problems.  With clients needing to talk to "
692.2655 +"servers very frequently, server scaling became an issue for large projects.  "
692.2656 +"An unreliable network connection could prevent remote users from being able "
692.2657 +"to talk to the server at all.  As open source projects started making read-"
692.2658 +"only access available anonymously to anyone, people without commit privileges "
692.2659 +"found that they could not use the tools to interact with a project in a "
692.2660 +"natural way, as they could not record their changes."
692.2661 +msgstr ""
692.2662 +
692.2663 +#. type: Content of: <book><chapter><sect1><para>
692.2664 +#: ../en/ch01-intro.xml:198
692.2665 +msgid ""
692.2666 +"The current generation of revision control tools is peer-to-peer in nature.  "
692.2667 +"All of these systems have dropped the dependency on a single central server, "
692.2668 +"and allow people to distribute their revision control data to where it's "
692.2669 +"actually needed.  Collaboration over the Internet has moved from constrained "
692.2670 +"by technology to a matter of choice and consensus.  Modern tools can operate "
692.2671 +"offline indefinitely and autonomously, with a network connection only needed "
692.2672 +"when syncing changes with another repository."
692.2673 +msgstr ""
692.2674 +
692.2675 +#. type: Content of: <book><chapter><sect1><title>
692.2676 +#: ../en/ch01-intro.xml:210
692.2677 +msgid "A few of the advantages of distributed revision control"
692.2678 +msgstr "分布版本控制的优点"
692.2679 +
692.2680 +#. type: Content of: <book><chapter><sect1><para>
692.2681 +#: ../en/ch01-intro.xml:213
692.2682 +msgid ""
692.2683 +"Even though distributed revision control tools have for several years been as "
692.2684 +"robust and usable as their previous-generation counterparts, people using "
692.2685 +"older tools have not yet necessarily woken up to their advantages.  There are "
692.2686 +"a number of ways in which distributed tools shine relative to centralised "
692.2687 +"ones."
692.2688 +msgstr ""
692.2689 +
692.2690 +#. type: Content of: <book><chapter><sect1><para>
692.2691 +#: ../en/ch01-intro.xml:220
692.2692 +msgid ""
692.2693 +"For an individual developer, distributed tools are almost always much faster "
692.2694 +"than centralised tools.  This is for a simple reason: a centralised tool "
692.2695 +"needs to talk over the network for many common operations, because most "
692.2696 +"metadata is stored in a single copy on the central server.  A distributed "
692.2697 +"tool stores all of its metadata locally.  All else being equal, talking over "
692.2698 +"the network adds overhead to a centralised tool.  Don't underestimate the "
692.2699 +"value of a snappy, responsive tool: you're going to spend a lot of time "
692.2700 +"interacting with your revision control software."
692.2701 +msgstr ""
692.2702 +
692.2703 +#. type: Content of: <book><chapter><sect1><para>
692.2704 +#: ../en/ch01-intro.xml:231
692.2705 +msgid ""
692.2706 +"Distributed tools are indifferent to the vagaries of your server "
692.2707 +"infrastructure, again because they replicate metadata to so many locations.  "
692.2708 +"If you use a centralised system and your server catches fire, you'd better "
692.2709 +"hope that your backup media are reliable, and that your last backup was "
692.2710 +"recent and actually worked.  With a distributed tool, you have many backups "
692.2711 +"available on every contributor's computer."
692.2712 +msgstr ""
692.2713 +
692.2714 +#. type: Content of: <book><chapter><sect1><para>
692.2715 +#: ../en/ch01-intro.xml:239
692.2716 +msgid ""
692.2717 +"The reliability of your network will affect distributed tools far less than "
692.2718 +"it will centralised tools.  You can't even use a centralised tool without a "
692.2719 +"network connection, except for a few highly constrained commands.  With a "
692.2720 +"distributed tool, if your network connection goes down while you're working, "
692.2721 +"you may not even notice.  The only thing you won't be able to do is talk to "
692.2722 +"repositories on other computers, something that is relatively rare compared "
692.2723 +"with local operations.  If you have a far-flung team of collaborators, this "
692.2724 +"may be significant."
692.2725 +msgstr ""
692.2726 +
692.2727 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.2728 +#: ../en/ch01-intro.xml:250
692.2729 +msgid "Advantages for open source projects"
692.2730 +msgstr "开源项目的优点"
692.2731 +
692.2732 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2733 +#: ../en/ch01-intro.xml:252
692.2734 +msgid ""
692.2735 +"If you take a shine to an open source project and decide that you would like "
692.2736 +"to start hacking on it, and that project uses a distributed revision control "
692.2737 +"tool, you are at once a peer with the people who consider themselves the "
692.2738 +"<quote>core</quote> of that project.  If they publish their repositories, you "
692.2739 +"can immediately copy their project history, start making changes, and record "
692.2740 +"your work, using the same tools in the same ways as insiders.  By contrast, "
692.2741 +"with a centralised tool, you must use the software in a <quote>read only</"
692.2742 +"quote> mode unless someone grants you permission to commit changes to their "
692.2743 +"central server.  Until then, you won't be able to record changes, and your "
692.2744 +"local modifications will be at risk of corruption any time you try to update "
692.2745 +"your client's view of the repository."
692.2746 +msgstr ""
692.2747 +
692.2748 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.2749 +#: ../en/ch01-intro.xml:268
692.2750 +msgid "The forking non-problem"
692.2751 +msgstr "分叉不是问题"
692.2752 +
692.2753 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.2754 +#: ../en/ch01-intro.xml:270
692.2755 +msgid ""
692.2756 +"It has been suggested that distributed revision control tools pose some sort "
692.2757 +"of risk to open source projects because they make it easy to <quote>fork</"
692.2758 +"quote> the development of a project.  A fork happens when there are "
692.2759 +"differences in opinion or attitude between groups of developers that cause "
692.2760 +"them to decide that they can't work together any longer.  Each side takes a "
692.2761 +"more or less complete copy of the project's source code, and goes off in its "
692.2762 +"own direction."
692.2763 +msgstr ""
692.2764 +
692.2765 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.2766 +#: ../en/ch01-intro.xml:280
692.2767 +msgid ""
692.2768 +"Sometimes the camps in a fork decide to reconcile their differences. With a "
692.2769 +"centralised revision control system, the <emphasis>technical</emphasis> "
692.2770 +"process of reconciliation is painful, and has to be performed largely by "
692.2771 +"hand.  You have to decide whose revision history is going to <quote>win</"
692.2772 +"quote>, and graft the other team's changes into the tree somehow. This "
692.2773 +"usually loses some or all of one side's revision history."
692.2774 +msgstr ""
692.2775 +
692.2776 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.2777 +#: ../en/ch01-intro.xml:289
692.2778 +msgid ""
692.2779 +"What distributed tools do with respect to forking is they make forking the "
692.2780 +"<emphasis>only</emphasis> way to develop a project.  Every single change that "
692.2781 +"you make is potentially a fork point.  The great strength of this approach is "
692.2782 +"that a distributed revision control tool has to be really good at "
692.2783 +"<emphasis>merging</emphasis> forks, because forks are absolutely fundamental: "
692.2784 +"they happen all the time."
692.2785 +msgstr ""
692.2786 +
692.2787 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.2788 +#: ../en/ch01-intro.xml:298
692.2789 +msgid ""
692.2790 +"If every piece of work that everybody does, all the time, is framed in terms "
692.2791 +"of forking and merging, then what the open source world refers to as a "
692.2792 +"<quote>fork</quote> becomes <emphasis>purely</emphasis> a social issue.  If "
692.2793 +"anything, distributed tools <emphasis>lower</emphasis> the likelihood of a "
692.2794 +"fork:"
692.2795 +msgstr ""
692.2796 +
692.2797 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.2798 +#: ../en/ch01-intro.xml:305
692.2799 +msgid ""
692.2800 +"They eliminate the social distinction that centralised tools impose: that "
692.2801 +"between insiders (people with commit access) and outsiders (people without)."
692.2802 +msgstr ""
692.2803 +
692.2804 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.2805 +#: ../en/ch01-intro.xml:309
692.2806 +msgid ""
692.2807 +"They make it easier to reconcile after a social fork, because all that's "
692.2808 +"involved from the perspective of the revision control software is just "
692.2809 +"another merge."
692.2810 +msgstr ""
692.2811 +
692.2812 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.2813 +#: ../en/ch01-intro.xml:314
692.2814 +msgid ""
692.2815 +"Some people resist distributed tools because they want to retain tight "
692.2816 +"control over their projects, and they believe that centralised tools give "
692.2817 +"them this control.  However, if you're of this belief, and you publish your "
692.2818 +"CVS or Subversion repositories publicly, there are plenty of tools available "
692.2819 +"that can pull out your entire project's history (albeit slowly) and recreate "
692.2820 +"it somewhere that you don't control.  So while your control in this case is "
692.2821 +"illusory, you are forgoing the ability to fluidly collaborate with whatever "
692.2822 +"people feel compelled to mirror and fork your history."
692.2823 +msgstr ""
692.2824 +
692.2825 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.2826 +#: ../en/ch01-intro.xml:329
692.2827 +msgid "Advantages for commercial projects"
692.2828 +msgstr "商业项目的优点"
692.2829 +
692.2830 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2831 +#: ../en/ch01-intro.xml:331
692.2832 +msgid ""
692.2833 +"Many commercial projects are undertaken by teams that are scattered across "
692.2834 +"the globe.  Contributors who are far from a central server will see slower "
692.2835 +"command execution and perhaps less reliability.  Commercial revision control "
692.2836 +"systems attempt to ameliorate these problems with remote-site replication add-"
692.2837 +"ons that are typically expensive to buy and cantankerous to administer.  A "
692.2838 +"distributed system doesn't suffer from these problems in the first place.  "
692.2839 +"Better yet, you can easily set up multiple authoritative servers, say one per "
692.2840 +"site, so that there's no redundant communication between repositories over "
692.2841 +"expensive long-haul network links."
692.2842 +msgstr ""
692.2843 +
692.2844 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2845 +#: ../en/ch01-intro.xml:343
692.2846 +msgid ""
692.2847 +"Centralised revision control systems tend to have relatively low "
692.2848 +"scalability.  It's not unusual for an expensive centralised system to fall "
692.2849 +"over under the combined load of just a few dozen concurrent users.  Once "
692.2850 +"again, the typical response tends to be an expensive and clunky replication "
692.2851 +"facility.  Since the load on a central server&emdash;if you have one at "
692.2852 +"all&emdash;is many times lower with a distributed tool (because all of the "
692.2853 +"data is replicated everywhere), a single cheap server can handle the needs of "
692.2854 +"a much larger team, and replication to balance load becomes a simple matter "
692.2855 +"of scripting."
692.2856 +msgstr ""
692.2857 +
692.2858 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2859 +#: ../en/ch01-intro.xml:355
692.2860 +msgid ""
692.2861 +"If you have an employee in the field, troubleshooting a problem at a "
692.2862 +"customer's site, they'll benefit from distributed revision control. The tool "
692.2863 +"will let them generate custom builds, try different fixes in isolation from "
692.2864 +"each other, and search efficiently through history for the sources of bugs "
692.2865 +"and regressions in the customer's environment, all without needing to connect "
692.2866 +"to your company's network."
692.2867 +msgstr ""
692.2868 +
692.2869 +#. type: Content of: <book><chapter><sect1><title>
692.2870 +#: ../en/ch01-intro.xml:366
692.2871 +msgid "Why choose Mercurial?"
692.2872 +msgstr "为什么选择 Mercurial?"
692.2873 +
692.2874 +#. type: Content of: <book><chapter><sect1><para>
692.2875 +#: ../en/ch01-intro.xml:368
692.2876 +msgid ""
692.2877 +"Mercurial has a unique set of properties that make it a particularly good "
692.2878 +"choice as a revision control system."
692.2879 +msgstr ""
692.2880 +
692.2881 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.2882 +#: ../en/ch01-intro.xml:371
692.2883 +msgid "It is easy to learn and use."
692.2884 +msgstr ""
692.2885 +
692.2886 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.2887 +#: ../en/ch01-intro.xml:372
692.2888 +msgid "It is lightweight."
692.2889 +msgstr ""
692.2890 +
692.2891 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.2892 +#: ../en/ch01-intro.xml:373
692.2893 +msgid "It scales excellently."
692.2894 +msgstr ""
692.2895 +
692.2896 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.2897 +#: ../en/ch01-intro.xml:374
692.2898 +msgid "It is easy to customise."
692.2899 +msgstr ""
692.2900 +
692.2901 +#. type: Content of: <book><chapter><sect1><para>
692.2902 +#: ../en/ch01-intro.xml:377
692.2903 +msgid ""
692.2904 +"If you are at all familiar with revision control systems, you should be able "
692.2905 +"to get up and running with Mercurial in less than five minutes.  Even if not, "
692.2906 +"it will take no more than a few minutes longer.  Mercurial's command and "
692.2907 +"feature sets are generally uniform and consistent, so you can keep track of a "
692.2908 +"few general rules instead of a host of exceptions."
692.2909 +msgstr ""
692.2910 +
692.2911 +#. type: Content of: <book><chapter><sect1><para>
692.2912 +#: ../en/ch01-intro.xml:384
692.2913 +msgid ""
692.2914 +"On a small project, you can start working with Mercurial in moments. Creating "
692.2915 +"new changes and branches; transferring changes around (whether locally or "
692.2916 +"over a network); and history and status operations are all fast.  Mercurial "
692.2917 +"attempts to stay nimble and largely out of your way by combining low "
692.2918 +"cognitive overhead with blazingly fast operations."
692.2919 +msgstr ""
692.2920 +
692.2921 +#. type: Content of: <book><chapter><sect1><para>
692.2922 +#: ../en/ch01-intro.xml:391
692.2923 +msgid ""
692.2924 +"The usefulness of Mercurial is not limited to small projects: it is used by "
692.2925 +"projects with hundreds to thousands of contributors, each containing tens of "
692.2926 +"thousands of files and hundreds of megabytes of source code."
692.2927 +msgstr ""
692.2928 +
692.2929 +#. type: Content of: <book><chapter><sect1><para>
692.2930 +#: ../en/ch01-intro.xml:396
692.2931 +msgid ""
692.2932 +"If the core functionality of Mercurial is not enough for you, it's easy to "
692.2933 +"build on.  Mercurial is well suited to scripting tasks, and its clean "
692.2934 +"internals and implementation in Python make it easy to add features in the "
692.2935 +"form of extensions.  There are a number of popular and useful extensions "
692.2936 +"already available, ranging from helping to identify bugs to improving "
692.2937 +"performance."
692.2938 +msgstr ""
692.2939 +
692.2940 +#. type: Content of: <book><chapter><sect1><title>
692.2941 +#: ../en/ch01-intro.xml:406
692.2942 +msgid "Mercurial compared with other tools"
692.2943 +msgstr "Mercurial 与其它工具的比较"
692.2944 +
692.2945 +#. type: Content of: <book><chapter><sect1><para>
692.2946 +#: ../en/ch01-intro.xml:408
692.2947 +msgid ""
692.2948 +"Before you read on, please understand that this section necessarily reflects "
692.2949 +"my own experiences, interests, and (dare I say it) biases.  I have used every "
692.2950 +"one of the revision control tools listed below, in most cases for several "
692.2951 +"years at a time."
692.2952 +msgstr ""
692.2953 +
692.2954 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2955 +#: ../en/ch01-intro.xml:418
692.2956 +msgid ""
692.2957 +"Subversion is a popular revision control tool, developed to replace CVS.  It "
692.2958 +"has a centralised client/server architecture."
692.2959 +msgstr ""
692.2960 +
692.2961 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2962 +#: ../en/ch01-intro.xml:422
692.2963 +msgid ""
692.2964 +"Subversion and Mercurial have similarly named commands for performing the "
692.2965 +"same operations, so if you're familiar with one, it is easy to learn to use "
692.2966 +"the other.  Both tools are portable to all popular operating systems."
692.2967 +msgstr ""
692.2968 +
692.2969 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2970 +#: ../en/ch01-intro.xml:427
692.2971 +msgid ""
692.2972 +"Prior to version 1.5, Subversion had no useful support for merges. At the "
692.2973 +"time of writing, its merge tracking capability is new, and known to be <ulink "
692.2974 +"url=\"http://svnbook.red-bean.com/nightly/en/svn.branchmerge.advanced."
692.2975 +"html#svn.branchmerge.advanced.finalword\">complicated and buggy</ulink>."
692.2976 +msgstr ""
692.2977 +
692.2978 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2979 +#: ../en/ch01-intro.xml:433
692.2980 +msgid ""
692.2981 +"Mercurial has a substantial performance advantage over Subversion on every "
692.2982 +"revision control operation I have benchmarked.  I have measured its advantage "
692.2983 +"as ranging from a factor of two to a factor of six when compared with "
692.2984 +"Subversion 1.4.3's <emphasis>ra_local</emphasis> file store, which is the "
692.2985 +"fastest access method available.  In more realistic deployments involving a "
692.2986 +"network-based store, Subversion will be at a substantially larger "
692.2987 +"disadvantage.  Because many Subversion commands must talk to the server and "
692.2988 +"Subversion does not have useful replication facilities, server capacity and "
692.2989 +"network bandwidth become bottlenecks for modestly large projects."
692.2990 +msgstr ""
692.2991 +
692.2992 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.2993 +#: ../en/ch01-intro.xml:446
692.2994 +msgid ""
692.2995 +"Additionally, Subversion incurs substantial storage overhead to avoid network "
692.2996 +"transactions for a few common operations, such as finding modified files "
692.2997 +"(<literal>status</literal>) and displaying modifications against the current "
692.2998 +"revision (<literal>diff</literal>).  As a result, a Subversion working copy "
692.2999 +"is often the same size as, or larger than, a Mercurial repository and working "
692.3000 +"directory, even though the Mercurial repository contains a complete history "
692.3001 +"of the project."
692.3002 +msgstr ""
692.3003 +
692.3004 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3005 +#: ../en/ch01-intro.xml:456
692.3006 +msgid ""
692.3007 +"Subversion is widely supported by third party tools.  Mercurial currently "
692.3008 +"lags considerably in this area.  This gap is closing, however, and indeed "
692.3009 +"some of Mercurial's GUI tools now outshine their Subversion equivalents.  "
692.3010 +"Like Mercurial, Subversion has an excellent user manual."
692.3011 +msgstr ""
692.3012 +
692.3013 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3014 +#: ../en/ch01-intro.xml:462
692.3015 +msgid ""
692.3016 +"Because Subversion doesn't store revision history on the client, it is well "
692.3017 +"suited to managing projects that deal with lots of large, opaque binary "
692.3018 +"files.  If you check in fifty revisions to an incompressible 10MB file, "
692.3019 +"Subversion's client-side space usage stays constant The space used by any "
692.3020 +"distributed SCM will grow rapidly in proportion to the number of revisions, "
692.3021 +"because the differences between each revision are large."
692.3022 +msgstr ""
692.3023 +
692.3024 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3025 +#: ../en/ch01-intro.xml:471
692.3026 +msgid ""
692.3027 +"In addition, it's often difficult or, more usually, impossible to merge "
692.3028 +"different versions of a binary file.  Subversion's ability to let a user lock "
692.3029 +"a file, so that they temporarily have the exclusive right to commit changes "
692.3030 +"to it, can be a significant advantage to a project where binary files are "
692.3031 +"widely used."
692.3032 +msgstr ""
692.3033 +
692.3034 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3035 +#: ../en/ch01-intro.xml:478
692.3036 +msgid ""
692.3037 +"Mercurial can import revision history from a Subversion repository. It can "
692.3038 +"also export revision history to a Subversion repository.  This makes it easy "
692.3039 +"to <quote>test the waters</quote> and use Mercurial and Subversion in "
692.3040 +"parallel before deciding to switch.  History conversion is incremental, so "
692.3041 +"you can perform an initial conversion, then small additional conversions "
692.3042 +"afterwards to bring in new changes."
692.3043 +msgstr ""
692.3044 +
692.3045 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.3046 +#: ../en/ch01-intro.xml:490 ../en/ch01-intro.xml:629
692.3047 +msgid "Git"
692.3048 +msgstr "Git"
692.3049 +
692.3050 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3051 +#: ../en/ch01-intro.xml:492
692.3052 +msgid ""
692.3053 +"Git is a distributed revision control tool that was developed for managing "
692.3054 +"the Linux kernel source tree.  Like Mercurial, its early design was somewhat "
692.3055 +"influenced by Monotone."
692.3056 +msgstr ""
692.3057 +
692.3058 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3059 +#: ../en/ch01-intro.xml:497
692.3060 +msgid ""
692.3061 +"Git has a very large command set, with version 1.5.0 providing 139 individual "
692.3062 +"commands.  It has something of a reputation for being difficult to learn.  "
692.3063 +"Compared to Git, Mercurial has a strong focus on simplicity."
692.3064 +msgstr ""
692.3065 +
692.3066 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3067 +#: ../en/ch01-intro.xml:502
692.3068 +msgid ""
692.3069 +"In terms of performance, Git is extremely fast.  In several cases, it is "
692.3070 +"faster than Mercurial, at least on Linux, while Mercurial performs better on "
692.3071 +"other operations.  However, on Windows, the performance and general level of "
692.3072 +"support that Git provides is, at the time of writing, far behind that of "
692.3073 +"Mercurial."
692.3074 +msgstr ""
692.3075 +
692.3076 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3077 +#: ../en/ch01-intro.xml:509
692.3078 +msgid ""
692.3079 +"While a Mercurial repository needs no maintenance, a Git repository requires "
692.3080 +"frequent manual <quote>repacks</quote> of its metadata.  Without these, "
692.3081 +"performance degrades, while space usage grows rapidly.  A server that "
692.3082 +"contains many Git repositories that are not rigorously and frequently "
692.3083 +"repacked will become heavily disk-bound during backups, and there have been "
692.3084 +"instances of daily backups taking far longer than 24 hours as a result.  A "
692.3085 +"freshly packed Git repository is slightly smaller than a Mercurial "
692.3086 +"repository, but an unpacked repository is several orders of magnitude larger."
692.3087 +msgstr ""
692.3088 +
692.3089 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3090 +#: ../en/ch01-intro.xml:520
692.3091 +msgid ""
692.3092 +"The core of Git is written in C.  Many Git commands are implemented as shell "
692.3093 +"or Perl scripts, and the quality of these scripts varies widely. I have "
692.3094 +"encountered several instances where scripts charged along blindly in the "
692.3095 +"presence of errors that should have been fatal."
692.3096 +msgstr ""
692.3097 +
692.3098 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3099 +#: ../en/ch01-intro.xml:526
692.3100 +msgid "Mercurial can import revision history from a Git repository."
692.3101 +msgstr ""
692.3102 +
692.3103 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3104 +#: ../en/ch01-intro.xml:534
692.3105 +msgid ""
692.3106 +"CVS is probably the most widely used revision control tool in the world.  Due "
692.3107 +"to its age and internal untidiness, it has been only lightly maintained for "
692.3108 +"many years."
692.3109 +msgstr ""
692.3110 +
692.3111 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3112 +#: ../en/ch01-intro.xml:538
692.3113 +msgid ""
692.3114 +"It has a centralised client/server architecture.  It does not group related "
692.3115 +"file changes into atomic commits, making it easy for people to <quote>break "
692.3116 +"the build</quote>: one person can successfully commit part of a change and "
692.3117 +"then be blocked by the need for a merge, causing other people to see only a "
692.3118 +"portion of the work they intended to do.  This also affects how you work with "
692.3119 +"project history.  If you want to see all of the modifications someone made as "
692.3120 +"part of a task, you will need to manually inspect the descriptions and "
692.3121 +"timestamps of the changes made to each file involved (if you even know what "
692.3122 +"those files were)."
692.3123 +msgstr ""
692.3124 +
692.3125 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3126 +#: ../en/ch01-intro.xml:550
692.3127 +msgid ""
692.3128 +"CVS has a muddled notion of tags and branches that I will not attempt to even "
692.3129 +"describe.  It does not support renaming of files or directories well, making "
692.3130 +"it easy to corrupt a repository.  It has almost no internal consistency "
692.3131 +"checking capabilities, so it is usually not even possible to tell whether or "
692.3132 +"how a repository is corrupt.  I would not recommend CVS for any project, "
692.3133 +"existing or new."
692.3134 +msgstr ""
692.3135 +
692.3136 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3137 +#: ../en/ch01-intro.xml:558
692.3138 +msgid ""
692.3139 +"Mercurial can import CVS revision history.  However, there are a few caveats "
692.3140 +"that apply; these are true of every other revision control tool's CVS "
692.3141 +"importer, too.  Due to CVS's lack of atomic changes and unversioned "
692.3142 +"filesystem hierarchy, it is not possible to reconstruct CVS history "
692.3143 +"completely accurately; some guesswork is involved, and renames will usually "
692.3144 +"not show up.  Because a lot of advanced CVS administration has to be done by "
692.3145 +"hand and is hence error-prone, it's common for CVS importers to run into "
692.3146 +"multiple problems with corrupted repositories (completely bogus revision "
692.3147 +"timestamps and files that have remained locked for over a decade are just two "
692.3148 +"of the less interesting problems I can recall from personal experience)."
692.3149 +msgstr ""
692.3150 +
692.3151 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3152 +#: ../en/ch01-intro.xml:572
692.3153 +msgid "Mercurial can import revision history from a CVS repository."
692.3154 +msgstr ""
692.3155 +
692.3156 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.3157 +#: ../en/ch01-intro.xml:578
692.3158 +msgid "Commercial tools"
692.3159 +msgstr "商业工具"
692.3160 +
692.3161 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3162 +#: ../en/ch01-intro.xml:580
692.3163 +msgid ""
692.3164 +"Perforce has a centralised client/server architecture, with no client-side "
692.3165 +"caching of any data.  Unlike modern revision control tools, Perforce requires "
692.3166 +"that a user run a command to inform the server about every file they intend "
692.3167 +"to edit."
692.3168 +msgstr ""
692.3169 +
692.3170 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3171 +#: ../en/ch01-intro.xml:586
692.3172 +msgid ""
692.3173 +"The performance of Perforce is quite good for small teams, but it falls off "
692.3174 +"rapidly as the number of users grows beyond a few dozen. Modestly large "
692.3175 +"Perforce installations require the deployment of proxies to cope with the "
692.3176 +"load their users generate."
692.3177 +msgstr ""
692.3178 +
692.3179 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.3180 +#: ../en/ch01-intro.xml:595
692.3181 +msgid "Choosing a revision control tool"
692.3182 +msgstr "选择版本控制工具"
692.3183 +
692.3184 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3185 +#: ../en/ch01-intro.xml:597
692.3186 +msgid ""
692.3187 +"With the exception of CVS, all of the tools listed above have unique "
692.3188 +"strengths that suit them to particular styles of work.  There is no single "
692.3189 +"revision control tool that is best in all situations."
692.3190 +msgstr ""
692.3191 +
692.3192 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3193 +#: ../en/ch01-intro.xml:602
692.3194 +msgid ""
692.3195 +"As an example, Subversion is a good choice for working with frequently edited "
692.3196 +"binary files, due to its centralised nature and support for file locking."
692.3197 +msgstr ""
692.3198 +
692.3199 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3200 +#: ../en/ch01-intro.xml:606
692.3201 +msgid ""
692.3202 +"I personally find Mercurial's properties of simplicity, performance, and good "
692.3203 +"merge support to be a compelling combination that has served me well for "
692.3204 +"several years."
692.3205 +msgstr ""
692.3206 +
692.3207 +#. type: Content of: <book><chapter><sect1><title>
692.3208 +#: ../en/ch01-intro.xml:614
692.3209 +msgid "Switching from another tool to Mercurial"
692.3210 +msgstr "从其它工具切换到 Mercurial"
692.3211 +
692.3212 +#. type: Content of: <book><chapter><sect1><para>
692.3213 +#: ../en/ch01-intro.xml:616
692.3214 +msgid ""
692.3215 +"Mercurial is bundled with an extension named <literal role=\"hg-ext"
692.3216 +"\">convert</literal>, which can incrementally import revision history from "
692.3217 +"several other revision control tools.  By <quote>incremental</quote>, I mean "
692.3218 +"that you can convert all of a project's history to date in one go, then rerun "
692.3219 +"the conversion later to obtain new changes that happened after the initial "
692.3220 +"conversion."
692.3221 +msgstr ""
692.3222 +
692.3223 +#. type: Content of: <book><chapter><sect1><para>
692.3224 +#: ../en/ch01-intro.xml:624
692.3225 +msgid ""
692.3226 +"The revision control tools supported by <literal role=\"hg-ext\">convert</"
692.3227 +"literal> are as follows:"
692.3228 +msgstr "<literal role=\"hg-ext\">convert</literal> 支持的版本控制工具有:"
692.3229 +
692.3230 +#. type: Content of: <book><chapter><sect1><para>
692.3231 +#: ../en/ch01-intro.xml:632
692.3232 +msgid ""
692.3233 +"In addition, <literal role=\"hg-ext\">convert</literal> can export changes "
692.3234 +"from Mercurial to Subversion.  This makes it possible to try Subversion and "
692.3235 +"Mercurial in parallel before committing to a switchover, without risking the "
692.3236 +"loss of any work."
692.3237 +msgstr ""
692.3238 +
692.3239 +#. type: Content of: <book><chapter><sect1><para>
692.3240 +#: ../en/ch01-intro.xml:638
692.3241 +msgid ""
692.3242 +"The <command role=\"hg-ext-convert\">convert</command> command is easy to "
692.3243 +"use.  Simply point it at the path or URL of the source repository, optionally "
692.3244 +"give it the name of the destination repository, and it will start working.  "
692.3245 +"After the initial conversion, just run the same command again to import new "
692.3246 +"changes."
692.3247 +msgstr ""
692.3248 +
692.3249 +#. type: Content of: <book><chapter><sect1><title>
692.3250 +#: ../en/ch01-intro.xml:647
692.3251 +msgid "A short history of revision control"
692.3252 +msgstr "版本控制简史"
692.3253 +
692.3254 +#. type: Content of: <book><chapter><sect1><para>
692.3255 +#: ../en/ch01-intro.xml:649
692.3256 +msgid ""
692.3257 +"The best known of the old-time revision control tools is SCCS (Source Code "
692.3258 +"Control System), which Marc Rochkind wrote at Bell Labs, in the early 1970s.  "
692.3259 +"SCCS operated on individual files, and required every person working on a "
692.3260 +"project to have access to a shared workspace on a single system.  Only one "
692.3261 +"person could modify a file at any time; arbitration for access to files was "
692.3262 +"via locks.  It was common for people to lock files, and later forget to "
692.3263 +"unlock them, preventing anyone else from modifying those files without the "
692.3264 +"help of an administrator."
692.3265 +msgstr ""
692.3266 +
692.3267 +#. type: Content of: <book><chapter><sect1><para>
692.3268 +#: ../en/ch01-intro.xml:660
692.3269 +msgid ""
692.3270 +"Walter Tichy developed a free alternative to SCCS in the early 1980s; he "
692.3271 +"called his program RCS (Revision Control System).  Like SCCS, RCS required "
692.3272 +"developers to work in a single shared workspace, and to lock files to prevent "
692.3273 +"multiple people from modifying them simultaneously."
692.3274 +msgstr ""
692.3275 +
692.3276 +#. type: Content of: <book><chapter><sect1><para>
692.3277 +#: ../en/ch01-intro.xml:666
692.3278 +msgid ""
692.3279 +"Later in the 1980s, Dick Grune used RCS as a building block for a set of "
692.3280 +"shell scripts he initially called cmt, but then renamed to CVS (Concurrent "
692.3281 +"Versions System).  The big innovation of CVS was that it let developers work "
692.3282 +"simultaneously and somewhat independently in their own personal workspaces.  "
692.3283 +"The personal workspaces prevented developers from stepping on each other's "
692.3284 +"toes all the time, as was common with SCCS and RCS. Each developer had a copy "
692.3285 +"of every project file, and could modify their copies independently.  They had "
692.3286 +"to merge their edits prior to committing changes to the central repository."
692.3287 +msgstr ""
692.3288 +
692.3289 +#. type: Content of: <book><chapter><sect1><para>
692.3290 +#: ../en/ch01-intro.xml:677
692.3291 +msgid ""
692.3292 +"Brian Berliner took Grune's original scripts and rewrote them in C, releasing "
692.3293 +"in 1989 the code that has since developed into the modern version of CVS.  "
692.3294 +"CVS subsequently acquired the ability to operate over a network connection, "
692.3295 +"giving it a client/server architecture.  CVS's architecture is centralised; "
692.3296 +"only the server has a copy of the history of the project. Client workspaces "
692.3297 +"just contain copies of recent versions of the project's files, and a little "
692.3298 +"metadata to tell them where the server is.  CVS has been enormously "
692.3299 +"successful; it is probably the world's most widely used revision control "
692.3300 +"system."
692.3301 +msgstr ""
692.3302 +
692.3303 +#. type: Content of: <book><chapter><sect1><para>
692.3304 +#: ../en/ch01-intro.xml:688
692.3305 +msgid ""
692.3306 +"In the early 1990s, Sun Microsystems developed an early distributed revision "
692.3307 +"control system, called TeamWare.  A TeamWare workspace contains a complete "
692.3308 +"copy of the project's history.  TeamWare has no notion of a central "
692.3309 +"repository.  (CVS relied upon RCS for its history storage; TeamWare used "
692.3310 +"SCCS.)"
692.3311 +msgstr ""
692.3312 +
692.3313 +#. type: Content of: <book><chapter><sect1><para>
692.3314 +#: ../en/ch01-intro.xml:695
692.3315 +msgid ""
692.3316 +"As the 1990s progressed, awareness grew of a number of problems with CVS.  It "
692.3317 +"records simultaneous changes to multiple files individually, instead of "
692.3318 +"grouping them together as a single logically atomic operation.  It does not "
692.3319 +"manage its file hierarchy well; it is easy to make a mess of a repository by "
692.3320 +"renaming files and directories.  Worse, its source code is difficult to read "
692.3321 +"and maintain, which made the <quote>pain level</quote> of fixing these "
692.3322 +"architectural problems prohibitive."
692.3323 +msgstr ""
692.3324 +
692.3325 +#. type: Content of: <book><chapter><sect1><para>
692.3326 +#: ../en/ch01-intro.xml:705
692.3327 +msgid ""
692.3328 +"In 2001, Jim Blandy and Karl Fogel, two developers who had worked on CVS, "
692.3329 +"started a project to replace it with a tool that would have a better "
692.3330 +"architecture and cleaner code.  The result, Subversion, does not stray from "
692.3331 +"CVS's centralised client/server model, but it adds multi-file atomic commits, "
692.3332 +"better namespace management, and a number of other features that make it a "
692.3333 +"generally better tool than CVS. Since its initial release, it has rapidly "
692.3334 +"grown in popularity."
692.3335 +msgstr ""
692.3336 +
692.3337 +#. type: Content of: <book><chapter><sect1><para>
692.3338 +#: ../en/ch01-intro.xml:714
692.3339 +msgid ""
692.3340 +"More or less simultaneously, Graydon Hoare began working on an ambitious "
692.3341 +"distributed revision control system that he named Monotone. While Monotone "
692.3342 +"addresses many of CVS's design flaws and has a peer-to-peer architecture, it "
692.3343 +"goes beyond earlier (and subsequent) revision control tools in a number of "
692.3344 +"innovative ways.  It uses cryptographic hashes as identifiers, and has an "
692.3345 +"integral notion of <quote>trust</quote> for code from different sources."
692.3346 +msgstr ""
692.3347 +
692.3348 +#. type: Content of: <book><chapter><sect1><para>
692.3349 +#: ../en/ch01-intro.xml:723
692.3350 +msgid ""
692.3351 +"Mercurial began life in 2005.  While a few aspects of its design are "
692.3352 +"influenced by Monotone, Mercurial focuses on ease of use, high performance, "
692.3353 +"and scalability to very large projects."
692.3354 +msgstr ""
692.3355 +
692.3356 +#. type: Content of: <book><chapter><title>
692.3357 +#: ../en/ch02-tour-basic.xml:5
692.3358 +msgid "A tour of Mercurial: the basics"
692.3359 +msgstr "Mercurial 教程: 基础知识"
692.3360 +
692.3361 +#. type: Content of: <book><chapter><sect1><title>
692.3362 +#: ../en/ch02-tour-basic.xml:8
692.3363 +msgid "Installing Mercurial on your system"
692.3364 +msgstr "安装 Mercurial"
692.3365 +
692.3366 +#. type: Content of: <book><chapter><sect1><para>
692.3367 +#: ../en/ch02-tour-basic.xml:10
692.3368 +msgid ""
692.3369 +"Prebuilt binary packages of Mercurial are available for every popular "
692.3370 +"operating system.  These make it easy to start using Mercurial on your "
692.3371 +"computer immediately."
692.3372 +msgstr ""
692.3373 +"对于每种流行的操作系统,都有已经构建的二进制软件包。这让在你的计算机上开始使"
692.3374 +"用 Mercurial 变得很容易。"
692.3375 +
692.3376 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.3377 +#: ../en/ch02-tour-basic.xml:15
692.3378 +msgid "Windows"
692.3379 +msgstr "Windows"
692.3380 +
692.3381 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3382 +#: ../en/ch02-tour-basic.xml:17
692.3383 +msgid ""
692.3384 +"The best version of Mercurial for Windows is TortoiseHg, which can be found "
692.3385 +"at <ulink url=\"http://bitbucket.org/tortoisehg/stable/wiki/Home\">http://"
692.3386 +"bitbucket.org/tortoisehg/stable/wiki/Home</ulink>.  This package has no "
692.3387 +"external dependencies; it <quote>just works</quote>.  It provides both "
692.3388 +"command line and graphical user interfaces."
692.3389 +msgstr ""
692.3390 +"Windows 中最好的 Mercurial 版本是TortoiseHg,它的主页地址是 <ulink url="
692.3391 +"\"http://bitbucket.org/tortoisehg/stable/wiki/Home\">http://bitbucket.org/"
692.3392 +"tortoisehg/stable/wiki/Home</ulink>。这个软件没有外部依赖,它可以<quote>独立工"
692.3393 +"作</quote>,同时提供了命令行和图形用户界面。"
692.3394 +
692.3395 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.3396 +#: ../en/ch02-tour-basic.xml:27
692.3397 +msgid "Mac OS X"
692.3398 +msgstr "Mac OS X"
692.3399 +
692.3400 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3401 +#: ../en/ch02-tour-basic.xml:29
692.3402 +msgid ""
692.3403 +"Lee Cantey publishes an installer of Mercurial for Mac OS X at <ulink url="
692.3404 +"\"http://mercurial.berkwood.com\">http://mercurial.berkwood.com</ulink>."
692.3405 +msgstr ""
692.3406 +"Lee Cantey 为  Mac OS X 在 <ulink url=\"http://mercurial.berkwood.com"
692.3407 +"\">http://mercurial.berkwood.com</ulink> 发布了 Mercurial 安装程序。"
692.3408 +
692.3409 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.3410 +#: ../en/ch02-tour-basic.xml:35
692.3411 +msgid "Linux"
692.3412 +msgstr "Linux"
692.3413 +
692.3414 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3415 +#: ../en/ch02-tour-basic.xml:37
692.3416 +msgid ""
692.3417 +"Because each Linux distribution has its own packaging tools, policies, and "
692.3418 +"rate of development, it's difficult to give a comprehensive set of "
692.3419 +"instructions on how to install Mercurial binaries.  The version of Mercurial "
692.3420 +"that you will end up with can vary depending on how active the person is who "
692.3421 +"maintains the package for your distribution."
692.3422 +msgstr ""
692.3423 +"由于每种 Linux 发行版都有自己的包管理工具,开发策略和进度,从而很难给出安装 "
692.3424 +"Mercurial 二进制包的全面说明。你安装的 Mercurial 版本,在很大程度上依赖于你所"
692.3425 +"使用的发行版的 Mercurial 维护者的活跃程度。"
692.3426 +
692.3427 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3428 +#: ../en/ch02-tour-basic.xml:44
692.3429 +msgid ""
692.3430 +"To keep things simple, I will focus on installing Mercurial from the command "
692.3431 +"line under the most popular Linux distributions.  Most of these distributions "
692.3432 +"provide graphical package managers that will let you install Mercurial with a "
692.3433 +"single click; the package name to look for is <literal>mercurial</literal>."
692.3434 +msgstr ""
692.3435 +"为了让事情简单,我会致力于说明在最流行的 Linux 发行版中,从命令行安装 "
692.3436 +"Mercurial 的方法。这些发行版都提供了图形界面的包管理器,让你通过点击鼠标安装 "
692.3437 +"Mercurial;寻找的包名称是 <literal>mercurial</literal>。"
692.3438 +
692.3439 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.3440 +#: ../en/ch02-tour-basic.xml:52
692.3441 +msgid "Ubuntu and Debian:"
692.3442 +msgstr "Ubuntu 与 Debian:"
692.3443 +
692.3444 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.3445 +#: ../en/ch02-tour-basic.xml:54
692.3446 +msgid "Fedora:"
692.3447 +msgstr "Fedora:"
692.3448 +
692.3449 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.3450 +#: ../en/ch02-tour-basic.xml:56
692.3451 +msgid "OpenSUSE:"
692.3452 +msgstr "OpenSUSE:"
692.3453 +
692.3454 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.3455 +#: ../en/ch02-tour-basic.xml:58
692.3456 +msgid "Gentoo:"
692.3457 +msgstr "Gentoo:"
692.3458 +
692.3459 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.3460 +#: ../en/ch02-tour-basic.xml:64
692.3461 +msgid "Solaris"
692.3462 +msgstr "Solaris"
692.3463 +
692.3464 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3465 +#: ../en/ch02-tour-basic.xml:66
692.3466 +msgid ""
692.3467 +"SunFreeWare, at <ulink url=\"http://www.sunfreeware.com\">http://www."
692.3468 +"sunfreeware.com</ulink>, provides prebuilt packages of Mercurial."
692.3469 +msgstr ""
692.3470 +"位于 <ulink url=\"http://www.sunfreeware.com\">http://www.sunfreeware.com</"
692.3471 +"ulink> 的 SunFreeWare 提供了 Mercurial 的二进制安装包。"
692.3472 +
692.3473 +#. type: Content of: <book><chapter><sect1><title>
692.3474 +#: ../en/ch02-tour-basic.xml:75
692.3475 +msgid "Getting started"
692.3476 +msgstr "开始"
692.3477 +
692.3478 +#. type: Content of: <book><chapter><sect1><para>
692.3479 +#: ../en/ch02-tour-basic.xml:77
692.3480 +msgid ""
692.3481 +"To begin, we'll use the <command role=\"hg-cmd\">hg version</command> command "
692.3482 +"to find out whether Mercurial is installed properly.  The actual version "
692.3483 +"information that it prints isn't so important; we simply care whether the "
692.3484 +"command runs and prints anything at all."
692.3485 +msgstr ""
692.3486 +"首先,我们使用 <command role=\"hg-cmd\">hg version</command> 命令检查 "
692.3487 +"Mercurial 是否已经正确安装。它打印出来的实际版本信息并不重要;我们只关心它是否"
692.3488 +"能够运行,打印出信息。"
692.3489 +
692.3490 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.3491 +#: ../en/ch02-tour-basic.xml:86
692.3492 +msgid "Built-in help"
692.3493 +msgstr "内置帮助"
692.3494 +
692.3495 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3496 +#: ../en/ch02-tour-basic.xml:88
692.3497 +msgid ""
692.3498 +"Mercurial provides a built-in help system.  This is invaluable for those "
692.3499 +"times when you find yourself stuck trying to remember how to run a command.  "
692.3500 +"If you are completely stuck, simply run <command role=\"hg-cmd\">hg help</"
692.3501 +"command>; it will print a brief list of commands, along with a description of "
692.3502 +"what each does.  If you ask for help on a specific command (as below), it "
692.3503 +"prints more detailed information."
692.3504 +msgstr ""
692.3505 +"Mercurial 内置了帮助系统。当你不记得如何执行一个命令时,它会给你重要的帮助。如"
692.3506 +"果你完全没有头绪,那就直接运行 <command role=\"hg-cmd\">hg help</command>;它"
692.3507 +"会给出命令的简短列表,还描述了每个命令的作用。如果你需要具体命令的帮助(下述),"
692.3508 +"它会给出更详细的信息。"
692.3509 +
692.3510 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3511 +#: ../en/ch02-tour-basic.xml:99
692.3512 +msgid ""
692.3513 +"For a more impressive level of detail (which you won't usually need) run "
692.3514 +"<command role=\"hg-cmd\">hg help <option role=\"hg-opt-global\">-v</option></"
692.3515 +"command>.  The <option role=\"hg-opt-global\">-v</option> option is short for "
692.3516 +"<option role=\"hg-opt-global\">--verbose</option>, and tells Mercurial to "
692.3517 +"print more information than it usually would."
692.3518 +msgstr ""
692.3519 +"要获得更多的详细信息(通常不需要),可以执行 <command role=\"hg-cmd\">hg help "
692.3520 +"<option role=\"hg-opt-global\">-v</option></command>。选项 <option role=\"hg-"
692.3521 +"opt-global\">-v</option> 是 <option role=\"hg-opt-global\">--verbose</option> "
692.3522 +"的短格式,告诉 Mercurial 要打印通常不需要的更多信息。"
692.3523 +
692.3524 +#. type: Content of: <book><chapter><sect1><title>
692.3525 +#: ../en/ch02-tour-basic.xml:110
692.3526 +msgid "Working with a repository"
692.3527 +msgstr "使用版本库"
692.3528 +
692.3529 +#. type: Content of: <book><chapter><sect1><para>
692.3530 +#: ../en/ch02-tour-basic.xml:112
692.3531 +msgid ""
692.3532 +"In Mercurial, everything happens inside a <emphasis>repository</emphasis>.  "
692.3533 +"The repository for a project contains all of the files that <quote>belong to</"
692.3534 +"quote> that project, along with a historical record of the project's files."
692.3535 +msgstr ""
692.3536 +
692.3537 +#. type: Content of: <book><chapter><sect1><para>
692.3538 +#: ../en/ch02-tour-basic.xml:118
692.3539 +msgid ""
692.3540 +"There's nothing particularly magical about a repository; it is simply a "
692.3541 +"directory tree in your filesystem that Mercurial treats as special. You can "
692.3542 +"rename or delete a repository any time you like, using either the command "
692.3543 +"line or your file browser."
692.3544 +msgstr ""
692.3545 +
692.3546 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.3547 +#: ../en/ch02-tour-basic.xml:125
692.3548 +msgid "Making a local copy of a repository"
692.3549 +msgstr "创建版本库的工作副本"
692.3550 +
692.3551 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3552 +#: ../en/ch02-tour-basic.xml:127
692.3553 +msgid ""
692.3554 +"<emphasis>Copying</emphasis> a repository is just a little bit special.  "
692.3555 +"While you could use a normal file copying command to make a copy of a "
692.3556 +"repository, it's best to use a built-in command that Mercurial provides.  "
692.3557 +"This command is called <command role=\"hg-cmd\">hg clone</command>, because "
692.3558 +"it makes an identical copy of an existing repository."
692.3559 +msgstr ""
692.3560 +
692.3561 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3562 +#: ../en/ch02-tour-basic.xml:136
692.3563 +msgid ""
692.3564 +"One advantage of using <command role=\"hg-cmd\">hg clone</command> is that, "
692.3565 +"as we can see above, it lets us clone repositories over the network.  Another "
692.3566 +"is that it remembers where we cloned from, which we'll find useful soon when "
692.3567 +"we want to fetch new changes from another repository."
692.3568 +msgstr ""
692.3569 +
692.3570 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3571 +#: ../en/ch02-tour-basic.xml:142
692.3572 +msgid ""
692.3573 +"If our clone succeeded, we should now have a local directory called <filename "
692.3574 +"class=\"directory\">hello</filename>.  This directory will contain some files."
692.3575 +msgstr ""
692.3576 +
692.3577 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3578 +#: ../en/ch02-tour-basic.xml:148
692.3579 +msgid ""
692.3580 +"These files have the same contents and history in our repository as they do "
692.3581 +"in the repository we cloned."
692.3582 +msgstr ""
692.3583 +
692.3584 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3585 +#: ../en/ch02-tour-basic.xml:151
692.3586 +msgid ""
692.3587 +"Every Mercurial repository is complete, self-contained, and independent.  It "
692.3588 +"contains its own private copy of a project's files and history.  As we just "
692.3589 +"mentioned, a cloned repository remembers the location of the repository it "
692.3590 +"was cloned from, but Mercurial will not communicate with that repository, or "
692.3591 +"any other, unless you tell it to."
692.3592 +msgstr ""
692.3593 +
692.3594 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3595 +#: ../en/ch02-tour-basic.xml:158
692.3596 +msgid ""
692.3597 +"What this means for now is that we're free to experiment with our repository, "
692.3598 +"safe in the knowledge that it's a private <quote>sandbox</quote> that won't "
692.3599 +"affect anyone else."
692.3600 +msgstr ""
692.3601 +
692.3602 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.3603 +#: ../en/ch02-tour-basic.xml:164
692.3604 +msgid "What's in a repository?"
692.3605 +msgstr "什么是版本库?"
692.3606 +
692.3607 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3608 +#: ../en/ch02-tour-basic.xml:166
692.3609 +msgid ""
692.3610 +"When we take a more detailed look inside a repository, we can see that it "
692.3611 +"contains a directory named <filename class=\"directory\">.hg</filename>.  "
692.3612 +"This is where Mercurial keeps all of its metadata for the repository."
692.3613 +msgstr ""
692.3614 +
692.3615 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3616 +#: ../en/ch02-tour-basic.xml:173
692.3617 +msgid ""
692.3618 +"The contents of the <filename class=\"directory\">.hg</filename> directory "
692.3619 +"and its subdirectories are private to Mercurial.  Every other file and "
692.3620 +"directory in the repository is yours to do with as you please."
692.3621 +msgstr ""
692.3622 +
692.3623 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3624 +#: ../en/ch02-tour-basic.xml:179
692.3625 +msgid ""
692.3626 +"To introduce a little terminology, the <filename class=\"directory\">.hg</"
692.3627 +"filename> directory is the <quote>real</quote> repository, and all of the "
692.3628 +"files and directories that coexist with it are said to live in the "
692.3629 +"<emphasis>working directory</emphasis>.  An easy way to remember the "
692.3630 +"distinction is that the <emphasis>repository</emphasis> contains the "
692.3631 +"<emphasis>history</emphasis> of your project, while the <emphasis>working "
692.3632 +"directory</emphasis> contains a <emphasis>snapshot</emphasis> of your project "
692.3633 +"at a particular point in history."
692.3634 +msgstr ""
692.3635 +
692.3636 +#. type: Content of: <book><chapter><sect1><title>
692.3637 +#: ../en/ch02-tour-basic.xml:194
692.3638 +msgid "A tour through history"
692.3639 +msgstr "回溯历史"
692.3640 +
692.3641 +#. type: Content of: <book><chapter><sect1><para>
692.3642 +#: ../en/ch02-tour-basic.xml:196
692.3643 +msgid ""
692.3644 +"One of the first things we might want to do with a new, unfamiliar repository "
692.3645 +"is understand its history.  The <command role=\"hg-cmd\">hg log</command> "
692.3646 +"command gives us a view of the history of changes in the repository."
692.3647 +msgstr ""
692.3648 +
692.3649 +#. type: Content of: <book><chapter><sect1><para>
692.3650 +#: ../en/ch02-tour-basic.xml:203
692.3651 +msgid ""
692.3652 +"By default, this command prints a brief paragraph of output for each change "
692.3653 +"to the project that was recorded.  In Mercurial terminology, we call each of "
692.3654 +"these recorded events a <emphasis>changeset</emphasis>, because it can "
692.3655 +"contain a record of changes to several files."
692.3656 +msgstr ""
692.3657 +
692.3658 +#. type: Content of: <book><chapter><sect1><para>
692.3659 +#: ../en/ch02-tour-basic.xml:209
692.3660 +msgid ""
692.3661 +"The fields in a record of output from <command role=\"hg-cmd\">hg log</"
692.3662 +"command> are as follows."
692.3663 +msgstr ""
692.3664 +
692.3665 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.3666 +#: ../en/ch02-tour-basic.xml:213
692.3667 +msgid ""
692.3668 +"<literal>changeset</literal>: This field has the format of a number, followed "
692.3669 +"by a colon, followed by a hexadecimal (or <emphasis>hex</emphasis>)  string.  "
692.3670 +"These are <emphasis>identifiers</emphasis> for the changeset.  The hex string "
692.3671 +"is a unique identifier: the same hex string will always refer to the same "
692.3672 +"changeset in every copy of this repository. The number is shorter and easier "
692.3673 +"to type than the hex string, but it isn't unique: the same number in two "
692.3674 +"different clones of a repository may identify different changesets."
692.3675 +msgstr ""
692.3676 +
692.3677 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.3678 +#: ../en/ch02-tour-basic.xml:224
692.3679 +msgid ""
692.3680 +"<literal>user</literal>: The identity of the person who created the "
692.3681 +"changeset.  This is a free-form field, but it most often contains a person's "
692.3682 +"name and email address."
692.3683 +msgstr ""
692.3684 +
692.3685 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.3686 +#: ../en/ch02-tour-basic.xml:228
692.3687 +msgid ""
692.3688 +"<literal>date</literal>: The date and time on which the changeset was "
692.3689 +"created, and the timezone in which it was created.  (The date and time are "
692.3690 +"local to that timezone; they display what time and date it was for the person "
692.3691 +"who created the changeset.)"
692.3692 +msgstr ""
692.3693 +
692.3694 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.3695 +#: ../en/ch02-tour-basic.xml:233
692.3696 +msgid ""
692.3697 +"<literal>summary</literal>: The first line of the text message that the "
692.3698 +"creator of the changeset entered to describe the changeset."
692.3699 +msgstr ""
692.3700 +
692.3701 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.3702 +#: ../en/ch02-tour-basic.xml:237
692.3703 +msgid ""
692.3704 +"Some changesets, such as the first in the list above, have a <literal>tag</"
692.3705 +"literal> field.  A tag is another way to identify a changeset, by giving it "
692.3706 +"an easy-to-remember name. (The tag named <literal>tip</literal> is special: "
692.3707 +"it always refers to the newest change in a repository.)"
692.3708 +msgstr ""
692.3709 +
692.3710 +#. type: Content of: <book><chapter><sect1><para>
692.3711 +#: ../en/ch02-tour-basic.xml:245
692.3712 +msgid ""
692.3713 +"The default output printed by <command role=\"hg-cmd\">hg log</command> is "
692.3714 +"purely a summary; it is missing a lot of detail."
692.3715 +msgstr ""
692.3716 +
692.3717 +#. type: Content of: <book><chapter><sect1><para>
692.3718 +#: ../en/ch02-tour-basic.xml:249
692.3719 +msgid ""
692.3720 +"<xref linkend=\"fig:tour-basic:history\"/> provides a graphical "
692.3721 +"representation of the history of the <filename class=\"directory\">hello</"
692.3722 +"filename> repository, to make it a little easier to see which direction "
692.3723 +"history is <quote>flowing</quote> in.  We'll be returning to this figure "
692.3724 +"several times in this chapter and the chapter that follows."
692.3725 +msgstr ""
692.3726 +
692.3727 +#. type: Content of: <book><chapter><sect1><figure><title>
692.3728 +#: ../en/ch02-tour-basic.xml:258
692.3729 +msgid ""
692.3730 +"Graphical history of the <filename class=\"directory\">hello</filename> "
692.3731 +"repository"
692.3732 +msgstr "版本库 <filename class=\"directory\">hello</filename> 的历史图"
692.3733 +
692.3734 +#. type: Content of: <book><chapter><sect1><figure>
692.3735 +#: ../en/ch02-tour-basic.xml:260 ../en/ch03-tour-merge.xml:61
692.3736 +#: ../en/ch03-tour-merge.xml:207 ../en/ch04-concepts.xml:290
692.3737 +msgid "<placeholder type=\"mediaobject\" id=\"0\"/>"
692.3738 +msgstr ""
692.3739 +
692.3740 +#. type: Content of: <book><chapter><sect1><figure><mediaobject>
692.3741 +#: ../en/ch02-tour-basic.xml:261
692.3742 +msgid ""
692.3743 +"<imageobject><imagedata fileref=\"figs/tour-history.png\"/></imageobject>"
692.3744 +msgstr ""
692.3745 +
692.3746 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject><textobject><phrase>
692.3747 +#: ../en/ch02-tour-basic.xml:262 ../en/ch03-tour-merge.xml:63
692.3748 +#: ../en/ch03-tour-merge.xml:95 ../en/ch03-tour-merge.xml:182
692.3749 +#: ../en/ch03-tour-merge.xml:209 ../en/ch03-tour-merge.xml:279
692.3750 +#: ../en/ch04-concepts.xml:59 ../en/ch04-concepts.xml:108
692.3751 +#: ../en/ch04-concepts.xml:198 ../en/ch04-concepts.xml:292
692.3752 +#: ../en/ch04-concepts.xml:347 ../en/ch04-concepts.xml:362
692.3753 +#: ../en/ch04-concepts.xml:403 ../en/ch04-concepts.xml:423
692.3754 +#: ../en/ch04-concepts.xml:469 ../en/ch06-collab.xml:316
692.3755 +#: ../en/ch09-undo.xml:344 ../en/ch09-undo.xml:391 ../en/ch09-undo.xml:464
692.3756 +#: ../en/ch09-undo.xml:502 ../en/ch09-undo.xml:658 ../en/ch09-undo.xml:682
692.3757 +#: ../en/ch09-undo.xml:700 ../en/ch09-undo.xml:714 ../en/ch09-undo.xml:727
692.3758 +#: ../en/ch12-mq.xml:413
692.3759 +msgid "XXX add text"
692.3760 +msgstr ""
692.3761 +
692.3762 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.3763 +#: ../en/ch02-tour-basic.xml:267
692.3764 +msgid "Changesets, revisions, and talking to other people"
692.3765 +msgstr "修改集,版本,与其它用户交互"
692.3766 +
692.3767 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3768 +#: ../en/ch02-tour-basic.xml:270
692.3769 +msgid ""
692.3770 +"As English is a notoriously sloppy language, and computer science has a "
692.3771 +"hallowed history of terminological confusion (why use one term when four will "
692.3772 +"do?), revision control has a variety of words and phrases that mean the same "
692.3773 +"thing.  If you are talking about Mercurial history with other people, you "
692.3774 +"will find that the word <quote>changeset</quote> is often compressed to "
692.3775 +"<quote>change</quote> or (when written)  <quote>cset</quote>, and sometimes a "
692.3776 +"changeset is referred to as a <quote>revision</quote> or a <quote>rev</quote>."
692.3777 +msgstr ""
692.3778 +
692.3779 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3780 +#: ../en/ch02-tour-basic.xml:280
692.3781 +msgid ""
692.3782 +"While it doesn't matter what <emphasis>word</emphasis> you use to refer to "
692.3783 +"the concept of <quote>a changeset</quote>, the <emphasis>identifier</"
692.3784 +"emphasis> that you use to refer to <quote>a <emphasis>specific</emphasis> "
692.3785 +"changeset</quote> is of great importance. Recall that the <literal>changeset</"
692.3786 +"literal> field in the output from <command role=\"hg-cmd\">hg log</command> "
692.3787 +"identifies a changeset using both a number and a hexadecimal string."
692.3788 +msgstr ""
692.3789 +
692.3790 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.3791 +#: ../en/ch02-tour-basic.xml:289
692.3792 +msgid ""
692.3793 +"The revision number is a handy notation that is <emphasis>only valid in that "
692.3794 +"repository</emphasis>."
692.3795 +msgstr ""
692.3796 +
692.3797 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.3798 +#: ../en/ch02-tour-basic.xml:292
692.3799 +msgid ""
692.3800 +"The hexadecimal string is the <emphasis>permanent, unchanging identifier</"
692.3801 +"emphasis> that will always identify that exact changeset in <emphasis>every</"
692.3802 +"emphasis> copy of the repository."
692.3803 +msgstr ""
692.3804 +
692.3805 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3806 +#: ../en/ch02-tour-basic.xml:298
692.3807 +msgid ""
692.3808 +"This distinction is important.  If you send someone an email talking about "
692.3809 +"<quote>revision 33</quote>, there's a high likelihood that their revision 33 "
692.3810 +"will <emphasis>not be the same</emphasis> as yours.  The reason for this is "
692.3811 +"that a revision number depends on the order in which changes arrived in a "
692.3812 +"repository, and there is no guarantee that the same changes will happen in "
692.3813 +"the same order in different repositories. Three changes <literal>a,b,c</"
692.3814 +"literal> can easily appear in one repository as <literal>0,1,2</literal>, "
692.3815 +"while in another as <literal>0,2,1</literal>."
692.3816 +msgstr ""
692.3817 +
692.3818 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3819 +#: ../en/ch02-tour-basic.xml:310
692.3820 +msgid ""
692.3821 +"Mercurial uses revision numbers purely as a convenient shorthand.  If you "
692.3822 +"need to discuss a changeset with someone, or make a record of a changeset for "
692.3823 +"some other reason (for example, in a bug report), use the hexadecimal "
692.3824 +"identifier."
692.3825 +msgstr ""
692.3826 +
692.3827 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.3828 +#: ../en/ch02-tour-basic.xml:318
692.3829 +msgid "Viewing specific revisions"
692.3830 +msgstr "察看指定版本"
692.3831 +
692.3832 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3833 +#: ../en/ch02-tour-basic.xml:320
692.3834 +msgid ""
692.3835 +"To narrow the output of <command role=\"hg-cmd\">hg log</command> down to a "
692.3836 +"single revision, use the <option role=\"hg-opt-log\">-r</option> (or <option "
692.3837 +"role=\"hg-opt-log\">--rev</option>) option.  You can use either a revision "
692.3838 +"number or a hexadecimal identifier, and you can provide as many revisions as "
692.3839 +"you want."
692.3840 +msgstr ""
692.3841 +
692.3842 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3843 +#: ../en/ch02-tour-basic.xml:329
692.3844 +msgid ""
692.3845 +"If you want to see the history of several revisions without having to list "
692.3846 +"each one, you can use <emphasis>range notation</emphasis>; this lets you "
692.3847 +"express the idea <quote>I want all revisions between <literal>abc</literal> "
692.3848 +"and <literal>def</literal>, inclusive</quote>."
692.3849 +msgstr ""
692.3850 +
692.3851 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3852 +#: ../en/ch02-tour-basic.xml:337
692.3853 +msgid ""
692.3854 +"Mercurial also honours the order in which you specify revisions, so <command "
692.3855 +"role=\"hg-cmd\">hg log -r 2:4</command> prints 2, 3, and 4. while <command "
692.3856 +"role=\"hg-cmd\">hg log -r 4:2</command> prints 4, 3, and 2."
692.3857 +msgstr ""
692.3858 +
692.3859 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.3860 +#: ../en/ch02-tour-basic.xml:344
692.3861 +msgid "More detailed information"
692.3862 +msgstr "更详细的信息"
692.3863 +
692.3864 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3865 +#: ../en/ch02-tour-basic.xml:346
692.3866 +msgid ""
692.3867 +"While the summary information printed by <command role=\"hg-cmd\">hg log</"
692.3868 +"command> is useful if you already know what you're looking for, you may need "
692.3869 +"to see a complete description of the change, or a list of the files changed, "
692.3870 +"if you're trying to decide whether a changeset is the one you're looking for. "
692.3871 +"The <command role=\"hg-cmd\">hg log</command> command's <option role=\"hg-opt-"
692.3872 +"global\">-v</option> (or <option role=\"hg-opt-global\">--verbose</option>) "
692.3873 +"option gives you this extra detail."
692.3874 +msgstr ""
692.3875 +
692.3876 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3877 +#: ../en/ch02-tour-basic.xml:358
692.3878 +msgid ""
692.3879 +"If you want to see both the description and content of a change, add the "
692.3880 +"<option role=\"hg-opt-log\">-p</option> (or <option role=\"hg-opt-log\">--"
692.3881 +"patch</option>) option.  This displays the content of a change as a "
692.3882 +"<emphasis>unified diff</emphasis> (if you've never seen a unified diff "
692.3883 +"before, see <xref linkend=\"sec:mq:patch\"/> for an overview)."
692.3884 +msgstr ""
692.3885 +
692.3886 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.3887 +#: ../en/ch02-tour-basic.xml:368
692.3888 +msgid ""
692.3889 +"The <option role=\"hg-opt-log\">-p</option> option is tremendously useful, so "
692.3890 +"it's well worth remembering."
692.3891 +msgstr ""
692.3892 +
692.3893 +#. type: Content of: <book><chapter><sect1><title>
692.3894 +#: ../en/ch02-tour-basic.xml:375
692.3895 +msgid "All about command options"
692.3896 +msgstr "命令选项"
692.3897 +
692.3898 +#. type: Content of: <book><chapter><sect1><para>
692.3899 +#: ../en/ch02-tour-basic.xml:377
692.3900 +msgid ""
692.3901 +"Let's take a brief break from exploring Mercurial commands to discuss a "
692.3902 +"pattern in the way that they work; you may find this useful to keep in mind "
692.3903 +"as we continue our tour."
692.3904 +msgstr ""
692.3905 +
692.3906 +#. type: Content of: <book><chapter><sect1><para>
692.3907 +#: ../en/ch02-tour-basic.xml:381
692.3908 +msgid ""
692.3909 +"Mercurial has a consistent and straightforward approach to dealing with the "
692.3910 +"options that you can pass to commands.  It follows the conventions for "
692.3911 +"options that are common to modern Linux and Unix systems."
692.3912 +msgstr ""
692.3913 +
692.3914 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.3915 +#: ../en/ch02-tour-basic.xml:388
692.3916 +msgid ""
692.3917 +"Every option has a long name.  For example, as we've already seen, the "
692.3918 +"<command role=\"hg-cmd\">hg log</command> command accepts a <option role=\"hg-"
692.3919 +"opt-log\">--rev</option> option."
692.3920 +msgstr ""
692.3921 +
692.3922 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.3923 +#: ../en/ch02-tour-basic.xml:394
692.3924 +msgid ""
692.3925 +"Most options have short names, too.  Instead of <option role=\"hg-opt-log\">--"
692.3926 +"rev</option>, we can use <option role=\"hg-opt-log\">-r</option>.  (The "
692.3927 +"reason that some options don't have short names is that the options in "
692.3928 +"question are rarely used.)"
692.3929 +msgstr ""
692.3930 +
692.3931 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.3932 +#: ../en/ch02-tour-basic.xml:401
692.3933 +msgid ""
692.3934 +"Long options start with two dashes (e.g.  <option role=\"hg-opt-log\">--rev</"
692.3935 +"option>), while short options start with one (e.g. <option role=\"hg-opt-log"
692.3936 +"\">-r</option>)."
692.3937 +msgstr ""
692.3938 +
692.3939 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.3940 +#: ../en/ch02-tour-basic.xml:407
692.3941 +msgid ""
692.3942 +"Option naming and usage is consistent across commands.  For example, every "
692.3943 +"command that lets you specify a changeset ID or revision number accepts both "
692.3944 +"<option role=\"hg-opt-log\">-r</option> and <option role=\"hg-opt-log\">--"
692.3945 +"rev</option> arguments."
692.3946 +msgstr ""
692.3947 +
692.3948 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.3949 +#: ../en/ch02-tour-basic.xml:414
692.3950 +msgid ""
692.3951 +"If you are using short options, you can save typing by running them together. "
692.3952 +"For example, the command <command role=\"hg-cmd\">hg log -v -p -r 2</command> "
692.3953 +"can be written as <command role=\"hg-cmd\">hg log -vpr2</command>."
692.3954 +msgstr ""
692.3955 +
692.3956 +#. type: Content of: <book><chapter><sect1><para>
692.3957 +#: ../en/ch02-tour-basic.xml:421
692.3958 +msgid ""
692.3959 +"In the examples throughout this book, I usually use short options instead of "
692.3960 +"long.  This simply reflects my own preference, so don't read anything "
692.3961 +"significant into it."
692.3962 +msgstr ""
692.3963 +
692.3964 +#. type: Content of: <book><chapter><sect1><para>
692.3965 +#: ../en/ch02-tour-basic.xml:425
692.3966 +msgid ""
692.3967 +"Most commands that print output of some kind will print more output when "
692.3968 +"passed a <option role=\"hg-opt-global\">-v</option> (or <option role=\"hg-opt-"
692.3969 +"global\">--verbose</option>) option, and less when passed <option role=\"hg-"
692.3970 +"opt-global\">-q</option> (or <option role=\"hg-opt-global\">--quiet</option>)."
692.3971 +msgstr ""
692.3972 +
692.3973 +#. type: Content of: <book><chapter><sect1><note><title>
692.3974 +#: ../en/ch02-tour-basic.xml:432
692.3975 +msgid "Option naming consistency"
692.3976 +msgstr ""
692.3977 +
692.3978 +#. type: Content of: <book><chapter><sect1><note><para>
692.3979 +#: ../en/ch02-tour-basic.xml:434
692.3980 +msgid ""
692.3981 +"Almost always, Mercurial commands use consistent option names to refer to the "
692.3982 +"same concepts.  For instance, if a command deals with changesets, you'll "
692.3983 +"always identify them with <option role=\"hg-opt-log\">--rev</option> or "
692.3984 +"<option role=\"hg-opt-log\">-r</option>.  This consistent use of option names "
692.3985 +"makes it easier to remember what options a particular command takes."
692.3986 +msgstr ""
692.3987 +
692.3988 +#. type: Content of: <book><chapter><sect1><title>
692.3989 +#: ../en/ch02-tour-basic.xml:445
692.3990 +msgid "Making and reviewing changes"
692.3991 +msgstr "创建和复审修改"
692.3992 +
692.3993 +#. type: Content of: <book><chapter><sect1><para>
692.3994 +#: ../en/ch02-tour-basic.xml:447
692.3995 +msgid ""
692.3996 +"Now that we have a grasp of viewing history in Mercurial, let's take a look "
692.3997 +"at making some changes and examining them."
692.3998 +msgstr ""
692.3999 +
692.4000 +#. type: Content of: <book><chapter><sect1><para>
692.4001 +#: ../en/ch02-tour-basic.xml:451
692.4002 +msgid ""
692.4003 +"The first thing we'll do is isolate our experiment in a repository of its "
692.4004 +"own.  We use the <command role=\"hg-cmd\">hg clone</command> command, but we "
692.4005 +"don't need to clone a copy of the remote repository.  Since we already have a "
692.4006 +"copy of it locally, we can just clone that instead.  This is much faster than "
692.4007 +"cloning over the network, and cloning a local repository uses less disk space "
692.4008 +"in most cases, too<placeholder type=\"footnote\" id=\"0\"/>."
692.4009 +msgstr ""
692.4010 +
692.4011 +#. type: Content of: <book><chapter><sect1><para><footnote><para>
692.4012 +#: ../en/ch02-tour-basic.xml:458
692.4013 +msgid ""
692.4014 +"The saving of space arises when source and destination repositories are on "
692.4015 +"the same filesystem, in which case Mercurial will use hardlinks to do copy-on-"
692.4016 +"write sharing of its internal metadata.  If that explanation meant nothing to "
692.4017 +"you, don't worry: everything happens transparently and automatically, and you "
692.4018 +"don't need to understand it."
692.4019 +msgstr ""
692.4020 +
692.4021 +#. type: Content of: <book><chapter><sect1><para>
692.4022 +#: ../en/ch02-tour-basic.xml:468
692.4023 +msgid ""
692.4024 +"As an aside, it's often good practice to keep a <quote>pristine</quote> copy "
692.4025 +"of a remote repository around, which you can then make temporary clones of to "
692.4026 +"create sandboxes for each task you want to work on.  This lets you work on "
692.4027 +"multiple tasks in parallel, each isolated from the others until it's complete "
692.4028 +"and you're ready to integrate it back.  Because local clones are so cheap, "
692.4029 +"there's almost no overhead to cloning and destroying repositories whenever "
692.4030 +"you want."
692.4031 +msgstr ""
692.4032 +
692.4033 +#. type: Content of: <book><chapter><sect1><para>
692.4034 +#: ../en/ch02-tour-basic.xml:477
692.4035 +msgid ""
692.4036 +"In our <filename class=\"directory\">my-hello</filename> repository, we have "
692.4037 +"a file <filename>hello.c</filename> that contains the classic <quote>hello, "
692.4038 +"world</quote> program."
692.4039 +msgstr ""
692.4040 +
692.4041 +#. type: Content of: <book><chapter><sect1><para>
692.4042 +#: ../en/ch02-tour-basic.xml:483
692.4043 +msgid "Let's edit this file so that it prints a second line of output."
692.4044 +msgstr ""
692.4045 +
692.4046 +#. type: Content of: <book><chapter><sect1><para>
692.4047 +#: ../en/ch02-tour-basic.xml:488
692.4048 +msgid ""
692.4049 +"Mercurial's <command role=\"hg-cmd\">hg status</command> command will tell us "
692.4050 +"what Mercurial knows about the files in the repository."
692.4051 +msgstr ""
692.4052 +
692.4053 +#. type: Content of: <book><chapter><sect1><para>
692.4054 +#: ../en/ch02-tour-basic.xml:494
692.4055 +msgid ""
692.4056 +"The <command role=\"hg-cmd\">hg status</command> command prints no output for "
692.4057 +"some files, but a line starting with <quote><literal>M</literal></quote> for "
692.4058 +"<filename>hello.c</filename>.  Unless you tell it to, <command role=\"hg-cmd"
692.4059 +"\">hg status</command> will not print any output for files that have not been "
692.4060 +"modified."
692.4061 +msgstr ""
692.4062 +
692.4063 +#. type: Content of: <book><chapter><sect1><para>
692.4064 +#: ../en/ch02-tour-basic.xml:501
692.4065 +msgid ""
692.4066 +"The <quote><literal>M</literal></quote> indicates that Mercurial has noticed "
692.4067 +"that we modified <filename>hello.c</filename>.  We didn't need to "
692.4068 +"<emphasis>inform</emphasis> Mercurial that we were going to modify the file "
692.4069 +"before we started, or that we had modified the file after we were done; it "
692.4070 +"was able to figure this out itself."
692.4071 +msgstr ""
692.4072 +
692.4073 +#. type: Content of: <book><chapter><sect1><para>
692.4074 +#: ../en/ch02-tour-basic.xml:509
692.4075 +msgid ""
692.4076 +"It's somewhat helpful to know that we've modified <filename>hello.c</"
692.4077 +"filename>, but we might prefer to know exactly <emphasis>what</emphasis> "
692.4078 +"changes we've made to it.  To do this, we use the <command role=\"hg-cmd\">hg "
692.4079 +"diff</command> command."
692.4080 +msgstr ""
692.4081 +
692.4082 +#. type: Content of: <book><chapter><sect1><title>
692.4083 +#: ../en/ch02-tour-basic.xml:518 ../en/ch12-mq.xml:187
692.4084 +msgid "Understanding patches"
692.4085 +msgstr "理解补丁"
692.4086 +
692.4087 +#. type: Content of: <book><chapter><sect1><tip><para>
692.4088 +#: ../en/ch02-tour-basic.xml:520
692.4089 +msgid ""
692.4090 +"Remember to take a look at <xref linkend=\"sec:mq:patch\"/> if you don't know "
692.4091 +"how to read output above."
692.4092 +msgstr ""
692.4093 +
692.4094 +#. type: Content of: <book><chapter><sect1><title>
692.4095 +#: ../en/ch02-tour-basic.xml:526
692.4096 +msgid "Recording changes in a new changeset"
692.4097 +msgstr "在新修改集中记录修改"
692.4098 +
692.4099 +#. type: Content of: <book><chapter><sect1><para>
692.4100 +#: ../en/ch02-tour-basic.xml:528
692.4101 +msgid ""
692.4102 +"We can modify files, build and test our changes, and use <command role=\"hg-"
692.4103 +"cmd\">hg status</command> and <command role=\"hg-cmd\">hg diff</command> to "
692.4104 +"review our changes, until we're satisfied with what we've done and arrive at "
692.4105 +"a natural stopping point where we want to record our work in a new changeset."
692.4106 +msgstr ""
692.4107 +
692.4108 +#. type: Content of: <book><chapter><sect1><para>
692.4109 +#: ../en/ch02-tour-basic.xml:535
692.4110 +msgid ""
692.4111 +"The <command role=\"hg-cmd\">hg commit</command> command lets us create a new "
692.4112 +"changeset; we'll usually refer to this as <quote>making a commit</quote> or "
692.4113 +"<quote>committing</quote>."
692.4114 +msgstr ""
692.4115 +
692.4116 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.4117 +#: ../en/ch02-tour-basic.xml:541
692.4118 +msgid "Setting up a username"
692.4119 +msgstr "配置用户名称"
692.4120 +
692.4121 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4122 +#: ../en/ch02-tour-basic.xml:543
692.4123 +msgid ""
692.4124 +"When you try to run <command role=\"hg-cmd\">hg commit</command> for the "
692.4125 +"first time, it is not guaranteed to succeed.  Mercurial records your name and "
692.4126 +"address with each change that you commit, so that you and others will later "
692.4127 +"be able to tell who made each change.  Mercurial tries to automatically "
692.4128 +"figure out a sensible username to commit the change with.  It will attempt "
692.4129 +"each of the following methods, in order:"
692.4130 +msgstr ""
692.4131 +
692.4132 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.4133 +#: ../en/ch02-tour-basic.xml:552
692.4134 +msgid ""
692.4135 +"If you specify a <option role=\"hg-opt-commit\">-u</option> option to the "
692.4136 +"<command role=\"hg-cmd\">hg commit</command> command on the command line, "
692.4137 +"followed by a username, this is always given the highest precedence."
692.4138 +msgstr ""
692.4139 +
692.4140 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.4141 +#: ../en/ch02-tour-basic.xml:557
692.4142 +msgid ""
692.4143 +"If you have set the <envar>HGUSER</envar> environment variable, this is "
692.4144 +"checked next."
692.4145 +msgstr ""
692.4146 +
692.4147 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.4148 +#: ../en/ch02-tour-basic.xml:560
692.4149 +msgid ""
692.4150 +"If you create a file in your home directory called <filename role=\"special"
692.4151 +"\">.hgrc</filename>, with a <envar role=\"rc-item-ui\">username</envar> "
692.4152 +"entry, that will be used next.  To see what the contents of this file should "
692.4153 +"look like, refer to <xref linkend=\"sec:tour-basic:username\"/> below."
692.4154 +msgstr ""
692.4155 +
692.4156 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.4157 +#: ../en/ch02-tour-basic.xml:568
692.4158 +msgid ""
692.4159 +"If you have set the <envar>EMAIL</envar> environment variable, this will be "
692.4160 +"used next."
692.4161 +msgstr ""
692.4162 +
692.4163 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.4164 +#: ../en/ch02-tour-basic.xml:571
692.4165 +msgid ""
692.4166 +"Mercurial will query your system to find out your local user name and host "
692.4167 +"name, and construct a username from these components. Since this often "
692.4168 +"results in a username that is not very useful, it will print a warning if it "
692.4169 +"has to do this."
692.4170 +msgstr ""
692.4171 +
692.4172 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4173 +#: ../en/ch02-tour-basic.xml:578
692.4174 +msgid ""
692.4175 +"If all of these mechanisms fail, Mercurial will fail, printing an error "
692.4176 +"message.  In this case, it will not let you commit until you set up a "
692.4177 +"username."
692.4178 +msgstr ""
692.4179 +
692.4180 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4181 +#: ../en/ch02-tour-basic.xml:582
692.4182 +msgid ""
692.4183 +"You should think of the <envar>HGUSER</envar> environment variable and the "
692.4184 +"<option role=\"hg-opt-commit\">-u</option> option to the <command role=\"hg-"
692.4185 +"cmd\">hg commit</command> command as ways to <emphasis>override</emphasis> "
692.4186 +"Mercurial's default selection of username.  For normal use, the simplest and "
692.4187 +"most robust way to set a username for yourself is by creating a <filename "
692.4188 +"role=\"special\">.hgrc</filename> file; see below for details."
692.4189 +msgstr ""
692.4190 +
692.4191 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.4192 +#: ../en/ch02-tour-basic.xml:591
692.4193 +msgid "Creating a Mercurial configuration file"
692.4194 +msgstr "创建 Mercurial 的配置文件"
692.4195 +
692.4196 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.4197 +#: ../en/ch02-tour-basic.xml:593
692.4198 +msgid ""
692.4199 +"To set a user name, use your favorite editor to create a file called "
692.4200 +"<filename role=\"special\">.hgrc</filename> in your home directory.  "
692.4201 +"Mercurial will use this file to look up your personalised configuration "
692.4202 +"settings.  The initial contents of your <filename role=\"special\">.hgrc</"
692.4203 +"filename> should look like this."
692.4204 +msgstr ""
692.4205 +
692.4206 +#. type: Content of: <book><chapter><sect1><sect2><sect3><tip><title>
692.4207 +#: ../en/ch02-tour-basic.xml:602
692.4208 +msgid "<quote>Home directory</quote> on Windows"
692.4209 +msgstr ""
692.4210 +
692.4211 +#. type: Content of: <book><chapter><sect1><sect2><sect3><tip><para>
692.4212 +#: ../en/ch02-tour-basic.xml:604
692.4213 +msgid ""
692.4214 +"When we refer to your home directory, on an English language installation of "
692.4215 +"Windows this will usually be a folder named after your user name in "
692.4216 +"<filename>C:\\Documents and Settings</filename>.  You can find out the exact "
692.4217 +"name of your home directory by opening a command prompt window and running "
692.4218 +"the following command."
692.4219 +msgstr ""
692.4220 +
692.4221 +#. type: Content of: <book><chapter><sect1><sect2><sect3><tip><screen><prompt>
692.4222 +#: ../en/ch02-tour-basic.xml:612
692.4223 +msgid "C:\\>"
692.4224 +msgstr "C:\\>"
692.4225 +
692.4226 +#. type: Content of: <book><chapter><sect1><sect2><sect3><tip><screen><userinput>
692.4227 +#: ../en/ch02-tour-basic.xml:612
692.4228 +msgid "echo %UserProfile%"
692.4229 +msgstr "echo %UserProfile%"
692.4230 +
692.4231 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.4232 +#: ../en/ch02-tour-basic.xml:619
692.4233 +msgid ""
692.4234 +"The <quote><literal>[ui]</literal></quote> line begins a <emphasis>section</"
692.4235 +"emphasis> of the config file, so you can read the <quote><literal>username "
692.4236 +"= ...</literal></quote> line as meaning <quote>set the value of the "
692.4237 +"<literal>username</literal> item in the <literal>ui</literal> section</"
692.4238 +"quote>. A section continues until a new section begins, or the end of the "
692.4239 +"file.  Mercurial ignores empty lines and treats any text from "
692.4240 +"<quote><literal>#</literal></quote> to the end of a line as a comment."
692.4241 +msgstr ""
692.4242 +
692.4243 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.4244 +#: ../en/ch02-tour-basic.xml:632
692.4245 +msgid "Choosing a user name"
692.4246 +msgstr "选择用户名称"
692.4247 +
692.4248 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.4249 +#: ../en/ch02-tour-basic.xml:634
692.4250 +msgid ""
692.4251 +"You can use any text you like as the value of the <literal>username</literal> "
692.4252 +"config item, since this information is for reading by other people, but will "
692.4253 +"not be interpreted by Mercurial.  The convention that most people follow is "
692.4254 +"to use their name and email address, as in the example above."
692.4255 +msgstr ""
692.4256 +
692.4257 +#. type: Content of: <book><chapter><sect1><sect2><sect3><note><para>
692.4258 +#: ../en/ch02-tour-basic.xml:641
692.4259 +msgid ""
692.4260 +"Mercurial's built-in web server obfuscates email addresses, to make it more "
692.4261 +"difficult for the email harvesting tools that spammers use. This reduces the "
692.4262 +"likelihood that you'll start receiving more junk email if you publish a "
692.4263 +"Mercurial repository on the web."
692.4264 +msgstr ""
692.4265 +
692.4266 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.4267 +#: ../en/ch02-tour-basic.xml:650
692.4268 +msgid "Writing a commit message"
692.4269 +msgstr "写提交日志"
692.4270 +
692.4271 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4272 +#: ../en/ch02-tour-basic.xml:652
692.4273 +msgid ""
692.4274 +"When we commit a change, Mercurial drops us into a text editor, to enter a "
692.4275 +"message that will describe the modifications we've made in this changeset.  "
692.4276 +"This is called the <emphasis>commit message</emphasis>.  It will be a record "
692.4277 +"for readers of what we did and why, and it will be printed by <command role="
692.4278 +"\"hg-cmd\">hg log</command> after we've finished committing."
692.4279 +msgstr ""
692.4280 +
692.4281 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4282 +#: ../en/ch02-tour-basic.xml:662
692.4283 +msgid ""
692.4284 +"The editor that the <command role=\"hg-cmd\">hg commit</command> command "
692.4285 +"drops us into will contain an empty line or two, followed by a number of "
692.4286 +"lines starting with <quote><literal>HG:</literal></quote>."
692.4287 +msgstr ""
692.4288 +
692.4289 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4290 +#: ../en/ch02-tour-basic.xml:676
692.4291 +msgid ""
692.4292 +"Mercurial ignores the lines that start with <quote><literal>HG:</literal></"
692.4293 +"quote>; it uses them only to tell us which files it's recording changes to.  "
692.4294 +"Modifying or deleting these lines has no effect."
692.4295 +msgstr ""
692.4296 +
692.4297 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.4298 +#: ../en/ch02-tour-basic.xml:682
692.4299 +msgid "Writing a good commit message"
692.4300 +msgstr "写好提交日志"
692.4301 +
692.4302 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4303 +#: ../en/ch02-tour-basic.xml:684
692.4304 +msgid ""
692.4305 +"Since <command role=\"hg-cmd\">hg log</command> only prints the first line of "
692.4306 +"a commit message by default, it's best to write a commit message whose first "
692.4307 +"line stands alone.  Here's a real example of a commit message that "
692.4308 +"<emphasis>doesn't</emphasis> follow this guideline, and hence has a summary "
692.4309 +"that is not readable."
692.4310 +msgstr ""
692.4311 +
692.4312 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4313 +#: ../en/ch02-tour-basic.xml:697
692.4314 +msgid ""
692.4315 +"As far as the remainder of the contents of the commit message are concerned, "
692.4316 +"there are no hard-and-fast rules.  Mercurial itself doesn't interpret or care "
692.4317 +"about the contents of the commit message, though your project may have "
692.4318 +"policies that dictate a certain kind of formatting."
692.4319 +msgstr ""
692.4320 +
692.4321 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4322 +#: ../en/ch02-tour-basic.xml:702
692.4323 +msgid ""
692.4324 +"My personal preference is for short, but informative, commit messages that "
692.4325 +"tell me something that I can't figure out with a quick glance at the output "
692.4326 +"of <command role=\"hg-cmd\">hg log --patch</command>."
692.4327 +msgstr ""
692.4328 +
692.4329 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4330 +#: ../en/ch02-tour-basic.xml:706
692.4331 +msgid ""
692.4332 +"If we run the <command role=\"hg-cmd\">hg commit</command> command without "
692.4333 +"any arguments, it records all of the changes we've made, as reported by "
692.4334 +"<command role=\"hg-cmd\">hg status</command> and <command role=\"hg-cmd\">hg "
692.4335 +"diff</command>."
692.4336 +msgstr ""
692.4337 +
692.4338 +#. type: Content of: <book><chapter><sect1><sect2><note><title>
692.4339 +#: ../en/ch02-tour-basic.xml:713
692.4340 +msgid "A surprise for Subversion users"
692.4341 +msgstr ""
692.4342 +
692.4343 +#. type: Content of: <book><chapter><sect1><sect2><note><para>
692.4344 +#: ../en/ch02-tour-basic.xml:715
692.4345 +msgid ""
692.4346 +"Like other Mercurial commands, if we don't supply explicit names to commit to "
692.4347 +"the <command role=\"hg-cmd\">hg commit</command>, it will operate across a "
692.4348 +"repository's entire working directory.  Be wary of this if you're coming from "
692.4349 +"the Subversion or CVS world, since you might expect it to operate only on the "
692.4350 +"current directory that you happen to be visiting and its subdirectories."
692.4351 +msgstr ""
692.4352 +
692.4353 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.4354 +#: ../en/ch02-tour-basic.xml:726
692.4355 +msgid "Aborting a commit"
692.4356 +msgstr "终止提交"
692.4357 +
692.4358 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4359 +#: ../en/ch02-tour-basic.xml:728
692.4360 +msgid ""
692.4361 +"If you decide that you don't want to commit while in the middle of editing a "
692.4362 +"commit message, simply exit from your editor without saving the file that "
692.4363 +"it's editing.  This will cause nothing to happen to either the repository or "
692.4364 +"the working directory."
692.4365 +msgstr ""
692.4366 +
692.4367 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.4368 +#: ../en/ch02-tour-basic.xml:736
692.4369 +msgid "Admiring our new handiwork"
692.4370 +msgstr "欣赏我们的成果"
692.4371 +
692.4372 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4373 +#: ../en/ch02-tour-basic.xml:738
692.4374 +msgid ""
692.4375 +"Once we've finished the commit, we can use the <command role=\"hg-cmd\">hg "
692.4376 +"tip</command> command to display the changeset we just created.  This command "
692.4377 +"produces output that is identical to <command role=\"hg-cmd\">hg log</"
692.4378 +"command>, but it only displays the newest revision in the repository."
692.4379 +msgstr ""
692.4380 +
692.4381 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4382 +#: ../en/ch02-tour-basic.xml:746
692.4383 +msgid ""
692.4384 +"We refer to the newest revision in the repository as the <emphasis>tip "
692.4385 +"revision</emphasis>, or simply the <emphasis>tip</emphasis>."
692.4386 +msgstr ""
692.4387 +
692.4388 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4389 +#: ../en/ch02-tour-basic.xml:750
692.4390 +msgid ""
692.4391 +"By the way, the <command role=\"hg-cmd\">hg tip</command> command accepts "
692.4392 +"many of the same options as <command role=\"hg-cmd\">hg log</command>, so "
692.4393 +"<option role=\"hg-opt-global\">-v</option> above indicates <quote>be verbose</"
692.4394 +"quote>, <option role=\"hg-opt-tip\">-p</option> specifies <quote>print a "
692.4395 +"patch</quote>.  The use of <option role=\"hg-opt-tip\">-p</option> to print "
692.4396 +"patches is another example of the consistent naming we mentioned earlier."
692.4397 +msgstr ""
692.4398 +
692.4399 +#. type: Content of: <book><chapter><sect1><title>
692.4400 +#: ../en/ch02-tour-basic.xml:762
692.4401 +msgid "Sharing changes"
692.4402 +msgstr "共享修改"
692.4403 +
692.4404 +#. type: Content of: <book><chapter><sect1><para>
692.4405 +#: ../en/ch02-tour-basic.xml:764
692.4406 +msgid ""
692.4407 +"We mentioned earlier that repositories in Mercurial are self-contained.  This "
692.4408 +"means that the changeset we just created exists only in our <filename class="
692.4409 +"\"directory\">my-hello</filename> repository.  Let's look at a few ways that "
692.4410 +"we can propagate this change into other repositories."
692.4411 +msgstr ""
692.4412 +
692.4413 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.4414 +#: ../en/ch02-tour-basic.xml:772
692.4415 +msgid "Pulling changes from another repository"
692.4416 +msgstr "从其它版本库取得修改"
692.4417 +
692.4418 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4419 +#: ../en/ch02-tour-basic.xml:774
692.4420 +msgid ""
692.4421 +"To get started, let's clone our original <filename class=\"directory\">hello</"
692.4422 +"filename> repository, which does not contain the change we just committed.  "
692.4423 +"We'll call our temporary repository <filename class=\"directory\">hello-pull</"
692.4424 +"filename>."
692.4425 +msgstr ""
692.4426 +
692.4427 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4428 +#: ../en/ch02-tour-basic.xml:782
692.4429 +msgid ""
692.4430 +"We'll use the <command role=\"hg-cmd\">hg pull</command> command to bring "
692.4431 +"changes from <filename class=\"directory\">my-hello</filename> into <filename "
692.4432 +"class=\"directory\">hello-pull</filename>.  However, blindly pulling unknown "
692.4433 +"changes into a repository is a somewhat scary prospect.  Mercurial provides "
692.4434 +"the <command role=\"hg-cmd\">hg incoming</command> command to tell us what "
692.4435 +"changes the <command role=\"hg-cmd\">hg pull</command> command "
692.4436 +"<emphasis>would</emphasis> pull into the repository, without actually pulling "
692.4437 +"the changes in."
692.4438 +msgstr ""
692.4439 +
692.4440 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4441 +#: ../en/ch02-tour-basic.xml:795
692.4442 +msgid ""
692.4443 +"Bringing changes into a repository is a simple matter of running the <command "
692.4444 +"role=\"hg-cmd\">hg pull</command> command, and optionally telling it which "
692.4445 +"repository to pull from."
692.4446 +msgstr ""
692.4447 +
692.4448 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4449 +#: ../en/ch02-tour-basic.xml:801
692.4450 +msgid ""
692.4451 +"As you can see from the before-and-after output of <command role=\"hg-cmd"
692.4452 +"\">hg tip</command>, we have successfully pulled changes into our "
692.4453 +"repository.  However, Mercurial separates pulling changes in from updating "
692.4454 +"the working directory. There remains one step before we will see the changes "
692.4455 +"that we just pulled appear in the working directory."
692.4456 +msgstr ""
692.4457 +
692.4458 +#. type: Content of: <book><chapter><sect1><sect2><tip><title>
692.4459 +#: ../en/ch02-tour-basic.xml:810
692.4460 +msgid "Pulling specific changes"
692.4461 +msgstr "提取指定的修改"
692.4462 +
692.4463 +#. type: Content of: <book><chapter><sect1><sect2><tip><para>
692.4464 +#: ../en/ch02-tour-basic.xml:812
692.4465 +msgid ""
692.4466 +"It is possible that due to the delay between running <command role=\"hg-cmd"
692.4467 +"\">hg incoming</command> and <command role=\"hg-cmd\">hg pull</command>, you "
692.4468 +"may not see all changesets that will be brought from the other repository. "
692.4469 +"Suppose you're pulling changes from a repository on the network somewhere. "
692.4470 +"While you are looking at the <command role=\"hg-cmd\">hg incoming</command> "
692.4471 +"output, and before you pull those changes, someone might have committed "
692.4472 +"something in the remote repository. This means that it's possible to pull "
692.4473 +"more changes than you saw when using <command role=\"hg-cmd\">hg incoming</"
692.4474 +"command>."
692.4475 +msgstr ""
692.4476 +
692.4477 +#. type: Content of: <book><chapter><sect1><sect2><tip><para>
692.4478 +#: ../en/ch02-tour-basic.xml:824
692.4479 +msgid ""
692.4480 +"If you only want to pull precisely the changes that were listed by <command "
692.4481 +"role=\"hg-cmd\">hg incoming</command>, or you have some other reason to pull "
692.4482 +"a subset of changes, simply identify the change that you want to pull by its "
692.4483 +"changeset ID, e.g. <command>hg pull -r7e95bb</command>."
692.4484 +msgstr ""
692.4485 +
692.4486 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.4487 +#: ../en/ch02-tour-basic.xml:834
692.4488 +msgid "Updating the working directory"
692.4489 +msgstr "更新工作目录"
692.4490 +
692.4491 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4492 +#: ../en/ch02-tour-basic.xml:836
692.4493 +msgid ""
692.4494 +"We have so far glossed over the relationship between a repository and its "
692.4495 +"working directory.  The <command role=\"hg-cmd\">hg pull</command> command "
692.4496 +"that we ran in <xref linkend=\"sec:tour:pull\"/> brought changes into the "
692.4497 +"repository, but if we check, there's no sign of those changes in the working "
692.4498 +"directory.  This is because <command role=\"hg-cmd\">hg pull</command> does "
692.4499 +"not (by default) touch the working directory.  Instead, we use the <command "
692.4500 +"role=\"hg-cmd\">hg update</command> command to do this."
692.4501 +msgstr ""
692.4502 +
692.4503 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4504 +#: ../en/ch02-tour-basic.xml:848
692.4505 +msgid ""
692.4506 +"It might seem a bit strange that <command role=\"hg-cmd\">hg pull</command> "
692.4507 +"doesn't update the working directory automatically.  There's actually a good "
692.4508 +"reason for this: you can use <command role=\"hg-cmd\">hg update</command> to "
692.4509 +"update the working directory to the state it was in at <emphasis>any "
692.4510 +"revision</emphasis> in the history of the repository.  If you had the working "
692.4511 +"directory updated to an old revision&emdash;to hunt down the origin of a bug, "
692.4512 +"say&emdash;and ran a <command role=\"hg-cmd\">hg pull</command> which "
692.4513 +"automatically updated the working directory to a new revision, you might not "
692.4514 +"be terribly happy."
692.4515 +msgstr ""
692.4516 +
692.4517 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4518 +#: ../en/ch02-tour-basic.xml:860
692.4519 +msgid ""
692.4520 +"Since pull-then-update is such a common sequence of operations, Mercurial "
692.4521 +"lets you combine the two by passing the <option role=\"hg-opt-pull\">-u</"
692.4522 +"option> option to <command role=\"hg-cmd\">hg pull</command>."
692.4523 +msgstr ""
692.4524 +
692.4525 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4526 +#: ../en/ch02-tour-basic.xml:865
692.4527 +msgid ""
692.4528 +"If you look back at the output of <command role=\"hg-cmd\">hg pull</command> "
692.4529 +"in <xref linkend=\"sec:tour:pull\"/> when we ran it without <option role=\"hg-"
692.4530 +"opt-pull\">-u</option>, you can see that it printed a helpful reminder that "
692.4531 +"we'd have to take an explicit step to update the working directory."
692.4532 +msgstr ""
692.4533 +
692.4534 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4535 +#: ../en/ch02-tour-basic.xml:872
692.4536 +msgid ""
692.4537 +"To find out what revision the working directory is at, use the <command role="
692.4538 +"\"hg-cmd\">hg parents</command> command."
692.4539 +msgstr ""
692.4540 +
692.4541 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4542 +#: ../en/ch02-tour-basic.xml:878
692.4543 +msgid ""
692.4544 +"If you look back at <xref linkend=\"fig:tour-basic:history\"/>, you'll see "
692.4545 +"arrows connecting each changeset.  The node that the arrow leads "
692.4546 +"<emphasis>from</emphasis> in each case is a parent, and the node that the "
692.4547 +"arrow leads <emphasis>to</emphasis> is its child.  The working directory has "
692.4548 +"a parent in just the same way; this is the changeset that the working "
692.4549 +"directory currently contains."
692.4550 +msgstr ""
692.4551 +
692.4552 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4553 +#: ../en/ch02-tour-basic.xml:887
692.4554 +msgid ""
692.4555 +"To update the working directory to a particular revision, give a revision "
692.4556 +"number or changeset ID to the <command role=\"hg-cmd\">hg update</command> "
692.4557 +"command."
692.4558 +msgstr ""
692.4559 +
692.4560 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4561 +#: ../en/ch02-tour-basic.xml:893
692.4562 +msgid ""
692.4563 +"If you omit an explicit revision, <command role=\"hg-cmd\">hg update</"
692.4564 +"command> will update to the tip revision, as shown by the second call to "
692.4565 +"<command role=\"hg-cmd\">hg update</command> in the example above."
692.4566 +msgstr ""
692.4567 +
692.4568 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.4569 +#: ../en/ch02-tour-basic.xml:901
692.4570 +msgid "Pushing changes to another repository"
692.4571 +msgstr "发布修改到其它版本库"
692.4572 +
692.4573 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4574 +#: ../en/ch02-tour-basic.xml:903
692.4575 +msgid ""
692.4576 +"Mercurial lets us push changes to another repository, from the repository "
692.4577 +"we're currently visiting. As with the example of <command role=\"hg-cmd\">hg "
692.4578 +"pull</command> above, we'll create a temporary repository to push our changes "
692.4579 +"into."
692.4580 +msgstr ""
692.4581 +
692.4582 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4583 +#: ../en/ch02-tour-basic.xml:911
692.4584 +msgid ""
692.4585 +"The <command role=\"hg-cmd\">hg outgoing</command> command tells us what "
692.4586 +"changes would be pushed into another repository."
692.4587 +msgstr ""
692.4588 +
692.4589 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4590 +#: ../en/ch02-tour-basic.xml:917
692.4591 +msgid ""
692.4592 +"And the <command role=\"hg-cmd\">hg push</command> command does the actual "
692.4593 +"push."
692.4594 +msgstr ""
692.4595 +
692.4596 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4597 +#: ../en/ch02-tour-basic.xml:922
692.4598 +msgid ""
692.4599 +"As with <command role=\"hg-cmd\">hg pull</command>, the <command role=\"hg-cmd"
692.4600 +"\">hg push</command> command does not update the working directory in the "
692.4601 +"repository that it's pushing changes into. Unlike <command role=\"hg-cmd\">hg "
692.4602 +"pull</command>, <command role=\"hg-cmd\">hg push</command> does not provide a "
692.4603 +"<literal>-u</literal> option that updates the other repository's working "
692.4604 +"directory.  This asymmetry is deliberate: the repository we're pushing to "
692.4605 +"might be on a remote server and shared between several people.  If we were to "
692.4606 +"update its working directory while someone was working in it, their work "
692.4607 +"would be disrupted."
692.4608 +msgstr ""
692.4609 +
692.4610 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4611 +#: ../en/ch02-tour-basic.xml:934
692.4612 +msgid ""
692.4613 +"What happens if we try to pull or push changes and the receiving repository "
692.4614 +"already has those changes? Nothing too exciting."
692.4615 +msgstr ""
692.4616 +
692.4617 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.4618 +#: ../en/ch02-tour-basic.xml:942
692.4619 +msgid "Default locations"
692.4620 +msgstr "默认位置"
692.4621 +
692.4622 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4623 +#: ../en/ch02-tour-basic.xml:944
692.4624 +msgid ""
692.4625 +"When we clone a repository, Mercurial records the location of the repository "
692.4626 +"we cloned in the <filename>.hg/hgrc</filename> file of the new repository.  "
692.4627 +"If we don't supply a location to <command>hg pull</command> from or "
692.4628 +"<command>hg push</command> to, those commands will use this location as a "
692.4629 +"default.  The <command>hg incoming</command> and <command>hg outgoing</"
692.4630 +"command> commands do so too."
692.4631 +msgstr ""
692.4632 +
692.4633 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4634 +#: ../en/ch02-tour-basic.xml:952
692.4635 +msgid ""
692.4636 +"If you open a repository's <filename>.hg/hgrc</filename> file in a text "
692.4637 +"editor, you will see contents like the following."
692.4638 +msgstr ""
692.4639 +
692.4640 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4641 +#: ../en/ch02-tour-basic.xml:959
692.4642 +msgid ""
692.4643 +"It is possible&emdash;and often useful&emdash;to have the default location "
692.4644 +"for <command>hg push</command> and <command>hg outgoing</command> be "
692.4645 +"different from those for <command>hg pull</command> and <command>hg incoming</"
692.4646 +"command>.  We can do this by adding a <literal>default-push</literal> entry "
692.4647 +"to the <literal>[paths]</literal> section of the <filename>.hg/hgrc</"
692.4648 +"filename> file, as follows."
692.4649 +msgstr ""
692.4650 +
692.4651 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.4652 +#: ../en/ch02-tour-basic.xml:973
692.4653 +msgid "Sharing changes over a network"
692.4654 +msgstr "通过网络共享修改"
692.4655 +
692.4656 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4657 +#: ../en/ch02-tour-basic.xml:975
692.4658 +msgid ""
692.4659 +"The commands we have covered in the previous few sections are not limited to "
692.4660 +"working with local repositories.  Each works in exactly the same fashion over "
692.4661 +"a network connection; simply pass in a URL instead of a local path."
692.4662 +msgstr ""
692.4663 +
692.4664 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4665 +#: ../en/ch02-tour-basic.xml:983
692.4666 +msgid ""
692.4667 +"In this example, we can see what changes we could push to the remote "
692.4668 +"repository, but the repository is understandably not set up to let anonymous "
692.4669 +"users push to it."
692.4670 +msgstr ""
692.4671 +
692.4672 +#. type: Content of: <book><chapter><sect1><title>
692.4673 +#: ../en/ch02-tour-basic.xml:993
692.4674 +msgid "Starting a new project"
692.4675 +msgstr "开始新项目"
692.4676 +
692.4677 +#. type: Content of: <book><chapter><sect1><para>
692.4678 +#: ../en/ch02-tour-basic.xml:995
692.4679 +msgid ""
692.4680 +"It is just as easy to begin a new project as to work on one that already "
692.4681 +"exists.  The <command>hg init</command> command creates a new, empty "
692.4682 +"Mercurial repository."
692.4683 +msgstr ""
692.4684 +
692.4685 +#. type: Content of: <book><chapter><sect1><para>
692.4686 +#: ../en/ch02-tour-basic.xml:1001
692.4687 +msgid ""
692.4688 +"This simply creates a repository named <filename>myproject</filename> in the "
692.4689 +"current directory."
692.4690 +msgstr ""
692.4691 +
692.4692 +#. type: Content of: <book><chapter><sect1><para>
692.4693 +#: ../en/ch02-tour-basic.xml:1006
692.4694 +msgid ""
692.4695 +"We can tell that <filename>myproject</filename> is a Mercurial repository, "
692.4696 +"because it contains a <filename>.hg</filename> directory."
692.4697 +msgstr ""
692.4698 +
692.4699 +#. type: Content of: <book><chapter><sect1><para>
692.4700 +#: ../en/ch02-tour-basic.xml:1012
692.4701 +msgid ""
692.4702 +"If we want to add some pre-existing files to the repository, we copy them "
692.4703 +"into place, and tell Mercurial to start tracking them using the <command>hg "
692.4704 +"add</command> command."
692.4705 +msgstr ""
692.4706 +
692.4707 +#. type: Content of: <book><chapter><sect1><para>
692.4708 +#: ../en/ch02-tour-basic.xml:1018
692.4709 +msgid ""
692.4710 +"Once we are satisfied that our project looks right, we commit our changes."
692.4711 +msgstr ""
692.4712 +
692.4713 +#. type: Content of: <book><chapter><sect1><para>
692.4714 +#: ../en/ch02-tour-basic.xml:1023
692.4715 +msgid ""
692.4716 +"It takes just a few moments to start using Mercurial on a new project, which "
692.4717 +"is part of its appeal. Revision control is now so easy to work with, we can "
692.4718 +"use it on the smallest of projects that we might not have considered with a "
692.4719 +"more complicated tool."
692.4720 +msgstr ""
692.4721 +
692.4722 +#. type: Content of: <book><chapter><title>
692.4723 +#: ../en/ch03-tour-merge.xml:5
692.4724 +msgid "A tour of Mercurial: merging work"
692.4725 +msgstr "Mercurial 教程: 合并工作"
692.4726 +
692.4727 +#. type: Content of: <book><chapter><para>
692.4728 +#: ../en/ch03-tour-merge.xml:7
692.4729 +msgid ""
692.4730 +"We've now covered cloning a repository, making changes in a repository, and "
692.4731 +"pulling or pushing changes from one repository into another.  Our next step "
692.4732 +"is <emphasis>merging</emphasis> changes from separate repositories."
692.4733 +msgstr ""
692.4734 +
692.4735 +#. type: Content of: <book><chapter><sect1><title>
692.4736 +#: ../en/ch03-tour-merge.xml:13
692.4737 +msgid "Merging streams of work"
692.4738 +msgstr "合并的流程"
692.4739 +
692.4740 +#. type: Content of: <book><chapter><sect1><para>
692.4741 +#: ../en/ch03-tour-merge.xml:15
692.4742 +msgid ""
692.4743 +"Merging is a fundamental part of working with a distributed revision control "
692.4744 +"tool.  Here are a few cases in which the need to merge work arises."
692.4745 +msgstr ""
692.4746 +
692.4747 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.4748 +#: ../en/ch03-tour-merge.xml:20
692.4749 +msgid ""
692.4750 +"Alice and Bob each have a personal copy of a repository for a project they're "
692.4751 +"collaborating on.  Alice fixes a bug in her repository; Bob adds a new "
692.4752 +"feature in his.  They want the shared repository to contain both the bug fix "
692.4753 +"and the new feature."
692.4754 +msgstr ""
692.4755 +
692.4756 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.4757 +#: ../en/ch03-tour-merge.xml:27
692.4758 +msgid ""
692.4759 +"Cynthia frequently works on several different tasks for a single project at "
692.4760 +"once, each safely isolated in its own repository. Working this way means that "
692.4761 +"she often needs to merge one piece of her own work with another."
692.4762 +msgstr ""
692.4763 +
692.4764 +#. type: Content of: <book><chapter><sect1><para>
692.4765 +#: ../en/ch03-tour-merge.xml:35
692.4766 +msgid ""
692.4767 +"Because we need to merge often, Mercurial makes the process easy.  Let's walk "
692.4768 +"through a merge.  We'll begin by cloning yet another repository (see how "
692.4769 +"often they spring up?)  and making a change in it."
692.4770 +msgstr ""
692.4771 +
692.4772 +#. type: Content of: <book><chapter><sect1><para>
692.4773 +#: ../en/ch03-tour-merge.xml:42
692.4774 +msgid ""
692.4775 +"We should now have two copies of <filename>hello.c</filename> with different "
692.4776 +"contents.  The histories of the two repositories have also diverged, as "
692.4777 +"illustrated in <xref linkend=\"fig:tour-merge:sep-repos\"/>.  Here is a copy "
692.4778 +"of our file from one repository."
692.4779 +msgstr ""
692.4780 +
692.4781 +#. type: Content of: <book><chapter><sect1><para>
692.4782 +#: ../en/ch03-tour-merge.xml:51
692.4783 +msgid "And here is our slightly different version from the other repository."
692.4784 +msgstr ""
692.4785 +
692.4786 +#. type: Content of: <book><chapter><sect1><figure><title>
692.4787 +#: ../en/ch03-tour-merge.xml:57
692.4788 +msgid ""
692.4789 +"Divergent recent histories of the <filename class=\"directory\">my-hello</"
692.4790 +"filename> and <filename class=\"directory\">my-new-hello</filename> "
692.4791 +"repositories"
692.4792 +msgstr ""
692.4793 +"<filename class=\"directory\">my-hello</filename> 与 <filename class="
692.4794 +"\"directory\">my-new-hello</filename> 最新的历史分叉"
692.4795 +
692.4796 +#. type: Content of: <book><chapter><sect1><figure><mediaobject>
692.4797 +#: ../en/ch03-tour-merge.xml:62
692.4798 +msgid ""
692.4799 +"<imageobject><imagedata fileref=\"figs/tour-merge-sep-repos.png\"/></"
692.4800 +"imageobject>"
692.4801 +msgstr ""
692.4802 +
692.4803 +#. type: Content of: <book><chapter><sect1><para>
692.4804 +#: ../en/ch03-tour-merge.xml:67
692.4805 +msgid ""
692.4806 +"We already know that pulling changes from our <filename class=\"directory"
692.4807 +"\">my-hello</filename> repository will have no effect on the working "
692.4808 +"directory."
692.4809 +msgstr ""
692.4810 +
692.4811 +#. type: Content of: <book><chapter><sect1><para>
692.4812 +#: ../en/ch03-tour-merge.xml:73
692.4813 +msgid ""
692.4814 +"However, the <command role=\"hg-cmd\">hg pull</command> command says "
692.4815 +"something about <quote>heads</quote>."
692.4816 +msgstr ""
692.4817 +
692.4818 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.4819 +#: ../en/ch03-tour-merge.xml:77
692.4820 +msgid "Head changesets"
692.4821 +msgstr "顶点修改集"
692.4822 +
692.4823 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4824 +#: ../en/ch03-tour-merge.xml:79
692.4825 +msgid ""
692.4826 +"Remember that Mercurial records what the parent of each change is.  If a "
692.4827 +"change has a parent, we call it a child or descendant of the parent.  A head "
692.4828 +"is a change that has no children.  The tip revision is thus a head, because "
692.4829 +"the newest revision in a repository doesn't have any children.  There are "
692.4830 +"times when a repository can contain more than one head."
692.4831 +msgstr ""
692.4832 +
692.4833 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.4834 +#: ../en/ch03-tour-merge.xml:88
692.4835 +msgid ""
692.4836 +"Repository contents after pulling from <filename class=\"directory\">my-"
692.4837 +"hello</filename> into <filename class=\"directory\">my-new-hello</filename>"
692.4838 +msgstr ""
692.4839 +"从 <filename class=\"directory\">my-hello</filename> 拉到 <filename class="
692.4840 +"\"directory\">my-new-hello</filename> 之后版本库的内容"
692.4841 +
692.4842 +#. type: Content of: <book><chapter><sect1><sect2><figure>
692.4843 +#: ../en/ch03-tour-merge.xml:91 ../en/ch03-tour-merge.xml:178
692.4844 +#: ../en/ch03-tour-merge.xml:275 ../en/ch04-concepts.xml:57
692.4845 +#: ../en/ch04-concepts.xml:106 ../en/ch04-concepts.xml:196
692.4846 +#: ../en/ch04-concepts.xml:345 ../en/ch04-concepts.xml:360
692.4847 +#: ../en/ch04-concepts.xml:401 ../en/ch04-concepts.xml:421
692.4848 +#: ../en/ch04-concepts.xml:465 ../en/ch06-collab.xml:314
692.4849 +#: ../en/ch09-undo.xml:342 ../en/ch09-undo.xml:389 ../en/ch09-undo.xml:462
692.4850 +#: ../en/ch09-undo.xml:500 ../en/ch09-undo.xml:656 ../en/ch09-undo.xml:680
692.4851 +#: ../en/ch09-undo.xml:698 ../en/ch09-undo.xml:712 ../en/ch09-undo.xml:725
692.4852 +#: ../en/ch12-mq.xml:411
692.4853 +msgid "  <placeholder type=\"mediaobject\" id=\"0\"/>"
692.4854 +msgstr ""
692.4855 +
692.4856 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.4857 +#: ../en/ch03-tour-merge.xml:92
692.4858 +msgid ""
692.4859 +"<imageobject> <imagedata fileref=\"figs/tour-merge-pull.png\"/> </imageobject>"
692.4860 +msgstr ""
692.4861 +
692.4862 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4863 +#: ../en/ch03-tour-merge.xml:99
692.4864 +msgid ""
692.4865 +"In <xref linkend=\"fig:tour-merge:pull\"/>, you can see the effect of the "
692.4866 +"pull from <filename class=\"directory\">my-hello</filename> into <filename "
692.4867 +"class=\"directory\">my-new-hello</filename>.  The history that was already "
692.4868 +"present in <filename class=\"directory\">my-new-hello</filename> is "
692.4869 +"untouched, but a new revision has been added.  By referring to <xref linkend="
692.4870 +"\"fig:tour-merge:sep-repos\"/>, we can see that the <emphasis>changeset ID</"
692.4871 +"emphasis> remains the same in the new repository, but the <emphasis>revision "
692.4872 +"number</emphasis> has changed.  (This, incidentally, is a fine example of why "
692.4873 +"it's not safe to use revision numbers when discussing changesets.)  We can "
692.4874 +"view the heads in a repository using the <command role=\"hg-cmd\">hg heads</"
692.4875 +"command> command."
692.4876 +msgstr ""
692.4877 +
692.4878 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.4879 +#: ../en/ch03-tour-merge.xml:118
692.4880 +msgid "Performing the merge"
692.4881 +msgstr "执行合并"
692.4882 +
692.4883 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4884 +#: ../en/ch03-tour-merge.xml:120
692.4885 +msgid ""
692.4886 +"What happens if we try to use the normal <command role=\"hg-cmd\">hg update</"
692.4887 +"command> command to update to the new tip?"
692.4888 +msgstr ""
692.4889 +
692.4890 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4891 +#: ../en/ch03-tour-merge.xml:126
692.4892 +msgid ""
692.4893 +"Mercurial is telling us that the <command role=\"hg-cmd\">hg update</command> "
692.4894 +"command won't do a merge; it won't update the working directory when it "
692.4895 +"thinks we might want to do a merge, unless we force it to do so.  "
692.4896 +"(Incidentally, forcing the update with <command>hg update -C</command> would "
692.4897 +"revert any uncommitted changes in the working directory.)"
692.4898 +msgstr ""
692.4899 +
692.4900 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4901 +#: ../en/ch03-tour-merge.xml:134
692.4902 +msgid ""
692.4903 +"To start a merge between the two heads, we use the <command role=\"hg-cmd"
692.4904 +"\">hg merge</command> command."
692.4905 +msgstr ""
692.4906 +"我们使用 <command role=\"hg-cmd\">hg merge</command> 命令来合并两个顶点。"
692.4907 +
692.4908 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4909 +#: ../en/ch03-tour-merge.xml:139
692.4910 +msgid ""
692.4911 +"We resolve the contents of <filename>hello.c</filename> This updates the "
692.4912 +"working directory so that it contains changes from <emphasis>both</emphasis> "
692.4913 +"heads, which is reflected in both the output of <command role=\"hg-cmd\">hg "
692.4914 +"parents</command> and the contents of <filename>hello.c</filename>."
692.4915 +msgstr ""
692.4916 +
692.4917 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.4918 +#: ../en/ch03-tour-merge.xml:151
692.4919 +msgid "Committing the results of the merge"
692.4920 +msgstr "提交合并结果"
692.4921 +
692.4922 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4923 +#: ../en/ch03-tour-merge.xml:153
692.4924 +msgid ""
692.4925 +"Whenever we've done a merge, <command role=\"hg-cmd\">hg parents</command> "
692.4926 +"will display two parents until we <command role=\"hg-cmd\">hg commit</"
692.4927 +"command> the results of the merge."
692.4928 +msgstr ""
692.4929 +
692.4930 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4931 +#: ../en/ch03-tour-merge.xml:160
692.4932 +msgid ""
692.4933 +"We now have a new tip revision; notice that it has <emphasis>both</emphasis> "
692.4934 +"of our former heads as its parents.  These are the same revisions that were "
692.4935 +"previously displayed by <command role=\"hg-cmd\">hg parents</command>."
692.4936 +msgstr ""
692.4937 +
692.4938 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4939 +#: ../en/ch03-tour-merge.xml:167
692.4940 +msgid ""
692.4941 +"In <xref linkend=\"fig:tour-merge:merge\"/>, you can see a representation of "
692.4942 +"what happens to the working directory during the merge, and how this affects "
692.4943 +"the repository when the commit happens.  During the merge, the working "
692.4944 +"directory has two parent changesets, and these become the parents of the new "
692.4945 +"changeset."
692.4946 +msgstr ""
692.4947 +
692.4948 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.4949 +#: ../en/ch03-tour-merge.xml:176
692.4950 +msgid "Working directory and repository during merge, and following commit"
692.4951 +msgstr "在合并期间,以及提交之后的工作目录与版本库"
692.4952 +
692.4953 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.4954 +#: ../en/ch03-tour-merge.xml:179
692.4955 +msgid ""
692.4956 +"<imageobject> <imagedata fileref=\"figs/tour-merge-merge.png\"/> </"
692.4957 +"imageobject>"
692.4958 +msgstr ""
692.4959 +
692.4960 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.4961 +#: ../en/ch03-tour-merge.xml:186
692.4962 +msgid ""
692.4963 +"We sometimes talk about a merge having <emphasis>sides</emphasis>: the left "
692.4964 +"side is the first parent in the output of <command role=\"hg-cmd\">hg "
692.4965 +"parents</command>, and the right side is the second.  If the working "
692.4966 +"directory was at e.g. revision 5 before we began a merge, that revision will "
692.4967 +"become the left side of the merge."
692.4968 +msgstr ""
692.4969 +
692.4970 +#. type: Content of: <book><chapter><sect1><title>
692.4971 +#: ../en/ch03-tour-merge.xml:196
692.4972 +msgid "Merging conflicting changes"
692.4973 +msgstr "合并有冲突的改变"
692.4974 +
692.4975 +#. type: Content of: <book><chapter><sect1><para>
692.4976 +#: ../en/ch03-tour-merge.xml:198
692.4977 +msgid ""
692.4978 +"Most merges are simple affairs, but sometimes you'll find yourself merging "
692.4979 +"changes where each side modifies the same portions of the same files.  Unless "
692.4980 +"both modifications are identical, this results in a <emphasis>conflict</"
692.4981 +"emphasis>, where you have to decide how to reconcile the different changes "
692.4982 +"into something coherent."
692.4983 +msgstr ""
692.4984 +
692.4985 +#. type: Content of: <book><chapter><sect1><figure><title>
692.4986 +#: ../en/ch03-tour-merge.xml:206
692.4987 +msgid "Conflicting changes to a document"
692.4988 +msgstr "冲突的修改"
692.4989 +
692.4990 +#. type: Content of: <book><chapter><sect1><figure><mediaobject>
692.4991 +#: ../en/ch03-tour-merge.xml:208
692.4992 +msgid ""
692.4993 +"<imageobject><imagedata fileref=\"figs/tour-merge-conflict.png\"/></"
692.4994 +"imageobject>"
692.4995 +msgstr ""
692.4996 +
692.4997 +#. type: Content of: <book><chapter><sect1><para>
692.4998 +#: ../en/ch03-tour-merge.xml:213
692.4999 +msgid ""
692.5000 +"<xref linkend=\"fig:tour-merge:conflict\"/> illustrates an instance of two "
692.5001 +"conflicting changes to a document.  We started with a single version of the "
692.5002 +"file; then we made some changes; while someone else made different changes to "
692.5003 +"the same text.  Our task in resolving the conflicting changes is to decide "
692.5004 +"what the file should look like."
692.5005 +msgstr ""
692.5006 +
692.5007 +#. type: Content of: <book><chapter><sect1><para>
692.5008 +#: ../en/ch03-tour-merge.xml:220
692.5009 +msgid ""
692.5010 +"Mercurial doesn't have a built-in facility for handling conflicts. Instead, "
692.5011 +"it runs an external program, usually one that displays some kind of graphical "
692.5012 +"conflict resolution interface.  By default, Mercurial tries to find one of "
692.5013 +"several different merging tools that are likely to be installed on your "
692.5014 +"system.  It first tries a few fully automatic merging tools; if these don't "
692.5015 +"succeed (because the resolution process requires human guidance) or aren't "
692.5016 +"present, it tries a few different graphical merging tools."
692.5017 +msgstr ""
692.5018 +
692.5019 +#. type: Content of: <book><chapter><sect1><para>
692.5020 +#: ../en/ch03-tour-merge.xml:230
692.5021 +msgid ""
692.5022 +"It's also possible to get Mercurial to run a specific program or script, by "
692.5023 +"setting the <envar>HGMERGE</envar> environment variable to the name of your "
692.5024 +"preferred program."
692.5025 +msgstr ""
692.5026 +
692.5027 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5028 +#: ../en/ch03-tour-merge.xml:236
692.5029 +msgid "Using a graphical merge tool"
692.5030 +msgstr "使用图形合并工具"
692.5031 +
692.5032 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5033 +#: ../en/ch03-tour-merge.xml:238
692.5034 +msgid ""
692.5035 +"My preferred graphical merge tool is <command>kdiff3</command>, which I'll "
692.5036 +"use to describe the features that are common to graphical file merging "
692.5037 +"tools.  You can see a screenshot of <command>kdiff3</command> in action in "
692.5038 +"<xref linkend=\"fig:tour-merge:kdiff3\"/>.  The kind of merge it is "
692.5039 +"performing is called a <emphasis>three-way merge</emphasis>, because there "
692.5040 +"are three different versions of the file of interest to us.  The tool thus "
692.5041 +"splits the upper portion of the window into three panes:"
692.5042 +msgstr ""
692.5043 +
692.5044 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.5045 +#: ../en/ch03-tour-merge.xml:248
692.5046 +msgid ""
692.5047 +"At the left is the <emphasis>base</emphasis> version of the file, i.e. the "
692.5048 +"most recent version from which the two versions we're trying to merge are "
692.5049 +"descended."
692.5050 +msgstr ""
692.5051 +
692.5052 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.5053 +#: ../en/ch03-tour-merge.xml:253
692.5054 +msgid ""
692.5055 +"In the middle is <quote>our</quote> version of the file, with the contents "
692.5056 +"that we modified."
692.5057 +msgstr ""
692.5058 +
692.5059 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.5060 +#: ../en/ch03-tour-merge.xml:256
692.5061 +msgid ""
692.5062 +"On the right is <quote>their</quote> version of the file, the one that from "
692.5063 +"the changeset that we're trying to merge with."
692.5064 +msgstr ""
692.5065 +
692.5066 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5067 +#: ../en/ch03-tour-merge.xml:260
692.5068 +msgid ""
692.5069 +"In the pane below these is the current <emphasis>result</emphasis> of the "
692.5070 +"merge. Our task is to replace all of the red text, which indicates unresolved "
692.5071 +"conflicts, with some sensible merger of the <quote>ours</quote> and "
692.5072 +"<quote>theirs</quote> versions of the file."
692.5073 +msgstr ""
692.5074 +
692.5075 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5076 +#: ../en/ch03-tour-merge.xml:267
692.5077 +msgid ""
692.5078 +"All four of these panes are <emphasis>locked together</emphasis>; if we "
692.5079 +"scroll vertically or horizontally in any of them, the others are updated to "
692.5080 +"display the corresponding sections of their respective files."
692.5081 +msgstr ""
692.5082 +
692.5083 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.5084 +#: ../en/ch03-tour-merge.xml:273
692.5085 +msgid "Using <command>kdiff3</command> to merge versions of a file"
692.5086 +msgstr "使用 <command>kdiff3</command> 合并文件的不同版本"
692.5087 +
692.5088 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.5089 +#: ../en/ch03-tour-merge.xml:276
692.5090 +msgid ""
692.5091 +"<imageobject> <imagedata width=\"100%\" fileref=\"figs/kdiff3.png\"/></"
692.5092 +"imageobject>"
692.5093 +msgstr ""
692.5094 +
692.5095 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5096 +#: ../en/ch03-tour-merge.xml:284
692.5097 +msgid ""
692.5098 +"For each conflicting portion of the file, we can choose to resolve the "
692.5099 +"conflict using some combination of text from the base version, ours, or "
692.5100 +"theirs.  We can also manually edit the merged file at any time, in case we "
692.5101 +"need to make further modifications."
692.5102 +msgstr ""
692.5103 +
692.5104 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5105 +#: ../en/ch03-tour-merge.xml:290
692.5106 +msgid ""
692.5107 +"There are <emphasis>many</emphasis> file merging tools available, too many to "
692.5108 +"cover here.  They vary in which platforms they are available for, and in "
692.5109 +"their particular strengths and weaknesses.  Most are tuned for merging files "
692.5110 +"containing plain text, while a few are aimed at specialised file formats "
692.5111 +"(generally XML)."
692.5112 +msgstr ""
692.5113 +
692.5114 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5115 +#: ../en/ch03-tour-merge.xml:299
692.5116 +msgid "A worked example"
692.5117 +msgstr "合并实例"
692.5118 +
692.5119 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5120 +#: ../en/ch03-tour-merge.xml:301
692.5121 +msgid ""
692.5122 +"In this example, we will reproduce the file modification history of <xref "
692.5123 +"linkend=\"fig:tour-merge:conflict\"/> above.  Let's begin by creating a "
692.5124 +"repository with a base version of our document."
692.5125 +msgstr ""
692.5126 +
692.5127 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5128 +#: ../en/ch03-tour-merge.xml:308
692.5129 +msgid "We'll clone the repository and make a change to the file."
692.5130 +msgstr ""
692.5131 +
692.5132 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5133 +#: ../en/ch03-tour-merge.xml:313
692.5134 +msgid ""
692.5135 +"And another clone, to simulate someone else making a change to the file. "
692.5136 +"(This hints at the idea that it's not all that unusual to merge with yourself "
692.5137 +"when you isolate tasks in separate repositories, and indeed to find and "
692.5138 +"resolve conflicts while doing so.)"
692.5139 +msgstr ""
692.5140 +
692.5141 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5142 +#: ../en/ch03-tour-merge.xml:321
692.5143 +msgid ""
692.5144 +"Having created two different versions of the file, we'll set up an "
692.5145 +"environment suitable for running our merge."
692.5146 +msgstr ""
692.5147 +
692.5148 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5149 +#: ../en/ch03-tour-merge.xml:327
692.5150 +msgid ""
692.5151 +"In this example, I'll set <envar>HGMERGE</envar> to tell Mercurial to use the "
692.5152 +"non-interactive <command>merge</command> command.  This is bundled with many "
692.5153 +"Unix-like systems. (If you're following this example on your computer, don't "
692.5154 +"bother setting <envar>HGMERGE</envar>.  You'll get dropped into a GUI file "
692.5155 +"merge tool instead, which is much preferable.)"
692.5156 +msgstr ""
692.5157 +
692.5158 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5159 +#: ../en/ch03-tour-merge.xml:337
692.5160 +msgid ""
692.5161 +"Because <command>merge</command> can't resolve the conflicting changes, it "
692.5162 +"leaves <emphasis>merge markers</emphasis> inside the file that has conflicts, "
692.5163 +"indicating which lines have conflicts, and whether they came from our version "
692.5164 +"of the file or theirs."
692.5165 +msgstr ""
692.5166 +
692.5167 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5168 +#: ../en/ch03-tour-merge.xml:343
692.5169 +msgid ""
692.5170 +"Mercurial can tell from the way <command>merge</command> exits that it wasn't "
692.5171 +"able to merge successfully, so it tells us what commands we'll need to run if "
692.5172 +"we want to redo the merging operation.  This could be useful if, for example, "
692.5173 +"we were running a graphical merge tool and quit because we were confused or "
692.5174 +"realised we had made a mistake."
692.5175 +msgstr ""
692.5176 +
692.5177 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5178 +#: ../en/ch03-tour-merge.xml:350
692.5179 +msgid ""
692.5180 +"If automatic or manual merges fail, there's nothing to prevent us from "
692.5181 +"<quote>fixing up</quote> the affected files ourselves, and committing the "
692.5182 +"results of our merge:"
692.5183 +msgstr ""
692.5184 +
692.5185 +#. type: Content of: <book><chapter><sect1><sect2><note><title>
692.5186 +#: ../en/ch03-tour-merge.xml:357
692.5187 +msgid "Where is the <command>hg resolve</command> command?"
692.5188 +msgstr "在哪里能找到 <command role=\"hg-cmd\">hg resolve</command> 命令?"
692.5189 +
692.5190 +#. type: Content of: <book><chapter><sect1><sect2><note><para>
692.5191 +#: ../en/ch03-tour-merge.xml:359
692.5192 +msgid ""
692.5193 +"The <command>hg resolve</command> command was introduced in Mercurial 1.1, "
692.5194 +"which was released in December 2008. If you are using an older version of "
692.5195 +"Mercurial (run <command>hg version</command> to see), this command will not "
692.5196 +"be present.  If your version of Mercurial is older than 1.1, you should "
692.5197 +"strongly consider upgrading to a newer version before trying to tackle "
692.5198 +"complicated merges."
692.5199 +msgstr ""
692.5200 +
692.5201 +#. type: Content of: <book><chapter><sect1><title>
692.5202 +#: ../en/ch03-tour-merge.xml:371
692.5203 +msgid "Simplifying the pull-merge-commit sequence"
692.5204 +msgstr "简化拉-合并-提交程序"
692.5205 +
692.5206 +#. type: Content of: <book><chapter><sect1><para>
692.5207 +#: ../en/ch03-tour-merge.xml:373
692.5208 +msgid ""
692.5209 +"The process of merging changes as outlined above is straightforward, but "
692.5210 +"requires running three commands in sequence."
692.5211 +msgstr ""
692.5212 +
692.5213 +#. type: Content of: <book><chapter><sect1><para>
692.5214 +#: ../en/ch03-tour-merge.xml:379
692.5215 +msgid ""
692.5216 +"In the case of the final commit, you also need to enter a commit message, "
692.5217 +"which is almost always going to be a piece of uninteresting "
692.5218 +"<quote>boilerplate</quote> text."
692.5219 +msgstr ""
692.5220 +
692.5221 +#. type: Content of: <book><chapter><sect1><para>
692.5222 +#: ../en/ch03-tour-merge.xml:383
692.5223 +msgid ""
692.5224 +"It would be nice to reduce the number of steps needed, if this were "
692.5225 +"possible.  Indeed, Mercurial is distributed with an extension called <literal "
692.5226 +"role=\"hg-ext\">fetch</literal> that does just this."
692.5227 +msgstr ""
692.5228 +
692.5229 +#. type: Content of: <book><chapter><sect1><para>
692.5230 +#: ../en/ch03-tour-merge.xml:388
692.5231 +msgid ""
692.5232 +"Mercurial provides a flexible extension mechanism that lets people extend its "
692.5233 +"functionality, while keeping the core of Mercurial small and easy to deal "
692.5234 +"with.  Some extensions add new commands that you can use from the command "
692.5235 +"line, while others work <quote>behind the scenes,</quote> for example adding "
692.5236 +"capabilities to Mercurial's built-in server mode."
692.5237 +msgstr ""
692.5238 +
692.5239 +#. type: Content of: <book><chapter><sect1><para>
692.5240 +#: ../en/ch03-tour-merge.xml:395
692.5241 +msgid ""
692.5242 +"The <literal role=\"hg-ext\">fetch</literal> extension adds a new command "
692.5243 +"called, not surprisingly, <command role=\"hg-cmd\">hg fetch</command>.  This "
692.5244 +"extension acts as a combination of <command role=\"hg-cmd\">hg pull -u</"
692.5245 +"command>, <command role=\"hg-cmd\">hg merge</command> and <command role=\"hg-"
692.5246 +"cmd\">hg commit</command>.  It begins by pulling changes from another "
692.5247 +"repository into the current repository.  If it finds that the changes added a "
692.5248 +"new head to the repository, it updates to the new head, begins a merge, then "
692.5249 +"(if the merge succeeded) commits the result of the merge with an "
692.5250 +"automatically-generated commit message.  If no new heads were added, it "
692.5251 +"updates the working directory to the new tip changeset."
692.5252 +msgstr ""
692.5253 +
692.5254 +#. type: Content of: <book><chapter><sect1><para>
692.5255 +#: ../en/ch03-tour-merge.xml:409
692.5256 +msgid ""
692.5257 +"Enabling the <literal role=\"hg-ext\">fetch</literal> extension is easy.  "
692.5258 +"Edit the <filename role=\"special\">.hgrc</filename> file in your home "
692.5259 +"directory, and either go to the <literal role=\"rc-extensions\">extensions</"
692.5260 +"literal> section or create an <literal role=\"rc-extensions\">extensions</"
692.5261 +"literal> section. Then add a line that simply reads <quote><literal>fetch=</"
692.5262 +"literal></quote>."
692.5263 +msgstr ""
692.5264 +
692.5265 +#. type: Content of: <book><chapter><sect1><para>
692.5266 +#: ../en/ch03-tour-merge.xml:421
692.5267 +msgid ""
692.5268 +"(Normally, the right-hand side of the <quote><literal>=</literal></quote> "
692.5269 +"would indicate where to find the extension, but since the <literal role=\"hg-"
692.5270 +"ext\">fetch</literal> extension is in the standard distribution, Mercurial "
692.5271 +"knows where to search for it.)"
692.5272 +msgstr ""
692.5273 +
692.5274 +#. type: Content of: <book><chapter><sect1><title>
692.5275 +#: ../en/ch03-tour-merge.xml:429
692.5276 +msgid "Renaming, copying, and merging"
692.5277 +msgstr "改名,复制与合并"
692.5278 +
692.5279 +#. type: Content of: <book><chapter><sect1><para>
692.5280 +#: ../en/ch03-tour-merge.xml:431
692.5281 +msgid ""
692.5282 +"During the life of a project, we will often want to change the layout of its "
692.5283 +"files and directories. This can be as simple as renaming a single file, or as "
692.5284 +"complex as restructuring the entire hierarchy of files within the project."
692.5285 +msgstr ""
692.5286 +
692.5287 +#. type: Content of: <book><chapter><sect1><para>
692.5288 +#: ../en/ch03-tour-merge.xml:436
692.5289 +msgid ""
692.5290 +"Mercurial supports these kinds of complex changes fluently, provided we tell "
692.5291 +"it what we're doing.  If we want to rename a file, we should use the "
692.5292 +"<command>hg rename</command><placeholder type=\"footnote\" id=\"0\"/> command "
692.5293 +"to rename it, so that Mercurial can do the right thing later when we merge."
692.5294 +msgstr ""
692.5295 +
692.5296 +#. type: Content of: <book><chapter><sect1><para><footnote><para>
692.5297 +#: ../en/ch03-tour-merge.xml:439
692.5298 +msgid ""
692.5299 +"If you're a Unix user, you'll be glad to know that the <command>hg rename</"
692.5300 +"command> command can be abbreviated as <command>hg mv</command>."
692.5301 +msgstr ""
692.5302 +
692.5303 +#. type: Content of: <book><chapter><sect1><para>
692.5304 +#: ../en/ch03-tour-merge.xml:445
692.5305 +msgid ""
692.5306 +"We will cover the use of these commands in more detail in <xref linkend="
692.5307 +"\"chap:daily.copy\"/>."
692.5308 +msgstr ""
692.5309 +
692.5310 +#. type: Content of: <book><chapter><title>
692.5311 +#: ../en/ch04-concepts.xml:5
692.5312 +msgid "Behind the scenes"
692.5313 +msgstr "Mercurial 内幕"
692.5314 +
692.5315 +#. type: Content of: <book><chapter><para>
692.5316 +#: ../en/ch04-concepts.xml:7
692.5317 +msgid ""
692.5318 +"Unlike many revision control systems, the concepts upon which Mercurial is "
692.5319 +"built are simple enough that it's easy to understand how the software really "
692.5320 +"works.  Knowing these details certainly isn't necessary, so it is certainly "
692.5321 +"safe to skip this chapter.  However, I think you will get more out of the "
692.5322 +"software with a <quote>mental model</quote> of what's going on."
692.5323 +msgstr ""
692.5324 +
692.5325 +#. type: Content of: <book><chapter><para>
692.5326 +#: ../en/ch04-concepts.xml:14
692.5327 +msgid ""
692.5328 +"Being able to understand what's going on behind the scenes gives me "
692.5329 +"confidence that Mercurial has been carefully designed to be both "
692.5330 +"<emphasis>safe</emphasis> and <emphasis>efficient</emphasis>.  And just as "
692.5331 +"importantly, if it's easy for me to retain a good idea of what the software "
692.5332 +"is doing when I perform a revision control task, I'm less likely to be "
692.5333 +"surprised by its behavior."
692.5334 +msgstr ""
692.5335 +
692.5336 +#. type: Content of: <book><chapter><para>
692.5337 +#: ../en/ch04-concepts.xml:22
692.5338 +msgid ""
692.5339 +"In this chapter, we'll initially cover the core concepts behind Mercurial's "
692.5340 +"design, then continue to discuss some of the interesting details of its "
692.5341 +"implementation."
692.5342 +msgstr ""
692.5343 +
692.5344 +#. type: Content of: <book><chapter><sect1><title>
692.5345 +#: ../en/ch04-concepts.xml:27
692.5346 +msgid "Mercurial's historical record"
692.5347 +msgstr "Mercurial 的历史记录"
692.5348 +
692.5349 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5350 +#: ../en/ch04-concepts.xml:30
692.5351 +msgid "Tracking the history of a single file"
692.5352 +msgstr "跟踪单一文件的历史"
692.5353 +
692.5354 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5355 +#: ../en/ch04-concepts.xml:32
692.5356 +msgid ""
692.5357 +"When Mercurial tracks modifications to a file, it stores the history of that "
692.5358 +"file in a metadata object called a <emphasis>filelog</emphasis>.  Each entry "
692.5359 +"in the filelog contains enough information to reconstruct one revision of the "
692.5360 +"file that is being tracked.  Filelogs are stored as files in the <filename "
692.5361 +"role=\"special\" class=\"directory\">.hg/store/data</filename> directory.  A "
692.5362 +"filelog contains two kinds of information: revision data, and an index to "
692.5363 +"help Mercurial to find a revision efficiently."
692.5364 +msgstr ""
692.5365 +
692.5366 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5367 +#: ../en/ch04-concepts.xml:43
692.5368 +msgid ""
692.5369 +"A file that is large, or has a lot of history, has its filelog stored in "
692.5370 +"separate data (<quote><literal>.d</literal></quote> suffix) and index "
692.5371 +"(<quote><literal>.i</literal></quote> suffix) files.  For small files without "
692.5372 +"much history, the revision data and index are combined in a single "
692.5373 +"<quote><literal>.i</literal></quote> file.  The correspondence between a file "
692.5374 +"in the working directory and the filelog that tracks its history in the "
692.5375 +"repository is illustrated in <xref linkend=\"fig:concepts:filelog\"/>."
692.5376 +msgstr ""
692.5377 +
692.5378 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.5379 +#: ../en/ch04-concepts.xml:55
692.5380 +msgid ""
692.5381 +"Relationships between files in working directory and filelogs in repository"
692.5382 +msgstr "工作目录中的文件与版本库中的文件日志之间的关系"
692.5383 +
692.5384 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.5385 +#: ../en/ch04-concepts.xml:58
692.5386 +msgid "<imageobject><imagedata fileref=\"figs/filelog.png\"/></imageobject>"
692.5387 +msgstr ""
692.5388 +
692.5389 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5390 +#: ../en/ch04-concepts.xml:65
692.5391 +msgid "Managing tracked files"
692.5392 +msgstr "管理跟踪的文件"
692.5393 +
692.5394 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5395 +#: ../en/ch04-concepts.xml:67
692.5396 +msgid ""
692.5397 +"Mercurial uses a structure called a <emphasis>manifest</emphasis> to collect "
692.5398 +"together information about the files that it tracks.  Each entry in the "
692.5399 +"manifest contains information about the files present in a single changeset.  "
692.5400 +"An entry records which files are present in the changeset, the revision of "
692.5401 +"each file, and a few other pieces of file metadata."
692.5402 +msgstr ""
692.5403 +
692.5404 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5405 +#: ../en/ch04-concepts.xml:77
692.5406 +msgid "Recording changeset information"
692.5407 +msgstr "记录修改集信息"
692.5408 +
692.5409 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5410 +#: ../en/ch04-concepts.xml:79
692.5411 +msgid ""
692.5412 +"The <emphasis>changelog</emphasis> contains information about each "
692.5413 +"changeset.  Each revision records who committed a change, the changeset "
692.5414 +"comment, other pieces of changeset-related information, and the revision of "
692.5415 +"the manifest to use."
692.5416 +msgstr ""
692.5417 +
692.5418 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5419 +#: ../en/ch04-concepts.xml:87
692.5420 +msgid "Relationships between revisions"
692.5421 +msgstr "版本之间的关系"
692.5422 +
692.5423 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5424 +#: ../en/ch04-concepts.xml:89
692.5425 +msgid ""
692.5426 +"Within a changelog, a manifest, or a filelog, each revision stores a pointer "
692.5427 +"to its immediate parent (or to its two parents, if it's a merge revision).  "
692.5428 +"As I mentioned above, there are also relationships between revisions "
692.5429 +"<emphasis>across</emphasis> these structures, and they are hierarchical in "
692.5430 +"nature."
692.5431 +msgstr ""
692.5432 +
692.5433 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5434 +#: ../en/ch04-concepts.xml:96
692.5435 +msgid ""
692.5436 +"For every changeset in a repository, there is exactly one revision stored in "
692.5437 +"the changelog.  Each revision of the changelog contains a pointer to a single "
692.5438 +"revision of the manifest.  A revision of the manifest stores a pointer to a "
692.5439 +"single revision of each filelog tracked when that changeset was created.  "
692.5440 +"These relationships are illustrated in <xref linkend=\"fig:concepts:metadata"
692.5441 +"\"/>."
692.5442 +msgstr ""
692.5443 +
692.5444 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.5445 +#: ../en/ch04-concepts.xml:105
692.5446 +msgid "Metadata relationships"
692.5447 +msgstr "元数据之间的关系"
692.5448 +
692.5449 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.5450 +#: ../en/ch04-concepts.xml:107
692.5451 +msgid "<imageobject><imagedata fileref=\"figs/metadata.png\"/></imageobject>"
692.5452 +msgstr ""
692.5453 +
692.5454 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5455 +#: ../en/ch04-concepts.xml:112
692.5456 +msgid ""
692.5457 +"As the illustration shows, there is <emphasis>not</emphasis> a <quote>one to "
692.5458 +"one</quote> relationship between revisions in the changelog, manifest, or "
692.5459 +"filelog. If a file that Mercurial tracks hasn't changed between two "
692.5460 +"changesets, the entry for that file in the two revisions of the manifest will "
692.5461 +"point to the same revision of its filelog<placeholder type=\"footnote\" id=\"0"
692.5462 +"\"/>."
692.5463 +msgstr ""
692.5464 +
692.5465 +#. type: Content of: <book><chapter><sect1><sect2><para><footnote><para>
692.5466 +#: ../en/ch04-concepts.xml:119
692.5467 +msgid ""
692.5468 +"It is possible (though unusual) for the manifest to remain the same between "
692.5469 +"two changesets, in which case the changelog entries for those changesets will "
692.5470 +"point to the same revision of the manifest."
692.5471 +msgstr ""
692.5472 +
692.5473 +#. type: Content of: <book><chapter><sect1><title>
692.5474 +#: ../en/ch04-concepts.xml:128
692.5475 +msgid "Safe, efficient storage"
692.5476 +msgstr "安全,高效的存储"
692.5477 +
692.5478 +#. type: Content of: <book><chapter><sect1><para>
692.5479 +#: ../en/ch04-concepts.xml:130
692.5480 +msgid ""
692.5481 +"The underpinnings of changelogs, manifests, and filelogs are provided by a "
692.5482 +"single structure called the <emphasis>revlog</emphasis>."
692.5483 +msgstr ""
692.5484 +
692.5485 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5486 +#: ../en/ch04-concepts.xml:135
692.5487 +msgid "Efficient storage"
692.5488 +msgstr "高效存储"
692.5489 +
692.5490 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5491 +#: ../en/ch04-concepts.xml:137
692.5492 +msgid ""
692.5493 +"The revlog provides efficient storage of revisions using a <emphasis>delta</"
692.5494 +"emphasis> mechanism.  Instead of storing a complete copy of a file for each "
692.5495 +"revision, it stores the changes needed to transform an older revision into "
692.5496 +"the new revision.  For many kinds of file data, these deltas are typically a "
692.5497 +"fraction of a percent of the size of a full copy of a file."
692.5498 +msgstr ""
692.5499 +
692.5500 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5501 +#: ../en/ch04-concepts.xml:145
692.5502 +msgid ""
692.5503 +"Some obsolete revision control systems can only work with deltas of text "
692.5504 +"files.  They must either store binary files as complete snapshots or encoded "
692.5505 +"into a text representation, both of which are wasteful approaches.  Mercurial "
692.5506 +"can efficiently handle deltas of files with arbitrary binary contents; it "
692.5507 +"doesn't need to treat text as special."
692.5508 +msgstr ""
692.5509 +
692.5510 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5511 +#: ../en/ch04-concepts.xml:154
692.5512 +msgid "Safe operation"
692.5513 +msgstr "安全操作"
692.5514 +
692.5515 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5516 +#: ../en/ch04-concepts.xml:156
692.5517 +msgid ""
692.5518 +"Mercurial only ever <emphasis>appends</emphasis> data to the end of a revlog "
692.5519 +"file. It never modifies a section of a file after it has written it.  This is "
692.5520 +"both more robust and efficient than schemes that need to modify or rewrite "
692.5521 +"data."
692.5522 +msgstr ""
692.5523 +
692.5524 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5525 +#: ../en/ch04-concepts.xml:162
692.5526 +msgid ""
692.5527 +"In addition, Mercurial treats every write as part of a <emphasis>transaction</"
692.5528 +"emphasis> that can span a number of files.  A transaction is "
692.5529 +"<emphasis>atomic</emphasis>: either the entire transaction succeeds and its "
692.5530 +"effects are all visible to readers in one go, or the whole thing is undone.  "
692.5531 +"This guarantee of atomicity means that if you're running two copies of "
692.5532 +"Mercurial, where one is reading data and one is writing it, the reader will "
692.5533 +"never see a partially written result that might confuse it."
692.5534 +msgstr ""
692.5535 +
692.5536 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5537 +#: ../en/ch04-concepts.xml:172
692.5538 +msgid ""
692.5539 +"The fact that Mercurial only appends to files makes it easier to provide this "
692.5540 +"transactional guarantee.  The easier it is to do stuff like this, the more "
692.5541 +"confident you should be that it's done correctly."
692.5542 +msgstr ""
692.5543 +
692.5544 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5545 +#: ../en/ch04-concepts.xml:179
692.5546 +msgid "Fast retrieval"
692.5547 +msgstr "快速检索"
692.5548 +
692.5549 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5550 +#: ../en/ch04-concepts.xml:181
692.5551 +msgid ""
692.5552 +"Mercurial cleverly avoids a pitfall common to all earlier revision control "
692.5553 +"systems: the problem of <emphasis>inefficient retrieval</emphasis>. Most "
692.5554 +"revision control systems store the contents of a revision as an incremental "
692.5555 +"series of modifications against a <quote>snapshot</quote>.  (Some base the "
692.5556 +"snapshot on the oldest revision, others on the newest.)  To reconstruct a "
692.5557 +"specific revision, you must first read the snapshot, and then every one of "
692.5558 +"the revisions between the snapshot and your target revision.  The more "
692.5559 +"history that a file accumulates, the more revisions you must read, hence the "
692.5560 +"longer it takes to reconstruct a particular revision."
692.5561 +msgstr ""
692.5562 +
692.5563 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.5564 +#: ../en/ch04-concepts.xml:195
692.5565 +msgid "Snapshot of a revlog, with incremental deltas"
692.5566 +msgstr "版本日志的快照,以及增量差异"
692.5567 +
692.5568 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.5569 +#: ../en/ch04-concepts.xml:197
692.5570 +msgid "<imageobject><imagedata fileref=\"figs/snapshot.png\"/></imageobject>"
692.5571 +msgstr ""
692.5572 +
692.5573 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5574 +#: ../en/ch04-concepts.xml:202
692.5575 +msgid ""
692.5576 +"The innovation that Mercurial applies to this problem is simple but "
692.5577 +"effective.  Once the cumulative amount of delta information stored since the "
692.5578 +"last snapshot exceeds a fixed threshold, it stores a new snapshot "
692.5579 +"(compressed, of course), instead of another delta.  This makes it possible to "
692.5580 +"reconstruct <emphasis>any</emphasis> revision of a file quickly.  This "
692.5581 +"approach works so well that it has since been copied by several other "
692.5582 +"revision control systems."
692.5583 +msgstr ""
692.5584 +
692.5585 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5586 +#: ../en/ch04-concepts.xml:211
692.5587 +msgid ""
692.5588 +"<xref linkend=\"fig:concepts:snapshot\"/> illustrates the idea.  In an entry "
692.5589 +"in a revlog's index file, Mercurial stores the range of entries from the data "
692.5590 +"file that it must read to reconstruct a particular revision."
692.5591 +msgstr ""
692.5592 +
692.5593 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.5594 +#: ../en/ch04-concepts.xml:217
692.5595 +msgid "Aside: the influence of video compression"
692.5596 +msgstr "旁白: 视频压缩的影响"
692.5597 +
692.5598 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.5599 +#: ../en/ch04-concepts.xml:219
692.5600 +msgid ""
692.5601 +"If you're familiar with video compression or have ever watched a TV feed "
692.5602 +"through a digital cable or satellite service, you may know that most video "
692.5603 +"compression schemes store each frame of video as a delta against its "
692.5604 +"predecessor frame."
692.5605 +msgstr ""
692.5606 +
692.5607 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.5608 +#: ../en/ch04-concepts.xml:225
692.5609 +msgid ""
692.5610 +"Mercurial borrows this idea to make it possible to reconstruct a revision "
692.5611 +"from a snapshot and a small number of deltas."
692.5612 +msgstr ""
692.5613 +
692.5614 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5615 +#: ../en/ch04-concepts.xml:232
692.5616 +msgid "Identification and strong integrity"
692.5617 +msgstr "鉴别和强完整性"
692.5618 +
692.5619 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5620 +#: ../en/ch04-concepts.xml:234
692.5621 +msgid ""
692.5622 +"Along with delta or snapshot information, a revlog entry contains a "
692.5623 +"cryptographic hash of the data that it represents.  This makes it difficult "
692.5624 +"to forge the contents of a revision, and easy to detect accidental corruption."
692.5625 +msgstr ""
692.5626 +
692.5627 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5628 +#: ../en/ch04-concepts.xml:239
692.5629 +msgid ""
692.5630 +"Hashes provide more than a mere check against corruption; they are used as "
692.5631 +"the identifiers for revisions.  The changeset identification hashes that you "
692.5632 +"see as an end user are from revisions of the changelog.  Although filelogs "
692.5633 +"and the manifest also use hashes, Mercurial only uses these behind the scenes."
692.5634 +msgstr ""
692.5635 +
692.5636 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5637 +#: ../en/ch04-concepts.xml:246
692.5638 +msgid ""
692.5639 +"Mercurial verifies that hashes are correct when it retrieves file revisions "
692.5640 +"and when it pulls changes from another repository.  If it encounters an "
692.5641 +"integrity problem, it will complain and stop whatever it's doing."
692.5642 +msgstr ""
692.5643 +
692.5644 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5645 +#: ../en/ch04-concepts.xml:251
692.5646 +msgid ""
692.5647 +"In addition to the effect it has on retrieval efficiency, Mercurial's use of "
692.5648 +"periodic snapshots makes it more robust against partial data corruption.  If "
692.5649 +"a revlog becomes partly corrupted due to a hardware error or system bug, it's "
692.5650 +"often possible to reconstruct some or most revisions from the uncorrupted "
692.5651 +"sections of the revlog, both before and after the corrupted section.  This "
692.5652 +"would not be possible with a delta-only storage model."
692.5653 +msgstr ""
692.5654 +
692.5655 +#. type: Content of: <book><chapter><sect1><title>
692.5656 +#: ../en/ch04-concepts.xml:263
692.5657 +msgid "Revision history, branching, and merging"
692.5658 +msgstr "修订历史,分支与合并"
692.5659 +
692.5660 +#. type: Content of: <book><chapter><sect1><para>
692.5661 +#: ../en/ch04-concepts.xml:265
692.5662 +msgid ""
692.5663 +"Every entry in a Mercurial revlog knows the identity of its immediate "
692.5664 +"ancestor revision, usually referred to as its <emphasis>parent</emphasis>.  "
692.5665 +"In fact, a revision contains room for not one parent, but two.  Mercurial "
692.5666 +"uses a special hash, called the <quote>null ID</quote>, to represent the idea "
692.5667 +"<quote>there is no parent here</quote>.  This hash is simply a string of "
692.5668 +"zeroes."
692.5669 +msgstr ""
692.5670 +
692.5671 +#. type: Content of: <book><chapter><sect1><para>
692.5672 +#: ../en/ch04-concepts.xml:273
692.5673 +msgid ""
692.5674 +"In <xref linkend=\"fig:concepts:revlog\"/>, you can see an example of the "
692.5675 +"conceptual structure of a revlog.  Filelogs, manifests, and changelogs all "
692.5676 +"have this same structure; they differ only in the kind of data stored in each "
692.5677 +"delta or snapshot."
692.5678 +msgstr ""
692.5679 +
692.5680 +#. type: Content of: <book><chapter><sect1><para>
692.5681 +#: ../en/ch04-concepts.xml:279
692.5682 +msgid ""
692.5683 +"The first revision in a revlog (at the bottom of the image)  has the null ID "
692.5684 +"in both of its parent slots.  For a <quote>normal</quote> revision, its first "
692.5685 +"parent slot contains the ID of its parent revision, and its second contains "
692.5686 +"the null ID, indicating that the revision has only one real parent.  Any two "
692.5687 +"revisions that have the same parent ID are branches.  A revision that "
692.5688 +"represents a merge between branches has two normal revision IDs in its parent "
692.5689 +"slots."
692.5690 +msgstr ""
692.5691 +
692.5692 +#. type: Content of: <book><chapter><sect1><figure><title>
692.5693 +#: ../en/ch04-concepts.xml:289
692.5694 +msgid "The conceptual structure of a revlog"
692.5695 +msgstr "版本日志的设计结构"
692.5696 +
692.5697 +#. type: Content of: <book><chapter><sect1><figure><mediaobject>
692.5698 +#: ../en/ch04-concepts.xml:291
692.5699 +msgid "<imageobject><imagedata fileref=\"figs/revlog.png\"/></imageobject>"
692.5700 +msgstr ""
692.5701 +
692.5702 +#. type: Content of: <book><chapter><sect1><title>
692.5703 +#: ../en/ch04-concepts.xml:298
692.5704 +msgid "The working directory"
692.5705 +msgstr "工作目录"
692.5706 +
692.5707 +#. type: Content of: <book><chapter><sect1><para>
692.5708 +#: ../en/ch04-concepts.xml:300
692.5709 +msgid ""
692.5710 +"In the working directory, Mercurial stores a snapshot of the files from the "
692.5711 +"repository as of a particular changeset."
692.5712 +msgstr ""
692.5713 +
692.5714 +#. type: Content of: <book><chapter><sect1><para>
692.5715 +#: ../en/ch04-concepts.xml:303
692.5716 +msgid ""
692.5717 +"The working directory <quote>knows</quote> which changeset it contains.  When "
692.5718 +"you update the working directory to contain a particular changeset, Mercurial "
692.5719 +"looks up the appropriate revision of the manifest to find out which files it "
692.5720 +"was tracking at the time that changeset was committed, and which revision of "
692.5721 +"each file was then current.  It then recreates a copy of each of those files, "
692.5722 +"with the same contents it had when the changeset was committed."
692.5723 +msgstr ""
692.5724 +
692.5725 +#. type: Content of: <book><chapter><sect1><para>
692.5726 +#: ../en/ch04-concepts.xml:312
692.5727 +msgid ""
692.5728 +"The <emphasis>dirstate</emphasis> is a special structure that contains "
692.5729 +"Mercurial's knowledge of the working directory.  It is maintained as a file "
692.5730 +"named <filename>.hg/dirstate</filename> inside a repository.  The dirstate "
692.5731 +"details which changeset the working directory is updated to, and all of the "
692.5732 +"files that Mercurial is tracking in the working directory. It also lets "
692.5733 +"Mercurial quickly notice changed files, by recording their checkout times and "
692.5734 +"sizes."
692.5735 +msgstr ""
692.5736 +
692.5737 +#. type: Content of: <book><chapter><sect1><para>
692.5738 +#: ../en/ch04-concepts.xml:322
692.5739 +msgid ""
692.5740 +"Just as a revision of a revlog has room for two parents, so that it can "
692.5741 +"represent either a normal revision (with one parent)  or a merge of two "
692.5742 +"earlier revisions, the dirstate has slots for two parents.  When you use the "
692.5743 +"<command role=\"hg-cmd\">hg update</command> command, the changeset that you "
692.5744 +"update to is stored in the <quote>first parent</quote> slot, and the null ID "
692.5745 +"in the second. When you <command role=\"hg-cmd\">hg merge</command> with "
692.5746 +"another changeset, the first parent remains unchanged, and the second parent "
692.5747 +"is filled in with the changeset you're merging with.  The <command role=\"hg-"
692.5748 +"cmd\">hg parents</command> command tells you what the parents of the dirstate "
692.5749 +"are."
692.5750 +msgstr ""
692.5751 +
692.5752 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5753 +#: ../en/ch04-concepts.xml:336
692.5754 +msgid "What happens when you commit"
692.5755 +msgstr "当你提交时发生的事情"
692.5756 +
692.5757 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5758 +#: ../en/ch04-concepts.xml:338
692.5759 +msgid ""
692.5760 +"The dirstate stores parent information for more than just book-keeping "
692.5761 +"purposes.  Mercurial uses the parents of the dirstate as <emphasis>the "
692.5762 +"parents of a new changeset</emphasis> when you perform a commit."
692.5763 +msgstr ""
692.5764 +
692.5765 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.5766 +#: ../en/ch04-concepts.xml:344
692.5767 +msgid "The working directory can have two parents"
692.5768 +msgstr "工作目录可以有两个父亲"
692.5769 +
692.5770 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.5771 +#: ../en/ch04-concepts.xml:346
692.5772 +msgid "<imageobject><imagedata fileref=\"figs/wdir.png\"/></imageobject>"
692.5773 +msgstr ""
692.5774 +
692.5775 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5776 +#: ../en/ch04-concepts.xml:351
692.5777 +msgid ""
692.5778 +"<xref linkend=\"fig:concepts:wdir\"/> shows the normal state of the working "
692.5779 +"directory, where it has a single changeset as parent.  That changeset is the "
692.5780 +"<emphasis>tip</emphasis>, the newest changeset in the repository that has no "
692.5781 +"children."
692.5782 +msgstr ""
692.5783 +
692.5784 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.5785 +#: ../en/ch04-concepts.xml:358
692.5786 +msgid "The working directory gains new parents after a commit"
692.5787 +msgstr "提交之后,工作目录的父亲就改变了"
692.5788 +
692.5789 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.5790 +#: ../en/ch04-concepts.xml:361
692.5791 +msgid ""
692.5792 +"<imageobject><imagedata fileref=\"figs/wdir-after-commit.png\"/></imageobject>"
692.5793 +msgstr ""
692.5794 +
692.5795 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5796 +#: ../en/ch04-concepts.xml:366
692.5797 +msgid ""
692.5798 +"It's useful to think of the working directory as <quote>the changeset I'm "
692.5799 +"about to commit</quote>.  Any files that you tell Mercurial that you've "
692.5800 +"added, removed, renamed, or copied will be reflected in that changeset, as "
692.5801 +"will modifications to any files that Mercurial is already tracking; the new "
692.5802 +"changeset will have the parents of the working directory as its parents."
692.5803 +msgstr ""
692.5804 +
692.5805 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5806 +#: ../en/ch04-concepts.xml:374
692.5807 +msgid ""
692.5808 +"After a commit, Mercurial will update the parents of the working directory, "
692.5809 +"so that the first parent is the ID of the new changeset, and the second is "
692.5810 +"the null ID.  This is shown in <xref linkend=\"fig:concepts:wdir-after-commit"
692.5811 +"\"/>. Mercurial doesn't touch any of the files in the working directory when "
692.5812 +"you commit; it just modifies the dirstate to note its new parents."
692.5813 +msgstr ""
692.5814 +
692.5815 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5816 +#: ../en/ch04-concepts.xml:385
692.5817 +msgid "Creating a new head"
692.5818 +msgstr "创建新顶点"
692.5819 +
692.5820 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5821 +#: ../en/ch04-concepts.xml:387
692.5822 +msgid ""
692.5823 +"It's perfectly normal to update the working directory to a changeset other "
692.5824 +"than the current tip.  For example, you might want to know what your project "
692.5825 +"looked like last Tuesday, or you could be looking through changesets to see "
692.5826 +"which one introduced a bug.  In cases like this, the natural thing to do is "
692.5827 +"update the working directory to the changeset you're interested in, and then "
692.5828 +"examine the files in the working directory directly to see their contents as "
692.5829 +"they were when you committed that changeset.  The effect of this is shown in "
692.5830 +"<xref linkend=\"fig:concepts:wdir-pre-branch\"/>."
692.5831 +msgstr ""
692.5832 +
692.5833 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.5834 +#: ../en/ch04-concepts.xml:399
692.5835 +msgid "The working directory, updated to an older changeset"
692.5836 +msgstr "同步到旧修改集的工作目录"
692.5837 +
692.5838 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.5839 +#: ../en/ch04-concepts.xml:402
692.5840 +msgid ""
692.5841 +"<imageobject><imagedata fileref=\"figs/wdir-pre-branch.png\"/></imageobject>"
692.5842 +msgstr ""
692.5843 +
692.5844 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5845 +#: ../en/ch04-concepts.xml:407
692.5846 +msgid ""
692.5847 +"Having updated the working directory to an older changeset, what happens if "
692.5848 +"you make some changes, and then commit? Mercurial behaves in the same way as "
692.5849 +"I outlined above.  The parents of the working directory become the parents of "
692.5850 +"the new changeset.  This new changeset has no children, so it becomes the new "
692.5851 +"tip.  And the repository now contains two changesets that have no children; "
692.5852 +"we call these <emphasis>heads</emphasis>.  You can see the structure that "
692.5853 +"this creates in <xref linkend=\"fig:concepts:wdir-branch\"/>."
692.5854 +msgstr ""
692.5855 +
692.5856 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.5857 +#: ../en/ch04-concepts.xml:419
692.5858 +msgid "After a commit made while synced to an older changeset"
692.5859 +msgstr "对同步到旧修改集的工作目录提交之后"
692.5860 +
692.5861 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.5862 +#: ../en/ch04-concepts.xml:422
692.5863 +msgid "<imageobject><imagedata fileref=\"figs/wdir-branch.png\"/></imageobject>"
692.5864 +msgstr ""
692.5865 +
692.5866 +#. type: Content of: <book><chapter><sect1><sect2><note><para>
692.5867 +#: ../en/ch04-concepts.xml:428
692.5868 +msgid ""
692.5869 +"If you're new to Mercurial, you should keep in mind a common <quote>error</"
692.5870 +"quote>, which is to use the <command role=\"hg-cmd\">hg pull</command> "
692.5871 +"command without any options.  By default, the <command role=\"hg-cmd\">hg "
692.5872 +"pull</command> command <emphasis>does not</emphasis> update the working "
692.5873 +"directory, so you'll bring new changesets into your repository, but the "
692.5874 +"working directory will stay synced at the same changeset as before the pull.  "
692.5875 +"If you make some changes and commit afterwards, you'll thus create a new "
692.5876 +"head, because your working directory isn't synced to whatever the current tip "
692.5877 +"is.  To combine the operation of a pull, followed by an update, run "
692.5878 +"<command>hg pull -u</command>."
692.5879 +msgstr ""
692.5880 +
692.5881 +#. type: Content of: <book><chapter><sect1><sect2><note><para>
692.5882 +#: ../en/ch04-concepts.xml:442
692.5883 +msgid ""
692.5884 +"I put the word <quote>error</quote> in quotes because all that you need to do "
692.5885 +"to rectify the situation where you created a new head by accident is <command "
692.5886 +"role=\"hg-cmd\">hg merge</command>, then <command role=\"hg-cmd\">hg commit</"
692.5887 +"command>.  In other words, this almost never has negative consequences; it's "
692.5888 +"just something of a surprise for newcomers.  I'll discuss other ways to avoid "
692.5889 +"this behavior, and why Mercurial behaves in this initially surprising way, "
692.5890 +"later on."
692.5891 +msgstr ""
692.5892 +
692.5893 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5894 +#: ../en/ch04-concepts.xml:455
692.5895 +msgid "Merging changes"
692.5896 +msgstr "合并修改"
692.5897 +
692.5898 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5899 +#: ../en/ch04-concepts.xml:457
692.5900 +msgid ""
692.5901 +"When you run the <command role=\"hg-cmd\">hg merge</command> command, "
692.5902 +"Mercurial leaves the first parent of the working directory unchanged, and "
692.5903 +"sets the second parent to the changeset you're merging with, as shown in "
692.5904 +"<xref linkend=\"fig:concepts:wdir-merge\"/>."
692.5905 +msgstr ""
692.5906 +
692.5907 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.5908 +#: ../en/ch04-concepts.xml:464
692.5909 +msgid "Merging two heads"
692.5910 +msgstr "合并两个顶点"
692.5911 +
692.5912 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.5913 +#: ../en/ch04-concepts.xml:466
692.5914 +msgid ""
692.5915 +"<imageobject> <imagedata fileref=\"figs/wdir-merge.png\"/> </imageobject>"
692.5916 +msgstr ""
692.5917 +
692.5918 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5919 +#: ../en/ch04-concepts.xml:473
692.5920 +msgid ""
692.5921 +"Mercurial also has to modify the working directory, to merge the files "
692.5922 +"managed in the two changesets.  Simplified a little, the merging process goes "
692.5923 +"like this, for every file in the manifests of both changesets."
692.5924 +msgstr ""
692.5925 +
692.5926 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.5927 +#: ../en/ch04-concepts.xml:478
692.5928 +msgid "If neither changeset has modified a file, do nothing with that file."
692.5929 +msgstr ""
692.5930 +
692.5931 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.5932 +#: ../en/ch04-concepts.xml:481
692.5933 +msgid ""
692.5934 +"If one changeset has modified a file, and the other hasn't, create the "
692.5935 +"modified copy of the file in the working directory."
692.5936 +msgstr ""
692.5937 +
692.5938 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.5939 +#: ../en/ch04-concepts.xml:485
692.5940 +msgid ""
692.5941 +"If one changeset has removed a file, and the other hasn't (or has also "
692.5942 +"deleted it), delete the file from the working directory."
692.5943 +msgstr ""
692.5944 +
692.5945 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.5946 +#: ../en/ch04-concepts.xml:489
692.5947 +msgid ""
692.5948 +"If one changeset has removed a file, but the other has modified the file, ask "
692.5949 +"the user what to do: keep the modified file, or remove it?"
692.5950 +msgstr ""
692.5951 +
692.5952 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.5953 +#: ../en/ch04-concepts.xml:493
692.5954 +msgid ""
692.5955 +"If both changesets have modified a file, invoke an external merge program to "
692.5956 +"choose the new contents for the merged file.  This may require input from the "
692.5957 +"user."
692.5958 +msgstr ""
692.5959 +
692.5960 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.5961 +#: ../en/ch04-concepts.xml:498
692.5962 +msgid ""
692.5963 +"If one changeset has modified a file, and the other has renamed or copied the "
692.5964 +"file, make sure that the changes follow the new name of the file."
692.5965 +msgstr ""
692.5966 +
692.5967 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5968 +#: ../en/ch04-concepts.xml:502
692.5969 +msgid ""
692.5970 +"There are more details&emdash;merging has plenty of corner cases&emdash;but "
692.5971 +"these are the most common choices that are involved in a merge.  As you can "
692.5972 +"see, most cases are completely automatic, and indeed most merges finish "
692.5973 +"automatically, without requiring your input to resolve any conflicts."
692.5974 +msgstr ""
692.5975 +
692.5976 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5977 +#: ../en/ch04-concepts.xml:509
692.5978 +msgid ""
692.5979 +"When you're thinking about what happens when you commit after a merge, once "
692.5980 +"again the working directory is <quote>the changeset I'm about to commit</"
692.5981 +"quote>.  After the <command role=\"hg-cmd\">hg merge</command> command "
692.5982 +"completes, the working directory has two parents; these will become the "
692.5983 +"parents of the new changeset."
692.5984 +msgstr ""
692.5985 +
692.5986 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.5987 +#: ../en/ch04-concepts.xml:516
692.5988 +msgid ""
692.5989 +"Mercurial lets you perform multiple merges, but you must commit the results "
692.5990 +"of each individual merge as you go.  This is necessary because Mercurial only "
692.5991 +"tracks two parents for both revisions and the working directory.  While it "
692.5992 +"would be technically feasible to merge multiple changesets at once, Mercurial "
692.5993 +"avoids this for simplicity.  With multi-way merges, the risks of user "
692.5994 +"confusion, nasty conflict resolution, and making a terrible mess of a merge "
692.5995 +"would grow intolerable."
692.5996 +msgstr ""
692.5997 +
692.5998 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.5999 +#: ../en/ch04-concepts.xml:529
692.6000 +msgid "Merging and renames"
692.6001 +msgstr "合并与改名"
692.6002 +
692.6003 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6004 +#: ../en/ch04-concepts.xml:531
692.6005 +msgid ""
692.6006 +"A surprising number of revision control systems pay little or no attention to "
692.6007 +"a file's <emphasis>name</emphasis> over time.  For instance, it used to be "
692.6008 +"common that if a file got renamed on one side of a merge, the changes from "
692.6009 +"the other side would be silently dropped."
692.6010 +msgstr ""
692.6011 +
692.6012 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6013 +#: ../en/ch04-concepts.xml:537
692.6014 +msgid ""
692.6015 +"Mercurial records metadata when you tell it to perform a rename or copy. It "
692.6016 +"uses this metadata during a merge to do the right thing in the case of a "
692.6017 +"merge.  For instance, if I rename a file, and you edit it without renaming "
692.6018 +"it, when we merge our work the file will be renamed and have your edits "
692.6019 +"applied."
692.6020 +msgstr ""
692.6021 +
692.6022 +#. type: Content of: <book><chapter><sect1><title>
692.6023 +#: ../en/ch04-concepts.xml:547
692.6024 +msgid "Other interesting design features"
692.6025 +msgstr "其它有趣的设计特性"
692.6026 +
692.6027 +#. type: Content of: <book><chapter><sect1><para>
692.6028 +#: ../en/ch04-concepts.xml:549
692.6029 +msgid ""
692.6030 +"In the sections above, I've tried to highlight some of the most important "
692.6031 +"aspects of Mercurial's design, to illustrate that it pays careful attention "
692.6032 +"to reliability and performance.  However, the attention to detail doesn't "
692.6033 +"stop there.  There are a number of other aspects of Mercurial's construction "
692.6034 +"that I personally find interesting.  I'll detail a few of them here, separate "
692.6035 +"from the <quote>big ticket</quote> items above, so that if you're interested, "
692.6036 +"you can gain a better idea of the amount of thinking that goes into a well-"
692.6037 +"designed system."
692.6038 +msgstr ""
692.6039 +
692.6040 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6041 +#: ../en/ch04-concepts.xml:560
692.6042 +msgid "Clever compression"
692.6043 +msgstr "智能压缩"
692.6044 +
692.6045 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6046 +#: ../en/ch04-concepts.xml:562
692.6047 +msgid ""
692.6048 +"When appropriate, Mercurial will store both snapshots and deltas in "
692.6049 +"compressed form.  It does this by always <emphasis>trying to</emphasis> "
692.6050 +"compress a snapshot or delta, but only storing the compressed version if it's "
692.6051 +"smaller than the uncompressed version."
692.6052 +msgstr ""
692.6053 +
692.6054 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6055 +#: ../en/ch04-concepts.xml:568
692.6056 +msgid ""
692.6057 +"This means that Mercurial does <quote>the right thing</quote> when storing a "
692.6058 +"file whose native form is compressed, such as a <literal>zip</literal> "
692.6059 +"archive or a JPEG image.  When these types of files are compressed a second "
692.6060 +"time, the resulting file is usually bigger than the once-compressed form, and "
692.6061 +"so Mercurial will store the plain <literal>zip</literal> or JPEG."
692.6062 +msgstr ""
692.6063 +
692.6064 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6065 +#: ../en/ch04-concepts.xml:576
692.6066 +msgid ""
692.6067 +"Deltas between revisions of a compressed file are usually larger than "
692.6068 +"snapshots of the file, and Mercurial again does <quote>the right thing</"
692.6069 +"quote> in these cases.  It finds that such a delta exceeds the threshold at "
692.6070 +"which it should store a complete snapshot of the file, so it stores the "
692.6071 +"snapshot, again saving space compared to a naive delta-only approach."
692.6072 +msgstr ""
692.6073 +
692.6074 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.6075 +#: ../en/ch04-concepts.xml:585
692.6076 +msgid "Network recompression"
692.6077 +msgstr "网络重新压缩"
692.6078 +
692.6079 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.6080 +#: ../en/ch04-concepts.xml:587
692.6081 +msgid ""
692.6082 +"When storing revisions on disk, Mercurial uses the <quote>deflate</quote> "
692.6083 +"compression algorithm (the same one used by the popular <literal>zip</"
692.6084 +"literal> archive format), which balances good speed with a respectable "
692.6085 +"compression ratio.  However, when transmitting revision data over a network "
692.6086 +"connection, Mercurial uncompresses the compressed revision data."
692.6087 +msgstr ""
692.6088 +
692.6089 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.6090 +#: ../en/ch04-concepts.xml:595
692.6091 +msgid ""
692.6092 +"If the connection is over HTTP, Mercurial recompresses the entire stream of "
692.6093 +"data using a compression algorithm that gives a better compression ratio (the "
692.6094 +"Burrows-Wheeler algorithm from the widely used <literal>bzip2</literal> "
692.6095 +"compression package).  This combination of algorithm and compression of the "
692.6096 +"entire stream (instead of a revision at a time) substantially reduces the "
692.6097 +"number of bytes to be transferred, yielding better network performance over "
692.6098 +"most kinds of network."
692.6099 +msgstr ""
692.6100 +
692.6101 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.6102 +#: ../en/ch04-concepts.xml:605
692.6103 +msgid ""
692.6104 +"If the connection is over <command>ssh</command>, Mercurial "
692.6105 +"<emphasis>doesn't</emphasis> recompress the stream, because <command>ssh</"
692.6106 +"command> can already do this itself.  You can tell Mercurial to always use "
692.6107 +"<command>ssh</command>'s compression feature by editing the <filename>.hgrc</"
692.6108 +"filename> file in your home directory as follows."
692.6109 +msgstr ""
692.6110 +
692.6111 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6112 +#: ../en/ch04-concepts.xml:620
692.6113 +msgid "Read/write ordering and atomicity"
692.6114 +msgstr "读写顺序与原子性"
692.6115 +
692.6116 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6117 +#: ../en/ch04-concepts.xml:622
692.6118 +msgid ""
692.6119 +"Appending to files isn't the whole story when it comes to guaranteeing that a "
692.6120 +"reader won't see a partial write.  If you recall <xref linkend=\"fig:concepts:"
692.6121 +"metadata\"/>, revisions in the changelog point to revisions in the manifest, "
692.6122 +"and revisions in the manifest point to revisions in filelogs.  This hierarchy "
692.6123 +"is deliberate."
692.6124 +msgstr ""
692.6125 +
692.6126 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6127 +#: ../en/ch04-concepts.xml:629
692.6128 +msgid ""
692.6129 +"A writer starts a transaction by writing filelog and manifest data, and "
692.6130 +"doesn't write any changelog data until those are finished.  A reader starts "
692.6131 +"by reading changelog data, then manifest data, followed by filelog data."
692.6132 +msgstr ""
692.6133 +
692.6134 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6135 +#: ../en/ch04-concepts.xml:634
692.6136 +msgid ""
692.6137 +"Since the writer has always finished writing filelog and manifest data before "
692.6138 +"it writes to the changelog, a reader will never read a pointer to a partially "
692.6139 +"written manifest revision from the changelog, and it will never read a "
692.6140 +"pointer to a partially written filelog revision from the manifest."
692.6141 +msgstr ""
692.6142 +
692.6143 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6144 +#: ../en/ch04-concepts.xml:642
692.6145 +msgid "Concurrent access"
692.6146 +msgstr "并发访问"
692.6147 +
692.6148 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6149 +#: ../en/ch04-concepts.xml:644
692.6150 +msgid ""
692.6151 +"The read/write ordering and atomicity guarantees mean that Mercurial never "
692.6152 +"needs to <emphasis>lock</emphasis> a repository when it's reading data, even "
692.6153 +"if the repository is being written to while the read is occurring. This has a "
692.6154 +"big effect on scalability; you can have an arbitrary number of Mercurial "
692.6155 +"processes safely reading data from a repository all at once, no matter "
692.6156 +"whether it's being written to or not."
692.6157 +msgstr ""
692.6158 +
692.6159 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6160 +#: ../en/ch04-concepts.xml:653
692.6161 +msgid ""
692.6162 +"The lockless nature of reading means that if you're sharing a repository on a "
692.6163 +"multi-user system, you don't need to grant other local users permission to "
692.6164 +"<emphasis>write</emphasis> to your repository in order for them to be able to "
692.6165 +"clone it or pull changes from it; they only need <emphasis>read</emphasis> "
692.6166 +"permission.  (This is <emphasis>not</emphasis> a common feature among "
692.6167 +"revision control systems, so don't take it for granted! Most require readers "
692.6168 +"to be able to lock a repository to access it safely, and this requires write "
692.6169 +"permission on at least one directory, which of course makes for all kinds of "
692.6170 +"nasty and annoying security and administrative problems.)"
692.6171 +msgstr ""
692.6172 +
692.6173 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6174 +#: ../en/ch04-concepts.xml:666
692.6175 +msgid ""
692.6176 +"Mercurial uses locks to ensure that only one process can write to a "
692.6177 +"repository at a time (the locking mechanism is safe even over filesystems "
692.6178 +"that are notoriously hostile to locking, such as NFS).  If a repository is "
692.6179 +"locked, a writer will wait for a while to retry if the repository becomes "
692.6180 +"unlocked, but if the repository remains locked for too long, the process "
692.6181 +"attempting to write will time out after a while. This means that your daily "
692.6182 +"automated scripts won't get stuck forever and pile up if a system crashes "
692.6183 +"unnoticed, for example.  (Yes, the timeout is configurable, from zero to "
692.6184 +"infinity.)"
692.6185 +msgstr ""
692.6186 +
692.6187 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.6188 +#: ../en/ch04-concepts.xml:678
692.6189 +msgid "Safe dirstate access"
692.6190 +msgstr "安全的目录状态访问"
692.6191 +
692.6192 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.6193 +#: ../en/ch04-concepts.xml:680
692.6194 +msgid ""
692.6195 +"As with revision data, Mercurial doesn't take a lock to read the dirstate "
692.6196 +"file; it does acquire a lock to write it.  To avoid the possibility of "
692.6197 +"reading a partially written copy of the dirstate file, Mercurial writes to a "
692.6198 +"file with a unique name in the same directory as the dirstate file, then "
692.6199 +"renames the temporary file atomically to <filename>dirstate</filename>.  The "
692.6200 +"file named <filename>dirstate</filename> is thus guaranteed to be complete, "
692.6201 +"not partially written."
692.6202 +msgstr ""
692.6203 +
692.6204 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6205 +#: ../en/ch04-concepts.xml:693
692.6206 +msgid "Avoiding seeks"
692.6207 +msgstr "避免查找"
692.6208 +
692.6209 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6210 +#: ../en/ch04-concepts.xml:695
692.6211 +msgid ""
692.6212 +"Critical to Mercurial's performance is the avoidance of seeks of the disk "
692.6213 +"head, since any seek is far more expensive than even a comparatively large "
692.6214 +"read operation."
692.6215 +msgstr ""
692.6216 +
692.6217 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6218 +#: ../en/ch04-concepts.xml:699
692.6219 +msgid ""
692.6220 +"This is why, for example, the dirstate is stored in a single file.  If there "
692.6221 +"were a dirstate file per directory that Mercurial tracked, the disk would "
692.6222 +"seek once per directory.  Instead, Mercurial reads the entire single dirstate "
692.6223 +"file in one step."
692.6224 +msgstr ""
692.6225 +
692.6226 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6227 +#: ../en/ch04-concepts.xml:705
692.6228 +msgid ""
692.6229 +"Mercurial also uses a <quote>copy on write</quote> scheme when cloning a "
692.6230 +"repository on local storage.  Instead of copying every revlog file from the "
692.6231 +"old repository into the new repository, it makes a <quote>hard link</quote>, "
692.6232 +"which is a shorthand way to say <quote>these two names point to the same "
692.6233 +"file</quote>.  When Mercurial is about to write to one of a revlog's files, "
692.6234 +"it checks to see if the number of names pointing at the file is greater than "
692.6235 +"one.  If it is, more than one repository is using the file, so Mercurial "
692.6236 +"makes a new copy of the file that is private to this repository."
692.6237 +msgstr ""
692.6238 +
692.6239 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6240 +#: ../en/ch04-concepts.xml:716
692.6241 +msgid ""
692.6242 +"A few revision control developers have pointed out that this idea of making a "
692.6243 +"complete private copy of a file is not very efficient in its use of storage.  "
692.6244 +"While this is true, storage is cheap, and this method gives the highest "
692.6245 +"performance while deferring most book-keeping to the operating system.  An "
692.6246 +"alternative scheme would most likely reduce performance and increase the "
692.6247 +"complexity of the software, but speed and simplicity are key to the "
692.6248 +"<quote>feel</quote> of day-to-day use."
692.6249 +msgstr ""
692.6250 +
692.6251 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6252 +#: ../en/ch04-concepts.xml:728
692.6253 +msgid "Other contents of the dirstate"
692.6254 +msgstr "目录状态的其它内容"
692.6255 +
692.6256 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6257 +#: ../en/ch04-concepts.xml:730
692.6258 +msgid ""
692.6259 +"Because Mercurial doesn't force you to tell it when you're modifying a file, "
692.6260 +"it uses the dirstate to store some extra information so it can determine "
692.6261 +"efficiently whether you have modified a file.  For each file in the working "
692.6262 +"directory, it stores the time that it last modified the file itself, and the "
692.6263 +"size of the file at that time."
692.6264 +msgstr ""
692.6265 +
692.6266 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6267 +#: ../en/ch04-concepts.xml:737
692.6268 +msgid ""
692.6269 +"When you explicitly <command role=\"hg-cmd\">hg add</command>, <command role="
692.6270 +"\"hg-cmd\">hg remove</command>, <command role=\"hg-cmd\">hg rename</command> "
692.6271 +"or <command role=\"hg-cmd\">hg copy</command> files, Mercurial updates the "
692.6272 +"dirstate so that it knows what to do with those files when you commit."
692.6273 +msgstr ""
692.6274 +
692.6275 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6276 +#: ../en/ch04-concepts.xml:744
692.6277 +msgid ""
692.6278 +"The dirstate helps Mercurial to efficiently check the status of files in a "
692.6279 +"repository."
692.6280 +msgstr ""
692.6281 +
692.6282 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.6283 +#: ../en/ch04-concepts.xml:749
692.6284 +msgid ""
692.6285 +"When Mercurial checks the state of a file in the working directory, it first "
692.6286 +"checks a file's modification time against the time in the dirstate that "
692.6287 +"records when Mercurial last wrote the file. If the last modified time is the "
692.6288 +"same as the time when Mercurial wrote the file, the file must not have been "
692.6289 +"modified, so Mercurial does not need to check any further."
692.6290 +msgstr ""
692.6291 +
692.6292 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.6293 +#: ../en/ch04-concepts.xml:758
692.6294 +msgid ""
692.6295 +"If the file's size has changed, the file must have been modified.  If the "
692.6296 +"modification time has changed, but the size has not, only then does Mercurial "
692.6297 +"need to actually read the contents of the file to see if it has changed."
692.6298 +msgstr ""
692.6299 +
692.6300 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6301 +#: ../en/ch04-concepts.xml:766
692.6302 +msgid ""
692.6303 +"Storing the modification time and size dramatically reduces the number of "
692.6304 +"read operations that Mercurial needs to perform when we run commands like "
692.6305 +"<command>hg status</command>.  This results in large performance improvements."
692.6306 +msgstr ""
692.6307 +
692.6308 +#. type: Content of: <book><chapter><title>
692.6309 +#: ../en/ch05-daily.xml:5
692.6310 +msgid "Mercurial in daily use"
692.6311 +msgstr "Mercurial 的日常使用"
692.6312 +
692.6313 +#. type: Content of: <book><chapter><sect1><title>
692.6314 +#: ../en/ch05-daily.xml:8
692.6315 +msgid "Telling Mercurial which files to track"
692.6316 +msgstr "告诉 Mercurial 要跟踪哪些文件"
692.6317 +
692.6318 +#. type: Content of: <book><chapter><sect1><para>
692.6319 +#: ../en/ch05-daily.xml:10
692.6320 +msgid ""
692.6321 +"Mercurial does not work with files in your repository unless you tell it to "
692.6322 +"manage them.  The <command role=\"hg-cmd\">hg status</command> command will "
692.6323 +"tell you which files Mercurial doesn't know about; it uses a <quote><literal>?"
692.6324 +"</literal></quote> to display such files."
692.6325 +msgstr ""
692.6326 +
692.6327 +#
692.6328 +#. type: Content of: <book><chapter><sect1><para>
692.6329 +#: ../en/ch05-daily.xml:17
692.6330 +msgid ""
692.6331 +"To tell Mercurial to track a file, use the <command role=\"hg-cmd\">hg add</"
692.6332 +"command> command.  Once you have added a file, the entry in the output of "
692.6333 +"<command role=\"hg-cmd\">hg status</command> for that file changes from "
692.6334 +"<quote><literal>?</literal></quote> to <quote><literal>A</literal></quote>."
692.6335 +msgstr ""
692.6336 +
692.6337 +#. type: Content of: <book><chapter><sect1><para>
692.6338 +#: ../en/ch05-daily.xml:26
692.6339 +msgid ""
692.6340 +"After you run a <command role=\"hg-cmd\">hg commit</command>, the files that "
692.6341 +"you added before the commit will no longer be listed in the output of "
692.6342 +"<command role=\"hg-cmd\">hg status</command>.  The reason for this is that by "
692.6343 +"default, <command role=\"hg-cmd\">hg status</command> only tells you about "
692.6344 +"<quote>interesting</quote> files&emdash;those that you have (for example) "
692.6345 +"modified, removed, or renamed.  If you have a repository that contains "
692.6346 +"thousands of files, you will rarely want to know about files that Mercurial "
692.6347 +"is tracking, but that have not changed.  (You can still get this information; "
692.6348 +"we'll return to this later.)"
692.6349 +msgstr ""
692.6350 +
692.6351 +#. type: Content of: <book><chapter><sect1><para>
692.6352 +#: ../en/ch05-daily.xml:38
692.6353 +msgid ""
692.6354 +"Once you add a file, Mercurial doesn't do anything with it immediately.  "
692.6355 +"Instead, it will take a snapshot of the file's state the next time you "
692.6356 +"perform a commit.  It will then continue to track the changes you make to the "
692.6357 +"file every time you commit, until you remove the file."
692.6358 +msgstr ""
692.6359 +
692.6360 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6361 +#: ../en/ch05-daily.xml:45
692.6362 +msgid "Explicit versus implicit file naming"
692.6363 +msgstr "明确与隐含文件命名"
692.6364 +
692.6365 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6366 +#: ../en/ch05-daily.xml:47
692.6367 +msgid ""
692.6368 +"A useful behavior that Mercurial has is that if you pass the name of a "
692.6369 +"directory to a command, every Mercurial command will treat this as <quote>I "
692.6370 +"want to operate on every file in this directory and its subdirectories</"
692.6371 +"quote>."
692.6372 +msgstr ""
692.6373 +
692.6374 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6375 +#: ../en/ch05-daily.xml:54
692.6376 +msgid ""
692.6377 +"Notice in this example that Mercurial printed the names of the files it "
692.6378 +"added, whereas it didn't do so when we added the file named <filename>myfile."
692.6379 +"txt</filename> in the earlier example."
692.6380 +msgstr ""
692.6381 +
692.6382 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6383 +#: ../en/ch05-daily.xml:59
692.6384 +msgid ""
692.6385 +"What's going on is that in the former case, we explicitly named the file to "
692.6386 +"add on the command line.  The assumption that Mercurial makes in such cases "
692.6387 +"is that we know what we are doing, and it doesn't print any output."
692.6388 +msgstr ""
692.6389 +
692.6390 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6391 +#: ../en/ch05-daily.xml:64
692.6392 +msgid ""
692.6393 +"However, when we <emphasis>imply</emphasis> the names of files by giving the "
692.6394 +"name of a directory, Mercurial takes the extra step of printing the name of "
692.6395 +"each file that it does something with.  This makes it more clear what is "
692.6396 +"happening, and reduces the likelihood of a silent and nasty surprise.  This "
692.6397 +"behavior is common to most Mercurial commands."
692.6398 +msgstr ""
692.6399 +
692.6400 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6401 +#: ../en/ch05-daily.xml:73
692.6402 +msgid "Mercurial tracks files, not directories"
692.6403 +msgstr "Mercurial 只跟踪文件,不跟踪目录"
692.6404 +
692.6405 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6406 +#: ../en/ch05-daily.xml:75
692.6407 +msgid ""
692.6408 +"Mercurial does not track directory information.  Instead, it tracks the path "
692.6409 +"to a file.  Before creating a file, it first creates any missing directory "
692.6410 +"components of the path.  After it deletes a file, it then deletes any empty "
692.6411 +"directories that were in the deleted file's path.  This sounds like a trivial "
692.6412 +"distinction, but it has one minor practical consequence: it is not possible "
692.6413 +"to represent a completely empty directory in Mercurial."
692.6414 +msgstr ""
692.6415 +
692.6416 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6417 +#: ../en/ch05-daily.xml:84
692.6418 +msgid ""
692.6419 +"Empty directories are rarely useful, and there are unintrusive workarounds "
692.6420 +"that you can use to achieve an appropriate effect.  The developers of "
692.6421 +"Mercurial thus felt that the complexity that would be required to manage "
692.6422 +"empty directories was not worth the limited benefit this feature would bring."
692.6423 +msgstr ""
692.6424 +
692.6425 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6426 +#: ../en/ch05-daily.xml:91
692.6427 +msgid ""
692.6428 +"If you need an empty directory in your repository, there are a few ways to "
692.6429 +"achieve this. One is to create a directory, then <command role=\"hg-cmd\">hg "
692.6430 +"add</command> a <quote>hidden</quote> file to that directory.  On Unix-like "
692.6431 +"systems, any file name that begins with a period (<quote><literal>.</"
692.6432 +"literal></quote>) is treated as hidden by most commands and GUI tools.  This "
692.6433 +"approach is illustrated below."
692.6434 +msgstr ""
692.6435 +
692.6436 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6437 +#: ../en/ch05-daily.xml:102
692.6438 +msgid ""
692.6439 +"Another way to tackle a need for an empty directory is to simply create one "
692.6440 +"in your automated build scripts before they will need it."
692.6441 +msgstr ""
692.6442 +
692.6443 +#. type: Content of: <book><chapter><sect1><title>
692.6444 +#: ../en/ch05-daily.xml:109
692.6445 +msgid "How to stop tracking a file"
692.6446 +msgstr "如何停止跟踪文件"
692.6447 +
692.6448 +#. type: Content of: <book><chapter><sect1><para>
692.6449 +#: ../en/ch05-daily.xml:111
692.6450 +msgid ""
692.6451 +"Once you decide that a file no longer belongs in your repository, use the "
692.6452 +"<command role=\"hg-cmd\">hg remove</command> command. This deletes the file, "
692.6453 +"and tells Mercurial to stop tracking it (which will occur at the next "
692.6454 +"commit).  A removed file is represented in the output of <command role=\"hg-"
692.6455 +"cmd\">hg status</command> with a <quote><literal>R</literal></quote>."
692.6456 +msgstr ""
692.6457 +
692.6458 +#. type: Content of: <book><chapter><sect1><para>
692.6459 +#: ../en/ch05-daily.xml:121
692.6460 +msgid ""
692.6461 +"After you <command role=\"hg-cmd\">hg remove</command> a file, Mercurial will "
692.6462 +"no longer track changes to that file, even if you recreate a file with the "
692.6463 +"same name in your working directory.  If you do recreate a file with the same "
692.6464 +"name and want Mercurial to track the new file, simply <command role=\"hg-cmd"
692.6465 +"\">hg add</command> it. Mercurial will know that the newly added file is not "
692.6466 +"related to the old file of the same name."
692.6467 +msgstr ""
692.6468 +
692.6469 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6470 +#: ../en/ch05-daily.xml:130
692.6471 +msgid "Removing a file does not affect its history"
692.6472 +msgstr "删除文件不影响历史"
692.6473 +
692.6474 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6475 +#: ../en/ch05-daily.xml:132
692.6476 +msgid "It is important to understand that removing a file has only two effects."
692.6477 +msgstr ""
692.6478 +
692.6479 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.6480 +#: ../en/ch05-daily.xml:135
692.6481 +msgid "It removes the current version of the file from the working directory."
692.6482 +msgstr ""
692.6483 +
692.6484 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.6485 +#: ../en/ch05-daily.xml:138
692.6486 +msgid ""
692.6487 +"It stops Mercurial from tracking changes to the file, from the time of the "
692.6488 +"next commit."
692.6489 +msgstr ""
692.6490 +
692.6491 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6492 +#: ../en/ch05-daily.xml:141
692.6493 +msgid ""
692.6494 +"Removing a file <emphasis>does not</emphasis> in any way alter the "
692.6495 +"<emphasis>history</emphasis> of the file."
692.6496 +msgstr ""
692.6497 +
692.6498 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6499 +#: ../en/ch05-daily.xml:144
692.6500 +msgid ""
692.6501 +"If you update the working directory to a changeset that was committed when it "
692.6502 +"was still tracking a file that you later removed, the file will reappear in "
692.6503 +"the working directory, with the contents it had when you committed that "
692.6504 +"changeset.  If you then update the working directory to a later changeset, in "
692.6505 +"which the file had been removed, Mercurial will once again remove the file "
692.6506 +"from the working directory."
692.6507 +msgstr ""
692.6508 +
692.6509 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6510 +#: ../en/ch05-daily.xml:155
692.6511 +msgid "Missing files"
692.6512 +msgstr "丢失的文件"
692.6513 +
692.6514 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6515 +#: ../en/ch05-daily.xml:157
692.6516 +msgid ""
692.6517 +"Mercurial considers a file that you have deleted, but not used <command role="
692.6518 +"\"hg-cmd\">hg remove</command> to delete, to be <emphasis>missing</"
692.6519 +"emphasis>.  A missing file is represented with <quote><literal>!</literal></"
692.6520 +"quote> in the output of <command role=\"hg-cmd\">hg status</command>.  "
692.6521 +"Mercurial commands will not generally do anything with missing files."
692.6522 +msgstr ""
692.6523 +
692.6524 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6525 +#: ../en/ch05-daily.xml:167
692.6526 +msgid ""
692.6527 +"If your repository contains a file that <command role=\"hg-cmd\">hg status</"
692.6528 +"command> reports as missing, and you want the file to stay gone, you can run "
692.6529 +"<command role=\"hg-cmd\">hg remove <option role=\"hg-opt-remove\">--after</"
692.6530 +"option></command> at any time later on, to tell Mercurial that you really did "
692.6531 +"mean to remove the file."
692.6532 +msgstr ""
692.6533 +
692.6534 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6535 +#: ../en/ch05-daily.xml:177
692.6536 +msgid ""
692.6537 +"On the other hand, if you deleted the missing file by accident, give <command "
692.6538 +"role=\"hg-cmd\">hg revert</command> the name of the file to recover.  It will "
692.6539 +"reappear, in unmodified form."
692.6540 +msgstr ""
692.6541 +
692.6542 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6543 +#: ../en/ch05-daily.xml:186
692.6544 +msgid "Aside: why tell Mercurial explicitly to remove a file?"
692.6545 +msgstr "旁白: 为什么要明确告诉 Mercurial 删除文件?"
692.6546 +
692.6547 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6548 +#: ../en/ch05-daily.xml:189
692.6549 +msgid ""
692.6550 +"You might wonder why Mercurial requires you to explicitly tell it that you "
692.6551 +"are deleting a file.  Early during the development of Mercurial, it let you "
692.6552 +"delete a file however you pleased; Mercurial would notice the absence of the "
692.6553 +"file automatically when you next ran a <command role=\"hg-cmd\">hg commit</"
692.6554 +"command>, and stop tracking the file.  In practice, this made it too easy to "
692.6555 +"accidentally remove a file without noticing."
692.6556 +msgstr ""
692.6557 +
692.6558 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6559 +#: ../en/ch05-daily.xml:200
692.6560 +msgid "Useful shorthand&emdash;adding and removing files in one step"
692.6561 +msgstr "有用的速记—一个步骤添加和删除文件"
692.6562 +
692.6563 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6564 +#: ../en/ch05-daily.xml:203
692.6565 +msgid ""
692.6566 +"Mercurial offers a combination command, <command role=\"hg-cmd\">hg "
692.6567 +"addremove</command>, that adds untracked files and marks missing files as "
692.6568 +"removed."
692.6569 +msgstr ""
692.6570 +
692.6571 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6572 +#: ../en/ch05-daily.xml:209
692.6573 +msgid ""
692.6574 +"The <command role=\"hg-cmd\">hg commit</command> command also provides a "
692.6575 +"<option role=\"hg-opt-commit\">-A</option> option that performs this same add-"
692.6576 +"and-remove, immediately followed by a commit."
692.6577 +msgstr ""
692.6578 +
692.6579 +#. type: Content of: <book><chapter><sect1><title>
692.6580 +#: ../en/ch05-daily.xml:219
692.6581 +msgid "Copying files"
692.6582 +msgstr "复制文件"
692.6583 +
692.6584 +#. type: Content of: <book><chapter><sect1><para>
692.6585 +#: ../en/ch05-daily.xml:221
692.6586 +msgid ""
692.6587 +"Mercurial provides a <command role=\"hg-cmd\">hg copy</command> command that "
692.6588 +"lets you make a new copy of a file.  When you copy a file using this command, "
692.6589 +"Mercurial makes a record of the fact that the new file is a copy of the "
692.6590 +"original file.  It treats these copied files specially when you merge your "
692.6591 +"work with someone else's."
692.6592 +msgstr ""
692.6593 +
692.6594 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6595 +#: ../en/ch05-daily.xml:229
692.6596 +msgid "The results of copying during a merge"
692.6597 +msgstr "合并期间的复制结果"
692.6598 +
692.6599 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6600 +#: ../en/ch05-daily.xml:231
692.6601 +msgid ""
692.6602 +"What happens during a merge is that changes <quote>follow</quote> a copy.  To "
692.6603 +"best illustrate what this means, let's create an example.  We'll start with "
692.6604 +"the usual tiny repository that contains a single file."
692.6605 +msgstr ""
692.6606 +
692.6607 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6608 +#: ../en/ch05-daily.xml:238
692.6609 +msgid ""
692.6610 +"We need to do some work in parallel, so that we'll have something to merge.  "
692.6611 +"So let's clone our repository."
692.6612 +msgstr ""
692.6613 +
692.6614 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6615 +#: ../en/ch05-daily.xml:244
692.6616 +msgid ""
692.6617 +"Back in our initial repository, let's use the <command role=\"hg-cmd\">hg "
692.6618 +"copy</command> command to make a copy of the first file we created."
692.6619 +msgstr ""
692.6620 +
692.6621 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6622 +#: ../en/ch05-daily.xml:250
692.6623 +msgid ""
692.6624 +"If we look at the output of the <command role=\"hg-cmd\">hg status</command> "
692.6625 +"command afterwards, the copied file looks just like a normal added file."
692.6626 +msgstr ""
692.6627 +
692.6628 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6629 +#: ../en/ch05-daily.xml:256
692.6630 +msgid ""
692.6631 +"But if we pass the <option role=\"hg-opt-status\">-C</option> option to "
692.6632 +"<command role=\"hg-cmd\">hg status</command>, it prints another line of "
692.6633 +"output: this is the file that our newly-added file was copied <emphasis>from</"
692.6634 +"emphasis>."
692.6635 +msgstr ""
692.6636 +
692.6637 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6638 +#: ../en/ch05-daily.xml:264
692.6639 +msgid ""
692.6640 +"Now, back in the repository we cloned, let's make a change in parallel.  "
692.6641 +"We'll add a line of content to the original file that we created."
692.6642 +msgstr ""
692.6643 +
692.6644 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6645 +#: ../en/ch05-daily.xml:270
692.6646 +msgid ""
692.6647 +"Now we have a modified <filename>file</filename> in this repository.  When we "
692.6648 +"pull the changes from the first repository, and merge the two heads, "
692.6649 +"Mercurial will propagate the changes that we made locally to <filename>file</"
692.6650 +"filename> into its copy, <filename>new-file</filename>."
692.6651 +msgstr ""
692.6652 +
692.6653 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6654 +#: ../en/ch05-daily.xml:280
692.6655 +msgid "Why should changes follow copies?"
692.6656 +msgstr "为什么复制后需要后续修改?"
692.6657 +
692.6658 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6659 +#: ../en/ch05-daily.xml:282
692.6660 +msgid ""
692.6661 +"This behavior&emdash;of changes to a file propagating out to copies of the "
692.6662 +"file&emdash;might seem esoteric, but in most cases it's highly desirable."
692.6663 +msgstr ""
692.6664 +
692.6665 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6666 +#: ../en/ch05-daily.xml:286
692.6667 +msgid ""
692.6668 +"First of all, remember that this propagation <emphasis>only</emphasis> "
692.6669 +"happens when you merge.  So if you <command role=\"hg-cmd\">hg copy</command> "
692.6670 +"a file, and subsequently modify the original file during the normal course of "
692.6671 +"your work, nothing will happen."
692.6672 +msgstr ""
692.6673 +
692.6674 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6675 +#: ../en/ch05-daily.xml:292
692.6676 +msgid ""
692.6677 +"The second thing to know is that modifications will only propagate across a "
692.6678 +"copy as long as the changeset that you're merging changes from "
692.6679 +"<emphasis>hasn't yet seen</emphasis> the copy."
692.6680 +msgstr ""
692.6681 +
692.6682 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6683 +#: ../en/ch05-daily.xml:297
692.6684 +msgid ""
692.6685 +"The reason that Mercurial does this is as follows.  Let's say I make an "
692.6686 +"important bug fix in a source file, and commit my changes. Meanwhile, you've "
692.6687 +"decided to <command role=\"hg-cmd\">hg copy</command> the file in your "
692.6688 +"repository, without knowing about the bug or having seen the fix, and you "
692.6689 +"have started hacking on your copy of the file."
692.6690 +msgstr ""
692.6691 +
692.6692 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6693 +#: ../en/ch05-daily.xml:304
692.6694 +msgid ""
692.6695 +"If you pulled and merged my changes, and Mercurial <emphasis>didn't</"
692.6696 +"emphasis> propagate changes across copies, your new source file would now "
692.6697 +"contain the bug, and unless you knew to propagate the bug fix by hand, the "
692.6698 +"bug would <emphasis>remain</emphasis> in your copy of the file."
692.6699 +msgstr ""
692.6700 +
692.6701 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6702 +#: ../en/ch05-daily.xml:310
692.6703 +msgid ""
692.6704 +"By automatically propagating the change that fixed the bug from the original "
692.6705 +"file to the copy, Mercurial prevents this class of problem. To my knowledge, "
692.6706 +"Mercurial is the <emphasis>only</emphasis> revision control system that "
692.6707 +"propagates changes across copies like this."
692.6708 +msgstr ""
692.6709 +
692.6710 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6711 +#: ../en/ch05-daily.xml:316
692.6712 +msgid ""
692.6713 +"Once your change history has a record that the copy and subsequent merge "
692.6714 +"occurred, there's usually no further need to propagate changes from the "
692.6715 +"original file to the copied file, and that's why Mercurial only propagates "
692.6716 +"changes across copies at the first merge, and not afterwards."
692.6717 +msgstr ""
692.6718 +
692.6719 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6720 +#: ../en/ch05-daily.xml:324
692.6721 +msgid "How to make changes <emphasis>not</emphasis> follow a copy"
692.6722 +msgstr "如何让复制后<emphasis>不</emphasis>修改?"
692.6723 +
692.6724 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6725 +#: ../en/ch05-daily.xml:327
692.6726 +msgid ""
692.6727 +"If, for some reason, you decide that this business of automatically "
692.6728 +"propagating changes across copies is not for you, simply use your system's "
692.6729 +"normal file copy command (on Unix-like systems, that's <command>cp</command>) "
692.6730 +"to make a copy of a file, then <command role=\"hg-cmd\">hg add</command> the "
692.6731 +"new copy by hand.  Before you do so, though, please do reread <xref linkend="
692.6732 +"\"sec:daily:why-copy\"/>, and make an informed decision that this behavior is "
692.6733 +"not appropriate to your specific case."
692.6734 +msgstr ""
692.6735 +
692.6736 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6737 +#: ../en/ch05-daily.xml:340
692.6738 +msgid "Behavior of the <command role=\"hg-cmd\">hg copy</command> command"
692.6739 +msgstr "命令 <command role=\"hg-cmd\">hg copy</command> 的特性"
692.6740 +
692.6741 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6742 +#: ../en/ch05-daily.xml:343
692.6743 +msgid ""
692.6744 +"When you use the <command role=\"hg-cmd\">hg copy</command> command, "
692.6745 +"Mercurial makes a copy of each source file as it currently stands in the "
692.6746 +"working directory.  This means that if you make some modifications to a file, "
692.6747 +"then <command role=\"hg-cmd\">hg copy</command> it without first having "
692.6748 +"committed those changes, the new copy will also contain the modifications you "
692.6749 +"have made up until that point.  (I find this behavior a little "
692.6750 +"counterintuitive, which is why I mention it here.)"
692.6751 +msgstr ""
692.6752 +
692.6753 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6754 +#: ../en/ch05-daily.xml:353
692.6755 +msgid ""
692.6756 +"The <command role=\"hg-cmd\">hg copy</command> command acts similarly to the "
692.6757 +"Unix <command>cp</command> command (you can use the <command role=\"hg-cmd"
692.6758 +"\">hg cp</command> alias if you prefer).  We must supply two or more "
692.6759 +"arguments, of which the last is treated as the <emphasis>destination</"
692.6760 +"emphasis>, and all others are <emphasis>sources</emphasis>."
692.6761 +msgstr ""
692.6762 +
692.6763 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6764 +#: ../en/ch05-daily.xml:361
692.6765 +msgid ""
692.6766 +"If you pass <command role=\"hg-cmd\">hg copy</command> a single file as the "
692.6767 +"source, and the destination does not exist, it creates a new file with that "
692.6768 +"name."
692.6769 +msgstr ""
692.6770 +
692.6771 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6772 +#: ../en/ch05-daily.xml:367
692.6773 +msgid ""
692.6774 +"If the destination is a directory, Mercurial copies its sources into that "
692.6775 +"directory."
692.6776 +msgstr ""
692.6777 +
692.6778 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6779 +#: ../en/ch05-daily.xml:372
692.6780 +msgid ""
692.6781 +"Copying a directory is recursive, and preserves the directory structure of "
692.6782 +"the source."
692.6783 +msgstr ""
692.6784 +
692.6785 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6786 +#: ../en/ch05-daily.xml:378
692.6787 +msgid ""
692.6788 +"If the source and destination are both directories, the source tree is "
692.6789 +"recreated in the destination directory."
692.6790 +msgstr ""
692.6791 +
692.6792 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6793 +#: ../en/ch05-daily.xml:383
692.6794 +msgid ""
692.6795 +"As with the <command role=\"hg-cmd\">hg remove</command> command, if you copy "
692.6796 +"a file manually and then want Mercurial to know that you've copied the file, "
692.6797 +"simply use the <option role=\"hg-opt-copy\">--after</option> option to "
692.6798 +"<command role=\"hg-cmd\">hg copy</command>."
692.6799 +msgstr ""
692.6800 +
692.6801 +#. type: Content of: <book><chapter><sect1><title>
692.6802 +#: ../en/ch05-daily.xml:394
692.6803 +msgid "Renaming files"
692.6804 +msgstr "改名文件"
692.6805 +
692.6806 +#. type: Content of: <book><chapter><sect1><para>
692.6807 +#: ../en/ch05-daily.xml:396
692.6808 +msgid ""
692.6809 +"It's rather more common to need to rename a file than to make a copy of it.  "
692.6810 +"The reason I discussed the <command role=\"hg-cmd\">hg copy</command> command "
692.6811 +"before talking about renaming files is that Mercurial treats a rename in "
692.6812 +"essentially the same way as a copy.  Therefore, knowing what Mercurial does "
692.6813 +"when you copy a file tells you what to expect when you rename a file."
692.6814 +msgstr ""
692.6815 +
692.6816 +#. type: Content of: <book><chapter><sect1><para>
692.6817 +#: ../en/ch05-daily.xml:404
692.6818 +msgid ""
692.6819 +"When you use the <command role=\"hg-cmd\">hg rename</command> command, "
692.6820 +"Mercurial makes a copy of each source file, then deletes it and marks the "
692.6821 +"file as removed."
692.6822 +msgstr ""
692.6823 +
692.6824 +#. type: Content of: <book><chapter><sect1><para>
692.6825 +#: ../en/ch05-daily.xml:410
692.6826 +msgid ""
692.6827 +"The <command role=\"hg-cmd\">hg status</command> command shows the newly "
692.6828 +"copied file as added, and the copied-from file as removed."
692.6829 +msgstr ""
692.6830 +
692.6831 +#. type: Content of: <book><chapter><sect1><para>
692.6832 +#: ../en/ch05-daily.xml:416
692.6833 +msgid ""
692.6834 +"As with the results of a <command role=\"hg-cmd\">hg copy</command>, we must "
692.6835 +"use the <option role=\"hg-opt-status\">-C</option> option to <command role="
692.6836 +"\"hg-cmd\">hg status</command> to see that the added file is really being "
692.6837 +"tracked by Mercurial as a copy of the original, now removed, file."
692.6838 +msgstr ""
692.6839 +
692.6840 +#. type: Content of: <book><chapter><sect1><para>
692.6841 +#: ../en/ch05-daily.xml:425
692.6842 +msgid ""
692.6843 +"As with <command role=\"hg-cmd\">hg remove</command> and <command role=\"hg-"
692.6844 +"cmd\">hg copy</command>, you can tell Mercurial about a rename after the fact "
692.6845 +"using the <option role=\"hg-opt-rename\">--after</option> option.  In most "
692.6846 +"other respects, the behavior of the <command role=\"hg-cmd\">hg rename</"
692.6847 +"command> command, and the options it accepts, are similar to the <command "
692.6848 +"role=\"hg-cmd\">hg copy</command> command."
692.6849 +msgstr ""
692.6850 +
692.6851 +#. type: Content of: <book><chapter><sect1><para>
692.6852 +#: ../en/ch05-daily.xml:434
692.6853 +msgid ""
692.6854 +"If you're familiar with the Unix command line, you'll be glad to know that "
692.6855 +"<command role=\"hg-cmd\">hg rename</command> command can be invoked as "
692.6856 +"<command role=\"hg-cmd\">hg mv</command>."
692.6857 +msgstr ""
692.6858 +
692.6859 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6860 +#: ../en/ch05-daily.xml:440
692.6861 +msgid "Renaming files and merging changes"
692.6862 +msgstr "改名文件与合并修改"
692.6863 +
692.6864 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6865 +#: ../en/ch05-daily.xml:442
692.6866 +msgid ""
692.6867 +"Since Mercurial's rename is implemented as copy-and-remove, the same "
692.6868 +"propagation of changes happens when you merge after a rename as after a copy."
692.6869 +msgstr ""
692.6870 +
692.6871 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6872 +#: ../en/ch05-daily.xml:446
692.6873 +msgid ""
692.6874 +"If I modify a file, and you rename it to a new name, and then we merge our "
692.6875 +"respective changes, my modifications to the file under its original name will "
692.6876 +"be propagated into the file under its new name. (This is something you might "
692.6877 +"expect to <quote>simply work,</quote> but not all revision control systems "
692.6878 +"actually do this.)"
692.6879 +msgstr ""
692.6880 +
692.6881 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6882 +#: ../en/ch05-daily.xml:453
692.6883 +msgid ""
692.6884 +"Whereas having changes follow a copy is a feature where you can perhaps nod "
692.6885 +"and say <quote>yes, that might be useful,</quote> it should be clear that "
692.6886 +"having them follow a rename is definitely important.  Without this facility, "
692.6887 +"it would simply be too easy for changes to become orphaned when files are "
692.6888 +"renamed."
692.6889 +msgstr ""
692.6890 +
692.6891 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6892 +#: ../en/ch05-daily.xml:462
692.6893 +msgid "Divergent renames and merging"
692.6894 +msgstr "改名与合并的分歧"
692.6895 +
692.6896 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6897 +#: ../en/ch05-daily.xml:464
692.6898 +msgid ""
692.6899 +"The case of diverging names occurs when two developers start with a "
692.6900 +"file&emdash;let's call it <filename>foo</filename>&emdash;in their respective "
692.6901 +"repositories."
692.6902 +msgstr ""
692.6903 +
692.6904 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6905 +#: ../en/ch05-daily.xml:471
692.6906 +msgid "Anne renames the file to <filename>bar</filename>."
692.6907 +msgstr ""
692.6908 +
692.6909 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6910 +#: ../en/ch05-daily.xml:475
692.6911 +msgid ""
692.6912 +"Meanwhile, Bob renames it to <filename>quux</filename>. (Remember that "
692.6913 +"<command role=\"hg-cmd\">hg mv</command> is an alias for <command role=\"hg-"
692.6914 +"cmd\">hg rename</command>.)"
692.6915 +msgstr ""
692.6916 +
692.6917 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6918 +#: ../en/ch05-daily.xml:482
692.6919 +msgid ""
692.6920 +"I like to think of this as a conflict because each developer has expressed "
692.6921 +"different intentions about what the file ought to be named."
692.6922 +msgstr ""
692.6923 +
692.6924 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6925 +#: ../en/ch05-daily.xml:486
692.6926 +msgid ""
692.6927 +"What do you think should happen when they merge their work? Mercurial's "
692.6928 +"actual behavior is that it always preserves <emphasis>both</emphasis> names "
692.6929 +"when it merges changesets that contain divergent renames."
692.6930 +msgstr ""
692.6931 +
692.6932 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6933 +#: ../en/ch05-daily.xml:493
692.6934 +msgid ""
692.6935 +"Notice that while Mercurial warns about the divergent renames, it leaves it "
692.6936 +"up to you to do something about the divergence after the merge."
692.6937 +msgstr ""
692.6938 +
692.6939 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6940 +#: ../en/ch05-daily.xml:499
692.6941 +msgid "Convergent renames and merging"
692.6942 +msgstr "收敛改名与合并"
692.6943 +
692.6944 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6945 +#: ../en/ch05-daily.xml:501
692.6946 +msgid ""
692.6947 +"Another kind of rename conflict occurs when two people choose to rename "
692.6948 +"different <emphasis>source</emphasis> files to the same "
692.6949 +"<emphasis>destination</emphasis>. In this case, Mercurial runs its normal "
692.6950 +"merge machinery, and lets you guide it to a suitable resolution."
692.6951 +msgstr ""
692.6952 +
692.6953 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.6954 +#: ../en/ch05-daily.xml:509
692.6955 +msgid "Other name-related corner cases"
692.6956 +msgstr "其它名称相关的角落"
692.6957 +
692.6958 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.6959 +#: ../en/ch05-daily.xml:511
692.6960 +msgid ""
692.6961 +"Mercurial has a longstanding bug in which it fails to handle a merge where "
692.6962 +"one side has a file with a given name, while another has a directory with the "
692.6963 +"same name.  This is documented as <ulink role=\"hg-bug\" url=\"http://www."
692.6964 +"selenic.com/mercurial/bts/issue29\">issue 29</ulink>."
692.6965 +msgstr ""
692.6966 +
692.6967 +#. type: Content of: <book><chapter><sect1><title>
692.6968 +#: ../en/ch05-daily.xml:524
692.6969 +msgid "Recovering from mistakes"
692.6970 +msgstr "从错误恢复"
692.6971 +
692.6972 +#. type: Content of: <book><chapter><sect1><para>
692.6973 +#: ../en/ch05-daily.xml:526
692.6974 +msgid ""
692.6975 +"Mercurial has some useful commands that will help you to recover from some "
692.6976 +"common mistakes."
692.6977 +msgstr ""
692.6978 +
692.6979 +#. type: Content of: <book><chapter><sect1><para>
692.6980 +#: ../en/ch05-daily.xml:529
692.6981 +msgid ""
692.6982 +"The <command role=\"hg-cmd\">hg revert</command> command lets you undo "
692.6983 +"changes that you have made to your working directory.  For example, if you "
692.6984 +"<command role=\"hg-cmd\">hg add</command> a file by accident, just run "
692.6985 +"<command role=\"hg-cmd\">hg revert</command> with the name of the file you "
692.6986 +"added, and while the file won't be touched in any way, it won't be tracked "
692.6987 +"for adding by Mercurial any longer, either.  You can also use <command role="
692.6988 +"\"hg-cmd\">hg revert</command> to get rid of erroneous changes to a file."
692.6989 +msgstr ""
692.6990 +
692.6991 +#. type: Content of: <book><chapter><sect1><para>
692.6992 +#: ../en/ch05-daily.xml:539
692.6993 +msgid ""
692.6994 +"It is helpful to remember that the <command role=\"hg-cmd\">hg revert</"
692.6995 +"command> command is useful for changes that you have not yet committed.  Once "
692.6996 +"you've committed a change, if you decide it was a mistake, you can still do "
692.6997 +"something about it, though your options may be more limited."
692.6998 +msgstr ""
692.6999 +
692.7000 +#. type: Content of: <book><chapter><sect1><para>
692.7001 +#: ../en/ch05-daily.xml:546
692.7002 +msgid ""
692.7003 +"For more information about the <command role=\"hg-cmd\">hg revert</command> "
692.7004 +"command, and details about how to deal with changes you have already "
692.7005 +"committed, see <xref linkend=\"chap:undo\"/>."
692.7006 +msgstr ""
692.7007 +
692.7008 +#. type: Content of: <book><chapter><sect1><title>
692.7009 +#: ../en/ch05-daily.xml:553
692.7010 +msgid "Dealing with tricky merges"
692.7011 +msgstr "合并的技巧"
692.7012 +
692.7013 +#. type: Content of: <book><chapter><sect1><para>
692.7014 +#: ../en/ch05-daily.xml:555
692.7015 +msgid ""
692.7016 +"In a complicated or large project, it's not unusual for a merge of two "
692.7017 +"changesets to result in some headaches.  Suppose there's a big source file "
692.7018 +"that's been extensively edited by each side of a merge: this is almost "
692.7019 +"inevitably going to result in conflicts, some of which can take a few tries "
692.7020 +"to sort out."
692.7021 +msgstr ""
692.7022 +
692.7023 +#. type: Content of: <book><chapter><sect1><para>
692.7024 +#: ../en/ch05-daily.xml:562
692.7025 +msgid ""
692.7026 +"Let's develop a simple case of this and see how to deal with it.  We'll start "
692.7027 +"off with a repository containing one file, and clone it twice."
692.7028 +msgstr ""
692.7029 +
692.7030 +#. type: Content of: <book><chapter><sect1><para>
692.7031 +#: ../en/ch05-daily.xml:568
692.7032 +msgid "In one clone, we'll modify the file in one way."
692.7033 +msgstr ""
692.7034 +
692.7035 +#. type: Content of: <book><chapter><sect1><para>
692.7036 +#: ../en/ch05-daily.xml:572
692.7037 +msgid "In another, we'll modify the file differently."
692.7038 +msgstr ""
692.7039 +
692.7040 +#. type: Content of: <book><chapter><sect1><para>
692.7041 +#: ../en/ch05-daily.xml:576
692.7042 +msgid "Next, we'll pull each set of changes into our original repo."
692.7043 +msgstr ""
692.7044 +
692.7045 +#. type: Content of: <book><chapter><sect1><para>
692.7046 +#: ../en/ch05-daily.xml:581
692.7047 +msgid "We expect our repository to now contain two heads."
692.7048 +msgstr ""
692.7049 +
692.7050 +#. type: Content of: <book><chapter><sect1><para>
692.7051 +#: ../en/ch05-daily.xml:585
692.7052 +msgid ""
692.7053 +"Normally, if we run <command role=\"hg-cmd\">hg merge</command> at this "
692.7054 +"point, it will drop us into a GUI that will let us manually resolve the "
692.7055 +"conflicting edits to <filename>myfile.txt</filename>.  However, to simplify "
692.7056 +"things for presentation here, we'd like the merge to fail immediately "
692.7057 +"instead.  Here's one way we can do so."
692.7058 +msgstr ""
692.7059 +
692.7060 +#. type: Content of: <book><chapter><sect1><para>
692.7061 +#: ../en/ch05-daily.xml:594
692.7062 +msgid ""
692.7063 +"We've told Mercurial's merge machinery to run the command <command>false</"
692.7064 +"command> (which, as we desire, fails immediately) if it detects a merge that "
692.7065 +"it can't sort out automatically."
692.7066 +msgstr ""
692.7067 +
692.7068 +#. type: Content of: <book><chapter><sect1><para>
692.7069 +#: ../en/ch05-daily.xml:599
692.7070 +msgid ""
692.7071 +"If we now fire up <command role=\"hg-cmd\">hg merge</command>, it should "
692.7072 +"grind to a halt and report a failure."
692.7073 +msgstr ""
692.7074 +
692.7075 +#. type: Content of: <book><chapter><sect1><para>
692.7076 +#: ../en/ch05-daily.xml:605
692.7077 +msgid ""
692.7078 +"Even if we don't notice that the merge failed, Mercurial will prevent us from "
692.7079 +"accidentally committing the result of a failed merge."
692.7080 +msgstr ""
692.7081 +
692.7082 +#. type: Content of: <book><chapter><sect1><para>
692.7083 +#: ../en/ch05-daily.xml:611
692.7084 +msgid ""
692.7085 +"When <command role=\"hg-cmd\">hg commit</command> fails in this case, it "
692.7086 +"suggests that we use the unfamiliar <command role=\"hg-cmd\">hg resolve</"
692.7087 +"command> command.  As usual, <command role=\"hg-cmd\">hg help resolve</"
692.7088 +"command> will print a helpful synopsis."
692.7089 +msgstr ""
692.7090 +
692.7091 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.7092 +#: ../en/ch05-daily.xml:618
692.7093 +msgid "File resolution states"
692.7094 +msgstr "文件的解决状态"
692.7095 +
692.7096 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7097 +#: ../en/ch05-daily.xml:620
692.7098 +msgid ""
692.7099 +"When a merge occurs, most files will usually remain unmodified.  For each "
692.7100 +"file where Mercurial has to do something, it tracks the state of the file."
692.7101 +msgstr ""
692.7102 +
692.7103 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.7104 +#: ../en/ch05-daily.xml:626
692.7105 +msgid ""
692.7106 +"A <emphasis>resolved</emphasis> file has been successfully merged, either "
692.7107 +"automatically by Mercurial or manually with human intervention."
692.7108 +msgstr ""
692.7109 +
692.7110 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.7111 +#: ../en/ch05-daily.xml:631
692.7112 +msgid ""
692.7113 +"An <emphasis>unresolved</emphasis> file was not merged successfully, and "
692.7114 +"needs more attention."
692.7115 +msgstr ""
692.7116 +
692.7117 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7118 +#: ../en/ch05-daily.xml:636
692.7119 +msgid ""
692.7120 +"If Mercurial sees <emphasis>any</emphasis> file in the unresolved state after "
692.7121 +"a merge, it considers the merge to have failed.  Fortunately, we do not need "
692.7122 +"to restart the entire merge from scratch."
692.7123 +msgstr ""
692.7124 +
692.7125 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7126 +#: ../en/ch05-daily.xml:641
692.7127 +msgid ""
692.7128 +"The <option role=\"hg-opt-resolve\">--list</option> or <option role=\"hg-opt-"
692.7129 +"resolve\">-l</option> option to <command role=\"hg-cmd\">hg resolve</command> "
692.7130 +"prints out the state of each merged file."
692.7131 +msgstr ""
692.7132 +
692.7133 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7134 +#: ../en/ch05-daily.xml:648
692.7135 +msgid ""
692.7136 +"In the output from <command role=\"hg-cmd\">hg resolve</command>, a resolved "
692.7137 +"file is marked with <literal>R</literal>, while an unresolved file is marked "
692.7138 +"with <literal>U</literal>.  If any files are listed with <literal>U</"
692.7139 +"literal>, we know that an attempt to commit the results of the merge will "
692.7140 +"fail."
692.7141 +msgstr ""
692.7142 +
692.7143 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.7144 +#: ../en/ch05-daily.xml:657
692.7145 +msgid "Resolving a file merge"
692.7146 +msgstr "合并文件"
692.7147 +
692.7148 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7149 +#: ../en/ch05-daily.xml:659
692.7150 +msgid ""
692.7151 +"We have several options to move a file from the unresolved into the resolved "
692.7152 +"state.  By far the most common is to rerun <command role=\"hg-cmd\">hg "
692.7153 +"resolve</command>.  If we pass the names of individual files or directories, "
692.7154 +"it will retry the merges of any unresolved files present in those locations. "
692.7155 +"We can also pass the <option role=\"hg-opt-resolve\">--all</option> or "
692.7156 +"<option role=\"hg-opt-resolve\">-a</option> option, which will retry the "
692.7157 +"merges of <emphasis>all</emphasis> unresolved files."
692.7158 +msgstr ""
692.7159 +
692.7160 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7161 +#: ../en/ch05-daily.xml:669
692.7162 +msgid ""
692.7163 +"Mercurial also lets us modify the resolution state of a file directly.  We "
692.7164 +"can manually mark a file as resolved using the <option role=\"hg-opt-resolve"
692.7165 +"\">--mark</option> option, or as unresolved using the <option role=\"hg-opt-"
692.7166 +"resolve\">--unmark</option> option.  This allows us to clean up a "
692.7167 +"particularly messy merge by hand, and to keep track of our progress with each "
692.7168 +"file as we go."
692.7169 +msgstr ""
692.7170 +
692.7171 +#. type: Content of: <book><chapter><sect1><title>
692.7172 +#: ../en/ch05-daily.xml:680
692.7173 +msgid "More useful diffs"
692.7174 +msgstr "更有用的差异"
692.7175 +
692.7176 +#. type: Content of: <book><chapter><sect1><para>
692.7177 +#: ../en/ch05-daily.xml:682
692.7178 +msgid ""
692.7179 +"The default output of the <command role=\"hg-cmd\">hg diff</command> command "
692.7180 +"is backwards compatible with the regular <command>diff</command> command, but "
692.7181 +"this has some drawbacks."
692.7182 +msgstr ""
692.7183 +
692.7184 +#. type: Content of: <book><chapter><sect1><para>
692.7185 +#: ../en/ch05-daily.xml:687
692.7186 +msgid ""
692.7187 +"Consider the case where we use <command role=\"hg-cmd\">hg rename</command> "
692.7188 +"to rename a file."
692.7189 +msgstr ""
692.7190 +"设想我们使用 <command role=\"hg-cmd\">hg rename</command> 命令来改名文件。"
692.7191 +
692.7192 +#. type: Content of: <book><chapter><sect1><para>
692.7193 +#: ../en/ch05-daily.xml:692
692.7194 +msgid ""
692.7195 +"The output of <command role=\"hg-cmd\">hg diff</command> above obscures the "
692.7196 +"fact that we simply renamed a file.  The <command role=\"hg-cmd\">hg diff</"
692.7197 +"command> command accepts an option, <option>--git</option> or <option>-g</"
692.7198 +"option>, to use a newer diff format that displays such information in a more "
692.7199 +"readable form."
692.7200 +msgstr ""
692.7201 +
692.7202 +#. type: Content of: <book><chapter><sect1><para>
692.7203 +#: ../en/ch05-daily.xml:701
692.7204 +msgid ""
692.7205 +"This option also helps with a case that can otherwise be confusing: a file "
692.7206 +"that appears to be modified according to <command role=\"hg-cmd\">hg status</"
692.7207 +"command>, but for which <command role=\"hg-cmd\">hg diff</command> prints "
692.7208 +"nothing. This situation can arise if we change the file's execute permissions."
692.7209 +msgstr ""
692.7210 +
692.7211 +#. type: Content of: <book><chapter><sect1><para>
692.7212 +#: ../en/ch05-daily.xml:710
692.7213 +msgid ""
692.7214 +"The normal <command>diff</command> command pays no attention to file "
692.7215 +"permissions, which is why <command role=\"hg-cmd\">hg diff</command> prints "
692.7216 +"nothing by default.  If we supply it with the <option>-g</option> option, it "
692.7217 +"tells us what really happened."
692.7218 +msgstr ""
692.7219 +
692.7220 +#. type: Content of: <book><chapter><sect1><title>
692.7221 +#: ../en/ch05-daily.xml:720
692.7222 +msgid "Which files to manage, and which to avoid"
692.7223 +msgstr "需要管理哪些文件,应该避免的事情"
692.7224 +
692.7225 +#. type: Content of: <book><chapter><sect1><para>
692.7226 +#: ../en/ch05-daily.xml:722
692.7227 +msgid ""
692.7228 +"Revision control systems are generally best at managing text files that are "
692.7229 +"written by humans, such as source code, where the files do not change much "
692.7230 +"from one revision to the next.  Some centralized revision control systems can "
692.7231 +"also deal tolerably well with binary files, such as bitmap images."
692.7232 +msgstr ""
692.7233 +
692.7234 +#. type: Content of: <book><chapter><sect1><para>
692.7235 +#: ../en/ch05-daily.xml:728
692.7236 +msgid ""
692.7237 +"For instance, a game development team will typically manage both its source "
692.7238 +"code and all of its binary assets (e.g. geometry data, textures, map layouts) "
692.7239 +"in a revision control system."
692.7240 +msgstr ""
692.7241 +
692.7242 +#. type: Content of: <book><chapter><sect1><para>
692.7243 +#: ../en/ch05-daily.xml:733
692.7244 +msgid ""
692.7245 +"Because it is usually impossible to merge two conflicting modifications to a "
692.7246 +"binary file, centralized systems often provide a file locking mechanism that "
692.7247 +"allow a user to say <quote>I am the only person who can edit this file</"
692.7248 +"quote>."
692.7249 +msgstr ""
692.7250 +
692.7251 +#. type: Content of: <book><chapter><sect1><para>
692.7252 +#: ../en/ch05-daily.xml:739
692.7253 +msgid ""
692.7254 +"Compared to a centralized system, a distributed revision control system "
692.7255 +"changes some of the factors that guide decisions over which files to manage "
692.7256 +"and how."
692.7257 +msgstr ""
692.7258 +
692.7259 +#. type: Content of: <book><chapter><sect1><para>
692.7260 +#: ../en/ch05-daily.xml:743
692.7261 +msgid ""
692.7262 +"For instance, a distributed revision control system cannot, by its nature, "
692.7263 +"offer a file locking facility.  There is thus no built-in mechanism to "
692.7264 +"prevent two people from making conflicting changes to a binary file.  If you "
692.7265 +"have a team where several people may be editing binary files frequently, it "
692.7266 +"may not be a good idea to use Mercurial&emdash;or any other distributed "
692.7267 +"revision control system&emdash;to manage those files."
692.7268 +msgstr ""
692.7269 +
692.7270 +#. type: Content of: <book><chapter><sect1><para>
692.7271 +#: ../en/ch05-daily.xml:751
692.7272 +msgid ""
692.7273 +"When storing modifications to a file, Mercurial usually saves only the "
692.7274 +"differences between the previous and current versions of the file.  For most "
692.7275 +"text files, this is extremely efficient. However, some files (particularly "
692.7276 +"binary files) are laid out in such a way that even a small change to a file's "
692.7277 +"logical content results in many or most of the bytes inside the file "
692.7278 +"changing.  For instance, compressed files are particularly susceptible to "
692.7279 +"this. If the differences between each successive version of a file are always "
692.7280 +"large, Mercurial will not be able to store the file's revision history very "
692.7281 +"efficiently.  This can affect both local storage needs and the amount of time "
692.7282 +"it takes to clone a repository."
692.7283 +msgstr ""
692.7284 +
692.7285 +#. type: Content of: <book><chapter><sect1><para>
692.7286 +#: ../en/ch05-daily.xml:764
692.7287 +msgid ""
692.7288 +"To get an idea of how this could affect you in practice, suppose you want to "
692.7289 +"use Mercurial to manage an OpenOffice document.  OpenOffice stores documents "
692.7290 +"on disk as compressed zip files. Edit even a single letter of your document "
692.7291 +"in OpenOffice, and almost every byte in the entire file will change when you "
692.7292 +"save it. Now suppose that file is 2MB in size.  Because most of the file "
692.7293 +"changes every time you save, Mercurial will have to store all 2MB of the file "
692.7294 +"every time you commit, even though from your perspective, perhaps only a few "
692.7295 +"words are changing each time.  A single frequently-edited file that is not "
692.7296 +"friendly to Mercurial's storage assumptions can easily have an outsized "
692.7297 +"effect on the size of the repository."
692.7298 +msgstr ""
692.7299 +
692.7300 +#. type: Content of: <book><chapter><sect1><para>
692.7301 +#: ../en/ch05-daily.xml:777
692.7302 +msgid ""
692.7303 +"Even worse, if both you and someone else edit the OpenOffice document you're "
692.7304 +"working on, there is no useful way to merge your work. In fact, there isn't "
692.7305 +"even a good way to tell what the differences are between your respective "
692.7306 +"changes."
692.7307 +msgstr ""
692.7308 +
692.7309 +#. type: Content of: <book><chapter><sect1><para>
692.7310 +#: ../en/ch05-daily.xml:782
692.7311 +msgid ""
692.7312 +"There are thus a few clear recommendations about specific kinds of files to "
692.7313 +"be very careful with."
692.7314 +msgstr ""
692.7315 +
692.7316 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.7317 +#: ../en/ch05-daily.xml:787
692.7318 +msgid ""
692.7319 +"Files that are very large and incompressible, e.g. ISO CD-ROM images, will by "
692.7320 +"virtue of sheer size make clones over a network very slow."
692.7321 +msgstr ""
692.7322 +
692.7323 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.7324 +#: ../en/ch05-daily.xml:792
692.7325 +msgid ""
692.7326 +"Files that change a lot from one revision to the next may be expensive to "
692.7327 +"store if you edit them frequently, and conflicts due to concurrent edits may "
692.7328 +"be difficult to resolve."
692.7329 +msgstr ""
692.7330 +
692.7331 +#. type: Content of: <book><chapter><sect1><title>
692.7332 +#: ../en/ch05-daily.xml:801
692.7333 +msgid "Backups and mirroring"
692.7334 +msgstr "备份与镜像"
692.7335 +
692.7336 +#. type: Content of: <book><chapter><sect1><para>
692.7337 +#: ../en/ch05-daily.xml:803
692.7338 +msgid ""
692.7339 +"Since Mercurial maintains a complete copy of history in each clone, everyone "
692.7340 +"who uses Mercurial to collaborate on a project can potentially act as a "
692.7341 +"source of backups in the event of a catastrophe.  If a central repository "
692.7342 +"becomes unavailable, you can construct a replacement simply by cloning a copy "
692.7343 +"of the repository from one contributor, and pulling any changes they may not "
692.7344 +"have seen from others."
692.7345 +msgstr ""
692.7346 +
692.7347 +#. type: Content of: <book><chapter><sect1><para>
692.7348 +#: ../en/ch05-daily.xml:811
692.7349 +msgid ""
692.7350 +"It is simple to use Mercurial to perform off-site backups and remote "
692.7351 +"mirrors.  Set up a periodic job (e.g. via the <command>cron</command> "
692.7352 +"command) on a remote server to pull changes from your master repositories "
692.7353 +"every hour.  This will only be tricky in the unlikely case that the number of "
692.7354 +"master repositories you maintain changes frequently, in which case you'll "
692.7355 +"need to do a little scripting to refresh the list of repositories to back up."
692.7356 +msgstr ""
692.7357 +
692.7358 +#. type: Content of: <book><chapter><sect1><para>
692.7359 +#: ../en/ch05-daily.xml:820
692.7360 +msgid ""
692.7361 +"If you perform traditional backups of your master repositories to tape or "
692.7362 +"disk, and you want to back up a repository named <filename>myrepo</filename>, "
692.7363 +"use <command>hg clone -U myrepo myrepo.bak</command> to create a clone of "
692.7364 +"<filename>myrepo</filename> before you start your backups.  The <option>-U</"
692.7365 +"option> option doesn't check out a working directory after the clone "
692.7366 +"completes, since that would be superfluous and make the backup take longer."
692.7367 +msgstr ""
692.7368 +
692.7369 +#. type: Content of: <book><chapter><sect1><para>
692.7370 +#: ../en/ch05-daily.xml:829
692.7371 +msgid ""
692.7372 +"If you then back up <filename>myrepo.bak</filename> instead of "
692.7373 +"<filename>myrepo</filename>, you will be guaranteed to have a consistent "
692.7374 +"snapshot of your repository that won't be pushed to by an insomniac developer "
692.7375 +"in mid-backup."
692.7376 +msgstr ""
692.7377 +
692.7378 +#. type: Content of: <book><chapter><title>
692.7379 +#: ../en/ch06-collab.xml:5
692.7380 +msgid "Collaborating with other people"
692.7381 +msgstr "团体协作"
692.7382 +
692.7383 +#. type: Content of: <book><chapter><para>
692.7384 +#: ../en/ch06-collab.xml:7
692.7385 +msgid ""
692.7386 +"As a completely decentralised tool, Mercurial doesn't impose any policy on "
692.7387 +"how people ought to work with each other.  However, if you're new to "
692.7388 +"distributed revision control, it helps to have some tools and examples in "
692.7389 +"mind when you're thinking about possible workflow models."
692.7390 +msgstr ""
692.7391 +
692.7392 +#. type: Content of: <book><chapter><sect1><title>
692.7393 +#: ../en/ch06-collab.xml:14
692.7394 +msgid "Mercurial's web interface"
692.7395 +msgstr "Mercurial 的 web 接口"
692.7396 +
692.7397 +#. type: Content of: <book><chapter><sect1><para>
692.7398 +#: ../en/ch06-collab.xml:16
692.7399 +msgid ""
692.7400 +"Mercurial has a powerful web interface that provides several useful "
692.7401 +"capabilities."
692.7402 +msgstr ""
692.7403 +
692.7404 +#. type: Content of: <book><chapter><sect1><para>
692.7405 +#: ../en/ch06-collab.xml:19
692.7406 +msgid ""
692.7407 +"For interactive use, the web interface lets you browse a single repository or "
692.7408 +"a collection of repositories.  You can view the history of a repository, "
692.7409 +"examine each change (comments and diffs), and view the contents of each "
692.7410 +"directory and file.  You can even get a view of history that gives a "
692.7411 +"graphical view of the relationships between individual changes and merges."
692.7412 +msgstr ""
692.7413 +
692.7414 +#. type: Content of: <book><chapter><sect1><para>
692.7415 +#: ../en/ch06-collab.xml:26
692.7416 +msgid ""
692.7417 +"Also for human consumption, the web interface provides Atom and RSS feeds of "
692.7418 +"the changes in a repository.  This lets you <quote>subscribe</quote> to a "
692.7419 +"repository using your favorite feed reader, and be automatically notified of "
692.7420 +"activity in that repository as soon as it happens.  I find this capability "
692.7421 +"much more convenient than the model of subscribing to a mailing list to which "
692.7422 +"notifications are sent, as it requires no additional configuration on the "
692.7423 +"part of whoever is serving the repository."
692.7424 +msgstr ""
692.7425 +
692.7426 +#. type: Content of: <book><chapter><sect1><para>
692.7427 +#: ../en/ch06-collab.xml:36
692.7428 +msgid ""
692.7429 +"The web interface also lets remote users clone a repository, pull changes "
692.7430 +"from it, and (when the server is configured to permit it) push changes back "
692.7431 +"to it.  Mercurial's HTTP tunneling protocol aggressively compresses data, so "
692.7432 +"that it works efficiently even over low-bandwidth network connections."
692.7433 +msgstr ""
692.7434 +
692.7435 +#. type: Content of: <book><chapter><sect1><para>
692.7436 +#: ../en/ch06-collab.xml:42
692.7437 +msgid ""
692.7438 +"The easiest way to get started with the web interface is to use your web "
692.7439 +"browser to visit an existing repository, such as the master Mercurial "
692.7440 +"repository at <ulink url=\"http://www.selenic.com/repo/hg\">http://www."
692.7441 +"selenic.com/repo/hg</ulink>."
692.7442 +msgstr ""
692.7443 +
692.7444 +#. type: Content of: <book><chapter><sect1><para>
692.7445 +#: ../en/ch06-collab.xml:47
692.7446 +msgid ""
692.7447 +"If you're interested in providing a web interface to your own repositories, "
692.7448 +"there are several good ways to do this."
692.7449 +msgstr ""
692.7450 +
692.7451 +#. type: Content of: <book><chapter><sect1><para>
692.7452 +#: ../en/ch06-collab.xml:51
692.7453 +msgid ""
692.7454 +"The easiest and fastest way to get started in an informal environment is to "
692.7455 +"use the <command role=\"hg-cmd\">hg serve</command> command, which is best "
692.7456 +"suited to short-term <quote>lightweight</quote> serving.  See <xref linkend="
692.7457 +"\"sec:collab:serve\"/> below for details of how to use this command."
692.7458 +msgstr ""
692.7459 +
692.7460 +#. type: Content of: <book><chapter><sect1><para>
692.7461 +#: ../en/ch06-collab.xml:58
692.7462 +msgid ""
692.7463 +"For longer-lived repositories that you'd like to have permanently available, "
692.7464 +"there are several public hosting services available.  Some are free to open "
692.7465 +"source projects, while others offer paid commercial hosting.  An up-to-date "
692.7466 +"list is available at <ulink url=\"http://www.selenic.com/mercurial/wiki/index."
692.7467 +"cgi/MercurialHosting\">http://www.selenic.com/mercurial/wiki/index.cgi/"
692.7468 +"MercurialHosting</ulink>."
692.7469 +msgstr ""
692.7470 +
692.7471 +#. type: Content of: <book><chapter><sect1><para>
692.7472 +#: ../en/ch06-collab.xml:65
692.7473 +msgid ""
692.7474 +"If you would prefer to host your own repositories, Mercurial has built-in "
692.7475 +"support for several popular hosting technologies, most notably CGI (Common "
692.7476 +"Gateway Interface), and WSGI (Web Services Gateway Interface).  See <xref "
692.7477 +"linkend=\"sec:collab:cgi\"/> for details of CGI and WSGI configuration."
692.7478 +msgstr ""
692.7479 +
692.7480 +#. type: Content of: <book><chapter><sect1><title>
692.7481 +#: ../en/ch06-collab.xml:74
692.7482 +msgid "Collaboration models"
692.7483 +msgstr "协作模型"
692.7484 +
692.7485 +#. type: Content of: <book><chapter><sect1><para>
692.7486 +#: ../en/ch06-collab.xml:76
692.7487 +msgid ""
692.7488 +"With a suitably flexible tool, making decisions about workflow is much more "
692.7489 +"of a social engineering challenge than a technical one. Mercurial imposes few "
692.7490 +"limitations on how you can structure the flow of work in a project, so it's "
692.7491 +"up to you and your group to set up and live with a model that matches your "
692.7492 +"own particular needs."
692.7493 +msgstr ""
692.7494 +
692.7495 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.7496 +#: ../en/ch06-collab.xml:84
692.7497 +msgid "Factors to keep in mind"
692.7498 +msgstr "要牢记的因素"
692.7499 +
692.7500 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7501 +#: ../en/ch06-collab.xml:86
692.7502 +msgid ""
692.7503 +"The most important aspect of any model that you must keep in mind is how well "
692.7504 +"it matches the needs and capabilities of the people who will be using it.  "
692.7505 +"This might seem self-evident; even so, you still can't afford to forget it "
692.7506 +"for a moment."
692.7507 +msgstr ""
692.7508 +
692.7509 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7510 +#: ../en/ch06-collab.xml:92
692.7511 +msgid ""
692.7512 +"I once put together a workflow model that seemed to make perfect sense to me, "
692.7513 +"but that caused a considerable amount of consternation and strife within my "
692.7514 +"development team.  In spite of my attempts to explain why we needed a complex "
692.7515 +"set of branches, and how changes ought to flow between them, a few team "
692.7516 +"members revolted.  Even though they were smart people, they didn't want to "
692.7517 +"pay attention to the constraints we were operating under, or face the "
692.7518 +"consequences of those constraints in the details of the model that I was "
692.7519 +"advocating."
692.7520 +msgstr ""
692.7521 +
692.7522 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7523 +#: ../en/ch06-collab.xml:102
692.7524 +msgid ""
692.7525 +"Don't sweep foreseeable social or technical problems under the rug. Whatever "
692.7526 +"scheme you put into effect, you should plan for mistakes and problem "
692.7527 +"scenarios.  Consider adding automated machinery to prevent, or quickly "
692.7528 +"recover from, trouble that you can anticipate.  As an example, if you intend "
692.7529 +"to have a branch with not-for-release changes in it, you'd do well to think "
692.7530 +"early about the possibility that someone might accidentally merge those "
692.7531 +"changes into a release branch.  You could avoid this particular problem by "
692.7532 +"writing a hook that prevents changes from being merged from an inappropriate "
692.7533 +"branch."
692.7534 +msgstr ""
692.7535 +
692.7536 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.7537 +#: ../en/ch06-collab.xml:116
692.7538 +msgid "Informal anarchy"
692.7539 +msgstr "无政府状态"
692.7540 +
692.7541 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7542 +#: ../en/ch06-collab.xml:118
692.7543 +msgid ""
692.7544 +"I wouldn't suggest an <quote>anything goes</quote> approach as something "
692.7545 +"sustainable, but it's a model that's easy to grasp, and it works perfectly "
692.7546 +"well in a few unusual situations."
692.7547 +msgstr ""
692.7548 +
692.7549 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7550 +#: ../en/ch06-collab.xml:123
692.7551 +msgid ""
692.7552 +"As one example, many projects have a loose-knit group of collaborators who "
692.7553 +"rarely physically meet each other.  Some groups like to overcome the "
692.7554 +"isolation of working at a distance by organizing occasional <quote>sprints</"
692.7555 +"quote>.  In a sprint, a number of people get together in a single location (a "
692.7556 +"company's conference room, a hotel meeting room, that kind of place) and "
692.7557 +"spend several days more or less locked in there, hacking intensely on a "
692.7558 +"handful of projects."
692.7559 +msgstr ""
692.7560 +
692.7561 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7562 +#: ../en/ch06-collab.xml:132
692.7563 +msgid ""
692.7564 +"A sprint or a hacking session in a coffee shop are the perfect places to use "
692.7565 +"the <command role=\"hg-cmd\">hg serve</command> command, since <command role="
692.7566 +"\"hg-cmd\">hg serve</command> does not require any fancy server "
692.7567 +"infrastructure.  You can get started with <command role=\"hg-cmd\">hg serve</"
692.7568 +"command> in moments, by reading <xref linkend=\"sec:collab:serve\"/> below.  "
692.7569 +"Then simply tell the person next to you that you're running a server, send "
692.7570 +"the URL to them in an instant message, and you immediately have a quick-"
692.7571 +"turnaround way to work together.  They can type your URL into their web "
692.7572 +"browser and quickly review your changes; or they can pull a bugfix from you "
692.7573 +"and verify it; or they can clone a branch containing a new feature and try it "
692.7574 +"out."
692.7575 +msgstr ""
692.7576 +
692.7577 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7578 +#: ../en/ch06-collab.xml:146
692.7579 +msgid ""
692.7580 +"The charm, and the problem, with doing things in an ad hoc fashion like this "
692.7581 +"is that only people who know about your changes, and where they are, can see "
692.7582 +"them.  Such an informal approach simply doesn't scale beyond a handful "
692.7583 +"people, because each individual needs to know about <emphasis>n</emphasis> "
692.7584 +"different repositories to pull from."
692.7585 +msgstr ""
692.7586 +
692.7587 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.7588 +#: ../en/ch06-collab.xml:156
692.7589 +msgid "A single central repository"
692.7590 +msgstr "单一中央版本库"
692.7591 +
692.7592 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7593 +#: ../en/ch06-collab.xml:158
692.7594 +msgid ""
692.7595 +"For smaller projects migrating from a centralised revision control tool, "
692.7596 +"perhaps the easiest way to get started is to have changes flow through a "
692.7597 +"single shared central repository.  This is also the most common "
692.7598 +"<quote>building block</quote> for more ambitious workflow schemes."
692.7599 +msgstr ""
692.7600 +
692.7601 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7602 +#: ../en/ch06-collab.xml:164
692.7603 +msgid ""
692.7604 +"Contributors start by cloning a copy of this repository.  They can pull "
692.7605 +"changes from it whenever they need to, and some (perhaps all) developers have "
692.7606 +"permission to push a change back when they're ready for other people to see "
692.7607 +"it."
692.7608 +msgstr ""
692.7609 +
692.7610 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7611 +#: ../en/ch06-collab.xml:169
692.7612 +msgid ""
692.7613 +"Under this model, it can still often make sense for people to pull changes "
692.7614 +"directly from each other, without going through the central repository.  "
692.7615 +"Consider a case in which I have a tentative bug fix, but I am worried that if "
692.7616 +"I were to publish it to the central repository, it might subsequently break "
692.7617 +"everyone else's trees as they pull it.  To reduce the potential for damage, I "
692.7618 +"can ask you to clone my repository into a temporary repository of your own "
692.7619 +"and test it.  This lets us put off publishing the potentially unsafe change "
692.7620 +"until it has had a little testing."
692.7621 +msgstr ""
692.7622 +
692.7623 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7624 +#: ../en/ch06-collab.xml:180
692.7625 +msgid ""
692.7626 +"If a team is hosting its own repository in this kind of scenario, people will "
692.7627 +"usually use the <command>ssh</command> protocol to securely push changes to "
692.7628 +"the central repository, as documented in <xref linkend=\"sec:collab:ssh\"/>.  "
692.7629 +"It's also usual to publish a read-only copy of the repository over HTTP, as "
692.7630 +"in <xref linkend=\"sec:collab:cgi\"/>. Publishing over HTTP satisfies the "
692.7631 +"needs of people who don't have push access, and those who want to use web "
692.7632 +"browsers to browse the repository's history."
692.7633 +msgstr ""
692.7634 +
692.7635 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.7636 +#: ../en/ch06-collab.xml:193
692.7637 +msgid "A hosted central repository"
692.7638 +msgstr "托管的中央版本库"
692.7639 +
692.7640 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7641 +#: ../en/ch06-collab.xml:195
692.7642 +msgid ""
692.7643 +"A wonderful thing about public hosting services like <ulink url=\"http://"
692.7644 +"bitbucket.org/\">Bitbucket</ulink> is that not only do they handle the fiddly "
692.7645 +"server configuration details, such as user accounts, authentication, and "
692.7646 +"secure wire protocols, they provide additional infrastructure to make this "
692.7647 +"model work well."
692.7648 +msgstr ""
692.7649 +
692.7650 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7651 +#: ../en/ch06-collab.xml:202
692.7652 +msgid ""
692.7653 +"For instance, a well-engineered hosting service will let people clone their "
692.7654 +"own copies of a repository with a single click.  This lets people work in "
692.7655 +"separate spaces and share their changes when they're ready."
692.7656 +msgstr ""
692.7657 +
692.7658 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7659 +#: ../en/ch06-collab.xml:207
692.7660 +msgid ""
692.7661 +"In addition, a good hosting service will let people communicate with each "
692.7662 +"other, for instance to say <quote>there are changes ready for you to review "
692.7663 +"in this tree</quote>."
692.7664 +msgstr ""
692.7665 +
692.7666 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.7667 +#: ../en/ch06-collab.xml:214
692.7668 +msgid "Working with multiple branches"
692.7669 +msgstr "使用多个分支工作"
692.7670 +
692.7671 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7672 +#: ../en/ch06-collab.xml:216
692.7673 +msgid ""
692.7674 +"Projects of any significant size naturally tend to make progress on several "
692.7675 +"fronts simultaneously.  In the case of software, it's common for a project to "
692.7676 +"go through periodic official releases.  A release might then go into "
692.7677 +"<quote>maintenance mode</quote> for a while after its first publication; "
692.7678 +"maintenance releases tend to contain only bug fixes, not new features.  In "
692.7679 +"parallel with these maintenance releases, one or more future releases may be "
692.7680 +"under development.  People normally use the word <quote>branch</quote> to "
692.7681 +"refer to one of these many slightly different directions in which development "
692.7682 +"is proceeding."
692.7683 +msgstr ""
692.7684 +
692.7685 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7686 +#: ../en/ch06-collab.xml:229
692.7687 +msgid ""
692.7688 +"Mercurial is particularly well suited to managing a number of simultaneous, "
692.7689 +"but not identical, branches.  Each <quote>development direction</quote> can "
692.7690 +"live in its own central repository, and you can merge changes from one to "
692.7691 +"another as the need arises.  Because repositories are independent of each "
692.7692 +"other, unstable changes in a development branch will never affect a stable "
692.7693 +"branch unless someone explicitly merges those changes into the stable branch."
692.7694 +msgstr ""
692.7695 +
692.7696 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7697 +#: ../en/ch06-collab.xml:238
692.7698 +msgid ""
692.7699 +"Here's an example of how this can work in practice.  Let's say you have one "
692.7700 +"<quote>main branch</quote> on a central server."
692.7701 +msgstr ""
692.7702 +
692.7703 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7704 +#: ../en/ch06-collab.xml:244
692.7705 +msgid "People clone it, make changes locally, test them, and push them back."
692.7706 +msgstr ""
692.7707 +
692.7708 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7709 +#: ../en/ch06-collab.xml:247
692.7710 +msgid ""
692.7711 +"Once the main branch reaches a release milestone, you can use the <command "
692.7712 +"role=\"hg-cmd\">hg tag</command> command to give a permanent name to the "
692.7713 +"milestone revision."
692.7714 +msgstr ""
692.7715 +
692.7716 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7717 +#: ../en/ch06-collab.xml:253
692.7718 +msgid "Let's say some ongoing development occurs on the main branch."
692.7719 +msgstr ""
692.7720 +
692.7721 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7722 +#: ../en/ch06-collab.xml:258
692.7723 +msgid ""
692.7724 +"Using the tag that was recorded at the milestone, people who clone that "
692.7725 +"repository at any time in the future can use <command role=\"hg-cmd\">hg "
692.7726 +"update</command> to get a copy of the working directory exactly as it was "
692.7727 +"when that tagged revision was committed."
692.7728 +msgstr ""
692.7729 +
692.7730 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7731 +#: ../en/ch06-collab.xml:266
692.7732 +msgid ""
692.7733 +"In addition, immediately after the main branch is tagged, we can then clone "
692.7734 +"the main branch on the server to a new <quote>stable</quote> branch, also on "
692.7735 +"the server."
692.7736 +msgstr ""
692.7737 +
692.7738 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7739 +#: ../en/ch06-collab.xml:272
692.7740 +msgid ""
692.7741 +"If we need to make a change to the stable branch, we can then clone "
692.7742 +"<emphasis>that</emphasis> repository, make our changes, commit, and push our "
692.7743 +"changes back there."
692.7744 +msgstr ""
692.7745 +
692.7746 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7747 +#: ../en/ch06-collab.xml:279
692.7748 +msgid ""
692.7749 +"Because Mercurial repositories are independent, and Mercurial doesn't move "
692.7750 +"changes around automatically, the stable and main branches are "
692.7751 +"<emphasis>isolated</emphasis> from each other.  The changes that we made on "
692.7752 +"the main branch don't <quote>leak</quote> to the stable branch, and vice "
692.7753 +"versa."
692.7754 +msgstr ""
692.7755 +
692.7756 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7757 +#: ../en/ch06-collab.xml:286
692.7758 +msgid ""
692.7759 +"We'll often want all of our bugfixes on the stable branch to show up on the "
692.7760 +"main branch, too.  Rather than rewrite a bugfix on the main branch, we can "
692.7761 +"simply pull and merge changes from the stable to the main branch, and "
692.7762 +"Mercurial will bring those bugfixes in for us."
692.7763 +msgstr ""
692.7764 +
692.7765 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7766 +#: ../en/ch06-collab.xml:294
692.7767 +msgid ""
692.7768 +"The main branch will still contain changes that are not on the stable branch, "
692.7769 +"but it will also contain all of the bugfixes from the stable branch.  The "
692.7770 +"stable branch remains unaffected by these changes, since changes are only "
692.7771 +"flowing from the stable to the main branch, and not the other way."
692.7772 +msgstr ""
692.7773 +
692.7774 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.7775 +#: ../en/ch06-collab.xml:303 ../en/ch06-collab.xml:313
692.7776 +msgid "Feature branches"
692.7777 +msgstr "特性分支"
692.7778 +
692.7779 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7780 +#: ../en/ch06-collab.xml:305
692.7781 +msgid ""
692.7782 +"For larger projects, an effective way to manage change is to break up a team "
692.7783 +"into smaller groups.  Each group has a shared branch of its own, cloned from "
692.7784 +"a single <quote>master</quote> branch used by the entire project.  People "
692.7785 +"working on an individual branch are typically quite isolated from "
692.7786 +"developments on other branches."
692.7787 +msgstr ""
692.7788 +
692.7789 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.7790 +#: ../en/ch06-collab.xml:315
692.7791 +msgid ""
692.7792 +"<imageobject><imagedata width=\"100%\" fileref=\"figs/feature-branches.png\"/"
692.7793 +"></imageobject>"
692.7794 +msgstr ""
692.7795 +
692.7796 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7797 +#: ../en/ch06-collab.xml:320
692.7798 +msgid ""
692.7799 +"When a particular feature is deemed to be in suitable shape, someone on that "
692.7800 +"feature team pulls and merges from the master branch into the feature branch, "
692.7801 +"then pushes back up to the master branch."
692.7802 +msgstr ""
692.7803 +
692.7804 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.7805 +#: ../en/ch06-collab.xml:327
692.7806 +msgid "The release train"
692.7807 +msgstr "发布列车"
692.7808 +
692.7809 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7810 +#: ../en/ch06-collab.xml:329
692.7811 +msgid ""
692.7812 +"Some projects are organized on a <quote>train</quote> basis: a release is "
692.7813 +"scheduled to happen every few months, and whatever features are ready when "
692.7814 +"the <quote>train</quote> is ready to leave are allowed in."
692.7815 +msgstr ""
692.7816 +
692.7817 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7818 +#: ../en/ch06-collab.xml:334
692.7819 +msgid ""
692.7820 +"This model resembles working with feature branches.  The difference is that "
692.7821 +"when a feature branch misses a train, someone on the feature team pulls and "
692.7822 +"merges the changes that went out on that train release into the feature "
692.7823 +"branch, and the team continues its work on top of that release so that their "
692.7824 +"feature can make the next release."
692.7825 +msgstr ""
692.7826 +
692.7827 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.7828 +#: ../en/ch06-collab.xml:343
692.7829 +msgid "The Linux kernel model"
692.7830 +msgstr "Linux 内核模型"
692.7831 +
692.7832 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7833 +#: ../en/ch06-collab.xml:345
692.7834 +msgid ""
692.7835 +"The development of the Linux kernel has a shallow hierarchical structure, "
692.7836 +"surrounded by a cloud of apparent chaos.  Because most Linux developers use "
692.7837 +"<command>git</command>, a distributed revision control tool with capabilities "
692.7838 +"similar to Mercurial, it's useful to describe the way work flows in that "
692.7839 +"environment; if you like the ideas, the approach translates well across tools."
692.7840 +msgstr ""
692.7841 +
692.7842 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7843 +#: ../en/ch06-collab.xml:353
692.7844 +msgid ""
692.7845 +"At the center of the community sits Linus Torvalds, the creator of Linux.  He "
692.7846 +"publishes a single source repository that is considered the "
692.7847 +"<quote>authoritative</quote> current tree by the entire developer community. "
692.7848 +"Anyone can clone Linus's tree, but he is very choosy about whose trees he "
692.7849 +"pulls from."
692.7850 +msgstr ""
692.7851 +
692.7852 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7853 +#: ../en/ch06-collab.xml:360
692.7854 +msgid ""
692.7855 +"Linus has a number of <quote>trusted lieutenants</quote>.  As a general rule, "
692.7856 +"he pulls whatever changes they publish, in most cases without even reviewing "
692.7857 +"those changes.  Some of those lieutenants are generally agreed to be "
692.7858 +"<quote>maintainers</quote>, responsible for specific subsystems within the "
692.7859 +"kernel.  If a random kernel hacker wants to make a change to a subsystem that "
692.7860 +"they want to end up in Linus's tree, they must find out who the subsystem's "
692.7861 +"maintainer is, and ask that maintainer to take their change.  If the "
692.7862 +"maintainer reviews their changes and agrees to take them, they'll pass them "
692.7863 +"along to Linus in due course."
692.7864 +msgstr ""
692.7865 +
692.7866 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7867 +#: ../en/ch06-collab.xml:372
692.7868 +msgid ""
692.7869 +"Individual lieutenants have their own approaches to reviewing, accepting, and "
692.7870 +"publishing changes; and for deciding when to feed them to Linus.  In "
692.7871 +"addition, there are several well known branches that people use for different "
692.7872 +"purposes.  For example, a few people maintain <quote>stable</quote> "
692.7873 +"repositories of older versions of the kernel, to which they apply critical "
692.7874 +"fixes as needed.  Some maintainers publish multiple trees: one for "
692.7875 +"experimental changes; one for changes that they are about to feed upstream; "
692.7876 +"and so on.  Others just publish a single tree."
692.7877 +msgstr ""
692.7878 +
692.7879 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7880 +#: ../en/ch06-collab.xml:383
692.7881 +msgid ""
692.7882 +"This model has two notable features.  The first is that it's <quote>pull "
692.7883 +"only</quote>.  You have to ask, convince, or beg another developer to take a "
692.7884 +"change from you, because there are almost no trees to which more than one "
692.7885 +"person can push, and there's no way to push changes into a tree that someone "
692.7886 +"else controls."
692.7887 +msgstr ""
692.7888 +
692.7889 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7890 +#: ../en/ch06-collab.xml:390
692.7891 +msgid ""
692.7892 +"The second is that it's based on reputation and acclaim.  If you're an "
692.7893 +"unknown, Linus will probably ignore changes from you without even "
692.7894 +"responding.  But a subsystem maintainer will probably review them, and will "
692.7895 +"likely take them if they pass their criteria for suitability. The more "
692.7896 +"<quote>good</quote> changes you contribute to a maintainer, the more likely "
692.7897 +"they are to trust your judgment and accept your changes.  If you're well-"
692.7898 +"known and maintain a long-lived branch for something Linus hasn't yet "
692.7899 +"accepted, people with similar interests may pull your changes regularly to "
692.7900 +"keep up with your work."
692.7901 +msgstr ""
692.7902 +
692.7903 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7904 +#: ../en/ch06-collab.xml:401
692.7905 +msgid ""
692.7906 +"Reputation and acclaim don't necessarily cross subsystem or <quote>people</"
692.7907 +"quote> boundaries.  If you're a respected but specialised storage hacker, and "
692.7908 +"you try to fix a networking bug, that change will receive a level of scrutiny "
692.7909 +"from a network maintainer comparable to a change from a complete stranger."
692.7910 +msgstr ""
692.7911 +
692.7912 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7913 +#: ../en/ch06-collab.xml:408
692.7914 +msgid ""
692.7915 +"To people who come from more orderly project backgrounds, the comparatively "
692.7916 +"chaotic Linux kernel development process often seems completely insane.  It's "
692.7917 +"subject to the whims of individuals; people make sweeping changes whenever "
692.7918 +"they deem it appropriate; and the pace of development is astounding.  And yet "
692.7919 +"Linux is a highly successful, well-regarded piece of software."
692.7920 +msgstr ""
692.7921 +
692.7922 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.7923 +#: ../en/ch06-collab.xml:418
692.7924 +msgid "Pull-only versus shared-push collaboration"
692.7925 +msgstr "只读与共享写协作"
692.7926 +
692.7927 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7928 +#: ../en/ch06-collab.xml:420
692.7929 +msgid ""
692.7930 +"A perpetual source of heat in the open source community is whether a "
692.7931 +"development model in which people only ever pull changes from others is "
692.7932 +"<quote>better than</quote> one in which multiple people can push changes to a "
692.7933 +"shared repository."
692.7934 +msgstr ""
692.7935 +
692.7936 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7937 +#: ../en/ch06-collab.xml:426
692.7938 +msgid ""
692.7939 +"Typically, the backers of the shared-push model use tools that actively "
692.7940 +"enforce this approach.  If you're using a centralised revision control tool "
692.7941 +"such as Subversion, there's no way to make a choice over which model you'll "
692.7942 +"use: the tool gives you shared-push, and if you want to do anything else, "
692.7943 +"you'll have to roll your own approach on top (such as applying a patch by "
692.7944 +"hand)."
692.7945 +msgstr ""
692.7946 +
692.7947 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7948 +#: ../en/ch06-collab.xml:434
692.7949 +msgid ""
692.7950 +"A good distributed revision control tool will support both models.  You and "
692.7951 +"your collaborators can then structure how you work together based on your own "
692.7952 +"needs and preferences, not on what contortions your tools force you into."
692.7953 +msgstr ""
692.7954 +
692.7955 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.7956 +#: ../en/ch06-collab.xml:441
692.7957 +msgid "Where collaboration meets branch management"
692.7958 +msgstr "协作与分支管理"
692.7959 +
692.7960 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.7961 +#: ../en/ch06-collab.xml:443
692.7962 +msgid ""
692.7963 +"Once you and your team set up some shared repositories and start propagating "
692.7964 +"changes back and forth between local and shared repos, you begin to face a "
692.7965 +"related, but slightly different challenge: that of managing the multiple "
692.7966 +"directions in which your team may be moving at once.  Even though this "
692.7967 +"subject is intimately related to how your team collaborates, it's dense "
692.7968 +"enough to merit treatment of its own, in <xref linkend=\"chap:branch\"/>."
692.7969 +msgstr ""
692.7970 +
692.7971 +#. type: Content of: <book><chapter><sect1><title>
692.7972 +#: ../en/ch06-collab.xml:455
692.7973 +msgid "The technical side of sharing"
692.7974 +msgstr "共享的技术因素"
692.7975 +
692.7976 +#. type: Content of: <book><chapter><sect1><para>
692.7977 +#: ../en/ch06-collab.xml:457
692.7978 +msgid ""
692.7979 +"The remainder of this chapter is devoted to the question of sharing changes "
692.7980 +"with your collaborators."
692.7981 +msgstr ""
692.7982 +
692.7983 +#. type: Content of: <book><chapter><sect1><title>
692.7984 +#: ../en/ch06-collab.xml:462
692.7985 +msgid "Informal sharing with <command role=\"hg-cmd\">hg serve</command>"
692.7986 +msgstr "使用 <command role=\"hg-cmd\">hg serve</command> 进行非正式共享"
692.7987 +
692.7988 +#. type: Content of: <book><chapter><sect1><para>
692.7989 +#: ../en/ch06-collab.xml:465
692.7990 +msgid ""
692.7991 +"Mercurial's <command role=\"hg-cmd\">hg serve</command> command is "
692.7992 +"wonderfully suited to small, tight-knit, and fast-paced group environments.  "
692.7993 +"It also provides a great way to get a feel for using Mercurial commands over "
692.7994 +"a network."
692.7995 +msgstr ""
692.7996 +
692.7997 +#. type: Content of: <book><chapter><sect1><para>
692.7998 +#: ../en/ch06-collab.xml:470
692.7999 +msgid ""
692.8000 +"Run <command role=\"hg-cmd\">hg serve</command> inside a repository, and in "
692.8001 +"under a second it will bring up a specialised HTTP server; this will accept "
692.8002 +"connections from any client, and serve up data for that repository until you "
692.8003 +"terminate it.  Anyone who knows the URL of the server you just started, and "
692.8004 +"can talk to your computer over the network, can then use a web browser or "
692.8005 +"Mercurial to read data from that repository.  A URL for a <command role=\"hg-"
692.8006 +"cmd\">hg serve</command> instance running on a laptop is likely to look "
692.8007 +"something like <literal>http://my-laptop.local:8000/</literal>."
692.8008 +msgstr ""
692.8009 +
692.8010 +#. type: Content of: <book><chapter><sect1><para>
692.8011 +#: ../en/ch06-collab.xml:481
692.8012 +msgid ""
692.8013 +"The <command role=\"hg-cmd\">hg serve</command> command is <emphasis>not</"
692.8014 +"emphasis> a general-purpose web server. It can do only two things:"
692.8015 +msgstr ""
692.8016 +
692.8017 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.8018 +#: ../en/ch06-collab.xml:485
692.8019 +msgid ""
692.8020 +"Allow people to browse the history of the repository it's serving, from their "
692.8021 +"normal web browsers."
692.8022 +msgstr ""
692.8023 +
692.8024 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.8025 +#: ../en/ch06-collab.xml:489
692.8026 +msgid ""
692.8027 +"Speak Mercurial's wire protocol, so that people can <command role=\"hg-cmd"
692.8028 +"\">hg clone</command> or <command role=\"hg-cmd\">hg pull</command> changes "
692.8029 +"from that repository."
692.8030 +msgstr ""
692.8031 +
692.8032 +#. type: Content of: <book><chapter><sect1><para>
692.8033 +#: ../en/ch06-collab.xml:494
692.8034 +msgid ""
692.8035 +"In particular, <command role=\"hg-cmd\">hg serve</command> won't allow remote "
692.8036 +"users to <emphasis>modify</emphasis> your repository.  It's intended for read-"
692.8037 +"only use."
692.8038 +msgstr ""
692.8039 +
692.8040 +#. type: Content of: <book><chapter><sect1><para>
692.8041 +#: ../en/ch06-collab.xml:498
692.8042 +msgid ""
692.8043 +"If you're getting started with Mercurial, there's nothing to prevent you from "
692.8044 +"using <command role=\"hg-cmd\">hg serve</command> to serve up a repository on "
692.8045 +"your own computer, then use commands like <command role=\"hg-cmd\">hg clone</"
692.8046 +"command>, <command role=\"hg-cmd\">hg incoming</command>, and so on to talk "
692.8047 +"to that server as if the repository was hosted remotely. This can help you to "
692.8048 +"quickly get acquainted with using commands on network-hosted repositories."
692.8049 +msgstr ""
692.8050 +
692.8051 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.8052 +#: ../en/ch06-collab.xml:508
692.8053 +msgid "A few things to keep in mind"
692.8054 +msgstr "要牢记的几件事"
692.8055 +
692.8056 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8057 +#: ../en/ch06-collab.xml:510
692.8058 +msgid ""
692.8059 +"Because it provides unauthenticated read access to all clients, you should "
692.8060 +"only use <command role=\"hg-cmd\">hg serve</command> in an environment where "
692.8061 +"you either don't care, or have complete control over, who can access your "
692.8062 +"network and pull data from your repository."
692.8063 +msgstr ""
692.8064 +
692.8065 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8066 +#: ../en/ch06-collab.xml:516
692.8067 +msgid ""
692.8068 +"The <command role=\"hg-cmd\">hg serve</command> command knows nothing about "
692.8069 +"any firewall software you might have installed on your system or network.  It "
692.8070 +"cannot detect or control your firewall software.  If other people are unable "
692.8071 +"to talk to a running <command role=\"hg-cmd\">hg serve</command> instance, "
692.8072 +"the second thing you should do (<emphasis>after</emphasis> you make sure that "
692.8073 +"they're using the correct URL) is check your firewall configuration."
692.8074 +msgstr ""
692.8075 +
692.8076 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8077 +#: ../en/ch06-collab.xml:525
692.8078 +msgid ""
692.8079 +"By default, <command role=\"hg-cmd\">hg serve</command> listens for incoming "
692.8080 +"connections on port 8000.  If another process is already listening on the "
692.8081 +"port you want to use, you can specify a different port to listen on using the "
692.8082 +"<option role=\"hg-opt-serve\">-p</option> option."
692.8083 +msgstr ""
692.8084 +
692.8085 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8086 +#: ../en/ch06-collab.xml:531
692.8087 +msgid ""
692.8088 +"Normally, when <command role=\"hg-cmd\">hg serve</command> starts, it prints "
692.8089 +"no output, which can be a bit unnerving.  If you'd like to confirm that it is "
692.8090 +"indeed running correctly, and find out what URL you should send to your "
692.8091 +"collaborators, start it with the <option role=\"hg-opt-global\">-v</option> "
692.8092 +"option."
692.8093 +msgstr ""
692.8094 +
692.8095 +#. type: Content of: <book><chapter><sect1><title>
692.8096 +#: ../en/ch06-collab.xml:541
692.8097 +msgid "Using the Secure Shell (ssh) protocol"
692.8098 +msgstr "使用 ssh 协议"
692.8099 +
692.8100 +#. type: Content of: <book><chapter><sect1><para>
692.8101 +#: ../en/ch06-collab.xml:543
692.8102 +msgid ""
692.8103 +"You can pull and push changes securely over a network connection using the "
692.8104 +"Secure Shell (<literal>ssh</literal>)  protocol.  To use this successfully, "
692.8105 +"you may have to do a little bit of configuration on the client or server "
692.8106 +"sides."
692.8107 +msgstr ""
692.8108 +
692.8109 +#. type: Content of: <book><chapter><sect1><para>
692.8110 +#: ../en/ch06-collab.xml:548
692.8111 +msgid ""
692.8112 +"If you're not familiar with ssh, it's the name of both a command and a "
692.8113 +"network protocol that let you securely communicate with another computer.  To "
692.8114 +"use it with Mercurial, you'll be setting up one or more user accounts on a "
692.8115 +"server so that remote users can log in and execute commands."
692.8116 +msgstr ""
692.8117 +
692.8118 +#. type: Content of: <book><chapter><sect1><para>
692.8119 +#: ../en/ch06-collab.xml:554
692.8120 +msgid ""
692.8121 +"(If you <emphasis>are</emphasis> familiar with ssh, you'll probably find some "
692.8122 +"of the material that follows to be elementary in nature.)"
692.8123 +msgstr ""
692.8124 +
692.8125 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.8126 +#: ../en/ch06-collab.xml:559
692.8127 +msgid "How to read and write ssh URLs"
692.8128 +msgstr "如何读写 ssh 路径"
692.8129 +
692.8130 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8131 +#: ../en/ch06-collab.xml:561
692.8132 +msgid "An ssh URL tends to look like this:"
692.8133 +msgstr ""
692.8134 +
692.8135 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.8136 +#: ../en/ch06-collab.xml:564
692.8137 +msgid ""
692.8138 +"The <quote><literal>ssh://</literal></quote> part tells Mercurial to use the "
692.8139 +"ssh protocol."
692.8140 +msgstr ""
692.8141 +
692.8142 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.8143 +#: ../en/ch06-collab.xml:567
692.8144 +msgid ""
692.8145 +"The <quote><literal>bos@</literal></quote> component indicates what username "
692.8146 +"to log into the server as.  You can leave this out if the remote username is "
692.8147 +"the same as your local username."
692.8148 +msgstr ""
692.8149 +
692.8150 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.8151 +#: ../en/ch06-collab.xml:572
692.8152 +msgid ""
692.8153 +"The <quote><literal>hg.serpentine.com</literal></quote> gives the hostname of "
692.8154 +"the server to log into."
692.8155 +msgstr ""
692.8156 +
692.8157 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.8158 +#: ../en/ch06-collab.xml:576
692.8159 +msgid ""
692.8160 +"The <quote>:22</quote> identifies the port number to connect to the server "
692.8161 +"on.  The default port is 22, so you only need to specify a colon and port "
692.8162 +"number if you're <emphasis>not</emphasis> using port 22."
692.8163 +msgstr ""
692.8164 +
692.8165 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.8166 +#: ../en/ch06-collab.xml:581
692.8167 +msgid ""
692.8168 +"The remainder of the URL is the local path to the repository on the server."
692.8169 +msgstr ""
692.8170 +
692.8171 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8172 +#: ../en/ch06-collab.xml:585
692.8173 +msgid ""
692.8174 +"There's plenty of scope for confusion with the path component of ssh URLs, as "
692.8175 +"there is no standard way for tools to interpret it.  Some programs behave "
692.8176 +"differently than others when dealing with these paths. This isn't an ideal "
692.8177 +"situation, but it's unlikely to change.  Please read the following paragraphs "
692.8178 +"carefully."
692.8179 +msgstr ""
692.8180 +
692.8181 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8182 +#: ../en/ch06-collab.xml:592
692.8183 +msgid ""
692.8184 +"Mercurial treats the path to a repository on the server as relative to the "
692.8185 +"remote user's home directory.  For example, if user <literal>foo</literal> on "
692.8186 +"the server has a home directory of <filename class=\"directory\">/home/foo</"
692.8187 +"filename>, then an ssh URL that contains a path component of <filename class="
692.8188 +"\"directory\">bar</filename> <emphasis>really</emphasis> refers to the "
692.8189 +"directory <filename class=\"directory\">/home/foo/bar</filename>."
692.8190 +msgstr ""
692.8191 +
692.8192 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8193 +#: ../en/ch06-collab.xml:601
692.8194 +msgid ""
692.8195 +"If you want to specify a path relative to another user's home directory, you "
692.8196 +"can use a path that starts with a tilde character followed by the user's name "
692.8197 +"(let's call them <literal>otheruser</literal>), like this."
692.8198 +msgstr ""
692.8199 +
692.8200 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8201 +#: ../en/ch06-collab.xml:607
692.8202 +msgid ""
692.8203 +"And if you really want to specify an <emphasis>absolute</emphasis> path on "
692.8204 +"the server, begin the path component with two slashes, as in this example."
692.8205 +msgstr ""
692.8206 +
692.8207 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.8208 +#: ../en/ch06-collab.xml:614
692.8209 +msgid "Finding an ssh client for your system"
692.8210 +msgstr "为你的系统寻找 ssh 客户端"
692.8211 +
692.8212 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8213 +#: ../en/ch06-collab.xml:616
692.8214 +msgid ""
692.8215 +"Almost every Unix-like system comes with OpenSSH preinstalled.  If you're "
692.8216 +"using such a system, run <literal>which ssh</literal> to find out if the "
692.8217 +"<command>ssh</command> command is installed (it's usually in <filename class="
692.8218 +"\"directory\">/usr/bin</filename>).  In the unlikely event that it isn't "
692.8219 +"present, take a look at your system documentation to figure out how to "
692.8220 +"install it."
692.8221 +msgstr ""
692.8222 +
692.8223 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8224 +#: ../en/ch06-collab.xml:624
692.8225 +msgid ""
692.8226 +"On Windows, the TortoiseHg package is bundled with a version of Simon "
692.8227 +"Tatham's excellent <command>plink</command> command, and you should not need "
692.8228 +"to do any further configuration."
692.8229 +msgstr ""
692.8230 +
692.8231 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.8232 +#: ../en/ch06-collab.xml:631
692.8233 +msgid "Generating a key pair"
692.8234 +msgstr "产生密钥对"
692.8235 +
692.8236 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8237 +#: ../en/ch06-collab.xml:633
692.8238 +msgid ""
692.8239 +"To avoid the need to repetitively type a password every time you need to use "
692.8240 +"your ssh client, I recommend generating a key pair."
692.8241 +msgstr ""
692.8242 +
692.8243 +#. type: Content of: <book><chapter><sect1><sect2><tip><title>
692.8244 +#: ../en/ch06-collab.xml:638
692.8245 +msgid "Key pairs are not mandatory"
692.8246 +msgstr ""
692.8247 +
692.8248 +#. type: Content of: <book><chapter><sect1><sect2><tip><para>
692.8249 +#: ../en/ch06-collab.xml:640
692.8250 +msgid ""
692.8251 +"Mercurial knows nothing about ssh authentication or key pairs.  You can, if "
692.8252 +"you like, safely ignore this section and the one that follows until you grow "
692.8253 +"tired of repeatedly typing ssh passwords."
692.8254 +msgstr ""
692.8255 +
692.8256 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8257 +#: ../en/ch06-collab.xml:648
692.8258 +msgid ""
692.8259 +"On a Unix-like system, the <command>ssh-keygen</command> command will do the "
692.8260 +"trick."
692.8261 +msgstr ""
692.8262 +
692.8263 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8264 +#: ../en/ch06-collab.xml:651
692.8265 +msgid ""
692.8266 +"On Windows, if you're using TortoiseHg, you may need to download a command "
692.8267 +"named <command>puttygen</command> from <ulink url=\"http://www.chiark."
692.8268 +"greenend.org.uk/~sgtatham/putty\">the PuTTY web site</ulink> to generate a "
692.8269 +"key pair.  See <ulink url=\"http://the.earth.li/~sgtatham/putty/0.60/htmldoc/"
692.8270 +"Chapter8.html#pubkey-puttygen\">the <command>puttygen</command> "
692.8271 +"documentation</ulink> for details of how use the command."
692.8272 +msgstr ""
692.8273 +
692.8274 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8275 +#: ../en/ch06-collab.xml:663
692.8276 +msgid ""
692.8277 +"When you generate a key pair, it's usually <emphasis>highly</emphasis> "
692.8278 +"advisable to protect it with a passphrase.  (The only time that you might not "
692.8279 +"want to do this is when you're using the ssh protocol for automated tasks on "
692.8280 +"a secure network.)"
692.8281 +msgstr ""
692.8282 +
692.8283 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8284 +#: ../en/ch06-collab.xml:669
692.8285 +msgid ""
692.8286 +"Simply generating a key pair isn't enough, however.  You'll need to add the "
692.8287 +"public key to the set of authorised keys for whatever user you're logging in "
692.8288 +"remotely as.  For servers using OpenSSH (the vast majority), this will mean "
692.8289 +"adding the public key to a list in a file called <filename role=\"special"
692.8290 +"\">authorized_keys</filename> in their <filename role=\"special\" class="
692.8291 +"\"directory\">.ssh</filename> directory."
692.8292 +msgstr ""
692.8293 +
692.8294 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8295 +#: ../en/ch06-collab.xml:678
692.8296 +msgid ""
692.8297 +"On a Unix-like system, your public key will have a <filename>.pub</filename> "
692.8298 +"extension.  If you're using <command>puttygen</command> on Windows, you can "
692.8299 +"save the public key to a file of your choosing, or paste it from the window "
692.8300 +"it's displayed in straight into the <filename role=\"special"
692.8301 +"\">authorized_keys</filename> file."
692.8302 +msgstr ""
692.8303 +
692.8304 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.8305 +#: ../en/ch06-collab.xml:686
692.8306 +msgid "Using an authentication agent"
692.8307 +msgstr "使用认证代理"
692.8308 +
692.8309 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8310 +#: ../en/ch06-collab.xml:688
692.8311 +msgid ""
692.8312 +"An authentication agent is a daemon that stores passphrases in memory (so it "
692.8313 +"will forget passphrases if you log out and log back in again). An ssh client "
692.8314 +"will notice if it's running, and query it for a passphrase.  If there's no "
692.8315 +"authentication agent running, or the agent doesn't store the necessary "
692.8316 +"passphrase, you'll have to type your passphrase every time Mercurial tries to "
692.8317 +"communicate with a server on your behalf (e.g. whenever you pull or push "
692.8318 +"changes)."
692.8319 +msgstr ""
692.8320 +
692.8321 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8322 +#: ../en/ch06-collab.xml:697
692.8323 +msgid ""
692.8324 +"The downside of storing passphrases in an agent is that it's possible for a "
692.8325 +"well-prepared attacker to recover the plain text of your passphrases, in some "
692.8326 +"cases even if your system has been power-cycled. You should make your own "
692.8327 +"judgment as to whether this is an acceptable risk.  It certainly saves a lot "
692.8328 +"of repeated typing."
692.8329 +msgstr ""
692.8330 +
692.8331 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8332 +#: ../en/ch06-collab.xml:706
692.8333 +msgid ""
692.8334 +"On Unix-like systems, the agent is called <command>ssh-agent</command>, and "
692.8335 +"it's often run automatically for you when you log in.  You'll need to use the "
692.8336 +"<command>ssh-add</command> command to add passphrases to the agent's store."
692.8337 +msgstr ""
692.8338 +
692.8339 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8340 +#: ../en/ch06-collab.xml:713
692.8341 +msgid ""
692.8342 +"On Windows, if you're using TortoiseHg, the <command>pageant</command> "
692.8343 +"command acts as the agent.  As with <command>puttygen</command>, you'll need "
692.8344 +"to <ulink url=\"http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download."
692.8345 +"html\">download <command>pageant</command></ulink> from the PuTTY web site "
692.8346 +"and read <ulink url=\"http://the.earth.li/~sgtatham/putty/0.60/htmldoc/"
692.8347 +"Chapter9.html#pageant\">its documentation</ulink>.  The <command>pageant</"
692.8348 +"command> command adds an icon to your system tray that will let you manage "
692.8349 +"stored passphrases."
692.8350 +msgstr ""
692.8351 +
692.8352 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.8353 +#: ../en/ch06-collab.xml:728
692.8354 +msgid "Configuring the server side properly"
692.8355 +msgstr "正确配置服务器端"
692.8356 +
692.8357 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8358 +#: ../en/ch06-collab.xml:730
692.8359 +msgid ""
692.8360 +"Because ssh can be fiddly to set up if you're new to it, a variety of things "
692.8361 +"can go wrong.  Add Mercurial on top, and there's plenty more scope for head-"
692.8362 +"scratching.  Most of these potential problems occur on the server side, not "
692.8363 +"the client side.  The good news is that once you've gotten a configuration "
692.8364 +"working, it will usually continue to work indefinitely."
692.8365 +msgstr ""
692.8366 +
692.8367 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8368 +#: ../en/ch06-collab.xml:738
692.8369 +msgid ""
692.8370 +"Before you try using Mercurial to talk to an ssh server, it's best to make "
692.8371 +"sure that you can use the normal <command>ssh</command> or <command>putty</"
692.8372 +"command> command to talk to the server first.  If you run into problems with "
692.8373 +"using these commands directly, Mercurial surely won't work.  Worse, it will "
692.8374 +"obscure the underlying problem.  Any time you want to debug ssh-related "
692.8375 +"Mercurial problems, you should drop back to making sure that plain ssh client "
692.8376 +"commands work first, <emphasis>before</emphasis> you worry about whether "
692.8377 +"there's a problem with Mercurial."
692.8378 +msgstr ""
692.8379 +
692.8380 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8381 +#: ../en/ch06-collab.xml:749
692.8382 +msgid ""
692.8383 +"The first thing to be sure of on the server side is that you can actually log "
692.8384 +"in from another machine at all.  If you can't use <command>ssh</command> or "
692.8385 +"<command>putty</command> to log in, the error message you get may give you a "
692.8386 +"few hints as to what's wrong.  The most common problems are as follows."
692.8387 +msgstr ""
692.8388 +
692.8389 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8390 +#: ../en/ch06-collab.xml:756
692.8391 +msgid ""
692.8392 +"If you get a <quote>connection refused</quote> error, either there isn't an "
692.8393 +"SSH daemon running on the server at all, or it's inaccessible due to firewall "
692.8394 +"configuration."
692.8395 +msgstr ""
692.8396 +
692.8397 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8398 +#: ../en/ch06-collab.xml:761
692.8399 +msgid ""
692.8400 +"If you get a <quote>no route to host</quote> error, you either have an "
692.8401 +"incorrect address for the server or a seriously locked down firewall that "
692.8402 +"won't admit its existence at all."
692.8403 +msgstr ""
692.8404 +
692.8405 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8406 +#: ../en/ch06-collab.xml:766
692.8407 +msgid ""
692.8408 +"If you get a <quote>permission denied</quote> error, you may have mistyped "
692.8409 +"the username on the server, or you could have mistyped your key's passphrase "
692.8410 +"or the remote user's password."
692.8411 +msgstr ""
692.8412 +
692.8413 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8414 +#: ../en/ch06-collab.xml:771
692.8415 +msgid ""
692.8416 +"In summary, if you're having trouble talking to the server's ssh daemon, "
692.8417 +"first make sure that one is running at all.  On many systems it will be "
692.8418 +"installed, but disabled, by default.  Once you're done with this step, you "
692.8419 +"should then check that the server's firewall is configured to allow incoming "
692.8420 +"connections on the port the ssh daemon is listening on (usually 22).  Don't "
692.8421 +"worry about more exotic possibilities for misconfiguration until you've "
692.8422 +"checked these two first."
692.8423 +msgstr ""
692.8424 +
692.8425 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8426 +#: ../en/ch06-collab.xml:781
692.8427 +msgid ""
692.8428 +"If you're using an authentication agent on the client side to store "
692.8429 +"passphrases for your keys, you ought to be able to log into the server "
692.8430 +"without being prompted for a passphrase or a password.  If you're prompted "
692.8431 +"for a passphrase, there are a few possible culprits."
692.8432 +msgstr ""
692.8433 +
692.8434 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8435 +#: ../en/ch06-collab.xml:787
692.8436 +msgid ""
692.8437 +"You might have forgotten to use <command>ssh-add</command> or "
692.8438 +"<command>pageant</command> to store the passphrase."
692.8439 +msgstr ""
692.8440 +
692.8441 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8442 +#: ../en/ch06-collab.xml:791
692.8443 +msgid "You might have stored the passphrase for the wrong key."
692.8444 +msgstr ""
692.8445 +
692.8446 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8447 +#: ../en/ch06-collab.xml:794
692.8448 +msgid ""
692.8449 +"If you're being prompted for the remote user's password, there are another "
692.8450 +"few possible problems to check."
692.8451 +msgstr ""
692.8452 +
692.8453 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8454 +#: ../en/ch06-collab.xml:797
692.8455 +msgid ""
692.8456 +"Either the user's home directory or their <filename role=\"special\" class="
692.8457 +"\"directory\">.ssh</filename> directory might have excessively liberal "
692.8458 +"permissions.  As a result, the ssh daemon will not trust or read their "
692.8459 +"<filename role=\"special\">authorized_keys</filename> file.  For example, a "
692.8460 +"group-writable home or <filename role=\"special\" class=\"directory\">.ssh</"
692.8461 +"filename> directory will often cause this symptom."
692.8462 +msgstr ""
692.8463 +
692.8464 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8465 +#: ../en/ch06-collab.xml:806
692.8466 +msgid ""
692.8467 +"The user's <filename role=\"special\">authorized_keys</filename> file may "
692.8468 +"have a problem. If anyone other than the user owns or can write to that file, "
692.8469 +"the ssh daemon will not trust or read it."
692.8470 +msgstr ""
692.8471 +
692.8472 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8473 +#: ../en/ch06-collab.xml:813
692.8474 +msgid ""
692.8475 +"In the ideal world, you should be able to run the following command "
692.8476 +"successfully, and it should print exactly one line of output, the current "
692.8477 +"date and time."
692.8478 +msgstr ""
692.8479 +
692.8480 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8481 +#: ../en/ch06-collab.xml:818
692.8482 +msgid ""
692.8483 +"If, on your server, you have login scripts that print banners or other junk "
692.8484 +"even when running non-interactive commands like this, you should fix them "
692.8485 +"before you continue, so that they only print output if they're run "
692.8486 +"interactively.  Otherwise these banners will at least clutter up Mercurial's "
692.8487 +"output.  Worse, they could potentially cause problems with running Mercurial "
692.8488 +"commands remotely.  Mercurial tries to detect and ignore banners in non-"
692.8489 +"interactive <command>ssh</command> sessions, but it is not foolproof.  (If "
692.8490 +"you're editing your login scripts on your server, the usual way to see if a "
692.8491 +"login script is running in an interactive shell is to check the return code "
692.8492 +"from the command <literal>tty -s</literal>.)"
692.8493 +msgstr ""
692.8494 +
692.8495 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8496 +#: ../en/ch06-collab.xml:832
692.8497 +msgid ""
692.8498 +"Once you've verified that plain old ssh is working with your server, the next "
692.8499 +"step is to ensure that Mercurial runs on the server.  The following command "
692.8500 +"should run successfully:"
692.8501 +msgstr ""
692.8502 +
692.8503 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8504 +#: ../en/ch06-collab.xml:839
692.8505 +msgid ""
692.8506 +"If you see an error message instead of normal <command role=\"hg-cmd\">hg "
692.8507 +"version</command> output, this is usually because you haven't installed "
692.8508 +"Mercurial to <filename class=\"directory\">/usr/bin</filename>.  Don't worry "
692.8509 +"if this is the case; you don't need to do that.  But you should check for a "
692.8510 +"few possible problems."
692.8511 +msgstr ""
692.8512 +
692.8513 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8514 +#: ../en/ch06-collab.xml:846
692.8515 +msgid ""
692.8516 +"Is Mercurial really installed on the server at all? I know this sounds "
692.8517 +"trivial, but it's worth checking!"
692.8518 +msgstr ""
692.8519 +
692.8520 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8521 +#: ../en/ch06-collab.xml:850
692.8522 +msgid ""
692.8523 +"Maybe your shell's search path (usually set via the <envar>PATH</envar> "
692.8524 +"environment variable) is simply misconfigured."
692.8525 +msgstr ""
692.8526 +
692.8527 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8528 +#: ../en/ch06-collab.xml:854
692.8529 +msgid ""
692.8530 +"Perhaps your <envar>PATH</envar> environment variable is only being set to "
692.8531 +"point to the location of the <command>hg</command> executable if the login "
692.8532 +"session is interactive.  This can happen if you're setting the path in the "
692.8533 +"wrong shell login script.  See your shell's documentation for details."
692.8534 +msgstr ""
692.8535 +
692.8536 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.8537 +#: ../en/ch06-collab.xml:861
692.8538 +msgid ""
692.8539 +"The <envar>PYTHONPATH</envar> environment variable may need to contain the "
692.8540 +"path to the Mercurial Python modules.  It might not be set at all; it could "
692.8541 +"be incorrect; or it may be set only if the login is interactive."
692.8542 +msgstr ""
692.8543 +
692.8544 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8545 +#: ../en/ch06-collab.xml:868
692.8546 +msgid ""
692.8547 +"If you can run <command role=\"hg-cmd\">hg version</command> over an ssh "
692.8548 +"connection, well done! You've got the server and client sorted out.  You "
692.8549 +"should now be able to use Mercurial to access repositories hosted by that "
692.8550 +"username on that server.  If you run into problems with Mercurial and ssh at "
692.8551 +"this point, try using the <option role=\"hg-opt-global\">--debug</option> "
692.8552 +"option to get a clearer picture of what's going on."
692.8553 +msgstr ""
692.8554 +
692.8555 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.8556 +#: ../en/ch06-collab.xml:877
692.8557 +msgid "Using compression with ssh"
692.8558 +msgstr "通过 ssh 使用压缩"
692.8559 +
692.8560 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8561 +#: ../en/ch06-collab.xml:879
692.8562 +msgid ""
692.8563 +"Mercurial does not compress data when it uses the ssh protocol, because the "
692.8564 +"ssh protocol can transparently compress data.  However, the default behavior "
692.8565 +"of ssh clients is <emphasis>not</emphasis> to request compression."
692.8566 +msgstr ""
692.8567 +
692.8568 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8569 +#: ../en/ch06-collab.xml:884
692.8570 +msgid ""
692.8571 +"Over any network other than a fast LAN (even a wireless network), using "
692.8572 +"compression is likely to significantly speed up Mercurial's network "
692.8573 +"operations.  For example, over a WAN, someone measured compression as "
692.8574 +"reducing the amount of time required to clone a particularly large repository "
692.8575 +"from 51 minutes to 17 minutes."
692.8576 +msgstr ""
692.8577 +
692.8578 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8579 +#: ../en/ch06-collab.xml:891
692.8580 +msgid ""
692.8581 +"Both <command>ssh</command> and <command>plink</command> accept a <option "
692.8582 +"role=\"cmd-opt-ssh\">-C</option> option which turns on compression.  You can "
692.8583 +"easily edit your <filename role=\"special\">~/.hgrc</filename> to enable "
692.8584 +"compression for all of Mercurial's uses of the ssh protocol.  Here is how to "
692.8585 +"do so for regular <command>ssh</command> on Unix-like systems, for example."
692.8586 +msgstr ""
692.8587 +
692.8588 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8589 +#: ../en/ch06-collab.xml:901
692.8590 +msgid ""
692.8591 +"If you use <command>ssh</command> on a Unix-like system, you can configure it "
692.8592 +"to always use compression when talking to your server.  To do this, edit your "
692.8593 +"<filename role=\"special\">.ssh/config</filename> file (which may not yet "
692.8594 +"exist), as follows."
692.8595 +msgstr ""
692.8596 +
692.8597 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8598 +#: ../en/ch06-collab.xml:911
692.8599 +msgid ""
692.8600 +"This defines a hostname alias, <literal>hg</literal>.  When you use that "
692.8601 +"hostname on the <command>ssh</command> command line or in a Mercurial "
692.8602 +"<literal>ssh</literal>-protocol URL, it will cause <command>ssh</command> to "
692.8603 +"connect to <literal>hg.example.com</literal> and use compression.  This gives "
692.8604 +"you both a shorter name to type and compression, each of which is a good "
692.8605 +"thing in its own right."
692.8606 +msgstr ""
692.8607 +
692.8608 +#. type: Content of: <book><chapter><sect1><title>
692.8609 +#: ../en/ch06-collab.xml:923
692.8610 +msgid "Serving over HTTP using CGI"
692.8611 +msgstr "使用 CGI 通过 HTTP 提供服务"
692.8612 +
692.8613 +#. type: Content of: <book><chapter><sect1><para>
692.8614 +#: ../en/ch06-collab.xml:925
692.8615 +msgid ""
692.8616 +"The simplest way to host one or more repositories in a permanent way is to "
692.8617 +"use a web server and Mercurial's CGI support."
692.8618 +msgstr ""
692.8619 +
692.8620 +#. type: Content of: <book><chapter><sect1><para>
692.8621 +#: ../en/ch06-collab.xml:929
692.8622 +msgid ""
692.8623 +"Depending on how ambitious you are, configuring Mercurial's CGI interface can "
692.8624 +"take anything from a few moments to several hours."
692.8625 +msgstr ""
692.8626 +
692.8627 +#. type: Content of: <book><chapter><sect1><para>
692.8628 +#: ../en/ch06-collab.xml:933
692.8629 +msgid ""
692.8630 +"We'll begin with the simplest of examples, and work our way towards a more "
692.8631 +"complex configuration.  Even for the most basic case, you're almost certainly "
692.8632 +"going to need to read and modify your web server's configuration."
692.8633 +msgstr ""
692.8634 +
692.8635 +#. type: Content of: <book><chapter><sect1><note><title>
692.8636 +#: ../en/ch06-collab.xml:939
692.8637 +msgid "High pain tolerance required"
692.8638 +msgstr ""
692.8639 +
692.8640 +#. type: Content of: <book><chapter><sect1><note><para>
692.8641 +#: ../en/ch06-collab.xml:941
692.8642 +msgid ""
692.8643 +"Configuring a web server is a complex, fiddly, and highly system-dependent "
692.8644 +"activity.  I can't possibly give you instructions that will cover anything "
692.8645 +"like all of the cases you will encounter. Please use your discretion and "
692.8646 +"judgment in following the sections below.  Be prepared to make plenty of "
692.8647 +"mistakes, and to spend a lot of time reading your server's error logs."
692.8648 +msgstr ""
692.8649 +
692.8650 +#. type: Content of: <book><chapter><sect1><note><para>
692.8651 +#: ../en/ch06-collab.xml:949
692.8652 +msgid ""
692.8653 +"If you don't have a strong stomach for tweaking configurations over and over, "
692.8654 +"or a compelling need to host your own services, you might want to try one of "
692.8655 +"the public hosting services that I mentioned earlier."
692.8656 +msgstr ""
692.8657 +
692.8658 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.8659 +#: ../en/ch06-collab.xml:956
692.8660 +msgid "Web server configuration checklist"
692.8661 +msgstr "Web 服务器配置检查表"
692.8662 +
692.8663 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8664 +#: ../en/ch06-collab.xml:958
692.8665 +msgid ""
692.8666 +"Before you continue, do take a few moments to check a few aspects of your "
692.8667 +"system's setup."
692.8668 +msgstr ""
692.8669 +
692.8670 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.8671 +#: ../en/ch06-collab.xml:962
692.8672 +msgid ""
692.8673 +"Do you have a web server installed at all? Mac OS X and some Linux "
692.8674 +"distributions ship with Apache, but many other systems may not have a web "
692.8675 +"server installed."
692.8676 +msgstr ""
692.8677 +
692.8678 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.8679 +#: ../en/ch06-collab.xml:967
692.8680 +msgid ""
692.8681 +"If you have a web server installed, is it actually running? On most systems, "
692.8682 +"even if one is present, it will be disabled by default."
692.8683 +msgstr ""
692.8684 +
692.8685 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.8686 +#: ../en/ch06-collab.xml:971
692.8687 +msgid ""
692.8688 +"Is your server configured to allow you to run CGI programs in the directory "
692.8689 +"where you plan to do so? Most servers default to explicitly disabling the "
692.8690 +"ability to run CGI programs."
692.8691 +msgstr ""
692.8692 +
692.8693 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8694 +#: ../en/ch06-collab.xml:977
692.8695 +msgid ""
692.8696 +"If you don't have a web server installed, and don't have substantial "
692.8697 +"experience configuring Apache, you should consider using the "
692.8698 +"<literal>lighttpd</literal> web server instead of Apache.  Apache has a well-"
692.8699 +"deserved reputation for baroque and confusing configuration. While "
692.8700 +"<literal>lighttpd</literal> is less capable in some ways than Apache, most of "
692.8701 +"these capabilities are not relevant to serving Mercurial repositories.  And "
692.8702 +"<literal>lighttpd</literal> is undeniably <emphasis>much</emphasis> easier to "
692.8703 +"get started with than Apache."
692.8704 +msgstr ""
692.8705 +
692.8706 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.8707 +#: ../en/ch06-collab.xml:990
692.8708 +msgid "Basic CGI configuration"
692.8709 +msgstr "基本 CGI 配置"
692.8710 +
692.8711 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8712 +#: ../en/ch06-collab.xml:992
692.8713 +msgid ""
692.8714 +"On Unix-like systems, it's common for users to have a subdirectory named "
692.8715 +"something like <filename class=\"directory\">public_html</filename> in their "
692.8716 +"home directory, from which they can serve up web pages.  A file named "
692.8717 +"<filename>foo</filename> in this directory will be accessible at a URL of the "
692.8718 +"form <literal>http://www.example.com/username/foo</literal>."
692.8719 +msgstr ""
692.8720 +
692.8721 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8722 +#: ../en/ch06-collab.xml:1000
692.8723 +msgid ""
692.8724 +"To get started, find the <filename role=\"special\">hgweb.cgi</filename> "
692.8725 +"script that should be present in your Mercurial installation.  If you can't "
692.8726 +"quickly find a local copy on your system, simply download one from the master "
692.8727 +"Mercurial repository at <ulink url=\"http://www.selenic.com/repo/hg/raw-file/"
692.8728 +"tip/hgweb.cgi\">http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi</ulink>."
692.8729 +msgstr ""
692.8730 +
692.8731 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8732 +#: ../en/ch06-collab.xml:1007 ../en/ch06-collab.xml:1175
692.8733 +msgid ""
692.8734 +"You'll need to copy this script into your <filename class=\"directory"
692.8735 +"\">public_html</filename> directory, and ensure that it's executable."
692.8736 +msgstr ""
692.8737 +
692.8738 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8739 +#: ../en/ch06-collab.xml:1012
692.8740 +msgid ""
692.8741 +"The <literal>755</literal> argument to <command>chmod</command> is a little "
692.8742 +"more general than just making the script executable: it ensures that the "
692.8743 +"script is executable by anyone, and that <quote>group</quote> and "
692.8744 +"<quote>other</quote> write permissions are <emphasis>not</emphasis> set.  If "
692.8745 +"you were to leave those write permissions enabled, Apache's <literal>suexec</"
692.8746 +"literal> subsystem would likely refuse to execute the script.  In fact, "
692.8747 +"<literal>suexec</literal> also insists that the <emphasis>directory</"
692.8748 +"emphasis> in which the script resides must not be writable by others."
692.8749 +msgstr ""
692.8750 +
692.8751 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.8752 +#: ../en/ch06-collab.xml:1026
692.8753 +msgid "What could <emphasis>possibly</emphasis> go wrong?"
692.8754 +msgstr "什么<emphasis>可能</emphasis>会出错?"
692.8755 +
692.8756 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.8757 +#: ../en/ch06-collab.xml:1029
692.8758 +msgid ""
692.8759 +"Once you've copied the CGI script into place, go into a web browser, and try "
692.8760 +"to open the URL <literal>http://myhostname/~myuser/hgweb.cgi</literal>, "
692.8761 +"<emphasis>but</emphasis> brace yourself for instant failure.  There's a high "
692.8762 +"probability that trying to visit this URL will fail, and there are many "
692.8763 +"possible reasons for this.  In fact, you're likely to stumble over almost "
692.8764 +"every one of the possible errors below, so please read carefully.  The "
692.8765 +"following are all of the problems I ran into on a system running Fedora 7, "
692.8766 +"with a fresh installation of Apache, and a user account that I created "
692.8767 +"specially to perform this exercise."
692.8768 +msgstr ""
692.8769 +
692.8770 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.8771 +#: ../en/ch06-collab.xml:1042
692.8772 +msgid ""
692.8773 +"Your web server may have per-user directories disabled.  If you're using "
692.8774 +"Apache, search your config file for a <literal>UserDir</literal> directive.  "
692.8775 +"If there's none present, per-user directories will be disabled.  If one "
692.8776 +"exists, but its value is <literal>disabled</literal>, then per-user "
692.8777 +"directories will be disabled.  Otherwise, the string after <literal>UserDir</"
692.8778 +"literal> gives the name of the subdirectory that Apache will look in under "
692.8779 +"your home directory, for example <filename class=\"directory\">public_html</"
692.8780 +"filename>."
692.8781 +msgstr ""
692.8782 +
692.8783 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.8784 +#: ../en/ch06-collab.xml:1053
692.8785 +msgid ""
692.8786 +"Your file access permissions may be too restrictive.  The web server must be "
692.8787 +"able to traverse your home directory and directories under your <filename "
692.8788 +"class=\"directory\">public_html</filename> directory, and read files under "
692.8789 +"the latter too.  Here's a quick recipe to help you to make your permissions "
692.8790 +"more appropriate."
692.8791 +msgstr ""
692.8792 +
692.8793 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.8794 +#: ../en/ch06-collab.xml:1063
692.8795 +msgid ""
692.8796 +"The other possibility with permissions is that you might get a completely "
692.8797 +"empty window when you try to load the script.  In this case, it's likely that "
692.8798 +"your access permissions are <emphasis>too permissive</emphasis>.  Apache's "
692.8799 +"<literal>suexec</literal> subsystem won't execute a script that's group- or "
692.8800 +"world-writable, for example."
692.8801 +msgstr ""
692.8802 +
692.8803 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.8804 +#: ../en/ch06-collab.xml:1070
692.8805 +msgid ""
692.8806 +"Your web server may be configured to disallow execution of CGI programs in "
692.8807 +"your per-user web directory.  Here's Apache's default per-user configuration "
692.8808 +"from my Fedora system."
692.8809 +msgstr ""
692.8810 +
692.8811 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.8812 +#: ../en/ch06-collab.xml:1077
692.8813 +msgid ""
692.8814 +"If you find a similar-looking <literal>Directory</literal> group in your "
692.8815 +"Apache configuration, the directive to look at inside it is <literal>Options</"
692.8816 +"literal>. Add <literal>ExecCGI</literal> to the end of this list if it's "
692.8817 +"missing, and restart the web server."
692.8818 +msgstr ""
692.8819 +
692.8820 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.8821 +#: ../en/ch06-collab.xml:1084
692.8822 +msgid ""
692.8823 +"If you find that Apache serves you the text of the CGI script instead of "
692.8824 +"executing it, you may need to either uncomment (if already present) or add a "
692.8825 +"directive like this."
692.8826 +msgstr ""
692.8827 +
692.8828 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.8829 +#: ../en/ch06-collab.xml:1090
692.8830 +msgid ""
692.8831 +"The next possibility is that you might be served with a colourful Python "
692.8832 +"backtrace claiming that it can't import a <literal>mercurial</literal>-"
692.8833 +"related module.  This is actually progress! The server is now capable of "
692.8834 +"executing your CGI script.  This error is only likely to occur if you're "
692.8835 +"running a private installation of Mercurial, instead of a system-wide "
692.8836 +"version.  Remember that the web server runs the CGI program without any of "
692.8837 +"the environment variables that you take for granted in an interactive "
692.8838 +"session.  If this error happens to you, edit your copy of <filename role="
692.8839 +"\"special\">hgweb.cgi</filename> and follow the directions inside it to "
692.8840 +"correctly set your <envar>PYTHONPATH</envar> environment variable."
692.8841 +msgstr ""
692.8842 +
692.8843 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.8844 +#: ../en/ch06-collab.xml:1104
692.8845 +msgid ""
692.8846 +"Finally, you are <emphasis>certain</emphasis> to be served with another "
692.8847 +"colourful Python backtrace: this one will complain that it can't find "
692.8848 +"<filename class=\"directory\">/path/to/repository</filename>.  Edit your "
692.8849 +"<filename role=\"special\">hgweb.cgi</filename> script and replace the "
692.8850 +"<filename class=\"directory\">/path/to/repository</filename> string with the "
692.8851 +"complete path to the repository you want to serve up."
692.8852 +msgstr ""
692.8853 +
692.8854 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.8855 +#: ../en/ch06-collab.xml:1114
692.8856 +msgid ""
692.8857 +"At this point, when you try to reload the page, you should be presented with "
692.8858 +"a nice HTML view of your repository's history.  Whew!"
692.8859 +msgstr ""
692.8860 +
692.8861 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.8862 +#: ../en/ch06-collab.xml:1120
692.8863 +msgid "Configuring lighttpd"
692.8864 +msgstr "配置 lighttpd"
692.8865 +
692.8866 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.8867 +#: ../en/ch06-collab.xml:1122
692.8868 +msgid ""
692.8869 +"To be exhaustive in my experiments, I tried configuring the increasingly "
692.8870 +"popular <literal>lighttpd</literal> web server to serve the same repository "
692.8871 +"as I described with Apache above.  I had already overcome all of the problems "
692.8872 +"I outlined with Apache, many of which are not server-specific.  As a result, "
692.8873 +"I was fairly sure that my file and directory permissions were good, and that "
692.8874 +"my <filename role=\"special\">hgweb.cgi</filename> script was properly edited."
692.8875 +msgstr ""
692.8876 +
692.8877 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.8878 +#: ../en/ch06-collab.xml:1132
692.8879 +msgid ""
692.8880 +"Once I had Apache running, getting <literal>lighttpd</literal> to serve the "
692.8881 +"repository was a snap (in other words, even if you're trying to use "
692.8882 +"<literal>lighttpd</literal>, you should read the Apache section).  I first "
692.8883 +"had to edit the <literal>mod_access</literal> section of its config file to "
692.8884 +"enable <literal>mod_cgi</literal> and <literal>mod_userdir</literal>, both of "
692.8885 +"which were disabled by default on my system.  I then added a few lines to the "
692.8886 +"end of the config file, to configure these modules."
692.8887 +msgstr ""
692.8888 +
692.8889 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.8890 +#: ../en/ch06-collab.xml:1144
692.8891 +msgid ""
692.8892 +"With this done, <literal>lighttpd</literal> ran immediately for me.  If I had "
692.8893 +"configured <literal>lighttpd</literal> before Apache, I'd almost certainly "
692.8894 +"have run into many of the same system-level configuration problems as I did "
692.8895 +"with Apache.  However, I found <literal>lighttpd</literal> to be noticeably "
692.8896 +"easier to configure than Apache, even though I've used Apache for over a "
692.8897 +"decade, and this was my first exposure to <literal>lighttpd</literal>."
692.8898 +msgstr ""
692.8899 +
692.8900 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.8901 +#: ../en/ch06-collab.xml:1157
692.8902 +msgid "Sharing multiple repositories with one CGI script"
692.8903 +msgstr "使用一个 CGI 脚本共享多个版本库"
692.8904 +
692.8905 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8906 +#: ../en/ch06-collab.xml:1159
692.8907 +msgid ""
692.8908 +"The <filename role=\"special\">hgweb.cgi</filename> script only lets you "
692.8909 +"publish a single repository, which is an annoying restriction.  If you want "
692.8910 +"to publish more than one without wracking yourself with multiple copies of "
692.8911 +"the same script, each with different names, a better choice is to use the "
692.8912 +"<filename role=\"special\">hgwebdir.cgi</filename> script."
692.8913 +msgstr ""
692.8914 +
692.8915 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8916 +#: ../en/ch06-collab.xml:1167
692.8917 +msgid ""
692.8918 +"The procedure to configure <filename role=\"special\">hgwebdir.cgi</filename> "
692.8919 +"is only a little more involved than for <filename role=\"special\">hgweb.cgi</"
692.8920 +"filename>.  First, you must obtain a copy of the script.  If you don't have "
692.8921 +"one handy, you can download a copy from the master Mercurial repository at "
692.8922 +"<ulink url=\"http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi"
692.8923 +"\">http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi</ulink>."
692.8924 +msgstr ""
692.8925 +
692.8926 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8927 +#: ../en/ch06-collab.xml:1182
692.8928 +msgid ""
692.8929 +"With basic configuration out of the way, try to visit <literal>http://"
692.8930 +"myhostname/~myuser/hgwebdir.cgi</literal> in your\tbrowser.  It should "
692.8931 +"display an empty list of repositories.  If you get a blank window or error "
692.8932 +"message, try walking through the list of potential problems in <xref linkend="
692.8933 +"\"sec:collab:wtf\"/>."
692.8934 +msgstr ""
692.8935 +
692.8936 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8937 +#: ../en/ch06-collab.xml:1190
692.8938 +msgid ""
692.8939 +"The <filename role=\"special\">hgwebdir.cgi</filename> script relies on an "
692.8940 +"external configuration file.  By default, it searches for a file named "
692.8941 +"<filename role=\"special\">hgweb.config</filename> in the same directory as "
692.8942 +"itself.  You'll need to create this file, and make it world-readable.  The "
692.8943 +"format of the file is similar to a Windows <quote>ini</quote> file, as "
692.8944 +"understood by Python's <literal>ConfigParser</literal> <citation>web:"
692.8945 +"configparser</citation> module."
692.8946 +msgstr ""
692.8947 +
692.8948 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8949 +#: ../en/ch06-collab.xml:1200
692.8950 +msgid ""
692.8951 +"The easiest way to configure <filename role=\"special\">hgwebdir.cgi</"
692.8952 +"filename> is with a section named <literal>collections</literal>.  This will "
692.8953 +"automatically publish <emphasis>every</emphasis> repository under the "
692.8954 +"directories you name.  The section should look like this:"
692.8955 +msgstr ""
692.8956 +
692.8957 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8958 +#: ../en/ch06-collab.xml:1208
692.8959 +msgid ""
692.8960 +"Mercurial interprets this by looking at the directory name on the "
692.8961 +"<emphasis>right</emphasis> hand side of the <quote><literal>=</literal></"
692.8962 +"quote> sign; finding repositories in that directory hierarchy; and using the "
692.8963 +"text on the <emphasis>left</emphasis> to strip off matching text from the "
692.8964 +"names it will actually list in the web interface.  The remaining component of "
692.8965 +"a path after this stripping has occurred is called a <quote>virtual path</"
692.8966 +"quote>."
692.8967 +msgstr ""
692.8968 +
692.8969 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8970 +#: ../en/ch06-collab.xml:1217
692.8971 +msgid ""
692.8972 +"Given the example above, if we have a repository whose local path is "
692.8973 +"<filename class=\"directory\">/my/root/this/repo</filename>, the CGI script "
692.8974 +"will strip the leading <filename class=\"directory\">/my/root</filename> from "
692.8975 +"the name, and publish the repository with a virtual path of <filename class="
692.8976 +"\"directory\">this/repo</filename>.  If the base URL for our CGI script is "
692.8977 +"<literal>http://myhostname/~myuser/hgwebdir.cgi</literal>, the complete URL "
692.8978 +"for that repository will be <literal>http://myhostname/~myuser/hgwebdir.cgi/"
692.8979 +"this/repo</literal>."
692.8980 +msgstr ""
692.8981 +
692.8982 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8983 +#: ../en/ch06-collab.xml:1229
692.8984 +msgid ""
692.8985 +"If we replace <filename class=\"directory\">/my/root</filename> on the left "
692.8986 +"hand side of this example with <filename class=\"directory\">/my</filename>, "
692.8987 +"then <filename role=\"special\">hgwebdir.cgi</filename> will only strip off "
692.8988 +"<filename class=\"directory\">/my</filename> from the repository name, and "
692.8989 +"will give us a virtual path of <filename class=\"directory\">root/this/repo</"
692.8990 +"filename> instead of <filename class=\"directory\">this/repo</filename>."
692.8991 +msgstr ""
692.8992 +
692.8993 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.8994 +#: ../en/ch06-collab.xml:1239
692.8995 +msgid ""
692.8996 +"The <filename role=\"special\">hgwebdir.cgi</filename> script will "
692.8997 +"recursively search each directory listed in the <literal>collections</"
692.8998 +"literal> section of its configuration file, but it will <literal>not</"
692.8999 +"literal> recurse into the repositories it finds."
692.9000 +msgstr ""
692.9001 +
692.9002 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9003 +#: ../en/ch06-collab.xml:1245
692.9004 +msgid ""
692.9005 +"The <literal>collections</literal> mechanism makes it easy to publish many "
692.9006 +"repositories in a <quote>fire and forget</quote> manner.  You only need to "
692.9007 +"set up the CGI script and configuration file one time.  Afterwards, you can "
692.9008 +"publish or unpublish a repository at any time by simply moving it into, or "
692.9009 +"out of, the directory hierarchy in which you've configured <filename role="
692.9010 +"\"special\">hgwebdir.cgi</filename> to look."
692.9011 +msgstr ""
692.9012 +
692.9013 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.9014 +#: ../en/ch06-collab.xml:1255
692.9015 +msgid "Explicitly specifying which repositories to publish"
692.9016 +msgstr "明确指出要发布的版本库"
692.9017 +
692.9018 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.9019 +#: ../en/ch06-collab.xml:1258
692.9020 +msgid ""
692.9021 +"In addition to the <literal>collections</literal> mechanism, the <filename "
692.9022 +"role=\"special\">hgwebdir.cgi</filename> script allows you to publish a "
692.9023 +"specific list of repositories.  To do so, create a <literal>paths</literal> "
692.9024 +"section, with contents of the following form."
692.9025 +msgstr ""
692.9026 +
692.9027 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.9028 +#: ../en/ch06-collab.xml:1267
692.9029 +msgid ""
692.9030 +"In this case, the virtual path (the component that will appear in a URL) is "
692.9031 +"on the left hand side of each definition, while the path to the repository is "
692.9032 +"on the right.  Notice that there does not need to be any relationship between "
692.9033 +"the virtual path you choose and the location of a repository in your "
692.9034 +"filesystem."
692.9035 +msgstr ""
692.9036 +
692.9037 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.9038 +#: ../en/ch06-collab.xml:1274
692.9039 +msgid ""
692.9040 +"If you wish, you can use both the <literal>collections</literal> and "
692.9041 +"<literal>paths</literal> mechanisms simultaneously in a single configuration "
692.9042 +"file."
692.9043 +msgstr ""
692.9044 +
692.9045 +#. type: Content of: <book><chapter><sect1><sect2><sect3><note><title>
692.9046 +#: ../en/ch06-collab.xml:1280
692.9047 +msgid "Beware duplicate virtual paths"
692.9048 +msgstr ""
692.9049 +
692.9050 +#. type: Content of: <book><chapter><sect1><sect2><sect3><note><para>
692.9051 +#: ../en/ch06-collab.xml:1282
692.9052 +msgid ""
692.9053 +"If several repositories have the same virtual path, <filename role=\"special"
692.9054 +"\">hgwebdir.cgi</filename> will not report an error.  Instead, it will behave "
692.9055 +"unpredictably."
692.9056 +msgstr ""
692.9057 +
692.9058 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.9059 +#: ../en/ch06-collab.xml:1291
692.9060 +msgid "Downloading source archives"
692.9061 +msgstr "下载源代码档案包"
692.9062 +
692.9063 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9064 +#: ../en/ch06-collab.xml:1293
692.9065 +msgid ""
692.9066 +"Mercurial's web interface lets users download an archive of any revision.  "
692.9067 +"This archive will contain a snapshot of the working directory as of that "
692.9068 +"revision, but it will not contain a copy of the repository data."
692.9069 +msgstr ""
692.9070 +
692.9071 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9072 +#: ../en/ch06-collab.xml:1298
692.9073 +msgid ""
692.9074 +"By default, this feature is not enabled.  To enable it, you'll need to add an "
692.9075 +"<envar role=\"rc-item-web\">allow_archive</envar> item to the <literal role="
692.9076 +"\"rc-web\">web</literal> section of your <filename role=\"special\">~/.hgrc</"
692.9077 +"filename>; see below for details."
692.9078 +msgstr ""
692.9079 +
692.9080 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.9081 +#: ../en/ch06-collab.xml:1305
692.9082 +msgid "Web configuration options"
692.9083 +msgstr "Web 配置选项"
692.9084 +
692.9085 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9086 +#: ../en/ch06-collab.xml:1307
692.9087 +msgid ""
692.9088 +"Mercurial's web interfaces (the <command role=\"hg-cmd\">hg serve</command> "
692.9089 +"command, and the <filename role=\"special\">hgweb.cgi</filename> and "
692.9090 +"<filename role=\"special\">hgwebdir.cgi</filename> scripts) have a number of "
692.9091 +"configuration options that you can set.  These belong in a section named "
692.9092 +"<literal role=\"rc-web\">web</literal>."
692.9093 +msgstr ""
692.9094 +
692.9095 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.9096 +#: ../en/ch06-collab.xml:1315
692.9097 +msgid ""
692.9098 +"<envar role=\"rc-item-web\">allow_archive</envar>: Determines which (if any) "
692.9099 +"archive download mechanisms Mercurial supports.  If you enable this feature, "
692.9100 +"users of the web interface will be able to download an archive of whatever "
692.9101 +"revision of a repository they are viewing. To enable the archive feature, "
692.9102 +"this item must take the form of a sequence of words drawn from the list below."
692.9103 +msgstr ""
692.9104 +
692.9105 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
692.9106 +#: ../en/ch06-collab.xml:1324
692.9107 +msgid ""
692.9108 +"<literal>bz2</literal>: A <command>tar</command> archive, compressed using "
692.9109 +"<literal>bzip2</literal> compression.  This has the best compression ratio, "
692.9110 +"but uses the most CPU time on the server."
692.9111 +msgstr ""
692.9112 +
692.9113 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
692.9114 +#: ../en/ch06-collab.xml:1330
692.9115 +msgid ""
692.9116 +"<literal>gz</literal>: A <command>tar</command> archive, compressed using "
692.9117 +"<literal>gzip</literal> compression."
692.9118 +msgstr ""
692.9119 +
692.9120 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
692.9121 +#: ../en/ch06-collab.xml:1334
692.9122 +msgid ""
692.9123 +"<literal>zip</literal>: A <command>zip</command> archive, compressed using "
692.9124 +"LZW compression.  This format has the worst compression ratio, but is widely "
692.9125 +"used in the Windows world."
692.9126 +msgstr ""
692.9127 +
692.9128 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.9129 +#: ../en/ch06-collab.xml:1340
692.9130 +msgid ""
692.9131 +"If you provide an empty list, or don't have an <envar role=\"rc-item-web"
692.9132 +"\">allow_archive</envar> entry at all, this feature will be disabled.  Here "
692.9133 +"is an example of how to enable all three supported formats."
692.9134 +msgstr ""
692.9135 +
692.9136 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.9137 +#: ../en/ch06-collab.xml:1347
692.9138 +msgid ""
692.9139 +"<envar role=\"rc-item-web\">allowpull</envar>: Boolean.  Determines whether "
692.9140 +"the web interface allows remote users to <command role=\"hg-cmd\">hg pull</"
692.9141 +"command> and <command role=\"hg-cmd\">hg clone</command> this repository over "
692.9142 +"HTTP.  If set to <literal>no</literal> or <literal>false</literal>, only the "
692.9143 +"<quote>human-oriented</quote> portion of the web interface is available."
692.9144 +msgstr ""
692.9145 +
692.9146 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.9147 +#: ../en/ch06-collab.xml:1356
692.9148 +msgid ""
692.9149 +"<envar role=\"rc-item-web\">contact</envar>: String.  A free-form (but "
692.9150 +"preferably brief) string identifying the person or group in charge of the "
692.9151 +"repository.  This often contains the name and email address of a person or "
692.9152 +"mailing list.  It often makes sense to place this entry in a repository's own "
692.9153 +"<filename role=\"special\">.hg/hgrc</filename> file, but it can make sense to "
692.9154 +"use in a global <filename role=\"special\">~/.hgrc</filename> if every "
692.9155 +"repository has a single maintainer."
692.9156 +msgstr ""
692.9157 +
692.9158 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.9159 +#: ../en/ch06-collab.xml:1367
692.9160 +msgid ""
692.9161 +"<envar role=\"rc-item-web\">maxchanges</envar>: Integer.  The default maximum "
692.9162 +"number of changesets to display in a single page of output."
692.9163 +msgstr ""
692.9164 +
692.9165 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.9166 +#: ../en/ch06-collab.xml:1371
692.9167 +msgid ""
692.9168 +"<envar role=\"rc-item-web\">maxfiles</envar>: Integer.  The default maximum "
692.9169 +"number of modified files to display in a single page of output."
692.9170 +msgstr ""
692.9171 +
692.9172 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.9173 +#: ../en/ch06-collab.xml:1375
692.9174 +msgid ""
692.9175 +"<envar role=\"rc-item-web\">stripes</envar>: Integer.  If the web interface "
692.9176 +"displays alternating <quote>stripes</quote> to make it easier to visually "
692.9177 +"align rows when you are looking at a table, this number controls the number "
692.9178 +"of rows in each stripe."
692.9179 +msgstr ""
692.9180 +
692.9181 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.9182 +#: ../en/ch06-collab.xml:1381
692.9183 +msgid ""
692.9184 +"<envar role=\"rc-item-web\">style</envar>: Controls the template Mercurial "
692.9185 +"uses to display the web interface.  Mercurial ships with several web "
692.9186 +"templates."
692.9187 +msgstr ""
692.9188 +
692.9189 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
692.9190 +#: ../en/ch06-collab.xml:1387
692.9191 +msgid "<literal>coal</literal> is monochromatic."
692.9192 +msgstr ""
692.9193 +
692.9194 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
692.9195 +#: ../en/ch06-collab.xml:1390
692.9196 +msgid ""
692.9197 +"<literal>gitweb</literal> emulates the visual style of git's web interface."
692.9198 +msgstr ""
692.9199 +
692.9200 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
692.9201 +#: ../en/ch06-collab.xml:1394
692.9202 +msgid "<literal>monoblue</literal> uses solid blues and greys."
692.9203 +msgstr ""
692.9204 +
692.9205 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
692.9206 +#: ../en/ch06-collab.xml:1398
692.9207 +msgid "<literal>paper</literal> is the default."
692.9208 +msgstr ""
692.9209 +
692.9210 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
692.9211 +#: ../en/ch06-collab.xml:1401
692.9212 +msgid "<literal>spartan</literal> was the default for a long time."
692.9213 +msgstr ""
692.9214 +
692.9215 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.9216 +#: ../en/ch06-collab.xml:1405
692.9217 +msgid ""
692.9218 +"You can also specify a custom template of your own; see <xref linkend=\"chap:"
692.9219 +"template\"/> for details. Here, you can see how to enable the "
692.9220 +"<literal>gitweb</literal> style."
692.9221 +msgstr ""
692.9222 +
692.9223 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.9224 +#: ../en/ch06-collab.xml:1413
692.9225 +msgid ""
692.9226 +"<envar role=\"rc-item-web\">templates</envar>: Path.  The directory in which "
692.9227 +"to search for template files.  By default, Mercurial searches in the "
692.9228 +"directory in which it was installed."
692.9229 +msgstr ""
692.9230 +
692.9231 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9232 +#: ../en/ch06-collab.xml:1418
692.9233 +msgid ""
692.9234 +"If you are using <filename role=\"special\">hgwebdir.cgi</filename>, you can "
692.9235 +"place a few configuration items in a <literal role=\"rc-web\">web</literal> "
692.9236 +"section of the <filename role=\"special\">hgweb.config</filename> file "
692.9237 +"instead of a <filename role=\"special\">~/.hgrc</filename> file, for "
692.9238 +"convenience.  These items are <envar role=\"rc-item-web\">motd</envar> and "
692.9239 +"<envar role=\"rc-item-web\">style</envar>."
692.9240 +msgstr ""
692.9241 +
692.9242 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.9243 +#: ../en/ch06-collab.xml:1429
692.9244 +msgid "Options specific to an individual repository"
692.9245 +msgstr "针对单个版本库的选项"
692.9246 +
692.9247 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.9248 +#: ../en/ch06-collab.xml:1431
692.9249 +msgid ""
692.9250 +"A few <literal role=\"rc-web\">web</literal> configuration items ought to be "
692.9251 +"placed in a repository's local <filename role=\"special\">.hg/hgrc</"
692.9252 +"filename>, rather than a user's or global <filename role=\"special\">~/.hgrc</"
692.9253 +"filename>."
692.9254 +msgstr ""
692.9255 +
692.9256 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.9257 +#: ../en/ch06-collab.xml:1436
692.9258 +msgid ""
692.9259 +"<envar role=\"rc-item-web\">description</envar>: String.  A free-form (but "
692.9260 +"preferably brief) string that describes the contents or purpose of the "
692.9261 +"repository."
692.9262 +msgstr ""
692.9263 +
692.9264 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.9265 +#: ../en/ch06-collab.xml:1441
692.9266 +msgid ""
692.9267 +"<envar role=\"rc-item-web\">name</envar>: String.  The name to use for the "
692.9268 +"repository in the web interface.  This overrides the default name, which is "
692.9269 +"the last component of the repository's path."
692.9270 +msgstr ""
692.9271 +
692.9272 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.9273 +#: ../en/ch06-collab.xml:1449
692.9274 +msgid ""
692.9275 +"Options specific to the <command role=\"hg-cmd\">hg serve</command> command"
692.9276 +msgstr "命令 <command role=\"hg-cmd\">hg serve</command> 的选项"
692.9277 +
692.9278 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.9279 +#: ../en/ch06-collab.xml:1452
692.9280 +msgid ""
692.9281 +"Some of the items in the <literal role=\"rc-web\">web</literal> section of a "
692.9282 +"<filename role=\"special\">~/.hgrc</filename> file are only for use with the "
692.9283 +"<command role=\"hg-cmd\">hg serve</command> command."
692.9284 +msgstr ""
692.9285 +
692.9286 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.9287 +#: ../en/ch06-collab.xml:1458
692.9288 +msgid ""
692.9289 +"<envar role=\"rc-item-web\">accesslog</envar>: Path.  The name of a file into "
692.9290 +"which to write an access log.  By default, the <command role=\"hg-cmd\">hg "
692.9291 +"serve</command> command writes this information to standard output, not to a "
692.9292 +"file.  Log entries are written in the standard <quote>combined</quote> file "
692.9293 +"format used by almost all web servers."
692.9294 +msgstr ""
692.9295 +
692.9296 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.9297 +#: ../en/ch06-collab.xml:1466
692.9298 +msgid ""
692.9299 +"<envar role=\"rc-item-web\">address</envar>: String.  The local address on "
692.9300 +"which the server should listen for incoming connections.  By default, the "
692.9301 +"server listens on all addresses."
692.9302 +msgstr ""
692.9303 +
692.9304 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.9305 +#: ../en/ch06-collab.xml:1471
692.9306 +msgid ""
692.9307 +"<envar role=\"rc-item-web\">errorlog</envar>: Path.  The name of a file into "
692.9308 +"which to write an error log.  By default, the <command role=\"hg-cmd\">hg "
692.9309 +"serve</command> command writes this information to standard error, not to a "
692.9310 +"file."
692.9311 +msgstr ""
692.9312 +
692.9313 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.9314 +#: ../en/ch06-collab.xml:1477
692.9315 +msgid ""
692.9316 +"<envar role=\"rc-item-web\">ipv6</envar>: Boolean.  Whether to use the IPv6 "
692.9317 +"protocol. By default, IPv6 is not used."
692.9318 +msgstr ""
692.9319 +
692.9320 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.9321 +#: ../en/ch06-collab.xml:1481
692.9322 +msgid ""
692.9323 +"<envar role=\"rc-item-web\">port</envar>: Integer.  The TCP port number on "
692.9324 +"which the server should listen.  The default port number used is 8000."
692.9325 +msgstr ""
692.9326 +
692.9327 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.9328 +#: ../en/ch06-collab.xml:1488
692.9329 +msgid ""
692.9330 +"Choosing the right <filename role=\"special\">~/.hgrc</filename> file to add "
692.9331 +"<literal role=\"rc-web\">web</literal> items to"
692.9332 +msgstr ""
692.9333 +"选择正确的 <filename role=\"special\"> ~/.hgrc</filename> 文件增加到 <literal "
692.9334 +"role=\"rc-web\">web</literal> 条目"
692.9335 +
692.9336 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.9337 +#: ../en/ch06-collab.xml:1492
692.9338 +msgid ""
692.9339 +"It is important to remember that a web server like Apache or "
692.9340 +"<literal>lighttpd</literal> will run under a user ID that is different to "
692.9341 +"yours. CGI scripts run by your server, such as <filename role=\"special"
692.9342 +"\">hgweb.cgi</filename>, will usually also run under that user ID."
692.9343 +msgstr ""
692.9344 +
692.9345 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.9346 +#: ../en/ch06-collab.xml:1499
692.9347 +msgid ""
692.9348 +"If you add <literal role=\"rc-web\">web</literal> items to your own personal "
692.9349 +"<filename role=\"special\">~/.hgrc</filename> file, CGI scripts won't read "
692.9350 +"that <filename role=\"special\">~/.hgrc</filename> file.  Those settings will "
692.9351 +"thus only affect the behavior of the <command role=\"hg-cmd\">hg serve</"
692.9352 +"command> command when you run it.  To cause CGI scripts to see your settings, "
692.9353 +"either create a <filename role=\"special\">~/.hgrc</filename> file in the "
692.9354 +"home directory of the user ID that runs your web server, or add those "
692.9355 +"settings to a system-wide <filename role=\"special\">hgrc</filename> file."
692.9356 +msgstr ""
692.9357 +
692.9358 +#. type: Content of: <book><chapter><sect1><title>
692.9359 +#: ../en/ch06-collab.xml:1514
692.9360 +msgid "System-wide configuration"
692.9361 +msgstr "全局配置"
692.9362 +
692.9363 +#. type: Content of: <book><chapter><sect1><para>
692.9364 +#: ../en/ch06-collab.xml:1516
692.9365 +msgid ""
692.9366 +"On Unix-like systems shared by multiple users (such as a server to which "
692.9367 +"people publish changes), it often makes sense to set up some global default "
692.9368 +"behaviors, such as what theme to use in web interfaces."
692.9369 +msgstr ""
692.9370 +
692.9371 +#. type: Content of: <book><chapter><sect1><para>
692.9372 +#: ../en/ch06-collab.xml:1521
692.9373 +msgid ""
692.9374 +"If a file named <filename>/etc/mercurial/hgrc</filename> exists, Mercurial "
692.9375 +"will read it at startup time and apply any configuration settings it finds in "
692.9376 +"that file.  It will also look for files ending in a <literal>.rc</literal> "
692.9377 +"extension in a directory named <filename>/etc/mercurial/hgrc.d</filename>, "
692.9378 +"and apply any configuration settings it finds in each of those files."
692.9379 +msgstr ""
692.9380 +
692.9381 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.9382 +#: ../en/ch06-collab.xml:1530
692.9383 +msgid "Making Mercurial more trusting"
692.9384 +msgstr "让 Mercurial 更可信"
692.9385 +
692.9386 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9387 +#: ../en/ch06-collab.xml:1532
692.9388 +msgid ""
692.9389 +"One situation in which a global <filename>hgrc</filename> can be useful is if "
692.9390 +"users are pulling changes owned by other users.  By default, Mercurial will "
692.9391 +"not trust most of the configuration items in a <filename>.hg/hgrc</filename> "
692.9392 +"file inside a repository that is owned by a different user. If we clone or "
692.9393 +"pull changes from such a repository, Mercurial will print a warning stating "
692.9394 +"that it does not trust their <filename>.hg/hgrc</filename>."
692.9395 +msgstr ""
692.9396 +
692.9397 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9398 +#: ../en/ch06-collab.xml:1541
692.9399 +msgid ""
692.9400 +"If everyone in a particular Unix group is on the same team and "
692.9401 +"<emphasis>should</emphasis> trust each other's configuration settings, or we "
692.9402 +"want to trust particular users, we can override Mercurial's skeptical "
692.9403 +"defaults by creating a system-wide <filename>hgrc</filename> file such as the "
692.9404 +"following:"
692.9405 +msgstr ""
692.9406 +
692.9407 +#. type: Content of: <book><chapter><title>
692.9408 +#: ../en/ch07-filenames.xml:5
692.9409 +msgid "File names and pattern matching"
692.9410 +msgstr "文件名称与模式匹配"
692.9411 +
692.9412 +#. type: Content of: <book><chapter><para>
692.9413 +#: ../en/ch07-filenames.xml:7
692.9414 +msgid ""
692.9415 +"Mercurial provides mechanisms that let you work with file names in a "
692.9416 +"consistent and expressive way."
692.9417 +msgstr ""
692.9418 +
692.9419 +#. type: Content of: <book><chapter><sect1><title>
692.9420 +#: ../en/ch07-filenames.xml:11
692.9421 +msgid "Simple file naming"
692.9422 +msgstr "简单文件名称"
692.9423 +
692.9424 +#. type: Content of: <book><chapter><sect1><para>
692.9425 +#: ../en/ch07-filenames.xml:13
692.9426 +msgid ""
692.9427 +"Mercurial uses a unified piece of machinery <quote>under the hood</quote> to "
692.9428 +"handle file names.  Every command behaves uniformly with respect to file "
692.9429 +"names.  The way in which commands work with file names is as follows."
692.9430 +msgstr ""
692.9431 +
692.9432 +#. type: Content of: <book><chapter><sect1><para>
692.9433 +#: ../en/ch07-filenames.xml:18
692.9434 +msgid ""
692.9435 +"If you explicitly name real files on the command line, Mercurial works with "
692.9436 +"exactly those files, as you would expect.  &interaction.filenames.files;"
692.9437 +msgstr ""
692.9438 +
692.9439 +#
692.9440 +#. type: Content of: <book><chapter><sect1><para>
692.9441 +#: ../en/ch07-filenames.xml:22
692.9442 +msgid ""
692.9443 +"When you provide a directory name, Mercurial will interpret this as "
692.9444 +"<quote>operate on every file in this directory and its subdirectories</"
692.9445 +"quote>. Mercurial traverses the files and subdirectories in a directory in "
692.9446 +"alphabetical order.  When it encounters a subdirectory, it will traverse that "
692.9447 +"subdirectory before continuing with the current directory."
692.9448 +msgstr ""
692.9449 +
692.9450 +#. type: Content of: <book><chapter><sect1><title>
692.9451 +#: ../en/ch07-filenames.xml:33
692.9452 +msgid "Running commands without any file names"
692.9453 +msgstr "不提供文件名称的执行命令"
692.9454 +
692.9455 +#. type: Content of: <book><chapter><sect1><para>
692.9456 +#: ../en/ch07-filenames.xml:35
692.9457 +msgid ""
692.9458 +"Mercurial's commands that work with file names have useful default behaviors "
692.9459 +"when you invoke them without providing any file names or patterns.  What kind "
692.9460 +"of behavior you should expect depends on what the command does.  Here are a "
692.9461 +"few rules of thumb you can use to predict what a command is likely to do if "
692.9462 +"you don't give it any names to work with."
692.9463 +msgstr ""
692.9464 +
692.9465 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.9466 +#: ../en/ch07-filenames.xml:42
692.9467 +msgid ""
692.9468 +"Most commands will operate on the entire working directory. This is what the "
692.9469 +"<command role=\"hg-cmd\">hg add</command> command does, for example."
692.9470 +msgstr ""
692.9471 +
692.9472 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.9473 +#: ../en/ch07-filenames.xml:46
692.9474 +msgid ""
692.9475 +"If the command has effects that are difficult or impossible to reverse, it "
692.9476 +"will force you to explicitly provide at least one name or pattern (see "
692.9477 +"below).  This protects you from accidentally deleting files by running "
692.9478 +"<command role=\"hg-cmd\">hg remove</command> with no arguments, for example."
692.9479 +msgstr ""
692.9480 +
692.9481 +#. type: Content of: <book><chapter><sect1><para>
692.9482 +#: ../en/ch07-filenames.xml:54
692.9483 +msgid ""
692.9484 +"It's easy to work around these default behaviors if they don't suit you.  If "
692.9485 +"a command normally operates on the whole working directory, you can invoke it "
692.9486 +"on just the current directory and its subdirectories by giving it the name "
692.9487 +"<quote><filename class=\"directory\">.</filename></quote>."
692.9488 +msgstr ""
692.9489 +
692.9490 +#
692.9491 +#. type: Content of: <book><chapter><sect1><para>
692.9492 +#: ../en/ch07-filenames.xml:62
692.9493 +msgid ""
692.9494 +"Along the same lines, some commands normally print file names relative to the "
692.9495 +"root of the repository, even if you're invoking them from a subdirectory.  "
692.9496 +"Such a command will print file names relative to your subdirectory if you "
692.9497 +"give it explicit names.  Here, we're going to run <command role=\"hg-cmd\">hg "
692.9498 +"status</command> from a subdirectory, and get it to operate on the entire "
692.9499 +"working directory while printing file names relative to our subdirectory, by "
692.9500 +"passing it the output of the <command role=\"hg-cmd\">hg root</command> "
692.9501 +"command."
692.9502 +msgstr ""
692.9503 +
692.9504 +#. type: Content of: <book><chapter><sect1><title>
692.9505 +#: ../en/ch07-filenames.xml:76
692.9506 +msgid "Telling you what's going on"
692.9507 +msgstr "告诉你正在做什么"
692.9508 +
692.9509 +#. type: Content of: <book><chapter><sect1><para>
692.9510 +#: ../en/ch07-filenames.xml:78
692.9511 +msgid ""
692.9512 +"The <command role=\"hg-cmd\">hg add</command> example in the preceding "
692.9513 +"section illustrates something else that's helpful about Mercurial commands.  "
692.9514 +"If a command operates on a file that you didn't name explicitly on the "
692.9515 +"command line, it will usually print the name of the file, so that you will "
692.9516 +"not be surprised what's going on."
692.9517 +msgstr ""
692.9518 +
692.9519 +#. type: Content of: <book><chapter><sect1><para>
692.9520 +#: ../en/ch07-filenames.xml:85
692.9521 +msgid ""
692.9522 +"The principle here is of <emphasis>least surprise</emphasis>.  If you've "
692.9523 +"exactly named a file on the command line, there's no point in repeating it "
692.9524 +"back at you.  If Mercurial is acting on a file <emphasis>implicitly</"
692.9525 +"emphasis>, e.g.  because you provided no names, or a directory, or a pattern "
692.9526 +"(see below), it is safest to tell you what files it's operating on."
692.9527 +msgstr ""
692.9528 +
692.9529 +#. type: Content of: <book><chapter><sect1><para>
692.9530 +#: ../en/ch07-filenames.xml:92
692.9531 +msgid ""
692.9532 +"For commands that behave this way, you can silence them using the <option "
692.9533 +"role=\"hg-opt-global\">-q</option> option.  You can also get them to print "
692.9534 +"the name of every file, even those you've named explicitly, using the <option "
692.9535 +"role=\"hg-opt-global\">-v</option> option."
692.9536 +msgstr ""
692.9537 +
692.9538 +#. type: Content of: <book><chapter><sect1><title>
692.9539 +#: ../en/ch07-filenames.xml:100
692.9540 +msgid "Using patterns to identify files"
692.9541 +msgstr "使用模式标识文件"
692.9542 +
692.9543 +#. type: Content of: <book><chapter><sect1><para>
692.9544 +#: ../en/ch07-filenames.xml:102
692.9545 +msgid ""
692.9546 +"In addition to working with file and directory names, Mercurial lets you use "
692.9547 +"<emphasis>patterns</emphasis> to identify files.  Mercurial's pattern "
692.9548 +"handling is expressive."
692.9549 +msgstr ""
692.9550 +
692.9551 +#. type: Content of: <book><chapter><sect1><para>
692.9552 +#: ../en/ch07-filenames.xml:106
692.9553 +msgid ""
692.9554 +"On Unix-like systems (Linux, MacOS, etc.), the job of matching file names to "
692.9555 +"patterns normally falls to the shell.  On these systems, you must explicitly "
692.9556 +"tell Mercurial that a name is a pattern.  On Windows, the shell does not "
692.9557 +"expand patterns, so Mercurial will automatically identify names that are "
692.9558 +"patterns, and expand them for you."
692.9559 +msgstr ""
692.9560 +
692.9561 +#. type: Content of: <book><chapter><sect1><para>
692.9562 +#: ../en/ch07-filenames.xml:113
692.9563 +msgid ""
692.9564 +"To provide a pattern in place of a regular name on the command line, the "
692.9565 +"mechanism is simple:"
692.9566 +msgstr ""
692.9567 +
692.9568 +#. type: Content of: <book><chapter><sect1><para>
692.9569 +#: ../en/ch07-filenames.xml:116
692.9570 +msgid ""
692.9571 +"That is, a pattern is identified by a short text string that says what kind "
692.9572 +"of pattern this is, followed by a colon, followed by the actual pattern."
692.9573 +msgstr ""
692.9574 +
692.9575 +#. type: Content of: <book><chapter><sect1><para>
692.9576 +#: ../en/ch07-filenames.xml:120
692.9577 +msgid ""
692.9578 +"Mercurial supports two kinds of pattern syntax.  The most frequently used is "
692.9579 +"called <literal>glob</literal>; this is the same kind of pattern matching "
692.9580 +"used by the Unix shell, and should be familiar to Windows command prompt "
692.9581 +"users, too."
692.9582 +msgstr ""
692.9583 +
692.9584 +#. type: Content of: <book><chapter><sect1><para>
692.9585 +#: ../en/ch07-filenames.xml:125
692.9586 +msgid ""
692.9587 +"When Mercurial does automatic pattern matching on Windows, it uses "
692.9588 +"<literal>glob</literal> syntax.  You can thus omit the <quote><literal>glob:</"
692.9589 +"literal></quote> prefix on Windows, but it's safe to use it, too."
692.9590 +msgstr ""
692.9591 +
692.9592 +#. type: Content of: <book><chapter><sect1><para>
692.9593 +#: ../en/ch07-filenames.xml:130
692.9594 +msgid ""
692.9595 +"The <literal>re</literal> syntax is more powerful; it lets you specify "
692.9596 +"patterns using regular expressions, also known as regexps."
692.9597 +msgstr ""
692.9598 +
692.9599 +#. type: Content of: <book><chapter><sect1><para>
692.9600 +#: ../en/ch07-filenames.xml:134
692.9601 +msgid ""
692.9602 +"By the way, in the examples that follow, notice that I'm careful to wrap all "
692.9603 +"of my patterns in quote characters, so that they won't get expanded by the "
692.9604 +"shell before Mercurial sees them."
692.9605 +msgstr ""
692.9606 +
692.9607 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.9608 +#: ../en/ch07-filenames.xml:140
692.9609 +msgid "Shell-style <literal>glob</literal> patterns"
692.9610 +msgstr "外壳风格的 <literal>glob</literal>  模式"
692.9611 +
692.9612 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9613 +#: ../en/ch07-filenames.xml:142
692.9614 +msgid ""
692.9615 +"This is an overview of the kinds of patterns you can use when you're matching "
692.9616 +"on glob patterns."
692.9617 +msgstr ""
692.9618 +
692.9619 +#
692.9620 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9621 +#: ../en/ch07-filenames.xml:145
692.9622 +msgid ""
692.9623 +"The <quote><literal>*</literal></quote> character matches any string, within "
692.9624 +"a single directory."
692.9625 +msgstr ""
692.9626 +
692.9627 +#
692.9628 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9629 +#: ../en/ch07-filenames.xml:150
692.9630 +msgid ""
692.9631 +"The <quote><literal>**</literal></quote> pattern matches any string, and "
692.9632 +"crosses directory boundaries.  It's not a standard Unix glob token, but it's "
692.9633 +"accepted by several popular Unix shells, and is very useful."
692.9634 +msgstr ""
692.9635 +
692.9636 +#
692.9637 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9638 +#: ../en/ch07-filenames.xml:157
692.9639 +msgid ""
692.9640 +"The <quote><literal>?</literal></quote> pattern matches any single character."
692.9641 +msgstr ""
692.9642 +
692.9643 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9644 +#: ../en/ch07-filenames.xml:162
692.9645 +msgid ""
692.9646 +"The <quote><literal>[</literal></quote> character begins a "
692.9647 +"<emphasis>character class</emphasis>.  This matches any single character "
692.9648 +"within the class.  The class ends with a <quote><literal>]</literal></quote> "
692.9649 +"character.  A class may contain multiple <emphasis>range</emphasis>s of the "
692.9650 +"form <quote><literal>a-f</literal></quote>, which is shorthand for "
692.9651 +"<quote><literal>abcdef</literal></quote>."
692.9652 +msgstr ""
692.9653 +
692.9654 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9655 +#: ../en/ch07-filenames.xml:172
692.9656 +msgid ""
692.9657 +"If the first character after the <quote><literal>[</literal></quote> in a "
692.9658 +"character class is a <quote><literal>!</literal></quote>, it "
692.9659 +"<emphasis>negates</emphasis> the class, making it match any single character "
692.9660 +"not in the class."
692.9661 +msgstr ""
692.9662 +
692.9663 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9664 +#: ../en/ch07-filenames.xml:178
692.9665 +msgid ""
692.9666 +"A <quote><literal>{</literal></quote> begins a group of subpatterns, where "
692.9667 +"the whole group matches if any subpattern in the group matches.  The "
692.9668 +"<quote><literal>,</literal></quote> character separates subpatterns, and "
692.9669 +"<quote><literal>}</literal></quote> ends the group."
692.9670 +msgstr ""
692.9671 +
692.9672 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.9673 +#: ../en/ch07-filenames.xml:187
692.9674 +msgid "Watch out!"
692.9675 +msgstr "千万小心!"
692.9676 +
692.9677 +#
692.9678 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.9679 +#: ../en/ch07-filenames.xml:189
692.9680 +msgid ""
692.9681 +"Don't forget that if you want to match a pattern in any directory, you should "
692.9682 +"not be using the <quote><literal>*</literal></quote> match-any token, as this "
692.9683 +"will only match within one directory.  Instead, use the <quote><literal>**</"
692.9684 +"literal></quote> token.  This small example illustrates the difference "
692.9685 +"between the two."
692.9686 +msgstr ""
692.9687 +
692.9688 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.9689 +#: ../en/ch07-filenames.xml:201
692.9690 +msgid "Regular expression matching with <literal>re</literal> patterns"
692.9691 +msgstr "使用 <literal>re</literal> 模式的正则表达式匹配"
692.9692 +
692.9693 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9694 +#: ../en/ch07-filenames.xml:204
692.9695 +msgid ""
692.9696 +"Mercurial accepts the same regular expression syntax as the Python "
692.9697 +"programming language (it uses Python's regexp engine internally). This is "
692.9698 +"based on the Perl language's regexp syntax, which is the most popular dialect "
692.9699 +"in use (it's also used in Java, for example)."
692.9700 +msgstr ""
692.9701 +
692.9702 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9703 +#: ../en/ch07-filenames.xml:210
692.9704 +msgid ""
692.9705 +"I won't discuss Mercurial's regexp dialect in any detail here, as regexps are "
692.9706 +"not often used.  Perl-style regexps are in any case already exhaustively "
692.9707 +"documented on a multitude of web sites, and in many books.  Instead, I will "
692.9708 +"focus here on a few things you should know if you find yourself needing to "
692.9709 +"use regexps with Mercurial."
692.9710 +msgstr ""
692.9711 +
692.9712 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9713 +#: ../en/ch07-filenames.xml:217
692.9714 +msgid ""
692.9715 +"A regexp is matched against an entire file name, relative to the root of the "
692.9716 +"repository.  In other words, even if you're already in subbdirectory "
692.9717 +"<filename class=\"directory\">foo</filename>, if you want to match files "
692.9718 +"under this directory, your pattern must start with <quote><literal>foo/</"
692.9719 +"literal></quote>."
692.9720 +msgstr ""
692.9721 +
692.9722 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9723 +#: ../en/ch07-filenames.xml:224
692.9724 +msgid ""
692.9725 +"One thing to note, if you're familiar with Perl-style regexps, is that "
692.9726 +"Mercurial's are <emphasis>rooted</emphasis>.  That is, a regexp starts "
692.9727 +"matching against the beginning of a string; it doesn't look for a match "
692.9728 +"anywhere within the string.  To match anywhere in a string, start your "
692.9729 +"pattern with <quote><literal>.*</literal></quote>."
692.9730 +msgstr ""
692.9731 +
692.9732 +#. type: Content of: <book><chapter><sect1><title>
692.9733 +#: ../en/ch07-filenames.xml:234
692.9734 +msgid "Filtering files"
692.9735 +msgstr "过滤文件"
692.9736 +
692.9737 +#. type: Content of: <book><chapter><sect1><para>
692.9738 +#: ../en/ch07-filenames.xml:236
692.9739 +msgid ""
692.9740 +"Not only does Mercurial give you a variety of ways to specify files; it lets "
692.9741 +"you further winnow those files using <emphasis>filters</emphasis>.  Commands "
692.9742 +"that work with file names accept two filtering options."
692.9743 +msgstr ""
692.9744 +
692.9745 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.9746 +#: ../en/ch07-filenames.xml:241
692.9747 +msgid ""
692.9748 +"<option role=\"hg-opt-global\">-I</option>, or <option role=\"hg-opt-global"
692.9749 +"\">--include</option>, lets you specify a pattern that file names must match "
692.9750 +"in order to be processed."
692.9751 +msgstr ""
692.9752 +
692.9753 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.9754 +#: ../en/ch07-filenames.xml:246
692.9755 +msgid ""
692.9756 +"<option role=\"hg-opt-global\">-X</option>, or <option role=\"hg-opt-global"
692.9757 +"\">--exclude</option>, gives you a way to <emphasis>avoid</emphasis> "
692.9758 +"processing files, if they match this pattern."
692.9759 +msgstr ""
692.9760 +
692.9761 +#. type: Content of: <book><chapter><sect1><para>
692.9762 +#: ../en/ch07-filenames.xml:251
692.9763 +msgid ""
692.9764 +"You can provide multiple <option role=\"hg-opt-global\">-I</option> and "
692.9765 +"<option role=\"hg-opt-global\">-X</option> options on the command line, and "
692.9766 +"intermix them as you please.  Mercurial interprets the patterns you provide "
692.9767 +"using glob syntax by default (but you can use regexps if you need to)."
692.9768 +msgstr ""
692.9769 +
692.9770 +#. type: Content of: <book><chapter><sect1><para>
692.9771 +#: ../en/ch07-filenames.xml:258
692.9772 +msgid ""
692.9773 +"You can read a <option role=\"hg-opt-global\">-I</option> filter as "
692.9774 +"<quote>process only the files that match this filter</quote>."
692.9775 +msgstr ""
692.9776 +
692.9777 +#. type: Content of: <book><chapter><sect1><para>
692.9778 +#: ../en/ch07-filenames.xml:264
692.9779 +msgid ""
692.9780 +"The <option role=\"hg-opt-global\">-X</option> filter is best read as "
692.9781 +"<quote>process only the files that don't match this pattern</quote>."
692.9782 +msgstr ""
692.9783 +
692.9784 +#. type: Content of: <book><chapter><sect1><title>
692.9785 +#: ../en/ch07-filenames.xml:272
692.9786 +msgid "Permanently ignoring unwanted files and directories"
692.9787 +msgstr "始终忽略不需要的文件和目录"
692.9788 +
692.9789 +#. type: Content of: <book><chapter><sect1><para>
692.9790 +#: ../en/ch07-filenames.xml:274
692.9791 +msgid ""
692.9792 +"When you create a new repository, the chances are that over time it will grow "
692.9793 +"to contain files that ought to <emphasis>not</emphasis> be managed by "
692.9794 +"Mercurial, but which you don't want to see listed every time you run "
692.9795 +"<command>hg status</command>.  For instance, <quote>build products</quote> "
692.9796 +"are files that are created as part of a build but which should not be managed "
692.9797 +"by a revision control system.  The most common build products are output "
692.9798 +"files produced by software tools such as compilers.  As another example, many "
692.9799 +"text editors litter a directory with lock files, temporary working files, and "
692.9800 +"backup files, which it also makes no sense to manage."
692.9801 +msgstr ""
692.9802 +
692.9803 +#. type: Content of: <book><chapter><sect1><para>
692.9804 +#: ../en/ch07-filenames.xml:286
692.9805 +msgid ""
692.9806 +"To have Mercurial permanently ignore such files, create a file named "
692.9807 +"<filename>.hgignore</filename> in the root of your repository.  You "
692.9808 +"<emphasis>should</emphasis> <command>hg add</command> this file so that it "
692.9809 +"gets tracked with the rest of your repository contents, since your "
692.9810 +"collaborators will probably find it useful too."
692.9811 +msgstr ""
692.9812 +
692.9813 +#. type: Content of: <book><chapter><sect1><para>
692.9814 +#: ../en/ch07-filenames.xml:293
692.9815 +msgid ""
692.9816 +"By default, the <filename>.hgignore</filename> file should contain a list of "
692.9817 +"regular expressions, one per line.  Empty lines are skipped. Most people "
692.9818 +"prefer to describe the files they want to ignore using the <quote>glob</"
692.9819 +"quote> syntax that we described above, so a typical <filename>.hgignore</"
692.9820 +"filename> file will start with this directive:"
692.9821 +msgstr ""
692.9822 +
692.9823 +#. type: Content of: <book><chapter><sect1><para>
692.9824 +#: ../en/ch07-filenames.xml:302
692.9825 +msgid ""
692.9826 +"This tells Mercurial to interpret the lines that follow as glob patterns, not "
692.9827 +"regular expressions."
692.9828 +msgstr ""
692.9829 +
692.9830 +#. type: Content of: <book><chapter><sect1><para>
692.9831 +#: ../en/ch07-filenames.xml:305
692.9832 +msgid "Here is a typical-looking <filename>.hgignore</filename> file."
692.9833 +msgstr ""
692.9834 +
692.9835 +#. type: Content of: <book><chapter><sect1><title>
692.9836 +#: ../en/ch07-filenames.xml:329
692.9837 +msgid "Case sensitivity"
692.9838 +msgstr "大小写敏感性"
692.9839 +
692.9840 +#. type: Content of: <book><chapter><sect1><para>
692.9841 +#: ../en/ch07-filenames.xml:331
692.9842 +msgid ""
692.9843 +"If you're working in a mixed development environment that contains both Linux "
692.9844 +"(or other Unix) systems and Macs or Windows systems, you should keep in the "
692.9845 +"back of your mind the knowledge that they treat the case (<quote>N</quote> "
692.9846 +"versus <quote>n</quote>) of file names in incompatible ways.  This is not "
692.9847 +"very likely to affect you, and it's easy to deal with if it does, but it "
692.9848 +"could surprise you if you don't know about it."
692.9849 +msgstr ""
692.9850 +
692.9851 +#. type: Content of: <book><chapter><sect1><para>
692.9852 +#: ../en/ch07-filenames.xml:340
692.9853 +msgid ""
692.9854 +"Operating systems and filesystems differ in the way they handle the "
692.9855 +"<emphasis>case</emphasis> of characters in file and directory names.  There "
692.9856 +"are three common ways to handle case in names."
692.9857 +msgstr ""
692.9858 +
692.9859 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.9860 +#: ../en/ch07-filenames.xml:345
692.9861 +msgid ""
692.9862 +"Completely case insensitive.  Uppercase and lowercase versions of a letter "
692.9863 +"are treated as identical, both when creating a file and during subsequent "
692.9864 +"accesses.  This is common on older DOS-based systems."
692.9865 +msgstr ""
692.9866 +
692.9867 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.9868 +#: ../en/ch07-filenames.xml:350
692.9869 +msgid ""
692.9870 +"Case preserving, but insensitive.  When a file or directory is created, the "
692.9871 +"case of its name is stored, and can be retrieved and displayed by the "
692.9872 +"operating system.  When an existing file is being looked up, its case is "
692.9873 +"ignored.  This is the standard arrangement on Windows and MacOS.  The names "
692.9874 +"<filename>foo</filename> and <filename>FoO</filename> identify the same "
692.9875 +"file.  This treatment of uppercase and lowercase letters as interchangeable "
692.9876 +"is also referred to as <emphasis>case folding</emphasis>."
692.9877 +msgstr ""
692.9878 +
692.9879 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.9880 +#: ../en/ch07-filenames.xml:361
692.9881 +msgid ""
692.9882 +"Case sensitive.  The case of a name is significant at all times. The names "
692.9883 +"<filename>foo</filename> and <filename>FoO</filename> identify different "
692.9884 +"files.  This is the way Linux and Unix systems normally work."
692.9885 +msgstr ""
692.9886 +
692.9887 +#. type: Content of: <book><chapter><sect1><para>
692.9888 +#: ../en/ch07-filenames.xml:368
692.9889 +msgid ""
692.9890 +"On Unix-like systems, it is possible to have any or all of the above ways of "
692.9891 +"handling case in action at once.  For example, if you use a USB thumb drive "
692.9892 +"formatted with a FAT32 filesystem on a Linux system, Linux will handle names "
692.9893 +"on that filesystem in a case preserving, but insensitive, way."
692.9894 +msgstr ""
692.9895 +
692.9896 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.9897 +#: ../en/ch07-filenames.xml:375
692.9898 +msgid "Safe, portable repository storage"
692.9899 +msgstr "安全,可移植的版本库存储"
692.9900 +
692.9901 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9902 +#: ../en/ch07-filenames.xml:377
692.9903 +msgid ""
692.9904 +"Mercurial's repository storage mechanism is <emphasis>case safe</emphasis>.  "
692.9905 +"It translates file names so that they can be safely stored on both case "
692.9906 +"sensitive and case insensitive filesystems.  This means that you can use "
692.9907 +"normal file copying tools to transfer a Mercurial repository onto, for "
692.9908 +"example, a USB thumb drive, and safely move that drive and repository back "
692.9909 +"and forth between a Mac, a PC running Windows, and a Linux box."
692.9910 +msgstr ""
692.9911 +
692.9912 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.9913 +#: ../en/ch07-filenames.xml:388
692.9914 +msgid "Detecting case conflicts"
692.9915 +msgstr "检测大小写冲突"
692.9916 +
692.9917 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9918 +#: ../en/ch07-filenames.xml:390
692.9919 +msgid ""
692.9920 +"When operating in the working directory, Mercurial honours the naming policy "
692.9921 +"of the filesystem where the working directory is located.  If the filesystem "
692.9922 +"is case preserving, but insensitive, Mercurial will treat names that differ "
692.9923 +"only in case as the same."
692.9924 +msgstr ""
692.9925 +
692.9926 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9927 +#: ../en/ch07-filenames.xml:396
692.9928 +msgid ""
692.9929 +"An important aspect of this approach is that it is possible to commit a "
692.9930 +"changeset on a case sensitive (typically Linux or Unix) filesystem that will "
692.9931 +"cause trouble for users on case insensitive (usually Windows and MacOS) "
692.9932 +"users.  If a Linux user commits changes to two files, one named "
692.9933 +"<filename>myfile.c</filename> and the other named <filename>MyFile.C</"
692.9934 +"filename>, they will be stored correctly in the repository.  And in the "
692.9935 +"working directories of other Linux users, they will be correctly represented "
692.9936 +"as separate files."
692.9937 +msgstr ""
692.9938 +
692.9939 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9940 +#: ../en/ch07-filenames.xml:407
692.9941 +msgid ""
692.9942 +"If a Windows or Mac user pulls this change, they will not initially have a "
692.9943 +"problem, because Mercurial's repository storage mechanism is case safe.  "
692.9944 +"However, once they try to <command role=\"hg-cmd\">hg update</command> the "
692.9945 +"working directory to that changeset, or <command role=\"hg-cmd\">hg merge</"
692.9946 +"command> with that changeset, Mercurial will spot the conflict between the "
692.9947 +"two file names that the filesystem would treat as the same, and forbid the "
692.9948 +"update or merge from occurring."
692.9949 +msgstr ""
692.9950 +
692.9951 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.9952 +#: ../en/ch07-filenames.xml:419
692.9953 +msgid "Fixing a case conflict"
692.9954 +msgstr "修正大小写冲突"
692.9955 +
692.9956 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9957 +#: ../en/ch07-filenames.xml:421
692.9958 +msgid ""
692.9959 +"If you are using Windows or a Mac in a mixed environment where some of your "
692.9960 +"collaborators are using Linux or Unix, and Mercurial reports a case folding "
692.9961 +"conflict when you try to <command role=\"hg-cmd\">hg update</command> or "
692.9962 +"<command role=\"hg-cmd\">hg merge</command>, the procedure to fix the problem "
692.9963 +"is simple."
692.9964 +msgstr ""
692.9965 +
692.9966 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9967 +#: ../en/ch07-filenames.xml:428
692.9968 +msgid ""
692.9969 +"Just find a nearby Linux or Unix box, clone the problem repository onto it, "
692.9970 +"and use Mercurial's <command role=\"hg-cmd\">hg rename</command> command to "
692.9971 +"change the names of any offending files or directories so that they will no "
692.9972 +"longer cause case folding conflicts.  Commit this change, <command role=\"hg-"
692.9973 +"cmd\">hg pull</command> or <command role=\"hg-cmd\">hg push</command> it "
692.9974 +"across to your Windows or MacOS system, and <command role=\"hg-cmd\">hg "
692.9975 +"update</command> to the revision with the non-conflicting names."
692.9976 +msgstr ""
692.9977 +
692.9978 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.9979 +#: ../en/ch07-filenames.xml:438
692.9980 +msgid ""
692.9981 +"The changeset with case-conflicting names will remain in your project's "
692.9982 +"history, and you still won't be able to <command role=\"hg-cmd\">hg update</"
692.9983 +"command> your working directory to that changeset on a Windows or MacOS "
692.9984 +"system, but you can continue development unimpeded."
692.9985 +msgstr ""
692.9986 +
692.9987 +#. type: Content of: <book><chapter><title>
692.9988 +#: ../en/ch08-branch.xml:5
692.9989 +msgid "Managing releases and branchy development"
692.9990 +msgstr "发布管理与分支开发"
692.9991 +
692.9992 +#. type: Content of: <book><chapter><para>
692.9993 +#: ../en/ch08-branch.xml:7
692.9994 +msgid ""
692.9995 +"Mercurial provides several mechanisms for you to manage a project that is "
692.9996 +"making progress on multiple fronts at once.  To understand these mechanisms, "
692.9997 +"let's first take a brief look at a fairly normal software project structure."
692.9998 +msgstr ""
692.9999 +
692.10000 +#. type: Content of: <book><chapter><para>
692.10001 +#: ../en/ch08-branch.xml:12
692.10002 +msgid ""
692.10003 +"Many software projects issue periodic <quote>major</quote> releases that "
692.10004 +"contain substantial new features.  In parallel, they may issue <quote>minor</"
692.10005 +"quote> releases.  These are usually identical to the major releases off which "
692.10006 +"they're based, but with a few bugs fixed."
692.10007 +msgstr ""
692.10008 +
692.10009 +#. type: Content of: <book><chapter><para>
692.10010 +#: ../en/ch08-branch.xml:18
692.10011 +msgid ""
692.10012 +"In this chapter, we'll start by talking about how to keep records of project "
692.10013 +"milestones such as releases.  We'll then continue on to talk about the flow "
692.10014 +"of work between different phases of a project, and how Mercurial can help you "
692.10015 +"to isolate and manage this work."
692.10016 +msgstr ""
692.10017 +
692.10018 +#. type: Content of: <book><chapter><sect1><title>
692.10019 +#: ../en/ch08-branch.xml:25
692.10020 +msgid "Giving a persistent name to a revision"
692.10021 +msgstr "给版本指定一个永久的名称"
692.10022 +
692.10023 +#. type: Content of: <book><chapter><sect1><para>
692.10024 +#: ../en/ch08-branch.xml:27
692.10025 +msgid ""
692.10026 +"Once you decide that you'd like to call a particular revision a "
692.10027 +"<quote>release</quote>, it's a good idea to record the identity of that "
692.10028 +"revision. This will let you reproduce that release at a later date, for "
692.10029 +"whatever purpose you might need at the time (reproducing a bug, porting to a "
692.10030 +"new platform, etc).  &interaction.tag.init;"
692.10031 +msgstr ""
692.10032 +
692.10033 +#
692.10034 +#. type: Content of: <book><chapter><sect1><para>
692.10035 +#: ../en/ch08-branch.xml:34
692.10036 +msgid ""
692.10037 +"Mercurial lets you give a permanent name to any revision using the <command "
692.10038 +"role=\"hg-cmd\">hg tag</command> command.  Not surprisingly, these names are "
692.10039 +"called <quote>tags</quote>."
692.10040 +msgstr ""
692.10041 +
692.10042 +#. type: Content of: <book><chapter><sect1><para>
692.10043 +#: ../en/ch08-branch.xml:40
692.10044 +msgid ""
692.10045 +"A tag is nothing more than a <quote>symbolic name</quote> for a revision.  "
692.10046 +"Tags exist purely for your convenience, so that you have a handy permanent "
692.10047 +"way to refer to a revision; Mercurial doesn't interpret the tag names you use "
692.10048 +"in any way.  Neither does Mercurial place any restrictions on the name of a "
692.10049 +"tag, beyond a few that are necessary to ensure that a tag can be parsed "
692.10050 +"unambiguously.  A tag name cannot contain any of the following characters:"
692.10051 +msgstr ""
692.10052 +
692.10053 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.10054 +#: ../en/ch08-branch.xml:49
692.10055 +msgid "Colon (ASCII 58, <quote><literal>:</literal></quote>)"
692.10056 +msgstr ""
692.10057 +
692.10058 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.10059 +#: ../en/ch08-branch.xml:52
692.10060 +msgid "Carriage return (ASCII 13, <quote><literal>\\r</literal></quote>)"
692.10061 +msgstr ""
692.10062 +
692.10063 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.10064 +#: ../en/ch08-branch.xml:55
692.10065 +msgid "Newline (ASCII 10, <quote><literal>\\n</literal></quote>)"
692.10066 +msgstr ""
692.10067 +
692.10068 +#. type: Content of: <book><chapter><sect1><para>
692.10069 +#: ../en/ch08-branch.xml:59
692.10070 +msgid ""
692.10071 +"You can use the <command role=\"hg-cmd\">hg tags</command> command to display "
692.10072 +"the tags present in your repository.  In the output, each tagged revision is "
692.10073 +"identified first by its name, then by revision number, and finally by the "
692.10074 +"unique hash of the revision."
692.10075 +msgstr ""
692.10076 +
692.10077 +#. type: Content of: <book><chapter><sect1><para>
692.10078 +#: ../en/ch08-branch.xml:67
692.10079 +msgid ""
692.10080 +"Notice that <literal>tip</literal> is listed in the output of <command role="
692.10081 +"\"hg-cmd\">hg tags</command>.  The <literal>tip</literal> tag is a special "
692.10082 +"<quote>floating</quote> tag, which always identifies the newest revision in "
692.10083 +"the repository."
692.10084 +msgstr ""
692.10085 +
692.10086 +#. type: Content of: <book><chapter><sect1><para>
692.10087 +#: ../en/ch08-branch.xml:73
692.10088 +msgid ""
692.10089 +"In the output of the <command role=\"hg-cmd\">hg tags</command> command, tags "
692.10090 +"are listed in reverse order, by revision number.  This usually means that "
692.10091 +"recent tags are listed before older tags.  It also means that <literal>tip</"
692.10092 +"literal> is always going to be the first tag listed in the output of <command "
692.10093 +"role=\"hg-cmd\">hg tags</command>."
692.10094 +msgstr ""
692.10095 +
692.10096 +#. type: Content of: <book><chapter><sect1><para>
692.10097 +#: ../en/ch08-branch.xml:80
692.10098 +msgid ""
692.10099 +"When you run <command role=\"hg-cmd\">hg log</command>, if it displays a "
692.10100 +"revision that has tags associated with it, it will print those tags."
692.10101 +msgstr ""
692.10102 +
692.10103 +#
692.10104 +#. type: Content of: <book><chapter><sect1><para>
692.10105 +#: ../en/ch08-branch.xml:86
692.10106 +msgid ""
692.10107 +"Any time you need to provide a revision ID to a Mercurial command, the "
692.10108 +"command will accept a tag name in its place.  Internally, Mercurial will "
692.10109 +"translate your tag name into the corresponding revision ID, then use that."
692.10110 +msgstr ""
692.10111 +
692.10112 +#. type: Content of: <book><chapter><sect1><para>
692.10113 +#: ../en/ch08-branch.xml:93
692.10114 +msgid ""
692.10115 +"There's no limit on the number of tags you can have in a repository, or on "
692.10116 +"the number of tags that a single revision can have.  As a practical matter, "
692.10117 +"it's not a great idea to have <quote>too many</quote> (a number which will "
692.10118 +"vary from project to project), simply because tags are supposed to help you "
692.10119 +"to find revisions.  If you have lots of tags, the ease of using them to "
692.10120 +"identify revisions diminishes rapidly."
692.10121 +msgstr ""
692.10122 +
692.10123 +#. type: Content of: <book><chapter><sect1><para>
692.10124 +#: ../en/ch08-branch.xml:101
692.10125 +msgid ""
692.10126 +"For example, if your project has milestones as frequent as every few days, "
692.10127 +"it's perfectly reasonable to tag each one of those.  But if you have a "
692.10128 +"continuous build system that makes sure every revision can be built cleanly, "
692.10129 +"you'd be introducing a lot of noise if you were to tag every clean build.  "
692.10130 +"Instead, you could tag failed builds (on the assumption that they're rare!), "
692.10131 +"or simply not use tags to track buildability."
692.10132 +msgstr ""
692.10133 +
692.10134 +#. type: Content of: <book><chapter><sect1><para>
692.10135 +#: ../en/ch08-branch.xml:109
692.10136 +msgid ""
692.10137 +"If you want to remove a tag that you no longer want, use <command role=\"hg-"
692.10138 +"cmd\">hg tag --remove</command>."
692.10139 +msgstr ""
692.10140 +
692.10141 +#. type: Content of: <book><chapter><sect1><para>
692.10142 +#: ../en/ch08-branch.xml:114
692.10143 +msgid ""
692.10144 +"You can also modify a tag at any time, so that it identifies a different "
692.10145 +"revision, by simply issuing a new <command role=\"hg-cmd\">hg tag</command> "
692.10146 +"command. You'll have to use the <option role=\"hg-opt-tag\">-f</option> "
692.10147 +"option to tell Mercurial that you <emphasis>really</emphasis> want to update "
692.10148 +"the tag."
692.10149 +msgstr ""
692.10150 +
692.10151 +#. type: Content of: <book><chapter><sect1><para>
692.10152 +#: ../en/ch08-branch.xml:123
692.10153 +msgid ""
692.10154 +"There will still be a permanent record of the previous identity of the tag, "
692.10155 +"but Mercurial will no longer use it.  There's thus no penalty to tagging the "
692.10156 +"wrong revision; all you have to do is turn around and tag the correct "
692.10157 +"revision once you discover your error."
692.10158 +msgstr ""
692.10159 +
692.10160 +#. type: Content of: <book><chapter><sect1><para>
692.10161 +#: ../en/ch08-branch.xml:129
692.10162 +msgid ""
692.10163 +"Mercurial stores tags in a normal revision-controlled file in your "
692.10164 +"repository.  If you've created any tags, you'll find them in a file in the "
692.10165 +"root of your repository named <filename role=\"special\">.hgtags</filename>.  "
692.10166 +"When you run the <command role=\"hg-cmd\">hg tag</command> command, Mercurial "
692.10167 +"modifies this file, then automatically commits the change to it.  This means "
692.10168 +"that every time you run <command role=\"hg-cmd\">hg tag</command>, you'll see "
692.10169 +"a corresponding changeset in the output of <command role=\"hg-cmd\">hg log</"
692.10170 +"command>."
692.10171 +msgstr ""
692.10172 +
692.10173 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.10174 +#: ../en/ch08-branch.xml:142
692.10175 +msgid "Handling tag conflicts during a merge"
692.10176 +msgstr "在合并期间处理标签冲突"
692.10177 +
692.10178 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10179 +#: ../en/ch08-branch.xml:144
692.10180 +msgid ""
692.10181 +"You won't often need to care about the <filename role=\"special\">.hgtags</"
692.10182 +"filename> file, but it sometimes makes its presence known during a merge.  "
692.10183 +"The format of the file is simple: it consists of a series of lines.  Each "
692.10184 +"line starts with a changeset hash, followed by a space, followed by the name "
692.10185 +"of a tag."
692.10186 +msgstr ""
692.10187 +
692.10188 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10189 +#: ../en/ch08-branch.xml:151
692.10190 +msgid ""
692.10191 +"If you're resolving a conflict in the <filename role=\"special\">.hgtags</"
692.10192 +"filename> file during a merge, there's one twist to modifying the <filename "
692.10193 +"role=\"special\">.hgtags</filename> file: when Mercurial is parsing the tags "
692.10194 +"in a repository, it <emphasis>never</emphasis> reads the working copy of the "
692.10195 +"<filename role=\"special\">.hgtags</filename> file.  Instead, it reads the "
692.10196 +"<emphasis>most recently committed</emphasis> revision of the file."
692.10197 +msgstr ""
692.10198 +
692.10199 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10200 +#: ../en/ch08-branch.xml:161
692.10201 +msgid ""
692.10202 +"An unfortunate consequence of this design is that you can't actually verify "
692.10203 +"that your merged <filename role=\"special\">.hgtags</filename> file is "
692.10204 +"correct until <emphasis>after</emphasis> you've committed a change.  So if "
692.10205 +"you find yourself resolving a conflict on <filename role=\"special\">.hgtags</"
692.10206 +"filename> during a merge, be sure to run <command role=\"hg-cmd\">hg tags</"
692.10207 +"command> after you commit.  If it finds an error in the <filename role="
692.10208 +"\"special\">.hgtags</filename> file, it will report the location of the "
692.10209 +"error, which you can then fix and commit.  You should then run <command role="
692.10210 +"\"hg-cmd\">hg tags</command> again, just to be sure that your fix is correct."
692.10211 +msgstr ""
692.10212 +
692.10213 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.10214 +#: ../en/ch08-branch.xml:176
692.10215 +msgid "Tags and cloning"
692.10216 +msgstr "标签与克隆"
692.10217 +
692.10218 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10219 +#: ../en/ch08-branch.xml:178
692.10220 +msgid ""
692.10221 +"You may have noticed that the <command role=\"hg-cmd\">hg clone</command> "
692.10222 +"command has a <option role=\"hg-opt-clone\">-r</option> option that lets you "
692.10223 +"clone an exact copy of the repository as of a particular changeset.  The new "
692.10224 +"clone will not contain any project history that comes after the revision you "
692.10225 +"specified.  This has an interaction with tags that can surprise the unwary."
692.10226 +msgstr ""
692.10227 +
692.10228 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10229 +#: ../en/ch08-branch.xml:186
692.10230 +msgid ""
692.10231 +"Recall that a tag is stored as a revision to the <filename role=\"special\">."
692.10232 +"hgtags</filename> file. When you create a tag, the changeset in which its "
692.10233 +"recorded refers to an older changeset.  When you run <command role=\"hg-cmd"
692.10234 +"\">hg clone -r foo</command> to clone a repository as of tag <literal>foo</"
692.10235 +"literal>, the new clone <emphasis>will not contain any revision newer than "
692.10236 +"the one the tag refers to, including the revision where the tag was created</"
692.10237 +"emphasis>.  The result is that you'll get exactly the right subset of the "
692.10238 +"project's history in the new repository, but <emphasis>not</emphasis> the tag "
692.10239 +"you might have expected."
692.10240 +msgstr ""
692.10241 +
692.10242 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.10243 +#: ../en/ch08-branch.xml:201
692.10244 +msgid "When permanent tags are too much"
692.10245 +msgstr "当永久标签太多的时候"
692.10246 +
692.10247 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10248 +#: ../en/ch08-branch.xml:203
692.10249 +msgid ""
692.10250 +"Since Mercurial's tags are revision controlled and carried around with a "
692.10251 +"project's history, everyone you work with will see the tags you create.  But "
692.10252 +"giving names to revisions has uses beyond simply noting that revision "
692.10253 +"<literal>4237e45506ee</literal> is really <literal>v2.0.2</literal>.  If "
692.10254 +"you're trying to track down a subtle bug, you might want a tag to remind you "
692.10255 +"of something like <quote>Anne saw the symptoms with this revision</quote>."
692.10256 +msgstr ""
692.10257 +
692.10258 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10259 +#: ../en/ch08-branch.xml:213
692.10260 +msgid ""
692.10261 +"For cases like this, what you might want to use are <emphasis>local</"
692.10262 +"emphasis> tags. You can create a local tag with the <option role=\"hg-opt-tag"
692.10263 +"\">-l</option> option to the <command role=\"hg-cmd\">hg tag</command> "
692.10264 +"command.  This will store the tag in a file called <filename role=\"special"
692.10265 +"\">.hg/localtags</filename>.  Unlike <filename role=\"special\">.hgtags</"
692.10266 +"filename>, <filename role=\"special\">.hg/localtags</filename> is not "
692.10267 +"revision controlled.  Any tags you create using <option role=\"hg-opt-tag\">-"
692.10268 +"l</option> remain strictly local to the repository you're currently working "
692.10269 +"in."
692.10270 +msgstr ""
692.10271 +
692.10272 +#. type: Content of: <book><chapter><sect1><title>
692.10273 +#: ../en/ch08-branch.xml:228
692.10274 +msgid "The flow of changes&emdash;big picture vs. little"
692.10275 +msgstr "修改流程—宏观与微观"
692.10276 +
692.10277 +#. type: Content of: <book><chapter><sect1><para>
692.10278 +#: ../en/ch08-branch.xml:230
692.10279 +msgid ""
692.10280 +"To return to the outline I sketched at the beginning of the chapter, let's "
692.10281 +"think about a project that has multiple concurrent pieces of work under "
692.10282 +"development at once."
692.10283 +msgstr ""
692.10284 +
692.10285 +#. type: Content of: <book><chapter><sect1><para>
692.10286 +#: ../en/ch08-branch.xml:235
692.10287 +msgid ""
692.10288 +"There might be a push for a new <quote>main</quote> release; a new minor "
692.10289 +"bugfix release to the last main release; and an unexpected <quote>hot fix</"
692.10290 +"quote> to an old release that is now in maintenance mode."
692.10291 +msgstr ""
692.10292 +
692.10293 +#. type: Content of: <book><chapter><sect1><para>
692.10294 +#: ../en/ch08-branch.xml:240
692.10295 +msgid ""
692.10296 +"The usual way people refer to these different concurrent directions of "
692.10297 +"development is as <quote>branches</quote>.  However, we've already seen "
692.10298 +"numerous times that Mercurial treats <emphasis>all of history</emphasis> as a "
692.10299 +"series of branches and merges.  Really, what we have here is two ideas that "
692.10300 +"are peripherally related, but which happen to share a name."
692.10301 +msgstr ""
692.10302 +
692.10303 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.10304 +#: ../en/ch08-branch.xml:247
692.10305 +msgid ""
692.10306 +"<quote>Big picture</quote> branches represent the sweep of a project's "
692.10307 +"evolution; people give them names, and talk about them in conversation."
692.10308 +msgstr ""
692.10309 +
692.10310 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.10311 +#: ../en/ch08-branch.xml:251
692.10312 +msgid ""
692.10313 +"<quote>Little picture</quote> branches are artefacts of the day-to-day "
692.10314 +"activity of developing and merging changes.  They expose the narrative of how "
692.10315 +"the code was developed."
692.10316 +msgstr ""
692.10317 +
692.10318 +#. type: Content of: <book><chapter><sect1><title>
692.10319 +#: ../en/ch08-branch.xml:259
692.10320 +msgid "Managing big-picture branches in repositories"
692.10321 +msgstr "在版本库中管理分支"
692.10322 +
692.10323 +#. type: Content of: <book><chapter><sect1><para>
692.10324 +#: ../en/ch08-branch.xml:261
692.10325 +msgid ""
692.10326 +"The easiest way to isolate a <quote>big picture</quote> branch in Mercurial "
692.10327 +"is in a dedicated repository.  If you have an existing shared "
692.10328 +"repository&emdash;let's call it <literal>myproject</literal>&emdash;that "
692.10329 +"reaches a <quote>1.0</quote> milestone, you can start to prepare for future "
692.10330 +"maintenance releases on top of version 1.0 by tagging the revision from which "
692.10331 +"you prepared the 1.0 release."
692.10332 +msgstr ""
692.10333 +
692.10334 +#. type: Content of: <book><chapter><sect1><para>
692.10335 +#: ../en/ch08-branch.xml:271
692.10336 +msgid ""
692.10337 +"You can then clone a new shared <literal>myproject-1.0.1</literal> repository "
692.10338 +"as of that tag."
692.10339 +msgstr ""
692.10340 +
692.10341 +#. type: Content of: <book><chapter><sect1><para>
692.10342 +#: ../en/ch08-branch.xml:277
692.10343 +msgid ""
692.10344 +"Afterwards, if someone needs to work on a bug fix that ought to go into an "
692.10345 +"upcoming 1.0.1 minor release, they clone the <literal>myproject-1.0.1</"
692.10346 +"literal> repository, make their changes, and push them back."
692.10347 +msgstr ""
692.10348 +
692.10349 +#. type: Content of: <book><chapter><sect1><para>
692.10350 +#: ../en/ch08-branch.xml:284
692.10351 +msgid ""
692.10352 +"Meanwhile, development for the next major release can continue, isolated and "
692.10353 +"unabated, in the <literal>myproject</literal> repository."
692.10354 +msgstr ""
692.10355 +
692.10356 +#. type: Content of: <book><chapter><sect1><title>
692.10357 +#: ../en/ch08-branch.xml:292
692.10358 +msgid "Don't repeat yourself: merging across branches"
692.10359 +msgstr "不要重复劳动:在分支间合并"
692.10360 +
692.10361 +#. type: Content of: <book><chapter><sect1><para>
692.10362 +#: ../en/ch08-branch.xml:294
692.10363 +msgid ""
692.10364 +"In many cases, if you have a bug to fix on a maintenance branch, the chances "
692.10365 +"are good that the bug exists on your project's main branch (and possibly "
692.10366 +"other maintenance branches, too).  It's a rare developer who wants to fix the "
692.10367 +"same bug multiple times, so let's look at a few ways that Mercurial can help "
692.10368 +"you to manage these bugfixes without duplicating your work."
692.10369 +msgstr ""
692.10370 +
692.10371 +#. type: Content of: <book><chapter><sect1><para>
692.10372 +#: ../en/ch08-branch.xml:302
692.10373 +msgid ""
692.10374 +"In the simplest instance, all you need to do is pull changes from your "
692.10375 +"maintenance branch into your local clone of the target branch."
692.10376 +msgstr ""
692.10377 +
692.10378 +#. type: Content of: <book><chapter><sect1><para>
692.10379 +#: ../en/ch08-branch.xml:308
692.10380 +msgid ""
692.10381 +"You'll then need to merge the heads of the two branches, and push back to the "
692.10382 +"main branch."
692.10383 +msgstr ""
692.10384 +
692.10385 +#. type: Content of: <book><chapter><sect1><title>
692.10386 +#: ../en/ch08-branch.xml:315
692.10387 +msgid "Naming branches within one repository"
692.10388 +msgstr "版本库中的命名分支"
692.10389 +
692.10390 +#. type: Content of: <book><chapter><sect1><para>
692.10391 +#: ../en/ch08-branch.xml:317
692.10392 +msgid ""
692.10393 +"In most instances, isolating branches in repositories is the right approach.  "
692.10394 +"Its simplicity makes it easy to understand; and so it's hard to make "
692.10395 +"mistakes.  There's a one-to-one relationship between branches you're working "
692.10396 +"in and directories on your system.  This lets you use normal (non-Mercurial-"
692.10397 +"aware)  tools to work on files within a branch/repository."
692.10398 +msgstr ""
692.10399 +
692.10400 +#. type: Content of: <book><chapter><sect1><para>
692.10401 +#: ../en/ch08-branch.xml:324
692.10402 +msgid ""
692.10403 +"If you're more in the <quote>power user</quote> category (<emphasis>and</"
692.10404 +"emphasis> your collaborators are too), there is an alternative way of "
692.10405 +"handling branches that you can consider.  I've already mentioned the human-"
692.10406 +"level distinction between <quote>small picture</quote> and <quote>big "
692.10407 +"picture</quote> branches.  While Mercurial works with multiple <quote>small "
692.10408 +"picture</quote> branches in a repository all the time (for example after you "
692.10409 +"pull changes in, but before you merge them), it can <emphasis>also</emphasis> "
692.10410 +"work with multiple <quote>big picture</quote> branches."
692.10411 +msgstr ""
692.10412 +
692.10413 +#. type: Content of: <book><chapter><sect1><para>
692.10414 +#: ../en/ch08-branch.xml:335
692.10415 +msgid ""
692.10416 +"The key to working this way is that Mercurial lets you assign a persistent "
692.10417 +"<emphasis>name</emphasis> to a branch.  There always exists a branch named "
692.10418 +"<literal>default</literal>.  Even before you start naming branches yourself, "
692.10419 +"you can find traces of the <literal>default</literal> branch if you look for "
692.10420 +"them."
692.10421 +msgstr ""
692.10422 +
692.10423 +#. type: Content of: <book><chapter><sect1><para>
692.10424 +#: ../en/ch08-branch.xml:342
692.10425 +msgid ""
692.10426 +"As an example, when you run the <command role=\"hg-cmd\">hg commit</command> "
692.10427 +"command, and it pops up your editor so that you can enter a commit message, "
692.10428 +"look for a line that contains the text <quote><literal>HG: branch default</"
692.10429 +"literal></quote> at the bottom. This is telling you that your commit will "
692.10430 +"occur on the branch named <literal>default</literal>."
692.10431 +msgstr ""
692.10432 +
692.10433 +#. type: Content of: <book><chapter><sect1><para>
692.10434 +#: ../en/ch08-branch.xml:349
692.10435 +msgid ""
692.10436 +"To start working with named branches, use the <command role=\"hg-cmd\">hg "
692.10437 +"branches</command> command.  This command lists the named branches already "
692.10438 +"present in your repository, telling you which changeset is the tip of each."
692.10439 +msgstr ""
692.10440 +
692.10441 +#. type: Content of: <book><chapter><sect1><para>
692.10442 +#: ../en/ch08-branch.xml:356
692.10443 +msgid ""
692.10444 +"Since you haven't created any named branches yet, the only one that exists is "
692.10445 +"<literal>default</literal>."
692.10446 +msgstr ""
692.10447 +
692.10448 +#. type: Content of: <book><chapter><sect1><para>
692.10449 +#: ../en/ch08-branch.xml:359
692.10450 +msgid ""
692.10451 +"To find out what the <quote>current</quote> branch is, run the <command role="
692.10452 +"\"hg-cmd\">hg branch</command> command, giving it no arguments.  This tells "
692.10453 +"you what branch the parent of the current changeset is on."
692.10454 +msgstr ""
692.10455 +
692.10456 +#
692.10457 +#. type: Content of: <book><chapter><sect1><para>
692.10458 +#: ../en/ch08-branch.xml:366
692.10459 +msgid ""
692.10460 +"To create a new branch, run the <command role=\"hg-cmd\">hg branch</command> "
692.10461 +"command again.  This time, give it one argument: the name of the branch you "
692.10462 +"want to create."
692.10463 +msgstr ""
692.10464 +
692.10465 +#. type: Content of: <book><chapter><sect1><para>
692.10466 +#: ../en/ch08-branch.xml:372
692.10467 +msgid ""
692.10468 +"After you've created a branch, you might wonder what effect the <command role="
692.10469 +"\"hg-cmd\">hg branch</command> command has had.  What do the <command role="
692.10470 +"\"hg-cmd\">hg status</command> and <command role=\"hg-cmd\">hg tip</command> "
692.10471 +"commands report?"
692.10472 +msgstr ""
692.10473 +
692.10474 +#. type: Content of: <book><chapter><sect1><para>
692.10475 +#: ../en/ch08-branch.xml:379
692.10476 +msgid ""
692.10477 +"Nothing has changed in the working directory, and there's been no new history "
692.10478 +"created.  As this suggests, running the <command role=\"hg-cmd\">hg branch</"
692.10479 +"command> command has no permanent effect; it only tells Mercurial what branch "
692.10480 +"name to use the <emphasis>next</emphasis> time you commit a changeset."
692.10481 +msgstr ""
692.10482 +
692.10483 +#. type: Content of: <book><chapter><sect1><para>
692.10484 +#: ../en/ch08-branch.xml:386
692.10485 +msgid ""
692.10486 +"When you commit a change, Mercurial records the name of the branch on which "
692.10487 +"you committed.  Once you've switched from the <literal>default</literal> "
692.10488 +"branch to another and committed, you'll see the name of the new branch show "
692.10489 +"up in the output of <command role=\"hg-cmd\">hg log</command>, <command role="
692.10490 +"\"hg-cmd\">hg tip</command>, and other commands that display the same kind of "
692.10491 +"output."
692.10492 +msgstr ""
692.10493 +
692.10494 +#. type: Content of: <book><chapter><sect1><para>
692.10495 +#: ../en/ch08-branch.xml:396
692.10496 +msgid ""
692.10497 +"The <command role=\"hg-cmd\">hg log</command>-like commands will print the "
692.10498 +"branch name of every changeset that's not on the <literal>default</literal> "
692.10499 +"branch.  As a result, if you never use named branches, you'll never see this "
692.10500 +"information."
692.10501 +msgstr ""
692.10502 +
692.10503 +#. type: Content of: <book><chapter><sect1><para>
692.10504 +#: ../en/ch08-branch.xml:401
692.10505 +msgid ""
692.10506 +"Once you've named a branch and committed a change with that name, every "
692.10507 +"subsequent commit that descends from that change will inherit the same branch "
692.10508 +"name.  You can change the name of a branch at any time, using the <command "
692.10509 +"role=\"hg-cmd\">hg branch</command> command."
692.10510 +msgstr ""
692.10511 +
692.10512 +#. type: Content of: <book><chapter><sect1><para>
692.10513 +#: ../en/ch08-branch.xml:409
692.10514 +msgid ""
692.10515 +"In practice, this is something you won't do very often, as branch names tend "
692.10516 +"to have fairly long lifetimes.  (This isn't a rule, just an observation.)"
692.10517 +msgstr ""
692.10518 +
692.10519 +#. type: Content of: <book><chapter><sect1><title>
692.10520 +#: ../en/ch08-branch.xml:415
692.10521 +msgid "Dealing with multiple named branches in a repository"
692.10522 +msgstr "在版本库中处理多个命名分支"
692.10523 +
692.10524 +#. type: Content of: <book><chapter><sect1><para>
692.10525 +#: ../en/ch08-branch.xml:418
692.10526 +msgid ""
692.10527 +"If you have more than one named branch in a repository, Mercurial will "
692.10528 +"remember the branch that your working directory is on when you start a "
692.10529 +"command like <command role=\"hg-cmd\">hg update</command> or <command role="
692.10530 +"\"hg-cmd\">hg pull -u</command>.  It will update the working directory to the "
692.10531 +"tip of this branch, no matter what the <quote>repo-wide</quote> tip is.  To "
692.10532 +"update to a revision that's on a different named branch, you may need to use "
692.10533 +"the <option role=\"hg-opt-update\">-C</option> option to <command role=\"hg-"
692.10534 +"cmd\">hg update</command>."
692.10535 +msgstr ""
692.10536 +
692.10537 +#. type: Content of: <book><chapter><sect1><para>
692.10538 +#: ../en/ch08-branch.xml:428
692.10539 +msgid ""
692.10540 +"This behavior is a little subtle, so let's see it in action.  First, let's "
692.10541 +"remind ourselves what branch we're currently on, and what branches are in our "
692.10542 +"repository."
692.10543 +msgstr ""
692.10544 +
692.10545 +#. type: Content of: <book><chapter><sect1><para>
692.10546 +#: ../en/ch08-branch.xml:434
692.10547 +msgid ""
692.10548 +"We're on the <literal>bar</literal> branch, but there also exists an older "
692.10549 +"<command role=\"hg-cmd\">hg foo</command> branch."
692.10550 +msgstr ""
692.10551 +
692.10552 +#. type: Content of: <book><chapter><sect1><para>
692.10553 +#: ../en/ch08-branch.xml:438
692.10554 +msgid ""
692.10555 +"We can <command role=\"hg-cmd\">hg update</command> back and forth between "
692.10556 +"the tips of the <literal>foo</literal> and <literal>bar</literal> branches "
692.10557 +"without needing to use the <option role=\"hg-opt-update\">-C</option> option, "
692.10558 +"because this only involves going backwards and forwards linearly through our "
692.10559 +"change history."
692.10560 +msgstr ""
692.10561 +
692.10562 +#
692.10563 +#. type: Content of: <book><chapter><sect1><para>
692.10564 +#: ../en/ch08-branch.xml:447
692.10565 +msgid ""
692.10566 +"If we go back to the <literal>foo</literal> branch and then run <command role="
692.10567 +"\"hg-cmd\">hg update</command>, it will keep us on <literal>foo</literal>, "
692.10568 +"not move us to the tip of <literal>bar</literal>."
692.10569 +msgstr ""
692.10570 +
692.10571 +#
692.10572 +#. type: Content of: <book><chapter><sect1><para>
692.10573 +#: ../en/ch08-branch.xml:454
692.10574 +msgid ""
692.10575 +"Committing a new change on the <literal>foo</literal> branch introduces a new "
692.10576 +"head."
692.10577 +msgstr ""
692.10578 +
692.10579 +#. type: Content of: <book><chapter><sect1><title>
692.10580 +#: ../en/ch08-branch.xml:461
692.10581 +msgid "Branch names and merging"
692.10582 +msgstr "分支名称与合并"
692.10583 +
692.10584 +#. type: Content of: <book><chapter><sect1><para>
692.10585 +#: ../en/ch08-branch.xml:463
692.10586 +msgid ""
692.10587 +"As you've probably noticed, merges in Mercurial are not symmetrical. Let's "
692.10588 +"say our repository has two heads, 17 and 23.  If I <command role=\"hg-cmd"
692.10589 +"\">hg update</command> to 17 and then <command role=\"hg-cmd\">hg merge</"
692.10590 +"command> with 23, Mercurial records 17 as the first parent of the merge, and "
692.10591 +"23 as the second.  Whereas if I <command role=\"hg-cmd\">hg update</command> "
692.10592 +"to 23 and then <command role=\"hg-cmd\">hg merge</command> with 17, it "
692.10593 +"records 23 as the first parent, and 17 as the second."
692.10594 +msgstr ""
692.10595 +
692.10596 +#. type: Content of: <book><chapter><sect1><para>
692.10597 +#: ../en/ch08-branch.xml:473
692.10598 +msgid ""
692.10599 +"This affects Mercurial's choice of branch name when you merge.  After a "
692.10600 +"merge, Mercurial will retain the branch name of the first parent when you "
692.10601 +"commit the result of the merge.  If your first parent's branch name is "
692.10602 +"<literal>foo</literal>, and you merge with <literal>bar</literal>, the branch "
692.10603 +"name will still be <literal>foo</literal> after you merge."
692.10604 +msgstr ""
692.10605 +
692.10606 +#. type: Content of: <book><chapter><sect1><para>
692.10607 +#: ../en/ch08-branch.xml:480
692.10608 +msgid ""
692.10609 +"It's not unusual for a repository to contain multiple heads, each with the "
692.10610 +"same branch name.  Let's say I'm working on the <literal>foo</literal> "
692.10611 +"branch, and so are you.  We commit different changes; I pull your changes; I "
692.10612 +"now have two heads, each claiming to be on the <literal>foo</literal> "
692.10613 +"branch.  The result of a merge will be a single head on the <literal>foo</"
692.10614 +"literal> branch, as you might hope."
692.10615 +msgstr ""
692.10616 +
692.10617 +#
692.10618 +#. type: Content of: <book><chapter><sect1><para>
692.10619 +#: ../en/ch08-branch.xml:488
692.10620 +msgid ""
692.10621 +"But if I'm working on the <literal>bar</literal> branch, and I merge work "
692.10622 +"from the <literal>foo</literal> branch, the result will remain on the "
692.10623 +"<literal>bar</literal> branch."
692.10624 +msgstr ""
692.10625 +
692.10626 +#. type: Content of: <book><chapter><sect1><para>
692.10627 +#: ../en/ch08-branch.xml:494
692.10628 +msgid ""
692.10629 +"To give a more concrete example, if I'm working on the <literal>bleeding-"
692.10630 +"edge</literal> branch, and I want to bring in the latest fixes from the "
692.10631 +"<literal>stable</literal> branch, Mercurial will choose the <quote>right</"
692.10632 +"quote> (<literal>bleeding-edge</literal>) branch name when I pull and merge "
692.10633 +"from <literal>stable</literal>."
692.10634 +msgstr ""
692.10635 +
692.10636 +#. type: Content of: <book><chapter><sect1><title>
692.10637 +#: ../en/ch08-branch.xml:503
692.10638 +msgid "Branch naming is generally useful"
692.10639 +msgstr "分支名称通常都很有用"
692.10640 +
692.10641 +#. type: Content of: <book><chapter><sect1><para>
692.10642 +#: ../en/ch08-branch.xml:505
692.10643 +msgid ""
692.10644 +"You shouldn't think of named branches as applicable only to situations where "
692.10645 +"you have multiple long-lived branches cohabiting in a single repository.  "
692.10646 +"They're very useful even in the one-branch-per-repository case."
692.10647 +msgstr ""
692.10648 +
692.10649 +#. type: Content of: <book><chapter><sect1><para>
692.10650 +#: ../en/ch08-branch.xml:510
692.10651 +msgid ""
692.10652 +"In the simplest case, giving a name to each branch gives you a permanent "
692.10653 +"record of which branch a changeset originated on.  This gives you more "
692.10654 +"context when you're trying to follow the history of a long-lived branchy "
692.10655 +"project."
692.10656 +msgstr ""
692.10657 +
692.10658 +#. type: Content of: <book><chapter><sect1><para>
692.10659 +#: ../en/ch08-branch.xml:515
692.10660 +msgid ""
692.10661 +"If you're working with shared repositories, you can set up a <literal role="
692.10662 +"\"hook\">pretxnchangegroup</literal> hook on each that will block incoming "
692.10663 +"changes that have the <quote>wrong</quote> branch name.  This provides a "
692.10664 +"simple, but effective, defence against people accidentally pushing changes "
692.10665 +"from a <quote>bleeding edge</quote> branch to a <quote>stable</quote> "
692.10666 +"branch.  Such a hook might look like this inside the shared repo's <filename "
692.10667 +"role=\"special\"> /.hgrc</filename>."
692.10668 +msgstr ""
692.10669 +
692.10670 +#. type: Content of: <book><chapter><title>
692.10671 +#: ../en/ch09-undo.xml:5
692.10672 +msgid "Finding and fixing mistakes"
692.10673 +msgstr "查找和修改错误"
692.10674 +
692.10675 +#. type: Content of: <book><chapter><para>
692.10676 +#: ../en/ch09-undo.xml:7
692.10677 +msgid ""
692.10678 +"To err might be human, but to really handle the consequences well takes a top-"
692.10679 +"notch revision control system.  In this chapter, we'll discuss some of the "
692.10680 +"techniques you can use when you find that a problem has crept into your "
692.10681 +"project.  Mercurial has some highly capable features that will help you to "
692.10682 +"isolate the sources of problems, and to handle them appropriately."
692.10683 +msgstr ""
692.10684 +
692.10685 +#. type: Content of: <book><chapter><sect1><title>
692.10686 +#: ../en/ch09-undo.xml:15
692.10687 +msgid "Erasing local history"
692.10688 +msgstr "销毁本地历史"
692.10689 +
692.10690 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.10691 +#: ../en/ch09-undo.xml:18
692.10692 +msgid "The accidental commit"
692.10693 +msgstr "意外的提交"
692.10694 +
692.10695 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10696 +#: ../en/ch09-undo.xml:20
692.10697 +msgid ""
692.10698 +"I have the occasional but persistent problem of typing rather more quickly "
692.10699 +"than I can think, which sometimes results in me committing a changeset that "
692.10700 +"is either incomplete or plain wrong.  In my case, the usual kind of "
692.10701 +"incomplete changeset is one in which I've created a new source file, but "
692.10702 +"forgotten to <command role=\"hg-cmd\">hg add</command> it.  A <quote>plain "
692.10703 +"wrong</quote> changeset is not as common, but no less annoying."
692.10704 +msgstr ""
692.10705 +
692.10706 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.10707 +#: ../en/ch09-undo.xml:31
692.10708 +msgid "Rolling back a transaction"
692.10709 +msgstr "回滚一个事务"
692.10710 +
692.10711 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10712 +#: ../en/ch09-undo.xml:33
692.10713 +msgid ""
692.10714 +"In <xref linkend=\"sec:concepts:txn\"/>, I mentioned that Mercurial treats "
692.10715 +"each modification of a repository as a <emphasis>transaction</emphasis>.  "
692.10716 +"Every time you commit a changeset or pull changes from another repository, "
692.10717 +"Mercurial remembers what you did.  You can undo, or <emphasis>roll back</"
692.10718 +"emphasis>, exactly one of these actions using the <command role=\"hg-cmd\">hg "
692.10719 +"rollback</command> command.  (See <xref linkend=\"sec:undo:rollback-after-push"
692.10720 +"\"/> for an important caveat about the use of this command.)"
692.10721 +msgstr ""
692.10722 +
692.10723 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10724 +#: ../en/ch09-undo.xml:43
692.10725 +msgid ""
692.10726 +"Here's a mistake that I often find myself making: committing a change in "
692.10727 +"which I've created a new file, but forgotten to <command role=\"hg-cmd\">hg "
692.10728 +"add</command> it."
692.10729 +msgstr ""
692.10730 +
692.10731 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10732 +#: ../en/ch09-undo.xml:50
692.10733 +msgid ""
692.10734 +"Looking at the output of <command role=\"hg-cmd\">hg status</command> after "
692.10735 +"the commit immediately confirms the error."
692.10736 +msgstr ""
692.10737 +
692.10738 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10739 +#: ../en/ch09-undo.xml:56
692.10740 +msgid ""
692.10741 +"The commit captured the changes to the file <filename>a</filename>, but not "
692.10742 +"the new file <filename>b</filename>.  If I were to push this changeset to a "
692.10743 +"repository that I shared with a colleague, the chances are high that "
692.10744 +"something in <filename>a</filename> would refer to <filename>b</filename>, "
692.10745 +"which would not be present in their repository when they pulled my changes.  "
692.10746 +"I would thus become the object of some indignation."
692.10747 +msgstr ""
692.10748 +
692.10749 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10750 +#: ../en/ch09-undo.xml:65
692.10751 +msgid ""
692.10752 +"However, luck is with me&emdash;I've caught my error before I pushed the "
692.10753 +"changeset.  I use the <command role=\"hg-cmd\">hg rollback</command> command, "
692.10754 +"and Mercurial makes that last changeset vanish."
692.10755 +msgstr ""
692.10756 +
692.10757 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10758 +#: ../en/ch09-undo.xml:72
692.10759 +msgid ""
692.10760 +"Notice that the changeset is no longer present in the repository's history, "
692.10761 +"and the working directory once again thinks that the file <filename>a</"
692.10762 +"filename> is modified.  The commit and rollback have left the working "
692.10763 +"directory exactly as it was prior to the commit; the changeset has been "
692.10764 +"completely erased.  I can now safely <command role=\"hg-cmd\">hg add</"
692.10765 +"command> the file <filename>b</filename>, and rerun my commit."
692.10766 +msgstr ""
692.10767 +
692.10768 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.10769 +#: ../en/ch09-undo.xml:85
692.10770 +msgid "The erroneous pull"
692.10771 +msgstr "错误的抓取"
692.10772 +
692.10773 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10774 +#: ../en/ch09-undo.xml:87
692.10775 +msgid ""
692.10776 +"It's common practice with Mercurial to maintain separate development branches "
692.10777 +"of a project in different repositories.  Your development team might have one "
692.10778 +"shared repository for your project's <quote>0.9</quote> release, and another, "
692.10779 +"containing different changes, for the <quote>1.0</quote> release."
692.10780 +msgstr ""
692.10781 +
692.10782 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10783 +#: ../en/ch09-undo.xml:94
692.10784 +msgid ""
692.10785 +"Given this, you can imagine that the consequences could be messy if you had a "
692.10786 +"local <quote>0.9</quote> repository, and accidentally pulled changes from the "
692.10787 +"shared <quote>1.0</quote> repository into it.  At worst, you could be paying "
692.10788 +"insufficient attention, and push those changes into the shared <quote>0.9</"
692.10789 +"quote> tree, confusing your entire team (but don't worry, we'll return to "
692.10790 +"this horror scenario later).  However, it's more likely that you'll notice "
692.10791 +"immediately, because Mercurial will display the URL it's pulling from, or you "
692.10792 +"will see it pull a suspiciously large number of changes into the repository."
692.10793 +msgstr ""
692.10794 +
692.10795 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10796 +#: ../en/ch09-undo.xml:106
692.10797 +msgid ""
692.10798 +"The <command role=\"hg-cmd\">hg rollback</command> command will work nicely "
692.10799 +"to expunge all of the changesets that you just pulled.  Mercurial groups all "
692.10800 +"changes from one <command role=\"hg-cmd\">hg pull</command> into a single "
692.10801 +"transaction, so one <command role=\"hg-cmd\">hg rollback</command> is all you "
692.10802 +"need to undo this mistake."
692.10803 +msgstr ""
692.10804 +
692.10805 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.10806 +#: ../en/ch09-undo.xml:115
692.10807 +msgid "Rolling back is useless once you've pushed"
692.10808 +msgstr "当完成推送后,回滚是无效的"
692.10809 +
692.10810 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10811 +#: ../en/ch09-undo.xml:117
692.10812 +msgid ""
692.10813 +"The value of the <command role=\"hg-cmd\">hg rollback</command> command drops "
692.10814 +"to zero once you've pushed your changes to another repository.  Rolling back "
692.10815 +"a change makes it disappear entirely, but <emphasis>only</emphasis> in the "
692.10816 +"repository in which you perform the <command role=\"hg-cmd\">hg rollback</"
692.10817 +"command>.  Because a rollback eliminates history, there's no way for the "
692.10818 +"disappearance of a change to propagate between repositories."
692.10819 +msgstr ""
692.10820 +
692.10821 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10822 +#: ../en/ch09-undo.xml:126
692.10823 +msgid ""
692.10824 +"If you've pushed a change to another repository&emdash;particularly if it's a "
692.10825 +"shared repository&emdash;it has essentially <quote>escaped into the wild,</"
692.10826 +"quote> and you'll have to recover from your mistake in a different way.  If "
692.10827 +"you push a changeset somewhere, then roll it back, then pull from the "
692.10828 +"repository you pushed to, the changeset you thought you'd gotten rid of will "
692.10829 +"simply reappear in your repository."
692.10830 +msgstr ""
692.10831 +
692.10832 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10833 +#: ../en/ch09-undo.xml:135
692.10834 +msgid ""
692.10835 +"(If you absolutely know for sure that the change you want to roll back is the "
692.10836 +"most recent change in the repository that you pushed to, <emphasis>and</"
692.10837 +"emphasis> you know that nobody else could have pulled it from that "
692.10838 +"repository, you can roll back the changeset there, too, but you really should "
692.10839 +"not expect this to work reliably.  Sooner or later a change really will make "
692.10840 +"it into a repository that you don't directly control (or have forgotten "
692.10841 +"about), and come back to bite you.)"
692.10842 +msgstr ""
692.10843 +
692.10844 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.10845 +#: ../en/ch09-undo.xml:147
692.10846 +msgid "You can only roll back once"
692.10847 +msgstr "你只能回滚一次"
692.10848 +
692.10849 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10850 +#: ../en/ch09-undo.xml:149
692.10851 +msgid ""
692.10852 +"Mercurial stores exactly one transaction in its transaction log; that "
692.10853 +"transaction is the most recent one that occurred in the repository. This "
692.10854 +"means that you can only roll back one transaction.  If you expect to be able "
692.10855 +"to roll back one transaction, then its predecessor, this is not the behavior "
692.10856 +"you will get."
692.10857 +msgstr ""
692.10858 +
692.10859 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10860 +#: ../en/ch09-undo.xml:158
692.10861 +msgid ""
692.10862 +"Once you've rolled back one transaction in a repository, you can't roll back "
692.10863 +"again in that repository until you perform another commit or pull."
692.10864 +msgstr ""
692.10865 +
692.10866 +#. type: Content of: <book><chapter><sect1><title>
692.10867 +#: ../en/ch09-undo.xml:165
692.10868 +msgid "Reverting the mistaken change"
692.10869 +msgstr "撤销错误的修改"
692.10870 +
692.10871 +#. type: Content of: <book><chapter><sect1><para>
692.10872 +#: ../en/ch09-undo.xml:167
692.10873 +msgid ""
692.10874 +"If you make a modification to a file, and decide that you really didn't want "
692.10875 +"to change the file at all, and you haven't yet committed your changes, the "
692.10876 +"<command role=\"hg-cmd\">hg revert</command> command is the one you'll need.  "
692.10877 +"It looks at the changeset that's the parent of the working directory, and "
692.10878 +"restores the contents of the file to their state as of that changeset. "
692.10879 +"(That's a long-winded way of saying that, in the normal case, it undoes your "
692.10880 +"modifications.)"
692.10881 +msgstr ""
692.10882 +
692.10883 +#. type: Content of: <book><chapter><sect1><para>
692.10884 +#: ../en/ch09-undo.xml:176
692.10885 +msgid ""
692.10886 +"Let's illustrate how the <command role=\"hg-cmd\">hg revert</command> command "
692.10887 +"works with yet another small example.  We'll begin by modifying a file that "
692.10888 +"Mercurial is already tracking."
692.10889 +msgstr ""
692.10890 +
692.10891 +#. type: Content of: <book><chapter><sect1><para>
692.10892 +#: ../en/ch09-undo.xml:183
692.10893 +msgid ""
692.10894 +"If we don't want that change, we can simply <command role=\"hg-cmd\">hg "
692.10895 +"revert</command> the file."
692.10896 +msgstr ""
692.10897 +
692.10898 +#. type: Content of: <book><chapter><sect1><para>
692.10899 +#: ../en/ch09-undo.xml:189
692.10900 +msgid ""
692.10901 +"The <command role=\"hg-cmd\">hg revert</command> command provides us with an "
692.10902 +"extra degree of safety by saving our modified file with a <filename>.orig</"
692.10903 +"filename> extension."
692.10904 +msgstr ""
692.10905 +
692.10906 +#. type: Content of: <book><chapter><sect1><tip><title>
692.10907 +#: ../en/ch09-undo.xml:197
692.10908 +msgid "Be careful with <filename>.orig</filename> files"
692.10909 +msgstr "小心 <filename>.orig</filename> 文件"
692.10910 +
692.10911 +#. type: Content of: <book><chapter><sect1><tip><para>
692.10912 +#: ../en/ch09-undo.xml:199
692.10913 +msgid ""
692.10914 +"It's extremely unlikely that you are either using Mercurial to manage files "
692.10915 +"with <filename>.orig</filename> extensions or that you even care about the "
692.10916 +"contents of such files.  Just in case, though, it's useful to remember that "
692.10917 +"<command role=\"hg-cmd\">hg revert</command> will unconditionally overwrite "
692.10918 +"an existing file with a <filename>.orig</filename> extension. For instance, "
692.10919 +"if you already have a file named <filename>foo.orig</filename> when you "
692.10920 +"revert <filename>foo</filename>, the contents of <filename>foo.orig</"
692.10921 +"filename> will be clobbered."
692.10922 +msgstr ""
692.10923 +
692.10924 +#. type: Content of: <book><chapter><sect1><para>
692.10925 +#: ../en/ch09-undo.xml:211
692.10926 +msgid ""
692.10927 +"Here is a summary of the cases that the <command role=\"hg-cmd\">hg revert</"
692.10928 +"command> command can deal with.  We will describe each of these in more "
692.10929 +"detail in the section that follows."
692.10930 +msgstr ""
692.10931 +
692.10932 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.10933 +#: ../en/ch09-undo.xml:216
692.10934 +msgid "If you modify a file, it will restore the file to its unmodified state."
692.10935 +msgstr ""
692.10936 +
692.10937 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.10938 +#: ../en/ch09-undo.xml:219
692.10939 +msgid ""
692.10940 +"If you <command role=\"hg-cmd\">hg add</command> a file, it will undo the "
692.10941 +"<quote>added</quote> state of the file, but leave the file itself untouched."
692.10942 +msgstr ""
692.10943 +
692.10944 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.10945 +#: ../en/ch09-undo.xml:223
692.10946 +msgid ""
692.10947 +"If you delete a file without telling Mercurial, it will restore the file to "
692.10948 +"its unmodified contents."
692.10949 +msgstr ""
692.10950 +
692.10951 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.10952 +#: ../en/ch09-undo.xml:226
692.10953 +msgid ""
692.10954 +"If you use the <command role=\"hg-cmd\">hg remove</command> command to remove "
692.10955 +"a file, it will undo the <quote>removed</quote> state of the file, and "
692.10956 +"restore the file to its unmodified contents."
692.10957 +msgstr ""
692.10958 +
692.10959 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.10960 +#: ../en/ch09-undo.xml:233
692.10961 +msgid "File management errors"
692.10962 +msgstr "文件管理错误"
692.10963 +
692.10964 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10965 +#: ../en/ch09-undo.xml:235
692.10966 +msgid ""
692.10967 +"The <command role=\"hg-cmd\">hg revert</command> command is useful for more "
692.10968 +"than just modified files.  It lets you reverse the results of all of "
692.10969 +"Mercurial's file management commands&emdash;<command role=\"hg-cmd\">hg add</"
692.10970 +"command>, <command role=\"hg-cmd\">hg remove</command>, and so on."
692.10971 +msgstr ""
692.10972 +
692.10973 +#
692.10974 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10975 +#: ../en/ch09-undo.xml:241
692.10976 +msgid ""
692.10977 +"If you <command role=\"hg-cmd\">hg add</command> a file, then decide that in "
692.10978 +"fact you don't want Mercurial to track it, use <command role=\"hg-cmd\">hg "
692.10979 +"revert</command> to undo the add.  Don't worry; Mercurial will not modify the "
692.10980 +"file in any way.  It will just <quote>unmark</quote> the file."
692.10981 +msgstr ""
692.10982 +
692.10983 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10984 +#: ../en/ch09-undo.xml:249
692.10985 +msgid ""
692.10986 +"Similarly, if you ask Mercurial to <command role=\"hg-cmd\">hg remove</"
692.10987 +"command> a file, you can use <command role=\"hg-cmd\">hg revert</command> to "
692.10988 +"restore it to the contents it had as of the parent of the working directory.  "
692.10989 +"&interaction.daily.revert.remove; This works just as well for a file that you "
692.10990 +"deleted by hand, without telling Mercurial (recall that in Mercurial "
692.10991 +"terminology, this kind of file is called <quote>missing</quote>)."
692.10992 +msgstr ""
692.10993 +
692.10994 +#
692.10995 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.10996 +#: ../en/ch09-undo.xml:260
692.10997 +msgid ""
692.10998 +"If you revert a <command role=\"hg-cmd\">hg copy</command>, the copied-to "
692.10999 +"file remains in your working directory afterwards, untracked.  Since a copy "
692.11000 +"doesn't affect the copied-from file in any way, Mercurial doesn't do anything "
692.11001 +"with the copied-from file."
692.11002 +msgstr ""
692.11003 +
692.11004 +#. type: Content of: <book><chapter><sect1><title>
692.11005 +#: ../en/ch09-undo.xml:271
692.11006 +msgid "Dealing with committed changes"
692.11007 +msgstr "处理已经提交的修改"
692.11008 +
692.11009 +#. type: Content of: <book><chapter><sect1><para>
692.11010 +#: ../en/ch09-undo.xml:273
692.11011 +msgid ""
692.11012 +"Consider a case where you have committed a change <emphasis>a</emphasis>, and "
692.11013 +"another change <emphasis>b</emphasis> on top of it; you then realise that "
692.11014 +"change <emphasis>a</emphasis> was incorrect.  Mercurial lets you <quote>back "
692.11015 +"out</quote> an entire changeset automatically, and building blocks that let "
692.11016 +"you reverse part of a changeset by hand."
692.11017 +msgstr ""
692.11018 +
692.11019 +#. type: Content of: <book><chapter><sect1><para>
692.11020 +#: ../en/ch09-undo.xml:281
692.11021 +msgid ""
692.11022 +"Before you read this section, here's something to keep in mind: the <command "
692.11023 +"role=\"hg-cmd\">hg backout</command> command undoes the effect of a change by "
692.11024 +"<emphasis>adding</emphasis> to your repository's history, not by modifying or "
692.11025 +"erasing it.  It's the right tool to use if you're fixing bugs, but not if "
692.11026 +"you're trying to undo some change that has catastrophic consequences.  To "
692.11027 +"deal with those, see <xref linkend=\"sec:undo:aaaiiieee\"/>."
692.11028 +msgstr ""
692.11029 +
692.11030 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.11031 +#: ../en/ch09-undo.xml:291
692.11032 +msgid "Backing out a changeset"
692.11033 +msgstr "恢复一个修改集"
692.11034 +
692.11035 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11036 +#: ../en/ch09-undo.xml:293
692.11037 +msgid ""
692.11038 +"The <command role=\"hg-cmd\">hg backout</command> command lets you "
692.11039 +"<quote>undo</quote> the effects of an entire changeset in an automated "
692.11040 +"fashion.  Because Mercurial's history is immutable, this command "
692.11041 +"<emphasis>does not</emphasis> get rid of the changeset you want to undo.  "
692.11042 +"Instead, it creates a new changeset that <emphasis>reverses</emphasis> the "
692.11043 +"effect of the to-be-undone changeset."
692.11044 +msgstr ""
692.11045 +
692.11046 +#
692.11047 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11048 +#: ../en/ch09-undo.xml:302
692.11049 +msgid ""
692.11050 +"The operation of the <command role=\"hg-cmd\">hg backout</command> command is "
692.11051 +"a little intricate, so let's illustrate it with some examples.  First, we'll "
692.11052 +"create a repository with some simple changes."
692.11053 +msgstr ""
692.11054 +
692.11055 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11056 +#: ../en/ch09-undo.xml:309
692.11057 +msgid ""
692.11058 +"The <command role=\"hg-cmd\">hg backout</command> command takes a single "
692.11059 +"changeset ID as its argument; this is the changeset to back out.  Normally, "
692.11060 +"<command role=\"hg-cmd\">hg backout</command> will drop you into a text "
692.11061 +"editor to write a commit message, so you can record why you're backing the "
692.11062 +"change out.  In this example, we provide a commit message on the command line "
692.11063 +"using the <option role=\"hg-opt-backout\">-m</option> option."
692.11064 +msgstr ""
692.11065 +
692.11066 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.11067 +#: ../en/ch09-undo.xml:320
692.11068 +msgid "Backing out the tip changeset"
692.11069 +msgstr "恢复顶点修改集"
692.11070 +
692.11071 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11072 +#: ../en/ch09-undo.xml:322
692.11073 +msgid "We're going to start by backing out the last changeset we committed."
692.11074 +msgstr ""
692.11075 +
692.11076 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11077 +#: ../en/ch09-undo.xml:327
692.11078 +msgid ""
692.11079 +"You can see that the second line from <filename>myfile</filename> is no "
692.11080 +"longer present.  Taking a look at the output of <command role=\"hg-cmd\">hg "
692.11081 +"log</command> gives us an idea of what the <command role=\"hg-cmd\">hg "
692.11082 +"backout</command> command has done.  &interaction.backout.simple.log; Notice "
692.11083 +"that the new changeset that <command role=\"hg-cmd\">hg backout</command> has "
692.11084 +"created is a child of the changeset we backed out.  It's easier to see this "
692.11085 +"in <xref linkend=\"fig:undo:backout\"/>, which presents a graphical view of "
692.11086 +"the change history.  As you can see, the history is nice and linear."
692.11087 +msgstr ""
692.11088 +
692.11089 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.11090 +#: ../en/ch09-undo.xml:340 ../en/ch09-undo.xml:460
692.11091 +msgid ""
692.11092 +"Backing out a change using the <command role=\"hg-cmd\">hg backout</command> "
692.11093 +"command"
692.11094 +msgstr "使用 <command role=\"hg-cmd\">hg backout</command> 恢复一个修改"
692.11095 +
692.11096 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.11097 +#: ../en/ch09-undo.xml:343
692.11098 +msgid "<imageobject><imagedata fileref=\"figs/undo-simple.png\"/></imageobject>"
692.11099 +msgstr ""
692.11100 +
692.11101 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.11102 +#: ../en/ch09-undo.xml:350
692.11103 +msgid "Backing out a non-tip change"
692.11104 +msgstr "恢复非顶点的修改"
692.11105 +
692.11106 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11107 +#: ../en/ch09-undo.xml:352
692.11108 +msgid ""
692.11109 +"If you want to back out a change other than the last one you committed, pass "
692.11110 +"the <option role=\"hg-opt-backout\">--merge</option> option to the <command "
692.11111 +"role=\"hg-cmd\">hg backout</command> command."
692.11112 +msgstr ""
692.11113 +
692.11114 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11115 +#: ../en/ch09-undo.xml:359
692.11116 +msgid ""
692.11117 +"This makes backing out any changeset a <quote>one-shot</quote> operation "
692.11118 +"that's usually simple and fast."
692.11119 +msgstr ""
692.11120 +
692.11121 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11122 +#: ../en/ch09-undo.xml:365
692.11123 +msgid ""
692.11124 +"If you take a look at the contents of <filename>myfile</filename> after the "
692.11125 +"backout finishes, you'll see that the first and third changes are present, "
692.11126 +"but not the second."
692.11127 +msgstr ""
692.11128 +
692.11129 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11130 +#: ../en/ch09-undo.xml:372
692.11131 +msgid ""
692.11132 +"As the graphical history in <xref linkend=\"fig:undo:backout-non-tip\"/> "
692.11133 +"illustrates, Mercurial still commits one change in this kind of situation "
692.11134 +"(the box-shaped node is the ones that Mercurial commits automatically), but "
692.11135 +"the revision graph now looks different.  Before Mercurial begins the backout "
692.11136 +"process, it first remembers what the current parent of the working directory "
692.11137 +"is.  It then backs out the target changeset, and commits that as a "
692.11138 +"changeset.  Finally, it merges back to the previous parent of the working "
692.11139 +"directory, but notice that it <emphasis>does not commit</emphasis> the result "
692.11140 +"of the merge.  The repository now contains two heads, and the working "
692.11141 +"directory is in a merge state."
692.11142 +msgstr ""
692.11143 +
692.11144 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.11145 +#: ../en/ch09-undo.xml:387
692.11146 +msgid ""
692.11147 +"Automated backout of a non-tip change using the <command role=\"hg-cmd\">hg "
692.11148 +"backout</command> command"
692.11149 +msgstr "使用 <command role=\"hg-cmd\">hg backout</command> 自动恢复非顶点的修改"
692.11150 +
692.11151 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.11152 +#: ../en/ch09-undo.xml:390
692.11153 +msgid ""
692.11154 +"<imageobject><imagedata fileref=\"figs/undo-non-tip.png\"/></imageobject>"
692.11155 +msgstr ""
692.11156 +
692.11157 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11158 +#: ../en/ch09-undo.xml:395
692.11159 +msgid ""
692.11160 +"The result is that you end up <quote>back where you were</quote>, only with "
692.11161 +"some extra history that undoes the effect of the changeset you wanted to back "
692.11162 +"out."
692.11163 +msgstr ""
692.11164 +
692.11165 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11166 +#: ../en/ch09-undo.xml:399
692.11167 +msgid ""
692.11168 +"You might wonder why Mercurial does not commit the result of the merge that "
692.11169 +"it performed.  The reason lies in Mercurial behaving conservatively: a merge "
692.11170 +"naturally has more scope for error than simply undoing the effect of the tip "
692.11171 +"changeset, so your work will be safest if you first inspect (and test!)  the "
692.11172 +"result of the merge, <emphasis>then</emphasis> commit it."
692.11173 +msgstr ""
692.11174 +
692.11175 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.11176 +#: ../en/ch09-undo.xml:408
692.11177 +msgid "Always use the <option role=\"hg-opt-backout\">--merge</option> option"
692.11178 +msgstr "始终使用选项 <option role=\"hg-opt-backout\">--merge</option>"
692.11179 +
692.11180 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.11181 +#: ../en/ch09-undo.xml:411
692.11182 +msgid ""
692.11183 +"In fact, since the <option role=\"hg-opt-backout\">--merge</option> option "
692.11184 +"will do the <quote>right thing</quote> whether or not the changeset you're "
692.11185 +"backing out is the tip (i.e. it won't try to merge if it's backing out the "
692.11186 +"tip, since there's no need), you should <emphasis>always</emphasis> use this "
692.11187 +"option when you run the <command role=\"hg-cmd\">hg backout</command> command."
692.11188 +msgstr ""
692.11189 +
692.11190 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.11191 +#: ../en/ch09-undo.xml:422
692.11192 +msgid "Gaining more control of the backout process"
692.11193 +msgstr "在恢复处理中获得更多控制"
692.11194 +
692.11195 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11196 +#: ../en/ch09-undo.xml:424
692.11197 +msgid ""
692.11198 +"While I've recommended that you always use the <option role=\"hg-opt-backout"
692.11199 +"\">--merge</option> option when backing out a change, the <command role=\"hg-"
692.11200 +"cmd\">hg backout</command> command lets you decide how to merge a backout "
692.11201 +"changeset.  Taking control of the backout process by hand is something you "
692.11202 +"will rarely need to do, but it can be useful to understand what the <command "
692.11203 +"role=\"hg-cmd\">hg backout</command> command is doing for you automatically.  "
692.11204 +"To illustrate this, let's clone our first repository, but omit the backout "
692.11205 +"change that it contains."
692.11206 +msgstr ""
692.11207 +
692.11208 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11209 +#: ../en/ch09-undo.xml:437
692.11210 +msgid ""
692.11211 +"As with our earlier example, We'll commit a third changeset, then back out "
692.11212 +"its parent, and see what happens."
692.11213 +msgstr ""
692.11214 +
692.11215 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11216 +#: ../en/ch09-undo.xml:443
692.11217 +msgid ""
692.11218 +"Our new changeset is again a descendant of the changeset we backout out; it's "
692.11219 +"thus a new head, <emphasis>not</emphasis> a descendant of the changeset that "
692.11220 +"was the tip.  The <command role=\"hg-cmd\">hg backout</command> command was "
692.11221 +"quite explicit in telling us this."
692.11222 +msgstr ""
692.11223 +
692.11224 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11225 +#: ../en/ch09-undo.xml:451
692.11226 +msgid ""
692.11227 +"Again, it's easier to see what has happened by looking at a graph of the "
692.11228 +"revision history, in <xref linkend=\"fig:undo:backout-manual\"/>.  This makes "
692.11229 +"it clear that when we use <command role=\"hg-cmd\">hg backout</command> to "
692.11230 +"back out a change other than the tip, Mercurial adds a new head to the "
692.11231 +"repository (the change it committed is box-shaped)."
692.11232 +msgstr ""
692.11233 +
692.11234 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.11235 +#: ../en/ch09-undo.xml:463
692.11236 +msgid "<imageobject><imagedata fileref=\"figs/undo-manual.png\"/></imageobject>"
692.11237 +msgstr ""
692.11238 +
692.11239 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11240 +#: ../en/ch09-undo.xml:468
692.11241 +msgid ""
692.11242 +"After the <command role=\"hg-cmd\">hg backout</command> command has "
692.11243 +"completed, it leaves the new <quote>backout</quote> changeset as the parent "
692.11244 +"of the working directory."
692.11245 +msgstr ""
692.11246 +
692.11247 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11248 +#: ../en/ch09-undo.xml:475
692.11249 +msgid "Now we have two isolated sets of changes."
692.11250 +msgstr ""
692.11251 +
692.11252 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11253 +#: ../en/ch09-undo.xml:479
692.11254 +msgid ""
692.11255 +"Let's think about what we expect to see as the contents of <filename>myfile</"
692.11256 +"filename> now.  The first change should be present, because we've never "
692.11257 +"backed it out.  The second change should be missing, as that's the change we "
692.11258 +"backed out.  Since the history graph shows the third change as a separate "
692.11259 +"head, we <emphasis>don't</emphasis> expect to see the third change present in "
692.11260 +"<filename>myfile</filename>."
692.11261 +msgstr ""
692.11262 +
692.11263 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11264 +#: ../en/ch09-undo.xml:489
692.11265 +msgid ""
692.11266 +"To get the third change back into the file, we just do a normal merge of our "
692.11267 +"two heads."
692.11268 +msgstr ""
692.11269 +
692.11270 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11271 +#: ../en/ch09-undo.xml:494
692.11272 +msgid ""
692.11273 +"Afterwards, the graphical history of our repository looks like <xref linkend="
692.11274 +"\"fig:undo:backout-manual-merge\"/>."
692.11275 +msgstr ""
692.11276 +
692.11277 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.11278 +#: ../en/ch09-undo.xml:499
692.11279 +msgid "Manually merging a backout change"
692.11280 +msgstr "手工合并恢复修改"
692.11281 +
692.11282 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.11283 +#: ../en/ch09-undo.xml:501
692.11284 +msgid ""
692.11285 +"<imageobject><imagedata fileref=\"figs/undo-manual-merge.png\"/></imageobject>"
692.11286 +msgstr ""
692.11287 +
692.11288 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.11289 +#: ../en/ch09-undo.xml:508
692.11290 +msgid "Why <command role=\"hg-cmd\">hg backout</command> works as it does"
692.11291 +msgstr "<command role=\"hg-cmd\">hg backout</command> 的内幕"
692.11292 +
692.11293 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11294 +#: ../en/ch09-undo.xml:511
692.11295 +msgid ""
692.11296 +"Here's a brief description of how the <command role=\"hg-cmd\">hg backout</"
692.11297 +"command> command works."
692.11298 +msgstr ""
692.11299 +
692.11300 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11301 +#: ../en/ch09-undo.xml:514
692.11302 +msgid ""
692.11303 +"It ensures that the working directory is <quote>clean</quote>, i.e. that the "
692.11304 +"output of <command role=\"hg-cmd\">hg status</command> would be empty."
692.11305 +msgstr ""
692.11306 +
692.11307 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11308 +#: ../en/ch09-undo.xml:518
692.11309 +msgid ""
692.11310 +"It remembers the current parent of the working directory.  Let's call this "
692.11311 +"changeset <literal>orig</literal>."
692.11312 +msgstr ""
692.11313 +
692.11314 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11315 +#: ../en/ch09-undo.xml:522
692.11316 +msgid ""
692.11317 +"It does the equivalent of a <command role=\"hg-cmd\">hg update</command> to "
692.11318 +"sync the working directory to the changeset you want to back out.  Let's call "
692.11319 +"this changeset <literal>backout</literal>."
692.11320 +msgstr ""
692.11321 +
692.11322 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11323 +#: ../en/ch09-undo.xml:527
692.11324 +msgid ""
692.11325 +"It finds the parent of that changeset.  Let's call that changeset "
692.11326 +"<literal>parent</literal>."
692.11327 +msgstr ""
692.11328 +
692.11329 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11330 +#: ../en/ch09-undo.xml:530
692.11331 +msgid ""
692.11332 +"For each file that the <literal>backout</literal> changeset affected, it does "
692.11333 +"the equivalent of a <command role=\"hg-cmd\">hg revert -r parent</command> on "
692.11334 +"that file, to restore it to the contents it had before that changeset was "
692.11335 +"committed."
692.11336 +msgstr ""
692.11337 +
692.11338 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11339 +#: ../en/ch09-undo.xml:537
692.11340 +msgid ""
692.11341 +"It commits the result as a new changeset.  This changeset has "
692.11342 +"<literal>backout</literal> as its parent."
692.11343 +msgstr ""
692.11344 +
692.11345 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11346 +#: ../en/ch09-undo.xml:541
692.11347 +msgid ""
692.11348 +"If you specify <option role=\"hg-opt-backout\">--merge</option> on the "
692.11349 +"command line, it merges with <literal>orig</literal>, and commits the result "
692.11350 +"of the merge."
692.11351 +msgstr ""
692.11352 +
692.11353 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11354 +#: ../en/ch09-undo.xml:547
692.11355 +msgid ""
692.11356 +"An alternative way to implement the <command role=\"hg-cmd\">hg backout</"
692.11357 +"command> command would be to <command role=\"hg-cmd\">hg export</command> the "
692.11358 +"to-be-backed-out changeset as a diff, then use the <option role=\"cmd-opt-"
692.11359 +"patch\">--reverse</option> option to the <command>patch</command> command to "
692.11360 +"reverse the effect of the change without fiddling with the working "
692.11361 +"directory.  This sounds much simpler, but it would not work nearly as well."
692.11362 +msgstr ""
692.11363 +
692.11364 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11365 +#: ../en/ch09-undo.xml:557
692.11366 +msgid ""
692.11367 +"The reason that <command role=\"hg-cmd\">hg backout</command> does an update, "
692.11368 +"a commit, a merge, and another commit is to give the merge machinery the best "
692.11369 +"chance to do a good job when dealing with all the changes <emphasis>between</"
692.11370 +"emphasis> the change you're backing out and the current tip."
692.11371 +msgstr ""
692.11372 +
692.11373 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11374 +#: ../en/ch09-undo.xml:564
692.11375 +msgid ""
692.11376 +"If you're backing out a changeset that's 100 revisions back in your project's "
692.11377 +"history, the chances that the <command>patch</command> command will be able "
692.11378 +"to apply a reverse diff cleanly are not good, because intervening changes are "
692.11379 +"likely to have <quote>broken the context</quote> that <command>patch</"
692.11380 +"command> uses to determine whether it can apply a patch (if this sounds like "
692.11381 +"gibberish, see <xref linkend=\"sec:mq:patch\"/> for a discussion of the "
692.11382 +"<command>patch</command> command).  Also, Mercurial's merge machinery will "
692.11383 +"handle files and directories being renamed, permission changes, and "
692.11384 +"modifications to binary files, none of which <command>patch</command> can "
692.11385 +"deal with."
692.11386 +msgstr ""
692.11387 +
692.11388 +#. type: Content of: <book><chapter><sect1><title>
692.11389 +#: ../en/ch09-undo.xml:581
692.11390 +msgid "Changes that should never have been"
692.11391 +msgstr "不该发生的修改"
692.11392 +
692.11393 +#. type: Content of: <book><chapter><sect1><para>
692.11394 +#: ../en/ch09-undo.xml:583
692.11395 +msgid ""
692.11396 +"Most of the time, the <command role=\"hg-cmd\">hg backout</command> command "
692.11397 +"is exactly what you need if you want to undo the effects of a change.  It "
692.11398 +"leaves a permanent record of exactly what you did, both when committing the "
692.11399 +"original changeset and when you cleaned up after it."
692.11400 +msgstr ""
692.11401 +
692.11402 +#. type: Content of: <book><chapter><sect1><para>
692.11403 +#: ../en/ch09-undo.xml:589
692.11404 +msgid ""
692.11405 +"On rare occasions, though, you may find that you've committed a change that "
692.11406 +"really should not be present in the repository at all.  For example, it would "
692.11407 +"be very unusual, and usually considered a mistake, to commit a software "
692.11408 +"project's object files as well as its source files.  Object files have almost "
692.11409 +"no intrinsic value, and they're <emphasis>big</emphasis>, so they increase "
692.11410 +"the size of the repository and the amount of time it takes to clone or pull "
692.11411 +"changes."
692.11412 +msgstr ""
692.11413 +
692.11414 +#. type: Content of: <book><chapter><sect1><para>
692.11415 +#: ../en/ch09-undo.xml:598
692.11416 +msgid ""
692.11417 +"Before I discuss the options that you have if you commit a <quote>brown paper "
692.11418 +"bag</quote> change (the kind that's so bad that you want to pull a brown "
692.11419 +"paper bag over your head), let me first discuss some approaches that probably "
692.11420 +"won't work."
692.11421 +msgstr ""
692.11422 +
692.11423 +#. type: Content of: <book><chapter><sect1><para>
692.11424 +#: ../en/ch09-undo.xml:603
692.11425 +msgid ""
692.11426 +"Since Mercurial treats history as accumulative&emdash;every change builds on "
692.11427 +"top of all changes that preceded it&emdash;you generally can't just make "
692.11428 +"disastrous changes disappear.  The one exception is when you've just "
692.11429 +"committed a change, and it hasn't been pushed or pulled into another "
692.11430 +"repository.  That's when you can safely use the <command role=\"hg-cmd\">hg "
692.11431 +"rollback</command> command, as I detailed in <xref linkend=\"sec:undo:rollback"
692.11432 +"\"/>."
692.11433 +msgstr ""
692.11434 +
692.11435 +#. type: Content of: <book><chapter><sect1><para>
692.11436 +#: ../en/ch09-undo.xml:612
692.11437 +msgid ""
692.11438 +"After you've pushed a bad change to another repository, you <emphasis>could</"
692.11439 +"emphasis> still use <command role=\"hg-cmd\">hg rollback</command> to make "
692.11440 +"your local copy of the change disappear, but it won't have the consequences "
692.11441 +"you want.  The change will still be present in the remote repository, so it "
692.11442 +"will reappear in your local repository the next time you pull."
692.11443 +msgstr ""
692.11444 +
692.11445 +#. type: Content of: <book><chapter><sect1><para>
692.11446 +#: ../en/ch09-undo.xml:620
692.11447 +msgid ""
692.11448 +"If a situation like this arises, and you know which repositories your bad "
692.11449 +"change has propagated into, you can <emphasis>try</emphasis> to get rid of "
692.11450 +"the change from <emphasis>every</emphasis> one of those repositories.  This "
692.11451 +"is, of course, not a satisfactory solution: if you miss even a single "
692.11452 +"repository while you're expunging, the change is still <quote>in the wild</"
692.11453 +"quote>, and could propagate further."
692.11454 +msgstr ""
692.11455 +
692.11456 +#. type: Content of: <book><chapter><sect1><para>
692.11457 +#: ../en/ch09-undo.xml:628
692.11458 +msgid ""
692.11459 +"If you've committed one or more changes <emphasis>after</emphasis> the change "
692.11460 +"that you'd like to see disappear, your options are further reduced. Mercurial "
692.11461 +"doesn't provide a way to <quote>punch a hole</quote> in history, leaving "
692.11462 +"changesets intact."
692.11463 +msgstr ""
692.11464 +
692.11465 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.11466 +#: ../en/ch09-undo.xml:635
692.11467 +msgid "Backing out a merge"
692.11468 +msgstr "撤销一个合并"
692.11469 +
692.11470 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11471 +#: ../en/ch09-undo.xml:637
692.11472 +msgid ""
692.11473 +"Since merges are often complicated, it is not unheard of for a merge to be "
692.11474 +"mangled badly, but committed erroneously.  Mercurial provides an important "
692.11475 +"safeguard against bad merges by refusing to commit unresolved files, but "
692.11476 +"human ingenuity guarantees that it is still possible to mess a merge up and "
692.11477 +"commit it."
692.11478 +msgstr ""
692.11479 +
692.11480 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11481 +#: ../en/ch09-undo.xml:644
692.11482 +msgid ""
692.11483 +"Given a bad merge that has been committed, usually the best way to approach "
692.11484 +"it is to simply try to repair the damage by hand.  A complete disaster that "
692.11485 +"cannot be easily fixed up by hand ought to be very rare, but the <command "
692.11486 +"role=\"hg-cmd\">hg backout</command> command may help in making the cleanup "
692.11487 +"easier. It offers a <option role=\"hg-opt-backout\">--parent</option> option, "
692.11488 +"which lets you specify which parent to revert to when backing out a merge."
692.11489 +msgstr ""
692.11490 +
692.11491 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.11492 +#: ../en/ch09-undo.xml:655
692.11493 +msgid "A bad merge"
692.11494 +msgstr "错误的合并"
692.11495 +
692.11496 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.11497 +#: ../en/ch09-undo.xml:657
692.11498 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-1.png\"/></imageobject>"
692.11499 +msgstr ""
692.11500 +
692.11501 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11502 +#: ../en/ch09-undo.xml:662
692.11503 +msgid ""
692.11504 +"Suppose we have a revision graph like that in <xref linkend=\"fig:undo:bad-"
692.11505 +"merge-1\"/>.  What we'd like is to <emphasis>redo</emphasis> the merge of "
692.11506 +"revisions 2 and 3."
692.11507 +msgstr ""
692.11508 +
692.11509 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11510 +#: ../en/ch09-undo.xml:667
692.11511 +msgid "One way to do so would be as follows."
692.11512 +msgstr ""
692.11513 +
692.11514 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11515 +#: ../en/ch09-undo.xml:671
692.11516 +msgid ""
692.11517 +"Call <command role=\"hg-cmd\">hg backout --rev=4 --parent=2</command>.  This "
692.11518 +"tells <command role=\"hg-cmd\">hg backout</command> to back out revision 4, "
692.11519 +"which is the bad merge, and to when deciding which revision to prefer, to "
692.11520 +"choose parent 2, one of the parents of the merge.  The effect can be seen in "
692.11521 +"<xref linkend=\"fig:undo:bad-merge-2\"/>."
692.11522 +msgstr ""
692.11523 +
692.11524 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><title>
692.11525 +#: ../en/ch09-undo.xml:679
692.11526 +msgid "Backing out the merge, favoring one parent"
692.11527 +msgstr "拆除合并,关注一个父亲"
692.11528 +
692.11529 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><mediaobject>
692.11530 +#: ../en/ch09-undo.xml:681
692.11531 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-2.png\"/></imageobject>"
692.11532 +msgstr ""
692.11533 +"<imageobject><imagedata fileref=\"figs/bad-merge-2.png\"/></imageobject>"
692.11534 +
692.11535 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11536 +#: ../en/ch09-undo.xml:688
692.11537 +msgid ""
692.11538 +"Call <command role=\"hg-cmd\">hg backout --rev=4 --parent=3</command>.  This "
692.11539 +"tells <command role=\"hg-cmd\">hg backout</command> to back out revision 4 "
692.11540 +"again, but this time to choose parent 3, the other parent of the merge.  The "
692.11541 +"result is visible in <xref linkend=\"fig:undo:bad-merge-3\"/>, in which the "
692.11542 +"repository now contains three heads."
692.11543 +msgstr ""
692.11544 +
692.11545 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><title>
692.11546 +#: ../en/ch09-undo.xml:696
692.11547 +msgid "Backing out the merge, favoring the other parent"
692.11548 +msgstr "拆除合并,关注其它父亲"
692.11549 +
692.11550 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><mediaobject>
692.11551 +#: ../en/ch09-undo.xml:699
692.11552 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-3.png\"/></imageobject>"
692.11553 +msgstr ""
692.11554 +"<imageobject><imagedata fileref=\"figs/bad-merge-3.png\"/></imageobject>"
692.11555 +
692.11556 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11557 +#: ../en/ch09-undo.xml:706
692.11558 +msgid ""
692.11559 +"Redo the bad merge by merging the two backout heads, which reduces the number "
692.11560 +"of heads in the repository to two, as can be seen in <xref linkend=\"fig:undo:"
692.11561 +"bad-merge-4\"/>."
692.11562 +msgstr ""
692.11563 +
692.11564 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><title>
692.11565 +#: ../en/ch09-undo.xml:711 ../en/ch09-undo.xml:724
692.11566 +msgid "Merging the backouts"
692.11567 +msgstr "合并拆除"
692.11568 +
692.11569 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><mediaobject>
692.11570 +#: ../en/ch09-undo.xml:713
692.11571 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-4.png\"/></imageobject>"
692.11572 +msgstr ""
692.11573 +"<imageobject><imagedata fileref=\"figs/bad-merge-4.png\"/></imageobject>"
692.11574 +
692.11575 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11576 +#: ../en/ch09-undo.xml:720
692.11577 +msgid ""
692.11578 +"Merge with the commit that was made after the bad merge, as shown in <xref "
692.11579 +"linkend=\"fig:undo:bad-merge-5\"/>."
692.11580 +msgstr ""
692.11581 +
692.11582 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><mediaobject>
692.11583 +#: ../en/ch09-undo.xml:726
692.11584 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-5.png\"/></imageobject>"
692.11585 +msgstr ""
692.11586 +
692.11587 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.11588 +#: ../en/ch09-undo.xml:735
692.11589 +msgid "Protect yourself from <quote>escaped</quote> changes"
692.11590 +msgstr "使用<quote>校验</quote>修改来保护你自己"
692.11591 +
692.11592 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11593 +#: ../en/ch09-undo.xml:738
692.11594 +msgid ""
692.11595 +"If you've committed some changes to your local repository and they've been "
692.11596 +"pushed or pulled somewhere else, this isn't necessarily a disaster.  You can "
692.11597 +"protect yourself ahead of time against some classes of bad changeset.  This "
692.11598 +"is particularly easy if your team usually pulls changes from a central "
692.11599 +"repository."
692.11600 +msgstr ""
692.11601 +
692.11602 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11603 +#: ../en/ch09-undo.xml:745
692.11604 +msgid ""
692.11605 +"By configuring some hooks on that repository to validate incoming changesets "
692.11606 +"(see chapter <xref linkend=\"chap:hook\"/>), you can automatically prevent "
692.11607 +"some kinds of bad changeset from being pushed to the central repository at "
692.11608 +"all.  With such a configuration in place, some kinds of bad changeset will "
692.11609 +"naturally tend to <quote>die out</quote> because they can't propagate into "
692.11610 +"the central repository.  Better yet, this happens without any need for "
692.11611 +"explicit intervention."
692.11612 +msgstr ""
692.11613 +
692.11614 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11615 +#: ../en/ch09-undo.xml:755
692.11616 +msgid ""
692.11617 +"For instance, an incoming change hook that verifies that a changeset will "
692.11618 +"actually compile can prevent people from inadvertently <quote>breaking the "
692.11619 +"build</quote>."
692.11620 +msgstr ""
692.11621 +
692.11622 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.11623 +#: ../en/ch09-undo.xml:762
692.11624 +msgid "What to do about sensitive changes that escape"
692.11625 +msgstr "处理敏感信息泄漏的方法"
692.11626 +
692.11627 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11628 +#: ../en/ch09-undo.xml:764
692.11629 +msgid ""
692.11630 +"Even a carefully run project can suffer an unfortunate event such as the "
692.11631 +"committing and uncontrolled propagation of a file that contains important "
692.11632 +"passwords."
692.11633 +msgstr ""
692.11634 +
692.11635 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11636 +#: ../en/ch09-undo.xml:768
692.11637 +msgid ""
692.11638 +"If something like this happens to you, and the information that gets "
692.11639 +"accidentally propagated is truly sensitive, your first step should be to "
692.11640 +"mitigate the effect of the leak without trying to control the leak itself. If "
692.11641 +"you are not 100% certain that you know exactly who could have seen the "
692.11642 +"changes, you should immediately change passwords, cancel credit cards, or "
692.11643 +"find some other way to make sure that the information that has leaked is no "
692.11644 +"longer useful.  In other words, assume that the change has propagated far and "
692.11645 +"wide, and that there's nothing more you can do."
692.11646 +msgstr ""
692.11647 +
692.11648 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11649 +#: ../en/ch09-undo.xml:779
692.11650 +msgid ""
692.11651 +"You might hope that there would be mechanisms you could use to either figure "
692.11652 +"out who has seen a change or to erase the change permanently everywhere, but "
692.11653 +"there are good reasons why these are not possible."
692.11654 +msgstr ""
692.11655 +
692.11656 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11657 +#: ../en/ch09-undo.xml:784
692.11658 +msgid ""
692.11659 +"Mercurial does not provide an audit trail of who has pulled changes from a "
692.11660 +"repository, because it is usually either impossible to record such "
692.11661 +"information or trivial to spoof it.  In a multi-user or networked "
692.11662 +"environment, you should thus be extremely skeptical of yourself if you think "
692.11663 +"that you have identified every place that a sensitive changeset has "
692.11664 +"propagated to.  Don't forget that people can and will send bundles by email, "
692.11665 +"have their backup software save data offsite, carry repositories on USB "
692.11666 +"sticks, and find other completely innocent ways to confound your attempts to "
692.11667 +"track down every copy of a problematic change."
692.11668 +msgstr ""
692.11669 +
692.11670 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11671 +#: ../en/ch09-undo.xml:796
692.11672 +msgid ""
692.11673 +"Mercurial also does not provide a way to make a file or changeset completely "
692.11674 +"disappear from history, because there is no way to enforce its disappearance; "
692.11675 +"someone could easily modify their copy of Mercurial to ignore such "
692.11676 +"directives. In addition, even if Mercurial provided such a capability, "
692.11677 +"someone who simply hadn't pulled a <quote>make this file disappear</quote> "
692.11678 +"changeset wouldn't be affected by it, nor would web crawlers visiting at the "
692.11679 +"wrong time, disk backups, or other mechanisms.  Indeed, no distributed "
692.11680 +"revision control system can make data reliably vanish. Providing the illusion "
692.11681 +"of such control could easily give a false sense of security, and be worse "
692.11682 +"than not providing it at all."
692.11683 +msgstr ""
692.11684 +
692.11685 +#. type: Content of: <book><chapter><sect1><title>
692.11686 +#: ../en/ch09-undo.xml:812
692.11687 +msgid "Finding the source of a bug"
692.11688 +msgstr "查找问题的根源"
692.11689 +
692.11690 +#. type: Content of: <book><chapter><sect1><para>
692.11691 +#: ../en/ch09-undo.xml:814
692.11692 +msgid ""
692.11693 +"While it's all very well to be able to back out a changeset that introduced a "
692.11694 +"bug, this requires that you know which changeset to back out.  Mercurial "
692.11695 +"provides an invaluable command, called <command role=\"hg-cmd\">hg bisect</"
692.11696 +"command>, that helps you to automate this process and accomplish it very "
692.11697 +"efficiently."
692.11698 +msgstr ""
692.11699 +
692.11700 +#. type: Content of: <book><chapter><sect1><para>
692.11701 +#: ../en/ch09-undo.xml:821
692.11702 +msgid ""
692.11703 +"The idea behind the <command role=\"hg-cmd\">hg bisect</command> command is "
692.11704 +"that a changeset has introduced some change of behavior that you can identify "
692.11705 +"with a simple pass/fail test.  You don't know which piece of code introduced "
692.11706 +"the change, but you know how to test for the presence of the bug.  The "
692.11707 +"<command role=\"hg-cmd\">hg bisect</command> command uses your test to direct "
692.11708 +"its search for the changeset that introduced the code that caused the bug."
692.11709 +msgstr ""
692.11710 +
692.11711 +#. type: Content of: <book><chapter><sect1><para>
692.11712 +#: ../en/ch09-undo.xml:830
692.11713 +msgid ""
692.11714 +"Here are a few scenarios to help you understand how you might apply this "
692.11715 +"command."
692.11716 +msgstr ""
692.11717 +
692.11718 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.11719 +#: ../en/ch09-undo.xml:833
692.11720 +msgid ""
692.11721 +"The most recent version of your software has a bug that you remember wasn't "
692.11722 +"present a few weeks ago, but you don't know when it was introduced.  Here, "
692.11723 +"your binary test checks for the presence of that bug."
692.11724 +msgstr ""
692.11725 +
692.11726 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.11727 +#: ../en/ch09-undo.xml:838
692.11728 +msgid ""
692.11729 +"You fixed a bug in a rush, and now it's time to close the entry in your "
692.11730 +"team's bug database.  The bug database requires a changeset ID when you close "
692.11731 +"an entry, but you don't remember which changeset you fixed the bug in.  Once "
692.11732 +"again, your binary test checks for the presence of the bug."
692.11733 +msgstr ""
692.11734 +
692.11735 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.11736 +#: ../en/ch09-undo.xml:845
692.11737 +msgid ""
692.11738 +"Your software works correctly, but runs 15% slower than the last time you "
692.11739 +"measured it.  You want to know which changeset introduced the performance "
692.11740 +"regression.  In this case, your binary test measures the performance of your "
692.11741 +"software, to see whether it's <quote>fast</quote> or <quote>slow</quote>."
692.11742 +msgstr ""
692.11743 +
692.11744 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.11745 +#: ../en/ch09-undo.xml:852
692.11746 +msgid ""
692.11747 +"The sizes of the components of your project that you ship exploded recently, "
692.11748 +"and you suspect that something changed in the way you build your project."
692.11749 +msgstr ""
692.11750 +
692.11751 +#. type: Content of: <book><chapter><sect1><para>
692.11752 +#: ../en/ch09-undo.xml:857
692.11753 +msgid ""
692.11754 +"From these examples, it should be clear that the <command role=\"hg-cmd\">hg "
692.11755 +"bisect</command> command is not useful only for finding the sources of bugs.  "
692.11756 +"You can use it to find any <quote>emergent property</quote> of a repository "
692.11757 +"(anything that you can't find from a simple text search of the files in the "
692.11758 +"tree) for which you can write a binary test."
692.11759 +msgstr ""
692.11760 +
692.11761 +#. type: Content of: <book><chapter><sect1><para>
692.11762 +#: ../en/ch09-undo.xml:864
692.11763 +msgid ""
692.11764 +"We'll introduce a little bit of terminology here, just to make it clear which "
692.11765 +"parts of the search process are your responsibility, and which are "
692.11766 +"Mercurial's.  A <emphasis>test</emphasis> is something that <emphasis>you</"
692.11767 +"emphasis> run when <command role=\"hg-cmd\">hg bisect</command> chooses a "
692.11768 +"changeset.  A <emphasis>probe</emphasis> is what <command role=\"hg-cmd\">hg "
692.11769 +"bisect</command> runs to tell whether a revision is good.  Finally, we'll use "
692.11770 +"the word <quote>bisect</quote>, as both a noun and a verb, to stand in for "
692.11771 +"the phrase <quote>search using the <command role=\"hg-cmd\">hg bisect</"
692.11772 +"command> command</quote>."
692.11773 +msgstr ""
692.11774 +
692.11775 +#. type: Content of: <book><chapter><sect1><para>
692.11776 +#: ../en/ch09-undo.xml:877
692.11777 +msgid ""
692.11778 +"One simple way to automate the searching process would be simply to probe "
692.11779 +"every changeset.  However, this scales poorly.  If it took ten minutes to "
692.11780 +"test a single changeset, and you had 10,000 changesets in your repository, "
692.11781 +"the exhaustive approach would take on average 35 <emphasis>days</emphasis> to "
692.11782 +"find the changeset that introduced a bug.  Even if you knew that the bug was "
692.11783 +"introduced by one of the last 500 changesets, and limited your search to "
692.11784 +"those, you'd still be looking at over 40 hours to find the changeset that "
692.11785 +"introduced your bug."
692.11786 +msgstr ""
692.11787 +
692.11788 +#. type: Content of: <book><chapter><sect1><para>
692.11789 +#: ../en/ch09-undo.xml:887
692.11790 +msgid ""
692.11791 +"What the <command role=\"hg-cmd\">hg bisect</command> command does is use its "
692.11792 +"knowledge of the <quote>shape</quote> of your project's revision history to "
692.11793 +"perform a search in time proportional to the <emphasis>logarithm</emphasis> "
692.11794 +"of the number of changesets to check (the kind of search it performs is "
692.11795 +"called a dichotomic search).  With this approach, searching through 10,000 "
692.11796 +"changesets will take less than three hours, even at ten minutes per test (the "
692.11797 +"search will require about 14 tests).  Limit your search to the last hundred "
692.11798 +"changesets, and it will take only about an hour (roughly seven tests)."
692.11799 +msgstr ""
692.11800 +
692.11801 +#. type: Content of: <book><chapter><sect1><para>
692.11802 +#: ../en/ch09-undo.xml:898
692.11803 +msgid ""
692.11804 +"The <command role=\"hg-cmd\">hg bisect</command> command is aware of the "
692.11805 +"<quote>branchy</quote> nature of a Mercurial project's revision history, so "
692.11806 +"it has no problems dealing with branches, merges, or multiple heads in a "
692.11807 +"repository.  It can prune entire branches of history with a single probe, "
692.11808 +"which is how it operates so efficiently."
692.11809 +msgstr ""
692.11810 +
692.11811 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.11812 +#: ../en/ch09-undo.xml:906
692.11813 +msgid "Using the <command role=\"hg-cmd\">hg bisect</command> command"
692.11814 +msgstr "使用命令 <command role=\"hg-cmd\">hg bisect</command>"
692.11815 +
692.11816 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11817 +#: ../en/ch09-undo.xml:909
692.11818 +msgid ""
692.11819 +"Here's an example of <command role=\"hg-cmd\">hg bisect</command> in action."
692.11820 +msgstr ""
692.11821 +
692.11822 +#. type: Content of: <book><chapter><sect1><sect2><note><para>
692.11823 +#: ../en/ch09-undo.xml:913
692.11824 +msgid ""
692.11825 +"In versions 0.9.5 and earlier of Mercurial, <command role=\"hg-cmd\">hg "
692.11826 +"bisect</command> was not a core command: it was distributed with Mercurial as "
692.11827 +"an extension. This section describes the built-in command, not the old "
692.11828 +"extension."
692.11829 +msgstr ""
692.11830 +
692.11831 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11832 +#: ../en/ch09-undo.xml:920
692.11833 +msgid ""
692.11834 +"Now let's create a repository, so that we can try out the <command role=\"hg-"
692.11835 +"cmd\">hg bisect</command> command in isolation."
692.11836 +msgstr ""
692.11837 +
692.11838 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11839 +#: ../en/ch09-undo.xml:926
692.11840 +msgid ""
692.11841 +"We'll simulate a project that has a bug in it in a simple-minded way: create "
692.11842 +"trivial changes in a loop, and nominate one specific change that will have "
692.11843 +"the <quote>bug</quote>.  This loop creates 35 changesets, each adding a "
692.11844 +"single file to the repository. We'll represent our <quote>bug</quote> with a "
692.11845 +"file that contains the text <quote>i have a gub</quote>."
692.11846 +msgstr ""
692.11847 +
692.11848 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11849 +#: ../en/ch09-undo.xml:936
692.11850 +msgid ""
692.11851 +"The next thing that we'd like to do is figure out how to use the <command "
692.11852 +"role=\"hg-cmd\">hg bisect</command> command.  We can use Mercurial's normal "
692.11853 +"built-in help mechanism for this."
692.11854 +msgstr ""
692.11855 +
692.11856 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11857 +#: ../en/ch09-undo.xml:943
692.11858 +msgid ""
692.11859 +"The <command role=\"hg-cmd\">hg bisect</command> command works in steps.  "
692.11860 +"Each step proceeds as follows."
692.11861 +msgstr ""
692.11862 +
692.11863 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11864 +#: ../en/ch09-undo.xml:946
692.11865 +msgid "You run your binary test."
692.11866 +msgstr ""
692.11867 +
692.11868 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para>
692.11869 +#: ../en/ch09-undo.xml:948
692.11870 +msgid ""
692.11871 +"If the test succeeded, you tell <command role=\"hg-cmd\">hg bisect</command> "
692.11872 +"by running the <command role=\"hg-cmd\">hg bisect --good</command> command."
692.11873 +msgstr ""
692.11874 +"当测试成功后,使用 <command role=\"hg-cmd\">hg bisect --good</command> 命令告"
692.11875 +"诉 <command role=\"hg-cmd\">hg bisect</command> 命令。"
692.11876 +
692.11877 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para>
692.11878 +#: ../en/ch09-undo.xml:953
692.11879 +msgid ""
692.11880 +"If it failed, run the <command role=\"hg-cmd\">hg bisect --bad</command> "
692.11881 +"command."
692.11882 +msgstr ""
692.11883 +"如果失败,执行 <command role=\"hg-cmd\">hg bisect --bad</command> 命令。"
692.11884 +
692.11885 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11886 +#: ../en/ch09-undo.xml:957
692.11887 +msgid ""
692.11888 +"The command uses your information to decide which changeset to test next."
692.11889 +msgstr ""
692.11890 +
692.11891 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
692.11892 +#: ../en/ch09-undo.xml:960
692.11893 +msgid ""
692.11894 +"It updates the working directory to that changeset, and the process begins "
692.11895 +"again."
692.11896 +msgstr ""
692.11897 +
692.11898 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11899 +#: ../en/ch09-undo.xml:963
692.11900 +msgid ""
692.11901 +"The process ends when <command role=\"hg-cmd\">hg bisect</command> identifies "
692.11902 +"a unique changeset that marks the point where your test transitioned from "
692.11903 +"<quote>succeeding</quote> to <quote>failing</quote>."
692.11904 +msgstr ""
692.11905 +
692.11906 +#
692.11907 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11908 +#: ../en/ch09-undo.xml:968
692.11909 +msgid ""
692.11910 +"To start the search, we must run the <command role=\"hg-cmd\">hg bisect --"
692.11911 +"reset</command> command."
692.11912 +msgstr ""
692.11913 +
692.11914 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11915 +#: ../en/ch09-undo.xml:973
692.11916 +msgid ""
692.11917 +"In our case, the binary test we use is simple: we check to see if any file in "
692.11918 +"the repository contains the string <quote>i have a gub</quote>.  If it does, "
692.11919 +"this changeset contains the change that <quote>caused the bug</quote>.  By "
692.11920 +"convention, a changeset that has the property we're searching for is "
692.11921 +"<quote>bad</quote>, while one that doesn't is <quote>good</quote>."
692.11922 +msgstr ""
692.11923 +
692.11924 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11925 +#: ../en/ch09-undo.xml:981
692.11926 +msgid ""
692.11927 +"Most of the time, the revision to which the working directory is synced "
692.11928 +"(usually the tip) already exhibits the problem introduced by the buggy "
692.11929 +"change, so we'll mark it as <quote>bad</quote>."
692.11930 +msgstr ""
692.11931 +
692.11932 +#
692.11933 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11934 +#: ../en/ch09-undo.xml:988
692.11935 +msgid ""
692.11936 +"Our next task is to nominate a changeset that we know <emphasis>doesn't</"
692.11937 +"emphasis> have the bug; the <command role=\"hg-cmd\">hg bisect</command> "
692.11938 +"command will <quote>bracket</quote> its search between the first pair of good "
692.11939 +"and bad changesets.  In our case, we know that revision 10 didn't have the "
692.11940 +"bug.  (I'll have more words about choosing the first <quote>good</quote> "
692.11941 +"changeset later.)"
692.11942 +msgstr ""
692.11943 +
692.11944 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11945 +#: ../en/ch09-undo.xml:998
692.11946 +msgid "Notice that this command printed some output."
692.11947 +msgstr ""
692.11948 +
692.11949 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.11950 +#: ../en/ch09-undo.xml:1000
692.11951 +msgid ""
692.11952 +"It told us how many changesets it must consider before it can identify the "
692.11953 +"one that introduced the bug, and how many tests that will require."
692.11954 +msgstr ""
692.11955 +
692.11956 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.11957 +#: ../en/ch09-undo.xml:1004
692.11958 +msgid ""
692.11959 +"It updated the working directory to the next changeset to test, and told us "
692.11960 +"which changeset it's testing."
692.11961 +msgstr ""
692.11962 +
692.11963 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11964 +#: ../en/ch09-undo.xml:1009
692.11965 +msgid ""
692.11966 +"We now run our test in the working directory.  We use the <command>grep</"
692.11967 +"command> command to see if our <quote>bad</quote> file is present in the "
692.11968 +"working directory.  If it is, this revision is bad; if not, this revision is "
692.11969 +"good.  &interaction.bisect.search.step1;"
692.11970 +msgstr ""
692.11971 +
692.11972 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11973 +#: ../en/ch09-undo.xml:1015
692.11974 +msgid ""
692.11975 +"This test looks like a perfect candidate for automation, so let's turn it "
692.11976 +"into a shell function."
692.11977 +msgstr ""
692.11978 +
692.11979 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11980 +#: ../en/ch09-undo.xml:1019
692.11981 +msgid ""
692.11982 +"We can now run an entire test step with a single command, <literal>mytest</"
692.11983 +"literal>."
692.11984 +msgstr ""
692.11985 +
692.11986 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11987 +#: ../en/ch09-undo.xml:1024
692.11988 +msgid "A few more invocations of our canned test step command, and we're done."
692.11989 +msgstr ""
692.11990 +
692.11991 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.11992 +#: ../en/ch09-undo.xml:1029
692.11993 +msgid ""
692.11994 +"Even though we had 40 changesets to search through, the <command role=\"hg-cmd"
692.11995 +"\">hg bisect</command> command let us find the changeset that introduced our "
692.11996 +"<quote>bug</quote> with only five tests.  Because the number of tests that "
692.11997 +"the <command role=\"hg-cmd\">hg bisect</command> command performs grows "
692.11998 +"logarithmically with the number of changesets to search, the advantage that "
692.11999 +"it has over the <quote>brute force</quote> search approach increases with "
692.12000 +"every changeset you add."
692.12001 +msgstr ""
692.12002 +
692.12003 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12004 +#: ../en/ch09-undo.xml:1040
692.12005 +msgid "Cleaning up after your search"
692.12006 +msgstr "搜索后的清理"
692.12007 +
692.12008 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12009 +#: ../en/ch09-undo.xml:1042
692.12010 +msgid ""
692.12011 +"When you're finished using the <command role=\"hg-cmd\">hg bisect</command> "
692.12012 +"command in a repository, you can use the <command role=\"hg-cmd\">hg bisect --"
692.12013 +"reset</command> command to drop the information it was using to drive your "
692.12014 +"search.  The command doesn't use much space, so it doesn't matter if you "
692.12015 +"forget to run this command.  However, <command role=\"hg-cmd\">hg bisect</"
692.12016 +"command> won't let you start a new search in that repository until you do a "
692.12017 +"<command role=\"hg-cmd\">hg bisect --reset</command>."
692.12018 +msgstr ""
692.12019 +
692.12020 +#. type: Content of: <book><chapter><sect1><title>
692.12021 +#: ../en/ch09-undo.xml:1057
692.12022 +msgid "Tips for finding bugs effectively"
692.12023 +msgstr "有效查找问题的技巧"
692.12024 +
692.12025 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12026 +#: ../en/ch09-undo.xml:1060
692.12027 +msgid "Give consistent input"
692.12028 +msgstr "给出一致的输入"
692.12029 +
692.12030 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12031 +#: ../en/ch09-undo.xml:1062
692.12032 +msgid ""
692.12033 +"The <command role=\"hg-cmd\">hg bisect</command> command requires that you "
692.12034 +"correctly report the result of every test you perform.  If you tell it that a "
692.12035 +"test failed when it really succeeded, it <emphasis>might</emphasis> be able "
692.12036 +"to detect the inconsistency.  If it can identify an inconsistency in your "
692.12037 +"reports, it will tell you that a particular changeset is both good and bad. "
692.12038 +"However, it can't do this perfectly; it's about as likely to report the wrong "
692.12039 +"changeset as the source of the bug."
692.12040 +msgstr ""
692.12041 +
692.12042 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12043 +#: ../en/ch09-undo.xml:1074
692.12044 +msgid "Automate as much as possible"
692.12045 +msgstr "尽量自动"
692.12046 +
692.12047 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12048 +#: ../en/ch09-undo.xml:1076
692.12049 +msgid ""
692.12050 +"When I started using the <command role=\"hg-cmd\">hg bisect</command> "
692.12051 +"command, I tried a few times to run my tests by hand, on the command line.  "
692.12052 +"This is an approach that I, at least, am not suited to.  After a few tries, I "
692.12053 +"found that I was making enough mistakes that I was having to restart my "
692.12054 +"searches several times before finally getting correct results."
692.12055 +msgstr ""
692.12056 +
692.12057 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12058 +#: ../en/ch09-undo.xml:1084
692.12059 +msgid ""
692.12060 +"My initial problems with driving the <command role=\"hg-cmd\">hg bisect</"
692.12061 +"command> command by hand occurred even with simple searches on small "
692.12062 +"repositories; if the problem you're looking for is more subtle, or the number "
692.12063 +"of tests that <command role=\"hg-cmd\">hg bisect</command> must perform "
692.12064 +"increases, the likelihood of operator error ruining the search is much "
692.12065 +"higher.  Once I started automating my tests, I had much better results."
692.12066 +msgstr ""
692.12067 +
692.12068 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12069 +#: ../en/ch09-undo.xml:1093
692.12070 +msgid "The key to automated testing is twofold:"
692.12071 +msgstr ""
692.12072 +
692.12073 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.12074 +#: ../en/ch09-undo.xml:1095
692.12075 +msgid "always test for the same symptom, and"
692.12076 +msgstr ""
692.12077 +
692.12078 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.12079 +#: ../en/ch09-undo.xml:1097
692.12080 +msgid ""
692.12081 +"always feed consistent input to the <command role=\"hg-cmd\">hg bisect</"
692.12082 +"command> command."
692.12083 +msgstr ""
692.12084 +
692.12085 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12086 +#: ../en/ch09-undo.xml:1100
692.12087 +msgid ""
692.12088 +"In my tutorial example above, the <command>grep</command> command tests for "
692.12089 +"the symptom, and the <literal>if</literal> statement takes the result of this "
692.12090 +"check and ensures that we always feed the same input to the <command role="
692.12091 +"\"hg-cmd\">hg bisect</command> command.  The <literal>mytest</literal> "
692.12092 +"function marries these together in a reproducible way, so that every test is "
692.12093 +"uniform and consistent."
692.12094 +msgstr ""
692.12095 +
692.12096 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12097 +#: ../en/ch09-undo.xml:1110
692.12098 +msgid "Check your results"
692.12099 +msgstr "检查你的结果"
692.12100 +
692.12101 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12102 +#: ../en/ch09-undo.xml:1112
692.12103 +msgid ""
692.12104 +"Because the output of a <command role=\"hg-cmd\">hg bisect</command> search "
692.12105 +"is only as good as the input you give it, don't take the changeset it reports "
692.12106 +"as the absolute truth.  A simple way to cross-check its report is to manually "
692.12107 +"run your test at each of the following changesets:"
692.12108 +msgstr ""
692.12109 +
692.12110 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.12111 +#: ../en/ch09-undo.xml:1118
692.12112 +msgid ""
692.12113 +"The changeset that it reports as the first bad revision.  Your test should "
692.12114 +"still report this as bad."
692.12115 +msgstr ""
692.12116 +
692.12117 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.12118 +#: ../en/ch09-undo.xml:1122
692.12119 +msgid ""
692.12120 +"The parent of that changeset (either parent, if it's a merge). Your test "
692.12121 +"should report this changeset as good."
692.12122 +msgstr ""
692.12123 +
692.12124 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.12125 +#: ../en/ch09-undo.xml:1126
692.12126 +msgid ""
692.12127 +"A child of that changeset.  Your test should report this changeset as bad."
692.12128 +msgstr ""
692.12129 +
692.12130 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12131 +#: ../en/ch09-undo.xml:1132
692.12132 +msgid "Beware interference between bugs"
692.12133 +msgstr "谨防问题之间的冲突"
692.12134 +
692.12135 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12136 +#: ../en/ch09-undo.xml:1134
692.12137 +msgid ""
692.12138 +"It's possible that your search for one bug could be disrupted by the presence "
692.12139 +"of another.  For example, let's say your software crashes at revision 100, "
692.12140 +"and worked correctly at revision 50.  Unknown to you, someone else introduced "
692.12141 +"a different crashing bug at revision 60, and fixed it at revision 80.  This "
692.12142 +"could distort your results in one of several ways."
692.12143 +msgstr ""
692.12144 +
692.12145 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12146 +#: ../en/ch09-undo.xml:1142
692.12147 +msgid ""
692.12148 +"It is possible that this other bug completely <quote>masks</quote> yours, "
692.12149 +"which is to say that it occurs before your bug has a chance to manifest "
692.12150 +"itself.  If you can't avoid that other bug (for example, it prevents your "
692.12151 +"project from building), and so can't tell whether your bug is present in a "
692.12152 +"particular changeset, the <command role=\"hg-cmd\">hg bisect</command> "
692.12153 +"command cannot help you directly.  Instead, you can mark a changeset as "
692.12154 +"untested by running <command role=\"hg-cmd\">hg bisect --skip</command>."
692.12155 +msgstr ""
692.12156 +
692.12157 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12158 +#: ../en/ch09-undo.xml:1152
692.12159 +msgid ""
692.12160 +"A different problem could arise if your test for a bug's presence is not "
692.12161 +"specific enough.  If you check for <quote>my program crashes</quote>, then "
692.12162 +"both your crashing bug and an unrelated crashing bug that masks it will look "
692.12163 +"like the same thing, and mislead <command role=\"hg-cmd\">hg bisect</command>."
692.12164 +msgstr ""
692.12165 +
692.12166 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12167 +#: ../en/ch09-undo.xml:1159
692.12168 +msgid ""
692.12169 +"Another useful situation in which to use <command role=\"hg-cmd\">hg bisect --"
692.12170 +"skip</command> is if you can't test a revision because your project was in a "
692.12171 +"broken and hence untestable state at that revision, perhaps because someone "
692.12172 +"checked in a change that prevented the project from building."
692.12173 +msgstr ""
692.12174 +
692.12175 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12176 +#: ../en/ch09-undo.xml:1168
692.12177 +msgid "Bracket your search lazily"
692.12178 +msgstr "减少你的查找工作"
692.12179 +
692.12180 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12181 +#: ../en/ch09-undo.xml:1170
692.12182 +msgid ""
692.12183 +"Choosing the first <quote>good</quote> and <quote>bad</quote> changesets that "
692.12184 +"will mark the end points of your search is often easy, but it bears a little "
692.12185 +"discussion nevertheless.  From the perspective of <command role=\"hg-cmd\">hg "
692.12186 +"bisect</command>, the <quote>newest</quote> changeset is conventionally "
692.12187 +"<quote>bad</quote>, and the older changeset is <quote>good</quote>."
692.12188 +msgstr ""
692.12189 +
692.12190 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12191 +#: ../en/ch09-undo.xml:1178
692.12192 +msgid ""
692.12193 +"If you're having trouble remembering when a suitable <quote>good</quote> "
692.12194 +"change was, so that you can tell <command role=\"hg-cmd\">hg bisect</"
692.12195 +"command>, you could do worse than testing changesets at random.  Just "
692.12196 +"remember to eliminate contenders that can't possibly exhibit the bug (perhaps "
692.12197 +"because the feature with the bug isn't present yet) and those where another "
692.12198 +"problem masks the bug (as I discussed above)."
692.12199 +msgstr ""
692.12200 +
692.12201 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12202 +#: ../en/ch09-undo.xml:1187
692.12203 +msgid ""
692.12204 +"Even if you end up <quote>early</quote> by thousands of changesets or months "
692.12205 +"of history, you will only add a handful of tests to the total number that "
692.12206 +"<command role=\"hg-cmd\">hg bisect</command> must perform, thanks to its "
692.12207 +"logarithmic behavior."
692.12208 +msgstr ""
692.12209 +
692.12210 +#. type: Content of: <book><chapter><title>
692.12211 +#: ../en/ch10-hook.xml:5
692.12212 +msgid "Handling repository events with hooks"
692.12213 +msgstr "使用钩子处理版本库事件"
692.12214 +
692.12215 +#. type: Content of: <book><chapter><para>
692.12216 +#: ../en/ch10-hook.xml:7
692.12217 +msgid ""
692.12218 +"Mercurial offers a powerful mechanism to let you perform automated actions in "
692.12219 +"response to events that occur in a repository.  In some cases, you can even "
692.12220 +"control Mercurial's response to those events."
692.12221 +msgstr ""
692.12222 +
692.12223 +#. type: Content of: <book><chapter><para>
692.12224 +#: ../en/ch10-hook.xml:12
692.12225 +msgid ""
692.12226 +"The name Mercurial uses for one of these actions is a <emphasis>hook</"
692.12227 +"emphasis>. Hooks are called <quote>triggers</quote> in some revision control "
692.12228 +"systems, but the two names refer to the same idea."
692.12229 +msgstr ""
692.12230 +
692.12231 +#. type: Content of: <book><chapter><sect1><title>
692.12232 +#: ../en/ch10-hook.xml:18
692.12233 +msgid "An overview of hooks in Mercurial"
692.12234 +msgstr "Mercurial 钩子概述"
692.12235 +
692.12236 +#. type: Content of: <book><chapter><sect1><para>
692.12237 +#: ../en/ch10-hook.xml:20
692.12238 +msgid ""
692.12239 +"Here is a brief list of the hooks that Mercurial supports. We will revisit "
692.12240 +"each of these hooks in more detail later, in <xref linkend=\"sec:hook:ref\"/>."
692.12241 +msgstr ""
692.12242 +
692.12243 +#. type: Content of: <book><chapter><sect1><para>
692.12244 +#: ../en/ch10-hook.xml:24
692.12245 +msgid ""
692.12246 +"Each of the hooks whose description begins with the word <quote>Controlling</"
692.12247 +"quote> has the ability to determine whether an activity can proceed.  If the "
692.12248 +"hook succeeds, the activity may proceed; if it fails, the activity is either "
692.12249 +"not permitted or undone, depending on the hook."
692.12250 +msgstr ""
692.12251 +
692.12252 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.12253 +#: ../en/ch10-hook.xml:31
692.12254 +msgid ""
692.12255 +"<literal role=\"hook\">changegroup</literal>: This is run after a group of "
692.12256 +"changesets has been brought into the repository from elsewhere."
692.12257 +msgstr ""
692.12258 +
692.12259 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.12260 +#: ../en/ch10-hook.xml:35
692.12261 +msgid ""
692.12262 +"<literal role=\"hook\">commit</literal>: This is run after a new changeset "
692.12263 +"has been created in the local repository."
692.12264 +msgstr ""
692.12265 +
692.12266 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.12267 +#: ../en/ch10-hook.xml:39
692.12268 +msgid ""
692.12269 +"<literal role=\"hook\">incoming</literal>: This is run once for each new "
692.12270 +"changeset that is brought into the repository from elsewhere.  Notice the "
692.12271 +"difference from <literal role=\"hook\">changegroup</literal>, which is run "
692.12272 +"once per <emphasis>group</emphasis> of changesets brought in."
692.12273 +msgstr ""
692.12274 +
692.12275 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.12276 +#: ../en/ch10-hook.xml:46
692.12277 +msgid ""
692.12278 +"<literal role=\"hook\">outgoing</literal>: This is run after a group of "
692.12279 +"changesets has been transmitted from this repository."
692.12280 +msgstr ""
692.12281 +
692.12282 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.12283 +#: ../en/ch10-hook.xml:50
692.12284 +msgid ""
692.12285 +"<literal role=\"hook\">prechangegroup</literal>: This is run before starting "
692.12286 +"to bring a group of changesets into the repository."
692.12287 +msgstr ""
692.12288 +
692.12289 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.12290 +#: ../en/ch10-hook.xml:55
692.12291 +msgid ""
692.12292 +"<literal role=\"hook\">precommit</literal>: Controlling. This is run before "
692.12293 +"starting a commit."
692.12294 +msgstr ""
692.12295 +
692.12296 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.12297 +#: ../en/ch10-hook.xml:59
692.12298 +msgid ""
692.12299 +"<literal role=\"hook\">preoutgoing</literal>: Controlling. This is run before "
692.12300 +"starting to transmit a group of changesets from this repository."
692.12301 +msgstr ""
692.12302 +
692.12303 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.12304 +#: ../en/ch10-hook.xml:64
692.12305 +msgid ""
692.12306 +"<literal role=\"hook\">pretag</literal>: Controlling. This is run before "
692.12307 +"creating a tag."
692.12308 +msgstr ""
692.12309 +
692.12310 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.12311 +#: ../en/ch10-hook.xml:68
692.12312 +msgid ""
692.12313 +"<literal role=\"hook\">pretxnchangegroup</literal>: Controlling. This is run "
692.12314 +"after a group of changesets has been brought into the local repository from "
692.12315 +"another, but before the transaction completes that will make the changes "
692.12316 +"permanent in the repository."
692.12317 +msgstr ""
692.12318 +
692.12319 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.12320 +#: ../en/ch10-hook.xml:76
692.12321 +msgid ""
692.12322 +"<literal role=\"hook\">pretxncommit</literal>: Controlling. This is run after "
692.12323 +"a new changeset has been created in the local repository, but before the "
692.12324 +"transaction completes that will make it permanent."
692.12325 +msgstr ""
692.12326 +
692.12327 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.12328 +#: ../en/ch10-hook.xml:82
692.12329 +msgid ""
692.12330 +"<literal role=\"hook\">preupdate</literal>: Controlling. This is run before "
692.12331 +"starting an update or merge of the working directory."
692.12332 +msgstr ""
692.12333 +
692.12334 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.12335 +#: ../en/ch10-hook.xml:87
692.12336 +msgid ""
692.12337 +"<literal role=\"hook\">tag</literal>: This is run after a tag is created."
692.12338 +msgstr ""
692.12339 +
692.12340 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.12341 +#: ../en/ch10-hook.xml:91
692.12342 +msgid ""
692.12343 +"<literal role=\"hook\">update</literal>: This is run after an update or merge "
692.12344 +"of the working directory has finished."
692.12345 +msgstr ""
692.12346 +
692.12347 +#. type: Content of: <book><chapter><sect1><title>
692.12348 +#: ../en/ch10-hook.xml:99
692.12349 +msgid "Hooks and security"
692.12350 +msgstr "钩子与安全性"
692.12351 +
692.12352 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12353 +#: ../en/ch10-hook.xml:102
692.12354 +msgid "Hooks are run with your privileges"
692.12355 +msgstr "钩子以你的特权执行"
692.12356 +
692.12357 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12358 +#: ../en/ch10-hook.xml:104
692.12359 +msgid ""
692.12360 +"When you run a Mercurial command in a repository, and the command causes a "
692.12361 +"hook to run, that hook runs on <emphasis>your</emphasis> system, under "
692.12362 +"<emphasis>your</emphasis> user account, with <emphasis>your</emphasis> "
692.12363 +"privilege level.  Since hooks are arbitrary pieces of executable code, you "
692.12364 +"should treat them with an appropriate level of suspicion.  Do not install a "
692.12365 +"hook unless you are confident that you know who created it and what it does."
692.12366 +msgstr ""
692.12367 +
692.12368 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12369 +#: ../en/ch10-hook.xml:115
692.12370 +msgid ""
692.12371 +"In some cases, you may be exposed to hooks that you did not install "
692.12372 +"yourself.  If you work with Mercurial on an unfamiliar system, Mercurial will "
692.12373 +"run hooks defined in that system's global <filename role=\"special\">~/.hgrc</"
692.12374 +"filename> file."
692.12375 +msgstr ""
692.12376 +
692.12377 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12378 +#: ../en/ch10-hook.xml:122
692.12379 +msgid ""
692.12380 +"If you are working with a repository owned by another user, Mercurial can run "
692.12381 +"hooks defined in that user's repository, but it will still run them as "
692.12382 +"<quote>you</quote>.  For example, if you <command role=\"hg-cmd\">hg pull</"
692.12383 +"command> from that repository, and its <filename role=\"special\">.hg/hgrc</"
692.12384 +"filename> defines a local <literal role=\"hook\">outgoing</literal> hook, "
692.12385 +"that hook will run under your user account, even though you don't own that "
692.12386 +"repository."
692.12387 +msgstr ""
692.12388 +
692.12389 +#. type: Content of: <book><chapter><sect1><sect2><note><para>
692.12390 +#: ../en/ch10-hook.xml:134
692.12391 +msgid ""
692.12392 +"This only applies if you are pulling from a repository on a local or network "
692.12393 +"filesystem.  If you're pulling over http or ssh, any <literal role=\"hook"
692.12394 +"\">outgoing</literal> hook will run under whatever account is executing the "
692.12395 +"server process, on the server."
692.12396 +msgstr ""
692.12397 +
692.12398 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12399 +#: ../en/ch10-hook.xml:142
692.12400 +msgid ""
692.12401 +"To see what hooks are defined in a repository, use the <command role=\"hg-cmd"
692.12402 +"\">hg showconfig hooks</command> command.  If you are working in one "
692.12403 +"repository, but talking to another that you do not own (e.g. using <command "
692.12404 +"role=\"hg-cmd\">hg pull</command> or <command role=\"hg-cmd\">hg incoming</"
692.12405 +"command>), remember that it is the other repository's hooks you should be "
692.12406 +"checking, not your own."
692.12407 +msgstr ""
692.12408 +
692.12409 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12410 +#: ../en/ch10-hook.xml:153
692.12411 +msgid "Hooks do not propagate"
692.12412 +msgstr "钩子不会传播"
692.12413 +
692.12414 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12415 +#: ../en/ch10-hook.xml:155
692.12416 +msgid ""
692.12417 +"In Mercurial, hooks are not revision controlled, and do not propagate when "
692.12418 +"you clone, or pull from, a repository.  The reason for this is simple: a hook "
692.12419 +"is a completely arbitrary piece of executable code.  It runs under your user "
692.12420 +"identity, with your privilege level, on your machine."
692.12421 +msgstr ""
692.12422 +
692.12423 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12424 +#: ../en/ch10-hook.xml:162
692.12425 +msgid ""
692.12426 +"It would be extremely reckless for any distributed revision control system to "
692.12427 +"implement revision-controlled hooks, as this would offer an easily "
692.12428 +"exploitable way to subvert the accounts of users of the revision control "
692.12429 +"system."
692.12430 +msgstr ""
692.12431 +
692.12432 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12433 +#: ../en/ch10-hook.xml:168
692.12434 +msgid ""
692.12435 +"Since Mercurial does not propagate hooks, if you are collaborating with other "
692.12436 +"people on a common project, you should not assume that they are using the "
692.12437 +"same Mercurial hooks as you are, or that theirs are correctly configured.  "
692.12438 +"You should document the hooks you expect people to use."
692.12439 +msgstr ""
692.12440 +
692.12441 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12442 +#: ../en/ch10-hook.xml:175
692.12443 +msgid ""
692.12444 +"In a corporate intranet, this is somewhat easier to control, as you can for "
692.12445 +"example provide a <quote>standard</quote> installation of Mercurial on an NFS "
692.12446 +"filesystem, and use a site-wide <filename role=\"special\">~/.hgrc</filename> "
692.12447 +"file to define hooks that all users will see.  However, this too has its "
692.12448 +"limits; see below."
692.12449 +msgstr ""
692.12450 +
692.12451 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12452 +#: ../en/ch10-hook.xml:184
692.12453 +msgid "Hooks can be overridden"
692.12454 +msgstr "钩子可以被覆盖"
692.12455 +
692.12456 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12457 +#: ../en/ch10-hook.xml:186
692.12458 +msgid ""
692.12459 +"Mercurial allows you to override a hook definition by redefining the hook.  "
692.12460 +"You can disable it by setting its value to the empty string, or change its "
692.12461 +"behavior as you wish."
692.12462 +msgstr ""
692.12463 +
692.12464 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12465 +#: ../en/ch10-hook.xml:191
692.12466 +msgid ""
692.12467 +"If you deploy a system- or site-wide <filename role=\"special\">~/.hgrc</"
692.12468 +"filename> file that defines some hooks, you should thus understand that your "
692.12469 +"users can disable or override those hooks."
692.12470 +msgstr ""
692.12471 +
692.12472 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12473 +#: ../en/ch10-hook.xml:199
692.12474 +msgid "Ensuring that critical hooks are run"
692.12475 +msgstr "确保关键钩子的执行"
692.12476 +
692.12477 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12478 +#: ../en/ch10-hook.xml:201
692.12479 +msgid ""
692.12480 +"Sometimes you may want to enforce a policy that you do not want others to be "
692.12481 +"able to work around.  For example, you may have a requirement that every "
692.12482 +"changeset must pass a rigorous set of tests.  Defining this requirement via a "
692.12483 +"hook in a site-wide <filename role=\"special\">~/.hgrc</filename> won't work "
692.12484 +"for remote users on laptops, and of course local users can subvert it at will "
692.12485 +"by overriding the hook."
692.12486 +msgstr ""
692.12487 +
692.12488 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12489 +#: ../en/ch10-hook.xml:210
692.12490 +msgid ""
692.12491 +"Instead, you can set up your policies for use of Mercurial so that people are "
692.12492 +"expected to propagate changes through a well-known <quote>canonical</quote> "
692.12493 +"server that you have locked down and configured appropriately."
692.12494 +msgstr ""
692.12495 +
692.12496 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12497 +#: ../en/ch10-hook.xml:216
692.12498 +msgid ""
692.12499 +"One way to do this is via a combination of social engineering and "
692.12500 +"technology.  Set up a restricted-access account; users can push changes over "
692.12501 +"the network to repositories managed by this account, but they cannot log into "
692.12502 +"the account and run normal shell commands.  In this scenario, a user can "
692.12503 +"commit a changeset that contains any old garbage they want."
692.12504 +msgstr ""
692.12505 +
692.12506 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12507 +#: ../en/ch10-hook.xml:225
692.12508 +msgid ""
692.12509 +"When someone pushes a changeset to the server that everyone pulls from, the "
692.12510 +"server will test the changeset before it accepts it as permanent, and reject "
692.12511 +"it if it fails to pass the test suite.  If people only pull changes from this "
692.12512 +"filtering server, it will serve to ensure that all changes that people pull "
692.12513 +"have been automatically vetted."
692.12514 +msgstr ""
692.12515 +
692.12516 +#. type: Content of: <book><chapter><sect1><title>
692.12517 +#: ../en/ch10-hook.xml:237
692.12518 +msgid "A short tutorial on using hooks"
692.12519 +msgstr "使用钩子的简短指南"
692.12520 +
692.12521 +#. type: Content of: <book><chapter><sect1><para>
692.12522 +#: ../en/ch10-hook.xml:239
692.12523 +msgid ""
692.12524 +"It is easy to write a Mercurial hook.  Let's start with a hook that runs when "
692.12525 +"you finish a <command role=\"hg-cmd\">hg commit</command>, and simply prints "
692.12526 +"the hash of the changeset you just created.  The hook is called <literal role="
692.12527 +"\"hook\">commit</literal>."
692.12528 +msgstr ""
692.12529 +
692.12530 +#. type: Content of: <book><chapter><sect1><para>
692.12531 +#: ../en/ch10-hook.xml:246
692.12532 +msgid "All hooks follow the pattern in this example."
692.12533 +msgstr ""
692.12534 +
692.12535 +#. type: Content of: <book><chapter><sect1><para>
692.12536 +#: ../en/ch10-hook.xml:250
692.12537 +msgid ""
692.12538 +"You add an entry to the <literal role=\"rc-hooks\">hooks</literal> section of "
692.12539 +"your <filename role=\"special\">~/.hgrc</filename>.  On the left is the name "
692.12540 +"of the event to trigger on; on the right is the action to take.  As you can "
692.12541 +"see, you can run an arbitrary shell command in a hook.  Mercurial passes "
692.12542 +"extra information to the hook using environment variables (look for "
692.12543 +"<envar>HG_NODE</envar> in the example)."
692.12544 +msgstr ""
692.12545 +
692.12546 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12547 +#: ../en/ch10-hook.xml:260
692.12548 +msgid "Performing multiple actions per event"
692.12549 +msgstr "每个事件执行多个操作"
692.12550 +
692.12551 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12552 +#: ../en/ch10-hook.xml:262
692.12553 +msgid ""
692.12554 +"Quite often, you will want to define more than one hook for a particular kind "
692.12555 +"of event, as shown below."
692.12556 +msgstr ""
692.12557 +
692.12558 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12559 +#: ../en/ch10-hook.xml:267
692.12560 +msgid ""
692.12561 +"Mercurial lets you do this by adding an <emphasis>extension</emphasis> to the "
692.12562 +"end of a hook's name.  You extend a hook's name by giving the name of the "
692.12563 +"hook, followed by a full stop (the <quote><literal>.</literal></quote> "
692.12564 +"character), followed by some more text of your choosing.  For example, "
692.12565 +"Mercurial will run both <literal>commit.foo</literal> and <literal>commit."
692.12566 +"bar</literal> when the <literal>commit</literal> event occurs."
692.12567 +msgstr ""
692.12568 +
692.12569 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12570 +#: ../en/ch10-hook.xml:278
692.12571 +msgid ""
692.12572 +"To give a well-defined order of execution when there are multiple hooks "
692.12573 +"defined for an event, Mercurial sorts hooks by extension, and executes the "
692.12574 +"hook commands in this sorted order.  In the above example, it will execute "
692.12575 +"<literal>commit.bar</literal> before <literal>commit.foo</literal>, and "
692.12576 +"<literal>commit</literal> before both."
692.12577 +msgstr ""
692.12578 +
692.12579 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12580 +#: ../en/ch10-hook.xml:287
692.12581 +msgid ""
692.12582 +"It is a good idea to use a somewhat descriptive extension when you define a "
692.12583 +"new hook.  This will help you to remember what the hook was for.  If the hook "
692.12584 +"fails, you'll get an error message that contains the hook name and extension, "
692.12585 +"so using a descriptive extension could give you an immediate hint as to why "
692.12586 +"the hook failed (see <xref linkend=\"sec:hook:perm\"/> for an example)."
692.12587 +msgstr ""
692.12588 +
692.12589 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12590 +#: ../en/ch10-hook.xml:298
692.12591 +msgid "Controlling whether an activity can proceed"
692.12592 +msgstr "控制处理的活动"
692.12593 +
692.12594 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12595 +#: ../en/ch10-hook.xml:300
692.12596 +msgid ""
692.12597 +"In our earlier examples, we used the <literal role=\"hook\">commit</literal> "
692.12598 +"hook, which is run after a commit has completed.  This is one of several "
692.12599 +"Mercurial hooks that run after an activity finishes.  Such hooks have no way "
692.12600 +"of influencing the activity itself."
692.12601 +msgstr ""
692.12602 +
692.12603 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12604 +#: ../en/ch10-hook.xml:307
692.12605 +msgid ""
692.12606 +"Mercurial defines a number of events that occur before an activity starts; or "
692.12607 +"after it starts, but before it finishes.  Hooks that trigger on these events "
692.12608 +"have the added ability to choose whether the activity can continue, or will "
692.12609 +"abort."
692.12610 +msgstr ""
692.12611 +
692.12612 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12613 +#: ../en/ch10-hook.xml:313
692.12614 +msgid ""
692.12615 +"The <literal role=\"hook\">pretxncommit</literal> hook runs after a commit "
692.12616 +"has all but completed.  In other words, the metadata representing the "
692.12617 +"changeset has been written out to disk, but the transaction has not yet been "
692.12618 +"allowed to complete.  The <literal role=\"hook\">pretxncommit</literal> hook "
692.12619 +"has the ability to decide whether the transaction can complete, or must be "
692.12620 +"rolled back."
692.12621 +msgstr ""
692.12622 +
692.12623 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12624 +#: ../en/ch10-hook.xml:322
692.12625 +msgid ""
692.12626 +"If the <literal role=\"hook\">pretxncommit</literal> hook exits with a status "
692.12627 +"code of zero, the transaction is allowed to complete; the commit finishes; "
692.12628 +"and the <literal role=\"hook\">commit</literal> hook is run.  If the <literal "
692.12629 +"role=\"hook\">pretxncommit</literal> hook exits with a non-zero status code, "
692.12630 +"the transaction is rolled back; the metadata representing the changeset is "
692.12631 +"erased; and the <literal role=\"hook\">commit</literal> hook is not run."
692.12632 +msgstr ""
692.12633 +
692.12634 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12635 +#: ../en/ch10-hook.xml:334
692.12636 +msgid ""
692.12637 +"The hook in the example above checks that a commit comment contains a bug "
692.12638 +"ID.  If it does, the commit can complete.  If not, the commit is rolled back."
692.12639 +msgstr ""
692.12640 +
692.12641 +#. type: Content of: <book><chapter><sect1><title>
692.12642 +#: ../en/ch10-hook.xml:342
692.12643 +msgid "Writing your own hooks"
692.12644 +msgstr "编写钩子"
692.12645 +
692.12646 +#. type: Content of: <book><chapter><sect1><para>
692.12647 +#: ../en/ch10-hook.xml:344
692.12648 +msgid ""
692.12649 +"When you are writing a hook, you might find it useful to run Mercurial either "
692.12650 +"with the <option role=\"hg-opt-global\">-v</option> option, or the <envar "
692.12651 +"role=\"rc-item-ui\">verbose</envar> config item set to <quote>true</quote>.  "
692.12652 +"When you do so, Mercurial will print a message before it calls each hook."
692.12653 +msgstr ""
692.12654 +
692.12655 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12656 +#: ../en/ch10-hook.xml:353
692.12657 +msgid "Choosing how your hook should run"
692.12658 +msgstr "选择钩子的执行方式"
692.12659 +
692.12660 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12661 +#: ../en/ch10-hook.xml:355
692.12662 +msgid ""
692.12663 +"You can write a hook either as a normal program&emdash;typically a shell "
692.12664 +"script&emdash;or as a Python function that is executed within the Mercurial "
692.12665 +"process."
692.12666 +msgstr ""
692.12667 +
692.12668 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12669 +#: ../en/ch10-hook.xml:360
692.12670 +msgid ""
692.12671 +"Writing a hook as an external program has the advantage that it requires no "
692.12672 +"knowledge of Mercurial's internals.  You can call normal Mercurial commands "
692.12673 +"to get any added information you need.  The trade-off is that external hooks "
692.12674 +"are slower than in-process hooks."
692.12675 +msgstr ""
692.12676 +
692.12677 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12678 +#: ../en/ch10-hook.xml:367
692.12679 +msgid ""
692.12680 +"An in-process Python hook has complete access to the Mercurial API, and does "
692.12681 +"not <quote>shell out</quote> to another process, so it is inherently faster "
692.12682 +"than an external hook.  It is also easier to obtain much of the information "
692.12683 +"that a hook requires by using the Mercurial API than by running Mercurial "
692.12684 +"commands."
692.12685 +msgstr ""
692.12686 +
692.12687 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12688 +#: ../en/ch10-hook.xml:375
692.12689 +msgid ""
692.12690 +"If you are comfortable with Python, or require high performance, writing your "
692.12691 +"hooks in Python may be a good choice.  However, when you have a "
692.12692 +"straightforward hook to write and you don't need to care about performance "
692.12693 +"(probably the majority of hooks), a shell script is perfectly fine."
692.12694 +msgstr ""
692.12695 +
692.12696 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12697 +#: ../en/ch10-hook.xml:384
692.12698 +msgid "Hook parameters"
692.12699 +msgstr "钩子的参数"
692.12700 +
692.12701 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12702 +#: ../en/ch10-hook.xml:386
692.12703 +msgid ""
692.12704 +"Mercurial calls each hook with a set of well-defined parameters.  In Python, "
692.12705 +"a parameter is passed as a keyword argument to your hook function.  For an "
692.12706 +"external program, a parameter is passed as an environment variable."
692.12707 +msgstr ""
692.12708 +
692.12709 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12710 +#: ../en/ch10-hook.xml:392
692.12711 +msgid ""
692.12712 +"Whether your hook is written in Python or as a shell script, the hook-"
692.12713 +"specific parameter names and values will be the same.  A boolean parameter "
692.12714 +"will be represented as a boolean value in Python, but as the number 1 (for "
692.12715 +"<quote>true</quote>) or 0 (for <quote>false</quote>) as an environment "
692.12716 +"variable for an external hook.  If a hook parameter is named <literal>foo</"
692.12717 +"literal>, the keyword argument for a Python hook will also be named "
692.12718 +"<literal>foo</literal>, while the environment variable for an external hook "
692.12719 +"will be named <literal>HG_FOO</literal>."
692.12720 +msgstr ""
692.12721 +
692.12722 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12723 +#: ../en/ch10-hook.xml:406
692.12724 +msgid "Hook return values and activity control"
692.12725 +msgstr "钩子的返回值与活动控制"
692.12726 +
692.12727 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12728 +#: ../en/ch10-hook.xml:408
692.12729 +msgid ""
692.12730 +"A hook that executes successfully must exit with a status of zero if "
692.12731 +"external, or return boolean <quote>false</quote> if in-process.  Failure is "
692.12732 +"indicated with a non-zero exit status from an external hook, or an in-process "
692.12733 +"hook returning boolean <quote>true</quote>.  If an in-process hook raises an "
692.12734 +"exception, the hook is considered to have failed."
692.12735 +msgstr ""
692.12736 +
692.12737 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12738 +#: ../en/ch10-hook.xml:416
692.12739 +msgid ""
692.12740 +"For a hook that controls whether an activity can proceed, zero/false means "
692.12741 +"<quote>allow</quote>, while non-zero/true/exception means <quote>deny</quote>."
692.12742 +msgstr ""
692.12743 +
692.12744 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12745 +#: ../en/ch10-hook.xml:423
692.12746 +msgid "Writing an external hook"
692.12747 +msgstr "编写外部钩子"
692.12748 +
692.12749 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12750 +#: ../en/ch10-hook.xml:425
692.12751 +msgid ""
692.12752 +"When you define an external hook in your <filename role=\"special\">~/.hgrc</"
692.12753 +"filename> and the hook is run, its value is passed to your shell, which "
692.12754 +"interprets it.  This means that you can use normal shell constructs in the "
692.12755 +"body of the hook."
692.12756 +msgstr ""
692.12757 +
692.12758 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12759 +#: ../en/ch10-hook.xml:432
692.12760 +msgid ""
692.12761 +"An executable hook is always run with its current directory set to a "
692.12762 +"repository's root directory."
692.12763 +msgstr ""
692.12764 +
692.12765 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12766 +#: ../en/ch10-hook.xml:436
692.12767 +msgid ""
692.12768 +"Each hook parameter is passed in as an environment variable; the name is "
692.12769 +"upper-cased, and prefixed with the string <quote><literal>HG_</literal></"
692.12770 +"quote>."
692.12771 +msgstr ""
692.12772 +
692.12773 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12774 +#: ../en/ch10-hook.xml:441
692.12775 +msgid ""
692.12776 +"With the exception of hook parameters, Mercurial does not set or modify any "
692.12777 +"environment variables when running a hook.  This is useful to remember if you "
692.12778 +"are writing a site-wide hook that may be run by a number of different users "
692.12779 +"with differing environment variables set. In multi-user situations, you "
692.12780 +"should not rely on environment variables being set to the values you have in "
692.12781 +"your environment when testing the hook."
692.12782 +msgstr ""
692.12783 +
692.12784 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12785 +#: ../en/ch10-hook.xml:452
692.12786 +msgid "Telling Mercurial to use an in-process hook"
692.12787 +msgstr "让 Mercurial 使用进程内钩子"
692.12788 +
692.12789 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12790 +#: ../en/ch10-hook.xml:454
692.12791 +msgid ""
692.12792 +"The <filename role=\"special\">~/.hgrc</filename> syntax for defining an in-"
692.12793 +"process hook is slightly different than for an executable hook.  The value of "
692.12794 +"the hook must start with the text <quote><literal>python:</literal></quote>, "
692.12795 +"and continue with the fully-qualified name of a callable object to use as the "
692.12796 +"hook's value."
692.12797 +msgstr ""
692.12798 +
692.12799 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12800 +#: ../en/ch10-hook.xml:462
692.12801 +msgid ""
692.12802 +"The module in which a hook lives is automatically imported when a hook is "
692.12803 +"run.  So long as you have the module name and <envar>PYTHONPATH</envar> "
692.12804 +"right, it should <quote>just work</quote>."
692.12805 +msgstr ""
692.12806 +
692.12807 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12808 +#: ../en/ch10-hook.xml:468
692.12809 +msgid ""
692.12810 +"The following <filename role=\"special\">~/.hgrc</filename> example snippet "
692.12811 +"illustrates the syntax and meaning of the notions we just described."
692.12812 +msgstr ""
692.12813 +
692.12814 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12815 +#: ../en/ch10-hook.xml:474
692.12816 +msgid ""
692.12817 +"When Mercurial runs the <literal>commit.example</literal> hook, it imports "
692.12818 +"<literal>mymodule.submodule</literal>, looks for the callable object named "
692.12819 +"<literal>myhook</literal>, and calls it."
692.12820 +msgstr ""
692.12821 +
692.12822 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12823 +#: ../en/ch10-hook.xml:482
692.12824 +msgid "Writing an in-process hook"
692.12825 +msgstr "编写进程内钩子"
692.12826 +
692.12827 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12828 +#: ../en/ch10-hook.xml:484
692.12829 +msgid ""
692.12830 +"The simplest in-process hook does nothing, but illustrates the basic shape of "
692.12831 +"the hook API:"
692.12832 +msgstr ""
692.12833 +
692.12834 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12835 +#: ../en/ch10-hook.xml:489
692.12836 +msgid ""
692.12837 +"The first argument to a Python hook is always a <literal role=\"py-mod-"
692.12838 +"mercurial.ui\">ui</literal> object.  The second is a repository object; at "
692.12839 +"the moment, it is always an instance of <literal role=\"py-mod-mercurial."
692.12840 +"localrepo\">localrepository</literal>.  Following these two arguments are "
692.12841 +"other keyword arguments.  Which ones are passed in depends on the hook being "
692.12842 +"called, but a hook can ignore arguments it doesn't care about by dropping "
692.12843 +"them into a keyword argument dict, as with <literal>**kwargs</literal> above."
692.12844 +msgstr ""
692.12845 +
692.12846 +#. type: Content of: <book><chapter><sect1><title>
692.12847 +#: ../en/ch10-hook.xml:504
692.12848 +msgid "Some hook examples"
692.12849 +msgstr "钩子样例"
692.12850 +
692.12851 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12852 +#: ../en/ch10-hook.xml:507
692.12853 +msgid "Writing meaningful commit messages"
692.12854 +msgstr "编写有意义的提交日志"
692.12855 +
692.12856 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12857 +#: ../en/ch10-hook.xml:509
692.12858 +msgid ""
692.12859 +"It's hard to imagine a useful commit message being very short. The simple "
692.12860 +"<literal role=\"hook\">pretxncommit</literal> hook of the example below will "
692.12861 +"prevent you from committing a changeset with a message that is less than ten "
692.12862 +"bytes long."
692.12863 +msgstr ""
692.12864 +
692.12865 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12866 +#: ../en/ch10-hook.xml:519
692.12867 +msgid "Checking for trailing whitespace"
692.12868 +msgstr "检查行尾空格"
692.12869 +
692.12870 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12871 +#: ../en/ch10-hook.xml:521
692.12872 +msgid ""
692.12873 +"An interesting use of a commit-related hook is to help you to write cleaner "
692.12874 +"code.  A simple example of <quote>cleaner code</quote> is the dictum that a "
692.12875 +"change should not add any new lines of text that contain <quote>trailing "
692.12876 +"whitespace</quote>.  Trailing whitespace is a series of space and tab "
692.12877 +"characters at the end of a line of text.  In most cases, trailing whitespace "
692.12878 +"is unnecessary, invisible noise, but it is occasionally problematic, and "
692.12879 +"people often prefer to get rid of it."
692.12880 +msgstr ""
692.12881 +
692.12882 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12883 +#: ../en/ch10-hook.xml:532
692.12884 +msgid ""
692.12885 +"You can use either the <literal role=\"hook\">precommit</literal> or <literal "
692.12886 +"role=\"hook\">pretxncommit</literal> hook to tell whether you have a trailing "
692.12887 +"whitespace problem.  If you use the <literal role=\"hook\">precommit</"
692.12888 +"literal> hook, the hook will not know which files you are committing, so it "
692.12889 +"will have to check every modified file in the repository for trailing white "
692.12890 +"space.  If you want to commit a change to just the file <filename>foo</"
692.12891 +"filename>, but the file <filename>bar</filename> contains trailing "
692.12892 +"whitespace, doing a check in the <literal role=\"hook\">precommit</literal> "
692.12893 +"hook will prevent you from committing <filename>foo</filename> due to the "
692.12894 +"problem with <filename>bar</filename>.  This doesn't seem right."
692.12895 +msgstr ""
692.12896 +
692.12897 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12898 +#: ../en/ch10-hook.xml:548
692.12899 +msgid ""
692.12900 +"Should you choose the <literal role=\"hook\">pretxncommit</literal> hook, the "
692.12901 +"check won't occur until just before the transaction for the commit "
692.12902 +"completes.  This will allow you to check for problems only the exact files "
692.12903 +"that are being committed.  However, if you entered the commit message "
692.12904 +"interactively and the hook fails, the transaction will roll back; you'll have "
692.12905 +"to re-enter the commit message after you fix the trailing whitespace and run "
692.12906 +"<command role=\"hg-cmd\">hg commit</command> again."
692.12907 +msgstr ""
692.12908 +
692.12909 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12910 +#: ../en/ch10-hook.xml:561
692.12911 +msgid ""
692.12912 +"In this example, we introduce a simple <literal role=\"hook\">pretxncommit</"
692.12913 +"literal> hook that checks for trailing whitespace.  This hook is short, but "
692.12914 +"not very helpful.  It exits with an error status if a change adds a line with "
692.12915 +"trailing whitespace to any file, but does not print any information that "
692.12916 +"might help us to identify the offending file or line.  It also has the nice "
692.12917 +"property of not paying attention to unmodified lines; only lines that "
692.12918 +"introduce new trailing whitespace cause problems."
692.12919 +msgstr ""
692.12920 +
692.12921 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12922 +#: ../en/ch10-hook.xml:574
692.12923 +msgid ""
692.12924 +"The above version is much more complex, but also more useful.  It parses a "
692.12925 +"unified diff to see if any lines add trailing whitespace, and prints the name "
692.12926 +"of the file and the line number of each such occurrence.  Even better, if the "
692.12927 +"change adds trailing whitespace, this hook saves the commit comment and "
692.12928 +"prints the name of the save file before exiting and telling Mercurial to roll "
692.12929 +"the transaction back, so you can use the <option role=\"hg-opt-commit\">-l "
692.12930 +"filename</option> option to <command role=\"hg-cmd\">hg commit</command> to "
692.12931 +"reuse the saved commit message once you've corrected the problem."
692.12932 +msgstr ""
692.12933 +
692.12934 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12935 +#: ../en/ch10-hook.xml:588
692.12936 +msgid ""
692.12937 +"As a final aside, note in the example above the use of <command>sed</"
692.12938 +"command>'s in-place editing feature to get rid of trailing whitespace from a "
692.12939 +"file.  This is concise and useful enough that I will reproduce it here (using "
692.12940 +"<command>perl</command> for good measure)."
692.12941 +msgstr ""
692.12942 +
692.12943 +#. type: Content of: <book><chapter><sect1><title>
692.12944 +#: ../en/ch10-hook.xml:598
692.12945 +msgid "Bundled hooks"
692.12946 +msgstr "内置的钩子"
692.12947 +
692.12948 +#. type: Content of: <book><chapter><sect1><para>
692.12949 +#: ../en/ch10-hook.xml:600
692.12950 +msgid ""
692.12951 +"Mercurial ships with several bundled hooks.  You can find them in the "
692.12952 +"<filename class=\"directory\">hgext</filename> directory of a Mercurial "
692.12953 +"source tree.  If you are using a Mercurial binary package, the hooks will be "
692.12954 +"located in the <filename class=\"directory\">hgext</filename> directory of "
692.12955 +"wherever your package installer put Mercurial."
692.12956 +msgstr ""
692.12957 +
692.12958 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.12959 +#: ../en/ch10-hook.xml:609
692.12960 +msgid ""
692.12961 +"<literal role=\"hg-ext\">acl</literal>&emdash;access control for parts of a "
692.12962 +"repository"
692.12963 +msgstr "<literal role=\"hg-ext\">acl</literal>—版本库的访问控制"
692.12964 +
692.12965 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12966 +#: ../en/ch10-hook.xml:612
692.12967 +msgid ""
692.12968 +"The <literal role=\"hg-ext\">acl</literal> extension lets you control which "
692.12969 +"remote users are allowed to push changesets to a networked server.  You can "
692.12970 +"protect any portion of a repository (including the entire repo), so that a "
692.12971 +"specific remote user can push changes that do not affect the protected "
692.12972 +"portion."
692.12973 +msgstr ""
692.12974 +
692.12975 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.12976 +#: ../en/ch10-hook.xml:620
692.12977 +msgid ""
692.12978 +"This extension implements access control based on the identity of the user "
692.12979 +"performing a push, <emphasis>not</emphasis> on who committed the changesets "
692.12980 +"they're pushing.  It makes sense to use this hook only if you have a locked-"
692.12981 +"down server environment that authenticates remote users, and you want to be "
692.12982 +"sure that only specific users are allowed to push changes to that server."
692.12983 +msgstr ""
692.12984 +
692.12985 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.12986 +#: ../en/ch10-hook.xml:630
692.12987 +msgid "Configuring the <literal role=\"hook\">acl</literal> hook"
692.12988 +msgstr "配置 <literal role=\"hook\">acl</literal> 钩子"
692.12989 +
692.12990 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.12991 +#: ../en/ch10-hook.xml:633
692.12992 +msgid ""
692.12993 +"In order to manage incoming changesets, the <literal role=\"hg-ext\">acl</"
692.12994 +"literal> hook must be used as a <literal role=\"hook\">pretxnchangegroup</"
692.12995 +"literal> hook.  This lets it see which files are modified by each incoming "
692.12996 +"changeset, and roll back a group of changesets if they modify "
692.12997 +"<quote>forbidden</quote> files.  Example:"
692.12998 +msgstr ""
692.12999 +
692.13000 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13001 +#: ../en/ch10-hook.xml:643
692.13002 +msgid ""
692.13003 +"The <literal role=\"hg-ext\">acl</literal> extension is configured using "
692.13004 +"three sections."
692.13005 +msgstr ""
692.13006 +
692.13007 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13008 +#: ../en/ch10-hook.xml:647
692.13009 +msgid ""
692.13010 +"The <literal role=\"rc-acl\">acl</literal> section has only one entry, <envar "
692.13011 +"role=\"rc-item-acl\">sources</envar>, which lists the sources of incoming "
692.13012 +"changesets that the hook should pay attention to.  You don't normally need to "
692.13013 +"configure this section."
692.13014 +msgstr ""
692.13015 +
692.13016 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13017 +#: ../en/ch10-hook.xml:654
692.13018 +msgid ""
692.13019 +"<envar role=\"rc-item-acl\">serve</envar>: Control incoming changesets that "
692.13020 +"are arriving from a remote repository over http or ssh.  This is the default "
692.13021 +"value of <envar role=\"rc-item-acl\">sources</envar>, and usually the only "
692.13022 +"setting you'll need for this configuration item."
692.13023 +msgstr ""
692.13024 +
692.13025 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13026 +#: ../en/ch10-hook.xml:662
692.13027 +msgid ""
692.13028 +"<envar role=\"rc-item-acl\">pull</envar>: Control incoming changesets that "
692.13029 +"are arriving via a pull from a local repository."
692.13030 +msgstr ""
692.13031 +
692.13032 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13033 +#: ../en/ch10-hook.xml:667
692.13034 +msgid ""
692.13035 +"<envar role=\"rc-item-acl\">push</envar>: Control incoming changesets that "
692.13036 +"are arriving via a push from a local repository."
692.13037 +msgstr ""
692.13038 +
692.13039 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13040 +#: ../en/ch10-hook.xml:672
692.13041 +msgid ""
692.13042 +"<envar role=\"rc-item-acl\">bundle</envar>: Control incoming changesets that "
692.13043 +"are arriving from another repository via a bundle."
692.13044 +msgstr ""
692.13045 +
692.13046 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13047 +#: ../en/ch10-hook.xml:678
692.13048 +msgid ""
692.13049 +"The <literal role=\"rc-acl.allow\">acl.allow</literal> section controls the "
692.13050 +"users that are allowed to add changesets to the repository.  If this section "
692.13051 +"is not present, all users that are not explicitly denied are allowed.  If "
692.13052 +"this section is present, all users that are not explicitly allowed are denied "
692.13053 +"(so an empty section means that all users are denied)."
692.13054 +msgstr ""
692.13055 +
692.13056 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13057 +#: ../en/ch10-hook.xml:687
692.13058 +msgid ""
692.13059 +"The <literal role=\"rc-acl.deny\">acl.deny</literal> section determines which "
692.13060 +"users are denied from adding changesets to the repository.  If this section "
692.13061 +"is not present or is empty, no users are denied."
692.13062 +msgstr ""
692.13063 +
692.13064 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13065 +#: ../en/ch10-hook.xml:693
692.13066 +msgid ""
692.13067 +"The syntaxes for the <literal role=\"rc-acl.allow\">acl.allow</literal> and "
692.13068 +"<literal role=\"rc-acl.deny\">acl.deny</literal> sections are identical.  On "
692.13069 +"the left of each entry is a glob pattern that matches files or directories, "
692.13070 +"relative to the root of the repository; on the right, a user name."
692.13071 +msgstr ""
692.13072 +
692.13073 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13074 +#: ../en/ch10-hook.xml:701
692.13075 +msgid ""
692.13076 +"In the following example, the user <literal>docwriter</literal> can only push "
692.13077 +"changes to the <filename class=\"directory\">docs</filename> subtree of the "
692.13078 +"repository, while <literal>intern</literal> can push changes to any file or "
692.13079 +"directory except <filename class=\"directory\">source/sensitive</filename>."
692.13080 +msgstr ""
692.13081 +
692.13082 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.13083 +#: ../en/ch10-hook.xml:715 ../en/ch10-hook.xml:979 ../en/ch10-hook.xml:1169
692.13084 +msgid "Testing and troubleshooting"
692.13085 +msgstr "测试与问题处理"
692.13086 +
692.13087 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13088 +#: ../en/ch10-hook.xml:717
692.13089 +msgid ""
692.13090 +"If you want to test the <literal role=\"hg-ext\">acl</literal> hook, run it "
692.13091 +"with Mercurial's debugging output enabled.  Since you'll probably be running "
692.13092 +"it on a server where it's not convenient (or sometimes possible) to pass in "
692.13093 +"the <option role=\"hg-opt-global\">--debug</option> option, don't forget that "
692.13094 +"you can enable debugging output in your <filename role=\"special\">~/.hgrc</"
692.13095 +"filename>:"
692.13096 +msgstr ""
692.13097 +
692.13098 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13099 +#: ../en/ch10-hook.xml:728
692.13100 +msgid ""
692.13101 +"With this enabled, the <literal role=\"hg-ext\">acl</literal> hook will print "
692.13102 +"enough information to let you figure out why it is allowing or forbidding "
692.13103 +"pushes from specific users."
692.13104 +msgstr ""
692.13105 +
692.13106 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.13107 +#: ../en/ch10-hook.xml:737
692.13108 +msgid ""
692.13109 +"<literal role=\"hg-ext\">bugzilla</literal>&emdash;integration with Bugzilla"
692.13110 +msgstr "<literal role=\"hg-ext\">bugzilla</literal>—与 Bugzilla 的集成"
692.13111 +
692.13112 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13113 +#: ../en/ch10-hook.xml:741
692.13114 +msgid ""
692.13115 +"The <literal role=\"hg-ext\">bugzilla</literal> extension adds a comment to a "
692.13116 +"Bugzilla bug whenever it finds a reference to that bug ID in a commit "
692.13117 +"comment.  You can install this hook on a shared server, so that any time a "
692.13118 +"remote user pushes changes to this server, the hook gets run."
692.13119 +msgstr ""
692.13120 +
692.13121 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13122 +#: ../en/ch10-hook.xml:748
692.13123 +msgid ""
692.13124 +"It adds a comment to the bug that looks like this (you can configure the "
692.13125 +"contents of the comment&emdash;see below):"
692.13126 +msgstr ""
692.13127 +
692.13128 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13129 +#: ../en/ch10-hook.xml:757
692.13130 +msgid ""
692.13131 +"The value of this hook is that it automates the process of updating a bug any "
692.13132 +"time a changeset refers to it.  If you configure the hook properly, it makes "
692.13133 +"it easy for people to browse straight from a Bugzilla bug to a changeset that "
692.13134 +"refers to that bug."
692.13135 +msgstr ""
692.13136 +
692.13137 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13138 +#: ../en/ch10-hook.xml:764
692.13139 +msgid ""
692.13140 +"You can use the code in this hook as a starting point for some more exotic "
692.13141 +"Bugzilla integration recipes.  Here are a few possibilities:"
692.13142 +msgstr ""
692.13143 +
692.13144 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13145 +#: ../en/ch10-hook.xml:769
692.13146 +msgid ""
692.13147 +"Require that every changeset pushed to the server have a valid bug ID in its "
692.13148 +"commit comment.  In this case, you'd want to configure the hook as a <literal "
692.13149 +"role=\"hook\">pretxncommit</literal> hook.  This would allow the hook to "
692.13150 +"reject changes that didn't contain bug IDs."
692.13151 +msgstr ""
692.13152 +
692.13153 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13154 +#: ../en/ch10-hook.xml:777
692.13155 +msgid ""
692.13156 +"Allow incoming changesets to automatically modify the <emphasis>state</"
692.13157 +"emphasis> of a bug, as well as simply adding a comment.  For example, the "
692.13158 +"hook could recognise the string <quote>fixed bug 31337</quote> as indicating "
692.13159 +"that it should update the state of bug 31337 to <quote>requires testing</"
692.13160 +"quote>."
692.13161 +msgstr ""
692.13162 +
692.13163 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.13164 +#: ../en/ch10-hook.xml:787
692.13165 +msgid "Configuring the <literal role=\"hook\">bugzilla</literal> hook"
692.13166 +msgstr "配置 <literal role=\"hook\">bugzilla</literal> 钩子"
692.13167 +
692.13168 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13169 +#: ../en/ch10-hook.xml:790
692.13170 +msgid ""
692.13171 +"You should configure this hook in your server's <filename role=\"special\">~/."
692.13172 +"hgrc</filename> as an <literal role=\"hook\">incoming</literal> hook, for "
692.13173 +"example as follows:"
692.13174 +msgstr ""
692.13175 +
692.13176 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13177 +#: ../en/ch10-hook.xml:798
692.13178 +msgid ""
692.13179 +"Because of the specialised nature of this hook, and because Bugzilla was not "
692.13180 +"written with this kind of integration in mind, configuring this hook is a "
692.13181 +"somewhat involved process."
692.13182 +msgstr ""
692.13183 +
692.13184 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13185 +#: ../en/ch10-hook.xml:804
692.13186 +msgid ""
692.13187 +"Before you begin, you must install the MySQL bindings for Python on the host"
692.13188 +"(s) where you'll be running the hook.  If this is not available as a binary "
692.13189 +"package for your system, you can download it from <citation>web:mysql-python</"
692.13190 +"citation>."
692.13191 +msgstr ""
692.13192 +
692.13193 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13194 +#: ../en/ch10-hook.xml:811
692.13195 +msgid ""
692.13196 +"Configuration information for this hook lives in the <literal role=\"rc-"
692.13197 +"bugzilla\">bugzilla</literal> section of your <filename role=\"special\">~/."
692.13198 +"hgrc</filename>."
692.13199 +msgstr ""
692.13200 +
692.13201 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13202 +#: ../en/ch10-hook.xml:816
692.13203 +msgid ""
692.13204 +"<envar role=\"rc-item-bugzilla\">version</envar>: The version of Bugzilla "
692.13205 +"installed on the server.  The database schema that Bugzilla uses changes "
692.13206 +"occasionally, so this hook has to know exactly which schema to use."
692.13207 +msgstr ""
692.13208 +
692.13209 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13210 +#: ../en/ch10-hook.xml:822
692.13211 +msgid ""
692.13212 +"<envar role=\"rc-item-bugzilla\">host</envar>: The hostname of the MySQL "
692.13213 +"server that stores your Bugzilla data.  The database must be configured to "
692.13214 +"allow connections from whatever host you are running the <literal role=\"hook"
692.13215 +"\">bugzilla</literal> hook on."
692.13216 +msgstr ""
692.13217 +
692.13218 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13219 +#: ../en/ch10-hook.xml:829
692.13220 +msgid ""
692.13221 +"<envar role=\"rc-item-bugzilla\">user</envar>: The username with which to "
692.13222 +"connect to the MySQL server.  The database must be configured to allow this "
692.13223 +"user to connect from whatever host you are running the <literal role=\"hook"
692.13224 +"\">bugzilla</literal> hook on.  This user must be able to access and modify "
692.13225 +"Bugzilla tables.  The default value of this item is <literal>bugs</literal>, "
692.13226 +"which is the standard name of the Bugzilla user in a MySQL database."
692.13227 +msgstr ""
692.13228 +
692.13229 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13230 +#: ../en/ch10-hook.xml:840
692.13231 +msgid ""
692.13232 +"<envar role=\"rc-item-bugzilla\">password</envar>: The MySQL password for the "
692.13233 +"user you configured above.  This is stored as plain text, so you should make "
692.13234 +"sure that unauthorised users cannot read the <filename role=\"special\">~/."
692.13235 +"hgrc</filename> file where you store this information."
692.13236 +msgstr ""
692.13237 +
692.13238 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13239 +#: ../en/ch10-hook.xml:849
692.13240 +msgid ""
692.13241 +"<envar role=\"rc-item-bugzilla\">db</envar>: The name of the Bugzilla "
692.13242 +"database on the MySQL server.  The default value of this item is "
692.13243 +"<literal>bugs</literal>, which is the standard name of the MySQL database "
692.13244 +"where Bugzilla stores its data."
692.13245 +msgstr ""
692.13246 +
692.13247 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13248 +#: ../en/ch10-hook.xml:856
692.13249 +msgid ""
692.13250 +"<envar role=\"rc-item-bugzilla\">notify</envar>: If you want Bugzilla to send "
692.13251 +"out a notification email to subscribers after this hook has added a comment "
692.13252 +"to a bug, you will need this hook to run a command whenever it updates the "
692.13253 +"database.  The command to run depends on where you have installed Bugzilla, "
692.13254 +"but it will typically look something like this, if you have Bugzilla "
692.13255 +"installed in <filename class=\"directory\">/var/www/html/bugzilla</filename>:"
692.13256 +msgstr ""
692.13257 +
692.13258 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13259 +#: ../en/ch10-hook.xml:869
692.13260 +msgid ""
692.13261 +"The Bugzilla <literal>processmail</literal> program expects to be given a bug "
692.13262 +"ID (the hook replaces <quote><literal>%s</literal></quote> with the bug ID)  "
692.13263 +"and an email address.  It also expects to be able to write to some files in "
692.13264 +"the directory that it runs in.  If Bugzilla and this hook are not installed "
692.13265 +"on the same machine, you will need to find a way to run <literal>processmail</"
692.13266 +"literal> on the server where Bugzilla is installed."
692.13267 +msgstr ""
692.13268 +
692.13269 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.13270 +#: ../en/ch10-hook.xml:884
692.13271 +msgid "Mapping committer names to Bugzilla user names"
692.13272 +msgstr "提交者的名称与 Bugzilla 用户名称的映射"
692.13273 +
692.13274 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13275 +#: ../en/ch10-hook.xml:886
692.13276 +msgid ""
692.13277 +"By default, the <literal role=\"hg-ext\">bugzilla</literal> hook tries to use "
692.13278 +"the email address of a changeset's committer as the Bugzilla user name with "
692.13279 +"which to update a bug.  If this does not suit your needs, you can map "
692.13280 +"committer email addresses to Bugzilla user names using a <literal role=\"rc-"
692.13281 +"usermap\">usermap</literal> section."
692.13282 +msgstr ""
692.13283 +
692.13284 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13285 +#: ../en/ch10-hook.xml:895
692.13286 +msgid ""
692.13287 +"Each item in the <literal role=\"rc-usermap\">usermap</literal> section "
692.13288 +"contains an email address on the left, and a Bugzilla user name on the right."
692.13289 +msgstr ""
692.13290 +
692.13291 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13292 +#: ../en/ch10-hook.xml:902
692.13293 +msgid ""
692.13294 +"You can either keep the <literal role=\"rc-usermap\">usermap</literal> data "
692.13295 +"in a normal <filename role=\"special\">~/.hgrc</filename>, or tell the "
692.13296 +"<literal role=\"hg-ext\">bugzilla</literal> hook to read the information from "
692.13297 +"an external <filename>usermap</filename> file.  In the latter case, you can "
692.13298 +"store <filename>usermap</filename> data by itself in (for example)  a user-"
692.13299 +"modifiable repository.  This makes it possible to let your users maintain "
692.13300 +"their own <envar role=\"rc-item-bugzilla\">usermap</envar> entries.  The main "
692.13301 +"<filename role=\"special\">~/.hgrc</filename> file might look like this:"
692.13302 +msgstr ""
692.13303 +
692.13304 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13305 +#: ../en/ch10-hook.xml:918
692.13306 +msgid ""
692.13307 +"While the <filename>usermap</filename> file that it refers to might look like "
692.13308 +"this:"
692.13309 +msgstr ""
692.13310 +
692.13311 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.13312 +#: ../en/ch10-hook.xml:926
692.13313 +msgid "Configuring the text that gets added to a bug"
692.13314 +msgstr "配置增加到问题中的正文"
692.13315 +
692.13316 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13317 +#: ../en/ch10-hook.xml:928
692.13318 +msgid ""
692.13319 +"You can configure the text that this hook adds as a comment; you specify it "
692.13320 +"in the form of a Mercurial template.  Several <filename role=\"special\">~/."
692.13321 +"hgrc</filename> entries (still in the <literal role=\"rc-bugzilla\">bugzilla</"
692.13322 +"literal> section) control this behavior."
692.13323 +msgstr ""
692.13324 +
692.13325 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13326 +#: ../en/ch10-hook.xml:935
692.13327 +msgid ""
692.13328 +"<literal>strip</literal>: The number of leading path elements to strip from a "
692.13329 +"repository's path name to construct a partial path for a URL. For example, if "
692.13330 +"the repositories on your server live under <filename class=\"directory\">/"
692.13331 +"home/hg/repos</filename>, and you have a repository whose path is <filename "
692.13332 +"class=\"directory\">/home/hg/repos/app/tests</filename>, then setting "
692.13333 +"<literal>strip</literal> to <literal>4</literal> will give a partial path of "
692.13334 +"<filename class=\"directory\">app/tests</filename>.  The hook will make this "
692.13335 +"partial path available when expanding a template, as <literal>webroot</"
692.13336 +"literal>."
692.13337 +msgstr ""
692.13338 +
692.13339 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13340 +#: ../en/ch10-hook.xml:949
692.13341 +msgid ""
692.13342 +"<literal>template</literal>: The text of the template to use.  In addition to "
692.13343 +"the usual changeset-related variables, this template can use <literal>hgweb</"
692.13344 +"literal> (the value of the <literal>hgweb</literal> configuration item above) "
692.13345 +"and <literal>webroot</literal> (the path constructed using <literal>strip</"
692.13346 +"literal> above)."
692.13347 +msgstr ""
692.13348 +
692.13349 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13350 +#: ../en/ch10-hook.xml:959
692.13351 +msgid ""
692.13352 +"In addition, you can add a <envar role=\"rc-item-web\">baseurl</envar> item "
692.13353 +"to the <literal role=\"rc-web\">web</literal> section of your <filename role="
692.13354 +"\"special\">~/.hgrc</filename>.  The <literal role=\"hg-ext\">bugzilla</"
692.13355 +"literal> hook will make this available when expanding a template, as the base "
692.13356 +"string to use when constructing a URL that will let users browse from a "
692.13357 +"Bugzilla comment to view a changeset.  Example:"
692.13358 +msgstr ""
692.13359 +
692.13360 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13361 +#: ../en/ch10-hook.xml:971
692.13362 +msgid ""
692.13363 +"Here is an example set of <literal role=\"hg-ext\">bugzilla</literal> hook "
692.13364 +"config information."
692.13365 +msgstr ""
692.13366 +
692.13367 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13368 +#: ../en/ch10-hook.xml:981
692.13369 +msgid ""
692.13370 +"The most common problems with configuring the <literal role=\"hg-ext"
692.13371 +"\">bugzilla</literal> hook relate to running Bugzilla's "
692.13372 +"<filename>processmail</filename> script and mapping committer names to user "
692.13373 +"names."
692.13374 +msgstr ""
692.13375 +
692.13376 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13377 +#: ../en/ch10-hook.xml:987
692.13378 +msgid ""
692.13379 +"Recall from <xref linkend=\"sec:hook:bugzilla:config\"/> above that the user "
692.13380 +"that runs the Mercurial process on the server is also the one that will run "
692.13381 +"the <filename>processmail</filename> script.  The <filename>processmail</"
692.13382 +"filename> script sometimes causes Bugzilla to write to files in its "
692.13383 +"configuration directory, and Bugzilla's configuration files are usually owned "
692.13384 +"by the user that your web server runs under."
692.13385 +msgstr ""
692.13386 +
692.13387 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13388 +#: ../en/ch10-hook.xml:998
692.13389 +msgid ""
692.13390 +"You can cause <filename>processmail</filename> to be run with the suitable "
692.13391 +"user's identity using the <command>sudo</command> command.  Here is an "
692.13392 +"example entry for a <filename>sudoers</filename> file."
692.13393 +msgstr ""
692.13394 +
692.13395 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13396 +#: ../en/ch10-hook.xml:1005
692.13397 +msgid ""
692.13398 +"This allows the <literal>hg_user</literal> user to run a "
692.13399 +"<filename>processmail-wrapper</filename> program under the identity of "
692.13400 +"<literal>httpd_user</literal>."
692.13401 +msgstr ""
692.13402 +
692.13403 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13404 +#: ../en/ch10-hook.xml:1010
692.13405 +msgid ""
692.13406 +"This indirection through a wrapper script is necessary, because "
692.13407 +"<filename>processmail</filename> expects to be run with its current directory "
692.13408 +"set to wherever you installed Bugzilla; you can't specify that kind of "
692.13409 +"constraint in a <filename>sudoers</filename> file.  The contents of the "
692.13410 +"wrapper script are simple:"
692.13411 +msgstr ""
692.13412 +
692.13413 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13414 +#: ../en/ch10-hook.xml:1019
692.13415 +msgid ""
692.13416 +"It doesn't seem to matter what email address you pass to "
692.13417 +"<filename>processmail</filename>."
692.13418 +msgstr ""
692.13419 +
692.13420 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13421 +#: ../en/ch10-hook.xml:1023
692.13422 +msgid ""
692.13423 +"If your <literal role=\"rc-usermap\">usermap</literal> is not set up "
692.13424 +"correctly, users will see an error message from the <literal role=\"hg-ext"
692.13425 +"\">bugzilla</literal> hook when they push changes to the server.  The error "
692.13426 +"message will look like this:"
692.13427 +msgstr ""
692.13428 +
692.13429 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13430 +#: ../en/ch10-hook.xml:1030
692.13431 +msgid ""
692.13432 +"What this means is that the committer's address, <literal>john.q."
692.13433 +"public@example.com</literal>, is not a valid Bugzilla user name, nor does it "
692.13434 +"have an entry in your <literal role=\"rc-usermap\">usermap</literal> that "
692.13435 +"maps it to a valid Bugzilla user name."
692.13436 +msgstr ""
692.13437 +
692.13438 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.13439 +#: ../en/ch10-hook.xml:1040
692.13440 +msgid ""
692.13441 +"<literal role=\"hg-ext\">notify</literal>&emdash;send email notifications"
692.13442 +msgstr "<literal role=\"hg-ext\">notify</literal>—邮件通知"
692.13443 +
692.13444 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13445 +#: ../en/ch10-hook.xml:1043
692.13446 +msgid ""
692.13447 +"Although Mercurial's built-in web server provides RSS feeds of changes in "
692.13448 +"every repository, many people prefer to receive change notifications via "
692.13449 +"email.  The <literal role=\"hg-ext\">notify</literal> hook lets you send out "
692.13450 +"notifications to a set of email addresses whenever changesets arrive that "
692.13451 +"those subscribers are interested in."
692.13452 +msgstr ""
692.13453 +
692.13454 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13455 +#: ../en/ch10-hook.xml:1051
692.13456 +msgid ""
692.13457 +"As with the <literal role=\"hg-ext\">bugzilla</literal> hook, the <literal "
692.13458 +"role=\"hg-ext\">notify</literal> hook is template-driven, so you can "
692.13459 +"customise the contents of the notification messages that it sends."
692.13460 +msgstr ""
692.13461 +
692.13462 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13463 +#: ../en/ch10-hook.xml:1057
692.13464 +msgid ""
692.13465 +"By default, the <literal role=\"hg-ext\">notify</literal> hook includes a "
692.13466 +"diff of every changeset that it sends out; you can limit the size of the "
692.13467 +"diff, or turn this feature off entirely.  It is useful for letting "
692.13468 +"subscribers review changes immediately, rather than clicking to follow a URL."
692.13469 +msgstr ""
692.13470 +
692.13471 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.13472 +#: ../en/ch10-hook.xml:1065
692.13473 +msgid "Configuring the <literal role=\"hg-ext\">notify</literal> hook"
692.13474 +msgstr "配置 <literal role=\"hg-ext\">notify</literal> 钩子"
692.13475 +
692.13476 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13477 +#: ../en/ch10-hook.xml:1068
692.13478 +msgid ""
692.13479 +"You can set up the <literal role=\"hg-ext\">notify</literal> hook to send one "
692.13480 +"email message per incoming changeset, or one per incoming group of changesets "
692.13481 +"(all those that arrived in a single pull or push)."
692.13482 +msgstr ""
692.13483 +
692.13484 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13485 +#: ../en/ch10-hook.xml:1080
692.13486 +msgid ""
692.13487 +"Configuration information for this hook lives in the <literal role=\"rc-notify"
692.13488 +"\">notify</literal> section of a <filename role=\"special\">~/.hgrc</"
692.13489 +"filename> file."
692.13490 +msgstr ""
692.13491 +
692.13492 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13493 +#: ../en/ch10-hook.xml:1085
692.13494 +msgid ""
692.13495 +"<envar role=\"rc-item-notify\">test</envar>: By default, this hook does not "
692.13496 +"send out email at all; instead, it prints the message that it "
692.13497 +"<emphasis>would</emphasis> send.  Set this item to <literal>false</literal> "
692.13498 +"to allow email to be sent. The reason that sending of email is turned off by "
692.13499 +"default is that it takes several tries to configure this extension exactly as "
692.13500 +"you would like, and it would be bad form to spam subscribers with a number of "
692.13501 +"<quote>broken</quote> notifications while you debug your configuration."
692.13502 +msgstr ""
692.13503 +
692.13504 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13505 +#: ../en/ch10-hook.xml:1097
692.13506 +msgid ""
692.13507 +"<envar role=\"rc-item-notify\">config</envar>: The path to a configuration "
692.13508 +"file that contains subscription information.  This is kept separate from the "
692.13509 +"main <filename role=\"special\">~/.hgrc</filename> so that you can maintain "
692.13510 +"it in a repository of its own.  People can then clone that repository, update "
692.13511 +"their subscriptions, and push the changes back to your server."
692.13512 +msgstr ""
692.13513 +
692.13514 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13515 +#: ../en/ch10-hook.xml:1106
692.13516 +msgid ""
692.13517 +"<envar role=\"rc-item-notify\">strip</envar>: The number of leading path "
692.13518 +"separator characters to strip from a repository's path, when deciding whether "
692.13519 +"a repository has subscribers.  For example, if the repositories on your "
692.13520 +"server live in <filename class=\"directory\">/home/hg/repos</filename>, and "
692.13521 +"<literal role=\"hg-ext\">notify</literal> is considering a repository named "
692.13522 +"<filename class=\"directory\">/home/hg/repos/shared/test</filename>, setting "
692.13523 +"<envar role=\"rc-item-notify\">strip</envar> to <literal>4</literal> will "
692.13524 +"cause <literal role=\"hg-ext\">notify</literal> to trim the path it considers "
692.13525 +"down to <filename class=\"directory\">shared/test</filename>, and it will "
692.13526 +"match subscribers against that."
692.13527 +msgstr ""
692.13528 +
692.13529 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13530 +#: ../en/ch10-hook.xml:1123
692.13531 +msgid ""
692.13532 +"<envar role=\"rc-item-notify\">template</envar>: The template text to use "
692.13533 +"when sending messages.  This specifies both the contents of the message "
692.13534 +"header and its body."
692.13535 +msgstr ""
692.13536 +
692.13537 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13538 +#: ../en/ch10-hook.xml:1129
692.13539 +msgid ""
692.13540 +"<envar role=\"rc-item-notify\">maxdiff</envar>: The maximum number of lines "
692.13541 +"of diff data to append to the end of a message.  If a diff is longer than "
692.13542 +"this, it is truncated.  By default, this is set to 300.  Set this to "
692.13543 +"<literal>0</literal> to omit diffs from notification emails."
692.13544 +msgstr ""
692.13545 +
692.13546 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13547 +#: ../en/ch10-hook.xml:1138
692.13548 +msgid ""
692.13549 +"<envar role=\"rc-item-notify\">sources</envar>: A list of sources of "
692.13550 +"changesets to consider.  This lets you limit <literal role=\"hg-ext\">notify</"
692.13551 +"literal> to only sending out email about changes that remote users pushed "
692.13552 +"into this repository via a server, for example.  See <xref linkend=\"sec:hook:"
692.13553 +"sources\"/> for the sources you can specify here."
692.13554 +msgstr ""
692.13555 +
692.13556 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13557 +#: ../en/ch10-hook.xml:1149
692.13558 +msgid ""
692.13559 +"If you set the <envar role=\"rc-item-web\">baseurl</envar> item in the "
692.13560 +"<literal role=\"rc-web\">web</literal> section, you can use it in a template; "
692.13561 +"it will be available as <literal>webroot</literal>."
692.13562 +msgstr ""
692.13563 +
692.13564 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13565 +#: ../en/ch10-hook.xml:1155
692.13566 +msgid ""
692.13567 +"Here is an example set of <literal role=\"hg-ext\">notify</literal> "
692.13568 +"configuration information."
692.13569 +msgstr ""
692.13570 +
692.13571 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13572 +#: ../en/ch10-hook.xml:1161
692.13573 +msgid "This will produce a message that looks like the following:"
692.13574 +msgstr ""
692.13575 +
692.13576 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13577 +#: ../en/ch10-hook.xml:1171
692.13578 +msgid ""
692.13579 +"Do not forget that by default, the <literal role=\"hg-ext\">notify</literal> "
692.13580 +"extension <emphasis>will not send any mail</emphasis> until you explicitly "
692.13581 +"configure it to do so, by setting <envar role=\"rc-item-notify\">test</envar> "
692.13582 +"to <literal>false</literal>.  Until you do that, it simply prints the message "
692.13583 +"it <emphasis>would</emphasis> send."
692.13584 +msgstr ""
692.13585 +
692.13586 +#. type: Content of: <book><chapter><sect1><title>
692.13587 +#: ../en/ch10-hook.xml:1183
692.13588 +msgid "Information for writers of hooks"
692.13589 +msgstr "编写钩子的信息"
692.13590 +
692.13591 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.13592 +#: ../en/ch10-hook.xml:1186
692.13593 +msgid "In-process hook execution"
692.13594 +msgstr "进程内钩子的执行"
692.13595 +
692.13596 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13597 +#: ../en/ch10-hook.xml:1188
692.13598 +msgid "An in-process hook is called with arguments of the following form:"
692.13599 +msgstr ""
692.13600 +
692.13601 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13602 +#: ../en/ch10-hook.xml:1192
692.13603 +msgid ""
692.13604 +"The <literal>ui</literal> parameter is a <literal role=\"py-mod-mercurial.ui"
692.13605 +"\">ui</literal> object. The <literal>repo</literal> parameter is a <literal "
692.13606 +"role=\"py-mod-mercurial.localrepo\">localrepository</literal> object.  The "
692.13607 +"names and values of the <literal>**kwargs</literal> parameters depend on the "
692.13608 +"hook being invoked, with the following common features:"
692.13609 +msgstr ""
692.13610 +
692.13611 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13612 +#: ../en/ch10-hook.xml:1201
692.13613 +msgid ""
692.13614 +"If a parameter is named <literal>node</literal> or <literal>parentN</"
692.13615 +"literal>, it will contain a hexadecimal changeset ID. The empty string is "
692.13616 +"used to represent <quote>null changeset ID</quote> instead of a string of "
692.13617 +"zeroes."
692.13618 +msgstr ""
692.13619 +
692.13620 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13621 +#: ../en/ch10-hook.xml:1208
692.13622 +msgid ""
692.13623 +"If a parameter is named <literal>url</literal>, it will contain the URL of a "
692.13624 +"remote repository, if that can be determined."
692.13625 +msgstr ""
692.13626 +
692.13627 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13628 +#: ../en/ch10-hook.xml:1213
692.13629 +msgid ""
692.13630 +"Boolean-valued parameters are represented as Python <literal>bool</literal> "
692.13631 +"objects."
692.13632 +msgstr ""
692.13633 +
692.13634 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13635 +#: ../en/ch10-hook.xml:1218
692.13636 +msgid ""
692.13637 +"An in-process hook is called without a change to the process's working "
692.13638 +"directory (unlike external hooks, which are run in the root of the "
692.13639 +"repository).  It must not change the process's working directory, or it will "
692.13640 +"cause any calls it makes into the Mercurial API to fail."
692.13641 +msgstr ""
692.13642 +
692.13643 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13644 +#: ../en/ch10-hook.xml:1225
692.13645 +msgid ""
692.13646 +"If a hook returns a boolean <quote>false</quote> value, it is considered to "
692.13647 +"have succeeded.  If it returns a boolean <quote>true</quote> value or raises "
692.13648 +"an exception, it is considered to have failed.  A useful way to think of the "
692.13649 +"calling convention is <quote>tell me if you fail</quote>."
692.13650 +msgstr ""
692.13651 +
692.13652 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13653 +#: ../en/ch10-hook.xml:1232
692.13654 +msgid ""
692.13655 +"Note that changeset IDs are passed into Python hooks as hexadecimal strings, "
692.13656 +"not the binary hashes that Mercurial's APIs normally use.  To convert a hash "
692.13657 +"from hex to binary, use the <literal>bin</literal> function."
692.13658 +msgstr ""
692.13659 +
692.13660 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.13661 +#: ../en/ch10-hook.xml:1240
692.13662 +msgid "External hook execution"
692.13663 +msgstr "外部钩子的执行"
692.13664 +
692.13665 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13666 +#: ../en/ch10-hook.xml:1242
692.13667 +msgid ""
692.13668 +"An external hook is passed to the shell of the user running Mercurial. "
692.13669 +"Features of that shell, such as variable substitution and command "
692.13670 +"redirection, are available.  The hook is run in the root directory of the "
692.13671 +"repository (unlike in-process hooks, which are run in the same directory that "
692.13672 +"Mercurial was run in)."
692.13673 +msgstr ""
692.13674 +
692.13675 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13676 +#: ../en/ch10-hook.xml:1250
692.13677 +msgid ""
692.13678 +"Hook parameters are passed to the hook as environment variables.  Each "
692.13679 +"environment variable's name is converted in upper case and prefixed with the "
692.13680 +"string <quote><literal>HG_</literal></quote>.  For example, if the name of a "
692.13681 +"parameter is <quote><literal>node</literal></quote>, the name of the "
692.13682 +"environment variable representing that parameter will be "
692.13683 +"<quote><literal>HG_NODE</literal></quote>."
692.13684 +msgstr ""
692.13685 +
692.13686 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13687 +#: ../en/ch10-hook.xml:1259
692.13688 +msgid ""
692.13689 +"A boolean parameter is represented as the string <quote><literal>1</literal></"
692.13690 +"quote> for <quote>true</quote>, <quote><literal>0</literal></quote> for "
692.13691 +"<quote>false</quote>.  If an environment variable is named <envar>HG_NODE</"
692.13692 +"envar>, <envar>HG_PARENT1</envar> or <envar>HG_PARENT2</envar>, it contains a "
692.13693 +"changeset ID represented as a hexadecimal string.  The empty string is used "
692.13694 +"to represent <quote>null changeset ID</quote> instead of a string of zeroes.  "
692.13695 +"If an environment variable is named <envar>HG_URL</envar>, it will contain "
692.13696 +"the URL of a remote repository, if that can be determined."
692.13697 +msgstr ""
692.13698 +
692.13699 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13700 +#: ../en/ch10-hook.xml:1271
692.13701 +msgid ""
692.13702 +"If a hook exits with a status of zero, it is considered to have succeeded.  "
692.13703 +"If it exits with a non-zero status, it is considered to have failed."
692.13704 +msgstr ""
692.13705 +
692.13706 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.13707 +#: ../en/ch10-hook.xml:1278
692.13708 +msgid "Finding out where changesets come from"
692.13709 +msgstr "检查修改集来自何处"
692.13710 +
692.13711 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13712 +#: ../en/ch10-hook.xml:1280
692.13713 +msgid ""
692.13714 +"A hook that involves the transfer of changesets between a local repository "
692.13715 +"and another may be able to find out information about the <quote>far side</"
692.13716 +"quote>.  Mercurial knows <emphasis>how</emphasis> changes are being "
692.13717 +"transferred, and in many cases <emphasis>where</emphasis> they are being "
692.13718 +"transferred to or from."
692.13719 +msgstr ""
692.13720 +
692.13721 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.13722 +#: ../en/ch10-hook.xml:1289
692.13723 +msgid "Sources of changesets"
692.13724 +msgstr "修改集的来源"
692.13725 +
692.13726 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13727 +#: ../en/ch10-hook.xml:1291
692.13728 +msgid ""
692.13729 +"Mercurial will tell a hook what means are, or were, used to transfer "
692.13730 +"changesets between repositories.  This is provided by Mercurial in a Python "
692.13731 +"parameter named <literal>source</literal>, or an environment variable named "
692.13732 +"<envar>HG_SOURCE</envar>."
692.13733 +msgstr ""
692.13734 +
692.13735 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13736 +#: ../en/ch10-hook.xml:1299
692.13737 +msgid ""
692.13738 +"<literal>serve</literal>: Changesets are transferred to or from a remote "
692.13739 +"repository over http or ssh."
692.13740 +msgstr ""
692.13741 +
692.13742 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13743 +#: ../en/ch10-hook.xml:1304
692.13744 +msgid ""
692.13745 +"<literal>pull</literal>: Changesets are being transferred via a pull from one "
692.13746 +"repository into another."
692.13747 +msgstr ""
692.13748 +
692.13749 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13750 +#: ../en/ch10-hook.xml:1309
692.13751 +msgid ""
692.13752 +"<literal>push</literal>: Changesets are being transferred via a push from one "
692.13753 +"repository into another."
692.13754 +msgstr ""
692.13755 +
692.13756 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13757 +#: ../en/ch10-hook.xml:1314
692.13758 +msgid ""
692.13759 +"<literal>bundle</literal>: Changesets are being transferred to or from a "
692.13760 +"bundle."
692.13761 +msgstr ""
692.13762 +
692.13763 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title>
692.13764 +#: ../en/ch10-hook.xml:1321
692.13765 +msgid "Where changes are going&emdash;remote repository URLs"
692.13766 +msgstr "修改集要到哪里—远程版本库的地址"
692.13767 +
692.13768 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13769 +#: ../en/ch10-hook.xml:1324
692.13770 +msgid ""
692.13771 +"When possible, Mercurial will tell a hook the location of the <quote>far "
692.13772 +"side</quote> of an activity that transfers changeset data between "
692.13773 +"repositories.  This is provided by Mercurial in a Python parameter named "
692.13774 +"<literal>url</literal>, or an environment variable named <envar>HG_URL</"
692.13775 +"envar>."
692.13776 +msgstr ""
692.13777 +
692.13778 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para>
692.13779 +#: ../en/ch10-hook.xml:1332
692.13780 +msgid ""
692.13781 +"This information is not always known.  If a hook is invoked in a repository "
692.13782 +"that is being served via http or ssh, Mercurial cannot tell where the remote "
692.13783 +"repository is, but it may know where the client is connecting from.  In such "
692.13784 +"cases, the URL will take one of the following forms:"
692.13785 +msgstr ""
692.13786 +
692.13787 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13788 +#: ../en/ch10-hook.xml:1339
692.13789 +msgid ""
692.13790 +"<literal>remote:ssh:1.2.3.4</literal>&emdash;remote ssh client, at the IP "
692.13791 +"address <literal>1.2.3.4</literal>."
692.13792 +msgstr ""
692.13793 +
692.13794 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13795 +#: ../en/ch10-hook.xml:1344
692.13796 +msgid ""
692.13797 +"<literal>remote:http:1.2.3.4</literal>&emdash;remote http client, at the IP "
692.13798 +"address <literal>1.2.3.4</literal>.  If the client is using SSL, this will be "
692.13799 +"of the form <literal>remote:https:1.2.3.4</literal>."
692.13800 +msgstr ""
692.13801 +
692.13802 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
692.13803 +#: ../en/ch10-hook.xml:1351
692.13804 +msgid "Empty&emdash;no information could be discovered about the remote client."
692.13805 +msgstr ""
692.13806 +
692.13807 +#. type: Content of: <book><chapter><sect1><title>
692.13808 +#: ../en/ch10-hook.xml:1359
692.13809 +msgid "Hook reference"
692.13810 +msgstr "钩子参考"
692.13811 +
692.13812 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.13813 +#: ../en/ch10-hook.xml:1362
692.13814 +msgid ""
692.13815 +"<literal role=\"hook\">changegroup</literal>&emdash;after remote changesets "
692.13816 +"added"
692.13817 +msgstr "<literal role=\"hook\">changegroup</literal>—增加远程修改集之后"
692.13818 +
692.13819 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13820 +#: ../en/ch10-hook.xml:1365
692.13821 +msgid ""
692.13822 +"This hook is run after a group of pre-existing changesets has been added to "
692.13823 +"the repository, for example via a <command role=\"hg-cmd\">hg pull</command> "
692.13824 +"or <command role=\"hg-cmd\">hg unbundle</command>.  This hook is run once per "
692.13825 +"operation that added one or more changesets.  This is in contrast to the "
692.13826 +"<literal role=\"hook\">incoming</literal> hook, which is run once per "
692.13827 +"changeset, regardless of whether the changesets arrive in a group."
692.13828 +msgstr ""
692.13829 +
692.13830 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13831 +#: ../en/ch10-hook.xml:1375
692.13832 +msgid ""
692.13833 +"Some possible uses for this hook include kicking off an automated build or "
692.13834 +"test of the added changesets, updating a bug database, or notifying "
692.13835 +"subscribers that a repository contains new changes."
692.13836 +msgstr ""
692.13837 +
692.13838 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13839 +#: ../en/ch10-hook.xml:1381 ../en/ch10-hook.xml:1421 ../en/ch10-hook.xml:1465
692.13840 +#: ../en/ch10-hook.xml:1507 ../en/ch10-hook.xml:1562 ../en/ch10-hook.xml:1602
692.13841 +#: ../en/ch10-hook.xml:1638 ../en/ch10-hook.xml:1672 ../en/ch10-hook.xml:1736
692.13842 +#: ../en/ch10-hook.xml:1794 ../en/ch10-hook.xml:1830 ../en/ch10-hook.xml:1857
692.13843 +msgid "Parameters to this hook:"
692.13844 +msgstr ""
692.13845 +
692.13846 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13847 +#: ../en/ch10-hook.xml:1384 ../en/ch10-hook.xml:1739
692.13848 +msgid ""
692.13849 +"<literal>node</literal>: A changeset ID.  The changeset ID of the first "
692.13850 +"changeset in the group that was added.  All changesets between this and "
692.13851 +"<literal role=\"tag\">tip</literal>, inclusive, were added by a single "
692.13852 +"<command role=\"hg-cmd\">hg pull</command>, <command role=\"hg-cmd\">hg push</"
692.13853 +"command> or <command role=\"hg-cmd\">hg unbundle</command>."
692.13854 +msgstr ""
692.13855 +
692.13856 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13857 +#: ../en/ch10-hook.xml:1393 ../en/ch10-hook.xml:1472 ../en/ch10-hook.xml:1565
692.13858 +#: ../en/ch10-hook.xml:1749
692.13859 +msgid ""
692.13860 +"<literal>source</literal>: A string.  The source of these changes.  See <xref "
692.13861 +"linkend=\"sec:hook:sources\"/> for details."
692.13862 +msgstr ""
692.13863 +
692.13864 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13865 +#: ../en/ch10-hook.xml:1398 ../en/ch10-hook.xml:1477 ../en/ch10-hook.xml:1528
692.13866 +#: ../en/ch10-hook.xml:1570 ../en/ch10-hook.xml:1651 ../en/ch10-hook.xml:1754
692.13867 +msgid ""
692.13868 +"<literal>url</literal>: A URL.  The location of the remote repository, if "
692.13869 +"known.  See <xref linkend=\"sec:hook:url\"/> for more information."
692.13870 +msgstr ""
692.13871 +
692.13872 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13873 +#: ../en/ch10-hook.xml:1404
692.13874 +msgid ""
692.13875 +"See also: <literal role=\"hook\">incoming</literal> (<xref linkend=\"sec:hook:"
692.13876 +"incoming\"/>), <literal role=\"hook\">prechangegroup</literal> (<xref linkend="
692.13877 +"\"sec:hook:prechangegroup\"/>), <literal role=\"hook\">pretxnchangegroup</"
692.13878 +"literal> (<xref linkend=\"sec:hook:pretxnchangegroup\"/>)"
692.13879 +msgstr ""
692.13880 +
692.13881 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.13882 +#: ../en/ch10-hook.xml:1415
692.13883 +msgid ""
692.13884 +"<literal role=\"hook\">commit</literal>&emdash;after a new changeset is "
692.13885 +"created"
692.13886 +msgstr "<literal role=\"hook\">commit</literal>—创建新修改集之后"
692.13887 +
692.13888 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13889 +#: ../en/ch10-hook.xml:1418
692.13890 +msgid "This hook is run after a new changeset has been created."
692.13891 +msgstr ""
692.13892 +
692.13893 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13894 +#: ../en/ch10-hook.xml:1424 ../en/ch10-hook.xml:1797
692.13895 +msgid ""
692.13896 +"<literal>node</literal>: A changeset ID.  The changeset ID of the newly "
692.13897 +"committed changeset."
692.13898 +msgstr ""
692.13899 +
692.13900 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13901 +#: ../en/ch10-hook.xml:1428 ../en/ch10-hook.xml:1801
692.13902 +msgid ""
692.13903 +"<literal>parent1</literal>: A changeset ID.  The changeset ID of the first "
692.13904 +"parent of the newly committed changeset."
692.13905 +msgstr ""
692.13906 +
692.13907 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13908 +#: ../en/ch10-hook.xml:1433 ../en/ch10-hook.xml:1806
692.13909 +msgid ""
692.13910 +"<literal>parent2</literal>: A changeset ID.  The changeset ID of the second "
692.13911 +"parent of the newly committed changeset."
692.13912 +msgstr ""
692.13913 +
692.13914 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13915 +#: ../en/ch10-hook.xml:1439
692.13916 +msgid ""
692.13917 +"See also: <literal role=\"hook\">precommit</literal> (<xref linkend=\"sec:"
692.13918 +"hook:precommit\"/>), <literal role=\"hook\">pretxncommit</literal> (<xref "
692.13919 +"linkend=\"sec:hook:pretxncommit\"/>)"
692.13920 +msgstr ""
692.13921 +
692.13922 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.13923 +#: ../en/ch10-hook.xml:1448
692.13924 +msgid ""
692.13925 +"<literal role=\"hook\">incoming</literal>&emdash;after one remote changeset "
692.13926 +"is added"
692.13927 +msgstr "<literal role=\"hook\">incoming</literal>—增加远程修改集之后"
692.13928 +
692.13929 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13930 +#: ../en/ch10-hook.xml:1451
692.13931 +msgid ""
692.13932 +"This hook is run after a pre-existing changeset has been added to the "
692.13933 +"repository, for example via a <command role=\"hg-cmd\">hg push</command>.  If "
692.13934 +"a group of changesets was added in a single operation, this hook is called "
692.13935 +"once for each added changeset."
692.13936 +msgstr ""
692.13937 +
692.13938 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13939 +#: ../en/ch10-hook.xml:1458
692.13940 +msgid ""
692.13941 +"You can use this hook for the same purposes as the <literal role=\"hook"
692.13942 +"\">changegroup</literal> hook (<xref linkend=\"sec:hook:changegroup\"/>); "
692.13943 +"it's simply more convenient sometimes to run a hook once per group of "
692.13944 +"changesets, while other times it's handier once per changeset."
692.13945 +msgstr ""
692.13946 +
692.13947 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13948 +#: ../en/ch10-hook.xml:1468
692.13949 +msgid ""
692.13950 +"<literal>node</literal>: A changeset ID.  The ID of the newly added changeset."
692.13951 +msgstr ""
692.13952 +
692.13953 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13954 +#: ../en/ch10-hook.xml:1483
692.13955 +msgid ""
692.13956 +"See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:"
692.13957 +"hook:changegroup\"/>) <literal role=\"hook\">prechangegroup</literal> (<xref "
692.13958 +"linkend=\"sec:hook:prechangegroup\"/>), <literal role=\"hook"
692.13959 +"\">pretxnchangegroup</literal> (<xref linkend=\"sec:hook:pretxnchangegroup\"/"
692.13960 +">)"
692.13961 +msgstr ""
692.13962 +
692.13963 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.13964 +#: ../en/ch10-hook.xml:1494
692.13965 +msgid ""
692.13966 +"<literal role=\"hook\">outgoing</literal>&emdash;after changesets are "
692.13967 +"propagated"
692.13968 +msgstr "<literal role=\"hook\">outgoing</literal>—传播修改集之后"
692.13969 +
692.13970 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13971 +#: ../en/ch10-hook.xml:1497
692.13972 +msgid ""
692.13973 +"This hook is run after a group of changesets has been propagated out of this "
692.13974 +"repository, for example by a <command role=\"hg-cmd\">hg push</command> or "
692.13975 +"<command role=\"hg-cmd\">hg bundle</command> command."
692.13976 +msgstr ""
692.13977 +
692.13978 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.13979 +#: ../en/ch10-hook.xml:1503
692.13980 +msgid ""
692.13981 +"One possible use for this hook is to notify administrators that changes have "
692.13982 +"been pulled."
692.13983 +msgstr ""
692.13984 +
692.13985 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13986 +#: ../en/ch10-hook.xml:1510
692.13987 +msgid ""
692.13988 +"<literal>node</literal>: A changeset ID.  The changeset ID of the first "
692.13989 +"changeset of the group that was sent."
692.13990 +msgstr ""
692.13991 +
692.13992 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.13993 +#: ../en/ch10-hook.xml:1515
692.13994 +msgid ""
692.13995 +"<literal>source</literal>: A string.  The source of the of the operation (see "
692.13996 +"<xref linkend=\"sec:hook:sources\"/>).  If a remote client pulled changes "
692.13997 +"from this repository, <literal>source</literal> will be <literal>serve</"
692.13998 +"literal>.  If the client that obtained changes from this repository was "
692.13999 +"local, <literal>source</literal> will be <literal>bundle</literal>, "
692.14000 +"<literal>pull</literal>, or <literal>push</literal>, depending on the "
692.14001 +"operation the client performed."
692.14002 +msgstr ""
692.14003 +
692.14004 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14005 +#: ../en/ch10-hook.xml:1534
692.14006 +msgid ""
692.14007 +"See also: <literal role=\"hook\">preoutgoing</literal> (<xref linkend=\"sec:"
692.14008 +"hook:preoutgoing\"/>)"
692.14009 +msgstr ""
692.14010 +
692.14011 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.14012 +#: ../en/ch10-hook.xml:1541
692.14013 +msgid ""
692.14014 +"<literal role=\"hook\">prechangegroup</literal>&emdash;before starting to add "
692.14015 +"remote changesets"
692.14016 +msgstr "<literal role=\"hook\">prechangegroup</literal>—增加远程修改集之前"
692.14017 +
692.14018 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14019 +#: ../en/ch10-hook.xml:1545
692.14020 +msgid ""
692.14021 +"This controlling hook is run before Mercurial begins to add a group of "
692.14022 +"changesets from another repository."
692.14023 +msgstr ""
692.14024 +
692.14025 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14026 +#: ../en/ch10-hook.xml:1549
692.14027 +msgid ""
692.14028 +"This hook does not have any information about the changesets to be added, "
692.14029 +"because it is run before transmission of those changesets is allowed to "
692.14030 +"begin.  If this hook fails, the changesets will not be transmitted."
692.14031 +msgstr ""
692.14032 +
692.14033 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14034 +#: ../en/ch10-hook.xml:1555
692.14035 +msgid ""
692.14036 +"One use for this hook is to prevent external changes from being added to a "
692.14037 +"repository.  For example, you could use this to <quote>freeze</quote> a "
692.14038 +"server-hosted branch temporarily or permanently so that users cannot push to "
692.14039 +"it, while still allowing a local administrator to modify the repository."
692.14040 +msgstr ""
692.14041 +
692.14042 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14043 +#: ../en/ch10-hook.xml:1576
692.14044 +msgid ""
692.14045 +"See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:"
692.14046 +"hook:changegroup\"/>), <literal role=\"hook\">incoming</literal> (<xref "
692.14047 +"linkend=\"sec:hook:incoming\"/>), <literal role=\"hook\">pretxnchangegroup</"
692.14048 +"literal> (<xref linkend=\"sec:hook:pretxnchangegroup\"/>)"
692.14049 +msgstr ""
692.14050 +
692.14051 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.14052 +#: ../en/ch10-hook.xml:1587
692.14053 +msgid ""
692.14054 +"<literal role=\"hook\">precommit</literal>&emdash;before starting to commit a "
692.14055 +"changeset"
692.14056 +msgstr "<literal role=\"hook\">precommit</literal>—提交修改集之前"
692.14057 +
692.14058 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14059 +#: ../en/ch10-hook.xml:1590
692.14060 +msgid ""
692.14061 +"This hook is run before Mercurial begins to commit a new changeset. It is run "
692.14062 +"before Mercurial has any of the metadata for the commit, such as the files to "
692.14063 +"be committed, the commit message, or the commit date."
692.14064 +msgstr ""
692.14065 +
692.14066 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14067 +#: ../en/ch10-hook.xml:1596
692.14068 +msgid ""
692.14069 +"One use for this hook is to disable the ability to commit new changesets, "
692.14070 +"while still allowing incoming changesets.  Another is to run a build or test, "
692.14071 +"and only allow the commit to begin if the build or test succeeds."
692.14072 +msgstr ""
692.14073 +
692.14074 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14075 +#: ../en/ch10-hook.xml:1605
692.14076 +msgid ""
692.14077 +"<literal>parent1</literal>: A changeset ID.  The changeset ID of the first "
692.14078 +"parent of the working directory."
692.14079 +msgstr ""
692.14080 +
692.14081 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14082 +#: ../en/ch10-hook.xml:1610
692.14083 +msgid ""
692.14084 +"<literal>parent2</literal>: A changeset ID.  The changeset ID of the second "
692.14085 +"parent of the working directory."
692.14086 +msgstr ""
692.14087 +
692.14088 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14089 +#: ../en/ch10-hook.xml:1615
692.14090 +msgid ""
692.14091 +"If the commit proceeds, the parents of the working directory will become the "
692.14092 +"parents of the new changeset."
692.14093 +msgstr ""
692.14094 +
692.14095 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14096 +#: ../en/ch10-hook.xml:1619
692.14097 +msgid ""
692.14098 +"See also: <literal role=\"hook\">commit</literal> (<xref linkend=\"sec:hook:"
692.14099 +"commit\"/>), <literal role=\"hook\">pretxncommit</literal> (<xref linkend="
692.14100 +"\"sec:hook:pretxncommit\"/>)"
692.14101 +msgstr ""
692.14102 +
692.14103 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.14104 +#: ../en/ch10-hook.xml:1627
692.14105 +msgid ""
692.14106 +"<literal role=\"hook\">preoutgoing</literal>&emdash;before starting to "
692.14107 +"propagate changesets"
692.14108 +msgstr "<literal role=\"hook\">preoutgoing</literal>—传播修改集之前"
692.14109 +
692.14110 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14111 +#: ../en/ch10-hook.xml:1630
692.14112 +msgid ""
692.14113 +"This hook is invoked before Mercurial knows the identities of the changesets "
692.14114 +"to be transmitted."
692.14115 +msgstr ""
692.14116 +
692.14117 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14118 +#: ../en/ch10-hook.xml:1634
692.14119 +msgid ""
692.14120 +"One use for this hook is to prevent changes from being transmitted to another "
692.14121 +"repository."
692.14122 +msgstr ""
692.14123 +
692.14124 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14125 +#: ../en/ch10-hook.xml:1641
692.14126 +msgid ""
692.14127 +"<literal>source</literal>: A string.  The source of the operation that is "
692.14128 +"attempting to obtain changes from this repository (see <xref linkend=\"sec:"
692.14129 +"hook:sources\"/>).  See the documentation for the <literal>source</literal> "
692.14130 +"parameter to the <literal role=\"hook\">outgoing</literal> hook, in <xref "
692.14131 +"linkend=\"sec:hook:outgoing\"/>, for possible values of this parameter."
692.14132 +msgstr ""
692.14133 +
692.14134 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14135 +#: ../en/ch10-hook.xml:1657
692.14136 +msgid ""
692.14137 +"See also: <literal role=\"hook\">outgoing</literal> (<xref linkend=\"sec:hook:"
692.14138 +"outgoing\"/>)"
692.14139 +msgstr ""
692.14140 +
692.14141 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.14142 +#: ../en/ch10-hook.xml:1664
692.14143 +msgid ""
692.14144 +"<literal role=\"hook\">pretag</literal>&emdash;before tagging a changeset"
692.14145 +msgstr "<literal role=\"hook\">pretag</literal>—创建标签之前"
692.14146 +
692.14147 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14148 +#: ../en/ch10-hook.xml:1667
692.14149 +msgid ""
692.14150 +"This controlling hook is run before a tag is created.  If the hook succeeds, "
692.14151 +"creation of the tag proceeds.  If the hook fails, the tag is not created."
692.14152 +msgstr ""
692.14153 +
692.14154 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14155 +#: ../en/ch10-hook.xml:1675
692.14156 +msgid ""
692.14157 +"<literal>local</literal>: A boolean.  Whether the tag is local to this "
692.14158 +"repository instance (i.e. stored in <filename role=\"special\">.hg/localtags</"
692.14159 +"filename>) or managed by Mercurial (stored in <filename role=\"special\">."
692.14160 +"hgtags</filename>)."
692.14161 +msgstr ""
692.14162 +
692.14163 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14164 +#: ../en/ch10-hook.xml:1682
692.14165 +msgid ""
692.14166 +"<literal>node</literal>: A changeset ID.  The ID of the changeset to be "
692.14167 +"tagged."
692.14168 +msgstr ""
692.14169 +
692.14170 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14171 +#: ../en/ch10-hook.xml:1686
692.14172 +msgid "<literal>tag</literal>: A string.  The name of the tag to be created."
692.14173 +msgstr ""
692.14174 +
692.14175 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14176 +#: ../en/ch10-hook.xml:1691
692.14177 +msgid ""
692.14178 +"If the tag to be created is revision-controlled, the <literal role=\"hook"
692.14179 +"\">precommit</literal> and <literal role=\"hook\">pretxncommit</literal> "
692.14180 +"hooks (<xref linkend=\"sec:hook:commit\"/> and <xref linkend=\"sec:hook:"
692.14181 +"pretxncommit\"/>) will also be run."
692.14182 +msgstr ""
692.14183 +
692.14184 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14185 +#: ../en/ch10-hook.xml:1699
692.14186 +msgid ""
692.14187 +"See also: <literal role=\"hook\">tag</literal> (<xref linkend=\"sec:hook:tag"
692.14188 +"\"/>)"
692.14189 +msgstr ""
692.14190 +
692.14191 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.14192 +#: ../en/ch10-hook.xml:1705
692.14193 +msgid ""
692.14194 +"<literal role=\"hook\">pretxnchangegroup</literal>&emdash;before completing "
692.14195 +"addition of remote changesets"
692.14196 +msgstr ""
692.14197 +"<literal role=\"hook\">pretxnchangegroup</literal>—完成增加远程修改集之前"
692.14198 +
692.14199 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14200 +#: ../en/ch10-hook.xml:1709
692.14201 +msgid ""
692.14202 +"This controlling hook is run before a transaction&emdash;that manages the "
692.14203 +"addition of a group of new changesets from outside the repository&emdash;"
692.14204 +"completes.  If the hook succeeds, the transaction completes, and all of the "
692.14205 +"changesets become permanent within this repository.  If the hook fails, the "
692.14206 +"transaction is rolled back, and the data for the changesets is erased."
692.14207 +msgstr ""
692.14208 +
692.14209 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14210 +#: ../en/ch10-hook.xml:1718
692.14211 +msgid ""
692.14212 +"This hook can access the metadata associated with the almost-added "
692.14213 +"changesets, but it should not do anything permanent with this data. It must "
692.14214 +"also not modify the working directory."
692.14215 +msgstr ""
692.14216 +
692.14217 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14218 +#: ../en/ch10-hook.xml:1724
692.14219 +msgid ""
692.14220 +"While this hook is running, if other Mercurial processes access this "
692.14221 +"repository, they will be able to see the almost-added changesets as if they "
692.14222 +"are permanent.  This may lead to race conditions if you do not take steps to "
692.14223 +"avoid them."
692.14224 +msgstr ""
692.14225 +
692.14226 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14227 +#: ../en/ch10-hook.xml:1731
692.14228 +msgid ""
692.14229 +"This hook can be used to automatically vet a group of changesets.  If the "
692.14230 +"hook fails, all of the changesets are <quote>rejected</quote> when the "
692.14231 +"transaction rolls back."
692.14232 +msgstr ""
692.14233 +
692.14234 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14235 +#: ../en/ch10-hook.xml:1760
692.14236 +msgid ""
692.14237 +"See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:"
692.14238 +"hook:changegroup\"/>), <literal role=\"hook\">incoming</literal> (<xref "
692.14239 +"linkend=\"sec:hook:incoming\"/>), <literal role=\"hook\">prechangegroup</"
692.14240 +"literal> (<xref linkend=\"sec:hook:prechangegroup\"/>)"
692.14241 +msgstr ""
692.14242 +
692.14243 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.14244 +#: ../en/ch10-hook.xml:1771
692.14245 +msgid ""
692.14246 +"<literal role=\"hook\">pretxncommit</literal>&emdash;before completing commit "
692.14247 +"of new changeset"
692.14248 +msgstr "<literal role=\"hook\">pretxncommit</literal>—完成提交之前"
692.14249 +
692.14250 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14251 +#: ../en/ch10-hook.xml:1774
692.14252 +msgid ""
692.14253 +"This controlling hook is run before a transaction&emdash;that manages a new "
692.14254 +"commit&emdash;completes.  If the hook succeeds, the transaction completes and "
692.14255 +"the changeset becomes permanent within this repository.  If the hook fails, "
692.14256 +"the transaction is rolled back, and the commit data is erased."
692.14257 +msgstr ""
692.14258 +
692.14259 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14260 +#: ../en/ch10-hook.xml:1782
692.14261 +msgid ""
692.14262 +"This hook can access the metadata associated with the almost-new changeset, "
692.14263 +"but it should not do anything permanent with this data.  It must also not "
692.14264 +"modify the working directory."
692.14265 +msgstr ""
692.14266 +
692.14267 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14268 +#: ../en/ch10-hook.xml:1788
692.14269 +msgid ""
692.14270 +"While this hook is running, if other Mercurial processes access this "
692.14271 +"repository, they will be able to see the almost-new changeset as if it is "
692.14272 +"permanent.  This may lead to race conditions if you do not take steps to "
692.14273 +"avoid them."
692.14274 +msgstr ""
692.14275 +
692.14276 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14277 +#: ../en/ch10-hook.xml:1812
692.14278 +msgid ""
692.14279 +"See also: <literal role=\"hook\">precommit</literal> (<xref linkend=\"sec:"
692.14280 +"hook:precommit\"/>)"
692.14281 +msgstr ""
692.14282 +"参见: <literal role=\"hook\">precommit</literal> (<xref linkend=\"sec:hook:"
692.14283 +"precommit\"/>)"
692.14284 +
692.14285 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.14286 +#: ../en/ch10-hook.xml:1819
692.14287 +msgid ""
692.14288 +"<literal role=\"hook\">preupdate</literal>&emdash;before updating or merging "
692.14289 +"working directory"
692.14290 +msgstr "<literal role=\"hook\">preupdate</literal>—更新或合并工作目录之前"
692.14291 +
692.14292 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14293 +#: ../en/ch10-hook.xml:1822
692.14294 +msgid ""
692.14295 +"This controlling hook is run before an update or merge of the working "
692.14296 +"directory begins.  It is run only if Mercurial's normal pre-update checks "
692.14297 +"determine that the update or merge can proceed.  If the hook succeeds, the "
692.14298 +"update or merge may proceed; if it fails, the update or merge does not start."
692.14299 +msgstr ""
692.14300 +
692.14301 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14302 +#: ../en/ch10-hook.xml:1833
692.14303 +msgid ""
692.14304 +"<literal>parent1</literal>: A changeset ID. The ID of the parent that the "
692.14305 +"working directory is to be updated to.  If the working directory is being "
692.14306 +"merged, it will not change this parent."
692.14307 +msgstr ""
692.14308 +
692.14309 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14310 +#: ../en/ch10-hook.xml:1839
692.14311 +msgid ""
692.14312 +"<literal>parent2</literal>: A changeset ID. Only set if the working directory "
692.14313 +"is being merged.  The ID of the revision that the working directory is being "
692.14314 +"merged with."
692.14315 +msgstr ""
692.14316 +
692.14317 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14318 +#: ../en/ch10-hook.xml:1846
692.14319 +msgid ""
692.14320 +"See also: <literal role=\"hook\">update</literal> (<xref linkend=\"sec:hook:"
692.14321 +"update\"/>)"
692.14322 +msgstr ""
692.14323 +
692.14324 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.14325 +#: ../en/ch10-hook.xml:1851
692.14326 +msgid "<literal role=\"hook\">tag</literal>&emdash;after tagging a changeset"
692.14327 +msgstr "<literal role=\"hook\">tag</literal>—创建标签之后"
692.14328 +
692.14329 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14330 +#: ../en/ch10-hook.xml:1854
692.14331 +msgid "This hook is run after a tag has been created."
692.14332 +msgstr ""
692.14333 +
692.14334 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14335 +#: ../en/ch10-hook.xml:1860
692.14336 +msgid ""
692.14337 +"<literal>local</literal>: A boolean.  Whether the new tag is local to this "
692.14338 +"repository instance (i.e.  stored in <filename role=\"special\">.hg/"
692.14339 +"localtags</filename>) or managed by Mercurial (stored in <filename role="
692.14340 +"\"special\">.hgtags</filename>)."
692.14341 +msgstr ""
692.14342 +
692.14343 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14344 +#: ../en/ch10-hook.xml:1868
692.14345 +msgid ""
692.14346 +"<literal>node</literal>: A changeset ID.  The ID of the changeset that was "
692.14347 +"tagged."
692.14348 +msgstr ""
692.14349 +
692.14350 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14351 +#: ../en/ch10-hook.xml:1872
692.14352 +msgid "<literal>tag</literal>: A string.  The name of the tag that was created."
692.14353 +msgstr ""
692.14354 +
692.14355 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14356 +#: ../en/ch10-hook.xml:1877
692.14357 +msgid ""
692.14358 +"If the created tag is revision-controlled, the <literal role=\"hook\">commit</"
692.14359 +"literal> hook (section <xref linkend=\"sec:hook:commit\"/>) is run before "
692.14360 +"this hook."
692.14361 +msgstr ""
692.14362 +
692.14363 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14364 +#: ../en/ch10-hook.xml:1882
692.14365 +msgid ""
692.14366 +"See also: <literal role=\"hook\">pretag</literal> (<xref linkend=\"sec:hook:"
692.14367 +"pretag\"/>)"
692.14368 +msgstr ""
692.14369 +"参见: <literal role=\"hook\">pretag</literal> (<xref linkend=\"sec:hook:pretag"
692.14370 +"\"/>)"
692.14371 +
692.14372 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.14373 +#: ../en/ch10-hook.xml:1888
692.14374 +msgid ""
692.14375 +"<literal role=\"hook\">update</literal>&emdash;after updating or merging "
692.14376 +"working directory"
692.14377 +msgstr "<literal role=\"hook\">update</literal>—更新或合并工作目录之后"
692.14378 +
692.14379 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14380 +#: ../en/ch10-hook.xml:1891
692.14381 +msgid ""
692.14382 +"This hook is run after an update or merge of the working directory "
692.14383 +"completes.  Since a merge can fail (if the external <command>hgmerge</"
692.14384 +"command> command fails to resolve conflicts in a file), this hook "
692.14385 +"communicates whether the update or merge completed cleanly."
692.14386 +msgstr ""
692.14387 +
692.14388 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14389 +#: ../en/ch10-hook.xml:1899
692.14390 +msgid ""
692.14391 +"<literal>error</literal>: A boolean.  Indicates whether the update or merge "
692.14392 +"completed successfully."
692.14393 +msgstr ""
692.14394 +
692.14395 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14396 +#: ../en/ch10-hook.xml:1904
692.14397 +msgid ""
692.14398 +"<literal>parent1</literal>: A changeset ID.  The ID of the parent that the "
692.14399 +"working directory was updated to.  If the working directory was merged, it "
692.14400 +"will not have changed this parent."
692.14401 +msgstr ""
692.14402 +
692.14403 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.14404 +#: ../en/ch10-hook.xml:1910
692.14405 +msgid ""
692.14406 +"<literal>parent2</literal>: A changeset ID.  Only set if the working "
692.14407 +"directory was merged.  The ID of the revision that the working directory was "
692.14408 +"merged with."
692.14409 +msgstr ""
692.14410 +
692.14411 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14412 +#: ../en/ch10-hook.xml:1916
692.14413 +msgid ""
692.14414 +"See also: <literal role=\"hook\">preupdate</literal> (<xref linkend=\"sec:"
692.14415 +"hook:preupdate\"/>)"
692.14416 +msgstr ""
692.14417 +
692.14418 +#. type: Content of: <book><chapter><title>
692.14419 +#: ../en/ch11-template.xml:5
692.14420 +msgid "Customizing the output of Mercurial"
692.14421 +msgstr "定制 Mercurial 的输出"
692.14422 +
692.14423 +#. type: Content of: <book><chapter><para>
692.14424 +#: ../en/ch11-template.xml:7
692.14425 +msgid ""
692.14426 +"Mercurial provides a powerful mechanism to let you control how it displays "
692.14427 +"information.  The mechanism is based on templates.  You can use templates to "
692.14428 +"generate specific output for a single command, or to customize the entire "
692.14429 +"appearance of the built-in web interface."
692.14430 +msgstr ""
692.14431 +
692.14432 +#. type: Content of: <book><chapter><sect1><title>
692.14433 +#: ../en/ch11-template.xml:14
692.14434 +msgid "Using precanned output styles"
692.14435 +msgstr "使用预定义的输出样式"
692.14436 +
692.14437 +#. type: Content of: <book><chapter><sect1><para>
692.14438 +#: ../en/ch11-template.xml:16
692.14439 +msgid ""
692.14440 +"Packaged with Mercurial are some output styles that you can use immediately.  "
692.14441 +"A style is simply a precanned template that someone wrote and installed "
692.14442 +"somewhere that Mercurial can find."
692.14443 +msgstr ""
692.14444 +
692.14445 +#. type: Content of: <book><chapter><sect1><para>
692.14446 +#: ../en/ch11-template.xml:21
692.14447 +msgid ""
692.14448 +"Before we take a look at Mercurial's bundled styles, let's review its normal "
692.14449 +"output."
692.14450 +msgstr ""
692.14451 +
692.14452 +#. type: Content of: <book><chapter><sect1><para>
692.14453 +#: ../en/ch11-template.xml:26
692.14454 +msgid ""
692.14455 +"This is somewhat informative, but it takes up a lot of space&emdash;five "
692.14456 +"lines of output per changeset.  The <literal>compact</literal> style reduces "
692.14457 +"this to three lines, presented in a sparse manner."
692.14458 +msgstr ""
692.14459 +
692.14460 +#. type: Content of: <book><chapter><sect1><para>
692.14461 +#: ../en/ch11-template.xml:33
692.14462 +msgid ""
692.14463 +"The <literal>changelog</literal> style hints at the expressive power of "
692.14464 +"Mercurial's templating engine.  This style attempts to follow the GNU "
692.14465 +"Project's changelog guidelines<citation>web:changelog</citation>."
692.14466 +msgstr ""
692.14467 +
692.14468 +#. type: Content of: <book><chapter><sect1><para>
692.14469 +#: ../en/ch11-template.xml:40
692.14470 +msgid ""
692.14471 +"You will not be shocked to learn that Mercurial's default output style is "
692.14472 +"named <literal>default</literal>."
692.14473 +msgstr ""
692.14474 +
692.14475 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.14476 +#: ../en/ch11-template.xml:44
692.14477 +msgid "Setting a default style"
692.14478 +msgstr "设置默认样式"
692.14479 +
692.14480 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14481 +#: ../en/ch11-template.xml:46
692.14482 +msgid ""
692.14483 +"You can modify the output style that Mercurial will use for every command by "
692.14484 +"editing your <filename role=\"special\">~/.hgrc</filename> file, naming the "
692.14485 +"style you would prefer to use."
692.14486 +msgstr ""
692.14487 +
692.14488 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14489 +#: ../en/ch11-template.xml:54
692.14490 +msgid ""
692.14491 +"If you write a style of your own, you can use it by either providing the path "
692.14492 +"to your style file, or copying your style file into a location where "
692.14493 +"Mercurial can find it (typically the <literal>templates</literal> "
692.14494 +"subdirectory of your Mercurial install directory)."
692.14495 +msgstr ""
692.14496 +
692.14497 +#. type: Content of: <book><chapter><sect1><title>
692.14498 +#: ../en/ch11-template.xml:63
692.14499 +msgid "Commands that support styles and templates"
692.14500 +msgstr "支持样式和模版的命令"
692.14501 +
692.14502 +#. type: Content of: <book><chapter><sect1><para>
692.14503 +#: ../en/ch11-template.xml:65
692.14504 +msgid ""
692.14505 +"All of Mercurial's <quote><literal>log</literal>-like</quote> commands let "
692.14506 +"you use styles and templates: <command role=\"hg-cmd\">hg incoming</command>, "
692.14507 +"<command role=\"hg-cmd\">hg log</command>, <command role=\"hg-cmd\">hg "
692.14508 +"outgoing</command>, and <command role=\"hg-cmd\">hg tip</command>."
692.14509 +msgstr ""
692.14510 +
692.14511 +#. type: Content of: <book><chapter><sect1><para>
692.14512 +#: ../en/ch11-template.xml:72
692.14513 +msgid ""
692.14514 +"As I write this manual, these are so far the only commands that support "
692.14515 +"styles and templates.  Since these are the most important commands that need "
692.14516 +"customizable output, there has been little pressure from the Mercurial user "
692.14517 +"community to add style and template support to other commands."
692.14518 +msgstr ""
692.14519 +
692.14520 +#. type: Content of: <book><chapter><sect1><title>
692.14521 +#: ../en/ch11-template.xml:80
692.14522 +msgid "The basics of templating"
692.14523 +msgstr "模版基础"
692.14524 +
692.14525 +#. type: Content of: <book><chapter><sect1><para>
692.14526 +#: ../en/ch11-template.xml:82
692.14527 +msgid ""
692.14528 +"At its simplest, a Mercurial template is a piece of text.  Some of the text "
692.14529 +"never changes, while other parts are <emphasis>expanded</emphasis>, or "
692.14530 +"replaced with new text, when necessary."
692.14531 +msgstr ""
692.14532 +
692.14533 +#. type: Content of: <book><chapter><sect1><para>
692.14534 +#: ../en/ch11-template.xml:87
692.14535 +msgid ""
692.14536 +"Before we continue, let's look again at a simple example of Mercurial's "
692.14537 +"normal output."
692.14538 +msgstr ""
692.14539 +
692.14540 +#. type: Content of: <book><chapter><sect1><para>
692.14541 +#: ../en/ch11-template.xml:92
692.14542 +msgid ""
692.14543 +"Now, let's run the same command, but using a template to change its output."
692.14544 +msgstr ""
692.14545 +
692.14546 +#. type: Content of: <book><chapter><sect1><para>
692.14547 +#: ../en/ch11-template.xml:97
692.14548 +msgid ""
692.14549 +"The example above illustrates the simplest possible template; it's just a "
692.14550 +"piece of static text, printed once for each changeset.  The <option role=\"hg-"
692.14551 +"opt-log\">--template</option> option to the <command role=\"hg-cmd\">hg log</"
692.14552 +"command> command tells Mercurial to use the given text as the template when "
692.14553 +"printing each changeset."
692.14554 +msgstr ""
692.14555 +
692.14556 +#. type: Content of: <book><chapter><sect1><para>
692.14557 +#: ../en/ch11-template.xml:105
692.14558 +msgid ""
692.14559 +"Notice that the template string above ends with the text <quote><literal>\\n</"
692.14560 +"literal></quote>.  This is an <emphasis>escape sequence</emphasis>, telling "
692.14561 +"Mercurial to print a newline at the end of each template item.  If you omit "
692.14562 +"this newline, Mercurial will run each piece of output together.  See <xref "
692.14563 +"linkend=\"sec:template:escape\"/> for more details of escape sequences."
692.14564 +msgstr ""
692.14565 +
692.14566 +#. type: Content of: <book><chapter><sect1><para>
692.14567 +#: ../en/ch11-template.xml:113
692.14568 +msgid ""
692.14569 +"A template that prints a fixed string of text all the time isn't very useful; "
692.14570 +"let's try something a bit more complex."
692.14571 +msgstr ""
692.14572 +
692.14573 +#. type: Content of: <book><chapter><sect1><para>
692.14574 +#: ../en/ch11-template.xml:119
692.14575 +msgid ""
692.14576 +"As you can see, the string <quote><literal>{desc}</literal></quote> in the "
692.14577 +"template has been replaced in the output with the description of each "
692.14578 +"changeset.  Every time Mercurial finds text enclosed in curly braces "
692.14579 +"(<quote><literal>{</literal></quote> and <quote><literal>}</literal></"
692.14580 +"quote>), it will try to replace the braces and text with the expansion of "
692.14581 +"whatever is inside.  To print a literal curly brace, you must escape it, as "
692.14582 +"described in <xref linkend=\"sec:template:escape\"/>."
692.14583 +msgstr ""
692.14584 +
692.14585 +#. type: Content of: <book><chapter><sect1><title>
692.14586 +#: ../en/ch11-template.xml:131
692.14587 +msgid "Common template keywords"
692.14588 +msgstr "模版关键字"
692.14589 +
692.14590 +#. type: Content of: <book><chapter><sect1><para>
692.14591 +#: ../en/ch11-template.xml:133
692.14592 +msgid ""
692.14593 +"You can start writing simple templates immediately using the keywords below."
692.14594 +msgstr ""
692.14595 +
692.14596 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14597 +#: ../en/ch11-template.xml:137
692.14598 +msgid ""
692.14599 +"<literal role=\"template-keyword\">author</literal>: String.  The unmodified "
692.14600 +"author of the changeset."
692.14601 +msgstr ""
692.14602 +
692.14603 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14604 +#: ../en/ch11-template.xml:141
692.14605 +msgid ""
692.14606 +"<literal role=\"template-keyword\">branches</literal>: String.  The name of "
692.14607 +"the branch on which the changeset was committed.  Will be empty if the branch "
692.14608 +"name was <literal>default</literal>."
692.14609 +msgstr ""
692.14610 +
692.14611 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14612 +#: ../en/ch11-template.xml:147
692.14613 +msgid ""
692.14614 +"<literal role=\"template-keyword\">date</literal>: Date information.  The "
692.14615 +"date when the changeset was committed.  This is <emphasis>not</emphasis> "
692.14616 +"human-readable; you must pass it through a filter that will render it "
692.14617 +"appropriately.  See <xref linkend=\"sec:template:filter\"/> for more "
692.14618 +"information on filters. The date is expressed as a pair of numbers.  The "
692.14619 +"first number is a Unix UTC timestamp (seconds since January 1, 1970); the "
692.14620 +"second is the offset of the committer's timezone from UTC, in seconds."
692.14621 +msgstr ""
692.14622 +
692.14623 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14624 +#: ../en/ch11-template.xml:158
692.14625 +msgid ""
692.14626 +"<literal role=\"template-keyword\">desc</literal>: String.  The text of the "
692.14627 +"changeset description."
692.14628 +msgstr ""
692.14629 +
692.14630 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14631 +#: ../en/ch11-template.xml:161
692.14632 +msgid ""
692.14633 +"<literal role=\"template-keyword\">files</literal>: List of strings.  All "
692.14634 +"files modified, added, or removed by this changeset."
692.14635 +msgstr ""
692.14636 +
692.14637 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14638 +#: ../en/ch11-template.xml:166
692.14639 +msgid ""
692.14640 +"<literal role=\"template-keyword\">file_adds</literal>: List of strings.  "
692.14641 +"Files added by this changeset."
692.14642 +msgstr ""
692.14643 +
692.14644 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14645 +#: ../en/ch11-template.xml:170
692.14646 +msgid ""
692.14647 +"<literal role=\"template-keyword\">file_dels</literal>: List of strings.  "
692.14648 +"Files removed by this changeset."
692.14649 +msgstr ""
692.14650 +
692.14651 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14652 +#: ../en/ch11-template.xml:174
692.14653 +msgid ""
692.14654 +"<literal role=\"template-keyword\">node</literal>: String.  The changeset "
692.14655 +"identification hash, as a 40-character hexadecimal string."
692.14656 +msgstr ""
692.14657 +
692.14658 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14659 +#: ../en/ch11-template.xml:178
692.14660 +msgid ""
692.14661 +"<literal role=\"template-keyword\">parents</literal>: List of strings.  The "
692.14662 +"parents of the changeset."
692.14663 +msgstr ""
692.14664 +
692.14665 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14666 +#: ../en/ch11-template.xml:182
692.14667 +msgid ""
692.14668 +"<literal role=\"template-keyword\">rev</literal>: Integer.  The repository-"
692.14669 +"local changeset revision number."
692.14670 +msgstr ""
692.14671 +
692.14672 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14673 +#: ../en/ch11-template.xml:186
692.14674 +msgid ""
692.14675 +"<literal role=\"template-keyword\">tags</literal>: List of strings.  Any tags "
692.14676 +"associated with the changeset."
692.14677 +msgstr ""
692.14678 +
692.14679 +#. type: Content of: <book><chapter><sect1><para>
692.14680 +#: ../en/ch11-template.xml:192
692.14681 +msgid ""
692.14682 +"A few simple experiments will show us what to expect when we use these "
692.14683 +"keywords; you can see the results below."
692.14684 +msgstr ""
692.14685 +
692.14686 +#. type: Content of: <book><chapter><sect1><para>
692.14687 +#: ../en/ch11-template.xml:197
692.14688 +msgid ""
692.14689 +"As we noted above, the date keyword does not produce human-readable output, "
692.14690 +"so we must treat it specially.  This involves using a <emphasis>filter</"
692.14691 +"emphasis>, about which more in <xref linkend=\"sec:template:filter\"/>."
692.14692 +msgstr ""
692.14693 +
692.14694 +#. type: Content of: <book><chapter><sect1><title>
692.14695 +#: ../en/ch11-template.xml:206
692.14696 +msgid "Escape sequences"
692.14697 +msgstr "转义序列"
692.14698 +
692.14699 +#. type: Content of: <book><chapter><sect1><para>
692.14700 +#: ../en/ch11-template.xml:208
692.14701 +msgid ""
692.14702 +"Mercurial's templating engine recognises the most commonly used escape "
692.14703 +"sequences in strings.  When it sees a backslash (<quote><literal>\\</"
692.14704 +"literal></quote>) character, it looks at the following character and "
692.14705 +"substitutes the two characters with a single replacement, as described below."
692.14706 +msgstr ""
692.14707 +
692.14708 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14709 +#: ../en/ch11-template.xml:215
692.14710 +msgid ""
692.14711 +"<literal>\\</literal>: Backslash, <quote><literal>\\</literal></quote>, ASCII "
692.14712 +"134."
692.14713 +msgstr ""
692.14714 +
692.14715 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14716 +#: ../en/ch11-template.xml:219
692.14717 +msgid "<literal>\\n</literal>: Newline, ASCII 12."
692.14718 +msgstr ""
692.14719 +
692.14720 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14721 +#: ../en/ch11-template.xml:222
692.14722 +msgid "<literal>\\r</literal>: Carriage return, ASCII 15."
692.14723 +msgstr ""
692.14724 +
692.14725 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14726 +#: ../en/ch11-template.xml:225
692.14727 +msgid "<literal>\\t</literal>: Tab, ASCII 11."
692.14728 +msgstr ""
692.14729 +
692.14730 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14731 +#: ../en/ch11-template.xml:228
692.14732 +msgid "<literal>\\v</literal>: Vertical tab, ASCII 13."
692.14733 +msgstr ""
692.14734 +
692.14735 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14736 +#: ../en/ch11-template.xml:231
692.14737 +msgid ""
692.14738 +"<literal>\\{</literal>: Open curly brace, <quote><literal>{</literal></"
692.14739 +"quote>, ASCII 173."
692.14740 +msgstr ""
692.14741 +
692.14742 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14743 +#: ../en/ch11-template.xml:235
692.14744 +msgid ""
692.14745 +"<literal>\\}</literal>: Close curly brace, <quote><literal>}</literal></"
692.14746 +"quote>, ASCII 175."
692.14747 +msgstr ""
692.14748 +
692.14749 +#. type: Content of: <book><chapter><sect1><para>
692.14750 +#: ../en/ch11-template.xml:240
692.14751 +msgid ""
692.14752 +"As indicated above, if you want the expansion of a template to contain a "
692.14753 +"literal <quote><literal>\\</literal></quote>, <quote><literal>{</literal></"
692.14754 +"quote>, or <quote><literal>{</literal></quote> character, you must escape it."
692.14755 +msgstr ""
692.14756 +
692.14757 +#. type: Content of: <book><chapter><sect1><title>
692.14758 +#: ../en/ch11-template.xml:248
692.14759 +msgid "Filtering keywords to change their results"
692.14760 +msgstr "通过过滤关键字来修改输出结果"
692.14761 +
692.14762 +#. type: Content of: <book><chapter><sect1><para>
692.14763 +#: ../en/ch11-template.xml:250
692.14764 +msgid ""
692.14765 +"Some of the results of template expansion are not immediately easy to use.  "
692.14766 +"Mercurial lets you specify an optional chain of <emphasis>filters</emphasis> "
692.14767 +"to modify the result of expanding a keyword.  You have already seen a common "
692.14768 +"filter, <literal role=\"template-kw-filt-date\">isodate</literal>, in action "
692.14769 +"above, to make a date readable."
692.14770 +msgstr ""
692.14771 +
692.14772 +#. type: Content of: <book><chapter><sect1><para>
692.14773 +#: ../en/ch11-template.xml:257
692.14774 +msgid ""
692.14775 +"Below is a list of the most commonly used filters that Mercurial supports.  "
692.14776 +"While some filters can be applied to any text, others can only be used in "
692.14777 +"specific circumstances.  The name of each filter is followed first by an "
692.14778 +"indication of where it can be used, then a description of its effect."
692.14779 +msgstr ""
692.14780 +
692.14781 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14782 +#: ../en/ch11-template.xml:264
692.14783 +msgid ""
692.14784 +"<literal role=\"template-filter\">addbreaks</literal>: Any text. Add an XHTML "
692.14785 +"<quote><literal>&lt;br/&gt;</literal></quote> tag before the end of every "
692.14786 +"line except the last.  For example, <quote><literal>foo\\nbar</literal></"
692.14787 +"quote> becomes <quote><literal>foo&lt;br/&gt;\\nbar</literal></quote>."
692.14788 +msgstr ""
692.14789 +
692.14790 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14791 +#: ../en/ch11-template.xml:271
692.14792 +msgid ""
692.14793 +"<literal role=\"template-kw-filt-date\">age</literal>: <literal role="
692.14794 +"\"template-keyword\">date</literal> keyword.  Render the age of the date, "
692.14795 +"relative to the current time.  Yields a string like <quote><literal>10 "
692.14796 +"minutes</literal></quote>."
692.14797 +msgstr ""
692.14798 +
692.14799 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14800 +#: ../en/ch11-template.xml:278
692.14801 +msgid ""
692.14802 +"<literal role=\"template-filter\">basename</literal>: Any text, but most "
692.14803 +"useful for the <literal role=\"template-keyword\">files</literal> keyword and "
692.14804 +"its relatives.  Treat the text as a path, and return the basename. For "
692.14805 +"example, <quote><literal>foo/bar/baz</literal></quote> becomes "
692.14806 +"<quote><literal>baz</literal></quote>."
692.14807 +msgstr ""
692.14808 +
692.14809 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14810 +#: ../en/ch11-template.xml:287
692.14811 +msgid ""
692.14812 +"<literal role=\"template-kw-filt-date\">date</literal>: <literal role="
692.14813 +"\"template-keyword\">date</literal> keyword.  Render a date in a similar "
692.14814 +"format to the Unix <literal role=\"template-keyword\">date</literal> command, "
692.14815 +"but with timezone included.  Yields a string like <quote><literal>Mon Sep 04 "
692.14816 +"15:13:13 2006 -0700</literal></quote>."
692.14817 +msgstr ""
692.14818 +
692.14819 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14820 +#: ../en/ch11-template.xml:295
692.14821 +msgid ""
692.14822 +"<literal role=\"template-kw-filt-author\">domain</literal>: Any text, but "
692.14823 +"most useful for the <literal role=\"template-keyword\">author</literal> "
692.14824 +"keyword.  Finds the first string that looks like an email address, and "
692.14825 +"extract just the domain component.  For example, <quote><literal>Bryan "
692.14826 +"O'Sullivan &lt;bos@serpentine.com&gt;</literal></quote> becomes "
692.14827 +"<quote><literal>serpentine.com</literal></quote>."
692.14828 +msgstr ""
692.14829 +
692.14830 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14831 +#: ../en/ch11-template.xml:305
692.14832 +msgid ""
692.14833 +"<literal role=\"template-kw-filt-author\">email</literal>: Any text, but most "
692.14834 +"useful for the <literal role=\"template-keyword\">author</literal> keyword.  "
692.14835 +"Extract the first string that looks like an email address.  For example, "
692.14836 +"<quote><literal>Bryan O'Sullivan &lt;bos@serpentine.com&gt;</literal></quote> "
692.14837 +"becomes <quote><literal>bos@serpentine.com</literal></quote>."
692.14838 +msgstr ""
692.14839 +
692.14840 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14841 +#: ../en/ch11-template.xml:314
692.14842 +msgid ""
692.14843 +"<literal role=\"template-filter\">escape</literal>: Any text.  Replace the "
692.14844 +"special XML/XHTML characters <quote><literal>&amp;</literal></quote>, "
692.14845 +"<quote><literal>&lt;</literal></quote> and <quote><literal>&gt;</literal></"
692.14846 +"quote> with XML entities."
692.14847 +msgstr ""
692.14848 +
692.14849 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14850 +#: ../en/ch11-template.xml:322
692.14851 +msgid ""
692.14852 +"<literal role=\"template-filter\">fill68</literal>: Any text.  Wrap the text "
692.14853 +"to fit in 68 columns.  This is useful before you pass text through the "
692.14854 +"<literal role=\"template-filter\">tabindent</literal> filter, and still want "
692.14855 +"it to fit in an 80-column fixed-font window."
692.14856 +msgstr ""
692.14857 +
692.14858 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14859 +#: ../en/ch11-template.xml:330
692.14860 +msgid ""
692.14861 +"<literal role=\"template-filter\">fill76</literal>: Any text.  Wrap the text "
692.14862 +"to fit in 76 columns."
692.14863 +msgstr ""
692.14864 +
692.14865 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14866 +#: ../en/ch11-template.xml:334
692.14867 +msgid ""
692.14868 +"<literal role=\"template-filter\">firstline</literal>: Any text.  Yield the "
692.14869 +"first line of text, without any trailing newlines."
692.14870 +msgstr ""
692.14871 +
692.14872 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14873 +#: ../en/ch11-template.xml:339
692.14874 +msgid ""
692.14875 +"<literal role=\"template-kw-filt-date\">hgdate</literal>: <literal role="
692.14876 +"\"template-keyword\">date</literal> keyword.  Render the date as a pair of "
692.14877 +"readable numbers.  Yields a string like <quote><literal>1157407993 25200</"
692.14878 +"literal></quote>."
692.14879 +msgstr ""
692.14880 +
692.14881 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14882 +#: ../en/ch11-template.xml:346
692.14883 +msgid ""
692.14884 +"<literal role=\"template-kw-filt-date\">isodate</literal>: <literal role="
692.14885 +"\"template-keyword\">date</literal> keyword.  Render the date as a text "
692.14886 +"string in ISO 8601 format.  Yields a string like <quote><literal>2006-09-04 "
692.14887 +"15:13:13 -0700</literal></quote>."
692.14888 +msgstr ""
692.14889 +
692.14890 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14891 +#: ../en/ch11-template.xml:353
692.14892 +msgid ""
692.14893 +"<literal role=\"template-filter\">obfuscate</literal>: Any text, but most "
692.14894 +"useful for the <literal role=\"template-keyword\">author</literal> keyword.  "
692.14895 +"Yield the input text rendered as a sequence of XML entities.  This helps to "
692.14896 +"defeat some particularly stupid screen-scraping email harvesting spambots."
692.14897 +msgstr ""
692.14898 +
692.14899 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14900 +#: ../en/ch11-template.xml:361
692.14901 +msgid ""
692.14902 +"<literal role=\"template-kw-filt-author\">person</literal>: Any text, but "
692.14903 +"most useful for the <literal role=\"template-keyword\">author</literal> "
692.14904 +"keyword.  Yield the text before an email address. For example, "
692.14905 +"<quote><literal>Bryan O'Sullivan &lt;bos@serpentine.com&gt;</literal></quote> "
692.14906 +"becomes <quote><literal>Bryan O'Sullivan</literal></quote>."
692.14907 +msgstr ""
692.14908 +
692.14909 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14910 +#: ../en/ch11-template.xml:370
692.14911 +msgid ""
692.14912 +"<literal role=\"template-kw-filt-date\">rfc822date</literal>: <literal role="
692.14913 +"\"template-keyword\">date</literal> keyword.  Render a date using the same "
692.14914 +"format used in email headers.  Yields a string like <quote><literal>Mon, 04 "
692.14915 +"Sep 2006 15:13:13 -0700</literal></quote>."
692.14916 +msgstr ""
692.14917 +
692.14918 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14919 +#: ../en/ch11-template.xml:377
692.14920 +msgid ""
692.14921 +"<literal role=\"template-kw-filt-node\">short</literal>: Changeset hash.  "
692.14922 +"Yield the short form of a changeset hash, i.e. a 12-character hexadecimal "
692.14923 +"string."
692.14924 +msgstr ""
692.14925 +
692.14926 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14927 +#: ../en/ch11-template.xml:382
692.14928 +msgid ""
692.14929 +"<literal role=\"template-kw-filt-date\">shortdate</literal>: <literal role="
692.14930 +"\"template-keyword\">date</literal> keyword.  Render the year, month, and day "
692.14931 +"of the date.  Yields a string like <quote><literal>2006-09-04</literal></"
692.14932 +"quote>."
692.14933 +msgstr ""
692.14934 +
692.14935 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14936 +#: ../en/ch11-template.xml:388
692.14937 +msgid ""
692.14938 +"<literal role=\"template-filter\">strip</literal>: Any text.  Strip all "
692.14939 +"leading and trailing whitespace from the string."
692.14940 +msgstr ""
692.14941 +
692.14942 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14943 +#: ../en/ch11-template.xml:392
692.14944 +msgid ""
692.14945 +"<literal role=\"template-filter\">tabindent</literal>: Any text.  Yield the "
692.14946 +"text, with every line except the first starting with a tab character."
692.14947 +msgstr ""
692.14948 +
692.14949 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14950 +#: ../en/ch11-template.xml:397
692.14951 +msgid ""
692.14952 +"<literal role=\"template-filter\">urlescape</literal>: Any text.  Escape all "
692.14953 +"characters that are considered <quote>special</quote> by URL parsers.  For "
692.14954 +"example, <literal>foo bar</literal> becomes <literal>foo%20bar</literal>."
692.14955 +msgstr ""
692.14956 +
692.14957 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.14958 +#: ../en/ch11-template.xml:404
692.14959 +msgid ""
692.14960 +"<literal role=\"template-kw-filt-author\">user</literal>: Any text, but most "
692.14961 +"useful for the <literal role=\"template-keyword\">author</literal> keyword.  "
692.14962 +"Return the <quote>user</quote> portion of an email address.  For example, "
692.14963 +"<quote><literal>Bryan O'Sullivan &lt;bos@serpentine.com&gt;</literal></quote> "
692.14964 +"becomes <quote><literal>bos</literal></quote>."
692.14965 +msgstr ""
692.14966 +
692.14967 +#. type: Content of: <book><chapter><sect1><note><para>
692.14968 +#: ../en/ch11-template.xml:418
692.14969 +msgid ""
692.14970 +"If you try to apply a filter to a piece of data that it cannot process, "
692.14971 +"Mercurial will fail and print a Python exception.  For example, trying to run "
692.14972 +"the output of the <literal role=\"template-keyword\">desc</literal> keyword "
692.14973 +"into the <literal role=\"template-kw-filt-date\">isodate</literal> filter is "
692.14974 +"not a good idea."
692.14975 +msgstr ""
692.14976 +
692.14977 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.14978 +#: ../en/ch11-template.xml:427
692.14979 +msgid "Combining filters"
692.14980 +msgstr "组合过滤器"
692.14981 +
692.14982 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14983 +#: ../en/ch11-template.xml:429
692.14984 +msgid ""
692.14985 +"It is easy to combine filters to yield output in the form you would like.  "
692.14986 +"The following chain of filters tidies up a description, then makes sure that "
692.14987 +"it fits cleanly into 68 columns, then indents it by a further 8 characters "
692.14988 +"(at least on Unix-like systems, where a tab is conventionally 8 characters "
692.14989 +"wide)."
692.14990 +msgstr ""
692.14991 +
692.14992 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.14993 +#: ../en/ch11-template.xml:438
692.14994 +msgid ""
692.14995 +"Note the use of <quote><literal>\\t</literal></quote> (a tab character) in "
692.14996 +"the template to force the first line to be indented; this is necessary since "
692.14997 +"<literal role=\"template-keyword\">tabindent</literal> indents all lines "
692.14998 +"<emphasis>except</emphasis> the first."
692.14999 +msgstr ""
692.15000 +
692.15001 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15002 +#: ../en/ch11-template.xml:444
692.15003 +msgid ""
692.15004 +"Keep in mind that the order of filters in a chain is significant.  The first "
692.15005 +"filter is applied to the result of the keyword; the second to the result of "
692.15006 +"the first filter; and so on.  For example, using <literal>fill68|tabindent</"
692.15007 +"literal> gives very different results from <literal>tabindent|fill68</"
692.15008 +"literal>."
692.15009 +msgstr ""
692.15010 +
692.15011 +#. type: Content of: <book><chapter><sect1><title>
692.15012 +#: ../en/ch11-template.xml:454
692.15013 +msgid "From templates to styles"
692.15014 +msgstr "从模版到样式"
692.15015 +
692.15016 +#. type: Content of: <book><chapter><sect1><para>
692.15017 +#: ../en/ch11-template.xml:456
692.15018 +msgid ""
692.15019 +"A command line template provides a quick and simple way to format some "
692.15020 +"output.  Templates can become verbose, though, and it's useful to be able to "
692.15021 +"give a template a name.  A style file is a template with a name, stored in a "
692.15022 +"file."
692.15023 +msgstr ""
692.15024 +
692.15025 +#. type: Content of: <book><chapter><sect1><para>
692.15026 +#: ../en/ch11-template.xml:461
692.15027 +msgid ""
692.15028 +"More than that, using a style file unlocks the power of Mercurial's "
692.15029 +"templating engine in ways that are not possible using the command line "
692.15030 +"<option role=\"hg-opt-log\">--template</option> option."
692.15031 +msgstr ""
692.15032 +
692.15033 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15034 +#: ../en/ch11-template.xml:467
692.15035 +msgid "The simplest of style files"
692.15036 +msgstr "最简单的样式文件"
692.15037 +
692.15038 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15039 +#: ../en/ch11-template.xml:469
692.15040 +msgid "Our simple style file contains just one line:"
692.15041 +msgstr ""
692.15042 +
692.15043 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15044 +#: ../en/ch11-template.xml:473
692.15045 +msgid ""
692.15046 +"This tells Mercurial, <quote>if you're printing a changeset, use the text on "
692.15047 +"the right as the template</quote>."
692.15048 +msgstr ""
692.15049 +
692.15050 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15051 +#: ../en/ch11-template.xml:479
692.15052 +msgid "Style file syntax"
692.15053 +msgstr "样式文件语法"
692.15054 +
692.15055 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15056 +#: ../en/ch11-template.xml:481
692.15057 +msgid "The syntax rules for a style file are simple."
692.15058 +msgstr ""
692.15059 +
692.15060 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15061 +#: ../en/ch11-template.xml:484
692.15062 +msgid "The file is processed one line at a time."
692.15063 +msgstr ""
692.15064 +
692.15065 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15066 +#: ../en/ch11-template.xml:487
692.15067 +msgid "Leading and trailing white space are ignored."
692.15068 +msgstr ""
692.15069 +
692.15070 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15071 +#: ../en/ch11-template.xml:490
692.15072 +msgid "Empty lines are skipped."
692.15073 +msgstr ""
692.15074 +
692.15075 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15076 +#: ../en/ch11-template.xml:492
692.15077 +msgid ""
692.15078 +"If a line starts with either of the characters <quote><literal>#</literal></"
692.15079 +"quote> or <quote><literal>;</literal></quote>, the entire line is treated as "
692.15080 +"a comment, and skipped as if empty."
692.15081 +msgstr ""
692.15082 +
692.15083 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15084 +#: ../en/ch11-template.xml:497
692.15085 +msgid ""
692.15086 +"A line starts with a keyword.  This must start with an alphabetic character "
692.15087 +"or underscore, and can subsequently contain any alphanumeric character or "
692.15088 +"underscore.  (In regexp notation, a keyword must match <literal>[A-Za-z_][A-"
692.15089 +"Za-z0-9_]*</literal>.)"
692.15090 +msgstr ""
692.15091 +
692.15092 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15093 +#: ../en/ch11-template.xml:503
692.15094 +msgid ""
692.15095 +"The next element must be an <quote><literal>=</literal></quote> character, "
692.15096 +"which can be preceded or followed by an arbitrary amount of white space."
692.15097 +msgstr ""
692.15098 +
692.15099 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15100 +#: ../en/ch11-template.xml:508
692.15101 +msgid ""
692.15102 +"If the rest of the line starts and ends with matching quote characters "
692.15103 +"(either single or double quote), it is treated as a template body."
692.15104 +msgstr ""
692.15105 +
692.15106 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15107 +#: ../en/ch11-template.xml:512
692.15108 +msgid ""
692.15109 +"If the rest of the line <emphasis>does not</emphasis> start with a quote "
692.15110 +"character, it is treated as the name of a file; the contents of this file "
692.15111 +"will be read and used as a template body."
692.15112 +msgstr ""
692.15113 +
692.15114 +#. type: Content of: <book><chapter><sect1><title>
692.15115 +#: ../en/ch11-template.xml:521
692.15116 +msgid "Style files by example"
692.15117 +msgstr "样式文件例子"
692.15118 +
692.15119 +#. type: Content of: <book><chapter><sect1><para>
692.15120 +#: ../en/ch11-template.xml:523
692.15121 +msgid ""
692.15122 +"To illustrate how to write a style file, we will construct a few by example.  "
692.15123 +"Rather than provide a complete style file and walk through it, we'll mirror "
692.15124 +"the usual process of developing a style file by starting with something very "
692.15125 +"simple, and walking through a series of successively more complete examples."
692.15126 +msgstr ""
692.15127 +
692.15128 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15129 +#: ../en/ch11-template.xml:530
692.15130 +msgid "Identifying mistakes in style files"
692.15131 +msgstr "在样式文件中定位错误"
692.15132 +
692.15133 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15134 +#: ../en/ch11-template.xml:532
692.15135 +msgid ""
692.15136 +"If Mercurial encounters a problem in a style file you are working on, it "
692.15137 +"prints a terse error message that, once you figure out what it means, is "
692.15138 +"actually quite useful."
692.15139 +msgstr ""
692.15140 +
692.15141 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15142 +#: ../en/ch11-template.xml:538
692.15143 +msgid ""
692.15144 +"Notice that <filename>broken.style</filename> attempts to define a "
692.15145 +"<literal>changeset</literal> keyword, but forgets to give any content for it. "
692.15146 +"When instructed to use this style file, Mercurial promptly complains."
692.15147 +msgstr ""
692.15148 +
692.15149 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15150 +#: ../en/ch11-template.xml:545
692.15151 +msgid "This error message looks intimidating, but it is not too hard to follow."
692.15152 +msgstr ""
692.15153 +
692.15154 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15155 +#: ../en/ch11-template.xml:549
692.15156 +msgid ""
692.15157 +"The first component is simply Mercurial's way of saying <quote>I am giving "
692.15158 +"up</quote>."
692.15159 +msgstr ""
692.15160 +
692.15161 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15162 +#: ../en/ch11-template.xml:553
692.15163 +msgid "Next comes the name of the style file that contains the error."
692.15164 +msgstr ""
692.15165 +
692.15166 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15167 +#: ../en/ch11-template.xml:557
692.15168 +msgid ""
692.15169 +"Following the file name is the line number where the error was encountered."
692.15170 +msgstr ""
692.15171 +
692.15172 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15173 +#: ../en/ch11-template.xml:561
692.15174 +msgid "Finally, a description of what went wrong."
692.15175 +msgstr ""
692.15176 +
692.15177 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15178 +#: ../en/ch11-template.xml:565
692.15179 +msgid ""
692.15180 +"The description of the problem is not always clear (as in this case), but "
692.15181 +"even when it is cryptic, it is almost always trivial to visually inspect the "
692.15182 +"offending line in the style file and see what is wrong."
692.15183 +msgstr ""
692.15184 +
692.15185 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15186 +#: ../en/ch11-template.xml:574
692.15187 +msgid "Uniquely identifying a repository"
692.15188 +msgstr "版本库的唯一标识"
692.15189 +
692.15190 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15191 +#: ../en/ch11-template.xml:576
692.15192 +msgid ""
692.15193 +"If you would like to be able to identify a Mercurial repository <quote>fairly "
692.15194 +"uniquely</quote> using a short string as an identifier, you can use the first "
692.15195 +"revision in the repository."
692.15196 +msgstr ""
692.15197 +
692.15198 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15199 +#: ../en/ch11-template.xml:583
692.15200 +msgid ""
692.15201 +"This is likely to be unique, and so it is useful in many cases.  There are a "
692.15202 +"few caveats."
692.15203 +msgstr ""
692.15204 +
692.15205 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15206 +#: ../en/ch11-template.xml:586
692.15207 +msgid ""
692.15208 +"It will not work in a completely empty repository, because such a repository "
692.15209 +"does not have a revision zero."
692.15210 +msgstr ""
692.15211 +
692.15212 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15213 +#: ../en/ch11-template.xml:590
692.15214 +msgid ""
692.15215 +"Neither will it work in the (extremely rare)  case where a repository is a "
692.15216 +"merge of two or more formerly independent repositories, and you still have "
692.15217 +"those repositories around."
692.15218 +msgstr ""
692.15219 +
692.15220 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15221 +#: ../en/ch11-template.xml:595
692.15222 +msgid "Here are some uses to which you could put this identifier:"
692.15223 +msgstr ""
692.15224 +
692.15225 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15226 +#: ../en/ch11-template.xml:598
692.15227 +msgid ""
692.15228 +"As a key into a table for a database that manages repositories on a server."
692.15229 +msgstr ""
692.15230 +
692.15231 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15232 +#: ../en/ch11-template.xml:601
692.15233 +msgid ""
692.15234 +"As half of a {<emphasis>repository ID</emphasis>, <emphasis>revision ID</"
692.15235 +"emphasis>} tuple.  Save this information away when you run an automated build "
692.15236 +"or other activity, so that you can <quote>replay</quote> the build later if "
692.15237 +"necessary."
692.15238 +msgstr ""
692.15239 +
692.15240 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15241 +#: ../en/ch11-template.xml:611
692.15242 +msgid "Listing files on multiple lines"
692.15243 +msgstr "每行列出一个文件"
692.15244 +
692.15245 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15246 +#: ../en/ch11-template.xml:613
692.15247 +msgid ""
692.15248 +"Suppose we want to list the files changed by a changeset, one per line, with "
692.15249 +"a little indentation before each file name."
692.15250 +msgstr ""
692.15251 +
692.15252 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15253 +#: ../en/ch11-template.xml:621
692.15254 +msgid "Mimicking Subversion's output"
692.15255 +msgstr "模仿 Subversion 的输出"
692.15256 +
692.15257 +#
692.15258 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15259 +#: ../en/ch11-template.xml:623
692.15260 +msgid ""
692.15261 +"Let's try to emulate the default output format used by another revision "
692.15262 +"control tool, Subversion."
692.15263 +msgstr ""
692.15264 +
692.15265 +#
692.15266 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15267 +#: ../en/ch11-template.xml:628
692.15268 +msgid ""
692.15269 +"Since Subversion's output style is fairly simple, it is easy to copy-and-"
692.15270 +"paste a hunk of its output into a file, and replace the text produced above "
692.15271 +"by Subversion with the template values we'd like to see expanded."
692.15272 +msgstr ""
692.15273 +
692.15274 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15275 +#: ../en/ch11-template.xml:635
692.15276 +msgid ""
692.15277 +"There are a few small ways in which this template deviates from the output "
692.15278 +"produced by Subversion."
692.15279 +msgstr ""
692.15280 +
692.15281 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15282 +#: ../en/ch11-template.xml:638
692.15283 +msgid ""
692.15284 +"Subversion prints a <quote>readable</quote> date (the <quote><literal>Wed, 27 "
692.15285 +"Sep 2006</literal></quote> in the example output above) in parentheses.  "
692.15286 +"Mercurial's templating engine does not provide a way to display a date in "
692.15287 +"this format without also printing the time and time zone."
692.15288 +msgstr ""
692.15289 +
692.15290 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15291 +#: ../en/ch11-template.xml:645
692.15292 +msgid ""
692.15293 +"We emulate Subversion's printing of <quote>separator</quote> lines full of "
692.15294 +"<quote><literal>-</literal></quote> characters by ending the template with "
692.15295 +"such a line. We use the templating engine's <literal role=\"template-keyword"
692.15296 +"\">header</literal> keyword to print a separator line as the first line of "
692.15297 +"output (see below), thus achieving similar output to Subversion."
692.15298 +msgstr ""
692.15299 +
692.15300 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15301 +#: ../en/ch11-template.xml:654
692.15302 +msgid ""
692.15303 +"Subversion's output includes a count in the header of the number of lines in "
692.15304 +"the commit message.  We cannot replicate this in Mercurial; the templating "
692.15305 +"engine does not currently provide a filter that counts the number of lines "
692.15306 +"the template generates."
692.15307 +msgstr ""
692.15308 +
692.15309 +#
692.15310 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15311 +#: ../en/ch11-template.xml:660
692.15312 +msgid ""
692.15313 +"It took me no more than a minute or two of work to replace literal text from "
692.15314 +"an example of Subversion's output with some keywords and filters to give the "
692.15315 +"template above.  The style file simply refers to the template."
692.15316 +msgstr ""
692.15317 +
692.15318 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15319 +#: ../en/ch11-template.xml:667
692.15320 +msgid ""
692.15321 +"We could have included the text of the template file directly in the style "
692.15322 +"file by enclosing it in quotes and replacing the newlines with "
692.15323 +"<quote><literal>\\n</literal></quote> sequences, but it would have made the "
692.15324 +"style file too difficult to read.  Readability is a good guide when you're "
692.15325 +"trying to decide whether some text belongs in a style file, or in a template "
692.15326 +"file that the style file points to.  If the style file will look too big or "
692.15327 +"cluttered if you insert a literal piece of text, drop it into a template "
692.15328 +"instead."
692.15329 +msgstr ""
692.15330 +
692.15331 +#. type: Content of: <book><chapter><title>
692.15332 +#: ../en/ch12-mq.xml:5
692.15333 +msgid "Managing change with Mercurial Queues"
692.15334 +msgstr "使用 MQ 管理修改"
692.15335 +
692.15336 +#. type: Content of: <book><chapter><sect1><title>
692.15337 +#: ../en/ch12-mq.xml:8
692.15338 +msgid "The patch management problem"
692.15339 +msgstr "补丁的管理问题"
692.15340 +
692.15341 +#. type: Content of: <book><chapter><sect1><para>
692.15342 +#: ../en/ch12-mq.xml:10
692.15343 +msgid ""
692.15344 +"Here is a common scenario: you need to install a software package from "
692.15345 +"source, but you find a bug that you must fix in the source before you can "
692.15346 +"start using the package.  You make your changes, forget about the package for "
692.15347 +"a while, and a few months later you need to upgrade to a newer version of the "
692.15348 +"package.  If the newer version of the package still has the bug, you must "
692.15349 +"extract your fix from the older source tree and apply it against the newer "
692.15350 +"version.  This is a tedious task, and it's easy to make mistakes."
692.15351 +msgstr ""
692.15352 +
692.15353 +#. type: Content of: <book><chapter><sect1><para>
692.15354 +#: ../en/ch12-mq.xml:20
692.15355 +msgid ""
692.15356 +"This is a simple case of the <quote>patch management</quote> problem.  You "
692.15357 +"have an <quote>upstream</quote> source tree that you can't change; you need "
692.15358 +"to make some local changes on top of the upstream tree; and you'd like to be "
692.15359 +"able to keep those changes separate, so that you can apply them to newer "
692.15360 +"versions of the upstream source."
692.15361 +msgstr ""
692.15362 +
692.15363 +#. type: Content of: <book><chapter><sect1><para>
692.15364 +#: ../en/ch12-mq.xml:27
692.15365 +msgid ""
692.15366 +"The patch management problem arises in many situations.  Probably the most "
692.15367 +"visible is that a user of an open source software project will contribute a "
692.15368 +"bug fix or new feature to the project's maintainers in the form of a patch."
692.15369 +msgstr ""
692.15370 +
692.15371 +#. type: Content of: <book><chapter><sect1><para>
692.15372 +#: ../en/ch12-mq.xml:32
692.15373 +msgid ""
692.15374 +"Distributors of operating systems that include open source software often "
692.15375 +"need to make changes to the packages they distribute so that they will build "
692.15376 +"properly in their environments."
692.15377 +msgstr ""
692.15378 +
692.15379 +#. type: Content of: <book><chapter><sect1><para>
692.15380 +#: ../en/ch12-mq.xml:37
692.15381 +msgid ""
692.15382 +"When you have few changes to maintain, it is easy to manage a single patch "
692.15383 +"using the standard <command>diff</command> and <command>patch</command> "
692.15384 +"programs (see <xref linkend=\"sec:mq:patch\"/> for a discussion of these "
692.15385 +"tools). Once the number of changes grows, it starts to make sense to maintain "
692.15386 +"patches as discrete <quote>chunks of work,</quote> so that for example a "
692.15387 +"single patch will contain only one bug fix (the patch might modify several "
692.15388 +"files, but it's doing <quote>only one thing</quote>), and you may have a "
692.15389 +"number of such patches for different bugs you need fixed and local changes "
692.15390 +"you require.  In this situation, if you submit a bug fix patch to the "
692.15391 +"upstream maintainers of a package and they include your fix in a subsequent "
692.15392 +"release, you can simply drop that single patch when you're updating to the "
692.15393 +"newer release."
692.15394 +msgstr ""
692.15395 +
692.15396 +#. type: Content of: <book><chapter><sect1><para>
692.15397 +#: ../en/ch12-mq.xml:52
692.15398 +msgid ""
692.15399 +"Maintaining a single patch against an upstream tree is a little tedious and "
692.15400 +"error-prone, but not difficult.  However, the complexity of the problem grows "
692.15401 +"rapidly as the number of patches you have to maintain increases.  With more "
692.15402 +"than a tiny number of patches in hand, understanding which ones you have "
692.15403 +"applied and maintaining them moves from messy to overwhelming."
692.15404 +msgstr ""
692.15405 +
692.15406 +#. type: Content of: <book><chapter><sect1><para>
692.15407 +#: ../en/ch12-mq.xml:59
692.15408 +msgid ""
692.15409 +"Fortunately, Mercurial includes a powerful extension, Mercurial Queues (or "
692.15410 +"simply <quote>MQ</quote>), that massively simplifies the patch management "
692.15411 +"problem."
692.15412 +msgstr ""
692.15413 +
692.15414 +#. type: Content of: <book><chapter><sect1><title>
692.15415 +#: ../en/ch12-mq.xml:65
692.15416 +msgid "The prehistory of Mercurial Queues"
692.15417 +msgstr "MQ 的历史"
692.15418 +
692.15419 +#. type: Content of: <book><chapter><sect1><para>
692.15420 +#: ../en/ch12-mq.xml:67
692.15421 +msgid ""
692.15422 +"During the late 1990s, several Linux kernel developers started to maintain "
692.15423 +"<quote>patch series</quote> that modified the behavior of the Linux kernel.  "
692.15424 +"Some of these series were focused on stability, some on feature coverage, and "
692.15425 +"others were more speculative."
692.15426 +msgstr ""
692.15427 +
692.15428 +#. type: Content of: <book><chapter><sect1><para>
692.15429 +#: ../en/ch12-mq.xml:73
692.15430 +msgid ""
692.15431 +"The sizes of these patch series grew rapidly.  In 2002, Andrew Morton "
692.15432 +"published some shell scripts he had been using to automate the task of "
692.15433 +"managing his patch queues.  Andrew was successfully using these scripts to "
692.15434 +"manage hundreds (sometimes thousands) of patches on top of the Linux kernel."
692.15435 +msgstr ""
692.15436 +
692.15437 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15438 +#: ../en/ch12-mq.xml:80
692.15439 +msgid "A patchwork quilt"
692.15440 +msgstr ""
692.15441 +
692.15442 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15443 +#: ../en/ch12-mq.xml:82
692.15444 +msgid ""
692.15445 +"In early 2003, Andreas Gruenbacher and Martin Quinson borrowed the approach "
692.15446 +"of Andrew's scripts and published a tool called <quote>patchwork quilt</"
692.15447 +"quote> <citation>web:quilt</citation>, or simply <quote>quilt</quote> (see "
692.15448 +"<citation>gruenbacher:2005</citation> for a paper describing it).  Because "
692.15449 +"quilt substantially automated patch management, it rapidly gained a large "
692.15450 +"following among open source software developers."
692.15451 +msgstr ""
692.15452 +
692.15453 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15454 +#: ../en/ch12-mq.xml:91
692.15455 +msgid ""
692.15456 +"Quilt manages a <emphasis>stack of patches</emphasis> on top of a directory "
692.15457 +"tree. To begin, you tell quilt to manage a directory tree, and tell it which "
692.15458 +"files you want to manage; it stores away the names and contents of those "
692.15459 +"files.  To fix a bug, you create a new patch (using a single command), edit "
692.15460 +"the files you need to fix, then <quote>refresh</quote> the patch."
692.15461 +msgstr ""
692.15462 +
692.15463 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15464 +#: ../en/ch12-mq.xml:99
692.15465 +msgid ""
692.15466 +"The refresh step causes quilt to scan the directory tree; it updates the "
692.15467 +"patch with all of the changes you have made.  You can create another patch on "
692.15468 +"top of the first, which will track the changes required to modify the tree "
692.15469 +"from <quote>tree with one patch applied</quote> to <quote>tree with two "
692.15470 +"patches applied</quote>."
692.15471 +msgstr ""
692.15472 +
692.15473 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15474 +#: ../en/ch12-mq.xml:106
692.15475 +msgid ""
692.15476 +"You can <emphasis>change</emphasis> which patches are applied to the tree.  "
692.15477 +"If you <quote>pop</quote> a patch, the changes made by that patch will vanish "
692.15478 +"from the directory tree.  Quilt remembers which patches you have popped, "
692.15479 +"though, so you can <quote>push</quote> a popped patch again, and the "
692.15480 +"directory tree will be restored to contain the modifications in the patch.  "
692.15481 +"Most importantly, you can run the <quote>refresh</quote> command at any time, "
692.15482 +"and the topmost applied patch will be updated.  This means that you can, at "
692.15483 +"any time, change both which patches are applied and what modifications those "
692.15484 +"patches make."
692.15485 +msgstr ""
692.15486 +
692.15487 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15488 +#: ../en/ch12-mq.xml:118
692.15489 +msgid ""
692.15490 +"Quilt knows nothing about revision control tools, so it works equally well on "
692.15491 +"top of an unpacked tarball or a Subversion working copy."
692.15492 +msgstr ""
692.15493 +
692.15494 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15495 +#: ../en/ch12-mq.xml:124
692.15496 +msgid "From patchwork quilt to Mercurial Queues"
692.15497 +msgstr "从 patchwork quilt 到 MQ"
692.15498 +
692.15499 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15500 +#: ../en/ch12-mq.xml:126
692.15501 +msgid ""
692.15502 +"In mid-2005, Chris Mason took the features of quilt and wrote an extension "
692.15503 +"that he called Mercurial Queues, which added quilt-like behavior to Mercurial."
692.15504 +msgstr ""
692.15505 +
692.15506 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15507 +#: ../en/ch12-mq.xml:130
692.15508 +msgid ""
692.15509 +"The key difference between quilt and MQ is that quilt knows nothing about "
692.15510 +"revision control systems, while MQ is <emphasis>integrated</emphasis> into "
692.15511 +"Mercurial.  Each patch that you push is represented as a Mercurial "
692.15512 +"changeset.  Pop a patch, and the changeset goes away."
692.15513 +msgstr ""
692.15514 +
692.15515 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15516 +#: ../en/ch12-mq.xml:136
692.15517 +msgid ""
692.15518 +"Because quilt does not care about revision control tools, it is still a "
692.15519 +"tremendously useful piece of software to know about for situations where you "
692.15520 +"cannot use Mercurial and MQ."
692.15521 +msgstr ""
692.15522 +
692.15523 +#. type: Content of: <book><chapter><sect1><title>
692.15524 +#: ../en/ch12-mq.xml:144
692.15525 +msgid "The huge advantage of MQ"
692.15526 +msgstr "MQ 的巨大优势"
692.15527 +
692.15528 +#. type: Content of: <book><chapter><sect1><para>
692.15529 +#: ../en/ch12-mq.xml:146
692.15530 +msgid ""
692.15531 +"I cannot overstate the value that MQ offers through the unification of "
692.15532 +"patches and revision control."
692.15533 +msgstr ""
692.15534 +
692.15535 +#. type: Content of: <book><chapter><sect1><para>
692.15536 +#: ../en/ch12-mq.xml:149
692.15537 +msgid ""
692.15538 +"A major reason that patches have persisted in the free software and open "
692.15539 +"source world&emdash;in spite of the availability of increasingly capable "
692.15540 +"revision control tools over the years&emdash;is the <emphasis>agility</"
692.15541 +"emphasis> they offer."
692.15542 +msgstr ""
692.15543 +
692.15544 +#. type: Content of: <book><chapter><sect1><para>
692.15545 +#: ../en/ch12-mq.xml:155
692.15546 +msgid ""
692.15547 +"Traditional revision control tools make a permanent, irreversible record of "
692.15548 +"everything that you do.  While this has great value, it's also somewhat "
692.15549 +"stifling.  If you want to perform a wild-eyed experiment, you have to be "
692.15550 +"careful in how you go about it, or you risk leaving unneeded&emdash;or worse, "
692.15551 +"misleading or destabilising&emdash;traces of your missteps and errors in the "
692.15552 +"permanent revision record."
692.15553 +msgstr ""
692.15554 +
692.15555 +#. type: Content of: <book><chapter><sect1><para>
692.15556 +#: ../en/ch12-mq.xml:163
692.15557 +msgid ""
692.15558 +"By contrast, MQ's marriage of distributed revision control with patches makes "
692.15559 +"it much easier to isolate your work.  Your patches live on top of normal "
692.15560 +"revision history, and you can make them disappear or reappear at will.  If "
692.15561 +"you don't like a patch, you can drop it.  If a patch isn't quite as you want "
692.15562 +"it to be, simply fix it&emdash;as many times as you need to, until you have "
692.15563 +"refined it into the form you desire."
692.15564 +msgstr ""
692.15565 +
692.15566 +#. type: Content of: <book><chapter><sect1><para>
692.15567 +#: ../en/ch12-mq.xml:171
692.15568 +msgid ""
692.15569 +"As an example, the integration of patches with revision control makes "
692.15570 +"understanding patches and debugging their effects&emdash;and their interplay "
692.15571 +"with the code they're based on&emdash;<emphasis>enormously</emphasis> easier. "
692.15572 +"Since every applied patch has an associated changeset, you can give <command "
692.15573 +"role=\"hg-cmd\">hg log</command> a file name to see which changesets and "
692.15574 +"patches affected the file.  You can use the <command role=\"hg-cmd\">hg "
692.15575 +"bisect</command> command to binary-search through all changesets and applied "
692.15576 +"patches to see where a bug got introduced or fixed.  You can use the <command "
692.15577 +"role=\"hg-cmd\">hg annotate</command> command to see which changeset or patch "
692.15578 +"modified a particular line of a source file.  And so on."
692.15579 +msgstr ""
692.15580 +
692.15581 +#. type: Content of: <book><chapter><sect1><para>
692.15582 +#: ../en/ch12-mq.xml:189
692.15583 +msgid ""
692.15584 +"Because MQ doesn't hide its patch-oriented nature, it is helpful to "
692.15585 +"understand what patches are, and a little about the tools that work with them."
692.15586 +msgstr ""
692.15587 +
692.15588 +#. type: Content of: <book><chapter><sect1><para>
692.15589 +#: ../en/ch12-mq.xml:193
692.15590 +msgid ""
692.15591 +"The traditional Unix <command>diff</command> command compares two files, and "
692.15592 +"prints a list of differences between them. The <command>patch</command> "
692.15593 +"command understands these differences as <emphasis>modifications</emphasis> "
692.15594 +"to make to a file.  Take a look below for a simple example of these commands "
692.15595 +"in action."
692.15596 +msgstr ""
692.15597 +
692.15598 +#. type: Content of: <book><chapter><sect1><para>
692.15599 +#: ../en/ch12-mq.xml:202
692.15600 +msgid ""
692.15601 +"The type of file that <command>diff</command> generates (and <command>patch</"
692.15602 +"command> takes as input) is called a <quote>patch</quote> or a <quote>diff</"
692.15603 +"quote>; there is no difference between a patch and a diff.  (We'll use the "
692.15604 +"term <quote>patch</quote>, since it's more commonly used.)"
692.15605 +msgstr ""
692.15606 +
692.15607 +#. type: Content of: <book><chapter><sect1><para>
692.15608 +#: ../en/ch12-mq.xml:208
692.15609 +msgid ""
692.15610 +"A patch file can start with arbitrary text; the <command>patch</command> "
692.15611 +"command ignores this text, but MQ uses it as the commit message when creating "
692.15612 +"changesets.  To find the beginning of the patch content, <command>patch</"
692.15613 +"command> searches for the first line that starts with the string "
692.15614 +"<quote><literal>diff -</literal></quote>."
692.15615 +msgstr ""
692.15616 +
692.15617 +#. type: Content of: <book><chapter><sect1><para>
692.15618 +#: ../en/ch12-mq.xml:215
692.15619 +msgid ""
692.15620 +"MQ works with <emphasis>unified</emphasis> diffs (<command>patch</command> "
692.15621 +"can accept several other diff formats, but MQ doesn't).  A unified diff "
692.15622 +"contains two kinds of header.  The <emphasis>file header</emphasis> describes "
692.15623 +"the file being modified; it contains the name of the file to modify.  When "
692.15624 +"<command>patch</command> sees a new file header, it looks for a file with "
692.15625 +"that name to start modifying."
692.15626 +msgstr ""
692.15627 +
692.15628 +#. type: Content of: <book><chapter><sect1><para>
692.15629 +#: ../en/ch12-mq.xml:223
692.15630 +msgid ""
692.15631 +"After the file header comes a series of <emphasis>hunks</emphasis>.  Each "
692.15632 +"hunk starts with a header; this identifies the range of line numbers within "
692.15633 +"the file that the hunk should modify.  Following the header, a hunk starts "
692.15634 +"and ends with a few (usually three) lines of text from the unmodified file; "
692.15635 +"these are called the <emphasis>context</emphasis> for the hunk.  If there's "
692.15636 +"only a small amount of context between successive hunks, <command>diff</"
692.15637 +"command> doesn't print a new hunk header; it just runs the hunks together, "
692.15638 +"with a few lines of context between modifications."
692.15639 +msgstr ""
692.15640 +
692.15641 +#. type: Content of: <book><chapter><sect1><para>
692.15642 +#: ../en/ch12-mq.xml:235
692.15643 +msgid ""
692.15644 +"Each line of context begins with a space character.  Within the hunk, a line "
692.15645 +"that begins with <quote><literal>-</literal></quote> means <quote>remove this "
692.15646 +"line,</quote> while a line that begins with <quote><literal>+</literal></"
692.15647 +"quote> means <quote>insert this line.</quote> For example, a line that is "
692.15648 +"modified is represented by one deletion and one insertion."
692.15649 +msgstr ""
692.15650 +
692.15651 +#. type: Content of: <book><chapter><sect1><para>
692.15652 +#: ../en/ch12-mq.xml:243
692.15653 +msgid ""
692.15654 +"We will return to some of the more subtle aspects of patches later (in <xref "
692.15655 +"linkend=\"sec:mq:adv-patch\"/>), but you should have enough information now "
692.15656 +"to use MQ."
692.15657 +msgstr ""
692.15658 +
692.15659 +#. type: Content of: <book><chapter><sect1><title>
692.15660 +#: ../en/ch12-mq.xml:250
692.15661 +msgid "Getting started with Mercurial Queues"
692.15662 +msgstr "开始使用 MQ"
692.15663 +
692.15664 +#. type: Content of: <book><chapter><sect1><para>
692.15665 +#: ../en/ch12-mq.xml:252
692.15666 +msgid ""
692.15667 +"Because MQ is implemented as an extension, you must explicitly enable before "
692.15668 +"you can use it.  (You don't need to download anything; MQ ships with the "
692.15669 +"standard Mercurial distribution.)  To enable MQ, edit your <filename role="
692.15670 +"\"home\">~/.hgrc</filename> file, and add the lines below."
692.15671 +msgstr ""
692.15672 +
692.15673 +#. type: Content of: <book><chapter><sect1><para>
692.15674 +#: ../en/ch12-mq.xml:262
692.15675 +msgid ""
692.15676 +"Once the extension is enabled, it will make a number of new commands "
692.15677 +"available.  To verify that the extension is working, you can use <command "
692.15678 +"role=\"hg-cmd\">hg help</command> to see if the <command role=\"hg-ext-mq"
692.15679 +"\">qinit</command> command is now available."
692.15680 +msgstr ""
692.15681 +
692.15682 +#. type: Content of: <book><chapter><sect1><para>
692.15683 +#: ../en/ch12-mq.xml:270
692.15684 +msgid ""
692.15685 +"You can use MQ with <emphasis>any</emphasis> Mercurial repository, and its "
692.15686 +"commands only operate within that repository.  To get started, simply prepare "
692.15687 +"the repository using the <command role=\"hg-ext-mq\">qinit</command> command."
692.15688 +msgstr ""
692.15689 +
692.15690 +#. type: Content of: <book><chapter><sect1><para>
692.15691 +#: ../en/ch12-mq.xml:277
692.15692 +msgid ""
692.15693 +"This command creates an empty directory called <filename role=\"special\" "
692.15694 +"class=\"directory\">.hg/patches</filename>, where MQ will keep its metadata.  "
692.15695 +"As with many Mercurial commands, the <command role=\"hg-ext-mq\">qinit</"
692.15696 +"command> command prints nothing if it succeeds."
692.15697 +msgstr ""
692.15698 +
692.15699 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15700 +#: ../en/ch12-mq.xml:284
692.15701 +msgid "Creating a new patch"
692.15702 +msgstr "创建新补丁"
692.15703 +
692.15704 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15705 +#: ../en/ch12-mq.xml:286
692.15706 +msgid ""
692.15707 +"To begin work on a new patch, use the <command role=\"hg-ext-mq\">qnew</"
692.15708 +"command> command.  This command takes one argument, the name of the patch to "
692.15709 +"create."
692.15710 +msgstr ""
692.15711 +
692.15712 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15713 +#: ../en/ch12-mq.xml:290
692.15714 +msgid ""
692.15715 +"MQ will use this as the name of an actual file in the <filename role=\"special"
692.15716 +"\" class=\"directory\">.hg/patches</filename> directory, as you can see below."
692.15717 +msgstr ""
692.15718 +
692.15719 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15720 +#: ../en/ch12-mq.xml:297
692.15721 +msgid ""
692.15722 +"Also newly present in the <filename role=\"special\" class=\"directory\">.hg/"
692.15723 +"patches</filename> directory are two other files, <filename role=\"special"
692.15724 +"\">series</filename> and <filename role=\"special\">status</filename>.  The "
692.15725 +"<filename role=\"special\">series</filename> file lists all of the patches "
692.15726 +"that MQ knows about for this repository, with one patch per line.  Mercurial "
692.15727 +"uses the <filename role=\"special\">status</filename> file for internal book-"
692.15728 +"keeping; it tracks all of the patches that MQ has <emphasis>applied</"
692.15729 +"emphasis> in this repository."
692.15730 +msgstr ""
692.15731 +
692.15732 +#. type: Content of: <book><chapter><sect1><sect2><note><para>
692.15733 +#: ../en/ch12-mq.xml:309
692.15734 +msgid ""
692.15735 +"You may sometimes want to edit the <filename role=\"special\">series</"
692.15736 +"filename> file by hand; for example, to change the sequence in which some "
692.15737 +"patches are applied.  However, manually editing the <filename role=\"special"
692.15738 +"\">status</filename> file is almost always a bad idea, as it's easy to "
692.15739 +"corrupt MQ's idea of what is happening."
692.15740 +msgstr ""
692.15741 +
692.15742 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15743 +#: ../en/ch12-mq.xml:318
692.15744 +msgid ""
692.15745 +"Once you have created your new patch, you can edit files in the working "
692.15746 +"directory as you usually would.  All of the normal Mercurial commands, such "
692.15747 +"as <command role=\"hg-cmd\">hg diff</command> and <command role=\"hg-cmd\">hg "
692.15748 +"annotate</command>, work exactly as they did before."
692.15749 +msgstr ""
692.15750 +
692.15751 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15752 +#: ../en/ch12-mq.xml:326
692.15753 +msgid "Refreshing a patch"
692.15754 +msgstr "刷新补丁"
692.15755 +
692.15756 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15757 +#: ../en/ch12-mq.xml:328
692.15758 +msgid ""
692.15759 +"When you reach a point where you want to save your work, use the <command "
692.15760 +"role=\"hg-ext-mq\">qrefresh</command> command to update the patch you are "
692.15761 +"working on."
692.15762 +msgstr ""
692.15763 +
692.15764 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15765 +#: ../en/ch12-mq.xml:334
692.15766 +msgid ""
692.15767 +"This command folds the changes you have made in the working directory into "
692.15768 +"your patch, and updates its corresponding changeset to contain those changes."
692.15769 +msgstr ""
692.15770 +
692.15771 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15772 +#: ../en/ch12-mq.xml:338
692.15773 +msgid ""
692.15774 +"You can run <command role=\"hg-ext-mq\">qrefresh</command> as often as you "
692.15775 +"like, so it's a good way to <quote>checkpoint</quote> your work.  Refresh "
692.15776 +"your patch at an opportune time; try an experiment; and if the experiment "
692.15777 +"doesn't work out, <command role=\"hg-cmd\">hg revert</command> your "
692.15778 +"modifications back to the last time you refreshed."
692.15779 +msgstr ""
692.15780 +
692.15781 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15782 +#: ../en/ch12-mq.xml:349
692.15783 +msgid "Stacking and tracking patches"
692.15784 +msgstr "堆叠和跟踪补丁"
692.15785 +
692.15786 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15787 +#: ../en/ch12-mq.xml:351
692.15788 +msgid ""
692.15789 +"Once you have finished working on a patch, or need to work on another, you "
692.15790 +"can use the <command role=\"hg-ext-mq\">qnew</command> command again to "
692.15791 +"create a new patch. Mercurial will apply this patch on top of your existing "
692.15792 +"patch."
692.15793 +msgstr ""
692.15794 +
692.15795 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15796 +#: ../en/ch12-mq.xml:359
692.15797 +msgid ""
692.15798 +"Notice that the patch contains the changes in our prior patch as part of its "
692.15799 +"context (you can see this more clearly in the output of <command role=\"hg-cmd"
692.15800 +"\">hg annotate</command>)."
692.15801 +msgstr ""
692.15802 +
692.15803 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15804 +#: ../en/ch12-mq.xml:364
692.15805 +msgid ""
692.15806 +"So far, with the exception of <command role=\"hg-ext-mq\">qnew</command> and "
692.15807 +"<command role=\"hg-ext-mq\">qrefresh</command>, we've been careful to only "
692.15808 +"use regular Mercurial commands.  However, MQ provides many commands that are "
692.15809 +"easier to use when you are thinking about patches, as illustrated below."
692.15810 +msgstr ""
692.15811 +
692.15812 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15813 +#: ../en/ch12-mq.xml:374
692.15814 +msgid ""
692.15815 +"The <command role=\"hg-ext-mq\">qseries</command> command lists every patch "
692.15816 +"that MQ knows about in this repository, from oldest to newest (most recently "
692.15817 +"<emphasis>created</emphasis>)."
692.15818 +msgstr ""
692.15819 +
692.15820 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.15821 +#: ../en/ch12-mq.xml:380
692.15822 +msgid ""
692.15823 +"The <command role=\"hg-ext-mq\">qapplied</command> command lists every patch "
692.15824 +"that MQ has <emphasis>applied</emphasis> in this repository, again from "
692.15825 +"oldest to newest (most recently applied)."
692.15826 +msgstr ""
692.15827 +
692.15828 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15829 +#: ../en/ch12-mq.xml:389
692.15830 +msgid "Manipulating the patch stack"
692.15831 +msgstr "操作补丁堆栈"
692.15832 +
692.15833 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15834 +#: ../en/ch12-mq.xml:391
692.15835 +msgid ""
692.15836 +"The previous discussion implied that there must be a difference between "
692.15837 +"<quote>known</quote> and <quote>applied</quote> patches, and there is.  MQ "
692.15838 +"can manage a patch without it being applied in the repository."
692.15839 +msgstr ""
692.15840 +
692.15841 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15842 +#: ../en/ch12-mq.xml:396
692.15843 +msgid ""
692.15844 +"An <emphasis>applied</emphasis> patch has a corresponding changeset in the "
692.15845 +"repository, and the effects of the patch and changeset are visible in the "
692.15846 +"working directory.  You can undo the application of a patch using the "
692.15847 +"<command role=\"hg-ext-mq\">qpop</command> command.  MQ still <emphasis>knows "
692.15848 +"about</emphasis>, or manages, a popped patch, but the patch no longer has a "
692.15849 +"corresponding changeset in the repository, and the working directory does not "
692.15850 +"contain the changes made by the patch.  <xref linkend=\"fig:mq:stack\"/> "
692.15851 +"illustrates the difference between applied and tracked patches."
692.15852 +msgstr ""
692.15853 +
692.15854 +#. type: Content of: <book><chapter><sect1><sect2><figure><title>
692.15855 +#: ../en/ch12-mq.xml:409
692.15856 +msgid "Applied and unapplied patches in the MQ patch stack"
692.15857 +msgstr "在 MQ 补丁堆栈中应用和撤销补丁"
692.15858 +
692.15859 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
692.15860 +#: ../en/ch12-mq.xml:412
692.15861 +msgid "<imageobject><imagedata fileref=\"figs/mq-stack.png\"/></imageobject>"
692.15862 +msgstr ""
692.15863 +
692.15864 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15865 +#: ../en/ch12-mq.xml:417
692.15866 +msgid ""
692.15867 +"You can reapply an unapplied, or popped, patch using the <command role=\"hg-"
692.15868 +"ext-mq\">qpush</command> command.  This creates a new changeset to correspond "
692.15869 +"to the patch, and the patch's changes once again become present in the "
692.15870 +"working directory.  See below for examples of <command role=\"hg-ext-mq"
692.15871 +"\">qpop</command> and <command role=\"hg-ext-mq\">qpush</command> in action."
692.15872 +msgstr ""
692.15873 +
692.15874 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15875 +#: ../en/ch12-mq.xml:427
692.15876 +msgid ""
692.15877 +"Notice that once we have popped a patch or two patches, the output of "
692.15878 +"<command role=\"hg-ext-mq\">qseries</command> remains the same, while that of "
692.15879 +"<command role=\"hg-ext-mq\">qapplied</command> has changed."
692.15880 +msgstr ""
692.15881 +
692.15882 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15883 +#: ../en/ch12-mq.xml:435
692.15884 +msgid "Pushing and popping many patches"
692.15885 +msgstr "压入或弹出多个补丁"
692.15886 +
692.15887 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15888 +#: ../en/ch12-mq.xml:437
692.15889 +msgid ""
692.15890 +"While <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-"
692.15891 +"mq\">qpop</command> each operate on a single patch at a time by default, you "
692.15892 +"can push and pop many patches in one go.  The <option role=\"hg-ext-mq-cmd-"
692.15893 +"qpush-opt\">hg -a</option> option to <command role=\"hg-ext-mq\">qpush</"
692.15894 +"command> causes it to push all unapplied patches, while the <option role=\"hg-"
692.15895 +"ext-mq-cmd-qpop-opt\">-a</option> option to <command role=\"hg-ext-mq\">qpop</"
692.15896 +"command> causes it to pop all applied patches.  (For some more ways to push "
692.15897 +"and pop many patches, see <xref linkend=\"sec:mq:perf\"/> below.)"
692.15898 +msgstr ""
692.15899 +
692.15900 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15901 +#: ../en/ch12-mq.xml:453
692.15902 +msgid "Safety checks, and overriding them"
692.15903 +msgstr "安全的检查,然后覆盖它们"
692.15904 +
692.15905 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15906 +#: ../en/ch12-mq.xml:455
692.15907 +msgid ""
692.15908 +"Several MQ commands check the working directory before they do anything, and "
692.15909 +"fail if they find any modifications.  They do this to ensure that you won't "
692.15910 +"lose any changes that you have made, but not yet incorporated into a patch.  "
692.15911 +"The example below illustrates this; the <command role=\"hg-ext-mq\">qnew</"
692.15912 +"command> command will not create a new patch if there are outstanding "
692.15913 +"changes, caused in this case by the <command role=\"hg-cmd\">hg add</command> "
692.15914 +"of <filename>file3</filename>."
692.15915 +msgstr ""
692.15916 +
692.15917 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15918 +#: ../en/ch12-mq.xml:467
692.15919 +msgid ""
692.15920 +"Commands that check the working directory all take an <quote>I know what I'm "
692.15921 +"doing</quote> option, which is always named <option>-f</option>.  The exact "
692.15922 +"meaning of <option>-f</option> depends on the command.  For example, <command "
692.15923 +"role=\"hg-cmd\">hg qnew <option role=\"hg-ext-mq-cmd-qnew-opt\">hg -f</"
692.15924 +"option></command> will incorporate any outstanding changes into the new patch "
692.15925 +"it creates, but <command role=\"hg-cmd\">hg qpop <option role=\"hg-ext-mq-cmd-"
692.15926 +"qpop-opt\">hg -f</option></command> will revert modifications to any files "
692.15927 +"affected by the patch that it is popping.  Be sure to read the documentation "
692.15928 +"for a command's <option>-f</option> option before you use it!"
692.15929 +msgstr ""
692.15930 +
692.15931 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15932 +#: ../en/ch12-mq.xml:482
692.15933 +msgid "Working on several patches at once"
692.15934 +msgstr "同时处理多个补丁"
692.15935 +
692.15936 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15937 +#: ../en/ch12-mq.xml:484
692.15938 +msgid ""
692.15939 +"The <command role=\"hg-ext-mq\">qrefresh</command> command always refreshes "
692.15940 +"the <emphasis>topmost</emphasis> applied patch.  This means that you can "
692.15941 +"suspend work on one patch (by refreshing it), pop or push to make a different "
692.15942 +"patch the top, and work on <emphasis>that</emphasis> patch for a while."
692.15943 +msgstr ""
692.15944 +
692.15945 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15946 +#: ../en/ch12-mq.xml:491
692.15947 +msgid ""
692.15948 +"Here's an example that illustrates how you can use this ability. Let's say "
692.15949 +"you're developing a new feature as two patches.  The first is a change to the "
692.15950 +"core of your software, and the second&emdash;layered on top of the "
692.15951 +"first&emdash;changes the user interface to use the code you just added to the "
692.15952 +"core.  If you notice a bug in the core while you're working on the UI patch, "
692.15953 +"it's easy to fix the core.  Simply <command role=\"hg-ext-mq\">qrefresh</"
692.15954 +"command> the UI patch to save your in-progress changes, and <command role="
692.15955 +"\"hg-ext-mq\">qpop</command> down to the core patch.  Fix the core bug, "
692.15956 +"<command role=\"hg-ext-mq\">qrefresh</command> the core patch, and <command "
692.15957 +"role=\"hg-ext-mq\">qpush</command> back to the UI patch to continue where you "
692.15958 +"left off."
692.15959 +msgstr ""
692.15960 +
692.15961 +#. type: Content of: <book><chapter><sect1><title>
692.15962 +#: ../en/ch12-mq.xml:508
692.15963 +msgid "More about patches"
692.15964 +msgstr "关于补丁的更多信息"
692.15965 +
692.15966 +#. type: Content of: <book><chapter><sect1><para>
692.15967 +#: ../en/ch12-mq.xml:510
692.15968 +msgid ""
692.15969 +"MQ uses the GNU <command>patch</command> command to apply patches, so it's "
692.15970 +"helpful to know a few more detailed aspects of how <command>patch</command> "
692.15971 +"works, and about patches themselves."
692.15972 +msgstr ""
692.15973 +
692.15974 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.15975 +#: ../en/ch12-mq.xml:516
692.15976 +msgid "The strip count"
692.15977 +msgstr "修剪计数"
692.15978 +
692.15979 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15980 +#: ../en/ch12-mq.xml:518
692.15981 +msgid ""
692.15982 +"If you look at the file headers in a patch, you will notice that the "
692.15983 +"pathnames usually have an extra component on the front that isn't present in "
692.15984 +"the actual path name.  This is a holdover from the way that people used to "
692.15985 +"generate patches (people still do this, but it's somewhat rare with modern "
692.15986 +"revision control tools)."
692.15987 +msgstr ""
692.15988 +
692.15989 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.15990 +#: ../en/ch12-mq.xml:525
692.15991 +msgid ""
692.15992 +"Alice would unpack a tarball, edit her files, then decide that she wanted to "
692.15993 +"create a patch.  So she'd rename her working directory, unpack the tarball "
692.15994 +"again (hence the need for the rename), and use the <option role=\"cmd-opt-diff"
692.15995 +"\">-r</option> and <option role=\"cmd-opt-diff\">-N</option> options to "
692.15996 +"<command>diff</command> to recursively generate a patch between the "
692.15997 +"unmodified directory and the modified one.  The result would be that the name "
692.15998 +"of the unmodified directory would be at the front of the left-hand path in "
692.15999 +"every file header, and the name of the modified directory would be at the "
692.16000 +"front of the right-hand path."
692.16001 +msgstr ""
692.16002 +
692.16003 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16004 +#: ../en/ch12-mq.xml:538
692.16005 +msgid ""
692.16006 +"Since someone receiving a patch from the Alices of the net would be unlikely "
692.16007 +"to have unmodified and modified directories with exactly the same names, the "
692.16008 +"<command>patch</command> command has a <option role=\"cmd-opt-patch\">-p</"
692.16009 +"option> option that indicates the number of leading path name components to "
692.16010 +"strip when trying to apply a patch.  This number is called the "
692.16011 +"<emphasis>strip count</emphasis>."
692.16012 +msgstr ""
692.16013 +
692.16014 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16015 +#: ../en/ch12-mq.xml:546
692.16016 +msgid ""
692.16017 +"An option of <quote><literal>-p1</literal></quote> means <quote>use a strip "
692.16018 +"count of one</quote>.  If <command>patch</command> sees a file name "
692.16019 +"<filename>foo/bar/baz</filename> in a file header, it will strip "
692.16020 +"<filename>foo</filename> and try to patch a file named <filename>bar/baz</"
692.16021 +"filename>.  (Strictly speaking, the strip count refers to the number of "
692.16022 +"<emphasis>path separators</emphasis> (and the components that go with them ) "
692.16023 +"to strip.  A strip count of one will turn <filename>foo/bar</filename> into "
692.16024 +"<filename>bar</filename>, but <filename>/foo/bar</filename> (notice the extra "
692.16025 +"leading slash) into <filename>foo/bar</filename>.)"
692.16026 +msgstr ""
692.16027 +
692.16028 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16029 +#: ../en/ch12-mq.xml:559
692.16030 +msgid ""
692.16031 +"The <quote>standard</quote> strip count for patches is one; almost all "
692.16032 +"patches contain one leading path name component that needs to be stripped. "
692.16033 +"Mercurial's <command role=\"hg-cmd\">hg diff</command> command generates path "
692.16034 +"names in this form, and the <command role=\"hg-cmd\">hg import</command> "
692.16035 +"command and MQ expect patches to have a strip count of one."
692.16036 +msgstr ""
692.16037 +
692.16038 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16039 +#: ../en/ch12-mq.xml:567
692.16040 +msgid ""
692.16041 +"If you receive a patch from someone that you want to add to your patch queue, "
692.16042 +"and the patch needs a strip count other than one, you cannot just <command "
692.16043 +"role=\"hg-ext-mq\">qimport</command> the patch, because <command role=\"hg-"
692.16044 +"ext-mq\">qimport</command> does not yet have a <literal>-p</literal> option "
692.16045 +"(see <ulink role=\"hg-bug\" url=\"http://www.selenic.com/mercurial/bts/"
692.16046 +"issue311\">issue 311</ulink>).  Your best bet is to <command role=\"hg-ext-mq"
692.16047 +"\">qnew</command> a patch of your own, then use <command>patch -pN</command> "
692.16048 +"to apply their patch, followed by <command role=\"hg-cmd\">hg addremove</"
692.16049 +"command> to pick up any files added or removed by the patch, followed by "
692.16050 +"<command role=\"hg-ext-mq\">hg qrefresh</command>. This complexity may become "
692.16051 +"unnecessary; see <ulink role=\"hg-bug\" url=\"http://www.selenic.com/"
692.16052 +"mercurial/bts/issue311\">issue 311</ulink> for details."
692.16053 +msgstr ""
692.16054 +
692.16055 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.16056 +#: ../en/ch12-mq.xml:587
692.16057 +msgid "Strategies for applying a patch"
692.16058 +msgstr "应用补丁的策略"
692.16059 +
692.16060 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16061 +#: ../en/ch12-mq.xml:589
692.16062 +msgid ""
692.16063 +"When <command>patch</command> applies a hunk, it tries a handful of "
692.16064 +"successively less accurate strategies to try to make the hunk apply. This "
692.16065 +"falling-back technique often makes it possible to take a patch that was "
692.16066 +"generated against an old version of a file, and apply it against a newer "
692.16067 +"version of that file."
692.16068 +msgstr ""
692.16069 +
692.16070 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16071 +#: ../en/ch12-mq.xml:596
692.16072 +msgid ""
692.16073 +"First, <command>patch</command> tries an exact match, where the line numbers, "
692.16074 +"the context, and the text to be modified must apply exactly.  If it cannot "
692.16075 +"make an exact match, it tries to find an exact match for the context, without "
692.16076 +"honouring the line numbering information.  If this succeeds, it prints a line "
692.16077 +"of output saying that the hunk was applied, but at some <emphasis>offset</"
692.16078 +"emphasis> from the original line number."
692.16079 +msgstr ""
692.16080 +
692.16081 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16082 +#: ../en/ch12-mq.xml:605
692.16083 +msgid ""
692.16084 +"If a context-only match fails, <command>patch</command> removes the first and "
692.16085 +"last lines of the context, and tries a <emphasis>reduced</emphasis> context-"
692.16086 +"only match.  If the hunk with reduced context succeeds, it prints a message "
692.16087 +"saying that it applied the hunk with a <emphasis>fuzz factor</emphasis> (the "
692.16088 +"number after the fuzz factor indicates how many lines of context "
692.16089 +"<command>patch</command> had to trim before the patch applied)."
692.16090 +msgstr ""
692.16091 +
692.16092 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16093 +#: ../en/ch12-mq.xml:614
692.16094 +msgid ""
692.16095 +"When neither of these techniques works, <command>patch</command> prints a "
692.16096 +"message saying that the hunk in question was rejected.  It saves rejected "
692.16097 +"hunks (also simply called <quote>rejects</quote>) to a file with the same "
692.16098 +"name, and an added <filename role=\"special\">.rej</filename> extension.  It "
692.16099 +"also saves an unmodified copy of the file with a <filename role=\"special\">."
692.16100 +"orig</filename> extension; the copy of the file without any extensions will "
692.16101 +"contain any changes made by hunks that <emphasis>did</emphasis> apply "
692.16102 +"cleanly.  If you have a patch that modifies <filename>foo</filename> with six "
692.16103 +"hunks, and one of them fails to apply, you will have: an unmodified "
692.16104 +"<filename>foo.orig</filename>, a <filename>foo.rej</filename> containing one "
692.16105 +"hunk, and <filename>foo</filename>, containing the changes made by the five "
692.16106 +"successful hunks."
692.16107 +msgstr ""
692.16108 +
692.16109 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.16110 +#: ../en/ch12-mq.xml:632
692.16111 +msgid "Some quirks of patch representation"
692.16112 +msgstr "补丁的一些特性"
692.16113 +
692.16114 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16115 +#: ../en/ch12-mq.xml:634
692.16116 +msgid ""
692.16117 +"There are a few useful things to know about how <command>patch</command> "
692.16118 +"works with files."
692.16119 +msgstr ""
692.16120 +
692.16121 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.16122 +#: ../en/ch12-mq.xml:637
692.16123 +msgid ""
692.16124 +"This should already be obvious, but <command>patch</command> cannot handle "
692.16125 +"binary files."
692.16126 +msgstr ""
692.16127 +
692.16128 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.16129 +#: ../en/ch12-mq.xml:641
692.16130 +msgid ""
692.16131 +"Neither does it care about the executable bit; it creates new files as "
692.16132 +"readable, but not executable."
692.16133 +msgstr ""
692.16134 +
692.16135 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.16136 +#: ../en/ch12-mq.xml:645
692.16137 +msgid ""
692.16138 +"<command>patch</command> treats the removal of a file as a diff between the "
692.16139 +"file to be removed and the empty file.  So your idea of <quote>I deleted this "
692.16140 +"file</quote> looks like <quote>every line of this file was deleted</quote> in "
692.16141 +"a patch."
692.16142 +msgstr ""
692.16143 +
692.16144 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.16145 +#: ../en/ch12-mq.xml:651
692.16146 +msgid ""
692.16147 +"It treats the addition of a file as a diff between the empty file and the "
692.16148 +"file to be added.  So in a patch, your idea of <quote>I added this file</"
692.16149 +"quote> looks like <quote>every line of this file was added</quote>."
692.16150 +msgstr ""
692.16151 +
692.16152 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.16153 +#: ../en/ch12-mq.xml:657
692.16154 +msgid ""
692.16155 +"It treats a renamed file as the removal of the old name, and the addition of "
692.16156 +"the new name.  This means that renamed files have a big footprint in "
692.16157 +"patches.  (Note also that Mercurial does not currently try to infer when "
692.16158 +"files have been renamed or copied in a patch.)"
692.16159 +msgstr ""
692.16160 +
692.16161 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.16162 +#: ../en/ch12-mq.xml:663
692.16163 +msgid ""
692.16164 +"<command>patch</command> cannot represent empty files, so you cannot use a "
692.16165 +"patch to represent the notion <quote>I added this empty file to the tree</"
692.16166 +"quote>."
692.16167 +msgstr ""
692.16168 +
692.16169 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.16170 +#: ../en/ch12-mq.xml:671
692.16171 +msgid "Beware the fuzz"
692.16172 +msgstr "当心毛刺"
692.16173 +
692.16174 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16175 +#: ../en/ch12-mq.xml:673
692.16176 +msgid ""
692.16177 +"While applying a hunk at an offset, or with a fuzz factor, will often be "
692.16178 +"completely successful, these inexact techniques naturally leave open the "
692.16179 +"possibility of corrupting the patched file.  The most common cases typically "
692.16180 +"involve applying a patch twice, or at an incorrect location in the file.  If "
692.16181 +"<command>patch</command> or <command role=\"hg-ext-mq\">qpush</command> ever "
692.16182 +"mentions an offset or fuzz factor, you should make sure that the modified "
692.16183 +"files are correct afterwards."
692.16184 +msgstr ""
692.16185 +
692.16186 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16187 +#: ../en/ch12-mq.xml:683
692.16188 +msgid ""
692.16189 +"It's often a good idea to refresh a patch that has applied with an offset or "
692.16190 +"fuzz factor; refreshing the patch generates new context information that will "
692.16191 +"make it apply cleanly.  I say <quote>often,</quote> not <quote>always,</"
692.16192 +"quote> because sometimes refreshing a patch will make it fail to apply "
692.16193 +"against a different revision of the underlying files.  In some cases, such as "
692.16194 +"when you're maintaining a patch that must sit on top of multiple versions of "
692.16195 +"a source tree, it's acceptable to have a patch apply with some fuzz, provided "
692.16196 +"you've verified the results of the patching process in such cases."
692.16197 +msgstr ""
692.16198 +
692.16199 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.16200 +#: ../en/ch12-mq.xml:696
692.16201 +msgid "Handling rejection"
692.16202 +msgstr "处理拒绝"
692.16203 +
692.16204 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16205 +#: ../en/ch12-mq.xml:698
692.16206 +msgid ""
692.16207 +"If <command role=\"hg-ext-mq\">qpush</command> fails to apply a patch, it "
692.16208 +"will print an error message and exit.  If it has left <filename role=\"special"
692.16209 +"\">.rej</filename> files behind, it is usually best to fix up the rejected "
692.16210 +"hunks before you push more patches or do any further work."
692.16211 +msgstr ""
692.16212 +
692.16213 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16214 +#: ../en/ch12-mq.xml:704
692.16215 +msgid ""
692.16216 +"If your patch <emphasis>used to</emphasis> apply cleanly, and no longer does "
692.16217 +"because you've changed the underlying code that your patches are based on, "
692.16218 +"Mercurial Queues can help; see <xref linkend=\"sec:mq:merge\"/> for details."
692.16219 +msgstr ""
692.16220 +
692.16221 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16222 +#: ../en/ch12-mq.xml:709
692.16223 +msgid ""
692.16224 +"Unfortunately, there aren't any great techniques for dealing with rejected "
692.16225 +"hunks.  Most often, you'll need to view the <filename role=\"special\">.rej</"
692.16226 +"filename> file and edit the target file, applying the rejected hunks by hand."
692.16227 +msgstr ""
692.16228 +
692.16229 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16230 +#: ../en/ch12-mq.xml:714
692.16231 +msgid ""
692.16232 +"A Linux kernel hacker, Chris Mason (the author of Mercurial Queues), wrote a "
692.16233 +"tool called <command>mpatch</command> (<ulink url=\"http://oss.oracle.com/"
692.16234 +"~mason/mpatch/\">http://oss.oracle.com/~mason/mpatch/</ulink>), which takes a "
692.16235 +"simple approach to automating the application of hunks rejected by "
692.16236 +"<command>patch</command>.  The <command>mpatch</command> command can help "
692.16237 +"with four common reasons that a hunk may be rejected:"
692.16238 +msgstr ""
692.16239 +
692.16240 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.16241 +#: ../en/ch12-mq.xml:724
692.16242 +msgid "The context in the middle of a hunk has changed."
692.16243 +msgstr ""
692.16244 +
692.16245 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.16246 +#: ../en/ch12-mq.xml:727
692.16247 +msgid "A hunk is missing some context at the beginning or end."
692.16248 +msgstr ""
692.16249 +
692.16250 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.16251 +#: ../en/ch12-mq.xml:730
692.16252 +msgid ""
692.16253 +"A large hunk might apply better&emdash;either entirely or in part&emdash;if "
692.16254 +"it was broken up into smaller hunks."
692.16255 +msgstr ""
692.16256 +
692.16257 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.16258 +#: ../en/ch12-mq.xml:734
692.16259 +msgid ""
692.16260 +"A hunk removes lines with slightly different content than those currently "
692.16261 +"present in the file."
692.16262 +msgstr ""
692.16263 +
692.16264 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16265 +#: ../en/ch12-mq.xml:738
692.16266 +msgid ""
692.16267 +"If you use <command>mpatch</command>, you should be doubly careful to check "
692.16268 +"your results when you're done.  In fact, <command>mpatch</command> enforces "
692.16269 +"this method of double-checking the tool's output, by automatically dropping "
692.16270 +"you into a merge program when it has done its job, so that you can verify its "
692.16271 +"work and finish off any remaining merges."
692.16272 +msgstr ""
692.16273 +
692.16274 +#. type: Content of: <book><chapter><sect1><title>
692.16275 +#: ../en/ch12-mq.xml:749
692.16276 +msgid "More on patch management"
692.16277 +msgstr "补丁管理进阶"
692.16278 +
692.16279 +#. type: Content of: <book><chapter><sect1><para>
692.16280 +#: ../en/ch12-mq.xml:751
692.16281 +msgid ""
692.16282 +"As you grow familiar with MQ, you will find yourself wanting to perform other "
692.16283 +"kinds of patch management operations."
692.16284 +msgstr ""
692.16285 +
692.16286 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.16287 +#: ../en/ch12-mq.xml:755
692.16288 +msgid "Deleting unwanted patches"
692.16289 +msgstr "删除不需要的补丁"
692.16290 +
692.16291 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16292 +#: ../en/ch12-mq.xml:757
692.16293 +msgid ""
692.16294 +"If you want to get rid of a patch, use the <command role=\"hg-ext-mq\">hg "
692.16295 +"qdelete</command> command to delete the patch file and remove its entry from "
692.16296 +"the patch series.  If you try to delete a patch that is still applied, "
692.16297 +"<command role=\"hg-ext-mq\">hg qdelete</command> will refuse."
692.16298 +msgstr ""
692.16299 +
692.16300 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.16301 +#: ../en/ch12-mq.xml:767
692.16302 +msgid "Converting to and from permanent revisions"
692.16303 +msgstr "与持久版本的相互转换"
692.16304 +
692.16305 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16306 +#: ../en/ch12-mq.xml:769
692.16307 +msgid ""
692.16308 +"Once you're done working on a patch and want to turn it into a permanent "
692.16309 +"changeset, use the <command role=\"hg-ext-mq\">hg qfinish</command> command. "
692.16310 +"Pass a revision to the command to identify the patch that you want to turn "
692.16311 +"into a regular changeset; this patch must already be applied."
692.16312 +msgstr ""
692.16313 +
692.16314 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16315 +#: ../en/ch12-mq.xml:777
692.16316 +msgid ""
692.16317 +"The <command role=\"hg-ext-mq\">hg qfinish</command> command accepts an "
692.16318 +"<option>--all</option> or <option>-a</option> option, which turns all applied "
692.16319 +"patches into regular changesets."
692.16320 +msgstr ""
692.16321 +
692.16322 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16323 +#: ../en/ch12-mq.xml:782
692.16324 +msgid ""
692.16325 +"It is also possible to turn an existing changeset into a patch, by passing "
692.16326 +"the <option>-r</option> option to <command role=\"hg-ext-mq\">hg qimport</"
692.16327 +"command>."
692.16328 +msgstr ""
692.16329 +
692.16330 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16331 +#: ../en/ch12-mq.xml:788
692.16332 +msgid ""
692.16333 +"Note that it only makes sense to convert a changeset into a patch if you have "
692.16334 +"not propagated that changeset into any other repositories.  The imported "
692.16335 +"changeset's ID will change every time you refresh the patch, which will make "
692.16336 +"Mercurial treat it as unrelated to the original changeset if you have pushed "
692.16337 +"it somewhere else."
692.16338 +msgstr ""
692.16339 +
692.16340 +#. type: Content of: <book><chapter><sect1><title>
692.16341 +#: ../en/ch12-mq.xml:798
692.16342 +msgid "Getting the best performance out of MQ"
692.16343 +msgstr "MQ 的性能"
692.16344 +
692.16345 +#. type: Content of: <book><chapter><sect1><para>
692.16346 +#: ../en/ch12-mq.xml:800
692.16347 +msgid ""
692.16348 +"MQ is very efficient at handling a large number of patches. I ran some "
692.16349 +"performance experiments in mid-2006 for a talk that I gave at the 2006 "
692.16350 +"EuroPython conference (on modern hardware, you should expect better "
692.16351 +"performance than you'll see below).  I used as my data set the Linux 2.6.17-"
692.16352 +"mm1 patch series, which consists of 1,738 patches. I applied these on top of "
692.16353 +"a Linux kernel repository containing all 27,472 revisions between Linux "
692.16354 +"2.6.12-rc2 and Linux 2.6.17."
692.16355 +msgstr ""
692.16356 +
692.16357 +#. type: Content of: <book><chapter><sect1><para>
692.16358 +#: ../en/ch12-mq.xml:809
692.16359 +msgid ""
692.16360 +"On my old, slow laptop, I was able to <command role=\"hg-cmd\">hg qpush "
692.16361 +"<option role=\"hg-ext-mq-cmd-qpush-opt\">hg -a</option></command> all 1,738 "
692.16362 +"patches in 3.5 minutes, and <command role=\"hg-cmd\">hg qpop <option role="
692.16363 +"\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> them all in 30 seconds.  "
692.16364 +"(On a newer laptop, the time to push all patches dropped to two minutes.)  I "
692.16365 +"could <command role=\"hg-ext-mq\">qrefresh</command> one of the biggest "
692.16366 +"patches (which made 22,779 lines of changes to 287 files) in 6.6 seconds."
692.16367 +msgstr ""
692.16368 +
692.16369 +#. type: Content of: <book><chapter><sect1><para>
692.16370 +#: ../en/ch12-mq.xml:820
692.16371 +msgid ""
692.16372 +"Clearly, MQ is well suited to working in large trees, but there are a few "
692.16373 +"tricks you can use to get the best performance of it."
692.16374 +msgstr ""
692.16375 +
692.16376 +#. type: Content of: <book><chapter><sect1><para>
692.16377 +#: ../en/ch12-mq.xml:824
692.16378 +msgid ""
692.16379 +"First of all, try to <quote>batch</quote> operations together.  Every time "
692.16380 +"you run <command role=\"hg-ext-mq\">qpush</command> or <command role=\"hg-ext-"
692.16381 +"mq\">qpop</command>, these commands scan the working directory once to make "
692.16382 +"sure you haven't made some changes and then forgotten to run <command role="
692.16383 +"\"hg-ext-mq\">qrefresh</command>.  On a small tree, the time that this scan "
692.16384 +"takes is unnoticeable.  However, on a medium-sized tree (containing tens of "
692.16385 +"thousands of files), it can take a second or more."
692.16386 +msgstr ""
692.16387 +
692.16388 +#. type: Content of: <book><chapter><sect1><para>
692.16389 +#: ../en/ch12-mq.xml:835
692.16390 +msgid ""
692.16391 +"The <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-mq"
692.16392 +"\">qpop</command> commands allow you to push and pop multiple patches at a "
692.16393 +"time.  You can identify the <quote>destination patch</quote> that you want to "
692.16394 +"end up at.  When you <command role=\"hg-ext-mq\">qpush</command> with a "
692.16395 +"destination specified, it will push patches until that patch is at the top of "
692.16396 +"the applied stack.  When you <command role=\"hg-ext-mq\">qpop</command> to a "
692.16397 +"destination, MQ will pop patches until the destination patch is at the top."
692.16398 +msgstr ""
692.16399 +
692.16400 +#. type: Content of: <book><chapter><sect1><para>
692.16401 +#: ../en/ch12-mq.xml:845
692.16402 +msgid ""
692.16403 +"You can identify a destination patch using either the name of the patch, or "
692.16404 +"by number.  If you use numeric addressing, patches are counted from zero; "
692.16405 +"this means that the first patch is zero, the second is one, and so on."
692.16406 +msgstr ""
692.16407 +
692.16408 +#. type: Content of: <book><chapter><sect1><title>
692.16409 +#: ../en/ch12-mq.xml:852
692.16410 +msgid "Updating your patches when the underlying code changes"
692.16411 +msgstr "当基础代码改变时,更新补丁的方法"
692.16412 +
692.16413 +#. type: Content of: <book><chapter><sect1><para>
692.16414 +#: ../en/ch12-mq.xml:855
692.16415 +msgid ""
692.16416 +"It's common to have a stack of patches on top of an underlying repository "
692.16417 +"that you don't modify directly.  If you're working on changes to third-party "
692.16418 +"code, or on a feature that is taking longer to develop than the rate of "
692.16419 +"change of the code beneath, you will often need to sync up with the "
692.16420 +"underlying code, and fix up any hunks in your patches that no longer apply.  "
692.16421 +"This is called <emphasis>rebasing</emphasis> your patch series."
692.16422 +msgstr ""
692.16423 +
692.16424 +#. type: Content of: <book><chapter><sect1><para>
692.16425 +#: ../en/ch12-mq.xml:864
692.16426 +msgid ""
692.16427 +"The simplest way to do this is to <command role=\"hg-cmd\">hg qpop <option "
692.16428 +"role=\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> your patches, then "
692.16429 +"<command role=\"hg-cmd\">hg pull</command> changes into the underlying "
692.16430 +"repository, and finally <command role=\"hg-cmd\">hg qpush <option role=\"hg-"
692.16431 +"ext-mq-cmd-qpop-opt\">hg -a</option></command> your patches again.  MQ will "
692.16432 +"stop pushing any time it runs across a patch that fails to apply during "
692.16433 +"conflicts, allowing you to fix your conflicts, <command role=\"hg-ext-mq"
692.16434 +"\">qrefresh</command> the affected patch, and continue pushing until you have "
692.16435 +"fixed your entire stack."
692.16436 +msgstr ""
692.16437 +
692.16438 +#. type: Content of: <book><chapter><sect1><para>
692.16439 +#: ../en/ch12-mq.xml:876
692.16440 +msgid ""
692.16441 +"This approach is easy to use and works well if you don't expect changes to "
692.16442 +"the underlying code to affect how well your patches apply. If your patch "
692.16443 +"stack touches code that is modified frequently or invasively in the "
692.16444 +"underlying repository, however, fixing up rejected hunks by hand quickly "
692.16445 +"becomes tiresome."
692.16446 +msgstr ""
692.16447 +
692.16448 +#. type: Content of: <book><chapter><sect1><para>
692.16449 +#: ../en/ch12-mq.xml:883
692.16450 +msgid ""
692.16451 +"It's possible to partially automate the rebasing process.  If your patches "
692.16452 +"apply cleanly against some revision of the underlying repo, MQ can use this "
692.16453 +"information to help you to resolve conflicts between your patches and a "
692.16454 +"different revision."
692.16455 +msgstr ""
692.16456 +
692.16457 +#. type: Content of: <book><chapter><sect1><para>
692.16458 +#: ../en/ch12-mq.xml:889
692.16459 +msgid "The process is a little involved."
692.16460 +msgstr ""
692.16461 +
692.16462 +#. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
692.16463 +#: ../en/ch12-mq.xml:891
692.16464 +msgid ""
692.16465 +"To begin, <command role=\"hg-cmd\">hg qpush -a</command> all of your patches "
692.16466 +"on top of the revision where you know that they apply cleanly."
692.16467 +msgstr ""
692.16468 +
692.16469 +#. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
692.16470 +#: ../en/ch12-mq.xml:895
692.16471 +msgid ""
692.16472 +"Save a backup copy of your patch directory using <command role=\"hg-cmd\">hg "
692.16473 +"qsave <option role=\"hg-ext-mq-cmd-qsave-opt\">hg -e</option> <option role="
692.16474 +"\"hg-ext-mq-cmd-qsave-opt\">hg -c</option></command>.  This prints the name "
692.16475 +"of the directory that it has saved the patches in.  It will save the patches "
692.16476 +"to a directory called <filename role=\"special\" class=\"directory\">.hg/"
692.16477 +"patches.N</filename>, where <literal>N</literal> is a small integer.  It also "
692.16478 +"commits a <quote>save changeset</quote> on top of your applied patches; this "
692.16479 +"is for internal book-keeping, and records the states of the <filename role="
692.16480 +"\"special\">series</filename> and <filename role=\"special\">status</"
692.16481 +"filename> files."
692.16482 +msgstr ""
692.16483 +
692.16484 +#. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
692.16485 +#: ../en/ch12-mq.xml:909
692.16486 +msgid ""
692.16487 +"Use <command role=\"hg-cmd\">hg pull</command> to bring new changes into the "
692.16488 +"underlying repository.  (Don't run <command role=\"hg-cmd\">hg pull -u</"
692.16489 +"command>; see below for why.)"
692.16490 +msgstr ""
692.16491 +
692.16492 +#. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
692.16493 +#: ../en/ch12-mq.xml:914
692.16494 +msgid ""
692.16495 +"Update to the new tip revision, using <command role=\"hg-cmd\">hg update "
692.16496 +"<option role=\"hg-opt-update\">-C</option></command> to override the patches "
692.16497 +"you have pushed."
692.16498 +msgstr ""
692.16499 +
692.16500 +#. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
692.16501 +#: ../en/ch12-mq.xml:919
692.16502 +msgid ""
692.16503 +"Merge all patches using <command>hg qpush -m -a</command>.  The <option role="
692.16504 +"\"hg-ext-mq-cmd-qpush-opt\">-m</option> option to <command role=\"hg-ext-mq"
692.16505 +"\">qpush</command> tells MQ to perform a three-way merge if the patch fails "
692.16506 +"to apply."
692.16507 +msgstr ""
692.16508 +
692.16509 +#. type: Content of: <book><chapter><sect1><para>
692.16510 +#: ../en/ch12-mq.xml:927
692.16511 +msgid ""
692.16512 +"During the <command role=\"hg-cmd\">hg qpush <option role=\"hg-ext-mq-cmd-"
692.16513 +"qpush-opt\">hg -m</option></command>, each patch in the <filename role="
692.16514 +"\"special\">series</filename> file is applied normally.  If a patch applies "
692.16515 +"with fuzz or rejects, MQ looks at the queue you <command role=\"hg-ext-mq"
692.16516 +"\">qsave</command>d, and performs a three-way merge with the corresponding "
692.16517 +"changeset.  This merge uses Mercurial's normal merge machinery, so it may pop "
692.16518 +"up a GUI merge tool to help you to resolve problems."
692.16519 +msgstr ""
692.16520 +
692.16521 +#. type: Content of: <book><chapter><sect1><para>
692.16522 +#: ../en/ch12-mq.xml:937
692.16523 +msgid ""
692.16524 +"When you finish resolving the effects of a patch, MQ refreshes your patch "
692.16525 +"based on the result of the merge."
692.16526 +msgstr ""
692.16527 +
692.16528 +#. type: Content of: <book><chapter><sect1><para>
692.16529 +#: ../en/ch12-mq.xml:940
692.16530 +msgid ""
692.16531 +"At the end of this process, your repository will have one extra head from the "
692.16532 +"old patch queue, and a copy of the old patch queue will be in <filename role="
692.16533 +"\"special\" class=\"directory\">.hg/patches.N</filename>. You can remove the "
692.16534 +"extra head using <command role=\"hg-cmd\">hg qpop -a -n patches.N</command> "
692.16535 +"or <command role=\"hg-cmd\">hg strip</command>.  You can delete <filename "
692.16536 +"role=\"special\" class=\"directory\">.hg/patches.N</filename> once you are "
692.16537 +"sure that you no longer need it as a backup."
692.16538 +msgstr ""
692.16539 +
692.16540 +#. type: Content of: <book><chapter><sect1><title>
692.16541 +#: ../en/ch12-mq.xml:952
692.16542 +msgid "Identifying patches"
692.16543 +msgstr "标识补丁"
692.16544 +
692.16545 +#. type: Content of: <book><chapter><sect1><para>
692.16546 +#: ../en/ch12-mq.xml:954
692.16547 +msgid ""
692.16548 +"MQ commands that work with patches let you refer to a patch either by using "
692.16549 +"its name or by a number.  By name is obvious enough; pass the name "
692.16550 +"<filename>foo.patch</filename> to <command role=\"hg-ext-mq\">qpush</"
692.16551 +"command>, for example, and it will push patches until <filename>foo.patch</"
692.16552 +"filename> is applied."
692.16553 +msgstr ""
692.16554 +
692.16555 +#. type: Content of: <book><chapter><sect1><para>
692.16556 +#: ../en/ch12-mq.xml:961
692.16557 +msgid ""
692.16558 +"As a shortcut, you can refer to a patch using both a name and a numeric "
692.16559 +"offset; <literal>foo.patch-2</literal> means <quote>two patches before "
692.16560 +"<literal>foo.patch</literal></quote>, while <literal>bar.patch+4</literal> "
692.16561 +"means <quote>four patches after <literal>bar.patch</literal></quote>."
692.16562 +msgstr ""
692.16563 +
692.16564 +#. type: Content of: <book><chapter><sect1><para>
692.16565 +#: ../en/ch12-mq.xml:967
692.16566 +msgid ""
692.16567 +"Referring to a patch by index isn't much different.  The first patch printed "
692.16568 +"in the output of <command role=\"hg-ext-mq\">qseries</command> is patch zero "
692.16569 +"(yes, it's one of those start-at-zero counting systems); the second is patch "
692.16570 +"one; and so on."
692.16571 +msgstr ""
692.16572 +
692.16573 +#. type: Content of: <book><chapter><sect1><para>
692.16574 +#: ../en/ch12-mq.xml:973
692.16575 +msgid ""
692.16576 +"MQ also makes it easy to work with patches when you are using normal "
692.16577 +"Mercurial commands.  Every command that accepts a changeset ID will also "
692.16578 +"accept the name of an applied patch.  MQ augments the tags normally in the "
692.16579 +"repository with an eponymous one for each applied patch.  In addition, the "
692.16580 +"special tags <literal role=\"tag\">qbase</literal> and <literal role=\"tag"
692.16581 +"\">qtip</literal> identify the <quote>bottom-most</quote> and topmost applied "
692.16582 +"patches, respectively."
692.16583 +msgstr ""
692.16584 +
692.16585 +#. type: Content of: <book><chapter><sect1><para>
692.16586 +#: ../en/ch12-mq.xml:983
692.16587 +msgid ""
692.16588 +"These additions to Mercurial's normal tagging capabilities make dealing with "
692.16589 +"patches even more of a breeze."
692.16590 +msgstr ""
692.16591 +
692.16592 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.16593 +#: ../en/ch12-mq.xml:986
692.16594 +msgid "Want to patchbomb a mailing list with your latest series of changes?"
692.16595 +msgstr ""
692.16596 +
692.16597 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.16598 +#: ../en/ch12-mq.xml:989
692.16599 +msgid ""
692.16600 +"(Don't know what <quote>patchbombing</quote> is? See <xref linkend=\"sec:"
692.16601 +"hgext:patchbomb\"/>.)"
692.16602 +msgstr ""
692.16603 +
692.16604 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.16605 +#: ../en/ch12-mq.xml:992
692.16606 +msgid ""
692.16607 +"Need to see all of the patches since <literal>foo.patch</literal> that have "
692.16608 +"touched files in a subdirectory of your tree?"
692.16609 +msgstr ""
692.16610 +
692.16611 +#. type: Content of: <book><chapter><sect1><para>
692.16612 +#: ../en/ch12-mq.xml:999
692.16613 +msgid ""
692.16614 +"Because MQ makes the names of patches available to the rest of Mercurial "
692.16615 +"through its normal internal tag machinery, you don't need to type in the "
692.16616 +"entire name of a patch when you want to identify it by name."
692.16617 +msgstr ""
692.16618 +
692.16619 +#. type: Content of: <book><chapter><sect1><para>
692.16620 +#: ../en/ch12-mq.xml:1004
692.16621 +msgid ""
692.16622 +"Another nice consequence of representing patch names as tags is that when you "
692.16623 +"run the <command role=\"hg-cmd\">hg log</command> command, it will display a "
692.16624 +"patch's name as a tag, simply as part of its normal output.  This makes it "
692.16625 +"easy to visually distinguish applied patches from underlying <quote>normal</"
692.16626 +"quote> revisions.  The following example shows a few normal Mercurial "
692.16627 +"commands in use with applied patches."
692.16628 +msgstr ""
692.16629 +
692.16630 +#. type: Content of: <book><chapter><sect1><title>
692.16631 +#: ../en/ch12-mq.xml:1017
692.16632 +msgid "Useful things to know about"
692.16633 +msgstr "其它需要了解的东西"
692.16634 +
692.16635 +#. type: Content of: <book><chapter><sect1><para>
692.16636 +#: ../en/ch12-mq.xml:1019
692.16637 +msgid ""
692.16638 +"There are a number of aspects of MQ usage that don't fit tidily into sections "
692.16639 +"of their own, but that are good to know.  Here they are, in one place."
692.16640 +msgstr ""
692.16641 +
692.16642 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.16643 +#: ../en/ch12-mq.xml:1024
692.16644 +msgid ""
692.16645 +"Normally, when you <command role=\"hg-ext-mq\">qpop</command> a patch and "
692.16646 +"<command role=\"hg-ext-mq\">qpush</command> it again, the changeset that "
692.16647 +"represents the patch after the pop/push will have a <emphasis>different "
692.16648 +"identity</emphasis> than the changeset that represented the hash beforehand.  "
692.16649 +"See <xref linkend=\"sec:mqref:cmd:qpush\"/> for information as to why this is."
692.16650 +msgstr ""
692.16651 +
692.16652 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.16653 +#: ../en/ch12-mq.xml:1033
692.16654 +msgid ""
692.16655 +"It's not a good idea to <command role=\"hg-cmd\">hg merge</command> changes "
692.16656 +"from another branch with a patch changeset, at least if you want to maintain "
692.16657 +"the <quote>patchiness</quote> of that changeset and changesets below it on "
692.16658 +"the patch stack.  If you try to do this, it will appear to succeed, but MQ "
692.16659 +"will become confused."
692.16660 +msgstr ""
692.16661 +
692.16662 +#. type: Content of: <book><chapter><sect1><title>
692.16663 +#: ../en/ch12-mq.xml:1044
692.16664 +msgid "Managing patches in a repository"
692.16665 +msgstr "在版本库管理补丁"
692.16666 +
692.16667 +#. type: Content of: <book><chapter><sect1><para>
692.16668 +#: ../en/ch12-mq.xml:1046
692.16669 +msgid ""
692.16670 +"Because MQ's <filename role=\"special\" class=\"directory\">.hg/patches</"
692.16671 +"filename> directory resides outside a Mercurial repository's working "
692.16672 +"directory, the <quote>underlying</quote> Mercurial repository knows nothing "
692.16673 +"about the management or presence of patches."
692.16674 +msgstr ""
692.16675 +
692.16676 +#. type: Content of: <book><chapter><sect1><para>
692.16677 +#: ../en/ch12-mq.xml:1052
692.16678 +msgid ""
692.16679 +"This presents the interesting possibility of managing the contents of the "
692.16680 +"patch directory as a Mercurial repository in its own right.  This can be a "
692.16681 +"useful way to work.  For example, you can work on a patch for a while, "
692.16682 +"<command role=\"hg-ext-mq\">qrefresh</command> it, then <command role=\"hg-cmd"
692.16683 +"\">hg commit</command> the current state of the patch.  This lets you "
692.16684 +"<quote>roll back</quote> to that version of the patch later on."
692.16685 +msgstr ""
692.16686 +
692.16687 +#. type: Content of: <book><chapter><sect1><para>
692.16688 +#: ../en/ch12-mq.xml:1061
692.16689 +msgid ""
692.16690 +"You can then share different versions of the same patch stack among multiple "
692.16691 +"underlying repositories.  I use this when I am developing a Linux kernel "
692.16692 +"feature.  I have a pristine copy of my kernel sources for each of several CPU "
692.16693 +"architectures, and a cloned repository under each that contains the patches I "
692.16694 +"am working on.  When I want to test a change on a different architecture, I "
692.16695 +"push my current patches to the patch repository associated with that kernel "
692.16696 +"tree, pop and push all of my patches, and build and test that kernel."
692.16697 +msgstr ""
692.16698 +
692.16699 +#. type: Content of: <book><chapter><sect1><para>
692.16700 +#: ../en/ch12-mq.xml:1071
692.16701 +msgid ""
692.16702 +"Managing patches in a repository makes it possible for multiple developers to "
692.16703 +"work on the same patch series without colliding with each other, all on top "
692.16704 +"of an underlying source base that they may or may not control."
692.16705 +msgstr ""
692.16706 +
692.16707 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.16708 +#: ../en/ch12-mq.xml:1077
692.16709 +msgid "MQ support for patch repositories"
692.16710 +msgstr "MQ 支持补丁版本库"
692.16711 +
692.16712 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16713 +#: ../en/ch12-mq.xml:1079
692.16714 +msgid ""
692.16715 +"MQ helps you to work with the <filename role=\"special\" class=\"directory\">."
692.16716 +"hg/patches</filename> directory as a repository; when you prepare a "
692.16717 +"repository for working with patches using <command role=\"hg-ext-mq\">qinit</"
692.16718 +"command>, you can pass the <option role=\"hg-ext-mq-cmd-qinit-opt\">hg -c</"
692.16719 +"option> option to create the <filename role=\"special\" class=\"directory\">."
692.16720 +"hg/patches</filename> directory as a Mercurial repository."
692.16721 +msgstr ""
692.16722 +
692.16723 +#. type: Content of: <book><chapter><sect1><sect2><note><para>
692.16724 +#: ../en/ch12-mq.xml:1089
692.16725 +msgid ""
692.16726 +"If you forget to use the <option role=\"hg-ext-mq-cmd-qinit-opt\">hg -c</"
692.16727 +"option> option, you can simply go into the <filename role=\"special\" class="
692.16728 +"\"directory\">.hg/patches</filename> directory at any time and run <command "
692.16729 +"role=\"hg-cmd\">hg init</command>.  Don't forget to add an entry for the "
692.16730 +"<filename role=\"special\">status</filename> file to the <filename role="
692.16731 +"\"special\">.hgignore</filename> file, though"
692.16732 +msgstr ""
692.16733 +
692.16734 +#. type: Content of: <book><chapter><sect1><sect2><note><para>
692.16735 +#: ../en/ch12-mq.xml:1098
692.16736 +msgid ""
692.16737 +"(<command role=\"hg-cmd\">hg qinit <option role=\"hg-ext-mq-cmd-qinit-opt"
692.16738 +"\">hg -c</option></command> does this for you automatically); you "
692.16739 +"<emphasis>really</emphasis> don't want to manage the <filename role=\"special"
692.16740 +"\">status</filename> file."
692.16741 +msgstr ""
692.16742 +
692.16743 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16744 +#: ../en/ch12-mq.xml:1105
692.16745 +msgid ""
692.16746 +"As a convenience, if MQ notices that the <filename class=\"directory\">.hg/"
692.16747 +"patches</filename> directory is a repository, it will automatically <command "
692.16748 +"role=\"hg-cmd\">hg add</command> every patch that you create and import."
692.16749 +msgstr ""
692.16750 +
692.16751 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16752 +#: ../en/ch12-mq.xml:1110
692.16753 +msgid ""
692.16754 +"MQ provides a shortcut command, <command role=\"hg-ext-mq\">qcommit</"
692.16755 +"command>, that runs <command role=\"hg-cmd\">hg commit</command> in the "
692.16756 +"<filename role=\"special\" class=\"directory\">.hg/patches</filename> "
692.16757 +"directory.  This saves some bothersome typing."
692.16758 +msgstr ""
692.16759 +
692.16760 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16761 +#: ../en/ch12-mq.xml:1116
692.16762 +msgid ""
692.16763 +"Finally, as a convenience to manage the patch directory, you can define the "
692.16764 +"alias <command>mq</command> on Unix systems. For example, on Linux systems "
692.16765 +"using the <command>bash</command> shell, you can include the following "
692.16766 +"snippet in your <filename role=\"home\">~/.bashrc</filename>."
692.16767 +msgstr ""
692.16768 +
692.16769 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16770 +#: ../en/ch12-mq.xml:1125
692.16771 +msgid ""
692.16772 +"You can then issue commands of the form <command>mq pull</command> from the "
692.16773 +"main repository."
692.16774 +msgstr ""
692.16775 +
692.16776 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.16777 +#: ../en/ch12-mq.xml:1130
692.16778 +msgid "A few things to watch out for"
692.16779 +msgstr "需要注意的事情"
692.16780 +
692.16781 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16782 +#: ../en/ch12-mq.xml:1132
692.16783 +msgid ""
692.16784 +"MQ's support for working with a repository full of patches is limited in a "
692.16785 +"few small respects."
692.16786 +msgstr ""
692.16787 +
692.16788 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16789 +#: ../en/ch12-mq.xml:1135
692.16790 +msgid ""
692.16791 +"MQ cannot automatically detect changes that you make to the patch directory.  "
692.16792 +"If you <command role=\"hg-cmd\">hg pull</command>, manually edit, or <command "
692.16793 +"role=\"hg-cmd\">hg update</command> changes to patches or the <filename role="
692.16794 +"\"special\">series</filename> file, you will have to <command role=\"hg-cmd"
692.16795 +"\">hg qpop <option role=\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> "
692.16796 +"and then <command role=\"hg-cmd\">hg qpush <option role=\"hg-ext-mq-cmd-qpush-"
692.16797 +"opt\">hg -a</option></command> in the underlying repository to see those "
692.16798 +"changes show up there.  If you forget to do this, you can confuse MQ's idea "
692.16799 +"of which patches are applied."
692.16800 +msgstr ""
692.16801 +
692.16802 +#. type: Content of: <book><chapter><sect1><title>
692.16803 +#: ../en/ch12-mq.xml:1151
692.16804 +msgid "Third party tools for working with patches"
692.16805 +msgstr "操作补丁的第三方工具"
692.16806 +
692.16807 +#. type: Content of: <book><chapter><sect1><para>
692.16808 +#: ../en/ch12-mq.xml:1153
692.16809 +msgid ""
692.16810 +"Once you've been working with patches for a while, you'll find yourself "
692.16811 +"hungry for tools that will help you to understand and manipulate the patches "
692.16812 +"you're dealing with."
692.16813 +msgstr ""
692.16814 +
692.16815 +#. type: Content of: <book><chapter><sect1><para>
692.16816 +#: ../en/ch12-mq.xml:1157
692.16817 +msgid ""
692.16818 +"The <command>diffstat</command> command <citation>web:diffstat</citation> "
692.16819 +"generates a histogram of the modifications made to each file in a patch.  It "
692.16820 +"provides a good way to <quote>get a sense of</quote> a patch&emdash;which "
692.16821 +"files it affects, and how much change it introduces to each file and as a "
692.16822 +"whole.  (I find that it's a good idea to use <command>diffstat</command>'s "
692.16823 +"<option role=\"cmd-opt-diffstat\">-p</option> option as a matter of course, "
692.16824 +"as otherwise it will try to do clever things with prefixes of file names that "
692.16825 +"inevitably confuse at least me.)"
692.16826 +msgstr ""
692.16827 +
692.16828 +#. type: Content of: <book><chapter><sect1><para>
692.16829 +#: ../en/ch12-mq.xml:1171
692.16830 +msgid ""
692.16831 +"The <literal role=\"package\">patchutils</literal> package <citation>web:"
692.16832 +"patchutils</citation> is invaluable. It provides a set of small utilities "
692.16833 +"that follow the <quote>Unix philosophy;</quote> each does one useful thing "
692.16834 +"with a patch.  The <literal role=\"package\">patchutils</literal> command I "
692.16835 +"use most is <command>filterdiff</command>, which extracts subsets from a "
692.16836 +"patch file.  For example, given a patch that modifies hundreds of files "
692.16837 +"across dozens of directories, a single invocation of <command>filterdiff</"
692.16838 +"command> can generate a smaller patch that only touches files whose names "
692.16839 +"match a particular glob pattern.  See <xref linkend=\"mq-collab:tips:interdiff"
692.16840 +"\"/> for another example."
692.16841 +msgstr ""
692.16842 +
692.16843 +#. type: Content of: <book><chapter><sect1><title>
692.16844 +#: ../en/ch12-mq.xml:1187
692.16845 +msgid "Good ways to work with patches"
692.16846 +msgstr "操作补丁的好习惯"
692.16847 +
692.16848 +#. type: Content of: <book><chapter><sect1><para>
692.16849 +#: ../en/ch12-mq.xml:1189
692.16850 +msgid ""
692.16851 +"Whether you are working on a patch series to submit to a free software or "
692.16852 +"open source project, or a series that you intend to treat as a sequence of "
692.16853 +"regular changesets when you're done, you can use some simple techniques to "
692.16854 +"keep your work well organized."
692.16855 +msgstr ""
692.16856 +
692.16857 +#. type: Content of: <book><chapter><sect1><para>
692.16858 +#: ../en/ch12-mq.xml:1195
692.16859 +msgid ""
692.16860 +"Give your patches descriptive names.  A good name for a patch might be "
692.16861 +"<filename>rework-device-alloc.patch</filename>, because it will immediately "
692.16862 +"give you a hint what the purpose of the patch is.  Long names shouldn't be a "
692.16863 +"problem; you won't be typing the names often, but you <emphasis>will</"
692.16864 +"emphasis> be running commands like <command role=\"hg-ext-mq\">qapplied</"
692.16865 +"command> and <command role=\"hg-ext-mq\">qtop</command> over and over. Good "
692.16866 +"naming becomes especially important when you have a number of patches to work "
692.16867 +"with, or if you are juggling a number of different tasks and your patches "
692.16868 +"only get a fraction of your attention."
692.16869 +msgstr ""
692.16870 +
692.16871 +#. type: Content of: <book><chapter><sect1><para>
692.16872 +#: ../en/ch12-mq.xml:1207
692.16873 +msgid ""
692.16874 +"Be aware of what patch you're working on.  Use the <command role=\"hg-ext-mq"
692.16875 +"\">qtop</command> command and skim over the text of your patches "
692.16876 +"frequently&emdash;for example, using <command role=\"hg-cmd\">hg tip <option "
692.16877 +"role=\"hg-opt-tip\">-p</option></command>)&emdash;to be sure of where you "
692.16878 +"stand.  I have several times worked on and <command role=\"hg-ext-mq"
692.16879 +"\">qrefresh</command>ed a patch other than the one I intended, and it's often "
692.16880 +"tricky to migrate changes into the right patch after making them in the wrong "
692.16881 +"one."
692.16882 +msgstr ""
692.16883 +
692.16884 +#. type: Content of: <book><chapter><sect1><para>
692.16885 +#: ../en/ch12-mq.xml:1217
692.16886 +msgid ""
692.16887 +"For this reason, it is very much worth investing a little time to learn how "
692.16888 +"to use some of the third-party tools I described in <xref linkend=\"sec:mq:"
692.16889 +"tools\"/>, particularly <command>diffstat</command> and <command>filterdiff</"
692.16890 +"command>.  The former will give you a quick idea of what changes your patch "
692.16891 +"is making, while the latter makes it easy to splice hunks selectively out of "
692.16892 +"one patch and into another."
692.16893 +msgstr ""
692.16894 +
692.16895 +#. type: Content of: <book><chapter><sect1><title>
692.16896 +#: ../en/ch12-mq.xml:1228
692.16897 +msgid "MQ cookbook"
692.16898 +msgstr "MQ 手册"
692.16899 +
692.16900 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.16901 +#: ../en/ch12-mq.xml:1231
692.16902 +msgid "Manage <quote>trivial</quote> patches"
692.16903 +msgstr "管理<quote>琐碎的</quote>补丁"
692.16904 +
692.16905 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16906 +#: ../en/ch12-mq.xml:1233
692.16907 +msgid ""
692.16908 +"Because the overhead of dropping files into a new Mercurial repository is so "
692.16909 +"low, it makes a lot of sense to manage patches this way even if you simply "
692.16910 +"want to make a few changes to a source tarball that you downloaded."
692.16911 +msgstr ""
692.16912 +
692.16913 +#
692.16914 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16915 +#: ../en/ch12-mq.xml:1238
692.16916 +msgid ""
692.16917 +"Begin by downloading and unpacking the source tarball, and turning it into a "
692.16918 +"Mercurial repository."
692.16919 +msgstr ""
692.16920 +
692.16921 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16922 +#: ../en/ch12-mq.xml:1243
692.16923 +msgid "Continue by creating a patch stack and making your changes."
692.16924 +msgstr ""
692.16925 +
692.16926 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16927 +#: ../en/ch12-mq.xml:1248
692.16928 +msgid ""
692.16929 +"Let's say a few weeks or months pass, and your package author releases a new "
692.16930 +"version.  First, bring their changes into the repository."
692.16931 +msgstr ""
692.16932 +
692.16933 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16934 +#: ../en/ch12-mq.xml:1254
692.16935 +msgid ""
692.16936 +"The pipeline starting with <command role=\"hg-cmd\">hg locate</command> above "
692.16937 +"deletes all files in the working directory, so that <command role=\"hg-cmd"
692.16938 +"\">hg commit</command>'s <option role=\"hg-opt-commit\">--addremove</option> "
692.16939 +"option can actually tell which files have really been removed in the newer "
692.16940 +"version of the source."
692.16941 +msgstr ""
692.16942 +
692.16943 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16944 +#: ../en/ch12-mq.xml:1262
692.16945 +msgid "Finally, you can apply your patches on top of the new tree."
692.16946 +msgstr ""
692.16947 +
692.16948 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.16949 +#: ../en/ch12-mq.xml:1269
692.16950 +msgid "Combining entire patches"
692.16951 +msgstr "组合全部的补丁"
692.16952 +
692.16953 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16954 +#: ../en/ch12-mq.xml:1271
692.16955 +msgid ""
692.16956 +"MQ provides a command, <command role=\"hg-ext-mq\">qfold</command> that lets "
692.16957 +"you combine entire patches.  This <quote>folds</quote> the patches you name, "
692.16958 +"in the order you name them, into the topmost applied patch, and concatenates "
692.16959 +"their descriptions onto the end of its description.  The patches that you "
692.16960 +"fold must be unapplied before you fold them."
692.16961 +msgstr ""
692.16962 +
692.16963 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16964 +#: ../en/ch12-mq.xml:1279
692.16965 +msgid ""
692.16966 +"The order in which you fold patches matters.  If your topmost applied patch "
692.16967 +"is <literal>foo</literal>, and you <command role=\"hg-ext-mq\">qfold</"
692.16968 +"command> <literal>bar</literal> and <literal>quux</literal> into it, you will "
692.16969 +"end up with a patch that has the same effect as if you applied first "
692.16970 +"<literal>foo</literal>, then <literal>bar</literal>, followed by "
692.16971 +"<literal>quux</literal>."
692.16972 +msgstr ""
692.16973 +
692.16974 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.16975 +#: ../en/ch12-mq.xml:1290
692.16976 +msgid "Merging part of one patch into another"
692.16977 +msgstr "合并补丁的部分内容到其它补丁"
692.16978 +
692.16979 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16980 +#: ../en/ch12-mq.xml:1292
692.16981 +msgid ""
692.16982 +"Merging <emphasis>part</emphasis> of one patch into another is more difficult "
692.16983 +"than combining entire patches."
692.16984 +msgstr ""
692.16985 +
692.16986 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.16987 +#: ../en/ch12-mq.xml:1296
692.16988 +msgid ""
692.16989 +"If you want to move changes to entire files, you can use <command>filterdiff</"
692.16990 +"command>'s <option role=\"cmd-opt-filterdiff\">-i</option> and <option role="
692.16991 +"\"cmd-opt-filterdiff\">-x</option> options to choose the modifications to "
692.16992 +"snip out of one patch, concatenating its output onto the end of the patch you "
692.16993 +"want to merge into.  You usually won't need to modify the patch you've merged "
692.16994 +"the changes from.  Instead, MQ will report some rejected hunks when you "
692.16995 +"<command role=\"hg-ext-mq\">qpush</command> it (from the hunks you moved into "
692.16996 +"the other patch), and you can simply <command role=\"hg-ext-mq\">qrefresh</"
692.16997 +"command> the patch to drop the duplicate hunks."
692.16998 +msgstr ""
692.16999 +
692.17000 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17001 +#: ../en/ch12-mq.xml:1309
692.17002 +msgid ""
692.17003 +"If you have a patch that has multiple hunks modifying a file, and you only "
692.17004 +"want to move a few of those hunks, the job becomes more messy, but you can "
692.17005 +"still partly automate it.  Use <command>lsdiff -nvv</command> to print some "
692.17006 +"metadata about the patch."
692.17007 +msgstr ""
692.17008 +
692.17009 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17010 +#: ../en/ch12-mq.xml:1317
692.17011 +msgid "This command prints three different kinds of number:"
692.17012 +msgstr ""
692.17013 +
692.17014 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.17015 +#: ../en/ch12-mq.xml:1320
692.17016 +msgid ""
692.17017 +"(in the first column) a <emphasis>file number</emphasis> to identify each "
692.17018 +"file modified in the patch;"
692.17019 +msgstr ""
692.17020 +
692.17021 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.17022 +#: ../en/ch12-mq.xml:1324
692.17023 +msgid ""
692.17024 +"(on the next line, indented) the line number within a modified file where a "
692.17025 +"hunk starts; and"
692.17026 +msgstr ""
692.17027 +
692.17028 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.17029 +#: ../en/ch12-mq.xml:1327
692.17030 +msgid ""
692.17031 +"(on the same line) a <emphasis>hunk number</emphasis> to identify that hunk."
692.17032 +msgstr ""
692.17033 +
692.17034 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17035 +#: ../en/ch12-mq.xml:1331
692.17036 +msgid ""
692.17037 +"You'll have to use some visual inspection, and reading of the patch, to "
692.17038 +"identify the file and hunk numbers you'll want, but you can then pass them to "
692.17039 +"to <command>filterdiff</command>'s <option role=\"cmd-opt-filterdiff\">--"
692.17040 +"files</option> and <option role=\"cmd-opt-filterdiff\">--hunks</option> "
692.17041 +"options, to select exactly the file and hunk you want to extract."
692.17042 +msgstr ""
692.17043 +
692.17044 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17045 +#: ../en/ch12-mq.xml:1339
692.17046 +msgid ""
692.17047 +"Once you have this hunk, you can concatenate it onto the end of your "
692.17048 +"destination patch and continue with the remainder of <xref linkend=\"sec:mq:"
692.17049 +"combine\"/>."
692.17050 +msgstr ""
692.17051 +
692.17052 +#. type: Content of: <book><chapter><sect1><title>
692.17053 +#: ../en/ch12-mq.xml:1346
692.17054 +msgid "Differences between quilt and MQ"
692.17055 +msgstr "MQ 与 quilt 的区别"
692.17056 +
692.17057 +#. type: Content of: <book><chapter><sect1><para>
692.17058 +#: ../en/ch12-mq.xml:1348
692.17059 +msgid ""
692.17060 +"If you are already familiar with quilt, MQ provides a similar command set.  "
692.17061 +"There are a few differences in the way that it works."
692.17062 +msgstr ""
692.17063 +
692.17064 +#. type: Content of: <book><chapter><sect1><para>
692.17065 +#: ../en/ch12-mq.xml:1352
692.17066 +msgid ""
692.17067 +"You will already have noticed that most quilt commands have MQ counterparts "
692.17068 +"that simply begin with a <quote><literal>q</literal></quote>.  The exceptions "
692.17069 +"are quilt's <literal>add</literal> and <literal>remove</literal> commands, "
692.17070 +"the counterparts for which are the normal Mercurial <command role=\"hg-cmd"
692.17071 +"\">hg add</command> and <command role=\"hg-cmd\">hg remove</command> "
692.17072 +"commands.  There is no MQ equivalent of the quilt <literal>edit</literal> "
692.17073 +"command."
692.17074 +msgstr ""
692.17075 +
692.17076 +#. type: Content of: <book><chapter><title>
692.17077 +#: ../en/ch13-mq-collab.xml:5
692.17078 +msgid "Advanced uses of Mercurial Queues"
692.17079 +msgstr "MQ 的高级用法"
692.17080 +
692.17081 +#. type: Content of: <book><chapter><para>
692.17082 +#: ../en/ch13-mq-collab.xml:7
692.17083 +msgid ""
692.17084 +"While it's easy to pick up straightforward uses of Mercurial Queues, use of a "
692.17085 +"little discipline and some of MQ's less frequently used capabilities makes it "
692.17086 +"possible to work in complicated development environments."
692.17087 +msgstr ""
692.17088 +
692.17089 +#. type: Content of: <book><chapter><para>
692.17090 +#: ../en/ch13-mq-collab.xml:12
692.17091 +msgid ""
692.17092 +"In this chapter, I will use as an example a technique I have used to manage "
692.17093 +"the development of an Infiniband device driver for the Linux kernel.  The "
692.17094 +"driver in question is large (at least as drivers go), with 25,000 lines of "
692.17095 +"code spread across 35 source files.  It is maintained by a small team of "
692.17096 +"developers."
692.17097 +msgstr ""
692.17098 +
692.17099 +#. type: Content of: <book><chapter><para>
692.17100 +#: ../en/ch13-mq-collab.xml:18
692.17101 +msgid ""
692.17102 +"While much of the material in this chapter is specific to Linux, the same "
692.17103 +"principles apply to any code base for which you're not the primary owner, and "
692.17104 +"upon which you need to do a lot of development."
692.17105 +msgstr ""
692.17106 +
692.17107 +#. type: Content of: <book><chapter><sect1><title>
692.17108 +#: ../en/ch13-mq-collab.xml:24
692.17109 +msgid "The problem of many targets"
692.17110 +msgstr "多个目标的问题"
692.17111 +
692.17112 +#. type: Content of: <book><chapter><sect1><para>
692.17113 +#: ../en/ch13-mq-collab.xml:26
692.17114 +msgid ""
692.17115 +"The Linux kernel changes rapidly, and has never been internally stable; "
692.17116 +"developers frequently make drastic changes between releases. This means that "
692.17117 +"a version of the driver that works well with a particular released version of "
692.17118 +"the kernel will not even <emphasis>compile</emphasis> correctly against, "
692.17119 +"typically, any other version."
692.17120 +msgstr ""
692.17121 +
692.17122 +#. type: Content of: <book><chapter><sect1><para>
692.17123 +#: ../en/ch13-mq-collab.xml:33
692.17124 +msgid ""
692.17125 +"To maintain a driver, we have to keep a number of distinct versions of Linux "
692.17126 +"in mind."
692.17127 +msgstr ""
692.17128 +
692.17129 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17130 +#: ../en/ch13-mq-collab.xml:36
692.17131 +msgid ""
692.17132 +"One target is the main Linux kernel development tree. Maintenance of the code "
692.17133 +"is in this case partly shared by other developers in the kernel community, "
692.17134 +"who make <quote>drive-by</quote> modifications to the driver as they develop "
692.17135 +"and refine kernel subsystems."
692.17136 +msgstr ""
692.17137 +
692.17138 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17139 +#: ../en/ch13-mq-collab.xml:42
692.17140 +msgid ""
692.17141 +"We also maintain a number of <quote>backports</quote> to older versions of "
692.17142 +"the Linux kernel, to support the needs of customers who are running older "
692.17143 +"Linux distributions that do not incorporate our drivers.  (To "
692.17144 +"<emphasis>backport</emphasis> a piece of code is to modify it to work in an "
692.17145 +"older version of its target environment than the version it was developed "
692.17146 +"for.)"
692.17147 +msgstr ""
692.17148 +
692.17149 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17150 +#: ../en/ch13-mq-collab.xml:50
692.17151 +msgid ""
692.17152 +"Finally, we make software releases on a schedule that is necessarily not "
692.17153 +"aligned with those used by Linux distributors and kernel developers, so that "
692.17154 +"we can deliver new features to customers without forcing them to upgrade "
692.17155 +"their entire kernels or distributions."
692.17156 +msgstr ""
692.17157 +
692.17158 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.17159 +#: ../en/ch13-mq-collab.xml:58
692.17160 +msgid "Tempting approaches that don't work well"
692.17161 +msgstr "工作不好的诱人方法"
692.17162 +
692.17163 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17164 +#: ../en/ch13-mq-collab.xml:60
692.17165 +msgid ""
692.17166 +"There are two <quote>standard</quote> ways to maintain a piece of software "
692.17167 +"that has to target many different environments."
692.17168 +msgstr ""
692.17169 +
692.17170 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17171 +#: ../en/ch13-mq-collab.xml:64
692.17172 +msgid ""
692.17173 +"The first is to maintain a number of branches, each intended for a single "
692.17174 +"target.  The trouble with this approach is that you must maintain iron "
692.17175 +"discipline in the flow of changes between repositories. A new feature or bug "
692.17176 +"fix must start life in a <quote>pristine</quote> repository, then percolate "
692.17177 +"out to every backport repository.  Backport changes are more limited in the "
692.17178 +"branches they should propagate to; a backport change that is applied to a "
692.17179 +"branch where it doesn't belong will probably stop the driver from compiling."
692.17180 +msgstr ""
692.17181 +
692.17182 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17183 +#: ../en/ch13-mq-collab.xml:74
692.17184 +msgid ""
692.17185 +"The second is to maintain a single source tree filled with conditional "
692.17186 +"statements that turn chunks of code on or off depending on the intended "
692.17187 +"target.  Because these <quote>ifdefs</quote> are not allowed in the Linux "
692.17188 +"kernel tree, a manual or automatic process must be followed to strip them out "
692.17189 +"and yield a clean tree.  A code base maintained in this fashion rapidly "
692.17190 +"becomes a rat's nest of conditional blocks that are difficult to understand "
692.17191 +"and maintain."
692.17192 +msgstr ""
692.17193 +
692.17194 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17195 +#: ../en/ch13-mq-collab.xml:83
692.17196 +msgid ""
692.17197 +"Neither of these approaches is well suited to a situation where you don't "
692.17198 +"<quote>own</quote> the canonical copy of a source tree.  In the case of a "
692.17199 +"Linux driver that is distributed with the standard kernel, Linus's tree "
692.17200 +"contains the copy of the code that will be treated by the world as "
692.17201 +"canonical.  The upstream version of <quote>my</quote> driver can be modified "
692.17202 +"by people I don't know, without me even finding out about it until after the "
692.17203 +"changes show up in Linus's tree."
692.17204 +msgstr ""
692.17205 +
692.17206 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17207 +#: ../en/ch13-mq-collab.xml:93
692.17208 +msgid ""
692.17209 +"These approaches have the added weakness of making it difficult to generate "
692.17210 +"well-formed patches to submit upstream."
692.17211 +msgstr ""
692.17212 +
692.17213 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17214 +#: ../en/ch13-mq-collab.xml:97
692.17215 +msgid ""
692.17216 +"In principle, Mercurial Queues seems like a good candidate to manage a "
692.17217 +"development scenario such as the above.  While this is indeed the case, MQ "
692.17218 +"contains a few added features that make the job more pleasant."
692.17219 +msgstr ""
692.17220 +
692.17221 +#. type: Content of: <book><chapter><sect1><title>
692.17222 +#: ../en/ch13-mq-collab.xml:105
692.17223 +msgid "Conditionally applying patches with guards"
692.17224 +msgstr "有条件的应用补丁"
692.17225 +
692.17226 +#. type: Content of: <book><chapter><sect1><para>
692.17227 +#: ../en/ch13-mq-collab.xml:107
692.17228 +msgid ""
692.17229 +"Perhaps the best way to maintain sanity with so many targets is to be able to "
692.17230 +"choose specific patches to apply for a given situation.  MQ provides a "
692.17231 +"feature called <quote>guards</quote> (which originates with quilt's "
692.17232 +"<literal>guards</literal> command) that does just this.  To start off, let's "
692.17233 +"create a simple repository for experimenting in."
692.17234 +msgstr ""
692.17235 +
692.17236 +#. type: Content of: <book><chapter><sect1><para>
692.17237 +#: ../en/ch13-mq-collab.xml:116
692.17238 +msgid ""
692.17239 +"This gives us a tiny repository that contains two patches that don't have any "
692.17240 +"dependencies on each other, because they touch different files."
692.17241 +msgstr ""
692.17242 +
692.17243 +#. type: Content of: <book><chapter><sect1><para>
692.17244 +#: ../en/ch13-mq-collab.xml:120
692.17245 +msgid ""
692.17246 +"The idea behind conditional application is that you can <quote>tag</quote> a "
692.17247 +"patch with a <emphasis>guard</emphasis>, which is simply a text string of "
692.17248 +"your choosing, then tell MQ to select specific guards to use when applying "
692.17249 +"patches.  MQ will then either apply, or skip over, a guarded patch, depending "
692.17250 +"on the guards that you have selected."
692.17251 +msgstr ""
692.17252 +
692.17253 +#. type: Content of: <book><chapter><sect1><para>
692.17254 +#: ../en/ch13-mq-collab.xml:127
692.17255 +msgid ""
692.17256 +"A patch can have an arbitrary number of guards; each one is "
692.17257 +"<emphasis>positive</emphasis> (<quote>apply this patch if this guard is "
692.17258 +"selected</quote>) or <emphasis>negative</emphasis> (<quote>skip this patch if "
692.17259 +"this guard is selected</quote>).  A patch with no guards is always applied."
692.17260 +msgstr ""
692.17261 +
692.17262 +#. type: Content of: <book><chapter><sect1><title>
692.17263 +#: ../en/ch13-mq-collab.xml:135
692.17264 +msgid "Controlling the guards on a patch"
692.17265 +msgstr "控制补丁的应用条件"
692.17266 +
692.17267 +#. type: Content of: <book><chapter><sect1><para>
692.17268 +#: ../en/ch13-mq-collab.xml:137
692.17269 +msgid ""
692.17270 +"The <command role=\"hg-ext-mq\">qguard</command> command lets you determine "
692.17271 +"which guards should apply to a patch, or display the guards that are already "
692.17272 +"in effect. Without any arguments, it displays the guards on the current "
692.17273 +"topmost patch."
692.17274 +msgstr ""
692.17275 +
692.17276 +#. type: Content of: <book><chapter><sect1><para>
692.17277 +#: ../en/ch13-mq-collab.xml:144
692.17278 +msgid ""
692.17279 +"To set a positive guard on a patch, prefix the name of the guard with a "
692.17280 +"<quote><literal>+</literal></quote>."
692.17281 +msgstr ""
692.17282 +
692.17283 +#. type: Content of: <book><chapter><sect1><para>
692.17284 +#: ../en/ch13-mq-collab.xml:149
692.17285 +msgid ""
692.17286 +"To set a negative guard on a patch, prefix the name of the guard with a "
692.17287 +"<quote><literal>-</literal></quote>."
692.17288 +msgstr ""
692.17289 +
692.17290 +#. type: Content of: <book><chapter><sect1><para>
692.17291 +#: ../en/ch13-mq-collab.xml:155
692.17292 +msgid ""
692.17293 +"Notice that we prefixed the arguments to the <command>hg qguard</command> "
692.17294 +"command with a <literal>--</literal> here, so that Mercurial would not "
692.17295 +"interpret the text <literal>-quux</literal> as an option."
692.17296 +msgstr ""
692.17297 +
692.17298 +#. type: Content of: <book><chapter><sect1><note><title>
692.17299 +#: ../en/ch13-mq-collab.xml:161
692.17300 +msgid "Setting vs. modifying"
692.17301 +msgstr ""
692.17302 +
692.17303 +#. type: Content of: <book><chapter><sect1><note><para>
692.17304 +#: ../en/ch13-mq-collab.xml:163
692.17305 +msgid ""
692.17306 +"The <command role=\"hg-ext-mq\">qguard</command> command <emphasis>sets</"
692.17307 +"emphasis> the guards on a patch; it doesn't <emphasis>modify</emphasis> "
692.17308 +"them.  What this means is that if you run <command role=\"hg-cmd\">hg qguard "
692.17309 +"+a +b</command> on a patch, then <command role=\"hg-cmd\">hg qguard +c</"
692.17310 +"command> on the same patch, the <emphasis>only</emphasis> guard that will be "
692.17311 +"set on it afterwards is <literal>+c</literal>."
692.17312 +msgstr ""
692.17313 +
692.17314 +#
692.17315 +#. type: Content of: <book><chapter><sect1><para>
692.17316 +#: ../en/ch13-mq-collab.xml:172
692.17317 +msgid ""
692.17318 +"Mercurial stores guards in the <filename role=\"special\">series</filename> "
692.17319 +"file; the form in which they are stored is easy both to understand and to "
692.17320 +"edit by hand. (In other words, you don't have to use the <command role=\"hg-"
692.17321 +"ext-mq\">qguard</command> command if you don't want to; it's okay to simply "
692.17322 +"edit the <filename role=\"special\">series</filename> file.)"
692.17323 +msgstr ""
692.17324 +
692.17325 +#. type: Content of: <book><chapter><sect1><title>
692.17326 +#: ../en/ch13-mq-collab.xml:184
692.17327 +msgid "Selecting the guards to use"
692.17328 +msgstr "选择使用的条件"
692.17329 +
692.17330 +#. type: Content of: <book><chapter><sect1><para>
692.17331 +#: ../en/ch13-mq-collab.xml:186
692.17332 +msgid ""
692.17333 +"The <command role=\"hg-ext-mq\">qselect</command> command determines which "
692.17334 +"guards are active at a given time.  The effect of this is to determine which "
692.17335 +"patches MQ will apply the next time you run <command role=\"hg-ext-mq"
692.17336 +"\">qpush</command>.  It has no other effect; in particular, it doesn't do "
692.17337 +"anything to patches that are already applied."
692.17338 +msgstr ""
692.17339 +
692.17340 +#. type: Content of: <book><chapter><sect1><para>
692.17341 +#: ../en/ch13-mq-collab.xml:193
692.17342 +msgid ""
692.17343 +"With no arguments, the <command role=\"hg-ext-mq\">qselect</command> command "
692.17344 +"lists the guards currently in effect, one per line of output.  Each argument "
692.17345 +"is treated as the name of a guard to apply."
692.17346 +msgstr ""
692.17347 +
692.17348 +#. type: Content of: <book><chapter><sect1><para>
692.17349 +#: ../en/ch13-mq-collab.xml:200
692.17350 +msgid ""
692.17351 +"In case you're interested, the currently selected guards are stored in the "
692.17352 +"<filename role=\"special\">guards</filename> file."
692.17353 +msgstr ""
692.17354 +
692.17355 +#. type: Content of: <book><chapter><sect1><para>
692.17356 +#: ../en/ch13-mq-collab.xml:205
692.17357 +msgid ""
692.17358 +"We can see the effect the selected guards have when we run <command role=\"hg-"
692.17359 +"ext-mq\">qpush</command>."
692.17360 +msgstr ""
692.17361 +
692.17362 +#. type: Content of: <book><chapter><sect1><para>
692.17363 +#: ../en/ch13-mq-collab.xml:210
692.17364 +msgid ""
692.17365 +"A guard cannot start with a <quote><literal>+</literal></quote> or "
692.17366 +"<quote><literal>-</literal></quote> character.  The name of a guard must not "
692.17367 +"contain white space, but most other characters are acceptable.  If you try to "
692.17368 +"use a guard with an invalid name, MQ will complain:"
692.17369 +msgstr ""
692.17370 +
692.17371 +#. type: Content of: <book><chapter><sect1><para>
692.17372 +#: ../en/ch13-mq-collab.xml:219
692.17373 +msgid "Changing the selected guards changes the patches that are applied."
692.17374 +msgstr ""
692.17375 +
692.17376 +#. type: Content of: <book><chapter><sect1><para>
692.17377 +#: ../en/ch13-mq-collab.xml:224
692.17378 +msgid ""
692.17379 +"You can see in the example below that negative guards take precedence over "
692.17380 +"positive guards."
692.17381 +msgstr ""
692.17382 +
692.17383 +#. type: Content of: <book><chapter><sect1><title>
692.17384 +#: ../en/ch13-mq-collab.xml:231
692.17385 +msgid "MQ's rules for applying patches"
692.17386 +msgstr "MQ 应用补丁的规则"
692.17387 +
692.17388 +#. type: Content of: <book><chapter><sect1><para>
692.17389 +#: ../en/ch13-mq-collab.xml:233
692.17390 +msgid ""
692.17391 +"The rules that MQ uses when deciding whether to apply a patch are as follows."
692.17392 +msgstr ""
692.17393 +
692.17394 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17395 +#: ../en/ch13-mq-collab.xml:236
692.17396 +msgid "A patch that has no guards is always applied."
692.17397 +msgstr ""
692.17398 +
692.17399 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17400 +#: ../en/ch13-mq-collab.xml:239
692.17401 +msgid ""
692.17402 +"If the patch has any negative guard that matches any currently selected "
692.17403 +"guard, the patch is skipped."
692.17404 +msgstr ""
692.17405 +
692.17406 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17407 +#: ../en/ch13-mq-collab.xml:242
692.17408 +msgid ""
692.17409 +"If the patch has any positive guard that matches any currently selected "
692.17410 +"guard, the patch is applied."
692.17411 +msgstr ""
692.17412 +
692.17413 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17414 +#: ../en/ch13-mq-collab.xml:245
692.17415 +msgid ""
692.17416 +"If the patch has positive or negative guards, but none matches any currently "
692.17417 +"selected guard, the patch is skipped."
692.17418 +msgstr ""
692.17419 +
692.17420 +#. type: Content of: <book><chapter><sect1><title>
692.17421 +#: ../en/ch13-mq-collab.xml:252
692.17422 +msgid "Trimming the work environment"
692.17423 +msgstr "修剪工作环境"
692.17424 +
692.17425 +#. type: Content of: <book><chapter><sect1><para>
692.17426 +#: ../en/ch13-mq-collab.xml:254
692.17427 +msgid ""
692.17428 +"In working on the device driver I mentioned earlier, I don't apply the "
692.17429 +"patches to a normal Linux kernel tree.  Instead, I use a repository that "
692.17430 +"contains only a snapshot of the source files and headers that are relevant to "
692.17431 +"Infiniband development.  This repository is 1% the size of a kernel "
692.17432 +"repository, so it's easier to work with."
692.17433 +msgstr ""
692.17434 +
692.17435 +#. type: Content of: <book><chapter><sect1><para>
692.17436 +#: ../en/ch13-mq-collab.xml:261
692.17437 +msgid ""
692.17438 +"I then choose a <quote>base</quote> version on top of which the patches are "
692.17439 +"applied.  This is a snapshot of the Linux kernel tree as of a revision of my "
692.17440 +"choosing.  When I take the snapshot, I record the changeset ID from the "
692.17441 +"kernel repository in the commit message.  Since the snapshot preserves the "
692.17442 +"<quote>shape</quote> and content of the relevant parts of the kernel tree, I "
692.17443 +"can apply my patches on top of either my tiny repository or a normal kernel "
692.17444 +"tree."
692.17445 +msgstr ""
692.17446 +
692.17447 +#. type: Content of: <book><chapter><sect1><para>
692.17448 +#: ../en/ch13-mq-collab.xml:270
692.17449 +msgid ""
692.17450 +"Normally, the base tree atop which the patches apply should be a snapshot of "
692.17451 +"a very recent upstream tree.  This best facilitates the development of "
692.17452 +"patches that can easily be submitted upstream with few or no modifications."
692.17453 +msgstr ""
692.17454 +
692.17455 +#. type: Content of: <book><chapter><sect1><title>
692.17456 +#: ../en/ch13-mq-collab.xml:277
692.17457 +msgid "Dividing up the <filename role=\"special\">series</filename> file"
692.17458 +msgstr "分类补丁<filename role=\"special\">系列</filename>"
692.17459 +
692.17460 +#. type: Content of: <book><chapter><sect1><para>
692.17461 +#: ../en/ch13-mq-collab.xml:280
692.17462 +msgid ""
692.17463 +"I categorise the patches in the <filename role=\"special\">series</filename> "
692.17464 +"file into a number of logical groups.  Each section of like patches begins "
692.17465 +"with a block of comments that describes the purpose of the patches that "
692.17466 +"follow."
692.17467 +msgstr ""
692.17468 +
692.17469 +#. type: Content of: <book><chapter><sect1><para>
692.17470 +#: ../en/ch13-mq-collab.xml:286
692.17471 +msgid ""
692.17472 +"The sequence of patch groups that I maintain follows.  The ordering of these "
692.17473 +"groups is important; I'll describe why after I introduce the groups."
692.17474 +msgstr ""
692.17475 +
692.17476 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17477 +#: ../en/ch13-mq-collab.xml:290
692.17478 +msgid ""
692.17479 +"The <quote>accepted</quote> group.  Patches that the development team has "
692.17480 +"submitted to the maintainer of the Infiniband subsystem, and which he has "
692.17481 +"accepted, but which are not present in the snapshot that the tiny repository "
692.17482 +"is based on.  These are <quote>read only</quote> patches, present only to "
692.17483 +"transform the tree into a similar state as it is in the upstream maintainer's "
692.17484 +"repository."
692.17485 +msgstr ""
692.17486 +
692.17487 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17488 +#: ../en/ch13-mq-collab.xml:298
692.17489 +msgid ""
692.17490 +"The <quote>rework</quote> group.  Patches that I have submitted, but that the "
692.17491 +"upstream maintainer has requested modifications to before he will accept them."
692.17492 +msgstr ""
692.17493 +
692.17494 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17495 +#: ../en/ch13-mq-collab.xml:303
692.17496 +msgid ""
692.17497 +"The <quote>pending</quote> group.  Patches that I have not yet submitted to "
692.17498 +"the upstream maintainer, but which we have finished working on. These will be "
692.17499 +"<quote>read only</quote> for a while.  If the upstream maintainer accepts "
692.17500 +"them upon submission, I'll move them to the end of the <quote>accepted</"
692.17501 +"quote> group.  If he requests that I modify any, I'll move them to the "
692.17502 +"beginning of the <quote>rework</quote> group."
692.17503 +msgstr ""
692.17504 +
692.17505 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17506 +#: ../en/ch13-mq-collab.xml:312
692.17507 +msgid ""
692.17508 +"The <quote>in progress</quote> group.  Patches that are actively being "
692.17509 +"developed, and should not be submitted anywhere yet."
692.17510 +msgstr ""
692.17511 +
692.17512 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17513 +#: ../en/ch13-mq-collab.xml:316
692.17514 +msgid ""
692.17515 +"The <quote>backport</quote> group.  Patches that adapt the source tree to "
692.17516 +"older versions of the kernel tree."
692.17517 +msgstr ""
692.17518 +
692.17519 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17520 +#: ../en/ch13-mq-collab.xml:320
692.17521 +msgid ""
692.17522 +"The <quote>do not ship</quote> group.  Patches that for some reason should "
692.17523 +"never be submitted upstream.  For example, one such patch might change "
692.17524 +"embedded driver identification strings to make it easier to distinguish, in "
692.17525 +"the field, between an out-of-tree version of the driver and a version shipped "
692.17526 +"by a distribution vendor."
692.17527 +msgstr ""
692.17528 +
692.17529 +#. type: Content of: <book><chapter><sect1><para>
692.17530 +#: ../en/ch13-mq-collab.xml:328
692.17531 +msgid ""
692.17532 +"Now to return to the reasons for ordering groups of patches in this way.  We "
692.17533 +"would like the lowest patches in the stack to be as stable as possible, so "
692.17534 +"that we will not need to rework higher patches due to changes in context.  "
692.17535 +"Putting patches that will never be changed first in the <filename role="
692.17536 +"\"special\">series</filename> file serves this purpose."
692.17537 +msgstr ""
692.17538 +
692.17539 +#. type: Content of: <book><chapter><sect1><para>
692.17540 +#: ../en/ch13-mq-collab.xml:336
692.17541 +msgid ""
692.17542 +"We would also like the patches that we know we'll need to modify to be "
692.17543 +"applied on top of a source tree that resembles the upstream tree as closely "
692.17544 +"as possible.  This is why we keep accepted patches around for a while."
692.17545 +msgstr ""
692.17546 +
692.17547 +#. type: Content of: <book><chapter><sect1><para>
692.17548 +#: ../en/ch13-mq-collab.xml:341
692.17549 +msgid ""
692.17550 +"The <quote>backport</quote> and <quote>do not ship</quote> patches float at "
692.17551 +"the end of the <filename role=\"special\">series</filename> file.  The "
692.17552 +"backport patches must be applied on top of all other patches, and the "
692.17553 +"<quote>do not ship</quote> patches might as well stay out of harm's way."
692.17554 +msgstr ""
692.17555 +
692.17556 +#. type: Content of: <book><chapter><sect1><title>
692.17557 +#: ../en/ch13-mq-collab.xml:350
692.17558 +msgid "Maintaining the patch series"
692.17559 +msgstr "维护补丁系列"
692.17560 +
692.17561 +#. type: Content of: <book><chapter><sect1><para>
692.17562 +#: ../en/ch13-mq-collab.xml:352
692.17563 +msgid ""
692.17564 +"In my work, I use a number of guards to control which patches are to be "
692.17565 +"applied."
692.17566 +msgstr ""
692.17567 +
692.17568 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17569 +#: ../en/ch13-mq-collab.xml:356
692.17570 +msgid ""
692.17571 +"<quote>Accepted</quote> patches are guarded with <literal>accepted</"
692.17572 +"literal>.  I enable this guard most of the time.  When I'm applying the "
692.17573 +"patches on top of a tree where the patches are already present, I can turn "
692.17574 +"this patch off, and the patches that follow it will apply cleanly."
692.17575 +msgstr ""
692.17576 +
692.17577 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17578 +#: ../en/ch13-mq-collab.xml:363
692.17579 +msgid ""
692.17580 +"Patches that are <quote>finished</quote>, but not yet submitted, have no "
692.17581 +"guards.  If I'm applying the patch stack to a copy of the upstream tree, I "
692.17582 +"don't need to enable any guards in order to get a reasonably safe source tree."
692.17583 +msgstr ""
692.17584 +
692.17585 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17586 +#: ../en/ch13-mq-collab.xml:369
692.17587 +msgid ""
692.17588 +"Those patches that need reworking before being resubmitted are guarded with "
692.17589 +"<literal>rework</literal>."
692.17590 +msgstr ""
692.17591 +
692.17592 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17593 +#: ../en/ch13-mq-collab.xml:373
692.17594 +msgid ""
692.17595 +"For those patches that are still under development, I use <literal>devel</"
692.17596 +"literal>."
692.17597 +msgstr ""
692.17598 +
692.17599 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17600 +#: ../en/ch13-mq-collab.xml:376
692.17601 +msgid ""
692.17602 +"A backport patch may have several guards, one for each version of the kernel "
692.17603 +"to which it applies.  For example, a patch that backports a piece of code to "
692.17604 +"2.6.9 will have a <literal>2.6.9</literal> guard."
692.17605 +msgstr ""
692.17606 +
692.17607 +#. type: Content of: <book><chapter><sect1><para>
692.17608 +#: ../en/ch13-mq-collab.xml:381
692.17609 +msgid ""
692.17610 +"This variety of guards gives me considerable flexibility in determining what "
692.17611 +"kind of source tree I want to end up with.  For most situations, the "
692.17612 +"selection of appropriate guards is automated during the build process, but I "
692.17613 +"can manually tune the guards to use for less common circumstances."
692.17614 +msgstr ""
692.17615 +
692.17616 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.17617 +#: ../en/ch13-mq-collab.xml:388
692.17618 +msgid "The art of writing backport patches"
692.17619 +msgstr "编写向后移植补丁的艺术"
692.17620 +
692.17621 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17622 +#: ../en/ch13-mq-collab.xml:390
692.17623 +msgid ""
692.17624 +"Using MQ, writing a backport patch is a simple process.  All such a patch has "
692.17625 +"to do is modify a piece of code that uses a kernel feature not present in the "
692.17626 +"older version of the kernel, so that the driver continues to work correctly "
692.17627 +"under that older version."
692.17628 +msgstr ""
692.17629 +
692.17630 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17631 +#: ../en/ch13-mq-collab.xml:396
692.17632 +msgid ""
692.17633 +"A useful goal when writing a good backport patch is to make your code look as "
692.17634 +"if it was written for the older version of the kernel you're targeting.  The "
692.17635 +"less obtrusive the patch, the easier it will be to understand and maintain.  "
692.17636 +"If you're writing a collection of backport patches to avoid the <quote>rat's "
692.17637 +"nest</quote> effect of lots of <literal>#ifdef</literal>s (hunks of source "
692.17638 +"code that are only used conditionally) in your code, don't introduce version-"
692.17639 +"dependent <literal>#ifdef</literal>s into the patches.  Instead, write "
692.17640 +"several patches, each of which makes unconditional changes, and control their "
692.17641 +"application using guards."
692.17642 +msgstr ""
692.17643 +
692.17644 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17645 +#: ../en/ch13-mq-collab.xml:409
692.17646 +msgid ""
692.17647 +"There are two reasons to divide backport patches into a distinct group, away "
692.17648 +"from the <quote>regular</quote> patches whose effects they modify. The first "
692.17649 +"is that intermingling the two makes it more difficult to use a tool like the "
692.17650 +"<literal role=\"hg-ext\">patchbomb</literal> extension to automate the "
692.17651 +"process of submitting the patches to an upstream maintainer.  The second is "
692.17652 +"that a backport patch could perturb the context in which a subsequent regular "
692.17653 +"patch is applied, making it impossible to apply the regular patch cleanly "
692.17654 +"<emphasis>without</emphasis> the earlier backport patch already being applied."
692.17655 +msgstr ""
692.17656 +
692.17657 +#. type: Content of: <book><chapter><sect1><title>
692.17658 +#: ../en/ch13-mq-collab.xml:424
692.17659 +msgid "Useful tips for developing with MQ"
692.17660 +msgstr "使用 MQ 开发的技巧"
692.17661 +
692.17662 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.17663 +#: ../en/ch13-mq-collab.xml:427
692.17664 +msgid "Organising patches in directories"
692.17665 +msgstr "将补丁放到几个目录中"
692.17666 +
692.17667 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17668 +#: ../en/ch13-mq-collab.xml:429
692.17669 +msgid ""
692.17670 +"If you're working on a substantial project with MQ, it's not difficult to "
692.17671 +"accumulate a large number of patches.  For example, I have one patch "
692.17672 +"repository that contains over 250 patches."
692.17673 +msgstr ""
692.17674 +
692.17675 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17676 +#: ../en/ch13-mq-collab.xml:434
692.17677 +msgid ""
692.17678 +"If you can group these patches into separate logical categories, you can if "
692.17679 +"you like store them in different directories; MQ has no problems with patch "
692.17680 +"names that contain path separators."
692.17681 +msgstr ""
692.17682 +
692.17683 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.17684 +#: ../en/ch13-mq-collab.xml:441
692.17685 +msgid "Viewing the history of a patch"
692.17686 +msgstr "察看补丁的历史"
692.17687 +
692.17688 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17689 +#: ../en/ch13-mq-collab.xml:443
692.17690 +msgid ""
692.17691 +"If you're developing a set of patches over a long time, it's a good idea to "
692.17692 +"maintain them in a repository, as discussed in <xref linkend=\"sec:mq:repo\"/"
692.17693 +">.  If you do so, you'll quickly discover that using the <command role=\"hg-"
692.17694 +"cmd\">hg diff</command> command to look at the history of changes to a patch "
692.17695 +"is unworkable.  This is in part because you're looking at the second "
692.17696 +"derivative of the real code (a diff of a diff), but also because MQ adds "
692.17697 +"noise to the process by modifying time stamps and directory names when it "
692.17698 +"updates a patch."
692.17699 +msgstr ""
692.17700 +
692.17701 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17702 +#: ../en/ch13-mq-collab.xml:455
692.17703 +msgid ""
692.17704 +"However, you can use the <literal role=\"hg-ext\">extdiff</literal> "
692.17705 +"extension, which is bundled with Mercurial, to turn a diff of two versions of "
692.17706 +"a patch into something readable.  To do this, you will need a third-party "
692.17707 +"package called <literal role=\"package\">patchutils</literal> <citation>web:"
692.17708 +"patchutils</citation>.  This provides a command named <command>interdiff</"
692.17709 +"command>, which shows the differences between two diffs as a diff.  Used on "
692.17710 +"two versions of the same diff, it generates a diff that represents the diff "
692.17711 +"from the first to the second version."
692.17712 +msgstr ""
692.17713 +
692.17714 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17715 +#: ../en/ch13-mq-collab.xml:466
692.17716 +msgid ""
692.17717 +"You can enable the <literal role=\"hg-ext\">extdiff</literal> extension in "
692.17718 +"the usual way, by adding a line to the <literal role=\"rc-extensions"
692.17719 +"\">extensions</literal> section of your <filename role=\"special\">~/.hgrc</"
692.17720 +"filename>."
692.17721 +msgstr ""
692.17722 +
692.17723 +#
692.17724 +#.  &example.hg-interdiff;
692.17725 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17726 +#: ../en/ch13-mq-collab.xml:473
692.17727 +msgid ""
692.17728 +"The <command>interdiff</command> command expects to be passed the names of "
692.17729 +"two files, but the <literal role=\"hg-ext\">extdiff</literal> extension "
692.17730 +"passes the program it runs a pair of directories, each of which can contain "
692.17731 +"an arbitrary number of files.  We thus need a small program that will run "
692.17732 +"<command>interdiff</command> on each pair of files in these two directories.  "
692.17733 +"This program is available as <filename role=\"special\">hg-interdiff</"
692.17734 +"filename> in the <filename class=\"directory\">examples</filename> directory "
692.17735 +"of the source code repository that accompanies this book."
692.17736 +msgstr ""
692.17737 +
692.17738 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17739 +#: ../en/ch13-mq-collab.xml:485
692.17740 +msgid ""
692.17741 +"With the <filename role=\"special\">hg-interdiff</filename> program in your "
692.17742 +"shell's search path, you can run it as follows, from inside an MQ patch "
692.17743 +"directory:"
692.17744 +msgstr ""
692.17745 +
692.17746 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17747 +#: ../en/ch13-mq-collab.xml:489
692.17748 +msgid ""
692.17749 +"Since you'll probably want to use this long-winded command a lot, you can get "
692.17750 +"<literal role=\"hg-ext\">hgext</literal> to make it available as a normal "
692.17751 +"Mercurial command, again by editing your <filename role=\"special\">~/.hgrc</"
692.17752 +"filename>."
692.17753 +msgstr ""
692.17754 +
692.17755 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17756 +#: ../en/ch13-mq-collab.xml:496
692.17757 +msgid ""
692.17758 +"This directs <literal role=\"hg-ext\">hgext</literal> to make an "
692.17759 +"<literal>interdiff</literal> command available, so you can now shorten the "
692.17760 +"previous invocation of <command role=\"hg-ext-extdiff\">extdiff</command> to "
692.17761 +"something a little more wieldy."
692.17762 +msgstr ""
692.17763 +
692.17764 +#. type: Content of: <book><chapter><sect1><sect2><note><para>
692.17765 +#: ../en/ch13-mq-collab.xml:504
692.17766 +msgid ""
692.17767 +"The <command>interdiff</command> command works well only if the underlying "
692.17768 +"files against which versions of a patch are generated remain the same.  If "
692.17769 +"you create a patch, modify the underlying files, and then regenerate the "
692.17770 +"patch, <command>interdiff</command> may not produce useful output."
692.17771 +msgstr ""
692.17772 +
692.17773 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.17774 +#: ../en/ch13-mq-collab.xml:512
692.17775 +msgid ""
692.17776 +"The <literal role=\"hg-ext\">extdiff</literal> extension is useful for more "
692.17777 +"than merely improving the presentation of MQ patches.  To read more about it, "
692.17778 +"go to <xref linkend=\"sec:hgext:extdiff\"/>."
692.17779 +msgstr ""
692.17780 +
692.17781 +#. type: Content of: <book><chapter><title>
692.17782 +#: ../en/ch14-hgext.xml:5
692.17783 +msgid "Adding functionality with extensions"
692.17784 +msgstr "使用扩展增加功能"
692.17785 +
692.17786 +#. type: Content of: <book><chapter><para>
692.17787 +#: ../en/ch14-hgext.xml:7
692.17788 +msgid ""
692.17789 +"While the core of Mercurial is quite complete from a functionality "
692.17790 +"standpoint, it's deliberately shorn of fancy features.  This approach of "
692.17791 +"preserving simplicity keeps the software easy to deal with for both "
692.17792 +"maintainers and users."
692.17793 +msgstr ""
692.17794 +
692.17795 +#. type: Content of: <book><chapter><para>
692.17796 +#: ../en/ch14-hgext.xml:12
692.17797 +msgid ""
692.17798 +"However, Mercurial doesn't box you in with an inflexible command set: you can "
692.17799 +"add features to it as <emphasis>extensions</emphasis> (sometimes known as "
692.17800 +"<emphasis>plugins</emphasis>).  We've already discussed a few of these "
692.17801 +"extensions in earlier chapters."
692.17802 +msgstr ""
692.17803 +
692.17804 +#. type: Content of: <book><chapter><itemizedlist><listitem><para>
692.17805 +#: ../en/ch14-hgext.xml:18
692.17806 +msgid ""
692.17807 +"<xref linkend=\"sec:tour-merge:fetch\"/> covers the <literal role=\"hg-ext"
692.17808 +"\">fetch</literal> extension; this combines pulling new changes and merging "
692.17809 +"them with local changes into a single command, <command role=\"hg-ext-fetch"
692.17810 +"\">fetch</command>."
692.17811 +msgstr ""
692.17812 +
692.17813 +#. type: Content of: <book><chapter><itemizedlist><listitem><para>
692.17814 +#: ../en/ch14-hgext.xml:24
692.17815 +msgid ""
692.17816 +"In <xref linkend=\"chap:hook\"/>, we covered several extensions that are "
692.17817 +"useful for hook-related functionality: <literal role=\"hg-ext\">acl</literal> "
692.17818 +"adds access control lists; <literal role=\"hg-ext\">bugzilla</literal> adds "
692.17819 +"integration with the Bugzilla bug tracking system; and <literal role=\"hg-ext"
692.17820 +"\">notify</literal> sends notification emails on new changes."
692.17821 +msgstr ""
692.17822 +
692.17823 +#. type: Content of: <book><chapter><itemizedlist><listitem><para>
692.17824 +#: ../en/ch14-hgext.xml:33
692.17825 +msgid ""
692.17826 +"The Mercurial Queues patch management extension is so invaluable that it "
692.17827 +"merits two chapters and an appendix all to itself. <xref linkend=\"chap:mq\"/"
692.17828 +"> covers the basics; <xref linkend=\"chap:mq-collab\"/> discusses advanced "
692.17829 +"topics; and <xref linkend=\"chap:mqref\"/> goes into detail on each command."
692.17830 +msgstr ""
692.17831 +
692.17832 +#. type: Content of: <book><chapter><para>
692.17833 +#: ../en/ch14-hgext.xml:43
692.17834 +msgid ""
692.17835 +"In this chapter, we'll cover some of the other extensions that are available "
692.17836 +"for Mercurial, and briefly touch on some of the machinery you'll need to know "
692.17837 +"about if you want to write an extension of your own."
692.17838 +msgstr ""
692.17839 +
692.17840 +#. type: Content of: <book><chapter><itemizedlist><listitem><para>
692.17841 +#: ../en/ch14-hgext.xml:48
692.17842 +msgid ""
692.17843 +"In <xref linkend=\"sec:hgext:inotify\"/>, we'll discuss the possibility of "
692.17844 +"<emphasis>huge</emphasis> performance improvements using the <literal role="
692.17845 +"\"hg-ext\">inotify</literal> extension."
692.17846 +msgstr ""
692.17847 +
692.17848 +#. type: Content of: <book><chapter><sect1><title>
692.17849 +#: ../en/ch14-hgext.xml:55
692.17850 +msgid ""
692.17851 +"Improve performance with the <literal role=\"hg-ext\">inotify</literal> "
692.17852 +"extension"
692.17853 +msgstr "使用扩展 <literal role=\"hg-ext\">inotify</literal> 以提高性能"
692.17854 +
692.17855 +#. type: Content of: <book><chapter><sect1><para>
692.17856 +#: ../en/ch14-hgext.xml:58
692.17857 +msgid ""
692.17858 +"Are you interested in having some of the most common Mercurial operations run "
692.17859 +"as much as a hundred times faster? Read on!"
692.17860 +msgstr ""
692.17861 +
692.17862 +#. type: Content of: <book><chapter><sect1><para>
692.17863 +#: ../en/ch14-hgext.xml:62
692.17864 +msgid ""
692.17865 +"Mercurial has great performance under normal circumstances.  For example, "
692.17866 +"when you run the <command role=\"hg-cmd\">hg status</command> command, "
692.17867 +"Mercurial has to scan almost every directory and file in your repository so "
692.17868 +"that it can display file status.  Many other Mercurial commands need to do "
692.17869 +"the same work behind the scenes; for example, the <command role=\"hg-cmd\">hg "
692.17870 +"diff</command> command uses the status machinery to avoid doing an expensive "
692.17871 +"comparison operation on files that obviously haven't changed."
692.17872 +msgstr ""
692.17873 +
692.17874 +#. type: Content of: <book><chapter><sect1><para>
692.17875 +#: ../en/ch14-hgext.xml:72
692.17876 +msgid ""
692.17877 +"Because obtaining file status is crucial to good performance, the authors of "
692.17878 +"Mercurial have optimised this code to within an inch of its life.  However, "
692.17879 +"there's no avoiding the fact that when you run <command role=\"hg-cmd\">hg "
692.17880 +"status</command>, Mercurial is going to have to perform at least one "
692.17881 +"expensive system call for each managed file to determine whether it's changed "
692.17882 +"since the last time Mercurial checked.  For a sufficiently large repository, "
692.17883 +"this can take a long time."
692.17884 +msgstr ""
692.17885 +
692.17886 +#. type: Content of: <book><chapter><sect1><para>
692.17887 +#: ../en/ch14-hgext.xml:82
692.17888 +msgid ""
692.17889 +"To put a number on the magnitude of this effect, I created a repository "
692.17890 +"containing 150,000 managed files.  I timed <command role=\"hg-cmd\">hg "
692.17891 +"status</command> as taking ten seconds to run, even when <emphasis>none</"
692.17892 +"emphasis> of those files had been modified."
692.17893 +msgstr ""
692.17894 +
692.17895 +#. type: Content of: <book><chapter><sect1><para>
692.17896 +#: ../en/ch14-hgext.xml:88
692.17897 +msgid ""
692.17898 +"Many modern operating systems contain a file notification facility. If a "
692.17899 +"program signs up to an appropriate service, the operating system will notify "
692.17900 +"it every time a file of interest is created, modified, or deleted.  On Linux "
692.17901 +"systems, the kernel component that does this is called <literal>inotify</"
692.17902 +"literal>."
692.17903 +msgstr ""
692.17904 +
692.17905 +#. type: Content of: <book><chapter><sect1><para>
692.17906 +#: ../en/ch14-hgext.xml:95
692.17907 +msgid ""
692.17908 +"Mercurial's <literal role=\"hg-ext\">inotify</literal> extension talks to the "
692.17909 +"kernel's <literal>inotify</literal> component to optimise <command role=\"hg-"
692.17910 +"cmd\">hg status</command> commands.  The extension has two components.  A "
692.17911 +"daemon sits in the background and receives notifications from the "
692.17912 +"<literal>inotify</literal> subsystem.  It also listens for connections from a "
692.17913 +"regular Mercurial command.  The extension modifies Mercurial's behavior so "
692.17914 +"that instead of scanning the filesystem, it queries the daemon.  Since the "
692.17915 +"daemon has perfect information about the state of the repository, it can "
692.17916 +"respond with a result instantaneously, avoiding the need to scan every "
692.17917 +"directory and file in the repository."
692.17918 +msgstr ""
692.17919 +
692.17920 +#. type: Content of: <book><chapter><sect1><para>
692.17921 +#: ../en/ch14-hgext.xml:108
692.17922 +msgid ""
692.17923 +"Recall the ten seconds that I measured plain Mercurial as taking to run "
692.17924 +"<command role=\"hg-cmd\">hg status</command> on a 150,000 file repository.  "
692.17925 +"With the <literal role=\"hg-ext\">inotify</literal> extension enabled, the "
692.17926 +"time dropped to 0.1 seconds, a factor of <emphasis>one hundred</emphasis> "
692.17927 +"faster."
692.17928 +msgstr ""
692.17929 +
692.17930 +#. type: Content of: <book><chapter><sect1><para>
692.17931 +#: ../en/ch14-hgext.xml:115
692.17932 +msgid "Before we continue, please pay attention to some caveats."
692.17933 +msgstr ""
692.17934 +
692.17935 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17936 +#: ../en/ch14-hgext.xml:118
692.17937 +msgid ""
692.17938 +"The <literal role=\"hg-ext\">inotify</literal> extension is Linux-specific.  "
692.17939 +"Because it interfaces directly to the Linux kernel's <literal>inotify</"
692.17940 +"literal> subsystem, it does not work on other operating systems."
692.17941 +msgstr ""
692.17942 +
692.17943 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17944 +#: ../en/ch14-hgext.xml:123
692.17945 +msgid ""
692.17946 +"It should work on any Linux distribution that was released after early 2005.  "
692.17947 +"Older distributions are likely to have a kernel that lacks <literal>inotify</"
692.17948 +"literal>, or a version of <literal>glibc</literal> that does not have the "
692.17949 +"necessary interfacing support."
692.17950 +msgstr ""
692.17951 +
692.17952 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
692.17953 +#: ../en/ch14-hgext.xml:130
692.17954 +msgid ""
692.17955 +"Not all filesystems are suitable for use with the <literal role=\"hg-ext"
692.17956 +"\">inotify</literal> extension.  Network filesystems such as NFS are a non-"
692.17957 +"starter, for example, particularly if you're running Mercurial on several "
692.17958 +"systems, all mounting the same network filesystem.  The kernel's "
692.17959 +"<literal>inotify</literal> system has no way of knowing about changes made on "
692.17960 +"another system.  Most local filesystems (e.g. ext3, XFS, ReiserFS) should "
692.17961 +"work fine."
692.17962 +msgstr ""
692.17963 +
692.17964 +#. type: Content of: <book><chapter><sect1><para>
692.17965 +#: ../en/ch14-hgext.xml:141
692.17966 +msgid ""
692.17967 +"The <literal role=\"hg-ext\">inotify</literal> extension is not yet shipped "
692.17968 +"with Mercurial as of May 2007, so it's a little more involved to set up than "
692.17969 +"other extensions.  But the performance improvement is worth it!"
692.17970 +msgstr ""
692.17971 +
692.17972 +#. type: Content of: <book><chapter><sect1><para>
692.17973 +#: ../en/ch14-hgext.xml:146
692.17974 +msgid ""
692.17975 +"The extension currently comes in two parts: a set of patches to the Mercurial "
692.17976 +"source code, and a library of Python bindings to the <literal>inotify</"
692.17977 +"literal> subsystem."
692.17978 +msgstr ""
692.17979 +
692.17980 +#. type: Content of: <book><chapter><sect1><note><para>
692.17981 +#: ../en/ch14-hgext.xml:150
692.17982 +msgid ""
692.17983 +"There are <emphasis>two</emphasis> Python <literal>inotify</literal> binding "
692.17984 +"libraries.  One of them is called <literal>pyinotify</literal>, and is "
692.17985 +"packaged by some Linux distributions as <literal>python-inotify</literal>.  "
692.17986 +"This is <emphasis>not</emphasis> the one you'll need, as it is too buggy and "
692.17987 +"inefficient to be practical."
692.17988 +msgstr ""
692.17989 +
692.17990 +#. type: Content of: <book><chapter><sect1><para>
692.17991 +#: ../en/ch14-hgext.xml:157
692.17992 +msgid ""
692.17993 +"To get going, it's best to already have a functioning copy of Mercurial "
692.17994 +"installed."
692.17995 +msgstr ""
692.17996 +
692.17997 +#. type: Content of: <book><chapter><sect1><note><para>
692.17998 +#: ../en/ch14-hgext.xml:160
692.17999 +msgid ""
692.18000 +"If you follow the instructions below, you'll be <emphasis>replacing</"
692.18001 +"emphasis> and overwriting any existing installation of Mercurial that you "
692.18002 +"might already have, using the latest <quote>bleeding edge</quote> Mercurial "
692.18003 +"code. Don't say you weren't warned!"
692.18004 +msgstr ""
692.18005 +
692.18006 +#. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
692.18007 +#: ../en/ch14-hgext.xml:167
692.18008 +msgid ""
692.18009 +"Clone the Python <literal>inotify</literal> binding repository.  Build and "
692.18010 +"install it."
692.18011 +msgstr ""
692.18012 +
692.18013 +#. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
692.18014 +#: ../en/ch14-hgext.xml:174
692.18015 +msgid ""
692.18016 +"Clone the <filename class=\"directory\">crew</filename> Mercurial "
692.18017 +"repository.  Clone the <literal role=\"hg-ext\">inotify</literal> patch "
692.18018 +"repository so that Mercurial Queues will be able to apply patches to your "
692.18019 +"cope of the <filename class=\"directory\">crew</filename> repository."
692.18020 +msgstr ""
692.18021 +
692.18022 +#. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
692.18023 +#: ../en/ch14-hgext.xml:184
692.18024 +msgid ""
692.18025 +"Make sure that you have the Mercurial Queues extension, <literal role=\"hg-ext"
692.18026 +"\">mq</literal>, enabled.  If you've never used MQ, read <xref linkend=\"sec:"
692.18027 +"mq:start\"/> to get started quickly."
692.18028 +msgstr ""
692.18029 +
692.18030 +#. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
692.18031 +#: ../en/ch14-hgext.xml:190
692.18032 +msgid ""
692.18033 +"Go into the <filename class=\"directory\">inotify</filename> repo, and apply "
692.18034 +"all of the <literal role=\"hg-ext\">inotify</literal> patches using the "
692.18035 +"<option role=\"hg-ext-mq-cmd-qpush-opt\">hg -a</option> option to the "
692.18036 +"<command role=\"hg-ext-mq\">qpush</command> command."
692.18037 +msgstr ""
692.18038 +
692.18039 +#. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
692.18040 +#: ../en/ch14-hgext.xml:199
692.18041 +msgid ""
692.18042 +"If you get an error message from <command role=\"hg-ext-mq\">qpush</command>, "
692.18043 +"you should not continue.  Instead, ask for help."
692.18044 +msgstr ""
692.18045 +
692.18046 +#. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
692.18047 +#: ../en/ch14-hgext.xml:203
692.18048 +msgid "Build and install the patched version of Mercurial."
692.18049 +msgstr ""
692.18050 +
692.18051 +#. type: Content of: <book><chapter><sect1><para>
692.18052 +#: ../en/ch14-hgext.xml:209
692.18053 +msgid ""
692.18054 +"Once you've build a suitably patched version of Mercurial, all you need to do "
692.18055 +"to enable the <literal role=\"hg-ext\">inotify</literal> extension is add an "
692.18056 +"entry to your <filename role=\"special\">~/.hgrc</filename>."
692.18057 +msgstr ""
692.18058 +
692.18059 +#. type: Content of: <book><chapter><sect1><para>
692.18060 +#: ../en/ch14-hgext.xml:214
692.18061 +msgid ""
692.18062 +"When the <literal role=\"hg-ext\">inotify</literal> extension is enabled, "
692.18063 +"Mercurial will automatically and transparently start the status daemon the "
692.18064 +"first time you run a command that needs status in a repository.  It runs one "
692.18065 +"status daemon per repository."
692.18066 +msgstr ""
692.18067 +
692.18068 +#. type: Content of: <book><chapter><sect1><para>
692.18069 +#: ../en/ch14-hgext.xml:220
692.18070 +msgid ""
692.18071 +"The status daemon is started silently, and runs in the background.  If you "
692.18072 +"look at a list of running processes after you've enabled the <literal role="
692.18073 +"\"hg-ext\">inotify</literal> extension and run a few commands in different "
692.18074 +"repositories, you'll thus see a few <literal>hg</literal> processes sitting "
692.18075 +"around, waiting for updates from the kernel and queries from Mercurial."
692.18076 +msgstr ""
692.18077 +
692.18078 +#. type: Content of: <book><chapter><sect1><para>
692.18079 +#: ../en/ch14-hgext.xml:228
692.18080 +msgid ""
692.18081 +"The first time you run a Mercurial command in a repository when you have the "
692.18082 +"<literal role=\"hg-ext\">inotify</literal> extension enabled, it will run "
692.18083 +"with about the same performance as a normal Mercurial command.  This is "
692.18084 +"because the status daemon needs to perform a normal status scan so that it "
692.18085 +"has a baseline against which to apply later updates from the kernel.  "
692.18086 +"However, <emphasis>every</emphasis> subsequent command that does any kind of "
692.18087 +"status check should be noticeably faster on repositories of even fairly "
692.18088 +"modest size.  Better yet, the bigger your repository is, the greater a "
692.18089 +"performance advantage you'll see.  The <literal role=\"hg-ext\">inotify</"
692.18090 +"literal> daemon makes status operations almost instantaneous on repositories "
692.18091 +"of all sizes!"
692.18092 +msgstr ""
692.18093 +
692.18094 +#. type: Content of: <book><chapter><sect1><para>
692.18095 +#: ../en/ch14-hgext.xml:242
692.18096 +msgid ""
692.18097 +"If you like, you can manually start a status daemon using the <command role="
692.18098 +"\"hg-ext-inotify\">inserve</command> command.  This gives you slightly finer "
692.18099 +"control over how the daemon ought to run.  This command will of course only "
692.18100 +"be available when the <literal role=\"hg-ext\">inotify</literal> extension is "
692.18101 +"enabled."
692.18102 +msgstr ""
692.18103 +
692.18104 +#. type: Content of: <book><chapter><sect1><para>
692.18105 +#: ../en/ch14-hgext.xml:249
692.18106 +msgid ""
692.18107 +"When you're using the <literal role=\"hg-ext\">inotify</literal> extension, "
692.18108 +"you should notice <emphasis>no difference at all</emphasis> in Mercurial's "
692.18109 +"behavior, with the sole exception of status-related commands running a whole "
692.18110 +"lot faster than they used to.  You should specifically expect that commands "
692.18111 +"will not print different output; neither should they give different results. "
692.18112 +"If either of these situations occurs, please report a bug."
692.18113 +msgstr ""
692.18114 +
692.18115 +#. type: Content of: <book><chapter><sect1><title>
692.18116 +#: ../en/ch14-hgext.xml:260
692.18117 +msgid ""
692.18118 +"Flexible diff support with the <literal role=\"hg-ext\">extdiff</literal> "
692.18119 +"extension"
692.18120 +msgstr "使用扩展 <literal role=\"hg-ext\">extdiff</literal> 以扩展差异支持"
692.18121 +
692.18122 +#. type: Content of: <book><chapter><sect1><para>
692.18123 +#: ../en/ch14-hgext.xml:263
692.18124 +msgid ""
692.18125 +"Mercurial's built-in <command role=\"hg-cmd\">hg diff</command> command "
692.18126 +"outputs plaintext unified diffs."
692.18127 +msgstr ""
692.18128 +"Mercurial 内置命令 <command role=\"hg-cmd\">hg diff</command> 的输出与统一差异"
692.18129 +"不同。"
692.18130 +
692.18131 +#. type: Content of: <book><chapter><sect1><para>
692.18132 +#: ../en/ch14-hgext.xml:268
692.18133 +msgid ""
692.18134 +"If you would like to use an external tool to display modifications, you'll "
692.18135 +"want to use the <literal role=\"hg-ext\">extdiff</literal> extension.  This "
692.18136 +"will let you use, for example, a graphical diff tool."
692.18137 +msgstr ""
692.18138 +
692.18139 +#. type: Content of: <book><chapter><sect1><para>
692.18140 +#: ../en/ch14-hgext.xml:273
692.18141 +msgid ""
692.18142 +"The <literal role=\"hg-ext\">extdiff</literal> extension is bundled with "
692.18143 +"Mercurial, so it's easy to set up.  In the <literal role=\"rc-extensions"
692.18144 +"\">extensions</literal> section of your <filename role=\"special\">~/.hgrc</"
692.18145 +"filename>, simply add a one-line entry to enable the extension."
692.18146 +msgstr ""
692.18147 +
692.18148 +#. type: Content of: <book><chapter><sect1><para>
692.18149 +#: ../en/ch14-hgext.xml:280
692.18150 +msgid ""
692.18151 +"This introduces a command named <command role=\"hg-ext-extdiff\">extdiff</"
692.18152 +"command>, which by default uses your system's <command>diff</command> command "
692.18153 +"to generate a unified diff in the same form as the built-in <command role="
692.18154 +"\"hg-cmd\">hg diff</command> command."
692.18155 +msgstr ""
692.18156 +
692.18157 +#. type: Content of: <book><chapter><sect1><para>
692.18158 +#: ../en/ch14-hgext.xml:288
692.18159 +msgid ""
692.18160 +"The result won't be exactly the same as with the built-in <command role=\"hg-"
692.18161 +"cmd\">hg diff</command> variations, because the output of <command>diff</"
692.18162 +"command> varies from one system to another, even when passed the same options."
692.18163 +msgstr ""
692.18164 +
692.18165 +#. type: Content of: <book><chapter><sect1><para>
692.18166 +#: ../en/ch14-hgext.xml:293
692.18167 +msgid ""
692.18168 +"As the <quote><literal>making snapshot</literal></quote> lines of output "
692.18169 +"above imply, the <command role=\"hg-ext-extdiff\">extdiff</command> command "
692.18170 +"works by creating two snapshots of your source tree.  The first snapshot is "
692.18171 +"of the source revision; the second, of the target revision or working "
692.18172 +"directory.  The <command role=\"hg-ext-extdiff\">extdiff</command> command "
692.18173 +"generates these snapshots in a temporary directory, passes the name of each "
692.18174 +"directory to an external diff viewer, then deletes the temporary directory.  "
692.18175 +"For efficiency, it only snapshots the directories and files that have changed "
692.18176 +"between the two revisions."
692.18177 +msgstr ""
692.18178 +
692.18179 +#. type: Content of: <book><chapter><sect1><para>
692.18180 +#: ../en/ch14-hgext.xml:306
692.18181 +msgid ""
692.18182 +"Snapshot directory names have the same base name as your repository. If your "
692.18183 +"repository path is <filename class=\"directory\">/quux/bar/foo</filename>, "
692.18184 +"then <filename class=\"directory\">foo</filename> will be the name of each "
692.18185 +"snapshot directory.  Each snapshot directory name has its changeset ID "
692.18186 +"appended, if appropriate.  If a snapshot is of revision "
692.18187 +"<literal>a631aca1083f</literal>, the directory will be named <filename class="
692.18188 +"\"directory\">foo.a631aca1083f</filename>.  A snapshot of the working "
692.18189 +"directory won't have a changeset ID appended, so it would just be <filename "
692.18190 +"class=\"directory\">foo</filename> in this example.  To see what this looks "
692.18191 +"like in practice, look again at the <command role=\"hg-ext-extdiff\">extdiff</"
692.18192 +"command> example above.  Notice that the diff has the snapshot directory "
692.18193 +"names embedded in its header."
692.18194 +msgstr ""
692.18195 +
692.18196 +#. type: Content of: <book><chapter><sect1><para>
692.18197 +#: ../en/ch14-hgext.xml:322
692.18198 +msgid ""
692.18199 +"The <command role=\"hg-ext-extdiff\">extdiff</command> command accepts two "
692.18200 +"important options. The <option role=\"hg-ext-extdiff-cmd-extdiff-opt\">hg -p</"
692.18201 +"option> option lets you choose a program to view differences with, instead of "
692.18202 +"<command>diff</command>.  With the <option role=\"hg-ext-extdiff-cmd-extdiff-"
692.18203 +"opt\">hg -o</option> option, you can change the options that <command role="
692.18204 +"\"hg-ext-extdiff\">extdiff</command> passes to the program (by default, these "
692.18205 +"options are <quote><literal>-Npru</literal></quote>, which only make sense if "
692.18206 +"you're running <command>diff</command>).  In other respects, the <command "
692.18207 +"role=\"hg-ext-extdiff\">extdiff</command> command acts similarly to the built-"
692.18208 +"in <command role=\"hg-cmd\">hg diff</command> command: you use the same "
692.18209 +"option names, syntax, and arguments to specify the revisions you want, the "
692.18210 +"files you want, and so on."
692.18211 +msgstr ""
692.18212 +
692.18213 +#
692.18214 +#. type: Content of: <book><chapter><sect1><para>
692.18215 +#: ../en/ch14-hgext.xml:339
692.18216 +msgid ""
692.18217 +"As an example, here's how to run the normal system <command>diff</command> "
692.18218 +"command, getting it to generate context diffs (using the <option role=\"cmd-"
692.18219 +"opt-diff\">-c</option> option)  instead of unified diffs, and five lines of "
692.18220 +"context instead of the default three (passing <literal>5</literal> as the "
692.18221 +"argument to the <option role=\"cmd-opt-diff\">-C</option> option)."
692.18222 +msgstr ""
692.18223 +
692.18224 +#. type: Content of: <book><chapter><sect1><para>
692.18225 +#: ../en/ch14-hgext.xml:348
692.18226 +msgid ""
692.18227 +"Launching a visual diff tool is just as easy.  Here's how to launch the "
692.18228 +"<command>kdiff3</command> viewer."
692.18229 +msgstr ""
692.18230 +
692.18231 +#. type: Content of: <book><chapter><sect1><para>
692.18232 +#: ../en/ch14-hgext.xml:352
692.18233 +msgid ""
692.18234 +"If your diff viewing command can't deal with directories, you can easily work "
692.18235 +"around this with a little scripting.  For an example of such scripting in "
692.18236 +"action with the <literal role=\"hg-ext\">mq</literal> extension and the "
692.18237 +"<command>interdiff</command> command, see <xref linkend=\"mq-collab:tips:"
692.18238 +"interdiff\"/>."
692.18239 +msgstr ""
692.18240 +
692.18241 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.18242 +#: ../en/ch14-hgext.xml:360
692.18243 +msgid "Defining command aliases"
692.18244 +msgstr "定义命令的别名"
692.18245 +
692.18246 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.18247 +#: ../en/ch14-hgext.xml:362
692.18248 +msgid ""
692.18249 +"It can be cumbersome to remember the options to both the <command role=\"hg-"
692.18250 +"ext-extdiff\">extdiff</command> command and the diff viewer you want to use, "
692.18251 +"so the <literal role=\"hg-ext\">extdiff</literal> extension lets you define "
692.18252 +"<emphasis>new</emphasis> commands that will invoke your diff viewer with "
692.18253 +"exactly the right options."
692.18254 +msgstr ""
692.18255 +
692.18256 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.18257 +#: ../en/ch14-hgext.xml:369
692.18258 +msgid ""
692.18259 +"All you need to do is edit your <filename role=\"special\">~/.hgrc</"
692.18260 +"filename>, and add a section named <literal role=\"rc-extdiff\">extdiff</"
692.18261 +"literal>.  Inside this section, you can define multiple commands.  Here's how "
692.18262 +"to add a <literal>kdiff3</literal> command.  Once you've defined this, you "
692.18263 +"can type <quote><literal>hg kdiff3</literal></quote> and the <literal role="
692.18264 +"\"hg-ext\">extdiff</literal> extension will run <command>kdiff3</command> for "
692.18265 +"you."
692.18266 +msgstr ""
692.18267 +
692.18268 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.18269 +#: ../en/ch14-hgext.xml:379
692.18270 +msgid ""
692.18271 +"If you leave the right hand side of the definition empty, as above, the "
692.18272 +"<literal role=\"hg-ext\">extdiff</literal> extension uses the name of the "
692.18273 +"command you defined as the name of the external program to run.  But these "
692.18274 +"names don't have to be the same.  Here, we define a command named "
692.18275 +"<quote><literal>hg wibble</literal></quote>, which runs <command>kdiff3</"
692.18276 +"command>."
692.18277 +msgstr ""
692.18278 +
692.18279 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.18280 +#: ../en/ch14-hgext.xml:389
692.18281 +msgid ""
692.18282 +"You can also specify the default options that you want to invoke your diff "
692.18283 +"viewing program with.  The prefix to use is <quote><literal>opts.</literal></"
692.18284 +"quote>, followed by the name of the command to which the options apply.  This "
692.18285 +"example defines a <quote><literal>hg vimdiff</literal></quote> command that "
692.18286 +"runs the <command>vim</command> editor's <literal>DirDiff</literal> extension."
692.18287 +msgstr ""
692.18288 +
692.18289 +#. type: Content of: <book><chapter><sect1><title>
692.18290 +#: ../en/ch14-hgext.xml:403
692.18291 +msgid ""
692.18292 +"Cherrypicking changes with the <literal role=\"hg-ext\">transplant</literal> "
692.18293 +"extension"
692.18294 +msgstr "使用扩展 <literal role=\"hg-ext\">transplant</literal> 以挑选修改"
692.18295 +
692.18296 +#. type: Content of: <book><chapter><sect1><para>
692.18297 +#: ../en/ch14-hgext.xml:406
692.18298 +msgid "Need to have a long chat with Brendan about this."
692.18299 +msgstr ""
692.18300 +
692.18301 +#. type: Content of: <book><chapter><sect1><title>
692.18302 +#: ../en/ch14-hgext.xml:410
692.18303 +msgid ""
692.18304 +"Send changes via email with the <literal role=\"hg-ext\">patchbomb</literal> "
692.18305 +"extension"
692.18306 +msgstr ""
692.18307 +"使用扩展 <literal role=\"hg-ext\">patchbomb</literal> 通过 email 发送修改"
692.18308 +
692.18309 +#. type: Content of: <book><chapter><sect1><para>
692.18310 +#: ../en/ch14-hgext.xml:413
692.18311 +msgid ""
692.18312 +"Many projects have a culture of <quote>change review</quote>, in which people "
692.18313 +"send their modifications to a mailing list for others to read and comment on "
692.18314 +"before they commit the final version to a shared repository.  Some projects "
692.18315 +"have people who act as gatekeepers; they apply changes from other people to a "
692.18316 +"repository to which those others don't have access."
692.18317 +msgstr ""
692.18318 +
692.18319 +#. type: Content of: <book><chapter><sect1><para>
692.18320 +#: ../en/ch14-hgext.xml:421
692.18321 +msgid ""
692.18322 +"Mercurial makes it easy to send changes over email for review or application, "
692.18323 +"via its <literal role=\"hg-ext\">patchbomb</literal> extension.  The "
692.18324 +"extension is so named because changes are formatted as patches, and it's "
692.18325 +"usual to send one changeset per email message.  Sending a long series of "
692.18326 +"changes by email is thus much like <quote>bombing</quote> the recipient's "
692.18327 +"inbox, hence <quote>patchbomb</quote>."
692.18328 +msgstr ""
692.18329 +
692.18330 +#. type: Content of: <book><chapter><sect1><para>
692.18331 +#: ../en/ch14-hgext.xml:429
692.18332 +msgid ""
692.18333 +"As usual, the basic configuration of the <literal role=\"hg-ext\">patchbomb</"
692.18334 +"literal> extension takes just one or two lines in your <filename role="
692.18335 +"\"special\"> /.hgrc</filename>."
692.18336 +msgstr ""
692.18337 +
692.18338 +#. type: Content of: <book><chapter><sect1><para>
692.18339 +#: ../en/ch14-hgext.xml:435
692.18340 +msgid ""
692.18341 +"Once you've enabled the extension, you will have a new command available, "
692.18342 +"named <command role=\"hg-ext-patchbomb\">email</command>."
692.18343 +msgstr ""
692.18344 +
692.18345 +#. type: Content of: <book><chapter><sect1><para>
692.18346 +#: ../en/ch14-hgext.xml:439
692.18347 +msgid ""
692.18348 +"The safest and best way to invoke the <command role=\"hg-ext-patchbomb"
692.18349 +"\">email</command> command is to <emphasis>always</emphasis> run it first "
692.18350 +"with the <option role=\"hg-ext-patchbomb-cmd-email-opt\">hg -n</option> "
692.18351 +"option.  This will show you what the command <emphasis>would</emphasis> send, "
692.18352 +"without actually sending anything.  Once you've had a quick glance over the "
692.18353 +"changes and verified that you are sending the right ones, you can rerun the "
692.18354 +"same command, with the <option role=\"hg-ext-patchbomb-cmd-email-opt\">hg -n</"
692.18355 +"option> option removed."
692.18356 +msgstr ""
692.18357 +
692.18358 +#. type: Content of: <book><chapter><sect1><para>
692.18359 +#: ../en/ch14-hgext.xml:450
692.18360 +msgid ""
692.18361 +"The <command role=\"hg-ext-patchbomb\">email</command> command accepts the "
692.18362 +"same kind of revision syntax as every other Mercurial command.  For example, "
692.18363 +"this command will send every revision between 7 and <literal>tip</literal>, "
692.18364 +"inclusive."
692.18365 +msgstr ""
692.18366 +
692.18367 +#. type: Content of: <book><chapter><sect1><para>
692.18368 +#: ../en/ch14-hgext.xml:455
692.18369 +msgid ""
692.18370 +"You can also specify a <emphasis>repository</emphasis> to compare with.  If "
692.18371 +"you provide a repository but no revisions, the <command role=\"hg-ext-"
692.18372 +"patchbomb\">email</command> command will send all revisions in the local "
692.18373 +"repository that are not present in the remote repository.  If you "
692.18374 +"additionally specify revisions or a branch name (the latter using the <option "
692.18375 +"role=\"hg-ext-patchbomb-cmd-email-opt\">hg -b</option> option), this will "
692.18376 +"constrain the revisions sent."
692.18377 +msgstr ""
692.18378 +
692.18379 +#. type: Content of: <book><chapter><sect1><para>
692.18380 +#: ../en/ch14-hgext.xml:464
692.18381 +msgid ""
692.18382 +"It's perfectly safe to run the <command role=\"hg-ext-patchbomb\">email</"
692.18383 +"command> command without the names of the people you want to send to: if you "
692.18384 +"do this, it will just prompt you for those values interactively.  (If you're "
692.18385 +"using a Linux or Unix-like system, you should have enhanced "
692.18386 +"<literal>readline</literal>-style editing capabilities when entering those "
692.18387 +"headers, too, which is useful.)"
692.18388 +msgstr ""
692.18389 +
692.18390 +#. type: Content of: <book><chapter><sect1><para>
692.18391 +#: ../en/ch14-hgext.xml:472
692.18392 +msgid ""
692.18393 +"When you are sending just one revision, the <command role=\"hg-ext-patchbomb"
692.18394 +"\">email</command> command will by default use the first line of the "
692.18395 +"changeset description as the subject of the single email message it sends."
692.18396 +msgstr ""
692.18397 +
692.18398 +#. type: Content of: <book><chapter><sect1><para>
692.18399 +#: ../en/ch14-hgext.xml:477
692.18400 +msgid ""
692.18401 +"If you send multiple revisions, the <command role=\"hg-ext-patchbomb\">email</"
692.18402 +"command> command will usually send one message per changeset.  It will "
692.18403 +"preface the series with an introductory message, in which you should describe "
692.18404 +"the purpose of the series of changes you're sending."
692.18405 +msgstr ""
692.18406 +
692.18407 +#. type: Content of: <book><chapter><sect1><sect2><title>
692.18408 +#: ../en/ch14-hgext.xml:484
692.18409 +msgid "Changing the behavior of patchbombs"
692.18410 +msgstr "修改 patchbomb 的行为"
692.18411 +
692.18412 +#. type: Content of: <book><chapter><sect1><sect2><para>
692.18413 +#: ../en/ch14-hgext.xml:486
692.18414 +msgid ""
692.18415 +"Not every project has exactly the same conventions for sending changes in "
692.18416 +"email; the <literal role=\"hg-ext\">patchbomb</literal> extension tries to "
692.18417 +"accommodate a number of variations through command line options."
692.18418 +msgstr ""
692.18419 +
692.18420 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.18421 +#: ../en/ch14-hgext.xml:492
692.18422 +msgid ""
692.18423 +"You can write a subject for the introductory message on the command line "
692.18424 +"using the <option role=\"hg-ext-patchbomb-cmd-email-opt\">hg -s</option> "
692.18425 +"option.  This takes one argument, the text of the subject to use."
692.18426 +msgstr ""
692.18427 +
692.18428 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.18429 +#: ../en/ch14-hgext.xml:498
692.18430 +msgid ""
692.18431 +"To change the email address from which the messages originate, use the "
692.18432 +"<option role=\"hg-ext-patchbomb-cmd-email-opt\">hg -f</option> option.  This "
692.18433 +"takes one argument, the email address to use."
692.18434 +msgstr ""
692.18435 +
692.18436 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.18437 +#: ../en/ch14-hgext.xml:504
692.18438 +msgid ""
692.18439 +"The default behavior is to send unified diffs (see <xref linkend=\"sec:mq:"
692.18440 +"patch\"/> for a description of the format), one per message.  You can send a "
692.18441 +"binary bundle instead with the <option role=\"hg-ext-patchbomb-cmd-email-opt"
692.18442 +"\">hg -b</option> option."
692.18443 +msgstr ""
692.18444 +
692.18445 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.18446 +#: ../en/ch14-hgext.xml:512
692.18447 +msgid ""
692.18448 +"Unified diffs are normally prefaced with a metadata header.  You can omit "
692.18449 +"this, and send unadorned diffs, with the <option role=\"hg-ext-patchbomb-cmd-"
692.18450 +"email-opt\">hg --plain</option> option."
692.18451 +msgstr ""
692.18452 +
692.18453 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.18454 +#: ../en/ch14-hgext.xml:518
692.18455 +msgid ""
692.18456 +"Diffs are normally sent <quote>inline</quote>, in the same body part as the "
692.18457 +"description of a patch.  This makes it easiest for the largest number of "
692.18458 +"readers to quote and respond to parts of a diff, as some mail clients will "
692.18459 +"only quote the first MIME body part in a message. If you'd prefer to send the "
692.18460 +"description and the diff in separate body parts, use the <option role=\"hg-"
692.18461 +"ext-patchbomb-cmd-email-opt\">hg -a</option> option."
692.18462 +msgstr ""
692.18463 +
692.18464 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.18465 +#: ../en/ch14-hgext.xml:528
692.18466 +msgid ""
692.18467 +"Instead of sending mail messages, you can write them to an <literal>mbox</"
692.18468 +"literal>-format mail folder using the <option role=\"hg-ext-patchbomb-cmd-"
692.18469 +"email-opt\">hg -m</option> option.  That option takes one argument, the name "
692.18470 +"of the file to write to."
692.18471 +msgstr ""
692.18472 +
692.18473 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
692.18474 +#: ../en/ch14-hgext.xml:535
692.18475 +msgid ""
692.18476 +"If you would like to add a <command>diffstat</command>-format summary to each "
692.18477 +"patch, and one to the introductory message, use the <option role=\"hg-ext-"
692.18478 +"patchbomb-cmd-email-opt\">hg -d</option> option.  The <command>diffstat</"
692.18479 +"command> command displays a table containing the name of each file patched, "
692.18480 +"the number of lines affected, and a histogram showing how much each file is "
692.18481 +"modified.  This gives readers a qualitative glance at how complex a patch is."
692.18482 +msgstr ""
   693.1 --- a/sillybench/sillybench.py	Thu Mar 26 08:57:10 2009 +0100
   693.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   693.3 @@ -1,177 +0,0 @@
   693.4 -#!/usr/bin/python
   693.5 -#
   693.6 -# Silly benchmarking program, to give a vague idea of how fast a few
   693.7 -# tools are on a handful of common operations.
   693.8 -#
   693.9 -# Use a fairly big and real source tarball to test with: Firefox
  693.10 -# 2.0.0.3 (37622 files, 5374 directories, 343MB unpacked onto
  693.11 -# 4KB-blocksize ext3).
  693.12 -
  693.13 -import csv
  693.14 -import os
  693.15 -import shutil
  693.16 -import sys
  693.17 -import tempfile
  693.18 -import time
  693.19 -import urllib2
  693.20 -
  693.21 -url = 'ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/2.0.0.3/source/firefox-2.0.0.3-source.tar.bz2'
  693.22 -
  693.23 -class CommandFailure(Exception):
  693.24 -    pass
  693.25 -
  693.26 -class rcs(object):
  693.27 -    def __init__(self):
  693.28 -        self.logfp = open(self.__class__.__name__ + '.csv', 'w')
  693.29 -        self.csv = csv.writer(self.logfp)
  693.30 -
  693.31 -    def download(self):
  693.32 -        name = url[url.rfind('/')+1:]
  693.33 -        path = os.path.join(os.environ['HOME'], name)
  693.34 -        if not os.path.isfile(path):
  693.35 -            ofp = open(path + '.part', 'wb')
  693.36 -            try:
  693.37 -                ifp = urllib2.urlopen(url)
  693.38 -                nbytes = ifp.info()['content-length']
  693.39 -                sys.stdout.write('%s: %s bytes ' % (name, nbytes))
  693.40 -                sys.stdout.flush()
  693.41 -                while True:
  693.42 -                    data = ifp.read(131072)
  693.43 -                    if not data: break
  693.44 -                    sys.stdout.write('.')
  693.45 -                    sys.stdout.flush()
  693.46 -                    ofp.write(data)
  693.47 -                del ofp
  693.48 -                os.rename(path + '.part', path)
  693.49 -            except:
  693.50 -                if os.path.exists(path + '.part'):
  693.51 -                    os.unlink(path + '.part')
  693.52 -                if os.path.exists(path):
  693.53 -                    os.unlink(path)
  693.54 -                raise
  693.55 -        return path
  693.56 -
  693.57 -    def run(self, args, mustsucceed=True):
  693.58 -        ret = os.spawnvp(os.P_WAIT, args[0], args)
  693.59 -        if ret < 0:
  693.60 -            msg = 'killed by signal %d' % (-ret)
  693.61 -        if ret > 0:
  693.62 -            msg = 'exited with status %d' % (ret)
  693.63 -        if ret:
  693.64 -            if mustsucceed:
  693.65 -                raise CommandFailure('%s: %s' % (msg, ' '.join(args)))
  693.66 -            print >> sys.stderr, 'WARNING: %s: %s' % (msg, ' '.join(args))
  693.67 -
  693.68 -    def time(self, *args, **kwargs):
  693.69 -        start = time.time()
  693.70 -        self.run(*args, **kwargs)
  693.71 -        end = time.time()
  693.72 -        return end - start
  693.73 -        
  693.74 -    def logtime(self, name, elapsed, rest=[]):
  693.75 -        self.log('time:' + name, '%.3f' % elapsed, rest)
  693.76 -
  693.77 -    def log(self, name, value, rest=[]):
  693.78 -        item = (name, value, repr(rest))
  693.79 -        print ' '.join(item)
  693.80 -        self.csv.writerow(item)
  693.81 -        self.logfp.flush()
  693.82 -
  693.83 -    def unpack(self):
  693.84 -        tarball = self.download()
  693.85 -        t = self.time(['tar', '-C', self.wdir, '-jxf', tarball])
  693.86 -        self.logtime('internal:untar', t)
  693.87 -        for name in os.listdir(os.path.join(self.wdir, 'mozilla')):
  693.88 -            os.rename(os.path.join(self.wdir, 'mozilla', name),
  693.89 -                      os.path.join(self.wdir, name))
  693.90 -
  693.91 -    def cleanup(self):
  693.92 -        pass
  693.93 -
  693.94 -    def add(self, paths):
  693.95 -        pass
  693.96 -
  693.97 -    def commit(self, msg, paths):
  693.98 -        pass
  693.99 -
 693.100 -    def status(self, path):
 693.101 -        pass
 693.102 -
 693.103 -    def remove(self, path):
 693.104 -        pass
 693.105 -
 693.106 -
 693.107 -class subversion(rcs):
 693.108 -    def __init__(self, root):
 693.109 -        rcs.__init__(self)
 693.110 -        self.repo = os.path.join(root, 'repo')
 693.111 -        self.wdir = os.path.join(root, 'wc')
 693.112 -        create = self.time(['svnadmin', 'create', '--fs-type=fsfs', self.repo])
 693.113 -        self.logtime('svn:create', create)
 693.114 -        co = self.time(['svn', 'co', 'file://' + self.repo, self.wdir])
 693.115 -        self.logtime('svn:co', co)
 693.116 -        self.logtime('init', create + co)
 693.117 -        os.chdir(self.wdir)
 693.118 -
 693.119 -    def dropmeta(self, names):
 693.120 -        return [n for n in names if os.path.basename(n) != '.svn']
 693.121 -
 693.122 -    def add(self, paths):
 693.123 -        t = self.time(['svn', 'add', '-q'] + paths)
 693.124 -        self.logtime('add %r' % paths, t)
 693.125 -
 693.126 -    def commit(self, msg, paths=[]):
 693.127 -        if paths:
 693.128 -            t = self.time(['svn', 'ci', '-q', '-m', msg] + paths)
 693.129 -        else:
 693.130 -            t = self.time(['svn', 'ci', '-q', '-m', msg])
 693.131 -        self.logtime('commit %r' % paths, t)
 693.132 -
 693.133 -
 693.134 -class mercurial(rcs):
 693.135 -    def __init__(self, root):
 693.136 -        rcs.__init__(self)
 693.137 -        self.repo = os.path.join(root, 'repo')
 693.138 -        self.wdir = self.repo
 693.139 -        init = self.time(['hg', 'init', self.repo])
 693.140 -        self.logtime('init', init)
 693.141 -        os.chdir(self.wdir)
 693.142 -
 693.143 -    def dropmeta(self, names):
 693.144 -        return [n for n in names if os.path.basename(n) != '.hg']
 693.145 -
 693.146 -    def add(self, paths):
 693.147 -        t = self.time(['hg', 'add', '-q'] + paths)
 693.148 -        self.logtime('add %r' % paths, t)
 693.149 -
 693.150 -    def commit(self, msg, paths=[]):
 693.151 -        if paths:
 693.152 -            t = self.time(['hg', 'ci', '-q', '-m', msg] + paths)
 693.153 -        else:
 693.154 -            t = self.time(['hg', 'ci', '-q', '-m', msg])
 693.155 -        self.logtime('commit %r' % paths, t)
 693.156 -
 693.157 -def benchmark(cls):
 693.158 -    oldcwd = os.getcwd()
 693.159 -    root = tempfile.mkdtemp(prefix='sillybench.')
 693.160 -    try:
 693.161 -        print 'root', root
 693.162 -        inst = cls(root)
 693.163 -        inst.unpack()
 693.164 -        names = inst.dropmeta(os.listdir('.'))
 693.165 -        dirs = [n for n in names if os.path.isdir(n)]
 693.166 -        nondirs = [n for n in names if not os.path.isdir(n)]
 693.167 -        dirs.sort(key=hash)
 693.168 -        names.sort(key=hash)
 693.169 -        for d in dirs[:len(dirs)/2]:
 693.170 -            inst.add([d])
 693.171 -            inst.commit('Add %r' % d, [d])
 693.172 -        inst.add(dirs[len(dirs)/2:] + names)
 693.173 -        inst.commit('Add remaining dirs and files')
 693.174 -    finally:
 693.175 -        print >> sys.stderr, '[cleaning up...]'
 693.176 -        shutil.rmtree(root)
 693.177 -        os.chdir(oldcwd)
 693.178 -
 693.179 -benchmark(mercurial)
 693.180 -#benchmark(subversion)
   694.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   694.2 +++ b/stylesheets/all-ids.xsl	Sun Aug 16 03:41:39 2009 +0200
   694.3 @@ -0,0 +1,40 @@
   694.4 +<?xml version="1.0" encoding="utf-8"?>
   694.5 +
   694.6 +<!-- Prepare an ASCII dump file of all IDs, and the pages in which
   694.7 +     they live, for loading into a database. Assumes one-level chunked
   694.8 +     HTML output, with each chunk containing either a chapter or
   694.9 +     sect1. -->
  694.10 +
  694.11 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  694.12 +                version="1.0">
  694.13 +
  694.14 +  <xsl:output method="text"/>
  694.15 +  <xsl:strip-space elements="title"/>
  694.16 +
  694.17 +  <xsl:template match="/">
  694.18 +    <xsl:for-each select="//preface|//chapter|//appendix|//bibliography|//sect1">
  694.19 +      <xsl:variable name="id">
  694.20 +        <xsl:choose>
  694.21 +          <xsl:when test="local-name(.)='sect1'">
  694.22 +            <xsl:value-of select="../@id"/>
  694.23 +          </xsl:when>
  694.24 +          <xsl:otherwise>
  694.25 +            <xsl:value-of select="@id"/>
  694.26 +          </xsl:otherwise>
  694.27 +        </xsl:choose>
  694.28 +      </xsl:variable>
  694.29 +      <xsl:variable name="sectitle">
  694.30 +        <xsl:value-of select="normalize-space(./title)"/>
  694.31 +      </xsl:variable>
  694.32 +      <xsl:for-each select=".//para[@id]|.//programlisting[@id]|.//screen[@id]">
  694.33 +        <xsl:value-of select="@id"/>
  694.34 +        <xsl:text>|</xsl:text>
  694.35 +        <xsl:copy-of select="$id"/>
  694.36 +        <xsl:text>|</xsl:text>
  694.37 +        <xsl:copy-of select="$sectitle"/>
  694.38 +        <xsl:text>&#x0a;</xsl:text>
  694.39 +      </xsl:for-each>
  694.40 +    </xsl:for-each>
  694.41 +  </xsl:template>
  694.42 +
  694.43 +</xsl:stylesheet>
   695.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   695.2 +++ b/stylesheets/base-html-stylesheet.xsl	Sun Aug 16 03:41:39 2009 +0200
   695.3 @@ -0,0 +1,127 @@
   695.4 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
   695.5 +
   695.6 +  <xsl:param name="html.stylesheet">/support/styles.css</xsl:param>
   695.7 +  <xsl:param name="toc.section.depth">3</xsl:param>
   695.8 +  <xsl:param name="annotate.toc">0</xsl:param>
   695.9 +
  695.10 +  <xsl:param name="generate.id.attributes" select="1"></xsl:param>
  695.11 +  <xsl:param name="header.rule" select="0"></xsl:param>
  695.12 +  <xsl:param name="footer.rule" select="0"></xsl:param>
  695.13 +  <xsl:param name="html.cleanup" select="1"></xsl:param>
  695.14 +  <xsl:param name="admon.style"><xsl:text></xsl:text></xsl:param>
  695.15 +  <xsl:param name="admon.graphics" select="1"></xsl:param>
  695.16 +  <xsl:param name="admon.graphics.path">/support/figs/</xsl:param>
  695.17 +
  695.18 +  <xsl:template match="sect1" mode="toc">
  695.19 +    <xsl:param name="toc-context" select="."/>
  695.20 +    <xsl:call-template name="subtoc">
  695.21 +      <xsl:with-param name="toc-context" select="$toc-context"/>
  695.22 +      <xsl:with-param name="nodes" 
  695.23 +        select="sect2|refentry|bridgehead[$bridgehead.in.toc != 0]"/>
  695.24 +    </xsl:call-template>
  695.25 +  </xsl:template>
  695.26 +
  695.27 +  <xsl:template match="sect2" mode="toc">
  695.28 +    <xsl:param name="toc-context" select="."/>
  695.29 +
  695.30 +    <xsl:call-template name="subtoc">
  695.31 +      <xsl:with-param name="toc-context" select="$toc-context"/>
  695.32 +      <xsl:with-param name="nodes" 
  695.33 +        select="sect3|refentry|bridgehead[$bridgehead.in.toc != 0]"/>
  695.34 +    </xsl:call-template>
  695.35 +  </xsl:template>
  695.36 +
  695.37 +  <!-- Add id attributes to <p> tags. This is mostly a copy of the
  695.38 +       base XSL. -->
  695.39 +  <xsl:template name="paragraph">
  695.40 +    <xsl:param name="class" select="''"/>
  695.41 +    <xsl:param name="content"/>
  695.42 +
  695.43 +    <xsl:variable name="p">
  695.44 +      <p>
  695.45 +        <xsl:call-template name="dir"/>
  695.46 +        <xsl:if test="$class != ''">
  695.47 +          <xsl:apply-templates select="." mode="class.attribute">
  695.48 +            <xsl:with-param name="class" select="$class"/>
  695.49 +          </xsl:apply-templates>
  695.50 +        </xsl:if>
  695.51 +        <!-- Here we go. -->
  695.52 +        <xsl:if test="$generate.id.attributes != 0">
  695.53 +          <xsl:attribute name="id">
  695.54 +            <xsl:call-template name="object.id"/>
  695.55 +          </xsl:attribute>
  695.56 +        </xsl:if>
  695.57 +        <xsl:copy-of select="$content"/>
  695.58 +      </p>
  695.59 +    </xsl:variable>
  695.60 +
  695.61 +    <xsl:choose>
  695.62 +      <xsl:when test="$html.cleanup != 0">
  695.63 +        <xsl:call-template name="unwrap.p">
  695.64 +          <xsl:with-param name="p" select="$p"/>
  695.65 +        </xsl:call-template>
  695.66 +      </xsl:when>
  695.67 +      <xsl:otherwise>
  695.68 +        <xsl:copy-of select="$p"/>
  695.69 +      </xsl:otherwise>
  695.70 +    </xsl:choose>
  695.71 +  </xsl:template>
  695.72 +
  695.73 +  <!-- Add id attributes to <programlisting> and <screen> tags. Once
  695.74 +       again, this is mostly a copy of the base XSL, although rather
  695.75 +       trimmed down. -->
  695.76 +  <xsl:template match="programlisting|screen">
  695.77 +    <xsl:param name="suppress-numbers" select="'0'"/>
  695.78 +
  695.79 +    <xsl:call-template name="anchor"/>
  695.80 +
  695.81 +    <pre>
  695.82 +      <!-- Here we go. -->
  695.83 +      <xsl:if test="$generate.id.attributes != 0">
  695.84 +        <xsl:attribute name="id">
  695.85 +          <xsl:call-template name="object.id"/>
  695.86 +        </xsl:attribute>
  695.87 +      </xsl:if>
  695.88 +
  695.89 +      <xsl:apply-templates select="." mode="class.attribute"/>
  695.90 +      <xsl:call-template name="apply-highlighting"/>
  695.91 +    </pre>
  695.92 +  </xsl:template>
  695.93 +
  695.94 +  <!-- The default stylesheet generates a little TOC at the beginning
  695.95 +       of each qandaset.  Uh, no thanks. -->
  695.96 +  <xsl:template name="process.qanda.toc"/>
  695.97 +
  695.98 +  <xsl:template name="user.header.navigation">
  695.99 +    <div class="navheader"><h2 class="booktitle"><a href="/">Mercurial: The Definitive Guide</a> <span class="authors">by Bryan O'Sullivan</span></h2></div>
 695.100 +  </xsl:template>
 695.101 +
 695.102 +  <xsl:template name="user.head.content">
 695.103 +    <link rel="alternate" type="application/atom+xml" title="Comments"
 695.104 +      href="/feeds/comments/"/>
 695.105 +    <link rel="shortcut icon" type="image/png" href="/support/figs/favicon.png"/>
 695.106 +    <script type="text/javascript" src="/support/jquery-min.js"></script>
 695.107 +    <script type="text/javascript" src="/support/form.js"></script>
 695.108 +    <script type="text/javascript" src="/support/hsbook.js"></script>
 695.109 +  </xsl:template>
 695.110 +
 695.111 +  <xsl:template name="user.footer.content">
 695.112 +    <div class="hgfooter">
 695.113 +      <p><img src="/support/figs/rss.png"/> Want to stay up to date? Subscribe to the comment feed for <a id="chapterfeed" class="feed" href="/feeds/comments/">this chapter</a>, or the <a class="feed" href="/feeds/comments/">entire book</a>.</p>
 695.114 +      <p>Copyright 2006, 2007, 2008, 2009 Bryan O'Sullivan.
 695.115 +      Icons by <a href="mailto:mattahan@gmail.com">Paul Davey</a> aka <a href="http://mattahan.deviantart.com/">Mattahan</a>.</p>
 695.116 +    </div>
 695.117 +  </xsl:template>
 695.118 +
 695.119 +  <xsl:template name="user.footer.navigation">
 695.120 +    <script type="text/javascript">
 695.121 +    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
 695.122 +    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
 695.123 +    </script>
 695.124 +    <script type="text/javascript">
 695.125 +    try {
 695.126 +    var pageTracker = _gat._getTracker("UA-1805907-5");
 695.127 +    pageTracker._trackPageview();
 695.128 +    } catch(err) {}</script>
 695.129 +  </xsl:template>
 695.130 +</xsl:stylesheet>
   696.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   696.2 +++ b/stylesheets/chunk-stylesheet.xsl	Sun Aug 16 03:41:39 2009 +0200
   696.3 @@ -0,0 +1,17 @@
   696.4 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
   696.5 +
   696.6 +  <xsl:import href="system-xsl/html/chunk.xsl"/>
   696.7 +  <xsl:include href="base-html-stylesheet.xsl"/>
   696.8 +
   696.9 +  <!-- PARAMETER REFERENCE:                                         -->
  696.10 +  <!-- http://docbook.sourceforge.net/release/xsl/current/doc/html/ -->
  696.11 +
  696.12 +  <!-- Uncomment this to enable auto-numbering of sections -->
  696.13 +  <!-- xsl:param name="section.autolabel" select="1" / -->
  696.14 +  <xsl:param name="chunker.output.encoding">UTF-8</xsl:param>
  696.15 +  <xsl:param name="use.id.as.filename" select="1"/>
  696.16 +  <xsl:param name="chunk.first.sections" select="0"/>
  696.17 +  <xsl:param name="chunk.section.depth" select="0"/>
  696.18 +  <xsl:param name="chunk.quietly" select="0"/>
  696.19 +
  696.20 +</xsl:stylesheet>
   697.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   697.2 +++ b/stylesheets/dtd-profile.xsl	Sun Aug 16 03:41:39 2009 +0200
   697.3 @@ -0,0 +1,15 @@
   697.4 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
   697.5 +  <xsl:import href="system-xsl/profiling/profile.xsl"></xsl:import>
   697.6 +
   697.7 +  <!-- For some reason, xsltproc omits the DTD from the file it
   697.8 +       outputs. Add a sensible one back in, because otherwise xmllint
   697.9 +       won't validate profiled documents. -->
  697.10 +
  697.11 +  <xsl:template match="/">
  697.12 +    <xsl:text disable-output-escaping="yes"><![CDATA[
  697.13 +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  697.14 + "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
  697.15 +  ]]></xsl:text>
  697.16 +    <xsl:apply-templates select="." mode="profile"/>
  697.17 +  </xsl:template> 
  697.18 +</xsl:stylesheet>
   698.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   698.2 +++ b/stylesheets/en/fo.xsl	Sun Aug 16 03:41:39 2009 +0200
   698.3 @@ -0,0 +1,10 @@
   698.4 +<?xml version="1.0"?>
   698.5 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   698.6 +                xmlns:fo="http://www.w3.org/1999/XSL/Format"
   698.7 +                version='1.0'>
   698.8 +
   698.9 +  <xsl:import href="../fo.xsl"/>
  698.10 +
  698.11 +  <xsl:param name="l10n.gentext.language" select="'en'"/>
  698.12 +
  698.13 +</xsl:stylesheet>
   699.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   699.2 +++ b/stylesheets/en/html-single.xsl	Sun Aug 16 03:41:39 2009 +0200
   699.3 @@ -0,0 +1,8 @@
   699.4 +<?xml version="1.0"?>
   699.5 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
   699.6 +
   699.7 +  <xsl:import href="../html-single.xsl"/>
   699.8 +
   699.9 +  <xsl:param name="l10n.gentext.language" select="'en'"/>
  699.10 +
  699.11 +</xsl:stylesheet>
   700.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   700.2 +++ b/stylesheets/en/html.xsl	Sun Aug 16 03:41:39 2009 +0200
   700.3 @@ -0,0 +1,8 @@
   700.4 +<?xml version="1.0"?>
   700.5 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
   700.6 +
   700.7 +  <xsl:import href="../html.xsl"/>
   700.8 +
   700.9 +  <xsl:param name="l10n.gentext.language" select="'en'"/>
  700.10 +
  700.11 +</xsl:stylesheet>
   701.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   701.2 +++ b/stylesheets/fo.xsl	Sun Aug 16 03:41:39 2009 +0200
   701.3 @@ -0,0 +1,81 @@
   701.4 +<?xml version="1.0"?>
   701.5 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
   701.6 +
   701.7 +  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
   701.8 +
   701.9 +  <xsl:param name="draft.mode" select="no"/>
  701.10 +
  701.11 +  <!-- These extensions are required for table printing and other stuff -->
  701.12 +  <xsl:param name="use.extensions">1</xsl:param>
  701.13 +  <xsl:param name="callouts.extension">1</xsl:param>
  701.14 +  <xsl:param name="linenumbering.extension">1</xsl:param>
  701.15 +  <xsl:param name="tablecolumns.extension">1</xsl:param>
  701.16 +  <xsl:param name="textinsert.extension">1</xsl:param>
  701.17 +
  701.18 +  <xsl:param name="admon.graphics" select="1" />
  701.19 +  <xsl:param name="admon.graphics.extension">.png</xsl:param>
  701.20 +  <xsl:param name="admon.graphics.path">figs/</xsl:param>
  701.21 +  <xsl:param name="callout.graphics" select="1" />
  701.22 +  <xsl:param name="callout.graphics.extension">.png</xsl:param>
  701.23 +  <xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
  701.24 +
  701.25 +  <xsl:param name="section.autolabel" select="1" />
  701.26 +  <xsl:param name="section.label.includes.component.label">1</xsl:param>
  701.27 +
  701.28 +  <xsl:param name="variablelist.as.blocks" select="1" />        <!-- fo only -->
  701.29 +  <xsl:param name="hyphenate">false</xsl:param>                 <!-- fo only -->
  701.30 +  <xsl:param name="paper.type" select="'A4'"></xsl:param>       <!-- fo only -->
  701.31 +
  701.32 +  <!-- Default font settings -->
  701.33 +  <!--
  701.34 +  <xsl:param name="title.font.family">sans-serif</xsl:param>
  701.35 +  <xsl:param name="body.font.family">serif</xsl:param>
  701.36 +  <xsl:param name="sans.font.family">sans-serif</xsl:param>
  701.37 +  <xsl:param name="dingbat.font.family">serif</xsl:param>
  701.38 +  <xsl:param name="monospace.font.family">monospace</xsl:param>
  701.39 +  <xsl:param name="symbol.font.family">Symbol,ZapfDingbats</xsl:param>
  701.40 +  -->
  701.41 +
  701.42 +  <!-- Custom font settings - preferred truetype font -->
  701.43 +  <xsl:param name="title.font.family">Calibri,sans-serif,SimHei</xsl:param>
  701.44 +  <xsl:param name="body.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param>
  701.45 +  <xsl:param name="sans.font.family">Calibri,sans-serif,SimHei</xsl:param>
  701.46 +  <xsl:param name="dingbat.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param>
  701.47 +  <xsl:param name="monospace.font.family">Courier New,monospace,FangSong</xsl:param>
  701.48 +
  701.49 +  <!-- Page related Settings -->
  701.50 +  <xsl:param name="page.margin.inner">1.5cm</xsl:param>
  701.51 +  <xsl:param name="page.margin.outer">1.5cm</xsl:param>
  701.52 +  <xsl:param name="title.margin.left">0pt</xsl:param>
  701.53 +  <xsl:param name="body.start.indent">24pt</xsl:param>
  701.54 +  <xsl:param name="body.end.indent">0pt</xsl:param>
  701.55 +
  701.56 +  <!-- Breaking long lines -->
  701.57 +  <xsl:param name="hyphenate.verbatim">0</xsl:param>
  701.58 +  <xsl:attribute-set name="monospace.verbatim.properties"
  701.59 +                     use-attribute-sets="verbatim.properties monospace.properties">
  701.60 +    <xsl:attribute name="wrap-option">wrap</xsl:attribute>
  701.61 +    <xsl:attribute name="hyphenation-character">&#x25BA;</xsl:attribute>
  701.62 +  </xsl:attribute-set>
  701.63 +
  701.64 +  <!-- Prevent blank pages in output -->
  701.65 +  <xsl:template name="book.titlepage.before.verso">
  701.66 +  </xsl:template>
  701.67 +  <xsl:template name="book.titlepage.verso">
  701.68 +  </xsl:template>
  701.69 +  <xsl:template name="book.titlepage.separator">
  701.70 +  </xsl:template>
  701.71 +
  701.72 +  <!-- Colourize links in output -->
  701.73 +  <xsl:attribute-set name="xref.properties">
  701.74 +    <xsl:attribute name="color">
  701.75 +      <xsl:choose>
  701.76 +        <xsl:when test="self::ulink">blue</xsl:when>
  701.77 +        <xsl:when test="self::xref">blue</xsl:when>
  701.78 +        <xsl:when test="self::uri">blue</xsl:when>
  701.79 +        <xsl:otherwise>red</xsl:otherwise>
  701.80 +      </xsl:choose>
  701.81 +    </xsl:attribute>
  701.82 +  </xsl:attribute-set>
  701.83 +
  701.84 +</xsl:stylesheet>
   702.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   702.2 +++ b/stylesheets/hgbook.css	Sun Aug 16 03:41:39 2009 +0200
   702.3 @@ -0,0 +1,295 @@
   702.4 +body
   702.5 +{
   702.6 +    background: white;
   702.7 +    margin: 1in;
   702.8 +    font-family: Georgia,SimSun,serif;
   702.9 +}
  702.10 +
  702.11 +p, li, ul, ol, dd, dt
  702.12 +{
  702.13 +    font-style: normal;
  702.14 +    font-weight: normal;
  702.15 +    color: black;
  702.16 +}
  702.17 +
  702.18 +tt, pre
  702.19 +{
  702.20 +    font-family: Consolas,KaiTi,FangSong,SimSun,monospace;
  702.21 +}
  702.22 +
  702.23 +a
  702.24 +{
  702.25 +    color: blue;
  702.26 +    text-decoration: underline;
  702.27 +}    
  702.28 +
  702.29 +a:hover 
  702.30 +{
  702.31 +    background: rgb(75%,75%,100%);
  702.32 +    color: blue;
  702.33 +    text-decoration: underline;
  702.34 +}
  702.35 +
  702.36 +a:visited 
  702.37 +{
  702.38 +    color: purple;
  702.39 +    text-decoration: underline;
  702.40 +}
  702.41 +
  702.42 +img
  702.43 +{
  702.44 +    border: none;
  702.45 +}
  702.46 +
  702.47 +h1.title
  702.48 +{
  702.49 +    font-size: 250%;
  702.50 +    font-style: normal;
  702.51 +    font-weight: bold;
  702.52 +    color: black;
  702.53 +}
  702.54 +
  702.55 +h2.subtitle
  702.56 +{
  702.57 +    font-size: 150%;
  702.58 +    font-style: italic;
  702.59 +    color: black;
  702.60 +}
  702.61 +
  702.62 +h2.title
  702.63 +{
  702.64 +    font-size: 150%;
  702.65 +    font-style: normal;
  702.66 +    font-weight: bold;
  702.67 +    color: black;
  702.68 +}
  702.69 +
  702.70 +h3.title
  702.71 +{
  702.72 +    font-size: 125%;
  702.73 +    font-style: normal;
  702.74 +    font-weight: bold;
  702.75 +    color: black;
  702.76 +}
  702.77 +
  702.78 +h4.title
  702.79 +{
  702.80 +    font-size: 100%;
  702.81 +    font-style: normal;
  702.82 +    font-weight: bold;
  702.83 +    color: black;
  702.84 +}
  702.85 +
  702.86 +strong
  702.87 +{
  702.88 +    font-weight: normal;
  702.89 +}
  702.90 +
  702.91 +.toc b
  702.92 +{
  702.93 +    font-family: Verdana,SimHei,sans-serif;
  702.94 +    font-size: 120%;
  702.95 +    font-style: normal;
  702.96 +    font-weight: bold;
  702.97 +    color: black;
  702.98 +}
  702.99 +
 702.100 +.title
 702.101 +{
 702.102 +    font-family: Verdana,SimHei,sans-serif;
 702.103 +}
 702.104 +
 702.105 +.screen, .programlisting, .structname
 702.106 +{
 702.107 +    font-family: Consolas,KaiTi,FangSong,SimSun,monospace;
 702.108 +    font-style: normal;
 702.109 +    font-weight: normal;
 702.110 +}
 702.111 +
 702.112 +.userinput
 702.113 +{
 702.114 +    font-weight: normal;
 702.115 +}
 702.116 +
 702.117 +.command
 702.118 +{
 702.119 +    font-style: italic;
 702.120 +}
 702.121 +
 702.122 +.filename
 702.123 +{
 702.124 +    font-family: Georgia,SimSun,serif;
 702.125 +    font-style: italic;
 702.126 +}
 702.127 +
 702.128 +.figure, .example, .table
 702.129 +{
 702.130 +    margin: 0.125in 0.25in;
 702.131 +}
 702.132 +
 702.133 +.figure p.title b, .example p.title b, .table p.title b
 702.134 +{
 702.135 +    font-family: Georgia,SimSun,serif;
 702.136 +    font-size: 80%;
 702.137 +    font-style: italic;
 702.138 +    font-weight: normal;
 702.139 +}
 702.140 +
 702.141 +.table table
 702.142 +{
 702.143 +    border-width: 1px;
 702.144 +    border-style: solid;
 702.145 +    border-color: black;
 702.146 +    border-spacing: 0;
 702.147 +    background: rgb(240,240,240);
 702.148 +}
 702.149 +
 702.150 +.table td
 702.151 +{
 702.152 +    border: none;
 702.153 +    border-right: 1px black solid;
 702.154 +    border-bottom: 1px black solid;
 702.155 +    padding: 2px;
 702.156 +}
 702.157 +
 702.158 +.table th
 702.159 +{
 702.160 +    background: rgb(180,180,180);
 702.161 +    border: none;
 702.162 +    border-right: 1px black solid;
 702.163 +    border-bottom: 1px black solid;
 702.164 +    padding: 2px;
 702.165 +}
 702.166 +
 702.167 +.table p.title, .figure p.title, .example p.title
 702.168 +{
 702.169 +    text-align: left !important;
 702.170 +    font-size: 100% !important;
 702.171 +}
 702.172 +
 702.173 +.author, .pubdate
 702.174 +{
 702.175 +    margin: 0;
 702.176 +    font-size: 100%;
 702.177 +    font-style: italic;
 702.178 +    font-weight: normal;
 702.179 +    color: black;
 702.180 +}
 702.181 +
 702.182 +.preface div.author, .preface .pubdate
 702.183 +{
 702.184 +    font-size: 80%;
 702.185 +}
 702.186 +
 702.187 +.sidebar 
 702.188 +{
 702.189 +    border-top: dotted 1px black;
 702.190 +    border-left: dotted 1px black;
 702.191 +    border-right: solid 2px black;
 702.192 +    border-bottom: solid 2px black;
 702.193 +    background: rgb(240,220,170);
 702.194 +    padding: 0 0.12in;
 702.195 +    margin: 0.25in;
 702.196 +}
 702.197 +
 702.198 +.note .programlisting, .note .screen, 
 702.199 +.tip .programlisting, .tip .screen, 
 702.200 +.warning .programlisting, .warning .screen, 
 702.201 +.sidebar .programlisting, .sidebar .screen
 702.202 +{
 702.203 +    border: none;
 702.204 +    background: none;
 702.205 +}
 702.206 +
 702.207 +.sidebar p.title
 702.208 +{
 702.209 +    text-align: center;
 702.210 +    font-size: 125%;
 702.211 +}
 702.212 +
 702.213 +.note, .tip, .warning
 702.214 +{
 702.215 +    border: black solid 1px;
 702.216 +    margin: 0.125in 0;
 702.217 +    padding: 0 55px;
 702.218 +    font-size: 90%;
 702.219 +}
 702.220 +
 702.221 +/*
 702.222 +.note
 702.223 +{
 702.224 +    background: url(./figs/note.png) no-repeat rgb(252,246,220);
 702.225 +}
 702.226 +
 702.227 +.tip
 702.228 +{
 702.229 +    background: url(./figs/tip.png) no-repeat rgb(224,244,255);
 702.230 +}
 702.231 +
 702.232 +.warning
 702.233 +{
 702.234 +    background: url(./figs/warning.png) no-repeat rgb(255,210,210);
 702.235 +}
 702.236 +*/
 702.237 +
 702.238 +.note .title, .tip .title, .warning .title
 702.239 +{
 702.240 +    display: none;
 702.241 +}
 702.242 +
 702.243 +.programlisting, .screen
 702.244 +{
 702.245 +    font-size: 90%;
 702.246 +    color: black;
 702.247 +    margin: 1em 0.25in;
 702.248 +    padding: 0.5em;
 702.249 +    background: rgb(240,240,240);
 702.250 +    border-top: black dotted 1px;
 702.251 +    border-left: black dotted 1px;
 702.252 +    border-right: black solid 2px;
 702.253 +    border-bottom: black solid 2px;
 702.254 +}
 702.255 +
 702.256 +.navheader, .navfooter
 702.257 +{
 702.258 +    border: black solid 1px;
 702.259 +    background: rgb(180,180,200);
 702.260 +}
 702.261 +
 702.262 +.navheader hr, .navfooter hr
 702.263 +{
 702.264 +    display: none;
 702.265 +}
 702.266 +
 702.267 +#svn-footer
 702.268 +{
 702.269 +    font-size: 80%;
 702.270 +    text-align: center;
 702.271 +}
 702.272 +
 702.273 +#svn-footer hr
 702.274 +{
 702.275 +    display: none;
 702.276 +}
 702.277 +
 702.278 +/* --------------------- */
 702.279 +/* PRINT MEDIA OVERRIDES */
 702.280 +/* --------------------- */
 702.281 +
 702.282 +@media print
 702.283 +{
 702.284 +    body 
 702.285 +    {
 702.286 +        margin: 0;
 702.287 +    }
 702.288 +
 702.289 +    .navheader, .navfooter
 702.290 +    {
 702.291 +        display: none;
 702.292 +    }
 702.293 +
 702.294 +    #svn-footer hr
 702.295 +    {
 702.296 +        display: block;
 702.297 +    }
 702.298 +}
   703.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   703.2 +++ b/stylesheets/html-single.xsl	Sun Aug 16 03:41:39 2009 +0200
   703.3 @@ -0,0 +1,32 @@
   703.4 +<?xml version="1.0"?>
   703.5 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
   703.6 +
   703.7 +  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
   703.8 +
   703.9 +  <xsl:param name="draft.mode" select="no"/>
  703.10 +
  703.11 +  <!-- xsltproc can't support these extensions
  703.12 +  <xsl:param name="use.extensions">1</xsl:param>
  703.13 +  <xsl:param name="callouts.extension">1</xsl:param>
  703.14 +  <xsl:param name="linenumbering.extension">1</xsl:param>
  703.15 +  <xsl:param name="tablecolumns.extension">1</xsl:param>
  703.16 +  <xsl:param name="textinsert.extension">1</xsl:param>
  703.17 +  -->
  703.18 +
  703.19 +  <xsl:param name="admon.graphics" select="1" />
  703.20 +  <xsl:param name="admon.graphics.extension">.png</xsl:param>
  703.21 +  <xsl:param name="admon.graphics.path">figs/</xsl:param>
  703.22 +  <xsl:param name="callout.graphics" select="1" />
  703.23 +  <xsl:param name="callout.graphics.extension">.png</xsl:param>
  703.24 +  <xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
  703.25 +
  703.26 +  <xsl:param name="section.autolabel" select="1" />
  703.27 +  <xsl:param name="section.label.includes.component.label">1</xsl:param>
  703.28 +
  703.29 +  <xsl:output method="html" encoding="utf-8" indent="yes"/>     <!-- html only -->
  703.30 +  <xsl:param name="use.id.as.filename">0</xsl:param>            <!-- html only -->
  703.31 +  <xsl:param name="chunk.section.depth">0</xsl:param>           <!-- html only -->
  703.32 +  <xsl:param name="chunker.output.indent">yes</xsl:param>       <!-- html only -->
  703.33 +  <xsl:param name="html.stylesheet">hgbook.css</xsl:param>      <!-- html only -->
  703.34 +
  703.35 +</xsl:stylesheet>
   704.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   704.2 +++ b/stylesheets/html.xsl	Sun Aug 16 03:41:39 2009 +0200
   704.3 @@ -0,0 +1,34 @@
   704.4 +<?xml version="1.0"?>
   704.5 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
   704.6 +
   704.7 +  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
   704.8 +
   704.9 +  <xsl:param name="draft.mode" select="no"/>
  704.10 +
  704.11 +  <!-- xsltproc can't support these extensions
  704.12 +  <xsl:param name="use.extensions">1</xsl:param>
  704.13 +  <xsl:param name="callouts.extension">1</xsl:param>
  704.14 +  <xsl:param name="linenumbering.extension">1</xsl:param>
  704.15 +  <xsl:param name="tablecolumns.extension">1</xsl:param>
  704.16 +  <xsl:param name="textinsert.extension">1</xsl:param>
  704.17 +  -->
  704.18 +
  704.19 +  <xsl:param name="admon.graphics" select="1" />
  704.20 +  <xsl:param name="admon.graphics.extension">.png</xsl:param>
  704.21 +  <xsl:param name="admon.graphics.path">figs/</xsl:param>
  704.22 +  <xsl:param name="callout.graphics" select="1" />
  704.23 +  <xsl:param name="callout.graphics.extension">.png</xsl:param>
  704.24 +  <xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
  704.25 +
  704.26 +  <xsl:param name="section.autolabel" select="1" />
  704.27 +  <xsl:param name="section.label.includes.component.label">1</xsl:param>
  704.28 +
  704.29 +  <xsl:output method="html" encoding="utf-8" indent="yes"/>     <!-- html only -->
  704.30 +  <xsl:param name="chunker.output.encoding" select="'utf-8'"/>  <!-- html only -->
  704.31 +  <xsl:param name="chunker.output.indent" select="'yes'"/>      <!-- html only -->
  704.32 +  <xsl:param name="use.id.as.filename">0</xsl:param>            <!-- html only -->
  704.33 +  <xsl:param name="chunk.section.depth">0</xsl:param>           <!-- html only -->
  704.34 +  <xsl:param name="chunker.output.indent">yes</xsl:param>       <!-- html only -->
  704.35 +  <xsl:param name="html.stylesheet">hgbook.css</xsl:param>      <!-- html only -->
  704.36 +
  704.37 +</xsl:stylesheet>
   705.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   705.2 +++ b/stylesheets/zh/fo.xsl	Sun Aug 16 03:41:39 2009 +0200
   705.3 @@ -0,0 +1,30 @@
   705.4 +<?xml version="1.0"?>
   705.5 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   705.6 +                xmlns:fo="http://www.w3.org/1999/XSL/Format"
   705.7 +                version='1.0'>
   705.8 +
   705.9 +  <xsl:import href="../fo.xsl"/>
  705.10 +
  705.11 +  <xsl:param name="l10n.gentext.language" select="'zh'"/>
  705.12 +
  705.13 +  <!-- Chinese font related settings -->
  705.14 +  <xsl:param name="body.font.master">12</xsl:param>
  705.15 +
  705.16 +  <xsl:attribute-set name="standard.para.spacing" use-attribute-sets="normal.para.spacing">
  705.17 +    <xsl:attribute name="text-indent">24pt</xsl:attribute>
  705.18 +  </xsl:attribute-set>
  705.19 +
  705.20 +  <xsl:template match="abstract/para|appendix/para|chapter/para|colophon/para|legalnotice/para|preface/para|section/para|sect1/para|sect2/para">
  705.21 +    <fo:block xsl:use-attribute-sets="standard.para.spacing">
  705.22 +      <xsl:call-template name="anchor"/>
  705.23 +      <xsl:apply-templates/>
  705.24 +    </fo:block>
  705.25 +  </xsl:template>
  705.26 +
  705.27 +  <xsl:template match="section/para/*">
  705.28 +    <fo:wrapper text-indent="0pt">
  705.29 +      <xsl:apply-imports/>
  705.30 +    </fo:wrapper>
  705.31 +  </xsl:template>
  705.32 +
  705.33 +</xsl:stylesheet>
   706.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   706.2 +++ b/stylesheets/zh/html-single.xsl	Sun Aug 16 03:41:39 2009 +0200
   706.3 @@ -0,0 +1,8 @@
   706.4 +<?xml version="1.0"?>
   706.5 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
   706.6 +
   706.7 +  <xsl:import href="../html-single.xsl"/>
   706.8 +
   706.9 +  <xsl:param name="l10n.gentext.language" select="'zh'"/>
  706.10 +
  706.11 +</xsl:stylesheet>
   707.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   707.2 +++ b/stylesheets/zh/html.xsl	Sun Aug 16 03:41:39 2009 +0200
   707.3 @@ -0,0 +1,8 @@
   707.4 +<?xml version="1.0"?>
   707.5 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
   707.6 +
   707.7 +  <xsl:import href="../html.xsl"/>
   707.8 +
   707.9 +  <xsl:param name="l10n.gentext.language" select="'zh'"/>
  707.10 +
  707.11 +</xsl:stylesheet>
   708.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   708.2 +++ b/web/README	Sun Aug 16 03:41:39 2009 +0200
   708.3 @@ -0,0 +1,5 @@
   708.4 +This directory contains web-related files.  Surprise!
   708.5 +
   708.6 +javascript - files used by the comment system, based on jQuery
   708.7 +hgbook     - Django app that acts as the comment back end
   708.8 +styles.css - style file
   709.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   709.2 +++ b/web/genindex.py	Sun Aug 16 03:41:39 2009 +0200
   709.3 @@ -0,0 +1,61 @@
   709.4 +#!/usr/bin/env python
   709.5 +
   709.6 +import glob, os, re
   709.7 +
   709.8 +chapter_re = re.compile(r'<(chapter|appendix|preface)\s+id="([^"]+)">')
   709.9 +filename_re = re.compile(r'<\?dbhtml filename="([^"]+)"\?>')
  709.10 +title_re = re.compile(r'<title>(.*)</title>')
  709.11 +
  709.12 +chapters = (sorted(glob.glob('../en/ch*.xml')) +
  709.13 +            sorted(glob.glob('../en/app*.xml')))
  709.14 +
  709.15 +fp = open('index-read.html.in', 'w')
  709.16 +
  709.17 +print >> fp, '''<!-- -*- html -*- -->
  709.18 +{% extends "boilerplate.html" %}
  709.19 +{% block bodycontent %}
  709.20 +<div class="navheader"><h1 class="booktitle">Mercurial: The Definitive Guide<div class="authors">by Bryan O'Sullivan</div></h1></div>
  709.21 +<div class="book"><ul class="booktoc">'''
  709.22 +
  709.23 +ch = 0
  709.24 +app = 0
  709.25 +ab = 0
  709.26 +for c in chapters:
  709.27 +    filename = None
  709.28 +    title = None
  709.29 +    chapid = None
  709.30 +    chaptype = None
  709.31 +    for line in open(c):
  709.32 +        m = chapter_re.search(line)
  709.33 +        if m:
  709.34 +            chaptype, chapid = m.groups()
  709.35 +        m = filename_re.search(line)
  709.36 +        if m:
  709.37 +            filename = m.group(1)
  709.38 +        m = title_re.search(line)
  709.39 +        if m:
  709.40 +            title = m.group(1)
  709.41 +        if filename and title and chapid:
  709.42 +            if chaptype == 'appendix':
  709.43 +                num = chr(ord('A') + app)
  709.44 +                app += 1
  709.45 +            else:
  709.46 +                num = ch
  709.47 +                ch += 1
  709.48 +            ab += 1
  709.49 +            date = os.popen('hg log -l1 --template "{date|isodate}" ' + c).read().split(None, 1)[0]
  709.50 +            args = {
  709.51 +                'ab': "ab"[ab % 2],
  709.52 +                'date': date,
  709.53 +                'chapid': chapid,
  709.54 +                'num': num,
  709.55 +                'filename': filename,
  709.56 +                'title': title,
  709.57 +                }
  709.58 +            print >> fp, '<li class="zebra_%(ab)s"><span class="chapinfo">%(date)s<a href="/feeds/comments/%(chapid)s/"><img src="/support/figs/rss.png"/></a></span>%(num)s. <a href="%(filename)s">%(title)s</a></li>' % args
  709.59 +            break
  709.60 +
  709.61 +print >> fp, '''</ul></div>
  709.62 +{% endblock %}'''
  709.63 +
  709.64 +fp.close()
   710.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   710.2 +++ b/web/hgbook.conf	Sun Aug 16 03:41:39 2009 +0200
   710.3 @@ -0,0 +1,101 @@
   710.4 +# -*- apache -*-
   710.5 +
   710.6 +<VirtualHost *:80>
   710.7 +    ServerName hgbook.red-bean.com
   710.8 +    ServerAdmin bos@serpentine.com
   710.9 +    ErrorLog logs/hgbook-error_log
  710.10 +    # Debian:
  710.11 +    # CustomLog logs/hgbook-access_log full
  710.12 +    # Fedora:
  710.13 +    CustomLog logs/hgbook-access_log combined
  710.14 +    Options +MultiViews
  710.15 +    DirectoryIndex index.html.var index.html
  710.16 +    DocumentRoot "/home/bos/hg/hgbook/en/html"
  710.17 +
  710.18 +    Redirect permanent /hgbook.html /index.html
  710.19 +    Redirect permanent /hgbookch1.html /read/preface.html
  710.20 +    Redirect permanent /hgbookch2.html /read/a-tour-of-mercurial-the-basics.html
  710.21 +    Redirect permanent /hgbookch3.html /read/a-tour-of-mercurial-merging-work.html
  710.22 +    Redirect permanent /hgbookch4.html /read/behind-the-scenes.html
  710.23 +    Redirect permanent /hgbookch5.html /read/mercurial-in-daily-use.html
  710.24 +    Redirect permanent /hgbookch6.html /read/file-names-and-pattern-matching.html
  710.25 +    Redirect permanent /hgbookch6.html /read/managing-releases-and-branchy-development.html
  710.26 +    Redirect permanent /hgbookch7.html /read/finding-and-fixing-mistakes.html
  710.27 +    Redirect permanent /hgbookch8.html /read/handling-repository-events-with-hooks.html
  710.28 +    Redirect permanent /hgbookch9.html /read/customizing-the-output-of-mercurial.html
  710.29 +    Redirect permanent /hgbookch10.html /read/managing-change-with-mercurial-queues.html
  710.30 +    Redirect permanent /hgbookch11.html /read/advanced-uses-of-mercurial-queues.html
  710.31 +    Redirect permanent /hgbookch12.html /read/adding-functionality-with-extensions.html
  710.32 +    Redirect permanent /hgbookap1.html /read/command-reference.html
  710.33 +    Redirect permanent /hgbookap2.html /read/mercurial-queues-reference.html
  710.34 +    Redirect permanent /hgbookap3.html /read/installing-mercurial-from-source.html
  710.35 +    Redirect permanent /hgbookap4.html /read/open-publication-license.html
  710.36 +    Redirect permanent /hgbookli1.html /read/index.html
  710.37 +    Redirect permanent /hgbookli2.html /read/index.html
  710.38 +    Redirect permanent /hgbookli3.html /read/index.html
  710.39 +    Redirect permanent /hgbookli4.html /read/index.html
  710.40 +
  710.41 +    # Actively redirect requests via a ServerAlias to the canonical hostname.
  710.42 +    RewriteEngine On
  710.43 +    RewriteCond %{HTTP_HOST} !=hgbook.red-bean.com
  710.44 +    RewriteRule ^(.*) http://hgbook.red-bean.com$1 [R]
  710.45 +
  710.46 +    <Location "/">
  710.47 +        SetHandler python-program
  710.48 +	# hg clone http://bitbucket.org/mirror/django-trunk/
  710.49 +        PythonPath "['/home/bos/hg/django-trunk', '/home/bos/hg/hgbook/web'] + sys.path"
  710.50 +        PythonHandler django.core.handlers.modpython
  710.51 +        PythonAutoReload Off
  710.52 +        SetEnv DJANGO_SETTINGS_MODULE hgbook.settings
  710.53 +        PythonDebug Off
  710.54 +    </Location>
  710.55 +
  710.56 +    <Location ~ "^/$">
  710.57 +        SetHandler None
  710.58 +        DirectoryIndex index.html
  710.59 +    </Location>
  710.60 +
  710.61 +    <Location ~ "^/index.html">
  710.62 +        SetHandler None
  710.63 +    </Location>
  710.64 +
  710.65 +    <Location ~ "^/robots.txt">
  710.66 +        SetHandler None
  710.67 +    </Location>
  710.68 +
  710.69 +    <Location "/read">
  710.70 +        SetHandler None
  710.71 +    </Location>
  710.72 +
  710.73 +    <Location "/support">
  710.74 +        SetHandler None
  710.75 +    </Location>
  710.76 +
  710.77 +    <Location "/media">
  710.78 +        SetHandler None
  710.79 +    </Location>
  710.80 +
  710.81 +    Alias /media /home/bos/hg/django-trunk/django/contrib/admin/media
  710.82 +
  710.83 +    <Directory "/home/bos/hg/hgbook/en/html">
  710.84 +        Options Indexes FollowSymlinks
  710.85 +        AllowOverride None
  710.86 +        Order allow,deny
  710.87 +        Allow from all
  710.88 +    </Directory>
  710.89 +
  710.90 +    <Directory "/home/bos/hg/hgbook/en/html">
  710.91 +        AllowOverride AuthConfig
  710.92 +    </Directory>
  710.93 +
  710.94 +    <Directory "/home/bos/hg/hgbook/en/html/support">
  710.95 +        Options None
  710.96 +    </Directory>
  710.97 +</VirtualHost>
  710.98 +
  710.99 +<Directory "/home/bos/hg/django-trunk/django/contrib/admin/media">
 710.100 +    Options None
 710.101 +    AllowOverride None
 710.102 +    Order allow,deny
 710.103 +    Allow from all
 710.104 +</Directory>
   711.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   711.2 +++ b/web/hgbook/admin.py	Sun Aug 16 03:41:39 2009 +0200
   711.3 @@ -0,0 +1,23 @@
   711.4 +from django.contrib import admin
   711.5 +from hgbook.comments.models import Comment, Element
   711.6 +
   711.7 +class CommentAdmin(admin.ModelAdmin):
   711.8 +    list_display = ['element', 'submitter_name', 'comment', 'reviewed',
   711.9 +                    'hidden', 'date']
  711.10 +    search_fields = ['comment']
  711.11 +    date_hierarchy = 'date'
  711.12 +    list_filter = ['date', 'submitter_name']
  711.13 +    search_fields = ['title', 'submitter_name', 'submitter_url']
  711.14 +    fields = (
  711.15 +        (None, {'fields': ('submitter_name', 'element', 'comment')}),
  711.16 +        ('Review and presentation state',
  711.17 +         {'fields': ('reviewed', 'hidden')}),
  711.18 +        ('Other info', {'fields': ('date', 'submitter_url', 'ip')}),
  711.19 +        )
  711.20 +
  711.21 +class ElementAdmin(admin.ModelAdmin):
  711.22 +    search_fields = ['id', 'chapter']
  711.23 +    list_filter = ['chapter', 'title']
  711.24 +
  711.25 +admin.site.register(Comment, CommentAdmin)
  711.26 +admin.site.register(Element, ElementAdmin)
   712.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   712.2 +++ b/web/hgbook/comments/feeds.py	Sun Aug 16 03:41:39 2009 +0200
   712.3 @@ -0,0 +1,35 @@
   712.4 +from django.core.exceptions import ObjectDoesNotExist
   712.5 +from django.utils.feedgenerator import Atom1Feed
   712.6 +from django.contrib.syndication.feeds import Feed
   712.7 +from hgbook.comments.models import Comment, Element
   712.8 +
   712.9 +class MyAtomFeed(Atom1Feed):
  712.10 +    title_type = u'html'
  712.11 +    
  712.12 +class Comments(Feed):
  712.13 +    feed_type = MyAtomFeed
  712.14 +    title = 'Mercurial - The Definitive Guide: recent comments'
  712.15 +    subtitle = ('Recent comments on the text of &#8220;Mercurial: The '
  712.16 +                'Definitive Guide&#8221;, from our readers')
  712.17 +    link = '/feeds/comments/'
  712.18 +    author_name = 'Our readers'
  712.19 +
  712.20 +    def feedfilter(self, queryset):
  712.21 +        return queryset.order_by('-date')[:20]
  712.22 +
  712.23 +    def items(self):
  712.24 +        return self.feedfilter(Comment.objects)
  712.25 +
  712.26 +    def item_author_name(self, obj):
  712.27 +        return obj.submitter_name
  712.28 +
  712.29 +    def item_pubdate(self, obj):
  712.30 +        return obj.date
  712.31 +
  712.32 +    def get_object(self, bits):
  712.33 +        if len(bits) == 0:
  712.34 +            return self.items()
  712.35 +        elif len(bits) > 1:
  712.36 +            raise ObjectDoesNotExist
  712.37 +        return self.feedfilter(Comment.objects.filter(element__chapter=bits[0],
  712.38 +                                                      hidden=False))
   713.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   713.2 +++ b/web/hgbook/comments/models.py	Sun Aug 16 03:41:39 2009 +0200
   713.3 @@ -0,0 +1,44 @@
   713.4 +from django.db import models
   713.5 +import sha
   713.6 +
   713.7 +mutable = True
   713.8 +
   713.9 +class Element(models.Model):
  713.10 +    id = models.CharField('ID attribute', max_length=64, editable=False,
  713.11 +                          primary_key=True)
  713.12 +    chapter = models.CharField('Chapter ID', max_length=64, editable=False,
  713.13 +                               db_index=True)
  713.14 +    title = models.CharField('Section title', max_length=256, editable=False)
  713.15 +
  713.16 +    def __unicode__(self):
  713.17 +        return self.id
  713.18 +    
  713.19 +class Comment(models.Model):
  713.20 +    element = models.ForeignKey(Element,
  713.21 +        help_text='ID of paragraph that was commented on')
  713.22 +    comment = models.TextField(editable=mutable,
  713.23 +        help_text='Text of submitted comment (please do not modify)')
  713.24 +    submitter_name = models.CharField('Submitter', max_length=64,
  713.25 +        help_text='Self-reported name of submitter (may be bogus)')
  713.26 +    submitter_url = models.URLField('URL', blank=True, editable=mutable,
  713.27 +        help_text='Self-reported URL of submitter (may be empty or bogus)')
  713.28 +    ip = models.IPAddressField('IP address', editable=mutable,
  713.29 +        help_text='IP address from which comment was submitted')
  713.30 +    date = models.DateTimeField('date submitted', auto_now=True,
  713.31 +                                auto_now_add=True)
  713.32 +    reviewed = models.BooleanField(default=False, db_index=True,
  713.33 +        help_text='Has this comment been reviewed by an author?')
  713.34 +    hidden = models.BooleanField(default=False, db_index=True,
  713.35 +        help_text='Has this comment been hidden from public display?')
  713.36 +
  713.37 +    def __unicode__(self):
  713.38 +        return self.comment[:32]
  713.39 +
  713.40 +    def get_absolute_url(self):
  713.41 +        s = sha.new()
  713.42 +        s.update(repr(self.comment))
  713.43 +        s.update(repr(self.submitter_name))
  713.44 +        s.update(str(self.date))
  713.45 +        return '/read/%s.html#%s?comment=%s&uuid=%s' % (
  713.46 +            self.element.chapter, self.element.id, self.id, s.hexdigest()[:20]
  713.47 +            )
   714.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   714.2 +++ b/web/hgbook/comments/sql/comment.mysql.sql	Sun Aug 16 03:41:39 2009 +0200
   714.3 @@ -0,0 +1,2 @@
   714.4 +alter table comments_comment convert to character set utf8 collate utf8_bin;
   714.5 +alter table comments_comment default character set utf8 collate utf8_bin;
   715.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   715.2 +++ b/web/hgbook/comments/sql/element.mysql.sql	Sun Aug 16 03:41:39 2009 +0200
   715.3 @@ -0,0 +1,2 @@
   715.4 +alter table comments_element convert to character set utf8 collate utf8_bin;
   715.5 +alter table comments_element default character set utf8 collate utf8_bin;
   716.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   716.2 +++ b/web/hgbook/comments/urls.py	Sun Aug 16 03:41:39 2009 +0200
   716.3 @@ -0,0 +1,8 @@
   716.4 +from django.conf.urls.defaults import *
   716.5 +
   716.6 +urlpatterns = patterns('',
   716.7 +    (r'chapter/(?P<id>[^/]+)/?$', 'hgbook.comments.views.chapter'),
   716.8 +    (r'chapter/(?P<id>[^/]+)/count/?$', 'hgbook.comments.views.chapter_count'),
   716.9 +    (r'single/(?P<id>[^/]+)/?$', 'hgbook.comments.views.single'),
  716.10 +    (r'submit/(?P<id>[^/]+)/?$', 'hgbook.comments.views.submit')
  716.11 +)
   717.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   717.2 +++ b/web/hgbook/comments/views.py	Sun Aug 16 03:41:39 2009 +0200
   717.3 @@ -0,0 +1,101 @@
   717.4 +import django.forms as forms
   717.5 +from django.db import connection
   717.6 +from django.http import HttpResponse
   717.7 +from hgbook.comments.models import Comment, Element
   717.8 +from django.shortcuts import get_object_or_404, render_to_response
   717.9 +from django.template import Context
  717.10 +from django.template.loader import get_template
  717.11 +from django.utils.simplejson import dumps 
  717.12 +
  717.13 +def dump_queries():
  717.14 +    # requires settings.DEBUG to be set to True in order to work
  717.15 +    if len(connection.queries) == 1:
  717.16 +        print connection.queries
  717.17 +    else:
  717.18 +        qs = {}
  717.19 +        for q in connection.queries:
  717.20 +            qs[q['sql']] = qs.setdefault(q['sql'], 0) + 1
  717.21 +        for q in sorted(qs.items(), key=lambda x: x[1], reverse=True):
  717.22 +            print q
  717.23 +        print len(connection.queries)
  717.24 +
  717.25 +class CommentForm(forms.Form):
  717.26 +    id = forms.CharField(widget=forms.HiddenInput)
  717.27 +    name = forms.CharField(max_length=64)
  717.28 +    url = forms.URLField(max_length=128, required=False)
  717.29 +    comment = forms.CharField(widget=forms.Textarea(attrs={
  717.30 +        'rows': 8, 'cols': 60
  717.31 +        }))
  717.32 +    remember = forms.BooleanField(initial=True, required=False)
  717.33 +
  717.34 +def comments_by_chapter(id):
  717.35 +    objs = {}
  717.36 +    for c in Comment.objects.filter(element__chapter=id, hidden=False).order_by('date'):
  717.37 +        objs.setdefault(c.element_id, []).append(c)
  717.38 +    return objs
  717.39 +
  717.40 +def chapter(request, id):
  717.41 +    template = get_template('comment.html')
  717.42 +    resp = {}
  717.43 +    for elt, comments in comments_by_chapter(id).iteritems():
  717.44 +        form = CommentForm(initial={
  717.45 +            'id': elt,
  717.46 +            'name': request.session.get('name', ''),
  717.47 +            })
  717.48 +        resp[elt] = template.render(Context({
  717.49 +            'id': elt,
  717.50 +            'form': form,
  717.51 +            'length': len(comments),
  717.52 +            'query': comments,
  717.53 +            }))
  717.54 +    return HttpResponse(dumps(resp), mimetype='application/json')
  717.55 +
  717.56 +def chapter_count(request, id):
  717.57 +    resp = comments_by_chapter(id)
  717.58 +    for elt, comments in resp.iteritems():
  717.59 +        resp[elt] = len(comments)
  717.60 +    return HttpResponse(dumps(resp), mimetype='application/json')
  717.61 +    
  717.62 +def single(request, id, form=None, newid=None):
  717.63 +    queryset = Comment.objects.filter(element=id, hidden=False).order_by('date')
  717.64 +    if form is None:
  717.65 +        form = CommentForm(initial={
  717.66 +            'id': id,
  717.67 +            'name': request.session.get('name', ''),
  717.68 +            })
  717.69 +    try:
  717.70 +        error = form.errors[0]
  717.71 +    except:
  717.72 +        error = ''
  717.73 +    return render_to_response('comment.html', {
  717.74 +        'id': id,
  717.75 +        'form': form,
  717.76 +        'length': len(queryset),
  717.77 +        'query': queryset,
  717.78 +        'newid': newid or True,
  717.79 +        'error': error,
  717.80 +        })
  717.81 +
  717.82 +def submit(request, id):
  717.83 +    element = get_object_or_404(Element, id=id)
  717.84 +    form = None
  717.85 +    newid = None
  717.86 +    if request.method == 'POST':
  717.87 +        form = CommentForm(request.POST)
  717.88 +        if form.is_valid():
  717.89 +            data = form.cleaned_data
  717.90 +            if data.get('remember'):
  717.91 +                request.session['name'] = data['name']
  717.92 +                request.session['url'] = data['url']
  717.93 +            else:
  717.94 +                request.session.pop('name', None)
  717.95 +                request.session.pop('url', None)
  717.96 +            c = Comment(element=element,
  717.97 +                        comment=data['comment'],
  717.98 +                        submitter_name=data['name'],
  717.99 +                        submitter_url=data['url'],
 717.100 +                        ip=request.META.get('REMOTE_ADDR'))
 717.101 +            c.save()
 717.102 +            newid = c.id
 717.103 +            form = None
 717.104 +    return single(request, id, form, newid)
   718.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   718.2 +++ b/web/hgbook/dbutil.py	Sun Aug 16 03:41:39 2009 +0200
   718.3 @@ -0,0 +1,32 @@
   718.4 +import MySQLdb as mysql
   718.5 +import sys
   718.6 +
   718.7 +def connect():
   718.8 +    try:
   718.9 +        import secrets
  718.10 +    except ImportError:
  718.11 +        print >> sys.stderr, 'Decrypt secrets.py.gpg or create a new copy!'
  718.12 +        sys.exit(1)
  718.13 +
  718.14 +    if secrets.DATABASE_ENGINE != 'mysql':
  718.15 +        print >> sys.stderr, ('You are using a %s database' %
  718.16 +                              secrets.DATABASE_ENGINE)
  718.17 +        sys.exit(1)
  718.18 +
  718.19 +    kwargs = {
  718.20 +        'charset': 'utf8',
  718.21 +        'use_unicode': True,
  718.22 +        }
  718.23 +    if secrets.DATABASE_USER:
  718.24 +        kwargs['user'] = secrets.DATABASE_USER
  718.25 +    if secrets.DATABASE_NAME:
  718.26 +        kwargs['db'] = secrets.DATABASE_NAME
  718.27 +    if secrets.DATABASE_PASSWORD:
  718.28 +        kwargs['passwd'] = secrets.DATABASE_PASSWORD
  718.29 +    if secrets.DATABASE_HOST.startswith('/'):
  718.30 +        kwargs['unix_socket'] = secrets.DATABASE_HOST
  718.31 +    elif secrets.DATABASE_HOST:
  718.32 +        kwargs['host'] = secrets.DATABASE_HOST
  718.33 +    if secrets.DATABASE_PORT:
  718.34 +        kwargs['port'] = int(secrets.DATABASE_PORT)
  718.35 +    return mysql.connect(**kwargs)
   719.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   719.2 +++ b/web/hgbook/load_elements.py	Sun Aug 16 03:41:39 2009 +0200
   719.3 @@ -0,0 +1,18 @@
   719.4 +#!/usr/bin/env python
   719.5 +#
   719.6 +# This script updates the contents of the comments_element table.
   719.7 +# It's fugly, but a lot less painful than trying to use Django's
   719.8 +# fixtures system.
   719.9 +
  719.10 +import os, sys
  719.11 +sys.path.append(os.path.dirname(__file__))
  719.12 +import dbutil
  719.13 +
  719.14 +os.system('make -C ../../en all-ids.dat')
  719.15 +
  719.16 +conn = dbutil.connect()
  719.17 +c = conn.cursor()
  719.18 +c.execute('''load data local infile "../../en/all-ids.dat" replace
  719.19 +             into table comments_element
  719.20 +             fields terminated by "|"''')
  719.21 +print 'Database updated'
   720.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   720.2 +++ b/web/hgbook/manage.py	Sun Aug 16 03:41:39 2009 +0200
   720.3 @@ -0,0 +1,11 @@
   720.4 +#!/usr/bin/env python
   720.5 +from django.core.management import execute_manager
   720.6 +try:
   720.7 +    import settings # Assumed to be in the same directory.
   720.8 +except ImportError:
   720.9 +    import sys
  720.10 +    sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
  720.11 +    sys.exit(1)
  720.12 +
  720.13 +if __name__ == "__main__":
  720.14 +    execute_manager(settings)
   721.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   721.2 +++ b/web/hgbook/reviewers.py	Sun Aug 16 03:41:39 2009 +0200
   721.3 @@ -0,0 +1,81 @@
   721.4 +#!/usr/bin/env python
   721.5 +# -*- coding: utf-8 -*-
   721.6 +
   721.7 +import os, sys
   721.8 +sys.path.append(os.path.dirname(__file__))
   721.9 +import dbutil
  721.10 +
  721.11 +conn = dbutil.connect()
  721.12 +c = conn.cursor()
  721.13 +
  721.14 +c.execute('''select submitter_name from comments_comment''')
  721.15 +
  721.16 +reviewers = {}
  721.17 +
  721.18 +mappings = {
  721.19 +    u'alejandro "tab-lover" dubrovsky': u'Alejandro Dubrovsky',
  721.20 +    u'alex hirzel <ahirzel@mtu.edu>': u'Alex Hirzel',
  721.21 +    u'anonymous coward': u'Anonymous',
  721.22 +    u'arthur van leeuwen': u'Arthur van Leeuwen',
  721.23 +    u'augustss': u'Lennart Augustsson',
  721.24 +    u'ed t': u'Anonymous',
  721.25 +    u'geogre moschovitis': u'George Moschovitis',
  721.26 +    u'george m': u'George Moschovitis',
  721.27 +    u'haskell newb': u'Anonymous',
  721.28 +    u'j. pablo fernandez': u'J. Pablo Fernández',
  721.29 +    u'kamal al-marhoobi': u'Kamal Al-Marhubi',
  721.30 +    u'kevin w.': u'Kevin Watters',
  721.31 +    u'max cantor (#haskell - mxc)': u'Max Cantor',
  721.32 +    u'michael campbell': u'Michael Campbell',
  721.33 +    u'mike btauwerman': u'Mike Brauwerman',
  721.34 +    u'no credit necessary': u'Anonymous',
  721.35 +    u'nykänen, matti': u'Matti Nykänen',
  721.36 +    u'omar antolin camarena': u'Omar Antolín Camarena',
  721.37 +    u'ryan t mulligan': u'Ryan T. Mulligan',
  721.38 +    u'sengan baring-gould': u'Sengan Baring-Gould',
  721.39 +    u'some guy': u'Anonymous',
  721.40 +    u'tomas janousek': u'Tomáš Janoušek',
  721.41 +    u'william halchin': u'William N. Halchin',
  721.42 +    }
  721.43 +
  721.44 +def fixup(s):
  721.45 +    try:
  721.46 +        return s.encode('ascii')
  721.47 +    except UnicodeEncodeError:
  721.48 +        def f(c):
  721.49 +            o = ord(c)
  721.50 +            if o < 128:
  721.51 +                return c
  721.52 +            return '&#%d;' % o
  721.53 +        return ''.join(map(f, s))
  721.54 +
  721.55 +total = 0
  721.56 +for r in c.fetchall():
  721.57 +    r = r[0].decode('utf-8')
  721.58 +    if r in ("Bryan O'Sullivan",):
  721.59 +        continue
  721.60 +    total += 1
  721.61 +    m = mappings.get(r.lower())
  721.62 +    if m:
  721.63 +        r = m
  721.64 +    elif len(r) < 2 or ' ' not in r:
  721.65 +        r = 'Anonymous'
  721.66 +    reviewers.setdefault(r, 0)
  721.67 +    reviewers[r] += 1
  721.68 +
  721.69 +reviewers = sorted(reviewers.iteritems(), key=lambda x: x[0])
  721.70 +
  721.71 +cohorts = [(.01,1),(.002,.01)]
  721.72 +
  721.73 +for (lo,hi) in cohorts:
  721.74 +    lo = total * lo
  721.75 +    hi = total * hi
  721.76 +    for r in [n for n in reviewers if lo <= n[1] < hi]:
  721.77 +        if r[1] > 3:
  721.78 +            print '%s,' % fixup(r[0])
  721.79 +    print
  721.80 +
  721.81 +lo = total * .002
  721.82 +for n in reviewers:
  721.83 +    if n[1] < lo:
  721.84 +        print '%s,' % fixup(n[0])
   722.1 Binary file web/hgbook/secrets.py.gpg has changed
   723.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   723.2 +++ b/web/hgbook/settings.py	Sun Aug 16 03:41:39 2009 +0200
   723.3 @@ -0,0 +1,87 @@
   723.4 +# Django settings for hgbook project.
   723.5 +
   723.6 +import os, sys
   723.7 +
   723.8 +DEBUG = False
   723.9 +TEMPLATE_DEBUG = DEBUG
  723.10 +
  723.11 +ADMINS = (
  723.12 +    ("Bryan O'Sullivan", 'bos@serpentine.com'),
  723.13 +)
  723.14 +
  723.15 +MANAGERS = ADMINS
  723.16 +
  723.17 +ROOT = os.path.dirname(sys.modules[__name__].__file__)
  723.18 +
  723.19 +try:
  723.20 +    from secrets import DATABASE_ENGINE, DATABASE_NAME, DATABASE_USER, \
  723.21 +         DATABASE_PASSWORD, DATABASE_HOST, DATABASE_PORT, SECRET_KEY
  723.22 +except ImportError:
  723.23 +    print >> sys.stderr, 'Faking up some database configuration for you'
  723.24 +    DATABASE_ENGINE = 'sqlite3'
  723.25 +    DATABASE_NAME = os.path.join(ROOT, '.database.sqlite3')
  723.26 +    DATABASE_USER = ''
  723.27 +    DATABASE_PASSWORD = ''
  723.28 +    DATABASE_HOST = ''
  723.29 +    DATABASE_PORT = ''
  723.30 +    SECRET_KEY = ''
  723.31 +
  723.32 +# Local time zone for this installation. Choices can be found here:
  723.33 +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  723.34 +# although not all choices may be avilable on all operating systems.
  723.35 +# If running in a Windows environment this must be set to the same as your
  723.36 +# system time zone.
  723.37 +TIME_ZONE = 'America/Los_Angeles'
  723.38 +
  723.39 +# Language code for this installation. All choices can be found here:
  723.40 +# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
  723.41 +LANGUAGE_CODE = 'en-us'
  723.42 +
  723.43 +SITE_ID = 1
  723.44 +
  723.45 +# If you set this to False, Django will make some optimizations so as not
  723.46 +# to load the internationalization machinery.
  723.47 +USE_I18N = True
  723.48 +
  723.49 +# Absolute path to the directory that holds media.
  723.50 +# Example: "/home/media/media.lawrence.com/"
  723.51 +MEDIA_ROOT = ''
  723.52 +
  723.53 +# URL that handles the media served from MEDIA_ROOT. Make sure to use a
  723.54 +# trailing slash if there is a path component (optional in other cases).
  723.55 +# Examples: "http://media.lawrence.com", "http://example.com/media/"
  723.56 +MEDIA_URL = ''
  723.57 +
  723.58 +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
  723.59 +# trailing slash.
  723.60 +# Examples: "http://foo.com/media/", "/media/".
  723.61 +ADMIN_MEDIA_PREFIX = '/media/'
  723.62 +
  723.63 +# List of callables that know how to import templates from various sources.
  723.64 +TEMPLATE_LOADERS = (
  723.65 +    'django.template.loaders.filesystem.load_template_source',
  723.66 +    'django.template.loaders.app_directories.load_template_source',
  723.67 +#     'django.template.loaders.eggs.load_template_source',
  723.68 +)
  723.69 +
  723.70 +MIDDLEWARE_CLASSES = (
  723.71 +    'django.middleware.common.CommonMiddleware',
  723.72 +    'django.contrib.sessions.middleware.SessionMiddleware',
  723.73 +    'django.contrib.auth.middleware.AuthenticationMiddleware',
  723.74 +    'django.middleware.doc.XViewMiddleware',
  723.75 +)
  723.76 +
  723.77 +ROOT_URLCONF = 'hgbook.urls'
  723.78 +
  723.79 +TEMPLATE_DIRS = (
  723.80 +    os.path.join(ROOT, 'templates')
  723.81 +)
  723.82 +
  723.83 +INSTALLED_APPS = (
  723.84 +    'django.contrib.admin',
  723.85 +    'django.contrib.auth',
  723.86 +    'django.contrib.contenttypes',
  723.87 +    'django.contrib.sessions',
  723.88 +    'django.contrib.sites',
  723.89 +    'hgbook.comments',
  723.90 +)
   724.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   724.2 +++ b/web/hgbook/templates/404.html	Sun Aug 16 03:41:39 2009 +0200
   724.3 @@ -0,0 +1,8 @@
   724.4 +{% extends "simple.html" %}
   724.5 +
   724.6 +{% block title %}Page Not Found{% endblock %}
   724.7 +
   724.8 +{% block body %}
   724.9 +<p>Sorry, we hit <a href="http://www.haskell.org/haskellwiki/Bottom">&perp;</a> when trying to find the
  724.10 +page you requested.</p>
  724.11 +{% endblock %}
   725.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   725.2 +++ b/web/hgbook/templates/500.html	Sun Aug 16 03:41:39 2009 +0200
   725.3 @@ -0,0 +1,11 @@
   725.4 +{% extends "simple.html" %}
   725.5 +
   725.6 +{% block title %}Internal Server Error{% endblock %}
   725.7 +
   725.8 +{% block body %}
   725.9 +<p>Sorry, we hit <a
  725.10 +href="http://www.haskell.org/haskellwiki/Bottom">&perp;</a> when
  725.11 +trying to process your request.  If possible, please let <a
  725.12 +href="mailto:bos@serpentine.com">Bryan</a> know that this problem happened,
  725.13 +and what you were doing when it occurred.</p>
  725.14 +{% endblock %}
   726.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   726.2 +++ b/web/hgbook/templates/boilerplate.html	Sun Aug 16 03:41:39 2009 +0200
   726.3 @@ -0,0 +1,37 @@
   726.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
   726.5 +<html>
   726.6 +  <head>
   726.7 +    <title>{% block pagetitle %}Mercurial: The Definitive Guide{% endblock %}</title>
   726.8 +    <link rel="stylesheet" href="/support/styles.css" type="text/css"/>
   726.9 +    <link rel="alternate" type="application/atom+xml" title="Comments"
  726.10 +      href="/feeds/comments/"/>
  726.11 +    <link rel="shortcut icon" type="image/png" href="/support/figs/favicon.png"/>
  726.12 +    <script type="text/javascript" src="/support/jquery.js"></script>
  726.13 +      <script type="text/javascript" src="/support/form.js"></script>
  726.14 +    <script type="text/javascript" src="/support/hsbook.js"></script>
  726.15 +  </head>
  726.16 +
  726.17 +  <body>
  726.18 +    {% block bodycontent %}{% endblock %}
  726.19 +
  726.20 +    <div class="hgbookfooter"> <p><img src="/support/figs/rss.png"> Want to stay
  726.21 +	up to date? Subscribe to comment feeds for any chapter, or
  726.22 +	the <a class="feed"
  726.23 +	  href="/feeds/comments/">entire book</a>.</p> <p>Copyright
  726.24 +	2006, 2007, 2008, 2009 Bryan O'Sullivan.
  726.25 +	  Icons by
  726.26 +	  <a href="mailto:mattahan@gmail.com">Paul Davey</a> aka <a
  726.27 +	  href="http://mattahan.deviantart.com/">Mattahan</a>.</p>
  726.28 +    </div>
  726.29 +
  726.30 +    <script type="text/javascript">
  726.31 +    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  726.32 +    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  726.33 +    </script>
  726.34 +    <script type="text/javascript">
  726.35 +    try {
  726.36 +    var pageTracker = _gat._getTracker("UA-1805907-5");
  726.37 +    pageTracker._trackPageview();
  726.38 +    } catch(err) {}</script>
  726.39 +  </body>
  726.40 +</html>
   727.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   727.2 +++ b/web/hgbook/templates/comment.html	Sun Aug 16 03:41:39 2009 +0200
   727.3 @@ -0,0 +1,62 @@
   727.4 +{% ifequal length 1 %}
   727.5 +  <a class="commenttoggle" id="toggle_{{ id }}"
   727.6 +      onclick="return toggleComment('{{ id }}')"
   727.7 +      href="comments: show / hide">One comment</a>
   727.8 +{% else %}
   727.9 +  {% if length %}
  727.10 +    <a class="commenttoggle" id="toggle_{{ id }}"
  727.11 +      onclick="return toggleComment('{{ id }}')"
  727.12 +      href="comments: show / hide">{{ length }} comments</a>
  727.13 +  {% else %}
  727.14 +    <a class="commenttoggle" id="toggle_{{ id }}"
  727.15 +      onclick="return toggleComment('{{ id }}')"
  727.16 +      href="comments: show / hide">No comments</a>
  727.17 +    <div class="comment" {% if not newid %} style="display: none;" {% endif %}>
  727.18 +      <div class="comment_body">Be the first to comment on this paragraph!</div>
  727.19 +    </div>
  727.20 +  {% endif %}
  727.21 +{% endifequal %}
  727.22 +{% for c in query %}
  727.23 +  <div class="{% ifequal c.id newid %}new_{% endifequal %}comment"
  727.24 +      {% if not newid %} style="display: none;" {% endif %}
  727.25 +    id="comment{{ c.id }}">
  727.26 +    <a name="comment{{ c.id }}"/>
  727.27 +    <div class="comment_header">
  727.28 +	<span class="comment_id"><a href="/admin/comments/comment/{{ c.id }}/">{{ c.id }}</a></span>
  727.29 +      {% if c.submitter_url %}
  727.30 +	<span class="comment_name"><a rel="nofollow"
  727.31 +	  href="{{ c.submitter_url }}">{{ c.submitter_name|escape }}</a></span>
  727.32 +      {% else %}
  727.33 +	<span class="comment_name">{{ c.submitter_name|escape }}</span>
  727.34 +      {% endif %}
  727.35 +      <span class="comment_date">{{ c.date|date:"Y-m-d" }}</span>
  727.36 +      {% if c.reviewed %}
  727.37 +	<span class="comment_reviewed">(reviewed)</span>
  727.38 +      {% endif %}
  727.39 +      {% ifequal c.id newid %}
  727.40 +	<span class="comment_thanks">thank you for your comment!</span>
  727.41 +      {% endifequal %}
  727.42 +    </div>
  727.43 +    <div class="comment_body">{{ c.comment|escape|linebreaks }}</div>
  727.44 +  </div>
  727.45 +{% endfor %}
  727.46 +<form class="comment" id="form_{{ id }}" action="/comments/submit/{{ id }}/"
  727.47 +    method="post" {% if not newid %} style="display: none;" {% endif %}>
  727.48 +  {{ form.id }}
  727.49 +  <table>
  727.50 +    <tbody>
  727.51 +      <tr><td align="right" valign="top">Comment<br><a class="comment_help"
  727.52 +		href="web.html#web.comment">[ help ]</a></td>
  727.53 +	  <td>{{ form.comment }}</td></tr>
  727.54 +      <tr><td align="right">Your name</td><td>{{ form.name }}
  727.55 +	    <span class="comment_help"><b>Required</b> so we can <a
  727.56 +		href="web.html#web.comment.name">give you credit</a></span></td></tr>
  727.57 +      <tr><td align="right">Your URL</td><td>{{ form.url }}
  727.58 +	    <span class="comment_help"><b>Optional</b> link to blog, home page,
  727.59 +	      <i>etc</i>.</span></td></tr>
  727.60 +      <tr><td align="right">Remember you?</td><td>{{ form.remember }}</td></tr>
  727.61 +      <tr><td/><td><input name="submit" type="submit"
  727.62 +	      value="Submit Comment"/><span class="comment_error">{{ error }}</span></td></tr>
  727.63 +    </tbody>
  727.64 +  </table>
  727.65 +</form>
   728.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   728.2 +++ b/web/hgbook/templates/feeds/comments_description.html	Sun Aug 16 03:41:39 2009 +0200
   728.3 @@ -0,0 +1,12 @@
   728.4 +<p>On {{ obj.date|date:"Y-m-d" }},
   728.5 +      {% if obj.submitter_url %}
   728.6 +	<a rel="nofollow" href="{{ obj.submitter_url }}">{{ obj.submitter_name|escape }}</a>
   728.7 +      {% else %}
   728.8 +	{{ obj.submitter_name|escape }}
   728.9 +      {% endif %}
  728.10 +commented on &#8220;{{ obj.element.title|escape }}&#8221;:</p>
  728.11 +<blockquote>
  728.12 +{{ obj.comment|escape|linebreaks }}
  728.13 +</blockquote>
  728.14 +<p>To see this comment in context or to respond, visit <a
  728.15 +	href="http://{{ site.domain }}{{ obj.get_absolute_url }}">{{ site.domain }}</a></p>
   729.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   729.2 +++ b/web/hgbook/templates/feeds/comments_title.html	Sun Aug 16 03:41:39 2009 +0200
   729.3 @@ -0,0 +1,1 @@
   729.4 +Comment on &#8220;{{ obj.element.title|escape }}&#8221;
   730.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   730.2 +++ b/web/hgbook/templates/simple.html	Sun Aug 16 03:41:39 2009 +0200
   730.3 @@ -0,0 +1,7 @@
   730.4 +{% extends "boilerplate.html" %}
   730.5 +
   730.6 +{% block bodycontent %}
   730.7 +<div class="navheader"><h1>{% block title %}{% endblock %}</h1></div>
   730.8 +
   730.9 +<div class="basetemplate">{% block body %}{% endblock %}</div>
  730.10 +{% endblock %}
   731.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   731.2 +++ b/web/hgbook/urls.py	Sun Aug 16 03:41:39 2009 +0200
   731.3 @@ -0,0 +1,25 @@
   731.4 +import os
   731.5 +from django.conf.urls.defaults import *
   731.6 +import hgbook.comments.feeds as feeds
   731.7 +from django.contrib import admin
   731.8 +
   731.9 +admin.autodiscover()
  731.10 +
  731.11 +feeds = {
  731.12 +    'comments': feeds.Comments,
  731.13 +    }
  731.14 +
  731.15 +urlpatterns = patterns('',
  731.16 +    (r'^comments/', include('hgbook.comments.urls')),
  731.17 +
  731.18 +    (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',
  731.19 +     {'feed_dict': feeds}),          
  731.20 +
  731.21 +    # Only uncomment this for local testing without Apache.
  731.22 +    # (r'^html/(?P<path>.*)$', 'django.views.static.serve',
  731.23 +    # {'document_root': os.path.realpath(os.path.dirname(
  731.24 +    #    sys.modules[__name__].__file__) + '/../../en/html'),
  731.25 +
  731.26 +    # Uncomment this for admin:
  731.27 +    (r'^admin/(.*)', admin.site.root),
  731.28 +)
   732.1 Binary file web/icons/caution.png has changed
   733.1 Binary file web/icons/favicon.png has changed
   734.1 Binary file web/icons/important.png has changed
   735.1 Binary file web/icons/note.png has changed
   736.1 Binary file web/icons/remark.png has changed
   737.1 Binary file web/icons/rss.png has changed
   738.1 Binary file web/icons/shell.png has changed
   739.1 Binary file web/icons/source.png has changed
   740.1 Binary file web/icons/tip.png has changed
   741.1 Binary file web/icons/warning.png has changed
   742.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   742.2 +++ b/web/index.html.in	Sun Aug 16 03:41:39 2009 +0200
   742.3 @@ -0,0 +1,69 @@
   742.4 +<!-- -*- html -*- -->
   742.5 +{% extends "boilerplate.html" %}
   742.6 +
   742.7 +{% block bodycontent %}
   742.8 +<div class="navheader"><h1 class="booktitle">Mercurial: The Definitive Guide<div class="authors">by Bryan O'Sullivan</div></h1></div>
   742.9 +
  742.10 +<div class="book">
  742.11 +  <h2>Welcome to Mercurial: The Definitive Guide</h2>
  742.12 +
  742.13 +  <p>This is the online home of the book &#8220;Mercurial: The
  742.14 +    Definitive Guide&#8221;.  
  742.15 +    It will be published in 2009 by O'Reilly Media.</p>
  742.16 +
  742.17 +  <p>I make the content <a href="/read/">freely available
  742.18 +      online</a>.  If you like it, please make a note to buy a copy!</p>
  742.19 +
  742.20 +  <p>For news updates, please
  742.21 +    visit <a href="http://www.serpentine.com/blog/">my blog</a>.</p>
  742.22 +
  742.23 +  <h2>You can contribute!</h2>
  742.24 +
  742.25 +  <p>I publish the source code for this book
  742.26 +    as <a href="http://hg.serpentine.com/mercurial/book">a
  742.27 +      Mercurial repository</a>.  Please feel
  742.28 +    welcome to clone it, make modifications to your copy, and send me
  742.29 +    changes.  Getting a copy of the source takes just a few seconds if
  742.30 +    you have Mercurial installed:</p>
  742.31 +
  742.32 +  <pre class="screen">hg clone http://hg.serpentine.com/mercurial/book</pre>
  742.33 +
  742.34 +  <p>The online version of the book includes a comment system
  742.35 +    that you can use to send feedback involving errors, omissions, and
  742.36 +    suggestions.</p>
  742.37 +
  742.38 +  <p>(If you would like to adapt the comment system for a
  742.39 +    publishing project of your own, the source for the web application
  742.40 +    is included with the book source at the link above.)</p>
  742.41 +
  742.42 +  <h2>What is Mercurial?</h2>
  742.43 +
  742.44 +  <p><a href="http://www.selenic.com/mercurial">Mercurial</a> is a
  742.45 +    fast, lightweight source control management system
  742.46 +    designed for easy and efficient handling of very large distributed
  742.47 +    projects.</p>
  742.48 +
  742.49 +  <h2>How I help Mercurial and free software, and you can too</h2>
  742.50 +
  742.51 +  <p>Mercurial is a member of the <a href="http://conservancy.softwarefreedom.org/">Software Freedom Conservancy</a>, a
  742.52 +    wonderful non-profit organisation that offers its member projects
  742.53 +    legal and administrative advice.</p>
  742.54 +
  742.55 +  <p>I am donating my royalties from the sales of this book (once it is
  742.56 +    published) to the Software Freedom Conservancy, and I encourage
  742.57 +    you to support their work, too.</p>
  742.58 +
  742.59 +  <p>The SFC can
  742.60 +    accept <a href="http://conservancy.softwarefreedom.org/?donate">accept
  742.61 +    donations</a> (tax-free under IRS 501(c)(3), within the United
  742.62 +    States) on behalf of its member projects. If you would like to
  742.63 +    support Mercurial directly, please consider making a donation to
  742.64 +    the SFC on its behalf.</p>
  742.65 +
  742.66 +  <p>If you would like to help free software developers to provide
  742.67 +    their important public services without being impeded by legal
  742.68 +    issues, please consider donating to the SFC's sister organisation,
  742.69 +    the <a href="http://www.softwarefreedom.org/">Software Freedom Law
  742.70 +    Center</a>.</p>
  742.71 +</div>
  742.72 +{% endblock %}
   743.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   743.2 +++ b/web/javascript/form-min.js	Sun Aug 16 03:41:39 2009 +0200
   743.3 @@ -0,0 +1,1 @@
   743.4 +(function($){$.fn.ajaxSubmit=function(_2){if(typeof _2=="function"){_2={success:_2};}_2=$.extend({url:this.attr("action")||window.location,type:this.attr("method")||"GET"},_2||{});var _3={};$.event.trigger("form.pre.serialize",[this,_2,_3]);if(_3.veto){return this;}var a=this.formToArray(_2.semantic);if(_2.data){for(var n in _2.data){a.push({name:n,value:_2.data[n]});}}if(_2.beforeSubmit&&_2.beforeSubmit(a,this,_2)===false){return this;}$.event.trigger("form.submit.validate",[a,this,_2,_3]);if(_3.veto){return this;}var q=$.param(a);if(_2.type.toUpperCase()=="GET"){_2.url+=(_2.url.indexOf("?")>=0?"&":"?")+q;_2.data=null;}else{_2.data=q;}var _7=this,callbacks=[];if(_2.resetForm){callbacks.push(function(){_7.resetForm();});}if(_2.clearForm){callbacks.push(function(){_7.clearForm();});}if(!_2.dataType&&_2.target){var _8=_2.success||function(){};callbacks.push(function(_9){if(this.evalScripts){$(_2.target).attr("innerHTML",_9).evalScripts().each(_8,arguments);}else{$(_2.target).html(_9).each(_8,arguments);}});}else{if(_2.success){callbacks.push(_2.success);}}_2.success=function(_a,_b){for(var i=0,max=callbacks.length;i<max;i++){callbacks[i](_a,_b,_7);}};var _d=$("input:file",this).fieldValue();var _e=false;for(var j=0;j<_d.length;j++){if(_d[j]){_e=true;}}if(_2.iframe||_e){fileUpload();}else{$.ajax(_2);}$.event.trigger("form.submit.notify",[this,_2]);return this;function fileUpload(){var _10=_7[0];var _11=$.extend({},$.ajaxSettings,_2);var id="jqFormIO"+$.fn.ajaxSubmit.counter++;var $io=$("<iframe id=\""+id+"\" name=\""+id+"\" />");var io=$io[0];var op8=$.browser.opera&&window.opera.version()<9;if($.browser.msie||op8){io.src="javascript:false;document.write(\"\");";}$io.css({position:"absolute",top:"-1000px",left:"-1000px"});var xhr={responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var g=_11.global;if(g&&!$.active++){$.event.trigger("ajaxStart");}if(g){$.event.trigger("ajaxSend",[xhr,_11]);}var _18=0;var _19=0;setTimeout(function(){$io.appendTo("body");io.attachEvent?io.attachEvent("onload",cb):io.addEventListener("load",cb,false);var _1a=_10.encoding?"encoding":"enctype";var t=_7.attr("target");_7.attr({target:id,method:"POST",action:_11.url});_10[_1a]="multipart/form-data";if(_11.timeout){setTimeout(function(){_19=true;cb();},_11.timeout);}_10.submit();_7.attr("target",t);},10);function cb(){if(_18++){return;}io.detachEvent?io.detachEvent("onload",cb):io.removeEventListener("load",cb,false);var ok=true;try{if(_19){throw "timeout";}var _1d,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(_11.dataType=="json"||_11.dataType=="script"){var ta=doc.getElementsByTagName("textarea")[0];_1d=ta?ta.value:xhr.responseText;if(_11.dataType=="json"){eval("data = "+_1d);}else{$.globalEval(_1d);}}else{if(_11.dataType=="xml"){_1d=xhr.responseXML;if(!_1d&&xhr.responseText!=null){_1d=toXml(xhr.responseText);}}else{_1d=xhr.responseText;}}}catch(e){ok=false;$.handleError(_11,xhr,"error",e);}if(ok){_11.success(_1d,"success");if(g){$.event.trigger("ajaxSuccess",[xhr,_11]);}}if(g){$.event.trigger("ajaxComplete",[xhr,_11]);}if(g&&!--$.active){$.event.trigger("ajaxStop");}if(_11.complete){_11.complete(xhr,ok?"success":"error");}setTimeout(function(){$io.remove();xhr.responseXML=null;},100);}function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s);}else{doc=(new DOMParser()).parseFromString(s,"text/xml");}return (doc&&doc.documentElement&&doc.documentElement.tagName!="parsererror")?doc:null;}}};$.fn.ajaxSubmit.counter=0;$.fn.ajaxForm=function(_21){return this.ajaxFormUnbind().submit(submitHandler).each(function(){this.formPluginId=$.fn.ajaxForm.counter++;$.fn.ajaxForm.optionHash[this.formPluginId]=_21;$(":submit,input:image",this).click(clickHandler);});};$.fn.ajaxForm.counter=1;$.fn.ajaxForm.optionHash={};function clickHandler(e){var _23=this.form;_23.clk=this;if(this.type=="image"){if(e.offsetX!=undefined){_23.clk_x=e.offsetX;_23.clk_y=e.offsetY;}else{if(typeof $.fn.offset=="function"){var _24=$(this).offset();_23.clk_x=e.pageX-_24.left;_23.clk_y=e.pageY-_24.top;}else{_23.clk_x=e.pageX-this.offsetLeft;_23.clk_y=e.pageY-this.offsetTop;}}}setTimeout(function(){_23.clk=_23.clk_x=_23.clk_y=null;},10);}function submitHandler(){var id=this.formPluginId;var _26=$.fn.ajaxForm.optionHash[id];$(this).ajaxSubmit(_26);return false;}$.fn.ajaxFormUnbind=function(){this.unbind("submit",submitHandler);return this.each(function(){$(":submit,input:image",this).unbind("click",clickHandler);});};$.fn.formToArray=function(_27){var a=[];if(this.length==0){return a;}var _29=this[0];var els=_27?_29.getElementsByTagName("*"):_29.elements;if(!els){return a;}for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n){continue;}if(_27&&_29.clk&&el.type=="image"){if(!el.disabled&&_29.clk==el){a.push({name:n+".x",value:_29.clk_x},{name:n+".y",value:_29.clk_y});}continue;}var v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++){a.push({name:n,value:v[j]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:n,value:v});}}}if(!_27&&_29.clk){var _30=_29.getElementsByTagName("input");for(var i=0,max=_30.length;i<max;i++){var _32=_30[i];var n=_32.name;if(n&&!_32.disabled&&_32.type=="image"&&_29.clk==_32){a.push({name:n+".x",value:_29.clk_x},{name:n+".y",value:_29.clk_y});}}}return a;};$.fn.formSerialize=function(_34){return $.param(this.formToArray(_34));};$.fn.fieldSerialize=function(_35){var a=[];this.each(function(){var n=this.name;if(!n){return;}var v=$.fieldValue(this,_35);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:this.name,value:v});}}});return $.param(a);};$.fn.fieldValue=function(_3a){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,_3a);if(v===null||typeof v=="undefined"||(v.constructor==Array&&!v.length)){continue;}v.constructor==Array?$.merge(val,v):val.push(v);}return val;};$.fieldValue=function(el,_3f){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof _3f=="undefined"){_3f=true;}if(_3f&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1)){return null;}if(tag=="select"){var _41=el.selectedIndex;if(_41<0){return null;}var a=[],ops=el.options;var one=(t=="select-one");var max=(one?_41+1:ops.length);for(var i=(one?_41:0);i<max;i++){var op=ops[i];if(op.selected){var v=$.browser.msie&&!(op.attributes["value"].specified)?op.text:op.value;if(one){return v;}a.push(v);}}return a;}return el.value;};$.fn.clearForm=function(){return this.each(function(){$("input,select,textarea",this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=="text"||t=="password"||tag=="textarea"){this.value="";}else{if(t=="checkbox"||t=="radio"){this.checked=false;}else{if(tag=="select"){this.selectedIndex=-1;}}}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset();}});};})(jQuery);
   743.5 \ No newline at end of file
   744.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   744.2 +++ b/web/javascript/form.js	Sun Aug 16 03:41:39 2009 +0200
   744.3 @@ -0,0 +1,819 @@
   744.4 +/*
   744.5 + * jQuery Form Plugin
   744.6 + * @requires jQuery v1.1 or later
   744.7 + *
   744.8 + * Examples at: http://malsup.com/jquery/form/
   744.9 + * Dual licensed under the MIT and GPL licenses:
  744.10 + *   http://www.opensource.org/licenses/mit-license.php
  744.11 + *   http://www.gnu.org/licenses/gpl.html
  744.12 + *
  744.13 + * Revision: $Id$
  744.14 + */
  744.15 + (function($) {
  744.16 +/**
  744.17 + * ajaxSubmit() provides a mechanism for submitting an HTML form using AJAX.
  744.18 + *
  744.19 + * ajaxSubmit accepts a single argument which can be either a success callback function
  744.20 + * or an options Object.  If a function is provided it will be invoked upon successful
  744.21 + * completion of the submit and will be passed the response from the server.
  744.22 + * If an options Object is provided, the following attributes are supported:
  744.23 + *
  744.24 + *  target:   Identifies the element(s) in the page to be updated with the server response.
  744.25 + *            This value may be specified as a jQuery selection string, a jQuery object,
  744.26 + *            or a DOM element.
  744.27 + *            default value: null
  744.28 + *
  744.29 + *  url:      URL to which the form data will be submitted.
  744.30 + *            default value: value of form's 'action' attribute
  744.31 + *
  744.32 + *  type:     The method in which the form data should be submitted, 'GET' or 'POST'.
  744.33 + *            default value: value of form's 'method' attribute (or 'GET' if none found)
  744.34 + *
  744.35 + *  data:     Additional data to add to the request, specified as key/value pairs (see $.ajax).
  744.36 + *
  744.37 + *  beforeSubmit:  Callback method to be invoked before the form is submitted.
  744.38 + *            default value: null
  744.39 + *
  744.40 + *  success:  Callback method to be invoked after the form has been successfully submitted
  744.41 + *            and the response has been returned from the server
  744.42 + *            default value: null
  744.43 + *
  744.44 + *  dataType: Expected dataType of the response.  One of: null, 'xml', 'script', or 'json'
  744.45 + *            default value: null
  744.46 + *
  744.47 + *  semantic: Boolean flag indicating whether data must be submitted in semantic order (slower).
  744.48 + *            default value: false
  744.49 + *
  744.50 + *  resetForm: Boolean flag indicating whether the form should be reset if the submit is successful
  744.51 + *
  744.52 + *  clearForm: Boolean flag indicating whether the form should be cleared if the submit is successful
  744.53 + *
  744.54 + *
  744.55 + * The 'beforeSubmit' callback can be provided as a hook for running pre-submit logic or for
  744.56 + * validating the form data.  If the 'beforeSubmit' callback returns false then the form will
  744.57 + * not be submitted. The 'beforeSubmit' callback is invoked with three arguments: the form data
  744.58 + * in array format, the jQuery object, and the options object passed into ajaxSubmit.
  744.59 + * The form data array takes the following form:
  744.60 + *
  744.61 + *     [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
  744.62 + *
  744.63 + * If a 'success' callback method is provided it is invoked after the response has been returned
  744.64 + * from the server.  It is passed the responseText or responseXML value (depending on dataType).
  744.65 + * See jQuery.ajax for further details.
  744.66 + *
  744.67 + *
  744.68 + * The dataType option provides a means for specifying how the server response should be handled.
  744.69 + * This maps directly to the jQuery.httpData method.  The following values are supported:
  744.70 + *
  744.71 + *      'xml':    if dataType == 'xml' the server response is treated as XML and the 'success'
  744.72 + *                   callback method, if specified, will be passed the responseXML value
  744.73 + *      'json':   if dataType == 'json' the server response will be evaluted and passed to
  744.74 + *                   the 'success' callback, if specified
  744.75 + *      'script': if dataType == 'script' the server response is evaluated in the global context
  744.76 + *
  744.77 + *
  744.78 + * Note that it does not make sense to use both the 'target' and 'dataType' options.  If both
  744.79 + * are provided the target will be ignored.
  744.80 + *
  744.81 + * The semantic argument can be used to force form serialization in semantic order.
  744.82 + * This is normally true anyway, unless the form contains input elements of type='image'.
  744.83 + * If your form must be submitted with name/value pairs in semantic order and your form
  744.84 + * contains an input of type='image" then pass true for this arg, otherwise pass false
  744.85 + * (or nothing) to avoid the overhead for this logic.
  744.86 + *
  744.87 + *
  744.88 + * When used on its own, ajaxSubmit() is typically bound to a form's submit event like this:
  744.89 + *
  744.90 + * $("#form-id").submit(function() {
  744.91 + *     $(this).ajaxSubmit(options);
  744.92 + *     return false; // cancel conventional submit
  744.93 + * });
  744.94 + *
  744.95 + * When using ajaxForm(), however, this is done for you.
  744.96 + *
  744.97 + * @example
  744.98 + * $('#myForm').ajaxSubmit(function(data) {
  744.99 + *     alert('Form submit succeeded! Server returned: ' + data);
 744.100 + * });
 744.101 + * @desc Submit form and alert server response
 744.102 + *
 744.103 + *
 744.104 + * @example
 744.105 + * var options = {
 744.106 + *     target: '#myTargetDiv'
 744.107 + * };
 744.108 + * $('#myForm').ajaxSubmit(options);
 744.109 + * @desc Submit form and update page element with server response
 744.110 + *
 744.111 + *
 744.112 + * @example
 744.113 + * var options = {
 744.114 + *     success: function(responseText) {
 744.115 + *         alert(responseText);
 744.116 + *     }
 744.117 + * };
 744.118 + * $('#myForm').ajaxSubmit(options);
 744.119 + * @desc Submit form and alert the server response
 744.120 + *
 744.121 + *
 744.122 + * @example
 744.123 + * var options = {
 744.124 + *     beforeSubmit: function(formArray, jqForm) {
 744.125 + *         if (formArray.length == 0) {
 744.126 + *             alert('Please enter data.');
 744.127 + *             return false;
 744.128 + *         }
 744.129 + *     }
 744.130 + * };
 744.131 + * $('#myForm').ajaxSubmit(options);
 744.132 + * @desc Pre-submit validation which aborts the submit operation if form data is empty
 744.133 + *
 744.134 + *
 744.135 + * @example
 744.136 + * var options = {
 744.137 + *     url: myJsonUrl.php,
 744.138 + *     dataType: 'json',
 744.139 + *     success: function(data) {
 744.140 + *        // 'data' is an object representing the the evaluated json data
 744.141 + *     }
 744.142 + * };
 744.143 + * $('#myForm').ajaxSubmit(options);
 744.144 + * @desc json data returned and evaluated
 744.145 + *
 744.146 + *
 744.147 + * @example
 744.148 + * var options = {
 744.149 + *     url: myXmlUrl.php,
 744.150 + *     dataType: 'xml',
 744.151 + *     success: function(responseXML) {
 744.152 + *        // responseXML is XML document object
 744.153 + *        var data = $('myElement', responseXML).text();
 744.154 + *     }
 744.155 + * };
 744.156 + * $('#myForm').ajaxSubmit(options);
 744.157 + * @desc XML data returned from server
 744.158 + *
 744.159 + *
 744.160 + * @example
 744.161 + * var options = {
 744.162 + *     resetForm: true
 744.163 + * };
 744.164 + * $('#myForm').ajaxSubmit(options);
 744.165 + * @desc submit form and reset it if successful
 744.166 + *
 744.167 + * @example
 744.168 + * $('#myForm).submit(function() {
 744.169 + *    $(this).ajaxSubmit();
 744.170 + *    return false;
 744.171 + * });
 744.172 + * @desc Bind form's submit event to use ajaxSubmit
 744.173 + *
 744.174 + *
 744.175 + * @name ajaxSubmit
 744.176 + * @type jQuery
 744.177 + * @param options  object literal containing options which control the form submission process
 744.178 + * @cat Plugins/Form
 744.179 + * @return jQuery
 744.180 + */
 744.181 +$.fn.ajaxSubmit = function(options) {
 744.182 +    if (typeof options == 'function')
 744.183 +        options = { success: options };
 744.184 +
 744.185 +    options = $.extend({
 744.186 +        url:  this.attr('action') || window.location,
 744.187 +        type: this.attr('method') || 'GET'
 744.188 +    }, options || {});
 744.189 +
 744.190 +    // hook for manipulating the form data before it is extracted;
 744.191 +    // convenient for use with rich editors like tinyMCE or FCKEditor
 744.192 +    var veto = {};
 744.193 +    $.event.trigger('form.pre.serialize', [this, options, veto]);
 744.194 +    if (veto.veto) return this;
 744.195 +
 744.196 +    var a = this.formToArray(options.semantic);
 744.197 +	if (options.data) {
 744.198 +	    for (var n in options.data)
 744.199 +	        a.push( { name: n, value: options.data[n] } );
 744.200 +	}
 744.201 +
 744.202 +    // give pre-submit callback an opportunity to abort the submit
 744.203 +    if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) return this;
 744.204 +
 744.205 +    // fire vetoable 'validate' event
 744.206 +    $.event.trigger('form.submit.validate', [a, this, options, veto]);
 744.207 +    if (veto.veto) return this;
 744.208 +
 744.209 +    var q = $.param(a);//.replace(/%20/g,'+');
 744.210 +
 744.211 +    if (options.type.toUpperCase() == 'GET') {
 744.212 +        options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
 744.213 +        options.data = null;  // data is null for 'get'
 744.214 +    }
 744.215 +    else
 744.216 +        options.data = q; // data is the query string for 'post'
 744.217 +
 744.218 +    var $form = this, callbacks = [];
 744.219 +    if (options.resetForm) callbacks.push(function() { $form.resetForm(); });
 744.220 +    if (options.clearForm) callbacks.push(function() { $form.clearForm(); });
 744.221 +
 744.222 +    // perform a load on the target only if dataType is not provided
 744.223 +    if (!options.dataType && options.target) {
 744.224 +        var oldSuccess = options.success || function(){};
 744.225 +        callbacks.push(function(data) {
 744.226 +            if (this.evalScripts)
 744.227 +                $(options.target).attr("innerHTML", data).evalScripts().each(oldSuccess, arguments);
 744.228 +            else // jQuery v1.1.4
 744.229 +                $(options.target).html(data).each(oldSuccess, arguments);
 744.230 +        });
 744.231 +    }
 744.232 +    else if (options.success)
 744.233 +        callbacks.push(options.success);
 744.234 +
 744.235 +    options.success = function(data, status) {
 744.236 +        for (var i=0, max=callbacks.length; i < max; i++)
 744.237 +            callbacks[i](data, status, $form);
 744.238 +    };
 744.239 +
 744.240 +    // are there files to upload?
 744.241 +    var files = $('input:file', this).fieldValue();
 744.242 +    var found = false;
 744.243 +    for (var j=0; j < files.length; j++)
 744.244 +        if (files[j])
 744.245 +            found = true;
 744.246 +
 744.247 +    if (options.iframe || found) // options.iframe allows user to force iframe mode
 744.248 +        fileUpload();
 744.249 +    else
 744.250 +        $.ajax(options);
 744.251 +
 744.252 +    // fire 'notify' event
 744.253 +    $.event.trigger('form.submit.notify', [this, options]);
 744.254 +    return this;
 744.255 +
 744.256 +
 744.257 +    // private function for handling file uploads (hat tip to YAHOO!)
 744.258 +    function fileUpload() {
 744.259 +        var form = $form[0];
 744.260 +        var opts = $.extend({}, $.ajaxSettings, options);
 744.261 +
 744.262 +        var id = 'jqFormIO' + $.fn.ajaxSubmit.counter++;
 744.263 +        var $io = $('<iframe id="' + id + '" name="' + id + '" />');
 744.264 +        var io = $io[0];
 744.265 +        var op8 = $.browser.opera && window.opera.version() < 9;
 744.266 +        if ($.browser.msie || op8) io.src = 'javascript:false;document.write("");';
 744.267 +        $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
 744.268 +
 744.269 +        var xhr = { // mock object
 744.270 +            responseText: null,
 744.271 +            responseXML: null,
 744.272 +            status: 0,
 744.273 +            statusText: 'n/a',
 744.274 +            getAllResponseHeaders: function() {},
 744.275 +            getResponseHeader: function() {},
 744.276 +            setRequestHeader: function() {}
 744.277 +        };
 744.278 +
 744.279 +        var g = opts.global;
 744.280 +        // trigger ajax global events so that activity/block indicators work like normal
 744.281 +        if (g && ! $.active++) $.event.trigger("ajaxStart");
 744.282 +        if (g) $.event.trigger("ajaxSend", [xhr, opts]);
 744.283 +
 744.284 +        var cbInvoked = 0;
 744.285 +        var timedOut = 0;
 744.286 +
 744.287 +        // take a breath so that pending repaints get some cpu time before the upload starts
 744.288 +        setTimeout(function() {
 744.289 +            $io.appendTo('body');
 744.290 +            // jQuery's event binding doesn't work for iframe events in IE
 744.291 +            io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
 744.292 +
 744.293 +            // make sure form attrs are set
 744.294 +            var encAttr = form.encoding ? 'encoding' : 'enctype';
 744.295 +            var t = $form.attr('target');
 744.296 +            $form.attr({
 744.297 +                target:   id,
 744.298 +                method:  'POST',
 744.299 +                action:   opts.url
 744.300 +            });
 744.301 +            form[encAttr] = 'multipart/form-data';
 744.302 +
 744.303 +            // support timout
 744.304 +            if (opts.timeout)
 744.305 +                setTimeout(function() { timedOut = true; cb(); }, opts.timeout);
 744.306 +
 744.307 +            form.submit();
 744.308 +            $form.attr('target', t); // reset target
 744.309 +        }, 10);
 744.310 +
 744.311 +        function cb() {
 744.312 +            if (cbInvoked++) return;
 744.313 +
 744.314 +            io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
 744.315 +
 744.316 +            var ok = true;
 744.317 +            try {
 744.318 +                if (timedOut) throw 'timeout';
 744.319 +                // extract the server response from the iframe
 744.320 +                var data, doc;
 744.321 +                doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
 744.322 +                xhr.responseText = doc.body ? doc.body.innerHTML : null;
 744.323 +                xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
 744.324 +
 744.325 +                if (opts.dataType == 'json' || opts.dataType == 'script') {
 744.326 +                    var ta = doc.getElementsByTagName('textarea')[0];
 744.327 +                    data = ta ? ta.value : xhr.responseText;
 744.328 +                    if (opts.dataType == 'json')
 744.329 +                        eval("data = " + data);
 744.330 +                    else
 744.331 +                        $.globalEval(data);
 744.332 +                }
 744.333 +                else if (opts.dataType == 'xml') {
 744.334 +                    data = xhr.responseXML;
 744.335 +                    if (!data && xhr.responseText != null)
 744.336 +                        data = toXml(xhr.responseText);
 744.337 +                }
 744.338 +                else {
 744.339 +                    data = xhr.responseText;
 744.340 +                }
 744.341 +            }
 744.342 +            catch(e){
 744.343 +                ok = false;
 744.344 +                $.handleError(opts, xhr, 'error', e);
 744.345 +            }
 744.346 +
 744.347 +            // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
 744.348 +            if (ok) {
 744.349 +                opts.success(data, 'success');
 744.350 +                if (g) $.event.trigger("ajaxSuccess", [xhr, opts]);
 744.351 +            }
 744.352 +            if (g) $.event.trigger("ajaxComplete", [xhr, opts]);
 744.353 +            if (g && ! --$.active) $.event.trigger("ajaxStop");
 744.354 +            if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error');
 744.355 +
 744.356 +            // clean up
 744.357 +            setTimeout(function() {
 744.358 +                $io.remove();
 744.359 +                xhr.responseXML = null;
 744.360 +            }, 100);
 744.361 +        };
 744.362 +
 744.363 +        function toXml(s, doc) {
 744.364 +            if (window.ActiveXObject) {
 744.365 +                doc = new ActiveXObject('Microsoft.XMLDOM');
 744.366 +                doc.async = 'false';
 744.367 +                doc.loadXML(s);
 744.368 +            }
 744.369 +            else
 744.370 +                doc = (new DOMParser()).parseFromString(s, 'text/xml');
 744.371 +            return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
 744.372 +        };
 744.373 +    };
 744.374 +};
 744.375 +$.fn.ajaxSubmit.counter = 0; // used to create unique iframe ids
 744.376 +
 744.377 +/**
 744.378 + * ajaxForm() provides a mechanism for fully automating form submission.
 744.379 + *
 744.380 + * The advantages of using this method instead of ajaxSubmit() are:
 744.381 + *
 744.382 + * 1: This method will include coordinates for <input type="image" /> elements (if the element
 744.383 + *    is used to submit the form).
 744.384 + * 2. This method will include the submit element's name/value data (for the element that was
 744.385 + *    used to submit the form).
 744.386 + * 3. This method binds the submit() method to the form for you.
 744.387 + *
 744.388 + * Note that for accurate x/y coordinates of image submit elements in all browsers
 744.389 + * you need to also use the "dimensions" plugin (this method will auto-detect its presence).
 744.390 + *
 744.391 + * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
 744.392 + * passes the options argument along after properly binding events for submit elements and
 744.393 + * the form itself.  See ajaxSubmit for a full description of the options argument.
 744.394 + *
 744.395 + *
 744.396 + * @example
 744.397 + * var options = {
 744.398 + *     target: '#myTargetDiv'
 744.399 + * };
 744.400 + * $('#myForm').ajaxSForm(options);
 744.401 + * @desc Bind form's submit event so that 'myTargetDiv' is updated with the server response
 744.402 + *       when the form is submitted.
 744.403 + *
 744.404 + *
 744.405 + * @example
 744.406 + * var options = {
 744.407 + *     success: function(responseText) {
 744.408 + *         alert(responseText);
 744.409 + *     }
 744.410 + * };
 744.411 + * $('#myForm').ajaxSubmit(options);
 744.412 + * @desc Bind form's submit event so that server response is alerted after the form is submitted.
 744.413 + *
 744.414 + *
 744.415 + * @example
 744.416 + * var options = {
 744.417 + *     beforeSubmit: function(formArray, jqForm) {
 744.418 + *         if (formArray.length == 0) {
 744.419 + *             alert('Please enter data.');
 744.420 + *             return false;
 744.421 + *         }
 744.422 + *     }
 744.423 + * };
 744.424 + * $('#myForm').ajaxSubmit(options);
 744.425 + * @desc Bind form's submit event so that pre-submit callback is invoked before the form
 744.426 + *       is submitted.
 744.427 + *
 744.428 + *
 744.429 + * @name   ajaxForm
 744.430 + * @param  options  object literal containing options which control the form submission process
 744.431 + * @return jQuery
 744.432 + * @cat    Plugins/Form
 744.433 + * @type   jQuery
 744.434 + */
 744.435 +$.fn.ajaxForm = function(options) {
 744.436 +    return this.ajaxFormUnbind().submit(submitHandler).each(function() {
 744.437 +        // store options in hash
 744.438 +        this.formPluginId = $.fn.ajaxForm.counter++;
 744.439 +        $.fn.ajaxForm.optionHash[this.formPluginId] = options;
 744.440 +        $(":submit,input:image", this).click(clickHandler);
 744.441 +    });
 744.442 +};
 744.443 +
 744.444 +$.fn.ajaxForm.counter = 1;
 744.445 +$.fn.ajaxForm.optionHash = {};
 744.446 +
 744.447 +function clickHandler(e) {
 744.448 +    var $form = this.form;
 744.449 +    $form.clk = this;
 744.450 +    if (this.type == 'image') {
 744.451 +        if (e.offsetX != undefined) {
 744.452 +            $form.clk_x = e.offsetX;
 744.453 +            $form.clk_y = e.offsetY;
 744.454 +        } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
 744.455 +            var offset = $(this).offset();
 744.456 +            $form.clk_x = e.pageX - offset.left;
 744.457 +            $form.clk_y = e.pageY - offset.top;
 744.458 +        } else {
 744.459 +            $form.clk_x = e.pageX - this.offsetLeft;
 744.460 +            $form.clk_y = e.pageY - this.offsetTop;
 744.461 +        }
 744.462 +    }
 744.463 +    // clear form vars
 744.464 +    setTimeout(function() { $form.clk = $form.clk_x = $form.clk_y = null; }, 10);
 744.465 +};
 744.466 +
 744.467 +function submitHandler() {
 744.468 +    // retrieve options from hash
 744.469 +    var id = this.formPluginId;
 744.470 +    var options = $.fn.ajaxForm.optionHash[id];
 744.471 +    $(this).ajaxSubmit(options);
 744.472 +    return false;
 744.473 +};
 744.474 +
 744.475 +/**
 744.476 + * ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
 744.477 + *
 744.478 + * @name   ajaxFormUnbind
 744.479 + * @return jQuery
 744.480 + * @cat    Plugins/Form
 744.481 + * @type   jQuery
 744.482 + */
 744.483 +$.fn.ajaxFormUnbind = function() {
 744.484 +    this.unbind('submit', submitHandler);
 744.485 +    return this.each(function() {
 744.486 +        $(":submit,input:image", this).unbind('click', clickHandler);
 744.487 +    });
 744.488 +
 744.489 +};
 744.490 +
 744.491 +/**
 744.492 + * formToArray() gathers form element data into an array of objects that can
 744.493 + * be passed to any of the following ajax functions: $.get, $.post, or load.
 744.494 + * Each object in the array has both a 'name' and 'value' property.  An example of
 744.495 + * an array for a simple login form might be:
 744.496 + *
 744.497 + * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
 744.498 + *
 744.499 + * It is this array that is passed to pre-submit callback functions provided to the
 744.500 + * ajaxSubmit() and ajaxForm() methods.
 744.501 + *
 744.502 + * The semantic argument can be used to force form serialization in semantic order.
 744.503 + * This is normally true anyway, unless the form contains input elements of type='image'.
 744.504 + * If your form must be submitted with name/value pairs in semantic order and your form
 744.505 + * contains an input of type='image" then pass true for this arg, otherwise pass false
 744.506 + * (or nothing) to avoid the overhead for this logic.
 744.507 + *
 744.508 + * @example var data = $("#myForm").formToArray();
 744.509 + * $.post( "myscript.cgi", data );
 744.510 + * @desc Collect all the data from a form and submit it to the server.
 744.511 + *
 744.512 + * @name formToArray
 744.513 + * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
 744.514 + * @type Array<Object>
 744.515 + * @cat Plugins/Form
 744.516 + */
 744.517 +$.fn.formToArray = function(semantic) {
 744.518 +    var a = [];
 744.519 +    if (this.length == 0) return a;
 744.520 +
 744.521 +    var form = this[0];
 744.522 +    var els = semantic ? form.getElementsByTagName('*') : form.elements;
 744.523 +    if (!els) return a;
 744.524 +    for(var i=0, max=els.length; i < max; i++) {
 744.525 +        var el = els[i];
 744.526 +        var n = el.name;
 744.527 +        if (!n) continue;
 744.528 +
 744.529 +        if (semantic && form.clk && el.type == "image") {
 744.530 +            // handle image inputs on the fly when semantic == true
 744.531 +            if(!el.disabled && form.clk == el)
 744.532 +                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
 744.533 +            continue;
 744.534 +        }
 744.535 +
 744.536 +        var v = $.fieldValue(el, true);
 744.537 +        if (v && v.constructor == Array) {
 744.538 +            for(var j=0, jmax=v.length; j < jmax; j++)
 744.539 +                a.push({name: n, value: v[j]});
 744.540 +        }
 744.541 +        else if (v !== null && typeof v != 'undefined')
 744.542 +            a.push({name: n, value: v});
 744.543 +    }
 744.544 +
 744.545 +    if (!semantic && form.clk) {
 744.546 +        // input type=='image' are not found in elements array! handle them here
 744.547 +        var inputs = form.getElementsByTagName("input");
 744.548 +        for(var i=0, max=inputs.length; i < max; i++) {
 744.549 +            var input = inputs[i];
 744.550 +            var n = input.name;
 744.551 +            if(n && !input.disabled && input.type == "image" && form.clk == input)
 744.552 +                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
 744.553 +        }
 744.554 +    }
 744.555 +    return a;
 744.556 +};
 744.557 +
 744.558 +
 744.559 +/**
 744.560 + * Serializes form data into a 'submittable' string. This method will return a string
 744.561 + * in the format: name1=value1&amp;name2=value2
 744.562 + *
 744.563 + * The semantic argument can be used to force form serialization in semantic order.
 744.564 + * If your form must be submitted with name/value pairs in semantic order then pass
 744.565 + * true for this arg, otherwise pass false (or nothing) to avoid the overhead for
 744.566 + * this logic (which can be significant for very large forms).
 744.567 + *
 744.568 + * @example var data = $("#myForm").formSerialize();
 744.569 + * $.ajax('POST', "myscript.cgi", data);
 744.570 + * @desc Collect all the data from a form into a single string
 744.571 + *
 744.572 + * @name formSerialize
 744.573 + * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
 744.574 + * @type String
 744.575 + * @cat Plugins/Form
 744.576 + */
 744.577 +$.fn.formSerialize = function(semantic) {
 744.578 +    //hand off to jQuery.param for proper encoding
 744.579 +    return $.param(this.formToArray(semantic));
 744.580 +};
 744.581 +
 744.582 +
 744.583 +/**
 744.584 + * Serializes all field elements in the jQuery object into a query string.
 744.585 + * This method will return a string in the format: name1=value1&amp;name2=value2
 744.586 + *
 744.587 + * The successful argument controls whether or not serialization is limited to
 744.588 + * 'successful' controls (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 744.589 + * The default value of the successful argument is true.
 744.590 + *
 744.591 + * @example var data = $("input").formSerialize();
 744.592 + * @desc Collect the data from all successful input elements into a query string
 744.593 + *
 744.594 + * @example var data = $(":radio").formSerialize();
 744.595 + * @desc Collect the data from all successful radio input elements into a query string
 744.596 + *
 744.597 + * @example var data = $("#myForm :checkbox").formSerialize();
 744.598 + * @desc Collect the data from all successful checkbox input elements in myForm into a query string
 744.599 + *
 744.600 + * @example var data = $("#myForm :checkbox").formSerialize(false);
 744.601 + * @desc Collect the data from all checkbox elements in myForm (even the unchecked ones) into a query string
 744.602 + *
 744.603 + * @example var data = $(":input").formSerialize();
 744.604 + * @desc Collect the data from all successful input, select, textarea and button elements into a query string
 744.605 + *
 744.606 + * @name fieldSerialize
 744.607 + * @param successful true if only successful controls should be serialized (default is true)
 744.608 + * @type String
 744.609 + * @cat Plugins/Form
 744.610 + */
 744.611 +$.fn.fieldSerialize = function(successful) {
 744.612 +    var a = [];
 744.613 +    this.each(function() {
 744.614 +        var n = this.name;
 744.615 +        if (!n) return;
 744.616 +        var v = $.fieldValue(this, successful);
 744.617 +        if (v && v.constructor == Array) {
 744.618 +            for (var i=0,max=v.length; i < max; i++)
 744.619 +                a.push({name: n, value: v[i]});
 744.620 +        }
 744.621 +        else if (v !== null && typeof v != 'undefined')
 744.622 +            a.push({name: this.name, value: v});
 744.623 +    });
 744.624 +    //hand off to jQuery.param for proper encoding
 744.625 +    return $.param(a);
 744.626 +};
 744.627 +
 744.628 +
 744.629 +/**
 744.630 + * Returns the value(s) of the element in the matched set.  For example, consider the following form:
 744.631 + *
 744.632 + *  <form><fieldset>
 744.633 + *      <input name="A" type="text" />
 744.634 + *      <input name="A" type="text" />
 744.635 + *      <input name="B" type="checkbox" value="B1" />
 744.636 + *      <input name="B" type="checkbox" value="B2"/>
 744.637 + *      <input name="C" type="radio" value="C1" />
 744.638 + *      <input name="C" type="radio" value="C2" />
 744.639 + *  </fieldset></form>
 744.640 + *
 744.641 + *  var v = $(':text').fieldValue();
 744.642 + *  // if no values are entered into the text inputs
 744.643 + *  v == ['','']
 744.644 + *  // if values entered into the text inputs are 'foo' and 'bar'
 744.645 + *  v == ['foo','bar']
 744.646 + *
 744.647 + *  var v = $(':checkbox').fieldValue();
 744.648 + *  // if neither checkbox is checked
 744.649 + *  v === undefined
 744.650 + *  // if both checkboxes are checked
 744.651 + *  v == ['B1', 'B2']
 744.652 + *
 744.653 + *  var v = $(':radio').fieldValue();
 744.654 + *  // if neither radio is checked
 744.655 + *  v === undefined
 744.656 + *  // if first radio is checked
 744.657 + *  v == ['C1']
 744.658 + *
 744.659 + * The successful argument controls whether or not the field element must be 'successful'
 744.660 + * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 744.661 + * The default value of the successful argument is true.  If this value is false the value(s)
 744.662 + * for each element is returned.
 744.663 + *
 744.664 + * Note: This method *always* returns an array.  If no valid value can be determined the
 744.665 + *       array will be empty, otherwise it will contain one or more values.
 744.666 + *
 744.667 + * @example var data = $("#myPasswordElement").fieldValue();
 744.668 + * alert(data[0]);
 744.669 + * @desc Alerts the current value of the myPasswordElement element
 744.670 + *
 744.671 + * @example var data = $("#myForm :input").fieldValue();
 744.672 + * @desc Get the value(s) of the form elements in myForm
 744.673 + *
 744.674 + * @example var data = $("#myForm :checkbox").fieldValue();
 744.675 + * @desc Get the value(s) for the successful checkbox element(s) in the jQuery object.
 744.676 + *
 744.677 + * @example var data = $("#mySingleSelect").fieldValue();
 744.678 + * @desc Get the value(s) of the select control
 744.679 + *
 744.680 + * @example var data = $(':text').fieldValue();
 744.681 + * @desc Get the value(s) of the text input or textarea elements
 744.682 + *
 744.683 + * @example var data = $("#myMultiSelect").fieldValue();
 744.684 + * @desc Get the values for the select-multiple control
 744.685 + *
 744.686 + * @name fieldValue
 744.687 + * @param Boolean successful true if only the values for successful controls should be returned (default is true)
 744.688 + * @type Array<String>
 744.689 + * @cat Plugins/Form
 744.690 + */
 744.691 +$.fn.fieldValue = function(successful) {
 744.692 +    for (var val=[], i=0, max=this.length; i < max; i++) {
 744.693 +        var el = this[i];
 744.694 +        var v = $.fieldValue(el, successful);
 744.695 +        if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
 744.696 +            continue;
 744.697 +        v.constructor == Array ? $.merge(val, v) : val.push(v);
 744.698 +    }
 744.699 +    return val;
 744.700 +};
 744.701 +
 744.702 +/**
 744.703 + * Returns the value of the field element.
 744.704 + *
 744.705 + * The successful argument controls whether or not the field element must be 'successful'
 744.706 + * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 744.707 + * The default value of the successful argument is true.  If the given element is not
 744.708 + * successful and the successful arg is not false then the returned value will be null.
 744.709 + *
 744.710 + * Note: If the successful flag is true (default) but the element is not successful, the return will be null
 744.711 + * Note: The value returned for a successful select-multiple element will always be an array.
 744.712 + * Note: If the element has no value the return value will be undefined.
 744.713 + *
 744.714 + * @example var data = jQuery.fieldValue($("#myPasswordElement")[0]);
 744.715 + * @desc Gets the current value of the myPasswordElement element
 744.716 + *
 744.717 + * @name fieldValue
 744.718 + * @param Element el The DOM element for which the value will be returned
 744.719 + * @param Boolean successful true if value returned must be for a successful controls (default is true)
 744.720 + * @type String or Array<String> or null or undefined
 744.721 + * @cat Plugins/Form
 744.722 + */
 744.723 +$.fieldValue = function(el, successful) {
 744.724 +    var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
 744.725 +    if (typeof successful == 'undefined') successful = true;
 744.726 +
 744.727 +    if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
 744.728 +        (t == 'checkbox' || t == 'radio') && !el.checked ||
 744.729 +        (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
 744.730 +        tag == 'select' && el.selectedIndex == -1))
 744.731 +            return null;
 744.732 +
 744.733 +    if (tag == 'select') {
 744.734 +        var index = el.selectedIndex;
 744.735 +        if (index < 0) return null;
 744.736 +        var a = [], ops = el.options;
 744.737 +        var one = (t == 'select-one');
 744.738 +        var max = (one ? index+1 : ops.length);
 744.739 +        for(var i=(one ? index : 0); i < max; i++) {
 744.740 +            var op = ops[i];
 744.741 +            if (op.selected) {
 744.742 +                // extra pain for IE...
 744.743 +                var v = $.browser.msie && !(op.attributes['value'].specified) ? op.text : op.value;
 744.744 +                if (one) return v;
 744.745 +                a.push(v);
 744.746 +            }
 744.747 +        }
 744.748 +        return a;
 744.749 +    }
 744.750 +    return el.value;
 744.751 +};
 744.752 +
 744.753 +
 744.754 +/**
 744.755 + * Clears the form data.  Takes the following actions on the form's input fields:
 744.756 + *  - input text fields will have their 'value' property set to the empty string
 744.757 + *  - select elements will have their 'selectedIndex' property set to -1
 744.758 + *  - checkbox and radio inputs will have their 'checked' property set to false
 744.759 + *  - inputs of type submit, button, reset, and hidden will *not* be effected
 744.760 + *  - button elements will *not* be effected
 744.761 + *
 744.762 + * @example $('form').clearForm();
 744.763 + * @desc Clears all forms on the page.
 744.764 + *
 744.765 + * @name clearForm
 744.766 + * @type jQuery
 744.767 + * @cat Plugins/Form
 744.768 + */
 744.769 +$.fn.clearForm = function() {
 744.770 +    return this.each(function() {
 744.771 +        $('input,select,textarea', this).clearFields();
 744.772 +    });
 744.773 +};
 744.774 +
 744.775 +/**
 744.776 + * Clears the selected form elements.  Takes the following actions on the matched elements:
 744.777 + *  - input text fields will have their 'value' property set to the empty string
 744.778 + *  - select elements will have their 'selectedIndex' property set to -1
 744.779 + *  - checkbox and radio inputs will have their 'checked' property set to false
 744.780 + *  - inputs of type submit, button, reset, and hidden will *not* be effected
 744.781 + *  - button elements will *not* be effected
 744.782 + *
 744.783 + * @example $('.myInputs').clearFields();
 744.784 + * @desc Clears all inputs with class myInputs
 744.785 + *
 744.786 + * @name clearFields
 744.787 + * @type jQuery
 744.788 + * @cat Plugins/Form
 744.789 + */
 744.790 +$.fn.clearFields = $.fn.clearInputs = function() {
 744.791 +    return this.each(function() {
 744.792 +        var t = this.type, tag = this.tagName.toLowerCase();
 744.793 +        if (t == 'text' || t == 'password' || tag == 'textarea')
 744.794 +            this.value = '';
 744.795 +        else if (t == 'checkbox' || t == 'radio')
 744.796 +            this.checked = false;
 744.797 +        else if (tag == 'select')
 744.798 +            this.selectedIndex = -1;
 744.799 +    });
 744.800 +};
 744.801 +
 744.802 +
 744.803 +/**
 744.804 + * Resets the form data.  Causes all form elements to be reset to their original value.
 744.805 + *
 744.806 + * @example $('form').resetForm();
 744.807 + * @desc Resets all forms on the page.
 744.808 + *
 744.809 + * @name resetForm
 744.810 + * @type jQuery
 744.811 + * @cat Plugins/Form
 744.812 + */
 744.813 +$.fn.resetForm = function() {
 744.814 +    return this.each(function() {
 744.815 +        // guard against an input with the name of 'reset'
 744.816 +        // note that IE reports the reset function as an 'object'
 744.817 +        if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType))
 744.818 +            this.reset();
 744.819 +    });
 744.820 +};
 744.821 +
 744.822 +})(jQuery);
   745.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   745.2 +++ b/web/javascript/hsbook.js	Sun Aug 16 03:41:39 2009 +0200
   745.3 @@ -0,0 +1,91 @@
   745.4 +function qid(id) {
   745.5 +  return id.replace(/([.:])/g, "\\$1");
   745.6 +}
   745.7 +
   745.8 +function beforeComment(formData, jqForm, options) {
   745.9 +  var form = jqForm[0];
  745.10 +  if (!form.comment.value) {
  745.11 +    $(options.target + " span.comment_error").empty().append(
  745.12 +      "<span class=\"comment_error\">Your comment is empty</span>");
  745.13 +    return false;
  745.14 +  }
  745.15 +  if (!form.name.value) {
  745.16 +    $(options.target + " span.comment_error").empty().append(
  745.17 +      "<span class=\"comment_error\">Please provide a name</span>");
  745.18 +    return false;
  745.19 +  }
  745.20 +  $(options.target + " span.comment_error").empty().after(
  745.21 +    "<img src=\"figs/throbber.gif\" style=\"vertical-align: middle\"/>");
  745.22 +  $(options.target + " input[@name=submit]").attr("disabled", true);
  745.23 +}
  745.24 +
  745.25 +function ajaxifyForm(id) {
  745.26 +  var q = qid(id);
  745.27 +  
  745.28 +  $("#form_" + q).ajaxForm({ beforeSubmit: beforeComment,
  745.29 +			     success: function() { ajaxifyForm(id); },
  745.30 +			     target: "#comments_" + q });
  745.31 +}
  745.32 +
  745.33 +function toggleComment(id) {
  745.34 +  $("#toggle_" + qid(id)).nextAll().toggle();
  745.35 +  return false;
  745.36 +}
  745.37 +
  745.38 +function loadComments(id) {
  745.39 +  $("#comments_" + qid(id)).load(location.protocol + "//" + location.host +
  745.40 +				 "/comments/single/" + id + "/", function() {
  745.41 +    ajaxifyForm(id);
  745.42 +  });
  745.43 +  return false;
  745.44 +}
  745.45 +
  745.46 +function loadAllComments() {
  745.47 +  $("a.commenttoggle").each(function() {
  745.48 +    var id = $(this).attr("pid");
  745.49 +    if (id) {
  745.50 +      loadComments(id);
  745.51 +    }
  745.52 +  });
  745.53 +}
  745.54 +
  745.55 +$(document).ready(function() {
  745.56 +  function loading(id) {
  745.57 +    return " <span id=\"comments_" + id + "\" class=\"comment\">" +
  745.58 +      "<span pid=\"" + id + "\" class=\"commenttoggle\">Loading..." +
  745.59 +      "</span></span>";
  745.60 +  }
  745.61 +  $("div.toc>p")
  745.62 +    .after("<p style='display: none;'><a onclick='return loadAllComments()'>" +
  745.63 +	   "Load all comments (<b>slow</b>)</a></p>")
  745.64 +    .toggle(function() { $(this).nextAll().show("normal"); },
  745.65 +	    function() { $(this).nextAll().hide("normal"); })
  745.66 +    .hover(function() { $(this).fadeTo("normal", 0.8); },
  745.67 +	   function() { $(this).fadeTo("normal", 0.35); });
  745.68 +  $("p[@id]").each(function() {
  745.69 +    $(this).append(loading($(this).attr("id")));
  745.70 +  });
  745.71 +  $("pre[@id]").each(function() {
  745.72 +    $(this).after(loading($(this).attr("id")));
  745.73 +  });
  745.74 +  var chapid = $("div.preface, div.chapter, div.appendix, div.bibliography").attr("id");
  745.75 +  $("#chapterfeed").attr("href",
  745.76 +			 $("#chapterfeed").attr("href") + chapid + "/");
  745.77 +  $.getJSON(location.protocol + "//" + location.host + "/comments/chapter/" +
  745.78 +	    chapid + "/count/", function(data) {
  745.79 +    $.each(data, function(id, item) {
  745.80 +      var s = item == 1 ? "" : "s";
  745.81 +      $("#comments_" + qid(id) + " span.commenttoggle").replaceWith(
  745.82 +        "<a class='commenttoggle' id='toggle_" + id + "' " +
  745.83 +	"pid='" + id + "' " +
  745.84 +	"onclick='return loadComments(\"" + id + "\")' " +
  745.85 +	"href='comments: show / hide'>" + item + " comment" + s + "</a>");
  745.86 +    });
  745.87 +    $("span.commenttoggle").each(function() {
  745.88 +      var id = $(this).attr("pid");
  745.89 +      $(this).replaceWith("<a class='commenttoggle' id='toggle_" + id + "' " +
  745.90 +			  "onclick='return loadComments(\"" + id + "\")' " +
  745.91 +			  "href='comment: add'>No comments</a>");
  745.92 +    });
  745.93 +  });
  745.94 +});
   746.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   746.2 +++ b/web/javascript/jquery-min.js	Sun Aug 16 03:41:39 2009 +0200
   746.3 @@ -0,0 +1,31 @@
   746.4 +/*
   746.5 + * jQuery 1.2.1 - New Wave Javascript
   746.6 + *
   746.7 + * Copyright (c) 2007 John Resig (jquery.com)
   746.8 + * Dual licensed under the MIT (MIT-LICENSE.txt)
   746.9 + * and GPL (GPL-LICENSE.txt) licenses.
  746.10 + *
  746.11 + * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $
  746.12 + * $Rev: 3353 $
  746.13 + */
  746.14 +(function(){if(typeof jQuery!="undefined")var _jQuery=jQuery;var jQuery=window.jQuery=function(selector,context){return this instanceof jQuery?this.init(selector,context):new jQuery(selector,context);};if(typeof $!="undefined")var _$=$;window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(typeof selector=="string"){var m=quickExpr.exec(selector);if(m&&(m[1]||!context)){if(m[1])selector=jQuery.clean([m[1]],context);else{var tmp=document.getElementById(m[3]);if(tmp)if(tmp.id!=m[3])return jQuery().find(selector);else{this[0]=tmp;this.length=1;return this;}else
  746.15 +selector=[];}}else
  746.16 +return new jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector]);},jquery:"1.2.1",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(a){var ret=jQuery(a);ret.prevObject=this;return ret;},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this;},each:function(fn,args){return jQuery.each(this,fn,args);},index:function(obj){var pos=-1;this.each(function(i){if(this==obj)pos=i;});return pos;},attr:function(key,value,type){var obj=key;if(key.constructor==String)if(value==undefined)return this.length&&jQuery[type||"attr"](this[0],key)||undefined;else{obj={};obj[key]=value;}return this.each(function(index){for(var prop in obj)jQuery.attr(type?this.style:this,prop,jQuery.prop(this,obj[prop],type,index,prop));});},css:function(key,value){return this.attr(key,value,"curCSS");},text:function(e){if(typeof e!="object"&&e!=null)return this.empty().append(document.createTextNode(e));var t="";jQuery.each(e||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)t+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return t;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,1,function(a){this.appendChild(a);});},prepend:function(){return this.domManip(arguments,true,-1,function(a){this.insertBefore(a,this.firstChild);});},before:function(){return this.domManip(arguments,false,1,function(a){this.parentNode.insertBefore(a,this);});},after:function(){return this.domManip(arguments,false,-1,function(a){this.parentNode.insertBefore(a,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(t){var data=jQuery.map(this,function(a){return jQuery.find(t,a);});return this.pushStack(/[^+>] [^+>]/.test(t)||t.indexOf("..")>-1?jQuery.unique(data):data);},clone:function(events){var ret=this.map(function(){return this.outerHTML?jQuery(this.outerHTML)[0]:this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(t){return this.pushStack(jQuery.isFunction(t)&&jQuery.grep(this,function(el,index){return t.apply(el,[index]);})||jQuery.multiFilter(t,this));},not:function(t){return this.pushStack(t.constructor==String&&jQuery.multiFilter(t,this,true)||jQuery.grep(this,function(a){return(t.constructor==Array||t.jquery)?jQuery.inArray(a,t)<0:a!=t;}));},add:function(t){return this.pushStack(jQuery.merge(this.get(),t.constructor==String?jQuery(t).get():t.length!=undefined&&(!t.nodeName||jQuery.nodeName(t,"form"))?t:[t]));},is:function(expr){return expr?jQuery.multiFilter(expr,this).length>0:false;},hasClass:function(expr){return this.is("."+expr);},val:function(val){if(val==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,a=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){var val=jQuery.browser.msie&&!option.attributes["value"].specified?option.text:option.value;if(one)return val;a.push(val);}}return a;}else
  746.17 +return this[0].value.replace(/\r/g,"");}}else
  746.18 +return this.each(function(){if(val.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,val)>=0||jQuery.inArray(this.name,val)>=0);else if(jQuery.nodeName(this,"select")){var tmp=val.constructor==Array?val:[val];jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,tmp)>=0||jQuery.inArray(this.text,tmp)>=0);});if(!tmp.length)this.selectedIndex=-1;}else
  746.19 +this.value=val;});},html:function(val){return val==undefined?(this.length?this[0].innerHTML:null):this.empty().append(val);},replaceWith:function(val){return this.after(val).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(fn){return this.pushStack(jQuery.map(this,function(elem,i){return fn.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(args,table,dir,fn){var clone=this.length>1,a;return this.each(function(){if(!a){a=jQuery.clean(args,this.ownerDocument);if(dir<0)a.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(a[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(document.createElement("tbody"));jQuery.each(a,function(){var elem=clone?this.cloneNode(true):this;if(!evalScript(0,elem))fn.call(obj,elem);});});}};function evalScript(i,elem){var script=jQuery.nodeName(elem,"script");if(script){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
  746.20 +jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}else if(elem.nodeType==1)jQuery("script",elem).each(evalScript);return script;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},a=1,al=arguments.length,deep=false;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};}if(al==1){target=this;a=0;}var prop;for(;a<al;a++)if((prop=arguments[a])!=null)for(var i in prop){if(target==prop[i])continue;if(deep&&typeof prop[i]=='object'&&target[i])jQuery.extend(target[i],prop[i]);else if(prop[i]!=undefined)target[i]=prop[i];}return target;};var expando="jQuery"+(new Date()).getTime(),uuid=0,win={};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/function/i.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){if(window.execScript)window.execScript(data);else if(jQuery.browser.safari)window.setTimeout(data,0);else
  746.21 +eval.call(window,data);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?win:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!=undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?win:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(obj,fn,args){if(args){if(obj.length==undefined)for(var i in obj)fn.apply(obj[i],args);else
  746.22 +for(var i=0,ol=obj.length;i<ol;i++)if(fn.apply(obj[i],args)===false)break;}else{if(obj.length==undefined)for(var i in obj)fn.call(obj[i],i,obj[i]);else
  746.23 +for(var i=0,ol=obj.length,val=obj[0];i<ol&&fn.call(val,i,val)!==false;val=obj[++i]){}}return obj;},prop:function(elem,value,type,index,prop){if(jQuery.isFunction(value))value=value.call(elem,[index]);var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(prop)?value+"px":value;},className:{add:function(elem,c){jQuery.each((c||"").split(/\s+/),function(i,cur){if(!jQuery.className.has(elem.className,cur))elem.className+=(elem.className?" ":"")+cur;});},remove:function(elem,c){elem.className=c!=undefined?jQuery.grep(elem.className.split(/\s+/),function(cur){return!jQuery.className.has(c,cur);}).join(" "):"";},has:function(t,c){return jQuery.inArray(c,(t.className||t).toString().split(/\s+/))>-1;}},swap:function(e,o,f){for(var i in o){e.style["old"+i]=e.style[i];e.style[i]=o[i];}f.apply(e,[]);for(var i in o)e.style[i]=e.style["old"+i];},css:function(e,p){if(p=="height"||p=="width"){var old={},oHeight,oWidth,d=["Top","Bottom","Right","Left"];jQuery.each(d,function(){old["padding"+this]=0;old["border"+this+"Width"]=0;});jQuery.swap(e,old,function(){if(jQuery(e).is(':visible')){oHeight=e.offsetHeight;oWidth=e.offsetWidth;}else{e=jQuery(e.cloneNode(true)).find(":radio").removeAttr("checked").end().css({visibility:"hidden",position:"absolute",display:"block",right:"0",left:"0"}).appendTo(e.parentNode)[0];var parPos=jQuery.css(e.parentNode,"position")||"static";if(parPos=="static")e.parentNode.style.position="relative";oHeight=e.clientHeight;oWidth=e.clientWidth;if(parPos=="static")e.parentNode.style.position="static";e.parentNode.removeChild(e);}});return p=="height"?oHeight:oWidth;}return jQuery.curCSS(e,p);},curCSS:function(elem,prop,force){var ret,stack=[],swap=[];function color(a){if(!jQuery.browser.safari)return false;var ret=document.defaultView.getComputedStyle(a,null);return!ret||ret.getPropertyValue("color")=="";}if(prop=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret;}if(prop.match(/float/i))prop=styleFloat;if(!force&&elem.style[prop])ret=elem.style[prop];else if(document.defaultView&&document.defaultView.getComputedStyle){if(prop.match(/float/i))prop="float";prop=prop.replace(/([A-Z])/g,"-$1").toLowerCase();var cur=document.defaultView.getComputedStyle(elem,null);if(cur&&!color(elem))ret=cur.getPropertyValue(prop);else{for(var a=elem;a&&color(a);a=a.parentNode)stack.unshift(a);for(a=0;a<stack.length;a++)if(color(stack[a])){swap[a]=stack[a].style.display;stack[a].style.display="block";}ret=prop=="display"&&swap[stack.length-1]!=null?"none":document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop)||"";for(a=0;a<swap.length;a++)if(swap[a]!=null)stack[a].style.display=swap[a];}if(prop=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var newProp=prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});ret=elem.currentStyle[prop]||elem.currentStyle[newProp];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var style=elem.style.left;var runtimeStyle=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;elem.style.left=ret||0;ret=elem.style.pixelLeft+"px";elem.style.left=style;elem.runtimeStyle.left=runtimeStyle;}}return ret;},clean:function(a,doc){var r=[];doc=doc||document;jQuery.each(a,function(i,arg){if(!arg)return;if(arg.constructor==Number)arg=arg.toString();if(typeof arg=="string"){arg=arg.replace(/(<(\w+)[^>]*?)\/>/g,function(m,all,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)?m:all+"></"+tag+">";});var s=jQuery.trim(arg).toLowerCase(),div=doc.createElement("div"),tb=[];var wrap=!s.indexOf("<opt")&&[1,"<select>","</select>"]||!s.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||s.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!s.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+arg+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){if(!s.indexOf("<table")&&s.indexOf("<tbody")<0)tb=div.firstChild&&div.firstChild.childNodes;else if(wrap[1]=="<table>"&&s.indexOf("<tbody")<0)tb=div.childNodes;for(var n=tb.length-1;n>=0;--n)if(jQuery.nodeName(tb[n],"tbody")&&!tb[n].childNodes.length)tb[n].parentNode.removeChild(tb[n]);if(/^\s/.test(arg))div.insertBefore(doc.createTextNode(arg.match(/^\s*/)[0]),div.firstChild);}arg=jQuery.makeArray(div.childNodes);}if(0===arg.length&&(!jQuery.nodeName(arg,"form")&&!jQuery.nodeName(arg,"select")))return;if(arg[0]==undefined||jQuery.nodeName(arg,"form")||arg.options)r.push(arg);else
  746.24 +r=jQuery.merge(r,arg);});return r;},attr:function(elem,name,value){var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(fix[name]){if(value!=undefined)elem[fix[name]]=value;return elem[fix[name]];}else if(jQuery.browser.msie&&name=="style")return jQuery.attr(elem.style,"cssText",value);else if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method"))return elem.getAttributeNode(name).nodeValue;else if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem.setAttribute(name,value);}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem))return elem.getAttribute(name,2);return elem.getAttribute(name);}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";}name=name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});if(value!=undefined)elem[name]=value;return elem[name];}},trim:function(t){return(t||"").replace(/^\s+|\s+$/g,"");},makeArray:function(a){var r=[];if(typeof a!="array")for(var i=0,al=a.length;i<al;i++)r.push(a[i]);else
  746.25 +r=a.slice(0);return r;},inArray:function(b,a){for(var i=0,al=a.length;i<al;i++)if(a[i]==b)return i;return-1;},merge:function(first,second){if(jQuery.browser.msie){for(var i=0;second[i];i++)if(second[i].nodeType!=8)first.push(second[i]);}else
  746.26 +for(var i=0;second[i];i++)first.push(second[i]);return first;},unique:function(first){var r=[],done={};try{for(var i=0,fl=first.length;i<fl;i++){var id=jQuery.data(first[i]);if(!done[id]){done[id]=true;r.push(first[i]);}}}catch(e){r=first;}return r;},grep:function(elems,fn,inv){if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+"}");var result=[];for(var i=0,el=elems.length;i<el;i++)if(!inv&&fn(elems[i],i)||inv&&!fn(elems[i],i))result.push(elems[i]);return result;},map:function(elems,fn){if(typeof fn=="string")fn=eval("false||function(a){return "+fn+"}");var result=[];for(var i=0,el=elems.length;i<el;i++){var val=fn(elems[i],i);if(val!==null&&val!=undefined){if(val.constructor!=Array)val=[val];result=result.concat(val);}}return result;}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",styleFloat:jQuery.browser.msie?"styleFloat":"cssFloat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength"}});jQuery.each({parent:"a.parentNode",parents:"jQuery.dir(a,'parentNode')",next:"jQuery.nth(a,2,'nextSibling')",prev:"jQuery.nth(a,2,'previousSibling')",nextAll:"jQuery.dir(a,'nextSibling')",prevAll:"jQuery.dir(a,'previousSibling')",siblings:"jQuery.sibling(a.parentNode.firstChild,a)",children:"jQuery.sibling(a.firstChild)",contents:"jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)"},function(i,n){jQuery.fn[i]=function(a){var ret=jQuery.map(this,n);if(a&&typeof a=="string")ret=jQuery.multiFilter(a,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(i,n){jQuery.fn[i]=function(){var a=arguments;return this.each(function(){for(var j=0,al=a.length;j<al;j++)jQuery(a[j])[n](this);});};});jQuery.each({removeAttr:function(key){jQuery.attr(this,key,"");this.removeAttribute(key);},addClass:function(c){jQuery.className.add(this,c);},removeClass:function(c){jQuery.className.remove(this,c);},toggleClass:function(c){jQuery.className[jQuery.className.has(this,c)?"remove":"add"](this,c);},remove:function(a){if(!a||jQuery.filter(a,[this]).r.length){jQuery.removeData(this);this.parentNode.removeChild(this);}},empty:function(){jQuery("*",this).each(function(){jQuery.removeData(this);});while(this.firstChild)this.removeChild(this.firstChild);}},function(i,n){jQuery.fn[i]=function(){return this.each(n,arguments);};});jQuery.each(["Height","Width"],function(i,name){var n=name.toLowerCase();jQuery.fn[n]=function(h){return this[0]==window?jQuery.browser.safari&&self["inner"+name]||jQuery.boxModel&&Math.max(document.documentElement["client"+name],document.body["client"+name])||document.body["client"+name]:this[0]==document?Math.max(document.body["scroll"+name],document.body["offset"+name]):h==undefined?(this.length?jQuery.css(this[0],n):null):this.css(n,h.constructor==String?h:h+"px");};});var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":"m[2]=='*'||jQuery.nodeName(a,m[2])","#":"a.getAttribute('id')==m[2]",":":{lt:"i<m[3]-0",gt:"i>m[3]-0",nth:"m[3]-0==i",eq:"m[3]-0==i",first:"i==0",last:"i==r.length-1",even:"i%2==0",odd:"i%2","first-child":"a.parentNode.getElementsByTagName('*')[0]==a","last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a","only-child":"!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",parent:"a.firstChild",empty:"!a.firstChild",contains:"(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",visible:'"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',hidden:'"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',enabled:"!a.disabled",disabled:"a.disabled",checked:"a.checked",selected:"a.selected||jQuery.attr(a,'selected')",text:"'text'==a.type",radio:"'radio'==a.type",checkbox:"'checkbox'==a.type",file:"'file'==a.type",password:"'password'==a.type",submit:"'submit'==a.type",image:"'image'==a.type",reset:"'reset'==a.type",button:'"button"==a.type||jQuery.nodeName(a,"button")',input:"/input|select|textarea|button/i.test(a.nodeName)",has:"jQuery.find(m[3],a).length",header:"/h\\d/i.test(a.nodeName)",animated:"jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&!context.nodeType)context=null;context=context||document;var ret=[context],done=[],last;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false;var re=quickChild;var m=re.exec(t);if(m){var nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName.toUpperCase()))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var nodeName=m[2],merge={};m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName.toUpperCase()){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=jQuery.filter(m[3],r,true).r;else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(\d*)n\+?(\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"n+"+m[3]||m[3]),first=(test[1]||1)-0,last=test[2]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==1){if(last==0||node.nodeIndex==last)add=true;}else if((node.nodeIndex+last)%first==0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var f=jQuery.expr[m[1]];if(typeof f!="string")f=jQuery.expr[m[1]][m[2]];f=eval("false||function(a,i){return "+f+"}");r=jQuery.grep(r,f,not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[];var cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem))r.push(n);}return r;}});jQuery.event={add:function(element,type,handler,data){if(jQuery.browser.msie&&element.setInterval!=undefined)element=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments);};handler.data=data;handler.guid=fn.guid;}var parts=type.split(".");type=parts[0];handler.type=parts[1];var events=jQuery.data(element,"events")||jQuery.data(element,"events",{});var handle=jQuery.data(element,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered)return val;val=jQuery.event.handle.apply(element,arguments);return val;});var handlers=events[type];if(!handlers){handlers=events[type]={};if(element.addEventListener)element.addEventListener(type,handle,false);else
  746.27 +element.attachEvent("on"+type,handle);}handlers[handler.guid]=handler;this.global[type]=true;},guid:1,global:{},remove:function(element,type,handler){var events=jQuery.data(element,"events"),ret,index;if(typeof type=="string"){var parts=type.split(".");type=parts[0];}if(events){if(type&&type.type){handler=type.handler;type=type.type;}if(!type){for(type in events)this.remove(element,type);}else if(events[type]){if(handler)delete events[type][handler.guid];else
  746.28 +for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(element.removeEventListener)element.removeEventListener(type,jQuery.data(element,"handle"),false);else
  746.29 +element.detachEvent("on"+type,jQuery.data(element,"handle"));ret=null;delete events[type];}}for(ret in events)break;if(!ret){jQuery.removeData(element,"events");jQuery.removeData(element,"handle");}}},trigger:function(type,data,element,donative,extra){data=jQuery.makeArray(data||[]);if(!element){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{var val,ret,fn=jQuery.isFunction(element[type]||null),evt=!data[0]||!data[0].preventDefault;if(evt)data.unshift(this.fix({type:type,target:element}));data[0].type=type;if(jQuery.isFunction(jQuery.data(element,"handle")))val=jQuery.data(element,"handle").apply(element,data);if(!fn&&element["on"+type]&&element["on"+type].apply(element,data)===false)val=false;if(evt)data.shift();if(extra&&extra.apply(element,data)===false)val=false;if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(element,'a')&&type=="click")){this.triggered=true;element[type]();}this.triggered=false;}return val;},handle:function(event){var val;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var c=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in c){args[0].handler=c[j];args[0].data=c[j].data;if(!parts[1]||c[j].type==parts[1]){var tmp=c[j].apply(this,args);if(val!==false)val=tmp;if(tmp===false){event.preventDefault();event.stopPropagation();}}}if(jQuery.browser.msie)event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null;return val;},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};if(!event.target&&event.srcElement)event.target=event.srcElement;if(jQuery.browser.safari&&event.target.nodeType==3)event.target=originalEvent.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var e=document.documentElement,b=document.body;event.pageX=event.clientX+(e&&e.scrollLeft||b.scrollLeft||0);event.pageY=event.clientY+(e&&e.scrollTop||b.scrollTop||0);}if(!event.which&&(event.charCode||event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments);},fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){if(this[0])return jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(){var a=arguments;return this.click(function(e){this.lastToggle=0==this.lastToggle?1:0;e.preventDefault();return a[this.lastToggle].apply(this,[e])||false;});},hover:function(f,g){function handleHover(e){var p=e.relatedTarget;while(p&&p!=this)try{p=p.parentNode;}catch(e){p=this;};if(p==this)return false;return(e.type=="mouseover"?f:g).apply(this,[e]);}return this.mouseover(handleHover).mouseout(handleHover);},ready:function(f){bindReady();if(jQuery.isReady)f.apply(document,[jQuery]);else
  746.30 +jQuery.readyList.push(function(){return f.apply(this,[jQuery]);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document);});jQuery.readyList=null;}if(jQuery.browser.mozilla||jQuery.browser.opera)document.removeEventListener("DOMContentLoaded",jQuery.ready,false);if(!window.frames.length)jQuery(window).load(function(){jQuery("#__ie_init").remove();});}}});jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,o){jQuery.fn[o]=function(f){return f?this.bind(o,f):this.trigger(o);};});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(jQuery.browser.mozilla||jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);else if(jQuery.browser.msie){document.write("<scr"+"ipt id=__ie_init defer=true "+"src=//:><\/script>");var script=document.getElementById("__ie_init");if(script)script.onreadystatechange=function(){if(this.readyState!="complete")return;jQuery.ready();};script=null;}else if(jQuery.browser.safari)jQuery.safariTimer=setInterval(function(){if(document.readyState=="loaded"||document.readyState=="complete"){clearInterval(jQuery.safariTimer);jQuery.safariTimer=null;jQuery.ready();}},10);jQuery.event.add(window,"load",jQuery.ready);}jQuery.fn.extend({load:function(url,params,callback){if(jQuery.isFunction(url))return this.bind("load",url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);setTimeout(function(){self.each(callback,[res.responseText,status,res]);},13);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=(new Date).getTime();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null},lastModified:{},ajax:function(s){var jsonp,jsre=/=(\?|%3F)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="get"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=s.data.replace(jsre,"="+jsonp);s.url=s.url.replace(jsre,"="+jsonp);s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&s.type.toLowerCase()=="get")s.url+=(s.url.match(/\?/)?"&":"?")+"_="+(new Date()).getTime();if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");if(!s.url.indexOf("http")&&s.dataType=="script"){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(!jsonp&&(s.success||s.complete)){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return;}var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async);if(s.data)xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");if(s.beforeSend)s.beforeSend(xml);if(s.global)jQuery.event.trigger("ajaxSend",[xml,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
  746.31 +jQuery.handleError(s,xml,status);complete();if(s.async)xml=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xml){xml.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}if(!s.async)onreadystatechange();return xml;function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xml,s]);}function complete(){if(s.complete)s.complete(xml,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}},handleError:function(s,xml,status,e){if(s.error)s.error(xml,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xml,s,e]);},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||jQuery.browser.safari&&r.status==undefined;}catch(e){}return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
  746.32 +for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
  746.33 +s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock?this.oldblock:"";if(jQuery.css(this,"display")=="none")this.style.display="block";}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");if(this.oldblock=="none")this.oldblock="block";this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var opt=jQuery.speed(speed,easing,callback);return this[opt.queue===false?"each":"queue"](function(){opt=jQuery.extend({},opt);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return jQuery.isFunction(opt.complete)&&opt.complete.apply(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
  746.34 +e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.apply(this);}});},stop:function(){var timers=jQuery.timers;return this.each(function(){for(var i=0;i<timers.length;i++)if(timers[i].elem==this)timers.splice(i--,1);}).dequeue();}});var queue=function(elem,type,array){if(!elem)return;var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",array?jQuery.makeArray(array):[]);return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].apply(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.apply(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.apply(this.elem,[this.now,this]);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.curCSS(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.css(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(){return self.step();}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timers.length==1){var timer=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length)clearInterval(timer);},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(){var t=(new Date()).getTime();if(t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done&&jQuery.isFunction(this.options.complete))this.options.complete.apply(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.fx.step={scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}};jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var absolute=jQuery.css(elem,"position")=="absolute",parent=elem.parentNode,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522;if(elem.getBoundingClientRect){box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));if(msie){var border=jQuery("html").css("borderWidth");border=(border=="medium"||jQuery.boxModel&&parseInt(version)>=7)&&2||border;add(-border,-border);}}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&/^t[d|h]$/i.test(parent.tagName)||!safari2)border(offsetParent);if(safari2&&!absolute&&jQuery.css(offsetParent,"position")=="absolute")absolute=true;offsetParent=offsetParent.offsetParent;}while(parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table-row.*$/i.test(jQuery.css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&jQuery.css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if(safari2&&absolute)add(-doc.body.offsetLeft,-doc.body.offsetTop);}results={top:top,left:left};}return results;function border(elem){add(jQuery.css(elem,"borderLeftWidth"),jQuery.css(elem,"borderTopWidth"));}function add(l,t){left+=parseInt(l)||0;top+=parseInt(t)||0;}};})();
  746.35 \ No newline at end of file
   747.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   747.2 +++ b/web/javascript/jquery.js	Sun Aug 16 03:41:39 2009 +0200
   747.3 @@ -0,0 +1,2992 @@
   747.4 +(function(){
   747.5 +/*
   747.6 + * jQuery 1.2.1 - New Wave Javascript
   747.7 + *
   747.8 + * Copyright (c) 2007 John Resig (jquery.com)
   747.9 + * Dual licensed under the MIT (MIT-LICENSE.txt)
  747.10 + * and GPL (GPL-LICENSE.txt) licenses.
  747.11 + *
  747.12 + * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $
  747.13 + * $Rev: 3353 $
  747.14 + */
  747.15 +
  747.16 +// Map over jQuery in case of overwrite
  747.17 +if ( typeof jQuery != "undefined" )
  747.18 +	var _jQuery = jQuery;
  747.19 +
  747.20 +var jQuery = window.jQuery = function(selector, context) {
  747.21 +	// If the context is a namespace object, return a new object
  747.22 +	return this instanceof jQuery ?
  747.23 +		this.init(selector, context) :
  747.24 +		new jQuery(selector, context);
  747.25 +};
  747.26 +
  747.27 +// Map over the $ in case of overwrite
  747.28 +if ( typeof $ != "undefined" )
  747.29 +	var _$ = $;
  747.30 +	
  747.31 +// Map the jQuery namespace to the '$' one
  747.32 +window.$ = jQuery;
  747.33 +
  747.34 +var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;
  747.35 +
  747.36 +jQuery.fn = jQuery.prototype = {
  747.37 +	init: function(selector, context) {
  747.38 +		// Make sure that a selection was provided
  747.39 +		selector = selector || document;
  747.40 +
  747.41 +		// Handle HTML strings
  747.42 +		if ( typeof selector  == "string" ) {
  747.43 +			var m = quickExpr.exec(selector);
  747.44 +			if ( m && (m[1] || !context) ) {
  747.45 +				// HANDLE: $(html) -> $(array)
  747.46 +				if ( m[1] )
  747.47 +					selector = jQuery.clean( [ m[1] ], context );
  747.48 +
  747.49 +				// HANDLE: $("#id")
  747.50 +				else {
  747.51 +					var tmp = document.getElementById( m[3] );
  747.52 +					if ( tmp )
  747.53 +						// Handle the case where IE and Opera return items
  747.54 +						// by name instead of ID
  747.55 +						if ( tmp.id != m[3] )
  747.56 +							return jQuery().find( selector );
  747.57 +						else {
  747.58 +							this[0] = tmp;
  747.59 +							this.length = 1;
  747.60 +							return this;
  747.61 +						}
  747.62 +					else
  747.63 +						selector = [];
  747.64 +				}
  747.65 +
  747.66 +			// HANDLE: $(expr)
  747.67 +			} else
  747.68 +				return new jQuery( context ).find( selector );
  747.69 +
  747.70 +		// HANDLE: $(function)
  747.71 +		// Shortcut for document ready
  747.72 +		} else if ( jQuery.isFunction(selector) )
  747.73 +			return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( selector );
  747.74 +
  747.75 +		return this.setArray(
  747.76 +			// HANDLE: $(array)
  747.77 +			selector.constructor == Array && selector ||
  747.78 +
  747.79 +			// HANDLE: $(arraylike)
  747.80 +			// Watch for when an array-like object is passed as the selector
  747.81 +			(selector.jquery || selector.length && selector != window && !selector.nodeType && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) ||
  747.82 +
  747.83 +			// HANDLE: $(*)
  747.84 +			[ selector ] );
  747.85 +	},
  747.86 +	
  747.87 +	jquery: "1.2.1",
  747.88 +
  747.89 +	size: function() {
  747.90 +		return this.length;
  747.91 +	},
  747.92 +	
  747.93 +	length: 0,
  747.94 +
  747.95 +	get: function( num ) {
  747.96 +		return num == undefined ?
  747.97 +
  747.98 +			// Return a 'clean' array
  747.99 +			jQuery.makeArray( this ) :
 747.100 +
 747.101 +			// Return just the object
 747.102 +			this[num];
 747.103 +	},
 747.104 +	
 747.105 +	pushStack: function( a ) {
 747.106 +		var ret = jQuery(a);
 747.107 +		ret.prevObject = this;
 747.108 +		return ret;
 747.109 +	},
 747.110 +	
 747.111 +	setArray: function( a ) {
 747.112 +		this.length = 0;
 747.113 +		Array.prototype.push.apply( this, a );
 747.114 +		return this;
 747.115 +	},
 747.116 +
 747.117 +	each: function( fn, args ) {
 747.118 +		return jQuery.each( this, fn, args );
 747.119 +	},
 747.120 +
 747.121 +	index: function( obj ) {
 747.122 +		var pos = -1;
 747.123 +		this.each(function(i){
 747.124 +			if ( this == obj ) pos = i;
 747.125 +		});
 747.126 +		return pos;
 747.127 +	},
 747.128 +
 747.129 +	attr: function( key, value, type ) {
 747.130 +		var obj = key;
 747.131 +		
 747.132 +		// Look for the case where we're accessing a style value
 747.133 +		if ( key.constructor == String )
 747.134 +			if ( value == undefined )
 747.135 +				return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined;
 747.136 +			else {
 747.137 +				obj = {};
 747.138 +				obj[ key ] = value;
 747.139 +			}
 747.140 +		
 747.141 +		// Check to see if we're setting style values
 747.142 +		return this.each(function(index){
 747.143 +			// Set all the styles
 747.144 +			for ( var prop in obj )
 747.145 +				jQuery.attr(
 747.146 +					type ? this.style : this,
 747.147 +					prop, jQuery.prop(this, obj[prop], type, index, prop)
 747.148 +				);
 747.149 +		});
 747.150 +	},
 747.151 +
 747.152 +	css: function( key, value ) {
 747.153 +		return this.attr( key, value, "curCSS" );
 747.154 +	},
 747.155 +
 747.156 +	text: function(e) {
 747.157 +		if ( typeof e != "object" && e != null )
 747.158 +			return this.empty().append( document.createTextNode( e ) );
 747.159 +
 747.160 +		var t = "";
 747.161 +		jQuery.each( e || this, function(){
 747.162 +			jQuery.each( this.childNodes, function(){
 747.163 +				if ( this.nodeType != 8 )
 747.164 +					t += this.nodeType != 1 ?
 747.165 +						this.nodeValue : jQuery.fn.text([ this ]);
 747.166 +			});
 747.167 +		});
 747.168 +		return t;
 747.169 +	},
 747.170 +
 747.171 +	wrapAll: function(html) {
 747.172 +		if ( this[0] )
 747.173 +			// The elements to wrap the target around
 747.174 +			jQuery(html, this[0].ownerDocument)
 747.175 +				.clone()
 747.176 +				.insertBefore(this[0])
 747.177 +				.map(function(){
 747.178 +					var elem = this;
 747.179 +					while ( elem.firstChild )
 747.180 +						elem = elem.firstChild;
 747.181 +					return elem;
 747.182 +				})
 747.183 +				.append(this);
 747.184 +
 747.185 +		return this;
 747.186 +	},
 747.187 +
 747.188 +	wrapInner: function(html) {
 747.189 +		return this.each(function(){
 747.190 +			jQuery(this).contents().wrapAll(html);
 747.191 +		});
 747.192 +	},
 747.193 +
 747.194 +	wrap: function(html) {
 747.195 +		return this.each(function(){
 747.196 +			jQuery(this).wrapAll(html);
 747.197 +		});
 747.198 +	},
 747.199 +
 747.200 +	append: function() {
 747.201 +		return this.domManip(arguments, true, 1, function(a){
 747.202 +			this.appendChild( a );
 747.203 +		});
 747.204 +	},
 747.205 +
 747.206 +	prepend: function() {
 747.207 +		return this.domManip(arguments, true, -1, function(a){
 747.208 +			this.insertBefore( a, this.firstChild );
 747.209 +		});
 747.210 +	},
 747.211 +	
 747.212 +	before: function() {
 747.213 +		return this.domManip(arguments, false, 1, function(a){
 747.214 +			this.parentNode.insertBefore( a, this );
 747.215 +		});
 747.216 +	},
 747.217 +
 747.218 +	after: function() {
 747.219 +		return this.domManip(arguments, false, -1, function(a){
 747.220 +			this.parentNode.insertBefore( a, this.nextSibling );
 747.221 +		});
 747.222 +	},
 747.223 +
 747.224 +	end: function() {
 747.225 +		return this.prevObject || jQuery([]);
 747.226 +	},
 747.227 +
 747.228 +	find: function(t) {
 747.229 +		var data = jQuery.map(this, function(a){ return jQuery.find(t,a); });
 747.230 +		return this.pushStack( /[^+>] [^+>]/.test( t ) || t.indexOf("..") > -1 ?
 747.231 +			jQuery.unique( data ) : data );
 747.232 +	},
 747.233 +
 747.234 +	clone: function(events) {
 747.235 +		// Do the clone
 747.236 +		var ret = this.map(function(){
 747.237 +			return this.outerHTML ? jQuery(this.outerHTML)[0] : this.cloneNode(true);
 747.238 +		});
 747.239 +
 747.240 +		// Need to set the expando to null on the cloned set if it exists
 747.241 +		// removeData doesn't work here, IE removes it from the original as well
 747.242 +		// this is primarily for IE but the data expando shouldn't be copied over in any browser
 747.243 +		var clone = ret.find("*").andSelf().each(function(){
 747.244 +			if ( this[ expando ] != undefined )
 747.245 +				this[ expando ] = null;
 747.246 +		});
 747.247 +		
 747.248 +		// Copy the events from the original to the clone
 747.249 +		if (events === true)
 747.250 +			this.find("*").andSelf().each(function(i) {
 747.251 +				var events = jQuery.data(this, "events");
 747.252 +				for ( var type in events )
 747.253 +					for ( var handler in events[type] )
 747.254 +						jQuery.event.add(clone[i], type, events[type][handler], events[type][handler].data);
 747.255 +			});
 747.256 +
 747.257 +		// Return the cloned set
 747.258 +		return ret;
 747.259 +	},
 747.260 +
 747.261 +	filter: function(t) {
 747.262 +		return this.pushStack(
 747.263 +			jQuery.isFunction( t ) &&
 747.264 +			jQuery.grep(this, function(el, index){
 747.265 +				return t.apply(el, [index]);
 747.266 +			}) ||
 747.267 +
 747.268 +			jQuery.multiFilter(t,this) );
 747.269 +	},
 747.270 +
 747.271 +	not: function(t) {
 747.272 +		return this.pushStack(
 747.273 +			t.constructor == String &&
 747.274 +			jQuery.multiFilter(t, this, true) ||
 747.275 +
 747.276 +			jQuery.grep(this, function(a) {
 747.277 +				return ( t.constructor == Array || t.jquery )
 747.278 +					? jQuery.inArray( a, t ) < 0
 747.279 +					: a != t;
 747.280 +			})
 747.281 +		);
 747.282 +	},
 747.283 +
 747.284 +	add: function(t) {
 747.285 +		return this.pushStack( jQuery.merge(
 747.286 +			this.get(),
 747.287 +			t.constructor == String ?
 747.288 +				jQuery(t).get() :
 747.289 +				t.length != undefined && (!t.nodeName || jQuery.nodeName(t, "form")) ?
 747.290 +					t : [t] )
 747.291 +		);
 747.292 +	},
 747.293 +
 747.294 +	is: function(expr) {
 747.295 +		return expr ? jQuery.multiFilter(expr,this).length > 0 : false;
 747.296 +	},
 747.297 +
 747.298 +	hasClass: function(expr) {
 747.299 +		return this.is("." + expr);
 747.300 +	},
 747.301 +	
 747.302 +	val: function( val ) {
 747.303 +		if ( val == undefined ) {
 747.304 +			if ( this.length ) {
 747.305 +				var elem = this[0];
 747.306 +		    	
 747.307 +				// We need to handle select boxes special
 747.308 +				if ( jQuery.nodeName(elem, "select") ) {
 747.309 +					var index = elem.selectedIndex,
 747.310 +						a = [],
 747.311 +						options = elem.options,
 747.312 +						one = elem.type == "select-one";
 747.313 +					
 747.314 +					// Nothing was selected
 747.315 +					if ( index < 0 )
 747.316 +						return null;
 747.317 +
 747.318 +					// Loop through all the selected options
 747.319 +					for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
 747.320 +						var option = options[i];
 747.321 +						if ( option.selected ) {
 747.322 +							// Get the specifc value for the option
 747.323 +							var val = jQuery.browser.msie && !option.attributes["value"].specified ? option.text : option.value;
 747.324 +							
 747.325 +							// We don't need an array for one selects
 747.326 +							if ( one )
 747.327 +								return val;
 747.328 +							
 747.329 +							// Multi-Selects return an array
 747.330 +							a.push(val);
 747.331 +						}
 747.332 +					}
 747.333 +					
 747.334 +					return a;
 747.335 +					
 747.336 +				// Everything else, we just grab the value
 747.337 +				} else
 747.338 +					return this[0].value.replace(/\r/g, "");
 747.339 +			}
 747.340 +		} else
 747.341 +			return this.each(function(){
 747.342 +				if ( val.constructor == Array && /radio|checkbox/.test(this.type) )
 747.343 +					this.checked = (jQuery.inArray(this.value, val) >= 0 ||
 747.344 +						jQuery.inArray(this.name, val) >= 0);
 747.345 +				else if ( jQuery.nodeName(this, "select") ) {
 747.346 +					var tmp = val.constructor == Array ? val : [val];
 747.347 +
 747.348 +					jQuery("option", this).each(function(){
 747.349 +						this.selected = (jQuery.inArray(this.value, tmp) >= 0 ||
 747.350 +						jQuery.inArray(this.text, tmp) >= 0);
 747.351 +					});
 747.352 +
 747.353 +					if ( !tmp.length )
 747.354 +						this.selectedIndex = -1;
 747.355 +				} else
 747.356 +					this.value = val;
 747.357 +			});
 747.358 +	},
 747.359 +	
 747.360 +	html: function( val ) {
 747.361 +		return val == undefined ?
 747.362 +			( this.length ? this[0].innerHTML : null ) :
 747.363 +			this.empty().append( val );
 747.364 +	},
 747.365 +
 747.366 +	replaceWith: function( val ) {
 747.367 +		return this.after( val ).remove();
 747.368 +	},
 747.369 +
 747.370 +	eq: function(i){
 747.371 +		return this.slice(i, i+1);
 747.372 +	},
 747.373 +
 747.374 +	slice: function() {
 747.375 +		return this.pushStack( Array.prototype.slice.apply( this, arguments ) );
 747.376 +	},
 747.377 +
 747.378 +	map: function(fn) {
 747.379 +		return this.pushStack(jQuery.map( this, function(elem,i){
 747.380 +			return fn.call( elem, i, elem );
 747.381 +		}));
 747.382 +	},
 747.383 +
 747.384 +	andSelf: function() {
 747.385 +		return this.add( this.prevObject );
 747.386 +	},
 747.387 +	
 747.388 +	domManip: function(args, table, dir, fn) {
 747.389 +		var clone = this.length > 1, a; 
 747.390 +
 747.391 +		return this.each(function(){
 747.392 +			if ( !a ) {
 747.393 +				a = jQuery.clean(args, this.ownerDocument);
 747.394 +				if ( dir < 0 )
 747.395 +					a.reverse();
 747.396 +			}
 747.397 +
 747.398 +			var obj = this;
 747.399 +
 747.400 +			if ( table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr") )
 747.401 +				obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody"));
 747.402 +
 747.403 +			jQuery.each( a, function(){
 747.404 +				var elem = clone ? this.cloneNode(true) : this;
 747.405 +				if ( !evalScript(0, elem) )
 747.406 +					fn.call( obj, elem );
 747.407 +			});
 747.408 +		});
 747.409 +	}
 747.410 +};
 747.411 +
 747.412 +function evalScript(i, elem){
 747.413 +	var script = jQuery.nodeName(elem, "script");
 747.414 +
 747.415 +	if ( script ) {
 747.416 +		if ( elem.src )
 747.417 +			jQuery.ajax({ url: elem.src, async: false, dataType: "script" });
 747.418 +		else
 747.419 +			jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
 747.420 +	
 747.421 +		if ( elem.parentNode )
 747.422 +			elem.parentNode.removeChild(elem);
 747.423 +
 747.424 +	} else if ( elem.nodeType == 1 )
 747.425 +    jQuery("script", elem).each(evalScript);
 747.426 +
 747.427 +	return script;
 747.428 +}
 747.429 +
 747.430 +jQuery.extend = jQuery.fn.extend = function() {
 747.431 +	// copy reference to target object
 747.432 +	var target = arguments[0] || {}, a = 1, al = arguments.length, deep = false;
 747.433 +
 747.434 +	// Handle a deep copy situation
 747.435 +	if ( target.constructor == Boolean ) {
 747.436 +		deep = target;
 747.437 +		target = arguments[1] || {};
 747.438 +	}
 747.439 +
 747.440 +	// extend jQuery itself if only one argument is passed
 747.441 +	if ( al == 1 ) {
 747.442 +		target = this;
 747.443 +		a = 0;
 747.444 +	}
 747.445 +
 747.446 +	var prop;
 747.447 +
 747.448 +	for ( ; a < al; a++ )
 747.449 +		// Only deal with non-null/undefined values
 747.450 +		if ( (prop = arguments[a]) != null )
 747.451 +			// Extend the base object
 747.452 +			for ( var i in prop ) {
 747.453 +				// Prevent never-ending loop
 747.454 +				if ( target == prop[i] )
 747.455 +					continue;
 747.456 +
 747.457 +				// Recurse if we're merging object values
 747.458 +				if ( deep && typeof prop[i] == 'object' && target[i] )
 747.459 +					jQuery.extend( target[i], prop[i] );
 747.460 +
 747.461 +				// Don't bring in undefined values
 747.462 +				else if ( prop[i] != undefined )
 747.463 +					target[i] = prop[i];
 747.464 +			}
 747.465 +
 747.466 +	// Return the modified object
 747.467 +	return target;
 747.468 +};
 747.469 +
 747.470 +var expando = "jQuery" + (new Date()).getTime(), uuid = 0, win = {};
 747.471 +
 747.472 +jQuery.extend({
 747.473 +	noConflict: function(deep) {
 747.474 +		window.$ = _$;
 747.475 +		if ( deep )
 747.476 +			window.jQuery = _jQuery;
 747.477 +		return jQuery;
 747.478 +	},
 747.479 +
 747.480 +	// This may seem like some crazy code, but trust me when I say that this
 747.481 +	// is the only cross-browser way to do this. --John
 747.482 +	isFunction: function( fn ) {
 747.483 +		return !!fn && typeof fn != "string" && !fn.nodeName && 
 747.484 +			fn.constructor != Array && /function/i.test( fn + "" );
 747.485 +	},
 747.486 +	
 747.487 +	// check if an element is in a XML document
 747.488 +	isXMLDoc: function(elem) {
 747.489 +		return elem.documentElement && !elem.body ||
 747.490 +			elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
 747.491 +	},
 747.492 +
 747.493 +	// Evalulates a script in a global context
 747.494 +	// Evaluates Async. in Safari 2 :-(
 747.495 +	globalEval: function( data ) {
 747.496 +		data = jQuery.trim( data );
 747.497 +		if ( data ) {
 747.498 +			if ( window.execScript )
 747.499 +				window.execScript( data );
 747.500 +			else if ( jQuery.browser.safari )
 747.501 +				// safari doesn't provide a synchronous global eval
 747.502 +				window.setTimeout( data, 0 );
 747.503 +			else
 747.504 +				eval.call( window, data );
 747.505 +		}
 747.506 +	},
 747.507 +
 747.508 +	nodeName: function( elem, name ) {
 747.509 +		return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
 747.510 +	},
 747.511 +	
 747.512 +	cache: {},
 747.513 +	
 747.514 +	data: function( elem, name, data ) {
 747.515 +		elem = elem == window ? win : elem;
 747.516 +
 747.517 +		var id = elem[ expando ];
 747.518 +
 747.519 +		// Compute a unique ID for the element
 747.520 +		if ( !id ) 
 747.521 +			id = elem[ expando ] = ++uuid;
 747.522 +
 747.523 +		// Only generate the data cache if we're
 747.524 +		// trying to access or manipulate it
 747.525 +		if ( name && !jQuery.cache[ id ] )
 747.526 +			jQuery.cache[ id ] = {};
 747.527 +		
 747.528 +		// Prevent overriding the named cache with undefined values
 747.529 +		if ( data != undefined )
 747.530 +			jQuery.cache[ id ][ name ] = data;
 747.531 +		
 747.532 +		// Return the named cache data, or the ID for the element	
 747.533 +		return name ? jQuery.cache[ id ][ name ] : id;
 747.534 +	},
 747.535 +	
 747.536 +	removeData: function( elem, name ) {
 747.537 +		elem = elem == window ? win : elem;
 747.538 +
 747.539 +		var id = elem[ expando ];
 747.540 +
 747.541 +		// If we want to remove a specific section of the element's data
 747.542 +		if ( name ) {
 747.543 +			if ( jQuery.cache[ id ] ) {
 747.544 +				// Remove the section of cache data
 747.545 +				delete jQuery.cache[ id ][ name ];
 747.546 +
 747.547 +				// If we've removed all the data, remove the element's cache
 747.548 +				name = "";
 747.549 +				for ( name in jQuery.cache[ id ] ) break;
 747.550 +				if ( !name )
 747.551 +					jQuery.removeData( elem );
 747.552 +			}
 747.553 +
 747.554 +		// Otherwise, we want to remove all of the element's data
 747.555 +		} else {
 747.556 +			// Clean up the element expando
 747.557 +			try {
 747.558 +				delete elem[ expando ];
 747.559 +			} catch(e){
 747.560 +				// IE has trouble directly removing the expando
 747.561 +				// but it's ok with using removeAttribute
 747.562 +				if ( elem.removeAttribute )
 747.563 +					elem.removeAttribute( expando );
 747.564 +			}
 747.565 +
 747.566 +			// Completely remove the data cache
 747.567 +			delete jQuery.cache[ id ];
 747.568 +		}
 747.569 +	},
 747.570 +
 747.571 +	// args is for internal usage only
 747.572 +	each: function( obj, fn, args ) {
 747.573 +		if ( args ) {
 747.574 +			if ( obj.length == undefined )
 747.575 +				for ( var i in obj )
 747.576 +					fn.apply( obj[i], args );
 747.577 +			else
 747.578 +				for ( var i = 0, ol = obj.length; i < ol; i++ )
 747.579 +					if ( fn.apply( obj[i], args ) === false ) break;
 747.580 +
 747.581 +		// A special, fast, case for the most common use of each
 747.582 +		} else {
 747.583 +			if ( obj.length == undefined )
 747.584 +				for ( var i in obj )
 747.585 +					fn.call( obj[i], i, obj[i] );
 747.586 +			else
 747.587 +				for ( var i = 0, ol = obj.length, val = obj[0]; 
 747.588 +					i < ol && fn.call(val,i,val) !== false; val = obj[++i] ){}
 747.589 +		}
 747.590 +
 747.591 +		return obj;
 747.592 +	},
 747.593 +	
 747.594 +	prop: function(elem, value, type, index, prop){
 747.595 +			// Handle executable functions
 747.596 +			if ( jQuery.isFunction( value ) )
 747.597 +				value = value.call( elem, [index] );
 747.598 +				
 747.599 +			// exclude the following css properties to add px
 747.600 +			var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;
 747.601 +
 747.602 +			// Handle passing in a number to a CSS property
 747.603 +			return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ?
 747.604 +				value + "px" :
 747.605 +				value;
 747.606 +	},
 747.607 +
 747.608 +	className: {
 747.609 +		// internal only, use addClass("class")
 747.610 +		add: function( elem, c ){
 747.611 +			jQuery.each( (c || "").split(/\s+/), function(i, cur){
 747.612 +				if ( !jQuery.className.has( elem.className, cur ) )
 747.613 +					elem.className += ( elem.className ? " " : "" ) + cur;
 747.614 +			});
 747.615 +		},
 747.616 +
 747.617 +		// internal only, use removeClass("class")
 747.618 +		remove: function( elem, c ){
 747.619 +			elem.className = c != undefined ?
 747.620 +				jQuery.grep( elem.className.split(/\s+/), function(cur){
 747.621 +					return !jQuery.className.has( c, cur );	
 747.622 +				}).join(" ") : "";
 747.623 +		},
 747.624 +
 747.625 +		// internal only, use is(".class")
 747.626 +		has: function( t, c ) {
 747.627 +			return jQuery.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1;
 747.628 +		}
 747.629 +	},
 747.630 +
 747.631 +	swap: function(e,o,f) {
 747.632 +		for ( var i in o ) {
 747.633 +			e.style["old"+i] = e.style[i];
 747.634 +			e.style[i] = o[i];
 747.635 +		}
 747.636 +		f.apply( e, [] );
 747.637 +		for ( var i in o )
 747.638 +			e.style[i] = e.style["old"+i];
 747.639 +	},
 747.640 +
 747.641 +	css: function(e,p) {
 747.642 +		if ( p == "height" || p == "width" ) {
 747.643 +			var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"];
 747.644 +
 747.645 +			jQuery.each( d, function(){
 747.646 +				old["padding" + this] = 0;
 747.647 +				old["border" + this + "Width"] = 0;
 747.648 +			});
 747.649 +
 747.650 +			jQuery.swap( e, old, function() {
 747.651 +				if ( jQuery(e).is(':visible') ) {
 747.652 +					oHeight = e.offsetHeight;
 747.653 +					oWidth = e.offsetWidth;
 747.654 +				} else {
 747.655 +					e = jQuery(e.cloneNode(true))
 747.656 +						.find(":radio").removeAttr("checked").end()
 747.657 +						.css({
 747.658 +							visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
 747.659 +						}).appendTo(e.parentNode)[0];
 747.660 +
 747.661 +					var parPos = jQuery.css(e.parentNode,"position") || "static";
 747.662 +					if ( parPos == "static" )
 747.663 +						e.parentNode.style.position = "relative";
 747.664 +
 747.665 +					oHeight = e.clientHeight;
 747.666 +					oWidth = e.clientWidth;
 747.667 +
 747.668 +					if ( parPos == "static" )
 747.669 +						e.parentNode.style.position = "static";
 747.670 +
 747.671 +					e.parentNode.removeChild(e);
 747.672 +				}
 747.673 +			});
 747.674 +
 747.675 +			return p == "height" ? oHeight : oWidth;
 747.676 +		}
 747.677 +
 747.678 +		return jQuery.curCSS( e, p );
 747.679 +	},
 747.680 +
 747.681 +	curCSS: function(elem, prop, force) {
 747.682 +		var ret, stack = [], swap = [];
 747.683 +
 747.684 +		// A helper method for determining if an element's values are broken
 747.685 +		function color(a){
 747.686 +			if ( !jQuery.browser.safari )
 747.687 +				return false;
 747.688 +
 747.689 +			var ret = document.defaultView.getComputedStyle(a,null);
 747.690 +			return !ret || ret.getPropertyValue("color") == "";
 747.691 +		}
 747.692 +
 747.693 +		if (prop == "opacity" && jQuery.browser.msie) {
 747.694 +			ret = jQuery.attr(elem.style, "opacity");
 747.695 +			return ret == "" ? "1" : ret;
 747.696 +		}
 747.697 +		
 747.698 +		if (prop.match(/float/i))
 747.699 +			prop = styleFloat;
 747.700 +
 747.701 +		if (!force && elem.style[prop])
 747.702 +			ret = elem.style[prop];
 747.703 +
 747.704 +		else if (document.defaultView && document.defaultView.getComputedStyle) {
 747.705 +
 747.706 +			if (prop.match(/float/i))
 747.707 +				prop = "float";
 747.708 +
 747.709 +			prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
 747.710 +			var cur = document.defaultView.getComputedStyle(elem, null);
 747.711 +
 747.712 +			if ( cur && !color(elem) )
 747.713 +				ret = cur.getPropertyValue(prop);
 747.714 +
 747.715 +			// If the element isn't reporting its values properly in Safari
 747.716 +			// then some display: none elements are involved
 747.717 +			else {
 747.718 +				// Locate all of the parent display: none elements
 747.719 +				for ( var a = elem; a && color(a); a = a.parentNode )
 747.720 +					stack.unshift(a);
 747.721 +
 747.722 +				// Go through and make them visible, but in reverse
 747.723 +				// (It would be better if we knew the exact display type that they had)
 747.724 +				for ( a = 0; a < stack.length; a++ )
 747.725 +					if ( color(stack[a]) ) {
 747.726 +						swap[a] = stack[a].style.display;
 747.727 +						stack[a].style.display = "block";
 747.728 +					}
 747.729 +
 747.730 +				// Since we flip the display style, we have to handle that
 747.731 +				// one special, otherwise get the value
 747.732 +				ret = prop == "display" && swap[stack.length-1] != null ?
 747.733 +					"none" :
 747.734 +					document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop) || "";
 747.735 +
 747.736 +				// Finally, revert the display styles back
 747.737 +				for ( a = 0; a < swap.length; a++ )
 747.738 +					if ( swap[a] != null )
 747.739 +						stack[a].style.display = swap[a];
 747.740 +			}
 747.741 +
 747.742 +			if ( prop == "opacity" && ret == "" )
 747.743 +				ret = "1";
 747.744 +
 747.745 +		} else if (elem.currentStyle) {
 747.746 +			var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
 747.747 +			ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
 747.748 +
 747.749 +			// From the awesome hack by Dean Edwards
 747.750 +			// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
 747.751 +
 747.752 +			// If we're not dealing with a regular pixel number
 747.753 +			// but a number that has a weird ending, we need to convert it to pixels
 747.754 +			if ( !/^\d+(px)?$/i.test(ret) && /^\d/.test(ret) ) {
 747.755 +				var style = elem.style.left;
 747.756 +				var runtimeStyle = elem.runtimeStyle.left;
 747.757 +				elem.runtimeStyle.left = elem.currentStyle.left;
 747.758 +				elem.style.left = ret || 0;
 747.759 +				ret = elem.style.pixelLeft + "px";
 747.760 +				elem.style.left = style;
 747.761 +				elem.runtimeStyle.left = runtimeStyle;
 747.762 +			}
 747.763 +		}
 747.764 +
 747.765 +		return ret;
 747.766 +	},
 747.767 +	
 747.768 +	clean: function(a, doc) {
 747.769 +		var r = [];
 747.770 +		doc = doc || document;
 747.771 +
 747.772 +		jQuery.each( a, function(i,arg){
 747.773 +			if ( !arg ) return;
 747.774 +
 747.775 +			if ( arg.constructor == Number )
 747.776 +				arg = arg.toString();
 747.777 +			
 747.778 +			// Convert html string into DOM nodes
 747.779 +			if ( typeof arg == "string" ) {
 747.780 +				// Fix "XHTML"-style tags in all browsers
 747.781 +				arg = arg.replace(/(<(\w+)[^>]*?)\/>/g, function(m, all, tag){
 747.782 +					return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)? m : all+"></"+tag+">";
 747.783 +				});
 747.784 +
 747.785 +				// Trim whitespace, otherwise indexOf won't work as expected
 747.786 +				var s = jQuery.trim(arg).toLowerCase(), div = doc.createElement("div"), tb = [];
 747.787 +
 747.788 +				var wrap =
 747.789 +					// option or optgroup
 747.790 +					!s.indexOf("<opt") &&
 747.791 +					[1, "<select>", "</select>"] ||
 747.792 +					
 747.793 +					!s.indexOf("<leg") &&
 747.794 +					[1, "<fieldset>", "</fieldset>"] ||
 747.795 +					
 747.796 +					s.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
 747.797 +					[1, "<table>", "</table>"] ||
 747.798 +					
 747.799 +					!s.indexOf("<tr") &&
 747.800 +					[2, "<table><tbody>", "</tbody></table>"] ||
 747.801 +					
 747.802 +				 	// <thead> matched above
 747.803 +					(!s.indexOf("<td") || !s.indexOf("<th")) &&
 747.804 +					[3, "<table><tbody><tr>", "</tr></tbody></table>"] ||
 747.805 +					
 747.806 +					!s.indexOf("<col") &&
 747.807 +					[2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"] ||
 747.808 +
 747.809 +					// IE can't serialize <link> and <script> tags normally
 747.810 +					jQuery.browser.msie &&
 747.811 +					[1, "div<div>", "</div>"] ||
 747.812 +					
 747.813 +					[0,"",""];
 747.814 +
 747.815 +				// Go to html and back, then peel off extra wrappers
 747.816 +				div.innerHTML = wrap[1] + arg + wrap[2];
 747.817 +				
 747.818 +				// Move to the right depth
 747.819 +				while ( wrap[0]-- )
 747.820 +					div = div.lastChild;
 747.821 +				
 747.822 +				// Remove IE's autoinserted <tbody> from table fragments
 747.823 +				if ( jQuery.browser.msie ) {
 747.824 +					
 747.825 +					// String was a <table>, *may* have spurious <tbody>
 747.826 +					if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 ) 
 747.827 +						tb = div.firstChild && div.firstChild.childNodes;
 747.828 +						
 747.829 +					// String was a bare <thead> or <tfoot>
 747.830 +					else if ( wrap[1] == "<table>" && s.indexOf("<tbody") < 0 )
 747.831 +						tb = div.childNodes;
 747.832 +
 747.833 +					for ( var n = tb.length-1; n >= 0 ; --n )
 747.834 +						if ( jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length )
 747.835 +							tb[n].parentNode.removeChild(tb[n]);
 747.836 +	
 747.837 +					// IE completely kills leading whitespace when innerHTML is used	
 747.838 +					if ( /^\s/.test(arg) )	
 747.839 +						div.insertBefore( doc.createTextNode( arg.match(/^\s*/)[0] ), div.firstChild );
 747.840 +
 747.841 +				}
 747.842 +				
 747.843 +				arg = jQuery.makeArray( div.childNodes );
 747.844 +			}
 747.845 +
 747.846 +			if ( 0 === arg.length && (!jQuery.nodeName(arg, "form") && !jQuery.nodeName(arg, "select")) )
 747.847 +				return;
 747.848 +
 747.849 +			if ( arg[0] == undefined || jQuery.nodeName(arg, "form") || arg.options )
 747.850 +				r.push( arg );
 747.851 +			else
 747.852 +				r = jQuery.merge( r, arg );
 747.853 +
 747.854 +		});
 747.855 +
 747.856 +		return r;
 747.857 +	},
 747.858 +	
 747.859 +	attr: function(elem, name, value){
 747.860 +		var fix = jQuery.isXMLDoc(elem) ? {} : jQuery.props;
 747.861 +
 747.862 +		// Safari mis-reports the default selected property of a hidden option
 747.863 +		// Accessing the parent's selectedIndex property fixes it
 747.864 +		if ( name == "selected" && jQuery.browser.safari )
 747.865 +			elem.parentNode.selectedIndex;
 747.866 +		
 747.867 +		// Certain attributes only work when accessed via the old DOM 0 way
 747.868 +		if ( fix[name] ) {
 747.869 +			if ( value != undefined ) elem[fix[name]] = value;
 747.870 +			return elem[fix[name]];
 747.871 +		} else if ( jQuery.browser.msie && name == "style" )
 747.872 +			return jQuery.attr( elem.style, "cssText", value );
 747.873 +
 747.874 +		else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method") )
 747.875 +			return elem.getAttributeNode(name).nodeValue;
 747.876 +
 747.877 +		// IE elem.getAttribute passes even for style
 747.878 +		else if ( elem.tagName ) {
 747.879 +
 747.880 +			if ( value != undefined ) {
 747.881 +				if ( name == "type" && jQuery.nodeName(elem,"input") && elem.parentNode )
 747.882 +					throw "type property can't be changed";
 747.883 +				elem.setAttribute( name, value );
 747.884 +			}
 747.885 +
 747.886 +			if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) ) 
 747.887 +				return elem.getAttribute( name, 2 );
 747.888 +
 747.889 +			return elem.getAttribute( name );
 747.890 +
 747.891 +		// elem is actually elem.style ... set the style
 747.892 +		} else {
 747.893 +			// IE actually uses filters for opacity
 747.894 +			if ( name == "opacity" && jQuery.browser.msie ) {
 747.895 +				if ( value != undefined ) {
 747.896 +					// IE has trouble with opacity if it does not have layout
 747.897 +					// Force it by setting the zoom level
 747.898 +					elem.zoom = 1; 
 747.899 +	
 747.900 +					// Set the alpha filter to set the opacity
 747.901 +					elem.filter = (elem.filter || "").replace(/alpha\([^)]*\)/,"") +
 747.902 +						(parseFloat(value).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
 747.903 +				}
 747.904 +	
 747.905 +				return elem.filter ? 
 747.906 +					(parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : "";
 747.907 +			}
 747.908 +			name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
 747.909 +			if ( value != undefined ) elem[name] = value;
 747.910 +			return elem[name];
 747.911 +		}
 747.912 +	},
 747.913 +	
 747.914 +	trim: function(t){
 747.915 +		return (t||"").replace(/^\s+|\s+$/g, "");
 747.916 +	},
 747.917 +
 747.918 +	makeArray: function( a ) {
 747.919 +		var r = [];
 747.920 +
 747.921 +		// Need to use typeof to fight Safari childNodes crashes
 747.922 +		if ( typeof a != "array" )
 747.923 +			for ( var i = 0, al = a.length; i < al; i++ )
 747.924 +				r.push( a[i] );
 747.925 +		else
 747.926 +			r = a.slice( 0 );
 747.927 +
 747.928 +		return r;
 747.929 +	},
 747.930 +
 747.931 +	inArray: function( b, a ) {
 747.932 +		for ( var i = 0, al = a.length; i < al; i++ )
 747.933 +			if ( a[i] == b )
 747.934 +				return i;
 747.935 +		return -1;
 747.936 +	},
 747.937 +
 747.938 +	merge: function(first, second) {
 747.939 +		// We have to loop this way because IE & Opera overwrite the length
 747.940 +		// expando of getElementsByTagName
 747.941 +
 747.942 +		// Also, we need to make sure that the correct elements are being returned
 747.943 +		// (IE returns comment nodes in a '*' query)
 747.944 +		if ( jQuery.browser.msie ) {
 747.945 +			for ( var i = 0; second[i]; i++ )
 747.946 +				if ( second[i].nodeType != 8 )
 747.947 +					first.push(second[i]);
 747.948 +		} else
 747.949 +			for ( var i = 0; second[i]; i++ )
 747.950 +				first.push(second[i]);
 747.951 +
 747.952 +		return first;
 747.953 +	},
 747.954 +
 747.955 +	unique: function(first) {
 747.956 +		var r = [], done = {};
 747.957 +
 747.958 +		try {
 747.959 +			for ( var i = 0, fl = first.length; i < fl; i++ ) {
 747.960 +				var id = jQuery.data(first[i]);
 747.961 +				if ( !done[id] ) {
 747.962 +					done[id] = true;
 747.963 +					r.push(first[i]);
 747.964 +				}
 747.965 +			}
 747.966 +		} catch(e) {
 747.967 +			r = first;
 747.968 +		}
 747.969 +
 747.970 +		return r;
 747.971 +	},
 747.972 +
 747.973 +	grep: function(elems, fn, inv) {
 747.974 +		// If a string is passed in for the function, make a function
 747.975 +		// for it (a handy shortcut)
 747.976 +		if ( typeof fn == "string" )
 747.977 +			fn = eval("false||function(a,i){return " + fn + "}");
 747.978 +
 747.979 +		var result = [];
 747.980 +
 747.981 +		// Go through the array, only saving the items
 747.982 +		// that pass the validator function
 747.983 +		for ( var i = 0, el = elems.length; i < el; i++ )
 747.984 +			if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) )
 747.985 +				result.push( elems[i] );
 747.986 +
 747.987 +		return result;
 747.988 +	},
 747.989 +
 747.990 +	map: function(elems, fn) {
 747.991 +		// If a string is passed in for the function, make a function
 747.992 +		// for it (a handy shortcut)
 747.993 +		if ( typeof fn == "string" )
 747.994 +			fn = eval("false||function(a){return " + fn + "}");
 747.995 +
 747.996 +		var result = [];
 747.997 +
 747.998 +		// Go through the array, translating each of the items to their
 747.999 +		// new value (or values).
747.1000 +		for ( var i = 0, el = elems.length; i < el; i++ ) {
747.1001 +			var val = fn(elems[i],i);
747.1002 +
747.1003 +			if ( val !== null && val != undefined ) {
747.1004 +				if ( val.constructor != Array ) val = [val];
747.1005 +				result = result.concat( val );
747.1006 +			}
747.1007 +		}
747.1008 +
747.1009 +		return result;
747.1010 +	}
747.1011 +});
747.1012 +
747.1013 +var userAgent = navigator.userAgent.toLowerCase();
747.1014 +
747.1015 +// Figure out what browser is being used
747.1016 +jQuery.browser = {
747.1017 +	version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
747.1018 +	safari: /webkit/.test(userAgent),
747.1019 +	opera: /opera/.test(userAgent),
747.1020 +	msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
747.1021 +	mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
747.1022 +};
747.1023 +
747.1024 +var styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat";
747.1025 +	
747.1026 +jQuery.extend({
747.1027 +	// Check to see if the W3C box model is being used
747.1028 +	boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
747.1029 +	
747.1030 +	styleFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
747.1031 +	
747.1032 +	props: {
747.1033 +		"for": "htmlFor",
747.1034 +		"class": "className",
747.1035 +		"float": styleFloat,
747.1036 +		cssFloat: styleFloat,
747.1037 +		styleFloat: styleFloat,
747.1038 +		innerHTML: "innerHTML",
747.1039 +		className: "className",
747.1040 +		value: "value",
747.1041 +		disabled: "disabled",
747.1042 +		checked: "checked",
747.1043 +		readonly: "readOnly",
747.1044 +		selected: "selected",
747.1045 +		maxlength: "maxLength"
747.1046 +	}
747.1047 +});
747.1048 +
747.1049 +jQuery.each({
747.1050 +	parent: "a.parentNode",
747.1051 +	parents: "jQuery.dir(a,'parentNode')",
747.1052 +	next: "jQuery.nth(a,2,'nextSibling')",
747.1053 +	prev: "jQuery.nth(a,2,'previousSibling')",
747.1054 +	nextAll: "jQuery.dir(a,'nextSibling')",
747.1055 +	prevAll: "jQuery.dir(a,'previousSibling')",
747.1056 +	siblings: "jQuery.sibling(a.parentNode.firstChild,a)",
747.1057 +	children: "jQuery.sibling(a.firstChild)",
747.1058 +	contents: "jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)"
747.1059 +}, function(i,n){
747.1060 +	jQuery.fn[ i ] = function(a) {
747.1061 +		var ret = jQuery.map(this,n);
747.1062 +		if ( a && typeof a == "string" )
747.1063 +			ret = jQuery.multiFilter(a,ret);
747.1064 +		return this.pushStack( jQuery.unique(ret) );
747.1065 +	};
747.1066 +});
747.1067 +
747.1068 +jQuery.each({
747.1069 +	appendTo: "append",
747.1070 +	prependTo: "prepend",
747.1071 +	insertBefore: "before",
747.1072 +	insertAfter: "after",
747.1073 +	replaceAll: "replaceWith"
747.1074 +}, function(i,n){
747.1075 +	jQuery.fn[ i ] = function(){
747.1076 +		var a = arguments;
747.1077 +		return this.each(function(){
747.1078 +			for ( var j = 0, al = a.length; j < al; j++ )
747.1079 +				jQuery(a[j])[n]( this );
747.1080 +		});
747.1081 +	};
747.1082 +});
747.1083 +
747.1084 +jQuery.each( {
747.1085 +	removeAttr: function( key ) {
747.1086 +		jQuery.attr( this, key, "" );
747.1087 +		this.removeAttribute( key );
747.1088 +	},
747.1089 +	addClass: function(c){
747.1090 +		jQuery.className.add(this,c);
747.1091 +	},
747.1092 +	removeClass: function(c){
747.1093 +		jQuery.className.remove(this,c);
747.1094 +	},
747.1095 +	toggleClass: function( c ){
747.1096 +		jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c);
747.1097 +	},
747.1098 +	remove: function(a){
747.1099 +		if ( !a || jQuery.filter( a, [this] ).r.length ) {
747.1100 +			jQuery.removeData( this );
747.1101 +			this.parentNode.removeChild( this );
747.1102 +		}
747.1103 +	},
747.1104 +	empty: function() {
747.1105 +		// Clean up the cache
747.1106 +		jQuery("*", this).each(function(){ jQuery.removeData(this); });
747.1107 +
747.1108 +		while ( this.firstChild )
747.1109 +			this.removeChild( this.firstChild );
747.1110 +	}
747.1111 +}, function(i,n){
747.1112 +	jQuery.fn[ i ] = function() {
747.1113 +		return this.each( n, arguments );
747.1114 +	};
747.1115 +});
747.1116 +
747.1117 +jQuery.each( [ "Height", "Width" ], function(i,name){
747.1118 +	var n = name.toLowerCase();
747.1119 +	
747.1120 +	jQuery.fn[ n ] = function(h) {
747.1121 +		return this[0] == window ?
747.1122 +			jQuery.browser.safari && self["inner" + name] ||
747.1123 +			jQuery.boxModel && Math.max(document.documentElement["client" + name], document.body["client" + name]) ||
747.1124 +			document.body["client" + name] :
747.1125 +		
747.1126 +			this[0] == document ?
747.1127 +				Math.max( document.body["scroll" + name], document.body["offset" + name] ) :
747.1128 +        
747.1129 +				h == undefined ?
747.1130 +					( this.length ? jQuery.css( this[0], n ) : null ) :
747.1131 +					this.css( n, h.constructor == String ? h : h + "px" );
747.1132 +	};
747.1133 +});
747.1134 +
747.1135 +var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
747.1136 +		"(?:[\\w*_-]|\\\\.)" :
747.1137 +		"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
747.1138 +	quickChild = new RegExp("^>\\s*(" + chars + "+)"),
747.1139 +	quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
747.1140 +	quickClass = new RegExp("^([#.]?)(" + chars + "*)");
747.1141 +
747.1142 +jQuery.extend({
747.1143 +	expr: {
747.1144 +		"": "m[2]=='*'||jQuery.nodeName(a,m[2])",
747.1145 +		"#": "a.getAttribute('id')==m[2]",
747.1146 +		":": {
747.1147 +			// Position Checks
747.1148 +			lt: "i<m[3]-0",
747.1149 +			gt: "i>m[3]-0",
747.1150 +			nth: "m[3]-0==i",
747.1151 +			eq: "m[3]-0==i",
747.1152 +			first: "i==0",
747.1153 +			last: "i==r.length-1",
747.1154 +			even: "i%2==0",
747.1155 +			odd: "i%2",
747.1156 +
747.1157 +			// Child Checks
747.1158 +			"first-child": "a.parentNode.getElementsByTagName('*')[0]==a",
747.1159 +			"last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a",
747.1160 +			"only-child": "!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",
747.1161 +
747.1162 +			// Parent Checks
747.1163 +			parent: "a.firstChild",
747.1164 +			empty: "!a.firstChild",
747.1165 +
747.1166 +			// Text Check
747.1167 +			contains: "(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",
747.1168 +
747.1169 +			// Visibility
747.1170 +			visible: '"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',
747.1171 +			hidden: '"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',
747.1172 +
747.1173 +			// Form attributes
747.1174 +			enabled: "!a.disabled",
747.1175 +			disabled: "a.disabled",
747.1176 +			checked: "a.checked",
747.1177 +			selected: "a.selected||jQuery.attr(a,'selected')",
747.1178 +
747.1179 +			// Form elements
747.1180 +			text: "'text'==a.type",
747.1181 +			radio: "'radio'==a.type",
747.1182 +			checkbox: "'checkbox'==a.type",
747.1183 +			file: "'file'==a.type",
747.1184 +			password: "'password'==a.type",
747.1185 +			submit: "'submit'==a.type",
747.1186 +			image: "'image'==a.type",
747.1187 +			reset: "'reset'==a.type",
747.1188 +			button: '"button"==a.type||jQuery.nodeName(a,"button")',
747.1189 +			input: "/input|select|textarea|button/i.test(a.nodeName)",
747.1190 +
747.1191 +			// :has()
747.1192 +			has: "jQuery.find(m[3],a).length",
747.1193 +
747.1194 +			// :header
747.1195 +			header: "/h\\d/i.test(a.nodeName)",
747.1196 +
747.1197 +			// :animated
747.1198 +			animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"
747.1199 +		}
747.1200 +	},
747.1201 +	
747.1202 +	// The regular expressions that power the parsing engine
747.1203 +	parse: [
747.1204 +		// Match: [@value='test'], [@foo]
747.1205 +		/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
747.1206 +
747.1207 +		// Match: :contains('foo')
747.1208 +		/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,
747.1209 +
747.1210 +		// Match: :even, :last-chlid, #id, .class
747.1211 +		new RegExp("^([:.#]*)(" + chars + "+)")
747.1212 +	],
747.1213 +
747.1214 +	multiFilter: function( expr, elems, not ) {
747.1215 +		var old, cur = [];
747.1216 +
747.1217 +		while ( expr && expr != old ) {
747.1218 +			old = expr;
747.1219 +			var f = jQuery.filter( expr, elems, not );
747.1220 +			expr = f.t.replace(/^\s*,\s*/, "" );
747.1221 +			cur = not ? elems = f.r : jQuery.merge( cur, f.r );
747.1222 +		}
747.1223 +
747.1224 +		return cur;
747.1225 +	},
747.1226 +
747.1227 +	find: function( t, context ) {
747.1228 +		// Quickly handle non-string expressions
747.1229 +		if ( typeof t != "string" )
747.1230 +			return [ t ];
747.1231 +
747.1232 +		// Make sure that the context is a DOM Element
747.1233 +		if ( context && !context.nodeType )
747.1234 +			context = null;
747.1235 +
747.1236 +		// Set the correct context (if none is provided)
747.1237 +		context = context || document;
747.1238 +
747.1239 +		// Initialize the search
747.1240 +		var ret = [context], done = [], last;
747.1241 +
747.1242 +		// Continue while a selector expression exists, and while
747.1243 +		// we're no longer looping upon ourselves
747.1244 +		while ( t && last != t ) {
747.1245 +			var r = [];
747.1246 +			last = t;
747.1247 +
747.1248 +			t = jQuery.trim(t);
747.1249 +
747.1250 +			var foundToken = false;
747.1251 +
747.1252 +			// An attempt at speeding up child selectors that
747.1253 +			// point to a specific element tag
747.1254 +			var re = quickChild;
747.1255 +			var m = re.exec(t);
747.1256 +
747.1257 +			if ( m ) {
747.1258 +				var nodeName = m[1].toUpperCase();
747.1259 +
747.1260 +				// Perform our own iteration and filter
747.1261 +				for ( var i = 0; ret[i]; i++ )
747.1262 +					for ( var c = ret[i].firstChild; c; c = c.nextSibling )
747.1263 +						if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName.toUpperCase()) )
747.1264 +							r.push( c );
747.1265 +
747.1266 +				ret = r;
747.1267 +				t = t.replace( re, "" );
747.1268 +				if ( t.indexOf(" ") == 0 ) continue;
747.1269 +				foundToken = true;
747.1270 +			} else {
747.1271 +				re = /^([>+~])\s*(\w*)/i;
747.1272 +
747.1273 +				if ( (m = re.exec(t)) != null ) {
747.1274 +					r = [];
747.1275 +
747.1276 +					var nodeName = m[2], merge = {};
747.1277 +					m = m[1];
747.1278 +
747.1279 +					for ( var j = 0, rl = ret.length; j < rl; j++ ) {
747.1280 +						var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild;
747.1281 +						for ( ; n; n = n.nextSibling )
747.1282 +							if ( n.nodeType == 1 ) {
747.1283 +								var id = jQuery.data(n);
747.1284 +
747.1285 +								if ( m == "~" && merge[id] ) break;
747.1286 +								
747.1287 +								if (!nodeName || n.nodeName.toUpperCase() == nodeName.toUpperCase() ) {
747.1288 +									if ( m == "~" ) merge[id] = true;
747.1289 +									r.push( n );
747.1290 +								}
747.1291 +								
747.1292 +								if ( m == "+" ) break;
747.1293 +							}
747.1294 +					}
747.1295 +
747.1296 +					ret = r;
747.1297 +
747.1298 +					// And remove the token
747.1299 +					t = jQuery.trim( t.replace( re, "" ) );
747.1300 +					foundToken = true;
747.1301 +				}
747.1302 +			}
747.1303 +
747.1304 +			// See if there's still an expression, and that we haven't already
747.1305 +			// matched a token
747.1306 +			if ( t && !foundToken ) {
747.1307 +				// Handle multiple expressions
747.1308 +				if ( !t.indexOf(",") ) {
747.1309 +					// Clean the result set
747.1310 +					if ( context == ret[0] ) ret.shift();
747.1311 +
747.1312 +					// Merge the result sets
747.1313 +					done = jQuery.merge( done, ret );
747.1314 +
747.1315 +					// Reset the context
747.1316 +					r = ret = [context];
747.1317 +
747.1318 +					// Touch up the selector string
747.1319 +					t = " " + t.substr(1,t.length);
747.1320 +
747.1321 +				} else {
747.1322 +					// Optimize for the case nodeName#idName
747.1323 +					var re2 = quickID;
747.1324 +					var m = re2.exec(t);
747.1325 +					
747.1326 +					// Re-organize the results, so that they're consistent
747.1327 +					if ( m ) {
747.1328 +					   m = [ 0, m[2], m[3], m[1] ];
747.1329 +
747.1330 +					} else {
747.1331 +						// Otherwise, do a traditional filter check for
747.1332 +						// ID, class, and element selectors
747.1333 +						re2 = quickClass;
747.1334 +						m = re2.exec(t);
747.1335 +					}
747.1336 +
747.1337 +					m[2] = m[2].replace(/\\/g, "");
747.1338 +
747.1339 +					var elem = ret[ret.length-1];
747.1340 +
747.1341 +					// Try to do a global search by ID, where we can
747.1342 +					if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
747.1343 +						// Optimization for HTML document case
747.1344 +						var oid = elem.getElementById(m[2]);
747.1345 +						
747.1346 +						// Do a quick check for the existence of the actual ID attribute
747.1347 +						// to avoid selecting by the name attribute in IE
747.1348 +						// also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
747.1349 +						if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] )
747.1350 +							oid = jQuery('[@id="'+m[2]+'"]', elem)[0];
747.1351 +
747.1352 +						// Do a quick check for node name (where applicable) so
747.1353 +						// that div#foo searches will be really fast
747.1354 +						ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];
747.1355 +					} else {
747.1356 +						// We need to find all descendant elements
747.1357 +						for ( var i = 0; ret[i]; i++ ) {
747.1358 +							// Grab the tag name being searched for
747.1359 +							var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2];
747.1360 +
747.1361 +							// Handle IE7 being really dumb about <object>s
747.1362 +							if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" )
747.1363 +								tag = "param";
747.1364 +
747.1365 +							r = jQuery.merge( r, ret[i].getElementsByTagName( tag ));
747.1366 +						}
747.1367 +
747.1368 +						// It's faster to filter by class and be done with it
747.1369 +						if ( m[1] == "." )
747.1370 +							r = jQuery.classFilter( r, m[2] );
747.1371 +
747.1372 +						// Same with ID filtering
747.1373 +						if ( m[1] == "#" ) {
747.1374 +							var tmp = [];
747.1375 +
747.1376 +							// Try to find the element with the ID
747.1377 +							for ( var i = 0; r[i]; i++ )
747.1378 +								if ( r[i].getAttribute("id") == m[2] ) {
747.1379 +									tmp = [ r[i] ];
747.1380 +									break;
747.1381 +								}
747.1382 +
747.1383 +							r = tmp;
747.1384 +						}
747.1385 +
747.1386 +						ret = r;
747.1387 +					}
747.1388 +
747.1389 +					t = t.replace( re2, "" );
747.1390 +				}
747.1391 +
747.1392 +			}
747.1393 +
747.1394 +			// If a selector string still exists
747.1395 +			if ( t ) {
747.1396 +				// Attempt to filter it
747.1397 +				var val = jQuery.filter(t,r);
747.1398 +				ret = r = val.r;
747.1399 +				t = jQuery.trim(val.t);
747.1400 +			}
747.1401 +		}
747.1402 +
747.1403 +		// An error occurred with the selector;
747.1404 +		// just return an empty set instead
747.1405 +		if ( t )
747.1406 +			ret = [];
747.1407 +
747.1408 +		// Remove the root context
747.1409 +		if ( ret && context == ret[0] )
747.1410 +			ret.shift();
747.1411 +
747.1412 +		// And combine the results
747.1413 +		done = jQuery.merge( done, ret );
747.1414 +
747.1415 +		return done;
747.1416 +	},
747.1417 +
747.1418 +	classFilter: function(r,m,not){
747.1419 +		m = " " + m + " ";
747.1420 +		var tmp = [];
747.1421 +		for ( var i = 0; r[i]; i++ ) {
747.1422 +			var pass = (" " + r[i].className + " ").indexOf( m ) >= 0;
747.1423 +			if ( !not && pass || not && !pass )
747.1424 +				tmp.push( r[i] );
747.1425 +		}
747.1426 +		return tmp;
747.1427 +	},
747.1428 +
747.1429 +	filter: function(t,r,not) {
747.1430 +		var last;
747.1431 +
747.1432 +		// Look for common filter expressions
747.1433 +		while ( t  && t != last ) {
747.1434 +			last = t;
747.1435 +
747.1436 +			var p = jQuery.parse, m;
747.1437 +
747.1438 +			for ( var i = 0; p[i]; i++ ) {
747.1439 +				m = p[i].exec( t );
747.1440 +
747.1441 +				if ( m ) {
747.1442 +					// Remove what we just matched
747.1443 +					t = t.substring( m[0].length );
747.1444 +
747.1445 +					m[2] = m[2].replace(/\\/g, "");
747.1446 +					break;
747.1447 +				}
747.1448 +			}
747.1449 +
747.1450 +			if ( !m )
747.1451 +				break;
747.1452 +
747.1453 +			// :not() is a special case that can be optimized by
747.1454 +			// keeping it out of the expression list
747.1455 +			if ( m[1] == ":" && m[2] == "not" )
747.1456 +				r = jQuery.filter(m[3], r, true).r;
747.1457 +
747.1458 +			// We can get a big speed boost by filtering by class here
747.1459 +			else if ( m[1] == "." )
747.1460 +				r = jQuery.classFilter(r, m[2], not);
747.1461 +
747.1462 +			else if ( m[1] == "[" ) {
747.1463 +				var tmp = [], type = m[3];
747.1464 +				
747.1465 +				for ( var i = 0, rl = r.length; i < rl; i++ ) {
747.1466 +					var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
747.1467 +					
747.1468 +					if ( z == null || /href|src|selected/.test(m[2]) )
747.1469 +						z = jQuery.attr(a,m[2]) || '';
747.1470 +
747.1471 +					if ( (type == "" && !!z ||
747.1472 +						 type == "=" && z == m[5] ||
747.1473 +						 type == "!=" && z != m[5] ||
747.1474 +						 type == "^=" && z && !z.indexOf(m[5]) ||
747.1475 +						 type == "$=" && z.substr(z.length - m[5].length) == m[5] ||
747.1476 +						 (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not )
747.1477 +							tmp.push( a );
747.1478 +				}
747.1479 +				
747.1480 +				r = tmp;
747.1481 +
747.1482 +			// We can get a speed boost by handling nth-child here
747.1483 +			} else if ( m[1] == ":" && m[2] == "nth-child" ) {
747.1484 +				var merge = {}, tmp = [],
747.1485 +					test = /(\d*)n\+?(\d*)/.exec(
747.1486 +						m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" ||
747.1487 +						!/\D/.test(m[3]) && "n+" + m[3] || m[3]),
747.1488 +					first = (test[1] || 1) - 0, last = test[2] - 0;
747.1489 +
747.1490 +				for ( var i = 0, rl = r.length; i < rl; i++ ) {
747.1491 +					var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode);
747.1492 +
747.1493 +					if ( !merge[id] ) {
747.1494 +						var c = 1;
747.1495 +
747.1496 +						for ( var n = parentNode.firstChild; n; n = n.nextSibling )
747.1497 +							if ( n.nodeType == 1 )
747.1498 +								n.nodeIndex = c++;
747.1499 +
747.1500 +						merge[id] = true;
747.1501 +					}
747.1502 +
747.1503 +					var add = false;
747.1504 +
747.1505 +					if ( first == 1 ) {
747.1506 +						if ( last == 0 || node.nodeIndex == last )
747.1507 +							add = true;
747.1508 +					} else if ( (node.nodeIndex + last) % first == 0 )
747.1509 +						add = true;
747.1510 +
747.1511 +					if ( add ^ not )
747.1512 +						tmp.push( node );
747.1513 +				}
747.1514 +
747.1515 +				r = tmp;
747.1516 +
747.1517 +			// Otherwise, find the expression to execute
747.1518 +			} else {
747.1519 +				var f = jQuery.expr[m[1]];
747.1520 +				if ( typeof f != "string" )
747.1521 +					f = jQuery.expr[m[1]][m[2]];
747.1522 +
747.1523 +				// Build a custom macro to enclose it
747.1524 +				f = eval("false||function(a,i){return " + f + "}");
747.1525 +
747.1526 +				// Execute it against the current filter
747.1527 +				r = jQuery.grep( r, f, not );
747.1528 +			}
747.1529 +		}
747.1530 +
747.1531 +		// Return an array of filtered elements (r)
747.1532 +		// and the modified expression string (t)
747.1533 +		return { r: r, t: t };
747.1534 +	},
747.1535 +
747.1536 +	dir: function( elem, dir ){
747.1537 +		var matched = [];
747.1538 +		var cur = elem[dir];
747.1539 +		while ( cur && cur != document ) {
747.1540 +			if ( cur.nodeType == 1 )
747.1541 +				matched.push( cur );
747.1542 +			cur = cur[dir];
747.1543 +		}
747.1544 +		return matched;
747.1545 +	},
747.1546 +	
747.1547 +	nth: function(cur,result,dir,elem){
747.1548 +		result = result || 1;
747.1549 +		var num = 0;
747.1550 +
747.1551 +		for ( ; cur; cur = cur[dir] )
747.1552 +			if ( cur.nodeType == 1 && ++num == result )
747.1553 +				break;
747.1554 +
747.1555 +		return cur;
747.1556 +	},
747.1557 +	
747.1558 +	sibling: function( n, elem ) {
747.1559 +		var r = [];
747.1560 +
747.1561 +		for ( ; n; n = n.nextSibling ) {
747.1562 +			if ( n.nodeType == 1 && (!elem || n != elem) )
747.1563 +				r.push( n );
747.1564 +		}
747.1565 +
747.1566 +		return r;
747.1567 +	}
747.1568 +});
747.1569 +/*
747.1570 + * A number of helper functions used for managing events.
747.1571 + * Many of the ideas behind this code orignated from 
747.1572 + * Dean Edwards' addEvent library.
747.1573 + */
747.1574 +jQuery.event = {
747.1575 +
747.1576 +	// Bind an event to an element
747.1577 +	// Original by Dean Edwards
747.1578 +	add: function(element, type, handler, data) {
747.1579 +		// For whatever reason, IE has trouble passing the window object
747.1580 +		// around, causing it to be cloned in the process
747.1581 +		if ( jQuery.browser.msie && element.setInterval != undefined )
747.1582 +			element = window;
747.1583 +
747.1584 +		// Make sure that the function being executed has a unique ID
747.1585 +		if ( !handler.guid )
747.1586 +			handler.guid = this.guid++;
747.1587 +			
747.1588 +		// if data is passed, bind to handler 
747.1589 +		if( data != undefined ) { 
747.1590 +        		// Create temporary function pointer to original handler 
747.1591 +			var fn = handler; 
747.1592 +
747.1593 +			// Create unique handler function, wrapped around original handler 
747.1594 +			handler = function() { 
747.1595 +				// Pass arguments and context to original handler 
747.1596 +				return fn.apply(this, arguments); 
747.1597 +			};
747.1598 +
747.1599 +			// Store data in unique handler 
747.1600 +			handler.data = data;
747.1601 +
747.1602 +			// Set the guid of unique handler to the same of original handler, so it can be removed 
747.1603 +			handler.guid = fn.guid;
747.1604 +		}
747.1605 +
747.1606 +		// Namespaced event handlers
747.1607 +		var parts = type.split(".");
747.1608 +		type = parts[0];
747.1609 +		handler.type = parts[1];
747.1610 +
747.1611 +		// Init the element's event structure
747.1612 +		var events = jQuery.data(element, "events") || jQuery.data(element, "events", {});
747.1613 +		
747.1614 +		var handle = jQuery.data(element, "handle", function(){
747.1615 +			// returned undefined or false
747.1616 +			var val;
747.1617 +
747.1618 +			// Handle the second event of a trigger and when
747.1619 +			// an event is called after a page has unloaded
747.1620 +			if ( typeof jQuery == "undefined" || jQuery.event.triggered )
747.1621 +				return val;
747.1622 +			
747.1623 +			val = jQuery.event.handle.apply(element, arguments);
747.1624 +			
747.1625 +			return val;
747.1626 +		});
747.1627 +
747.1628 +		// Get the current list of functions bound to this event
747.1629 +		var handlers = events[type];
747.1630 +
747.1631 +		// Init the event handler queue
747.1632 +		if (!handlers) {
747.1633 +			handlers = events[type] = {};	
747.1634 +			
747.1635 +			// And bind the global event handler to the element
747.1636 +			if (element.addEventListener)
747.1637 +				element.addEventListener(type, handle, false);
747.1638 +			else
747.1639 +				element.attachEvent("on" + type, handle);
747.1640 +		}
747.1641 +
747.1642 +		// Add the function to the element's handler list
747.1643 +		handlers[handler.guid] = handler;
747.1644 +
747.1645 +		// Keep track of which events have been used, for global triggering
747.1646 +		this.global[type] = true;
747.1647 +	},
747.1648 +
747.1649 +	guid: 1,
747.1650 +	global: {},
747.1651 +
747.1652 +	// Detach an event or set of events from an element
747.1653 +	remove: function(element, type, handler) {
747.1654 +		var events = jQuery.data(element, "events"), ret, index;
747.1655 +
747.1656 +		// Namespaced event handlers
747.1657 +		if ( typeof type == "string" ) {
747.1658 +			var parts = type.split(".");
747.1659 +			type = parts[0];
747.1660 +		}
747.1661 +
747.1662 +		if ( events ) {
747.1663 +			// type is actually an event object here
747.1664 +			if ( type && type.type ) {
747.1665 +				handler = type.handler;
747.1666 +				type = type.type;
747.1667 +			}
747.1668 +			
747.1669 +			if ( !type ) {
747.1670 +				for ( type in events )
747.1671 +					this.remove( element, type );
747.1672 +
747.1673 +			} else if ( events[type] ) {
747.1674 +				// remove the given handler for the given type
747.1675 +				if ( handler )
747.1676 +					delete events[type][handler.guid];
747.1677 +				
747.1678 +				// remove all handlers for the given type
747.1679 +				else
747.1680 +					for ( handler in events[type] )
747.1681 +						// Handle the removal of namespaced events
747.1682 +						if ( !parts[1] || events[type][handler].type == parts[1] )
747.1683 +							delete events[type][handler];
747.1684 +
747.1685 +				// remove generic event handler if no more handlers exist
747.1686 +				for ( ret in events[type] ) break;
747.1687 +				if ( !ret ) {
747.1688 +					if (element.removeEventListener)
747.1689 +						element.removeEventListener(type, jQuery.data(element, "handle"), false);
747.1690 +					else
747.1691 +						element.detachEvent("on" + type, jQuery.data(element, "handle"));
747.1692 +					ret = null;
747.1693 +					delete events[type];
747.1694 +				}
747.1695 +			}
747.1696 +
747.1697 +			// Remove the expando if it's no longer used
747.1698 +			for ( ret in events ) break;
747.1699 +			if ( !ret ) {
747.1700 +				jQuery.removeData( element, "events" );
747.1701 +				jQuery.removeData( element, "handle" );
747.1702 +			}
747.1703 +		}
747.1704 +	},
747.1705 +
747.1706 +	trigger: function(type, data, element, donative, extra) {
747.1707 +		// Clone the incoming data, if any
747.1708 +		data = jQuery.makeArray(data || []);
747.1709 +
747.1710 +		// Handle a global trigger
747.1711 +		if ( !element ) {
747.1712 +			// Only trigger if we've ever bound an event for it
747.1713 +			if ( this.global[type] )
747.1714 +				jQuery("*").add([window, document]).trigger(type, data);
747.1715 +
747.1716 +		// Handle triggering a single element
747.1717 +		} else {
747.1718 +			var val, ret, fn = jQuery.isFunction( element[ type ] || null ),
747.1719 +				// Check to see if we need to provide a fake event, or not
747.1720 +				evt = !data[0] || !data[0].preventDefault;
747.1721 +			
747.1722 +			// Pass along a fake event
747.1723 +			if ( evt )
747.1724 +				data.unshift( this.fix({ type: type, target: element }) );
747.1725 +
747.1726 +			// Enforce the right trigger type
747.1727 +			data[0].type = type;
747.1728 +
747.1729 +			// Trigger the event
747.1730 +			if ( jQuery.isFunction( jQuery.data(element, "handle") ) )
747.1731 +				val = jQuery.data(element, "handle").apply( element, data );
747.1732 +
747.1733 +			// Handle triggering native .onfoo handlers
747.1734 +			if ( !fn && element["on"+type] && element["on"+type].apply( element, data ) === false )
747.1735 +				val = false;
747.1736 +
747.1737 +			// Extra functions don't get the custom event object
747.1738 +			if ( evt )
747.1739 +				data.shift();
747.1740 +
747.1741 +			// Handle triggering of extra function
747.1742 +			if ( extra && extra.apply( element, data ) === false )
747.1743 +				val = false;
747.1744 +
747.1745 +			// Trigger the native events (except for clicks on links)
747.1746 +			if ( fn && donative !== false && val !== false && !(jQuery.nodeName(element, 'a') && type == "click") ) {
747.1747 +				this.triggered = true;
747.1748 +				element[ type ]();
747.1749 +			}
747.1750 +
747.1751 +			this.triggered = false;
747.1752 +		}
747.1753 +
747.1754 +		return val;
747.1755 +	},
747.1756 +
747.1757 +	handle: function(event) {
747.1758 +		// returned undefined or false
747.1759 +		var val;
747.1760 +
747.1761 +		// Empty object is for triggered events with no data
747.1762 +		event = jQuery.event.fix( event || window.event || {} ); 
747.1763 +
747.1764 +		// Namespaced event handlers
747.1765 +		var parts = event.type.split(".");
747.1766 +		event.type = parts[0];
747.1767 +
747.1768 +		var c = jQuery.data(this, "events") && jQuery.data(this, "events")[event.type], args = Array.prototype.slice.call( arguments, 1 );
747.1769 +		args.unshift( event );
747.1770 +
747.1771 +		for ( var j in c ) {
747.1772 +			// Pass in a reference to the handler function itself
747.1773 +			// So that we can later remove it
747.1774 +			args[0].handler = c[j];
747.1775 +			args[0].data = c[j].data;
747.1776 +
747.1777 +			// Filter the functions by class
747.1778 +			if ( !parts[1] || c[j].type == parts[1] ) {
747.1779 +				var tmp = c[j].apply( this, args );
747.1780 +
747.1781 +				if ( val !== false )
747.1782 +					val = tmp;
747.1783 +
747.1784 +				if ( tmp === false ) {
747.1785 +					event.preventDefault();
747.1786 +					event.stopPropagation();
747.1787 +				}
747.1788 +			}
747.1789 +		}
747.1790 +
747.1791 +		// Clean up added properties in IE to prevent memory leak
747.1792 +		if (jQuery.browser.msie)
747.1793 +			event.target = event.preventDefault = event.stopPropagation =
747.1794 +				event.handler = event.data = null;
747.1795 +
747.1796 +		return val;
747.1797 +	},
747.1798 +
747.1799 +	fix: function(event) {
747.1800 +		// store a copy of the original event object 
747.1801 +		// and clone to set read-only properties
747.1802 +		var originalEvent = event;
747.1803 +		event = jQuery.extend({}, originalEvent);
747.1804 +		
747.1805 +		// add preventDefault and stopPropagation since 
747.1806 +		// they will not work on the clone
747.1807 +		event.preventDefault = function() {
747.1808 +			// if preventDefault exists run it on the original event
747.1809 +			if (originalEvent.preventDefault)
747.1810 +				originalEvent.preventDefault();
747.1811 +			// otherwise set the returnValue property of the original event to false (IE)
747.1812 +			originalEvent.returnValue = false;
747.1813 +		};
747.1814 +		event.stopPropagation = function() {
747.1815 +			// if stopPropagation exists run it on the original event
747.1816 +			if (originalEvent.stopPropagation)
747.1817 +				originalEvent.stopPropagation();
747.1818 +			// otherwise set the cancelBubble property of the original event to true (IE)
747.1819 +			originalEvent.cancelBubble = true;
747.1820 +		};
747.1821 +		
747.1822 +		// Fix target property, if necessary
747.1823 +		if ( !event.target && event.srcElement )
747.1824 +			event.target = event.srcElement;
747.1825 +				
747.1826 +		// check if target is a textnode (safari)
747.1827 +		if (jQuery.browser.safari && event.target.nodeType == 3)
747.1828 +			event.target = originalEvent.target.parentNode;
747.1829 +
747.1830 +		// Add relatedTarget, if necessary
747.1831 +		if ( !event.relatedTarget && event.fromElement )
747.1832 +			event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
747.1833 +
747.1834 +		// Calculate pageX/Y if missing and clientX/Y available
747.1835 +		if ( event.pageX == null && event.clientX != null ) {
747.1836 +			var e = document.documentElement, b = document.body;
747.1837 +			event.pageX = event.clientX + (e && e.scrollLeft || b.scrollLeft || 0);
747.1838 +			event.pageY = event.clientY + (e && e.scrollTop || b.scrollTop || 0);
747.1839 +		}
747.1840 +			
747.1841 +		// Add which for key events
747.1842 +		if ( !event.which && (event.charCode || event.keyCode) )
747.1843 +			event.which = event.charCode || event.keyCode;
747.1844 +		
747.1845 +		// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
747.1846 +		if ( !event.metaKey && event.ctrlKey )
747.1847 +			event.metaKey = event.ctrlKey;
747.1848 +
747.1849 +		// Add which for click: 1 == left; 2 == middle; 3 == right
747.1850 +		// Note: button is not normalized, so don't use it
747.1851 +		if ( !event.which && event.button )
747.1852 +			event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
747.1853 +			
747.1854 +		return event;
747.1855 +	}
747.1856 +};
747.1857 +
747.1858 +jQuery.fn.extend({
747.1859 +	bind: function( type, data, fn ) {
747.1860 +		return type == "unload" ? this.one(type, data, fn) : this.each(function(){
747.1861 +			jQuery.event.add( this, type, fn || data, fn && data );
747.1862 +		});
747.1863 +	},
747.1864 +	
747.1865 +	one: function( type, data, fn ) {
747.1866 +		return this.each(function(){
747.1867 +			jQuery.event.add( this, type, function(event) {
747.1868 +				jQuery(this).unbind(event);
747.1869 +				return (fn || data).apply( this, arguments);
747.1870 +			}, fn && data);
747.1871 +		});
747.1872 +	},
747.1873 +
747.1874 +	unbind: function( type, fn ) {
747.1875 +		return this.each(function(){
747.1876 +			jQuery.event.remove( this, type, fn );
747.1877 +		});
747.1878 +	},
747.1879 +
747.1880 +	trigger: function( type, data, fn ) {
747.1881 +		return this.each(function(){
747.1882 +			jQuery.event.trigger( type, data, this, true, fn );
747.1883 +		});
747.1884 +	},
747.1885 +
747.1886 +	triggerHandler: function( type, data, fn ) {
747.1887 +		if ( this[0] )
747.1888 +			return jQuery.event.trigger( type, data, this[0], false, fn );
747.1889 +	},
747.1890 +
747.1891 +	toggle: function() {
747.1892 +		// Save reference to arguments for access in closure
747.1893 +		var a = arguments;
747.1894 +
747.1895 +		return this.click(function(e) {
747.1896 +			// Figure out which function to execute
747.1897 +			this.lastToggle = 0 == this.lastToggle ? 1 : 0;
747.1898 +			
747.1899 +			// Make sure that clicks stop
747.1900 +			e.preventDefault();
747.1901 +			
747.1902 +			// and execute the function
747.1903 +			return a[this.lastToggle].apply( this, [e] ) || false;
747.1904 +		});
747.1905 +	},
747.1906 +
747.1907 +	hover: function(f,g) {
747.1908 +		
747.1909 +		// A private function for handling mouse 'hovering'
747.1910 +		function handleHover(e) {
747.1911 +			// Check if mouse(over|out) are still within the same parent element
747.1912 +			var p = e.relatedTarget;
747.1913 +	
747.1914 +			// Traverse up the tree
747.1915 +			while ( p && p != this ) try { p = p.parentNode; } catch(e) { p = this; };
747.1916 +			
747.1917 +			// If we actually just moused on to a sub-element, ignore it
747.1918 +			if ( p == this ) return false;
747.1919 +			
747.1920 +			// Execute the right function
747.1921 +			return (e.type == "mouseover" ? f : g).apply(this, [e]);
747.1922 +		}
747.1923 +		
747.1924 +		// Bind the function to the two event listeners
747.1925 +		return this.mouseover(handleHover).mouseout(handleHover);
747.1926 +	},
747.1927 +	
747.1928 +	ready: function(f) {
747.1929 +		// Attach the listeners
747.1930 +		bindReady();
747.1931 +
747.1932 +		// If the DOM is already ready
747.1933 +		if ( jQuery.isReady )
747.1934 +			// Execute the function immediately
747.1935 +			f.apply( document, [jQuery] );
747.1936 +			
747.1937 +		// Otherwise, remember the function for later
747.1938 +		else
747.1939 +			// Add the function to the wait list
747.1940 +			jQuery.readyList.push( function() { return f.apply(this, [jQuery]); } );
747.1941 +	
747.1942 +		return this;
747.1943 +	}
747.1944 +});
747.1945 +
747.1946 +jQuery.extend({
747.1947 +	/*
747.1948 +	 * All the code that makes DOM Ready work nicely.
747.1949 +	 */
747.1950 +	isReady: false,
747.1951 +	readyList: [],
747.1952 +	
747.1953 +	// Handle when the DOM is ready
747.1954 +	ready: function() {
747.1955 +		// Make sure that the DOM is not already loaded
747.1956 +		if ( !jQuery.isReady ) {
747.1957 +			// Remember that the DOM is ready
747.1958 +			jQuery.isReady = true;
747.1959 +			
747.1960 +			// If there are functions bound, to execute
747.1961 +			if ( jQuery.readyList ) {
747.1962 +				// Execute all of them
747.1963 +				jQuery.each( jQuery.readyList, function(){
747.1964 +					this.apply( document );
747.1965 +				});
747.1966 +				
747.1967 +				// Reset the list of functions
747.1968 +				jQuery.readyList = null;
747.1969 +			}
747.1970 +			// Remove event listener to avoid memory leak
747.1971 +			if ( jQuery.browser.mozilla || jQuery.browser.opera )
747.1972 +				document.removeEventListener( "DOMContentLoaded", jQuery.ready, false );
747.1973 +			
747.1974 +			// Remove script element used by IE hack
747.1975 +			if( !window.frames.length ) // don't remove if frames are present (#1187)
747.1976 +				jQuery(window).load(function(){ jQuery("#__ie_init").remove(); });
747.1977 +		}
747.1978 +	}
747.1979 +});
747.1980 +
747.1981 +jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
747.1982 +	"mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + 
747.1983 +	"submit,keydown,keypress,keyup,error").split(","), function(i,o){
747.1984 +	
747.1985 +	// Handle event binding
747.1986 +	jQuery.fn[o] = function(f){
747.1987 +		return f ? this.bind(o, f) : this.trigger(o);
747.1988 +	};
747.1989 +});
747.1990 +
747.1991 +var readyBound = false;
747.1992 +
747.1993 +function bindReady(){
747.1994 +	if ( readyBound ) return;
747.1995 +	readyBound = true;
747.1996 +
747.1997 +	// If Mozilla is used
747.1998 +	if ( jQuery.browser.mozilla || jQuery.browser.opera )
747.1999 +		// Use the handy event callback
747.2000 +		document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
747.2001 +	
747.2002 +	// If IE is used, use the excellent hack by Matthias Miller
747.2003 +	// http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
747.2004 +	else if ( jQuery.browser.msie ) {
747.2005 +	
747.2006 +		// Only works if you document.write() it
747.2007 +		document.write("<scr" + "ipt id=__ie_init defer=true " + 
747.2008 +			"src=//:><\/script>");
747.2009 +	
747.2010 +		// Use the defer script hack
747.2011 +		var script = document.getElementById("__ie_init");
747.2012 +		
747.2013 +		// script does not exist if jQuery is loaded dynamically
747.2014 +		if ( script ) 
747.2015 +			script.onreadystatechange = function() {
747.2016 +				if ( this.readyState != "complete" ) return;
747.2017 +				jQuery.ready();
747.2018 +			};
747.2019 +	
747.2020 +		// Clear from memory
747.2021 +		script = null;
747.2022 +	
747.2023 +	// If Safari  is used
747.2024 +	} else if ( jQuery.browser.safari )
747.2025 +		// Continually check to see if the document.readyState is valid
747.2026 +		jQuery.safariTimer = setInterval(function(){
747.2027 +			// loaded and complete are both valid states
747.2028 +			if ( document.readyState == "loaded" || 
747.2029 +				document.readyState == "complete" ) {
747.2030 +	
747.2031 +				// If either one are found, remove the timer
747.2032 +				clearInterval( jQuery.safariTimer );
747.2033 +				jQuery.safariTimer = null;
747.2034 +	
747.2035 +				// and execute any waiting functions
747.2036 +				jQuery.ready();
747.2037 +			}
747.2038 +		}, 10); 
747.2039 +
747.2040 +	// A fallback to window.onload, that will always work
747.2041 +	jQuery.event.add( window, "load", jQuery.ready );
747.2042 +}
747.2043 +jQuery.fn.extend({
747.2044 +	load: function( url, params, callback ) {
747.2045 +		if ( jQuery.isFunction( url ) )
747.2046 +			return this.bind("load", url);
747.2047 +
747.2048 +		var off = url.indexOf(" ");
747.2049 +		if ( off >= 0 ) {
747.2050 +			var selector = url.slice(off, url.length);
747.2051 +			url = url.slice(0, off);
747.2052 +		}
747.2053 +
747.2054 +		callback = callback || function(){};
747.2055 +
747.2056 +		// Default to a GET request
747.2057 +		var type = "GET";
747.2058 +
747.2059 +		// If the second parameter was provided
747.2060 +		if ( params )
747.2061 +			// If it's a function
747.2062 +			if ( jQuery.isFunction( params ) ) {
747.2063 +				// We assume that it's the callback
747.2064 +				callback = params;
747.2065 +				params = null;
747.2066 +
747.2067 +			// Otherwise, build a param string
747.2068 +			} else {
747.2069 +				params = jQuery.param( params );
747.2070 +				type = "POST";
747.2071 +			}
747.2072 +
747.2073 +		var self = this;
747.2074 +
747.2075 +		// Request the remote document
747.2076 +		jQuery.ajax({
747.2077 +			url: url,
747.2078 +			type: type,
747.2079 +			data: params,
747.2080 +			complete: function(res, status){
747.2081 +				// If successful, inject the HTML into all the matched elements
747.2082 +				if ( status == "success" || status == "notmodified" )
747.2083 +					// See if a selector was specified
747.2084 +					self.html( selector ?
747.2085 +						// Create a dummy div to hold the results
747.2086 +						jQuery("<div/>")
747.2087 +							// inject the contents of the document in, removing the scripts
747.2088 +							// to avoid any 'Permission Denied' errors in IE
747.2089 +							.append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))
747.2090 +
747.2091 +							// Locate the specified elements
747.2092 +							.find(selector) :
747.2093 +
747.2094 +						// If not, just inject the full result
747.2095 +						res.responseText );
747.2096 +
747.2097 +				// Add delay to account for Safari's delay in globalEval
747.2098 +				setTimeout(function(){
747.2099 +					self.each( callback, [res.responseText, status, res] );
747.2100 +				}, 13);
747.2101 +			}
747.2102 +		});
747.2103 +		return this;
747.2104 +	},
747.2105 +
747.2106 +	serialize: function() {
747.2107 +		return jQuery.param(this.serializeArray());
747.2108 +	},
747.2109 +	serializeArray: function() {
747.2110 +		return this.map(function(){
747.2111 +			return jQuery.nodeName(this, "form") ?
747.2112 +				jQuery.makeArray(this.elements) : this;
747.2113 +		})
747.2114 +		.filter(function(){
747.2115 +			return this.name && !this.disabled && 
747.2116 +				(this.checked || /select|textarea/i.test(this.nodeName) || 
747.2117 +					/text|hidden|password/i.test(this.type));
747.2118 +		})
747.2119 +		.map(function(i, elem){
747.2120 +			var val = jQuery(this).val();
747.2121 +			return val == null ? null :
747.2122 +				val.constructor == Array ?
747.2123 +					jQuery.map( val, function(val, i){
747.2124 +						return {name: elem.name, value: val};
747.2125 +					}) :
747.2126 +					{name: elem.name, value: val};
747.2127 +		}).get();
747.2128 +	}
747.2129 +});
747.2130 +
747.2131 +// Attach a bunch of functions for handling common AJAX events
747.2132 +jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
747.2133 +	jQuery.fn[o] = function(f){
747.2134 +		return this.bind(o, f);
747.2135 +	};
747.2136 +});
747.2137 +
747.2138 +var jsc = (new Date).getTime();
747.2139 +
747.2140 +jQuery.extend({
747.2141 +	get: function( url, data, callback, type ) {
747.2142 +		// shift arguments if data argument was ommited
747.2143 +		if ( jQuery.isFunction( data ) ) {
747.2144 +			callback = data;
747.2145 +			data = null;
747.2146 +		}
747.2147 +		
747.2148 +		return jQuery.ajax({
747.2149 +			type: "GET",
747.2150 +			url: url,
747.2151 +			data: data,
747.2152 +			success: callback,
747.2153 +			dataType: type
747.2154 +		});
747.2155 +	},
747.2156 +
747.2157 +	getScript: function( url, callback ) {
747.2158 +		return jQuery.get(url, null, callback, "script");
747.2159 +	},
747.2160 +
747.2161 +	getJSON: function( url, data, callback ) {
747.2162 +		return jQuery.get(url, data, callback, "json");
747.2163 +	},
747.2164 +
747.2165 +	post: function( url, data, callback, type ) {
747.2166 +		if ( jQuery.isFunction( data ) ) {
747.2167 +			callback = data;
747.2168 +			data = {};
747.2169 +		}
747.2170 +
747.2171 +		return jQuery.ajax({
747.2172 +			type: "POST",
747.2173 +			url: url,
747.2174 +			data: data,
747.2175 +			success: callback,
747.2176 +			dataType: type
747.2177 +		});
747.2178 +	},
747.2179 +
747.2180 +	ajaxSetup: function( settings ) {
747.2181 +		jQuery.extend( jQuery.ajaxSettings, settings );
747.2182 +	},
747.2183 +
747.2184 +	ajaxSettings: {
747.2185 +		global: true,
747.2186 +		type: "GET",
747.2187 +		timeout: 0,
747.2188 +		contentType: "application/x-www-form-urlencoded",
747.2189 +		processData: true,
747.2190 +		async: true,
747.2191 +		data: null
747.2192 +	},
747.2193 +	
747.2194 +	// Last-Modified header cache for next request
747.2195 +	lastModified: {},
747.2196 +
747.2197 +	ajax: function( s ) {
747.2198 +		var jsonp, jsre = /=(\?|%3F)/g, status, data;
747.2199 +
747.2200 +		// Extend the settings, but re-extend 's' so that it can be
747.2201 +		// checked again later (in the test suite, specifically)
747.2202 +		s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
747.2203 +
747.2204 +		// convert data if not already a string
747.2205 +		if ( s.data && s.processData && typeof s.data != "string" )
747.2206 +			s.data = jQuery.param(s.data);
747.2207 +
747.2208 +		// Handle JSONP Parameter Callbacks
747.2209 +		if ( s.dataType == "jsonp" ) {
747.2210 +			if ( s.type.toLowerCase() == "get" ) {
747.2211 +				if ( !s.url.match(jsre) )
747.2212 +					s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
747.2213 +			} else if ( !s.data || !s.data.match(jsre) )
747.2214 +				s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
747.2215 +			s.dataType = "json";
747.2216 +		}
747.2217 +
747.2218 +		// Build temporary JSONP function
747.2219 +		if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
747.2220 +			jsonp = "jsonp" + jsc++;
747.2221 +
747.2222 +			// Replace the =? sequence both in the query string and the data
747.2223 +			if ( s.data )
747.2224 +				s.data = s.data.replace(jsre, "=" + jsonp);
747.2225 +			s.url = s.url.replace(jsre, "=" + jsonp);
747.2226 +
747.2227 +			// We need to make sure
747.2228 +			// that a JSONP style response is executed properly
747.2229 +			s.dataType = "script";
747.2230 +
747.2231 +			// Handle JSONP-style loading
747.2232 +			window[ jsonp ] = function(tmp){
747.2233 +				data = tmp;
747.2234 +				success();
747.2235 +				complete();
747.2236 +				// Garbage collect
747.2237 +				window[ jsonp ] = undefined;
747.2238 +				try{ delete window[ jsonp ]; } catch(e){}
747.2239 +			};
747.2240 +		}
747.2241 +
747.2242 +		if ( s.dataType == "script" && s.cache == null )
747.2243 +			s.cache = false;
747.2244 +
747.2245 +		if ( s.cache === false && s.type.toLowerCase() == "get" )
747.2246 +			s.url += (s.url.match(/\?/) ? "&" : "?") + "_=" + (new Date()).getTime();
747.2247 +
747.2248 +		// If data is available, append data to url for get requests
747.2249 +		if ( s.data && s.type.toLowerCase() == "get" ) {
747.2250 +			s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
747.2251 +
747.2252 +			// IE likes to send both get and post data, prevent this
747.2253 +			s.data = null;
747.2254 +		}
747.2255 +
747.2256 +		// Watch for a new set of requests
747.2257 +		if ( s.global && ! jQuery.active++ )
747.2258 +			jQuery.event.trigger( "ajaxStart" );
747.2259 +
747.2260 +		// If we're requesting a remote document
747.2261 +		// and trying to load JSON or Script
747.2262 +		if ( !s.url.indexOf("http") && s.dataType == "script" ) {
747.2263 +			var head = document.getElementsByTagName("head")[0];
747.2264 +			var script = document.createElement("script");
747.2265 +			script.src = s.url;
747.2266 +
747.2267 +			// Handle Script loading
747.2268 +			if ( !jsonp && (s.success || s.complete) ) {
747.2269 +				var done = false;
747.2270 +
747.2271 +				// Attach handlers for all browsers
747.2272 +				script.onload = script.onreadystatechange = function(){
747.2273 +					if ( !done && (!this.readyState || 
747.2274 +							this.readyState == "loaded" || this.readyState == "complete") ) {
747.2275 +						done = true;
747.2276 +						success();
747.2277 +						complete();
747.2278 +						head.removeChild( script );
747.2279 +					}
747.2280 +				};
747.2281 +			}
747.2282 +
747.2283 +			head.appendChild(script);
747.2284 +
747.2285 +			// We handle everything using the script element injection
747.2286 +			return;
747.2287 +		}
747.2288 +
747.2289 +		var requestDone = false;
747.2290 +
747.2291 +		// Create the request object; Microsoft failed to properly
747.2292 +		// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
747.2293 +		var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
747.2294 +
747.2295 +		// Open the socket
747.2296 +		xml.open(s.type, s.url, s.async);
747.2297 +
747.2298 +		// Set the correct header, if data is being sent
747.2299 +		if ( s.data )
747.2300 +			xml.setRequestHeader("Content-Type", s.contentType);
747.2301 +
747.2302 +		// Set the If-Modified-Since header, if ifModified mode.
747.2303 +		if ( s.ifModified )
747.2304 +			xml.setRequestHeader("If-Modified-Since",
747.2305 +				jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
747.2306 +
747.2307 +		// Set header so the called script knows that it's an XMLHttpRequest
747.2308 +		xml.setRequestHeader("X-Requested-With", "XMLHttpRequest");
747.2309 +
747.2310 +		// Allow custom headers/mimetypes
747.2311 +		if ( s.beforeSend )
747.2312 +			s.beforeSend(xml);
747.2313 +			
747.2314 +		if ( s.global )
747.2315 +		    jQuery.event.trigger("ajaxSend", [xml, s]);
747.2316 +
747.2317 +		// Wait for a response to come back
747.2318 +		var onreadystatechange = function(isTimeout){
747.2319 +			// The transfer is complete and the data is available, or the request timed out
747.2320 +			if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
747.2321 +				requestDone = true;
747.2322 +				
747.2323 +				// clear poll interval
747.2324 +				if (ival) {
747.2325 +					clearInterval(ival);
747.2326 +					ival = null;
747.2327 +				}
747.2328 +				
747.2329 +				status = isTimeout == "timeout" && "timeout" ||
747.2330 +					!jQuery.httpSuccess( xml ) && "error" ||
747.2331 +					s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" ||
747.2332 +					"success";
747.2333 +
747.2334 +				if ( status == "success" ) {
747.2335 +					// Watch for, and catch, XML document parse errors
747.2336 +					try {
747.2337 +						// process the data (runs the xml through httpData regardless of callback)
747.2338 +						data = jQuery.httpData( xml, s.dataType );
747.2339 +					} catch(e) {
747.2340 +						status = "parsererror";
747.2341 +					}
747.2342 +				}
747.2343 +
747.2344 +				// Make sure that the request was successful or notmodified
747.2345 +				if ( status == "success" ) {
747.2346 +					// Cache Last-Modified header, if ifModified mode.
747.2347 +					var modRes;
747.2348 +					try {
747.2349 +						modRes = xml.getResponseHeader("Last-Modified");
747.2350 +					} catch(e) {} // swallow exception thrown by FF if header is not available
747.2351 +	
747.2352 +					if ( s.ifModified && modRes )
747.2353 +						jQuery.lastModified[s.url] = modRes;
747.2354 +
747.2355 +					// JSONP handles its own success callback
747.2356 +					if ( !jsonp )
747.2357 +						success();	
747.2358 +				} else
747.2359 +					jQuery.handleError(s, xml, status);
747.2360 +
747.2361 +				// Fire the complete handlers
747.2362 +				complete();
747.2363 +
747.2364 +				// Stop memory leaks
747.2365 +				if ( s.async )
747.2366 +					xml = null;
747.2367 +			}
747.2368 +		};
747.2369 +		
747.2370 +		if ( s.async ) {
747.2371 +			// don't attach the handler to the request, just poll it instead
747.2372 +			var ival = setInterval(onreadystatechange, 13); 
747.2373 +
747.2374 +			// Timeout checker
747.2375 +			if ( s.timeout > 0 )
747.2376 +				setTimeout(function(){
747.2377 +					// Check to see if the request is still happening
747.2378 +					if ( xml ) {
747.2379 +						// Cancel the request
747.2380 +						xml.abort();
747.2381 +	
747.2382 +						if( !requestDone )
747.2383 +							onreadystatechange( "timeout" );
747.2384 +					}
747.2385 +				}, s.timeout);
747.2386 +		}
747.2387 +			
747.2388 +		// Send the data
747.2389 +		try {
747.2390 +			xml.send(s.data);
747.2391 +		} catch(e) {
747.2392 +			jQuery.handleError(s, xml, null, e);
747.2393 +		}
747.2394 +		
747.2395 +		// firefox 1.5 doesn't fire statechange for sync requests
747.2396 +		if ( !s.async )
747.2397 +			onreadystatechange();
747.2398 +		
747.2399 +		// return XMLHttpRequest to allow aborting the request etc.
747.2400 +		return xml;
747.2401 +
747.2402 +		function success(){
747.2403 +			// If a local callback was specified, fire it and pass it the data
747.2404 +			if ( s.success )
747.2405 +				s.success( data, status );
747.2406 +
747.2407 +			// Fire the global callback
747.2408 +			if ( s.global )
747.2409 +				jQuery.event.trigger( "ajaxSuccess", [xml, s] );
747.2410 +		}
747.2411 +
747.2412 +		function complete(){
747.2413 +			// Process result
747.2414 +			if ( s.complete )
747.2415 +				s.complete(xml, status);
747.2416 +
747.2417 +			// The request was completed
747.2418 +			if ( s.global )
747.2419 +				jQuery.event.trigger( "ajaxComplete", [xml, s] );
747.2420 +
747.2421 +			// Handle the global AJAX counter
747.2422 +			if ( s.global && ! --jQuery.active )
747.2423 +				jQuery.event.trigger( "ajaxStop" );
747.2424 +		}
747.2425 +	},
747.2426 +
747.2427 +	handleError: function( s, xml, status, e ) {
747.2428 +		// If a local callback was specified, fire it
747.2429 +		if ( s.error ) s.error( xml, status, e );
747.2430 +
747.2431 +		// Fire the global callback
747.2432 +		if ( s.global )
747.2433 +			jQuery.event.trigger( "ajaxError", [xml, s, e] );
747.2434 +	},
747.2435 +
747.2436 +	// Counter for holding the number of active queries
747.2437 +	active: 0,
747.2438 +
747.2439 +	// Determines if an XMLHttpRequest was successful or not
747.2440 +	httpSuccess: function( r ) {
747.2441 +		try {
747.2442 +			return !r.status && location.protocol == "file:" ||
747.2443 +				( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
747.2444 +				jQuery.browser.safari && r.status == undefined;
747.2445 +		} catch(e){}
747.2446 +		return false;
747.2447 +	},
747.2448 +
747.2449 +	// Determines if an XMLHttpRequest returns NotModified
747.2450 +	httpNotModified: function( xml, url ) {
747.2451 +		try {
747.2452 +			var xmlRes = xml.getResponseHeader("Last-Modified");
747.2453 +
747.2454 +			// Firefox always returns 200. check Last-Modified date
747.2455 +			return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
747.2456 +				jQuery.browser.safari && xml.status == undefined;
747.2457 +		} catch(e){}
747.2458 +		return false;
747.2459 +	},
747.2460 +
747.2461 +	httpData: function( r, type ) {
747.2462 +		var ct = r.getResponseHeader("content-type");
747.2463 +		var xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0;
747.2464 +		var data = xml ? r.responseXML : r.responseText;
747.2465 +
747.2466 +		if ( xml && data.documentElement.tagName == "parsererror" )
747.2467 +			throw "parsererror";
747.2468 +
747.2469 +		// If the type is "script", eval it in global context
747.2470 +		if ( type == "script" )
747.2471 +			jQuery.globalEval( data );
747.2472 +
747.2473 +		// Get the JavaScript object, if JSON is used.
747.2474 +		if ( type == "json" )
747.2475 +			data = eval("(" + data + ")");
747.2476 +
747.2477 +		return data;
747.2478 +	},
747.2479 +
747.2480 +	// Serialize an array of form elements or a set of
747.2481 +	// key/values into a query string
747.2482 +	param: function( a ) {
747.2483 +		var s = [];
747.2484 +
747.2485 +		// If an array was passed in, assume that it is an array
747.2486 +		// of form elements
747.2487 +		if ( a.constructor == Array || a.jquery )
747.2488 +			// Serialize the form elements
747.2489 +			jQuery.each( a, function(){
747.2490 +				s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
747.2491 +			});
747.2492 +
747.2493 +		// Otherwise, assume that it's an object of key/value pairs
747.2494 +		else
747.2495 +			// Serialize the key/values
747.2496 +			for ( var j in a )
747.2497 +				// If the value is an array then the key names need to be repeated
747.2498 +				if ( a[j] && a[j].constructor == Array )
747.2499 +					jQuery.each( a[j], function(){
747.2500 +						s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
747.2501 +					});
747.2502 +				else
747.2503 +					s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );
747.2504 +
747.2505 +		// Return the resulting serialization
747.2506 +		return s.join("&").replace(/%20/g, "+");
747.2507 +	}
747.2508 +
747.2509 +});
747.2510 +jQuery.fn.extend({
747.2511 +	show: function(speed,callback){
747.2512 +		return speed ?
747.2513 +			this.animate({
747.2514 +				height: "show", width: "show", opacity: "show"
747.2515 +			}, speed, callback) :
747.2516 +			
747.2517 +			this.filter(":hidden").each(function(){
747.2518 +				this.style.display = this.oldblock ? this.oldblock : "";
747.2519 +				if ( jQuery.css(this,"display") == "none" )
747.2520 +					this.style.display = "block";
747.2521 +			}).end();
747.2522 +	},
747.2523 +	
747.2524 +	hide: function(speed,callback){
747.2525 +		return speed ?
747.2526 +			this.animate({
747.2527 +				height: "hide", width: "hide", opacity: "hide"
747.2528 +			}, speed, callback) :
747.2529 +			
747.2530 +			this.filter(":visible").each(function(){
747.2531 +				this.oldblock = this.oldblock || jQuery.css(this,"display");
747.2532 +				if ( this.oldblock == "none" )
747.2533 +					this.oldblock = "block";
747.2534 +				this.style.display = "none";
747.2535 +			}).end();
747.2536 +	},
747.2537 +
747.2538 +	// Save the old toggle function
747.2539 +	_toggle: jQuery.fn.toggle,
747.2540 +	
747.2541 +	toggle: function( fn, fn2 ){
747.2542 +		return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
747.2543 +			this._toggle( fn, fn2 ) :
747.2544 +			fn ?
747.2545 +				this.animate({
747.2546 +					height: "toggle", width: "toggle", opacity: "toggle"
747.2547 +				}, fn, fn2) :
747.2548 +				this.each(function(){
747.2549 +					jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
747.2550 +				});
747.2551 +	},
747.2552 +	
747.2553 +	slideDown: function(speed,callback){
747.2554 +		return this.animate({height: "show"}, speed, callback);
747.2555 +	},
747.2556 +	
747.2557 +	slideUp: function(speed,callback){
747.2558 +		return this.animate({height: "hide"}, speed, callback);
747.2559 +	},
747.2560 +
747.2561 +	slideToggle: function(speed, callback){
747.2562 +		return this.animate({height: "toggle"}, speed, callback);
747.2563 +	},
747.2564 +	
747.2565 +	fadeIn: function(speed, callback){
747.2566 +		return this.animate({opacity: "show"}, speed, callback);
747.2567 +	},
747.2568 +	
747.2569 +	fadeOut: function(speed, callback){
747.2570 +		return this.animate({opacity: "hide"}, speed, callback);
747.2571 +	},
747.2572 +	
747.2573 +	fadeTo: function(speed,to,callback){
747.2574 +		return this.animate({opacity: to}, speed, callback);
747.2575 +	},
747.2576 +	
747.2577 +	animate: function( prop, speed, easing, callback ) {
747.2578 +		var opt = jQuery.speed(speed, easing, callback);
747.2579 +
747.2580 +		return this[ opt.queue === false ? "each" : "queue" ](function(){
747.2581 +			opt = jQuery.extend({}, opt);
747.2582 +			var hidden = jQuery(this).is(":hidden"), self = this;
747.2583 +			
747.2584 +			for ( var p in prop ) {
747.2585 +				if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
747.2586 +					return jQuery.isFunction(opt.complete) && opt.complete.apply(this);
747.2587 +
747.2588 +				if ( p == "height" || p == "width" ) {
747.2589 +					// Store display property
747.2590 +					opt.display = jQuery.css(this, "display");
747.2591 +
747.2592 +					// Make sure that nothing sneaks out
747.2593 +					opt.overflow = this.style.overflow;
747.2594 +				}
747.2595 +			}
747.2596 +
747.2597 +			if ( opt.overflow != null )
747.2598 +				this.style.overflow = "hidden";
747.2599 +
747.2600 +			opt.curAnim = jQuery.extend({}, prop);
747.2601 +			
747.2602 +			jQuery.each( prop, function(name, val){
747.2603 +				var e = new jQuery.fx( self, opt, name );
747.2604 +
747.2605 +				if ( /toggle|show|hide/.test(val) )
747.2606 +					e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
747.2607 +				else {
747.2608 +					var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
747.2609 +						start = e.cur(true) || 0;
747.2610 +
747.2611 +					if ( parts ) {
747.2612 +						var end = parseFloat(parts[2]),
747.2613 +							unit = parts[3] || "px";
747.2614 +
747.2615 +						// We need to compute starting value
747.2616 +						if ( unit != "px" ) {
747.2617 +							self.style[ name ] = (end || 1) + unit;
747.2618 +							start = ((end || 1) / e.cur(true)) * start;
747.2619 +							self.style[ name ] = start + unit;
747.2620 +						}
747.2621 +
747.2622 +						// If a +=/-= token was provided, we're doing a relative animation
747.2623 +						if ( parts[1] )
747.2624 +							end = ((parts[1] == "-=" ? -1 : 1) * end) + start;
747.2625 +
747.2626 +						e.custom( start, end, unit );
747.2627 +					} else
747.2628 +						e.custom( start, val, "" );
747.2629 +				}
747.2630 +			});
747.2631 +
747.2632 +			// For JS strict compliance
747.2633 +			return true;
747.2634 +		});
747.2635 +	},
747.2636 +	
747.2637 +	queue: function(type, fn){
747.2638 +		if ( jQuery.isFunction(type) ) {
747.2639 +			fn = type;
747.2640 +			type = "fx";
747.2641 +		}
747.2642 +
747.2643 +		if ( !type || (typeof type == "string" && !fn) )
747.2644 +			return queue( this[0], type );
747.2645 +
747.2646 +		return this.each(function(){
747.2647 +			if ( fn.constructor == Array )
747.2648 +				queue(this, type, fn);
747.2649 +			else {
747.2650 +				queue(this, type).push( fn );
747.2651 +			
747.2652 +				if ( queue(this, type).length == 1 )
747.2653 +					fn.apply(this);
747.2654 +			}
747.2655 +		});
747.2656 +	},
747.2657 +
747.2658 +	stop: function(){
747.2659 +		var timers = jQuery.timers;
747.2660 +
747.2661 +		return this.each(function(){
747.2662 +			for ( var i = 0; i < timers.length; i++ )
747.2663 +				if ( timers[i].elem == this )
747.2664 +					timers.splice(i--, 1);
747.2665 +		}).dequeue();
747.2666 +	}
747.2667 +
747.2668 +});
747.2669 +
747.2670 +var queue = function( elem, type, array ) {
747.2671 +	if ( !elem )
747.2672 +		return;
747.2673 +
747.2674 +	var q = jQuery.data( elem, type + "queue" );
747.2675 +
747.2676 +	if ( !q || array )
747.2677 +		q = jQuery.data( elem, type + "queue", 
747.2678 +			array ? jQuery.makeArray(array) : [] );
747.2679 +
747.2680 +	return q;
747.2681 +};
747.2682 +
747.2683 +jQuery.fn.dequeue = function(type){
747.2684 +	type = type || "fx";
747.2685 +
747.2686 +	return this.each(function(){
747.2687 +		var q = queue(this, type);
747.2688 +
747.2689 +		q.shift();
747.2690 +
747.2691 +		if ( q.length )
747.2692 +			q[0].apply( this );
747.2693 +	});
747.2694 +};
747.2695 +
747.2696 +jQuery.extend({
747.2697 +	
747.2698 +	speed: function(speed, easing, fn) {
747.2699 +		var opt = speed && speed.constructor == Object ? speed : {
747.2700 +			complete: fn || !fn && easing || 
747.2701 +				jQuery.isFunction( speed ) && speed,
747.2702 +			duration: speed,
747.2703 +			easing: fn && easing || easing && easing.constructor != Function && easing
747.2704 +		};
747.2705 +
747.2706 +		opt.duration = (opt.duration && opt.duration.constructor == Number ? 
747.2707 +			opt.duration : 
747.2708 +			{ slow: 600, fast: 200 }[opt.duration]) || 400;
747.2709 +	
747.2710 +		// Queueing
747.2711 +		opt.old = opt.complete;
747.2712 +		opt.complete = function(){
747.2713 +			jQuery(this).dequeue();
747.2714 +			if ( jQuery.isFunction( opt.old ) )
747.2715 +				opt.old.apply( this );
747.2716 +		};
747.2717 +	
747.2718 +		return opt;
747.2719 +	},
747.2720 +	
747.2721 +	easing: {
747.2722 +		linear: function( p, n, firstNum, diff ) {
747.2723 +			return firstNum + diff * p;
747.2724 +		},
747.2725 +		swing: function( p, n, firstNum, diff ) {
747.2726 +			return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
747.2727 +		}
747.2728 +	},
747.2729 +	
747.2730 +	timers: [],
747.2731 +
747.2732 +	fx: function( elem, options, prop ){
747.2733 +		this.options = options;
747.2734 +		this.elem = elem;
747.2735 +		this.prop = prop;
747.2736 +
747.2737 +		if ( !options.orig )
747.2738 +			options.orig = {};
747.2739 +	}
747.2740 +
747.2741 +});
747.2742 +
747.2743 +jQuery.fx.prototype = {
747.2744 +
747.2745 +	// Simple function for setting a style value
747.2746 +	update: function(){
747.2747 +		if ( this.options.step )
747.2748 +			this.options.step.apply( this.elem, [ this.now, this ] );
747.2749 +
747.2750 +		(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
747.2751 +
747.2752 +		// Set display property to block for height/width animations
747.2753 +		if ( this.prop == "height" || this.prop == "width" )
747.2754 +			this.elem.style.display = "block";
747.2755 +	},
747.2756 +
747.2757 +	// Get the current size
747.2758 +	cur: function(force){
747.2759 +		if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null )
747.2760 +			return this.elem[ this.prop ];
747.2761 +
747.2762 +		var r = parseFloat(jQuery.curCSS(this.elem, this.prop, force));
747.2763 +		return r && r > -10000 ? r : parseFloat(jQuery.css(this.elem, this.prop)) || 0;
747.2764 +	},
747.2765 +
747.2766 +	// Start an animation from one number to another
747.2767 +	custom: function(from, to, unit){
747.2768 +		this.startTime = (new Date()).getTime();
747.2769 +		this.start = from;
747.2770 +		this.end = to;
747.2771 +		this.unit = unit || this.unit || "px";
747.2772 +		this.now = this.start;
747.2773 +		this.pos = this.state = 0;
747.2774 +		this.update();
747.2775 +
747.2776 +		var self = this;
747.2777 +		function t(){
747.2778 +			return self.step();
747.2779 +		}
747.2780 +
747.2781 +		t.elem = this.elem;
747.2782 +
747.2783 +		jQuery.timers.push(t);
747.2784 +
747.2785 +		if ( jQuery.timers.length == 1 ) {
747.2786 +			var timer = setInterval(function(){
747.2787 +				var timers = jQuery.timers;
747.2788 +				
747.2789 +				for ( var i = 0; i < timers.length; i++ )
747.2790 +					if ( !timers[i]() )
747.2791 +						timers.splice(i--, 1);
747.2792 +
747.2793 +				if ( !timers.length )
747.2794 +					clearInterval( timer );
747.2795 +			}, 13);
747.2796 +		}
747.2797 +	},
747.2798 +
747.2799 +	// Simple 'show' function
747.2800 +	show: function(){
747.2801 +		// Remember where we started, so that we can go back to it later
747.2802 +		this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
747.2803 +		this.options.show = true;
747.2804 +
747.2805 +		// Begin the animation
747.2806 +		this.custom(0, this.cur());
747.2807 +
747.2808 +		// Make sure that we start at a small width/height to avoid any
747.2809 +		// flash of content
747.2810 +		if ( this.prop == "width" || this.prop == "height" )
747.2811 +			this.elem.style[this.prop] = "1px";
747.2812 +		
747.2813 +		// Start by showing the element
747.2814 +		jQuery(this.elem).show();
747.2815 +	},
747.2816 +
747.2817 +	// Simple 'hide' function
747.2818 +	hide: function(){
747.2819 +		// Remember where we started, so that we can go back to it later
747.2820 +		this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
747.2821 +		this.options.hide = true;
747.2822 +
747.2823 +		// Begin the animation
747.2824 +		this.custom(this.cur(), 0);
747.2825 +	},
747.2826 +
747.2827 +	// Each step of an animation
747.2828 +	step: function(){
747.2829 +		var t = (new Date()).getTime();
747.2830 +
747.2831 +		if ( t > this.options.duration + this.startTime ) {
747.2832 +			this.now = this.end;
747.2833 +			this.pos = this.state = 1;
747.2834 +			this.update();
747.2835 +
747.2836 +			this.options.curAnim[ this.prop ] = true;
747.2837 +
747.2838 +			var done = true;
747.2839 +			for ( var i in this.options.curAnim )
747.2840 +				if ( this.options.curAnim[i] !== true )
747.2841 +					done = false;
747.2842 +
747.2843 +			if ( done ) {
747.2844 +				if ( this.options.display != null ) {
747.2845 +					// Reset the overflow
747.2846 +					this.elem.style.overflow = this.options.overflow;
747.2847 +				
747.2848 +					// Reset the display
747.2849 +					this.elem.style.display = this.options.display;
747.2850 +					if ( jQuery.css(this.elem, "display") == "none" )
747.2851 +						this.elem.style.display = "block";
747.2852 +				}
747.2853 +
747.2854 +				// Hide the element if the "hide" operation was done
747.2855 +				if ( this.options.hide )
747.2856 +					this.elem.style.display = "none";
747.2857 +
747.2858 +				// Reset the properties, if the item has been hidden or shown
747.2859 +				if ( this.options.hide || this.options.show )
747.2860 +					for ( var p in this.options.curAnim )
747.2861 +						jQuery.attr(this.elem.style, p, this.options.orig[p]);
747.2862 +			}
747.2863 +
747.2864 +			// If a callback was provided, execute it
747.2865 +			if ( done && jQuery.isFunction( this.options.complete ) )
747.2866 +				// Execute the complete function
747.2867 +				this.options.complete.apply( this.elem );
747.2868 +
747.2869 +			return false;
747.2870 +		} else {
747.2871 +			var n = t - this.startTime;
747.2872 +			this.state = n / this.options.duration;
747.2873 +
747.2874 +			// Perform the easing function, defaults to swing
747.2875 +			this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
747.2876 +			this.now = this.start + ((this.end - this.start) * this.pos);
747.2877 +
747.2878 +			// Perform the next step of the animation
747.2879 +			this.update();
747.2880 +		}
747.2881 +
747.2882 +		return true;
747.2883 +	}
747.2884 +
747.2885 +};
747.2886 +
747.2887 +jQuery.fx.step = {
747.2888 +	scrollLeft: function(fx){
747.2889 +		fx.elem.scrollLeft = fx.now;
747.2890 +	},
747.2891 +
747.2892 +	scrollTop: function(fx){
747.2893 +		fx.elem.scrollTop = fx.now;
747.2894 +	},
747.2895 +
747.2896 +	opacity: function(fx){
747.2897 +		jQuery.attr(fx.elem.style, "opacity", fx.now);
747.2898 +	},
747.2899 +
747.2900 +	_default: function(fx){
747.2901 +		fx.elem.style[ fx.prop ] = fx.now + fx.unit;
747.2902 +	}
747.2903 +};
747.2904 +// The Offset Method
747.2905 +// Originally By Brandon Aaron, part of the Dimension Plugin
747.2906 +// http://jquery.com/plugins/project/dimensions
747.2907 +jQuery.fn.offset = function() {
747.2908 +	var left = 0, top = 0, elem = this[0], results;
747.2909 +	
747.2910 +	if ( elem ) with ( jQuery.browser ) {
747.2911 +		var	absolute     = jQuery.css(elem, "position") == "absolute", 
747.2912 +		    parent       = elem.parentNode, 
747.2913 +		    offsetParent = elem.offsetParent, 
747.2914 +		    doc          = elem.ownerDocument,
747.2915 +		    safari2      = safari && parseInt(version) < 522;
747.2916 +	
747.2917 +		// Use getBoundingClientRect if available
747.2918 +		if ( elem.getBoundingClientRect ) {
747.2919 +			box = elem.getBoundingClientRect();
747.2920 +		
747.2921 +			// Add the document scroll offsets
747.2922 +			add(
747.2923 +				box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
747.2924 +				box.top  + Math.max(doc.documentElement.scrollTop,  doc.body.scrollTop)
747.2925 +			);
747.2926 +		
747.2927 +			// IE adds the HTML element's border, by default it is medium which is 2px
747.2928 +			// IE 6 and IE 7 quirks mode the border width is overwritable by the following css html { border: 0; }
747.2929 +			// IE 7 standards mode, the border is always 2px
747.2930 +			if ( msie ) {
747.2931 +				var border = jQuery("html").css("borderWidth");
747.2932 +				border = (border == "medium" || jQuery.boxModel && parseInt(version) >= 7) && 2 || border;
747.2933 +				add( -border, -border );
747.2934 +			}
747.2935 +	
747.2936 +		// Otherwise loop through the offsetParents and parentNodes
747.2937 +		} else {
747.2938 +		
747.2939 +			// Initial element offsets
747.2940 +			add( elem.offsetLeft, elem.offsetTop );
747.2941 +		
747.2942 +			// Get parent offsets
747.2943 +			while ( offsetParent ) {
747.2944 +				// Add offsetParent offsets
747.2945 +				add( offsetParent.offsetLeft, offsetParent.offsetTop );
747.2946 +			
747.2947 +				// Mozilla and Safari > 2 does not include the border on offset parents
747.2948 +				// However Mozilla adds the border for table cells
747.2949 +				if ( mozilla && /^t[d|h]$/i.test(parent.tagName) || !safari2 )
747.2950 +					border( offsetParent );
747.2951 +				
747.2952 +				// Safari <= 2 doubles body offsets with an absolutely positioned element or parent
747.2953 +				if ( safari2 && !absolute && jQuery.css(offsetParent, "position") == "absolute" )
747.2954 +					absolute = true;
747.2955 +			
747.2956 +				// Get next offsetParent
747.2957 +				offsetParent = offsetParent.offsetParent;
747.2958 +			}
747.2959 +		
747.2960 +			// Get parent scroll offsets
747.2961 +			while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
747.2962 +				// Work around opera inline/table scrollLeft/Top bug
747.2963 +				if ( !/^inline|table-row.*$/i.test(jQuery.css(parent, "display")) )
747.2964 +					// Subtract parent scroll offsets
747.2965 +					add( -parent.scrollLeft, -parent.scrollTop );
747.2966 +			
747.2967 +				// Mozilla does not add the border for a parent that has overflow != visible
747.2968 +				if ( mozilla && jQuery.css(parent, "overflow") != "visible" )
747.2969 +					border( parent );
747.2970 +			
747.2971 +				// Get next parent
747.2972 +				parent = parent.parentNode;
747.2973 +			}
747.2974 +		
747.2975 +			// Safari doubles body offsets with an absolutely positioned element or parent
747.2976 +			if ( safari2 && absolute )
747.2977 +				add( -doc.body.offsetLeft, -doc.body.offsetTop );
747.2978 +		}
747.2979 +
747.2980 +		// Return an object with top and left properties
747.2981 +		results = { top: top, left: left };
747.2982 +	}
747.2983 +
747.2984 +	return results;
747.2985 +
747.2986 +	function border(elem) {
747.2987 +		add( jQuery.css(elem, "borderLeftWidth"), jQuery.css(elem, "borderTopWidth") );
747.2988 +	}
747.2989 +
747.2990 +	function add(l, t) {
747.2991 +		left += parseInt(l) || 0;
747.2992 +		top += parseInt(t) || 0;
747.2993 +	}
747.2994 +};
747.2995 +})();
   748.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   748.2 +++ b/web/robots.txt	Sun Aug 16 03:41:39 2009 +0200
   748.3 @@ -0,0 +1,2 @@
   748.4 +User-agent: *
   748.5 +Disallow: /feeds/
   749.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   749.2 +++ b/web/styles.css	Sun Aug 16 03:41:39 2009 +0200
   749.3 @@ -0,0 +1,292 @@
   749.4 +body {
   749.5 +  background: #f2f1f0;
   749.6 +  font-family: verdana,sans-serif;
   749.7 +}
   749.8 +
   749.9 +.navheader, .book, .preface, .chapter, .appendix, .bibliography, .navfooter, .basetemplate {
  749.10 +  width: 50em;
  749.11 +  margin-left: auto;
  749.12 +  margin-right: auto;
  749.13 +}
  749.14 +
  749.15 +a.commenttoggle:hover, a.commenttoggle:active {
  749.16 +  opacity: 0.7;
  749.17 +}
  749.18 +
  749.19 +a:hover, a:active {
  749.20 +  border-bottom: 1px solid #aaaaaa;
  749.21 +}
  749.22 +
  749.23 +.book, .preface, .chapter, .appendix, .bibliography, .basetemplate {
  749.24 +  background: white;
  749.25 +  padding: 2em;
  749.26 +}
  749.27 +
  749.28 +h1 {
  749.29 +  margin-top: 1.5em;
  749.30 +}
  749.31 +
  749.32 +span.beta {
  749.33 +  font-size: 80%;
  749.34 +  font-style: italic;
  749.35 +  opacity: 0.4;
  749.36 +}
  749.37 +
  749.38 +h2, h3 {
  749.39 +  margin-top: 2em;
  749.40 +}
  749.41 +
  749.42 +h1, h2, h3 {
  749.43 +  font-family: georgia,serif;
  749.44 +  font-weight: normal;
  749.45 +  margin-bottom: 0.5em;
  749.46 +}
  749.47 +
  749.48 +h1.booktitle {
  749.49 +  margin-bottom: 0px;
  749.50 +}
  749.51 +
  749.52 +h2.booktitle {
  749.53 +  text-align: center;
  749.54 +}
  749.55 +
  749.56 +h2.booktitle > a {
  749.57 +  color: black;
  749.58 +}
  749.59 +
  749.60 +div.authors {
  749.61 +  font-size: 80%;
  749.62 +  margin-bottom: 1em;
  749.63 +  padding-left: 0.25em;
  749.64 +}
  749.65 +
  749.66 +span.authors {
  749.67 +  font-size: 80%;
  749.68 +  opacity: 0.55;
  749.69 +  padding-left: 0.5em;
  749.70 +}
  749.71 +
  749.72 +div.note th, div.tip th, div.warning th {
  749.73 +  font-family: georgia,serif;
  749.74 +  font-weight: normal;
  749.75 +  font-size: 110%;
  749.76 +}
  749.77 +
  749.78 +div.navheader th, div.navfooter td {
  749.79 +  font-family: georgia,serif;
  749.80 +}
  749.81 +
  749.82 +div.navheader th {
  749.83 +  opacity: 0;
  749.84 +  font-size: 0;
  749.85 +}
  749.86 +
  749.87 +pre.screen {
  749.88 +  background-image: url(figs/shell.png);
  749.89 +}
  749.90 +
  749.91 +pre.programlisting {
  749.92 +  background-image: url(figs/source.png);
  749.93 +}
  749.94 +
  749.95 +pre.programlisting, pre.screen, p.remark {
  749.96 +  border-style: solid;
  749.97 +  border-width: 1px;
  749.98 +  font-size: medium;
  749.99 +  padding: 1em;
 749.100 +  background-repeat: no-repeat;
 749.101 +  background-position: 10px 10px;
 749.102 +  padding-left: 70px;
 749.103 +}
 749.104 +
 749.105 +strong.command, code, pre, span.type {
 749.106 +  font-family: monospace;
 749.107 +  font-weight: normal;
 749.108 +}
 749.109 +
 749.110 +strong.userinput > code {
 749.111 +  font-weight: bolder;
 749.112 +  color: #303030;
 749.113 +}
 749.114 +
 749.115 +div.toc > p {
 749.116 +  opacity: 0.35;
 749.117 +  font-family: georgia,serif;
 749.118 +  cursor: pointer;
 749.119 +}
 749.120 +
 749.121 +div.toc b {
 749.122 +  font-weight: normal;
 749.123 +  font-size: large;
 749.124 +}
 749.125 +
 749.126 +ul.booktoc {
 749.127 +  padding-left: 0px;
 749.128 +  list-style-type: none;
 749.129 +}
 749.130 +
 749.131 +.booktoc > li {
 749.132 +  padding: 0.5em;
 749.133 +}
 749.134 +
 749.135 +.chapinfo {
 749.136 +  float: right;
 749.137 +  color: #a0a0a0;
 749.138 +}
 749.139 +
 749.140 +.unpublished {
 749.141 +  color: #a0a0a0;
 749.142 +}
 749.143 +
 749.144 +.chapinfo img {
 749.145 +  vertical-align: -35%;
 749.146 +  border: 0px;
 749.147 +}
 749.148 +
 749.149 +.zebra_b {
 749.150 +  background: #f4f4f4;
 749.151 +}
 749.152 +
 749.153 +.book .titlepage {
 749.154 +  display: none;
 749.155 +}
 749.156 +
 749.157 +.chapter div.toc > dl {
 749.158 +  display: none;
 749.159 +}
 749.160 +
 749.161 +pre.programlisting, pre.screen, p.remark {
 749.162 +  overflow: hidden;
 749.163 +}
 749.164 +
 749.165 +p.remark {
 749.166 +  background-image: url(figs/remark.png);
 749.167 +}
 749.168 +
 749.169 +div.warning, p.remark {
 749.170 +  background-color: #FFEFE8;
 749.171 +  border-color: #e0a8a0;
 749.172 +}
 749.173 +
 749.174 +span.remark {
 749.175 +  font-style: normal;
 749.176 +  color: #707070;
 749.177 +}
 749.178 +
 749.179 +.screen {
 749.180 +  background: #e7ffc7 none repeat scroll 0% 50%;
 749.181 +  border-color: #94DA3A;
 749.182 +}
 749.183 +
 749.184 +.programlisting {
 749.185 +  background: #F0F4FF none repeat scroll 0% 50%;
 749.186 +  border-color: #B4BAEA;
 749.187 +}
 749.188 +
 749.189 +.prompt {
 749.190 +  color: #448844;
 749.191 +}
 749.192 +
 749.193 +div.note, div.tip {
 749.194 +  background: #ffffc9;
 749.195 +  border-color: #B4BAEA;
 749.196 +}
 749.197 +
 749.198 +div.note, div.warning, div.tip {
 749.199 +  border-style: solid;
 749.200 +  border-width: 1px;
 749.201 +  padding: 1em;
 749.202 +}
 749.203 +
 749.204 +.note .title {
 749.205 +  font-size: 90%;
 749.206 +}
 749.207 +
 749.208 +.comment {
 749.209 +  font-size: 80%;
 749.210 +}
 749.211 +
 749.212 +div.comment, div.new_comment {
 749.213 +  padding: 0.5em;
 749.214 +  margin: 0.5em;
 749.215 +  margin-left: 2em;
 749.216 +  border-style: solid;
 749.217 +  border-width: 1px;
 749.218 +  border-color: #aaaaff;
 749.219 +}
 749.220 +
 749.221 +div.comment {
 749.222 +  background: #eeeeff;
 749.223 +}
 749.224 +
 749.225 +div.new_comment {
 749.226 +  background: #d0d0ff;
 749.227 +}
 749.228 +
 749.229 +.commenttoggle {
 749.230 +  opacity: 0.35;
 749.231 +}
 749.232 +
 749.233 +.comment_help {
 749.234 +  font-size: 80%;
 749.235 +}
 749.236 +
 749.237 +.comment_header {
 749.238 +  opacity: 0.75;
 749.239 +}
 749.240 +
 749.241 +.comment_id {
 749.242 +  float: right;
 749.243 +  opacity: 0.3;
 749.244 +  font-size: 60%;
 749.245 +}
 749.246 +
 749.247 +.comment_name {
 749.248 +  font-weight: bolder;
 749.249 +}
 749.250 +
 749.251 +.comment_reviewed {
 749.252 +  color: darkgreen;
 749.253 +  margin-left: 1em;
 749.254 +  font-style: italic;
 749.255 +}
 749.256 +
 749.257 +.comment_date {
 749.258 +  opacity: 0.75;
 749.259 +}
 749.260 +
 749.261 +.comment_thanks {
 749.262 +  color: darkblue;
 749.263 +  margin-left: 1em;
 749.264 +  font-style: italic;
 749.265 +  font-weight: bolder;
 749.266 +}
 749.267 +
 749.268 +.comment_error {
 749.269 +  padding-left: 1em;
 749.270 +  font-weight: bolder;
 749.271 +  font-size: 80%;
 749.272 +  color: darkred;
 749.273 +}
 749.274 +
 749.275 +.hgfooter {
 749.276 +  width: 60em;
 749.277 +  margin-left: auto;
 749.278 +  margin-right: auto;
 749.279 +  margin-top: 2em;
 749.280 +  margin-bottom: 2em;
 749.281 +  font-size: 80%;
 749.282 +  color: #727272;
 749.283 +}
 749.284 +
 749.285 +.hgfooter a {
 749.286 +  color: #5555ff;
 749.287 +}
 749.288 +
 749.289 +.hgfooter a:visited {
 749.290 +  opacity: 0.7;
 749.291 +}
 749.292 +
 749.293 +.hgfooter img {
 749.294 +  vertical-align: -45%;
 749.295 +}
   750.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   750.2 +++ b/web/texpand.py	Sun Aug 16 03:41:39 2009 +0200
   750.3 @@ -0,0 +1,35 @@
   750.4 +#!/usr/bin/env python
   750.5 +#
   750.6 +# Use Django's template machinery to expand static web pages.  First
   750.7 +# tries the default template path for a particular installation, then
   750.8 +# looks for templates in the filesystem.
   750.9 +
  750.10 +from django.template import Context, TemplateDoesNotExist
  750.11 +from django.template.loader import get_template, get_template_from_string
  750.12 +from django.core.management import setup_environ
  750.13 +import hgbook.settings as settings
  750.14 +import sys
  750.15 +
  750.16 +setup_environ(settings)
  750.17 +c = Context()
  750.18 +
  750.19 +if len(sys.argv) == 2:
  750.20 +    in_name = sys.argv[1]
  750.21 +    out_name = 'stdout'
  750.22 +    out_fp = sys.stdout
  750.23 +elif len(sys.argv) == 3:
  750.24 +    in_name = sys.argv[1]
  750.25 +    out_name = sys.argv[2]
  750.26 +    out_fp = None
  750.27 +else:
  750.28 +    print >> sys.stderr, 'Usage: %s template-file [output-file]'
  750.29 +    sys.exit(1)
  750.30 +    
  750.31 +try:
  750.32 +    t = get_template(in_name)
  750.33 +except TemplateDoesNotExist:
  750.34 +    t = get_template_from_string(open(in_name).read(), name=in_name)
  750.35 +if out_fp is None:
  750.36 +    out_fp = open(out_name, 'w')
  750.37 +out_fp.write(t.render(c))
  750.38 +out_fp.close()