# Re: tracking separate branches with RSS

4 messages from 2006-11-14 to 2006-11-14. Participants: Jakub Narebski, Han-Wen Nienhuys.
Thread: https://gitlist.dev/t/43361

## Han-Wen Nienhuys, 2006-11-14 00:44

Subject: tracking separate branches with RSS
Message-ID: <ejb3hh$nvr$1@sea.gmane.org>
URL: https://gitlist.dev/e/ejb3hh%24nvr%241%40sea.gmane.org

```

Hello,

I think that the shortlog / RSS support in gitweb is really neat. 
However, it seems to track only the master branch.

In our repository (http://git.sv.gnu.org/gitweb/?p=lilypond.git;a=summary),
we track two completely disparate branches in one repository: we have 
both the project and the website for the project in branches

   master

and

   web/master

Unfortunately,  I don't seem to get any updates in my RSS reader when I 
push something  to web/master. Would it be possible have a separate feed 
for each branch?  I tried looking at the gitweb script, but my perl-fu 
is too weak to figure out how to pass an argument from the URL into a 
git_rss() to replace  the

   git_get_head_hash($project)

call.

A second possibility -less desirable, but better than nothing- is to 
have commits from all branches show up in the shortlog and the RSS feed.

-- 
  Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen

```

## Jakub Narebski, 2006-11-14 00:54

Subject: Re: tracking separate branches with RSS
Message-ID: <ejb410$nvg$1@sea.gmane.org>
URL: https://gitlist.dev/e/ejb410%24nvg%241%40sea.gmane.org
In-Reply-To: <ejb3hh$nvr$1@sea.gmane.org>

```
Han-Wen Nienhuys wrote:

> I think that the shortlog / RSS support in gitweb is really neat. 
> However, it seems to track only the master branch.
> 
> In our repository (http://git.sv.gnu.org/gitweb/?p=lilypond.git;a=summary),
> we track two completely disparate branches in one repository: we have 
> both the project and the website for the project in branches
> 
>    master
> 
> and
> 
>    web/master
> 
> Unfortunately,  I don't seem to get any updates in my RSS reader when I 
> push something  to web/master. Would it be possible have a separate feed 
> for each branch?  I tried looking at the gitweb script, but my perl-fu 
> is too weak to figure out how to pass an argument from the URL into a 
> git_rss() to replace  the
> 
>    git_get_head_hash($project)
> 
> call.

For quick'n'dirty solution it would be enough to just replace
    git_get_head_hash($project)
with
    $hash || "HEAD"
(or $hash || git_get_head_hash($project)).

Then to track branch 'branch' with RSS just use 
    ?p=project.git;a=rss;h=branch
as a query string.


I started doing it, but the problem is that you have to change also a bit
of contents, for example summary/title, and some links.

git_rss subroutine is one of the few subroutines which didn't get refactored.

> A second possibility -less desirable, but better than nothing- is to 
> have commits from all branches show up in the shortlog and the RSS feed.

Use "--all" as 'h' (hash) parameter.


P.S. What do you think about moving from RSS to Atom for feeds?

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


```

## Han-Wen Nienhuys, 2006-11-14 01:50

Subject: Re: tracking separate branches with RSS
Message-ID: <455920EC.7060804@xs4all.nl>
URL: https://gitlist.dev/e/455920EC.7060804%40xs4all.nl
In-Reply-To: <ejb410$nvg$1@sea.gmane.org>

```
Jakub Narebski escreveu:

>> A second possibility -less desirable, but better than nothing- is to 
>> have commits from all branches show up in the shortlog and the RSS feed.
> 
> Use "--all" as 'h' (hash) parameter.
> 

This doesn't seem to work.  Note that I'm savannah.gnu.org, which may 
run an older version. The quickest way to get this up and running is to 
have real patches appear in the official release, and convince Sylvain 
to upgrade to a better gitweb.

> P.S. What do you think about moving from RSS to Atom for feeds?

I don't know: as far as I'm concerned, both are things that I paste into 
Thunderbird's "News & Blog" section, and then it magically works. (or 
doesn't, as in this case).


-- 
  Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen

```

## Jakub Narebski, 2006-11-14 02:21

Subject: Re: tracking separate branches with RSS
Message-ID: <200611140321.58749.jnareb@gmail.com>
URL: https://gitlist.dev/e/200611140321.58749.jnareb%40gmail.com
In-Reply-To: <455920EC.7060804@xs4all.nl>

```
Han-Wen Nienhuys wrote;
> Jakub Narebski escreveu:
> 
>>> A second possibility -less desirable, but better than nothing- is to 
>>> have commits from all branches show up in the shortlog and the RSS feed.
>> 
>> Use "--all" as 'h' (hash) parameter.
>> 
> 
> This doesn't seem to work.  Note that I'm savannah.gnu.org, which may 
> run an older version. The quickest way to get this up and running is to 
> have real patches appear in the official release, and convince Sylvain 
> to upgrade to a better gitweb.

Sorry, I should have made more clear that it would work only _after_
mentioned changes.
-- 
Jakub Narebski

```
