~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisiontree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-01-15 04:49:48 UTC
  • mfrom: (3984.5.22 switch-r-183559)
  • Revision ID: pqm@pqm.ubuntu.com-20100115044948-yxz5m3vchxapbq22
(andrew) Add --revision option to 'bzr switch'. (#184559)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2008, 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2006 Canonical Ltd
2
2
# Authors:  Robert Collins <robert.collins@canonical.com>
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
18
18
"""Tests for the RevisionTree class."""
19
19
 
20
20
from bzrlib import (
21
 
    errors,
22
21
    revision,
23
22
    )
24
23
import bzrlib
25
 
from bzrlib.inventory import ROOT_ID
26
24
from bzrlib.tests import TestCaseWithTransport
27
25
 
28
26
 
61
59
        null_tree = self.t.branch.repository.revision_tree(
62
60
            revision.NULL_REVISION)
63
61
        self.assertIs(None, null_tree.inventory.root)
64
 
 
65
 
    def test_get_file_mtime_ghost(self):
66
 
        file_id = iter(self.rev_tree).next()
67
 
        self.rev_tree.inventory[file_id].revision = 'ghostrev'
68
 
        self.assertRaises(errors.FileTimestampUnavailable, 
69
 
            self.rev_tree.get_file_mtime, file_id)