On Tue, Aug 14, 2012 at 8:28 PM, Matt Welland <estifo...@gmail.com> wrote:
> I like the idea of cherry picking to a new branch. This would have nicely
> solved a few problems I've faced. I suppose you can kind of do this now
> using fossil cherrypick and manually creating the new branch but the

There is a cherrypick command?  Oh, it's an option to the fossil merge
command.  I had missed that entirely!

The changes wiki page mentions something about allowing "partial
commits of cherrypick merges", but no details are given.  How does
this work?

> equivalency to the original edits is not preserved and merging back into a
> stream with the original edits will probably not work correctly in many
> cases.

Cherry-picking is not destructive like rebase -- commits are only
added.  There's no need to make a cherry-pick operation create a new
branch.  The rebase operation is the one that is destructive in such a
way that a new branch should be created as a result.

As you note, a cherry-pick operation, and in particular one that has
an option to leave the picked changes uncommitted, is the only
building block necessary to implement rebase.  After all, a rebase is
just this series of steps:

 - make a list of commits from the old base to the current tip
   (or whatever Fossil calls HEAD/tip)

 - give the user a chance to edit the commit list (for interactive
   rebases only)

 - checkout the new base

 - create a new branch off the new base <--- git doesn't do *this*

 - cherry-pick the commits from the list in the first step, merging
   as necessary (note that this can require user interaction, and
   note that the merge and interaction is really part of the
   cherry-pick operation)

Of course, this would be best done in the fossil binary rather than in
a script.  Still, give me the cherry-pick operation as described above
and I can script rebase.

> I'd give two thumbs up to this idea.

Thanks.  Anyone else I've failed to offend today?  :)  (I wasn't
trying to offend... I'm really hoping that the idea of a COW rebase is
as inoffensive as I think it is.)

Nico
--
_______________________________________________
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