What constitutes the "identity" of a changeset?

Paul Moore p.f.moore at gmail.com
Fri Mar 28 19:21:32 GMT 2008


This may not be a valid question in the context of Bazaar, but bear with me...

In Mercurial, a changeset is identified by its ID, which is a hash of
all the data and metadata making up the changeset, plus the ID(s) of
its parent(s). So changeset identity is directly related to the
content of the change, and its history. I find this notion of identity
very easy to understand. And it has the nice property that it does not
include "where the changeset came from".

The other day I hit a problem with Bazaar which makes me thing that
changeset identity is handled differently in Bazaar, and I can't find
a concise explanation of what constitutes identity in Bazaar.

Just to explain, the problem I hit was in using the bzr-svn plugin. I
was trying to start a branch from one place (a local svnclone mirror,
IIRC) and then pull further changes from the original repository (over
http). I got an error saying that the branches "were unrelated". But
they were, in some fundamental sense, the same changes - only the
source differed. In Mercurial terms, I believe they would have been
the same. Possibly if the 2 sources had been pure Bazaar repositories
they would have been the same - it may be that bzr-svn cannot make
such strong changeset identity guarantees simply because of the
limitations of Subversion.

Hence my question - what *is* changeset identity to Bazaar? Is it a
constant, or does it vary depending on the backend, somehow?

Paul.

PS This is precisely the sort of "gory details" I would like to see in
the manuals somewhere. As you can see from the Mercurial example, it
doesn't have to be complex to state (although maybe it is) but it
should be explained somewhere, so that people can hold a clear
understanding in their mind of what it means for 2 changesets to be
"the same".



More information about the bazaar mailing list