Rev 60: A quick change to delay importing bzrdir until we actually use it. in http://bazaar.launchpad.net/%7Ebzr-pqm-devel/bzr-pqm/devel

John Arbash Meinel john at arbash-meinel.com
Fri Feb 6 17:21:06 GMT 2009


At http://bazaar.launchpad.net/%7Ebzr-pqm-devel/bzr-pqm/devel

------------------------------------------------------------
revno: 60
revision-id: john at arbash-meinel.com-20090206172048-cbx2imp370faksce
parent: john at arbash-meinel.com-20080421155351-qdgl18vox0sqwcqm
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: devel
timestamp: Fri 2009-02-06 11:20:48 -0600
message:
  A quick change to delay importing bzrdir until we actually use it.
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py	2008-04-03 09:42:16 +0000
+++ b/__init__.py	2009-02-06 17:20:48 +0000
@@ -19,8 +19,6 @@
 from bzrlib.commands import Command, register_command
 from bzrlib.option import Option
 
-from bzrlib.bzrdir import BzrDir
-
 
 version_info = (1, 4, 0, 'dev', 0)
 
@@ -84,7 +82,7 @@
 
     def run(self, location=None, message=None, public_location=None,
             dry_run=False, submit_branch=None):
-        from bzrlib import errors, trace
+        from bzrlib import errors, trace, bzrdir
         if __name__ != 'bzrlib.plugins.pqm':
             trace.warning('The bzr-pqm plugin needs to be called'
                           ' "bzrlib.plugins.pqm" not "%s"\n'
@@ -95,7 +93,7 @@
 
         if location is None:
             location = '.'
-        tree, b, relpath = BzrDir.open_containing_tree_or_branch(location)
+        tree, b, relpath = bzrdir.BzrDir.open_containing_tree_or_branch(location)
         if relpath and not tree and location != '.':
             raise errors.BzrCommandError(
                 'No working tree was found, but we were not given the '



More information about the bazaar-commits mailing list