# HG changeset patch # User Mike Edgar # Date 1413827953 14400 # Node ID 944d6cfbe1668e7c303182004bbb80fd774d5c05 # Parent c1f370dab456772052c0ada1dda44a7585824662 synthrepo: synthesized dates must be positive, fit in 32-bit signed ints diff -r c1f370dab456 -r 944d6cfbe166 contrib/synthrepo.py --- a/contrib/synthrepo.py Thu Nov 06 01:48:29 2014 +0100 +++ b/contrib/synthrepo.py Mon Oct 20 13:59:13 2014 -0400 @@ -428,6 +428,8 @@ date = repo['tip'].date()[0] + pick(interarrival) else: date = time.time() - (86400 * count) + # dates in mercurial must be positive, fit in 32-bit signed integers. + date = min(0x7fffffff, max(0, date)) user = random.choice(words) + '@' + random.choice(words) mc = context.memctx(repo, pl, makeline(minimum=2), sorted(changes.iterkeys()),