/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_checkout.py

  • Committer: Andrew Bennetts
  • Date: 2007-08-02 06:40:58 UTC
  • mfrom: (2666 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2668.
  • Revision ID: andrew.bennetts@canonical.com-20070802064058-09eblz1qbc01fcr3
Merge bzr.dev.

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())