Hi all,
To be question short the problem is following:
Let's presume I have a project in eclipse workspace and want it to be held other two source control ( SVN and Mercurial to be more concrete) is it possible?
views:
50answers:
3Unfortunately, no (in my experience). My goal was to have a directory with my SVN version controlled project that pointed to someone else's CVS project. Trouble is this isn't all too sensible, and the Team API wouldn't recognize that there was a CVS folder within an SVN folder. So, I've looked at having a project point at both a CVS and an SVN repository without success. [edit: I should qualify this as using Eclipse 3.5]
Are you thinking that you want the same files to be version controlled by two repositories? This is troublesome, what would it mean for someone to update the file in one repository, but not the other? Now you have two different HEAD revisions, without a way to resolve which one is newer.
If you're looking to control different files, why use two different systems? If you need to divide things up clearly you can always use svn:externals
. Mercurial doesn't appear to have such a mechanism. You might consider alternatives, though. Mercurial and SVN play nicely together, and it might be possible to use some utilities (outside of Eclipse) to synchronize your project between the two version control systems/repositories.
Based on your comment, if you want to have a local repository and a server based repository, you might consider using svn:externals to link your local repository to the server based one, though I'm not sure that this gains you very much. It might be worth a look to see if you can get some kind of Mercurial "externals" connection to an SVN repository, because then you can point Eclipse at your local repository.
To me: no way. And I see some good reasons for that: If you commit your changes, eclipse needs to know where to send the files. It could record, where it got the files from, but every time you created a new file or moved some file around, eclipse wouldn't know which team provider would have to take responsibility.
And even worse: imagine both providers had some files in common, .project
for example. Which one to take?
There is a 1:1 relation between project and repository. Fortunatly eclipse allows different team providers for a workspace ;)
A practical approach to build an application that depends on files from given subversion could be to use two different projects that you use to access the repositories only (standard projecs, no nature) and a third project with linked source folders that you use for the actual work (building, debugging), like:
hg-project <teamprovider: mercurial>
src
svn-project <teamprovider: subversion>
src
work
hg-src <linked to hg-project/src>
svn-src <linked to svn-project/src>
bin
Well... as the others pointed it is not possible to have Eclipse managed two source controller, but if you are OK to work with Mercurial using your console, I think that's possible. In this scenario, Eclipse will assume that the source control is SVN but in the background you also use Mercurial.
In case you haven't seen it: http://mercurial.selenic.com/wiki/WorkingWithSubversion