This patch adds an experimental config, which if turned on will show hash
changes after a rebase. Support will be added to more commands which changes
hash.
This patch also adds test demonstrating the hash change output.
hg-reviewers |
This patch adds an experimental config, which if turned on will show hash
changes after a rebase. Support will be added to more commands which changes
hash.
This patch also adds test demonstrating the hash change output.
Lint Skipped |
Unit Tests Skipped |
Could you please put that in the commit message?
I wonder if we could make this stuff that was just --verbose output for rebase, and always put it in the json output (-Tjson) via the formatter, and not require a config. What do you think of taht approach?
I'm trying to write a version that decouples the rendering logic from the data. But it's trickier than I thought (ex. issue5699). I guess some refactoring needs to be done. Meanwhile I think it would be good enough if you can avoid passing fm around.
hgext/rebase.py | ||
---|---|---|
556 | I think it's unnecessary to have a config option - there is no behavior change if users use rebase as before. | |
560 | Instead of passing fm around, it would be cleaner if the content could be generated, like: # "fm" is not passed elsewhere with ui.formatter('rebase', opts) as fm: fm.startitem() fm.data(nodechanges=calculatenodechanges(mapping)) (node seems to be more consistent with existing terms than hash) But this might be difficult without the args templatekeywords context. | |
tests/test-rebase-base.t | ||
418 | The -base.t test was intended for testing --base flag. We probably want a new .t file like test-rebase-templates.t. | |
462 | For JSON output, it's usually for automation and better to use full hashes. |
I like the approach but I have followed Jun's one as that was easy and no UI change. :)
I think it's unnecessary to have a config option - there is no behavior change if users use rebase as before.