~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: Gordon Tyler
  • Date: 2009-12-02 16:36:22 UTC
  • mto: (4870.1.1 integration2)
  • mto: This revision was merged to the branch mainline in revision 4871.
  • Revision ID: gordon@doxxx.net-20091202163622-yhqs3n77wln22vrn
Replaced blackbox test for version's python interpreter path with Alexander Belchenko's test in bt.test_version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2008 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
69
69
    lru_cache,
70
70
    pack,
71
71
    progress,
72
 
    static_tuple,
73
72
    trace,
74
73
    tsort,
75
74
    tuned_gzip,
76
 
    ui,
77
75
    )
78
76
""")
79
77
from bzrlib import (
1756
1754
        :return: An iterator over (line, key).
1757
1755
        """
1758
1756
        if pb is None:
1759
 
            pb = ui.ui_factory.nested_progress_bar()
 
1757
            pb = progress.DummyProgress()
1760
1758
        keys = set(keys)
1761
1759
        total = len(keys)
1762
1760
        done = False
2946
2944
        if not random_id:
2947
2945
            present_nodes = self._get_entries(keys)
2948
2946
            for (index, key, value, node_refs) in present_nodes:
2949
 
                parents = node_refs[:1]
2950
 
                # Sometimes these are passed as a list rather than a tuple
2951
 
                passed = static_tuple.as_tuples(keys[key])
2952
 
                passed_parents = passed[1][:1]
2953
2947
                if (value[0] != keys[key][0][0] or
2954
 
                    parents != passed_parents):
2955
 
                    node_refs = static_tuple.as_tuples(node_refs)
 
2948
                    node_refs[:1] != keys[key][1][:1]):
2956
2949
                    raise KnitCorrupt(self, "inconsistent details in add_records"
2957
 
                        ": %s %s" % ((value, node_refs), passed))
 
2950
                        ": %s %s" % ((value, node_refs), keys[key]))
2958
2951
                del keys[key]
2959
2952
        result = []
2960
2953
        if self._parents: