~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: Robert Collins
  • Date: 2007-07-13 18:16:38 UTC
  • mto: (2592.5.3 pack-repository)
  • mto: This revision was merged to the branch mainline in revision 2933.
  • Revision ID: robertc@robertcollins.net-20070713181638-ffyopwssoa2vwcyx
Implement KnitGraphIndex.get_versions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1216
1216
    __len__ = num_versions
1217
1217
 
1218
1218
    def get_versions(self):
 
1219
        """Get all the versions in the file. not topologically sorted."""
1219
1220
        return self._history
1220
1221
 
1221
1222
    def idx_to_name(self, idx):
1386
1387
    def num_versions(self):
1387
1388
        return len(list(self._graph_index.iter_all_entries()))
1388
1389
 
 
1390
    __len__ = num_versions
 
1391
 
 
1392
    def get_versions(self):
 
1393
        """Get all the versions in the file. not topologically sorted."""
 
1394
        return [node[0] for node in self._graph_index.iter_all_entries()]
 
1395
    
 
1396
 
 
1397
 
1389
1398
class _KnitData(_KnitComponentFile):
1390
1399
    """Contents of the knit data file"""
1391
1400