~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

Merge from integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
    def test_append_revisions(self):
37
37
        """Test appending more than one revision"""
38
 
        br = Branch.initialize(".")
 
38
        br = Branch.initialize(u".")
39
39
        br.append_revision("rev1")
40
40
        self.assertEquals(br.revision_history(), ["rev1",])
41
41
        br.append_revision("rev2", "rev3")
63
63
        eq(tree.get_file_text('foo-id'), 'hello')
64
64
 
65
65
    def test_revision_tree(self):
66
 
        b1 = Branch.initialize('.')
 
66
        b1 = Branch.initialize(u'.')
67
67
        b1.working_tree().commit('lala!', rev_id='revision-1', allow_pointless=True)
68
68
        tree = b1.storage.revision_tree('revision-1')
69
69
        tree = b1.storage.revision_tree(None)
127
127
        
128
128
    def test_record_initial_ghost_merge(self):
129
129
        """A pending merge with no revision present is still a merge."""
130
 
        branch = Branch.initialize('.')
 
130
        branch = Branch.initialize(u'.')
131
131
        branch.working_tree().add_pending_merge('non:existent@rev--ision--0--2')
132
132
        branch.working_tree().commit('pretend to merge nonexistent-revision', rev_id='first')
133
133
        rev = branch.storage.get_revision(branch.last_revision())
148
148
        
149
149
    def test_pending_merges(self):
150
150
        """Tracking pending-merged revisions."""
151
 
        b = Branch.initialize('.')
 
151
        b = Branch.initialize(u'.')
152
152
        wt = b.working_tree()
153
153
        self.assertEquals(wt.pending_merges(), [])
154
154
        wt.add_pending_merge('foo@azkhazan-123123-abcabc')
170
170
        self.assertEquals(wt.pending_merges(), [])
171
171
 
172
172
    def test_sign_existing_revision(self):
173
 
        branch = Branch.initialize('.')
 
173
        branch = Branch.initialize(u'.')
174
174
        branch.working_tree().commit("base", allow_pointless=True, rev_id='A')
175
175
        from bzrlib.testament import Testament
176
176
        branch.storage.sign_revision('A', bzrlib.gpg.LoopbackGPGStrategy(None))
229
229
                          self.get_remote_url(''))
230
230
        self.assertRaises(NotBranchError, Branch.open_containing,
231
231
                          self.get_remote_url('g/p/q'))
232
 
        b = Branch.initialize('.')
 
232
        b = Branch.initialize(u'.')
233
233
        branch, relpath = Branch.open_containing(self.get_remote_url(''))
234
234
        self.assertEqual('', relpath)
235
235
        branch, relpath = Branch.open_containing(self.get_remote_url('g/p/q'))
321
321
 
322
322
    def setUp(self):
323
323
        super(TestBranchTransaction, self).setUp()
324
 
        self.branch = Branch.initialize('.')
 
324
        self.branch = Branch.initialize(u'.')
325
325
        
326
326
    def test_default_get_transaction(self):
327
327
        """branch.get_transaction on a new branch should give a PassThrough."""
370
370
 
371
371
    def setUp(self):
372
372
        super(TestBranchPushLocations, self).setUp()
373
 
        self.branch = Branch.initialize('.')
 
373
        self.branch = Branch.initialize(u'.')
374
374
        
375
375
    def test_get_push_location_unset(self):
376
376
        self.assertEqual(None, self.branch.get_push_location())