[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: cvs2svn: raw or cooked?

From: Karl Fogel <kfogel_at_galois.collab.net>
Date: 2000-09-27 04:34:53 CEST

Bob Miller <kbob@jogger-egg.com> writes:
> Two strikes against parsing "cvs log" output:
>
> 1. doesn't handle the Attic.

Oh yeah, I keep forgetting about that. Good point!

> 2. potential ambiguity if a log message's contents look like a
> log message delimiter.

Once a million years, but yeah, that's true.

> One strike against parsing RCS files directly:
>
> 1. can't access remote CVS repository.

This is for converting a repository, so that's not so important.
Presumably, one already has local access to it.

> No, that makes it easier. I was going to define a serial
> representation of the info I collect out of CVS and write a program to
> read that rep. and call libsvn_fs routines. If the serial format is
> already defined, then that's one less step to do.
>
> Does a program exist to read vdelta XML?

You don't have worry about reading the XML, I think -- that's what
we're working with right now, so you should get it "for free" by the
time you're ready.

> BTW, here's my status. cvs2svn.pl now can read one RCS file and build
> the correct data structure. I've written the directory tree walker as
> a separate program, and I need to integrate it into cvs2svn.pl, then
> it's time to check it all in.

Congrats!

> I figure my progress will basically stop for a couple of days while I
> figure out how to actually USE cvs to check files in, at the same time
> I figure out how to bludgeon automake et al into cooperation.

   cd working_copy/foo/bar
   cvs add cvs2svn.pl
   cvs ci -m "Initial checkin." cvs2svn.pl

> How close is it to the DTD that Branko posted the other day? His
> looked like this. (I think you missed it; it was in an attachment.)

Uh, I don't know. I'll have to read this over more carefully tomorrow
(I think I stashed Branko's original message for later digestion
too).

I want to write up an English description of the format (an annotated
XML tree delta, probably), as well as have a DTD.

> <?xml version="1.0" encoding="UTF-8"?>
> <!-- XML DTD for Subversion's delta packages. -->
> <!ELEMENT delta-pkg (tree-delta, text-delta*)>
>
> <!-- Delta types. -->
> <!ELEMENT prop-delta (set | delete)+>
> <!ELEMENT text-delta (#PCDATA)>
> <!ATTLIST text-delta
> id CDATA #IMPLIED
> >
> <!ELEMENT text-delta-ref EMPTY>
> <!ATTLIST text-delta-ref
> id CDATA #REQUIRED
> >
> <!ELEMENT tree-delta (add | delete | replace)+>
>
> <!-- Delta instructions. -->
> <!ELEMENT add (dir | file)>
> <!ATTLIST add
> name CDATA #REQUIRED
> >
> <!ELEMENT delete EMPTY>
> <!ATTLIST delete
> name CDATA #REQUIRED
> >
> <!ELEMENT replace (dir | file)>
> <!ATTLIST replace
> name CDATA #REQUIRED
> >
> <!ELEMENT set (#PCDATA)>
> <!ATTLIST set
> name CDATA #REQUIRED
> >
>
> <!-- Delta targets. -->
> <!ELEMENT dir ((prop-delta, tree-delta?) | (tree-delta, prop-delta?))?>
> <!ATTLIST dir
> ancestor CDATA #IMPLIED
> ver CDATA #IMPLIED
> >
> <!ELEMENT file ((prop-delta, (text-delta | text-delta-ref)?) |
> ((text-delta | text-delta-ref), prop-delta?))?>
> <!ATTLIST file
> ancestor CDATA #IMPLIED
> ver CDATA #IMPLIED
> >
Received on Sat Oct 21 14:36:09 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.