Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 36161:8eb13f5d5d3f
py3: convert context to bytes instead of str
This yields identical behavior on Python 2 and 3.
Differential Revision: https://phab.mercurial-scm.org/D2174
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 11 Feb 2018 19:26:53 -0800 |
parents | 5f029d03cf71 |
children | 72d155a792b1 |
comparison
equal
deleted
inserted
replaced
36160:7db243288afb | 36161:8eb13f5d5d3f |
---|---|
2354 holds one element, whereas the second holds three (i.e. the changeset has | 2354 holds one element, whereas the second holds three (i.e. the changeset has |
2355 been split). | 2355 been split). |
2356 """ | 2356 """ |
2357 # passed to successorssets caching computation from one call to another | 2357 # passed to successorssets caching computation from one call to another |
2358 cache = {} | 2358 cache = {} |
2359 ctx2str = str | 2359 ctx2str = bytes |
2360 node2str = short | 2360 node2str = short |
2361 for rev in scmutil.revrange(repo, revs): | 2361 for rev in scmutil.revrange(repo, revs): |
2362 ctx = repo[rev] | 2362 ctx = repo[rev] |
2363 ui.write('%s\n'% ctx2str(ctx)) | 2363 ui.write('%s\n'% ctx2str(ctx)) |
2364 for succsset in obsutil.successorssets(repo, ctx.node(), | 2364 for succsset in obsutil.successorssets(repo, ctx.node(), |