[Logo] JCVSForum - Community Support For JCVS Users and Developers
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Using the API to traverse an entire CVS repository  XML
Forum Index » JCVS Developers
Author Message
Anonymous



Hi all,

I'm a regular CVS user, but I'm new to developing with CVS.

My idea is to traverse the entire CVS repository for indexing purposes (using
Java of course).

I checked out the Javadocs for the API but could not understand it enough to
find out what's needed.

Can it be done easily? Could anyone provide some hints?

Thanks in advance,
--mariano
time


[Avatar]

Joined: 05/06/2004 18:09:23
Messages: 367
Location: Bangkok
Offline

I apologize for the lack of developer oriented docs. I hope to correct this.

As for what you describe, it sounds as though you wish to get the status of
every file in the repository. This would first require a checkout, in order to
get the CVS "Entries" that you need for the file, then you would execute a
status command for each file (probably by directory).

You could start by reading the CheckoutPanel.java source code in com.ice.jcvsii.
This is a pure checkout, so it is one of the easiest examples to follow. Once
you have checked out a working directory, you need to execute status commands (I
would work on a directory basis, allowing you to open a CVS/Entries and process
it). There is not a good example for this. There is a JavaScript gjt-status.js
in the jCVS II package, but it is not a good example for you.

Why don't you get the checkout working, and we can discuss the status part more
in this thread?
[Email] [WWW]
mbarcia


[Avatar]

Joined: 05/08/2004 19:20:16
Messages: 3
Offline

Hi Tim,

Thanks very much for the quick response.

Let me give you some background information about my current interest (btw it's
a long text, it's necessary to explain things a little in detail ... ).

My company is finishing developing a platform for knowledge management called
"Kneo Base"
(http://www.colaborativa.net/go/en/our-products/kneo-base/index.html),
and we already have a SPI for "robots" with a couple of robots working in
production systems. A "robot" is a kind of "agent system" in charge of "feeding"
the platform with a particular source of information (like CVS is).

In our experience, CVS is a valuable source of meta-information for software
companies and integrators, but it seems to be hardly exploited in the real world
perhaps because it's difficult to retrieve that meta-data stored. For example,
we have been using internally a CVS server but we added e-mail notification, so
developers now like to write messages because communication is very much
improved. Even so, many times we find ourselves thinking "I need to do this ...
it would be nice to search for that information .. I can recall Joe did the same
thing some time ago ...".

It was getting harder and harder to find the information we need for our
day-by-day work, because we also have other web applications which we use a lot
(i.e. extranet). A crawler/bot mechanism is not good at this task (and many
other tasks where an interactive application is involved), so we thought about
making "Kneo Base" for our intranet at first, to be able to make a
powerful/total/unified search.

Now, the idea is to index the meta-data of a CVS repository through a "Kneo"
robot. My idea is that the community (in this case, the CVS users community) can
be benefited from "Kneo Base" and so we are planning to release shortly a
"community edition" capable of searching free-software sources, like CVS,
OpenCMS, etc. Do you think this would be useful? Do you think developers would
support such initiative in any way?

Thanks in advance,
--mariano
[WWW]
mbarcia


[Avatar]

Joined: 05/08/2004 19:20:16
Messages: 3
Offline

Tim,

I can't blame you for taking a couple of days to answer (I took a whole week
before!)


This is just to tell you we'll start with the code for the check-out part and
see how we do.

However, I'm still interested in your opinion about the convenience of having
such a feature in CVS repositories.

Keep you updated, thanks

--mariano
[WWW]
mbarcia


[Avatar]

Joined: 05/08/2004 19:20:16
Messages: 3
Offline

Tim,

We have been able to do an example app that performs a checkout of a repository
onto the local disk. We found a couple of drawbacks, but we could finally solve
them and the app is running.

Now, the idea is to index all the "log messages" of all entries.

Thanks in advance,
--mariano

PS: Here is a brief list as feedback, maybe you can give some hints to improve
the code.

1. The configuration ends up duplicated in the CVSRequest (it's already in the
CVSProject)
2. For our simple client example, we had to set a fake UserInterface object in
the CVSRequest
3. We used METHOD_INETD as the connection method, it was not clear how could
METHOD_RSH be used (is SSH connection possible?)
[WWW]
time


[Avatar]

Joined: 05/06/2004 18:09:23
Messages: 367
Location: Bangkok
Offline

Mariano,

Please excuse the long delay. I have traveled to Thailand, so connectivity is
"spotty", and my attention is quite intermittent.

You are correct that CVS has little "meta information", by design. Thus, you are
left with performing "checkout", "status", and "log" commands to "discover"
information about the repository. This has long been a limitation of CVS
(although I consider it a strength).

METHOD_RSH connection should work as expected, what is the problem that you are
seeing? As for SSH, you should be sure to work with the com.ice.cvsc package
that comes with the 5.4.2 version of jCVS II, as all previous versions have one
issue or another.

There is a "conceptual" reason that information is duplicated between CVSProject
and CVSRequest. In retrospect, it may not be the best decision, as the two
classes are very tightly linked. However, it is possible to use CVSRequest
without using CVSProject, which is the reason for the redundancy.

The need for a CVSUserInterface class is simple. Some code attempts to fill in a
default "null" class in the event one is not provided.

[Email] [WWW]
 
Forum Index » JCVS Developers
Go to:   
Powered by JForum 2.1.9 © JForum Team