{"thread":{"id":"30502","subject":"[PATCHv1 1/3] git p4: add test for tag import/export enabled via config","startedAt":"2012-05-11T06:25:15Z","lastAt":"2012-05-11T10:21:43Z","messageCount":5,"participants":["Luke Diamand","Pete Wyckoff"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"191379","messageId":"1336717518-4214-1-git-send-email-luke@diamand.org","threadId":"30502","inReplyTo":null,"subject":"[PATCHv1 0/3] git p4: tag import/export bug fixes","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2012-05-11T06:25:15Z","receivedAt":"2012-05-11T06:25:15Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"This patch series fixes two bugs in my git p4 import/export code, and\nadds a test case for them.\n\nLuke Diamand (3):\n  git p4: add test for tag import/export enabled via config\n  git p4: fix bug when verbose enabled with tag export\n  git p4: fix bug when enabling tag import/export via config variables\n\n git-p4.py                      |    6 +++---\n t/t9811-git-p4-label-import.sh |   20 ++++++++++++++++++++\n 2 files changed, 23 insertions(+), 3 deletions(-)\n\n-- \n1.7.10.282.g2120.dirty\n"},{"id":"191378","messageId":"1336717518-4214-2-git-send-email-luke@diamand.org","threadId":"30502","inReplyTo":"1336717518-4214-1-git-send-email-luke@diamand.org","subject":"[PATCHv1 1/3] git p4: add test for tag import/export enabled via config","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2012-05-11T06:25:16Z","receivedAt":"2012-05-11T06:25:16Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"This adds a test for git p4 to check it can import/export tags\nwhen enabled via a config variable rather than on the command\nline.\n\nSigned-off-by: Luke Diamand <luke@diamand.org>\n---\n t/t9811-git-p4-label-import.sh |   20 ++++++++++++++++++++\n 1 file changed, 20 insertions(+)\n\ndiff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh\nindex fb00ffa..095238f 100755\n--- a/t/t9811-git-p4-label-import.sh\n+++ b/t/t9811-git-p4-label-import.sh\n@@ -195,6 +195,26 @@ test_expect_success 'tag that cannot be exported' '\n \t)\n '\n \n+test_expect_success 'use git config to enable import/export of tags' '\n+\tgit p4 clone --verbose --dest=\"$git\" //depot@all &&\n+\t(\n+\t\tcd \"$git\" &&\n+\t\tgit config git-p4.exportLabels true &&\n+\t\tgit config git-p4.importLabels true &&\n+\t\tgit tag CFG_A_GIT_TAG &&\n+\t\tgit p4 rebase --verbose &&\n+\t\tgit p4 submit --verbose &&\n+\t\tgit tag &&\n+\t\tgit tag | grep TAG_F1_1\n+\t) &&\n+\t(\n+\t\tcd \"$cli\" &&\n+\t\tp4 labels &&\n+\t\tp4 labels | grep CFG_A_GIT_TAG\n+\t)\n+'\n+\n+\n test_expect_success 'kill p4d' '\n \tkill_p4d\n '\n-- \n1.7.10.282.g2120.dirty\n"},{"id":"191381","messageId":"1336717518-4214-3-git-send-email-luke@diamand.org","threadId":"30502","inReplyTo":"1336717518-4214-1-git-send-email-luke@diamand.org","subject":"[PATCHv1 2/3] git p4: fix bug when verbose enabled with tag export","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2012-05-11T06:25:17Z","receivedAt":"2012-05-11T06:25:17Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"Wrong variable name used when verbose enabled, causes failure.\n\nSigned-off-by: Luke Diamand <luke@diamand.org>\n---\n git-p4.py |    2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-p4.py b/git-p4.py\nindex 565cfbc..8f0169a 100755\n--- a/git-p4.py\n+++ b/git-p4.py\n@@ -1302,7 +1302,7 @@ class P4Submit(Command, P4UserMap):\n \n             if not m.match(name):\n                 if verbose:\n-                    print \"tag %s does not match regexp %s\" % (name, validTagRegexp)\n+                    print \"tag %s does not match regexp %s\" % (name, validLabelRegexp)\n                 continue\n \n             # Get the p4 commit this corresponds to\n-- \n1.7.10.282.g2120.dirty\n"},{"id":"191380","messageId":"1336717518-4214-4-git-send-email-luke@diamand.org","threadId":"30502","inReplyTo":"1336717518-4214-1-git-send-email-luke@diamand.org","subject":"[PATCHv1 3/3] git p4: fix bug when enabling tag import/export via config variables","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2012-05-11T06:25:18Z","receivedAt":"2012-05-11T06:25:18Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"Use Python's True, not true. Causes failure when enabling tag\nimport or export in \"git p4\" using a config option rather than\nthe command line.\n\nSigned-off-by: Luke Diamand <luke@diamand.org>\n---\n git-p4.py |    4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-p4.py b/git-p4.py\nindex 8f0169a..f895a24 100755\n--- a/git-p4.py\n+++ b/git-p4.py\n@@ -1451,7 +1451,7 @@ class P4Submit(Command, P4UserMap):\n             rebase.rebase()\n \n         if gitConfig(\"git-p4.exportLabels\", \"--bool\") == \"true\":\n-            self.exportLabels = true\n+            self.exportLabels = True\n \n         if self.exportLabels:\n             p4Labels = getP4Labels(self.depotPath)\n@@ -2711,7 +2711,7 @@ class P4Sync(Command, P4UserMap):\n                         sys.stdout.write(\"\\n\")\n \n         if gitConfig(\"git-p4.importLabels\", \"--bool\") == \"true\":\n-            self.importLabels = true\n+            self.importLabels = True\n \n         if self.importLabels:\n             p4Labels = getP4Labels(self.depotPaths)\n-- \n1.7.10.282.g2120.dirty\n"},{"id":"191383","messageId":"20120511102143.GA2468@padd.com","threadId":"30502","inReplyTo":"1336717518-4214-1-git-send-email-luke@diamand.org","subject":"Re: [PATCHv1 0/3] git p4: tag import/export bug fixes","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2012-05-11T10:21:43Z","receivedAt":"2012-05-11T10:21:43Z","isPatch":false,"sender":{"key":"pw@padd.com","avatar":null},"body":"luke@diamand.org wrote on Fri, 11 May 2012 07:25 +0100:\n> This patch series fixes two bugs in my git p4 import/export code, and\n> adds a test case for them.\n> \n> Luke Diamand (3):\n>   git p4: add test for tag import/export enabled via config\n>   git p4: fix bug when verbose enabled with tag export\n>   git p4: fix bug when enabling tag import/export via config variables\n> \n>  git-p4.py                      |    6 +++---\n>  t/t9811-git-p4-label-import.sh |   20 ++++++++++++++++++++\n>  2 files changed, 23 insertions(+), 3 deletions(-)\n\nThese fixes look obviously good, and maint-worthy.  Ack.\n\n\t\t-- Pete\n"}]}