On Tue, May 14, 2013 at 01:55:56AM +0000, varro wrote:

> I've been experimenting with fossil for some private projects of mine
> and now want to use the 'branch' facility.  According to the 'help'
> text for 'branch', the syntax to create a new branch is:
> 
>   fossil branch new BRANCH-NAME BASIS ?OPTIONS?
> 
> but it doesn't explain what BASIS is.
> 
> Looking at the Jim Schimpf book, I see he gives as an example:
> 
>   fossil branch new VER_1.0 trunk -bgcolor 0xFFC0FF
> 
> Trying this on one of my own repositories, I tried:
> 
>   % ls -l recepsum.fossil
>   -rw-r--r--  1 william  william  129024 Apr 30 21:17 recepsum.fossil
> 
>   % fossil branch new UI trunk -R recepsum.fossil
>   fossil: use --repository or -R to specify the repository database
> 
> Excuse me if I've missed something obvious here, but I've been staring
> at this and don't see what I'm doing wrong.

You seem to confuse branching with checking out a branch (to a working
directory).

You first need to "open" your repository:

% mkdir recepsum; cd $_
% fossil open ../recepsum.fossil

(So now you have your working directory initialized and linked to that
repository, which you can verify by running `fossil status`.)

And now you can do branching at will using `fossil branch`.

Note though that while Fossil does allow you to create a branch before
starting to work on it, it's "standard" mode of operation (as envisioned
by its creator) is to use the "--branch" command-line option when
recording the first commit on the branch which is about to be created.
That is, it's backwards: you first do some work, then decide to commit
and decide this commit should start its own branch rather than
continuing the current one, so you create that new branch while
committing.

_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to