mercurial/ui.py
changeset 30932 f61c5680a862
parent 30927 8fa3ab6221b9
child 30945 8b83b626fb1e
equal deleted inserted replaced
30931:f2ad0d804700 30932:f61c5680a862
   408 
   408 
   409         >>> u = ui(); s = 'foo'
   409         >>> u = ui(); s = 'foo'
   410         >>> u.setconfig(s, 'float1', '42')
   410         >>> u.setconfig(s, 'float1', '42')
   411         >>> u.configwith(float, s, 'float1')
   411         >>> u.configwith(float, s, 'float1')
   412         42.0
   412         42.0
   413         >>> u.setconfig(s, 'float2', '-4.2')
   413         >>> u.setconfig(s, 'float2', '-4.25')
   414         >>> u.configwith(float, s, 'float2')
   414         >>> u.configwith(float, s, 'float2')
   415         -4.2
   415         -4.25
   416         >>> u.configwith(float, s, 'unknown', 7)
   416         >>> u.configwith(float, s, 'unknown', 7)
   417         7
   417         7
   418         >>> u.setconfig(s, 'invalid', 'somevalue')
   418         >>> u.setconfig(s, 'invalid', 'somevalue')
   419         >>> u.configwith(float, s, 'invalid')
   419         >>> u.configwith(float, s, 'invalid')
   420         Traceback (most recent call last):
   420         Traceback (most recent call last):