Re: git-p4: t9819 failing

2015-09-25 Thread Lars Schneider
Good catch. The case-handling test is actually fine. There was a bug in my 
implementation!

If you do this:
git p4 clone //depot/something/...

Then git p4 generates a directory “something” and clones into that (similar to 
Git). Since I set “cloneDirectory” to the current working directory that logic 
never kicked in. Therefore the depot was cloned into the current working 
directory instead of a new directory “something” and the test broke.

Thanks,
Lars

On 24 Sep 2015, at 22:29, Luke Diamand  wrote:

> OK, slight correction there - it now doesn't crash getting the disk
> usage, but I think it still needs to be updated following the other
> changes to case-handling.
> 
> Luke
> 
> On 24 September 2015 at 08:45, Luke Diamand  wrote:
>> On 23 September 2015 at 13:28, Lars Schneider  
>> wrote:
>>> 
 Here's the last bit of the crash dump from git-p4 I get:
 
 File "/home/ldiamand/git/git/git-p4", line 2580, in streamP4FilesCbSelf
   self.streamP4FilesCb(entry)
 File "/home/ldiamand/git/git/git-p4", line 2497, in streamP4FilesCb
   required_bytes = int((4 * int(self.stream_file["fileSize"])) -
 calcDiskFree(self.cloneDestination))
 File "/home/ldiamand/git/git/git-p4", line 116, in calcDiskFree
   st = os.statvfs(dirname)
 OSError: [Errno 2] No such file or directory: 'lc'
 
 Luke
>>> Confirmed. What do you think about this fix?
>> 
>> Works for me!
>> 
>> 
>> 
>>> 
>>> Thank you,
>>> Lars
>>> 
>>> ---
>>> git-p4.py | 1 +
>>> 1 file changed, 1 insertion(+)
>>> 
>>> diff --git a/git-p4.py b/git-p4.py
>>> index 1d1bb87..66c0a4e 100755
>>> --- a/git-p4.py
>>> +++ b/git-p4.py
>>> @@ -3478,6 +3478,7 @@ class P4Clone(P4Sync):
>>> 
>>> print "Importing from %s into %s" % (', '.join(depotPaths), 
>>> self.cloneDestination)
>>> 
>>> +self.cloneDestination = os.path.abspath(self.cloneDestination)
>>> if not os.path.exists(self.cloneDestination):
>>> os.makedirs(self.cloneDestination)
>>> chdir(self.cloneDestination)
>>> --

--
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


Re: git-p4: t9819 failing

2015-09-24 Thread Luke Diamand
On 23 September 2015 at 13:28, Lars Schneider  wrote:
>
>> Here's the last bit of the crash dump from git-p4 I get:
>>
>>  File "/home/ldiamand/git/git/git-p4", line 2580, in streamP4FilesCbSelf
>>self.streamP4FilesCb(entry)
>>  File "/home/ldiamand/git/git/git-p4", line 2497, in streamP4FilesCb
>>required_bytes = int((4 * int(self.stream_file["fileSize"])) -
>> calcDiskFree(self.cloneDestination))
>>  File "/home/ldiamand/git/git/git-p4", line 116, in calcDiskFree
>>st = os.statvfs(dirname)
>> OSError: [Errno 2] No such file or directory: 'lc'
>>
>> Luke
> Confirmed. What do you think about this fix?

Works for me!



>
> Thank you,
> Lars
>
> ---
>  git-p4.py | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/git-p4.py b/git-p4.py
> index 1d1bb87..66c0a4e 100755
> --- a/git-p4.py
> +++ b/git-p4.py
> @@ -3478,6 +3478,7 @@ class P4Clone(P4Sync):
>
>  print "Importing from %s into %s" % (', '.join(depotPaths), 
> self.cloneDestination)
>
> +self.cloneDestination = os.path.abspath(self.cloneDestination)
>  if not os.path.exists(self.cloneDestination):
>  os.makedirs(self.cloneDestination)
>  chdir(self.cloneDestination)
> --
--
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


Re: git-p4: t9819 failing

2015-09-24 Thread Luke Diamand
OK, slight correction there - it now doesn't crash getting the disk
usage, but I think it still needs to be updated following the other
changes to case-handling.

Luke

On 24 September 2015 at 08:45, Luke Diamand  wrote:
> On 23 September 2015 at 13:28, Lars Schneider  
> wrote:
>>
>>> Here's the last bit of the crash dump from git-p4 I get:
>>>
>>>  File "/home/ldiamand/git/git/git-p4", line 2580, in streamP4FilesCbSelf
>>>self.streamP4FilesCb(entry)
>>>  File "/home/ldiamand/git/git/git-p4", line 2497, in streamP4FilesCb
>>>required_bytes = int((4 * int(self.stream_file["fileSize"])) -
>>> calcDiskFree(self.cloneDestination))
>>>  File "/home/ldiamand/git/git/git-p4", line 116, in calcDiskFree
>>>st = os.statvfs(dirname)
>>> OSError: [Errno 2] No such file or directory: 'lc'
>>>
>>> Luke
>> Confirmed. What do you think about this fix?
>
> Works for me!
>
>
>
>>
>> Thank you,
>> Lars
>>
>> ---
>>  git-p4.py | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/git-p4.py b/git-p4.py
>> index 1d1bb87..66c0a4e 100755
>> --- a/git-p4.py
>> +++ b/git-p4.py
>> @@ -3478,6 +3478,7 @@ class P4Clone(P4Sync):
>>
>>  print "Importing from %s into %s" % (', '.join(depotPaths), 
>> self.cloneDestination)
>>
>> +self.cloneDestination = os.path.abspath(self.cloneDestination)
>>  if not os.path.exists(self.cloneDestination):
>>  os.makedirs(self.cloneDestination)
>>  chdir(self.cloneDestination)
>> --
--
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


Re: git-p4: t9819 failing

2015-09-23 Thread Lars Schneider

On 23 Sep 2015, at 11:27, Luke Diamand  wrote:

> Lars,
> 
> I just noticed that your change "git-p4: honor core.ignorecase when
> using P4 client specs" seems to break t9819.
> 
> I suspect that the problem is just that t9819 needs to be updated to
> reflect your change - do you have any thoughts on that?
> 
> Thanks!
> Luke

What OS and what commit do you use for testing? Here is what I got on my 
machine:

Ubuntu, next (c07a1e8) -> OK
Ubuntu, maint (ee6ad5f) -> OK

OS X, next (c07a1e8) -> broken
OS X, maint (ee6ad5f) -> broken

Thanks,
Lars--
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


Re: git-p4: t9819 failing

2015-09-23 Thread Lars Schneider

On 23 Sep 2015, at 13:11, Luke Diamand  wrote:

> On 23 September 2015 at 11:27, Lars Schneider  
> wrote:
>> 
>> On 23 Sep 2015, at 11:27, Luke Diamand  wrote:
>> 
>>> Lars,
>>> 
>>> I just noticed that your change "git-p4: honor core.ignorecase when
>>> using P4 client specs" seems to break t9819.
>>> 
>>> I suspect that the problem is just that t9819 needs to be updated to
>>> reflect your change - do you have any thoughts on that?
>>> 
>>> Thanks!
>>> Luke
>> 
>> What OS and what commit do you use for testing? Here is what I got on my 
>> machine:
>> 
>> Ubuntu, next (c07a1e8) -> OK
>> Ubuntu, maint (ee6ad5f) -> OK
>> 
>> OS X, next (c07a1e8) -> broken
>> OS X, maint (ee6ad5f) -> broken
> 
> The next branch is good:
> c07a1e8 Merge branch 'bb/remote-get-url' into next
> 
> The pu branch isn't:
> f44e3df Merge branch 'jk/notes-dwim-doc' into pu
> 
> This is on Debian.
> 
> Actually I think the problem may be in calcDiskFree().
> 
> Here's the last bit of the crash dump from git-p4 I get:
> 
>  File "/home/ldiamand/git/git/git-p4", line 2580, in streamP4FilesCbSelf
>self.streamP4FilesCb(entry)
>  File "/home/ldiamand/git/git/git-p4", line 2497, in streamP4FilesCb
>required_bytes = int((4 * int(self.stream_file["fileSize"])) -
> calcDiskFree(self.cloneDestination))
>  File "/home/ldiamand/git/git/git-p4", line 116, in calcDiskFree
>st = os.statvfs(dirname)
> OSError: [Errno 2] No such file or directory: 'lc'
> 
> Luke
Confirmed. What do you think about this fix?

Thank you,
Lars

---
 git-p4.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/git-p4.py b/git-p4.py
index 1d1bb87..66c0a4e 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -3478,6 +3478,7 @@ class P4Clone(P4Sync):
 
 print "Importing from %s into %s" % (', '.join(depotPaths), 
self.cloneDestination)
 
+self.cloneDestination = os.path.abspath(self.cloneDestination)
 if not os.path.exists(self.cloneDestination):
 os.makedirs(self.cloneDestination)
 chdir(self.cloneDestination)
-- --
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


Re: git-p4: t9819 failing

2015-09-23 Thread Luke Diamand
On 23 September 2015 at 11:27, Lars Schneider  wrote:
>
> On 23 Sep 2015, at 11:27, Luke Diamand  wrote:
>
>> Lars,
>>
>> I just noticed that your change "git-p4: honor core.ignorecase when
>> using P4 client specs" seems to break t9819.
>>
>> I suspect that the problem is just that t9819 needs to be updated to
>> reflect your change - do you have any thoughts on that?
>>
>> Thanks!
>> Luke
>
> What OS and what commit do you use for testing? Here is what I got on my 
> machine:
>
> Ubuntu, next (c07a1e8) -> OK
> Ubuntu, maint (ee6ad5f) -> OK
>
> OS X, next (c07a1e8) -> broken
> OS X, maint (ee6ad5f) -> broken

The next branch is good:
c07a1e8 Merge branch 'bb/remote-get-url' into next

The pu branch isn't:
f44e3df Merge branch 'jk/notes-dwim-doc' into pu

This is on Debian.

Actually I think the problem may be in calcDiskFree().

Here's the last bit of the crash dump from git-p4 I get:

  File "/home/ldiamand/git/git/git-p4", line 2580, in streamP4FilesCbSelf
self.streamP4FilesCb(entry)
  File "/home/ldiamand/git/git/git-p4", line 2497, in streamP4FilesCb
required_bytes = int((4 * int(self.stream_file["fileSize"])) -
calcDiskFree(self.cloneDestination))
  File "/home/ldiamand/git/git/git-p4", line 116, in calcDiskFree
st = os.statvfs(dirname)
OSError: [Errno 2] No such file or directory: 'lc'

Luke
--
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


git-p4: t9819 failing

2015-09-23 Thread Luke Diamand
Lars,

I just noticed that your change "git-p4: honor core.ignorecase when
using P4 client specs" seems to break t9819.

I suspect that the problem is just that t9819 needs to be updated to
reflect your change - do you have any thoughts on that?

Thanks!
Luke
--
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