unexpected keyword argument 'find_ghosts' in hg-0.9.5

Bug #189182 reported by jorges
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Hg Plugin
Fix Released
Undecided
Jelmer Vernooij

Bug Description

This happens with hg-0.9.5

$ mkdir ciarp-bzr
$ cd ciarp-bzr
$ bzr pull ../ciarp (which is a mercurial branch, of course)

bzr: ERROR: exceptions.TypeError: fetch() got an unexpected keyword argument 'find_ghosts'

Traceback (most recent call last):
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/commands.py", line 834, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/commands.py", line 790, in run_bzr
    ret = run(*run_argv)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/builtins.py", line 647, in run
    possible_transports=possible_transports)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/workingtree.py", line 1566, in pull
    possible_transports=possible_transports)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/branch.py", line 1731, in pull
    run_hooks=run_hooks)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/branch.py", line 1530, in pull
    self.update_revisions(source, stop_revision, overwrite=overwrite)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/branch.py", line 1482, in update_revisions
    self.fetch(other, stop_revision)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/branch.py", line 286, in fetch
    pb=nested_pb)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/repository.py", line 949, in fetch
    return inter.fetch(revision_id=revision_id, pb=pb, find_ghosts=find_ghosts)
  File "/home/jscandal/bzr-related/bzr.dev/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
TypeError: fetch() got an unexpected keyword argument 'find_ghosts'

bzr 1.2.0.dev.0 on python 2.5.1.final.0 (linux2)
arguments: ['/home/jscandal/bin/bzr', 'pull', '../ciarp07']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: None
plugins:
  hg /home/jscandal/.bazaar/plugins/hg [unknown]
  hgimport /home/jscandal/.bazaar/plugins/hgimport [unknown]
  launchpad /home/jscandal/bzr-related/bzr.dev/bzrlib/plugins/launchpad [unknown]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Related branches

Revision history for this message
Wesley J. Landaker (wjl) wrote :

BTW, for reproducing this, you can use almost any hg repo. For instance:

hg clone http://hg.intevation.org/mercurial/crew crew-hg
bzr init crew-bzr
cd crew-bzr
bzr pull ../crew-hg

Gives the same error as above, and should be easy for anyone to reproduce.

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

The fix should be as simple as updating the fetch function with:

=== modified file '__init__.py'
--- __init__.py 2007-11-12 17:08:29 +0000
+++ __init__.py 2008-02-13 19:28:32 +0000
@@ -671,7 +671,7 @@
         self.target.fetch(self.source)

     @needs_write_lock
- def fetch(self, revision_id=None, pb=None):
+ def fetch(self, revision_id=None, pb=None, fetch_ghosts=False):
         """Fetch revisions. This is a partial implementation."""
         # assumes that self is a bzr compatible tree, and that source is hg
         # pull everything for simplicity.

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

A fix is available in my bzr-hg branch.

Changed in bzr-hg:
status: New → Fix Committed
Revision history for this message
zwn (zwn) wrote :

What is the url of the branch with the fix? Are there any more fixes to bzr-hg? BTW: the argument should be find_ghosts and not fetch_ghosts.

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

now in trunk

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