Loggerhead fails to browse revisions that change binary files

Bug #91686 reported by Andrew Bennetts
12
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Undecided
James Henstridge
loggerhead
Fix Released
Medium
Robey Pointer
Tags: lp-code

Related branches

Andrew Bennetts (spiv)
Changed in launchpad:
assignee: nobody → jamesh
Changed in launchpad:
status: Unconfirmed → Confirmed
Revision history for this message
James Henstridge (jamesh) wrote :

Here's the relevant traceback (with some of the path names trimmed for readability):

  File "CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 105, in _run
    self.main()
  File "CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 254, in main
    body = page_handler(*virtual_path, **self.params)
  File "loggerhead/util.py", line 344, in _f
    out = f(*a, **kw)
  File "<string>", line 3, in default
  File "TurboGears-1.0.1-py2.4.egg/turbogears/controllers.py", line 334, in expose
    output = database.run_with_transaction(
  File "<string>", line 5, in run_with_transaction
  File "TurboGears-1.0.1-py2.4.egg/turbogears/database.py", line 302, in so_rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File "TurboGears-1.0.1-py2.4.egg/turbogears/controllers.py", line 351, in <lambda>
    mapping, fragment, args, kw)))
  File "TurboGears-1.0.1-py2.4.egg/turbogears/controllers.py", line 378, in _execute_func
    output = errorhandling.try_call(func, *args, **kw)
  File "TurboGears-1.0.1-py2.4.egg/turbogears/errorhandling.py", line 73, in try_call
    return func(self, *args, **kw)
  File "loggerhead/controllers/revision_ui.py", line 73, in default
    change = h.get_changes([ revid ], get_diffs=True)[0]
  File "loggerhead/util.py", line 334, in locked
    return unbound(self, *args, **kw)
  File "loggerhead/history.py", line 596, in get_changes
    changes = self._change_cache.get_changes(revid_list, get_diffs)
  File "loggerhead/util.py", line 334, in locked
    return unbound(self, *args, **kw)
  File "loggerhead/changecache.py", line 107, in get_changes
    changes = self.history.get_changes_uncached(fetch_list, get_diffs)
  File "loggerhead/util.py", line 334, in locked
    return unbound(self, *args, **kw)
  File "loggerhead/history.py", line 67, in bzrlib_read_locked
    return unbound(self, *args, **kw)
  File "loggerhead/history.py", line 693, in get_changes_uncached
    entry.changes = self.parse_delta(delta, get_diffs, old_tree, new_tree)
  File "loggerhead/util.py", line 334, in locked
    return unbound(self, *args, **kw)
  File "loggerhead/history.py", line 809, in parse_delta
    handle_modify(path, path, fid, kind)
  File "loggerhead/history.py", line 801, in handle_modify
    bzrlib.diff.internal_diff(old_path, old_lines, new_path, new_lines, buffer)
  File "bzrlib/diff.py", line 70, in internal_diff
    textfile.check_text_lines(oldlines)
  File "bzrlib/textfile.py", line 42, in check_text_lines
    raise BinaryFile()
BinaryFile: File is binary but should be text.

Looks like Loggerhead does not handle changes to binary files well.

Revision history for this message
James Henstridge (jamesh) wrote :

Open a loggerhead task too, since this will need fixing there too.

Revision history for this message
James Henstridge (jamesh) wrote :

Robey: the linked branch contains the fix I'm rolling out for codebrowse.launchpad.net. It should be appropriate to apply to your loggerhead tree too.

Revision history for this message
James Henstridge (jamesh) wrote :

Fixed for codebrowse.launchpad.net

Changed in launchpad-bazaar:
status: Confirmed → Fix Released
Revision history for this message
Robey Pointer (robey) wrote :

merged!

Changed in loggerhead:
assignee: nobody → robey
importance: Undecided → Medium
status: Unconfirmed → Confirmed
status: Confirmed → Fix Committed
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Released in 1.2.

Changed in loggerhead:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.