~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2011-10-09 13:52:06 UTC
  • mfrom: (6202.1.3 revno-revision)
  • Revision ID: pqm@pqm.ubuntu.com-20111009135206-t3utsln6mtzv9eut
(jelmer) Add a --revision argument to 'bzr revno'. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
        out, err = self.run_bzr('revno --tree checkout_b')
118
118
        self.assertEqual('', err)
119
119
        self.assertEqual('???\n', out)
 
120
 
 
121
    def test_revno_with_revision(self):
 
122
        wt = self.make_branch_and_tree('.')
 
123
        revid1 = wt.commit('rev1')
 
124
        revid2 = wt.commit('rev2')
 
125
 
 
126
        out, err = self.run_bzr('revno -r-2 .')
 
127
        self.assertEqual('1\n', out)
 
128
 
 
129
        out, err = self.run_bzr('revno -rrevid:%s .' % revid1)
 
130
        self.assertEqual('1\n', out)
 
131
 
 
132
    def test_revno_and_tree_mutually_exclusive(self):
 
133
        wt = self.make_branch_and_tree('.')
 
134
        out, err = self.run_bzr('revno -r-2 --tree .', retcode=3)
 
135
        self.assertEqual('', out)
 
136
        self.assertEqual(
 
137
            'bzr: ERROR: --tree and --revision can not be used together\n',
 
138
            err)