GitWorkingTree.annotate_iter implementation

Bug #825321 reported by David Clymer
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
Fix Released
Jelmer Vernooij

Bug Description

It would be very handy to be able use blame in git repos.

david_clymer@cruella-devel:~/Development/VistaShare/oct_git$ bzr blame README.txt
bzr: ERROR: exceptions.NotImplementedError: <bound method GitTexts.get_parent_map of <bzrlib.plugins.git.versionedfiles.GitTexts object at 0x3a05810>>

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 924, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 1124, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 689, in run_argv_aliases
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 711, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 1139, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 4682, in run
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 94, in annotate_file_tree
    annotations = list(tree.annotate_iter(file_id))
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 140, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 595, in annotate_iter
    for key, line in annotator.annotate_flat(this_key)]
  File "_annotator_pyx.pyx", line 275, in bzrlib._annotator_pyx.Annotator.annotate_flat (bzrlib/_annotator_pyx.c:2468)
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 260, in annotate
    for text_key, text, num_lines in self._get_needed_texts(key, pb=pb):
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 112, in _get_needed_texts
    keys, ann_keys = self._get_needed_keys(key)
  File "/usr/lib/pymodules/python2.6/bzrlib/", line 89, in _get_needed_keys
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/git/", line 123, in get_parent_map
    raise NotImplementedError(self.get_parent_map)
NotImplementedError: <bound method GitTexts.get_parent_map of <bzrlib.plugins.git.versionedfiles.GitTexts object at 0x3a05810>>

bzr 2.3.4 on python 2.6.6 (Linux-2.6.32-4-pve-x86_64-with-debian-6.0.2)
arguments: ['/usr/bin/bzr', 'blame', 'README.txt']
plugins: bash_completion[2.3.4], bzrtools[2.3.1], git[0.6.0],
    launchpad[2.3.4], netrc_credential_store[2.3.4], news_merge[2.3.4],
encoding: 'ANSI_X3.4-1968', fsenc: 'ANSI_X3.4-1968', lang: 'C'

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
    including this traceback and a description of the problem.

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

This is somewhat implemented when you run bzr 2.4 - GitText.get_parent_map() is no longer necessary but only Repository.get_file_graph(), which bzr-git implements.

However, it fails later in GitWorkingTree.annotate_iter.

summary: - GitTexts.get_parent_map() needed for annotation
+ GitWorkingTree.annotate_iter implementation
Changed in bzr-git:
status: New → Triaged
importance: Undecided → Medium
Jelmer Vernooij (jelmer)
Changed in brz-git:
status: New → Fix Released
importance: Undecided → Medium
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
Changed in brz-git:
milestone: none → integration
Jelmer Vernooij (jelmer)
affects: brz-git → brz
Changed in brz:
milestone: integration → none
milestone: none → 3.0.0
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.