Comparison with Git, Mercurial or Darcs?
Stephen J. Turnbull
stephen at xemacs.org
Wed Nov 4 07:22:54 GMT 2009
Daniel Carrera writes:
> > AFAICT Darcs' theory of patches *in practice* depends heavily on the
> > fact that two changes touching different sets of files don't conflict,
>
> I've never heard this view before.
You won't. It's not interesting to patch theorists or Darcs
advocates. :-)
> Can you tell me how I can uncommit a change that I committed a few
> steps ago? Just take the simple use case: I commit change A, then B,
> then C, and I want to uncommit A. I do this very often. It makes my
> whole workflow a lot simpler. Can I do this with Bazaar?
There are several ways to achieve that effect. AFAIK all the relevant
VCSes support applying the reversed patch (IIRC this is "darcs
revert"). If you want the patch to actually disappear from history,
there are rebase and remove-revision commands you can get as plugins,
but rebase doesn't look flexible enough and remove-revision is not
well-documented. I think you just say "bzr remove-revision <branch>
<revspec>", but as I say, not well-documented.
In git of course I'd use "git rebase --onto A^ B". However, in bzr,
you probably would not want to make a regular commit at this stage.
Instead, I think it would be best to use a pipeline (or possibly a
loom). The idea is that you would put your "in testing" changes in a
pipe of the pipeline (resp. loom thread). When you don't like one,
you delete the pipe (thread). When you do, you merge it into the
mainline.
> I'll take your word for it. I've never needed to look at the commit
> DAG.
I thought you might say that! :-)
> I've never heard of looms but I would be interested to learn more
> about them. Maybe they would be an alternative for me. Do you know of
> any page that explains that a loom is?
http://doc.bazaar-vcs.org/plugins/en/loom-plugin.html
http://doc.bazaar-vcs.org/plugins/en/pipeline-plugin.html
http://doc.bazaar-vcs.org/plugins/en/rebase-plugin.html
*Rebase* is there just 'cause it was easy to copy and edit. I put in
*pipelines* because I think you'll find them more appropriate for the
workflow you describe. *Looms* look more complex than you need (they're
excellent for *partially dependent* parallel development, while your
workflow sounds to me like *mostly independent* parallel development).
Also, pipelines apparently have a feature for taking care of your
uncommitted work (sort of auto-shelve?)
The home page with general information about getting, installing, and
configuring plugins is http://bazaar-vcs-org/BzrPlugins/.
More information about the bazaar
mailing list