Mercurial > public > mercurial-scm > hg
comparison contrib/synthrepo.py @ 34023:ba479850c9c7
python3: replace sorted(<dict>.iterkeys()) with sorted(<dict>)
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Tue, 22 Aug 2017 20:06:58 -0400 |
parents | 46ba2cdda476 |
children | 2123e7629ec0 |
comparison
equal
deleted
inserted
replaced
34022:d5b2beca16c0 | 34023:ba479850c9c7 |
---|---|
477 date = time.time() - (86400 * count) | 477 date = time.time() - (86400 * count) |
478 # dates in mercurial must be positive, fit in 32-bit signed integers. | 478 # dates in mercurial must be positive, fit in 32-bit signed integers. |
479 date = min(0x7fffffff, max(0, date)) | 479 date = min(0x7fffffff, max(0, date)) |
480 user = random.choice(words) + '@' + random.choice(words) | 480 user = random.choice(words) + '@' + random.choice(words) |
481 mc = context.memctx(repo, pl, makeline(minimum=2), | 481 mc = context.memctx(repo, pl, makeline(minimum=2), |
482 sorted(changes.iterkeys()), | 482 sorted(changes), |
483 filectxfn, user, '%d %d' % (date, pick(tzoffset))) | 483 filectxfn, user, '%d %d' % (date, pick(tzoffset))) |
484 newnode = mc.commit() | 484 newnode = mc.commit() |
485 heads.add(repo.changelog.rev(newnode)) | 485 heads.add(repo.changelog.rev(newnode)) |
486 heads.discard(r1) | 486 heads.discard(r1) |
487 heads.discard(r2) | 487 heads.discard(r2) |