HomePhabricator

fold: add support to get json output for node changes

Authored by pulkit.

Description

fold: add support to get json output for node changes

This patch adds support to fold for outputting node changes as a part of it's
json output.

The nodechanges is a dictionary having predecessor as key and list of successors
as value. The successor is a list as we can have multiple successor for a
predecessor in case of split and having a generic format will be helpful.

After this patch, if you want json output from fold, do

`hg fold ..args.. -Tjson -q`

To just get the dictionary of hash changes, do

`hg fold ..args.. -T '{nodechanges|json}' -q`

-q is required to prevent the ui.status output coming from hg.update and rebase
part.

Since we have added support to fold for nodechanges, it has been added to
blacklist for cleanupnodes wrapper in tweakdefaults.

Differential Revision: https://phab.mercurial-scm.org/D1041

Details

Committed
pulkitOct 31 2017, 4:22 PM
Differential Revision
D1041: fold: add support to get json output for node changes
Parents
rFBHGX2b1e066479ba: fold: start using formatter to print output
Branches
Unknown
Tags
Unknown