Details
Details
- Reviewers
durin42 - Group Reviewers
hg-reviewers - Commits
- rHG9ff5cbfbc26a: py3: fix more keyword arguments handling
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
durin42 |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | hgext/lfs/__init__.py (2 lines) | |||
M | hgext/narrow/narrowcommands.py (4 lines) | |||
M | mercurial/templatekw.py (2 lines) |
# TODO: make the separator ', '? | # TODO: make the separator ', '? | ||||
f = templatekw._showlist('lfs_file', files, args) | f = templatekw._showlist('lfs_file', files, args) | ||||
return templatekw._hybrid(f, files, makemap, pycompat.identity) | return templatekw._hybrid(f, files, makemap, pycompat.identity) | ||||
@command('debuglfsupload', | @command('debuglfsupload', | ||||
[('r', 'rev', [], _('upload large files introduced by REV'))]) | [('r', 'rev', [], _('upload large files introduced by REV'))]) | ||||
def debuglfsupload(ui, repo, **opts): | def debuglfsupload(ui, repo, **opts): | ||||
"""upload lfs blobs added by the working copy parent or given revisions""" | """upload lfs blobs added by the working copy parent or given revisions""" | ||||
revs = opts.get('rev', []) | revs = opts.get(r'rev', []) | ||||
pointers = wrapper.extractpointers(repo, scmutil.revrange(repo, revs)) | pointers = wrapper.extractpointers(repo, scmutil.revrange(repo, revs)) | ||||
wrapper.uploadblobs(repo, pointers) | wrapper.uploadblobs(repo, pointers) |
def pullnarrowcmd(orig, ui, repo, *args, **opts): | def pullnarrowcmd(orig, ui, repo, *args, **opts): | ||||
"""Wraps pull command to allow modifying narrow spec.""" | """Wraps pull command to allow modifying narrow spec.""" | ||||
wrappedextraprepare = util.nullcontextmanager() | wrappedextraprepare = util.nullcontextmanager() | ||||
if narrowrepo.REQUIREMENT in repo.requirements: | if narrowrepo.REQUIREMENT in repo.requirements: | ||||
def pullbundle2extraprepare_widen(orig, pullop, kwargs): | def pullbundle2extraprepare_widen(orig, pullop, kwargs): | ||||
orig(pullop, kwargs) | orig(pullop, kwargs) | ||||
if opts.get('depth'): | if opts.get(r'depth'): | ||||
kwargs['depth'] = opts['depth'] | kwargs['depth'] = opts[r'depth'] | ||||
wrappedextraprepare = extensions.wrappedfunction(exchange, | wrappedextraprepare = extensions.wrappedfunction(exchange, | ||||
'_pullbundle2extraprepare', pullbundle2extraprepare_widen) | '_pullbundle2extraprepare', pullbundle2extraprepare_widen) | ||||
with wrappedextraprepare: | with wrappedextraprepare: | ||||
return orig(ui, repo, *args, **opts) | return orig(ui, repo, *args, **opts) | ||||
def archivenarrowcmd(orig, ui, repo, *args, **opts): | def archivenarrowcmd(orig, ui, repo, *args, **opts): | ||||
"""Wraps archive command to narrow the default includes.""" | """Wraps archive command to narrow the default includes.""" |
hexparents = None | hexparents = None | ||||
if m[5] is not None: | if m[5] is not None: | ||||
hexparents = tuple(hex(n) for n in m[5]) | hexparents = tuple(hex(n) for n in m[5]) | ||||
newmarker = (hexprec, hexsucs) + m[2:5] + (hexparents,) + m[6:] | newmarker = (hexprec, hexsucs) + m[2:5] + (hexparents,) + m[6:] | ||||
finalmarkers.append(newmarker) | finalmarkers.append(newmarker) | ||||
data.append({'successors': successors, 'markers': finalmarkers}) | data.append({'successors': successors, 'markers': finalmarkers}) | ||||
f = _showlist('succsandmarkers', data, args) | f = _showlist('succsandmarkers', data, pycompat.byteskwargs(args)) | ||||
return _hybrid(f, data, lambda x: x, pycompat.identity) | return _hybrid(f, data, lambda x: x, pycompat.identity) | ||||
@templatekeyword('p1rev') | @templatekeyword('p1rev') | ||||
def showp1rev(repo, ctx, templ, **args): | def showp1rev(repo, ctx, templ, **args): | ||||
"""Integer. The repository-local revision number of the changeset's | """Integer. The repository-local revision number of the changeset's | ||||
first parent, or -1 if the changeset has no parents.""" | first parent, or -1 if the changeset has no parents.""" | ||||
return ctx.p1().rev() | return ctx.p1().rev() | ||||