~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-02-22 14:45:05 UTC
  • mfrom: (2294.1.11 utf8_file_ids)
  • Revision ID: pqm@pqm.ubuntu.com-20070222144505-5f7551602cad9332
(John Arbash Meinel, r=robert) Update apis to expect UTF-8 file ids instead of Unicode

Show diffs side-by-side

added added

removed removed

Lines of Context:
2081
2081
 
2082
2082
 
2083
2083
def _unescaper(match, _map=_unescape_map):
2084
 
    return _map[match.group(1)]
 
2084
    code = match.group(1)
 
2085
    try:
 
2086
        return _map[code]
 
2087
    except KeyError:
 
2088
        if not code.startswith('#'):
 
2089
            raise
 
2090
        return unichr(int(code[1:])).encode('utf8')
2085
2091
 
2086
2092
 
2087
2093
_unescape_re = None