[RFC] Extra-simple 'bzr file-log' command
John Arbash Meinel
john at arbash-meinel.com
Thu Sep 18 16:34:22 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
So at the moment 'bzr log file' is rather slow, and can consume huge amounts
of RAM. One of the primary factors in this, is because we project the per-file
graph back onto the whole tree graph, and then log both the revisions which
directly modify a file, *and* the revisions which then merged those changes.
For example, assume this graph:
A # create foo
|\
B C # C Modifies foo
| |
D E # E does nothing
|/
F # B & C did not modify foo, and F simply merges it.
At the moment, doing "bzr log foo" will give you: A, E, F.
There are some nice advantages of this method, but it is expensive to compute
(at least in our current fashion).
I wrote a simple plugin available from: lp:~jameinel/+junk/bzr-file-log
With this command, you can do:
bzr file-log foo
And it will only display A, E.
It also doesn't do any work to compute merge sorting or revision numbers, so
it just displays a flat list of the revisions which modified the file. I
enable "show-ids" to work around this. (Without revnos, you need some sort of
handle to the revision to investigate further.)
I feel this command isn't really in the "bzr is beautiful" model, but it
*does* get around the "bzr is slow" issues.
For my specific timings on a mysql tree, doing
"bzr log" is about 30s
"bzr log sql/sql_yacc.yy" consumes all of my 2GB of RAM and I kill the
process before it finishes, but others have claimed approx 3m for it to
finish.
"bzr file-log sql/sql_yacc.yy" shows 2.7k revisions in about 4.6s and starts
displaying the first ones in 0.8s.
So I'd like to have a bit of discussion about how we would like to handle this
sort of "per file log is slow" issues. We have a very pretty command right
now, but it seems more people are tripped up by the performance than are
helped by the display.
Thoughts? (I'm including the plugin as a patch because it is really quite small.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFI0nT+JdeBCYSNAAMRAlDSAJ9P70BnEm7SZ6E//SofFjGir5pYbgCaAvmM
XhdTUuEL2MaeV/3OxI3zqiQ=
=vPZT
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-file-log.patch
Type: text/x-diff
Size: 11355 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080918/8906d519/attachment.bin
More information about the bazaar
mailing list