diff 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
line wrap: on
line diff
--- a/mercurial/obsolete.py	Fri Oct 05 16:06:51 2018 -0700
+++ b/mercurial/obsolete.py	Fri Oct 05 01:55:51 2018 +0300
@@ -278,7 +278,7 @@
     d = {}
     for l in data.split('\0'):
         if l:
-            key, value = l.split(':')
+            key, value = l.split(':', 1)
             d[key] = value
     return d