_pretty_needs_read_lock breaks symbol_versioning.deprecated_passed

Bug #718569 reported by Andrew Bennetts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Critical
Andrew Bennetts

Bug Description

Running lp:udd's import_package.py locally to test something with bzrlib from lp:bzr I just got this traceback:

Traceback (most recent call last):
  File "./import_package.py", line 1095, in <module>
    persistent_download_cache=options.persistent_download_cache))
  File "./import_package.py", line 999, in main
    revid_db, bstore, possible_transports=possible_transports)
  File "./import_package.py", line 639, in find_unimported_versions
    possible_transports=possible_transports)
  File "./icommon.py", line 1339, in get_branch
    possible_transports=possible_transports, readonly=readonly)
  File "./icommon.py", line 1503, in get_branch_parts
    dir = br_from.bzrdir.sprout(local_location)
  File "/home/andrew/code/bzr/bzrlib/controldir.py", line 375, in sprout
    create_tree_if_local=create_tree_if_local)
  File "/home/andrew/code/bzr/bzrlib/cleanup.py", line 131, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "/home/andrew/code/bzr/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/andrew/code/bzr/bzrlib/controldir.py", line 415, in _sprout
    fetch_spec = fetch_spec_factory.make_fetch_spec()
  File "/home/andrew/code/bzr/bzrlib/fetch.py", line 414, in make_fetch_spec
    required_ids=heads_to_fetch, if_present_ids=tags_to_fetch
  File "/home/andrew/code/bzr/bzrlib/graph.py", line 1872, in execute
    if_present_ids=self.if_present_ids, find_ghosts=self.find_ghosts)
  File "<string>", line 4, in search_missing_revision_ids_read_locked
  File "/home/andrew/code/bzr/bzrlib/repository.py", line 1615, in search_missing_revision_ids
    'revision_ids is mutually exclusive with revision_id')
AssertionError: revision_ids is mutually exclusive with revision_id

It turns out that this is because search_missing_revision_ids 'revision_id=symbol_versioning.DEPRECATED_PARAMETER' in its params, and checks for that by calling symbol_versioning.deprecated_passed. That function uses the 'is' operator against the string constant, but the _pretty_needs_read_lock decorator rewrites that param as a literal, breaking that test.

This doesn't affect the 'bzr' tool, but will break other tools that use bzrlib without enabling the fast decorators (i.e. most of them).

Tags: udd

Related branches

Revision history for this message
Andrew Bennetts (spiv) wrote :

In fact because this stops trunk lp:bzr working with lp:udd I'm going to mark this as critical.

Changed in bzr:
assignee: nobody → Andrew Bennetts (spiv)
importance: High → Critical
tags: added: udd
Andrew Bennetts (spiv)
Changed in bzr:
status: Confirmed → In Progress
Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 2.4b1
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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