Issue443

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

Created on 2008-03-29.11:46:35 by mxey, last changed 2008-05-25.11:38:14 by mika.

Messages
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:33
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-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