bzr-rebase-0.2 crashes with bzr-0.92rc1

Bug #158333 reported by TecknicalTom
4
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
John A Meinel

Bug Description

When trying to rebase a branch with the newly-released bzr-0.92rc1, bzr-rebase crashes immediately.

> bzr --version
Bazaar (bzr) 0.92.0.candidate.1
  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: /home/tsamstag/.bazaar
  Bazaar log file: /home/tsamstag/.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.

> bzr rebase
Rebasing on bzr://p4test/GH3DS/p4/
bzr: ERROR: exceptions.NameError: global name '_mod_revision' is not defined

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 802, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 758, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 768, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/plugins/rebase/__init__.py", line 149, in run
    wt.branch.repository.fetch(upstream_repository, upstream_revision)
  File "/usr/lib/python2.4/site-packages/bzrlib/remote.py", line 623, in fetch
    if (revision_id is not None and
NameError: global name '_mod_revision' is not defined

bzr 0.92.0.candidate.1 on python 2.4.4.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'rebase']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: None
plugins:
  bzrtools /usr/lib/python2.4/site-packages/bzrlib/plugins/bzrtools [0.91.0]
  launchpad /usr/lib/python2.4/site-packages/bzrlib/plugins/launchpad [unknown]
  multiparent /usr/lib/python2.4/site-packages/bzrlib/plugins/multiparent.pyc [unknown]
  rebase /usr/lib/python2.4/site-packages/bzrlib/plugins/rebase [0.2.0]
  vimdiff /usr/lib/python2.4/site-packages/bzrlib/plugins/vimdiff [unknown]

** Please send this report to <email address hidden>
   with a description of what you were doing when the
   error occurred.

> bzr rebase-todo
bzr: ERROR: No rebase in progress

Please let me know if you need any more details.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

reassigning to bzr, remote.py doesn't import _mod_revision

Changed in bzr-rebase:
status: New → Confirmed
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Fixed in the attached bundle, needs a test though.

Revision history for this message
John A Meinel (jameinel) wrote :

This is a regression versus 0.91 (apparently fetch() didn't have a custom implementation.)

Basically we just need a test that you can call Repository.fetch() with a location that is the same as self, and a revision_id that is not None.
Something like:

def test_self_fetch(self):
  # This fetch should be a no-op
  # see bug #158333
  tree = self.make_branch_and_tree('.')
  rev_id = tree.commit('one')
  repo = repository.Repository.open('.')
  tree.branch.repository.fetch(repo, rev_id)

  # Even though there is nothing to fetch, check that the revision id exists
  self.assertRaises(errors.NoSuchRevision, tree.branch.repository.fetch,
      repo, 'no-such-rev-id')

Changed in bzr:
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Robert Collins (lifeless) wrote :

that looks good John, care to put up a patch?

Revision history for this message
John A Meinel (jameinel) wrote :

fix in attached branch

Changed in bzr:
assignee: nobody → jameinel
milestone: none → 1.0rc1
status: Triaged → Fix Committed
Revision history for this message
Martin Pool (mbp) wrote :

Seems to be merged post 0.92

Changed in bzr:
status: Fix Committed → 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.