On Tuesday, June 18, 2002, at 10:59 AM, Ben Collins-Sussman wrote:
> Daniel Berlin <email@example.com> writes:
>>> Ingredient #2 is recently completed by gstein: he's used SWIG to
>>> generate python bindings for libsvn_repos and libsvn_fs. Now python
>>> can build svn repository transactions and do direct commits. (He has
>>> a sample programs for this.)
>> Hey now, I had a hand in this too!
> Very true, very true!
> I've been blinded by gstein's sudden surge of unexpected SWIG work
> last week. :-)
>>> Step 3 is the last big hurdle. cvs2svn.py is only partly functional.
>>> IIRC, the script still needs to be taught to recognize and preserve
>>> branches and tags, which is a hard design problem. gstein can talk
>>> more about the state of the program, and what needs to be done.
>> It's actually not all that *hard*, just *annoying* to implement.
> Can you elaborate on the theory of how one might do this?
We parse one rcs file at a time, so we need to do the following (rcsparse gives us branch info):
Process the main trunk revisions first for a file.
Compute the ordering of branches, such that branches of branches appear after the branch they are a branch of.
confusing, eh? Topo-sort them, basically, so that given
main-branch, release-branch (branch of main-branch), bugfixed-release-branch (branch of release-branch), you end up with
main-branch, release-branch, bugfixed-release-branch. That way, we always have the revision we need to base the branch on when we go to process the branch.
For each branch, in order:
Create a branch dir if it doesn't exist.
Select the branch's branchpoint revision as it got mapped to the subversion revision.
Make the copy to the branch dir of that revision.
Create the rest of the revisions of that file for that branch, as we do for the main revision now.
For tags, just do it after branches. It's a subset of branch logic, you never need to apply more revisions, just make a copy of a revision of a file into a tag directory.
See, easy to describe, pain in the ass to implement.
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Tue Jun 18 17:15:43 2002