mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
f08e17d3ed
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
29 lines
699 B
Python
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)
|