Re: git-p4: commits are visible in history after 'git p4 clone', but not a single file present
From: Ilya Dogolazky <hidden>
Date: 2016-06-15 22:54:03
Hi Pete ! 06/13/2012 01:24 AM, ext Pete Wyckoff написал:
Fascinating. So //kalma/xxx/yyy is a depot hosted in a p4d that runs on your local box, but //xxx/yyy is the depot name hosted in the company's p4d?
No. But now I think I understand, what I did wrong. There is no p4d running on my own machine. "kalma" in this case is the name of the so called "perforce client" I tried to use. And I think my error was to express "please use perforce client 'kalma' to access depot '//xxx/yyy'" by the string "//kalma/xxx/yyy", which is wrong. I'm pretty sure it was not quite my own idea to do so, probably I misunderstood some piece of documentation somewhere.
I'm completely confused that //kalma/xxx/yyy even appeard to work at all. Will be interested to see your P4PORT setting when using that repo.
And I think I understand now, why "//kalma/xxx/yyy" appeared to work: it took all the commits, but as I wanted to have something beginning with "kalma" I got no files, because everything begins with "xxx" (and couple of other names, none of them is equal to 'kalma'). Does this explanation seem reasonable?
Ooh. You're using the shiny new "streams" feature in p4, I think. Can you play with "p4 stream" to see if one is defined on //xxx or //xxx/yyy?.
Yes, alas I have to use it. Now I re-defined my "client" settings,
included the stream there and started from the beginning. Here is what I
did:
$ p4 client (and edit opened file .....)
Client xexe1 saved.
$ P4CLIENT=xexe1 p4 sync
//xxx/yyy/zzz/readme.txt#1 - added as /x/data/tmp/xexe/yyy/zzz/readme.txt
$ P4CLIENT=xexe1 git p4 clone //xxx/yyy@all ~/xexe1
Importing from //xxx/yyy into /home/ilya/xexe1
Initialized empty Git repository in /home/ilya/xexe1/.git/
Doing initial import of //xxx/yyy/ from revision #head into
refs/remotes/p4/master
$ cd ~/xexe1
$ vim zzz/readme.txt (and edit it)
$ git commit zzz/readme.txt
Until now everything worked fine, so now is time to submit the changes
on readme.txt file ("rebase" is not needed, as no changes happened yet
since I cloned).
$ P4CLIENT=xexe1 git p4 submit
Error: Cannot locate perforce checkout of //xxx/yyy/ in client view
This message comes from git-p4 script somewhere around line 1276 and I
don't understand its meaning.
Then I tried to set git-p4.useclientspec to "true" and I got the message:
$ P4CLIENT=xexe1 git p4 submit
Can't handle %n wildcards in view: //xxx/yyy/zzz/somefile%%1
This "%%1" is visible in client config (as opened in editor during
execution "P4CLIENT=xexe1 p4 client"), but I have not added it by
myself: this line [and many other similar lines in View: section] was
added after I set "Stream: //xxx/yyy" there. The beginning of View:
section looks like this now:
//xxx/yyy/zzz/... //xexe1/zzz/...
-//xxx/yyy/zzz/somefile%%1 //xexe1/zzz/somefile%%1
(yes, it begins with '-' and there are many other lines beginning with
'-', but this one is the only one containing '%%')
What do you think, is it now something wrong with git-p4 or is it again
something wrong in my setup?
Cheers,
Ilya