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

Re: [PATCH 00/12] Allow users to access Perforce repositories requiring authentication

From
Tor Arvid Lund <torarvid@gmail.com>
Date
Aug 14, 2008, 17:00 UTC
Message-ID
<1a6be5fa0808141000w78b54bc2x1262b814f36ecdd6@mail.gmail.com>
In-Reply-To
<1218392795-4084-1-git-send-email-wildfire@progsoc.org>
Hi,
On Sun, Aug 10, 2008 at 8:26 PM, Anand Kumria <wildfire@progsoc.org> wrote:
Show 11 quoted lines
> Hi,
>
> This series of patches refactors a few function calls into git-p4
> so that they all go via the same function to build up the command
> line.
>
> It also then allows users to specify any particular user / password
> required to access their Perforce repository (plus a few other parameters).
>
> I have specifically tested this agains the public Zimbra repository and
> it works for me fine. Any feedback would be welcomed.

I had an issue when using git p4 submit, and I had newly added files in the changelist. This, I think, is caused by a call to "p4 opened" that was not converted to use your new p4_build_cmd function. So I don't think your patches should be merged to master before this is fixed. However, when applying the simple diff below, this works for me.

Otherwise, I think your patch series were very nice, since I often use different perforce servers. Btw, my diff works correctly, I think, but it is probably nicer to wrap read_pipe inside a p4_read_pipe - similar to what you did with p4_read_pipe_lines. All in all: good work! :)

-Tor Arvid-
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 6c64224..8705ec9 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -134,7 +134,8 @@ def setP4ExecBit(file, mode):
 def getP4OpenedType(file):
     # Returns the perforce file type for the given file.

-    result = read_pipe("p4 opened %s" % file)
+    real_cmd = p4_build_cmd("opened %s" % file)
+    result = read_pipe(real_cmd)
     match = re.match(".*\((.+)\)\r?$", result)
     if match:
         return match.group(1)
Previous: Simon HausmannNext: Anand Kumria
Message 15 of 16 in “Allow users to access Perforce repositories requiring authentication”
  1. 00/12 Allow users to access Perforce repositories requiring authenticationAnand Kumria, Aug 10, 2008
  2. 01/12 Create a specific version of the read_pipe_lines command for p4 invocationsAnand Kumria, Aug 10, 2008
  3. 02/12 Utilise the new 'p4_read_pipe_lines' commandAnand Kumria, Aug 10, 2008
  4. 03/12 Have a command that specifically invokes 'p4' (via system)Anand Kumria, Aug 10, 2008
  5. 04/12 Utilise the new 'p4_system' function.Anand Kumria, Aug 10, 2008
  6. 05/12 Add a single command that will be used to construct the 'p4' commandAnand Kumria, Aug 10, 2008
  7. 06/12 If we are in verbose mode, output what we are about to run (or return)Anand Kumria, Aug 10, 2008
  8. 07/12 Switch to using 'p4_build_cmd'Anand Kumria, Aug 10, 2008
  9. 08/12 If the user has configured various parameters, use them.Anand Kumria, Aug 10, 2008
  10. 09/12 Consistently use 'git-p4' for the configuration entriesAnand Kumria, Aug 10, 2008
  11. 10/12 Move git-p4.syncFromOrigin into a configuration parameters sectionAnand Kumria, Aug 10, 2008
  12. 11/12 Put some documentation in about the parameters that have been addedAnand Kumria, Aug 10, 2008
  13. 12/12 Put in the two other configuration elements found in the sourceAnand Kumria, Aug 10, 2008
  14. Simon HausmannAug 13, 2008
  15. Tor Arvid LundAug 14, 2008
  16. Anand KumriaAug 14, 2008

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.