|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Source/Version Control
Hi guys,
I'm the programming lead for team 5347, The Gryphons. Our season is over, we are a rookie team and did not win. I am currently working on preparations for next year, and this includes organization of our codebase so that we can collaborate effectively and keep everything neat. Our current source control system is kludged together through email, and it is not a system I'm eager to keep. In light of this, I've been examining other options for source control. We currently use LabVIEW, though one of our mentors is trying to convince us to switch to Java, because of the support that will be provided by the wealth of Java programmers at competitions and supposedly on Chief Delphi as well. I'm not entirely convinced yet, because even after 2-3 months of struggling through LabVIEW stupidly not reading the quick start docs I should have, I'm beginning to recognize the beauty of graphical dataflow programming much due to my discovery of the clean-up diagram tool. I've spent a few hours looking through a list of source control systems that integrate directly with LabVIEW. I've considered trying to get Perforce on board as a sponsor for a license or too, but was wondering if anyone has had success trying to get LabVIEW to work with GitHub or any other free source control providers. |
|
#2
|
|||
|
|||
|
Re: Source/Version Control
Quote:
LabVIEW is pretty easy for students who have no prior programming experience. This allows us to focus on robot functionality and design, instead of how to work the programming language. Quote:
How many programmers are on your team? How often are people working on the code simultaneously? How many times did you branch, merge, or compare older versions of the code during this build season? Our team uses a shared folder on dropbox and creates a new copy at every meeting. It's simple, but it works fine for what we do. |
|
#3
|
|||
|
|||
|
Re: Source/Version Control
There are two approaches.
You can use one of the tools that plug into LV. This allows for edits to automatically prompts for checkout, for checkins from a right-click, etc. But there are only a few supported at this level. Or you can use a SCC tools that LV plugs into. In this scenario, you go to the tool to do the things I mentioned above, and you use the LVCompare program to compare two files. If you google, I believe you'll find instructions for Git and other tools. Greg McKaskle |
|
#4
|
||||
|
||||
|
Re: Source/Version Control
Quote:
Our team has been happy with Perforce, and we have it set up the second way that Greg proposed. We use the P4V GUI to manage our files with no plugins to LabVIEW itself, and we plug LVCompare and LVMerge to that tool. The compare and merge tools are a bit tedious to use however, so we make good use of the lock tool in Perforce, and we make sure students on our team don't manually set files to non-read only. One huge feature we missed this year is the P4Sandbox tool, which allows local & private branching. We were lucky that our regional had good WiFi in the pits, but I know a lot of events don't have this which makes it hard to use perforce at competition (at least without using P4Sandbox). Whichever tool you do decide to use, make sure you spend a little time with anyone who will be contributing to the repository to train them on proper usage. |
|
#5
|
|||
|
|||
|
Re: Source/Version Control
Quote:
|
|
#6
|
|||
|
|||
|
Re: Source/Version Control
This year 624 is using Git with LabViewGitEnv (https://github.com/joerg/LabViewGitEnv).
It went okay, but once we got a significant number of VIs in the project merging became such a long and protracted experience that we stopped doing it, keeping everything on a single branch, because for every single changed VI (and they change for some reason whenever you open them) it has to start up LVMerge over again, which takes quite a while to load, and then the project fills up with "file conflicts" that you have to manually accept for every single changed VI. That negated one of the most significant features of Git, which is that you're (usually) able to maintain parallel branches with easy merging between them, allowing your team to collaborate and multitask. We found that it was helpful to use auto-populating folders for VIs in the LabVIEW project, and to review changes before committing them to avoid including a VI that wasn't really modified. We also removed the .aliases and .lvlps files from the repository, because merging would corrupt them and they seem to be regenerated by LabVIEW anyways. Git would also corrupt our lvproj file sometimes in merges, which we fixed by hand when it occurred (It's an XML file). All in all, I don't know if it was worth it. The benefits of collaboration and multiple branches were nice early in the build season as we prototyped different elements of the code, but once we started integrating different code elements together and editing the same VIs merging became very tedious. However, the ability to go back to your code at any point in time in the past is very helpful. If you use Git (and this may apply to other version control systems as well), I would recommend to really try to avoid working on the same VI in different branches, because merging really isn't fun. |
|
#7
|
|||
|
|||
|
Re: Source/Version Control
Interesting observations. Thank you, randantor. I needed to hear about LabViewGitEnv.
We have been cursed(blessed?) in our 4 year history with never more than two working on the code. In that context, I think accept most of git's problems, but corrupting an XML file is not encouraging. This year we got to where we turned on LabView's version comment facility. Next year we'll get to real CM. |
|
#8
|
|||
|
|||
|
Re: Source/Version Control
If you are going to use SCC, you may want to change the VI to store source and the binary executable code separately. The checkbox is in the VI Properties dialog on the first page. There are probably other ways to turn it on for the entire project.
Greg McKaskle |
|
#9
|
|||
|
|||
|
Re: Source/Version Control
Quote:
What draws me to LabVIEW specifically is the ease of data collection, graphical interface, and the idea that it is developed by the same people that make the cRIO and now the roboRIO. I suppose that's mostly symbolic, as the device obviously doesn't care what language generated the binaries it runs. I have wanted to use Google Code/Drive and Dropbox and specifically asked to, but our last head programmer was messy with his source control and it has convinced our mentor and coach that a more dedicated solution is required. Quote:
As for GitHub, we considered it, but for LabVIEW, the process for integration seems finicky. Does anyone have any specific tutorials on how to do it? This is the only one I've found so far: https://www.youtube.com/watch?v=2dEI6tEMTmQ The only other concern with using GitHub is the privacy of our code, which may be a non-issue. I haven't decided yet. Does every team open their source during build season? |
|
#10
|
||||
|
||||
|
Re: Source/Version Control
I'm not sure privacy would be a real issue. Your team's programmers and their mentor should be the only ones who know where the code is and as long as they don't go post the link somewhere online, I don't think it would be easy for the public to find your code on GitHub.
|
|
#11
|
|||
|
|||
|
Re: Source/Version Control
Quote:
We've just hosted our git repository on a cheap VPS that we already rent to run the team website, though. |
|
#12
|
|||
|
|||
|
Re: Source/Version Control
Quote:
Given how I'm not even sure how to set up a LabVIEW repository on GitHub in the first place, as well as the fact that you can get Perforce for free with ~20 users, I'm almost convinced I should just get into the morass of converting my desktop into an Apache server with Ubuntu Server and Perforce. I could use it to host our website too. Anyone else here have any advice for LabVIEW vs Java? The benefits I see of LabVIEW are ease of learning, ease of debugging, and data collection. The only benefit I can really see of Java would be support, but people here are probably more experienced with it than I am. |
|
#13
|
||||
|
||||
|
Re: Source/Version Control
Quote:
|
|
#14
|
||||
|
||||
|
Re: Source/Version Control
Github can host any files, even executables. LabView should be no problem.
|
|
#15
|
|||||
|
|||||
|
Re: Source/Version Control
This year 364 used a BitBucket mercurial repository with TortoiseHg Workbench. You can commit, push, pull, and merge, but you obviously can't see changes without opening the code. Commit messages are really important since you can't see changes on the fly.
TortoiseHg: http://tortoisehg.bitbucket.org/ BitBucket: https://bitbucket.org/ Screenshot of TortoiseHg from our repository: http://i.imgur.com/QhCvkhm.png/ |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|