obsstore: drop 'date' from the metadata dictionary
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 18 Aug 2014 17:06:08 -0700
changeset 22257 4bc96685a40c
parent 22256 3ae6cc6173e3
child 22258 cf414981978a
obsstore: drop 'date' from the metadata dictionary We are extracting the `date` information from the metadata at read time. However, we failed to remove it from the metadata returned in the markers. This is now fixed.
mercurial/obsolete.py
--- a/mercurial/obsolete.py	Mon Aug 18 16:17:16 2014 -0700
+++ b/mercurial/obsolete.py	Mon Aug 18 17:06:08 2014 -0700
@@ -168,10 +168,12 @@
                                'short, %d bytes expected, got %d')
                              % (mdsize, len(metadata)))
         off += mdsize
+        meta = decodemeta(metadata)
         try:
             date = util.parsedate(decodemeta(metadata).pop('date', '0 0'))
         except util.Abort:
             date = (0., 0)
+        metadata = encodemeta(meta)
 
         yield (pre, sucs, flags, metadata, date, None)