~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: mbp at sourcefrog
  • Date: 2005-03-09 06:44:53 UTC
  • Revision ID: mbp@sourcefrog.net-20050309064453-60be0ae479d019b8
store committer's timezone in revision and show 
in changelog

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
 
19
19
 
 
20
 
20
21
from xml import XMLMixin
21
22
 
22
23
try:
39
40
        self.revision_id = None
40
41
        self.timestamp = None
41
42
        self.message = None
 
43
        self.timezone = None
42
44
        self.__dict__.update(args)
43
45
 
44
46
 
50
52
    def to_element(self):
51
53
        root = Element('changeset',
52
54
                       committer = self.committer,
53
 
                       timestamp = '%f' % self.timestamp,
 
55
                       timestamp = '%.9f' % self.timestamp,
54
56
                       revision_id = self.revision_id,
55
 
                       inventory_id = self.inventory_id)
 
57
                       inventory_id = self.inventory_id,
 
58
                       timezone = str(self.timezone))
56
59
        if self.precursor:
57
60
            root.set('precursor', self.precursor)
58
61
        root.text = '\n'
70
73
                 revision_id = root.get('revision_id'),
71
74
                 inventory_id = root.get('inventory_id'))
72
75
 
 
76
        v = root.get('timezone')
 
77
        cs.timezone = v and int(v)
 
78
 
73
79
        cs.message = root.findtext('message') # text of <message>
74
80
        return cs
75
81