~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/export/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2011-03-13 18:51:51 UTC
  • mto: This revision was merged to the branch mainline in revision 5724.
  • Revision ID: jelmer@samba.org-20110313185151-2dmxb1e1o23cmgx0
per_file_timestamp -> force_mtime.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
"""
21
21
 
22
22
import os
 
23
import time
23
24
from bzrlib import (
24
25
    errors,
25
26
    pyutils,
57
58
 
58
59
    When requesting a specific type of export, load the respective path.
59
60
    """
60
 
    def _loader(tree, dest, root, subdir, filtered, per_file_timestamps):
 
61
    def _loader(tree, dest, root, subdir, filtered, force_mtime):
61
62
        func = pyutils.get_named_object(module, funcname)
62
63
        return func(tree, dest, root, subdir, filtered=filtered,
63
 
                    per_file_timestamps=per_file_timestamps)
 
64
                    force_mtime=force_mtime)
64
65
    register_exporter(scheme, extensions, _loader)
65
66
 
66
67
 
103
104
 
104
105
    if format not in _exporters:
105
106
        raise errors.NoSuchExportFormat(format)
 
107
 
 
108
    if not per_file_timestamps:
 
109
        force_mtime = time.time()
 
110
    else:
 
111
        force_mtime = None
 
112
 
106
113
    tree.lock_read()
107
114
    try:
108
115
        return _exporters[format](tree, dest, root, subdir, filtered=filtered,
109
 
                                  per_file_timestamps=per_file_timestamps)
 
116
                                  force_mtime=force_mtime)
110
117
    finally:
111
118
        tree.unlock()
112
119