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

Re: [PATCH v7 0/7] git-p4: add support for large file systems

From
Lars Schneider <larsxschneider@gmail.com>
Date
Sep 23, 2015, 08:18 UTC
Message-ID
<CE59FE83-4EE1-41EF-85B6-63EA51BD9E3B@gmail.com>
In-Reply-To
<CAE5ih7_PBRMgobhBATUMOaRH8yPWWnEVDiFVdk+qjRzoyPq+CQ@mail.gmail.com>
On 23 Sep 2015, at 09:58, Luke Diamand <luke@diamand.org> wrote:
Show 72 quoted lines
> On 21 September 2015 at 23:41,  <larsxschneider@gmail.com> wrote:
>> From: Lars Schneider <larsxschneider@gmail.com>
>> 
>> diff to v6:
>> * fix spaces in .gitattributes for Git-LFS files (old "[:space:]", new "[[:space:]]")
>> * generated patch on top of next (95c4325) to resolve merge conflicts
> 
> Trying this out by hand (rather than using the test cases) it crashes
> for me. Am I doing something wrong?
> 
> - I've got the version of git-p4.py from
> ef93b8df71f6d8a7936786c989714868c2d3540c in Junio's ls/p4-lfs branch.
> - I have git-lfs v0.60 (just downloaded the binary distribution).
> 
> Then I created a p4 repo, and added two files in Perforce, small.txt
> and bigfile. bigfile is 400k.
> 
> Doing a regular git clone works fine:
> 
> $ mkdir depot
> $ cd depot
> $ git init .
> $ git p4 sync //depot
> $ git checkout p4/master
> 
> (I'm using git init + git sync rather than git clone so that I can
> setup the git config variables I need in the next step).
> 
> Doing a clone with LFS support though doesn't work:
> 
> $ mkdir depot2
> $ cd depot2
> $ git init
> $ git config git-p4.largeFileSystem GitLFS
> $ git config git-p4.largeFileThreshold 100k
> $ git p4 sync //depot
> Doing initial import of //depot/ from revision #head into refs/remotes/p4/master
> Traceback (most recent call last):
>  File "/home/ldiamand/git/git/git-p4.py", line 3624, in <module>
>    main()
>  File "/home/ldiamand/git/git/git-p4.py", line 3618, in main
>    if not cmd.run(args):
>  File "/home/ldiamand/git/git/git-p4.py", line 3298, in run
>    self.importHeadRevision(revision)
>  File "/home/ldiamand/git/git/git-p4.py", line 3085, in importHeadRevision
>    self.commit(details, self.extractFilesFromCommit(details), self.branch)
>  File "/home/ldiamand/git/git/git-p4.py", line 2651, in commit
>    self.streamP4Files(new_files)
>  File "/home/ldiamand/git/git/git-p4.py", line 2565, in streamP4Files
>    cb=streamP4FilesCbSelf)
>  File "/home/ldiamand/git/git/git-p4.py", line 501, in p4CmdList
>    cb(entry)
>  File "/home/ldiamand/git/git/git-p4.py", line 2559, in streamP4FilesCbSelf
>    self.streamP4FilesCb(entry)
>  File "/home/ldiamand/git/git/git-p4.py", line 2501, in streamP4FilesCb
>    self.streamOneP4File(self.stream_file, self.stream_contents)
>  File "/home/ldiamand/git/git/git-p4.py", line 2451, in streamOneP4File
>    (git_mode, contents) =
> self.largeFileSystem.processContent(self.cloneDestination, git_mode,
> relPath, contents)
>  File "/home/ldiamand/git/git/git-p4.py", line 1111, in processContent
>    return LargeFileSystem.processContent(self, cloneDestination,
> git_mode, relPath, contents)
>  File "/home/ldiamand/git/git/git-p4.py", line 1004, in processContent
>    (git_mode, contents, localLargeFile) =
> self.generatePointer(cloneDestination, contentTempFile)
>  File "/home/ldiamand/git/git/git-p4.py", line 1068, in generatePointer
>    oid,
>  File "/usr/lib/python2.7/posixpath.py", line 70, in join
>    elif path == '' or path.endswith('/'):
> AttributeError: 'NoneType' object has no attribute 'endswith'
> 
Confirmed. This is a bug!
Can you try the following sequence of commands?

$ mkdir depot2 $ cd depot2 $ git init $ git config git-p4.largeFileSystem GitLFS $ git config git-p4.largeFileThreshold 100k $ git p4 clone --destination=. //depot

I’ve always used “clone” and all test cases uses “clone”. I will fix it for “sync”.

Thanks for reporting, Lars

Previous: Luke DiamandNext: Lars Schneider
Message 15 of 21 in “git-p4: add support for large file systems”
  1. 0/7 git-p4: add support for large file systemslarsxschneider@gmail.com, Sep 21, 2015
  2. 1/7 git-p4: add optional type specifier to gitConfig readerlarsxschneider@gmail.com, Sep 21, 2015
  3. Junio C HamanoSep 22, 2015
  4. Lars SchneiderSep 23, 2015
  5. 2/7 git-p4: add gitConfigInt readerlarsxschneider@gmail.com, Sep 21, 2015
  6. 3/7 git-p4: return an empty list if a list config has no valueslarsxschneider@gmail.com, Sep 21, 2015
  7. 4/7 git-p4: add file streaming progress in verbose modelarsxschneider@gmail.com, Sep 21, 2015
  8. 5/7 git-p4: check free space during streaminglarsxschneider@gmail.com, Sep 21, 2015
  9. 6/7 git-p4: add support for large file systemslarsxschneider@gmail.com, Sep 21, 2015
  10. Luke DiamandSep 25, 2015
  11. 7/7 git-p4: add Git LFS backend for large file systemlarsxschneider@gmail.com, Sep 21, 2015
  12. Junio C HamanoSep 22, 2015
  13. Lars SchneiderSep 23, 2015
  14. Luke DiamandSep 23, 2015
  15. Lars SchneiderSep 23, 2015
  16. Lars SchneiderSep 23, 2015
  17. Luke DiamandSep 23, 2015
  18. Lars SchneiderSep 23, 2015
  19. Luke DiamandSep 24, 2015
  20. Lars SchneiderSep 25, 2015
  21. Luke DiamandSep 25, 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.