/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 breezy/tests/test_export.py

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Tests for breezy.export."""
18
18
 
 
19
import gzip
 
20
from io import BytesIO
19
21
import os
20
22
import tarfile
21
23
import time
28
30
    )
29
31
from ..export import get_root_name
30
32
from ..archive.tar import tarball_generator
31
 
from ..sixish import (
32
 
    BytesIO,
33
 
    )
34
33
from . import features
35
34
 
36
35
 
215
214
        tf = tarfile.open('target.tar.gz')
216
215
        self.assertEqual(["target/a"], tf.getnames())
217
216
 
 
217
    def test_tgz_consistent_mtime(self):
 
218
        wt = self.make_branch_and_tree('.')
 
219
        self.build_tree(['a'])
 
220
        wt.add(["a"])
 
221
        timestamp = 1547400500
 
222
        revid = wt.commit("1", timestamp=timestamp)
 
223
        revtree = wt.branch.repository.revision_tree(revid)
 
224
        export.export(revtree, 'target.tar.gz', format="tgz")
 
225
        with gzip.GzipFile('target.tar.gz', 'r') as f:
 
226
            f.read()
 
227
            self.assertEqual(int(f.mtime), timestamp)
 
228
 
218
229
    def test_tgz_ignores_dest_path(self):
219
230
        # The target path should not be a part of the target file.
220
231
        # (bug #102234)