Mercurial > public > mercurial-scm > hg
comparison hgext/git/gitlog.py @ 49386:1e12ea7d8435 stable
git: copy findmissingrevs() from revlog.py to gitlog.py (issue6472)
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 06 Jul 2022 11:52:26 +0400 |
parents | ef5f5f1cbd90 |
children | d91b55371d6f |
comparison
equal
deleted
inserted
replaced
49385:3c4d36a96a3e | 49386:1e12ea7d8435 |
---|---|
279 """ | 279 """ |
280 if common is None: | 280 if common is None: |
281 common = [nullrev] | 281 common = [nullrev] |
282 | 282 |
283 return ancestor.incrementalmissingancestors(self.parentrevs, common) | 283 return ancestor.incrementalmissingancestors(self.parentrevs, common) |
284 | |
285 def findmissingrevs(self, common=None, heads=None): | |
286 """Return the revision numbers of the ancestors of heads that | |
287 are not ancestors of common. | |
288 | |
289 More specifically, return a list of revision numbers corresponding to | |
290 nodes N such that every N satisfies the following constraints: | |
291 | |
292 1. N is an ancestor of some node in 'heads' | |
293 2. N is not an ancestor of any node in 'common' | |
294 | |
295 The list is sorted by revision number, meaning it is | |
296 topologically sorted. | |
297 | |
298 'heads' and 'common' are both lists of revision numbers. If heads is | |
299 not supplied, uses all of the revlog's heads. If common is not | |
300 supplied, uses nullid.""" | |
301 if common is None: | |
302 common = [nullrev] | |
303 if heads is None: | |
304 heads = self.headrevs() | |
305 | |
306 inc = self.incrementalmissingrevs(common=common) | |
307 return inc.missingancestors(heads) | |
284 | 308 |
285 def findmissing(self, common=None, heads=None): | 309 def findmissing(self, common=None, heads=None): |
286 """Return the ancestors of heads that are not ancestors of common. | 310 """Return the ancestors of heads that are not ancestors of common. |
287 | 311 |
288 More specifically, return a list of nodes N such that every N | 312 More specifically, return a list of nodes N such that every N |