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

Re: git-p4: commits are visible in history after 'git p4 clone', but not a single file present

From
IDIlya Dogolazky <ilya.dogolazky@nokia.com>
Date
Jun 12, 2012, 09:37 UTC
Message-ID
<4FD70DEB.7040506@nokia.com>
In-Reply-To
<4FD67530.1090002@diamand.org>
Hi Luke!
 > #!/bin/sh
 > export P4PORT=localhost:1234
 > mkdir db cli
 > ( cd db && p4d & )
 > sleep 2
 > ( cd cli && EDITOR=: p4 client && date >foo.c &&
 >   p4 add foo.c && p4 submit -d 'x' )
 > git-p4 clone //depot@all

I installed p4d on my machine and executed the above script. It works, the file foo.c is visible in the copy and one line patch is visible by "git log -p". Everything is fine!

Then I realize, that the "git-p4" call in your script is communicating 
with the p4 daemon directly, which is much more simple setup than I 
tried to use before. Then I changed the clone command: instead of
  $ git p4 clone //kalma/xxx/yyy@all
I now tried
  $ git p4 clone //xxx/yyy@all
after setting P4PORT etc to point to the company's perforce server. And 
it worked!

Then I even tried $ git p4 clone //xxx@all And it worked too (creating a huge git repository with the whole project).

Until today I tried to use the following setup: first clone the whole perforce repository with p4 command line client to my machine ('kalma' is its name) and then make a git repository by "git-p4 clone" from this intermediate location (and it seems I did something wrong there: files were visible in the intermediate location after the first step, but not in the end location after git-p4). I read it somewhere in documentation claiming that it's the only way to use git-p4. But now I see, that it seems not to be necessary. Please clarify, is it okay to skip this intermediate location and use git-p4 in the same way as your script does?

And another question, probably connected to above: Now I did this: $ git p4 clone //xxx/yyy@all $ cd yyy/zzz $ edit readme.txt (which was already present there) $ git commit readme.txt $ git p4 rebase (Current branch master is up to date) $ git p4 submit

That last step failed with following messages: Submitting change 20073 ... //xxx/yyy/zzz/readme.txt - warning: cannot submit from non-stream client No files to submit. Submit failed -- fix problems above then use 'p4 submit -c 20073'.

Is it somehow related to my setup?
Cheers,
Ilya
Previous: Luke DiamandNext: Pete Wyckoff
Message 5 of 10 in “git-p4: commits are visible in history after 'git p4 clone', but not a single file present”
  1. Ilya DogolazkyJun 11, 2012
  2. Luke DiamandJun 11, 2012
  3. Ilya DogolazkyJun 11, 2012
  4. Luke DiamandJun 11, 2012
  5. Ilya DogolazkyJun 12, 2012
  6. Pete WyckoffJun 12, 2012
  7. Ilya DogolazkyJun 13, 2012
  8. Ilya DogolazkyJun 13, 2012
  9. Luke DiamandJun 13, 2012
  10. Ilya DogolazkyJun 14, 2012

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.