Bug 878861 - Preseve 80 cols output with mach's timestamp. r=gps
authorArnaud Sourioux <six.dsn@gmail.com>
Mon, 10 Jun 2013 22:08:00 -0400
changeset 146093 d2ac3d6c628ab4a2cc9c390488962e78983651b6
parent 146092 14d35bcbc52ff597347b39514b7bd2d79188b594
child 146094 928d5b1c632fa5deb62f8dbb493400fc0c4c77cb
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs878861
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 878861 - Preseve 80 cols output with mach's timestamp. r=gps
python/mozbuild/mozbuild/controller/clobber.py
--- a/python/mozbuild/mozbuild/controller/clobber.py
+++ b/python/mozbuild/mozbuild/controller/clobber.py
@@ -7,36 +7,43 @@ from __future__ import print_function
 r'''This module contains code for managing clobbering of the tree.'''
 
 import os
 import sys
 
 from mozfile.mozfile import rmtree
 
 
+"""In order to display nicely in an 80 character wide terminal window,
+with mach's prepended timestamps,
+please keep printed messages under 70 characters wide when possible.
+"""
+
 CLOBBER_MESSAGE = '''
 ***
-* The CLOBBER file has been updated, indicating that an incremental build since
-* your last build will probably not work. A full/clobber build is required.
+* The CLOBBER file has been updated, indicating that an incremental
+* build since your last build will probably not work.
+* A full/clobber build is required.
 *
 * The reason for the clobber is:
 *
 {clobber_reason}
 *
-* Clobbering can be performed automatically. However, we didn't automatically
-* clobber this time because:
+* Clobbering can be performed automatically.
+* However, we didn't automatically clobber this time because:
 *
 *   {no_reason}
 *
 * The easiest and fastest way to clobber is to run:
 *
 *  $ mach clobber
 *
-* If you know this clobber doesn't apply to you or you're feeling lucky - well
-* do ya? - you can ignore this clobber requirement by running:
+* If you know this clobber doesn't apply to you
+* or you're feeling lucky - well do ya? -
+* you can ignore this clobber requirement by running:
 *
 *  $ touch {clobber_file}
 *
 ***
 '''.strip()
 
 
 class Clobberer(object):
@@ -122,18 +129,20 @@ class Clobberer(object):
         # So a clobber is needed. We only perform a clobber if we are
         # allowed to perform an automatic clobber (off by default) and if the
         # current directory is not under the object directory. The latter is
         # because operating systems, filesystems, and shell can throw fits
         # if the current working directory is deleted from under you. While it
         # can work in some scenarios, we take the conservative approach and
         # never try.
         if not allow_auto:
-            return True, False, self._message('Automatic clobbering is not '
-                'enabled (add "mk_add_options AUTOCLOBBER=1" to your mozconfig).')
+            return True, False, \
+                self._message('Automatic clobbering is not enabled\n'
+                              '*   (add "mk_add_options AUTOCLOBBER=1" to your '
+                              'mozconfig).')
 
         if cwd.startswith(self.topobjdir) and cwd != self.topobjdir:
             return True, False, self._message(
                 'Cannot clobber while the shell is inside the object directory.')
 
         print('Automatically clobbering %s' % self.topobjdir, file=fh)
         try:
             if cwd == self.topobjdir: