Mercurial > hg > hg-fastimport
diff hgfastimport/hgimport.py @ 41:a1ccf1817b65
Abort if a commit has first parent == second parent.
| author | Greg Ward <greg-hg@gerg.ca> |
|---|---|
| date | Sun, 10 May 2009 10:27:18 -0400 |
| parents | 0eb03c70c8f0 |
| children | 71f1e5ed6213 |
line wrap: on
line diff
--- a/hgfastimport/hgimport.py Sun May 10 10:23:54 2009 -0400 +++ b/hgfastimport/hgimport.py Sun May 10 10:27:18 2009 -0400 @@ -121,6 +121,11 @@ raise NotImplementedError("Can't handle more than two parents") second_parent = self.committish_rev(cmd.merges[0]) #self.ui.write("Second parent: %s\n" % second_parent) + if second_parent == first_parent: + raise util.Abort("bad fastimport dump: commit %s has %s as " + "both parents" + % (cmd.id, cmd.merges[0])) + mercurial.commands.debugsetparents(self.ui, self.repo, first_parent, second_parent) #self.ui.write("Bing\n")
