Patchwork D7745: polib: drop an unused local function

login
register
mail settings
Submitter phabricator
Date Dec. 27, 2019, 10:02 p.m.
Message ID <07f4a2288d1c626488b8e888feb88e46@localhost.localdomain>
Download mbox | patch
Permalink /patch/44089/
State Not Applicable
Headers show

Comments

phabricator - Dec. 27, 2019, 10:02 p.m.
Closed by commit rHG04e0e0e73892: polib: drop an unused local function (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7745?vs=18961&id=18976

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7745/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7745

AFFECTED FILES
  i18n/polib.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-devel

Patch

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()