mercurial/revset.py
changeset 20452 a685d9870eb5
parent 20451 ac7cebf45eb4
child 20453 6aa7dcae6bd8
equal deleted inserted replaced
20451:ac7cebf45eb4 20452:a685d9870eb5
   588     """``desc(string)``
   588     """``desc(string)``
   589     Search commit message for string. The match is case-insensitive.
   589     Search commit message for string. The match is case-insensitive.
   590     """
   590     """
   591     # i18n: "desc" is a keyword
   591     # i18n: "desc" is a keyword
   592     ds = encoding.lower(getstring(x, _("desc requires a string")))
   592     ds = encoding.lower(getstring(x, _("desc requires a string")))
   593     l = []
   593 
   594     for r in subset:
   594     def matches(x):
   595         c = repo[r]
   595         c = repo[x]
   596         if ds in encoding.lower(c.description()):
   596         return ds in encoding.lower(c.description())
   597             l.append(r)
   597 
   598     return baseset(l)
   598     return lazyset(subset, matches)
   599 
   599 
   600 def _descendants(repo, subset, x, followfirst=False):
   600 def _descendants(repo, subset, x, followfirst=False):
   601     args = getset(repo, baseset(repo), x)
   601     args = getset(repo, baseset(repo), x)
   602     if not args:
   602     if not args:
   603         return baseset([])
   603         return baseset([])