Mercurial > public > mercurial-scm > hg
comparison mercurial/debugcommands.py @ 50953:0cf89b099d42
debugknown: migrate `opts` to native kwargs
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 21 Aug 2023 17:20:14 -0400 |
parents | 45a53fc82ab2 |
children | 81801dc55819 |
comparison
equal
deleted
inserted
replaced
50952:45a53fc82ab2 | 50953:0cf89b099d42 |
---|---|
2253 """test whether node ids are known to a repo | 2253 """test whether node ids are known to a repo |
2254 | 2254 |
2255 Every ID must be a full-length hex node id string. Returns a list of 0s | 2255 Every ID must be a full-length hex node id string. Returns a list of 0s |
2256 and 1s indicating unknown/known. | 2256 and 1s indicating unknown/known. |
2257 """ | 2257 """ |
2258 opts = pycompat.byteskwargs(opts) | 2258 repo = hg.peer(ui, pycompat.byteskwargs(opts), repopath) |
2259 repo = hg.peer(ui, opts, repopath) | |
2260 if not repo.capable(b'known'): | 2259 if not repo.capable(b'known'): |
2261 raise error.Abort(b"known() not supported by target repository") | 2260 raise error.Abort(b"known() not supported by target repository") |
2262 flags = repo.known([bin(s) for s in ids]) | 2261 flags = repo.known([bin(s) for s in ids]) |
2263 ui.write(b"%s\n" % (b"".join([f and b"1" or b"0" for f in flags]))) | 2262 ui.write(b"%s\n" % (b"".join([f and b"1" or b"0" for f in flags]))) |
2264 | 2263 |