~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_missing.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-05-03 19:49:12 UTC
  • mfrom: (2476.1.1 shared_repo_layouts)
  • Revision ID: pqm@pqm.ubuntu.com-20070503194912-pzlcms91kk2uqfdo
(John Arbash Meinel) Add doc/shared_repository_layouts.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 by Canonical Ltd
 
1
# Copyright (C) 2005 Canonical Ltd
2
2
# -*- coding: utf-8 -*-
3
3
# vim: encoding=utf-8
4
4
#
20
20
 
21
21
import os
22
22
 
 
23
from bzrlib import osutils
 
24
 
23
25
from bzrlib.branch import Branch
24
 
from bzrlib.tests import TestCaseInTempDir
25
 
 
26
 
 
27
 
class TestMissing(TestCaseInTempDir):
 
26
from bzrlib.tests import TestCaseWithTransport
 
27
 
 
28
 
 
29
class TestMissing(TestCaseWithTransport):
28
30
 
29
31
    def test_missing(self):
30
32
        def bzr(*args, **kwargs):
118
120
        self.assertEqual("Branches are up to date.\n", 
119
121
                         bzr('missing', '../a'))
120
122
 
 
123
    def test_missing_check_last_location(self):
 
124
        # check that last location shown as filepath not file URL
 
125
 
 
126
        # create a source branch
 
127
        os.mkdir('a')
 
128
        os.chdir('a')
 
129
        wt = self.make_branch_and_tree('.')
 
130
        b = wt.branch
 
131
        self.build_tree(['foo'])
 
132
        wt.add('foo')
 
133
        wt.commit('initial')
 
134
 
 
135
        location = osutils.getcwd() + '/'
 
136
 
 
137
        # clone
 
138
        b.bzrdir.sprout('../b')
 
139
 
 
140
        # check last location
 
141
        lines, err = self.run_bzr('missing', working_dir='../b')
 
142
        self.assertEquals('Using last location: %s\n'
 
143
                          'Branches are up to date.\n' % location,
 
144
                          lines)
 
145
        self.assertEquals('', err)