D7745: polib: drop an unused local function
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Fri Dec 27 21:17:59 UTC 2019
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Caught by PyCharm.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D7745
AFFECTED FILES
i18n/polib.py
CHANGE DETAILS
diff --git a/i18n/polib.py b/i18n/polib.py
--- a/i18n/polib.py
+++ b/i18n/polib.py
@@ -551,18 +551,6 @@
offsets = []
entries = self.translated_entries()
- # the keys are sorted in the .mo file
- def cmp(_self, other):
- # msgfmt compares entries with msgctxt if it exists
- self_msgid = _self.msgctxt and _self.msgctxt or _self.msgid
- other_msgid = other.msgctxt and other.msgctxt or other.msgid
- if self_msgid > other_msgid:
- return 1
- elif self_msgid < other_msgid:
- return -1
- else:
- return 0
-
# add metadata entry
entries.sort(key=lambda o: o.msgctxt or o.msgid)
mentry = self.metadata_as_entry()
To: mharbison72, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list