~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-07-23 21:42:04 UTC
  • mfrom: (1551.15.60 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20070723214204-jwd5cwzvq93wwlgs
bzr checkout -r always works, even with -r0 (#127708)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import shutil
23
23
import sys
24
24
 
25
 
import bzrlib.bzrdir as bzrdir
26
 
import bzrlib.errors as errors
 
25
from bzrlib import (
 
26
    branch as _mod_branch,
 
27
    bzrdir,
 
28
    errors,
 
29
    workingtree,
 
30
    )
27
31
from bzrlib.tests.blackbox import ExternalBase
28
32
 
29
33
 
98
102
        branch.bzrdir.open_workingtree()
99
103
        # with no diff
100
104
        out, err = self.run_bzr('diff')
 
105
 
 
106
    def test_checkout_in_branch_with_r(self):
 
107
        branch = _mod_branch.Branch.open('branch')
 
108
        branch.bzrdir.destroy_workingtree()
 
109
        os.chdir('branch')
 
110
        self.run_bzr('checkout -r 1')
 
111
        tree = workingtree.WorkingTree.open('.')
 
112
        self.assertEqual('1', tree.last_revision())
 
113
        branch.bzrdir.destroy_workingtree()
 
114
        self.run_bzr('checkout -r 0')
 
115
        self.assertIs(None, tree.last_revision())