Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/commands.py (2 lines) | |||
M | mercurial/fileset.py (2 lines) |
a = util.sizetoint(expr[1:]) | a = util.sizetoint(expr[1:]) | ||||
return lambda x: x < a | return lambda x: x < a | ||||
elif expr.startswith(">="): | elif expr.startswith(">="): | ||||
a = util.sizetoint(expr[2:]) | a = util.sizetoint(expr[2:]) | ||||
return lambda x: x >= a | return lambda x: x >= a | ||||
elif expr.startswith(">"): | elif expr.startswith(">"): | ||||
a = util.sizetoint(expr[1:]) | a = util.sizetoint(expr[1:]) | ||||
return lambda x: x > a | return lambda x: x > a | ||||
elif expr[0].isdigit or expr[0] == '.': | elif expr[0:1].isdigit or expr.startswith('.'): | ||||
a = util.sizetoint(expr) | a = util.sizetoint(expr) | ||||
b = _sizetomax(expr) | b = _sizetomax(expr) | ||||
return lambda x: x >= a and x <= b | return lambda x: x >= a and x <= b | ||||
raise error.ParseError(_("couldn't parse size: %s") % expr) | raise error.ParseError(_("couldn't parse size: %s") % expr) | ||||
@predicate('size(expression)', callexisting=True) | @predicate('size(expression)', callexisting=True) | ||||
def size(mctx, x): | def size(mctx, x): | ||||
"""File size matches the given expression. Examples: | """File size matches the given expression. Examples: |
Could be '-%c ', but I don't have preference.