Skip to content

Commit

Permalink
git-p4: Fix the sorting of changelists when cloning a Perforce reposi…
Browse files Browse the repository at this point in the history
…tory.

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>
  • Loading branch information
Reece H. Dunn authored and Junio C Hamano committed Aug 13, 2007
1 parent 89d07f7 commit 7da660f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ class P4Sync(Command):

for line in output:
changeNum = line.split(" ")[1]
changes.append(changeNum)
changes.append(int(changeNum))

changes.sort()

Expand Down

0 comments on commit 7da660f

Please sign in to comment.