bzr export should set timestamps of exported files/dirs
bzr export either doesn't set timestamps for exported files, or sets them to 'now'. probably it should set all the files/directories to their own timestamps (whatever it's set to in the exported revision) and the top-level directory or tgz/zip package to the timestamp of the revision itself.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
this'll do it for tgz and directory exports
-------
diff -Naur bzr-0.16/
--- bzr-0.16/
+++ bzr-0.16-
@@ -254,9 +254,7 @@
def get_tar_item(self, root, dp, now, tree):
"""Get a tarfile item and a file stream for its content."""
item = tarfile.
- # TODO: would be cool to actually set it to the timestamp of the
- # revision it was last changed
- item.mtime = now
+ item.mtime = tree.get_
fileobj = self._put_
return item, fileobj
@@ -323,6 +321,8 @@
"""
fullpath = osutils.
+ mtime = tree.get_
+ os.utime(fullpath, (mtime, mtime))
# mutter(" export {%s} kind %s to %s", self.file_id,
# self.kind, fullpath)
-------