~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2007-06-26 13:49:44 UTC
  • mto: (2581.1.1 cleanup-runbzr)
  • mto: This revision was merged to the branch mainline in revision 2588.
  • Revision ID: v.ladeuil+lp@free.fr-20070626134944-snlh5i0zsa30mysx
Enforce run_bzr(string) where possible.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
    def test_diff_ouside_tree(self):
46
46
        os.chdir(tempfile.mkdtemp())
47
 
        self.run_bzr(['init', 'branch1'])
48
 
        self.run_bzr(['commit', '-m', 'nothing', 
49
 
                               '--unchanged', 'branch1'])
50
 
        self.run_bzr(['commit', '-m', 'nothing', 
51
 
                               '--unchanged', 'branch1'])
 
47
        self.run_bzr('init', 'branch1')
 
48
        self.run_bzr(['commit', '-m', 'nothing', '--unchanged', 'branch1'])
 
49
        self.run_bzr(['commit', '-m', 'nothing', '--unchanged', 'branch1'])
52
50
        # -r X..Y
53
 
        out, err = self.run_bzr(['diff', 
54
 
                                          '-r', 'revno:2:branch2..revno:1'],
55
 
                                         retcode=3)
 
51
        out, err = self.run_bzr('diff -r revno:2:branch2..revno:1', retcode=3)
56
52
        self.assertEquals('', out)
57
53
        self.assertEqual(u'bzr: ERROR: Not a branch: %s/\n' % (getcwd(),),
58
54
                         err)
59
55
        # -r X
60
 
        out, err = self.run_bzr(['diff', '-r', 'revno:2:branch2'],
61
 
                                         retcode=3)
 
56
        out, err = self.run_bzr('diff -r revno:2:branch2', retcode=3)
62
57
        self.assertEquals('', out)
63
58
        self.assertEqual(u'bzr: ERROR: Not a branch: %s/\n' % (getcwd(),),
64
59
                         err)
65
60
        # -r X..
66
 
        out, err = self.run_bzr(['diff', '-r', 'revno:2:branch2..'],
67
 
                                         retcode=3)
 
61
        out, err = self.run_bzr('diff -r revno:2:branch2..', retcode=3)
68
62
        self.assertEquals('', out)
69
63
        self.assertEqual(u'bzr: ERROR: Not a branch: %s/\n' % (getcwd(),),
70
64
                         err)
71
65
        # no -r at all.
72
 
        out, err = self.run_bzr(['diff'],
73
 
                                         retcode=3)
 
66
        out, err = self.run_bzr('diff', retcode=3)
74
67
        self.assertEquals('', out)
75
68
        self.assertEqual(u'bzr: ERROR: Not a branch: %s/\n' % (getcwd(),),
76
69
                         err)