Regression tracking total bytes transferred in bzr 2.3

John Arbash Meinel john at arbash-meinel.com
Fri Feb 4 18:37:07 UTC 2011


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

https://bugs.launchpad.net/bzr/+bug/713258

I just found out that bzr 2.3 no longer records how many bytes were
transferred for a given command. I'm a bit sad to say that this changed
in bzr 2.3b2 and I didn't catch it until now.

This happened in Martin's r5473: "reset global verbosity after each
command".

I don't really remember what the point of that change was, so I don't
have a great "we should do X to get this working again".

One option, is a patch like this:

=== modified file 'bzrlib/commands.py'
- --- bzrlib/commands.py  2010-10-29 17:07:42 +0000
+++ bzrlib/commands.py  2011-02-04 18:35:48 +0000
@@ -691,7 +691,10 @@
             return self.run(**all_cmd_args)
         finally:
             # reset it, so that other commands run in the same process
won't
- -            # inherit state
+            # inherit state. Before we reset it, log any activity, so
that it
+            # gets properly tracked.
+            ui.ui_factory.log_transport_activity(
+                display=('bytes' in debug.debug_flags))
             trace.set_verbosity_level(0)

     def _setup_run(self):
@@ -1202,8 +1205,6 @@
     argv = _specified_or_unicode_argv(argv)
     _register_builtin_commands()
     ret = run_bzr_catch_errors(argv)
- -    bzrlib.ui.ui_factory.log_transport_activity(
- -        display=('bytes' in debug.debug_flags))
     trace.mutter("return code %d", ret)
     return ret


Thoughts? I'd really like to see us put something like this into a 2.3.1
release, though I don't think it needs to move up the actual release
schedule.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1MR1IACgkQJdeBCYSNAAOU7QCdH9tdu3c82QJm4RfSBgVyGj87
7AgAnA2ATwC14zBksAYetb36UvvkytQ+
=5gzq
-----END PGP SIGNATURE-----



More information about the bazaar mailing list