Fossil SCM
Replaced many uses of blockquote in the quick start doc with pre, verbatim, etc., where all that was wanted was an indented block of text. These more semantic markup elements are now indented already.
Commit
d5de647aa5a3812fd2c0250c2f73b3914640e7b1aa4c51c3b5221fec2929c397
Parent
5f1caed1da0fd2f…
1 file changed
+119
-151
+119
-151
| --- www/quickstart.wiki | ||
| +++ www/quickstart.wiki | ||
| @@ -13,16 +13,13 @@ | ||
| 13 | 13 | Install Fossil by putting the fossil binary |
| 14 | 14 | someplace on your $PATH. |
| 15 | 15 | |
| 16 | 16 | You can test that Fossil is present and working like this: |
| 17 | 17 | |
| 18 | -<blockquote> | |
| 19 | -<b> | |
| 20 | -fossil version<br> | |
| 21 | -<tt>This is fossil version 2.13 [309af345ab] 2020-09-28 04:02:55 UTC</tt><br> | |
| 22 | -</b> | |
| 23 | -</blockquote> | |
| 18 | +<pre><b>fossil version | |
| 19 | +This is fossil version 2.13 [309af345ab] 2020-09-28 04:02:55 UTC | |
| 20 | +</b></pre> | |
| 24 | 21 | |
| 25 | 22 | <h2 id="workflow" name="fslclone">General Work Flow</h2> |
| 26 | 23 | |
| 27 | 24 | Fossil works with repository files (a database in a single file with the project's |
| 28 | 25 | complete history) and with checked-out local trees (the working directory |
| @@ -47,13 +44,12 @@ | ||
| 47 | 44 | <h2 id="new">Starting A New Project</h2> |
| 48 | 45 | |
| 49 | 46 | To start a new project with fossil create a new empty repository |
| 50 | 47 | this way: ([/help/init | more info]) |
| 51 | 48 | |
| 52 | -<blockquote> | |
| 53 | -<b>fossil init </b><i> repository-filename</i> | |
| 54 | -</blockquote> | |
| 49 | +<pre><b>fossil init</b> <i>repository-filename</i> | |
| 50 | +</pre> | |
| 55 | 51 | |
| 56 | 52 | You can name the database anything you like, and you can place it anywhere in the filesystem. |
| 57 | 53 | The <tt>.fossil</tt> extension is traditional but only required if you are going to use the |
| 58 | 54 | <tt>[/help/server | fossil server DIRECTORY]</tt> feature.” |
| 59 | 55 | |
| @@ -65,45 +61,37 @@ | ||
| 65 | 61 | repository. Making a local copy of a remote repository is called |
| 66 | 62 | "cloning". |
| 67 | 63 | |
| 68 | 64 | Clone a remote repository as follows: ([/help/clone | more info]) |
| 69 | 65 | |
| 70 | -<blockquote> | |
| 71 | -<b>fossil clone</b> <i>URL repository-filename</i> | |
| 72 | -</blockquote> | |
| 66 | +<pre><b>fossil clone</b> <i>URL repository-filename</i> | |
| 67 | +</pre> | |
| 73 | 68 | |
| 74 | 69 | The <i>URL</i> specifies the fossil repository |
| 75 | 70 | you want to clone. The <i>repository-filename</i> is the new local |
| 76 | 71 | filename into which the cloned repository will be written. For |
| 77 | 72 | example, to clone the source code of Fossil itself: |
| 78 | 73 | |
| 79 | -<blockquote> | |
| 80 | -<b>fossil clone https://fossil-scm.org/ myclone.fossil</b> | |
| 81 | -</blockquote> | |
| 74 | +<pre><b>fossil clone https://fossil-scm.org/ myclone.fossil</b></pre> | |
| 82 | 75 | |
| 83 | 76 | If your logged-in username is 'exampleuser', you should see output something like this: |
| 84 | 77 | |
| 85 | -<blockquote> | |
| 86 | -<b><tt> | |
| 87 | - Round-trips: 8 Artifacts sent: 0 received: 39421<br> | |
| 88 | - Clone done, sent: 2424 received: 42965725 ip: 10.10.10.0<br> | |
| 89 | - Rebuilding repository meta-data...<br> | |
| 90 | - 100% complete...<br> | |
| 91 | - Extra delta compression... <br> | |
| 92 | - Vacuuming the database... <br> | |
| 93 | - project-id: 94259BB9F186226D80E49D1FA2DB29F935CCA0333<br> | |
| 94 | - server-id: 016595e9043054038a9ea9bc526d7f33f7ac0e42<br> | |
| 95 | - admin-user: exampleuser (password is "yoWgDR42iv")><br> | |
| 96 | -</tt></b> | |
| 97 | -</blockquote> | |
| 78 | +<pre><b>Round-trips: 8 Artifacts sent: 0 received: 39421 | |
| 79 | +Clone done, sent: 2424 received: 42965725 ip: 10.10.10.0 | |
| 80 | +Rebuilding repository meta-data... | |
| 81 | +100% complete... | |
| 82 | +Extra delta compression... | |
| 83 | +Vacuuming the database... | |
| 84 | +project-id: 94259BB9F186226D80E49D1FA2DB29F935CCA0333 | |
| 85 | +server-id: 016595e9043054038a9ea9bc526d7f33f7ac0e42 | |
| 86 | +admin-user: exampleuser (password is "yoWgDR42iv")> | |
| 87 | +</b></pre> | |
| 98 | 88 | |
| 99 | 89 | If the remote repository requires a login, include a |
| 100 | 90 | userid in the URL like this: |
| 101 | 91 | |
| 102 | -<blockquote> | |
| 103 | -<b>fossil clone https://</b><i>remoteuserid</i><b>@www.example.org/ myclone.fossil</b> | |
| 104 | -</blockquote> | |
| 92 | +<pre><b>fossil clone https://</b><i>remoteuserid</i><b>@www.example.org/ myclone.fossil</b></pre> | |
| 105 | 93 | |
| 106 | 94 | You will be prompted separately for the password. |
| 107 | 95 | Use [https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters|"%HH"] escapes for special characters in the userid. |
| 108 | 96 | For example "/" would be replaced by "%2F" meaning that a userid of "Projects/Budget" would become "Projects%2FBudget") |
| 109 | 97 | |
| @@ -142,43 +130,38 @@ | ||
| 142 | 130 | To work on a project in fossil, you need to check out a local |
| 143 | 131 | copy of the source tree. Create the directory you want to be |
| 144 | 132 | the root of your tree and cd into that directory. Then |
| 145 | 133 | do this: ([/help/open | more info]) |
| 146 | 134 | |
| 147 | -<blockquote> | |
| 148 | -<b>fossil open </b><i> repository-filename</i> | |
| 149 | -</blockquote> | |
| 135 | +<pre><b>fossil open</b> <i>repository-filename</i></pre> | |
| 150 | 136 | |
| 151 | 137 | for example: |
| 152 | 138 | |
| 153 | -<blockquote> | |
| 154 | -<b><tt> | |
| 155 | - fossil open ../myclone.fossil<br> | |
| 156 | - BUILD.txt<br> | |
| 157 | - COPYRIGHT-BSD2.txt<br> | |
| 158 | - README.md<br> | |
| 159 | - ︙<br> | |
| 160 | -</tt></b> | |
| 161 | -</blockquote> | |
| 139 | +<pre><b>fossil open ../myclone.fossil | |
| 140 | + BUILD.txt | |
| 141 | + COPYRIGHT-BSD2.txt | |
| 142 | + README.md | |
| 143 | + ︙ | |
| 144 | +</tt></b></pre> | |
| 162 | 145 | |
| 163 | 146 | (or "fossil open ..\myclone.fossil" on Windows). |
| 164 | 147 | |
| 165 | 148 | This leaves you with the newest version of the tree |
| 166 | 149 | checked out. |
| 167 | 150 | From anywhere underneath the root of your local tree, you |
| 168 | 151 | can type commands like the following to find out the status of |
| 169 | 152 | your local tree: |
| 170 | 153 | |
| 171 | -<blockquote> | |
| 172 | -<b>[/help/info | fossil info]</b><br> | |
| 173 | -<b>[/help/status | fossil status]</b><br> | |
| 174 | -<b>[/help/changes | fossil changes]</b><br> | |
| 175 | -<b>[/help/diff | fossil diff]</b><br> | |
| 176 | -<b>[/help/timeline | fossil timeline]</b><br> | |
| 177 | -<b>[/help/ls | fossil ls]</b><br> | |
| 178 | -<b>[/help/branch | fossil branch]</b><br> | |
| 179 | -</blockquote> | |
| 154 | +<pre> | |
| 155 | +<b>[/help/info | fossil info]</b> | |
| 156 | +<b>[/help/status | fossil status]</b> | |
| 157 | +<b>[/help/changes | fossil changes]</b> | |
| 158 | +<b>[/help/diff | fossil diff]</b> | |
| 159 | +<b>[/help/timeline | fossil timeline]</b> | |
| 160 | +<b>[/help/ls | fossil ls]</b> | |
| 161 | +<b>[/help/branch | fossil branch]</b> | |
| 162 | +</pre> | |
| 180 | 163 | |
| 181 | 164 | If you created a new repository using "fossil init" some commands will not |
| 182 | 165 | produce much output. |
| 183 | 166 | |
| 184 | 167 | Note that Fossil allows you to make multiple check-outs in |
| @@ -187,14 +170,14 @@ | ||
| 187 | 170 | the same time without having to generate extra clones. |
| 188 | 171 | |
| 189 | 172 | To switch a checkout between different versions and branches, |
| 190 | 173 | use:< |
| 191 | 174 | |
| 192 | -<blockquote> | |
| 193 | -<b>[/help/update | fossil update]</b><br> | |
| 194 | -<b>[/help/checkout | fossil checkout]</b><br> | |
| 195 | -</blockquote> | |
| 175 | +<pre> | |
| 176 | +<b>[/help/update | fossil update]</b> | |
| 177 | +<b>[/help/checkout | fossil checkout]</b> | |
| 178 | +</pre> | |
| 196 | 179 | |
| 197 | 180 | [/help/update | update] honors the "autosync" option and |
| 198 | 181 | does a "soft" switch, merging any local changes into the target |
| 199 | 182 | version, whereas [/help/checkout | checkout] does not |
| 200 | 183 | automatically sync and does a "hard" switch, overwriting local |
| @@ -203,48 +186,39 @@ | ||
| 203 | 186 | <h2 id="changes">Making and Committing Changes</h2> |
| 204 | 187 | |
| 205 | 188 | To add new files to your project or remove existing ones, use these |
| 206 | 189 | commands: |
| 207 | 190 | |
| 208 | -<blockquote> | |
| 209 | -<b>[/help/add | fossil add]</b> <i>file...</i><br> | |
| 210 | -<b>[/help/rm | fossil rm]</b> <i>file...</i><br> | |
| 211 | -<b>[/help/addremove | fossil addremove]</b> <i>file...</i><br> | |
| 212 | -</blockquote> | |
| 191 | +<pre> | |
| 192 | +<b>[/help/add | fossil add]</b> <i>file...</i> | |
| 193 | +<b>[/help/rm | fossil rm]</b> <i>file...</i> | |
| 194 | +<b>[/help/addremove | fossil addremove]</b> <i>file...</i> | |
| 195 | +</pre> | |
| 213 | 196 | |
| 214 | 197 | The command: |
| 215 | 198 | |
| 216 | -<blockquote> | |
| 217 | -<b> | |
| 218 | - [/help/changes | fossil changes]</b> | |
| 219 | -</blockquote> | |
| 199 | +<pre><b>[/help/changes | fossil changes]</b></pre> | |
| 220 | 200 | |
| 221 | 201 | lists files that have changed since the last commit to the repository. For |
| 222 | 202 | example, if you edit the file "README.md": |
| 223 | 203 | |
| 224 | -<blockquote> | |
| 225 | -<b> | |
| 226 | - fossil changes<br> | |
| 227 | - EDITED README.md | |
| 228 | -</b> | |
| 229 | -</blockquote> | |
| 204 | +<pre><b>fossil changes | |
| 205 | +EDITED README.md | |
| 206 | +</b></pre> | |
| 230 | 207 | |
| 231 | 208 | To see exactly what change was made you can use the command |
| 232 | 209 | <b>[/help/diff | fossil diff]</b>: |
| 233 | 210 | |
| 234 | -<blockquote> | |
| 235 | -<b> | |
| 236 | - fossil diff <br><tt> | |
| 237 | - Index: README.md<br> | |
| 238 | - ============================================================<br> | |
| 239 | - --- README.md<br> | |
| 240 | - +++ README.md<br> | |
| 241 | - @@ -1,5 +1,6 @@<br> | |
| 242 | - +Made some changes to the project<br> | |
| 243 | - # Original text<br> | |
| 244 | - </tt></b> | |
| 245 | -</blockquote> | |
| 211 | +<pre><b>fossil diff | |
| 212 | +Index: README.md | |
| 213 | +============================================================ | |
| 214 | +--- README.md | |
| ++++ README.md | ||
| 215 | +@@ -1,5 +1,6 @@ | |
| 216 | ++Made some changes to the project | |
| 217 | +# Original text | |
| 218 | +</b></pre> | |
| 246 | 219 | |
| 247 | 220 | "fossil diff" shows the difference between your tree on disk now and as |
| 248 | 221 | the tree was when you last committed changes. If you haven't committed |
| 249 | 222 | yet, then it shows the difference relative to the tip-of-trunk commit in |
| 250 | 223 | the repository, being what you get when you "fossil open" a repository |
| @@ -251,47 +225,43 @@ | ||
| 251 | 225 | without specifying a version, populating the working directory. |
| 252 | 226 | |
| 253 | 227 | To see the most recent changes made to the repository by other users, use "fossil timeline" to |
| 254 | 228 | find out the most recent commit, and then "fossil diff" between that commit and the |
| 255 | 229 | current tree: |
| 256 | -<blockquote> | |
| 257 | -<b> | |
| 258 | - fossil timeline <br><tt> | |
| 259 | - === 2021-03-28 === <br> | |
| 260 | - 03:18:54 [ad75dfa4a0] *CURRENT* Added details to frobnicate command (user: user-one tags: trunk) <br> | |
| 261 | - === 2021-03-27 === <br> | |
| 262 | - 23:58:05 [ab975c6632] Update README.md. (user: user-two tags: trunk) <br> | |
| 263 | - ⋮ <br> | |
| 264 | - </tt><br> | |
| 265 | - fossil diff --from current --to ab975c6632 <br><tt> | |
| 266 | - Index: frobnicate.c<br> | |
| 267 | - ============================================================<br> | |
| 268 | - --- frobnicate.c<br> | |
| 269 | - +++ frobnicate.c<br> | |
| 270 | - @@ -1,10 +1,11 @@<br> | |
| 271 | - +/* made a change to the source file */<br> | |
| 272 | - # Original text<br> | |
| 273 | -</tt></b> | |
| 274 | -</blockquote> | |
| 230 | + | |
| 231 | +<pre><b>fossil timeline | |
| 232 | +=== 2021-03-28 === | |
| 233 | +03:18:54 [ad75dfa4a0] *CURRENT* Added details to frobnicate command (user: user-one tags: trunk) | |
| 234 | +=== 2021-03-27 === | |
| 235 | +23:58:05 [ab975c6632] Update README.md. (user: user-two tags: trunk) | |
| 236 | + ⋮ | |
| 237 | + | |
| 238 | +fossil diff --from current --to ab975c6632 | |
| 239 | +Index: frobnicate.c | |
| 240 | +============================================================ | |
| 241 | +--- frobnicate.c | |
| ++++ frobnicate.c | ||
| 242 | +@@ -1,10 +1,11 @@ | |
| 243 | ++/* made a change to the source file */ | |
| 244 | +# Original text | |
| 245 | +</b></pre> | |
| 275 | 246 | |
| 276 | 247 | "current" is an alias for the checkout version, so the command |
| 277 | 248 | "fossil diff --from ad75dfa4a0 --to ab975c6632" gives identical results. |
| 278 | 249 | |
| 279 | 250 | To commit your changes to a local-only repository: |
| 280 | -<blockquote> | |
| 281 | -<b> | |
| 282 | -fossil commit </b><i>(... Fossil will start your editor, if defined)</i><b><br><tt> | |
| 283 | -# Enter a commit message for this check-in. Lines beginning with # are ignored.<br> | |
| 284 | -#<br> | |
| 285 | -# user: exampleuser<br> | |
| 286 | -# tags: trunk<br> | |
| 287 | -#<br> | |
| 288 | -# EDITED README.md<br> | |
| 289 | -Edited file to add description of code changes<br> | |
| 290 | -New_Version: 7b9a416ced4a69a60589dde1aedd1a30fde8eec3528d265dbeed5135530440ab<br> | |
| 291 | -</tt></b> | |
| 292 | -</blockquote> | |
| 251 | + | |
| 252 | +<pre><b>fossil commit</b> <i>(... Fossil will start your editor, if defined)</i><b> | |
| 253 | +# Enter a commit message for this check-in. Lines beginning with # are ignored. | |
| 254 | +# | |
| 255 | +# user: exampleuser | |
| 256 | +# tags: trunk | |
| 257 | +# | |
| 258 | +# EDITED README.md | |
| 259 | +Edited file to add description of code changes | |
| 260 | +New_Version: 7b9a416ced4a69a60589dde1aedd1a30fde8eec3528d265dbeed5135530440ab | |
| 261 | +</b></pre> | |
| 293 | 262 | |
| 294 | 263 | You will be prompted for check-in comments using whatever editor |
| 295 | 264 | is specified by your VISUAL or EDITOR environment variable. If none is |
| 296 | 265 | specified Fossil uses line-editing in the terminal. |
| 297 | 266 | |
| @@ -332,13 +302,13 @@ | ||
| 332 | 302 | project or create a new project of your own, you usually want to do some |
| 333 | 303 | local configuration. This is easily accomplished using the web-server |
| 334 | 304 | that is built into fossil. Start the fossil web server like this: |
| 335 | 305 | ([/help/ui | more info]) |
| 336 | 306 | |
| 337 | -<blockquote> | |
| 338 | -<b>fossil ui </b><i> repository-filename</i> | |
| 339 | -</blockquote> | |
| 307 | +<pre> | |
| 308 | +<b>fossil ui</b> <i>repository-filename</i> | |
| 309 | +</pre> | |
| 340 | 310 | |
| 341 | 311 | You can omit the <i>repository-filename</i> from the command above |
| 342 | 312 | if you are inside a checked-out local tree. |
| 343 | 313 | |
| 344 | 314 | This starts a web server then automatically launches your |
| @@ -345,13 +315,13 @@ | ||
| 345 | 315 | web browser and makes it point to this web server. If your system |
| 346 | 316 | has an unusual configuration, fossil might not be able to figure out |
| 347 | 317 | how to start your web browser. In that case, first tell fossil |
| 348 | 318 | where to find your web browser using a command like this: |
| 349 | 319 | |
| 350 | -<blockquote> | |
| 351 | -<b>fossil setting web-browser </b><i> path-to-web-browser</i> | |
| 352 | -</blockquote> | |
| 320 | +<pre> | |
| 321 | +<b>fossil setting web-browser</b> <i>path-to-web-browser</i> | |
| 322 | +</pre> | |
| 353 | 323 | |
| 354 | 324 | By default, fossil does not require a login for HTTP connections |
| 355 | 325 | coming in from the IP loopback address 127.0.0.1. You can, and perhaps |
| 356 | 326 | should, change this after you create a few users. |
| 357 | 327 | |
| @@ -363,34 +333,34 @@ | ||
| 363 | 333 | When [./concepts.wiki#workflow|autosync] is turned off, |
| 364 | 334 | the changes you [/help/commit | commit] are only |
| 365 | 335 | on your local repository. |
| 366 | 336 | To share those changes with other repositories, do: |
| 367 | 337 | |
| 368 | -<blockquote> | |
| 338 | +<pre> | |
| 369 | 339 | <b>[/help/push | fossil push]</b> <i>URL</i> |
| 370 | -</blockquote> | |
| 340 | +</pre> | |
| 371 | 341 | |
| 372 | 342 | Where <i>URL</i> is the http: URL of the server repository you |
| 373 | 343 | want to share your changes with. If you omit the <i>URL</i> argument, |
| 374 | 344 | fossil will use whatever server you most recently synced with. |
| 375 | 345 | |
| 376 | 346 | The [/help/push | push] command only sends your changes to others. To |
| 377 | 347 | Receive changes from others, use [/help/pull | pull]. Or go both ways at |
| 378 | 348 | once using [/help/sync | sync]: |
| 379 | 349 | |
| 380 | -<blockquote> | |
| 381 | -<b>[/help/pull | fossil pull]</b> <i>URL</i><br> | |
| 350 | +<pre> | |
| 351 | +<b>[/help/pull | fossil pull]</b> <i>URL</i> | |
| 382 | 352 | <b>[/help/sync | fossil sync]</b> <i>URL</i> |
| 383 | -</blockquote> | |
| 353 | +</pre> | |
| 384 | 354 | |
| 385 | 355 | When you pull in changes from others, they go into your repository, |
| 386 | 356 | not into your checked-out local tree. To get the changes into your |
| 387 | 357 | local tree, use [/help/update | update]: |
| 388 | 358 | |
| 389 | -<blockquote> | |
| 359 | +<pre> | |
| 390 | 360 | <b>[/help/update | fossil update]</b> <i>VERSION</i> |
| 391 | -</blockquote> | |
| 361 | +</pre> | |
| 392 | 362 | |
| 393 | 363 | The <i>VERSION</i> can be the name of a branch or tag or any |
| 394 | 364 | abbreviation to the 40-character |
| 395 | 365 | artifact identifier for a particular check-in, or it can be a |
| 396 | 366 | date/time stamp. ([./checkin_names.wiki | more info]) |
| @@ -403,13 +373,13 @@ | ||
| 403 | 373 | when you run [/help/update|update] and a [/help/push|push] happens |
| 404 | 374 | automatically after you [/help/commit|commit]. So in normal practice, |
| 405 | 375 | the push, pull, and sync commands are rarely used. But it is important |
| 406 | 376 | to know about them, all the same. |
| 407 | 377 | |
| 408 | -<blockquote> | |
| 378 | +<pre> | |
| 409 | 379 | <b>[/help/checkout | fossil checkout]</b> <i>VERSION</i> |
| 410 | -</blockquote> | |
| 380 | +</pre> | |
| 411 | 381 | |
| 412 | 382 | Is similar to update except that it does not honor the autosync |
| 413 | 383 | setting, nor does it merge in local changes - it prefers to overwrite |
| 414 | 384 | them and fails if local changes exist unless the <tt>--force</tt> |
| 415 | 385 | flag is used. |
| @@ -427,16 +397,16 @@ | ||
| 427 | 397 | [/help/update | update] to the branch you want to merge into. |
| 428 | 398 | Then do a [/help/merge|merge] of the other branch that you want to incorporate |
| 429 | 399 | the changes from. For example, to merge "featureX" changes into "trunk" |
| 430 | 400 | do this: |
| 431 | 401 | |
| 432 | -<blockquote> | |
| 433 | -<b>fossil [/help/update|update] trunk</b><br> | |
| 434 | -<b>fossil [/help/merge|merge] featureX</b><br> | |
| 435 | -<i># make sure the merge didn't break anything...</i><br> | |
| 402 | +<pre> | |
| 403 | +<b>fossil [/help/update|update] trunk</b> | |
| 404 | +<b>fossil [/help/merge|merge] featureX</b> | |
| 405 | +<i># make sure the merge didn't break anything...</i> | |
| 436 | 406 | <b>fossil [/help/commit|commit] |
| 437 | -</blockquote> | |
| 407 | +</pre> | |
| 438 | 408 | |
| 439 | 409 | The argument to the [/help/merge|merge] command can be any of the |
| 440 | 410 | version identifier forms that work for [/help/update|update]. |
| 441 | 411 | ([./checkin_names.wiki|more info].) |
| 442 | 412 | The merge command has options to cherry-pick individual |
| @@ -459,13 +429,13 @@ | ||
| 459 | 429 | merge. |
| 460 | 430 | |
| 461 | 431 | If a merge or update doesn't work out (perhaps something breaks or |
| 462 | 432 | there are many merge conflicts) then you back up using: |
| 463 | 433 | |
| 464 | -<blockquote> | |
| 434 | +<pre> | |
| 465 | 435 | <b>[/help/undo | fossil undo]</b> |
| 466 | -</blockquote> | |
| 436 | +</pre> | |
| 467 | 437 | |
| 468 | 438 | This will back out the changes that the merge or update made to the |
| 469 | 439 | working checkout. There is also a [/help/redo|redo] command if you undo by |
| 470 | 440 | mistake. Undo and redo only work for changes that have |
| 471 | 441 | not yet been checked in using commit and there is only a single |
| @@ -475,14 +445,14 @@ | ||
| 475 | 445 | <h2 id="server">Setting Up A Server</h2> |
| 476 | 446 | |
| 477 | 447 | Fossil can act as a stand-alone web server using one of these |
| 478 | 448 | commands: |
| 479 | 449 | |
| 480 | -<blockquote> | |
| 481 | -<b>[/help/server | fossil server]</b> <i>repository-filename</i><br> | |
| 450 | +<pre> | |
| 451 | +<b>[/help/server | fossil server]</b> <i>repository-filename</i> | |
| 482 | 452 | <b>[/help/ui | fossil ui]</b> <i>repository-filename</i> |
| 483 | -</blockquote> | |
| 453 | +</pre> | |
| 484 | 454 | |
| 485 | 455 | The <i>repository-filename</i> can be omitted when these commands |
| 486 | 456 | are run from within an open check-out, which is a particularly useful |
| 487 | 457 | shortcut with the <b>fossil ui</b> command. |
| 488 | 458 | |
| @@ -526,44 +496,44 @@ | ||
| 526 | 496 | an HTTP proxy to reach the internet, then you can configure the proxy |
| 527 | 497 | in three different ways. You can tell fossil about your proxy using |
| 528 | 498 | a command-line option on commands that use the network, |
| 529 | 499 | <b>sync</b>, <b>clone</b>, <b>push</b>, and <b>pull</b>. |
| 530 | 500 | |
| 531 | -<blockquote> | |
| 532 | -<b>fossil clone </b><i>URL</i> <b>--proxy</b> <i>Proxy-URL</i> | |
| 533 | -</blockquote> | |
| 501 | +<pre> | |
| 502 | +<b>fossil clone </b><i>URL</i> <b>--proxy</b> <i>Proxy-URL</i> | |
| 503 | +</pre> | |
| 534 | 504 | |
| 535 | 505 | It is annoying to have to type in the proxy URL every time you |
| 536 | 506 | sync your project, though, so you can make the proxy configuration |
| 537 | 507 | persistent using the [/help/setting | setting] command: |
| 538 | 508 | |
| 539 | -<blockquote> | |
| 509 | +<pre> | |
| 540 | 510 | <b>fossil setting proxy </b><i>Proxy-URL</i> |
| 541 | -</blockquote> | |
| 511 | +</pre> | |
| 542 | 512 | |
| 543 | 513 | Or, you can set the "<b>http_proxy</b>" environment variable: |
| 544 | 514 | |
| 545 | -<blockquote> | |
| 515 | +<pre> | |
| 546 | 516 | <b>export http_proxy=</b><i>Proxy-URL</i> |
| 547 | -</blockquote> | |
| 517 | +</pre> | |
| 548 | 518 | |
| 549 | 519 | To stop using the proxy, do: |
| 550 | 520 | |
| 551 | -<blockquote> | |
| 521 | +<pre> | |
| 552 | 522 | <b>fossil setting proxy off</b> |
| 553 | -</blockquote> | |
| 523 | +</pre> | |
| 554 | 524 | |
| 555 | 525 | Or unset the environment variable. The fossil setting for the |
| 556 | 526 | HTTP proxy takes precedence over the environment variable and the |
| 557 | 527 | command-line option overrides both. If you have a persistent |
| 558 | 528 | proxy setting that you want to override for a one-time sync, that |
| 559 | 529 | is easily done on the command-line. For example, to sync with |
| 560 | 530 | a co-worker's repository on your LAN, you might type: |
| 561 | 531 | |
| 562 | -<blockquote> | |
| 532 | +<pre> | |
| 563 | 533 | <b>fossil sync http://192.168.1.36:8080/ --proxy off</b> |
| 564 | -</blockquote> | |
| 534 | +</pre> | |
| 565 | 535 | |
| 566 | 536 | <h2 id="links">Other Resources</h2> |
| 567 | 537 | |
| 568 | 538 | <ul> |
| 569 | 539 | <li> <a href="./gitusers.md">Hints For Users With Prior Git Experience</a> |
| 570 | 540 |
| --- www/quickstart.wiki | |
| +++ www/quickstart.wiki | |
| @@ -13,16 +13,13 @@ | |
| 13 | Install Fossil by putting the fossil binary |
| 14 | someplace on your $PATH. |
| 15 | |
| 16 | You can test that Fossil is present and working like this: |
| 17 | |
| 18 | <blockquote> |
| 19 | <b> |
| 20 | fossil version<br> |
| 21 | <tt>This is fossil version 2.13 [309af345ab] 2020-09-28 04:02:55 UTC</tt><br> |
| 22 | </b> |
| 23 | </blockquote> |
| 24 | |
| 25 | <h2 id="workflow" name="fslclone">General Work Flow</h2> |
| 26 | |
| 27 | Fossil works with repository files (a database in a single file with the project's |
| 28 | complete history) and with checked-out local trees (the working directory |
| @@ -47,13 +44,12 @@ | |
| 47 | <h2 id="new">Starting A New Project</h2> |
| 48 | |
| 49 | To start a new project with fossil create a new empty repository |
| 50 | this way: ([/help/init | more info]) |
| 51 | |
| 52 | <blockquote> |
| 53 | <b>fossil init </b><i> repository-filename</i> |
| 54 | </blockquote> |
| 55 | |
| 56 | You can name the database anything you like, and you can place it anywhere in the filesystem. |
| 57 | The <tt>.fossil</tt> extension is traditional but only required if you are going to use the |
| 58 | <tt>[/help/server | fossil server DIRECTORY]</tt> feature.” |
| 59 | |
| @@ -65,45 +61,37 @@ | |
| 65 | repository. Making a local copy of a remote repository is called |
| 66 | "cloning". |
| 67 | |
| 68 | Clone a remote repository as follows: ([/help/clone | more info]) |
| 69 | |
| 70 | <blockquote> |
| 71 | <b>fossil clone</b> <i>URL repository-filename</i> |
| 72 | </blockquote> |
| 73 | |
| 74 | The <i>URL</i> specifies the fossil repository |
| 75 | you want to clone. The <i>repository-filename</i> is the new local |
| 76 | filename into which the cloned repository will be written. For |
| 77 | example, to clone the source code of Fossil itself: |
| 78 | |
| 79 | <blockquote> |
| 80 | <b>fossil clone https://fossil-scm.org/ myclone.fossil</b> |
| 81 | </blockquote> |
| 82 | |
| 83 | If your logged-in username is 'exampleuser', you should see output something like this: |
| 84 | |
| 85 | <blockquote> |
| 86 | <b><tt> |
| 87 | Round-trips: 8 Artifacts sent: 0 received: 39421<br> |
| 88 | Clone done, sent: 2424 received: 42965725 ip: 10.10.10.0<br> |
| 89 | Rebuilding repository meta-data...<br> |
| 90 | 100% complete...<br> |
| 91 | Extra delta compression... <br> |
| 92 | Vacuuming the database... <br> |
| 93 | project-id: 94259BB9F186226D80E49D1FA2DB29F935CCA0333<br> |
| 94 | server-id: 016595e9043054038a9ea9bc526d7f33f7ac0e42<br> |
| 95 | admin-user: exampleuser (password is "yoWgDR42iv")><br> |
| 96 | </tt></b> |
| 97 | </blockquote> |
| 98 | |
| 99 | If the remote repository requires a login, include a |
| 100 | userid in the URL like this: |
| 101 | |
| 102 | <blockquote> |
| 103 | <b>fossil clone https://</b><i>remoteuserid</i><b>@www.example.org/ myclone.fossil</b> |
| 104 | </blockquote> |
| 105 | |
| 106 | You will be prompted separately for the password. |
| 107 | Use [https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters|"%HH"] escapes for special characters in the userid. |
| 108 | For example "/" would be replaced by "%2F" meaning that a userid of "Projects/Budget" would become "Projects%2FBudget") |
| 109 | |
| @@ -142,43 +130,38 @@ | |
| 142 | To work on a project in fossil, you need to check out a local |
| 143 | copy of the source tree. Create the directory you want to be |
| 144 | the root of your tree and cd into that directory. Then |
| 145 | do this: ([/help/open | more info]) |
| 146 | |
| 147 | <blockquote> |
| 148 | <b>fossil open </b><i> repository-filename</i> |
| 149 | </blockquote> |
| 150 | |
| 151 | for example: |
| 152 | |
| 153 | <blockquote> |
| 154 | <b><tt> |
| 155 | fossil open ../myclone.fossil<br> |
| 156 | BUILD.txt<br> |
| 157 | COPYRIGHT-BSD2.txt<br> |
| 158 | README.md<br> |
| 159 | ︙<br> |
| 160 | </tt></b> |
| 161 | </blockquote> |
| 162 | |
| 163 | (or "fossil open ..\myclone.fossil" on Windows). |
| 164 | |
| 165 | This leaves you with the newest version of the tree |
| 166 | checked out. |
| 167 | From anywhere underneath the root of your local tree, you |
| 168 | can type commands like the following to find out the status of |
| 169 | your local tree: |
| 170 | |
| 171 | <blockquote> |
| 172 | <b>[/help/info | fossil info]</b><br> |
| 173 | <b>[/help/status | fossil status]</b><br> |
| 174 | <b>[/help/changes | fossil changes]</b><br> |
| 175 | <b>[/help/diff | fossil diff]</b><br> |
| 176 | <b>[/help/timeline | fossil timeline]</b><br> |
| 177 | <b>[/help/ls | fossil ls]</b><br> |
| 178 | <b>[/help/branch | fossil branch]</b><br> |
| 179 | </blockquote> |
| 180 | |
| 181 | If you created a new repository using "fossil init" some commands will not |
| 182 | produce much output. |
| 183 | |
| 184 | Note that Fossil allows you to make multiple check-outs in |
| @@ -187,14 +170,14 @@ | |
| 187 | the same time without having to generate extra clones. |
| 188 | |
| 189 | To switch a checkout between different versions and branches, |
| 190 | use:< |
| 191 | |
| 192 | <blockquote> |
| 193 | <b>[/help/update | fossil update]</b><br> |
| 194 | <b>[/help/checkout | fossil checkout]</b><br> |
| 195 | </blockquote> |
| 196 | |
| 197 | [/help/update | update] honors the "autosync" option and |
| 198 | does a "soft" switch, merging any local changes into the target |
| 199 | version, whereas [/help/checkout | checkout] does not |
| 200 | automatically sync and does a "hard" switch, overwriting local |
| @@ -203,48 +186,39 @@ | |
| 203 | <h2 id="changes">Making and Committing Changes</h2> |
| 204 | |
| 205 | To add new files to your project or remove existing ones, use these |
| 206 | commands: |
| 207 | |
| 208 | <blockquote> |
| 209 | <b>[/help/add | fossil add]</b> <i>file...</i><br> |
| 210 | <b>[/help/rm | fossil rm]</b> <i>file...</i><br> |
| 211 | <b>[/help/addremove | fossil addremove]</b> <i>file...</i><br> |
| 212 | </blockquote> |
| 213 | |
| 214 | The command: |
| 215 | |
| 216 | <blockquote> |
| 217 | <b> |
| 218 | [/help/changes | fossil changes]</b> |
| 219 | </blockquote> |
| 220 | |
| 221 | lists files that have changed since the last commit to the repository. For |
| 222 | example, if you edit the file "README.md": |
| 223 | |
| 224 | <blockquote> |
| 225 | <b> |
| 226 | fossil changes<br> |
| 227 | EDITED README.md |
| 228 | </b> |
| 229 | </blockquote> |
| 230 | |
| 231 | To see exactly what change was made you can use the command |
| 232 | <b>[/help/diff | fossil diff]</b>: |
| 233 | |
| 234 | <blockquote> |
| 235 | <b> |
| 236 | fossil diff <br><tt> |
| 237 | Index: README.md<br> |
| 238 | ============================================================<br> |
| 239 | --- README.md<br> |
| 240 | +++ README.md<br> |
| 241 | @@ -1,5 +1,6 @@<br> |
| 242 | +Made some changes to the project<br> |
| 243 | # Original text<br> |
| 244 | </tt></b> |
| 245 | </blockquote> |
| ++++ README.md | |
| 246 | |
| 247 | "fossil diff" shows the difference between your tree on disk now and as |
| 248 | the tree was when you last committed changes. If you haven't committed |
| 249 | yet, then it shows the difference relative to the tip-of-trunk commit in |
| 250 | the repository, being what you get when you "fossil open" a repository |
| @@ -251,47 +225,43 @@ | |
| 251 | without specifying a version, populating the working directory. |
| 252 | |
| 253 | To see the most recent changes made to the repository by other users, use "fossil timeline" to |
| 254 | find out the most recent commit, and then "fossil diff" between that commit and the |
| 255 | current tree: |
| 256 | <blockquote> |
| 257 | <b> |
| 258 | fossil timeline <br><tt> |
| 259 | === 2021-03-28 === <br> |
| 260 | 03:18:54 [ad75dfa4a0] *CURRENT* Added details to frobnicate command (user: user-one tags: trunk) <br> |
| 261 | === 2021-03-27 === <br> |
| 262 | 23:58:05 [ab975c6632] Update README.md. (user: user-two tags: trunk) <br> |
| 263 | ⋮ <br> |
| 264 | </tt><br> |
| 265 | fossil diff --from current --to ab975c6632 <br><tt> |
| 266 | Index: frobnicate.c<br> |
| 267 | ============================================================<br> |
| 268 | --- frobnicate.c<br> |
| 269 | +++ frobnicate.c<br> |
| 270 | @@ -1,10 +1,11 @@<br> |
| 271 | +/* made a change to the source file */<br> |
| 272 | # Original text<br> |
| 273 | </tt></b> |
| 274 | </blockquote> |
| ++++ frobnicate.c | |
| 275 | |
| 276 | "current" is an alias for the checkout version, so the command |
| 277 | "fossil diff --from ad75dfa4a0 --to ab975c6632" gives identical results. |
| 278 | |
| 279 | To commit your changes to a local-only repository: |
| 280 | <blockquote> |
| 281 | <b> |
| 282 | fossil commit </b><i>(... Fossil will start your editor, if defined)</i><b><br><tt> |
| 283 | # Enter a commit message for this check-in. Lines beginning with # are ignored.<br> |
| 284 | #<br> |
| 285 | # user: exampleuser<br> |
| 286 | # tags: trunk<br> |
| 287 | #<br> |
| 288 | # EDITED README.md<br> |
| 289 | Edited file to add description of code changes<br> |
| 290 | New_Version: 7b9a416ced4a69a60589dde1aedd1a30fde8eec3528d265dbeed5135530440ab<br> |
| 291 | </tt></b> |
| 292 | </blockquote> |
| 293 | |
| 294 | You will be prompted for check-in comments using whatever editor |
| 295 | is specified by your VISUAL or EDITOR environment variable. If none is |
| 296 | specified Fossil uses line-editing in the terminal. |
| 297 | |
| @@ -332,13 +302,13 @@ | |
| 332 | project or create a new project of your own, you usually want to do some |
| 333 | local configuration. This is easily accomplished using the web-server |
| 334 | that is built into fossil. Start the fossil web server like this: |
| 335 | ([/help/ui | more info]) |
| 336 | |
| 337 | <blockquote> |
| 338 | <b>fossil ui </b><i> repository-filename</i> |
| 339 | </blockquote> |
| 340 | |
| 341 | You can omit the <i>repository-filename</i> from the command above |
| 342 | if you are inside a checked-out local tree. |
| 343 | |
| 344 | This starts a web server then automatically launches your |
| @@ -345,13 +315,13 @@ | |
| 345 | web browser and makes it point to this web server. If your system |
| 346 | has an unusual configuration, fossil might not be able to figure out |
| 347 | how to start your web browser. In that case, first tell fossil |
| 348 | where to find your web browser using a command like this: |
| 349 | |
| 350 | <blockquote> |
| 351 | <b>fossil setting web-browser </b><i> path-to-web-browser</i> |
| 352 | </blockquote> |
| 353 | |
| 354 | By default, fossil does not require a login for HTTP connections |
| 355 | coming in from the IP loopback address 127.0.0.1. You can, and perhaps |
| 356 | should, change this after you create a few users. |
| 357 | |
| @@ -363,34 +333,34 @@ | |
| 363 | When [./concepts.wiki#workflow|autosync] is turned off, |
| 364 | the changes you [/help/commit | commit] are only |
| 365 | on your local repository. |
| 366 | To share those changes with other repositories, do: |
| 367 | |
| 368 | <blockquote> |
| 369 | <b>[/help/push | fossil push]</b> <i>URL</i> |
| 370 | </blockquote> |
| 371 | |
| 372 | Where <i>URL</i> is the http: URL of the server repository you |
| 373 | want to share your changes with. If you omit the <i>URL</i> argument, |
| 374 | fossil will use whatever server you most recently synced with. |
| 375 | |
| 376 | The [/help/push | push] command only sends your changes to others. To |
| 377 | Receive changes from others, use [/help/pull | pull]. Or go both ways at |
| 378 | once using [/help/sync | sync]: |
| 379 | |
| 380 | <blockquote> |
| 381 | <b>[/help/pull | fossil pull]</b> <i>URL</i><br> |
| 382 | <b>[/help/sync | fossil sync]</b> <i>URL</i> |
| 383 | </blockquote> |
| 384 | |
| 385 | When you pull in changes from others, they go into your repository, |
| 386 | not into your checked-out local tree. To get the changes into your |
| 387 | local tree, use [/help/update | update]: |
| 388 | |
| 389 | <blockquote> |
| 390 | <b>[/help/update | fossil update]</b> <i>VERSION</i> |
| 391 | </blockquote> |
| 392 | |
| 393 | The <i>VERSION</i> can be the name of a branch or tag or any |
| 394 | abbreviation to the 40-character |
| 395 | artifact identifier for a particular check-in, or it can be a |
| 396 | date/time stamp. ([./checkin_names.wiki | more info]) |
| @@ -403,13 +373,13 @@ | |
| 403 | when you run [/help/update|update] and a [/help/push|push] happens |
| 404 | automatically after you [/help/commit|commit]. So in normal practice, |
| 405 | the push, pull, and sync commands are rarely used. But it is important |
| 406 | to know about them, all the same. |
| 407 | |
| 408 | <blockquote> |
| 409 | <b>[/help/checkout | fossil checkout]</b> <i>VERSION</i> |
| 410 | </blockquote> |
| 411 | |
| 412 | Is similar to update except that it does not honor the autosync |
| 413 | setting, nor does it merge in local changes - it prefers to overwrite |
| 414 | them and fails if local changes exist unless the <tt>--force</tt> |
| 415 | flag is used. |
| @@ -427,16 +397,16 @@ | |
| 427 | [/help/update | update] to the branch you want to merge into. |
| 428 | Then do a [/help/merge|merge] of the other branch that you want to incorporate |
| 429 | the changes from. For example, to merge "featureX" changes into "trunk" |
| 430 | do this: |
| 431 | |
| 432 | <blockquote> |
| 433 | <b>fossil [/help/update|update] trunk</b><br> |
| 434 | <b>fossil [/help/merge|merge] featureX</b><br> |
| 435 | <i># make sure the merge didn't break anything...</i><br> |
| 436 | <b>fossil [/help/commit|commit] |
| 437 | </blockquote> |
| 438 | |
| 439 | The argument to the [/help/merge|merge] command can be any of the |
| 440 | version identifier forms that work for [/help/update|update]. |
| 441 | ([./checkin_names.wiki|more info].) |
| 442 | The merge command has options to cherry-pick individual |
| @@ -459,13 +429,13 @@ | |
| 459 | merge. |
| 460 | |
| 461 | If a merge or update doesn't work out (perhaps something breaks or |
| 462 | there are many merge conflicts) then you back up using: |
| 463 | |
| 464 | <blockquote> |
| 465 | <b>[/help/undo | fossil undo]</b> |
| 466 | </blockquote> |
| 467 | |
| 468 | This will back out the changes that the merge or update made to the |
| 469 | working checkout. There is also a [/help/redo|redo] command if you undo by |
| 470 | mistake. Undo and redo only work for changes that have |
| 471 | not yet been checked in using commit and there is only a single |
| @@ -475,14 +445,14 @@ | |
| 475 | <h2 id="server">Setting Up A Server</h2> |
| 476 | |
| 477 | Fossil can act as a stand-alone web server using one of these |
| 478 | commands: |
| 479 | |
| 480 | <blockquote> |
| 481 | <b>[/help/server | fossil server]</b> <i>repository-filename</i><br> |
| 482 | <b>[/help/ui | fossil ui]</b> <i>repository-filename</i> |
| 483 | </blockquote> |
| 484 | |
| 485 | The <i>repository-filename</i> can be omitted when these commands |
| 486 | are run from within an open check-out, which is a particularly useful |
| 487 | shortcut with the <b>fossil ui</b> command. |
| 488 | |
| @@ -526,44 +496,44 @@ | |
| 526 | an HTTP proxy to reach the internet, then you can configure the proxy |
| 527 | in three different ways. You can tell fossil about your proxy using |
| 528 | a command-line option on commands that use the network, |
| 529 | <b>sync</b>, <b>clone</b>, <b>push</b>, and <b>pull</b>. |
| 530 | |
| 531 | <blockquote> |
| 532 | <b>fossil clone </b><i>URL</i> <b>--proxy</b> <i>Proxy-URL</i> |
| 533 | </blockquote> |
| 534 | |
| 535 | It is annoying to have to type in the proxy URL every time you |
| 536 | sync your project, though, so you can make the proxy configuration |
| 537 | persistent using the [/help/setting | setting] command: |
| 538 | |
| 539 | <blockquote> |
| 540 | <b>fossil setting proxy </b><i>Proxy-URL</i> |
| 541 | </blockquote> |
| 542 | |
| 543 | Or, you can set the "<b>http_proxy</b>" environment variable: |
| 544 | |
| 545 | <blockquote> |
| 546 | <b>export http_proxy=</b><i>Proxy-URL</i> |
| 547 | </blockquote> |
| 548 | |
| 549 | To stop using the proxy, do: |
| 550 | |
| 551 | <blockquote> |
| 552 | <b>fossil setting proxy off</b> |
| 553 | </blockquote> |
| 554 | |
| 555 | Or unset the environment variable. The fossil setting for the |
| 556 | HTTP proxy takes precedence over the environment variable and the |
| 557 | command-line option overrides both. If you have a persistent |
| 558 | proxy setting that you want to override for a one-time sync, that |
| 559 | is easily done on the command-line. For example, to sync with |
| 560 | a co-worker's repository on your LAN, you might type: |
| 561 | |
| 562 | <blockquote> |
| 563 | <b>fossil sync http://192.168.1.36:8080/ --proxy off</b> |
| 564 | </blockquote> |
| 565 | |
| 566 | <h2 id="links">Other Resources</h2> |
| 567 | |
| 568 | <ul> |
| 569 | <li> <a href="./gitusers.md">Hints For Users With Prior Git Experience</a> |
| 570 |
| --- www/quickstart.wiki | |
| +++ www/quickstart.wiki | |
| @@ -13,16 +13,13 @@ | |
| 13 | Install Fossil by putting the fossil binary |
| 14 | someplace on your $PATH. |
| 15 | |
| 16 | You can test that Fossil is present and working like this: |
| 17 | |
| 18 | <pre><b>fossil version |
| 19 | This is fossil version 2.13 [309af345ab] 2020-09-28 04:02:55 UTC |
| 20 | </b></pre> |
| 21 | |
| 22 | <h2 id="workflow" name="fslclone">General Work Flow</h2> |
| 23 | |
| 24 | Fossil works with repository files (a database in a single file with the project's |
| 25 | complete history) and with checked-out local trees (the working directory |
| @@ -47,13 +44,12 @@ | |
| 44 | <h2 id="new">Starting A New Project</h2> |
| 45 | |
| 46 | To start a new project with fossil create a new empty repository |
| 47 | this way: ([/help/init | more info]) |
| 48 | |
| 49 | <pre><b>fossil init</b> <i>repository-filename</i> |
| 50 | </pre> |
| 51 | |
| 52 | You can name the database anything you like, and you can place it anywhere in the filesystem. |
| 53 | The <tt>.fossil</tt> extension is traditional but only required if you are going to use the |
| 54 | <tt>[/help/server | fossil server DIRECTORY]</tt> feature.” |
| 55 | |
| @@ -65,45 +61,37 @@ | |
| 61 | repository. Making a local copy of a remote repository is called |
| 62 | "cloning". |
| 63 | |
| 64 | Clone a remote repository as follows: ([/help/clone | more info]) |
| 65 | |
| 66 | <pre><b>fossil clone</b> <i>URL repository-filename</i> |
| 67 | </pre> |
| 68 | |
| 69 | The <i>URL</i> specifies the fossil repository |
| 70 | you want to clone. The <i>repository-filename</i> is the new local |
| 71 | filename into which the cloned repository will be written. For |
| 72 | example, to clone the source code of Fossil itself: |
| 73 | |
| 74 | <pre><b>fossil clone https://fossil-scm.org/ myclone.fossil</b></pre> |
| 75 | |
| 76 | If your logged-in username is 'exampleuser', you should see output something like this: |
| 77 | |
| 78 | <pre><b>Round-trips: 8 Artifacts sent: 0 received: 39421 |
| 79 | Clone done, sent: 2424 received: 42965725 ip: 10.10.10.0 |
| 80 | Rebuilding repository meta-data... |
| 81 | 100% complete... |
| 82 | Extra delta compression... |
| 83 | Vacuuming the database... |
| 84 | project-id: 94259BB9F186226D80E49D1FA2DB29F935CCA0333 |
| 85 | server-id: 016595e9043054038a9ea9bc526d7f33f7ac0e42 |
| 86 | admin-user: exampleuser (password is "yoWgDR42iv")> |
| 87 | </b></pre> |
| 88 | |
| 89 | If the remote repository requires a login, include a |
| 90 | userid in the URL like this: |
| 91 | |
| 92 | <pre><b>fossil clone https://</b><i>remoteuserid</i><b>@www.example.org/ myclone.fossil</b></pre> |
| 93 | |
| 94 | You will be prompted separately for the password. |
| 95 | Use [https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters|"%HH"] escapes for special characters in the userid. |
| 96 | For example "/" would be replaced by "%2F" meaning that a userid of "Projects/Budget" would become "Projects%2FBudget") |
| 97 | |
| @@ -142,43 +130,38 @@ | |
| 130 | To work on a project in fossil, you need to check out a local |
| 131 | copy of the source tree. Create the directory you want to be |
| 132 | the root of your tree and cd into that directory. Then |
| 133 | do this: ([/help/open | more info]) |
| 134 | |
| 135 | <pre><b>fossil open</b> <i>repository-filename</i></pre> |
| 136 | |
| 137 | for example: |
| 138 | |
| 139 | <pre><b>fossil open ../myclone.fossil |
| 140 | BUILD.txt |
| 141 | COPYRIGHT-BSD2.txt |
| 142 | README.md |
| 143 | ︙ |
| 144 | </tt></b></pre> |
| 145 | |
| 146 | (or "fossil open ..\myclone.fossil" on Windows). |
| 147 | |
| 148 | This leaves you with the newest version of the tree |
| 149 | checked out. |
| 150 | From anywhere underneath the root of your local tree, you |
| 151 | can type commands like the following to find out the status of |
| 152 | your local tree: |
| 153 | |
| 154 | <pre> |
| 155 | <b>[/help/info | fossil info]</b> |
| 156 | <b>[/help/status | fossil status]</b> |
| 157 | <b>[/help/changes | fossil changes]</b> |
| 158 | <b>[/help/diff | fossil diff]</b> |
| 159 | <b>[/help/timeline | fossil timeline]</b> |
| 160 | <b>[/help/ls | fossil ls]</b> |
| 161 | <b>[/help/branch | fossil branch]</b> |
| 162 | </pre> |
| 163 | |
| 164 | If you created a new repository using "fossil init" some commands will not |
| 165 | produce much output. |
| 166 | |
| 167 | Note that Fossil allows you to make multiple check-outs in |
| @@ -187,14 +170,14 @@ | |
| 170 | the same time without having to generate extra clones. |
| 171 | |
| 172 | To switch a checkout between different versions and branches, |
| 173 | use:< |
| 174 | |
| 175 | <pre> |
| 176 | <b>[/help/update | fossil update]</b> |
| 177 | <b>[/help/checkout | fossil checkout]</b> |
| 178 | </pre> |
| 179 | |
| 180 | [/help/update | update] honors the "autosync" option and |
| 181 | does a "soft" switch, merging any local changes into the target |
| 182 | version, whereas [/help/checkout | checkout] does not |
| 183 | automatically sync and does a "hard" switch, overwriting local |
| @@ -203,48 +186,39 @@ | |
| 186 | <h2 id="changes">Making and Committing Changes</h2> |
| 187 | |
| 188 | To add new files to your project or remove existing ones, use these |
| 189 | commands: |
| 190 | |
| 191 | <pre> |
| 192 | <b>[/help/add | fossil add]</b> <i>file...</i> |
| 193 | <b>[/help/rm | fossil rm]</b> <i>file...</i> |
| 194 | <b>[/help/addremove | fossil addremove]</b> <i>file...</i> |
| 195 | </pre> |
| 196 | |
| 197 | The command: |
| 198 | |
| 199 | <pre><b>[/help/changes | fossil changes]</b></pre> |
| 200 | |
| 201 | lists files that have changed since the last commit to the repository. For |
| 202 | example, if you edit the file "README.md": |
| 203 | |
| 204 | <pre><b>fossil changes |
| 205 | EDITED README.md |
| 206 | </b></pre> |
| 207 | |
| 208 | To see exactly what change was made you can use the command |
| 209 | <b>[/help/diff | fossil diff]</b>: |
| 210 | |
| 211 | <pre><b>fossil diff |
| 212 | Index: README.md |
| 213 | ============================================================ |
| 214 | --- README.md |
| ++++ README.md | |
| 215 | @@ -1,5 +1,6 @@ |
| 216 | +Made some changes to the project |
| 217 | # Original text |
| 218 | </b></pre> |
| 219 | |
| 220 | "fossil diff" shows the difference between your tree on disk now and as |
| 221 | the tree was when you last committed changes. If you haven't committed |
| 222 | yet, then it shows the difference relative to the tip-of-trunk commit in |
| 223 | the repository, being what you get when you "fossil open" a repository |
| @@ -251,47 +225,43 @@ | |
| 225 | without specifying a version, populating the working directory. |
| 226 | |
| 227 | To see the most recent changes made to the repository by other users, use "fossil timeline" to |
| 228 | find out the most recent commit, and then "fossil diff" between that commit and the |
| 229 | current tree: |
| 230 | |
| 231 | <pre><b>fossil timeline |
| 232 | === 2021-03-28 === |
| 233 | 03:18:54 [ad75dfa4a0] *CURRENT* Added details to frobnicate command (user: user-one tags: trunk) |
| 234 | === 2021-03-27 === |
| 235 | 23:58:05 [ab975c6632] Update README.md. (user: user-two tags: trunk) |
| 236 | ⋮ |
| 237 | |
| 238 | fossil diff --from current --to ab975c6632 |
| 239 | Index: frobnicate.c |
| 240 | ============================================================ |
| 241 | --- frobnicate.c |
| ++++ frobnicate.c | |
| 242 | @@ -1,10 +1,11 @@ |
| 243 | +/* made a change to the source file */ |
| 244 | # Original text |
| 245 | </b></pre> |
| 246 | |
| 247 | "current" is an alias for the checkout version, so the command |
| 248 | "fossil diff --from ad75dfa4a0 --to ab975c6632" gives identical results. |
| 249 | |
| 250 | To commit your changes to a local-only repository: |
| 251 | |
| 252 | <pre><b>fossil commit</b> <i>(... Fossil will start your editor, if defined)</i><b> |
| 253 | # Enter a commit message for this check-in. Lines beginning with # are ignored. |
| 254 | # |
| 255 | # user: exampleuser |
| 256 | # tags: trunk |
| 257 | # |
| 258 | # EDITED README.md |
| 259 | Edited file to add description of code changes |
| 260 | New_Version: 7b9a416ced4a69a60589dde1aedd1a30fde8eec3528d265dbeed5135530440ab |
| 261 | </b></pre> |
| 262 | |
| 263 | You will be prompted for check-in comments using whatever editor |
| 264 | is specified by your VISUAL or EDITOR environment variable. If none is |
| 265 | specified Fossil uses line-editing in the terminal. |
| 266 | |
| @@ -332,13 +302,13 @@ | |
| 302 | project or create a new project of your own, you usually want to do some |
| 303 | local configuration. This is easily accomplished using the web-server |
| 304 | that is built into fossil. Start the fossil web server like this: |
| 305 | ([/help/ui | more info]) |
| 306 | |
| 307 | <pre> |
| 308 | <b>fossil ui</b> <i>repository-filename</i> |
| 309 | </pre> |
| 310 | |
| 311 | You can omit the <i>repository-filename</i> from the command above |
| 312 | if you are inside a checked-out local tree. |
| 313 | |
| 314 | This starts a web server then automatically launches your |
| @@ -345,13 +315,13 @@ | |
| 315 | web browser and makes it point to this web server. If your system |
| 316 | has an unusual configuration, fossil might not be able to figure out |
| 317 | how to start your web browser. In that case, first tell fossil |
| 318 | where to find your web browser using a command like this: |
| 319 | |
| 320 | <pre> |
| 321 | <b>fossil setting web-browser</b> <i>path-to-web-browser</i> |
| 322 | </pre> |
| 323 | |
| 324 | By default, fossil does not require a login for HTTP connections |
| 325 | coming in from the IP loopback address 127.0.0.1. You can, and perhaps |
| 326 | should, change this after you create a few users. |
| 327 | |
| @@ -363,34 +333,34 @@ | |
| 333 | When [./concepts.wiki#workflow|autosync] is turned off, |
| 334 | the changes you [/help/commit | commit] are only |
| 335 | on your local repository. |
| 336 | To share those changes with other repositories, do: |
| 337 | |
| 338 | <pre> |
| 339 | <b>[/help/push | fossil push]</b> <i>URL</i> |
| 340 | </pre> |
| 341 | |
| 342 | Where <i>URL</i> is the http: URL of the server repository you |
| 343 | want to share your changes with. If you omit the <i>URL</i> argument, |
| 344 | fossil will use whatever server you most recently synced with. |
| 345 | |
| 346 | The [/help/push | push] command only sends your changes to others. To |
| 347 | Receive changes from others, use [/help/pull | pull]. Or go both ways at |
| 348 | once using [/help/sync | sync]: |
| 349 | |
| 350 | <pre> |
| 351 | <b>[/help/pull | fossil pull]</b> <i>URL</i> |
| 352 | <b>[/help/sync | fossil sync]</b> <i>URL</i> |
| 353 | </pre> |
| 354 | |
| 355 | When you pull in changes from others, they go into your repository, |
| 356 | not into your checked-out local tree. To get the changes into your |
| 357 | local tree, use [/help/update | update]: |
| 358 | |
| 359 | <pre> |
| 360 | <b>[/help/update | fossil update]</b> <i>VERSION</i> |
| 361 | </pre> |
| 362 | |
| 363 | The <i>VERSION</i> can be the name of a branch or tag or any |
| 364 | abbreviation to the 40-character |
| 365 | artifact identifier for a particular check-in, or it can be a |
| 366 | date/time stamp. ([./checkin_names.wiki | more info]) |
| @@ -403,13 +373,13 @@ | |
| 373 | when you run [/help/update|update] and a [/help/push|push] happens |
| 374 | automatically after you [/help/commit|commit]. So in normal practice, |
| 375 | the push, pull, and sync commands are rarely used. But it is important |
| 376 | to know about them, all the same. |
| 377 | |
| 378 | <pre> |
| 379 | <b>[/help/checkout | fossil checkout]</b> <i>VERSION</i> |
| 380 | </pre> |
| 381 | |
| 382 | Is similar to update except that it does not honor the autosync |
| 383 | setting, nor does it merge in local changes - it prefers to overwrite |
| 384 | them and fails if local changes exist unless the <tt>--force</tt> |
| 385 | flag is used. |
| @@ -427,16 +397,16 @@ | |
| 397 | [/help/update | update] to the branch you want to merge into. |
| 398 | Then do a [/help/merge|merge] of the other branch that you want to incorporate |
| 399 | the changes from. For example, to merge "featureX" changes into "trunk" |
| 400 | do this: |
| 401 | |
| 402 | <pre> |
| 403 | <b>fossil [/help/update|update] trunk</b> |
| 404 | <b>fossil [/help/merge|merge] featureX</b> |
| 405 | <i># make sure the merge didn't break anything...</i> |
| 406 | <b>fossil [/help/commit|commit] |
| 407 | </pre> |
| 408 | |
| 409 | The argument to the [/help/merge|merge] command can be any of the |
| 410 | version identifier forms that work for [/help/update|update]. |
| 411 | ([./checkin_names.wiki|more info].) |
| 412 | The merge command has options to cherry-pick individual |
| @@ -459,13 +429,13 @@ | |
| 429 | merge. |
| 430 | |
| 431 | If a merge or update doesn't work out (perhaps something breaks or |
| 432 | there are many merge conflicts) then you back up using: |
| 433 | |
| 434 | <pre> |
| 435 | <b>[/help/undo | fossil undo]</b> |
| 436 | </pre> |
| 437 | |
| 438 | This will back out the changes that the merge or update made to the |
| 439 | working checkout. There is also a [/help/redo|redo] command if you undo by |
| 440 | mistake. Undo and redo only work for changes that have |
| 441 | not yet been checked in using commit and there is only a single |
| @@ -475,14 +445,14 @@ | |
| 445 | <h2 id="server">Setting Up A Server</h2> |
| 446 | |
| 447 | Fossil can act as a stand-alone web server using one of these |
| 448 | commands: |
| 449 | |
| 450 | <pre> |
| 451 | <b>[/help/server | fossil server]</b> <i>repository-filename</i> |
| 452 | <b>[/help/ui | fossil ui]</b> <i>repository-filename</i> |
| 453 | </pre> |
| 454 | |
| 455 | The <i>repository-filename</i> can be omitted when these commands |
| 456 | are run from within an open check-out, which is a particularly useful |
| 457 | shortcut with the <b>fossil ui</b> command. |
| 458 | |
| @@ -526,44 +496,44 @@ | |
| 496 | an HTTP proxy to reach the internet, then you can configure the proxy |
| 497 | in three different ways. You can tell fossil about your proxy using |
| 498 | a command-line option on commands that use the network, |
| 499 | <b>sync</b>, <b>clone</b>, <b>push</b>, and <b>pull</b>. |
| 500 | |
| 501 | <pre> |
| 502 | <b>fossil clone </b><i>URL</i> <b>--proxy</b> <i>Proxy-URL</i> |
| 503 | </pre> |
| 504 | |
| 505 | It is annoying to have to type in the proxy URL every time you |
| 506 | sync your project, though, so you can make the proxy configuration |
| 507 | persistent using the [/help/setting | setting] command: |
| 508 | |
| 509 | <pre> |
| 510 | <b>fossil setting proxy </b><i>Proxy-URL</i> |
| 511 | </pre> |
| 512 | |
| 513 | Or, you can set the "<b>http_proxy</b>" environment variable: |
| 514 | |
| 515 | <pre> |
| 516 | <b>export http_proxy=</b><i>Proxy-URL</i> |
| 517 | </pre> |
| 518 | |
| 519 | To stop using the proxy, do: |
| 520 | |
| 521 | <pre> |
| 522 | <b>fossil setting proxy off</b> |
| 523 | </pre> |
| 524 | |
| 525 | Or unset the environment variable. The fossil setting for the |
| 526 | HTTP proxy takes precedence over the environment variable and the |
| 527 | command-line option overrides both. If you have a persistent |
| 528 | proxy setting that you want to override for a one-time sync, that |
| 529 | is easily done on the command-line. For example, to sync with |
| 530 | a co-worker's repository on your LAN, you might type: |
| 531 | |
| 532 | <pre> |
| 533 | <b>fossil sync http://192.168.1.36:8080/ --proxy off</b> |
| 534 | </pre> |
| 535 | |
| 536 | <h2 id="links">Other Resources</h2> |
| 537 | |
| 538 | <ul> |
| 539 | <li> <a href="./gitusers.md">Hints For Users With Prior Git Experience</a> |
| 540 |