On 15 Jan 2014, at 00:24, Pete Wyckoff <p...@padd.com> wrote:

> p...@padd.com wrote on Mon, 13 Jan 2014 19:18 -0500:
>> dam...@iwi.me wrote on Mon, 13 Jan 2014 14:37 +0100:
>>> I am trying to clone a perforce repository via git and I am having the 
>>> following backtrace :
>>> 
>>> {14:20}~/projects/####:master ✗ ➭ git p4 clone //depot/@all .
>>> Importing revision …
>>> [...]
>>> Importing revision 59702 (45%)Traceback (most recent call last):
>> [..]
>>>  File "/opt/git/libexec/git-core/git-p4", line 2078, in streamOneP4File
>>>    if data[-1] == '\n':
>>> IndexError: string index out of range
>>> 
>>> git —version: git version 1.8.5.2.309.ga25014b [last commit from master 
>>> from github.com/git/git]
>>> os : ubuntu 13.10
>> 
>> This code:
>> 
>>        if type_base == "symlink":
>>            git_mode = "120000"
>>            # p4 print on a symlink sometimes contains "target\n";
>>            # if it does, remove the newline
>>            data = ''.join(contents)
>>  ==>       if data[-1] == '\n':
>>                contents = [data[:-1]]
>>            else:
>>                contents = [data]
>> 
>> means that data is an empty string.  Implies you've got a
>> symlink pointing to nothing.  Is that even possible?

It does not seem so but I am so sure.


>> It could be this is a regression introduced at 1292df1 (git-p4:
>> Fix occasional truncation of symlink contents., 2013-08-08).  The
>> old way of doing data[:-1] unconditionally would have worked but
>> was broken for other reasons.
>> 
>> Could you investigate the symlink a bit?  We're looking for
>> one in change 59702 that points to nowhere.  Maybe do:
>> 
>>    $ p4 describe -s 59702
>> 
>> and see if you can figure out which of those could be a symlink, then
>> inspect it:
>> 
>>    $ p4 fstat //depot/symlink@59702
>>    (probably shows it is "headRev 1")
>> 
>>    $ p4 print -q //depot/symlink#1
>> 
>>    $ p4 print -q //depot/symlink#1 | od -c
>> 
>> Thanks for checking this depot info first.
> 
> I've tried to hack a test that produces a null symlink,
> and having done so, find an error later on trying to
> generate a symlink that points to "".  So the "easy"
> fix of checking for an empty string is unlikely to work
> for your repo.
> 
> Curious as to how you managed to generate such a thing.
> If you find the file, and can get at the p4 depot, the
> full ,v file would be interesting too.
> 



Indeed, those files are symlinks actually.  But it sems they are all valid.


Here is what I can get :

Change 59702 by ##############@VS9 on 2009/03/24 15:53:39

        OpenSSL 0.9.8j

Affected files ...

... //depot/openssl/0.9.8j/openssl/include/openssl/aes.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/asn1.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/asn1_mac.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/asn1t.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/bio.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/blowfish.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/bn.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/buffer.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/cast.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/comp.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/conf.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/conf_api.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/crypto.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/des.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/des_old.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/dh.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/dsa.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/dso.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/dtls1.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/e_os2.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/ebcdic.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/ec.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/ecdh.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/ecdsa.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/engine.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/err.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/evp.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/fips.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/fips_rand.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/hmac.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/idea.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/krb5_asn.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/kssl.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/lhash.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/md2.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/md4.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/md5.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/obj_mac.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/objects.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/ocsp.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/opensslconf.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/opensslv.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/ossl_typ.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/pem.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/pem2.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/pkcs12.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/pkcs7.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/pq_compat.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/pqueue.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/rand.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/rc2.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/rc4.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/ripemd.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/rsa.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/safestack.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/sha.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/ssl.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/ssl2.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/ssl23.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/ssl3.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/stack.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/store.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/symhacks.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/tls1.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/tmdiff.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/txt_db.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/ui.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/ui_compat.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/x509.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/x509_vfy.h#2 edit
... //depot/openssl/0.9.8j/openssl/include/openssl/x509v3.h#2 edit


Just in case :

$ p4 describe -s 59700
59700 - no such changelist.


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)



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to