diff --git a/hgext3rd/fbamend/fold.py b/hgext3rd/fbamend/fold.py --- a/hgext3rd/fbamend/fold.py +++ b/hgext3rd/fbamend/fold.py @@ -33,7 +33,8 @@ ('', 'exact', None, _("only fold specified revisions")), ('', 'from', None, _("fold linearly to working copy parent")), ('', 'no-rebase', False, _("don't rebase descendants after split")), - ] + commands.commitopts + commands.commitopts2, + ] + (commands.commitopts + commands.commitopts2 + + commands.formatteropts), _('hg fold [OPTION]... [-r] REV')) def fold(ui, repo, *revs, **opts): """fold multiple revisions into a single one @@ -109,6 +110,8 @@ ui.write_err(_('single revision specified, nothing to fold\n')) return 1 + fm = ui.formatter('fold', opts) + fm.startitem() wlock = lock = None try: wlock = repo.wlock() @@ -140,7 +143,8 @@ replacements = {ctx.node(): (newid,) for ctx in allctx} scmutil.cleanupnodes(repo, replacements, 'fold') - ui.status(_('%i changesets folded\n') % len(revs)) + fm.condwrite(not ui.quiet, 'count', + '%i changesets folded\n', len(revs)) if repo['.'].rev() in revs: hg.update(repo, newid)