/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-01-14 00:01:32 UTC
  • mfrom: (4957.1.1 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100114000132-3p3rabnonjw3gzqb
(jam) Merge bzr.stable, bringing in bug fixes #175839, #504390

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
    lru_cache,
70
70
    pack,
71
71
    progress,
 
72
    static_tuple,
72
73
    trace,
73
74
    tsort,
74
75
    tuned_gzip,
2367
2368
    FLAGS is a comma separated list of flags about the record. Values include
2368
2369
        no-eol, line-delta, fulltext.
2369
2370
    BYTE_OFFSET is the ascii representation of the byte offset in the data file
2370
 
        that the the compressed data starts at.
 
2371
        that the compressed data starts at.
2371
2372
    LENGTH is the ascii representation of the length of the data file.
2372
2373
    PARENT_ID a utf-8 revision id prefixed by a '.' that is a parent of
2373
2374
        REVISION_ID.
2944
2945
        if not random_id:
2945
2946
            present_nodes = self._get_entries(keys)
2946
2947
            for (index, key, value, node_refs) in present_nodes:
 
2948
                parents = node_refs[:1]
 
2949
                # Sometimes these are passed as a list rather than a tuple
 
2950
                passed = static_tuple.as_tuples(keys[key])
 
2951
                passed_parents = passed[1][:1]
2947
2952
                if (value[0] != keys[key][0][0] or
2948
 
                    node_refs[:1] != keys[key][1][:1]):
 
2953
                    parents != passed_parents):
 
2954
                    node_refs = static_tuple.as_tuples(node_refs)
2949
2955
                    raise KnitCorrupt(self, "inconsistent details in add_records"
2950
 
                        ": %s %s" % ((value, node_refs), keys[key]))
 
2956
                        ": %s %s" % ((value, node_refs), passed))
2951
2957
                del keys[key]
2952
2958
        result = []
2953
2959
        if self._parents:
3702
3708
 
3703
3709
try:
3704
3710
    from bzrlib._knit_load_data_pyx import _load_data_c as _load_data
3705
 
except ImportError:
 
3711
except ImportError, e:
 
3712
    osutils.failed_to_load_extension(e)
3706
3713
    from bzrlib._knit_load_data_py import _load_data_py as _load_data