Commits

Ronny Pfannschmidt  committed 850a419

use bzr repo stats instead of counting revisions for bzr repo len

  • Participants
  • Parent commits 76d53fa
  • Tags 0.3.2

Comments (0)

Files changed (1)

File anyvc/bazaar/repo.py

         return "<Bzr 'repo' at %s>"%self.branch.base
 
     def __len__(self):
-        #XXX: crap
-        revs = self.branch.iter_merge_sorted_revisions()
-
-        return sum(1 for i in revs)
+        repo = self.branch.repository
+        stats = repo.gather_stats()
+        return stats['revisions']
 
     def get_default_head(self):
         id = self.branch.last_revision()