Re: Clone repo from remote URL fails

2018-12-20 Thread Mads Kiilerich

On 12/12/18 12:58 PM, Mads Kiilerich wrote:

On 12/11/18 5:03 PM, Thomas De Schampheleire wrote:

El mar., 11 dic. 2018 a las 12:19, Mads Kiilerich
() escribió:

It's been a while that I tested this, but I wonder if it could be
related to a mercurial version? This instance is running 4.7.2.
In commit 03dfcbe52906 there has been a change in this area, but I
didn't investigate it further.


Yes, that change was insufficient.

Proposed fix on
https://kallithea-scm.org/repos/kallithea-incoming/changeset/8107a49198fbbb1474f84cc0e6c8c1cfea5d2de4 


Thanks.


Extra annoying that it just fails in a URL validation check. The actual
clone works ... and it would fail if the URL was invalid. So it would
perhaps be better to drop the check and just try it, similar to how ssh
URLs are handled?

Note that I was cloning from an SSH URL.



Right. How about 
https://kallithea-scm.org/repos/kallithea-incoming/changeset/8670f5906fa6760638cb5485a03c675b68c589fe 
?



Can you confirm this looks OK and works for you?

/Mads
___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Re: Clone repo from remote URL fails

2018-12-11 Thread Thomas De Schampheleire
El mar., 11 dic. 2018 a las 12:19, Mads Kiilerich
() escribió:
>
> On 12/11/18 10:13 AM, Thomas De Schampheleire wrote:
> > kallithea_1  |   File "./kallithea/lib/vcs/backends/hg/repository.py",
> > line 295, in _check_url
> > kallithea_1  | sshpeer(repoui or ui.ui(), url).lookup('tip')
> > kallithea_1  | TypeError: __init__() takes at least 8 arguments (3 given)
> > kallithea_1  | 2018-12-11 09:05:07.596 INFO
> > [kallithea.controllers.admin.repos] Invalid repository URL
>
>
> One of the annoying `except Exception` :-(
>
>
> > It's been a while that I tested this, but I wonder if it could be
> > related to a mercurial version? This instance is running 4.7.2.
> > In commit 03dfcbe52906 there has been a change in this area, but I
> > didn't investigate it further.
>
>
> Yes, that change was insufficient.
>
> Proposed fix on
> https://kallithea-scm.org/repos/kallithea-incoming/changeset/8107a49198fbbb1474f84cc0e6c8c1cfea5d2de4

Thanks.

>
> Extra annoying that it just fails in a URL validation check. The actual
> clone works ... and it would fail if the URL was invalid. So it would
> perhaps be better to drop the check and just try it, similar to how ssh
> URLs are handled?

Note that I was cloning from an SSH URL.

>
> Also, it would be nice to have test coverage for this ;-)

Testing remote ssh urls is tricky to add to the test suite as there is
no universally accessible ssh server, but perhaps could be done for
http. But it would be nice though that the test suite would not
require internet connectivity...


I noticed an unrelated problem: cloning a repo with many heads from
Kallithea gives:
requesting all changes
abort: error: Connection reset by peer

I can reproduce with 2000 heads, 500 was not enough.
Quick script to create so many heads, in an existing repo:
for i in (seq 1 2000); hg up 0; date >> Makefile; hg commit -m
"head$i"; hg push http://localhost:5000/foobar -f -r .; end

(but I now realize I could have been faster by doing it on the server
directly and then invalidating the cache).

I was told that cloning a repo over HTTP causing Mercurial to send
certain info, like heads, in HTTP headers. This is probably related.
I'm using uwsgi here with default settings.
See also https://github.com/unbit/uwsgi/issues/355, from that it seems
this is a hard limitation (max buffer size is 64K and can apparently
not be increased).

/Thomas
___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Re: Clone repo from remote URL fails

2018-12-11 Thread Mads Kiilerich

On 12/11/18 10:13 AM, Thomas De Schampheleire wrote:

kallithea_1  |   File "./kallithea/lib/vcs/backends/hg/repository.py",
line 295, in _check_url
kallithea_1  | sshpeer(repoui or ui.ui(), url).lookup('tip')
kallithea_1  | TypeError: __init__() takes at least 8 arguments (3 given)
kallithea_1  | 2018-12-11 09:05:07.596 INFO
[kallithea.controllers.admin.repos] Invalid repository URL



One of the annoying `except Exception` :-(



It's been a while that I tested this, but I wonder if it could be
related to a mercurial version? This instance is running 4.7.2.
In commit 03dfcbe52906 there has been a change in this area, but I
didn't investigate it further.



Yes, that change was insufficient.

Proposed fix on 
https://kallithea-scm.org/repos/kallithea-incoming/changeset/8107a49198fbbb1474f84cc0e6c8c1cfea5d2de4


Extra annoying that it just fails in a URL validation check. The actual 
clone works ... and it would fail if the URL was invalid. So it would 
perhaps be better to drop the check and just try it, similar to how ssh 
URLs are handled?


Also, it would be nice to have test coverage for this ;-)


/Mads


___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general