Should use the revision timestamp when exporting
Bug #262261 reported by
James Westby
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Low
|
Unassigned | ||
Breezy |
Fix Released
|
Medium
|
Jelmer Vernooij | ||
bzr (Debian) |
Fix Released
|
Unknown
|
Bug Description
Hi,
The export code should use the timestamp of the revision when exporting.
This was discussed on the mailing list a little while ago, I'm filing this
as house keeping.
Thanks,
James
Related branches
lp://staging/~jelmer/brz/archive-tree-timestamp
Merged
into
lp://staging/brz
- Martin Packman: Approve
-
Diff: 73 lines (+21/-3)4 files modifiedbreezy/archive/tar.py (+1/-2)
breezy/export.py (+6/-0)
breezy/tests/blackbox/test_export.py (+1/-1)
breezy/tests/test_export.py (+13/-0)
Changed in bzr: | |
status: | Unknown → New |
Changed in bzr: | |
status: | New → Confirmed |
Changed in bzr: | |
status: | Triaged → Confirmed |
tags: | added: export |
Changed in bzr (Debian): | |
status: | Confirmed → Fix Released |
Changed in bzr: | |
assignee: | nobody → Jelmer Vernooij (jelmer) |
assignee: | Jelmer Vernooij (jelmer) → nobody |
tags: | added: check-for-breezy |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | removed: check-for-breezy |
Changed in brz: | |
assignee: | nobody → Jelmer Vernooij (jelmer) |
milestone: | none → 3.0.0 |
status: | Triaged → Fix Committed |
Changed in brz: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The code I see has this:
now = time.time() iter_entries( tree, subdir): pathjoin( root, dp).encode('utf8') TarInfo( filename)
...
for dp, ie in _export_
filename = osutils.
item = tarfile.
item.mtime = now
Obviously, that is not a stable solution.
There are two possibilities:
1) Use repository. get_revision( revision_ id).timestamp for all files get_revision( ie.revision) .timestamp for each file
2) Use repository.
(1) is nice because it is stable for a given revision_id, and should fix our current problem of "bzr builddeb" creating different tarballs accidentally.
(2) might be more correct, but has the overhead of needing to extract a lot of Revision texts when exporting a large tree. Making it configurable would be a bit of a trick, so my recommendation would be to go with (1), and if it is an issue, switch to (2).
Note that some people have requested similar functionality for "bzr export directory". So it might not be a bad idea to make it configurable and expose it to all exporters.