Thread (7 messages) flat view 7 messages, 2 authors, 2016-06-15

Re: [PATCH 1/4] git-p4: handle p4 branches and labels containing shell chars

From: Pete Wyckoff <hidden>
Date: 2016-06-15 22:52:49

luke@diamand.org wrote on Mon, 16 Jan 2012 23:14 +0000:
Don't use shell expansion when detecting branches, as it will
fail if the branch name contains a shell metachar. Similarly
for labels.

Add additional test for branches with shell metachars.
Nice.  There will be a fixup on a command in Vitor's series,
depending on which goes first.  He'll have a couple of
un-listified read_pipe{,_lines} that we should treat similarly.
quoted hunk ↗ jump to hunk
@@ -1758,7 +1758,7 @@ class P4Sync(Command, P4UserMap):
     def getLabels(self):
         self.labels = {}
 
-        l = p4CmdList("labels %s..." % ' '.join (self.depotPaths))
+        l = p4CmdList(["labels", "%s..." % ' '.join (self.depotPaths)])
         if len(l) > 0 and not self.silent:
             print "Finding files belonging to labels in %s" % `self.depotPaths`
I suspect the command "p4" "labels" "//depot/foo/...  //depot/bar/..."
might confuse p4, but haven't tested.  Maybe tuck each one in its
own argument?

    ["labels"] + ["%s..." % p for p in self.depotPaths]

What happened to your failing test?  It's fun to keep the broken
ones around to inspire others to fix them.

		-- Pete
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help