Rev 4828: (mbp) remove bzrlib.textui in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Nov 26 02:26:51 GMT 2009


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

------------------------------------------------------------
revno: 4828 [merge]
revision-id: pqm at pqm.ubuntu.com-20091126022650-zjeqb0su8ak4oi6s
parent: pqm at pqm.ubuntu.com-20091126002527-dhl5lm8gsod3kevf
parent: mbp at sourcefrog.net-20091126014206-qvf8jfpwpro558r4
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2009-11-26 02:26:50 +0000
message:
  (mbp) remove bzrlib.textui
removed:
  bzrlib/textui.py               textui.py-20050309040759-5d0cebe09c528e7d
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tree.py                 tree.py-20050309040759-9d5f2496be663e77
  bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
  bzrlib/workingtree_4.py        workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
=== modified file 'NEWS'
--- a/NEWS	2009-11-25 07:27:43 +0000
+++ b/NEWS	2009-11-26 01:42:06 +0000
@@ -60,6 +60,8 @@
 API Changes
 ***********
 
+* ``bzrlib.textui`` (vestigial module) removed.  (Martin Pool)
+
 Internals
 *********
 
@@ -170,6 +172,9 @@
 
 * Include Japanese translations for documentation (Inada Naoki)
 
+Internals
+*********
+
 * Some of the core groupcompress functionality now releases the GIL before
   operation. Similar to how zlib and bz2 operate without the GIL in the
   core compression and decompression routines. (John Arbash Meinel)

=== removed file 'bzrlib/textui.py'
--- a/bzrlib/textui.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/textui.py	1970-01-01 00:00:00 +0000
@@ -1,40 +0,0 @@
-# Bazaar -- distributed version control
-#
-# Copyright (C) 2005, 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
-
-import sys
-
-
-def show_status(state, kind, name, to_file=None):
-    if kind == 'directory':
-        # use this even on windows?
-        kind_ch = '/'
-    elif kind == 'symlink':
-        kind_ch = '->'
-    elif kind == 'file':
-        kind_ch = ''
-    else:
-        raise ValueError(kind)
-
-    if len(state) != 1:
-        raise ValueError(state)
-
-    if to_file is None:
-        to_file = sys.stdout
-
-    to_file.write(state + '       ' + name + kind_ch + '\n')
-

=== modified file 'bzrlib/tree.py'
--- a/bzrlib/tree.py	2009-11-19 15:47:26 +0000
+++ b/bzrlib/tree.py	2009-11-26 01:42:06 +0000
@@ -953,8 +953,6 @@
             a PathsNotVersionedError will be thrown.
         :param want_unversioned: Scan for unversioned paths.
         """
-        # NB: show_status depends on being able to pass in non-versioned files
-        # and report them as unknown
         trees = (self.source,)
         if extra_trees is not None:
             trees = trees + tuple(extra_trees)

=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py	2009-11-19 15:47:26 +0000
+++ b/bzrlib/workingtree.py	2009-11-26 01:42:06 +0000
@@ -65,7 +65,6 @@
     merge,
     revision as _mod_revision,
     revisiontree,
-    textui,
     trace,
     transform,
     ui,
@@ -1948,6 +1947,8 @@
 
         new_files=set()
         unknown_nested_files=set()
+        if to_file is None:
+            to_file = sys.stdout
 
         def recurse_directory_to_add_files(directory):
             # Recurse directory and add all files
@@ -2023,8 +2024,9 @@
                         new_status = 'I'
                     else:
                         new_status = '?'
-                    textui.show_status(new_status, self.kind(fid), f,
-                                       to_file=to_file)
+                    # XXX: Really should be a more abstract reporter interface
+                    kind_ch = osutils.kind_marker(self.kind(fid))
+                    to_file.write(new_status + '       ' + f + kind_ch + '\n')
                 # Unversion file
                 inv_delta.append((f, None, fid, None))
                 message = "removed %s" % (f,)

=== modified file 'bzrlib/workingtree_4.py'
--- a/bzrlib/workingtree_4.py	2009-09-30 21:38:49 +0000
+++ b/bzrlib/workingtree_4.py	2009-11-14 11:06:51 +0000
@@ -2027,8 +2027,6 @@
             output. An unversioned file is defined as one with (False, False)
             for the versioned pair.
         """
-        # NB: show_status depends on being able to pass in non-versioned files
-        # and report them as unknown
         # TODO: handle extra trees in the dirstate.
         if (extra_trees or specific_files == []):
             # we can't fast-path these cases (yet)




More information about the bazaar-commits mailing list