Is there any reasonable way to migrate from subversion to cvs?
Asked Answered
A

13

5

My company unwittingly switched from cvs to subversion and now we're all wishing we had cvs back. I know there's tools to migrate history and changes from cvs to svn and there's no equivalent to do the reverse. Any suggestions or ideas on how to do this?

Abnormity answered 1/10, 2008 at 21:52 Comment(14)
I can't think of a single good reason why you would prefer CVS over Subversion. Are you encountering specific problems with the transition that you'd like to ask on this site?Cheddar
What problems are you having with SVN to make you want to go back?Job
@stu, you are either deluded or a troll! :-)Pau
Stu, I totally agree with everyone that Subversion is better then CVS. But you didn't ask which is better, you asked if there's a migration path from one to the other. This isn't the first time I've seen someone ask how to do something unpopular where the top voted answer was to not do it. Bugs meReeve
Well, sometimes the best answer really is to not do something. If someone asked "What's the best sword for disemboweling myself?", would you expect to see many recommendations on the sharpest types of swords?Levan
I don't understand "unwittingly switched". How could they switch without planning to/knowing about it? Did some ninja break in and migrate your whole system from cvs to subversion in the middle of the night?Moiramoirai
Sometimes the best answer really is not to do something. This is one of those times. Too bad for you if you don't like the answer, that doesn't change it.Tonsorial
LOL, AShelly. This is a perfect example of the sneering "why would you want to do that?" syndrome on Q&A sites, even this one. I'm always amazed how many of these "responders" just can't hold their tongues, when "don't do that" is clearly not the information the asker is seeking.Hoopes
Given that SVN is generally seen as being better than CVS, putting 'upgrade' in the question title was always going to provoke somewhat of a religious war. I would suggest rewording the question to sound more neutral regarding CVS and SVN.Photographer
I think that Stu might just be a troll. If only I could apply tags.Theca
No, I'm not a troll. I will say that somebody changed the question and it wasn't me. I'll bet if I had said "upgrade from cvs to subversion it would have stayed 'upgrade' but apparently somebody decided they know my situation better than I do and that I must be incorrect.Abnormity
As for unwittingly: The sysadmin was upgrading the dev environment, he had problems getting pserver to run so he decided, not knowing much about subversion except that it was newer and without asking the developers as far as I know, to install svn instead.Abnormity
I would think that programmers, being from a smarter set of the general population would be able to see that if somebody does something different than them that maybe there is a reason beyond their understanding. Although maybe that is wisdom and not intelligence.Abnormity
@Abnormity finding this question by chance, four years later -- just out of curiosity, I wonder what you ended up doing. Did you stay with SVN, move back to CVS, or migrate to something new and trendy like git?Lithography
B
25

I originally added this as a comment to someone else's answer, but then realized that it was an answer, of sorts. I have done these sorts of transitions before, where there was no existing way to convert from one SCM system to another.

It's not rocket science to write a script that takes the list of commits from your SVN repository, and iterates through them one at a time, merging them into a newly-created CVS repository. Getting all the branches and tags exactly correct might be a bit more work, but if you want to just save revision history for a few branches, it should be pretty easy.

I'm also of the opinion that you won't really gain anything by switching back to CVS, but if you want to do so, then you'll likely be writing your own script. The "svn export" command will undoubtedly be useful in this endeavor.

Bioclimatology answered 1/10, 2008 at 22:35 Comment(1)
How dare you actually answer the question that was asked!Job
I
8

So what is with SVN that your company dislikes so much and CVS does better? The designers of SVN went out of their way to make the SVN experience fairly similar to CVS. If you use the Tortoise client as a front end the experience is very similar. SVN gives you atomic commits, which while not quite up to the standard of Perforce is miles in front of CVS.

I do have to sympathise with your plight. I upgraded our development team & IT Team from CVS to SVN. I got all the right python scripts to upgrade all the version history and we have been using SVN happily for nearly 4 years. About three months ago the IT Team leader decided to "upgrade" all his projects from SVN to guess what? That's right, the heavy lifter of the version control systems: SourceSafe!

I would definately stick with SVN or even look at some of the newer distributed systems such as Mercurial. With these systems there is no central server. They rely on being able to branch & merge across dozens or hundreds of peers. You define your own topology, so for example, you would specify a particular peer as being the one that performs daily builds.

Ichnography answered 1/10, 2008 at 22:18 Comment(1)
Upgrade from SVN to VSS? There is a story worthy of TheDailyWTF behind that comment? Are you still working with this moron?Metonym
J
7

I don't think the tools exist to go in the other direction, because there's not much demand for it.

If you really must do it, it shouldn't be very hard to write a script that walks through the history of the SVN repo, getting each revision and committing it to CVS.

BTW, I'm genuinely interested to know what problems you have with SVN.

Job answered 1/10, 2008 at 22:7 Comment(3)
I too am interested in what's so bad about SVN that CVS is preferable: in my experience, SVN is everything CVS is and more!Tricostate
Firstly tags. Secondly branches. Thirdly the attitude that the svn developers have about how you should re-learn what tags are so that subversion now makes sense rather than making the tool work in a sensible way. Linus Torvalds did a great talk about git at google and I think mentioned a few things why svn is not so great.Abnormity
@Abnormity What Linus said about subversion was: "When I say I hate CVS with a passion, I have to also say that if there are any SVN (Subversion) users in the audience, you might want to leave. Because my hatred of CVS has meant that I see Subversion as being the most pointless project ever started. The slogan of Subversion for a while was "CVS done right", or something like that, and if you start with that kind of slogan, there's nowhere you can go. There is no way to do CVS right." I don't agree with him, but I'm really not clear how this could support your cvs>svn argument.Hydrophyte
T
6

Not an upgrade. Do not do this.

Seriously, why would you prefer CVS to SVN? CVS is literally a toy that pretends to allow teams to work without explicit communication. It really is terrible.

If you need something other than SVN for whatever reason, look at other version control systems. There are many, and they are almost all better than CVS (in fact, only Visual Source Safe is as poor).

Theca answered 1/10, 2008 at 21:56 Comment(5)
cvs handles tags and branches in a more useful way for me than subversion does.Abnormity
Or you could learn how to do them in SVN. Seriously, if you have never had a problem with SVN giving you configuration problems, you likely have a tiny project. I suggest that you look at other version control systems if you need something other than SVN.Theca
@Marcin: Take a deep breath, get some perspective, and stop assuming that just because you don't understand the OP's motivation he must be an idiot.Job
@Mike F - I'm pretty sure that there is no reason why one would want to do this other than ignorance. Even rolling ones own VCS system based on RCS would make more sense.Theca
Everytime somebody in my office comes to me and mentions how annoying subversion is, I am reminded of this thread. Yes subversion is newer, yes it versions in a database, yes it can do atomic operations, but tags are not tags, they're copies, this makes tagging useless and makes a bigger mess than not tagging at all. I just get so frustrated with it so often, I miss cvs. And this thread. :-)Abnormity
A
6

SVN is not great. SVN is better than CVS. If you want to change checkout Mercurial, GIT, Bazaar.

Athodyd answered 1/10, 2008 at 22:5 Comment(1)
ykaganovich, this is ridiculous.Theca
C
6

One aspect of git has not been discussed when it has been brought to your attention in all these other answers: git provides a cvs server emulation, so that you might migrate to git (svn to git is easy and well supported) and later use a cvs server interface for accessing the repository in a centralized manner. Nobody has to know you use git in the background and you don't have to deal with distributed backup issues.

Carlstrom answered 2/10, 2008 at 8:5 Comment(0)
I
5

Your options are probably realtively limited. Remember that active development of CVS stopped a while ago, so there are probably no tools for you from the CVS developers. And since one of the main goals of svn was to be a better CVS, those developers will probably not have expected anyone to move backwards either.

But if you don't like subversion, why not have a look at the more modern distributed systems (git, mercurial etc)?

Isadoraisadore answered 1/10, 2008 at 22:11 Comment(0)
V
4

when all you have is hammer, everything looks like a nail.

best bet is to learn svn it will make more knowledgeable.

Virg answered 1/10, 2008 at 21:59 Comment(1)
I have two years experience with svn, and 10+ with cvs. Subversion is newer, but for my uses, it is not better. Let's not fight.Abnormity
O
4

Agree with Corporal Touchy.

SVN is better than CVS, because it was designed to be - it's roughly the same thing, with some simplications and new features.

With Svn, you can move/rename a file without losing its history; you get safer commits (commits are atomic operations) and global revisions.

Anyway, try to get to know it better before swithing back to CVS and even better, try to really understand your needs as a team for a repository.

PS: I think Corporal was talking about Mercurial

Ornithischian answered 1/10, 2008 at 22:24 Comment(1)
Maybe I grew up on CVS and learned to take advantage of things that it can do that svn can't which is why I find it lacking. For example, I have a working directory that all my build scripts etc. work with, and I want to back out (update via tag) a change in one file and rebuild. CVS can, SVN can't.Abnormity
A
4

svn was supposed to be better than cvs but in some areas that didn't work well. The other distributed tools are a lot faster (svn is slow as hell, even cvs can be faster sometimes), have much more useful features than svn, are developing rapidly (while seeing any new feature in svn takes YEARS). On the other hand svn is quite easy to learn and centralized (this is important for some people).

svn team is focused on own agenda, it's very hard to get support from developers (comparing to other open source projects), some bug reports exists for long time without any interest from developers.

I'm disapointed by how svn project looks and how it's developed but well, maybe that will change in future.

Applicatory answered 2/10, 2008 at 7:33 Comment(1)
I appreciate a response from somebody that isn't 'you're an idiot because you're trying to do something that isn't popular.' Thank you. +1Abnormity
I
1

the only 2 drawbacks of subversion I can think of users coming from CVS are

  • the speed of checkouts over http(s)
  • the lack of modulaliases

the first one can be solved by using svn(+ssh) which is the more comparable format as CVS uses its own protocol as well. the second one is a little trickier, but can be emulated by svn:externals (which have their own nasty sideeffects) If you encountered any other additional drawbacks, I am all ear..

Imperturbable answered 2/10, 2008 at 7:25 Comment(0)
H
1

Just pay attention to one point: Bazzar, Mercurial etc. (who were advised by some people here) are all distributed version control systems. I found it almost impossible to manage big groups of programmers working on the same source code using these kind of tools. In my company we use SVN and it's doing a wonderful job.

Hygienics answered 2/10, 2008 at 7:51 Comment(2)
Could you explain a bit more what your experiences are? Sun chose Mercurial for being usable for big groups of programmers, so it is very valuable what you have found.Nicolis
From my experience, it is best to update/merge/resolve conflicts as often as you can (at least once a day), especially in near deadline projects. IMHO, distributed systems encourage you to "work on your own".Hygienics
K
1

No idea why you'd want to do this, but going from SVN -> GIT -> CVS might work

You'd run..

git svn clone http://thesvnserver ourrepo

Then using the following guide to export back to CVS (not entirely sure this will work):

http://issaris.blogspot.com/2005/11/cvs-to-git-and-back.html

git cvsexportcommit 4a20cbafdf25a141b31a8333284a332d1a4d6072

There's also git cvsserver

Kettledrummer answered 14/4, 2010 at 22:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.