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

Re: bug in git-p4?

From
CMCarl Mercier <cmercier@websense.com>
Date
May 8, 2009, 18:02 UTC
Message-ID
<B82F1DD2-282A-4E3A-ABAE-53F1D0386B25@websense.com>
In-Reply-To
<1a6be5fa0905080443h5c696f8es55ea5acf3b3025cb@mail.gmail.com>
Thank you.

What I'm trying to accomplish is a little bit different. We've been using Git with a remote server for so long, we don't want to give that up. (and we also can't for some reasons). So what I was hoping to do was simply keep working with out remote Git server as normal, and then have another server pull from Git and submit to P4.

We have many Git repos we'd like to store into P4 subdirectories. For example:

website.git -> //SecTech/website api.git -> //SecTech/api

I just can't seem to get this to work because git-p4 seems to expect a brand new Git repo to work properly.

What would be the correct way to accomplish this?

Carl Mercier Director of software development Defensio.com, a Websense service

On 8-May-09, at 7:43 AM, Tor Arvid Lund wrote:
Show 47 quoted lines
> On Mon, May 4, 2009 at 9:20 PM, Mercier, Carl  
> <cmercier@************> wrote:
>> Hello all,
>>
>> I've been trying to use git-p4 without much success.  My setup is  
>> very simple:
>>
>> - 1 existing Git repo (with data)
>> - 1 existing P4 depot (with an empty subdirectory)
>> - We commit and push to Git and our company requires all the code  
>> to be stored in P4 (in the p4 empty subdir).
>>
>> Here's what I did:
>>
>> cd /root/p4-repo/SecTech
>> git clone /home/git/repositories/web website
>> cd website
>> git-p4 sync //SecTech/website
>> git branch --track p4-master p4/master
>> git checkout p4-master
>> git merge master
>> git-p4 submit
>
> Hi. What I try to do at my job, is to consider the P4 depot to be the
> "master" depot, since I consider it the "weaker" of the two VCSs. I
> have not had much success doing git merges and then trying to sync
> with P4. I instead use rebasing a lot. So what I would do in your
> situation is something like:
>
> ...
> git-p4 sync //SecTech/website
> git rebase p4/master
> git-p4 submit
>
> So.. my normal flow of work is:
>
> code
> commit
> code
> commit
> git p4 sync
> git rebase p4/master
> git p4 commit
>
> Don't know if this is something that might work for you, though...
>
> -Tor Arvid-
 Protected by Websense Hosted Email Security -- www.websense.com 
Previous: Tor Arvid LundNext: Daniel Barkalow
Message 3 of 4 in “bug in git-p4?”
  1. Mercier, CarlMay 4, 2009
  2. Tor Arvid LundMay 8, 2009
  3. Carl MercierMay 8, 2009
  4. Daniel BarkalowMay 8, 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.