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

Re: [PATCH] A Perforce importer for git.

From
Sean <seanlkml@sympatico.ca>
Date
Jun 2, 2006, 13:43 UTC
Message-ID
<BAYC1-PASMTP04855AA99A546A74A7F07BAE910@CEZ.ICE>
In-Reply-To
<81b0412b0606020609o24ee34b4p7b1bcd013136d49a@mail.gmail.com>

On Fri, 2 Jun 2006 15:09:45 +0200 "Alex Riesen" <raa.lkml@gmail.com> wrote:

Show 13 quoted lines
> BTW, can I suggest to import the _currently_ synced state?
> 
> The reason is that because of the way how Perforce is done
> its working directories (views, aka clients) are often a
> horrible mix of occasionally synced files to some random
> versions. No one actually uses "p4 sync" for whole project here
> where I work, because it is absolutely useless at this level
> (updated files have abolutely no relevance at head revision,
> which is what you get by syncing without strictly specifying
> a revision). So a working state is stitched together from
> a lot of "mappings": perforce path to local path -> revision.
> That state can be actually worked on (up until you have
> to commit something, that is not possible except on head). 
Hey Alex,

I'd happily change the script to accommodate your needs if it's at all reasonable. As you've no doubt gathered, the script is currently very branch centric. It needs a mapping view from each p4 branch into the local git directory. Then it does a sync //p4/mapping@{revision} for each revision along each mapped branch and commits it into git.

Note that it never syncs specifically to head, it explicitly asks for each revision along the branch and tt doesn't know anything about your working state, it can only import commits.

Are you looking for the ability to create a single git branch which has the history of the combined view of your stitched together client mappings rather than the independent branches held by the server?

Sean
Previous: Alex RiesenNext: Alex Riesen
Message 3 of 6 in “A Perforce importer for git.”
  1. A Perforce importer for git.Sean, May 24, 2006
  2. Alex RiesenJun 2, 2006
  3. SeanJun 2, 2006
  4. Alex RiesenJun 2, 2006
  5. SeanJun 4, 2006
  6. Alex RiesenJun 5, 2006

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.