( )⚙ D834 hg update hint

This is an archive of the discontinued Mercurial Phabricator instance.

hg update hint
ClosedPublic

Authored by diegocr on Sep 28 2017, 11:46 AM.
Tags
None
Subscribers

Details

Reviewers
quark
Group Reviewers
Restricted Project
Commits
rFBHGX6d8c66ee1cf5: hg update hint

Diff Detail

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

Event Timeline

diegocr created this revision.Sep 28 2017, 11:46 AM
Herald added a reviewer: Restricted Project. · View Herald TranscriptSep 28 2017, 11:46 AM
quark added a subscriber: quark.Sep 28 2017, 12:42 PM
quark added inline comments.
hgext3rd/tweakdefaults.py
439

ui.note is better. ui.warn may use a different color (ex. red) if the user has configured it.

440

hg usually uses hint for this kind of tips. Maybe reuse that word:

ui.warn(_('(hint: use `hg prev` to move to the parent changeset)\n'))
quark added inline comments.Sep 28 2017, 12:45 PM
hgext3rd/tweakdefaults.py
440

Actually, ui.write() seems the best choice here.

diegocr retitled this revision from hg update tip to hg update hint.Sep 28 2017, 12:57 PM
diegocr updated this revision to Diff 2147.

Personally I think I'd prefer ui.status since that doesn't print out in quiet mode. I'm not familiar with how ui.write interacts with quiet mode.

Ideally the string would have i18n as well

quark accepted this revision.Sep 28 2017, 1:49 PM

I wonder if we should hide the hint if the user runs prev at least one time. But that is probably another diff. I think this kind of UX improvement probably needs a general purposed "framework". We might even need to sync "whether a hint should be hidden" information with the cloud for a given unixname.

hgext3rd/tweakdefaults.py
439

@ryanmce is right. Let's change it to:

ui.status(_("(hint: use 'hg prev' to move to the parent changeset)\n"))

before landing.

This revision is now accepted and ready to land.Sep 28 2017, 1:49 PM

Since we don't have that generalized framework yet, probably we should have this config gated for now?

Thanks for the comments, I will change it to ui.status(_("(hint: use 'hg prev' to move to the parent changeset)\n")) and land it

quark added a comment.Sep 28 2017, 2:57 PM
In D834#14114, @ryanmce wrote:

Since we don't have that generalized framework yet, probably we should have this config gated for now?

Sounds good to me. It could be a follow-up.

This revision was automatically updated to reflect the committed changes.