mirror of
https://github.com/facebook/sapling.git
synced 2025-01-07 14:10:42 +03:00
python3: replace sorted(<dict>.iterkeys()) with sorted(<dict>)
This commit is contained in:
parent
e2774d9258
commit
48dbe73629
@ -479,7 +479,7 @@ def synthesize(ui, repo, descpath, **opts):
|
||||
date = min(0x7fffffff, max(0, date))
|
||||
user = random.choice(words) + '@' + random.choice(words)
|
||||
mc = context.memctx(repo, pl, makeline(minimum=2),
|
||||
sorted(changes.iterkeys()),
|
||||
sorted(changes),
|
||||
filectxfn, user, '%d %d' % (date, pick(tzoffset)))
|
||||
newnode = mc.commit()
|
||||
heads.add(repo.changelog.rev(newnode))
|
||||
|
@ -31,7 +31,7 @@ def parsemeta(text):
|
||||
return meta, (s + 2)
|
||||
|
||||
def packmeta(meta, text):
|
||||
keys = sorted(meta.iterkeys())
|
||||
keys = sorted(meta)
|
||||
metatext = "".join("%s: %s\n" % (k, meta[k]) for k in keys)
|
||||
return "\1\n%s\1\n%s" % (metatext, text)
|
||||
|
||||
|
@ -25,7 +25,7 @@ def writeauth(items):
|
||||
|
||||
def dumpdict(dict):
|
||||
return '{' + ', '.join(['%s: %s' % (k, dict[k])
|
||||
for k in sorted(dict.iterkeys())]) + '}'
|
||||
for k in sorted(dict)]) + '}'
|
||||
|
||||
def test(auth, urls=None):
|
||||
print('CFG:', dumpdict(auth))
|
||||
|
Loading…
Reference in New Issue
Block a user