mercurial/revset.py
changeset 30799 0b49449a01f4
parent 30784 5dd67f0993ce
child 30800 cd23879cbac7
equal deleted inserted replaced
30798:f50c0db50025 30799:0b49449a01f4
   586 
   586 
   587 @predicate('bookmark([name])', safe=True)
   587 @predicate('bookmark([name])', safe=True)
   588 def bookmark(repo, subset, x):
   588 def bookmark(repo, subset, x):
   589     """The named bookmark or all bookmarks.
   589     """The named bookmark or all bookmarks.
   590 
   590 
   591     Pattern matching is supported for `name`. See ``hg help revsets.patterns``.
   591     Pattern matching is supported for `name`. See :hg:`help revisions.patterns`.
   592     """
   592     """
   593     # i18n: "bookmark" is a keyword
   593     # i18n: "bookmark" is a keyword
   594     args = getargs(x, 0, 1, _('bookmark takes one or no arguments'))
   594     args = getargs(x, 0, 1, _('bookmark takes one or no arguments'))
   595     if args:
   595     if args:
   596         bm = getstring(args[0],
   596         bm = getstring(args[0],
   625     """
   625     """
   626     All changesets belonging to the given branch or the branches of the given
   626     All changesets belonging to the given branch or the branches of the given
   627     changesets.
   627     changesets.
   628 
   628 
   629     Pattern matching is supported for `string`. See
   629     Pattern matching is supported for `string`. See
   630     ``hg help revsets.patterns``.
   630     :hg:`help revisions.patterns`.
   631     """
   631     """
   632     getbi = repo.revbranchcache().branchinfo
   632     getbi = repo.revbranchcache().branchinfo
   633 
   633 
   634     try:
   634     try:
   635         b = getstring(x, '')
   635         b = getstring(x, '')
   811 @predicate('desc(string)', safe=True)
   811 @predicate('desc(string)', safe=True)
   812 def desc(repo, subset, x):
   812 def desc(repo, subset, x):
   813     """Search commit message for string. The match is case-insensitive.
   813     """Search commit message for string. The match is case-insensitive.
   814 
   814 
   815     Pattern matching is supported for `string`. See
   815     Pattern matching is supported for `string`. See
   816     ``hg help revsets.patterns``.
   816     :hg:`help revisions.patterns`.
   817     """
   817     """
   818     # i18n: "desc" is a keyword
   818     # i18n: "desc" is a keyword
   819     ds = getstring(x, _("desc requires a string"))
   819     ds = getstring(x, _("desc requires a string"))
   820 
   820 
   821     kind, pattern, matcher = _substringmatcher(ds, casesensitive=False)
   821     kind, pattern, matcher = _substringmatcher(ds, casesensitive=False)
   922 def extra(repo, subset, x):
   922 def extra(repo, subset, x):
   923     """Changesets with the given label in the extra metadata, with the given
   923     """Changesets with the given label in the extra metadata, with the given
   924     optional value.
   924     optional value.
   925 
   925 
   926     Pattern matching is supported for `value`. See
   926     Pattern matching is supported for `value`. See
   927     ``hg help revsets.patterns``.
   927     :hg:`help revisions.patterns`.
   928     """
   928     """
   929     args = getargsdict(x, 'extra', 'label value')
   929     args = getargsdict(x, 'extra', 'label value')
   930     if 'label' not in args:
   930     if 'label' not in args:
   931         # i18n: "extra" is a keyword
   931         # i18n: "extra" is a keyword
   932         raise error.ParseError(_('extra takes at least 1 argument'))
   932         raise error.ParseError(_('extra takes at least 1 argument'))
  1403 @predicate('named(namespace)')
  1403 @predicate('named(namespace)')
  1404 def named(repo, subset, x):
  1404 def named(repo, subset, x):
  1405     """The changesets in a given namespace.
  1405     """The changesets in a given namespace.
  1406 
  1406 
  1407     Pattern matching is supported for `namespace`. See
  1407     Pattern matching is supported for `namespace`. See
  1408     ``hg help revsets.patterns``.
  1408     :hg:`help revisions.patterns`.
  1409     """
  1409     """
  1410     # i18n: "named" is a keyword
  1410     # i18n: "named" is a keyword
  1411     args = getargs(x, 1, 1, _('named requires a namespace argument'))
  1411     args = getargs(x, 1, 1, _('named requires a namespace argument'))
  1412 
  1412 
  1413     ns = getstring(args[0],
  1413     ns = getstring(args[0],
  2260 @predicate('tag([name])', safe=True)
  2260 @predicate('tag([name])', safe=True)
  2261 def tag(repo, subset, x):
  2261 def tag(repo, subset, x):
  2262     """The specified tag by name, or all tagged revisions if no name is given.
  2262     """The specified tag by name, or all tagged revisions if no name is given.
  2263 
  2263 
  2264     Pattern matching is supported for `name`. See
  2264     Pattern matching is supported for `name`. See
  2265     ``hg help revsets.patterns``.
  2265     :hg:`help revisions.patterns`.
  2266     """
  2266     """
  2267     # i18n: "tag" is a keyword
  2267     # i18n: "tag" is a keyword
  2268     args = getargs(x, 0, 1, _("tag takes one or no arguments"))
  2268     args = getargs(x, 0, 1, _("tag takes one or no arguments"))
  2269     cl = repo.changelog
  2269     cl = repo.changelog
  2270     if args:
  2270     if args:
  2302 @predicate('user(string)', safe=True)
  2302 @predicate('user(string)', safe=True)
  2303 def user(repo, subset, x):
  2303 def user(repo, subset, x):
  2304     """User name contains string. The match is case-insensitive.
  2304     """User name contains string. The match is case-insensitive.
  2305 
  2305 
  2306     Pattern matching is supported for `string`. See
  2306     Pattern matching is supported for `string`. See
  2307     ``hg help revsets.patterns``.
  2307     :hg:`help revisions.patterns`.
  2308     """
  2308     """
  2309     return author(repo, subset, x)
  2309     return author(repo, subset, x)
  2310 
  2310 
  2311 @predicate('wdir', safe=True)
  2311 @predicate('wdir', safe=True)
  2312 def wdir(repo, subset, x):
  2312 def wdir(repo, subset, x):