• Bubble
  • Bubble
  • Line
Why I'm using Fossil SCM instead of other source control systems
Andrei Clinciu Article AUthor
Andrei Clinciu
  • 2016-04-16T15:16:00Z
  • 4 min to read

Fossil is a great SCM Source Control Management system.

git remains by far the most used version source control system.

I still prefer to use Fossil for projects where I'm the only developer or we have a very small team of people working on a project. Fossil beats any other source control system. It's even better than git in many instances.

You should start using fossil for your next projects.

I'll explain why Fossil is so great. We'll be  reviewing some of the awesomeness of Fossil

It's has everything a developer needs

  • Ticket management:)
  • Built in Web Interface
  • Yes, it has it's own built in webserver.
  • Simple networking protocols which make it bandwidth efficient
  • CGI/SCGI enabled meaning you can run it behind a SSL enabled NGINX server for example
  • Autosync functionality
  • FOSS (free and open source)

It has everything GitHub offers and more.  Plus it's 100% open source.
Ok, GIT is open source, but tools like github aren't even if they offer free access. Sometimes you need to setup a private repository.
Fossil has youcovered!

Self contained

It's pretty much self contained, this means you only need the fossil binary to use fossil. No extra downloads, libraries, compilations etc. ONE binary file that contains it all and you're ready to use it.

Now self contained doesn't stop at this. You have the benefits that your whole project will be stored in a self contained SQLite database, This means I can easily backup my fossil repository anywhere by just copying one file.
By using SQLITE3 you have extra power in searching the whole database.

Web Interface

Great, it has a web interface, so what?
Well, it's a big thing because it combines:

  • Ticketing system which automatically links commits if you insert the ticket name. Tickets which can be used by customers, developers, QA.. ETC
  • Integrated bug tracking system
  • Wiki to post information and data
  • View and manage branches
  • View code history
  • File browser and download whole snapshots
  • Manage users
  • NEW since 2.7 Forums. Yes, you now have integrated forums to discuss features.

Everything github does + more. Easy and accesible for ANYONE.

Server synchronization

You can setup a simple CGI/SCGI with apache, nginix or you can let fossil run it's own server via SCGI.
This means that you can copy your fossil to a VPS and work together with other people.

You can even synchronize your main server to secondary servers by just using rsync or letting fossil do the job for you. This means you can distribute your whole project.

Multi Repositories Server sync example

Fossil can run on it's own server. However I've found that running it behind SCGI + NGINX is the simplest way in which you can leverage it's full power. Not ot mention it's easier to set up SSL in NGINX.

You only need to set it up once and then you can add multiple repositories there. You can afterwards edit your repositories to be public or private.

A simple example of how I use fossil on my own VPS. I have set it up so I can have multiple fossil repositories and I only need to edit the nginx configuration once.

First download the latest fossil self contained binary and copy it to /usr/bin/fossil

Add the following to your nginx configuration file

location ~ ^/myfossil(.*)$ {include scgi_params;scgi_pass localhost:9915;scgi_param SCRIPT_NAME "/myfossil";scgi_param HTTPS "on";}

On your VPS be sure you're logged in as the user who is the repo owner ssh. If the repo owner is let's say gloria, use that user.

Then upload all your fossil files to ~/fossilrepo/. After you're done you can run the following command to start the server in the background.

fossil server ~/fossilrepo/ --repolist --scgi --localhost --port 9915 &

Setting up Systemd

Sometimes you might want to wrap it in a systemd service so it runs automatically in case something happens or it crashes.

Just create a file under /etc/systemd/system/fossil.service

[Unit]Description=Fossil RepositoriesAfter=network.target[Service]Type=simpleUser=yourfossiluserExecStart=/usr/bin/fossil server /home/yourfossiluser/fossilrepo/ --repolist --scgi --localhost   --port 9915 Restart=on-failureRestartSec=5SyslogIdentifier=fossil-repo[Install]WantedBy=multi-user.target

We want to have a repolist on the fossilrepo folder, run as scgi, on the desired port and only allow localhost connections. This will make sure that only nginx can access it. Since I suppose you'll have SSL/TLS in NGINX this will ensure that data won't get sent plaintext.

 

Other Cool Stuff

Forgot your developer password?

Forgot your developer password to your fossil repository AND have access to the original file?
No problem, you can edit the SQLITe database internally to change it!

Ready to use it?

Head over to the official website!

Want to learn how to use it?

There is a book that will teach you how to get started. There is also a 5 minute guide.

Just download this book, note that it's for version 1.25 which is a somewhat older version but it works mostly the same!

Conclusion

Fossil was written to support Tcl so it was a big plus for me. Since it has it's own internal programming language based on TCL to do certain things.
UPDATE 2018: Even if I now use Elixir as my main development framework I still use Fossil for projects since it rocks.

NOTE: I still believe git is a good fit for certain applications. Take for example the Linux kernel, using Fossil for the Linux kernel would have been extremely complicated since there are thousands of people who submit patches.
It's a problem of the cathedral and the bazzar. However I believe that 95% of projects would work better with Fossil than git.

I work 99% of the time in Fossil. Even if I need to commit something to git for someone else I export the data from Fossil since I don't want to get tangled in git.

 

Ideas and comments

Andrei Clinciu
Andrei Clinciu

I'm a Full Stack Software Developer specializing in creating websites and applications which aid businesses to automate. Software which can help you simplify your life. Let's work together!

Building Great Software
The digital Revolution begins when you learn to automate with personalized software.

Find me on social media