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

Re: [PATCH v2] git-p4: Ask "p4" to interpret View setting

From
PWPete Wyckoff <pw@padd.com>
Date
Aug 10, 2013, 20:11 UTC
Message-ID
<20130810201123.GA31706@padd.com>
In-Reply-To
<CACGba4zdA=3tBE9UR=i9P9kNAL1HUc3UwSHbYeq4s9fwaN4=Mw@mail.gmail.com>
ksaitoh560@gmail.com wrote on Tue, 06 Aug 2013 15:45 +0900:
Show 16 quoted lines
> In Perforce, View setting of p4 client can describe
>   -//depot/project/files/*.xls //client/project/files/*.xls
> to exclude Excel files.
> But "git p4 --use-client-spec" cannot support '*'.
> 
> In git-p4.py, "map_in_client" method analyzes View setting and return
> client file path.
> So I modify the method to just ask p4.
> 
> 
> > Let me play with this for a bit.  I wonder about the performance
> > aspects of doing a "p4 fstat" for every file.  Would it be
> > possible to do one or a few batch queries higher up somewhere?
> To reduce p4 access, it cache result of asking "client path".
> And addition, "fstat" depends on sync status, so modify to use "p4
> where" instead of "fstat".

I played around with your patch a bit, ending up with this teensy series.

I redid the code to use clientFile, not path, as that will work better with AltRoots. Also I simplified your test and added a couple more for the now-supported wildcards. And deleted a bunch of newly dead code.

My only concern is in the commit message, about performance. A change that has lots of files in it will cause many roundtrips to p4d to do "p4 where" on each. When the files don't have much edited content, this new approach will make the import take twice as long, I'll guess. Do you have a big repository where you could test that?

Tell me what you think.
		-- Pete
Previous: kazuki saitohNext: Pete Wyckoff
Message 2 of 9 in “git-p4: Ask "p4" to interpret View setting”
  1. git-p4: Ask "p4" to interpret View settingkazuki saitoh, Aug 6, 2013
  2. Pete WyckoffAug 10, 2013
  3. 1/2 git p4 test: sanitize P4CHARSETPete Wyckoff, Aug 10, 2013
  4. 2/2 git p4: implement view spec wildcards with "p4 where"Pete Wyckoff, Aug 10, 2013
  5. kazuki saitohAug 14, 2013
  6. Pete WyckoffAug 16, 2013
  7. Pete WyckoffAug 25, 2013
  8. kazuki saitohAug 27, 2013
  9. Pete WyckoffAug 29, 2013

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.