~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: John Arbash Meinel
  • Date: 2006-11-10 21:06:11 UTC
  • mto: This revision was merged to the branch mainline in revision 2159.
  • Revision ID: john@arbash-meinel.com-20061110210611-ee346404477ecb86
Fix imports to ensure modules are loaded before they are used

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    lockable_files,
44
44
    lockdir,
45
45
    revision as _mod_revision,
 
46
    repository as _mod_repository,
46
47
    urlutils,
47
48
    xml4,
48
49
    xml5,
917
918
        """See BzrDir.destroy_workingtree."""
918
919
        wt = self.open_workingtree()
919
920
        repository = wt.branch.repository
920
 
        empty = repository.revision_tree(bzrlib.revision.NULL_REVISION)
 
921
        empty = repository.revision_tree(_mod_revision.NULL_REVISION)
921
922
        wt.revert([], old_tree=empty)
922
923
        self.destroy_workingtree_metadata()
923
924
 
1800
1801
 
1801
1802
    def convert(self, to_convert, pb):
1802
1803
        """See Converter.convert()."""
 
1804
        from bzrlib.branch import BzrBranchFormat5
1803
1805
        self.bzrdir = to_convert
1804
1806
        self.pb = pb
1805
1807
        self.count = 0
1834
1836
        # we hard code the formats here because we are converting into
1835
1837
        # the meta format. The meta format upgrader can take this to a 
1836
1838
        # future format within each component.
1837
 
        self.put_format('repository', bzrlib.repository.RepositoryFormat7())
 
1839
        self.put_format('repository', _mod_repository.RepositoryFormat7())
1838
1840
        for entry in repository_names:
1839
1841
            self.move_entry('repository', entry)
1840
1842
 
1841
1843
        self.step('Upgrading branch      ')
1842
1844
        self.bzrdir.transport.mkdir('branch', mode=self.dir_mode)
1843
1845
        self.make_lock('branch')
1844
 
        self.put_format('branch', bzrlib.branch.BzrBranchFormat5())
 
1846
        self.put_format('branch', BzrBranchFormat5())
1845
1847
        branch_files = [('revision-history', True),
1846
1848
                        ('branch-name', True),
1847
1849
                        ('parent', False)]