This is an archive of the discontinued Mercurial Phabricator instance.

help: describe what ui.tweakdefaults changes, concretely
ClosedPublic

Authored by valentin.gatienbaron on Oct 23 2018, 3:28 PM.

Details

Summary

Currently, one has to look at the code.

A couple things are suboptimal:

  • probably not translatable
  • lines don't get wrapped (a couple are a bit too long)

but it seems to better this way than without help at all.

Diff Detail

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

Event Timeline

yuja added a subscriber: yuja.Oct 24 2018, 7:45 AM

+ ui,

Nit: ui as uimod per test-check-code.t.

@@ -436,6 +437,11 @@
addtopicsymbols('templates', '.. functionsmarker', templatefuncs.funcs)
addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands,

dedent=True)

+def docplaceholder():
+ pass
+docplaceholder.doc = ui.tweakrc
+addtopicsymbols('config', '.. tweakdefaultsmarker', {'': docplaceholder},
+ dedent=True)

Alternatively, we can register a dedicated loader by addtopichook(). Only
thing we'll have to do is to replace a placeholder with indented tweakrc.

valentin.gatienbaron edited the summary of this revision. (Show Details)Oct 24 2018, 11:01 AM
valentin.gatienbaron updated this revision to Diff 12340.

I actually ran the tests, but didn't see the style error, because the test in question is among the several ones that never pass for me. Fixed now.

yuja added a comment.Oct 25 2018, 7:35 AM

Looks good and simple. Queued for stable, thanks.

This revision was automatically updated to reflect the committed changes.