[PATCH] obsolete: ensure all markers have a date
Pierre-Yves David
pierre-yves.david at logilab.fr
Fri Apr 12 04:54:11 CDT 2013
Gentle ping on this patch
On Thu, Mar 28, 2013 at 07:00:45PM +0100, pierre-yves.david at logilab.fr wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> # Date 1360578012 -3600
> # Mon Feb 11 11:20:12 2013 +0100
> # Node ID fc5388b69f50c5c504736151898a4da0471811f8
> # Parent a7d0ddc7540b2691f8a5af8006588a80e582754a
> obsolete: ensure all markers have a date
>
> Obsolescence creates a sparse DAG mostly composed of a lot of small independent
> chain of markers. Date is the only simple and "reliable" way to sort them. The
> existence of a date is now enforced at creation time as I'm more and more
> convinced that date will have a key role in obsolescence markers exchange.
>
> diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
> --- a/mercurial/obsolete.py
> +++ b/mercurial/obsolete.py
> @@ -248,10 +248,12 @@ class obsstore(object):
> * check mandatory metadata
> * encode metadata
> """
> if metadata is None:
> metadata = {}
> + if 'date' not in metadata:
> + metadata['date'] = "%d %d" % util.makedate()
> if len(prec) != 20:
> raise ValueError(prec)
> for succ in succs:
> if len(succ) != 20:
> raise ValueError(succ)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
--
Pierre-Yves David
http://www.logilab.fr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130412/9eaaebd6/attachment.pgp>
More information about the Mercurial-devel
mailing list