mercurial/fancyopts.py
changeset 45856 2eb8ad899fa6
parent 44470 9d2b2df2c2ba
child 46819 d4ba4d51f85f
equal deleted inserted replaced
45855:de1f4c431619 45856:2eb8ad899fa6
   378         if obj._isboolopt():
   378         if obj._isboolopt():
   379             state[name] = boolval
   379             state[name] = boolval
   380         else:
   380         else:
   381 
   381 
   382             def abort(s):
   382             def abort(s):
   383                 raise error.Abort(
   383                 raise error.InputError(
   384                     _(b'invalid value %r for option %s, %s')
   384                     _(b'invalid value %r for option %s, %s')
   385                     % (pycompat.maybebytestr(val), opt, s)
   385                     % (pycompat.maybebytestr(val), opt, s)
   386                 )
   386                 )
   387 
   387 
   388             state[name] = defmap[name].newstate(state[name], val, abort)
   388             state[name] = defmap[name].newstate(state[name], val, abort)