Show More
@@ -261,8 +261,11 b' class revlog:' | |||
|
261 | 261 | If heads is unspecified, it is taken to be the output of the |
|
262 | 262 | heads method (i.e. a list of all nodes in the repository that |
|
263 | 263 | have no children).""" |
|
264 | nonodes = ([], [], []) | |
|
264 | 265 | if roots is not None: |
|
265 | 266 | roots = list(roots) |
|
267 | if not roots: | |
|
268 | return nonodes | |
|
266 | 269 | lowestrev = min([self.rev(n) for n in roots]) |
|
267 | 270 | else: |
|
268 | 271 | roots = [nullid] # Everybody's a descendent of nullid |
@@ -280,9 +283,12 b' class revlog:' | |||
|
280 | 283 | # Set heads to an empty dictionary for later discovery of heads |
|
281 | 284 | heads = {} |
|
282 | 285 | else: |
|
286 | heads = list(heads) | |
|
287 | if not heads: | |
|
288 | return nonodes | |
|
283 | 289 | ancestors = {} |
|
284 | 290 | # Start at the top and keep marking parents until we're done. |
|
285 |
nodestotag = |
|
|
291 | nodestotag = heads[:] | |
|
286 | 292 | # Turn heads into a dictionary so we can remove 'fake' heads. |
|
287 | 293 | # Also, later we will be using it to filter out the heads we can't |
|
288 | 294 | # find from roots. |
@@ -311,7 +317,7 b' class revlog:' | |||
|
311 | 317 | # any other heads. |
|
312 | 318 | heads.pop(n) |
|
313 | 319 | if not ancestors: |
|
314 |
return |
|
|
320 | return nonodes | |
|
315 | 321 | # Now that we have our set of ancestors, we want to remove any |
|
316 | 322 | # roots that are not ancestors. |
|
317 | 323 | |
@@ -327,7 +333,7 b' class revlog:' | |||
|
327 | 333 | lowestrev = min([self.rev(n) for n in roots]) |
|
328 | 334 | else: |
|
329 | 335 | # No more roots? Return empty list |
|
330 |
return |
|
|
336 | return nonodes | |
|
331 | 337 | else: |
|
332 | 338 | # We are descending from nullid, and don't need to care about |
|
333 | 339 | # any other roots. |
General Comments 0
You need to be logged in to leave comments.
Login now