/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2009-07-31 17:42:29 UTC
  • mto: This revision was merged to the branch mainline in revision 4611.
  • Revision ID: john@arbash-meinel.com-20090731174229-w2zdsdlfpeddk8gl
Now we got to the per-workingtree tests, etc.

The main causes seem to break down into:
  bzrdir.clone() is known to be broken wrt locking, this effects
  everything that tries to 'push'

  shelf code is not compatible with strict locking

  merge code seems to have an issue. This might actually be the
  root cause of the clone() problems.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005 Canonical Ltd
2
2
# -*- coding: utf-8 -*-
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
20
20
"""
21
21
 
22
22
import os
23
 
 
24
 
from bzrlib import tests
25
 
from bzrlib.transport import memory
26
 
 
27
 
 
28
 
class TestCat(tests.TestCaseWithTransport):
 
23
import sys
 
24
 
 
25
from bzrlib.tests.blackbox import TestCaseWithTransport
 
26
 
 
27
class TestCat(TestCaseWithTransport):
29
28
 
30
29
    def test_cat(self):
31
30
        tree = self.make_branch_and_tree('branch')
69
68
 
70
69
    def test_cat_different_id(self):
71
70
        """'cat' works with old and new files"""
72
 
        self.disable_missing_extensions_warning()
73
71
        tree = self.make_branch_and_tree('.')
74
72
        # the files are named after their path in the revision and
75
73
        # current trees later in the test case
128
126
        out, err = self.run_bzr_subprocess(['cat', url])
129
127
        self.assertEqual('contents of README\n', out)
130
128
 
131
 
    def test_cat_branch_revspec(self):
132
 
        wt = self.make_branch_and_tree('a')
133
 
        self.build_tree(['a/README'])
134
 
        wt.add('README')
135
 
        wt.commit('Making sure there is a basis_tree available')
136
 
        wt = self.make_branch_and_tree('b')
137
 
        os.chdir('b')
138
 
 
139
 
        out, err = self.run_bzr_subprocess(
140
 
            ['cat', '-r', 'branch:../a', 'README'])
141
 
        self.assertEqual('contents of a/README\n', out)
142
 
 
143
129
    def test_cat_filters(self):
144
130
        wt = self.make_branch_and_tree('.')
145
131
        self.build_tree(['README'])
196
182
        self.assertEqual('contents of README\n', out)
197
183
 
198
184
    def test_cat_nonexistent_branch(self):
199
 
        self.vfs_transport_factory = memory.MemoryServer
200
 
        self.run_bzr_error(['^bzr: ERROR: Not a branch'],
201
 
                           ['cat', self.get_url()])
 
185
        if sys.platform == "win32":
 
186
            location = "C:/i/do/not/exist"
 
187
        else:
 
188
            location = "/i/do/not/exist"
 
189
        self.run_bzr_error(['^bzr: ERROR: Not a branch'], ['cat', location])