~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Aaron Bentley
  • Date: 2005-09-10 22:55:35 UTC
  • mto: (1185.3.4)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: aaron.bentley@utoronto.ca-20050910225535-3660c70bf335c618
Handled ancestors that are missing when finding a base

Show diffs side-by-side

added added

removed removed

Lines of Context:
274
274
                if len(parents) == 0:
275
275
                    root = line
276
276
            except bzrlib.errors.NoSuchRevision:
277
 
                parents = []
278
 
            for parent in parents:
279
 
                if parent not in ancestors:
280
 
                    new_lines.add(parent)
281
 
                if parent not in descendants:
282
 
                    descendants[parent] = {}
283
 
                descendants[parent][line] = 1
284
 
            ancestors[line] = set(parents)
 
277
                parents = None
 
278
            if parents is not None:
 
279
                for parent in parents:
 
280
                    if parent not in ancestors:
 
281
                        new_lines.add(parent)
 
282
                    if parent not in descendants:
 
283
                        descendants[parent] = {}
 
284
                    descendants[parent][line] = 1
 
285
            if parents is not None:
 
286
                ancestors[line] = set(parents)
285
287
        lines = new_lines
286
288
    assert root not in descendants[root]
287
289
    assert root not in ancestors[root]