quark added a comment.
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. INLINE COMMENTS > rebase.py:556 > + fm = None > + if repo.ui.configbool('experimental', 'showhashchanges'): > + fm = repo.ui.formatter('rebase', opts) I think it's unnecessary to have a config option - there is no behavior change if users use rebase as before. > rebase.py:560 > clearrebased(ui, repo, self.destmap, self.state, self.skipped, > - collapsedas, self.keepf) > + collapsedas, self.keepf, fm=fm) > + 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. > test-rebase-base.t:418 > > +Enabling obsolete markers > + The `-base.t` test was intended for testing `--base` flag. We probably want a new `.t` file like `test-rebase-templates.t`. > test-rebase-base.t:462 > + $ hg rebase -s 8 -d 2 -T '{hashchanges|json}' -q > + {"38bd5f90ba6a": ["28cb79571ec7"], "583565ab89ac": ["89a178738706"]} > (no-eol) > + For JSON output, it's usually for automation and better to use full hashes. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D934 To: pulkit, #hg-reviewers Cc: quark, dlax, durin42, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel