bzr pull & crontab
John Arbash Meinel
john at arbash-meinel.com
Thu Mar 8 16:54:15 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sam Steingold wrote:
> I have "cvs -q up" in crontab and I see a message only if cvs did
> download something.
> I have "bzr -q pull" in crontab and I still get the e-mail about "Using
> saved location" even if bzr did not actually download anything.
> I think it would be nice if bzr were really silent when it did nothing.
> Thanks.
> Sam.
>
The fix is pretty small, something like either:
=== modified file 'bzrlib/builtins.py'
- --- bzrlib/builtins.py 2007-03-07 23:15:10 +0000
+++ bzrlib/builtins.py 2007-03-08 16:50:06 +0000
@@ -584,9 +584,10 @@
raise errors.BzrCommandError("No pull location known or"
" specified.")
else:
- - display_url = urlutils.unescape_for_display(stored_loc,
- - self.outf.encoding)
- - self.outf.write("Using saved location: %s\n" %
display_url)
+ if not is_quiet():
+ display_url = urlutils.unescape_for_display(stored_loc,
+
self.outf.encoding)
+ self.outf.write("Using saved location: %s\n" %
display_url)
location = stored_loc
if reader is not None:
Or also:
=== modified file 'bzrlib/builtins.py'
- --- bzrlib/builtins.py 2007-03-07 23:15:10 +0000
+++ bzrlib/builtins.py 2007-03-08 16:52:38 +0000
@@ -585,8 +585,8 @@
" specified.")
else:
display_url = urlutils.unescape_for_display(stored_loc,
- - self.outf.encoding)
- - self.outf.write("Using saved location: %s\n" %
display_url)
+ 'ascii')
+ note("Using saved location: %s", display_url)
location = stored_loc
if reader is not None:
This second form changes it to report to stderr. note() is already
taught not to say anything if '-q' flag is given.
The downside is that we haven't done any work to represent non-ascii
characters through note().
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF8D+3JdeBCYSNAAMRAqH2AJ9RDr8jnf3asa1N/pHupZdrBLupnwCghhR7
fqFpCGbf4wmHcU0rDBL9Qzc=
=1yBK
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list