Rev 5028: (mbp) trim modules loaded at startup time in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Feb 11 05:43:35 GMT 2010


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

------------------------------------------------------------
revno: 5028 [merge]
revision-id: pqm at pqm.ubuntu.com-20100211054331-4qtx8q4od2tafla3
parent: pqm at pqm.ubuntu.com-20100211040241-w6n021dz0uus341n
parent: mbp at canonical.com-20100210021715-4jlnmcxqxod7ut19
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2010-02-11 05:43:31 +0000
message:
  (mbp) trim modules loaded at startup time
removed:
  bzrlib/weave_commands.py       weave_commands.py-20060320231507-8e9f300bffc1aa19
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
  bzrlib/repofmt/groupcompress_repo.py repofmt.py-20080715094215-wp1qfvoo7093c8qr-1
  bzrlib/send.py                 send.py-20090521192735-j7cdb33ykmtmzx4w-1
  bzrlib/smart/repository.py     repository.py-20061128022038-vr5wy5bubyb8xttk-1
  bzrlib/tests/test_import_tariff.py test_import_tariff.p-20100207155145-ff9infp7goncs7zh-1
=== modified file 'NEWS'
--- a/NEWS	2010-02-11 04:02:41 +0000
+++ b/NEWS	2010-02-11 05:43:31 +0000
@@ -14,6 +14,10 @@
 Compatibility Breaks
 ********************
 
+* Deleted very old hidden commands ``versionedfile-list``,
+  ``weave-plan-merge``, ``weave-merge-text``.
+  (Martin Pool)
+
 * ``Repository.get_inventory_sha1()`` has been removed. (Jelmer Vernooij)
 
 New Features

=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2010-02-10 17:52:08 +0000
+++ b/bzrlib/builtins.py	2010-02-11 05:43:31 +0000
@@ -5907,5 +5907,3 @@
     )
 from bzrlib.foreign import cmd_dpush
 from bzrlib.sign_my_commits import cmd_sign_my_commits
-from bzrlib.weave_commands import cmd_versionedfile_list, \
-        cmd_weave_plan_merge, cmd_weave_merge_text

=== modified file 'bzrlib/repofmt/groupcompress_repo.py'
--- a/bzrlib/repofmt/groupcompress_repo.py	2010-02-01 11:39:02 +0000
+++ b/bzrlib/repofmt/groupcompress_repo.py	2010-02-10 02:17:15 +0000
@@ -29,7 +29,6 @@
     knit,
     osutils,
     pack,
-    remote,
     revision as _mod_revision,
     trace,
     ui,

=== modified file 'bzrlib/send.py'
--- a/bzrlib/send.py	2009-10-06 14:40:37 +0000
+++ b/bzrlib/send.py	2010-02-10 02:17:15 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Canonical Ltd
+# Copyright (C) 2009, 2010 Canonical Ltd
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,6 @@
 from bzrlib import (
     bzrdir,
     errors,
-    merge_directive,
     osutils,
     registry,
     trace,
@@ -150,6 +149,7 @@
 
 def _send_4(branch, revision_id, submit_branch, public_branch,
             no_patch, no_bundle, message, base_revision_id):
+    from bzrlib import merge_directive
     return merge_directive.MergeDirective2.from_objects(
         branch.repository, revision_id, time.time(),
         osutils.local_time_offset(), submit_branch,
@@ -171,6 +171,7 @@
             patch_type = 'diff'
         else:
             patch_type = None
+    from bzrlib import merge_directive
     return merge_directive.MergeDirective.from_objects(
         branch.repository, revision_id, time.time(),
         osutils.local_time_offset(), submit_branch,

=== modified file 'bzrlib/smart/repository.py'
--- a/bzrlib/smart/repository.py	2010-01-14 07:34:37 +0000
+++ b/bzrlib/smart/repository.py	2010-02-10 02:17:15 +0000
@@ -20,7 +20,6 @@
 import os
 import Queue
 import sys
-import tarfile
 import tempfile
 import threading
 
@@ -683,6 +682,7 @@
             temp.close()
 
     def _tarball_of_dir(self, dirname, compression, ofile):
+        import tarfile
         filename = os.path.basename(ofile.name)
         tarball = tarfile.open(fileobj=ofile, name=filename,
             mode='w|' + compression)

=== modified file 'bzrlib/tests/test_import_tariff.py'
--- a/bzrlib/tests/test_import_tariff.py	2010-02-10 02:03:20 +0000
+++ b/bzrlib/tests/test_import_tariff.py	2010-02-10 02:17:15 +0000
@@ -81,5 +81,9 @@
     def test_simple_local(self):
         # 'st' in a working tree shouldn't need many modules
         self.make_branch_and_tree('.')
-        self.run_command_check_imports(['st'],
-            ['smtplib'])
+        self.run_command_check_imports(['st'], [
+            'bzrlib.remote',
+            'bzrlib.smart',
+            'smtplib',
+            'tarfile',
+            ])

=== removed file 'bzrlib/weave_commands.py'
--- a/bzrlib/weave_commands.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/weave_commands.py	1970-01-01 00:00:00 +0000
@@ -1,74 +0,0 @@
-# Copyright (C) 2006 Canonical Ltd
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-"""builtin bzr commands relating to individual weave files
-
-These should never normally need to be used by end users, but might be
-of interest in debugging or data recovery.
-"""
-
-import sys
-
-from bzrlib.commands import Command
-from bzrlib.trace import warning
-
-class cmd_versionedfile_list(Command):
-    """List the revision ids present in a versionedfile, alphabetically"""
-
-    hidden = True
-    takes_args = ['filename']
-    aliases = ['weave-list']
-
-    def run(self, filename):
-        from bzrlib.weavefile import read_weave
-        from bzrlib.transport import get_transport
-        from bzrlib import osutils
-        vf = read_weave(file(filename, 'rb'))
-        names = vf.versions()
-        names.sort()
-        print '\n'.join(names)
-
-
-class cmd_weave_plan_merge(Command):
-    """Show the plan for merging two versions within a weave"""
-    hidden = True
-    takes_args = ['weave_file', 'revision_a', 'revision_b']
-
-    def run(self, weave_file, revision_a, revision_b):
-        from bzrlib.weavefile import read_weave
-        w = read_weave(file(weave_file, 'rb'))
-        for state, line in w.plan_merge(revision_a, revision_b):
-            # make sure to print every line with a newline, even if it doesn't
-            # really have one
-            if not line:
-                continue
-            if line[-1] != '\n':
-                state += '!eol'
-                line += '\n'
-            if '\n' in line[:-1]:
-                warning("line in weave contains embedded newline: %r" % line)
-            print '%15s | %s' % (state, line),
-
-class cmd_weave_merge_text(Command):
-    """Debugging command to merge two texts of a weave"""
-    hidden = True
-    takes_args = ['weave_file', 'revision_a', 'revision_b']
-
-    def run(self, weave_file, revision_a, revision_b):
-        from bzrlib.weavefile import read_weave
-        w = read_weave(file(weave_file, 'rb'))
-        p = w.plan_merge(revision_a, revision_b)
-        sys.stdout.writelines(w.weave_merge(p))




More information about the bazaar-commits mailing list