mercurial/wireproto.py
changeset 17558 380a89413403
parent 17557 6d97dd630d79
child 17567 2ee7281e5aaa
--- a/mercurial/wireproto.py	Fri Sep 14 12:05:37 2012 -0700
+++ b/mercurial/wireproto.py	Fri Sep 14 12:06:40 2012 -0700
@@ -548,11 +548,13 @@
 
         sopener = repo.sopener
         oldaudit = sopener.mustaudit
+        debugflag = repo.ui.debugflag
         sopener.mustaudit = False
 
         try:
             for name, size in entries:
-                repo.ui.debug('sending %s (%d bytes)\n' % (name, size))
+                if debugflag:
+                    repo.ui.debug('sending %s (%d bytes)\n' % (name, size))
                 # partially encode name over the wire for backwards compat
                 yield '%s\0%d\n' % (store.encodedir(name), size)
                 if size <= 65536: