~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_chk_map_py.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-11 04:02:41 UTC
  • mfrom: (5017.2.2 tariff)
  • Revision ID: pqm@pqm.ubuntu.com-20100211040241-w6n021dz0uus341n
(mbp) add import-tariff tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2009 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
157
157
    result._node_width = len(prefix)
158
158
    result._search_prefix = common_prefix
159
159
    return result
160
 
 
161
 
 
162
 
def _bytes_to_text_key(bytes):
163
 
    """Take a CHKInventory value string and return a (file_id, rev_id) tuple"""
164
 
    sections = bytes.split('\n')
165
 
    kind, file_id = sections[0].split(': ')
166
 
    return (intern(file_id), intern(sections[3]))
167