Comparison with Git, Mercurial or Darcs?

Ben Finney ben+bazaar at
Wed Nov 4 07:24:38 GMT 2009

Zooko Wilcox-O'Hearn <zooko at> writes:

> [My motivation in asking the following questions is mostly to improve
> darcs, but hopefully I'll accidentally improve bzr too.]

I appreciate the discussion.

> Do you mean that you used 'darcs amend' or 'darcs obliterate' and then
> regretted it, or that someone else used them and removed your patch
> from their repository?

I regret that Darcs collaborators expect me to use ‘darcs amend’ to
munge my recorded history, throwing away valuable data for an operation
(“see a clean version of all these patches you're sending”) that should
be supported in the VCS at the *recipient's* end.

Bazaar, on the other hand, has all the revisions preserved as-is in
everyone's repository. The history survives ‘bzr pull’, ‘bzr merge’,
‘bzr send’, etc. all intact; yet the recipient defaults to seeing the
aggregate effect of all of them, and can choose whether to filter the
details out by hiding the individual merges when viewing history.
Applying the changes is a separate, additional commit, with its own
message to describe the overall effect of the changes.

> > * It has a simple way to put some changes aside (‘bzr shelve’) while
> > committing the rest, and it's easy to bring uncommitted changes from
> > one branch to another, if while working on the change there I decide
> > they make more sense here (‘bzr merge --uncommitted $OTHERBRANCH/’).
> Are you saying that you find it to be *easier* to do that in bzr than
> in darcs?

I don't know a way to quickly pull *uncommitted* changes from one branch
to another in Darcs. In Bazaar, it's an option to ‘merge’ on one branch,
and a ‘revert’ command on the other, and the uncommitted changes are now
affecting the other branch's working tree instead, ready to continue
development there.

Moreover, though, I was just pointing out that this is easy and simple
in Bazaar despite not having to answer a bunch of out-of-context diff
hunks every damned time I commit :-) er, I mean, despite Bazaar not
doing ‘record’ interactively by default, it loses nothing in workflow.

> > * Especially, it allows for a centralised workflow when desired
> > (‘bzr checkout’ or ‘bzr bind’) without administrative overhead, and
> > without harming distributed operation.
> Do 'bzr checkout' and 'bzr bind' do something different that 'darcs
> get' and 'darcs push' with regard to this?

Yes. They ensure that the primary repository of revision data for the
branch is (like centralised VCS, and unlike Bazaar's default,
disconnected, mode of operation) located somewhere other than the
working tree: in a central repository, potentially on a completely
separate remote machine.


For workflows where ensuring a central branch remains in sync is more
important than the ability to work while offline, this optional
behaviour is a big advantage.

 \        “Don't fight forces, use them.” —Richard Buckminster Fuller, |
  `\                                                   _Shelter_, 1932 |
_o__)                                                                  |
Ben Finney

More information about the bazaar mailing list