~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/groupcompress.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:
62
62
    # groupcompress ordering is approximately reverse topological,
63
63
    # properly grouped by file-id.
64
64
    per_prefix_map = {}
65
 
    for key, value in parent_map.iteritems():
 
65
    for item in parent_map.iteritems():
 
66
        key = item[0]
66
67
        if isinstance(key, str) or len(key) == 1:
67
68
            prefix = ''
68
69
        else:
69
70
            prefix = key[0]
70
71
        try:
71
 
            per_prefix_map[prefix][key] = value
 
72
            per_prefix_map[prefix].append(item)
72
73
        except KeyError:
73
 
            per_prefix_map[prefix] = {key: value}
 
74
            per_prefix_map[prefix] = [item]
74
75
 
75
76
    present_keys = []
76
77
    for prefix in sorted(per_prefix_map):
1074
1075
    def get_annotator(self):
1075
1076
        return annotate.Annotator(self)
1076
1077
 
1077
 
    def check(self, progress_bar=None, keys=None):
 
1078
    def check(self, progress_bar=None):
1078
1079
        """See VersionedFiles.check()."""
1079
 
        if keys is None:
1080
 
            keys = self.keys()
1081
 
            for record in self.get_record_stream(keys, 'unordered', True):
1082
 
                record.get_bytes_as('fulltext')
1083
 
        else:
1084
 
            return self.get_record_stream(keys, 'unordered', True)
 
1080
        keys = self.keys()
 
1081
        for record in self.get_record_stream(keys, 'unordered', True):
 
1082
            record.get_bytes_as('fulltext')
1085
1083
 
1086
1084
    def _check_add(self, key, lines, random_id, check_content):
1087
1085
        """check that version_id and lines are safe to add."""
1098
1096
            self._check_lines_not_unicode(lines)
1099
1097
            self._check_lines_are_lines(lines)
1100
1098
 
1101
 
    def get_known_graph_ancestry(self, keys):
1102
 
        """Get a KnownGraph instance with the ancestry of keys."""
1103
 
        parent_map, missing_keys = self._index._graph_index.find_ancestry(keys,
1104
 
                                                                          0)
1105
 
        kg = _mod_graph.KnownGraph(parent_map)
1106
 
        return kg
1107
 
 
1108
1099
    def get_parent_map(self, keys):
1109
1100
        """Get a map of the graph parents of keys.
1110
1101