Mercurial > hg
comparison mercurial/revset.py @ 17825:3cc06457f15e
obsolete: rename `getobscache` into `getrevs`
The old name was not very good for two reasons:
- caller does not care about "cache",
- set of revision returned may not be obsolete at all.
The new name was suggested by Kevin Bullock.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 19 Oct 2012 00:28:13 +0200 |
parents | 5a511d255301 |
children | c73f7a28953c |
comparison
equal
deleted
inserted
replaced
17824:221c9c3146eb | 17825:3cc06457f15e |
---|---|
620 """``extinct()`` | 620 """``extinct()`` |
621 Obsolete changesets with obsolete descendants only. | 621 Obsolete changesets with obsolete descendants only. |
622 """ | 622 """ |
623 # i18n: "extinct" is a keyword | 623 # i18n: "extinct" is a keyword |
624 getargs(x, 0, 0, _("extinct takes no arguments")) | 624 getargs(x, 0, 0, _("extinct takes no arguments")) |
625 extincts = obsmod.getobscache(repo, 'extinct') | 625 extincts = obsmod.getrevs(repo, 'extinct') |
626 return [r for r in subset if r in extincts] | 626 return [r for r in subset if r in extincts] |
627 | 627 |
628 def extra(repo, subset, x): | 628 def extra(repo, subset, x): |
629 """``extra(label, [value])`` | 629 """``extra(label, [value])`` |
630 Changesets with the given label in the extra metadata, with the given | 630 Changesets with the given label in the extra metadata, with the given |
975 def obsolete(repo, subset, x): | 975 def obsolete(repo, subset, x): |
976 """``obsolete()`` | 976 """``obsolete()`` |
977 Mutable changeset with a newer version.""" | 977 Mutable changeset with a newer version.""" |
978 # i18n: "obsolete" is a keyword | 978 # i18n: "obsolete" is a keyword |
979 getargs(x, 0, 0, _("obsolete takes no arguments")) | 979 getargs(x, 0, 0, _("obsolete takes no arguments")) |
980 obsoletes = obsmod.getobscache(repo, 'obsolete') | 980 obsoletes = obsmod.getrevs(repo, 'obsolete') |
981 return [r for r in subset if r in obsoletes] | 981 return [r for r in subset if r in obsoletes] |
982 | 982 |
983 def origin(repo, subset, x): | 983 def origin(repo, subset, x): |
984 """``origin([set])`` | 984 """``origin([set])`` |
985 Changesets that were specified as a source for the grafts, transplants or | 985 Changesets that were specified as a source for the grafts, transplants or |
1454 """``unstable()`` | 1454 """``unstable()`` |
1455 Non-obsolete changesets with obsolete ancestors. | 1455 Non-obsolete changesets with obsolete ancestors. |
1456 """ | 1456 """ |
1457 # i18n: "unstable" is a keyword | 1457 # i18n: "unstable" is a keyword |
1458 getargs(x, 0, 0, _("unstable takes no arguments")) | 1458 getargs(x, 0, 0, _("unstable takes no arguments")) |
1459 unstables = obsmod.getobscache(repo, 'unstable') | 1459 unstables = obsmod.getrevs(repo, 'unstable') |
1460 return [r for r in subset if r in unstables] | 1460 return [r for r in subset if r in unstables] |
1461 | 1461 |
1462 | 1462 |
1463 def user(repo, subset, x): | 1463 def user(repo, subset, x): |
1464 """``user(string)`` | 1464 """``user(string)`` |