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

Re: git to p4 conversion

From
Tor Arvid Lund <torarvid@gmail.com>
Date
Feb 5, 2011, 00:53 UTC
Message-ID
<AANLkTi=onuZtGWPTYvw_-rKsR6t-R2UquAUPLHAm-TVV@mail.gmail.com>
In-Reply-To
<AANLkTimJm81V0D8_j3OfZTcEkyn_jd6_QB2nv8T69JBY@mail.gmail.com>
On Fri, Feb 4, 2011 at 5:52 PM, Endre Czirbesz <endre@czirbesz.hu> wrote:
Show 15 quoted lines
> Hi Vitor,
>
> 2011/2/4 Vitor Antunes <vitor.hda@gmail.com>:
>>> I dropped the whole directory, and then recreated it, I do not know
>>> any better 'cleanup'. :)
>>
>> Which directory did you drop? Was is the git repository or the P4 workspace?
>> You need to clean up the later. Basically, a "rm -rf
>> path/to/p4_workspace" and a "p4 sync -f" should do the trick :)
>
> It is almost the same in my case. :)
> My p4 client root is ~/work/, my project dir is ~/work/projdir (and at
> the moment this is the only directory within ~/work/), and I dropped
> the latter.
> And then it was created again by git-p4 clone.
I... wonder if we're maybe talking past one another here...

Let's take a few things from the top, just in case... If we think about the perforce setup (before we start doing any git stuff)... You have a perforce workspace/client-spec, right? That is - a setup that tells perforce where you want the files to be placed on your hard drive when you do a standard "p4 sync". Let's call it ~/p4root/ and let us say that your project will then be synced by perforce to ~/p4root/myproj/

When you want to do a git-p4 clone, you should definitely be *outside* of ~/p4root/ . Let's say we have a ~/gitroot/ as well. So do cd ~/gitroot/ so that the git-p4 clone will be under ~/gitroot/myproj/ ; and then do all the git-p4 stuff (clone, add remote, fetch, rebase, sync, submit).

I think Vitors point was that before you do git-p4 submit, you should clean - not ~/gitroot/myproj - but ~/p4root/myproj/.

This is probably not something that you need to do everytime you want to submit back to perforce, but since we have had some rounds with trial-and-error with this, we have probably placed some dirty files inside the perforce folders... Make sure that you don't have files opened in perforce before you sync.

Clearer? More confused? Best of luck anyway :)
    -- Tor Arvid
Previous: Endre CzirbeszNext: Vitor Antunes
Message 10 of 14 in “git to p4 conversion”
  1. Endre CzirbeszFeb 3, 2011
  2. Ian WienandFeb 3, 2011
  3. Endre CzirbeszFeb 3, 2011
  4. Vitor AntunesFeb 4, 2011
  5. Tor Arvid LundFeb 4, 2011
  6. Endre CzirbeszFeb 4, 2011
  7. Tor Arvid LundFeb 4, 2011
  8. Endre CzirbeszFeb 4, 2011
  9. Endre CzirbeszFeb 4, 2011
  10. Tor Arvid LundFeb 5, 2011
  11. Vitor AntunesFeb 5, 2011
  12. Endre CzirbeszFeb 7, 2011
  13. Tor Arvid LundFeb 7, 2011
  14. Endre CzirbeszFeb 7, 2011

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.