[PATCH 4 of 4] templater: add subsetparents(rev, revset) function
Yuya Nishihara
yuya at tcha.org
Wed Mar 25 15:54:49 UTC 2020
On Tue, 24 Mar 2020 18:16:45 -0400, Augie Fackler wrote:
> > + # set up or propagate tracking pointers if
> > + # - one of the parents is not active,
> > + # - or descendants' parents are unresolved.
> > + if not bothparentsactive or unresolved or resolved:
> > + if len(parentrevs) > 1:
> > + # 'rev' is a merge revision. increment the pending count
> > + # as the 'unresolved' dict will be duplicated.
> > + for r in unresolved:
> > + pendingcnt[r] += 1
> > + reusable = True # can we avoid copying the tracking pointer?
> > + for i, p in enumerate(parentrevs):
> > + assert p < rev
> > + heapq.heappush(tovisit, -p)
> > + if p in pointers:
> > + # 'p' is a fork revision. concatenate tracking pointers
> > + # and decrement the pending count accordingly.
> > + knownunresolved, knownresolved = pointers[p]
> > + for r, c in unresolved.items():
> > + c += [b'1', b'2'][i]
I noticed tracking p1/p2 chain here isn't correct since the current rev
is not a merge point but a fork point. I'll send a follow up patch later.
Anyway, thanks for the review!
More information about the Mercurial-devel
mailing list