[MERGE] Support 3 noise levels in commit

Aaron Bentley aaron.bentley at utoronto.ca
Thu Aug 23 16:45:56 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ian Clatworthy wrote:
> This was discussed some time back here:
> https://lists.ubuntu.com/archives/bazaar/2007q2/027044.html. As that
> thread indicates, everyone who voiced an opinion agreed at the time.
> Let's hope everyone still does. :-) (If not, you can always add an alias
> for commit that switches --verbose back on by default.)
> 
> Running some profiling today, I noticed that 15% of an initial commit on
> a Python tree (3726 files) was generating output even when output was
> redirected to /dev/null. The attached patch implements the multiple
> noise levels improvement and delivers better performance by using that
> level information to skip generating info if we know we're never going
> to display it.
> 
> Ian C.

I don't think this is the right way to achieve it.

a) --quiet already has a meaning in the codebase.  I don't think it
makes sense to reuse it.  Also, does it work with aliases?

b) "bzr commit --quiet --verbose" should select "verbose", the way the
rest of our options behave.

Instead, I think it makes more sense to treat verbose as an enumeration,
with --silent, --normal and --verbose as individual flags.
"verbose=False" can be handled as a legacy value.

> @@ -728,7 +758,8 @@
>          if ie is not None:
>              self.builder.record_entry_contents(ie, self.parent_invs, 
>                  path, self.work_tree)
> -            self._report_change(ie, path)
> +            if self.reporter.is_verbose():
> +                self._report_change(ie, path)

^^^ is this really a win?  You don't have newer function calls.  You may
have *more*, in fact.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzauz0F+nu1YWqI0RAouJAKCI+XmnoNz9xHaT79EzsgBn+qjDLACeKqaq
tWiUDEwGavHr08KD9KEboCc=
=rL3N
-----END PGP SIGNATURE-----



More information about the bazaar mailing list