~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

Merge previous attempt into current trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
28
28
    symbol_versioning,
29
29
    )
30
30
from bzrlib.osutils import contains_whitespace
31
 
from bzrlib.progress import DummyProgress
32
31
 
33
32
NULL_REVISION="null:"
34
33
CURRENT_REVISION="current:"
54
53
 
55
54
    def __init__(self, revision_id, properties=None, **args):
56
55
        self.revision_id = revision_id
57
 
        self.properties = properties or {}
58
 
        self._check_properties()
 
56
        if properties is None:
 
57
            self.properties = {}
 
58
        else:
 
59
            self.properties = properties
 
60
            self._check_properties()
59
61
        self.committer = None
60
62
        self.parent_ids = []
61
63
        self.parent_sha1s = []
88
90
                raise ValueError("invalid property name %r" % name)
89
91
            if not isinstance(value, basestring):
90
92
                raise ValueError("invalid property value %r for %r" %
91
 
                                 (name, value))
 
93
                                 (value, name))
92
94
 
93
95
    def get_history(self, repository):
94
96
        """Return the canonical line-of-history for this revision.