( )⚙ D1722 githelp: vendor Facebook authored extension

This is an archive of the discontinued Mercurial Phabricator instance.

githelp: vendor Facebook authored extension
ClosedPublic

Authored by indygreg on Dec 19 2017, 12:36 AM.

Details

Summary

This commit vendors the Facebook-authored "githelp" extension. This
extension provides a "githelp" command that can be used to try to
convert a git command to its Mercurial equivalent. This functionality
is useful for Git users learning Mercurial.

The extension was copied from the
repository at revision 32ceeccb832c433b36e9af8196814b8e5a526775. The
following modifications were made:

  • The "testedwith" value has been changed to match core's conventions.
  • Support for a custom footer has been removed, as it is Facebook specific. The feature is useful. But the implementation wasn't appropriate for core.
  • A test referencing "tweakdefaults" has been removed.
  • Imports changed to match Mercurial's style convention.
  • Double newlines in test removed.
  • Pager activation changed to ui.pager().
  • Initial line of githelp.py changed to add description of file.

The removal of the custom footer code was the only significant
source change. The rest were mostly cosmetic.

There are still some Facebook-isms in the extension. I'll address
these as follow-ups.

.. feature:: githelp extension

The "githelp" extension provides the ``hg githelp`` command. This
command attempts to convert a ``git`` command to its Mercurial
equivalent. The extension can be useful to Git users new to
Mercurial.

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

indygreg created this revision.Dec 19 2017, 12:36 AM
durin42 accepted this revision.Dec 20 2017, 8:41 PM
This revision is now accepted and ready to land.Dec 20 2017, 8:41 PM
pulkit accepted this revision.Dec 28 2017, 3:55 PM
This revision was automatically updated to reflect the committed changes.