@matheusbsbs / matheus-bagliano / commits / 2e2aa8d903
Fork 0

git-p4: use dict.items() iteration for python3 compatibility

Python3 uses dict.items() instead of .iteritems() to provide iteratoration over dict. Although items() is technically less efficient for python2.7 (allocates a new list instead of simply iterating), the amount of data involved is very small and the penalty negligible. Signed-off-by: Yang Zhao <yang.zhao@skyboxlabs.com> Reviewed-by: Ben Keene <seraphire@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Yang Zhao committed Dec 13, 2019 at 15:52 UTC 2e2aa8d9032ccdfdecaab51c60c5bada517f60bc
1 file changed +1 -1
git-p4.py
+1 -1
@@ -1745,7 +1745,7 @@ class P4Submit(Command, P4UserMap):
1745 break
1746 if not change_entry:
1747 die('Failed to decode output of p4 change -o')
1748 - for key, value in change_entry.iteritems():
1748 + for key, value in change_entry.items():
1749 if key.startswith('File'):
1750 if 'depot-paths' in settings:
1751 if not [p for p in settings['depot-paths']