~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-04-01 00:40:31 UTC
  • mfrom: (4081.2.5 bug513322-first)
  • Revision ID: pqm@pqm.ubuntu.com-20100401004031-pc7s84z6ahqunmy2
(mbp, for gagern) show first apparent author in gnu changelog

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
    def test_dir_export_files_per_file_timestamps(self):
103
103
        builder = self.make_branch_builder('source')
104
104
        builder.start_series()
105
 
        # Earliest allowable date on FAT32 filesystems is 1980-01-01
106
 
        a_time = time.mktime((1999, 12, 12, 0, 0, 0, 0, 0, 0))
107
 
        b_time = time.mktime((1980, 01, 01, 0, 0, 0, 0, 0, 0))
108
105
        builder.build_snapshot(None, None, [
109
106
            ('add', ('', 'root-id', 'directory', '')),
110
107
            ('add', ('a', 'a-id', 'file', 'content\n'))],
111
 
            timestamp=a_time)
 
108
            timestamp=3423)
112
109
        builder.build_snapshot(None, None, [
113
110
            ('add', ('b', 'b-id', 'file', 'content\n'))],
114
 
            timestamp=b_time)
 
111
            timestamp=42)
115
112
        builder.finish_series()
116
113
        b = builder.get_branch()
117
114
        b.lock_read()
119
116
        tree = b.basis_tree()
120
117
        export.export(tree, 'target', format='dir', per_file_timestamps=True)
121
118
        t = self.get_transport('target')
122
 
        self.assertEqual(a_time, t.stat('a').st_mtime)
123
 
        self.assertEqual(b_time, t.stat('b').st_mtime)
 
119
        st_a = t.stat('a')
 
120
        st_b = t.stat('b')
 
121
        self.assertEqual(42.0, st_b.st_mtime)
 
122
        self.assertEqual(3423.0, st_a.st_mtime)