diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -685,6 +685,18 @@ if tostrip: repair.delayedstrip(repo.ui, repo, tostrip, operation) +def showchanges(replacements, fm): + """ output the hash changes using formatter instance which is passed. + """ + nodesdict = {} + for pred, succs in replacements.iteritems(): + succlist = [] + for succ in succs: + succlist.append(short(succ)) + nodesdict[short(pred)] = succlist + fm.write('hashchanges', '%s\n', + fm.formatdict(nodesdict, fmt='%r --> %r', sep='\n')) + def addremove(repo, matcher, prefix, opts=None, dry_run=None, similarity=None): if opts is None: opts = {}