# HG changeset patch # User Greg Ward # Date 1241965638 14400 # Node ID a1ccf1817b651e8c0a5a6b8960c0d16df1b559e4 # Parent 0eb03c70c8f0cc246c7e5611e9244d1aa216165c Abort if a commit has first parent == second parent. diff -r 0eb03c70c8f0 -r a1ccf1817b65 hgfastimport/hgimport.py --- 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")