You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by Marcus Brito <mb...@gmail.com> on 2004/12/01 13:11:04 UTC

cvsgrab and apache repositories

Not really a hivemind issue, but...

Has anyone managed to checkout hivemind (or any other apache project)
sources using cvsgrab? I'm behind an evil corporation firewall (that
pays my bills, maybe they're not that evil) and there's no way I could
check them out using a standard CVS client.

I've tried using cvsgrab, but every attempt results in an empty
directory. The same cvsgrab version seems to work fine agains
sourceforge or objectweb repositories -- maybe this is something
specific to the ViewCVS 1.0-dev version Apache is using.

And this comes to the following (aha, finally something about
hivemind): how about providing nightly CVS snapshots, or maybe move to
subversion? I wasn't *that* a big fan of subversion until I realized
that plain HTTP(S) access really is a very attractive feature.

-- Marcus Brito

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: cvsgrab and apache repositories

Posted by Knut Wannheden <kn...@gmail.com>.
Marcus,

Did you check with the Apache infrastructure people
(infrastructure@apache.org) ?

--knut

On Wed, 1 Dec 2004 17:02:58 -0300, Marcus Brito <mb...@gmail.com> wrote:
> Replying to yourself is sad, I know....
> 
> But anyways, if anyone else encountered this problem and needs a
> temporary fix, download cvsgrab source code and modify two lines in
> ViewCvsInterface.java, and recompile everything from scratch.
> 
> private String _filesXpath = "//TR[TD/A/IMG/@alt =
> '(file)']|//TR[TD/A[contains(@href, '&view=log')]/IMG]";
> private String _directoriesXpath = "//TR[TD/A/IMG/@alt =
> '(dir)'][TD/A/@name != 'Attic']|//TR[TD/A/IMG[contains(@src,
> 'dir.png')]][TD/A/@name != 'Attic']";
> 
> Notice that I'm just adding new, 'looser' paths to the already
> existing ones. I'm downloading hivemind right now with my patched
> version, and things seems to be fine now.
> 
> P.S.: I know my approach is ugly. I know there are better ways to
> solve this problem. But I also know that I just browsed the cvsgrab
> source for 5 mins before coming up with this. Maybe ludovic (cvsgrab
> author) will come up with a clever fix, or maybe the Apache folks will
> fix their ViewCVS interface.
> 
> -- MB
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: cvsgrab and apache repositories

Posted by Marcus Brito <mb...@gmail.com>.
Replying to yourself is sad, I know....

But anyways, if anyone else encountered this problem and needs a
temporary fix, download cvsgrab source code and modify two lines in
ViewCvsInterface.java, and recompile everything from scratch.

private String _filesXpath = "//TR[TD/A/IMG/@alt =
'(file)']|//TR[TD/A[contains(@href, '&view=log')]/IMG]";
private String _directoriesXpath = "//TR[TD/A/IMG/@alt =
'(dir)'][TD/A/@name != 'Attic']|//TR[TD/A/IMG[contains(@src,
'dir.png')]][TD/A/@name != 'Attic']";

Notice that I'm just adding new, 'looser' paths to the already
existing ones. I'm downloading hivemind right now with my patched
version, and things seems to be fine now.

P.S.: I know my approach is ugly. I know there are better ways to
solve this problem. But I also know that I just browsed the cvsgrab
source for 5 mins before coming up with this. Maybe ludovic (cvsgrab
author) will come up with a clever fix, or maybe the Apache folks will
fix their ViewCVS interface.

-- MB

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: cvsgrab and apache repositories

Posted by Marcus Brito <mb...@gmail.com>.
> What version of CVSGrab are you using?

Any version I tried, from 2.0.3 to the latest CVS code, yield the same
results: no files are fetched. I've downloaded cvsgrab code and found
out the reason: Apache's ViewCVS templates are a bit different than
what cvsgrab expects.

For example, here's the XPath expression cvsgrab uses to find link to files: 

//TR[TD/A/IMG/@alt = '(file)']

And here's a sample output from Apache's ViewCVS output:

<td colspan=2>
<a name=".classpath"
href="/viewcvs.cgi/jakarta-hivemind/.classpath?rev=1.42&amp;view=log">
<img src="/viewcvs.cgi/*docroot*/images/text.png" alt="" border=0
width=16 height=16>
.classpath</a>
</td>

Notice that the alt attribute isn't set to "(file)", as cvsgrab
expects, and all other sites (sourceforge, objectweb, codehaus, etc)
uses. I can't imagine why Apache removed the alt attribute... Maybe I
should raise a bug agains Apache's web infrastructure? Where can I do
this?

-- Marcus Brito

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: cvsgrab and apache repositories

Posted by Pablo Lalloni <pl...@afip.gov.ar>.
What version of CVSGrab are you using?

I'm attaching the very simple script I use for running it (it works here).

El Mié 01 Dic 2004 09:11, Marcus Brito escribió:
> Not really a hivemind issue, but...
>
> Has anyone managed to checkout hivemind (or any other apache project)
> sources using cvsgrab? I'm behind an evil corporation firewall (that
> pays my bills, maybe they're not that evil) and there's no way I could
> check them out using a standard CVS client.
>
> I've tried using cvsgrab, but every attempt results in an empty
> directory. The same cvsgrab version seems to work fine agains
> sourceforge or objectweb repositories -- maybe this is something
> specific to the ViewCVS 1.0-dev version Apache is using.
>
> And this comes to the following (aha, finally something about
> hivemind): how about providing nightly CVS snapshots, or maybe move to
> subversion? I wasn't *that* a big fan of subversion until I realized
> that plain HTTP(S) access really is a very attractive feature.
>
> -- Marcus Brito
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org

-- 
Pablo I. Lalloni <pl...@afip.gov.ar>
Teléfono +54 (11) 4347-3177 
Proyecto Pampa
Dirección Informática Tributaria
AFIP

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Whatever it is, I fear Greeks even when they bring gifts.
  -- Publius Vergilius Maro (Virgil)
en