of other places are already doing key check in the hash. Looks
like this line was missed out.
On Wed, Apr 18, 2018 at 4:08 AM, Luke Diamand wrote:
> 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
"fileSize".
> So, it's definitely not a reason to abort.
>
> Thank you,
> Andrey
>
> From: Thandesha VK
>> My fix is for the case where p4 -G sizes not returning the key and
>> value for fileSize. This can happen in some cases. Only option at that
&
;> self.branchPrefixes)
>>> relPath = self.encodeWithUTF8(relPath)
>>> if verbose:
>>> -size = int(self.stream_file['fileSize'])
>>> -sys.stdout.write('\r%s --> %s (%i MB)\n' % (file['depotFile'],
>>> relPath, size/1024/1024))
>>> +size = file.get('fileSize', None)
>>> +if size is None:
>>> +sizeStr = ''
>>> +else:
>>> +sizeStr = ' (%i MB)' % (int(size)/1024/1024)
>>> +sys.stdout.write('\r%s --> %s%s\n' % (file['depotFile'],
>>> relPath, sizeStr))
>>> sys.stdout.flush()
>>>
>>> (type_base, type_mods) = split_p4_type(file["type"])
>>> --
>>> 2.16.1
>>>
>> Thanks, that looks like a good fix to me. Ack.
--
Thanks & Regards
Thandesha VK | Cellphone +1 (703) 459-5386
and use `p4 -G sizes` to obtain the
> "fileSize" when it's not returned by `p4 -G print`?
> Or is it an overkill for a simple verbose print out?
>
> Also, please, find one comment inline below.
>
> Thank you,
> Andrey
>
> From: Thandesha VK
>> Sounds
> ** both yours and mine patches don't change existing behavior;
> * if "fileSize" is not known:
> ** your patch makes streamOneP4File() not print anything;
> ** my patch makes streamOneP4File() print "%s --> %s".
>
> Hope, I'm clearer this tim
rbose" option.
>
> Andrey Mazo (1):
> git-p4: fix `sync --verbose` traceback due to 'fileSize'
>
> git-p4.py | 8 ++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
>
> base-commit: 468165c1d8a442994a825f3684528361727cd8c0
> --
> 2.16.1
>
--
Thanks & Regards
Thandesha VK | Cellphone +1 (703) 459-5386
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 https://github.com/git/g
7 matches
Mail list logo