/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2011-09-30 12:58:20 UTC
  • mto: This revision was merged to the branch mainline in revision 6183.
  • Revision ID: jelmer@samba.org-20110930125820-k2x13osm1sgj1rn0
If the branch doesn't support last_revision_info, don't display
the relevant information in 'bzr info -v' rather than raising a traceback.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1345
1345
     stacked on: mainline
1346
1346
""", out)
1347
1347
        self.assertEqual("", err)
 
1348
 
 
1349
    def test_info_revinfo_optional(self):
 
1350
        tree = self.make_branch_and_tree('.')
 
1351
        def last_revision_info(self):
 
1352
            raise errors.UnsupportedOperation(last_revision_info, self)
 
1353
        self.overrideAttr(
 
1354
            branch.Branch, "last_revision_info", last_revision_info)
 
1355
        out, err = self.run_bzr('info -v .')
 
1356
        self.assertEqual(
 
1357
"""Standalone tree (format: 2a)
 
1358
Location:
 
1359
  branch root: .
 
1360
 
 
1361
Format:
 
1362
       control: Meta directory format 1
 
1363
  working tree: Working tree format 6
 
1364
        branch: Branch format 7
 
1365
    repository: Repository format 2a - rich roots, group compression and chk inventories
 
1366
 
 
1367
In the working tree:
 
1368
         0 unchanged
 
1369
         0 modified
 
1370
         0 added
 
1371
         0 removed
 
1372
         0 renamed
 
1373
         0 unknown
 
1374
         0 ignored
 
1375
         0 versioned subdirectories
 
1376
""", out)
 
1377
        self.assertEqual("", err)