/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/selftest/testbranch.py

  • Committer: Aaron Bentley
  • Date: 2005-11-25 04:30:47 UTC
  • mfrom: (1508.1.15)
  • mto: (1185.65.14 storage)
  • mto: This revision was merged to the branch mainline in revision 1550.
  • Revision ID: aaron.bentley@utoronto.ca-20051125043047-420c01b3982f9cda
MergedĀ theĀ mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
        b1 = Branch.initialize('b1')
51
51
        b2 = Branch.initialize('b2')
52
52
        file(os.sep.join(['b1', 'foo']), 'w').write('hello')
53
 
        b1.add(['foo'], ['foo-id'])
 
53
        b1.working_tree().add(['foo'], ['foo-id'])
54
54
        b1.working_tree().commit('lala!', rev_id='revision-1', allow_pointless=False)
55
55
 
56
56
        mutter('start fetch')
77
77
        os.mkdir('a')
78
78
        br_a = Branch.initialize("a")
79
79
        file('a/b', 'wb').write('b')
80
 
        br_a.add('b')
 
80
        br_a.working_tree().add('b')
81
81
        commit(br_a, "silly commit", rev_id='A')
82
82
        os.mkdir('b')
83
83
        br_b = Branch.initialize("b")
116
116
        """Copy only part of the history of a branch."""
117
117
        self.build_tree(['a/', 'a/one'])
118
118
        br_a = Branch.initialize('a')
119
 
        br_a.add(['one'])
 
119
        br_a.working_tree().add(['one'])
120
120
        br_a.working_tree().commit('commit one', rev_id='u@d-1')
121
121
        self.build_tree(['a/two'])
122
 
        br_a.add(['two'])
 
122
        br_a.working_tree().add(['two'])
123
123
        br_a.working_tree().commit('commit two', rev_id='u@d-2')
124
124
        br_b = copy_branch(br_a, 'b', revision='u@d-1')
125
125
        self.assertEqual(br_b.last_revision(), 'u@d-1')
240
240
#         >>> from bzrlib.commit import commit
241
241
#         >>> bzrlib.trace.silent = True
242
242
#         >>> br1 = ScratchBranch(files=['foo', 'bar'])
243
 
#         >>> br1.add('foo')
244
 
#         >>> br1.add('bar')
 
243
#         >>> br1.working_tree().add('foo')
 
244
#         >>> br1.working_tree().add('bar')
245
245
#         >>> commit(br1, "lala!", rev_id="REVISION-ID-1", verbose=False)
246
246
#         >>> br2 = ScratchBranch()
247
247
#         >>> br2.update_revisions(br1)