~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2011-12-01 12:18:55 UTC
  • mfrom: (6331.2.2 export-uncommitted)
  • Revision ID: pqm@pqm.ubuntu.com-20111201121855-olnxam3ku2tvu3a2
(jelmer) Add --uncommitted option to 'bzr export'. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
402
402
        self.assertEqual(['goodbye', 'hello'], sorted(os.listdir('latest')))
403
403
        self.check_file_contents('latest/goodbye', 'baz')
404
404
 
 
405
    def test_export_uncommitted(self):
 
406
        """Test --uncommitted option"""
 
407
        self.example_branch()
 
408
        os.chdir('branch')
 
409
        self.build_tree_contents([('goodbye', 'uncommitted data')])
 
410
        self.run_bzr(['export', '--uncommitted', 'latest'])
 
411
        self.check_file_contents('latest/goodbye', 'uncommitted data')
 
412
 
 
413
    def test_export_uncommitted_no_tree(self):
 
414
        """Test --uncommitted option only works with a working tree."""
 
415
        tree = self.example_branch()
 
416
        tree.bzrdir.destroy_workingtree()
 
417
        os.chdir('branch')
 
418
        self.run_bzr_error(
 
419
            ['bzr: ERROR: --uncommitted requires a working tree'],
 
420
            'export --uncommitted latest')
 
421
 
405
422
    def test_zip_export_per_file_timestamps(self):
406
423
        tree = self.example_branch()
407
424
        self.build_tree_contents([('branch/har', 'foo')])