BTS

Issue443

Title hg-mirror fails when hgwebdir does not reside in server root
Priority bug Status resolved
Superseder Nosy List gebi, mxey
Assigned To gebi Topics

Created on 2008-03-29.11:46:35 by mxey, last changed 2008-09-25.23:41:38 by mika.

Messages
msg1488 (view) Author: mika Date: 2008-09-25.23:41:35
We believe that your issue has been closed by the upload of
Version 0.27 of grml-mercurial-utils from Michael Prokop <mika@grml.org>.
The explanation is attached below

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 26 Sep 2008 01:37:54 +0200
Source: grml-mercurial-utils
Binary: grml-mercurial-utils
Architecture: source all
Version: 0.27
Distribution: unstable
Urgency: low
Maintainer: Michael Gebetsroither <gebi@grml.org>
Changed-By: Michael Prokop <mika@grml.org>
Description: 
 grml-mercurial-utils - some small helper scripts to work with mercurial
Changes: 
 grml-mercurial-utils (0.27) unstable; urgency=low
 .
   [ Alexander Wirt ]
   * Don't let xsltproc background if generating manpages
     (Thanks to Maximilian Gaß for patch)
 .
   [ Michael Gebetsroither ]
   * reposearch:
      - add unit-test suit for reposearch
      - corrected .darcs to _darcs
      - add search target gitbare for bare git repositories
      - allow searching for multiple repository types in parallel
   * hg-mirror: fixed bug for urls like 'https://host/~user/hg.cgi'
         (merged patch from Maximilian Gaß, THX) [Closes: issue443]
 .
   [ Michael Prokop ]
   * Bump Standard-Version to 3.8.0 (no further changes).
Files: 
 407bb33731a6e48e77c5a855f6587e1b 730 grml optional grml-mercurial-utils_0.27.dsc
 794aeac279b46f6b4cef465baece27b3 22412 grml optional grml-mercurial-utils_0.27.tar.gz
 cf74c6085c892984cf53e80c6ed4a084 36458 grml optional grml-mercurial-utils_0.27_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFI3CF92N9T+zficugRApoPAJ4zv+WEjtRukXJu1SehXOoK2XVviACeMn2j
g8vUTNNO4iUDlcWjRwsoxyk=
=MsDP
-----END PGP SIGNATURE-----
msg1325 (view) Author: mika Date: 2008-05-25.11:38:14
Gebi, can you please take care of this issue?

thx && regards,
-mika-
msg1272 (view) Author: mxey Date: 2008-03-29.11:46:34
A friend of mine runs hgwebdir as https://host/~user/hg.cgi, which does not work
with hg-mirror. hg-mirror takes for granted that hgwebdir is running from / on
the webserver. This patch fixes the problem.

# HG changeset patch
# User Maximilian Gaß <mxey@cloudconnected.org>
# Date 1206790872 -3600
# Node ID daaa2935ccc19df798594729bdfa87fcd4892442
# Parent  d0689d0310b2cc2ef83393c6b0fddb145b6fe79b
walkrepos: Start from server root, hgweb gives us absolute URLs

diff -r d0689d0310b2 -r daaa2935ccc1 hgutil/hg/util.py
--- a/hgutil/hg/util.py Sat Mar 29 09:37:46 2008 +0100
+++ b/hgutil/hg/util.py Sat Mar 29 12:41:12 2008 +0100
@@ -1,5 +1,6 @@ import os
 import os
 import urllib
+import urlparse
 
 from hgutil.util import QueueListBridge
 
@@ -38,6 +39,11 @@ def walkrepos_flat(path):
 
 def walkrepos_web(url):
     data = urllib.urlopen(url + '/?style=raw')
+
+    # hgweb gives absolute URLs, so start from server root
+    parts = urlparse.urlsplit(url)
+    url = urlparse.urlunsplit((parts[0], parts[1], '', '', ''))
+
     for i in data:
         i = i.strip("/\n")
         if len(i) > 0:
History
Date User Action Args
2008-09-25 23:41:38mikasetstatus: in-progress -> resolved
nosy: gebi, mxey
messages: + msg1488
2008-09-18 01:51:26gebisetstatus: chatting -> in-progress
nosy: gebi, mxey
2008-05-25 11:38:14mikasetstatus: unread -> chatting
assignedto: gebi
messages: + msg1325
nosy: + gebi
2008-03-30 18:24:55mxeysetpriority: bug
2008-03-29 11:46:35mxeycreate