[RFC] revision id "pseudonyms" and converted-from revision property

Jelmer Vernooij jelmer at samba.org
Wed Oct 7 20:30:27 BST 2009


Different revisions in Bazaar created from the same foreign revision
might have different revision ids, because the mapping between semantics
in the foreign VCS and Bazaar that was used was different. 

There are several situations in which it is useful to be able to tell
that multiple Bazaar revisions with different revision ids were created
from the same original foreign revision.

For example, it is useful to be able to rebase an existing branch based
on a Launchpad-cscvs import onto an import of the same Subversion branch
made with bzr-svn.  Or to rebase an existing branch created with git-svn
onto an import of the same branch made with "hg convert".

We have the (unimplemented) concept of "revision id aliases" for
revisions that have the exact same contents - their only difference are
their revision ids. However, this is an unnecessarily strict requirement
for these use cases - there might be different file ids or slight
differences in history.

Instead, it might be more useful to consider revisions that are for most
purposes equivalent because they are based on the same foreign revision
- their revision ids being "pseudonyms" rather than aliases.

To be able to prove what revisions are pseudonyms, I propose all
conversion tools append a foreign revision id to a revision property
called "converted-from". 

E.g. for a revision that was imported from svn into git and later into
bzr the property's contents could look like this:

svn 71d39326-ef09-db11-b2a4-00e04c779ad1:trunk:1526
git 4a1327ff6cd05227f8ac2bc2490f8a809fc8c7d9

This should provide enough information for tools like bzr-rewrite to
prove what revisions' ids are pseudonyms later. 

If this sounds reasonable, I'll work on providing patches for the
various conversion tools. For any conversion tools that use
deterministic revision ids this change will have to wait until the next
mapping version bump, but we should already have other ways to determine
the original foreign revision id for them until then.

Ian, does the fastexport/fastimport protocol provide enough information
to determine a foreign revision id?

Cheers,

Jelmer

-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20091007/67c482a5/attachment-0001.pgp 


More information about the bazaar mailing list