Show More
@@ -282,6 +282,30 b' class changelog(baselog):' | |||
|
282 | 282 | |
|
283 | 283 | return ancestor.incrementalmissingancestors(self.parentrevs, common) |
|
284 | 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) | |
|
308 | ||
|
285 | 309 | def findmissing(self, common=None, heads=None): |
|
286 | 310 | """Return the ancestors of heads that are not ancestors of common. |
|
287 | 311 |
@@ -425,5 +425,8 b' This covers changelog.headrevs() with a ' | |||
|
425 | 425 | 7[tip][master] 1a0fee76bfc4 1970-01-01 00:00 +0000 test |
|
426 | 426 | remove beta |
|
427 | 427 | |
|
428 | This covers revlog.findmissingrevs() (issue6472) | |
|
429 | $ hg log -r 'last(only(master))' -Tcompact | |
|
430 | 7[tip][master] 1a0fee76bfc4 1970-01-01 00:00 +0000 test | |
|
431 | remove beta | |
|
428 | 432 | |
|
429 |
General Comments 0
You need to be logged in to leave comments.
Login now