sapling/hgext3rd/dialect.py
Jun Wu f08e17d3ed testedwith: change testedwith to "ships-with-fb-hgext"
Summary:
Using `testedwith = 'internal'` is not a good habit [1]. Having it
auto-updated in batch would also introduce a lot of churn. This diff makes
them "ships-with-fb-hgext". If we do want to fill the ideal "testedwith"
information, we could put it in a centric place, like a "fbtestedwith"
extension rewriting those "ships-with-fb-hgext" on the fly.

Maybe having in-repo tags for tested Mercurial releases is also a good idea.

[1]: www.mercurial-scm.org/repo/hg/rev/2af1014c2534

Test Plan: `arc lint`

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4244689

Signature: t1:4244689:1480440027:3dc18d017b48beba1176fbfd120351889259eb4b
2016-11-29 13:24:07 +00:00

29 lines
699 B
Python

# dialect.py
#
# Copyright 2016 Facebook, Inc.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
"""replace terms with more widely used equivalents
With this extension enabled, some terms will be replaced by their more
well-known equivalents. Namely, "changeset" will be replaced by "commit".
"""
testedwith = 'ships-with-fb-hgext'
from mercurial import (
extensions,
i18n,
)
def _ugettext(orig, message):
if orig:
message = orig(message)
message = message.replace('changeset', 'commit')
return message
def uisetup(ui):
extensions.wrapfunction(i18n, '_ugettext', _ugettext)