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

Re: Yet another git perforce integration

From
Alex Riesen <raa.lkml@gmail.com>
Date
May 8, 2007, 12:32 UTC
Message-ID
<81b0412b0705080532o14db3b24l1a71409af1c443ae@mail.gmail.com>
In-Reply-To
<200705081249.36214.simon@lst.de>
On 5/8/07, Simon Hausmann <simon@lst.de> wrote:
Show 12 quoted lines
> > > It also doesn't require any additional meta-data. Instead every import
> > > commit has a line added to the log message that contains the Perforce
> > > path the changeset comes from as well as the change number. git-p4
> > > sync/rebase "parses" this on the last commit in the "p4" git branch to
> > > find out where to continue importing for incremental imports.
> >
> > How do you handle that patchwork of mappings synced to diverse revisions
> > that P4 clients tend to become? Don't you have to save change number or
> > revision for _each_ file?
>
> I'm not sure I understand the question. I don't really use the p4 client view
> at all. ...
Ah, you're _that_ lucky...
Show 12 quoted lines
> > > problems with fast-import when trying that. Also the support for Perforce
> > > branches isn't quite working yet.
> >
> > AFACS, it is impossible: Perforce does not have branches (in Git's meaning
> > of the word). It only has directories. Integration (it is something like
> > "in-repo-copy") metadata are just duct-taped on it (that stupid
> > branchspec).
>
> True, it probably depends a bit on the depot organization. For example we have
> //depot/qt/main and then branches like //depot/qt/4.3 or research branches
> like //depot/qt/research/somecoolfeature . That's the kind of structure I'd
> like to map to git, ...
Recreating it anywhere, not just in Git, would be stupid. As it is in Perforce.
Show 9 quoted lines
> > > Also I've never tried it on Windows and I expect problems as the script
> > > uses pipes, calls "patch", etc.
> >
> > ...and case-sensitivity. BTW, how does your script handle filenames with
> > special characters and spaces in them?
>
> I don't really treat them special. I get the file name from the output of "p4
> describe" (using the Guido option :) and pass it on to git-fast-import.
>

You seem to assume that the names never contain double quotes and backslashes. For example in the names of directories.

Previous: Simon Hausmann
Message 4 of 4 in “Yet another git perforce integration”
  1. Simon HausmannMay 8, 2007
  2. Alex RiesenMay 8, 2007
  3. Simon HausmannMay 8, 2007
  4. Alex RiesenMay 8, 2007

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.