# HG changeset patch # User Pierre-Yves David # Date 1408403836 25200 # Node ID 3ae6cc6173e327d4d3c547b19a0dc96107b0eeb7 # Parent adb3798dce492b25be5c1ee7ec273267467a7531 createmarkers: automatically record the parent of pruned changesets We need this information to build the set of relevant markers during exchanges. This can only be done at the `createmarkers` level since the `obsstore.create` function does not have a repo and therefore has no access to the parent information. diff -r adb3798dce49 -r 3ae6cc6173e3 mercurial/obsolete.py --- a/mercurial/obsolete.py Mon Aug 18 16:12:29 2014 -0700 +++ b/mercurial/obsolete.py Mon Aug 18 16:17:16 2014 -0700 @@ -886,10 +886,13 @@ % 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) - 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: