~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/versionedfile.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-02 07:00:21 UTC
  • mfrom: (4060.1.4 branch.roundtrips)
  • Revision ID: pqm@pqm.ubuntu.com-20090302070021-dvcjdpf47t2aeari
(robertc) Streaming fetch from non-stacked branches on smart servers.
        (Robert Collins, Andrew Bennetts_

Show diffs side-by-side

added added

removed removed

Lines of Context:
1534
1534
def fulltext_network_to_record(kind, bytes, line_end):
1535
1535
    """Convert a network fulltext record to record."""
1536
1536
    meta_len, = struct.unpack('!L', bytes[line_end:line_end+4])
1537
 
    record_meta = record_bytes[line_end+4:line_end+4+meta_len]
 
1537
    record_meta = bytes[line_end+4:line_end+4+meta_len]
1538
1538
    key, parents = bencode.bdecode_as_tuple(record_meta)
1539
1539
    if parents == 'nil':
1540
1540
        parents = None
1541
 
    fulltext = record_bytes[line_end+4+meta_len:]
1542
 
    return FulltextContentFactory(key, parents, None, fulltext)
 
1541
    fulltext = bytes[line_end+4+meta_len:]
 
1542
    return [FulltextContentFactory(key, parents, None, fulltext)]
1543
1543
 
1544
1544
 
1545
1545
def _length_prefix(bytes):
1546
1546
    return struct.pack('!L', len(bytes))
1547
1547
 
1548
1548
 
1549
 
def record_to_fulltext_bytes(self, record):
 
1549
def record_to_fulltext_bytes(record):
1550
1550
    if record.parents is None:
1551
1551
        parents = 'nil'
1552
1552
    else: