{"thread":{"id":"30763","subject":"git-p4: commits are visible in history after 'git p4 clone', but not a single file present","startedAt":"2012-06-11T10:03:15Z","lastAt":"2012-06-14T10:23:52Z","messageCount":10,"participants":["Ilya Dogolazky","Luke Diamand","Pete Wyckoff"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"193293","messageId":"4FD5C263.9010307@nokia.com","threadId":"30763","inReplyTo":null,"subject":"git-p4: commits are visible in history after 'git p4 clone', but not a single file present","fromName":"Ilya Dogolazky","fromEmail":"ilya.dogolazky@nokia.com","sentAt":"2012-06-11T10:03:15Z","receivedAt":"2012-06-11T10:03:15Z","isPatch":false,"sender":{"key":"ilya.dogolazky@nokia.com","avatar":null},"body":"Hi !\n\nI hope this is the right mailing list for question regarding the usage \nof git-p4, sorry if I'm wrong.\n\nHere is my problem: I'm issuing the command\n'git p4 clone //kalma/xxx/yyy@all'. (the depot //kalma/xxx/yyy/ exists \non my machine and is full of files). After this command the directory \n'yyy' is created and the history of commits is visible there by 'git log \n-p'.\n\nEvery commit contains author name, a title (related to the project I'm \nworking on, so obviously coming from perforce depot) and a single line \nlooking like this:\n\n[git-p4: depot-paths = \"//kalma/xxx/yyy/\": change = 17473]\n\nBeside of that, the commit is empty: not a single line of code is \nchanged/added. And the directory 'yyy' contains only the '.git' \nsubdirectory, so not a single file of the project is visible.\n\nPlease help me to understand what could be going on there, and what \ncould I have done wrong.\n\nThanks a lot!\n\n-- Ilya Dogolazky\n"},{"id":"193312","messageId":"CAE5ih79Lgc8vF0v=vTGZSwASsGwQWs2Q7h_AkW67RBfi-R=DCA@mail.gmail.com","threadId":"30763","inReplyTo":"4FD5C263.9010307@nokia.com","subject":"Re: git-p4: commits are visible in history after 'git p4 clone', but not a single file present","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2012-06-11T15:28:04Z","receivedAt":"2012-06-11T15:28:04Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On Mon, Jun 11, 2012 at 11:03 AM, Ilya Dogolazky\n<ilya.dogolazky@nokia.com> wrote:\n> Hi !\n>\n> I hope this is the right mailing list for question regarding the usage of\n> git-p4, sorry if I'm wrong.\n\nThis is the right place!\n\n>\n> Here is my problem: I'm issuing the command\n> 'git p4 clone //kalma/xxx/yyy@all'. (the depot //kalma/xxx/yyy/ exists on my\n> machine and is full of files). After this command the directory 'yyy' is\n> created and the history of commits is visible there by 'git log -p'.\n>\n> Every commit contains author name, a title (related to the project I'm\n> working on, so obviously coming from perforce depot) and a single line\n> looking like this:\n>\n> [git-p4: depot-paths = \"//kalma/xxx/yyy/\": change = 17473]\n>\n> Beside of that, the commit is empty: not a single line of code is\n> changed/added. And the directory 'yyy' contains only the '.git'\n> subdirectory, so not a single file of the project is visible.\n>\n> Please help me to understand what could be going on there, and what could I\n> have done wrong.\n\nIf you do something like \"p4 describe 17473\" what does that show?\nAre the files changed all contained with //kalma/xxx/yyy?\n\nIt could be that there's a p4 version problem going on - which version\nof p4 are you\nusing? And which platform are you using?\n\nThanks,\nLuke\n"},{"id":"193363","messageId":"4FD6440C.7090900@nokia.com","threadId":"30763","inReplyTo":"CAE5ih79Lgc8vF0v=vTGZSwASsGwQWs2Q7h_AkW67RBfi-R=DCA@mail.gmail.com","subject":"Re: git-p4: commits are visible in history after 'git p4 clone', but not a single file present","fromName":"Ilya Dogolazky","fromEmail":"ilya.dogolazky@nokia.com","sentAt":"2012-06-11T19:16:28Z","receivedAt":"2012-06-11T19:16:28Z","isPatch":false,"sender":{"key":"ilya.dogolazky@nokia.com","avatar":null},"body":"Hi Luke!\n\n06/11/2012 06:28 PM, ext Luke Diamand написал:\n> If you do something like \"p4 describe 17473\" what does that show?\nFirst I see a line containing the change number, my colleague's name and \ndate, then the commit title (identical to one printed by \"git log\"), \nthen a list of files [every line begins with \"... //xxx/yyy/\"], then the \nword \"Differences\" and then something looking very much like output of \n'diff' command (the actual commit differences).\n\n> Are the files changed all contained with //kalma/xxx/yyy?\nYes, they are.\n\n> It could be that there's a p4 version problem going on - which version\n> of p4 are you\n> using?\nThe output of 'p4 -V' contains \"Rev. P4/LINUX26X86/2012.1/459601 \n(2012/05/11)\". That's probably the version of my command line client.\n\nThe output of \"p4 info\" contains \"P4D/LINUX26X86_64/2011.1/428451 \n(2012/03/08)\" --- that's probably the version of the server.\n\nThe version of git installation (by debian package) is 1:1.7.10-1 (as \nreported by \"dpkg -l git\"). The package contains the file \n\"/usr/share/doc/git/contrib/fast-import/git-p4\" which I copied to \n$HOME/bin/git-p4 in order to have in $PATH and with executable bit. \nCould it be, that I did something wrong here by making this manually?\n\n > And which platform are you using?\nDebian GNU/Linux.\n\nI hope I provided all the needed information, of not please ask for more.\n\nCheers,\n\nIlya\n"},{"id":"193401","messageId":"4FD67530.1090002@diamand.org","threadId":"30763","inReplyTo":"4FD6440C.7090900@nokia.com","subject":"Re: git-p4: commits are visible in history after 'git p4 clone', but not a single file present","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2012-06-11T22:46:08Z","receivedAt":"2012-06-11T22:46:08Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 11/06/12 20:16, Ilya Dogolazky wrote:\n> Hi Luke!\n> \n> 06/11/2012 06:28 PM, ext Luke Diamand написал:\n>> If you do something like \"p4 describe 17473\" what does that show?\n> First I see a line containing the change number, my colleague's name and \n> date, then the commit title (identical to one printed by \"git log\"), \n> then a list of files [every line begins with \"... //xxx/yyy/\"], then the \n> word \"Differences\" and then something looking very much like output of \n> 'diff' command (the actual commit differences).\n> \n>> Are the files changed all contained with //kalma/xxx/yyy?\n> Yes, they are.\n> \n>> It could be that there's a p4 version problem going on - which version\n>> of p4 are you\n>> using?\n> The output of 'p4 -V' contains \"Rev. P4/LINUX26X86/2012.1/459601 \n> (2012/05/11)\". That's probably the version of my command line client.\n> \n> The output of \"p4 info\" contains \"P4D/LINUX26X86_64/2011.1/428451 \n> (2012/03/08)\" --- that's probably the version of the server.\n> \n> The version of git installation (by debian package) is 1:1.7.10-1 (as \n> reported by \"dpkg -l git\"). The package contains the file \n> \"/usr/share/doc/git/contrib/fast-import/git-p4\" which I copied to \n> $HOME/bin/git-p4 in order to have in $PATH and with executable bit. \n> Could it be, that I did something wrong here by making this manually?\n\nThat version of git-p4 seems different to the one in the repo. I think it's just a bit older.\n\n> \n>  > And which platform are you using?\n> Debian GNU/Linux.\n> \n> I hope I provided all the needed information, of not please ask for more.\n\nCan you try an experiment please. Try running the following commands. When I run them I get out a file that looks correct.\n\n#!/bin/sh\nexport P4PORT=localhost:1234\nmkdir db cli\n(cd db && p4d &)\nsleep 2\n(cd cli && EDITOR=: p4 client && date >foo.c && p4 add foo.c && p4 submit -d 'x')\ngit-p4 clone //depot@all\n\nI've been trying out Debian's 1.7.10.1 and it seems fine, other than having a slightly old version of git-p4 and it not being installed properly.\n\n\n> \n> Cheers,\n> \n> Ilya\n"},{"id":"193427","messageId":"4FD70DEB.7040506@nokia.com","threadId":"30763","inReplyTo":"4FD67530.1090002@diamand.org","subject":"Re: git-p4: commits are visible in history after 'git p4 clone', but not a single file present","fromName":"Ilya Dogolazky","fromEmail":"ilya.dogolazky@nokia.com","sentAt":"2012-06-12T09:37:47Z","receivedAt":"2012-06-12T09:37:47Z","isPatch":false,"sender":{"key":"ilya.dogolazky@nokia.com","avatar":null},"body":"Hi Luke!\n\n > #!/bin/sh\n > export P4PORT=localhost:1234\n > mkdir db cli\n > ( cd db && p4d & )\n > sleep 2\n > ( cd cli && EDITOR=: p4 client && date >foo.c &&\n >   p4 add foo.c && p4 submit -d 'x' )\n > git-p4 clone //depot@all\n\nI installed p4d on my machine and executed the above script.\nIt works, the file foo.c is visible in the copy and one line patch is \nvisible by \"git log -p\". Everything is fine!\n\nThen I realize, that the \"git-p4\" call in your script is communicating \nwith the p4 daemon directly, which is much more simple setup than I \ntried to use before. Then I changed the clone command: instead of\n  $ git p4 clone //kalma/xxx/yyy@all\nI now tried\n  $ git p4 clone //xxx/yyy@all\nafter setting P4PORT etc to point to the company's perforce server. And \nit worked!\n\nThen I even tried\n$ git p4 clone //xxx@all\nAnd it worked too (creating a huge git repository with the whole project).\n\nUntil today I tried to use the following setup: first clone the whole \nperforce repository with p4 command line client to my machine ('kalma' \nis its name) and then make a git repository by \"git-p4 clone\" from this \nintermediate location (and it seems I did something wrong there: files \nwere visible in the intermediate location after the first step, but not \nin the end location after git-p4). I read it somewhere in documentation \nclaiming that it's the only way to use git-p4. But now I see, that it \nseems not to be necessary. Please clarify, is it okay to skip this \nintermediate location and use git-p4 in the same way as your script does?\n\nAnd another question, probably connected to above: Now I did this:\n$ git p4 clone //xxx/yyy@all\n$ cd yyy/zzz\n$ edit readme.txt (which was already present there)\n$ git commit readme.txt\n$ git p4 rebase (Current branch master is up to date)\n$ git p4 submit\n\nThat last step failed with following messages:\nSubmitting change 20073\n... //xxx/yyy/zzz/readme.txt -  warning: cannot submit from non-stream \nclient\nNo files to submit.\nSubmit failed -- fix problems above then use 'p4 submit -c 20073'.\n\nIs it somehow related to my setup?\n\nCheers,\n\nIlya\n"},{"id":"193517","messageId":"20120612222431.GA13427@padd.com","threadId":"30763","inReplyTo":"4FD70DEB.7040506@nokia.com","subject":"Re: git-p4: commits are visible in history after 'git p4 clone', but not a single file present","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2012-06-12T22:24:31Z","receivedAt":"2012-06-12T22:24:31Z","isPatch":false,"sender":{"key":"pw@padd.com","avatar":null},"body":"ilya.dogolazky@nokia.com wrote on Tue, 12 Jun 2012 12:37 +0300:\n> Hi Luke!\n> \n> > #!/bin/sh\n> > export P4PORT=localhost:1234\n> > mkdir db cli\n> > ( cd db && p4d & )\n> > sleep 2\n> > ( cd cli && EDITOR=: p4 client && date >foo.c &&\n> >   p4 add foo.c && p4 submit -d 'x' )\n> > git-p4 clone //depot@all\n> \n> I installed p4d on my machine and executed the above script.\n> It works, the file foo.c is visible in the copy and one line patch\n> is visible by \"git log -p\". Everything is fine!\n> \n> Then I realize, that the \"git-p4\" call in your script is\n> communicating with the p4 daemon directly, which is much more simple\n> setup than I tried to use before. Then I changed the clone command:\n> instead of\n>  $ git p4 clone //kalma/xxx/yyy@all\n> I now tried\n>  $ git p4 clone //xxx/yyy@all\n> after setting P4PORT etc to point to the company's perforce server.\n> And it worked!\n\nFascinating.  So //kalma/xxx/yyy is a depot hosted in a p4d that runs\non your local box, but //xxx/yyy is the depot name hosted in\nthe company's p4d?\n\n> Then I even tried\n> $ git p4 clone //xxx@all\n> And it worked too (creating a huge git repository with the whole project).\n> \n> Until today I tried to use the following setup: first clone the\n> whole perforce repository with p4 command line client to my machine\n> ('kalma' is its name) and then make a git repository by \"git-p4\n> clone\" from this intermediate location (and it seems I did something\n> wrong there: files were visible in the intermediate location after\n> the first step, but not in the end location after git-p4). I read it\n> somewhere in documentation claiming that it's the only way to use\n> git-p4. But now I see, that it seems not to be necessary. Please\n> clarify, is it okay to skip this intermediate location and use\n> git-p4 in the same way as your script does?\n\nI'm completely confused that //kalma/xxx/yyy even appeard to work\nat all.  Will be interested to see your P4PORT setting when using\nthat repo.\n\n> And another question, probably connected to above: Now I did this:\n> $ git p4 clone //xxx/yyy@all\n> $ cd yyy/zzz\n> $ edit readme.txt (which was already present there)\n> $ git commit readme.txt\n> $ git p4 rebase (Current branch master is up to date)\n> $ git p4 submit\n> \n> That last step failed with following messages:\n> Submitting change 20073\n> ... //xxx/yyy/zzz/readme.txt -  warning: cannot submit from\n> non-stream client\n> No files to submit.\n> Submit failed -- fix problems above then use 'p4 submit -c 20073'.\n\nOoh.  You're using the shiny new \"streams\" feature in p4,\nI think.  Can you play with \"p4 stream\" to see if one is\ndefined on //xxx or //xxx/yyy?.\n\nCould be that the work-around is to use \"p4 client\" to\nset the \"Stream\" field.  This p4 forum post talks about\nusing \"p4 client -s -S ...\".\n\nhttp://forums.perforce.com/index.php?/topic/1139-seeding-streams-from-existing-depots-failed/\n\nwhich is explained at the bottom of this section:\n\nhttp://www.perforce.com/perforce/doc.current/manuals/p4guide/06_codemgmt.html#1066766\n\nIf you can help us understand the problem a bit better,\na reasonable fix might be to detect this situation in\ngit-p4 and at least explain how to fix it.  Since git-p4\ndoes not create the client used for submit, we don't have\nmuch control over its settings.\n\n\t\t-- Pete\n"},{"id":"193523","messageId":"4FD83A08.6070208@nokia.com","threadId":"30763","inReplyTo":"20120612222431.GA13427@padd.com","subject":"Re: git-p4: commits are visible in history after 'git p4 clone', but not a single file present","fromName":"Ilya Dogolazky","fromEmail":"ilya.dogolazky@nokia.com","sentAt":"2012-06-13T06:58:16Z","receivedAt":"2012-06-13T06:58:16Z","isPatch":false,"sender":{"key":"ilya.dogolazky@nokia.com","avatar":null},"body":"Hi Pete !\n\n06/13/2012 01:24 AM, ext Pete Wyckoff написал:\n> Fascinating.  So //kalma/xxx/yyy is a depot hosted in a p4d that runs\n> on your local box, but //xxx/yyy is the depot name hosted in\n> the company's p4d?\n\nNo. But now I think I understand, what I did wrong. There is no p4d \nrunning on my own machine. \"kalma\" in this case is the name of the so \ncalled \"perforce client\" I tried to use. And I think my error was to \nexpress \"please use perforce client 'kalma' to access depot '//xxx/yyy'\" \nby the string \"//kalma/xxx/yyy\", which is wrong. I'm pretty sure it was \nnot quite my own idea to do so, probably I misunderstood some piece of \ndocumentation somewhere.\n\n> I'm completely confused that //kalma/xxx/yyy even appeard to work\n> at all.  Will be interested to see your P4PORT setting when using\n> that repo.\n\nAnd I think I understand now, why \"//kalma/xxx/yyy\" appeared to work: it \ntook all the commits, but as I wanted to have something beginning with \n\"kalma\" I got no files, because everything begins with \"xxx\" (and couple \nof other names, none of them is equal to 'kalma'). Does this explanation \nseem reasonable?\n\n> Ooh.  You're using the shiny new \"streams\" feature in p4,\n> I think.  Can you play with \"p4 stream\" to see if one is\n> defined on //xxx or //xxx/yyy?.\n\nYes, alas I have to use it. Now I re-defined my \"client\" settings, \nincluded the stream there and started from the beginning. Here is what I \ndid:\n\n$ p4 client (and edit opened file .....)\nClient xexe1 saved.\n$ P4CLIENT=xexe1 p4 sync\n//xxx/yyy/zzz/readme.txt#1 - added as /x/data/tmp/xexe/yyy/zzz/readme.txt\n$ P4CLIENT=xexe1 git p4 clone //xxx/yyy@all ~/xexe1\nImporting from //xxx/yyy into /home/ilya/xexe1\nInitialized empty Git repository in /home/ilya/xexe1/.git/\nDoing initial import of //xxx/yyy/ from revision #head into \nrefs/remotes/p4/master\n$ cd ~/xexe1\n$ vim zzz/readme.txt (and edit it)\n$ git commit zzz/readme.txt\n\nUntil now everything worked fine, so now is time to submit the changes \non readme.txt file (\"rebase\" is not needed, as no changes happened yet \nsince I cloned).\n\n$ P4CLIENT=xexe1 git p4 submit\nError: Cannot locate perforce checkout of //xxx/yyy/ in client view\n\nThis message comes from git-p4 script somewhere around line 1276 and I \ndon't understand its meaning.\n\nThen I tried to set git-p4.useclientspec to \"true\" and I got the message:\n$ P4CLIENT=xexe1 git p4 submit\nCan't handle %n wildcards in view: //xxx/yyy/zzz/somefile%%1\n\nThis \"%%1\" is visible in client config (as opened in editor during \nexecution \"P4CLIENT=xexe1 p4 client\"), but I have not added it by \nmyself: this line [and many other similar lines in View: section] was \nadded after I set \"Stream: //xxx/yyy\" there. The beginning of View: \nsection looks like this now:\n\n//xxx/yyy/zzz/... //xexe1/zzz/...\n-//xxx/yyy/zzz/somefile%%1 //xexe1/zzz/somefile%%1\n\n(yes, it begins with '-' and there are many other lines beginning with \n'-', but this one is the only one containing '%%')\n\nWhat do you think, is it now something wrong with git-p4 or is it again \nsomething wrong in my setup?\n\nCheers,\n\nIlya\n"},{"id":"193537","messageId":"4FD88DE0.4050606@nokia.com","threadId":"30763","inReplyTo":"4FD83A08.6070208@nokia.com","subject":"Re: git-p4: commits are visible in history after 'git p4 clone', but not a single file present","fromName":"Ilya Dogolazky","fromEmail":"ilya.dogolazky@nokia.com","sentAt":"2012-06-13T12:56:00Z","receivedAt":"2012-06-13T12:56:00Z","isPatch":false,"sender":{"key":"ilya.dogolazky@nokia.com","avatar":null},"body":"Hi !\n\n06/13/2012 09:58 AM, Ilya Dogolazky написал:\n> $ P4CLIENT=xexe1 git p4 submit\n> Error: Cannot locate perforce checkout of //xxx/yyy/ in client view\n\nAfter some playing around with git-p4 script and adding debugging \nprinting I realized, that the solution is to do\n\n$ P4CLIENT=xexe1 git p4 clone //xxx/yyy/zzz@all ~/xexe1\ninstead of just\n$ P4CLIENT=xexe1 git p4 clone //xxx/yyy@all ~/xexe1\n\nAfter that \"git-p4 submit\" started to work.\n\nI still don't understand p4 enough in order to know why it's happening, \nbut now at least I can clone+change+rebase+submit files into the \nperforce repository with git-p4, which is great.\n\nLuke, Pete: thanks a lot for your help and patience!\n\nCheers,\n\nIlya\n"},{"id":"193559","messageId":"4FD8D527.6050703@diamand.org","threadId":"30763","inReplyTo":"4FD88DE0.4050606@nokia.com","subject":"Re: git-p4: commits are visible in history after 'git p4 clone', but not a single file present","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2012-06-13T18:00:07Z","receivedAt":"2012-06-13T18:00:07Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 13/06/12 13:56, Ilya Dogolazky wrote:\n> Hi !\n>\n> 06/13/2012 09:58 AM, Ilya Dogolazky написал:\n>> $ P4CLIENT=xexe1 git p4 submit\n>> Error: Cannot locate perforce checkout of //xxx/yyy/ in client view\n>\n> After some playing around with git-p4 script and adding debugging\n> printing I realized, that the solution is to do\n>\n> $ P4CLIENT=xexe1 git p4 clone //xxx/yyy/zzz@all ~/xexe1\n> instead of just\n> $ P4CLIENT=xexe1 git p4 clone //xxx/yyy@all ~/xexe1\n>\n> After that \"git-p4 submit\" started to work.\n>\n> I still don't understand p4 enough in order to know why it's happening,\n> but now at least I can clone+change+rebase+submit files into the\n> perforce repository with git-p4, which is great.\n>\n> Luke, Pete: thanks a lot for your help and patience!\n\nSo - what is a p4 stream? I found some blurb on the Perforce website but \nI was none the wiser after reading it.\n\nThanks!\nLuke\n"},{"id":"193645","messageId":"CACnyznXMQyxOF+P-BdryX7duZkC4fSc6=AW1=xJbx9U8rH=ovQ@mail.gmail.com","threadId":"30763","inReplyTo":"4FD8D527.6050703@diamand.org","subject":"Re: git-p4: commits are visible in history after 'git p4 clone', but not a single file present","fromName":"Ilya Dogolazky","fromEmail":"ilya.dogolazky@googlemail.com","sentAt":"2012-06-14T10:23:52Z","receivedAt":"2012-06-14T10:23:52Z","isPatch":false,"sender":{"key":"ilya.dogolazky@googlemail.com","avatar":null},"body":"Hi !\n\n2012/6/13 Luke Diamand <luke@diamand.org>:\n> So - what is a p4 stream? I found some blurb on the Perforce website but I\n> was none the wiser after reading it.\n\nTo be honest, I don't have any idea (and my whole p4 experience is\nless than one week long). As our local p4 guru explained to me, a\n\"stream\" is some kind of writeable area in depot and every \"client\"\ncan have 0 or 1 \"streams\". If a client has a stream, then it's called\n\"streamable\" and one can submit changes to this particular area (which\nmeans more or less directory) by using this particular client. I don't\nknow if this story is sane, but at least this explains my problems\nwhile I tried to submit changes.\n\nCheers,\n\nIlya\n"}]}