| | @@ -1,68 +1,66 @@ |
| 1 | 1 | <title>Fossil Concepts</title> |
| 2 | | -<nowiki> |
| 3 | 2 | <h1 align="center">Fossil Concepts</h1> |
| 4 | 3 | |
| 5 | 4 | <h2>1.0 Introduction</h2> |
| 6 | | -<p> |
| 7 | | -<a href="index.html">Fossil</a> is a |
| 8 | | -<a href="http://en.wikipedia.org/wiki/Software_configuration_management"> |
| 9 | | -software configuration management</a> system. |
| 5 | + |
| 6 | +[./index.wiki | Fossil] is a |
| 7 | +[http://en.wikipedia.org/wiki/Software_configuration_management | software configuration management] system. |
| 10 | 8 | Fossil is software that is designed to control and track the |
| 11 | 9 | development of a software project and to record the history |
| 12 | 10 | of the project. |
| 13 | 11 | There are many such systems in use today. Fossil strives to |
| 14 | 12 | distinguish itself from the others by being extremely simple |
| 15 | | -to setup and operate.</p> |
| 13 | +to setup and operate. |
| 16 | 14 | |
| 17 | | -<p>This document is intended as a quick introduction to the concepts |
| 18 | | -behind fossil.</p> |
| 15 | +This document is intended as a quick introduction to the concepts |
| 16 | +behind fossil. |
| 19 | 17 | |
| 20 | 18 | <h2>2.0 Composition Of A Project</h2> |
| 21 | 19 | <img src="concept1.gif" align="right" hspace="10"> |
| 22 | 20 | |
| 23 | | -<p>A software project normally consists of a "source tree". |
| 21 | +A software project normally consists of a "source tree". |
| 24 | 22 | A source tree is a hierarchy of files that are used to generate |
| 25 | 23 | the end product. The source tree changes over time as the |
| 26 | 24 | software grows and expands and as features are added and bugs |
| 27 | 25 | are fixed. A snapshot of the source tree at any point in time |
| 28 | 26 | is called a "version" or "revision" or a "baseline" of the product. |
| 29 | | -In fossil, we use the name "check-in".</p> |
| 27 | +In fossil, we use the name "check-in". |
| 30 | 28 | |
| 31 | | -<p>A "repository" is a database that contains copies of all historical |
| 29 | +A "repository" is a database that contains copies of all historical |
| 32 | 30 | check-ins for a project. Check-ins are normally stored in the |
| 33 | 31 | repository in a highly space-efficient compressed format (delta encoding). |
| 34 | 32 | But that is an implementation detail that you the user need not worry over. |
| 35 | 33 | Think of the repository as a safe place where all your old check-ins are |
| 36 | 34 | securely stored away and available for retrieval whenever you need |
| 37 | | -them.</p> |
| 35 | +them. |
| 38 | 36 | |
| 39 | | -<p>A repository in fossil is a single file on your disk. This file |
| 37 | +A repository in fossil is a single file on your disk. This file |
| 40 | 38 | might be rather large (dozens or hundreds of megabytes for a large |
| 41 | 39 | or long running project) but it is nevertheless just a file. You |
| 42 | 40 | can move it around, rename it, write it out to a memory stick, or |
| 43 | | -do anything else you normally do with files.</p> |
| 41 | +do anything else you normally do with files. |
| 44 | 42 | |
| 45 | | -<p>Each source tree that is controlled by fossil is associated with |
| 43 | +Each source tree that is controlled by fossil is associated with |
| 46 | 44 | a single repository on the local disk drive. You can tie two or more |
| 47 | 45 | source trees to a single repository if you want (though one |
| 48 | 46 | tree per repository is the most common configuration.) So a |
| 49 | 47 | single repository can be associated with many source trees, but |
| 50 | | -each source tree is associated with only one repository.</p> |
| 48 | +each source tree is associated with only one repository. |
| 51 | 49 | |
| 52 | | -<p>Fossil source trees may not overlap. A fossil source tree is identified |
| 50 | +Fossil source trees may not overlap. A fossil source tree is identified |
| 53 | 51 | by a file named "_FOSSIL_" in the root directory of the source tree. Every |
| 54 | 52 | file that is a sibling of _FOSSIL_ and every file in every subfolder is |
| 55 | 53 | considered potentially a part of the source tree. The _FOSSIL_ file |
| 56 | 54 | contains (among other things) the pathname of the repository with which |
| 57 | 55 | the source tree is associated. On the other hand, the repository has |
| 58 | 56 | no record of its source trees. So you are free to delete a source tree |
| 59 | 57 | or move it around without consequence. But if you move or rename or |
| 60 | 58 | delete a repository, then any source trees associated with that repository |
| 61 | | -will no longer be able to locate their repository and will stop working.</p> |
| 59 | +will no longer be able to locate their repository and will stop working. |
| 62 | 60 | |
| 63 | | -<p>When multiple developers are working on the same project, each |
| 61 | +When multiple developers are working on the same project, each |
| 64 | 62 | developer typically has his or her own local repository and an associated |
| 65 | 63 | source tree in which to work. Developers share their work by |
| 66 | 64 | "syncing" the content of their local repositories either directly |
| 67 | 65 | or through a central server. Changes can "push" from the local |
| 68 | 66 | repository into a remote repository. Or changes can "pull" from a |
| | @@ -69,71 +67,74 @@ |
| 69 | 67 | remote repository into a local repository. Or one can do a "sync" |
| 70 | 68 | which is a shortcut for doing both a push and a pull at the same time. |
| 71 | 69 | Fossil also has the concept of "cloning". A "clone" is like a "pull", |
| 72 | 70 | except that instead of beginning with an existing local repository, |
| 73 | 71 | a clone begins with nothing and creates a new local repository that |
| 74 | | -is a duplicate of a remote repository.</p> |
| 72 | +is a duplicate of a remote repository. |
| 75 | 73 | |
| 76 | | -<p>Communication between repositories is via HTTP. Remote |
| 74 | +Communication between repositories is via HTTP. Remote |
| 77 | 75 | repositories are identified by URL. You can also point a web browser |
| 78 | 76 | at a repository and get human-readable status, history, and tracking |
| 79 | | -information about the project.</p> |
| 77 | +information about the project. |
| 80 | 78 | |
| 81 | 79 | <h3>2.1 Identification Of Artifacts</h3> |
| 82 | 80 | |
| 83 | | -<p>A particular version of a particular file is called an "artifact". |
| 81 | +A particular version of a particular file is called an "artifact". |
| 84 | 82 | Each artifact has a universally unique name which is the |
| 85 | 83 | <a href="http://en.wikipedia.org/wiki/SHA">SHA1</a> hash of the content |
| 86 | 84 | of that file expressed as 40 characters of lower-case hexadecimal. Such |
| 87 | 85 | a hash is referred to as the Artifact Identifier or Artifact ID |
| 88 | 86 | for the artifact. The SHA1 algorithm is created with the purpose of |
| 89 | 87 | providing a highly forgery-resistant identifier for a file. Given any |
| 90 | 88 | file it is simple to find the artifact ID for that file. But given a |
| 91 | 89 | artifact ID it is computationally intractable to generate a file that will |
| 92 | | -have that Artifact ID.</p> |
| 90 | +have that Artifact ID. |
| 93 | 91 | |
| 94 | | - |
| 95 | | -<p>Artifact IDs look something like this:</p> |
| 92 | +Artifact IDs look something like this: |
| 96 | 93 | |
| 97 | 94 | <blockquote><b> |
| 98 | 95 | 6089f0b563a9db0a6d90682fe47fd7161ff867c8<br> |
| 99 | 96 | 59712614a1b3ccfd84078a37fa5b606e28434326<br> |
| 100 | 97 | 19dbf73078be9779edd6a0156195e610f81c94f9<br> |
| 101 | 98 | b4104959a67175f02d6b415480be22a239f1f077<br> |
| 102 | 99 | 997c9d6ae03ad114b2b57f04e9eeef17dcb82788 |
| 103 | 100 | </b></blockquote> |
| 104 | 101 | |
| 105 | | -<p>When referring to an artifact using fossil, you can use a unique |
| 102 | +When referring to an artifact using fossil, you can use a unique |
| 106 | 103 | prefix of the artifact ID that is four characters or longer. This saves |
| 107 | 104 | a lot of typing. When displaying artifact IDs, fossil will usually only |
| 108 | 105 | show the first 10 digits since that is normally enough to uniquely |
| 109 | | -identify a file.</p> |
| 106 | +identify a file. |
| 110 | 107 | |
| 111 | | -<p>Changing (or adding or removing) a single byte in a file results |
| 108 | +Changing (or adding or removing) a single byte in a file results |
| 112 | 109 | in a completely different artifact ID. And since the artifact ID is the name of |
| 113 | 110 | the artifact, making any change to a file results in a new artifact. |
| 114 | | -In this way, artifacts are immutable.</p> |
| 111 | +In this way, artifacts are immutable. |
| 115 | 112 | |
| 116 | | -<p>A repository is really just an unordered collection of |
| 113 | +A repository is really just an unordered collection of |
| 117 | 114 | artifacts. New artifacts can be added to the repository, but |
| 118 | | -existing artifacts can never be removed. Fossil is designed in |
| 115 | +existing artifacts can never be removed. (Well, almost never. There |
| 116 | +is a [./shunning.wiki | "shunning"] mechanism that allows spam or other |
| 117 | +inappropriate content to be removed if absolutely necessary, but such |
| 118 | +removal is discouraged.) |
| 119 | +Fossil is designed in |
| 119 | 120 | such a way that it can be handed a set of artifacts in any |
| 120 | 121 | order and it can figure out the relationship between those |
| 121 | 122 | artifacts and reconstruct the complete development history of |
| 122 | | -a software project.</p> |
| 123 | +a software project. |
| 123 | 124 | |
| 124 | 125 | <h3>2.2 Manifests</h3> |
| 125 | 126 | |
| 126 | | -<p>At the root of a source tree is a special file called the |
| 127 | +At the root of a source tree is a special file called the |
| 127 | 128 | "manifest". The manifest is a listing of all other files in |
| 128 | 129 | that source tree. The manifest contains the (complete) artifact ID |
| 129 | 130 | of the file and the name of the file as it appears on disk, |
| 130 | 131 | and thus serves as a mapping from artifact ID to disk name. The artifact ID |
| 131 | 132 | of the manifest is the identifier for the entire check-in. When |
| 132 | 133 | you look at a "timeline" of changes in fossil, the ID associated |
| 133 | 134 | with each check-in or commit is really just the artifact ID of the |
| 134 | | -manifest for that check-in.</p> |
| 135 | +manifest for that check-in. |
| 135 | 136 | |
| 136 | 137 | <p>Fossil automatically generates a manifest whenever you "commit" |
| 137 | 138 | a new check-in. So this is not something that you, the developer, |
| 138 | 139 | need to worry with. The format of a manifest is intentionally |
| 139 | 140 | designed to be simple to parse, so that if |
| | @@ -165,17 +166,17 @@ |
| 165 | 166 | <li>The artifact ID of the manifest is the identifier of the check-in.</li> |
| 166 | 167 | </ul> |
| 167 | 168 | |
| 168 | 169 | <h2>3.0 Fossil - The Program</h2> |
| 169 | 170 | |
| 170 | | -<p>Fossil is software. The implementation of fossil is in the form |
| 171 | +Fossil is software. The implementation of fossil is in the form |
| 171 | 172 | of a single executable named "fossil". To install fossil on your system, |
| 172 | 173 | all you have to do is obtain a copy of this one executable file (either |
| 173 | 174 | by downloading a pre-compiled version or compiling it yourself) and then |
| 174 | | -putting that file somewhere on your PATH.</p> |
| 175 | +putting that file somewhere on your PATH. |
| 175 | 176 | |
| 176 | | -<p>Fossil is completely self-contained. It is not necessary to |
| 177 | +Fossil is completely self-contained. It is not necessary to |
| 177 | 178 | install any other software in order to use fossil. You do <u>not</u> need |
| 178 | 179 | CVS, gzip, diff, rsync, Python, Perl, Tcl, Java, apache, PostgreSQL, MySQL, |
| 179 | 180 | SQLite, patch, or any similar software on your system in order to use |
| 180 | 181 | fossil effectively. You will want to have some kind of text editor |
| 181 | 182 | for entering check-in comments. Fossil will use whatever text editor |
| | @@ -182,252 +183,266 @@ |
| 182 | 183 | is identified by your VISUAL environment variable. Fossil will also |
| 183 | 184 | use GPG to clearsign your manifests if you happen to have it installed, |
| 184 | 185 | but fossil will skip that step if GPG missing from your system. |
| 185 | 186 | You can optionally set up fossil to use external "diff" programs, |
| 186 | 187 | though fossil has an excellent built-in "diff" algorithm that works |
| 187 | | -fine for most people.</p> |
| 188 | +fine for most people. |
| 188 | 189 | |
| 189 | | -<p>To uninstall fossil, simply delete the executable.</p> |
| 190 | +To uninstall fossil, simply delete the executable. |
| 190 | 191 | |
| 191 | | -<p>To upgrade an older version of fossil to a newer version, just |
| 192 | +To upgrade an older version of fossil to a newer version, just |
| 192 | 193 | replace the old executable with the new one. You might need to |
| 193 | | -run a one-time command to restructure your repositories after |
| 194 | | -an upgrade. Check the instructions that come with the upgrade |
| 195 | | -for details.</p> |
| 194 | +run "<b>fossil all rebuild</b>" to restructure your repositories after |
| 195 | +an upgrade. Running "all rebuild" never hurts, so when upgrading it |
| 196 | +is a good policy to run it even if it is not strictly necessary. |
| 196 | 197 | |
| 197 | | -<p>To use fossil, simply type the name of the executable in your |
| 198 | +To use fossil, simply type the name of the executable in your |
| 198 | 199 | shell, followed by one of the various built-in commands and |
| 199 | | -arguments appropriate for that command. For example:</p> |
| 200 | +arguments appropriate for that command. For example: |
| 200 | 201 | |
| 201 | 202 | <blockquote><b> |
| 202 | 203 | fossil help |
| 203 | 204 | </b></blockquote> |
| 204 | 205 | |
| 205 | | -<p>In the next section, when we say things like "use the <b>help</b> |
| 206 | +In the next section, when we say things like "use the <b>help</b> |
| 206 | 207 | command" we mean to use the command name "help" as the first |
| 207 | | -token after the name of the fossil executable, as shown above.</p> |
| 208 | +token after the name of the fossil executable, as shown above. |
| 208 | 209 | |
| 210 | +<a name="workflow"> |
| 209 | 211 | <h2>4.0 Workflow</h2> |
| 210 | 212 | |
| 211 | 213 | <img src="concept2.gif" align="right" hspace="10"> |
| 212 | 214 | |
| 213 | | -<p>Fossil has two modes of operation: "autosync" and "non-autosync". |
| 214 | | -Autosync mode works something like CVS or SVN in that it automatically |
| 215 | | -keeps your work in sync with the central server. Non-autosync is |
| 216 | | -more like GIT or Bitkeeper in that your local repository develops |
| 217 | | -independently of your coworkers and you share your changes manually. |
| 215 | +Fossil has two modes of operation: <i>"autosync"</i> and |
| 216 | +<i>"manual-merge"</i> |
| 217 | +Autosync mode is reminiscent of CVS or SVN in that it automatically |
| 218 | +keeps your changes in synchronization with your co-workers through |
| 219 | +the use of a central server. The manual-merge mode is the standard workflow |
| 220 | +for GIT or Mercurial in that your local repository develops |
| 221 | +independently of your coworkers and you share and merge your changes manually. |
| 218 | 222 | An interesting feature of fossil is that it supports both autosync |
| 219 | | -and non-autosync work flows.</p> |
| 223 | +and manual-merge work flows. |
| 220 | 224 | |
| 221 | | -<p>The default setting for fossil is to be in autosync mode. You |
| 225 | +The default setting for fossil is to be in autosync mode. You |
| 222 | 226 | can change the autosync setting or check the current autosync |
| 223 | | -setting using commands like:</p> |
| 227 | +setting using commands like: |
| 224 | 228 | |
| 225 | 229 | <blockquote> |
| 226 | 230 | <b>fossil setting autosync on<br> |
| 227 | 231 | fossil setting autosync off<br> |
| 228 | 232 | <b>fossil settings</b> |
| 229 | 233 | </blockquote> |
| 230 | 234 | |
| 231 | | -<p>By default, fossil runs with autosync mode turned on. The |
| 232 | | -authors find that projects run more smoothly when autosync is only |
| 233 | | -disabled when off-network.</p> |
| 235 | +By default, fossil runs with autosync mode turned on. The |
| 236 | +authors finds that projects run more smoothly in autosync mode since |
| 237 | +autosync helps to prevent pointless forking and merge and helps keeps |
| 238 | +all collaborators working on exactly the same code rather than on their |
| 239 | +own personal forks of the code. In the author's view, manual-merge mode |
| 240 | +should be reserved for disconnected operation. |
| 234 | 241 | |
| 235 | 242 | <h3>4.1 Autosync Workflow</h3> |
| 236 | 243 | |
| 237 | 244 | <ol> |
| 238 | | -<li><p> |
| 245 | +<li> |
| 239 | 246 | Establish a local repository using either the <b>new</b> command |
| 240 | 247 | to start a new project, or the <b>clone</b> command to make a clone |
| 241 | 248 | of a repository for an existing project. |
| 242 | | -</p></li> |
| 249 | +</li> |
| 243 | 250 | |
| 244 | | -<li><p> |
| 251 | +<li> |
| 245 | 252 | Establish one or more source trees by changing your working directory |
| 246 | 253 | to where you want the root of the source tree to be, then issuing |
| 247 | 254 | the <b>open</b> command with the name of the repository file as its |
| 248 | 255 | argument. |
| 249 | | -</p></li> |
| 256 | +</li> |
| 250 | 257 | |
| 251 | | -<li><p> |
| 258 | +<li> |
| 252 | 259 | The <b>open</b> command in the previous step populates your local source |
| 253 | 260 | tree with a copy of the latest check-in. Usually this is what you want. |
| 254 | 261 | In the rare cases where it is not, use the <b>update</b> command to |
| 255 | 262 | switch to a new check-in. Use the <b>timeline</b> or <b>leaves</b> commands |
| 256 | 263 | to identify alternative check-ins to switch to. |
| 257 | | -</p></li> |
| 264 | +</li> |
| 258 | 265 | |
| 259 | | -<li><p> |
| 266 | +<li> |
| 260 | 267 | Edit the code. Add new files to the source tree using the <b>add</b> |
| 261 | 268 | command. Omit files from future check-ins using the <b>rm</b> command. |
| 262 | 269 | (Even when you remove files from future check-ins, those files continue |
| 263 | 270 | to exist in historical check-ins.) Test your changes. |
| 264 | | -</p></li> |
| 271 | +</li> |
| 265 | 272 | |
| 266 | | -<li><p> |
| 273 | +<li> |
| 267 | 274 | Create a new check-in using the <b>commit</b> command. You will be prompted |
| 268 | 275 | for a check-in comment and also for your GPG key if you have GPG installed. |
| 269 | 276 | The commit copies the edits you have made in your local source |
| 270 | 277 | tree into your local repository. After your commit completes, fossil will |
| 271 | 278 | automatically <b>push</b> your changes back to the server |
| 272 | 279 | you cloned from or whatever server you most recently synced with. |
| 273 | | -</p></li> |
| 280 | +</li> |
| 274 | 281 | |
| 275 | | -<li><p> |
| 282 | +<li> |
| 276 | 283 | When your coworkers make their own changes, you can merge those changes |
| 277 | 284 | into your local local source tree using the <b>update</b> command. |
| 278 | 285 | In autosync mode, <b>update</b> will first go back to the server you |
| 279 | 286 | cloned from or with which you most recently synced, and pull down all |
| 280 | 287 | recent changes into your local repository. Then it will merge recent |
| 281 | 288 | changes into your local source tree. If you do an <b>update</b> and |
| 282 | 289 | find that it messes something up in your source tree (perhaps a co-worker |
| 283 | 290 | checked in incompatible changes) you can use the <b>undo</b> command |
| 284 | 291 | to back out the changes. |
| 285 | | -</p></li> |
| 292 | +</li> |
| 286 | 293 | |
| 287 | | -<li><p> |
| 294 | +<li> |
| 288 | 295 | Repeat all of the above until you have generated great software. |
| 289 | | -</p></li> |
| 296 | +</li> |
| 290 | 297 | </ol> |
| 291 | 298 | |
| 292 | | -<h3>4.2 Non-Autosync Workflow</h3> |
| 299 | +<h3>4.2 Manual-Merge Workflow</h3> |
| 293 | 300 | |
| 294 | | -<p>When autosync is disabled, the <b>commit</b> command is decoupled from |
| 301 | +When autosync is disabled, the <b>commit</b> command is decoupled from |
| 295 | 302 | <b>push</b> and the <b>update</b> command is decoupled from <b>pull</b>. |
| 296 | 303 | That means you have to do a few extra steps in order to accomplish the |
| 297 | | -<b>push</b> and <b>pull</b> tasks manually.</p> |
| 304 | +<b>push</b> and <b>pull</b> tasks manually. |
| 298 | 305 | |
| 299 | 306 | <ol> |
| 300 | | -<li><p> |
| 307 | +<li> |
| 301 | 308 | Establish a local repository using either the <b>new</b> command |
| 302 | 309 | to start a new project, or the <b>clone</b> command to make a clone |
| 303 | 310 | of a repository for an existing project. The default setting for |
| 304 | 311 | a new repository is with autosync on, so you will need to turn it off |
| 305 | 312 | using the <b>setting autosync off</b> command with a <b>-R</b> option |
| 306 | 313 | to specify the repository. |
| 307 | | -</p></li> |
| 314 | +</li> |
| 308 | 315 | |
| 309 | | -<li><p> |
| 316 | +<li> |
| 310 | 317 | Establish one or more source trees by changing your working directory |
| 311 | 318 | to where you want the root of the source tree to be, then issuing |
| 312 | 319 | the <b>open</b> command with the name of the repository file as its |
| 313 | 320 | argument. |
| 314 | | -</p></li> |
| 321 | +</li> |
| 315 | 322 | |
| 316 | | -<li><p> |
| 323 | +<li> |
| 317 | 324 | The <b>open</b> command in the previous step populates your local source |
| 318 | 325 | tree with a copy of the latest check-in. Usually this is what you want. |
| 319 | 326 | In the rare cases where it is not, use the <b>update</b> command to |
| 320 | 327 | switch to a new check-in. Use the <b>timeline</b> or <b>leaves</b> commands |
| 321 | 328 | to identify alternative check-ins to switch to. |
| 322 | | -</p></li> |
| 329 | +</li> |
| 323 | 330 | |
| 324 | | -<li><p> |
| 331 | +<li> |
| 325 | 332 | Edit the code. Add new files to the source tree using the <b>add</b> |
| 326 | 333 | command. Omit files from future check-ins using the <b>rm</b> command. |
| 327 | 334 | (Even when you remove files from future check-ins, those files continue |
| 328 | 335 | to exist in historical check-ins.) Test your changes. |
| 329 | | -</p></li> |
| 336 | +</li> |
| 330 | 337 | |
| 331 | | -<li><p> |
| 338 | +<li> |
| 332 | 339 | Create a new check-in using the <b>commit</b> command. You will be prompted |
| 333 | 340 | for a check-in comment and also for your GPG key if you have GPG installed. |
| 334 | 341 | The commit copies the edits you have made in your local source |
| 335 | 342 | tree into your local repository. |
| 336 | | -</p></li> |
| 343 | +</li> |
| 337 | 344 | |
| 338 | | -<li><p>Use the <b>push</b> command to push your changes out to a server |
| 345 | +<li> |
| 346 | +Use the <b>push</b> command to push your changes out to a server |
| 339 | 347 | where your co-workers can access them. |
| 340 | | -</p></li> |
| 348 | +</li> |
| 341 | 349 | |
| 342 | | -<li><p> |
| 350 | +<li> |
| 343 | 351 | When co-workers make their own changes, use the <b>pull</b> command |
| 344 | 352 | to pull those changes into your local repository. Note that <b>pull</b> |
| 345 | 353 | does not move the changes into your local source tree, only into your |
| 346 | 354 | local repository. |
| 347 | | -</p></li> |
| 355 | +</li> |
| 348 | 356 | |
| 349 | | -<li><p> |
| 357 | +<li> |
| 350 | 358 | Once changes are in your local repository, use |
| 351 | 359 | use the <b>update</b> command to merge them to your local source tree. |
| 352 | 360 | If you merge in some changes and find that the changes do not work out |
| 353 | 361 | or are not to your liking, you can back out the changes using the |
| 354 | 362 | <b>undo</b> command. |
| 355 | | -</p></li> |
| 363 | +</li> |
| 364 | + |
| 365 | +<li> |
| 366 | +If two or more people ran "commit" against the same baseline, this will |
| 367 | +result in a [./branching.wiki | fork] which you may want to resolve by |
| 368 | +running <b>merge</b> followed by another <b>commit</b>. |
| 369 | +</li> |
| 356 | 370 | |
| 357 | | -<li><p> |
| 371 | +<li> |
| 358 | 372 | Repeat all of the above until you have generated great software. |
| 359 | | -</p></li> |
| 373 | +</li> |
| 360 | 374 | </ol> |
| 361 | 375 | |
| 362 | 376 | <h2>5.0 Setting Up A Fossil Server</h2> |
| 363 | 377 | |
| 364 | | -<p>With other configuration management software, setting up a server is |
| 378 | +With other configuration management software, setting up a server is |
| 365 | 379 | a lot of work and normally takes time, patience, and a lot of system |
| 366 | 380 | knowledge. Fossil is designed to avoid this frustration. Setting up |
| 367 | 381 | a server with fossil is ridiculously easy. You have three options:</p> |
| 368 | 382 | |
| 369 | 383 | <ol> |
| 370 | | -<li><p><b><a name="saserv">S</a>etting up a stand-alone server</b></p> |
| 384 | +<li><b><a name="saserv">S</a>etting up a stand-alone server</b> |
| 371 | 385 | |
| 372 | | -<p>From within your source tree just use the <b>server</b> command and |
| 386 | +From within your source tree just use the <b>server</b> command and |
| 373 | 387 | fossil will start listening for incoming requests on TCP port 8080. |
| 374 | 388 | You can point your web browser at <a href="http://localhost:8080/"> |
| 375 | 389 | http://localhost:8080/</a> and begin exploring. Or your coworkers |
| 376 | 390 | can do pushes or pulls against your server. Use the <b>--port</b> |
| 377 | 391 | option to the server command to specify a different TCP port. If |
| 378 | 392 | you do not have a local source tree, use the <b>-R</b> command-line |
| 379 | | -option to specify the repository file.</p> |
| 393 | +option to specify the repository file. |
| 380 | 394 | |
| 381 | | -<p>A stand-alone server is a great way to set of transient connections |
| 395 | +A stand-alone server is a great way to set of transient connections |
| 382 | 396 | between coworkers for doing quick pushes or pulls. But you can also |
| 383 | 397 | set up a permanent stand-alone server if you prefer. Just make |
| 384 | 398 | arrangements for fossil to be launched with appropriate arguments |
| 385 | | -after every reboot.</p> |
| 399 | +after every reboot. |
| 386 | 400 | |
| 387 | | -<p>If you just want a server to browse the built-in fossil website |
| 401 | +If you just want a server to browse the built-in fossil website |
| 388 | 402 | locally, use the <b>ui</b> command in place of <b>server</b>. The |
| 389 | 403 | <b>ui</b> command starts up a local server too, but it also takes |
| 390 | 404 | the additional step of automatically launching your webbrowser and |
| 391 | | -pointing at the new server.</p> |
| 405 | +pointing at the new server. |
| 392 | 406 | </li> |
| 393 | 407 | |
| 394 | | -<li><p><b>Setting up a CGI server</b></p> |
| 408 | +<li><b>Setting up a CGI server</b> |
| 395 | 409 | |
| 396 | | -<p>If you have a webserver running on your machine already, you can |
| 410 | +If you have a web-server running on your machine already, you can |
| 397 | 411 | set up fossil to be run from CGI. Simply create an executable script |
| 398 | | -that looks something like this:</p> |
| 412 | +that looks something like this: |
| 399 | 413 | |
| 400 | 414 | <blockquote><pre> |
| 401 | 415 | #!/usr/local/bin/fossil |
| 402 | 416 | repository: /home/me/bigproject.fossil |
| 403 | 417 | </pre></blockquote> |
| 404 | 418 | |
| 405 | | -<p>Edit this script to use whatever pathnames are appropriate for |
| 419 | +Edit this script to use whatever pathnames are appropriate for |
| 406 | 420 | your project. Then point your web browser at the script and off you |
| 407 | | -go.</p></li> |
| 421 | +go. The [./selfhost.wiki | self-hosting fossil repositories] are |
| 422 | +all set up this way.</li> |
| 408 | 423 | |
| 409 | | -<li><p><b>Setting up an inetd server</b></p> |
| 424 | +<li><b>Setting up an inetd server</b> |
| 410 | 425 | |
| 411 | | -<p>If you have inetd or xinetd running on your system, you can set |
| 426 | +If you have inetd or xinetd running on your system, you can set |
| 412 | 427 | those services up to launch fossil to deal with inbound TCP/IP connections |
| 413 | 428 | on whatever port you want. Set up inetd or xinetd to launch fossil |
| 414 | | -like this:</p> |
| 429 | +like this: |
| 415 | 430 | |
| 416 | 431 | <blockquote><pre> |
| 417 | 432 | /usr/local/bin/fossil http /home/me/bigproject.fossil |
| 418 | 433 | </pre></blockquote> |
| 419 | 434 | |
| 420 | | -<p>As before, change the filenames to whatever is appropriate for |
| 435 | +As before, change the filenames to whatever is appropriate for |
| 421 | 436 | your system. You can have fossil run as any user that has write |
| 422 | 437 | permission on the repository and on the directory that contains the |
| 423 | 438 | repository. But it is safer to run fossil as root. When fossil |
| 424 | 439 | sees that it is running as root, it automatically puts itself into |
| 425 | 440 | a <a href="http://en.wikipedia.org/wiki/Chroot">chroot jail</a> and |
| 426 | 441 | drops all privileges prior to reading any information from the client. |
| 427 | 442 | Since fossil is a stand-alone program, you do not need to put anything |
| 428 | | -in the chroot jail with fossil in order for it to do its job.</p> |
| 443 | +in the chroot jail with fossil in order for it to do its job. |
| 429 | 444 | </li> |
| 430 | 445 | </ol> |
| 431 | 446 | |
| 432 | 447 | <h2>6.0 Review Of Key Concepts</h2> |
| 433 | 448 | |
| 434 | 449 | |