mercurial/scmutil.py
changeset 48031 5b89626c11e9
parent 48030 7d908ee19b5b
child 48041 37a41267d000
equal deleted inserted replaced
48030:7d908ee19b5b 48031:5b89626c11e9
  1209     m = matcher
  1209     m = matcher
  1210     dry_run = opts.get(b'dry_run')
  1210     dry_run = opts.get(b'dry_run')
  1211     try:
  1211     try:
  1212         similarity = float(opts.get(b'similarity') or 0)
  1212         similarity = float(opts.get(b'similarity') or 0)
  1213     except ValueError:
  1213     except ValueError:
  1214         raise error.Abort(_(b'similarity must be a number'))
  1214         raise error.InputError(_(b'similarity must be a number'))
  1215     if similarity < 0 or similarity > 100:
  1215     if similarity < 0 or similarity > 100:
  1216         raise error.Abort(_(b'similarity must be between 0 and 100'))
  1216         raise error.InputError(_(b'similarity must be between 0 and 100'))
  1217     similarity /= 100.0
  1217     similarity /= 100.0
  1218 
  1218 
  1219     ret = 0
  1219     ret = 0
  1220 
  1220 
  1221     wctx = repo[None]
  1221     wctx = repo[None]