On Thu, 2008-08-28 at 16:52 +0000, John A Meinel wrote:
> The code I see has this:
>
> now = time.time()
> ...
> for dp, ie in _export_iter_entries(tree, subdir):
> filename = osutils.pathjoin(root, dp).encode('utf8')
> item = tarfile.TarInfo(filename)
> 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
> 2) Use repository.get_revision(ie.revision).timestamp for each file
I think there's a method on tree that gives you the timestamp. This is
important to me as I export working trees as well.
The thing that I found strange was that for three different
implementations of the method that I found I found three different
results.
> (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.
It may not fix it, and isn't the solution we want long term, but it
would be nice if it at least fixed some cases.
On Thu, 2008-08-28 at 16:52 +0000, John A Meinel wrote: iter_entries( tree, subdir): pathjoin( root, dp).encode('utf8') TarInfo( filename) get_revision( revision_ id).timestamp for all files get_revision( ie.revision) .timestamp for each file
> The code I see has this:
>
> now = time.time()
> ...
> 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.
> 2) Use repository.
I think there's a method on tree that gives you the timestamp. This is
important to me as I export working trees as well.
The thing that I found strange was that for three different
implementations of the method that I found I found three different
results.
> (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.
It may not fix it, and isn't the solution we want long term, but it
would be nice if it at least fixed some cases.
Thanks,
James