Fossil SCM

fossil-scm / www / webui.wiki
Source Blame History 181 lines
169a10d… drh 1 <title>The Fossil Web Interface</title>
5c65487… drh 2
20b2767… drh 3 One of the innovative features of Fossil is its built-in web interface.
5c65487… drh 4 This web interface provides everything you need to run a software
5c65487… drh 5 development project:
5c65487… drh 6
5c65487… drh 7 * [./bugtheory.wiki | Ticketing and bug tracking]
5c65487… drh 8 * [./wikitheory.wiki | Wiki]
5c65487… drh 9 * [./embeddeddoc.wiki | On-line documentation]
63bff95… drh 10 * [./event.wiki | Technical notes]
bcea529… drh 11 * [./forum.wiki | Forum]
5aa71f5… drh 12 * [./chat.md | Chatroom]
5c65487… drh 13 * Timelines
63bff95… drh 14 * Full text search over all of the above
63bff95… drh 15 * Status information
20b2767… drh 16 * Graphs of revision and branching history
5c65487… drh 17 * File and version lists and differences
20b2767… drh 18 * Download historical versions as ZIP archives
5c65487… drh 19 * Historical change data
fe38a76… drh 20 * Add and remove tags on check-ins
fe38a76… drh 21 * Move check-ins between branches
fe38a76… drh 22 * Revise check-in comments
20b2767… drh 23 * Manage user credentials and access permissions
3216a9c… drh 24 * And so forth... (some [./webpage-ex.md|examples])
5c65487… drh 25
d32155d… jan.nijtmans 26 You get all of this, and more, for free when you use Fossil.
5c65487… drh 27 There are no extra programs to install or setup.
5c65487… drh 28 Everything you need is already pre-configured and built into the
20b2767… drh 29 self-contained, stand-alone Fossil executable.
5c65487… drh 30
5c65487… drh 31 As an example of how useful this web interface can be,
47beb49… drh 32 the entire [./index.wiki | Fossil website],
5c65487… drh 33 including the document you are now reading,
20b2767… drh 34 is rendered using the Fossil web interface, with no enhancements,
5c65487… drh 35 and little customization.
5c65487… drh 36
d8e2a3b… wyoung 37 <div class="indent">
20b2767… drh 38 <b>Key point:</b> <i>The Fossil website is just a running instance
20b2767… drh 39 of Fossil!
d8e2a3b… wyoung 40 </div>
20b2767… drh 41
20b2767… drh 42 Note also that because Fossil is a distributed system, you can run
5c65487… drh 43 the web interface on your local machine while off network (for example,
5c65487… drh 44 while on an airplane) including
5c65487… drh 45 making changes to wiki pages and/or trouble ticket, then synchronize with your
20b2767… drh 46 co-workers after you reconnect. When you clone a Fossil repository, you
20b2767… drh 47 don't just get the project source code, you get the entire project
20b2767… drh 48 management website.
5c65487… drh 49
85f4869… drh 50 <h2>Very Simple Startup</h2>
5c65487… drh 51
20b2767… drh 52 To start using the built-in Fossil web interface on an existing Fossil
5c65487… drh 53 repository, simply type this:
5c65487… drh 54
8a1ba49… wyoung 55 <pre>fossil ui existing-repository.fossil</pre>
5c65487… drh 56
5c65487… drh 57 Substitute the name of your repository, of course.
0996347… wyoung 58 The "ui" command will start a web server running (it figures out an
d32155d… jan.nijtmans 59 available TCP port to use on its own) and then automatically launches
5c65487… drh 60 your web browser to point at that server. If you run the "ui" command
5c65487… drh 61 from within an open check-out, you can omit the repository name:
5c65487… drh 62
8a1ba49… wyoung 63 <pre>fossil ui</pre>
5c65487… drh 64
5c65487… drh 65 The latter case is a very useful short-cut when you are working on a
20b2767… drh 66 Fossil project and you want to quickly do some work with the web interface.
20b2767… drh 67 Notice that Fossil automatically finds an unused TCP port to run the
7377ce6… michai 68 server on and automatically points your web browser to the correct
5c65487… drh 69 URL. So there is never any fumbling around trying to find an open
5c65487… drh 70 port or to type arcane strings into your browser URL entry box.
5c65487… drh 71 The interface just pops right up, ready to run.
5c65487… drh 72
20b2767… drh 73 The Fossil web interface is also very easy to setup and run on a
ce0594c… drh 74 network server, as either a CGI program or from inetd, or as an
ce0594c… drh 75 SCGI server. Details on how
5c65487… drh 76 to do that are described further below.
5c65487… drh 77
5c65487… drh 78 <h2>Things To Do Using The Web Interface</h2>
5c65487… drh 79
5c65487… drh 80 You can view <b>timelines</b> of changes to the project. The default
5c65487… drh 81 "Timeline" link on the menu bar takes you to a page that shows the 20
20b2767… drh 82 most recent check-ins, wiki page edits, ticket/bug-report changes,
20b2767… drh 83 and/or blog entries.
5c65487… drh 84 This gives a very useful snapshot of what has been happening lately on the
5c65487… drh 85 project. You can click to go further back in time, if needed. Or
5c65487… drh 86 follow hyperlinks to see details, including diffs and annotated diffs,
20b2767… drh 87 of individual check-ins, wiki page edits, ticket changes, and
20b2767… drh 88 blog edits.
5c65487… drh 89
5c65487… drh 90 You can view and edit <b>tickets and bug reports</b> by following the
5c65487… drh 91 "Tickets" link on the menu bar.
5c65487… drh 92 Fossil is backed by an SQL database, so users with appropriate permissions
5c65487… drh 93 can write new ticket report formats based on SQL query statements.
5c65487… drh 94 Fossil is careful to prevent ticket report formats from doing any mischief
5c65487… drh 95 on the database (it only allows SELECT statements to run) and it restricts
5c65487… drh 96 access to sensitive data such as user passwords. So it is actually safe
5c65487… drh 97 to let anonymous users on the internet write their own ticket formats if
5c65487… drh 98 you like. In addition to viewing and/or creating report formats, you can
5c65487… drh 99 also create new tickets or look at summaries or complete histories of
5c65487… drh 100 existing tickets. Any changes you make will automatically merge with
5c65487… drh 101 changes from your co-workers the next time your repository is synchronized.
5c65487… drh 102
5c65487… drh 103 You can view and edit <b>wiki</b> by following the "Wiki" link on the
85f4869… drh 104 menu bar. Fossil has its own easy-to-remember
85f4869… drh 105 [/wiki_rules | markup rules], or if you prefer, it also
b32461f… danshearer 106 supports [/md_rules | Markdown]. And, as with tickets, all of
5c65487… drh 107 your edits will automatically merge with those of your co-workers when
5c65487… drh 108 your repository synchronizes.
5c65487… drh 109
20b2767… drh 110 You can view summary reports of <b>branches</b> in the
fe38a76… drh 111 check-in graph by visiting the "Branches" link on the
5c65487… drh 112 menu bar. From those pages you can follow hyperlinks to get additional
5c65487… drh 113 details. These screens allow you to easily keep track of what is going
0996347… wyoung 114 on with separate sub-teams within your project team.
5c65487… drh 115
fe38a76… drh 116 The "Files" link on the menu allows you to browse through the <b>file
5c65487… drh 117 hierarchy</b> of the project and to view complete changes histories on
5c65487… drh 118 individual files, with hyperlinks to the check-ins that made those
5c65487… drh 119 changes, and with diffs and annotated diffs between versions.
5c65487… drh 120
a3be0b8… drh 121 The web interface supports [./embeddeddoc.wiki | embedded documentation]
a3be0b8… drh 122 files (usually in wiki format) that are checked into the project as
a3be0b8… drh 123 part of the source tree. Such files can be viewed as if they were
a3be0b8… drh 124 ordinary web pages. This document that you are now reading is an
a3be0b8… drh 125 example of embedded documentation.
5c65487… drh 126
5c65487… drh 127 <h2>Customizing The Web Interface Appearance</h2>
5c65487… drh 128
5c65487… drh 129 Users with appropriate permissions can customize the look and feel of
5c65487… drh 130 the web interface using the "Admin" link on the main menu of the web
5c65487… drh 131 interface. Templates
5c65487… drh 132 for the header and footer of each page can be edited, as can the CSS
5c65487… drh 133 for the entire page. You can even change around the main menu.
5c65487… drh 134 Timeline display preferences can be edited. The page that is brought
5c65487… drh 135 up as the "Home" page can be changed. It is often useful to set the
b32461f… danshearer 136 "Home" page to be a wiki page or an embedded document. The built-in
b32461f… danshearer 137 pages <b>/home</b> and <b>/index</b> can be used as the "Home" page.
b32461f… danshearer 138 They have identical effect, which is to instruct Fossil to find and
b32461f… danshearer 139 display a wiki page with the same name as the project, or if that
b32461f… danshearer 140 does not exist, <b>/README.md</b> or <b>/index.wiki</b>.
b32461f… danshearer 141
b32461f… danshearer 142 An embedded document link such as <b>doc/trunk/README.md</b> can be
b32461f… danshearer 143 used for the "Home" page. If you specify one of the built-in keywords
b32461f… danshearer 144 <b>/home</b> or <b>/index</b>, the page will not be treated as an
b32461f… danshearer 145 embedded document.
5c65487… drh 146
5c65487… drh 147 <h2>Installing On A Network Server</h2>
5c65487… drh 148
20b2767… drh 149 When you create a new Fossil project and after you have configured it
5c65487… drh 150 like you want it using the web interface, you can make the project
5c65487… drh 151 available to a distributed team by simply copying the single
ce0594c… drh 152 repository file up to a web server that supports CGI or SCGI. To
ce0594c… drh 153 run Fossil as CGI, just put the
5c65487… drh 154 <b>sample-project.fossil</b> file in a directory where CGI scripts
5c65487… drh 155 have both read and write permission on the file and the directory that
5c65487… drh 156 contains the file, then add a CGI script that looks something like this:
5c65487… drh 157
9437518… wyoung 158 <verbatim>#!/usr/local/bin/fossil
9437518… wyoung 159 repository: /home/www/sample-project.fossil</verbatim>
5c65487… drh 160
5c65487… drh 161 Adjust the script above so that the paths are correct for your system,
20b2767… drh 162 of course, and also make sure the Fossil binary is installed on the server.
5c65487… drh 163 But that is <u>all</u> you have to do. You now have everything you need to host
d32155d… jan.nijtmans 164 a distributed software development project in less than five minutes using a
5c65487… drh 165 two-line CGI script.
5c65487… drh 166
ce0594c… drh 167 Instructions for setting up an SCGI server are
ce0594c… drh 168 [./scgi.wiki | available separately].
ce0594c… drh 169
ce0594c… drh 170 You don't have a CGI- or SCGI-capable web server running on your
ce0594c… drh 171 server machine?
20b2767… drh 172 Not a problem. The Fossil interface can also be launched via inetd or
20b2767… drh 173 xinetd. An inetd configuration line sufficient to launch the Fossil
5c65487… drh 174 web interface looks like this:
5c65487… drh 175
9437518… wyoung 176 <verbatim>80 stream tcp nowait.1000 root /usr/local/bin/fossil \
9437518… wyoung 177 /usr/local/bin/fossil http /home/www/sample-project.fossil</verbatim>
5c65487… drh 178
5c65487… drh 179 As always, you'll want to adjust the pathnames to whatever is appropriate
5c65487… drh 180 for your system. The xinetd setup uses a different syntax but follows
5c65487… drh 181 the same idea.

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button