Mercurial > public > mercurial-scm > hg
diff mercurial/revset.py @ 17953:49c85541617b
Merge with crew-stable
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Tue, 20 Nov 2012 10:09:06 -0800 |
parents | 03e552aaae67 54cedee86e51 |
children | 83aa4359c49f |
line wrap: on
line diff
--- a/mercurial/revset.py Fri Nov 16 10:20:32 2012 -0600 +++ b/mercurial/revset.py Tue Nov 20 10:09:06 2012 -0800 @@ -584,6 +584,14 @@ if not args: return [] s = set(_revdescendants(repo, args, followfirst)) | set(args) + + if len(subset) == len(repo): + # the passed in revisions may not exist, -1 for example + for arg in args: + if arg not in subset: + s.remove(arg) + return list(s) + return [r for r in subset if r in s] def descendants(repo, subset, x): @@ -1341,7 +1349,10 @@ Changesets in set with no parent changeset in set. """ s = set(getset(repo, repo.changelog, x)) - subset = [r for r in subset if r in s] + if len(subset) == len(repo): + subset = s + else: + subset = [r for r in subset if r in s] cs = _children(repo, subset, s) return [r for r in subset if r not in cs]