Page MenuHomePhabricator

fold: add support to get json output for node changes
ClosedPublic

Authored by pulkit on Oct 12 2017, 5:59 PM.

Details

Reviewers
durham
Group Reviewers
Restricted Project
Commits
rFBHGXbbd92224ac96: fold: add support to get json output for node changes
Summary

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.

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Oct 12 2017, 5:59 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptOct 12 2017, 5:59 PM
pulkit updated this revision to Diff 2961.Oct 17 2017, 8:14 PM
pulkit updated this revision to Diff 3140.Oct 27 2017, 6:04 PM
durham accepted this revision.Oct 31 2017, 1:07 PM
This revision is now accepted and ready to land.Oct 31 2017, 1:07 PM
This revision was automatically updated to reflect the committed changes.