All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pete Wyckoff <pw@padd.com>
To: "Damien Gérard" <damien@iwi.me>
Cc: git@vger.kernel.org, Alexandru Juncu <alexj@rosedu.org>
Subject: Re: git-p4: exception when cloning a perforce repository
Date: Thu, 16 Jan 2014 06:45:19 -0800	[thread overview]
Message-ID: <20140116144519.GB15674@padd.com> (raw)
In-Reply-To: <4FE5D5E6-60F6-4111-B538-5CA01092A2F0@iwi.me>

damien@iwi.me wrote on Thu, 16 Jan 2014 14:46 +0100:
> 
> On 16 Jan 2014, at 14:08, Pete Wyckoff <pw@padd.com> wrote:
> 
> > damien@iwi.me wrote on Wed, 15 Jan 2014 09:56 +0100:
> >> 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
> 
> I’ve tried exactly your commands, and I’ve got an empty folder..
> 
> {14:38}~/p4/testmess ➭ p4 sync @59702
> //depot/openssl/0.9.8j/openssl/include/openssl/aes.h#2 - refreshing /home/dgerard/p4/testmess/aes.h
> //depot/openssl/0.9.8j/openssl/include/openssl/asn1.h#2 - refreshing /home/dgerard/p4/testmess/asn1.h
> //depot/openssl/0.9.8j/openssl/include/openssl/asn1_mac.h#2 - refreshing /home/dgerard/p4/testmess/asn1_mac.h
> //depot/openssl/0.9.8j/openssl/include/openssl/asn1t.h#2 - refreshing /home/dgerard/p4/testmess/asn1t.h
> //depot/openssl/0.9.8j/openssl/include/openssl/bio.h#2 - refreshing /home/dgerard/p4/testmess/bio.h
> //depot/openssl/0.9.8j/openssl/include/openssl/blowfish.h#2 - refreshing /home/dgerard/p4/testmess/blowfish.h
> //depot/openssl/0.9.8j/openssl/include/openssl/bn.h#2 - refreshing /home/dgerard/p4/testmess/bn.h
> //depot/openssl/0.9.8j/openssl/include/openssl/buffer.h#2 - refreshing /home/dgerard/p4/testmess/buffer.h
> […]
> 
> 
> {14:39}~/p4/testmess ➭ ls -la
> total 12
> drwxr-xr-x 2 dgerard dgerard 4096 janv. 16 14:37 .
> drwxr-xr-x 4 dgerard dgerard 4096 janv. 16 14:34 ..
> -rw-r--r-- 1 dgerard dgerard   93 janv. 16 14:37 .perforce	
> 
> 
> Then I tried to sync the previous changeset, which is ok :
> 
> {14:44}~/p4/testmess ➭ p4 sync -f @59701
> //depot/openssl/0.9.8j/openssl/include/openssl/aes.h#1 - updating /home/dgerard/p4/testmess/aes.h
> […]
> 
> {14:44}~/p4/testmess ➭ l
> total 0
> -r--r--r-- 1 dgerard dgerard 0 janv. 16 14:44 aes.h
> -r--r--r-- 1 dgerard dgerard 0 janv. 16 14:44 asn1.h
> -r--r--r-- 1 dgerard dgerard 0 janv. 16 14:44 asn1_mac.h
> -r--r--r-- 1 dgerard dgerard 0 janv. 16 14:44 asn1t.h
> -r--r--r-- 1 dgerard dgerard 0 janv. 16 14:44 bio.h
> -r--r--r-- 1 dgerard dgerard 0 janv. 16 14:44 blowfish.h
> -r--r--r-- 1 dgerard dgerard 0 janv. 16 14:44 bn.h
> -r--r--r-- 1 dgerard dgerard 0 janv. 16 14:44 buffer.h
> […]
> 
> 
> 
> However, when trying to sync to the appropriate changeset :
> 
> {14:44}~/p4/testmess ➭ p4 sync -f @59702
> //depot/openssl/0.9.8j/openssl/include/openssl/aes.h#2 - updating /home/dgerard/p4/testmess/aes.h
> rename: /home/dgerard/p4/testmess/aes.h: No such file or directory
> //depot/openssl/0.9.8j/openssl/include/openssl/asn1.h#2 - updating /home/dgerard/p4/testmess/asn1.h
> rename: /home/dgerard/p4/testmess/asn1.h: No such file or directory
> //depot/openssl/0.9.8j/openssl/include/openssl/asn1_mac.h#2 - updating /home/dgerard/p4/testmess/asn1_mac.h
> rename: /home/dgerard/p4/testmess/asn1_mac.h: No such file or directory
> //depot/openssl/0.9.8j/openssl/include/openssl/asn1t.h#2 - updating /home/dgerard/p4/testmess/asn1t.h
> rename: /home/dgerard/p4/testmess/asn1t.h: No such file or directory
> //depot/openssl/0.9.8j/openssl/include/openssl/bio.h#2 - updating /home/dgerard/p4/testmess/bio.h
> rename: /home/dgerard/p4/testmess/bio.h: No such file or directory
> //depot/openssl/0.9.8j/openssl/include/openssl/blowfish.h#2 - updating /home/dgerard/p4/testmess/blowfish.h
> rename: /home/dgerard/p4/testmess/blowfish.h: No such file or directory
> //depot/openssl/0.9.8j/openssl/include/openssl/bn.h#2 - updating /home/dgerard/p4/testmess/bn.h
> rename: /home/dgerard/p4/testmess/bn.h: No such file or directory
> 
> And the folder remains untouched.
> Quite strange for me...

Oh cool, that helps a lot.  P4 is just broken here, so we can get
away with being a bit sloppy in git.  I'll try just pretending
"empty symlinks" are not in the repo.  Hopefully you'll have a
future commit in your p4 repo that brings back bn.h properly.

Still not sure about how I'll test this.

Thanks,

		-- Pete

  reply	other threads:[~2014-01-16 14:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13 13:37 git-p4: exception when cloning a perforce repository Damien Gérard
2014-01-14  0:18 ` Pete Wyckoff
2014-01-14 23:24   ` Pete Wyckoff
2014-01-15  8:56     ` Damien Gérard
2014-01-16 13:08       ` Pete Wyckoff
2014-01-16 13:46         ` Damien Gérard
2014-01-16 14:45           ` Pete Wyckoff [this message]
2014-01-16 16:02             ` Damien Gérard
2014-01-18 18:22               ` Pete Wyckoff
2014-01-20 12:14                 ` Damien Gérard
2014-01-20 14:01                 ` Damien Gérard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140116144519.GB15674@padd.com \
    --to=pw@padd.com \
    --cc=alexj@rosedu.org \
    --cc=damien@iwi.me \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.