ValueError when creating remote branch over bzr+ssh

Bug #225699 reported by Nikos Mouchtaris
This bug report is a duplicate of:  Bug #211661: bzr.dev smart client fails on log. Edit Remove
2
Affects Status Importance Assigned to Milestone
Bazaar
Triaged
High
Unassigned

Bug Description

Hello,

This is a completely reproducable error:

bob@space> bzr init-repo --development --no-trees /path/to/repo

alice@hole> bzr init --development /path/to/alice_code
alice@hole> cd /path/to/alice_code ; touch hello.c; bzr add; bzr commit -m init
alice@hole> bzr push bzr+ssh://bobs.space.com/path/to/repo/alice_code
alice@space's password:
Created new branch.
Added Revisions:
bzr: ERROR: exceptions.ValueError: key None not a plain string

Traceback (most recent call last):
  File "/home/to/bazaar/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/to/bazaar/bzrlib/commands.py", line 802, in run_bzr
    ret = run(*run_argv)
  File "/home/to/bazaar/bzrlib/commands.py", line 504, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/to/bazaar/bzrlib/builtins.py", line 893, in run
    to_file=self.outf)
  File "/home/to/bazaar/bzrlib/log.py", line 872, in show_changed_revisions
    search=None)
  File "/home/to/bazaar/bzrlib/log.py", line 185, in show_log
    start_revision, end_revision, search, limit)
  File "/home/to/bazaar/bzrlib/log.py", line 215, in _show_log
    allow_single_merge_revision)
  File "/home/to/bazaar/bzrlib/log.py", line 273, in calculate_view_revisions
    view_revisions = _filter_revision_range(list(view_revs_iter),
  File "/home/to/bazaar/bzrlib/log.py", line 526, in get_view_revisions
    graph.iter_ancestry(mainline_revs) if value is not None))
  File "/home/to/bazaar/bzrlib/log.py", line 525, in <genexpr>
    parent_map = dict(((key, value) for key, value in
  File "/home/to/bazaar/bzrlib/graph.py", line 442, in iter_ancestry
    next_map = self.get_parent_map(pending)
  File "/home/to/bazaar/bzrlib/remote.py", line 802, in get_parent_map
    parent_map = self._get_parent_map(missing_revisions)
  File "/home/to/bazaar/bzrlib/remote.py", line 878, in _get_parent_map
    "key %r not a plain string" % (key,))
ValueError: key None not a plain string

bzr 1.5dev on python 2.5.2 (linux2)
arguments: ['/home/to/bazaar/bzr', 'push', 'bzr+ssh://bobs.space.com/path/to/repo/alice_code']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'

I hope my imaginary paths are consistent : )

Both bzr's on alice's machine and on bob's are development revision 3403.

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

I'm guessing you actually have 'bzr push' aliased to 'bzr push --verbose', otherwise it wouldn't be showing the revisions.

This is actually similar to bug #211661. Basically .get_parent_map() doesn't allow None to be passed, but push --verbose is triggering it.

I haven't been able to reproduce it here yet (running bzr.dev 3402 ATM), it might also have something to do with using '--development' formats.

Changed in bzr:
importance: Undecided → High
status: New → Triaged
Revision history for this message
John A Meinel (jameinel) wrote :

So, I was wrong about the --development. The specific requirement is that you do 'bzr init-repo' first. I'm guessing it is just a different code path (since in one case you are checking the difference with the target).

However, I have been able to reproduce it here. It *does* seem to require --verbose.

Also, it seems that "push --verbose" is only displaying the revisions when you create a new branch. If you push over an existing branch it just says:

$ bzr push --verbose
Pushed up to revision 2.

However, that is a different bug.

Revision history for this message
Nikos Mouchtaris (isidev) wrote :

Yes, I am sorry, I forgot to mention those things. I did a small research before posting this and I figured out that the most important requirement is to push to a shared repository _and_ that this push will create a new branch. And now I see that --verbose is also a requirement.

I will test it over other protocols as well when I get the chance.

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

The bug isn't because of the protocol, it is only exposed because of the bzr+ssh protocol. The bug is in the push --verbose code which displays the log. It shouldn't be passing None to the function, which is then dying. For some reason this particular case is only triggering with bzr:// or bzr+ssh://

Further, it also seems to be important that the remote repository not already contain the revisions being pushed. Which may indicate that the source of the None is actually something in the remote repository.

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

Marking it as a bug of 211661. The only reason I thought it wasn't was because my fix was supposed to be merged. However, 'bzr missing' shows that it is not. I'm submitting the fix now, so it should be in bzr.dev for 3406 or so.

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.