Re: [BUG] git p4 clone fails when p4 sizes does not return 'fileSize' key

2018-04-18 Thread Thandesha VK
Just to be clear - git-p4 does not use the p4 "sizes" command anywhere AFAIK. We are just talking about the output from "p4 print" and the "fileSize" key, right? --> Correct. Does that happen with the 17.2 version of p4? -->Correct. print() probably makes more sense; can we try to use the

Re: [BUG] git p4 clone fails when p4 sizes does not return 'fileSize' key

2018-04-18 Thread Luke Diamand
On 17 April 2018 at 20:12, Thandesha VK wrote: > I have few cases where even p4 -G sizes (or p4 sizes) is not returning > the size value even with latest version of p4 (17.2). In that case, we > have to regenerate the digest for file save it - It mean something is > wrong with

Re: [BUG] git p4 clone fails when p4 sizes does not return 'fileSize' key

2018-04-17 Thread Thandesha VK
I have few cases where even p4 -G sizes (or p4 sizes) is not returning the size value even with latest version of p4 (17.2). In that case, we have to regenerate the digest for file save it - It mean something is wrong with the file in perforce. Regarding, sys.stdout.write v/s print, I see script

Re: [BUG] git p4 clone fails when p4 sizes does not return 'fileSize' key

2018-04-17 Thread Mazo, Andrey
Does a missing "fileSize" actually mean that there is something wrong with the file? Because, for me, `p4 -G print` doesn't print "fileSize" for _any_ file. (which I attribute to our rather ancient (2007.2) Perforce server) I'm not an expert in Perforce, so don't know for sure. However, `p4 -G

Re: [BUG] git p4 clone fails when p4 sizes does not return 'fileSize' key

2018-04-17 Thread Thandesha VK
Sounds good. How about an enhanced version of fix from both of us. This will let us know that something is not right with the file but will not bark $ git diff diff --git a/git-p4.py b/git-p4.py index 7bb9cadc6..df901976f 100755 --- a/git-p4.py +++ b/git-p4.py @@ -2566,7 +2566,12 @@ class

Re: [BUG] git p4 clone fails when p4 sizes does not return 'fileSize' key

2018-04-17 Thread Mazo, Andrey
Sure, I totally agree. Sorry, I just wasn't clear enough in my previous email. I meant that your patch suppresses "%s --> %s (%i MB)" line in case "fileSize" is not available, while my patch suppresses just "(%i MB)" portion if the "fileSize" is not known. In other words, * if "fileSize" is

Re: [BUG] git p4 clone fails when p4 sizes does not return 'fileSize' key

2018-04-17 Thread Thandesha VK
*I* think keeping the filesize info is better with --verbose option as that gives some clue about the file we are working on. What do you think? Script has similar checks of key existence at other places where it is looking for fileSize. On Tue, Apr 17, 2018 at 9:22 AM, Andrey Mazo

Re: [BUG] git p4 clone fails when p4 sizes does not return 'fileSize' key

2018-04-17 Thread Mazo, Andrey
Huh, I actually have a slightly different fix for the same issue. It doesn't suppress the corresponding verbose output completely, but just removes the size information from it. I'll (try to) post it as a reply to this email. Also, I'd mention that the workaround is trivial -- simply omit the

Re: [BUG] git p4 clone fails when p4 sizes does not return 'fileSize' key

2018-04-17 Thread Andrey Mazo
Huh, I actually have a slightly different fix for the same issue. It doesn't suppress the corresponding verbose output completely, but just removes the size information from it. Also, I'd mention that the workaround is trivial -- simply omit the "--verbose" option. Andrey Mazo (1): git-p4:

[BUG] git p4 clone fails when p4 sizes does not return 'fileSize' key

2018-04-16 Thread Thandesha VK
git p4 clone fails when p4 sizes does not return 'fileSize' key. There are few cases when p4 sizes returens 0 size and with marshaled output, it doesn’t return the fileSize attribute. Here is the demonstration and potential fix $ cd /tmp/git/ $ git remote -v origin