{"thread":{"id":"47320","subject":"git-p4: cloning with a change number does not import all files","startedAt":"2017-11-25T20:36:01Z","lastAt":"2017-12-02T20:00:18Z","messageCount":7,"participants":["Patrick Rouleau","Lars Schneider","Luke Diamand"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"333485","messageId":"CAL1_K8AYf1jKDO8+czcqkUxDAuOODgKv9avaiikWi+4zpqenMQ@mail.gmail.com","threadId":"47320","inReplyTo":null,"subject":"git-p4: cloning with a change number does not import all files","fromName":"Patrick Rouleau","fromEmail":"prouleau72@gmail.com","sentAt":"2017-11-25T20:35:56Z","receivedAt":"2017-11-25T20:36:01Z","isPatch":false,"sender":{"key":"prouleau72@gmail.com","avatar":"https://gravatar.com/avatar/8779e3894834cde1e03b6e5ede343580eb982eca9b5b16b0c492179048818607?d=mp&s=160"},"body":"Hi,\n\nI created a git repository with these commands:\n  git p4 clone //perforce/path@123456 repo\n  cd repo\n  git p4 rebase\n\nSome files created before the change 123456 do not exist in git\nhistory. I do see why,\nbut those files were not modified after that change number.\n\nIf I use \"git p4 sync --detect-branches\" instead of \"git p4 rebase\",\nthe branch contains\nall the files, but not the main trunk, and they appear to be added in\nthe first commit of\nthe branch.\n\nTo avoid the problem, I must clone with \"@all\" or with the change number when\n//perforce/path was created, which is significantly longer.\n\nRegards,\nP. Rouleau\n"},{"id":"333605","messageId":"57A92686-9161-4234-8341-CD6FAD7AE049@gmail.com","threadId":"47320","inReplyTo":"CAL1_K8AYf1jKDO8+czcqkUxDAuOODgKv9avaiikWi+4zpqenMQ@mail.gmail.com","subject":"Re: git-p4: cloning with a change number does not import all files","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2017-11-27T12:52:17Z","receivedAt":"2017-11-27T12:52:35Z","isPatch":false,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 25 Nov 2017, at 21:35, Patrick Rouleau <prouleau72@gmail.com> wrote:\n> \n> Hi,\n> \n> I created a git repository with these commands:\n>  git p4 clone //perforce/path@123456 repo\n>  cd repo\n>  git p4 rebase\n> \n> Some files created before the change 123456 do not exist in git\n> history. I do see why,\n> but those files were not modified after that change number.\n> \n> If I use \"git p4 sync --detect-branches\" instead of \"git p4 rebase\",\n> the branch contains\n> all the files, but not the main trunk, and they appear to be added in\n> the first commit of\n> the branch.\n> \n> To avoid the problem, I must clone with \"@all\" or with the change number when\n> //perforce/path was created, which is significantly longer.\n> \n> Regards,\n> P. Rouleau\n\nHi Patrick,\n\nwhat is your goal here? Do you want to convert the repo to Git or do you\nwant to use Git to interact with a P4 repo?\n\nI mainly do the former and use the @all switch. You can greatly reduce\nthe time if your `git-p4` machine is close to the P4 server and if you\nreduce the P4 client spec used for the migration.\n\n- Lars"},{"id":"333769","messageId":"CAL1_K8C3bNMae6PFk73c7n6AvnbO=5Sujz3oqL_jBj=DpiEO1g@mail.gmail.com","threadId":"47320","inReplyTo":"57A92686-9161-4234-8341-CD6FAD7AE049@gmail.com","subject":"Re: git-p4: cloning with a change number does not import all files","fromName":"Patrick Rouleau","fromEmail":"prouleau72@gmail.com","sentAt":"2017-11-29T03:48:50Z","receivedAt":"2017-11-29T03:48:56Z","isPatch":false,"sender":{"key":"prouleau72@gmail.com","avatar":"https://gravatar.com/avatar/8779e3894834cde1e03b6e5ede343580eb982eca9b5b16b0c492179048818607?d=mp&s=160"},"body":"Hi,\n\nOn Mon, Nov 27, 2017 at 7:52 AM, Lars Schneider\n<larsxschneider@gmail.com> wrote:\n>\n> what is your goal here? Do you want to convert the repo to Git or do you\n> want to use Git to interact with a P4 repo?\n\nI want to use git to interact with a P4 repo. I am used to git tools\nand I prefer them to\nP4V. Visual Studio is also slower with P4 plugin and I hate P4\napproach to check out\na file before modifying it. The .sln files always get check outed for no reason.\n\nI am working remotely. The P4 server is behind a VPN. That one reason\nI am trying to\nclone from some point in the past. I also want to have some history to\nsee from where\ncome the code and from who.\n\nRegards,\nP. Rouleau\n"},{"id":"333905","messageId":"A6F43B7B-F0AF-46E7-B34B-7D54493E2C8B@gmail.com","threadId":"47320","inReplyTo":"CAL1_K8C3bNMae6PFk73c7n6AvnbO=5Sujz3oqL_jBj=DpiEO1g@mail.gmail.com","subject":"Re: git-p4: cloning with a change number does not import all files","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2017-12-01T12:45:52Z","receivedAt":"2017-12-01T12:46:03Z","isPatch":false,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 29 Nov 2017, at 04:48, Patrick Rouleau <prouleau72@gmail.com> wrote:\n> \n> Hi,\n> \n> On Mon, Nov 27, 2017 at 7:52 AM, Lars Schneider\n> <larsxschneider@gmail.com> wrote:\n>> \n>> what is your goal here? Do you want to convert the repo to Git or do you\n>> want to use Git to interact with a P4 repo?\n> \n> I want to use git to interact with a P4 repo. I am used to git tools\n> and I prefer them to\n> P4V. Visual Studio is also slower with P4 plugin and I hate P4\n> approach to check out\n> a file before modifying it. The .sln files always get check outed for no reason.\n> \n> I am working remotely. The P4 server is behind a VPN. That one reason\n> I am trying to\n> clone from some point in the past. I also want to have some history to\n> see from where\n> come the code and from who.\n\nOh, I am with you. However, I only used git-p4 for a very short time in the \nway you want to use it. Therefore, I don't have much experience in that kind \nof usage pattern. I was able to convice my management to move all source to \nGit and I used git-p4 to migrate the repositories ;-)\n\nHere is a talk on the topic if you want to learn more:\nhttps://www.youtube.com/watch?v=QNixDNtwYJ0\n\nCheers,\nLars"},{"id":"333955","messageId":"CAL1_K8A=7xmLCYzWa0ejtwjy9P+rD+D0cqz+kOXCaQWOgQfuEw@mail.gmail.com","threadId":"47320","inReplyTo":"A6F43B7B-F0AF-46E7-B34B-7D54493E2C8B@gmail.com","subject":"Re: git-p4: cloning with a change number does not import all files","fromName":"Patrick Rouleau","fromEmail":"prouleau72@gmail.com","sentAt":"2017-12-02T15:35:23Z","receivedAt":"2017-12-02T15:35:32Z","isPatch":false,"sender":{"key":"prouleau72@gmail.com","avatar":"https://gravatar.com/avatar/8779e3894834cde1e03b6e5ede343580eb982eca9b5b16b0c492179048818607?d=mp&s=160"},"body":"On Fri, Dec 1, 2017 at 7:45 AM, Lars Schneider <larsxschneider@gmail.com> wrote:\n> Oh, I am with you. However, I only used git-p4 for a very short time in the\n> way you want to use it. Therefore, I don't have much experience in that kind\n> of usage pattern. I was able to convice my management to move all source to\n> Git and I used git-p4 to migrate the repositories ;-)\n>\n> Here is a talk on the topic if you want to learn more:\n> https://www.youtube.com/watch?v=QNixDNtwYJ0\n>\n> Cheers,\n> Lars\n\nSadly, there is no way I convince the company to switch to git. They\nhave acquired\nmany companies in the past years and they have standardized around Perforce.\nIt is in part because they want access control and they need to store\na lot of binary\nfiles (including big VM images).\n\nI keep this video close to explain why I like git:\nhttps://www.youtube.com/watch?v=o4PFDKIc2fs\n\nRegards,\nP. Rouleau\n"},{"id":"333962","messageId":"CAE5ih78GOFqe_Vb3k_-jPiS7zbX1EdvYmsUyWvKKy=xOH9WrcQ@mail.gmail.com","threadId":"47320","inReplyTo":"CAL1_K8A=7xmLCYzWa0ejtwjy9P+rD+D0cqz+kOXCaQWOgQfuEw@mail.gmail.com","subject":"Re: git-p4: cloning with a change number does not import all files","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2017-12-02T17:55:28Z","receivedAt":"2017-12-02T17:55:35Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 2 December 2017 at 15:35, Patrick Rouleau <prouleau72@gmail.com> wrote:\n> On Fri, Dec 1, 2017 at 7:45 AM, Lars Schneider <larsxschneider@gmail.com> wrote:\n>> Oh, I am with you. However, I only used git-p4 for a very short time in the\n>> way you want to use it. Therefore, I don't have much experience in that kind\n>> of usage pattern. I was able to convice my management to move all source to\n>> Git and I used git-p4 to migrate the repositories ;-)\n>>\n>> Here is a talk on the topic if you want to learn more:\n>> https://www.youtube.com/watch?v=QNixDNtwYJ0\n>>\n>> Cheers,\n>> Lars\n>\n> Sadly, there is no way I convince the company to switch to git. They\n> have acquired\n> many companies in the past years and they have standardized around Perforce.\n> It is in part because they want access control and they need to store\n> a lot of binary\n> files (including big VM images).\n>\n> I keep this video close to explain why I like git:\n> https://www.youtube.com/watch?v=o4PFDKIc2fs\n\nI feel your pain.\n\nI think I've sort of stumbled across something like the problem you've\ndescribed in the past. Perhaps the files you need have been deleted\nand then re-integrated or some such.\n\nWould you be able to take a look at some files with this problem and\nsee if you can spot what's happened to it (\"p4 changes\" and perhaps\n\"p4 changes -i\").\n\nOne thing that can certainly happen is that Perforce gets *very*\nconfused if you start getting too clever with symlinked directories,\nand git-p4 can only do so much in the face of this. But it may be\nsomething else.\n\nThanks\nLuke\n"},{"id":"333965","messageId":"CAL1_K8DGVzcbWFPz3vbEntB08sEhrV-j-sLxAh0QhV=8KRGf-Q@mail.gmail.com","threadId":"47320","inReplyTo":"CAE5ih78GOFqe_Vb3k_-jPiS7zbX1EdvYmsUyWvKKy=xOH9WrcQ@mail.gmail.com","subject":"Re: git-p4: cloning with a change number does not import all files","fromName":"Patrick Rouleau","fromEmail":"prouleau72@gmail.com","sentAt":"2017-12-02T19:58:44Z","receivedAt":"2017-12-02T20:00:18Z","isPatch":false,"sender":{"key":"prouleau72@gmail.com","avatar":"https://gravatar.com/avatar/8779e3894834cde1e03b6e5ede343580eb982eca9b5b16b0c492179048818607?d=mp&s=160"},"body":"On Sat, Dec 2, 2017 at 12:55 PM, Luke Diamand <luke@diamand.org> wrote:\n> I think I've sort of stumbled across something like the problem you've\n> described in the past. Perhaps the files you need have been deleted\n> and then re-integrated or some such.\n>\n> Would you be able to take a look at some files with this problem and\n> see if you can spot what's happened to it (\"p4 changes\" and perhaps\n> \"p4 changes -i\").\n\nSorry, but these commands only show the date and an extract of the commit\nmessage.\n\n>\n> One thing that can certainly happen is that Perforce gets *very*\n> confused if you start getting too clever with symlinked directories,\n> and git-p4 can only do so much in the face of this. But it may be\n> something else.\n\nOverall, the depot history is very \"messy\". It contains a lot of projects. The\nproject on which I work has reach v5 and it has been branched from v4.\nFrom p4v's \"show graph\", I can see there was a 'main' branch at some point,\nbut it doesn't exist anymore.\n\nOne of the files missing from my clone only has 2 revisions and it was created\nin the v5 branch. It was created at 608436 and modified at 608816. I cloned\nfrom 610443, mainly because we added a feature branch and I want to access\nit from git too (610443 is one month before the branch creation).\n\nI will play a little bit with p4 to see if I can locate where the problem comes\nfrom and maybe hack git-p4 to make it more verbose.\n\nThanks,\nP. Rouleau\n"}]}