This document specifies mapping between Subversion and Bazaar semantics.
-Revision: 3
+Revision: 4
Written by Jelmer Vernooij <jelmer@samba.org>
============
does not change, this revision id is only valid within a specific version
of the mappings.
-To override the revision id this way, set the revision property:
+To override the revision id this way, set the branch path file property:
bzr:revision-id-v%d:%s (where %d is the current mapping version and %s is
the name of the branching scheme in use)
-to the bzr revision number following by a space and the revision id. This o
+to the bzr revision number following by a space and the revision id. This
property should only be honored for the revision in which it was set, as
subversion will not erase the property for subsequent commits.
* either path,revnum or one of its children was touched in the particular
revision
+If possible, the Subversion revision property ``bzr:revision-id`` should be
+set to the revision id. The revision property ``bzr:root`` should be set to
+the root path of the revision and revision property ``bzr:scheme`` should be
+set to the name of the branching scheme.
+
========
File ids
========
predefined file id for tree roots.
Alternatively, these file ids can be mapped to more specific file ids. Such
-a map should be stored in the 'bzr:file-ids' property that is set on the
-branch path.
+a map should be stored in the 'bzr:file-ids' file property that is set on the
+branch path and, if possible, as revision property ``bzr:file-ids``.
The bzr:file-ids property should contain a list of mappings. Entries are
separated by newlines. The path in the branch and new file-id are separated
====================
Ancestry in Subversion is linear. Most revisions have just one parent. Files
-can be copied, moved or merged from other branches, which can result in partial merges
-that bzr doesn't support at the moment.
+can be copied, moved or merged from other branches, which can result in partial
+merges that bzr doesn't support at the moment.
Whenever a Bazaar commit to Subversion has more than one parent (merges two
revisions), it will add a line to the 'bzr:ancestry:vX-SCHEME' property set on
([\tPARENT-REV-ID]+)\n
+If possible, the list of merges will also be stored in the Subversion revision
+property ``bzr:merges``.
+
This property should be considered add-only. This way, it is
possible to know the parents of a revision when running checkout or
diff, because the Subversion API will mark the property as modified. The
Revision properties
===================
-Bazaar revision metadata is stored in a Subversion revision property
+If possible, the Bazaar revision metadata should be stored in Subversion
+revision properties. The names of the revision properties are:
+
+- committer: ``bzr:committer``
+- timestamp: ``svn:original-date``
+
+All custom revision properties are prefixed by ``bzr:revprop:``
+
+Bazaar revision metadata is also stored in a Subversion revision property
``bzr:revision-info``. The format of this property is the same as used
by version 0.9 of the bundle format.
+
==========
Signatures
==========
Revision 3 uses real file ids for the tree root rather than the hardcoded
"TREE_ROOT" and adds the file id map.
+Revision 4 adds revision properties in addition to file properties.
+
=======
Authors
=======
SVN_PROP_BZR_MERGE = 'bzr:merge'
SVN_PROP_SVK_MERGE = 'svk:merge'
SVN_PROP_BZR_REVISION_INFO = 'bzr:revision-info'
-SVN_REVPROP_BZR_SIGNATURE = 'bzr:gpg-signature'
SVN_PROP_BZR_REVISION_ID = 'bzr:revision-id:v%d-' % MAPPING_VERSION
SVN_PROP_BZR_BRANCHING_SCHEME = 'bzr:branching-scheme'
+SVN_REVPROP_BZR_COMMITTER = 'bzr:committer'
+SVN_REVPROP_BZR_FILEIDS = 'bzr:file-ids'
+SVN_REVPROP_BZR_MERGE = 'bzr:merge'
+SVN_REVPROP_BZR_REVISION_ID = 'bzr:revision-id'
+SVN_REVPROP_BZR_REVPROP_PREFIX = 'bzr:revprop:'
+SVN_REVPROP_BZR_ROOT = 'bzr:root'
+SVN_REVPROP_BZR_SCHEME = 'bzr:scheme'
+SVN_REVPROP_BZR_SIGNATURE = 'bzr:gpg-signature'
+
# The following two functions don't use day names (which can vary by
# locale) unlike the alternatives in bzrlib.timestamp
self.branchprop_list.get_property(path, revnum,
SVN_PROP_BZR_REVISION_INFO, ""), rev)
- rev.inventory_sha1 = property(lambda: self.get_inventory_sha1(revision_id))
+ rev.inventory_sha1 = property(
+ lambda: self.get_inventory_sha1(revision_id))
return rev