summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorYang Zhao <yang.zhao@skyboxlabs.com>2019-12-13 23:52:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-01-15 20:53:40 (GMT)
commit2e2aa8d9032ccdfdecaab51c60c5bada517f60bc (patch)
tree9fc2442e8b012afdf707650ad73627eb3dd75d7c /git-p4.py
parenta6b1306735f1a6450f22f562275c994d03324672 (diff)
downloadgit-2e2aa8d9032ccdfdecaab51c60c5bada517f60bc.zip
git-2e2aa8d9032ccdfdecaab51c60c5bada517f60bc.tar.gz
git-2e2aa8d9032ccdfdecaab51c60c5bada517f60bc.tar.bz2
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>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-p4.py b/git-p4.py
index 7deee1b..b7e31d4 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -1745,7 +1745,7 @@ class P4Submit(Command, P4UserMap):
break
if not change_entry:
die('Failed to decode output of p4 change -o')
- for key, value in change_entry.iteritems():
+ for key, value in change_entry.items():
if key.startswith('File'):
if 'depot-paths' in settings:
if not [p for p in settings['depot-paths']