~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_export.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-10 19:20:57 UTC
  • mfrom: (4988.10.5 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100210192057-uvi7tmdubcvh9xpo
(Michal Junák) Bug #511987, support 'bzr export FILE'

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009-2010 Canonical Ltd
 
1
# Copyright (C) 2009, 2010 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
63
63
        self.build_tree(['target/', 'target/foo'])
64
64
        self.assertRaises(errors.BzrError, export.export, wt, 'target', format="dir")
65
65
 
 
66
    def test_dir_export_existing_single_file(self):
 
67
        self.build_tree(['dir1/', 'dir1/dir2/', 'dir1/first', 'dir1/dir2/second'])
 
68
        wtree = self.make_branch_and_tree('dir1')
 
69
        wtree.add(['dir2', 'first', 'dir2/second'])
 
70
        wtree.commit('1')
 
71
        export.export(wtree, 'target1', format='dir', subdir='first')
 
72
        self.failUnlessExists('target1/first')
 
73
        export.export(wtree, 'target2', format='dir', subdir='dir2/second')
 
74
        self.failUnlessExists('target2/second')
 
75
        
66
76
    def test_dir_export_files_same_timestamp(self):
67
77
        builder = self.make_branch_builder('source')
68
78
        builder.start_series()