I have a bunch of code in Surround SCM, which I would like to get into a workspace in Eclipse. I will need to be able to work off of two branches. One for bug fixes, and one for new features, which can then be merged into my main branch. What is the best way to do this?
Disclaimer: I work for Seapine but I wasn't involved with anything to do with Eclipse.
What we do here internally is have a separate Java project for each branch in a single Eclipse workspace. To do so create a workspace somewhere and do:
File->New Project...->Java Project
This brings up the new project dialog. You can then point the project at the existing source path for the first branch, in my case the mainline branch, using the "Create project existing source" radio. I think I might have an older version of Eclipse installed but it should be the same or similar in new ones.
Clicking Next will take you to the next screen.
Here you can set up specific settings for this branch, like packages to exclude or things like that.
Click Finish and your project will be set up. Just repeat the same steps for a different branch using a different disk location.
Once you make changes to your branch code you can just check it into Surround SCM, promote it to the mainline, then do a get bring down the changes locally to your other directory.
Related
I have a single Github repo that contains 5 Android projects. Say one of the projects is named ToysGift and I want to change that project name to ToyDrive. How do I do that?
I am using Android Studio. Can I just change the name of the project in Android Studio and then push to Github? Git always proves challenging for me that's why I am asking first before trying different things because once I break what I have, I won't know how to get back to a good git state.
Did a quick test, Just changing the project name in android studio and then pushing should work, just make sure you have everything pulled so there aren't any conflicts.
I am working on an android project that have later to be translated to many other languages and some changes have to do in design.
Now I want to know is there any way to make one project and keep it on git and later having changes should change the git project accordingly. So is it possible to create multiple apps for Android project. If yes, is it possible with Eclipse and git or someone has any other idea?
For the time being I am saving project in local directory and copy that project to make changes for next app.
This sounds that you should give git-subtrees a try. There, you create one repo with your base project and then import this repo into your specific app project. If you want to propagate your changes to the API, you push the changes to the base repo. We use this for component development.
But from my experience: do not use eclipse for working with git. It has some major drawbacks and might corrupt the repos. Use the CLI or another tool.
HI I have and android project A, I have been working on it, and also a friend of mine has been working on it, so now I have 2 projects A-Mine and A-Friend (I have nor svn, cvs nor git). Is there a way to get a diff of or to merge them, using ecplise or tortoise or anything (windows based)
Thnak u very much best regards Ignacio.
Now's a great chance to set up source control! Commit your version into source control, have your friend check it out, create a new branch and recursively copy all his files into it. Then just use the tools provided by your source control software of choice to merge those changes into the main branch. Done!
As I thought my friends there is always another way, Turns out ecplise won't allow you to open twice same project in the same workspace, but you can very well match up files and folders with simple windows copy + paste, so what is what you do? Yo open one project in eclipse and paste the renamed folders of the second project. the you can use Eclipses Compare With tool, to match up all files in a certain directory.
Clean, easy and fast
I have a project that I develop partly at the work pc and party at my home PC.
Export-Import-Export-IMport and so on
And every day I spend a good amount of my time trying to resolve those annoying build path and configuration issues. Today I have written two lines of code and I have wasted the rest of my time dealing with all kinds of errors you could imagine.
And this hell repeats daily.
So I thought
Could I install Eslipse ADT on a flash drive and have my workspace on the flashdrive as well, so once the configuration is set up properly, I will be able to finally concentrate on development?
I could equalize the number of drives of both my PCs so the flash drive always appears as with same drive letter, if that could be an issue?
I really want to find a way to use the same IDE installation and the same workspace at two computers. Not two different IDE's.
Every time my project needs a new library I have to install it on both computers and it goes to a different directory and then I have to set the project to use it and when I switch computers all settings are wrong again.
This happens to me aswell. Your problem is that Android uses some external libraries, which on every computer, are located on a different directory.
Those libraries, are referenced in a file named project.properties.
All you've to do, is use a GIT or a SVN as a link to your home - work. And then, add several ignores, basically:
project.properties
bin
gen
This will kill any troubles.
In Eclipse, the project contents and the workspace are logically separate (although the default location when creating a project is place its contents in the workspace folder on disk, it doesn't have to be that way). Workspaces can not be shared between computers or users, but project contents should be. That includes all of the configuration files that make up a project (.project, .classpath, etc).
You could use a portable storage location like a flash drive or Dropbox to store just the project contents, and import it into each different Eclipse workspace you want to work on it in (ie, each different computer), but you'll need to always remember to Refresh the entire project every time you start to work in the workspace and there's a potential for human error to screw things up. I second the other recommendations to use some sort of source control system like cvs, svn, git, etc to check files in/out for working on different workspaces/PCs. I've done that many times with good results.
Why can't you just setup you favorite IDE once then export/import your settings to another PC?
That way you'll deal with IDE config issues.
Then configure Maven build for your project so all the dependencies and stuff can be resolved automatically during the build process.
And as last step you should setup git repo for the project - Github/Bitbucket, for example.
Leaving home => push all your daily work; came home => pull all updates and continue working.
Hey guys simple question here. Whats the best way to back up an android project? I use eclipse. I'm fairly new and not sure what I need to back it up. Do I need just the project or do I need the meta data also? Thanks guys
If I'm understanding you correctly you want to make a backup of your project? If you've never used version control before, now would be a great time to start! Version control will not only provide you with what you're looking for but many other great features. There's plenty of different SCM's available for you to choose froml; Git, SVN, Mercurial and so on.
Otherwise if all you want is to copy the project to another location, open your eclipse workspace folder (the directory you defined when you first started eclipse) and copy the project directory from there. Or do as MarchingHome suggests.
I always directly copy the entire folder of the project in the eclipse workspace.
You can import that later in eclipse via File --> Import --> General --> Existing project into workspace.
You can there select the folder and everything will be restored.
Hope this helps.
As long as you work alone and on always the same machine, you can simply backup the entire project folder with the help of a version control system like git. This will help you keep track of all the changes you make and lets you undo any code changes. You can use github as a reliable remove service. If you aren't familiar with it yet, then it might take some reading to get into, but afterwards you life will be much easier.
You need the metadata. There are a few files in the top level project directory when you use eclipse: .cproject (this might only be if you use CDT plugin), .project and sometimes a .settings directory. Basically, you need all the dot files/dirs. You can just zip up the directory and that should be enough.
That said, if you try and open that project and the paths have changed, you'll probably get errors. Same for if you're missing vital plugins used by your project.
What you should be doing is using some sort of revision control. Try git or mercurial. Eclipse has plugins for them as well.