[MERGE] Note number of revisions being bundled
John Arbash Meinel
john at arbash-meinel.com
Wed Oct 29 19:39:08 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Aaron Bentley wrote:
> Hi all,
> This patch changes our bundle generation code to note how many revisions
> are being bundled.
> This helps people in two cases:
> 1. Generating an empty bundle by mistake.
> 2. Storing too many revisions in a bundle by mistake.
> OTOH, there is a risk that people will be confused if the numbers don't
> match what they expect.
> I added applyCaptureNotes because I couldn't see an existing way to
> directly capture notes.
> Thanks to Maris Fogels for the suggestion/challenge.
I didn't look at the whole patch. But I'll comment that:
1) You can use TestCase._get_log(), though that doesn't indicate whether
it went through mutter or through note
2) Monkeypatching bzrlib.trace.note() will only effect code that uses
"from bzrlib import trace; ... trace.note()" and will not effect code
that uses "from bzrlib.trace import note". So while it works for your
code, it is a bit of a mixed bag for the rest of the code.
3) Another possibility would be to add your own log handler, since
note() goes through the python logging system. I believe we might be
sanitizing that from time to time, though.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar