Rev 5673: (jelmer) Use lazy imports in bzrlib.merge_directive. (Jelmer Vernooij) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Feb 21 14:33:43 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5673 [merge]
revision-id: pqm at pqm.ubuntu.com-20110221143337-6xh8ycrz33mz1ttx
parent: pqm at pqm.ubuntu.com-20110220020249-6gfgbgp9d03unw0e
parent: jelmer at samba.org-20110220005324-xnb1ifis5bfkrl51
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2011-02-21 14:33:37 +0000
message:
  (jelmer) Use lazy imports in bzrlib.merge_directive. (Jelmer Vernooij)
modified:
  bzrlib/knit.py                 knit.py-20051212171256-f056ac8f0fbe1bd9
  bzrlib/merge_directive.py      merge_directive.py-20070228184838-ja62280spt1g7f4x-1
  bzrlib/revisionspec.py         revisionspec.py-20050907152633-17567659fd5c0ddb
=== modified file 'bzrlib/knit.py'
--- a/bzrlib/knit.py	2011-02-14 02:37:04 +0000
+++ b/bzrlib/knit.py	2011-02-20 00:53:24 +0000
@@ -54,13 +54,14 @@
 
 from cStringIO import StringIO
 from itertools import izip
-import gzip
 import operator
 import os
 import sys
 
 from bzrlib.lazy_import import lazy_import
 lazy_import(globals(), """
+import gzip
+
 from bzrlib import (
     annotate,
     debug,
@@ -83,19 +84,15 @@
     osutils,
     )
 from bzrlib.errors import (
-    FileExists,
     NoSuchFile,
-    KnitError,
     InvalidRevisionId,
     KnitCorrupt,
     KnitHeaderError,
     RevisionNotPresent,
-    RevisionAlreadyPresent,
     SHA1KnitCorrupt,
     )
 from bzrlib.osutils import (
     contains_whitespace,
-    contains_linebreaks,
     sha_string,
     sha_strings,
     split_lines,
@@ -105,9 +102,7 @@
     adapter_registry,
     ConstantMapper,
     ContentFactory,
-    ChunkedContentFactory,
     sort_groupcompress,
-    VersionedFile,
     VersionedFiles,
     )
 

=== modified file 'bzrlib/merge_directive.py'
--- a/bzrlib/merge_directive.py	2010-03-13 02:49:14 +0000
+++ b/bzrlib/merge_directive.py	2011-02-19 21:00:05 +0000
@@ -18,6 +18,8 @@
 from StringIO import StringIO
 import re
 
+from bzrlib import lazy_import
+lazy_import.lazy_import(globals(), """
 from bzrlib import (
     branch as _mod_branch,
     diff,
@@ -35,6 +37,7 @@
     serializer as bundle_serializer,
     )
 from bzrlib.email_message import EmailMessage
+""")
 
 
 class MergeRequestBodyParams(object):

=== modified file 'bzrlib/revisionspec.py'
--- a/bzrlib/revisionspec.py	2011-02-19 17:37:45 +0000
+++ b/bzrlib/revisionspec.py	2011-02-21 14:33:37 +0000
@@ -21,6 +21,10 @@
 lazy_import(globals(), """
 import bisect
 import datetime
+
+from bzrlib import (
+    workingtree,
+    )
 """)
 
 from bzrlib import (




More information about the bazaar-commits mailing list