Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Prevent WPF files not under SCM from being deleted on Load?

Is there any way to do a "load" without existing files (not under source control) from being deleted from my project?

That is ... I create a Portlet Factory project in Eclipse. This gives me base "factory" code. Then I add files to the project as I develop my portlet. When I "check-in", the team settings in eclipse are smart enough to ignore the base portlet factory files (they don't get checked in).

But ... if someone wants to load my portlet code from RTC, they will create a portlet factory project (to get the base stuff), and then want to load my code from RTC. A "load", though, will wipe out the base portlet factory code.

Any way to avoid this? (Other than to re-add project facets ... and other project settings ... which is a bit tedious.)

0 votes


Accepted answer

Permanent link

What you could do is use the Team-->Share Project action to hook up the
project to the corresponding remote folder. This will allow you to see
the differences between the local and remote in the Pending Changes
view. You may end up with a bunch of deletions for content that exists
remotely but not locally. If you Undo these, the content should be loaded.

Michael

P.S. I haven't tried this myself but conceptually it should work.

David Lafreniere selected this answer as the correct answer

0 votes

Comments

I can verify Michael's suggestion - I worked with WPF development and this is the solution for working with WPF projects in RTC:

Developer 1
- create a new WPF project in your workspace (this creates a project with only the WPF project template files)
- create your models, profile sets, java classes, etc
- create .jazzignore for top level .project and .classpath
- share your project to source control (Team > Share) and pick a component in a workspace to share it in - the WPF provided excludes will ensure only project artifacts created by the developer are shared, not the project template files
- modify the project artifacts and checkin/checkout as necessary

Developers 2-n
- create a new WPF project in your workspace - use the same name as developer 1
- share the project to SCM - it's important the project name matches the directory of your WPF project
- undo any subtractions (this will copy down the changes)
- modify the project artifacts and checkin/checkout as necessary

Just want to say that this isn't a problem with WPF or RTC. The key is to re-share the project to connect the new WPF project to the files already under source control. The deleting mentioned in the original post was due to loading the same project name in Eclipse (the wrong way to work in this case).

Works great! I also tried the same technique with a RAD portlet/EAR project ... works!

Thanks!!!


2 other answers

Permanent link
I don't think there are many options, either this code is useful to others and you can un-ignore it and check it in, or you can check it in and keep it in a change set that you don't deliver. This can become tedious though.

I'm curious, how did you handle this before?

0 votes

Comments

With other source control systems I have used ... that have eclipse plugins ... the function of "syncing" with the code repository would never delete files from the local workspace. If the file exists in both the local workspace and in the code repository, of course it would overwrite the local copy (if you want it to). But it would leave other files in your project untouched.


Permanent link
Hi Jean-Michel,

what would be needed is some sort of "private" versioned file that would live in the repository workspace but not necessarily be delivered to the stream.

There where several requests for this kind of things recently. It is always interesting if one needs to be able to hold some private configuration in files that should not affect the files in the stream. Potential candidates would be server configuration files etc. that are just local but required.

Other examples could be eclipse launch files that users would want to customize for a different local setting but not share or create conflicts with the server version. Actually this is even a more mixed example where you want a versioned file in the stream but you want to be able to change it and keep the private change without affecting the common stream. This could be done manually taking care the change never gets delivered.



Ralph

I don't think there are many options, either this code is useful to others and you can un-ignore it and check it in, or you can check it in and keep it in a change set that you don't deliver. This can become tedious though.

I'm curious, how did you handle this before?

0 votes

Comments

I'd guess there's a need to not even have the files in the repository workspace. This set of files could be quite large (as in the case of portlet factory), and really no need at all to have it in the repository.

Art,

I guess I haven't understood your problem right and am talking about a completely different one. Your issue seems to be completely reverse actually from what i was thinking i understood in the first round. Sorry for that.

You say you have local files in the Eclipse workspace and they get deleted when loading, which you'd like to avoid, right? I think the load deletes existing projects and their content first and then recreates them. I don't think it deletes other projects. Could you work with a setup where the files you'd like to preserve are in another project?


I'd guess there's a need to not even have the files in the repository workspace. This set of files could be quite large (as in the case of portlet factory), and really no need at all to have it in the repository.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,015
× 1,201
× 57
× 56

Question asked: Apr 28 '10, 8:53 p.m.

Question was seen: 8,176 times

Last updated: Oct 13 '17, 1:53 p.m.

Confirmation Cancel Confirm