~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_info.py

  • Committer: Andrew Bennetts
  • Date: 2009-07-27 05:35:00 UTC
  • mfrom: (4570 +trunk)
  • mto: (4634.6.29 2.0)
  • mto: This revision was merged to the branch mainline in revision 4680.
  • Revision ID: andrew.bennetts@canonical.com-20090727053500-q76zsn2dx33jhmj5
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
18
"""Tests for the info command of bzr."""
1054
1054
       ), out)
1055
1055
        self.assertEqual('', err)
1056
1056
 
 
1057
    def test_info_repository_hook(self):
 
1058
        format = bzrdir.format_registry.make_bzrdir('knit')
 
1059
        def repo_info(repo, stats, outf):
 
1060
            outf.write("more info\n")
 
1061
        info.hooks.install_named_hook('repository', repo_info, None)
 
1062
        # Create shared repository with working trees
 
1063
        repo = self.make_repository('repo', shared=True, format=format)
 
1064
        out, err = self.run_bzr('info -v repo')
 
1065
        self.assertEqualDiff(
 
1066
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
 
1067
Location:
 
1068
  shared repository: repo
 
1069
 
 
1070
Format:
 
1071
       control: Meta directory format 1
 
1072
    repository: %s
 
1073
 
 
1074
Create working tree for new branches inside the repository.
 
1075
 
 
1076
Repository:
 
1077
         0 revisions
 
1078
more info
 
1079
""" % (format.repository_format.get_format_description(),
 
1080
       ), out)
 
1081
        self.assertEqual('', err)
 
1082
 
1057
1083
    def assertCheckoutStatusOutput(self,
1058
1084
        command_string, lco_tree, shared_repo=None,
1059
1085
        repo_branch=None,