~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-11 04:02:41 UTC
  • mfrom: (5017.2.2 tariff)
  • Revision ID: pqm@pqm.ubuntu.com-20100211040241-w6n021dz0uus341n
(mbp) add import-tariff tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2008 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
113
113
        lines4 = self.run_bzr('missing ../a --short', retcode=1)[0]
114
114
        lines4 = lines4.splitlines()
115
115
        self.assertEqual(4, len(lines4))
116
 
        lines4a = self.run_bzr('missing ../a -S', retcode=1)[0]
117
 
        lines4a = lines4a.splitlines()
118
 
        self.assertEqual(lines4, lines4a)
119
116
        lines5 = self.run_bzr('missing ../a --line', retcode=1)[0]
120
117
        lines5 = lines5.splitlines()
121
118
        self.assertEqual(2, len(lines5))
203
200
                          'Branches are up to date.\n' % location,
204
201
                          lines)
205
202
        self.assertEquals('', err)
206
 
 
207
 
    def test_missing_directory(self):
208
 
        """Test --directory option"""
209
 
 
210
 
        # create a source branch
211
 
        a_tree = self.make_branch_and_tree('a')
212
 
        self.build_tree_contents([('a/a', 'initial\n')])
213
 
        a_tree.add('a')
214
 
        a_tree.commit(message='initial')
215
 
 
216
 
        # clone and add a differing revision
217
 
        b_tree = a_tree.bzrdir.sprout('b').open_workingtree()
218
 
        self.build_tree_contents([('b/a', 'initial\nmore\n')])
219
 
        b_tree.commit(message='more')
220
 
        
221
 
        out2, err2 = self.run_bzr('missing --directory a b', retcode=1)
222
 
        os.chdir('a')
223
 
        out1, err1 = self.run_bzr('missing ../b', retcode=1)
224
 
        self.assertEqualDiff(out1, out2)
225
 
        self.assertEqualDiff(err1, err2)