mercurial/revset.py
changeset 22999 88ac1be3f767
parent 22998 93e5d24692cc
child 23003 62d19ce9d7b6
equal deleted inserted replaced
22998:93e5d24692cc 22999:88ac1be3f767
   396     cl = repo.changelog
   396     cl = repo.changelog
   397     # i18n: "only" is a keyword
   397     # i18n: "only" is a keyword
   398     args = getargs(x, 1, 2, _('only takes one or two arguments'))
   398     args = getargs(x, 1, 2, _('only takes one or two arguments'))
   399     include = getset(repo, spanset(repo), args[0])
   399     include = getset(repo, spanset(repo), args[0])
   400     if len(args) == 1:
   400     if len(args) == 1:
   401         if len(include) == 0:
   401         if not include:
   402             return baseset()
   402             return baseset()
   403 
   403 
   404         descendants = set(_revdescendants(repo, include, False))
   404         descendants = set(_revdescendants(repo, include, False))
   405         exclude = [rev for rev in cl.headrevs()
   405         exclude = [rev for rev in cl.headrevs()
   406             if not rev in descendants and not rev in include]
   406             if not rev in descendants and not rev in include]