Using bzr.dev

Russel Winder russel.winder at concertant.com
Wed Mar 4 06:29:58 GMT 2009


On Tue, 2009-03-03 at 20:41 -0600, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Benjamin Peterson wrote:
> > Russel Winder <russel.winder <at> concertant.com> writes:
> > 
> >> I probably should know the answer but . . .
> >>
> >> I am currently using bzr.dev as my Bazaar as I need to have versions of
> >> some plugins that only work with versions of Bazaar not yet released.
> >> However this means I get lots of deprecation warnings that I would, to
> >> be honest, rather not know about.  Is there an easy way of switching off
> >> the deprecation warnings when using bzr.dev?
> > 
> > You could alias "bzr" to "python -Wignore::DeprecationWarning" /path/to/bzr.

Benjamin,

This seems like a good option for direct command-line use, but it still
leaves the problem of what to do for scripts.  Obviously  I could just
use this command instead of bzr in the scripts, but that seems
irritating.  I guess I could just replace by symbolic links with an
actual script.  I was so focused on there being a flag or environment
variable in bzr itself that I could set to switch it off, I hadn't
thought of using Python rather than bzr to control behaviour.  Thanks
for that suggestion, most helpful.

> You can call "bzrlib.symbol_versioning.suppress_deprecation_warnings()"

John,

You are viewing things from a very different perspective :-)

What would be useful to a user such as myself (possibly foolish, right
on the slashing edge -- no mere cutting edge stuff here :-) is that this
symbol be settable  from the command line or environment.  I guess that
in the code that checks for final release, it could also check for a
property set on the command line or in the environment.

> We do it as part of bzrlib.commands.main() when we check that
> bzrlib.version_info[3] == 'final' (final release code, rather than 'dev'
> or 'candidate').
> 
> You could write a plugin that tries to get loaded early to set that,
> hack your copy of bzr.dev... though honestly, I don't know what
> deprecation warnings you are getting. I run with quite a few plugins,
> and only bzr-svn and bzrtools ever give me any grief about versions.

I suspect amending the bzr.dev copy is easier than trying to write a
plugin.

The problem I have stems form having bzr and all its plugin packages
installed from the Intrepid distribution.  In this particular instance
the problems are bzr-email and bzr-builddeb (*).  I guess I could just
remove the two packages -- I already had to remove bzr-loom due to
inconsistencies that meant Bazaar didn't work.  I could then see if if
branching the development branch of bzr-builddeb to my personal .bazaar
gets rid of the issues.

The irritant here is that Bazaar is treating a machine as a single user,
sole user machine.  I do not seem to be able to use bzr.dev as an
individual with a personal installation whilst at the same time having
all the standard packages installed so that others on the machine see
the standard environment.  I guess the problem here is the Python search
path.  I wonder then if there is an idiom that allows Bazaar to switch
off searching the central locations when bzr.dev is being used? 

(*) Isn't this name a bit inconsistent: svn-buildpackage,
git-buildpackage, hg-buildpackage, bzr-builddeb?

> If you have other plugins that are giving DeprecationWarnings, I'll
> mention that things that are deprecated are subject to removal, so if
> they aren't updated, they may just stop working (well, most likely
> they'll start raising Errors, which causes bzr itself to not work well).

Having deprecation warnings is clearly good, but there is an assumption
of consistency of installation, which, due to the Python search scheme,
is not as true as perhaps would be good in this case.

The specific warnings I am getting are:

/usr/lib/python2.5/site-packages/bzrlib/plugins/builddeb/revspec.py:68: DeprecationWarning: Modifying SPEC_TYPES was deprecated in version 1.12.
  SPEC_TYPES.append(RevisionSpec_package)
/usr/lib/python2.5/site-packages/bzrlib/plugins/email/__init__.py:57: DeprecationWarning: bzrlib.branch.BranchHooks.install_hook was deprecated in version 1.5.
  Branch.hooks.install_hook('post_commit', branch_commit_hook)
No revisions to rebase.                                                                                                                                                                                                                                        
/usr/lib/python2.5/site-packages/bzrlib/plugins/builddeb/revspec.py:68: DeprecationWarning: Modifying SPEC_TYPES was deprecated in version 1.12.
  SPEC_TYPES.append(RevisionSpec_package)
/usr/lib/python2.5/site-packages/bzrlib/plugins/email/__init__.py:57: DeprecationWarning: bzrlib.branch.BranchHooks.install_hook was deprecated in version 1.5.
  Branch.hooks.install_hook('post_commit', branch_commit_hook)

-- 
Russel.
====================================================
Dr Russel Winder                 Partner

Concertant LLP                   t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,              f: +44 8700 516 084
London SW11 1EN, UK.             m: +44 7770 465 077
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090304/ffb993c7/attachment.pgp 


More information about the bazaar mailing list