~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/knitrepo.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-01-02 15:49:06 UTC
  • mfrom: (3146.1.2 parents-provider-fix)
  • Revision ID: pqm@pqm.ubuntu.com-20080102154906-hqiq6x2eammznjtg
ParentsProviders now provide tuples of parents, never lists (abentley)

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
        parent_map = {}
71
71
        for revision_id in keys:
72
72
            if revision_id == _mod_revision.NULL_REVISION:
73
 
                parent_map[revision_id] = []
 
73
                parent_map[revision_id] = ()
74
74
            else:
75
75
                try:
76
 
                    parents = self._knit.get_parents_with_ghosts(revision_id)
 
76
                    parents = tuple(
 
77
                        self._knit.get_parents_with_ghosts(revision_id))
77
78
                except errors.RevisionNotPresent:
78
79
                    continue
79
80
                else:
80
81
                    if len(parents) == 0:
81
 
                        parents = [_mod_revision.NULL_REVISION]
 
82
                        parents = (_mod_revision.NULL_REVISION,)
82
83
                parent_map[revision_id] = parents
83
84
        return parent_map
84
85