* [PATCHv1 1/3] git p4: add test for tag import/export enabled via config
2012-05-11 6:25 [PATCHv1 0/3] git p4: tag import/export bug fixes Luke Diamand
@ 2012-05-11 6:25 ` Luke Diamand
2012-05-11 6:25 ` [PATCHv1 2/3] git p4: fix bug when verbose enabled with tag export Luke Diamand
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Luke Diamand @ 2012-05-11 6:25 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Pete Wyckoff, Luke Diamand
This adds a test for git p4 to check it can import/export tags
when enabled via a config variable rather than on the command
line.
Signed-off-by: Luke Diamand <luke@diamand.org>
---
t/t9811-git-p4-label-import.sh | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh
index fb00ffa..095238f 100755
--- a/t/t9811-git-p4-label-import.sh
+++ b/t/t9811-git-p4-label-import.sh
@@ -195,6 +195,26 @@ test_expect_success 'tag that cannot be exported' '
)
'
+test_expect_success 'use git config to enable import/export of tags' '
+ git p4 clone --verbose --dest="$git" //depot@all &&
+ (
+ cd "$git" &&
+ git config git-p4.exportLabels true &&
+ git config git-p4.importLabels true &&
+ git tag CFG_A_GIT_TAG &&
+ git p4 rebase --verbose &&
+ git p4 submit --verbose &&
+ git tag &&
+ git tag | grep TAG_F1_1
+ ) &&
+ (
+ cd "$cli" &&
+ p4 labels &&
+ p4 labels | grep CFG_A_GIT_TAG
+ )
+'
+
+
test_expect_success 'kill p4d' '
kill_p4d
'
--
1.7.10.282.g2120.dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCHv1 2/3] git p4: fix bug when verbose enabled with tag export
2012-05-11 6:25 [PATCHv1 0/3] git p4: tag import/export bug fixes Luke Diamand
2012-05-11 6:25 ` [PATCHv1 1/3] git p4: add test for tag import/export enabled via config Luke Diamand
@ 2012-05-11 6:25 ` Luke Diamand
2012-05-11 6:25 ` [PATCHv1 3/3] git p4: fix bug when enabling tag import/export via config variables Luke Diamand
2012-05-11 10:21 ` [PATCHv1 0/3] git p4: tag import/export bug fixes Pete Wyckoff
3 siblings, 0 replies; 5+ messages in thread
From: Luke Diamand @ 2012-05-11 6:25 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Pete Wyckoff, Luke Diamand
Wrong variable name used when verbose enabled, causes failure.
Signed-off-by: Luke Diamand <luke@diamand.org>
---
git-p4.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-p4.py b/git-p4.py
index 565cfbc..8f0169a 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -1302,7 +1302,7 @@ class P4Submit(Command, P4UserMap):
if not m.match(name):
if verbose:
- print "tag %s does not match regexp %s" % (name, validTagRegexp)
+ print "tag %s does not match regexp %s" % (name, validLabelRegexp)
continue
# Get the p4 commit this corresponds to
--
1.7.10.282.g2120.dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCHv1 3/3] git p4: fix bug when enabling tag import/export via config variables
2012-05-11 6:25 [PATCHv1 0/3] git p4: tag import/export bug fixes Luke Diamand
2012-05-11 6:25 ` [PATCHv1 1/3] git p4: add test for tag import/export enabled via config Luke Diamand
2012-05-11 6:25 ` [PATCHv1 2/3] git p4: fix bug when verbose enabled with tag export Luke Diamand
@ 2012-05-11 6:25 ` Luke Diamand
2012-05-11 10:21 ` [PATCHv1 0/3] git p4: tag import/export bug fixes Pete Wyckoff
3 siblings, 0 replies; 5+ messages in thread
From: Luke Diamand @ 2012-05-11 6:25 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Pete Wyckoff, Luke Diamand
Use Python's True, not true. Causes failure when enabling tag
import or export in "git p4" using a config option rather than
the command line.
Signed-off-by: Luke Diamand <luke@diamand.org>
---
git-p4.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-p4.py b/git-p4.py
index 8f0169a..f895a24 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -1451,7 +1451,7 @@ class P4Submit(Command, P4UserMap):
rebase.rebase()
if gitConfig("git-p4.exportLabels", "--bool") == "true":
- self.exportLabels = true
+ self.exportLabels = True
if self.exportLabels:
p4Labels = getP4Labels(self.depotPath)
@@ -2711,7 +2711,7 @@ class P4Sync(Command, P4UserMap):
sys.stdout.write("\n")
if gitConfig("git-p4.importLabels", "--bool") == "true":
- self.importLabels = true
+ self.importLabels = True
if self.importLabels:
p4Labels = getP4Labels(self.depotPaths)
--
1.7.10.282.g2120.dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCHv1 0/3] git p4: tag import/export bug fixes
2012-05-11 6:25 [PATCHv1 0/3] git p4: tag import/export bug fixes Luke Diamand
` (2 preceding siblings ...)
2012-05-11 6:25 ` [PATCHv1 3/3] git p4: fix bug when enabling tag import/export via config variables Luke Diamand
@ 2012-05-11 10:21 ` Pete Wyckoff
3 siblings, 0 replies; 5+ messages in thread
From: Pete Wyckoff @ 2012-05-11 10:21 UTC (permalink / raw)
To: Luke Diamand; +Cc: git, Junio C Hamano
luke@diamand.org wrote on Fri, 11 May 2012 07:25 +0100:
> This patch series fixes two bugs in my git p4 import/export code, and
> adds a test case for them.
>
> Luke Diamand (3):
> git p4: add test for tag import/export enabled via config
> git p4: fix bug when verbose enabled with tag export
> git p4: fix bug when enabling tag import/export via config variables
>
> git-p4.py | 6 +++---
> t/t9811-git-p4-label-import.sh | 20 ++++++++++++++++++++
> 2 files changed, 23 insertions(+), 3 deletions(-)
These fixes look obviously good, and maint-worthy. Ack.
-- Pete
^ permalink raw reply [flat|nested] 5+ messages in thread