~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/export/dir_exporter.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-15 13:00:55 UTC
  • mfrom: (5973.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20110615130055-anv7vid86fsmrj17
Bug #795557,
        allow exporting a subdir when also exporting the timestamps.
        (Szilveszter Farkas)

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
        if force_mtime is not None:
97
97
            mtime = force_mtime
98
98
        else:
99
 
            mtime = tree.get_file_mtime(tree.path2id(relpath), relpath)
 
99
            if subdir is None:
 
100
                file_id = tree.path2id(relpath)
 
101
            else:
 
102
                file_id = tree.path2id(osutils.pathjoin(subdir, relpath))
 
103
            mtime = tree.get_file_mtime(file_id, relpath)
100
104
        os.utime(fullpath, (mtime, mtime))
101
105
 
102
106
        yield