David
David

Reputation: 31

Cloning repository using Fossil?

I tried to clone a repository to my home computer using Fossil scm, but instead of getting the folders, I ended up with a _FOSSIL_ file.

The steps I used were:

  1. made a directory called Fossils
  2. used fossil clone command which resulted in a .fossil file in Fossils
  3. made another directory Work and used fossil open to open the .fossil file from Fossils. This resulted in a file named _FOSSIL_ in Work.

Any ideas for what I'm doing wrong?

Upvotes: 3

Views: 2373

Answers (3)

omnivorosaur
omnivorosaur

Reputation: 19

A sample way to use Fossil is very much similar to other VSCs, apart from the initial step of setting up a repository (either by init or by clone command.)

Generally, a Fossil repository is a database file (SQLite db). So init or clone commands create that local database (commonly given a .fossil extension). Some users prefer to keep all of the "fossils" in a separate directory (e.g. ~/fossils, ~/archive, ~/museum).

Once the fossil repository db has been created, it may be opened/checked-out into a working directory, in fact, as many directories as wanted (some users prefer to keep one work-dir per active branch). This is initially done with open command from within the working directory.

After that a user can do all of the familiar VCS operations, such as checkout or create branches, edit files, commit changes, pull/push etc.

In the working directory Fossil also creates its local config database (also SQLite), named _FOSSIL_ (Windows), or .fslckout (Linux).

So the sample flow to clone and open a remote repo could be:

 mkdir ~/fossils
 fossil clone <remote-url> ~/fossils/aproject.fossil
 mkdir aproject
 cd aproject
 fossil open ~/fossils/aproject.fossil
 fossil user default <my-remote-username> --user <my-remote-username>
 fossil status

On Windows the sequence is effectively the same, just use path with backslashes and your user profile directory. By the way, Fossil commands accept Unix-style paths on Windows as well.

You may aslo be interested to checkout ChiselApp service which offers free public Fossil repositories; lots of various projects there to try to clone and contribute to, or create or own.

Of course, one may try to clone Fossil's own repo from the remote-url https://fossil-scm.org

More help from the official Quick Start guide.

Upvotes: 1

Martijn
Martijn

Reputation: 13632

That looks perfectly normal. The _FOSSIL_ file indicates a checkout (aka work dir). If there's no other file in your Work directory, that means your repository is empty; or at least, that the branch you checked out (trunk by default) is empty.

What does fossil timeline show?

Upvotes: 2

Registered User
Registered User

Reputation: 265

What occurs when you clone https://www.fossil-scm.org like:

fossil clone https://www.fossil-scm.org fossil.fossil

then

fossil open fossil.fossil

I have not heard of a FOSSIL file before. Try above step in its own directory and on more than one OS to see if the results are the same or similar to what you have now.

Upvotes: 1

Related Questions