hg clone via http broken?

Thomas Arendsen Hein thomas at intevation.de
Fri Mar 24 15:56:58 UTC 2006


* Michal Kvasnica <kvasnica at gmail.com> [20060324 14:50]:
> >> $ hg clone http://control.ee.ethz.ch/~mpt/hg/mpt/
> >> requesting all changes
> >> adding changesets
> >> adding manifests
> >> adding file changes
> >> abort: premature EOF reading chunk (got 1715651 bytes, expected 1851712)!
> >> transaction abort!
> >> rollback completed
> ...
> > there is a memory error:
> > 
> > How many memory do you have ? can you monitor the memory usage from the cgi ?
> 
> I was just told that the memory limit for a cgi script on the server is
> 32MB. Why is that not enough for a successful clone, especially when the
> cache limit in revlog.py is just 4MB?
> 
> Anyhow, increasing RLimitMEM to 64000000 in my .htaccess seems to
> resolve this issue.

When I use
$ ulimit -d 3000 -v 20000 && hg serve
I can clone mpt from this local server.

I haven't tested how much more memory hgweb/hgwebdir use.

But I've found a problem on the client side if the server dies very
early. Then hg tries to call revlog.addgroup with an empty
changegroup. Can anyone confirm that it makes never sense to add an
empty changegroup? If it never makes sense, this patch can test
that.

Thomas

diff -r 802e8a029d99 mercurial/revlog.py
--- a/mercurial/revlog.py	Fri Mar 24 15:19:08 2006 +0100
+++ b/mercurial/revlog.py	Fri Mar 24 16:56:23 2006 +0100
@@ -743,7 +743,7 @@ class revlog(object):
         #track the base of the current delta log
         r = self.count()
         t = r - 1
-        node = nullid
+        node = None
 
         base = prev = -1
         start = end = measure = 0
@@ -816,6 +816,8 @@ class revlog(object):
 
         dfh.close()
         ifh.close()
+        if node is None:
+            raise RevlogError(_("group to be added is empty"))
         return node
 
     def strip(self, rev, minlink):

-- 
Email: thomas at intevation.de
http://intevation.de/~thomas/



More information about the Mercurial mailing list