/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_branch.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-29 21:35:05 UTC
  • mfrom: (4576 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4577.
  • Revision ID: john@arbash-meinel.com-20090729213505-tkqsvy1zfpocu75w
Merge bzr.dev 4576 in prep for NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
        self.failIfExists('target/hello')
114
114
        self.failIfExists('target/goodbye')
115
115
 
 
116
    def test_branch_into_existing_dir(self):
 
117
        self.example_branch('a')
 
118
        # existing dir with similar files but no .bzr dir
 
119
        self.build_tree_contents([('b/',)])
 
120
        self.build_tree_contents([('b/hello', 'bar')])  # different content
 
121
        self.build_tree_contents([('b/goodbye', 'baz')])# same content
 
122
        # fails without --use-existing-dir
 
123
        out,err = self.run_bzr('branch a b', retcode=3)
 
124
        self.assertEqual('', out)
 
125
        self.assertEqual('bzr: ERROR: Target directory "b" already exists.\n',
 
126
            err)
 
127
        # force operation
 
128
        self.run_bzr('branch a b --use-existing-dir')
 
129
        # check conflicts
 
130
        self.failUnlessExists('b/hello.moved')
 
131
        self.failIfExists('b/godbye.moved')
 
132
        # we can't branch into branch
 
133
        out,err = self.run_bzr('branch a b --use-existing-dir', retcode=3)
 
134
        self.assertEqual('', out)
 
135
        self.assertEqual('bzr: ERROR: Already a branch: "b".\n', err)
 
136
 
116
137
 
117
138
class TestBranchStacked(ExternalBase):
118
139
    """Tests for branch --stacked"""
273
294
        # being too low. If rpc_count increases, more network roundtrips have
274
295
        # become necessary for this use case. Please do not adjust this number
275
296
        # upwards without agreement from bzr's network support maintainers.
276
 
        self.assertLength(39, self.hpss_calls)
 
297
        self.assertLength(38, self.hpss_calls)
277
298
 
278
299
    def test_branch_from_trivial_branch_streaming_acceptance(self):
279
300
        self.setup_smart_server_with_call_log()