Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

thgconfig: change utf-8 '<unspecified>' to local encoded one

This fix will prevent to write out all unspecified values
to Mercurial.ini file.

Changeset b2f9f62dd17e

Parent 98be5bcd15df

by Yuki KODAMA

Changes to one file · Browse files at b2f9f62dd17e Showing diff from parent 98be5bcd15df Diff from another changeset...

 
19
20
21
 
22
23
24
 
916
917
918
 
919
920
 
921
922
923
 
19
20
21
22
23
24
25
 
917
918
919
920
921
 
922
923
924
925
@@ -19,6 +19,7 @@
 from hggtk import dialog, gdialog, gtklib, hgcmd    _unspecstr = _('<unspecified>') +_unspeclocalstr = hglib.fromutf(_unspecstr)    _pwfields = ('http_proxy.passwd', 'smtp.password')   @@ -916,8 +917,9 @@
  return iniparse.INIConfig(file(fn), optionxformvalue=None)     def record_new_value(self, cpath, newvalue, keephistory=True): + # 'newvalue' is converted to local encoding   section, key = cpath.split('.', 1) - if newvalue == _unspecstr or newvalue == '': + if newvalue == _unspeclocalstr or newvalue == '':   try:   del self.ini[section][key]   except KeyError: