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

Re: git-p4: exception when cloning a perforce repository

From
PWPete Wyckoff <pw@padd.com>
Date
Jan 16, 2014, 13:08 UTC
Message-ID
<20140116130833.GA15613@padd.com>
In-Reply-To
<843E4B24-5EDD-4451-8849-425160576A99@iwi.me>
damien@iwi.me wrote on Wed, 15 Jan 2014 09:56 +0100:
Show 16 quoted lines
> p4 fstat  //depot/openssl/0.9.8j/openssl/include/openssl/bn.h@59702 
> ... depotFile //depot/openssl/0.9.8j/openssl/include/openssl/bn.h
> ... headAction edit
> ... headType symlink
> ... headTime 1237906419
> ... headRev 2
> ... headChange 59702
> ... headModTime 1231329423
> 
> p4 print -q //depot/openssl/0.9.8j/openssl/include/openssl/bn.h#2 | od -c
> 0000000
> 
> p4 print  //depot/openssl/0.9.8j/openssl/include/openssl/bn.h#1        
> //depot/openssl/0.9.8j/openssl/include/openssl/bn.h#1 - add change 59574 (text)
>  p4 print  //depot/openssl/0.9.8j/openssl/include/openssl/bn.h#2
> //depot/openssl/0.9.8j/openssl/include/openssl/bn.h#2 - edit change 59702 (symlink)

That's interesting. When I do the equivalent "p4 print" commands it shows something like this.

arf-git-test$ p4 fstat //depot/bn.h ... depotFile //depot/bn.h ... clientFile /dev/shm/trash directory.t9802-git-p4-filetype/cli/bn.h ... isMapped ... headAction edit ... headType symlink ... headTime 1389876870 ... headRev 2 ... headChange 8 ... headModTime 1389876870 ... haveRev 2

arf-git-test$ p4 print //depot/bn.h#1 //depot/bn.h#1 - add change 7 (text) file-text

arf-git-test$ p4 print //depot/bn.h#2 //depot/bn.h#2 - edit change 8 (symlink) /elsewhere/bn.h

I don't know how you manage to get a symlink with an empty destination like that.

I'll work on a way to hack around this failure. In the mean time, if you're game, it might be fun to see what p4 does with such a repository. You could make a client for just that little subdir, check out at 59702 and see what is there:

mkdir testmess
cd testmess
cat <<EOF | p4 client -i
Client: testmess
Description: testmess
Root: $(pwd)
View: //depot/openssl/0.9.8j/openssl/include/openssl/... //testmess/...
EOF

then take a look at how p4 represents the "empty" symlink in the filesystem:

p4 sync @59702 ls -la bn.h

		-- Pete
Previous: Damien GérardNext: Damien Gérard
Message 5 of 11 in “git-p4: exception when cloning a perforce repository”
  1. Damien GérardJan 13, 2014
  2. Pete WyckoffJan 14, 2014
  3. Pete WyckoffJan 14, 2014
  4. Damien GérardJan 15, 2014
  5. Pete WyckoffJan 16, 2014
  6. Damien GérardJan 16, 2014
  7. Pete WyckoffJan 16, 2014
  8. Damien GérardJan 16, 2014
  9. Pete WyckoffJan 18, 2014
  10. Damien GérardJan 20, 2014
  11. Damien GérardJan 20, 2014

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.