[Pkg-bazaar-commits] ./bzr/unstable r999: - remove unnecessary internal imports

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:21:43 UTC 2009


------------------------------------------------------------
revno: 999
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Fri 2005-07-29 10:29:17 -0300
message:
  - remove unnecessary internal imports
modified:
  bzrlib/branch.py
  bzrlib/inventory.py
-------------- next part --------------
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py	2005-07-22 22:31:40 +0000
+++ b/bzrlib/branch.py	2005-07-29 13:29:17 +0000
@@ -18,11 +18,13 @@
 import sys, os
 
 import bzrlib
+
 from bzrlib.trace import mutter, note
 from bzrlib.osutils import isdir, quotefn, compact_date, rand_bytes, splitpath, \
      sha_file, appendpath, file_kind
 from bzrlib.errors import BzrError
-
+from bzrlib.textui import show_status
+        
 BZR_BRANCH_FORMAT = "Bazaar-NG branch, format 0.0.4\n"
 ## TODO: Maybe include checks for common corruption of newlines, etc?
 
@@ -422,7 +424,6 @@
               add all non-ignored children.  Perhaps do that in a
               higher-level method.
         """
-        from bzrlib.textui import show_status
         # TODO: Re-adding a file that is removed in the working copy
         # should probably put it back with the previous ID.
         if isinstance(files, basestring):
@@ -501,7 +502,6 @@
         is the opposite of add.  Removing it is consistent with most
         other tools.  Maybe an option.
         """
-        from bzrlib.textui import show_status
         ## TODO: Normalize names
         ## TODO: Remove nested loops; better scalability
         if isinstance(files, basestring):

=== modified file 'bzrlib/inventory.py'
--- a/bzrlib/inventory.py	2005-07-22 19:32:46 +0000
+++ b/bzrlib/inventory.py	2005-07-29 13:29:17 +0000
@@ -27,6 +27,9 @@
 
 from bzrlib.osutils import uuid, quotefn, splitpath, joinpath, appendpath
 from bzrlib.trace import mutter
+from bzrlib.branch import gen_file_id
+from bzrlib.errors import NotVersionedError
+        
 
 class InventoryEntry(object):
     """Description of a versioned file.
@@ -429,14 +432,11 @@
         """Add entry from a path.
 
         The immediate parent must already be versioned"""
-        from bzrlib.errors import NotVersionedError
-        
         parts = bzrlib.osutils.splitpath(relpath)
         if len(parts) == 0:
             raise BzrError("cannot re-add root of inventory")
 
         if file_id == None:
-            from bzrlib.branch import gen_file_id
             file_id = gen_file_id(relpath)
 
         parent_path = parts[:-1]



More information about the Pkg-bazaar-commits mailing list