~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/versioning.py

  • Committer: Lalo Martins
  • Date: 2005-09-09 11:37:44 UTC
  • mto: (1185.1.22)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: lalo@exoweb.net-20050909113744-22f870db25a9e5f5
getting rid of everything that calls the Branch constructor directly

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
        from bzrlib.diff import compare_trees
47
47
        from bzrlib.branch import Branch
48
 
        b = Branch('.')
 
48
        b = Branch.open('.')
49
49
        
50
50
        delta = compare_trees(b.basis_tree(), b.working_tree())
51
51
 
64
64
        from bzrlib.branch import Branch
65
65
        from bzrlib.errors import NotVersionedError
66
66
 
67
 
        b = Branch('.', init=True)
 
67
        b = Branch.initialize('.')
68
68
 
69
69
        self.build_tree(['foo/',
70
70
                         'foo/hello'])
86
86
        ass = self.assert_
87
87
        chdir = os.chdir
88
88
        
89
 
        b = Branch('.', init=True)
 
89
        b = Branch.initialize('.')
90
90
        self.build_tree(['src/', 'README'])
91
91
        
92
92
        eq(sorted(b.unknowns()),
114
114
        """After all the above changes, run the check and upgrade commands.
115
115
 
116
116
        The upgrade should be a no-op."""
117
 
        b = Branch('.')
 
117
        b = Branch.open('.')
118
118
        debug('branch has %d revisions', b.revno())
119
119
        
120
120
        debug('check branch...')
142
142
        self.build_tree(['a/', 'b/'])
143
143
        
144
144
        run_bzr('init')
145
 
        b = Branch('.')
 
145
        b = Branch.open('.')
146
146
        
147
147
        for fn in ('a/one', 'b/two', 'top'):
148
148
            file(fn, 'w').write('old contents')