comparison mercurial/obsolete.py @ 40081:a4d62ff9a86d

obsolete: fix ValueError when stored note contains ':' char (issue5783) The newer version of `amend -n 'Some some'` accepts containing ':' char. The information contained in this note 'Testing::Obstore' gives ValueError, because we are trying to store more than 2 values in key and value. Differential Revision: https://phab.mercurial-scm.org/D4883 Differential Revision: https://phab.mercurial-scm.org/D4882
author Zharaskhan Aman <aman.zharaskhan@gmail.com>
date Fri, 05 Oct 2018 01:55:51 +0300
parents 208303a8172c
children fee616937ef3
comparison
equal deleted inserted replaced
40080:56d4f88530fc 40081:a4d62ff9a86d
276 def _fm0decodemeta(data): 276 def _fm0decodemeta(data):
277 """Return string to string dictionary from encoded version.""" 277 """Return string to string dictionary from encoded version."""
278 d = {} 278 d = {}
279 for l in data.split('\0'): 279 for l in data.split('\0'):
280 if l: 280 if l:
281 key, value = l.split(':') 281 key, value = l.split(':', 1)
282 d[key] = value 282 d[key] = value
283 return d 283 return d
284 284
285 ## Parsing and writing of version "1" 285 ## Parsing and writing of version "1"
286 # 286 #