comparison tests/test-fileset.t @ 25925:23c4589fc678 stable

filesets: ignore unit case in size() predicate for single value When specifying one plain value in size(), e.g. size(1k), fileset tries to guess the upper bound automatically (see the comment in _sizetomax()). It didn't ignore the specified unit's case, and so size("1 GB"), for example, produced this error: hg: parse error: couldn't parse size: 1 GB Let's do the same thing that util.sizetoint() does: .lower(). The two test lines without output just check that there are no parse errors.
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 08 Aug 2015 14:42:27 +0800
parents 49fb24f72747
children d3dbb65c8dc6
comparison
equal deleted inserted replaced
25911:f4386cb3252e 25925:23c4589fc678
142 $ fileset '(1k or 2k) and size(">=1K")' 142 $ fileset '(1k or 2k) and size(">=1K")'
143 1k 143 1k
144 2k 144 2k
145 $ fileset '(1k or 2k) and size(".5KB - 1.5kB")' 145 $ fileset '(1k or 2k) and size(".5KB - 1.5kB")'
146 1k 146 1k
147 $ fileset 'size("1M")'
148 $ fileset 'size("1 GB")'
147 149
148 Test merge states 150 Test merge states
149 151
150 $ hg ci -m manychanges 152 $ hg ci -m manychanges
151 $ hg up -C 0 153 $ hg up -C 0