~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weave.py

  • Committer: Martin Pool
  • Date: 2005-07-17 17:53:39 UTC
  • mfrom: (909.1.5)
  • Revision ID: mbp@sourcefrog.net-20050717175339-9433d3dc4d9d3b5c
- Add IntSet class

- Start converting weave calculation to use it

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
    del Set, ImmutableSet
68
68
 
69
69
 
 
70
 
70
71
class WeaveError(Exception):
71
72
    """Exception in processing weave"""
72
73
 
256
257
 
257
258
    def inclusions(self, versions):
258
259
        """Return set of all ancestors of given version(s)."""
259
 
        i = set(versions)
 
260
        from bzrlib.intset import IntSet
 
261
        
 
262
        i = IntSet(versions)
260
263
        v = max(versions)
261
264
        try:
262
265
            while v >= 0:
271
274
 
272
275
    def minimal_parents(self, version):
273
276
        """Find the minimal set of parents for the version."""
 
277
        from bzrlib.intset import IntSet
 
278
        
274
279
        included = self._v[version]
275
280
        if not included:
276
281
            return []
279
284
        li.sort(reverse=True)
280
285
 
281
286
        mininc = []
282
 
        gotit = set()
 
287
        gotit = IntSet()
283
288
 
284
289
        for pv in li:
285
290
            if pv not in gotit: