\contentsline {chapter}{\numberline {1}Introduction}{7}
\contentsline {paragraph}{Every source tree a branch}{7}
\contentsline {paragraph}{Theory of patches}{7}
\contentsline {paragraph}{A simple advanced tool}{8}
\contentsline {paragraph}{Keeping track of changes rather than versions}{8}
\contentsline {section}{\numberline {1.1}Features}{9}
\contentsline {paragraph}{Record changes locally}{9}
\contentsline {paragraph}{Interactive records}{10}
\contentsline {paragraph}{Unrecord local changes}{10}
\contentsline {paragraph}{Interactive everything else}{10}
\contentsline {paragraph}{Test suites}{10}
\contentsline {paragraph}{Any old server}{10}
\contentsline {paragraph}{You decide write permissions}{10}
\contentsline {paragraph}{Symmetric repositories}{10}
\contentsline {paragraph}{CGI script}{11}
\contentsline {paragraph}{Portable}{11}
\contentsline {paragraph}{File and directory moves}{11}
\contentsline {paragraph}{Token replace}{11}
\contentsline {paragraph}{Configurable defaults}{11}
\contentsline {section}{\numberline {1.2}Switching from CVS}{11}
\contentsline {paragraph}{Darcs commands for CVS users}{11}
\contentsline {paragraph}{Migrating CVS repositories to darcs}{12}
\contentsline {section}{\numberline {1.3}Switching from arch}{12}
\contentsline {paragraph}{Darcs commands for arch users}{13}
\contentsline {paragraph}{Migrating arch repositories to darcs}{14}
\contentsline {chapter}{\numberline {2}Building darcs}{15}
\contentsline {section}{\numberline {2.1}Prerequisites}{15}
\contentsline {section}{\numberline {2.2}Building on Mac\nobreakspace {}OS\nobreakspace {}X}{16}
\contentsline {section}{\numberline {2.3}Building on Microsoft Windows}{16}
\contentsline {section}{\numberline {2.4}Building from tarball}{16}
\contentsline {section}{\numberline {2.5}Building darcs from the repository}{17}
\contentsline {section}{\numberline {2.6}Building darcs with git}{18}
\contentsline {section}{\numberline {2.7}Submitting patches to darcs}{18}
\contentsline {chapter}{\numberline {3}Getting started}{19}
\contentsline {section}{\numberline {3.1}Creating your repository}{19}
\contentsline {section}{\numberline {3.2}Making changes}{20}
\contentsline {section}{\numberline {3.3}Making your repository visible to others}{20}
\contentsline {section}{\numberline {3.4}Getting changes made to another repository}{21}
\contentsline {section}{\numberline {3.5}Moving patches from one repository to another}{21}
\contentsline {subsection}{\numberline {3.5.1}All pulls}{21}
\contentsline {subsection}{\numberline {3.5.2}Send and apply manually}{21}
\contentsline {subsection}{\numberline {3.5.3}Push}{22}
\contentsline {subsection}{\numberline {3.5.4}Push ---apply-as}{22}
\contentsline {subsection}{\numberline {3.5.5}Sending signed patches by email}{23}
\contentsline {paragraph}{Security considerations}{23}
\contentsline {paragraph}{Installing necessary programs}{23}
\contentsline {paragraph}{Granting access to a repository}{23}
\contentsline {paragraph}{Setting up a sendable repository using procmail}{24}
\contentsline {paragraph}{Checking if your e-mail patch was applied}{25}
\contentsline {section}{\numberline {3.6}Reducing disk space usage}{25}
\contentsline {subsection}{\numberline {3.6.1}Linking between repositories}{26}
\contentsline {subsection}{\numberline {3.6.2}Alternate formats for the pristine tree}{26}
\contentsline {chapter}{\numberline {4}Configuring darcs}{29}
\contentsline {section}{\numberline {4.1}prefs}{29}
\contentsline {paragraph}{defaults}{29}
\contentsline {paragraph}{repos}{31}
\contentsline {paragraph}{author}{31}
\contentsline {paragraph}{boring}{31}
\contentsline {paragraph}{binaries}{31}
\contentsline {paragraph}{email}{32}
\contentsline {paragraph}{sources}{32}
\contentsline {paragraph}{motd}{32}
\contentsline {section}{\numberline {4.2}Environment variables}{32}
\contentsline {paragraph}{DARCS\_EMAIL}{32}
\contentsline {paragraph}{DARCS\_EDITOR}{32}
\contentsline {paragraph}{DARCS\_PAGER}{32}
\contentsline {paragraph}{DARCS\_TMPDIR}{33}
\contentsline {paragraph}{HOME}{33}
\contentsline {paragraph}{TERM}{33}
\contentsline {paragraph}{SSH\_PORT}{33}
\contentsline {paragraph}{DARCS\_SSH}{33}
\contentsline {paragraph}{DARCS\_SCP and DARCS\_SFTP}{33}
\contentsline {paragraph}{DARCS\_PROXYUSERPWD}{33}
\contentsline {paragraph}{DARCS\_GET\_FOO, DARCS\_MGET\_FOO and DARCS\_APPLY\_FOO}{34}
\contentsline {paragraph}{DARCS\_MGETMAX}{34}
\contentsline {paragraph}{DARCS\_WGET}{34}
\contentsline {section}{\numberline {4.3}Highlighted output}{35}
\contentsline {section}{\numberline {4.4}Character escaping and non-ASCII character encodings}{35}
\contentsline {chapter}{\numberline {5}Best practices}{37}
\contentsline {section}{\numberline {5.1}Introduction}{37}
\contentsline {section}{\numberline {5.2}Creating patches}{37}
\contentsline {subsection}{\numberline {5.2.1}Changes}{38}
\contentsline {subsection}{\numberline {5.2.2}Keeping or discarding changes}{38}
\contentsline {subsection}{\numberline {5.2.3}Unrecording changes}{38}
\contentsline {subsection}{\numberline {5.2.4}Special patches and pending}{39}
\contentsline {section}{\numberline {5.3}Using patches}{40}
\contentsline {subsection}{\numberline {5.3.1}Dependencies}{40}
\contentsline {subsection}{\numberline {5.3.2}Branches: just normal repositories}{40}
\contentsline {subsection}{\numberline {5.3.3}Moving patches around---no versions}{41}
\contentsline {subsection}{\numberline {5.3.4}Tags---versions}{41}
\contentsline {subsection}{\numberline {5.3.5}Conflicts}{42}
\contentsline {subsection}{\numberline {5.3.6}Resolving conflicts}{43}
\contentsline {section}{\numberline {5.4}Distributed development with one primary developer}{43}
\contentsline {section}{\numberline {5.5}Development by a small group of developers in one office}{44}
\contentsline {section}{\numberline {5.6}Personal development}{44}
\contentsline {subsection}{\numberline {5.6.1}Private patches}{45}
\contentsline {chapter}{\numberline {6}Darcs commands}{47}
\contentsline {paragraph}{Command overview}{47}
\contentsline {section}{\numberline {6.1}Common options to darcs commands}{48}
\contentsline {paragraph}{Selecting patches}{49}
\contentsline {paragraph}{Match}{49}
\contentsline {paragraph}{Resolution of conflicts}{52}
\contentsline {section}{\numberline {6.2}Options apart from darcs commands}{55}
\contentsline {section}{\numberline {6.3}Getting help}{56}
\contentsline {subsection}{\numberline {6.3.1}darcs help}{56}
\contentsline {section}{\numberline {6.4}Creating repositories}{56}
\contentsline {subsection}{\numberline {6.4.1}darcs initialize}{56}
\contentsline {subsection}{\numberline {6.4.2}darcs get}{57}
\contentsline {subsection}{\numberline {6.4.3}darcs put}{58}
\contentsline {section}{\numberline {6.5}Modifying the contents of a repository}{59}
\contentsline {subsection}{\numberline {6.5.1}darcs add}{59}
\contentsline {subsection}{\numberline {6.5.2}darcs remove}{60}
\contentsline {subsection}{\numberline {6.5.3}darcs mv}{61}
\contentsline {subsection}{\numberline {6.5.4}darcs replace}{61}
\contentsline {section}{\numberline {6.6}Working with changes}{62}
\contentsline {subsection}{\numberline {6.6.1}darcs record}{62}
\contentsline {subsection}{\numberline {6.6.2}darcs pull}{65}
\contentsline {subsection}{\numberline {6.6.3}darcs push}{68}
\contentsline {subsection}{\numberline {6.6.4}darcs send}{70}
\contentsline {subsection}{\numberline {6.6.5}darcs apply}{72}
\contentsline {section}{\numberline {6.7}Seeing what you've done}{76}
\contentsline {subsection}{\numberline {6.7.1}darcs whatsnew}{76}
\contentsline {subsection}{\numberline {6.7.2}darcs changes}{76}
\contentsline {subsection}{\numberline {6.7.3}darcs list}{78}
\contentsline {subsubsection}{darcs list files}{78}
\contentsline {subsubsection}{darcs list tags}{78}
\contentsline {section}{\numberline {6.8}More advanced commands}{79}
\contentsline {subsection}{\numberline {6.8.1}darcs tag}{79}
\contentsline {subsection}{\numberline {6.8.2}darcs setpref}{80}
\contentsline {subsection}{\numberline {6.8.3}darcs check}{81}
\contentsline {subsection}{\numberline {6.8.4}darcs optimize}{82}
\contentsline {section}{\numberline {6.9}Undoing, redoing and running in circles}{84}
\contentsline {subsection}{\numberline {6.9.1}darcs amend-record}{84}
\contentsline {subsection}{\numberline {6.9.2}darcs rollback}{85}
\contentsline {subsection}{\numberline {6.9.3}darcs unrecord}{85}
\contentsline {subsection}{\numberline {6.9.4}darcs unpull}{87}
\contentsline {subsection}{\numberline {6.9.5}darcs obliterate}{88}
\contentsline {subsection}{\numberline {6.9.6}darcs revert}{90}
\contentsline {subsection}{\numberline {6.9.7}darcs unrevert}{90}
\contentsline {section}{\numberline {6.10}Advanced examination of the repository}{90}
\contentsline {subsection}{\numberline {6.10.1}darcs diff}{90}
\contentsline {subsection}{\numberline {6.10.2}darcs annotate}{92}
\contentsline {subsection}{\numberline {6.10.3}darcs list}{93}
\contentsline {subsubsection}{darcs list files}{93}
\contentsline {subsubsection}{darcs list tags}{94}
\contentsline {section}{\numberline {6.11}Rarely needed and obscure commands}{94}
\contentsline {subsection}{\numberline {6.11.1}darcs mark-conflicts}{94}
\contentsline {subsection}{\numberline {6.11.2}darcs dist}{95}
\contentsline {subsection}{\numberline {6.11.3}darcs trackdown}{95}
\contentsline {subsubsection}{Example usage}{96}
\contentsline {subsection}{\numberline {6.11.4}darcs repair}{96}
\contentsline {chapter}{\numberline {A}Theory of patches}{99}
\contentsline {section}{\numberline {A.1}Background}{99}
\contentsline {section}{\numberline {A.2}Introduction}{99}
\contentsline {section}{\numberline {A.3}Applying patches}{100}
\contentsline {subsection}{\numberline {A.3.1}Hunk patches}{100}
\contentsline {subsection}{\numberline {A.3.2}Token replace patches}{100}
\contentsline {section}{\numberline {A.4}Patch relationships}{101}
\contentsline {section}{\numberline {A.5}Commuting patches}{101}
\contentsline {subsection}{\numberline {A.5.1}Composite patches}{101}
\contentsline {paragraph}{Merge}{102}
\contentsline {subsection}{\numberline {A.5.2}How merges are actually performed}{103}
\contentsline {subsection}{\numberline {A.5.3}File patches}{105}
\contentsline {subsection}{\numberline {A.5.4}Hunks}{106}
\contentsline {section}{\numberline {A.6}Conflicts}{106}
\contentsline {section}{\numberline {A.7}Patch string formatting}{106}
\contentsline {paragraph}{Composite patch}{106}
\contentsline {paragraph}{Split patch}{107}
\contentsline {paragraph}{Hunk}{107}
\contentsline {paragraph}{Token replace}{107}
\contentsline {paragraph}{Binary file modification}{107}
\contentsline {paragraph}{Add file}{107}
\contentsline {paragraph}{Remove file}{107}
\contentsline {paragraph}{Move}{107}
\contentsline {paragraph}{Change Pref}{108}
\contentsline {paragraph}{Add dir}{108}
\contentsline {paragraph}{Remove dir}{108}
\contentsline {paragraph}{Merger patches}{108}
\contentsline {paragraph}{Named patches}{108}
\contentsline {chapter}{\numberline {B}DarcsRepo format}{109}
\contentsline {chapter}{\numberline {C}The GNU General Public License}{111}
\contentsline {section}{\numberline {C.1}Appendix: How to Apply These Terms to Your New Programs}{117}
