Rev 2593: Restore related-branch display to bzr info (Adeodato Simó) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Jul 6 15:18:48 BST 2007


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

------------------------------------------------------------
revno: 2593
revision-id: pqm at pqm.ubuntu.com-20070706141845-sije5bdx8pjw2fhk
parent: pqm at pqm.ubuntu.com-20070705224207-7pslqt12ofh4vnzx
parent: abentley at panoramicfeedback.com-20070706132752-1nm4c8627gk054j5
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2007-07-06 15:18:45 +0100
message:
  Restore related-branch display to bzr info (Adeodato Simó)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/info.py                 info.py-20050323235939-6bbfe7d9700b0b9b
  bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
    ------------------------------------------------------------
    revno: 2590.1.1
    merged: abentley at panoramicfeedback.com-20070706132752-1nm4c8627gk054j5
    parent: pqm at pqm.ubuntu.com-20070705054119-z89j99ne0vvywkgu
    parent: dato at net.com.org.es-20070704133125-b0tcg28c85lmyh91
    committer: Aaron Bentley <abentley at panoramicfeedback.com>
    branch nick: Aaron's integration
    timestamp: Fri 2007-07-06 09:27:52 -0400
    message:
      Restore related-branch display to bzr info (Adeodato Simó)
    ------------------------------------------------------------
    revno: 2584.2.2
    merged: dato at net.com.org.es-20070704133125-b0tcg28c85lmyh91
    parent: dato at net.com.org.es-20070704132333-drbj0tyecyboror4
    committer: Adeodato Simó <dato at net.com.org.es>
    branch nick: bzr.related_in_non_verbose_info
    timestamp: Wed 2007-07-04 15:31:25 +0200
    message:
      Oops, running the tests in a different directory does not help.
    ------------------------------------------------------------
    revno: 2584.2.1
    merged: dato at net.com.org.es-20070704132333-drbj0tyecyboror4
    parent: pqm at pqm.ubuntu.com-20070704095320-41p0gvstimqqzvtx
    committer: Adeodato Simó <dato at net.com.org.es>
    branch nick: bzr.related_in_non_verbose_info
    timestamp: Wed 2007-07-04 15:23:33 +0200
    message:
      Make `bzr info` show related branches in non-verbose mode.
=== modified file 'NEWS'
--- a/NEWS	2007-07-05 22:42:07 +0000
+++ b/NEWS	2007-07-06 14:18:45 +0000
@@ -46,7 +46,7 @@
 
     * ``info`` now defaults to non-verbose mode, displaying only paths and
       abbreviated format info.  ``info -v`` displays all the information
-      formerly displayed by ``info``.  (Aaron Bentley)
+      formerly displayed by ``info``.  (Aaron Bentley, Adeodato Simó)
 
     * ``bzr missing`` now has better option names ``--this`` and ``--other``.
       (Elliot Murphy)

=== modified file 'bzrlib/info.py'
--- a/bzrlib/info.py	2007-06-14 04:59:48 +0000
+++ b/bzrlib/info.py	2007-07-04 13:23:33 +0000
@@ -343,10 +343,10 @@
     format = describe_format(control, repository, branch, working)
     print "%s (format: %s)" % (layout, format)
     _show_location_info(gather_location_info(repository, branch, working))
+    if branch is not None:
+        _show_related_info(branch)
     if verbose == 0:
         return
-    if branch is not None:
-        _show_related_info(branch)
     _show_format_info(control, repository, branch, working)
     _show_locking_info(repository, branch, working)
     if branch is not None:

=== modified file 'bzrlib/tests/blackbox/test_info.py'
--- a/bzrlib/tests/blackbox/test_info.py	2007-06-27 19:13:50 +0000
+++ b/bzrlib/tests/blackbox/test_info.py	2007-07-06 13:27:52 +0000
@@ -48,6 +48,15 @@
         self.build_tree(['standalone/a'])
         tree1.add('a')
         branch1 = tree1.branch
+
+        out, err = self.run_bzr('info standalone')
+        self.assertEqualDiff(
+"""Standalone tree (format: weave)
+Location:
+  branch root: %s
+""" % branch1.bzrdir.root_transport.base, out)
+        self.assertEqual('', err)
+
         out, err = self.run_bzr('info standalone -v')
         self.assertEqualDiff(
 """Standalone tree (format: weave)
@@ -86,6 +95,21 @@
         # Branch standalone with push location
         branch2 = branch1.bzrdir.sprout('branch').open_branch()
         branch2.set_push_location(branch1.bzrdir.root_transport.base)
+
+        out, err = self.run_bzr('info branch')
+        self.assertEqualDiff(
+"""Standalone tree (format: weave)
+Location:
+  branch root: %s
+
+Related branches:
+      parent branch: %s
+  publish to branch: %s
+""" % (branch2.bzrdir.root_transport.base,
+       branch1.bzrdir.root_transport.base,
+       branch1.bzrdir.root_transport.base), out)
+        self.assertEqual('', err)
+
         out, err = self.run_bzr('info branch --verbose')
         self.assertEqualDiff(
 """Standalone tree (format: weave)




More information about the bazaar-commits mailing list