{"thread":{"id":"26721","subject":"[PATCH 0/2] git-p4: fix clone @all regression","startedAt":"2011-03-12T16:22:46Z","lastAt":"2011-03-13T19:54:29Z","messageCount":4,"participants":["Pete Wyckoff","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"163265","messageId":"20110312162246.GA8509@arf.padd.com","threadId":"26721","inReplyTo":null,"subject":"[PATCH 0/2] git-p4: fix clone @all regression","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2011-03-12T16:22:46Z","receivedAt":"2011-03-12T16:22:46Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"My commit e32e00dc88948a730b8b1f3b8129f30c313713e7\n\"git-p4: better message for \"git-p4 sync\" when not cloned\"\nbroke clone @all.  This fixes it per Tor Arvid's patch\nand adds a test to make sure it doesn't happen again.\n\n    git-p4: fix clone @all regression\n    git-p4: test clone @all\n\n contrib/fast-import/git-p4 |    2 +-\n t/t9800-git-p4.sh          |   16 ++++++++++++++++\n 2 files changed, 17 insertions(+), 1 deletions(-)\n\nPlease queue to maint.  Thanks,\n\n\t\t-- Pete\n"},{"id":"163266","messageId":"20110312162323.GB8509@arf.padd.com","threadId":"26721","inReplyTo":"20110312162246.GA8509@arf.padd.com","subject":"[PATCH 1/2] git-p4: fix clone @all regression","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2011-03-12T16:23:23Z","receivedAt":"2011-03-12T16:23:23Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"Commit e32e00dc88948a730b8b1f3b8129f30c313713e7\n\"git-p4: better message for \"git-p4 sync\" when not cloned\"\nbroke the use of the \"@all\" revision specifier, e.g.,\n\"git-p4 clone //depot/xxx@all\".\n\nFix it as per Tor Arvid's quick patch.\n\nSigned-off-by: Pete Wyckoff <pw@padd.com>\nReported-by: Anatol Pomozov <anatol.pomozov@gmail.com>\nBased-on-patch-by: Tor Arvid Lund <torarvid@gmail.com>\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 2df3bb2..7cb479c 100755\n--- a/contrib/fast-import/git-p4\n+++ b/contrib/fast-import/git-p4\n@@ -1763,7 +1763,7 @@ class P4Sync(Command):\n \n                 changes.sort()\n             else:\n-                if not self.p4BranchesInGit:\n+                if not isinstance(self, P4Clone) and not self.p4BranchesInGit:\n                     die(\"No remote p4 branches.  Perhaps you never did \\\"git p4 clone\\\" in here.\");\n                 if self.verbose:\n                     print \"Getting p4 changes for %s...%s\" % (', '.join(self.depotPaths),\n-- \n1.7.4.1\n"},{"id":"163267","messageId":"20110312162449.GC8509@arf.padd.com","threadId":"26721","inReplyTo":"20110312162246.GA8509@arf.padd.com","subject":"[PATCH 2/2] git-p4: test clone @all","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2011-03-12T16:24:49Z","receivedAt":"2011-03-12T16:24:49Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"Cloning a p4 depot by default generates a single commit.  The use\nof the \"@all\" revision specifier instead tells git-p4 to import\nall commits.  Check to make sure both these invocations work as\nexpected.\n\nSigned-off-by: Pete Wyckoff <pw@padd.com>\n---\n t/t9800-git-p4.sh |   16 ++++++++++++++++\n 1 files changed, 16 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9800-git-p4.sh b/t/t9800-git-p4.sh\nindex 1969e6b..abe7c64 100755\n--- a/t/t9800-git-p4.sh\n+++ b/t/t9800-git-p4.sh\n@@ -37,11 +37,27 @@ test_expect_success 'add p4 files' '\n \techo file1 >file1 &&\n \tp4 add file1 &&\n \tp4 submit -d \"file1\" &&\n+\techo file2 >file2 &&\n+\tp4 add file2 &&\n+\tp4 submit -d \"file2\" &&\n \tcd \"$TRASH_DIRECTORY\"\n '\n \n test_expect_success 'basic git-p4 clone' '\n \t\"$GITP4\" clone --dest=\"$git\" //depot &&\n+\tcd \"$git\" &&\n+\tgit log --oneline >lines &&\n+\ttest_line_count = 1 lines &&\n+\tcd .. &&\n+\trm -rf \"$git\" && mkdir \"$git\"\n+'\n+\n+test_expect_success 'git-p4 clone @all' '\n+\t\"$GITP4\" clone --dest=\"$git\" //depot@all &&\n+\tcd \"$git\" &&\n+\tgit log --oneline >lines &&\n+\ttest_line_count = 2 lines &&\n+\tcd .. &&\n \trm -rf \"$git\" && mkdir \"$git\"\n '\n \n-- \n1.7.4.1\n"},{"id":"163297","messageId":"7vk4g2hk3u.fsf@alter.siamese.dyndns.org","threadId":"26721","inReplyTo":"20110312162246.GA8509@arf.padd.com","subject":"Re: [PATCH 0/2] git-p4: fix clone @all regression","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-13T19:54:29Z","receivedAt":"2011-03-13T19:54:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pete Wyckoff <pw@padd.com> writes:\n\n> My commit e32e00dc88948a730b8b1f3b8129f30c313713e7\n> \"git-p4: better message for \"git-p4 sync\" when not cloned\"\n> broke clone @all.  This fixes it per Tor Arvid's patch\n> and adds a test to make sure it doesn't happen again.\n>\n>     git-p4: fix clone @all regression\n>     git-p4: test clone @all\n>\n>  contrib/fast-import/git-p4 |    2 +-\n>  t/t9800-git-p4.sh          |   16 ++++++++++++++++\n>  2 files changed, 17 insertions(+), 1 deletions(-)\n>\n> Please queue to maint.  Thanks,\n\nThe buggy e32e00d itself is not in maint, even though the branch it is on\nwhose tip is at 3820007 (git-p4: support clone --bare, 2011-02-19) could\nbe merged to maint if we really wanted to.  But it doesn't look like that\nthe changes on the branch are all fixes, so it is not entirely clear if we\nwant to.\n\nIn any case, will merge the result of applying these two on top of 3820007\n(git-p4: support clone --bare, 2011-02-19) to master.\n\nThanks.\n"}]}