Thus said "Martin S. Weber" on Mon, 06 Feb 2017 18:10:15 +0100:

> Well, given  fossil's CLI requires  BRANCH-NAME as input, how  can the
> following commit not go to the same branch?

Because it doesn't  matter what the name  of the branch is.  It's just a
tag. What is really critical is the BASIS. When I run:

fossil branch new test trunk

That takes the tip of trunk as the BASIS and adds an empty artifact that
has a branch tag called test.

When I run:

fossil commit --branch test

The BASIS is automatically selected as  the current checkin that is your
working checkout.

If I am already ``on branch test'' and I run:

fossil commit --branch test

Again, it takes the current checkout as the BASIS (which just happens to
be ``on the branch'') and adds the test branch tag to the commit. In the
timeline, of course they will show up as being on the same branch.

Now, if instead, I had run:

fossil update trunk
fossil commit --branch test

Then there would be an additional branch  by the same name coming off of
trunk, because the  BASIS is now unrelated to the  previous branch named
test.

> Imagine you  have two same-named  branches in different parts  of your
> version graph, when you select one  of these, how would you know which
> of these you selected? You can't, except by inspection of the content.

I believe Fossil always  chooses the tip of the name  in question, so to
claim  that one  cannot know  is  simply to  state that  one hasn't  yet
learned the tool sufficiently to know  that Fossil chooses the tip. This
is why the  OP got a no-op  when trying to merge his  branch because the
tip of the named branch had already been merged.

How is this behavior any different than when I run:

fossil branch new newname trunk

How does fossil pick the BASIS? One  has to learn that it picks the tip,
not some random, arbitrary node along the timeline of trunk.

> Again, IMHO,  this needs to  be revisited to be  human-friendly. @drh:
> how would you, from the output  of fossil branch ls, select the branch
> head that equates to version e943565869 ?

You mean something like:

fossil leaves --bybranch --multiple

Arguably, it woudl be nice for ``fossil leaves'' to take a specific 
branch tag so it could restrict the search to just that one branch.

Andy
-- 
TAI64 timestamp: 4000000058996681


_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to