git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Unapplied patches reminder

From
PSPer Strandh <per.strandh@q-matic.se>
Date
Oct 19, 2009, 13:08 UTC
Message-ID
<hbhoeq$ehf$1@ger.gmane.org>
In-Reply-To
<7vzl7ogtxs.fsf@alter.siamese.dyndns.org>

"Junio C Hamano" <gitster@pobox.com> skrev i meddelandet news:7vzl7ogtxs.fsf@alter.siamese.dyndns.org...

Show 15 quoted lines
>> From: Per Strandh <Per.Strandh@q-matic.se>
>> Subject: [PATCH] git-p4: Fixed bug that didn't allow spaces in the depot
>> Date: Tue, 13 Oct 2009 22:09:12 +0200
>> Message-ID: 
>> <65D9329CA2AF94438F542D48F2A42E830F95F51514@GOT-SRV-005.QMATIC.local>
>>
>>     git-p4 clone (and sync) did not work if the specified depot path 
>> contained spaces.
>>     Fixed by quoting the argument to the "p4 changes" and "p4 files" 
>> commands.
>
> I do recall ignoring this one because (1) I never use git-p4 myself and
> always rely on Acks from people who have been involved in it, and (2) the
> message was mangled (perhaps it had two or three copies of patches as
> attachments).

Sorry for posting a mangled patch. Please let someone involved in the git-p4 code review/approve/apply the patch.

Regards /Per/

>From c70682a9c4051f2dc92e2dd92f1710c755df6cfe Mon Sep 17 00:00:00 2001
From: Per Strandh <per.strandh@q-matic.se>
Date: Fri, 9 Oct 2009 12:11:14 +0200
Subject: [PATCH] git-p4: Fixed bug that didn't allow spaces in the depot 
path

git-p4 clone (and sync) did not work if the specified depot path contained spaces. Fixed by quoting the argument to the "p4 changes" and "p4 files" commands.

Signed-off-by: Per Strandh <per.strandh@q-matic.se>
---
 contrib/fast-import/git-p4 |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index e710219..01b6bbb 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -440,8 +440,8 @@ def originP4BranchesExist():

 def p4ChangesForPaths(depotPaths, changeRange):
     assert depotPaths
-    output = p4_read_pipe_lines("changes " + ' '.join (["%s...%s" % (p, 
changeRange)
-                                                        for p in 
depotPaths]))
+    output = p4_read_pipe_lines("changes \"" + ' '.join (["%s...%s" % (p, 
changeRange)
+                                                        for p in 
depotPaths]) + "\"" )

     changes = {}
     for line in output:
@@ -1437,10 +1437,10 @@ class P4Sync(Command):
         newestRevision = 0

         fileCnt = 0
-        for info in p4CmdList("files "
+        for info in p4CmdList("files \""
                               +  ' '.join(["%s...%s"
                                            % (p, revision)
-                                           for p in self.depotPaths])):
+                                           for p in self.depotPaths]) + 
"\""):

             if info['code'] == 'error':
                 sys.stderr.write("p4 returned an error: %s\n"
-- 
1.6.3.msysgit.0

 
Previous: Rolf Bjarne KvingeNext: Junio C Hamano
Message 10 of 15 in “Unapplied patches reminder”
  1. Nanako ShiraishiOct 18, 2009
  2. Junio C HamanoOct 18, 2009
  3. Junio C HamanoOct 18, 2009
  4. Heiko VoigtOct 19, 2009
  5. Junio C HamanoOct 18, 2009
  6. Jeff KingOct 19, 2009
  7. Junio C HamanoOct 19, 2009
  8. Junio C HamanoOct 18, 2009
  9. Rolf Bjarne KvingeOct 19, 2009
  10. Per StrandhOct 19, 2009
  11. Junio C HamanoOct 18, 2009
  12. Junio C HamanoOct 18, 2009
  13. Greg PriceDec 7, 2009
  14. Junio C HamanoOct 18, 2009
  15. Junio C HamanoOct 18, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.