[PATCH urgent regression on default] obsolete: properly drop 'date' from metadata
Augie Fackler
raf at durin42.com
Wed Sep 10 14:05:32 CDT 2014
On Wed, Sep 10, 2014 at 08:42:15PM +0200, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1410356572 -3600
> # Wed Sep 10 14:42:52 2014 +0100
> # Node ID d7fe9bd4963686841465595b8065afeae633aa92
> # Parent 293930a1fa0a52d9bef832e72ef4c505b74e0c64
> obsolete: properly drop 'date' from metadata
Queued, thanks.
>
> Mistakes were made while resolving rebase conflict in 4bc96685a40c. This lead to
> 'date' being preserved in metadata when reading marker 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 fewaffected repo 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).
>
> diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
> --- a/mercurial/obsolete.py
> +++ b/mercurial/obsolete.py
> @@ -179,11 +179,11 @@ def _fm0readmarkers(data, off=0):
> 'short, %d bytes expected, got %d')
> % (mdsize, len(metadata)))
> 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)
> parents = None
> if 'p2' in meta:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list