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

Re: git-p4

From
KBKent Borg <kentborg@borg.org>
Date
Sep 16, 2010, 12:14 UTC
Message-ID
<4C920A1B.1030707@borg.org>
In-Reply-To
<AANLkTingvEFDygkKipBXfCHJr2=oMQrYv3FKpxpo+TkW@mail.gmail.com>
Tor Arvid Lund wrote:
> Well, then I think you are a bit confused ;)
>   
That I know is true, but I am making progress.
 - I have "git p4 rebase"-d changes from p4 world out to
   git.  More than once even.
 - I have "git p4 submit"-ted changes from git back into
   p4 world.  Again, more than once.
 - I can pull and push from/to this git repository to my primary git
repository.
> The p4/master branch is git's view of your p4 history. So p4/master
> points to the most recent git/perforce commit. 
Yes.
Show 5 quoted lines
> An important side point
> here, is that if you have another remote (which you do in your case)
> that is a pure git remote that knows nothing about p4, then the
> p4/master branch and the origin/master branch will be disjoint.
>   

That, I think I fixed! The first commit on the p4/master branch used to be a sync from p4, but after surgery on branch references (correct term?) my gateway git-p4 repository's p4/master branch now has history all the way back to the beginning of time in the git universe (back to good ol' Linux 2.6.12-rc2). The recent commits have git-p4 comments that mark the matching p4 changesets. I am not sure exactly how I did it, but it seems that doing a "git-p4 rebase" instead of "git-p4 sync" made my surgery work.

One odd thing that had me worried was seeing the git side of the gateway repository show a single history back and then show a short split history and then a single history, flopping as I ran transactions through it. I am not sure what was going on, but I think git-p4 is doing an amend of the last commit to put its notes in the message, and if I have anything newer hanging from that commit this is a very bad thing. I am still worried but less so as long as I behave myself about not expecting it to make amendments to anything but the newest commits.

Part of the consideration is to simply be very aware of those "[git-p4: ..." notes and decide where this should propagate to and design the workflow accordingly. (lkml probably won't want to see p4 notations...)

But anyway, I seem to have git-p4 working in both directions, with a complete beginning-of-time history on the git side.

Tor Arvid: I owe you a beer (or whatever you drink when someone offers you a beer), how often do you visit Boston?

Thanks for everyone's patience with a newbie,
-kb
Previous: Tor Arvid LundNext: Tor Arvid Lund
Message 13 of 14 in “Re: git-p4”
  1. Alejandro Riveira FernándezSep 10, 2010
  2. Tor Arvid LundSep 11, 2010
  3. Kent BorgSep 12, 2010
  4. Tor Arvid LundSep 12, 2010
  5. Kent BorgSep 12, 2010
  6. Tor Arvid LundSep 12, 2010
  7. Kent BorgSep 12, 2010
  8. Tor Arvid LundSep 12, 2010
  9. Kent BorgSep 13, 2010
  10. Tor Arvid LundSep 13, 2010
  11. Kent BorgSep 13, 2010
  12. Tor Arvid LundSep 13, 2010
  13. Kent BorgSep 16, 2010
  14. Tor Arvid LundSep 16, 2010

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.