/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to viz/graph.py

  • Committer: Jelmer Vernooij
  • Date: 2007-05-19 16:15:11 UTC
  • Revision ID: jelmer@samba.org-20070519161511-49bky3avi2uh9uvq
Add tests for DummyRevision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
__author__    = "Scott James Remnant <scott@ubuntu.com>"
11
11
 
12
12
 
 
13
from bzrlib.revision import Revision
13
14
from bzrlib.tsort import merge_sort
14
15
 
15
16
 
16
 
class DummyRevision(object):
 
17
class DummyRevision(Revision):
17
18
    """Dummy bzr revision.
18
19
 
19
20
    Sometimes, especially in older bzr branches, a revision is referenced
21
22
    When this happens we use an instance of this class instead of the real
22
23
    Revision object (which we can't get).
23
24
    """
24
 
 
25
25
    def __init__(self, revid):
26
 
        self.revision_id = revid
27
 
        self.parent_ids = []
 
26
        super(DummyRevision, self).__init__(revid)
28
27
        self.committer = None
29
 
        self.timestamp = None
30
 
        self.timezone = None
31
 
        self.message = self.revision_id
32
 
        self.properties = {}
 
28
        self.message = revid
33
29
 
34
30
 
35
31
class RevisionProxy(object):