~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Lukáš Lalinský
  • Date: 2008-08-28 13:41:15 UTC
  • mto: (3732.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 3733.
  • Revision ID: lalinsky@gmail.com-20080828134115-265uyumclq5qvetg
Fix `bzr st -rbranch:PATH_TO_BRANCH`

* Add RevisionSpec.as_tree which returns a tree representation of the revision specifier. This might return a remote revision tree.
* Make status use this new method and not require RevisionSpec.as_revision_id, which for RevisionSpec_branch fetches data to the local repository.
* Refactor common code for getting either a revision tree or a tree/branch's basis tree into a private function _get_revision_tree and make it use RevisionSpec.as_tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
298
298
        self.assertEqual("working tree is out of date, run 'bzr update'\n",
299
299
                         err)
300
300
 
 
301
    def test_status_write_lock(self):
 
302
        """That that status works without fetching history and
 
303
        having a write lock.
 
304
 
 
305
        See https://bugs.launchpad.net/bzr/+bug/149270
 
306
        """
 
307
        mkdir('branch1')
 
308
        wt = self.make_branch_and_tree('branch1')
 
309
        b = wt.branch
 
310
        wt.commit('Empty commit 1')
 
311
        wt2 = b.bzrdir.sprout('branch2').open_workingtree()
 
312
        wt2.commit('Empty commit 2', allow_pointless=True)
 
313
        out, err = self.run_bzr('status branch1 -rbranch:branch2')
 
314
        self.assertEqual('', out)
 
315
 
301
316
 
302
317
class CheckoutStatus(BranchStatus):
303
318