1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-22 00:26:08 +02:00

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 <simon@lst.de>
This commit is contained in:
Reece H. Dunn 2007-08-13 19:40:50 +01:00 committed by Junio C Hamano
parent 89d07f750a
commit 7da660f437

View File

@ -1322,7 +1322,7 @@ class P4Sync(Command):
for line in output:
changeNum = line.split(" ")[1]
changes.append(changeNum)
changes.append(int(changeNum))
changes.sort()