Sharing code across different source control systems - version-control

The product I'm working on has a mac and pc version. The PC version uses Microsoft's Team Foundation Server and the Mac uses Subversion for source control. Right now we have a little bit of shared code between the two and it currently lives in both systems and will inevitably get out of sync.
What would be some ways to keep these in sync automagically?
Neither team is willing to switch version control systems.

I don't know how to do it exactly, but i Googled a bit and found that:
http://social.msdn.microsoft.com/Forums/en/tfsintegration/thread/c7ab2584-dd8a-43da-af9c-ff1e7f9cec41

You can try some kind of bridge in order to convert each repository fron one VCS to the other:
tfs2svn
svnbridge

You can do it but I would not.
You can migrate the data from one system to the other using tools such as tfs2svn or Timely Migration. In principle, you can continue to keep the two repositories in sync. Doing so is a recipe for disaster in my opinion though.
The only source code revision tools that I would mix are Subversion and Git with git-svn being used to sync local git repos against a central Subversion trunk.
EDIT: Although I still think the synced path is lined with pain, it looks like maybe you could do it with Git as the go-between:
There is a git-tfs much like git-svn (I have no experience with it)
Here is a blog post that may help as well.

If neither team wants to be conquered by the other, perhaps this is a great opportunity to move both teams to Git or Mercurial.
Joel Spolsky, our sponsor here at StackOverflow, has a nice Mercurial tutorial that does a nice job of selling the benefits.

Related

Version Control System on local network with no server

I've searched for what the title mentions and I've read this and this and a few others that I can't find at the moment. But I've never used any sort of version control before, so I don't really understand a lot of what those threads are saying.
My problem is this - There are two/three of us on a LAN connection developing code, and every week or two we have to go around to figure out who has changed what and then synchronize all the code over the machines. This is clearly ridiculous, so I was wondering if a system like git or cvs (I don't know anything about either) would help.
I don't think using one of the machines as a 'server' is a good idea, because they may not always be switched on.
What would be a good version control system to use? (Preferably without a really steep learning curve, but anything is good.)
You can select and use any DVCS (D means "Distributed") in pure distributed mode (only p2p data-exchange).
For mixed environment (Windows-hosts in game) I'll suggest to forget about mentioned earlier here Git and use Mercurial (as Mercurial per se or as TortoiseHG), because
Nercurial just better
Mercurial (contrary to Git) have really easy and lightweight learning curve (you can start at Mercurial Kick Start Exercises, maybe on "Basic Mercurial" and "Remote Repositories" only)
I agree you should use a distributed version control system. Git is a good choice. With a distributed version control system, you don't need a server at all. That doesn't mean you can't have one though. Using an online one like github.com is advisable in case you lose access to your computer or a virus goes around the network or ...
You could use Git and Bananajour.
Git is a distributed version control system, you dont need a server to save your commits. http://git-scm.com/
Bananajour is a web front end for collaborating and publicizing branches on a network. https://github.com/toolmantim/bananajour#readme
You should take a look at any of the following:
Git
Mercurial
Plastic SCM (www.plasticscm.com) -> this is the one produced by the company I work for.
Any of them will let you implement new working patterns such us "feature branches" or "branch per task"
I've written a couple of posts about the working methods here:
http://codicesoftware.blogspot.com/2010/08/branch-per-task-workflow-explained.html
And this one, about the git flow and related patterns http://codicesoftware.blogspot.com/2010/03/branching-strategies.html
Hope it helps.
One possibility would be to use an "online" version control offered by a website like http://www.java.net/. There you can create a project, and after that create a repository that you and your friends could use. This will allow you to always access the respository since it's hosted by java.net.

What version control use if I'm the only developer?

I want to use some version control for my projects, but I'm the only developer, there is not others. I want to use my pendrive like repository because I develop in many different places(but the same project).
I only worked with SVN, but in that case, was not good, I think an DVCS was better.
But now, I really don't know what to use, if SVN is the best option. I've looked for another solutions like Mercurial, Git, and Fossil, but I don't understand the differences, and mainly, if they are the best options for my situation.
I need to know what is best in this case.
If you're the only developer, then the best version control is the one that you are most comfortable with. The goal of version control is to make your life as a developer easier and safer, so there's no point in fighting with a version control that you don't know.
However, if you want to learn how to use a new version control system, this is a great opportunity.
If you think that you're going to have more developers working on this project later, then you want to think about a robust solution like SVN.
I would definitely recommend Git. It is a little cryptic at times, but it seems to be/become the de-facto standard for most open source projects. It's very powerful and it'll enable you to work with the great service that is Github :)
There are good topics on SO that compare Git, Mercurial, svn, etc.
What is the Difference Between Mercurial and Git?
To me an important requirement was easy, free, private repositories online so I started to use http://Bitbucket.org They support both Mercurial and Git.
+1 to #dudemonkey sentences. Except last - tastes can differ. Even as sole developer, you can (and have) use best techniques - i.e you may have non-linear development (thus - branching|merging), refactoring of code, different targets. Try and select best for you solution.
Nobody mentioned Fossil SCM - small, portable app in one exe, with all basic features of DVCS, integrated Wiki and tickets - which you can have (with repo) in USB, for example for max mobility
In first place stay away from SVN or any other CVCS, they suck. To learn more about DVCS, I recommend the Eric Sink's Book, it's free: http://www.ericsink.com/vcbe/
As you plan to work on different machines, the best solution would be to have an online repository, I think it's more pratical and safer than the pendrive. Some of the most known out there are: https://bitbucket.org/, https://github.com/, https://launchpad.net/, http://code.google.com/projecthosting/. Remember that with a DVCS you don't need to be online all the time, you can commit locally and push to the server later. If your project is not open source, you should stick with BitBucket as it's the only one that offers free hosting for closed source projects.
If you really want to work just in the pendrive, don't leave the repository just in the pendrive. It's safer to clone the repository from the pen drive to the machines you will work. Then you Push/Pull to the pen drive's repository to synchronize.

What OSX/XCode version control system should I use for iPhone development?

I've been developing my first iPhone app part-time and would like to start using a more rigorous form of version control than I've been using over the past four months, i.e. copying source code folders to another directory and time stamping them.
I've used SourceSafe and Team Foundation System but I don't have a good idea of what version control systems (VCS) are available for the Macintosh. I've seen ads on SO for a Subversion front end but would like some other options.
Here's a list of my initial requirements:
Runs locally under OS X Leopard 10.5.7
Integrates with XCode 3.1.3 (if no integration, user-friendly interface)
Basic VCS features - check-in comments, branching, pinning
Advanced VCS features like build automation or reports would be nice but not critical at this time
Ability to handle multiple developers down the road (6-12 months)
Thanks in advance for the help.
Mercurial would be my pick for version control for a project starting as a solo project if you don't want to set up a dedicated server. Mercurial requires no server because it's a distributed VCS, every working copy is also a complete repository, so once you've installed Mercurial you are ready to go, just type 'hg init' in the root directory of your project and you're off.
It's perfect for working alone or with a small number of developers (i.e. no IT staff or sysadmins available), it has a utility that lets you quickly set up a temporary server for your local repository so when you meet up with people it's easy for them to clone the repository or share changes. You can also just give people copies of your repository over email or USB key or copy them over the network or whatever and reconcile changes to the copies against each other later.
For me Mercurial made the difference between actually using a VCS for personal projects and just giving up because it's too much trouble. Setting up a Subversion server locally isn't a huge deal but it's still enough trouble to make me not bother, and if you really want to be thorough you'd want to think about how to do proper backups, etc. With Mercurial at any point you can just back up your working copy to other media and you have a backup. I don't know if this really makes sense but Mercurial is a VCS that you can use casually and informally thanks to the distributed nature.
No Xcode integration, but having used various VCS' with and without integration I don't think it's very important as long as good clients are available. These days I've mostly settled on just going command line and it's refreshing.
Perforce, IMO, is right out. Aside from being a commercial product it is obnoxious beyond belief. It requires you to be connected to a server at all times or things become a major pain in the ass. So if you just want to work on stuff from multiple machines in multiple locations or if you want to have people on the project that won't be on the same network all the time it's going to suck. Perforce just constantly beats you over the head with the fact you are using Perforce, no other VCS I've used is so in your face and annoying.
Git is another option with a similar feature set to Mercurial that might be worth looking at. In my case I also do Windows stuff and Git's Windows support is supposedly crap so I went with something that works on all my platforms.
Build automation IMO is the build server's job, not the VCS' job, so if you want build automation find an appropriate build server.
SVN or Subversion is included with Xcode and is well integrated with it. As you grow to have bigger needs, you can use third-party Subversion servers and use the same SVN support over the network. If you don't like SVN, I think XCode supports CVS too.
If you're looking for something adequate, cheap, and expandable, then just mosey on over to the SCM menu of XCode, and check out what's already there. If you need help setting up SVN, just comment.
IT looks like subversion would be your best choice for XCode as there is already some guidence on getting that up and running with XCode here. Subversion addresses all of the features you are speaking of. Pinning specifically is a feature of Source Safe; however subversion can do tagging. Build automation is not a feature of a source control system, but source control systems are typically used in continuous integration server scenarios. I have not used it but from what I understand Hudson is a continuous integration Server which is gaining popularity and momemtum. You can find more information on Hudson here and here
SubVersioN (SVN) fulfills (most of) your requirements.
I'd also put in a vote for subversion since XCode supports it natively. I've been using it myself and have been very happy.
However I'd question your requirement to run the server locally. Sure, you can do that no problems with subversion. But wouldn't you be nervous about your hard disk failing?
I've been using Beanstalk to host my source code. It's free for up to 3 developers, you'll be able to upgrade your account once you grow, its fast and it's SAFE.
I just looked in Xcode (3.2, though, so it may not be exactly the same) and the options for source control integration are subversion, CVS and perforce.
Outside of Xcode, there are a couple of very nice GUI clients for subversion for OS X.
Subversion would be a good place to start, it seems.
All the cool kids are using distributed VCSes these days, apparently. You might want to spend half an hour reading up on git or mercurial (hg - my preference). There's no direct integration with Xcode, but they're easy enough to get into.
Perforce is now free for up to twenty users, but will be expensive after that. You might want to check it out, however. Xcode no longer supports native Perforce integration, though there are scripts and a plugin.

Learning version control for a college freshman

I'm a college CS freshman who wishes to learn a version control system well. Currently I'm looking at Subversion, Perforce, and Surround SCM.
I would be integrating the system with Eclipse, on a Linux platform. The code involved would mainly be C++, Java, and LaTeX (which I'll be using Eclipse as well).
Most probably I'll be the only user, but the advantage of SVN is that it is open source, while the other two are proprietary. I've heard a lot of good testimonial on TortiseSVN, but since I'm using Linux, I'll be missing out on that.
EDIT: Thanks for all the answers. Of course, I am open to any other version control systems as well. I will be checking out Git and Mercurial.
If you're learning version control systems, you would definitely do well to consider one of the newer "distributed" version control systems such as Git or Mercurial. By limiting your scope to the previous generation of tools as you mentioned, you will be missing out on what (some) people are really using today.
For learning a system, I probably wouldn't recommend choosing a commercial offering. You will get far better support and documentation, for free, with an open source solution.
If those are your only options, definitely SVN. That's the one (from that list) that real people use in the wild.
Honestly, though, learn a DVCS. Git, Mercurial, darcs, one of them.
If you're going to be the only one on a project, definitely you should check out SVN. Get Subclipse, an Eclipse plugin for Subversion, and get used to that. Then, move on to other version control systems once you feel comfortable.
I'd like to second (or third) those that suggested Git or Mercurial (or Bazaar). Distributed version control systems aren't just good for projects with multiple contributors; I use Git for any and all projects I start, even if they're just throw-aways. Basically, your development folder is your repository - It's portable, and it's easy to add more contributors and move to a more traditional centralized workflow later on.
I recommend Git especially because it has a bit of a steep learning curve, but it has taught me so much about project management, revision control, how to merge and patch files, how to read 'diff' output, etc. It really lets you get down to the fine grained details of version control.
You might find Perforce's whitepapers worth reading, for example High-level Best Practices
in Software Configuration Management.
SVN is very easy to learn. For those people who do use Windows, the GUI version is great.
Even if you are running Linux, I would still suggest learning it because it is widely used in places such as Google Code, Python, Wordpress, etc...
Bazaar is absolutely awesome for single-person, serverless development. It takes an entire five minutes to set up, and it's working immediately. It has the power of large VCS's ... but it's easy enough to use on your own.
I've heard Git and Mercurial are right along the same lines ... but I've a=only used Bzr.
I'd recommend Subversion, simply because of its pervasiveness in open source projects. There's definitely a lot of opportunity to put your Subversion knowledge to use in open source projects, and if you do, you'll learn a lot about coding, working as a team, and about using a VCS properly in a team (which is half of learning to use a VCS, and is the hard part because you can't learn it very well on your own). Fewer open source projects use proprietary VCSs, which means you'll get less of an opportunity to use them in the real world unless you're working specifically with friends or as a job. I haven't used the other two you mentioned, but I have no complaints about Subversion, it's quite straight-forward to use.
I'd also like to recommend a distributed VCS, such as git. With a distributed VCS, since every participant in a project has a complete copy of the source repository, and has complete control over their own copy, it means that you're given greater flexibility to use the VCS capabilities. You'll find that you have the freedom to commit as often as you want, and create new branches whenever you want, which is great when you're making changes to code and you want the ability to go back to an old version if necessary. A distributed VCS lets you use the VCS as a tool to help your coding, rather than simply as a way of storing and sharing your code with others. It's also very easy to set up a new repository in a distributed VCS. With git you just run git init and it'll set up version control in the current directory. How easy is that?

How to manage personal projects [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I am a student and I always develop projects on my own, mainly with Ruby On Rails.
I noticed that even a simple project may become complex if you can't easily rescue deleted code and pass from a version to another. Time Machine backups are not enough.
I would like to use a version control system, but they seem not to be intended for single-user projects. Am I wrong? If so, what policy and software do you use for managing your code?
There is nothing that says you can't use a standard version control system if you are a single user. Doing so would definitely keep you from experiencing some of the more painful problems such as merging files changed at the same time and other conflicts that arise from multiple developers.
Based on this, you could look into any of the version control systems (I believe Subversion is far and away the most popular right now) and pick out the one that will most closely match your needs, or has the interfaces you are most comfortable with.
Distributed version control systems are just for you: look for Bazaar, Git or Mercurial. They are lightweight, local commits are easy and you can always revert to a previous version. With a hosting provider such as GitHub, you can publish your projects, you get backup for free and you can easily share the projects with other potential contributors. Collaboration is easy because merging your changes is also a lightweight operation.
It is definitely a good idea to use version control software, and other project software on your own projects. These tools are not just for team working, although they allow team working. Beyond the obvious reasons for keeping track of your changes to the project it is a good idea to use SCM tools so you are familar with what the industry is using.
Subversion is widespread, and is quite a good bet as it's successfully replaced the earlier and older CVS tool. It relies on a central repository where the code is stored and can be backed up: where I have used SVN for personal projects and small team projects I have backed up to CD. If your project is opensource there are sites like sourceforge that support svn which you can use for hosting.
However as some of the other posters have indicated, a personal project might benefit more from a distributed system: git is increasing in popularity since git-hub has come online and porting efforts to are succeeding. http://git-scm.com/ It is likely that tools like these will grow in popularity over the coming years as they allow a greater number of people to participate on the same code. The idea of one central repository is relaxed giving each developer the ability to version track different designs and only give back to the community the versions they complete.
One of the benefits with using SCM for all projects personal or not, is that a separate server can be set up testing a version of the code. Automated testing on the latest version of the code (using a Continuous Integration Server or similar) can improve the quality of the software you are writing.
Some highly experienced software developers talk about a rhythm where they make incremental changes checking in frequently. Getting into the habit of making small changes which are complete and checking them in: is a good practice to get into for group working.
I would recommend Subversion. It's free and relatively simple, and learning a little about it may well beneficial in the future. It's cross platform and also available on a variety of hosted systems.
See also: https://stackoverflow.com/questions/250984/do-i-really-need-version-control
and: Using Version Control for Home Development?
Subversion!
You can install locally or use a hosted service. The services are nice if you want to switch between computers or use it as an offline backup. http://www.beanstalkapp.com/ has a free plan for personal use.
GitHub (git, not subversion) is also popular but I believe there is a small fee for personal projects.
Use git. It allows you to work without ever needing a server.
There are utilities for the command line and a GUI (older screenshots) too (for linux, windows and OS X).
If you later want to share or publish your project you can easily push it to a site like github.
Even for personal projects, if they become bigger than something you write a few hours, a version control system will be very beneficial.
Here are a few good points:
Many version control systems have good integration with IDEs.
Branching will allow you to experiment without the fear of having to take a long time to revert the changes. The branch can later be merged to the main trunk if needed.
Having a history of changes can be helpful, and tagging will allow setting milestones.
More efficient storage than full backups using regular copying of files.
Extra metadata (such as commit comments) can be attached.
Many version control systems are free!
I personally use a Subversion server running on my system which I access via the Subclipse plug-in in Eclipse, which I find to be very helpful in keeping track of my personal projects.
If you're interested in Subversion, Version Control with Subversion is a very helpful source in learning about the concepts, and how to set up and get started with Subversion.
Version control systems may be a little difficult at first, but it's definitely worth the effort to set up!
I'm very wary of using "always" in any answer I give on SO...
ALWAYS use version control. These days it's free AND easy to do. There's simply no reason ever not to use it. If it's an hour long project...good...it's an hour long project that's in version control now.
My solution has been slicehost(ok...not free), redmine(free RoR bug tracker)git and gitosis. Starting up a new project adds about five minutes on to the front of any coding, but its five minutes well worth it.
Use SVN or Mercurial.
Both very appropriate for "home" usage, I think Mercurial is better for you because by default you'll be creating one repository per project ( oposed to SVN's one "big" repository that stores everything ), so it will be easier to backup individual projects or exchange sources with others if needed.
Both work in command line mode or using explorer-like interfaces ( Tortoise ) or plugins available for the most usual IDE.
I use subversion to manage all my projects. xp-dev.com is a free subversion hosting solution. Also, I think, if you install tortisesvn it installs a subversion server to use locally.
A complete different version control system is dropbox (www.getdrobox.com). It's not (only) intended for source code. It available (with smart OS integration) for Mac, Win and Linux plus private Web Interface.
It may be interesting for you.
One item you will like about git such as using github hosting is that you have a history of changes that you can go to and get the actual code source and thus 'rescue' previous code changes.
You could also use the dropbox approach in just backing up raw code to a folder on the cloud..
I have used both methods for personal projects.
Hosted version control such as beanstalkapp.com is very convenient, but do consider whether you want to hand your source to a third party. You could consider a local repository, backed up online with a solution which encrypts the contents locally before uploading. I do this with subversion, Amazon S3 and JungleDisk.
Bitbucket is an absolute must consideration for personal projects based on:
Free, unlimited, private repositories
Up to 5 users on their free account
Git and Mercurial support
This allows one to quickly spin up a repository without having to pay attention to how many repos are available under a paid source code hosting account.
It also allows projects that will enter the public domain to be simply forked to GitHub, etc.
Version control is always important.
Try a free online SVN like http://beanstalkapp.com/
Do a search and you can find lots of suggestions
I would highly recommend downloading VisualSVN Server. It's a very simple setup and will do exactly what you need.
you can use any version control system that exists just for single user development. as you said, even simple project can become a nightmare if you change something you think is better and it fails. download tortoise snv - it's free and pretty simple to use - and keep your working versions in repository. commit code that works, keep possible small changes (for example refactor one class), build it, test it if it works -> commit, if it doesn't and you don't know why you can allways revert changes and try again.