diff options
author | Ian Clatworthy <ian.clatworthy@canonical.com> | 2008-03-15 23:15:17 -0500 |
---|---|---|
committer | Ian Clatworthy <ian.clatworthy@canonical.com> | 2008-03-15 23:15:17 -0500 |
commit | 1574ac686e50e29f78d9007fa3d64c1de60c27fb (patch) | |
tree | ed3fad292d8be1713cd66d0be7b5540c6841f679 /processors/info_processor.py | |
parent | 38582394b48e02ce2de18908adeb24645c9de68f (diff) | |
download | bzr-fastimport-1574ac686e50e29f78d9007fa3d64c1de60c27fb.tar.gz |
support merges when from clause implicit
Diffstat (limited to 'processors/info_processor.py')
-rw-r--r-- | processors/info_processor.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/processors/info_processor.py b/processors/info_processor.py index 791cbc7..342eaa7 100644 --- a/processors/info_processor.py +++ b/processors/info_processor.py @@ -173,7 +173,6 @@ class InfoProcessor(processor.ImportProcessor): def commit_handler(self, cmd): """Process a CommitCommand.""" self.cmd_counts[cmd.name] += 1 - self.parent_counts[len(cmd.parents)] += 1 self.committers.add(cmd.committer) if cmd.author is not None: self.separate_authors_found = True @@ -190,14 +189,15 @@ class InfoProcessor(processor.ImportProcessor): else: self.sha_blob_references = True # Track the heads - if cmd.parents: - parents = cmd.parents + if cmd.from_ is not None: + parents = [cmd.from_] else: last_id = self.last_ids.get(cmd.ref) if last_id is not None: parents = [last_id] else: parents = [] + parents.extend(cmd.merges) for parent in parents: try: del self.heads[parent] @@ -207,6 +207,7 @@ class InfoProcessor(processor.ImportProcessor): pass self.heads[cmd.id] = cmd.ref self.last_ids[cmd.ref] = cmd.id + self.parent_counts[len(parents)] += 1 def reset_handler(self, cmd): """Process a ResetCommand.""" |