# HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1603966314 -3600 # Node ID bea8cf87bef3c40abd194dff37fc8d4584169a9a # Parent 0599c83cdf5ccf66d9174b80d4e8f36db3334e09 py3: hggettext `itervalues()` is only available on Python 2. Since this script doesn't currently refer to the main Mercurial modules, and as a result doesn't have easy access to the `pycompat` module, I simply changed it to use `value()` instead. Although this allocates a list on Python 2, I'd consider that acceptable for a utility script; Mercurial doesn't have all _that_ many commands anyway. Differential Revision: https://phab.mercurial-scm.org/D9259 diff -r 0599c83cdf5c -r bea8cf87bef3 i18n/hggettext --- a/i18n/hggettext Thu Oct 29 11:37:22 2020 -0700 +++ b/i18n/hggettext Thu Oct 29 11:11:54 2020 +0100 @@ -123,7 +123,7 @@ if not cmdtable: # Maybe we are processing mercurial.commands? cmdtable = getattr(mod, 'table', {}) - functions.extend((c[0], False) for c in cmdtable.itervalues()) + functions.extend((c[0], False) for c in cmdtable.values()) for func, rstrip in functions: if func.__doc__: