~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-12-01 20:29:02 UTC
  • mfrom: (2094.3.6 audit_imports)
  • Revision ID: pqm@pqm.ubuntu.com-20061201202902-33d3262fdef929e8
(John Arbash Meinel) Clean up several imports to ensure modules are imported 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
 
1803
1804
 
1804
1805
    def convert(self, to_convert, pb):
1805
1806
        """See Converter.convert()."""
 
1807
        from bzrlib.branch import BzrBranchFormat5
1806
1808
        self.bzrdir = to_convert
1807
1809
        self.pb = pb
1808
1810
        self.count = 0
1837
1839
        # we hard code the formats here because we are converting into
1838
1840
        # the meta format. The meta format upgrader can take this to a 
1839
1841
        # future format within each component.
1840
 
        self.put_format('repository', bzrlib.repository.RepositoryFormat7())
 
1842
        self.put_format('repository', _mod_repository.RepositoryFormat7())
1841
1843
        for entry in repository_names:
1842
1844
            self.move_entry('repository', entry)
1843
1845
 
1844
1846
        self.step('Upgrading branch      ')
1845
1847
        self.bzrdir.transport.mkdir('branch', mode=self.dir_mode)
1846
1848
        self.make_lock('branch')
1847
 
        self.put_format('branch', bzrlib.branch.BzrBranchFormat5())
 
1849
        self.put_format('branch', BzrBranchFormat5())
1848
1850
        branch_files = [('revision-history', True),
1849
1851
                        ('branch-name', True),
1850
1852
                        ('parent', False)]