Broken links in Hg feed

Repositories, Code Review, Bug Tracking, Feature Requests, Builds, Management, Support & Use

Moderators: OpenUru.org Moderators, Bugtracker Resource Managers

Post Reply
Christian Walther
Member
Posts: 317
Joined: Sat Dec 13, 2008 10:54 am

Broken links in Hg feed

Post by Christian Walther »

The Mercurial commit feeds, such as https://foundry.openuru.org/hg/CWE/atom-log and https://foundry.openuru.org/hg/CWE/rss-log, contain some broken links that are missing the host name: e.g. https:///hg/CWE/rev/e1a9b3a06ebf should be https://foundry.openuru.org/hg/CWE/rev/e1a9b3a06ebf.

Atom:

Code: Select all

<?xml version="1.0" encoding="ascii"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 <!-- Changelog -->
 <id>https:///hg/CWE/</id>
 <link rel="self" href="https:///hg/CWE/atom-log"/>
 <link rel="alternate" href="https:///hg/CWE/"/>
 <title>CWE Changelog</title>
 <updated>2011-04-19T14:24:55-07:00</updated>
 
 <entry>
  <title>MOULa build 1.902 - dragossh's "Bevin" into "Hood"</title>
  <id>https:///hg/CWE/#changeset-e1a9b3a06ebfaf51837faf381394eb0ef8657b21</id>
  <link href="https:///hg/CWE/rev/e1a9b3a06ebf"/>
  <author>
   <name>CyanWorlds</name>
   …
RSS:

Code: Select all

<?xml version="1.0" encoding="ascii"?>
<rss version="2.0">
  <channel>
    <link>https:///hg/CWE/</link>
    <language>en-us</language>

    <title>CWE Changelog</title>
    <description>CWE Changelog</description>
    <item>
    <title>MOULa build 1.902 - dragossh's "Bevin" into "Hood"</title>
    <guid isPermaLink="true">https:///hg/CWE/rev/e1a9b3a06ebf</guid>
    …
Can this be easily fixed?
User avatar
rarified
Member
Posts: 1061
Joined: Tue Dec 16, 2008 10:48 pm
Location: Colorado, US

Re: Broken links in Hg feed

Post by rarified »

I'll have to look; I havn't used the feed functionality. Most of the web pages are constructed inside mercurial dynamically (via python code) so it may take a little while.

_R
One of the OpenUru toolsmiths... a bookbinder.
User avatar
Mac_Fife
Member
Posts: 1239
Joined: Fri Dec 19, 2008 12:38 am
Location: Scotland
Contact:

Re: Broken links in Hg feed

Post by Mac_Fife »

Looks like the kind of thing that happens when someone concatenates an absolute file path onto a literal "https://" and forgets to strip the leading slash (been there, done that :oops: ).
Mac_Fife
OpenUru.org wiki wrangler
Christian Walther
Member
Posts: 317
Joined: Sat Dec 13, 2008 10:54 am

Re: Broken links in Hg feed

Post by Christian Walther »

I assume this is a problem with your configuration, not with the Mercurial code, as the feeds work fine for other repositories outside of OpenUru.org.
User avatar
rarified
Member
Posts: 1061
Joined: Tue Dec 16, 2008 10:48 pm
Location: Colorado, US

Re: Broken links in Hg feed

Post by rarified »

It is related to CGI invocation, but I havn't found the disconnect. Mercurial is started on /hg by a CGI interface, and when building the Atom/RSS feed responses, uses the SERVER_NAME environment variable which should be properly set by Apache when processing the HTTP request. It appears that in the current mercurial context it is coming back null. There's some magic inside Mercurial mapping outside environment variables to internal map structures, and I havn't followed all of them or put debug logging in to find the disconnect, but I know what is supposed to happen.

_R
One of the OpenUru toolsmiths... a bookbinder.
User avatar
Mac_Fife
Member
Posts: 1239
Joined: Fri Dec 19, 2008 12:38 am
Location: Scotland
Contact:

Re: Broken links in Hg feed

Post by Mac_Fife »

Hmm... I thought ServerName had to be defined in the config to get the SERVER_NAME env to return the correct info, else it'd try to do a reverse DNS lookup, which would probably give a wrong result if the host IP has more than one domain mapped onto it?
http://httpd.apache.org/docs/current/mo ... servername
Mac_Fife
OpenUru.org wiki wrangler
User avatar
rarified
Member
Posts: 1061
Joined: Tue Dec 16, 2008 10:48 pm
Location: Colorado, US

Re: Broken links in Hg feed

Post by rarified »

Code: Select all

...
ServerName foundry.openuru.org
...
It's there.

_R
One of the OpenUru toolsmiths... a bookbinder.
Post Reply

Return to “Foundry (JIRA/Fisheye/Crucible or Mantis)”