#1750 UnicodeDecodeError in hg reactor code

v1.0.0
closed
Wolf
sf-2 (994)
SCM
nobody
2015-08-20
2011-03-17
No
Module allura.model.repository:1106 in hex
<<          '''Compute a recursive sha1 hash on the tree'''
               if self._hex is None:
                   sha_obj = sha1('tree\n' + repr(self))
                   self._hex = sha_obj.hexdigest()
               return self._hex
>>  sha_obj = sha1('tree\n' + repr(self))
Module allura.model.repository:1118 in __repr__
<<      def __repr__(self):
               return unicode(self).encode('utf-8')

       def topological_sort(graph):
>>  return unicode(self).encode('utf-8')
Module allura.model.repository:1115 in __unicode__
<<          lines += [('b %s %s' % (oid, name))
                         for name, oid in self.blobs.iteritems() ]
               return u'\n'.join(sorted(lines))

           def __repr__(self):
>>  return u'\n'.join(sorted(lines))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 54: ordinal not in range(128)

Discussion

  • Dave Brondsema

    Dave Brondsema - 2011-03-31

    This might've been fixed in the reactor rewrite?

     
  • Dave Brondsema

    Dave Brondsema - 2011-03-31
    • size: --> 2
     
  • Dave Brondsema

    Dave Brondsema - 2011-03-31

    Try adding a unicode filename to the repo to duplicate

     
  • Jenny Steele - 2011-04-04
    • assigned_to: Jenny Steele
    • component: General --> SCM
     
  • Jenny Steele - 2011-04-04
    • status: open --> code-review
     
  • Jenny Steele - 2011-04-04

    Changes are on js/1750. Confirm this works by adding a file with a unicode name to a mercurial repo. The file will show up in the file list once the repo has refreshed successfully.

    • assigned_to: Jenny Steele --> Wolf
     
  • Wolf - 2011-04-05
    • status: code-review --> closed
     
  • Wolf - 2011-04-05

    validated and promoted to dev in f461c6b

     

Log in to post a comment.