Merged revisions 70886,70888-70892 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70886 | tarek.ziade | 2009-03-31 15:50:59 -0500 (Tue, 31 Mar 2009) | 1 line

  added tests for the clean command
........
  r70888 | tarek.ziade | 2009-03-31 15:53:13 -0500 (Tue, 31 Mar 2009) | 1 line

  more tests for the register command
........
  r70889 | tarek.ziade | 2009-03-31 15:53:55 -0500 (Tue, 31 Mar 2009) | 1 line

  more tests for the upload command
........
  r70890 | tarek.ziade | 2009-03-31 15:54:38 -0500 (Tue, 31 Mar 2009) | 1 line

  added test to the install_data command
........
  r70891 | tarek.ziade | 2009-03-31 15:55:21 -0500 (Tue, 31 Mar 2009) | 1 line

  added tests to the install_headers command
........
  r70892 | tarek.ziade | 2009-03-31 15:56:11 -0500 (Tue, 31 Mar 2009) | 1 line

  making sdist and config test silents
........
diff --git a/Lib/distutils/command/install_data.py b/Lib/distutils/command/install_data.py
index 06a70b4..ab40797 100644
--- a/Lib/distutils/command/install_data.py
+++ b/Lib/distutils/command/install_data.py
@@ -31,7 +31,6 @@
         self.outfiles = []
         self.root = None
         self.force = 0
-
         self.data_files = self.distribution.data_files
         self.warn_dir = 1
 
diff --git a/Lib/distutils/command/install_headers.py b/Lib/distutils/command/install_headers.py
index 346daaa..38125b5 100644
--- a/Lib/distutils/command/install_headers.py
+++ b/Lib/distutils/command/install_headers.py
@@ -8,6 +8,7 @@
 from distutils.core import Command
 
 
+# XXX force is never used
 class install_headers(Command):
 
     description = "install C/C++ header files"
diff --git a/Lib/distutils/command/register.py b/Lib/distutils/command/register.py
index c271b18..7dd3099 100644
--- a/Lib/distutils/command/register.py
+++ b/Lib/distutils/command/register.py
@@ -92,15 +92,14 @@
         '''
         url = self.repository+'?:action=list_classifiers'
         response = urllib.request.urlopen(url)
-        print(response.read())
+        log.info(response.read())
 
     def verify_metadata(self):
         ''' Send the metadata to the package index server to be checked.
         '''
         # send the info to the server and report the result
         (code, result) = self.post_to_server(self.build_post_data('verify'))
-        print('Server response (%s): %s'%(code, result))
-
+        log.info('Server response (%s): %s' % (code, result))
 
     def send_metadata(self):
         ''' Send the metadata to the package index server.
@@ -211,17 +210,18 @@
                 data['email'] = input('   EMail: ')
             code, result = self.post_to_server(data)
             if code != 200:
-                print('Server response (%s): %s'%(code, result))
+                log.info('Server response (%s): %s' % (code, result))
             else:
-                print('You will receive an email shortly.')
-                print('Follow the instructions in it to complete registration.')
+                log.info('You will receive an email shortly.')
+                log.info(('Follow the instructions in it to '
+                          'complete registration.'))
         elif choice == '3':
             data = {':action': 'password_reset'}
             data['email'] = ''
             while not data['email']:
                 data['email'] = input('Your email address: ')
             code, result = self.post_to_server(data)
-            print('Server response (%s): %s'%(code, result))
+            log.info('Server response (%s): %s' % (code, result))
 
     def build_post_data(self, action):
         # figure the data to send - the metadata plus some additional
@@ -254,8 +254,10 @@
     def post_to_server(self, data, auth=None):
         ''' Post a query to the server, and return a string response.
         '''
-        self.announce('Registering %s to %s' % (data['name'],
-                                                self.repository), log.INFO)
+        if 'name' in data:
+            self.announce('Registering %s to %s' % (data['name'],
+                                                    self.repository),
+                                                    log.INFO)
         # Build up the MIME payload for the urllib2 POST data
         boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
         sep_boundary = '\n--' + boundary
@@ -302,5 +304,6 @@
                 data = result.read()
             result = 200, 'OK'
         if self.show_response:
-            print('-'*75, data, '-'*75)
+            dashes = '-' * 75
+            self.announce('%s%s%s' % (dashes, data, dashes))
         return result
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py
index eb2f516..9249427 100644
--- a/Lib/distutils/command/upload.py
+++ b/Lib/distutils/command/upload.py
@@ -194,4 +194,4 @@
             self.announce('Upload failed (%s): %s' % (r.status, r.reason),
                           log.ERROR)
         if self.show_response:
-            print('-'*75, r.read(), '-'*75)
+            self.announce('-'*75, r.read(), '-'*75)