Rev 2567: Improved phrasing in version output in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Jul 2 07:08:14 BST 2007


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

------------------------------------------------------------
revno: 2567
revision-id: pqm at pqm.ubuntu.com-20070702060812-93jk0h4ue2ttalwi
parent: pqm at pqm.ubuntu.com-20070629150144-xoeghcfb52pit8tv
parent: mbp at sourcefrog.net-20070702052407-z66ymyo539uuvp1k
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2007-07-02 07:08:12 +0100
message:
  Improved phrasing in version output
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tests/blackbox/test_version.py test_version.py-20070312060045-ol7th9z035r3im3d-1
  bzrlib/trace.py                trace.py-20050309040759-c8ed824bdcd4748a
  bzrlib/version.py              version.py-20060816024207-ves6ult9a11taj9t-1
    ------------------------------------------------------------
    revno: 2566.1.2
    merged: mbp at sourcefrog.net-20070702052407-z66ymyo539uuvp1k
    parent: mbp at sourcefrog.net-20070702044841-bhqv1470tepruga0
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: trivial
    timestamp: Mon 2007-07-02 15:24:07 +1000
    message:
      Improved phrasing in version output
    ------------------------------------------------------------
    revno: 2566.1.1
    merged: mbp at sourcefrog.net-20070702044841-bhqv1470tepruga0
    parent: pqm at pqm.ubuntu.com-20070629150144-xoeghcfb52pit8tv
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: trivial
    timestamp: Mon 2007-07-02 14:48:41 +1000
    message:
      Show bzr.log location in bzr --version output.
=== modified file 'NEWS'
--- a/NEWS	2007-06-28 19:11:00 +0000
+++ b/NEWS	2007-07-02 04:48:41 +0000
@@ -57,6 +57,9 @@
       library users and plugins. See the ``bzrlib.api`` module for details.
       (Robert Collins)
 
+    * ``bzrtracefilename --version`` now shows the location of the bzr log file, which
+      is especially useful on Windows.  (Martin Pool)
+
   INTERNALS:
 
     * New SMTPConnection class to unify email handling.  (Adeodato Simó)

=== modified file 'bzrlib/tests/blackbox/test_version.py'
--- a/bzrlib/tests/blackbox/test_version.py	2007-03-12 21:57:13 +0000
+++ b/bzrlib/tests/blackbox/test_version.py	2007-07-02 05:24:07 +0000
@@ -26,7 +26,8 @@
         out = self.run_bzr("version")[0]
         self.assertTrue(len(out) > 0)
         self.assertEquals(1, out.count(bzrlib.__version__))
-        self.assertEquals(1, out.count("Using python interpreter:"))
-        self.assertEquals(1, out.count("Using python standard library:"))
+        self.assertEquals(1, out.count("Using Python interpreter:"))
+        self.assertEquals(1, out.count("Using Python standard library:"))
         self.assertEquals(1, out.count("Using bzrlib:"))
-        self.assertEquals(1, out.count("Using bazaar configuration:"))
+        self.assertEquals(1, out.count("Using Bazaar configuration:"))
+        self.assertContainsRe(out, r'(?m)^Using Bazaar log file:.*bzr\.log')

=== modified file 'bzrlib/trace.py'
--- a/bzrlib/trace.py	2007-03-27 04:57:59 +0000
+++ b/bzrlib/trace.py	2007-07-02 04:48:41 +0000
@@ -75,6 +75,7 @@
 _trace_file = None
 _trace_depth = 0
 _bzr_log_file = None
+_bzr_log_filename = None
 
 
 # configure convenient aliases for output routines
@@ -141,7 +142,7 @@
     # Messages are always written to here, so that we have some
     # information if something goes wrong.  In a future version this
     # file will be removed on successful completion.
-    global _file_handler, _bzr_log_file
+    global _file_handler, _bzr_log_file, _bzr_log_filename
     import codecs
 
     if tracefilename is None:
@@ -150,14 +151,14 @@
             home = win32utils.get_home_location()
         else:
             home = os.path.expanduser('~')
-        tracefilename = os.path.join(home, '.bzr.log')
+        _bzr_log_filename = os.path.join(home, '.bzr.log')
 
-    trace_fname = os.path.expanduser(tracefilename)
-    _rollover_trace_maybe(trace_fname)
+    _bzr_log_filename = os.path.expanduser(_bzr_log_filename)
+    _rollover_trace_maybe(_bzr_log_filename)
     try:
         LINE_BUFFERED = 1
         #tf = codecs.open(trace_fname, 'at', 'utf8', buffering=LINE_BUFFERED)
-        tf = open(trace_fname, 'at', LINE_BUFFERED)
+        tf = open(_bzr_log_filename, 'at', LINE_BUFFERED)
         _bzr_log_file = tf
         # tf.tell() on windows always return 0 until some writing done
         tf.write('\n')

=== modified file 'bzrlib/version.py'
--- a/bzrlib/version.py	2007-05-04 11:02:41 +0000
+++ b/bzrlib/version.py	2007-07-02 05:24:07 +0000
@@ -25,6 +25,7 @@
     config,
     errors,
     osutils,
+    trace,
     )
 from bzrlib.branch import Branch
 
@@ -40,8 +41,8 @@
         print "    revision:", revno
         print "    revid:", src_revision_id
         print "    branch nick:", src_tree.branch.nick
-    print "Using python interpreter:", sys.executable
-    print "Using python standard library:", os.path.dirname(os.__file__)
+    print "Using Python interpreter:", sys.executable
+    print "Using Python standard library:", os.path.dirname(os.__file__)
     print "Using bzrlib:",
     if len(bzrlib.__path__) > 1:
         # print repr, which is a good enough way of making it clear it's
@@ -49,7 +50,8 @@
         print repr(bzrlib.__path__)
     else:
         print bzrlib.__path__[0]
-    print "Using bazaar configuration:", config.config_dir()
+    print "Using Bazaar configuration:", config.config_dir()
+    print "Using Bazaar log file:", trace._bzr_log_filename
     print
     print bzrlib.__copyright__
     print "http://bazaar-vcs.org/"




More information about the bazaar-commits mailing list