bzr log -r ..X fails with get_parent_map(None); bzr log -r revno:1..X is fine

Bug #519862 reported by GuilhemBichot on 2010-02-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Vincent Ladeuil

Bug Description

I thought that
bzr log -r ..X is the same as
bzr log -r revno:1..X (I thought that omitting the low bound is like using 1, just like omitting the high bound is like -1, in "bzr log -r X.."), but the first crashes while the other doesn't.
How to repeat:
and do
bzr --no-plugins --no-aliases log -n0 -r '..revid:<email address hidden>'
bzr: failed to report crash using apport:
     OSError(13, 'Permission non accord\xc3\xa9e')
bzr: ERROR: exceptions.ValueError: get_parent_map(None) is not valid

Traceback (most recent call last):
  File "/home/mysql_src/logiciels/bzr_versions/", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/home/mysql_src/logiciels/bzr_versions/", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/home/mysql_src/logiciels/bzr_versions/", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/home/mysql_src/logiciels/bzr_versions/", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/home/mysql_src/logiciels/bzr_versions/", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/home/mysql_src/logiciels/bzr_versions/", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/mysql_src/logiciels/bzr_versions/", line 1070, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/mysql_src/logiciels/bzr_versions/", line 2390, in run
    Logger(b, rqst).show(lf)
  File "/home/mysql_src/logiciels/bzr_versions/", line 335, in show
  File "/home/mysql_src/logiciels/bzr_versions/", line 359, in _show_body
    for lr in generator.iter_log_revisions():
  File "/home/mysql_src/logiciels/bzr_versions/", line 396, in iter_log_revisions
    revision_iterator = self._create_log_revision_iterator()
  File "/home/mysql_src/logiciels/bzr_versions/", line 441, in _create_log_revision_iterator
    return self._log_revision_iterator_using_delta_matching()
  File "/home/mysql_src/logiciels/bzr_versions/", line 460, in _log_revision_iterator_using_delta_matching
  File "/home/mysql_src/logiciels/bzr_versions/", line 507, in _calc_view_revisions
    direction, delayed_graph_generation)
  File "/home/mysql_src/logiciels/bzr_versions/", line 559, in _generate_all_revisions
    if not graph.is_ancestor(start_rev_id, end_rev_id):
  File "/home/mysql_src/logiciels/bzr_versions/", line 944, in is_ancestor
    [candidate_ancestor, candidate_descendant])
  File "/home/mysql_src/logiciels/bzr_versions/", line 782, in heads
  File "/home/mysql_src/logiciels/bzr_versions/", line 1282, in next
  File "/home/mysql_src/logiciels/bzr_versions/", line 1316, in _advance
    found, ghosts, next, parents = self._do_query(self._next_query)
  File "/home/mysql_src/logiciels/bzr_versions/", line 1339, in _do_query
    parent_map = self._parents_provider.get_parent_map(revisions)
  File "/home/mysql_src/logiciels/bzr_versions/", line 167, in get_parent_map
    parent_map = self._get_parent_map(needed_revisions)
  File "/home/mysql_src/logiciels/bzr_versions/", line 2663, in get_parent_map
    raise ValueError('get_parent_map(None) is not valid')
ValueError: get_parent_map(None) is not valid

bzr 2.2.0dev1 on python 2.5.2 (Linux-2.6.27-16-generic-x86_64-with-debian-lenny-sid)

bzr --no-plugins --no-aliases log -n0 -r 'revno:1..revid:<email address hidden>'
rather gives some output as expected.

bzr version:
Bazaar (bzr) 2.2.0dev1
  from bzr checkout /home/mysql_src/logiciels/bzr_versions/
    revision: 5008
    revid: <email address hidden>
    branch nick:

Did I misunderstand what an empty lower bound does?

Related branches

Martin Pool (mbp) wrote :

I don't think you're misunderstanding this, it's just a bug.

summary: - bzr log -r ..X gives exception; bzr log -r revno:1..X is fine
+ bzr log -r ..X fails with get_parent_map(None); bzr log -r revno:1..X is
+ fine
Changed in bzr:
status: New → Confirmed
importance: Undecided → High
tags: added: log
Vincent Ladeuil (vila) on 2010-03-18
Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
status: Confirmed → In Progress
Vincent Ladeuil (vila) on 2010-03-19
Changed in bzr:
milestone: none → 2.2b1
Vincent Ladeuil (vila) on 2010-03-19
Changed in bzr:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers