Code review comment for lp:~gagern/bzr/log_branch_from_revspec

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

This is failing in PQM. With this traceback:
  File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/cleanup.py", line 134, in run_simple
    return _do_with_cleanups(
  File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/commands.py", line 1126, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/builtins.py", line 2364, in run
    b = rev1.branch
AttributeError: 'NoneType' object has no attribute 'branch'
------------

It would seem that plain 'bzr log' is failing because there is no start revision.

This would hint towards:
 if rev1 is not None:
   b = rev1.branch

Or something like that. You might also want to do:
  if rev1 is not None and rev1.branch is not None:
    b = rev1.branch

I also think we're supposed to do something about a 'has_branch()' check.

review: Needs Fixing

« Back to merge proposal