need to suppress upgrade warning

Bug #160626 reported by Ian Jackson
12
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Wishlist
Vincent Ladeuil

Bug Description

I have a situation where I need to interoperate between bzr 0.7-2 (as provided in Debian sarge), and more recent versions, at least for the moment.

I therefore need a way to suppress the out-of-date branch format warning. I know the format is out of date but the newer formats are not compatible.

The constant nagging is not just annoying - it also makes sensible output less visible and tends to lead to user error (eg, not noticing error messages which come out along with the warning). So this is a real useability problem.

-anarres:moebius2> bzr status
Format <RepositoryFormat6> for file:///u/ian/an-things/moebius2/.bzr/ is deprecated - please use 'bzr upgrade' to get better performance
-anarres:moebius2> bzr --version
Bazaar (bzr) 0.91.0
  Python interpreter: /usr/bin/python 2.4.4.final.0
  Python standard library: /usr/lib/python2.4
  bzrlib: /usr/lib/python2.4/site-packages/bzrlib
  Bazaar configuration: /u/ian/.bazaar
  Bazaar log file: /u/ian/.bzr.log

Copyright 2005, 2006, 2007 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

-anarres:moebius2> dpkg -s bzr
Package: bzr
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 10700
Maintainer: Debian Bazaar Maintainers <email address hidden>
Architecture: i386
Version: 0.91-2
Depends: libc6 (>= 2.6.1-1), python-central (>= 0.5.8), python (<< 2.6), python (>= 2.4), python (>> 2.5) | python-celementtree
Recommends: python-paramiko, python-pycurl
Suggests: xdg-utils, libxml2-utils
Conflicts: bzr-doc
Conffiles:
 /etc/bash_completion.d/bzr 142eb79e59b2317fc7acc423bcc84291
 /etc/bash_completion.d/bzr.simple f4397fb3b9151087b82fe08a868c9506
Description: Bazaar, the next-generation distributed version control system
 Open source distributed version control system that is powerful, friendly,
 and scalable.
 .
 It manages trees of files and subdirectories. In particular, it records
 revisions of trees, representing their state at a particular point in time,
 and information about those revisions and their relationships. Recording and
 retrieving tree revisions is useful in several ways if you are writing
 software or documents or doing similar creative work.
Python-Version: 2.4, 2.5
-anarres:moebius2>

Related branches

Ian Jackson (ijackson)
description: updated
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 160626] need to suppress upgrade warning

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

Ian Jackson wrote:
> Public bug reported:
>
> I have a situation where I need to interoperate between bzr 0.7-2 (as
> provided in Debian sarge), and more recent versions, at least for the
> moment.
>
> I therefore need a way to suppress the out-of-date branch format
> warning. I know the format is out of date but the newer formats are not
> compatible.
>
> The constant nagging is not just annoying - it also makes sensible
> output less visible and tends to lead to user error (eg, not noticing
> error messages which come out along with the warning). So this is a
> real useability problem.
>
> -anarres:moebius2> bzr status
> Format <RepositoryFormat6> for file:///u/ian/an-things/moebius2/.bzr/ is deprecated - please use 'bzr upgrade' to get better performance
> -anarres:moebius2> bzr --version
> Bazaar (bzr) 0.91.0
> Python interpreter: /usr/bin/python 2.4.4.final.0
> Python standard library: /usr/lib/python2.4
> bzrlib: /usr/lib/python2.4/site-packages/bzrlib
> Bazaar configuration: /u/ian/.bazaar
> Bazaar log file: /u/ian/.bzr.log

The really cheap trick is to just do:

import bzrlib.repository
bzrlib.repository._deprecation_warning_done = True

Or you can hack the file itself:
=== modified file 'bzrlib/repository.py'
- --- bzrlib/repository.py 2007-10-31 22:33:53 +0000
+++ bzrlib/repository.py 2007-11-06 23:43:56 +0000
@@ -59,7 +59,7 @@

 # Old formats display a warning, but only once
- -_deprecation_warning_done = False
+_deprecation_warning_done = True

 class CommitBuilder(object):

The former can be done in a simple python file, and put into
~/.bazaar/plugins/disable_warning.py

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

iD8DBQFHMPxsJdeBCYSNAAMRAuxjAKCGsyCMmemWdUVaW0ULDc2oLfsjoQCgh0FB
GcaiS1QSrkMaq+NmyCL237E=
=9JCb
-----END PGP SIGNATURE-----

Revision history for this message
Martin Pool (mbp) wrote :

Eventually it would be nice if this could be configured per-location.

Changed in bzr:
importance: Undecided → Wishlist
status: New → Confirmed
Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.