25
25
Includes the revision_id and revision_sha1.
28
def __eq__(self, other):
30
return self.revision_id == other.revision_id and \
31
self.revision_sha1 == other.revision_sha1
32
except AttributeError:
29
35
def __init__(self, revision_id, revision_sha1=None):
36
self.revision_id = None
37
self.revision_sha1 = None
30
38
if revision_id == None \
31
39
or isinstance(revision_id, basestring):
32
40
self.revision_id = revision_id
55
63
List of parent revisions, each is a RevisionReference.
65
def __init__(self, **args):
66
self.__dict__.update(args)
66
def __init__(self, inventory_id=None, inventory_sha1=None,
67
revision_id=None, timestamp=None,
68
message=None, timezone=None,
69
committer=None, parents=None):
70
self.inventory_id = inventory_id
71
self.inventory_sha1 = inventory_sha1
72
self.revision_id = revision_id
73
self.timestamp = timestamp
74
self.message = message
75
self.timezone = timezone
76
self.committer = committer
77
if parents is not None:
78
self.parents = parents
82
def __eq__(self, other):
84
return self.inventory_id == other.inventory_id and \
85
self.inventory_sha1 == other.inventory_sha1 and \
86
self.revision_id == other.revision_id and \
87
self.timestamp == other.timestamp and \
88
self.message == other.message and \
89
self.timezone == other.timezone and \
90
self.committer == other.committer and \
91
self.parents == other.parents
92
except AttributeError:
70
95
def __repr__(self):
71
96
return "<Revision id %s>" % self.revision_id
74
98
def to_element(self):
75
99
from bzrlib.xml import Element, SubElement