Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#7471 closed defect (fixed)

Mercurial Plugin doesn't handle transplanted revs

Reported by: Tim Hatch Owned by: Christian Boos
Priority: normal Milestone: not applicable
Component: plugin/mercurial Version: 0.11-stable
Severity: critical Keywords: revprop
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I used the hg transplant extension (which is bundled with core hg these days), and it seems to have set some binary metadata:

transplant_source='Y\xae\xb4\x0b\x96\x15\x0fg\xb3y\x96\xe0a\xa9\xe1\xa0\x07.\xf7\x10'

This causes display of changesets to choke because it's non-ascii. I suggest that the mercurial plugin attempt to do the unicode conversion itself to catch issues like this and be able to recover.

Attachments (1)

hg-propfix.diff (704 bytes ) - added by Tim Hatch 16 years ago.
Error handling to turn binary into hexdumps, and if something else happens just show the repr

Download all attachments as: .zip

Change History (6)

by Tim Hatch, 16 years ago

Attachment: hg-propfix.diff added

Error handling to turn binary into hexdumps, and if something else happens just show the repr

comment:1 by Tim Hatch, 16 years ago

Oh, forgot to mention that this is on a live site and that the error message is a standard UnicodeDecodeError. See http://dev.pocoo.org/projects/pygments/changeset/610%3Afe4c7d073655

comment:2 by djc, 16 years ago

Trac should likely just use mercurial.node.hex() on that property.

comment:3 by Christian Boos, 16 years ago

As transplant is a standard extension, it makes sense to write a small property renderer component for it. For the general case, we can do something like Tim proposed, maybe with a size limit?

comment:4 by Christian Boos, 16 years ago

Keywords: revprop added
Resolution: fixed
Status: newclosed

Should be fixed in r7415 and 7416.

comment:5 by Christian Boos, 16 years ago

Follow-up r7430 needed to fix a typo in r7416.

Btw, any issue on the pocoo site preventing the fix to be applied?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.