# HG changeset patch # User Patrick Mezard # Date 1187537920 -7200 # Node ID 6f636d13f6b8629108a03b660713e1f8b1660e1d # Parent 653790c2fa5214774fd284a9f08cd093ad5cd456 convert: load parent commits on-demand diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py --- a/hgext/convert/__init__.py +++ b/hgext/convert/__init__.py @@ -201,7 +201,10 @@ files, copies = self.source.getchanges(rev) parents = [self.map[r] for r in commit.parents] if commit.parents: - pbranch = self.commitcache[commit.parents[0]].branch + prev = commit.parents[0] + if prev not in self.commitcache: + self.cachecommit(prev) + pbranch = self.commitcache[prev].branch else: pbranch = None self.dest.setbranch(commit.branch, pbranch, parents)