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

Re: mks2cvs + cvs2svn selects wrong file versions in tags

From: Max Bowsher <maxb_at_ukf.net>
Date: 2003-09-01 14:57:40 CEST

Mats Nilsson wrote:
> Max Bowsher wrote:
>> Mats Nilsson wrote:
>>> Maybe cvs2svn should refrain from trying to convert revisions on RCS
>>> branches in the absence of corresponding branch labels.
>> It would be nice to at least fail with an informative error. Feel like
>> writing a patch? :-)
> I know close to nothing about python, nor about the algorithm of
> cvs2svn. I could author an issue, though.

OK. Thinking it over, I think we might be able to achieve this quite easily.

Index: cvs2svn.py
--- cvs2svn.py (revision 6941)
+++ cvs2svn.py (working copy)
@@ -173,6 +173,10 @@
       op = OP_CHANGE

+ if self.get_branch_name(revision) is None and not
+ sys.stderr.write("Revision '%s' has no branch name.\n" % revision)
+ sys.exit(1)
     # store the rev_data as a list in case we have to jigger the timestamp
     self.rev_data[revision] = [int(timestamp), author, op, None]

If you would like to file an ENHANCEMENT issue for this, I will attach a
patch after I've checked it a little more carefully.

>> Should you decide to attempt to enhance mks2cvs, you might
>> like to take note
>> that CVS branches are supposed to use an *even* branch number
>> unless they
>> are vendor branches - i.e., not 1.
> I know. This doctored example works fine. Correcting this would
> obviously require renumbering of the original version numbers. And
> keeping a dictionary for resolving references from the project files.
> I'd rather avoid it if cvs2svn doesn't require it.

I'm unfamiliar with MKS, so I didn't know that mks2cvs was basing the
numbers on something internal to MKS.
Just a thought, but couldn't you just multiply each branch number by 2 to
convert MKS->CVS?

> Or do you foresee a conflict against the vendor branch revision?
> Does/will cvs2svn apply some special treatment to those branches?

cvs2svn currently incorrectly skips the first revision on a vendor branch.
(Issue 1474). Once this issue is resolved, cvs2svn will not treat vendor
branches specially. At some point in the future, someone might make cvs2svn
do something different with vendor branches, to achieve a repos layout more
like that recommended for vendor branches in the svn book.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Sep 1 14:58:38 2003

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

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