[Pkg-bazaar-commits] ./bzr/unstable r709: - when writing a revision, store the first parent as the precursor
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:20:48 UTC 2009
------------------------------------------------------------
revno: 709
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Mon 2005-06-20 13:33:24 +1000
message:
- when writing a revision, store the first parent as the precursor
to support old readers
modified:
bzrlib/revision.py
-------------- next part --------------
=== modified file 'bzrlib/revision.py'
--- a/bzrlib/revision.py 2005-06-20 03:31:09 +0000
+++ b/bzrlib/revision.py 2005-06-20 03:33:24 +0000
@@ -119,10 +119,6 @@
)
if self.timezone:
root.set('timezone', str(self.timezone))
- if self.precursor:
- root.set('precursor', self.precursor)
- if self.precursor_sha1:
- root.set('precursor_sha1', self.precursor_sha1)
root.text = '\n'
msg = SubElement(root, 'message')
@@ -130,6 +126,14 @@
msg.tail = '\n'
if self.parents:
+ # first parent stored as precursor for compatability with 0.0.5 and
+ # earlier
+ pr = self.parents[0]
+ root.set('precursor', pr.revision_id)
+ if pr.revision_sha1:
+ root.set('precursor_sha1', pr.revision_sha1)
+
+ if self.parents:
pelts = SubElement(root, 'parents')
pelts.tail = pelts.text = '\n'
for rr in self.parents:
More information about the Pkg-bazaar-commits
mailing list