Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 50974:7ef74fc79900
debugrename: migrate `opts` to native kwargs
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 21 Aug 2023 17:34:13 -0400 |
parents | a0fcdcc53618 |
children | 8f25df137282 |
comparison
equal
deleted
inserted
replaced
50973:a0fcdcc53618 | 50974:7ef74fc79900 |
---|---|
3181 _(b'[-r REV] [FILE]...'), | 3181 _(b'[-r REV] [FILE]...'), |
3182 ) | 3182 ) |
3183 def debugrename(ui, repo, *pats, **opts): | 3183 def debugrename(ui, repo, *pats, **opts): |
3184 """dump rename information""" | 3184 """dump rename information""" |
3185 | 3185 |
3186 opts = pycompat.byteskwargs(opts) | 3186 ctx = scmutil.revsingle(repo, opts.get('rev')) |
3187 ctx = scmutil.revsingle(repo, opts.get(b'rev')) | 3187 m = scmutil.match(ctx, pats, pycompat.byteskwargs(opts)) |
3188 m = scmutil.match(ctx, pats, opts) | |
3189 for abs in ctx.walk(m): | 3188 for abs in ctx.walk(m): |
3190 fctx = ctx[abs] | 3189 fctx = ctx[abs] |
3191 o = fctx.filelog().renamed(fctx.filenode()) | 3190 o = fctx.filelog().renamed(fctx.filenode()) |
3192 rel = repo.pathto(abs) | 3191 rel = repo.pathto(abs) |
3193 if o: | 3192 if o: |