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

Re: git-p4 workflow suggestions?

From
PWPete Wyckoff <pw@padd.com>
Date
Mar 11, 2009, 12:58 UTC
Message-ID
<20090311125805.GA28155@padd.com>
In-Reply-To
<20090309142108.GK12880@zoy.org>
sam@zoy.org wrote on Mon, 09 Mar 2009 15:21 +0100:
Show 16 quoted lines
>    I have modified git and git-p4 to a point where they are usable in
> my work environment. I am now faced with a new problem: Perforce's
> composite workspaces. They allow you to "mount" parts of the repo onto
> other directories, even nonempty ones.
> 
>    Take the following example repository, where a "framework" project
> contains an example subdirectory with build files and other directories,
> and a "project1" project contains subdirectories that are meant to
> replace the ones in "example":
> 
>    //work/framework/example/src/
>                            /include/
> 			   /Makefile
> 			   /...
>    //work/project1/src/
>                   /include/
In perforce terms, your "view mapping" looks like:
    //work/framework/example/src/... //client/src/...
    //work/project1/src/include/...  //client/src/include/...
?

I'm not a pro with p4, but do deal with many-line mappings like this. Stock git-p4 handles these, except doesn't map correctly to the right-hand side. I haven't tried to see if it would correctly use the include files from project1 instead of framework in your example.

If you can get git-p4 to figure out the mapping correctly, I don't expect any problems with respect to atomicity of commits. As far as perforce goes, a server seems to manage its entire p4 space as one big single project. Similarly with the git side of things---it's just a matter of getting this mapping correct.

I too hacked the getClientSpec() part of git-p4 to put files into the correct directories in the git side. My changes are a bit messy, and may interfere with other usage models, hence not submitted. Maybe we should make an effort to get this right though. Do you have any changes to show how you are modifying things?

		-- Pete
Previous: Christian CouderNext: Sam Hocevar
Message 5 of 8 in “git-p4 workflow suggestions?”
  1. Sam HocevarMar 9, 2009
  2. Christian CouderMar 10, 2009
  3. Sam HocevarMar 10, 2009
  4. Christian CouderMar 11, 2009
  5. Pete WyckoffMar 11, 2009
  6. Sam HocevarMar 16, 2009
  7. Pete WyckoffMar 17, 2009
  8. Sam HocevarMar 20, 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.