/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to read_changeset.py

  • Committer: John Arbash Meinel
  • Date: 2005-06-29 15:54:52 UTC
  • mto: (0.5.85) (1185.82.1 bzr-w-changeset)
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: john@arbash-meinel.com-20050629155452-18f02584db656533
Made read_changeset able to spit out 'Revision' entities.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    def __str__(self):
49
49
        return pprint.pformat(self.__dict__)
50
50
 
 
51
    def as_revision(self):
 
52
        from bzrlib.revision import Revision, RevisionReference
 
53
        rev = Revision(revision_id=self.rev_id,
 
54
            committer=self.committer,
 
55
            timestamp=float(self.timestamp),
 
56
            timezone=int(self.timezone),
 
57
            inventory_id=self.inventory_id,
 
58
            inventory_sha1=self.inventory_sha1,
 
59
            message='\n'.join(self.message))
 
60
 
 
61
        for parent in self.parents:
 
62
            rev_id, sha1 = parent.split('\t')
 
63
            rev.parents.append(RevisionReference(rev_id, sha1))
 
64
 
 
65
        return rev
 
66
 
 
67
 
 
68
 
51
69
 
52
70
class ChangesetInfo(object):
53
71
    """This is the intermediate class that gets filled out as