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

Re: git-p4 Question

From
Luke Diamand <luke@diamand.org>
Date
Apr 20, 2015, 19:26 UTC
Message-ID
<553552FD.80703@diamand.org>
In-Reply-To
<CAFcBi89YqRGqigR1VCJJQtu1D206rP2T8Y-10KvFnvDjXYaN_g@mail.gmail.com>
On 20/04/15 17:41, FusionX86 wrote:
Show 19 quoted lines
> Hello,
>
> Hopefully this is an appropriate place to ask questions about git-p4.
>
> I started at a company that wants to migrate from Perforce to Git. I'm
> new to Perforce and have been trying to learn just enough about it to
> get through this migration. Anyway, I've been playing with git-p4 and
> have one question/problem to discuss.
>
> After setting up the p4 cli client I can 'p4 sync' some
> //depot/main/app1 which pulls down the files I would expect from the
> Perforce server. If I use 'git p4 clone //depot/main/app1', I get:
>
> "Doing initial import of //depot/main/app1/ from revision #head into
> refs/remotes/p4/master"
>
> But I don't get any files from that depot/folder pulled down. I can
> git p4 clone other depot/folders though and get some files. I suspect
> that I'm just not understanding how the git-p4 module works.
You could try doing the clone with '-v' to get a bit more information.
Show 5 quoted lines
>
> Basically, I'm hoping to setup a live sync of Perforce to Git of
> certain depots in preparation for the migration. Also, if anyone has
> pointers or guides for this type of migration, any help is
> appreciated.

I've done something similar in the past. You'll want to enable the --preserve-user option, for which you will need admin rights.

If it's a one-way mirror (p4-to-git) then just run git-p4 periodically (if you use cron, then try to avoid having two or more instances running at the same time).

If you want it to be two-way then it gets a bit more complicated.

You might also want to consider using git fusion, which is Perforce's take on this problem. I've not used it myself.

 From past experience though I would say the biggest problem is getting 
developers to switch from the P4 mindset (centralized; code review hard 
to do or ignored) to the git mindset (decentralized; code review 
actively supported by the version control system).
Show 5 quoted lines
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Previous: FusionX86Next: FusionX86
Message 4 of 10 in “git-p4 Question”
  1. FusionX86Apr 20, 2015
  2. Sam VilainApr 20, 2015
  3. FusionX86Apr 21, 2015
  4. Luke DiamandApr 20, 2015
  5. FusionX86Apr 21, 2015
  6. Luke DiamandApr 21, 2015
  7. FusionX86Apr 23, 2015
  8. Luke DiamandApr 24, 2015
  9. FusionX86Apr 24, 2015
  10. Luke DiamandApr 26, 2015

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.