/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: Canonical.com Patch Queue Manager
  • Date: 2007-11-22 21:20:30 UTC
  • mfrom: (3010.1.17 pack.read-locks)
  • Revision ID: pqm@pqm.ubuntu.com-20071122212030-ehfexlt3qzptnsdv
(robertc) Various lock and write-group correctness issues which show
        up when packs are the default format. (Robert Collins, #154204).

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from bzrlib import (
25
25
    bzrdir,
26
26
    errors,
 
27
    info,
27
28
    osutils,
28
29
    repository,
29
30
    urlutils,
486
487
        repo = branch.repository
487
488
        out, err = self.run_bzr('info branch -v')
488
489
        self.assertEqualDiff(
489
 
"""Standalone branch (format: dirstate-tags)
 
490
"""Standalone branch (format: %s)
490
491
Location:
491
492
  branch root: branch
492
493
 
502
503
Repository:
503
504
         0 revisions
504
505
         0 KiB
505
 
""" % (format.get_branch_format().get_format_description(),
 
506
""" % (info.describe_format(repo.bzrdir, repo, branch, None),
 
507
       format.get_branch_format().get_format_description(),
506
508
       format.repository_format.get_format_description(),
507
509
       ), out)
508
510
        self.assertEqual('', err)
1106
1108
       ), out)
1107
1109
        self.assertEqual('', err)
1108
1110
 
1109
 
    def assertCheckoutStatusOutput(self, 
 
1111
    def assertCheckoutStatusOutput(self,
1110
1112
        command_string, lco_tree, shared_repo=None,
1111
1113
        repo_branch=None,
1112
1114
        tree_locked=False,
1131
1133
        :param tree_locked: If true, expect the tree to be locked.
1132
1134
        :param branch_locked: If true, expect the branch to be locked.
1133
1135
        :param repo_locked: If true, expect the repository to be locked.
 
1136
            Note that the lco_tree.branch.repository is inspected, and if is not
 
1137
            actually locked then this parameter is overridden. This is because
 
1138
            pack repositories do not have any public API for obtaining an
 
1139
            exclusive repository wide lock.
1134
1140
        :param verbose: If true, expect verbose output
1135
1141
        """
1136
1142
        def friendly_location(url):
1156
1162
        format = {True: 'dirstate or dirstate-tags or knitpack-experimental'
1157
1163
                        ' or rich-root',
1158
1164
                  False: 'dirstate'}[light_checkout]
 
1165
        if repo_locked:
 
1166
            repo_locked = lco_tree.branch.repository.get_physical_lock_status()
1159
1167
        if repo_locked or branch_locked or tree_locked:
1160
1168
            def locked_message(a_bool):
1161
1169
                if a_bool: