Mercurial > hg-stable
changeset 22394:813c6855b97f
obsolete: properly drop 'date' from metadata
Mistakes were made while resolving rebase conflicts in 4bc96685a40c. This led to
'date' being preserved in metadata when reading markers from a binary stream.
As a result, some known markers were seen as "new" when pulling. I noticed it
because a no-op pulls from main added about 600 duplicated markers to my
obsstore (for each pull).
I do not believe we need to perform any specific action to actively
de-duplicates existing obsstore. After this fix, duplicated markers will no be
propagated and the few affected repositories can probably deal with duplication (or
people can repull the obsstore from a clone).
As a side effect, we decode metadata only once, reducing the impact of the hack
in fm0 to store extra important data (parents and date).
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 10 Sep 2014 14:42:52 +0100 |
parents | 293930a1fa0a |
children | 67588e47522a |
files | mercurial/obsolete.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/obsolete.py Mon Sep 08 20:12:58 2014 +0900 +++ b/mercurial/obsolete.py Wed Sep 10 14:42:52 2014 +0100 @@ -181,7 +181,7 @@ off += mdsize meta = decodemeta(metadata) try: - when, offset = decodemeta(metadata).pop('date', '0 0').split(' ') + when, offset = meta.pop('date', '0 0').split(' ') date = float(when), int(offset) except ValueError: date = (0., 0)