brz log error

Bug #1847913 reported by Sam Bull on 2019-10-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Breezy
Critical
Jelmer Vernooij

Bug Description

Encountered this error while trying to brz log:

> brz log -n 2 web/templates/partials/home_page.html
brz: ERROR: AttributeError: 'bytes' object has no attribute 'encode'

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/breezy/commands.py", line 1016, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/breezy/commands.py", line 1202, in run_bzr
    ret = run(*run_argv)
  File "/usr/local/lib/python3.7/site-packages/breezy/commands.py", line 759, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/local/lib/python3.7/site-packages/breezy/commands.py", line 784, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/breezy/cleanup.py", line 137, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/breezy/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/breezy/commands.py", line 1219, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/breezy/builtins.py", line 2864, in run
    Logger(b, rqst).show(lf)
  File "/usr/local/lib/python3.7/site-packages/breezy/log.py", line 392, in show
    self._show_body(lf)
  File "/usr/local/lib/python3.7/site-packages/breezy/log.py", line 420, in _show_body
    for lr in generator.iter_log_revisions():
  File "/usr/local/lib/python3.7/site-packages/breezy/log.py", line 462, in iter_log_revisions
    revision_iterator = self._create_log_revision_iterator()
  File "/usr/local/lib/python3.7/site-packages/breezy/log.py", line 528, in _create_log_revision_iterator
    return self._log_revision_iterator_using_per_file_graph()
  File "/usr/local/lib/python3.7/site-packages/breezy/log.py", line 563, in _log_revision_iterator_using_per_file_graph
    include_merges=rqst.get('levels') != 1)
  File "/usr/local/lib/python3.7/site-packages/breezy/log.py", line 1266, in _filter_revisions_touching_file_id
    [k[1] for k in get_parent_map(next_keys)])
  File "/usr/local/lib/python3.7/site-packages/breezy/git/filegraph.py", line 117, in get_parent_map
    ret[key] = self._get_parents(file_id, text_revision)
  File "/usr/local/lib/python3.7/site-packages/breezy/git/filegraph.py", line 95, in _get_parents
    path.encode('utf-8'), commit_parent))
AttributeError: 'bytes' object has no attribute 'encode'

brz 3.0.1 on python 3.7.4 (Darwin-18.7.0-x86_64-i386-64bit)
arguments: ['/usr/local/bin/brz', 'log', '-n', '2',
    'web/templates/partials/home_page.html']
plugins: bash_completion[3.0.1], changelog_merge[3.0.1],
    commitfromnews[unknown], cvs[3.0.1], darcs[unknown], email[unknown],
    fastimport[unknown], launchpad[3.0.1], mtn[3.0.1],
    netrc_credential_store[3.0.1], news_merge[3.0.1], po_merge[3.0.1],
    propose[unknown], repodebug[unknown], stats[3.0.1], upload[3.0.1],
    weave_fmt[3.0.1]
encoding: 'utf-8', fsenc: 'utf-8', lang: 'en_GB.UTF-8'

And another error here:

> brz log web/templates/partials/home_page.html
brz: ERROR: dulwich.errors.NotTreeError: eb3506234735a945ce0b015b46054f687c34ab53 is not a tree

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/breezy/commands.py", line 1016, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/breezy/commands.py", line 1202, in run_bzr
    ret = run(*run_argv)
  File "/usr/local/lib/python2.7/site-packages/breezy/commands.py", line 759, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/local/lib/python2.7/site-packages/breezy/commands.py", line 784, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/breezy/cleanup.py", line 137, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/breezy/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/breezy/commands.py", line 1219, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/breezy/builtins.py", line 2864, in run
    Logger(b, rqst).show(lf)
  File "/usr/local/lib/python2.7/site-packages/breezy/log.py", line 392, in show
    self._show_body(lf)
  File "/usr/local/lib/python2.7/site-packages/breezy/log.py", line 420, in _show_body
    for lr in generator.iter_log_revisions():
  File "/usr/local/lib/python2.7/site-packages/breezy/log.py", line 462, in iter_log_revisions
    revision_iterator = self._create_log_revision_iterator()
  File "/usr/local/lib/python2.7/site-packages/breezy/log.py", line 528, in _create_log_revision_iterator
    return self._log_revision_iterator_using_per_file_graph()
  File "/usr/local/lib/python2.7/site-packages/breezy/log.py", line 563, in _log_revision_iterator_using_per_file_graph
    include_merges=rqst.get('levels') != 1)
  File "/usr/local/lib/python2.7/site-packages/breezy/log.py", line 1266, in _filter_revisions_touching_file_id
    [k[1] for k in get_parent_map(next_keys)])
  File "/usr/local/lib/python2.7/site-packages/breezy/git/filegraph.py", line 117, in get_parent_map
    ret[key] = self._get_parents(file_id, text_revision)
  File "/usr/local/lib/python2.7/site-packages/breezy/git/filegraph.py", line 95, in _get_parents
    path.encode('utf-8'), commit_parent))
  File "/usr/local/lib/python2.7/site-packages/breezy/git/filegraph.py", line 47, in find_last_change_revision
    commit.tree, path)
  File "/usr/local/lib/python2.7/site-packages/dulwich/object_store.py", line 1031, in tree_lookup_path
    return tree.lookup_path(lookup_obj, path)
  File "/usr/local/lib/python2.7/site-packages/dulwich/objects.py", line 1083, in lookup_path
    raise NotTreeError(sha)
NotTreeError: eb3506234735a945ce0b015b46054f687c34ab53 is not a tree

brz 3.0.1 on python 2.7.16 (Darwin-18.7.0-x86_64-i386-64bit)
arguments: ['/usr/local/bin/brz', 'log',
    'web/templates/partials/home_page.html']
plugins: bash_completion[3.0.1], changelog_merge[3.0.1],
    commitfromnews[unknown], cvs[3.0.1], darcs[unknown], email[unknown],
    fastimport[unknown], launchpad[3.0.1], mtn[3.0.1],
    netrc_credential_store[3.0.1], news_merge[3.0.1], po_merge[3.0.1],
    propose[unknown], repodebug[unknown], stats[3.0.1], upload[3.0.1],
    weave_fmt[3.0.1]
encoding: 'utf-8', fsenc: 'utf-8', lang: 'en_GB.UTF-8'

Related branches

Jelmer Vernooij (jelmer) on 2019-10-13
Changed in brz:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Jelmer Vernooij (jelmer)
milestone: none → 3.0.2
Jelmer Vernooij (jelmer) on 2019-10-20
Changed in brz:
status: Triaged → Fix Committed
Vincent Ladeuil (vila) on 2019-11-19
Changed in brz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers