~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_stacking.py

  • Committer: Ross Lagerwall
  • Date: 2012-08-07 06:32:51 UTC
  • mto: (6437.63.5 2.5)
  • mto: This revision was merged to the branch mainline in revision 6558.
  • Revision ID: rosslagerwall@gmail.com-20120807063251-x9p03ghg2ws8oqjc
Add bzrlib/locale to .bzrignore

bzrlib/locale is generated with ./setup.py build_mo which is in turn called
by ./setup.py build

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008-2012, 2016 Canonical Ltd
 
1
# Copyright (C) 2008, 2009, 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
18
18
 
19
19
from bzrlib import (
20
20
    branch,
21
 
    controldir,
 
21
    bzrdir,
22
22
    check,
23
23
    errors,
24
24
    )
107
107
 
108
108
    def assertRevisionInRepository(self, repo_path, revid):
109
109
        """Check that a revision is in a repository, disregarding stacking."""
110
 
        repo = controldir.ControlDir.open(repo_path).open_repository()
 
110
        repo = bzrdir.BzrDir.open(repo_path).open_repository()
111
111
        self.assertTrue(repo.has_revision(revid))
112
112
 
113
113
    def assertRevisionNotInRepository(self, repo_path, revid):
114
114
        """Check that a revision is not in a repository, disregarding stacking."""
115
 
        repo = controldir.ControlDir.open(repo_path).open_repository()
 
115
        repo = bzrdir.BzrDir.open(repo_path).open_repository()
116
116
        self.assertFalse(repo.has_revision(revid))
117
117
 
118
118
    def test_get_graph_stacked(self):
165
165
            raise TestNotApplicable(e)
166
166
        # Now serve the original mainline from a smart server
167
167
        remote_transport = self.make_smart_server('mainline')
168
 
        remote_bzrdir = controldir.ControlDir.open_from_transport(remote_transport)
 
168
        remote_bzrdir = bzrdir.BzrDir.open_from_transport(remote_transport)
169
169
        # and make branch from the smart server which is stacked
170
170
        new_dir = remote_bzrdir.sprout('newbranch', stacked=True)
171
171
        # stacked repository
552
552
        self.assertEqual({}, repo.get_parent_map(['rev1']))
553
553
        # revision_history should work, even though the history is spread over
554
554
        # multiple repositories.
555
 
        self.assertEqual((2, 'rev2'), stacked.branch.last_revision_info())
 
555
        self.assertEquals((2, 'rev2'), stacked.branch.last_revision_info())
556
556
 
557
557
 
558
558
class TestStackingConnections(