[issue2331] hg serve does not pull sub-repository

John Fredrick bugs at mercurial.selenic.com
Fri Aug 13 22:18:16 UTC 2010


New submission from John Fredrick <jfredrick_az at yahoo.com>:

We’ve been trying to clone a repository with one sub-repository (Mercurial
version 1.6.1023, on Windows XP) using hg serve.  Either the client hangs or
errors-out depending on our .hgsub settings.

Our structure looks like this:
C:/repos/TestRepo
	.hg
	.hgsub
		nested = nested
	 nested
		.hg

This works correctly when cloning without the server:
C:\repos>hg clone TestRepo WorkingTestRepo
updating to branch default
pulling subrepo nested from C:\repos\TestRepo\nested
requesting all changes
adding changesets
adding manifests
adding file changes
added 12 changesets with 11 changes to 5 files
3 files updated, 0 files merged, 0 files removed, 0 files unresolved

With the same .hgsub settings and running with hg serve, the client hangs:

C:\repos>hg clone http://localhost:8000 WorkingTestRepo2
requesting all changes
adding changesets
adding manifests
adding file changes
added 7 changesets with 8 changes to 3 files
updating to branch default
pulling subrepo nested from http://localhost:8000/nested
(The client hangs at this point until the server is killed).

Meanwhile the server is throwing an exception.
C:\repos\TestRepo>hg serve
listening at http://server:8000/ (bound to *:8000)
127.0.0.1 - - [13/Aug/2010 15:24:26] "GET
/?pairs=00000000000000000000000000000000000000
00-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" 200 -
127.0.0.1 - - [13/Aug/2010 15:24:26] "GET /?cmd=heads HTTP/1.1" 200 -
127.0.0.1 - - [13/Aug/2010 15:24:26] "GET
/?cmd=changegroup&roots=0000000000000000000000
000000000000000000 HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 1112)
Traceback (most recent call last):
  File "SocketServer.pyo", line 558, in process_request_thread
  File "SocketServer.pyo", line 320, in finish_request
  File "mercurial\hgweb\server.pyo", line 42, in __init__
  File "SocketServer.pyo", line 615, in __init__
  File "BaseHTTPServer.pyo", line 329, in handle
  File "BaseHTTPServer.pyo", line 323, in handle_one_request
  File "mercurial\hgweb\server.pyo", line 74, in do_GET
  File "mercurial\hgweb\server.pyo", line 65, in do_POST
  File "mercurial\hgweb\server.pyo", line 58, in do_write
  File "mercurial\hgweb\server.pyo", line 122, in do_hgweb
  File "mercurial\hgweb\hgweb_mod.pyo", line 85, in __call__
  File "mercurial\hgweb\hgweb_mod.pyo", line 117, in run_wsgi
ErrorResponse

When we change the .hgsub file as follows, the client indicates progress,
but apparently from the wrong repository, going to the main version, instead
of the sub-repository version.

.hgsub
nested = ../

C:\repos>hg clone http://localhost:8000 WorkingTestRepo3
requesting all changes
adding changesets
adding manifests
adding file changes
added 8 changesets with 9 changes to 3 files
updating to branch default
pulling subrepo nested from http://localhost:8000/
requesting all changes
adding changesets
adding manifests
adding file changes
added 8 changesets with 9 changes to 3 files
abort: unknown revision 'd73746e663dd560f7ebdb92d4d5850d34f77f2d8'!

Now the revision number is correct for the sub-repository as shown next:
C:\repos\TestRepo\nested>hg --debug tags
tip                               11:d73746e663dd560f7ebdb92d4d5850d34f77f2d8

The server output for this attempt follows:
C:\repos\TestRepo>hg serve
listening at http://server:8000/ (bound to *:8000)
127.0.0.1 - - [13/Aug/2010 15:34:49] "GET
/?pairs=00000000000000000000000000000000000000
00-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" 200 -
127.0.0.1 - - [13/Aug/2010 15:34:49] "GET /?cmd=heads HTTP/1.1" 200 -
127.0.0.1 - - [13/Aug/2010 15:34:49] "GET
/?cmd=changegroup&roots=0000000000000000000000
000000000000000000 HTTP/1.1" 200 -
127.0.0.1 - - [13/Aug/2010 15:34:49] "GET
/?pairs=00000000000000000000000000000000000000
00-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" 200 -
127.0.0.1 - - [13/Aug/2010 15:34:49] "GET /?cmd=heads HTTP/1.1" 200 -
127.0.0.1 - - [13/Aug/2010 15:34:49] "GET
/?cmd=changegroup&roots=0000000000000000000000
000000000000000000 HTTP/1.1" 200 –

Finally we try .hgsub with:
nested = ../nested

C:\repos>hg clone http://localhost:8000 WorkingTestRepo4
requesting all changes
adding changesets
adding manifests
adding file changes
added 9 changesets with 10 changes to 3 files
updating to branch default
pulling subrepo nested from http://localhost:8000/nested

But we return to the original server exception:
C:\repos\TestRepo>hg serve
listening at http://server:8000/ (bound to *:8000)
127.0.0.1 - - [13/Aug/2010 15:42:46] "GET
/?pairs=00000000000000000000000000000000000000
00-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" 200 -
127.0.0.1 - - [13/Aug/2010 15:42:46] "GET /?cmd=heads HTTP/1.1" 200 -
127.0.0.1 - - [13/Aug/2010 15:42:46] "GET
/?cmd=changegroup&roots=0000000000000000000000
000000000000000000 HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 1767)
Traceback (most recent call last):
  File "SocketServer.pyo", line 558, in process_request_thread
  File "SocketServer.pyo", line 320, in finish_request
  File "mercurial\hgweb\server.pyo", line 42, in __init__
  File "SocketServer.pyo", line 615, in __init__
  File "BaseHTTPServer.pyo", line 329, in handle
  File "BaseHTTPServer.pyo", line 323, in handle_one_request
  File "mercurial\hgweb\server.pyo", line 74, in do_GET
  File "mercurial\hgweb\server.pyo", line 65, in do_POST
  File "mercurial\hgweb\server.pyo", line 58, in do_write
  File "mercurial\hgweb\server.pyo", line 122, in do_hgweb
  File "mercurial\hgweb\hgweb_mod.pyo", line 85, in __call__
  File "mercurial\hgweb\hgweb_mod.pyo", line 117, in run_wsgi
ErrorResponse
----------------------------------------

We’re probably missing a subtle point here.
  
Ideas anyone?

Thank You

----------
messages: 13353
nosy: jfredrick
priority: urgent
status: unread
title: hg serve does not pull sub-repository

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2331>
____________________________________________________


More information about the Mercurial-devel mailing list