Mercurial > hg
changeset 22256:3ae6cc6173e3
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 18 Aug 2014 16:17:16 -0700 |
parents | adb3798dce49 |
children | 4bc96685a40c |
files | mercurial/obsolete.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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: