From: Reece H. Dunn Date: Mon, 13 Aug 2007 18:40:50 +0000 (+0100) Subject: git-p4: Fix the sorting of changelists when cloning a Perforce repository. X-Git-Tag: v1.5.3-rc5~16 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7da660f4372f4113184f782634c0fafb2cf46cef;p=git.git git-p4: Fix the sorting of changelists when cloning a Perforce repository. When performing a git-p4 clone operation on a Perforce repository, where the changelists change in order of magnitude (e.g. 100 to 1000), the set of changes to import from is not sorted properly. This is because the data in the list is strings not integers. The other place where this is done already converts the value to an integer, so it is not affected. Acked-by: Simon Hausmann --- diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 805d632a6..6d0106237 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -1322,7 +1322,7 @@ class P4Sync(Command): for line in output: changeNum = line.split(" ")[1] - changes.append(changeNum) + changes.append(int(changeNum)) changes.sort()