Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jdavidb (1361)

jdavidb
  (email not shown publicly)
http://voiceofjohn.blogspot.com/

J. David Blackstone has a Bachelor of Science in Computer Science and Engineering and nine years of experience at a wireless telecommunications company, where he learned Perl and never looked back. J. David has an advantage in that he works really hard, he has a passion for writing good software, and he knows many of the world's best Perl programmers.

Journal of jdavidb (1361)

Friday April 04, 2008
11:24 AM

Getting going with SVK

[ #36058 ]

I mentioned awhile back I was going to start using SVK while our repository at work is CVS. After a couple of false starts, I've really started to use SVK this week. It's already helping me, but I'm having some problems from lack of knowledge.

SVK and CVS integration isn't perfect at this point (where "perfect" would be that SVK can mirror a CVS repository the way it can a Subversion repository, and I could use SVK to push to it and pull from it seamlessly), so basically you check out a CVS working copy and then track that CVS copy as it changes in SVK. This gives some headaches, but actually this alone has helped me in several ways.

I think what I want to do is have a branch that tracks the CVS trunk, and then one or more local branches for development. I have some local changes I want to have all the time but not commit, and I think I want that to be my trunk and everything else to be a branch off of that. I want to update my CVS trunk periodically, then pull those changes down to my trunk at times that are sensible for me. When I want to commit changes I want to push them into the CVS trunk from the downstream branch, and then push them back from there into CVS.

I sort of got this working yesterday, and it was very nice. I tested several times pulling CVS changes into my CVS trunk, then using smerge to pull them into my working trunk. Nice. I was excited.

And then I tried to do some work in my trunk and pull it back into CVS trunk. Crash! I ran headlong into a knowledge problem. I know how to execute "take all of the changes in this branch and pull them into that branch." But I cannot figure out how to execute "take some of the changes in this branch and pull them into that branch." So I've got files modified in the working trunk, and I don't want to pull the changes to those files into the CVS trunk, but I don't know how to merge the changes from just some of the files.

I've tried to view the docs on the merge, cmerge, and smerge commands to figure out how to do this. I suspect it's the merge command, but I just can't get the syntax right even looking at the help. I've tried looking through the SVK book, but it's very much a work in progress and doesn't seem to be helping me.

If anyone can tell me what command I should be using and how to execute it, that would be great. I'm not posting the commands I've tried or the error messages because I really think I was barking up the wrong tree and the commands I executed would just confuse knowledgeable SVK users as to what I was actually trying to do. The commands I typed probably don't even come close to matching the prose description above. :) But if error messages can help someone who's willing to take the time to help me, I'll post them.

I am willing to listen to "Use git; you won't have to deal with this." :)

Update: I just now found out I can use svk push and svk pull to move some stuff between branches, but it still doesn't seem to have a provision for moving the changes to only some files.

Update: Here's where the question was asked on the svk-users mailing list. I can't see if it was answered anywhere. The svk-devel list seems to be the better place for questions, but I don't see it asked there anywhere. I may ask there myself next week. Or I may try a git trial. For now I'm stuck with a single branch into which I pile both my local changes and pull updates from cvs.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • There are at least three functional ways to get from CVS to git listed on the Interfaces, Front-ends And Tools page on the git wiki [git.or.cz].

    If you want to be able to commit back to cvs, you probably want to go the git-cvsimport / git-cvsexportcommit route.

    • Thanks. I'll definitely look more into it.

      I came into work this morning to discover our CVS server has a kernel panic; one of the only two guys who can fix it didn't arrive till just now, so at the moment I can't really use much of anything. :) Actually I can continue to commit to my SVK repository; just can't get all the updates that happened after I went home on Friday and over the weekend.

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
    • Thanks again. A little bit of reading, study, and practice, and now I see that git does in fact handle my gripe above quite nicely. Score 1 for git, 0 for svk, which disappoints me, because to be honest I'm biased in favor of svk. :)

      I love that with git I can take a long time specifically marking what I actually want to commit and that when I commit, unless I make an unconscious habit of using the -a option, I'll just commit the things I marked rather than possibly screwing up and committing everything!

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers