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.
--- a/mercurial/obsolete.py Mon Apr 08 16:51:38 2013 +0400
+++ b/mercurial/obsolete.py Mon Feb 11 11:20:12 2013 +0100
@@ -250,6 +250,8 @@
"""
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: