On Tue, 9 Aug 2011, Richard Hipp wrote:

On Tue, Aug 9, 2011 at 2:33 PM, Gé Weijers <g...@weijers.org> wrote:

If you create the branch first you cannot forget later and commit to the wrong 
branch.


I beg to differ!  Just this past Friday, I did three separate commits to SQLite 
that went into the wrong
branch even though the correct branch already existed.  [...]

In fossil (and in most other SCMs) you certainly can. It would be different if the simplest way of creating a branch and moving your workspace over would be a single action. In git for instance branch creation can be done by

$ git checkout -b <branchname> -m

which creates the branch (locally) and moves any uncommitted changes over in one go. Because git does not need to create a commit object to create a branch the end result is similar to using

$ fossil commit --branch <branchname>

i.e. you do not end up with a commit that is essentially a copy of another one.

BTW: the 'fossil branch next' idea is not original in retrospect. Mercurial's 'hg branch' command works this way. It requires that the branch does not yet exist, and the new branch is created upon commit.
_______________________________________________
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