Merge lp:~jelmer/bzr/export-use-tree-timestamp into lp:bzr
| Status: | Merged |
|---|---|
| Merged at revision: | not available |
| Proposed branch: | lp:~jelmer/bzr/export-use-tree-timestamp |
| Merge into: | lp:bzr |
| Diff against target: |
302 lines (+89/-25) 8 files modified
NEWS (+8/-0) bzrlib/builtins.py (+6/-2) bzrlib/export/__init__.py (+10/-5) bzrlib/export/dir_exporter.py (+7/-3) bzrlib/export/tar_exporter.py (+17/-10) bzrlib/export/zip_exporter.py (+9/-4) bzrlib/tests/blackbox/test_export.py (+10/-0) bzrlib/tests/test_export.py (+22/-1) |
| To merge this branch: | bzr merge lp:~jelmer/bzr/export-use-tree-timestamp |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Martin Pool | Needs Fixing on 2010-03-11 | ||
| Robert Collins (community) | code | 2010-03-07 | Needs Fixing on 2010-03-08 |
| Bazaar Developers | code | 2010-03-11 | Pending |
|
Review via email:
|
|||
Description of the Change
This adds an extra argument ``use_tree_
use_tree_timestamps is not the default for performance reasons, but the provided infrastructure is useful for bzr-builddeb.
- 5078. By Jelmer Vernooij on 2010-03-07
-
``bzr export`` now takes an optional argument ``--use-
tree-timestamp` `
to set file mtimes to the last timestamp of the last revision in which
they were changed rather than the current time.
- 5079. By Jelmer Vernooij on 2010-03-08
-
Review comments from Rob.
| John A Meinel (jameinel) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jelmer Vernooij wrote:
> Jelmer Vernooij has proposed merging lp:~jelmer/bzr/export-use-tree-timestamp into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
>
> This adds an extra argument ``use_tree_
>
> use_tree_timestamps is not the default for performance reasons, but the provided infrastructure is useful for bzr-builddeb.
>
Note that using 'tree.get_
shame. Specifically, the api doesn't really do any caching (and it isn't
very easy to do so).
If we wanted it to perform well, doing 1 pass over the inventory to find
revisions we will care about, doing another request to read all of those
revisions in 1 pass, should actually be pretty decent. (log can display
all revisions in generally a rather decent amount of time, this should
be no slower than that.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAku
fVcAmgNaJOolG9y
=b4zc
-----END PGP SIGNATURE-----
| Jelmer Vernooij (jelmer) wrote : | # |
> Jelmer Vernooij wrote:
> > Jelmer Vernooij has proposed merging lp:~jelmer/bzr/export-use-tree-
> timestamp into lp:bzr.
> >
> > Requested reviews:
> > bzr-core (bzr-core)
> >
> >
> > This adds an extra argument ``use_tree_
> the commit time of the commit in which a file revision was introduced as the
> mtime when exporting. This is useful as a means of getting deterministic
> exports (i.e. the generated tarball from a particular revision is always the
> same).
> >
> > use_tree_timestamps is not the default for performance reasons, but the
> provided infrastructure is useful for bzr-builddeb.
> >
>
> Note that using 'tree.get_
> shame. Specifically, the api doesn't really do any caching (and it isn't
> very easy to do so).
>
> If we wanted it to perform well, doing 1 pass over the inventory to find
> revisions we will care about, doing another request to read all of those
> revisions in 1 pass, should actually be pretty decent. (log can display
> all revisions in generally a rather decent amount of time, this should
> be no slower than that.)
Yeah,I realize that. That seemed like significantly more work though so it's something I'd rather do in a separate patch.
This at least adds the functionality, but doesn't have any performance consequences for the default behaviour. The overhead at the moment doesn't seem too bad. On a Samba tree with a warm cache:
./bzr export x.tar.gz ~/src/samba/trunk 15.58s user 0.28s system 96% cpu 16.374 total
./bzr export --per-file-
./bzr ls --versioned --recursive ~/src/samba/trunk | wc -l
7921
Cheers,
Jelmer
| Martin Pool (mbp) wrote : | # |
I see you renamed the option per Robert's suggestion, but you need to also update the news!
I'm fine for you to make this faster in a later patch.
- 5080. By Jelmer Vernooij on 2010-03-11
-
Fix NEWS.
| Jelmer Vernooij (jelmer) wrote : | # |
> I see you renamed the option per Robert's suggestion, but you need to also
> update the news!
>
> I'm fine for you to make this faster in a later patch.
I've fixed NEWS.
- 5081. By Jelmer Vernooij on 2010-03-11
-
Merge bzr.dev.

review: needsfixing
perhaps per_file_timestamps - the source is the tree, but its the
lookup-per-rev that will hurt.
Crucially the docstring change should be a little more verbose about
this, so that folk reading it can predict the behaviour/tradeoff.
Should this be exposed in 'bzr export's command line?
Cheers,
Rob