View unanswered posts | View active topics It is currently Sun Dec 21, 2014 7:41 pm






Reply to topic  [ 14 posts ] 
Help using SVN and Google Code with RobotC? 
Author Message
Rookie

Joined: Wed Sep 05, 2012 8:33 pm
Posts: 6
Post Help using SVN and Google Code with RobotC?
Hi everyone! I'm a senior at Pacific Ridge School in Carlsbad, CA, and the lead programmer for our school's robotics team. My biggest goal for us for this year is to get a working version control system up and running, as in previous years versions have caused a lot of trouble.

We have a team of several programmers using RobotC for Mindstorms on their personal computers and our lab computers.

Based on some research, it looks like our best option is to store our code in Google Code and access it with SVN. (I will be the first to admit, though, that that may not necessarily be the best option!)

If anybody has any experience with integrating RobotC development with SVN, or really any experience with version control or Google Code at all and wants to offer any tips or suggestions, I would be forever indebted to you. Thanks so much!

Respectfully yours,
Alex :programmer:


Wed Sep 05, 2012 8:54 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: Help using SVN and Google Code with RobotC?
I use SVN on my local laptop and keep the repo in Dropbox that seems to work very nicely. The SVN client I use is Tortoise. I don't think it really matters where your repo is kept, local or remote, the commands function in the same way. There is no automated way to commit code when you save or compile. In any case, you don't really want to commit broken code anyway. I commit from inside the File Explorer.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Thu Sep 06, 2012 5:09 am
Profile WWW
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: Help using SVN and Google Code with RobotC?
Xander, have you accessed it by more than one person at the same time?

I recently started down that path, but chickened out when I thought about what would happen if 2 users accessed it at the same time.
It seems to me that each person would update their local 'cache' of the dropbox, then dropbox would attempt to merge the changes, which may or may not be a disaster. I didn't actually attempt this, but it doesn't seem like it would work. dropbox, and google drive would work the same.

I never have figured out how to use GIT (and I have tried), but this seems like the one of the problems GIT is better for.

Also by not knowing any prior system, GIT should not be as difficult for the OP. That is the problem I run into. I spend more time trying to make GIT do what SVN does because I'm used to it, when GIT is totally different.

Google code on the other hand, (appears to be) a available networked SVN repository. That would work fine, but again GIT (and git hub) may be a more modern (popular) way to do it.

_________________
Mike aka Spiked3
http://www.spiked3.com


Thu Sep 06, 2012 10:25 am
Profile
Rookie

Joined: Wed Sep 05, 2012 8:33 pm
Posts: 6
Post Re: Help using SVN and Google Code with RobotC?
Hi Xander and Mike,

First of all, thank you so much for your help - it means a lot!

As far as SVN vs. Git, I've read that Git has a ton of features based around branching and merging that are awesome for large, community open-source projects with dozens of committers but that those same features make it a complicated nightmare for a small team. And SVN, on the other hand, is supposedly simpler and more straightforward. Again, I have zero (0) experience with either...in fact, now that I look at Github, it looks like that might be a better option.

It would be nice to have a hosted option (beyond Dropbox - we tried using that last year and had issues) like Github or Google Code, just to keep it simple. (I don't mind open-sourcing our code.)

If I look into Git/Github, is there any way to automate the process? Xander, when you said that you commit from the File Explorer, what did you mean? Do you literally copy and paste the new code into your version control system every time? I just wish RobotC would include some sort of integration with some version control system...

Thanks again.
Alex


Thu Sep 06, 2012 11:12 am
Profile
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: Help using SVN and Google Code with RobotC?
ialex.ryan wrote:
... Xander, when you said that you commit from the File Explorer, what did you mean? Do you literally copy and paste the new code into your version control system every time? I just wish RobotC would include some sort of integration with some version control system...


Well, its mike, I think Xander is sleeping now :) both svn and git have a windows UI called tortoise that integrates very nicely with windows explorer, you right click and can commit, checkout, compare, browse SVN etc. The same GIT equivalents also (whatever they are).

http://tortoisesvn.net/ this makes it really really nice. it should work with google code but I have not tried it.

_________________
Mike aka Spiked3
http://www.spiked3.com


Thu Sep 06, 2012 12:39 pm
Profile
Rookie

Joined: Wed Sep 05, 2012 8:33 pm
Posts: 6
Post Re: Help using SVN and Google Code with RobotC?
Wow! I just downloaded and tried out Github, and I am really impressed. It worked completely differently from how I expected it to, and I'm actually really pleased by that. Especially since they offer free Organization accounts for students and schools (github.com/edu) I think I've found our solution!

Thank you both so much for your help, and I think you make an excellent point Mike: as a rare programmer with no preconceptions of how version control should work, it's probably a great thing for me to learn in Git.

Cheers, and thanks again!
Alex


Thu Sep 06, 2012 1:22 pm
Profile
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: Help using SVN and Google Code with RobotC?
I'm going off on a long limb here, but I'm looking for feedback.
as I said before I am a SVN guy, that has failed at using GIT more than once. but I think this is how it goes;

in SVN, the repository is like a library, full of books(projects), with chapters(files). Anyone can check out a book, always. It will give everyone a current copy of the book at any time. single or multiple users may update the chapters(files) and return them to the library(commit) where changes are merged.

GIT is a little different. In GIT the repository is the book(project) and its chapters(files). this makes it easy for people to exchange books and chapters with each other without going to the library, all the books are not kept in one place, and everyone has a copy of the book with all changes and history. in order to get a book from or back into a central location, you pull and push (github). It is an extra step us SVN guys are not used to. and there is no central library that is backed up, in case it burns down, unless you add the github push-pull steps.

I can certainly understand the desire for this in a large distributed, multi-branch environment. but realistically, that is very few projects. I still think SVN is better 90% of the time, but GIT has gotten a lot of mindshare (probably because it's inventor is also king of linux, the platform of open source). Most examples you see about using GIT are command line, and the dev team has acknowledged it was never intended to be user friendly. This may change in the future, but as of now be prepared for difficulties.

http://steveko.wordpress.com/2012/02/24 ... about-git/ has become a very popular article.

_________________
Mike aka Spiked3
http://www.spiked3.com


Thu Sep 06, 2012 2:59 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1372
Post Re: Help using SVN and Google Code with RobotC?
We are using Mercurial. I was told it is very similar to GIT. Both are peer-to-peer source control systems, meaning that everybody has a full copy of the repo and there is no need for a centralized server. Even if you have a server, it is a peer repo to the other repos. The benefit of using a peer-to-peer source control system is that in situations like at competition, you are most likely not having access to the Internet and thus your "server". Peer-to-peer source control allows members of the team to update each others' repos without a server. Usually, we clone the repo to a USB thumb drive and use it as the "server". So everybody can just pass the thumb driver around pushing/pulling updates to/from it. The downside of this is of course scalability. I can't imagine how one can use this type of source control system to do very large scale projects where everybody not only have to carry the full source tree but also the full change history (i.e. the entire repo). But for our purpose and scenario, it is perfect.


Thu Sep 06, 2012 6:05 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: Help using SVN and Google Code with RobotC?
I was not asleep but I am actually in a very nice and remote area of the South of France at the moment :) We do have ADSL here though.

In any case, when two or more people edit and commit the same file and they're edited the same part of the file, you can have a conflict. Usually those are fairly easy to resolve, especially when you're working with C code. I am not sure you can prevent this kind of problem with any versioning system, tbh.

I have no experience with git, but from what I have read about it, it's great if you have many repos that require merging every now and again. If that is not the case with you then you may find SVN to be the most effective, it's also been around a long time, so many of the issues have been ironed out.

As for using Tortoise from the File Explorer, this is what I mean:
Attachment:
2012-09-07_10-01-20.png
2012-09-07_10-01-20.png [ 94.72 KiB | Viewed 3668 times ]

This is actually from the "Save As" thingy in ROBOTC, but you can also do this from the normal File Explorer, of course.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Sep 07, 2012 4:03 am
Profile WWW
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: Help using SVN and Google Code with RobotC?
I was not referring to the generic 'if 2 people update at the same time'. Handling those conflicts is a big part of what what version control is all about. I was specifically talking about the underlying file system structure of the repo, and it's dependency on real time file locking. I suspect it can not handle an architecture such as drop box or google drive. I have not dug deep enough in to SVN to be sure, but I have in another older version control system (source safe), and it is a definite no-no.

In any case, before you ever attempt such a thing with real source code, test it thoroughly, no matter what you choose. Simultaneous access WILL occur at one point if you have more than one user - probably just before something important happens.

It was hard to find anything on the net about it, but I've seen a few;
http://mail-archives.apache.org/mod_mbo ... 3.local%3E

_________________
Mike aka Spiked3
http://www.spiked3.com


Fri Sep 07, 2012 7:53 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: Help using SVN and Google Code with RobotC?
I would not advise you to use Dropbox with multiple people. File locking would be sketchy at best. It would be preferable to use some kind of service such as Google Code or SourceForge.
I would use SF myself for SVN if it weren't for the fact that I can't have code in those repos that I don't want to share. Since I also work on drivers for sensors that are not out yet and are under NDA, I simply can't have them "out there".

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Sep 07, 2012 8:34 am
Profile WWW
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1372
Post Re: Help using SVN and Google Code with RobotC?
That's why peer-to-peer source control is more attractive in this scenario because you don't need a centralized store. So there is no need for DropBox or GoogleCode. The whole repo is on everybody's machines who have enlisted.


Fri Sep 07, 2012 2:22 pm
Profile
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: Help using SVN and Google Code with RobotC?
mightor wrote:
I would not advise you to use Dropbox with multiple people. File locking would be sketchy at best. It would be preferable to use some kind of service such as Google Code or SourceForge.
I would use SF myself for SVN if it weren't for the fact that I can't have code in those repos that I don't want to share. Since I also work on drivers for sensors that are not out yet and are under NDA, I simply can't have them "out there".

- Xander


I agree for a single developer, the drop box svn repository has plenty of good points, and I may may move my home subversion server to that idea for convenience.

Stackoverflow had some comments that pointed to https://www.assembla.com/home

it looks like they offer free private repos (for subersion, git and mercurial, pick your poison:) )

"Is it really free?
Yes. You can choose to upgrade or cancel your plan at anytime.

Yes. Subversion, Git and Hg hosting also completely free for private projects. If you later need more private tools for private projects, then we will ask you upgrade to a professional plan."

_________________
Mike aka Spiked3
http://www.spiked3.com


Fri Sep 07, 2012 3:23 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: Help using SVN and Google Code with RobotC?
Hey Mike,

Thanks for the pointer to that place, I'll go check them out :)

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Sep 07, 2012 4:02 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 14 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.