##// END OF EJS Templates
revset: avoid a ValueError when 'only()' is given an empty set...
Matt Harbison -
r21925:7142e04b default
parent child Browse files
Show More
@@ -399,6 +399,9 b' def only(repo, subset, x):'
399 399 args = getargs(x, 1, 2, _('only takes one or two arguments'))
400 400 include = getset(repo, spanset(repo), args[0]).set()
401 401 if len(args) == 1:
402 if len(include) == 0:
403 return baseset([])
404
402 405 descendants = set(_revdescendants(repo, include, False))
403 406 exclude = [rev for rev in cl.headrevs()
404 407 if not rev in descendants and not rev in include]
@@ -427,6 +427,16 b' min: empty on unordered set'
427 427 7
428 428 8
429 429 9
430
431 Test empty set input
432 $ log 'only(p2())'
433 $ log 'only(p1(), p2())'
434 0
435 1
436 2
437 4
438 8
439 9
430 440 $ log 'outgoing()'
431 441 8
432 442 9
General Comments 0
You need to be logged in to leave comments. Login now