/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_export.py

  • Committer: Martin Pool
  • Date: 2011-06-28 13:55:39 UTC
  • mfrom: (5995 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5996.
  • Revision ID: mbp@canonical.com-20110628135539-6541falwx39fl46i
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
        self.assertEqual(a_time, t.stat('a').st_mtime)
150
150
        self.assertEqual(b_time, t.stat('b').st_mtime)
151
151
 
 
152
    def test_subdir_files_per_timestamps(self):
 
153
        builder = self.make_branch_builder('source')
 
154
        builder.start_series()
 
155
        foo_time = time.mktime((1999, 12, 12, 0, 0, 0, 0, 0, 0))
 
156
        builder.build_snapshot(None, None, [
 
157
            ('add', ('', 'root-id', 'directory', '')),
 
158
            ('add', ('subdir', 'subdir-id', 'directory', '')),
 
159
            ('add', ('subdir/foo.txt', 'foo-id', 'file', 'content\n'))],
 
160
            timestamp=foo_time)
 
161
        builder.finish_series()
 
162
        b = builder.get_branch()
 
163
        b.lock_read()
 
164
        self.addCleanup(b.unlock)
 
165
        tree = b.basis_tree()
 
166
        export.export(tree, 'target', format='dir', subdir='subdir',
 
167
            per_file_timestamps=True)
 
168
        t = self.get_transport('target')
 
169
        self.assertEquals(foo_time, t.stat('foo.txt').st_mtime)
 
170
 
152
171
 
153
172
class TarExporterTests(tests.TestCaseWithTransport):
154
173