~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: John Arbash Meinel
  • Date: 2009-08-03 20:38:39 UTC
  • mto: This revision was merged to the branch mainline in revision 4592.
  • Revision ID: john@arbash-meinel.com-20090803203839-du9y39adazy9qdly
more updates to get things to build cleanly.

1) delete the release directories because it seems that gf.recipe.bzr doesn't
clean them up when you update to a new release.
2) fix 'clean-installer-all'. It is a lot more simple now, as we just nuke the
whole build-win32 directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1045
1045
    def get_annotator(self):
1046
1046
        return _KnitAnnotator(self)
1047
1047
 
1048
 
    def check(self, progress_bar=None, keys=None):
 
1048
    def check(self, progress_bar=None):
1049
1049
        """See VersionedFiles.check()."""
1050
 
        if keys is None:
1051
 
            return self._logical_check()
1052
 
        else:
1053
 
            # At the moment, check does not extra work over get_record_stream
1054
 
            return self.get_record_stream(keys, 'unordered', True)
1055
 
 
1056
 
    def _logical_check(self):
1057
1050
        # This doesn't actually test extraction of everything, but that will
1058
1051
        # impact 'bzr check' substantially, and needs to be integrated with
1059
1052
        # care. However, it does check for the obvious problem of a delta with
1190
1183
        generator = _VFContentMapGenerator(self, [key])
1191
1184
        return generator._get_content(key)
1192
1185
 
1193
 
    def get_known_graph_ancestry(self, keys):
1194
 
        """Get a KnownGraph instance with the ancestry of keys."""
1195
 
        parent_map, missing_keys = self._index.find_ancestry(keys)
1196
 
        kg = _mod_graph.KnownGraph(parent_map)
1197
 
        return kg
1198
 
 
1199
1186
    def get_parent_map(self, keys):
1200
1187
        """Get a map of the graph parents of keys.
1201
1188
 
2566
2553
        except KeyError:
2567
2554
            raise RevisionNotPresent(key, self)
2568
2555
 
2569
 
    def find_ancestry(self, keys):
2570
 
        """See CombinedGraphIndex.find_ancestry()"""
2571
 
        prefixes = set(key[:-1] for key in keys)
2572
 
        self._load_prefixes(prefixes)
2573
 
        result = {}
2574
 
        parent_map = {}
2575
 
        missing_keys = set()
2576
 
        pending_keys = list(keys)
2577
 
        # This assumes that keys will not reference parents in a different
2578
 
        # prefix, which is accurate so far.
2579
 
        while pending_keys:
2580
 
            key = pending_keys.pop()
2581
 
            if key in parent_map:
2582
 
                continue
2583
 
            prefix = key[:-1]
2584
 
            try:
2585
 
                suffix_parents = self._kndx_cache[prefix][0][key[-1]][4]
2586
 
            except KeyError:
2587
 
                missing_keys.add(key)
2588
 
            else:
2589
 
                parent_keys = tuple([prefix + (suffix,)
2590
 
                                     for suffix in suffix_parents])
2591
 
                parent_map[key] = parent_keys
2592
 
                pending_keys.extend([p for p in parent_keys
2593
 
                                        if p not in parent_map])
2594
 
        return parent_map, missing_keys
2595
 
 
2596
2556
    def get_parent_map(self, keys):
2597
2557
        """Get a map of the parents of keys.
2598
2558
 
3082
3042
            options.append('no-eol')
3083
3043
        return options
3084
3044
 
3085
 
    def find_ancestry(self, keys):
3086
 
        """See CombinedGraphIndex.find_ancestry()"""
3087
 
        return self._graph_index.find_ancestry(keys, 0)
3088
 
 
3089
3045
    def get_parent_map(self, keys):
3090
3046
        """Get a map of the parents of keys.
3091
3047