Different change lists in subclipse? - eclipse

In IntelliJ, I can have different change lists so that I can put certain files that I never want to commit into a different change list, and I won't be prompted to commit those files unless I select that change list. For example, certain database configuration files, eclipse project files etc., I want to rarely or never commit.
Is there a way to do this using Subversion in Eclipse? I haven't been able to find it so I have to uncheck the files I don't want to commit every time. Note that I can't use svn:ignore because these files are, and should be, in the repository.

You can do this in the Synchronize view. Click the Show Change Sets button. You can then add changed files to change sets (and create new change sets) from the right-click menu.

While the notion of change set of change list is not directly supported by subversion, one possibility would be to use SVN in conjunction with Mylyn.
You could set each group of files to a different task and see if subclipse allows you to commit only one or several tasks through Mylyn.
I have not tested that configuration directly, but it is worth a try.
An option like (see Mylyn Wiki):
Automatically create and manage with task context - Enables automatic change set management. Change sets will be created automatically so that you can commit or update only resources that are in a task's context.
sounds promising.

Change Sets in eclipse (subclipse plugin) does not work too well. If you close the project and reopen it, then either your change sets disappear or all the files you've previously assigned to a change set are now unassigned. SVN:ignore does not work if it happens to be a directory but you want to track files which inside the directory (don't ask how this happens - difficult to explain). IntelliJ change list is much better.

How about putting those files on svn:ignore list?
(set the files to exclude as values of svn:ignore property)
They will be just excluded from versioning so that they never get
commited and any changes to these files will be ignored by subversion.

If you get the TeamCity plugin you can have a more advanced Synchronize view than normal in eclipse.
Or just keep using IDEA......

Related

View changes on CVS repository with TortoiseCVS

Is there a way, with TortoiseCVS, to see what has changed in the repository since the last CVS update?
I am used to Eclipse's synchronize function. But now I want to view differences in a directory that isn't an eclipse project.
I could check out the project somewhere else and use any diff tool. But that's ugly.
The command line version of cvs provides the '-n' option for this purpose. From the cvs manual:
Do not change any files. Attempt to execute the `cvs_command', but only to issue reports; do not remove, update, or merge any existing
files, or create any new files.
Note that CVS will not necessarily produce exactly the same output as without `-n'. In some cases the output will be the same, but in
other cases CVS will skip some of the processing that would have been
required to produce the exact same output.
The option is also available in Tortoise: Choose "CVS Update Special" from the context menu. In the dialog check the box "Simulate Update" (it's on a separate tab in newer version of Tortoise).
However, I find the feature to be of limited usefulness, due to it's cryptic output and low level of integration (e.g. it's not possible to click on a file and actually view the diff's).

Subclipse / Subversive: Any way to filter out files modified locally

Is there any way using Subclipse or Subversive to apply some kind of filter on Package Explorer that will hide all files that weren't modified locally?
It would be sometimes very useful when I just want focus on my local changes (for example to revise them). I know that files that were modified locally are marked in Package Explorer (in Subclipse by "star" symbol) but in big projects with hundred of files it doesn't help that much (it would be much easier and clearer if only modified files would be visible).
Of course packages containing modified files should be visible as well.
Have you tried the Synchronize view? This shows all your changes in a view which makes it easy to work with the items. You can also create and group items by changeset when using this view.
Using Subclipse, I set the Synchronize view so that all SVN projects in my workspace are synchronized. I then pin it and set a schedule to refresh every hour. Local changes refresh immediately, the hourly schedule is for how often to check the repository for incoming changes.
You can out the view in Outgoing mode if you only want to look at your local changes.

Folders and files not showing in CVS Synchronize with Repository view in Eclipse

Going to the CVS repository perspective and viewing the files shows them, so they checked in just fine, and doing an update will bring them into the project. It is only the synchronize that is having problems.
I have noticed that, when synchronizing trees that do not contain source files such as *.java files causes the cvs synchronize view to look strange (there is an update to be done but it cannot specify the path). Usually, you would actually want to see what is updated..
So, the solution as per me is to perform a team->update on project root level, or to use another cvs client to make the update. (TortoiseCvs works)
I'm not sure if this is the problem, but do you realize files won't appear in the synchronize view if they are identical to the files in the repository?

How do I add programmatically-generated new files to source control?

This is something I've never really understood about source control, specifically Subversion (the only source control I've ever used, which isn't saying much). I'm considering moving to git or Mercurial, so if that affects the answer to my question, please indicate as such.
Ok. As I understand it, every time I create a new file, I have to tell SVN about it, so that it knows to add it to the repository and place it under control. Something like:
svn add newfile
That's fine if I'm the one creating the file: I know I created it, I know its name, I know where it lives, so it's easy to tell SVN about it.
But now suppose I'm using a framework of some kind, like Rails, Django, Symfony, etc., and suppose I've already done the initial commit. All of these frameworks create new files programmatically, often many at once, in different directories, etc. etc. How do I tell the source control about these new files? Do I have to hunt each one of them down individually and add them? Is there an easier way? (Or am I possibly misunderstanding something fundamental about source control?)
Generally speaking, you shouldn't add files to source control if they can be generated from other files in your project. It's true that in some cases, a file is initially generated, but must be modified manually. In that case you will have to add it to source control. However, you should almost never automatically add files.
I agree with Matthew in general, if it can be generated it shouldn't be added but remain dynamically created.
For the practical question of adding multiple files, I don't remember in svn (though I think it should be possible), but to do this in git:
Using git bash (command line) you can add all "loose" files under the directory or subdirectory by not specifying a file after the add command. You can also set git to ignore certain files, so they wont be added in that case.
Another way is using git gui, it displays all un-tracked files and you can select them all (or groups of it) and add them in one click.

Managing multiple branches in Eclipse, or getting a VS-like setup for Eclipse

In VS, it's simple. Everything the project needs is stored in the project folder and all VS settings are stored in one place. Eclipse, however, stores Eclipse settings with the project and keeps a .metadata at the workspace level which is needed to detect the projects in the workspace. Thus, I can't simply branch a project and then open it in Eclipse. I need to set up a workspace, branch it into that workspace, copy over all my workspace settings (settings import/export doesn't even work right in Eclipse) so I have the same Eclipse settings, then do some kind of import to get the project in the workspace. This is what I generally refer to as a pain in the freaking neck, and it causes me to not branch any Java projects and to keep them all in one folder. This is also a pain.
Is there any way I can get a setup where I can just branch a project and open it in Eclipse, while maintaining the same Eclipse settings?
UPDATE: The current state of the question is expressed by the comment to soru's post.
Pretty sure you want to:
Keep the same workspace for all projects (or maybe a few, at the level of say 'hobby' and 'work').
switch between different branches in the same project by using the features of your version control tool/plugin
if you want to work on multiple branches at the same time, just create two projects, and manage them both as above.
if you want to temporarily hide the inactive version, use the 'working set' feature.
The main limitation is that you might want to have projects with the same name, but you can't. So sometimes you have to make up a project name different from the underlying folder name.
In general, mapping between VS and Eclipse:
Installation <-> workspace
Solution <-> working set
Project <-> project or folder or VC system branch or working set node
Refs:
VS object model
using working sets in Eclipse
working with branches in subclipe
Well, I'm not a fan of keeping any IDE specific settings in the repo, but when I do I keep only .project, .classpath and .settings.
You can also keep you settings at the workspace level (Windows->Preferences),and not on the project level (Project->Properties).
Also why do you create a seperate workspace for branches? You can keep it in one workspace, no need to create another one.
You could also use "switch" in subversion (I don't know if that's what you are using, but other revision systems should have something similar) and go to the branch you have created.
(of course if you wan to work concurrently on more than one branch then it doesn't help)
I can't speak to the Eclispe problem, as i'm only a n00b user, but I can speak to the secondary question.
I've been working in systems for a number of years that ended up needing to have various branches of the same code done for a variety of reasons.
One of the best reasons for keeping specific settings in project-specific locations is that so the various compiler / sdk / etc. settings & files can be specific per-branch and not collide between branches.
This allows, for example, for the work to upgrade a code set to a newer sdk/compiler to be done without impacting the ability to work on the existing "main line" code set with the previous sdk/compiler should the need arise.
In my experience in the computer game industry as a core technology wog, this happens a LOT.
I'm sure the same situations occur outside the computer game industry, maybe just not at the same pace.