{"thread":{"id":"39358","subject":"git p4 clone - exclude file types","startedAt":"2015-05-18T17:59:11Z","lastAt":"2015-05-22T01:33:44Z","messageCount":7,"participants":["FusionX86","Luke Diamand"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"261481","messageId":"CAFcBi88K-HEn4JCVkONq3h4O9XS1FFX0OXch2d-VJ2bLEsPM0g@mail.gmail.com","threadId":"39358","inReplyTo":null,"subject":"git p4 clone - exclude file types","fromName":"FusionX86","fromEmail":"fusionx86@gmail.com","sentAt":"2015-05-18T17:59:11Z","receivedAt":"2015-05-18T17:59:11Z","isPatch":false,"sender":{"key":"fusionx86@gmail.com","avatar":"https://gravatar.com/avatar/90e4d2885c409dfd8c17dae58e16366269ade40c530c37c0835c0a4942a32698?d=mp&s=160"},"body":"Hello,\n\nAnyone know of a way to 'git p4 clone' and exclude files by type or\nname? For example, I want to clone a depot, but not pull down any .exe\nfiles. Haven't been able to find an answer in docs or other searches.\n"},{"id":"261513","messageId":"555A52BD.1030802@diamand.org","threadId":"39358","inReplyTo":"CAFcBi88K-HEn4JCVkONq3h4O9XS1FFX0OXch2d-VJ2bLEsPM0g@mail.gmail.com","subject":"Re: git p4 clone - exclude file types","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2015-05-18T20:59:41Z","receivedAt":"2015-05-18T20:59:41Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 18/05/15 18:59, FusionX86 wrote:\n> Hello,\n>\n> Anyone know of a way to 'git p4 clone' and exclude files by type or\n> name? For example, I want to clone a depot, but not pull down any .exe\n> files. Haven't been able to find an answer in docs or other searches.\n\nI think you can use a client spec which excludes the files you want.\n\nFirst, create a client spec that excludes the files you don't want:\n\nClient: myclient\nView:\n     //depot/mystuff/...  //myclient/...\n     -//depot/mystuff/...exe  //myclient/...exe\n\nThen clone with the --use-client-spec option:\n\n$ export P4CLIENT=myclient\n$ git p4 clone --use-client-spec //depot/mystuff\n\nAnd later on, when you want to catch up:\n\n$ cd mystuff\n$ git p4 sync --use-client-spec\n\nLuke\n"},{"id":"261538","messageId":"CAFcBi89XwW48Goaap=OCVQ_CJrNa_hj5+DWtOHGOsrm6jMs-mw@mail.gmail.com","threadId":"39358","inReplyTo":"555A52BD.1030802@diamand.org","subject":"Re: git p4 clone - exclude file types","fromName":"FusionX86","fromEmail":"fusionx86@gmail.com","sentAt":"2015-05-19T07:38:24Z","receivedAt":"2015-05-19T07:38:24Z","isPatch":false,"sender":{"key":"fusionx86@gmail.com","avatar":"https://gravatar.com/avatar/90e4d2885c409dfd8c17dae58e16366269ade40c530c37c0835c0a4942a32698?d=mp&s=160"},"body":"Thanks Luke, looks like this does work for excluding files when using\ngit p4. Great!\n\nUnrelated question...\n\nWhile using git p4 I have noticed that most of the time the clone/sync\noperations hang and I have to keep retrying. The Perforce depot I'm\ncurrently working with is larger than I'd like and has a lot of binary\nfiles which might be the cause. The point it gets to in the clone/sync\nis always random and doesn't ever stop on the same files or file\ntypes. Sometimes it'll die soon after starting, but other times it\nalmost completes and then dies. If I keep retrying, it will eventually\ncomplete. I haven't been able to narrow down the cause, but I do\nnotice that the git-fast-import stops right as the clone/sync dies.\nI'm wondering if git is overwhelmed and terminates. Have you ever seen\nthis? Any suggestions?\n\nAs always, thanks for the help while I work through this migration project.\n\nOn Mon, May 18, 2015 at 2:59 PM, Luke Diamand <luke@diamand.org> wrote:\n> On 18/05/15 18:59, FusionX86 wrote:\n>>\n>> Hello,\n>>\n>> Anyone know of a way to 'git p4 clone' and exclude files by type or\n>> name? For example, I want to clone a depot, but not pull down any .exe\n>> files. Haven't been able to find an answer in docs or other searches.\n>\n>\n> I think you can use a client spec which excludes the files you want.\n>\n> First, create a client spec that excludes the files you don't want:\n>\n> Client: myclient\n> View:\n>     //depot/mystuff/...  //myclient/...\n>     -//depot/mystuff/...exe  //myclient/...exe\n>\n> Then clone with the --use-client-spec option:\n>\n> $ export P4CLIENT=myclient\n> $ git p4 clone --use-client-spec //depot/mystuff\n>\n> And later on, when you want to catch up:\n>\n> $ cd mystuff\n> $ git p4 sync --use-client-spec\n>\n> Luke\n>\n"},{"id":"261634","messageId":"555C2E5D.70502@diamand.org","threadId":"39358","inReplyTo":"CAFcBi89XwW48Goaap=OCVQ_CJrNa_hj5+DWtOHGOsrm6jMs-mw@mail.gmail.com","subject":"Re: git p4 clone - exclude file types","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2015-05-20T06:49:01Z","receivedAt":"2015-05-20T06:49:01Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 19/05/15 08:38, FusionX86 wrote:\n> Thanks Luke, looks like this does work for excluding files when using\n> git p4. Great!\n>\n> Unrelated question...\n>\n> While using git p4 I have noticed that most of the time the clone/sync\n> operations hang and I have to keep retrying. The Perforce depot I'm\n> currently working with is larger than I'd like and has a lot of binary\n> files which might be the cause. The point it gets to in the clone/sync\n> is always random and doesn't ever stop on the same files or file\n> types. Sometimes it'll die soon after starting, but other times it\n> almost completes and then dies. If I keep retrying, it will eventually\n> complete. I haven't been able to narrow down the cause, but I do\n> notice that the git-fast-import stops right as the clone/sync dies.\n> I'm wondering if git is overwhelmed and terminates. Have you ever seen\n> this? Any suggestions?\n\nRunning out of memory?\n\nIs this on a 32bit or 64bit system? How much virtual memory do you have?\n\nLuke\n"},{"id":"261851","messageId":"CAFcBi8-SShvWLS7sRy3L=vF=OmQqmroK5NpcuA9N=0J2x4DEXA@mail.gmail.com","threadId":"39358","inReplyTo":"555C2E5D.70502@diamand.org","subject":"Re: git p4 clone - exclude file types","fromName":"FusionX86","fromEmail":"fusionx86@gmail.com","sentAt":"2015-05-21T20:49:14Z","receivedAt":"2015-05-21T20:49:14Z","isPatch":false,"sender":{"key":"fusionx86@gmail.com","avatar":"https://gravatar.com/avatar/90e4d2885c409dfd8c17dae58e16366269ade40c530c37c0835c0a4942a32698?d=mp&s=160"},"body":"I thought about that, but no. The box I'm running git-p4 on has the\nfollowing specs:\n\nCentOS 6.6 64bit\n1 CPU\n8GB RAM\n8GB Swap\n\nIt is also on the same physical network as the Perforce server. I\nremember seeing someone else complain about this, but I can't find the\narticle/blog now.\n\n\nOn Wed, May 20, 2015 at 12:49 AM, Luke Diamand <luke@diamand.org> wrote:\n> On 19/05/15 08:38, FusionX86 wrote:\n>>\n>> Thanks Luke, looks like this does work for excluding files when using\n>> git p4. Great!\n>>\n>> Unrelated question...\n>>\n>> While using git p4 I have noticed that most of the time the clone/sync\n>> operations hang and I have to keep retrying. The Perforce depot I'm\n>> currently working with is larger than I'd like and has a lot of binary\n>> files which might be the cause. The point it gets to in the clone/sync\n>> is always random and doesn't ever stop on the same files or file\n>> types. Sometimes it'll die soon after starting, but other times it\n>> almost completes and then dies. If I keep retrying, it will eventually\n>> complete. I haven't been able to narrow down the cause, but I do\n>> notice that the git-fast-import stops right as the clone/sync dies.\n>> I'm wondering if git is overwhelmed and terminates. Have you ever seen\n>> this? Any suggestions?\n>\n>\n> Running out of memory?\n>\n> Is this on a 32bit or 64bit system? How much virtual memory do you have?\n>\n> Luke\n>\n"},{"id":"261858","messageId":"555E5304.5030502@diamand.org","threadId":"39358","inReplyTo":"CAFcBi8-SShvWLS7sRy3L=vF=OmQqmroK5NpcuA9N=0J2x4DEXA@mail.gmail.com","subject":"Re: git p4 clone - exclude file types","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2015-05-21T21:49:56Z","receivedAt":"2015-05-21T21:49:56Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 21/05/15 21:49, FusionX86 wrote:\n> I thought about that, but no. The box I'm running git-p4 on has the\n> following specs:\n>\n> CentOS 6.6 64bit\n> 1 CPU\n> 8GB RAM\n> 8GB Swap\n\nCan you post the output, with \"-v\" added?\n\n$ git-p4 clone //depot/some/dir -v\n\nAlso, what is your p4d server version?\n\n$ p4 info\n\nA quick test just cloning a repo with 4 files of 256MB each seems fine, \nFWIW.\n\n>\n> It is also on the same physical network as the Perforce server. I\n> remember seeing someone else complain about this, but I can't find the\n> article/blog now.\n>\n>\n> On Wed, May 20, 2015 at 12:49 AM, Luke Diamand <luke@diamand.org> wrote:\n>> On 19/05/15 08:38, FusionX86 wrote:\n>>>\n>>> Thanks Luke, looks like this does work for excluding files when using\n>>> git p4. Great!\n>>>\n>>> Unrelated question...\n>>>\n>>> While using git p4 I have noticed that most of the time the clone/sync\n>>> operations hang and I have to keep retrying. The Perforce depot I'm\n>>> currently working with is larger than I'd like and has a lot of binary\n>>> files which might be the cause. The point it gets to in the clone/sync\n>>> is always random and doesn't ever stop on the same files or file\n>>> types. Sometimes it'll die soon after starting, but other times it\n>>> almost completes and then dies. If I keep retrying, it will eventually\n>>> complete. I haven't been able to narrow down the cause, but I do\n>>> notice that the git-fast-import stops right as the clone/sync dies.\n>>> I'm wondering if git is overwhelmed and terminates. Have you ever seen\n>>> this? Any suggestions?\n>>\n>>\n>> Running out of memory?\n>>\n>> Is this on a 32bit or 64bit system? How much virtual memory do you have?\n>>\n>> Luke\n>>\n"},{"id":"261874","messageId":"CAFcBi884jBq9a7v8cATMkT3Wh75zmuW9mc8DfA5ZYLcCXEQEHw@mail.gmail.com","threadId":"39358","inReplyTo":"555E5304.5030502@diamand.org","subject":"Re: git p4 clone - exclude file types","fromName":"FusionX86","fromEmail":"fusionx86@gmail.com","sentAt":"2015-05-22T01:33:44Z","receivedAt":"2015-05-22T01:33:44Z","isPatch":false,"sender":{"key":"fusionx86@gmail.com","avatar":"https://gravatar.com/avatar/90e4d2885c409dfd8c17dae58e16366269ade40c530c37c0835c0a4942a32698?d=mp&s=160"},"body":"Sure, but it doesn't show anything other than the last file that\np4/git was working on. It's always a different file, but looks\nsomething like this:\n\n/path/to/file/somefile1\n/path/to/file/somefile2\n\nand then just hangs...\n\nIt is trying to clone ~42846 files.\n\nThe p4d server version is older. It hasn't been maintained and we have\nno support. The version is: P4D/NTX64/2012.1/459601 (2012/05/09)\n\nThe single CPU does hit 100% at times, but it doesn't last and load is\nnever high. Thought about adding a second CPU to see if it helps by\nchance. This isn't a show stopper since I can eventually get it to\nwork if I keep trying, but figured I'd send it out to the community.\n\nOn Thu, May 21, 2015 at 3:49 PM, Luke Diamand <luke@diamand.org> wrote:\n> On 21/05/15 21:49, FusionX86 wrote:\n>>\n>> I thought about that, but no. The box I'm running git-p4 on has the\n>> following specs:\n>>\n>> CentOS 6.6 64bit\n>> 1 CPU\n>> 8GB RAM\n>> 8GB Swap\n>\n>\n> Can you post the output, with \"-v\" added?\n>\n> $ git-p4 clone //depot/some/dir -v\n>\n> Also, what is your p4d server version?\n>\n> $ p4 info\n>\n> A quick test just cloning a repo with 4 files of 256MB each seems fine,\n> FWIW.\n>\n>\n>>\n>> It is also on the same physical network as the Perforce server. I\n>> remember seeing someone else complain about this, but I can't find the\n>> article/blog now.\n>>\n>>\n>> On Wed, May 20, 2015 at 12:49 AM, Luke Diamand <luke@diamand.org> wrote:\n>>>\n>>> On 19/05/15 08:38, FusionX86 wrote:\n>>>>\n>>>>\n>>>> Thanks Luke, looks like this does work for excluding files when using\n>>>> git p4. Great!\n>>>>\n>>>> Unrelated question...\n>>>>\n>>>> While using git p4 I have noticed that most of the time the clone/sync\n>>>> operations hang and I have to keep retrying. The Perforce depot I'm\n>>>> currently working with is larger than I'd like and has a lot of binary\n>>>> files which might be the cause. The point it gets to in the clone/sync\n>>>> is always random and doesn't ever stop on the same files or file\n>>>> types. Sometimes it'll die soon after starting, but other times it\n>>>> almost completes and then dies. If I keep retrying, it will eventually\n>>>> complete. I haven't been able to narrow down the cause, but I do\n>>>> notice that the git-fast-import stops right as the clone/sync dies.\n>>>> I'm wondering if git is overwhelmed and terminates. Have you ever seen\n>>>> this? Any suggestions?\n>>>\n>>>\n>>>\n>>> Running out of memory?\n>>>\n>>> Is this on a 32bit or 64bit system? How much virtual memory do you have?\n>>>\n>>> Luke\n>>>\n>\n"}]}