/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: Martin Pool
  • Date: 2009-03-12 05:44:43 UTC
  • mfrom: (4124 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4144.
  • Revision ID: mbp@sourcefrog.net-20090312054443-rz5kodxh1cjjx2id
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
    ConstantMapper,
104
104
    ContentFactory,
105
105
    ChunkedContentFactory,
 
106
    sort_groupcompress,
106
107
    VersionedFile,
107
108
    VersionedFiles,
108
109
    )
1316
1317
        if not keys:
1317
1318
            return
1318
1319
        if not self._index.has_graph:
1319
 
            # Cannot topological order when no graph has been stored.
 
1320
            # Cannot sort when no graph has been stored.
1320
1321
            ordering = 'unordered'
1321
1322
 
1322
1323
        remaining_keys = keys
1378
1379
                    needed_from_fallback.add(key)
1379
1380
        # Double index lookups here : need a unified api ?
1380
1381
        global_map, parent_maps = self._get_parent_map_with_sources(keys)
1381
 
        if ordering == 'topological':
1382
 
            # Global topological sort
1383
 
            present_keys = tsort.topo_sort(global_map)
 
1382
        if ordering in ('topological', 'groupcompress'):
 
1383
            if ordering == 'topological':
 
1384
                # Global topological sort
 
1385
                present_keys = tsort.topo_sort(global_map)
 
1386
            else:
 
1387
                present_keys = sort_groupcompress(global_map)
1384
1388
            # Now group by source:
1385
1389
            source_keys = []
1386
1390
            current_source = None
1396
1400
        else:
1397
1401
            if ordering != 'unordered':
1398
1402
                raise AssertionError('valid values for ordering are:'
1399
 
                    ' "unordered" or "topological" not: %r'
 
1403
                    ' "unordered", "groupcompress" or "topological" not: %r'
1400
1404
                    % (ordering,))
1401
1405
            # Just group by source; remote sources first.
1402
1406
            present_keys = []
1678
1682
                        key_records.append((key, details[0]))
1679
1683
                records_iter = enumerate(self._read_records_iter(key_records))
1680
1684
                for (key_idx, (key, data, sha_value)) in records_iter:
1681
 
                    pb.update('Iterating content', key_idx, total)
 
1685
                    pb.update('Walking content', key_idx, total)
1682
1686
                    compression_parent = build_details[key][1]
1683
1687
                    if compression_parent is None:
1684
1688
                        # fulltext
1714
1718
                source_keys.add(key)
1715
1719
                yield line, key
1716
1720
            keys.difference_update(source_keys)
1717
 
        pb.update('Iterating content', total, total)
 
1721
        pb.update('Walking content', total, total)
1718
1722
 
1719
1723
    def _make_line_delta(self, delta_seq, new_content):
1720
1724
        """Generate a line delta from delta_seq and new_content."""