mercurial/fileset.py
changeset 29987 d532ef155b0e
parent 28448 7108834c76a2
child 31188 ec5b56b50e19
equal deleted inserted replaced
29986:12eeb3b7da8e 29987:d532ef155b0e
   343 
   343 
   344 @predicate('size(expression)', callexisting=True)
   344 @predicate('size(expression)', callexisting=True)
   345 def size(mctx, x):
   345 def size(mctx, x):
   346     """File size matches the given expression. Examples:
   346     """File size matches the given expression. Examples:
   347 
   347 
   348     - 1k (files from 1024 to 2047 bytes)
   348     - size('1k') - files from 1024 to 2047 bytes
   349     - < 20k (files less than 20480 bytes)
   349     - size('< 20k') - files less than 20480 bytes
   350     - >= .5MB (files at least 524288 bytes)
   350     - size('>= .5MB') - files at least 524288 bytes
   351     - 4k - 1MB (files from 4096 bytes to 1048576 bytes)
   351     - size('4k - 1MB') - files from 4096 bytes to 1048576 bytes
   352     """
   352     """
   353 
   353 
   354     # i18n: "size" is a keyword
   354     # i18n: "size" is a keyword
   355     expr = getstring(x, _("size requires an expression")).strip()
   355     expr = getstring(x, _("size requires an expression")).strip()
   356     if '-' in expr: # do we have a range?
   356     if '-' in expr: # do we have a range?