343 nodeid = repo.commitctx(cx) |
343 nodeid = repo.commitctx(cx) |
344 nodeids.append(nodeid) |
344 nodeids.append(nodeid) |
345 at = id |
345 at = id |
346 elif type == b'l': |
346 elif type == b'l': |
347 id, name = data |
347 id, name = data |
348 ui.note((b'tag %s\n' % name)) |
348 ui.notenoi18n(b'tag %s\n' % name) |
349 tags.append(b"%s %s\n" % (hex(repo.changelog.node(id)), name)) |
349 tags.append(b"%s %s\n" % (hex(repo.changelog.node(id)), name)) |
350 elif type == b'a': |
350 elif type == b'a': |
351 ui.note((b'branch %s\n' % data)) |
351 ui.notenoi18n(b'branch %s\n' % data) |
352 atbranch = data |
352 atbranch = data |
353 progress.update(id) |
353 progress.update(id) |
354 |
354 |
355 if tags: |
355 if tags: |
356 repo.vfs.write(b"localtags", b"".join(tags)) |
356 repo.vfs.write(b"localtags", b"".join(tags)) |
440 |
440 |
441 def _debugbundle2(ui, gen, all=None, **opts): |
441 def _debugbundle2(ui, gen, all=None, **opts): |
442 """lists the contents of a bundle2""" |
442 """lists the contents of a bundle2""" |
443 if not isinstance(gen, bundle2.unbundle20): |
443 if not isinstance(gen, bundle2.unbundle20): |
444 raise error.Abort(_(b'not a bundle2 file')) |
444 raise error.Abort(_(b'not a bundle2 file')) |
445 ui.write((b'Stream params: %s\n' % _quasirepr(gen.params))) |
445 ui.writenoi18n(b'Stream params: %s\n' % _quasirepr(gen.params)) |
446 parttypes = opts.get('part_type', []) |
446 parttypes = opts.get('part_type', []) |
447 for part in gen.iterparts(): |
447 for part in gen.iterparts(): |
448 if parttypes and part.type not in parttypes: |
448 if parttypes and part.type not in parttypes: |
449 continue |
449 continue |
450 msg = b'%s -- %s (mandatory: %r)\n' |
450 msg = b'%s -- %s (mandatory: %r)\n' |
451 ui.write((msg % (part.type, _quasirepr(part.params), part.mandatory))) |
451 ui.writenoi18n( |
|
452 msg % (part.type, _quasirepr(part.params), part.mandatory) |
|
453 ) |
452 if part.type == b'changegroup': |
454 if part.type == b'changegroup': |
453 version = part.params.get(b'version', b'01') |
455 version = part.params.get(b'version', b'01') |
454 cg = changegroup.getunbundler(version, part, b'UN') |
456 cg = changegroup.getunbundler(version, part, b'UN') |
455 if not ui.quiet: |
457 if not ui.quiet: |
456 _debugchangegroup(ui, cg, all=all, indent=4, **opts) |
458 _debugchangegroup(ui, cg, all=all, indent=4, **opts) |