Page MenuHomePhabricator

rebase: add support to output nodechanges

Authored by pulkit on Oct 17 2017, 7:12 PM.



This patch adds support to rebase to show the changes in node once the rebase is
complete. This will be extremely helpful for automation purposes and editors
such as Nuclide.

The output is a dictionary of predecessor hash as key and a list of successors'
hashes. The successors one is a list as there can be many successors for a single
predecessor in case of split and it will good to have a generic output format.

This patch adds tests for the same. A new file is created for the patch as
existing files related to rebase has their own purpose and there will be more
formatter support coming for rebase in next cycle.

Thanks to Jun for suggesting to use

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Oct 17 2017, 7:12 PM
dlax edited the summary of this revision. (Show Details)Oct 18 2017, 3:00 AM
dlax accepted this revision.
dlax added a subscriber: dlax.

Looks good to me, much nicer than the previous version.

Much improved, thanks.

durin42 accepted this revision.Oct 18 2017, 4:08 PM
This revision is now accepted and ready to land.Oct 18 2017, 4:08 PM
This revision was automatically updated to reflect the committed changes.
yuja added a subscriber: yuja.Oct 19 2017, 11:02 AM
yuja added inline comments.

I'm surprised that the rebase command does have -T and --style
options from the very start. No idea how they would work, though.


fm.hexfunc() could be used.


Needs to wrap dict/list by fm.formatdict()/fm.formatlist()
to support -T "{user template}".

Can you send a follow up after 4.4 release?

pulkit added inline comments.Oct 19 2017, 2:46 PM

I am also surprised by this.


Yeah sure. I will.