Re: Invalid content for <rev>
Barrie Slaymaker <[email protected]> Tue, 3 Feb 2004 15:10:27 -0500
| Newsgroups | gmane.comp.version-control.revml |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Dec 21, 2003 at 08:24:14PM +0100, Timothee Besset wrote:
> Hello
>
> Not much progress on the AlienBrain backend. Wrote the parsing of object
> enumeration, that's about it (i.e. obtain recursive list of project
> files).
Any start's a good start :).
> So once I have my list of files, I go through it and do something like:
>
> map {
> my $rev = VCP::Rev->new(
> action => "add",
> id => "$_#1",
> name => "$_",
> source_name => "$_",
> source_filebranch_id => "$_",
> source_repo_id => $self->repo_id,
> type => "text",
> branch_id => "trunk",
> source_branch_id => "trunk",
> rev_id => "$_#1",
> source_rev_id => "$_#1",
> );
> $self->queue_rev( $rev );
> } @_;
Some feedback:
- The rev_id and source_rev_id should be "1", not "$_#1" (I assume
you'll be switching to a real rev_id instead of hardcoding the
number "1").
- The "$_" construct shoudl just be $_.
- Compare this code to any existing source (lib/VCP/Source/cvs.pm,
for instance) to see what's missing. A quick look through the
fields they pass make it look like time, user_id, and comment are
missing from the code snippet above.
I'll add some explanatory text to Rev.pm about what each of these fields
are.
Which fields are required depend on the type of the action.
> perldoc ./lib/VCP/Rev.pm doesn't give a lot of information about what are
> the required files,
Right now, you need to read revml.dtd to suss that out. Once things
settle down, we should document it all. Looks like you got most of it,
though.
> My rough guess is that the node is not compatible with the DTD for revml.
> I don't understand why and how though. Any help?
Precisely! That error message is generated by the self-checking code in
the RevML writer.
- Barrie