diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
index adb3798dce492b25be5c1ee7ec273267467a7531_bWVyY3VyaWFsL29ic29sZXRlLnB5..3ae6cc6173e327d4d3c547b19a0dc96107b0eeb7_bWVyY3VyaWFsL29ic29sZXRlLnB5 100644
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -886,5 +886,8 @@
                                  % prec)
             nprec = prec.node()
             nsucs = tuple(s.node() for s in sucs)
+            npare = None
+            if not nsucs:
+                npare = tuple(p.node() for p in prec.parents())
             if nprec in nsucs:
                 raise util.Abort("changeset %s cannot obsolete itself" % prec)
@@ -889,7 +892,7 @@
             if nprec in nsucs:
                 raise util.Abort("changeset %s cannot obsolete itself" % prec)
-            repo.obsstore.create(tr, nprec, nsucs, flag, date=date,
-                                 metadata=localmetadata)
+            repo.obsstore.create(tr, nprec, nsucs, flag, parents=npare,
+                                 date=date, metadata=localmetadata)
             repo.filteredrevcache.clear()
         tr.close()
     finally: