~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2011-06-27 15:42:09 UTC
  • mfrom: (5993 +trunk)
  • mto: (5993.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5994.
  • Revision ID: v.ladeuil+lp@free.fr-20110627154209-azubuhbuxsz109hq
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
    def run_tar_export_disk_and_stdout(self, extension, tarfile_flags):
175
175
        tree = self.make_basic_tree()
176
176
        fname = 'test.%s' % (extension,)
 
177
        self.run_bzr('export -d tree %s' % (fname,))
177
178
        mode = 'r|%s' % (tarfile_flags,)
178
 
        self.run_bzr('export -d tree %s' % (fname,))
179
179
        ball = tarfile.open(fname, mode=mode)
180
180
        self.assertTarANameAndContent(ball, root='test/')
181
181
        content = self.run_bzr('export -d tree --format=%s -' % (extension,))[0]
387
387
        har_st = os.stat('t/har')
388
388
        self.assertEquals(315532800, har_st.st_mtime)
389
389
 
 
390
    def test_dir_export_partial_tree_per_file_timestamps(self):
 
391
        tree = self.example_branch()
 
392
        self.build_tree(['branch/subdir/', 'branch/subdir/foo.txt'])
 
393
        tree.smart_add(['branch'])
 
394
        # Earliest allowable date on FAT32 filesystems is 1980-01-01
 
395
        tree.commit('setup', timestamp=315532800)
 
396
        self.run_bzr('export --per-file-timestamps tpart branch/subdir')
 
397
        foo_st = os.stat('tpart/foo.txt')
 
398
        self.assertEquals(315532800, foo_st.st_mtime)
 
399
 
390
400
    def test_export_directory(self):
391
401
        """Test --directory option"""
392
402
        self.example_branch()