Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Portable Revision Control Server (using Subversion) (http://www.chiefdelphi.com/forums/showthread.php?t=86747)

Bryscus 01-09-2010 15:09

Portable Revision Control Server (using Subversion)
 
Hi all,

I'm throwing out a feeler to determine what teams do for software revision control before and at competitions. Two years ago, I set up an Ubuntu linux server (no GUI, ha!) at our pit running a subversion server. It got some mild use the first year and then a bit more use last year. Next year, I plan on schooling the programmers in the way it's done in the real world.

I was wondering what methods teams use for altering software at the competitions. Are there teams that show up and make no modifications to their code (if so, I bow to thee)? Or do teams have only one programmer modifying at a time? Do you use code revision at the competitions?

I have already determined that there have been a significant number of situations that call for us to have a portable subversion server. The three main concerns were portability (size, weight, ruggedness, lack of support wires), multiple point access (a few different programmers able to connect simultaneously) and number one it had to be done on the CHEAP! After searching through IPX size motherboards, cases, and other small embedded boxes I finally came up with the simplest and most readily available platform...the Linksys router. Specifically, the WRT54G-TM (or similar variant - the TM is like a GS v3.0 with more RAM and Flash than the standard WRT54G).

So, I wonder how many people now think I'm crazy? Well, I can tell you that as of the end of last year's season, I had successfully compiled and tested a custom image of OpenWRT (linux for WRT) for the Linksys router using only the 8MB of built-in flash for storage. I was able to store both our 2009 and 2010 code repositories with enough room for at least another 6 or more years (it uses the heavily compressed file system called JFFS2). The Linksys satisfies all of my requirements beautifully. It is small, light, fairly rugged and only needs one 12V wall wart for power (could be powered from a battery too). It has a built in switch so multiple people can access it (or it could be done wirelessly) and best of all it could cost as little as $20! I bought some used TM versions from eBay for about $23, but that's atypical. One can also do an SD card modification (which I have done but not tested) to increase storage to 4GB or more. I've also installed and tested samba which allows for mapped file storage.

I have fairly thoroughly documented the whole process and was wondering if there are any other teams that would be interested in this project. I have already determined that we will try this system out in the upcoming year and I will try to provide feedback on any issues we observe. So far, it appears to run smoothly and about as fast as the linux PC we used previously (even though it's only a 200MHz processor). Any feedback would be great. Thanks.

- Bryce

P.S. I do also realize that it is possible to keep a local repository on a USB flash drive as well. This project is meant to be a safer and easier alternative.

Mark McLeod 01-09-2010 15:22

Re: Portable Revision Control Server (using Subversion)
 
Interesting solution.

Do you just turn off the wireless to make it Pit legal or do you get permission from the FTA to run an access point?

GGCO 01-09-2010 15:59

Re: Portable Revision Control Server (using Subversion)
 
That's a very creative solution.

Our team uses a subversion repository hosted on one of our mentor's servers. As far as what we do during competition, it's complicated.

Usually the rule of thumb is to have a "barebones" copy - where only the essential drive code and simplest auton possible exist. This code is to be used only in dire situations when our robot is having chaotic network connectivity issues and we want to check off "code" from our troubleshooting checklist.

We always try not to change any code during a competition, but if we ever do it's done by only one programmer and okay'ed/reviewed by the programming mentor.

Love the idea of using a linksys router though, really really smart.

Joe Ross 01-09-2010 16:00

Re: Portable Revision Control Server (using Subversion)
 
We started using a surplus laptop running linux as a CVS server 5 years ago. When that died, we replaced it with the cheapest netbook we could find. We hook that up via network to the programming computers.

Typically we only have 1 person making changes at competition (at most 2), but revision control is still very important (especially when you're asked to go back to the autonomous from 3 matches ago).

The next time our computer dies, I was planning to look into a plug computer like SheevaPlug

AustinSchuh 01-09-2010 16:48

Re: Portable Revision Control Server (using Subversion)
 
Quote:

Originally Posted by Joe Ross (Post 973075)
The next time our computer dies, I was planning to look into a plug computer like SheevaPlug

Unrelated to this discussion, we have a SheevaPlug at home and it's been very nice so far. Definitely has a bit of oomph.

zombiezen 01-09-2010 17:34

Re: Portable Revision Control Server (using Subversion)
 
Our team has been using Bazaar instead of CVS or Subversion, and that's been working out great. The highlights are:
  • No central server required (but you can have one)
  • Every working copy (called a branch) stores full version history for offline viewing. This also ends up speeding up operations like viewing history, committing, and reverting.
  • Simple interface
  • Excellent merge handling
  • Each programmer gets their own branch and can commit without having an internet connection. When another programmer needs the changes the other made, the two programmers just merge their branches.
  • Better handling of renames than Subversion or CVS
  • Changes can be emailed
  • Works with Subversion repositories natively

Hope that helps!

Bot190 01-09-2010 18:15

Re: Portable Revision Control Server (using Subversion)
 
Our team used SVN for source control last year during the build season. We were using Google code for the central repository. But every once in a while we didn't have internet access at the school. This was the biggest problem with Source control we had.

When we went to GSR, we ended up switching to Mercurial. With Mercurial everyone has a copy of the repository so you don't need an internet connection. When we wanted to share changes we had a copy of the repository on a flash drive, and would just share the flash drive and update our repository with the one on the flashdrive. Mercurial also makes merging changes much easier than SVN.

zombiezen 01-09-2010 18:41

Re: Portable Revision Control Server (using Subversion)
 
Quote:

Originally Posted by Bot190 (Post 973091)
When we went to GSR, we ended up switching to Mercurial. With Mercurial everyone has a copy of the repository so you don't need an internet connection. When we wanted to share changes we had a copy of the repository on a flash drive, and would just share the flash drive and update our repository with the one on the flashdrive. Mercurial also makes merging changes much easier than SVN.

Mercurial's another good program and shares many of the same features as Bazaar. It's all a matter of taste, really.

Stay away from Git, though. It's way too easy to break a repository in Git and not understand what's going on. I don't understand what it's doing half the time.

GGCO 01-09-2010 19:58

Re: Portable Revision Control Server (using Subversion)
 
Quote:

Originally Posted by zombiezen (Post 973097)
Mercurial's another good program and shares many of the same features as Bazaar. It's all a matter of taste, really.

Stay away from Git, though. It's way too easy to break a repository in Git and not understand what's going on. I don't understand what it's doing half the time.

Definitely don't want to get into a Git vs. svn debate, but don't be afraid to try Git out. I'm in the same boat as you though, it can be quite complicated. However, I find that the support community for Git is terrific and once you learn the basics of what it's doing you are able to do some pretty sweet stuff.

Hugh Meyer 01-09-2010 22:34

Re: Portable Revision Control Server (using Subversion)
 
We take our SVN server with us to competitions. It goes under the table with a 24 port switch setting on top of it. Great for code changes or reverts to previous tags or other points. We also use it to store our log files from each match. A student is responsible to get the log files from the driver station and commit them to the SVN repository for viewing on any of the computers we have with us, and of course back home. I set up the machine with a DHCP server so when a user in the pits connects they get an IP address that is compatible with the "real" IP address of the server. That way everyone’s access to the server is just like they see when they are at home or at the school. It is all hardwired. Two years ago in Atlanta I did a session about how to build a SVN server. After the session I had a team come up and tell me a horror story about how they lost their code in a crashed hard drive during competitions. If you are reading this and do not have version control I would highly recommend you figure it out and get some. It is wonderful!! One of those things after you have it for a while you wonder how you ever got along without it before.

lusterlink 01-09-2010 23:14

Re: Portable Revision Control Server (using Subversion)
 
Our team uses Google Code project hosting as our svn repository. This can be a problem during competition when one doesn't have access to the internet though. A simple solution is to just work off one communal laptop to do all the programming. We haven't run into a situation where that computer has broken down on us in the middle of comp; however, we do have backup laptops that contain code from the previous day/night commit to the repository.

Surprised nobody has said anything like using an external hard drive to store the repository. Now that I think about it, you could also do all your work off an external hard drive or a usb drive (sorta mentioned above).

demosthenes2k8 02-09-2010 00:10

Re: Portable Revision Control Server (using Subversion)
 
Yeah, 166 (who mentioned it above <_<) used my external hard drive during GSR, but at Atlanta, we usually either shared a laptop or just plugged the laptops together in an ad-hoc ethernet tangle. The tangle seemed better in my opinion, because it was easy to pull from each other while still being connected to both the robot and the dashboard, where we had FTP'd the log files at the end of the match. This way, we could stay constantly connected, download the logs, fix any problems (I started typing "people". Freudian slip?), and upload any required fixes.

jtdowney 02-09-2010 02:27

Re: Portable Revision Control Server (using Subversion)
 
I agree with not getting into a debate on SCM systems. I would throw in another recommendation for Git, I use it on a daily basis and it is actually very intuitive. If you want a good primer on Git the book Pro Git is free at http://progit.org/book/.

Boydean 02-09-2010 10:50

Re: Portable Revision Control Server (using Subversion)
 
Switch to Git. Your dreams will come true, and nightmares of merging will disappear.

JesseK 02-09-2010 12:48

Re: Portable Revision Control Server (using Subversion)
 
Git seems appropriate for an FRC type of revision system at competition. My personal preference would be to still have a central server back at the school (or wherever) and use a tethered smart phone to access it. In a couple of years, I suspect a cheap 3G wireless plan for the laptop/netbook will be available too.

Quote:

Originally Posted by Boydean (Post 973153)
Switch to Git. Your dreams will come true, and nightmares of merging will disappear.

Be careful in your presumptions here; there is no silver bullet for merging. Take company with 30+ programmers all touching a 500k+ SLOC code base (common for any sort of bleeding-edge company that reuses software to create new products) and the nightmares will commence, regardless of what repository system is used. Over time, features are added/removed and code methods are refactored, renamed, or removed. This is especially apparent when a branch splits and a bug fix or feature is done in one branch, only to be discovered later that the other branch implemented the fix/feature in a different way and a merge isn't possible with a large time investment. Again, this is for larger software systems.


All times are GMT -5. The time now is 03:44.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi