Version 12 of Fossil vs CVS Commands

Updated 2013-01-23 18:33:36 by AK

With the transition of the Tcl/Tk Source Repositories from CVS over to Fossil it becomes necessary to learn a new set of commands. This page was made to help with that, by showing equivalent CVS and Fossil commands.

Action CVSFossil
Add a file touch FOO
cvs add FOO
touch FOO
fossil add FOO
Remove a file rm FOO
cvs remove FOO
rm FOO
fossil rm FOO
Rename a file mv FOO BAR
cvs remove FOO
cvs add BAR
mv FOO BAR
fossil mv FOO BAR
Show files made and not added fossil extra
Show modified files (incl. deleted) fossil changes
Commit changes cvs commit fossil commit
Update local working copycvs up -Pdfossil pull
fossil update
Dry run, make no changescvs -tn fossil update --nochange
Compare versionscvs difffossil diff (or gdiff)
Note the relevant "fossil settings"
Tool versioncvs --versionfossil version
History of a filecvs log FOOfossil finfo FOO

Components

CVS has the ability to assemble a checkout from multiple sources, i.e. modules. This handled server side.

While Fossil does not have such a feature it supports something similar on the client side. Nested repositories.

# Start with a regular checkout of a project OUTER

% mkdir checkout
% cd checkout
% fossil open /path/to/outer.fossil

# Then add the INNER project
# Remember, we are in .../checkout here

% mkdir inner
% cd inner
% fossil open --nested /path/to/inner.fossil

# Note the --nested option in the last command. This is necessary to make this work.

A more concrete example of this can be found at Tracking Thread Sources with the packages Thread and tclconfig as OUTER and INNER. The usecase driving this was that we wanted to share the same tclconfig across many packages instead of maintaining actual copies per package.

General Note: Fossil has a builtin help system. Invoke it via

fossil help

For help on specific commands use

fossil help <commandname>