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

Re: git p4 clone - exclude file types

From
FusionX86 <fusionx86@gmail.com>
Date
May 19, 2015, 07:38 UTC
Message-ID
<CAFcBi89XwW48Goaap=OCVQ_CJrNa_hj5+DWtOHGOsrm6jMs-mw@mail.gmail.com>
In-Reply-To
<555A52BD.1030802@diamand.org>

Thanks Luke, looks like this does work for excluding files when using git p4. Great!

Unrelated question...

While using git p4 I have noticed that most of the time the clone/sync operations hang and I have to keep retrying. The Perforce depot I'm currently working with is larger than I'd like and has a lot of binary files which might be the cause. The point it gets to in the clone/sync is always random and doesn't ever stop on the same files or file types. Sometimes it'll die soon after starting, but other times it almost completes and then dies. If I keep retrying, it will eventually complete. I haven't been able to narrow down the cause, but I do notice that the git-fast-import stops right as the clone/sync dies. I'm wondering if git is overwhelmed and terminates. Have you ever seen this? Any suggestions?

As always, thanks for the help while I work through this migration project.
On Mon, May 18, 2015 at 2:59 PM, Luke Diamand <luke@diamand.org> wrote:
Show 30 quoted lines
> On 18/05/15 18:59, FusionX86 wrote:
>>
>> Hello,
>>
>> Anyone know of a way to 'git p4 clone' and exclude files by type or
>> name? For example, I want to clone a depot, but not pull down any .exe
>> files. Haven't been able to find an answer in docs or other searches.
>
>
> I think you can use a client spec which excludes the files you want.
>
> First, create a client spec that excludes the files you don't want:
>
> Client: myclient
> View:
>     //depot/mystuff/...  //myclient/...
>     -//depot/mystuff/...exe  //myclient/...exe
>
> Then clone with the --use-client-spec option:
>
> $ export P4CLIENT=myclient
> $ git p4 clone --use-client-spec //depot/mystuff
>
> And later on, when you want to catch up:
>
> $ cd mystuff
> $ git p4 sync --use-client-spec
>
> Luke
>
Previous: Luke DiamandNext: Luke Diamand
Message 3 of 7 in “git p4 clone - exclude file types”
  1. FusionX86May 18, 2015
  2. Luke DiamandMay 18, 2015
  3. FusionX86May 19, 2015
  4. Luke DiamandMay 20, 2015
  5. FusionX86May 21, 2015
  6. Luke DiamandMay 21, 2015
  7. FusionX86May 22, 2015

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.