{"thread":{"id":"9515","subject":"[PATCH] git-p4: Fix sorting changelists when cloning a Perforce repository","startedAt":"2007-08-13T18:50:59Z","lastAt":"2007-08-13T23:51:22Z","messageCount":3,"participants":["Reece Dunn","Simon Hausmann","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"50648","messageId":"3f4fd2640708131150r1d9fb02ai1f655a22658cb544@mail.gmail.com","threadId":"9515","inReplyTo":null,"subject":"[PATCH] git-p4: Fix sorting changelists when cloning a Perforce repository","fromName":"Reece Dunn","fromEmail":"msclrhd@googlemail.com","sentAt":"2007-08-13T18:50:59Z","receivedAt":"2007-08-13T18:50:59Z","isPatch":true,"sender":{"key":"msclrhd@googlemail.com","avatar":null},"body":"Hi,\n\nWhen performing a git-p4 clone operation on a Perforce repository,\nwhere the changelists change in order of magnitude (e.g. 100 to 1000),\nthe set of changes to import from is not sorted properly. This is\nbecause the data in the list is strings not integers. The other place\nwhere this is done already converts the value to an integer, so it is\nnot affected.\n\nThis patch fixes this issue.\n\n- Reece\n\n\nFrom 8c3d5e2d5886b330d0dfd139f03b3d1fd51207f5 Mon Sep 17 00:00:00 2001\nFrom: Reece H. Dunn <msclrhd@gmail.com>\nDate: Mon, 13 Aug 2007 19:40:50 +0100\nSubject: [PATCH] git-p4: Fix the sorting of changelists when cloning a Perforce repository.\n\n---\n contrib/fast-import/git-p4 |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4\nindex 805d632..6d01062 100755\n--- a/contrib/fast-import/git-p4\n+++ b/contrib/fast-import/git-p4\n@@ -1322,7 +1322,7 @@ class P4Sync(Command):\n \n                 for line in output:\n                     changeNum = line.split(\" \")[1]\n-                    changes.append(changeNum)\n+                    changes.append(int(changeNum))\n \n                 changes.sort()\n \n-- \n1.5.1.3\n\n"},{"id":"50659","messageId":"200708132345.23647.simon@lst.de","threadId":"9515","inReplyTo":"3f4fd2640708131150r1d9fb02ai1f655a22658cb544@mail.gmail.com","subject":"Re: [PATCH] git-p4: Fix sorting changelists when cloning a Perforce repository","fromName":"Simon Hausmann","fromEmail":"simon@lst.de","sentAt":"2007-08-13T21:45:17Z","receivedAt":"2007-08-13T21:45:17Z","isPatch":true,"sender":{"key":"hausmann@kde.org","avatar":"https://gravatar.com/avatar/bc9aad4fb31dce17eb66e690e7b51fe980c62da3c225c785da35dd806b8da778?d=mp&s=160"},"body":"On Monday 13 August 2007 20:50:59 Reece Dunn wrote:\n> Hi,\n>\n> When performing a git-p4 clone operation on a Perforce repository,\n> where the changelists change in order of magnitude (e.g. 100 to 1000),\n> the set of changes to import from is not sorted properly. This is\n> because the data in the list is strings not integers. The other place\n> where this is done already converts the value to an integer, so it is\n> not affected.\n>\n> This patch fixes this issue.\n\nAcked-by: Simon Hausmann <simon@lst.de>\n\n\nThanks,\nSimon\n"},{"id":"50669","messageId":"7vtzr3dmdh.fsf@assigned-by-dhcp.cox.net","threadId":"9515","inReplyTo":"200708132345.23647.simon@lst.de","subject":"Re: [PATCH] git-p4: Fix sorting changelists when cloning a Perforce repository","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-13T23:51:22Z","receivedAt":"2007-08-13T23:51:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks, both.\n"}]}