~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2006-10-31 21:29:02 UTC
  • mfrom: (2104 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2110.
  • Revision ID: john@arbash-meinel.com-20061031212902-4b33920b90e9ce92
[merge] bzr.dev 2104

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 by Canonical Ltd
 
1
# Copyright (C) 2005, 2006 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
191
191
        out, err = self.run_bzr('status', 'does-not-exist', retcode=3)
192
192
        self.assertContainsRe(err, r'do not exist.*does-not-exist')
193
193
 
 
194
    def test_status_out_of_date(self):
 
195
        """Simulate status of out-of-date tree after remote push"""
 
196
        tree = self.make_branch_and_tree('.')
 
197
        self.build_tree_contents([('a', 'foo\n')])
 
198
        tree.lock_write()
 
199
        try:
 
200
            tree.add(['a'])
 
201
            tree.commit('add test file')
 
202
            # simulate what happens after a remote push
 
203
            tree.set_last_revision("0")
 
204
            out, err = self.run_bzr('status')
 
205
            self.assertEqual("working tree is out of date, run 'bzr update'\n",
 
206
                             err)
 
207
        finally:
 
208
            tree.unlock()
 
209
 
194
210
 
195
211
class CheckoutStatus(BranchStatus):
196
212