It's all about the answers!

Ask a question

Visual Studio 2008 clarify file rename process


David Dulling (13731212) | asked Jul 19 '10, 8:58 a.m.
Hi

I'm renaming files in Visual Studio to see if I can identify a common process that the RTC integration uses (renaming files in VS is a current problem area in our current ClearCase / VS 2008 integrations)

It seems sometimes it issues a warning message "Could not move resource(s) in Jazz, it will be considered as a combination of a delete/add with no history information". It then generates a file deletion and a file addition (as warned) in the Pending Changes window.

This seems to happen if I rename a file from (say) File1.cs to (say) File1_renamed.cs.

On other occasions it doesn't issue a warning message and simply generates a basic file rename. This seems to happen if I rename (say) File1.cs to (say) file1.cs e.g. just a case change.

Ideally I'd like the simple file rename option taken each time rather than delete a file with all its history from the repository

Can you explain why it seems to behave differently for each type of rename (are there any more use cases that generate a different reaction)?

While I'm here though, I noticed a couple of things:-

1. When I checked the renamed file in the second example into the repository, the pending changes window in the Eclipse client listed the outgoing change and against the file it had "(Renamed from File.cs)". In the VS Pending Changes window it didn't have this helpful comment

2. Do I have to manually refresh the Eclipse project to bring the Pending Changes windows on both Eclipse and VS up to date each time I make a change? For a time the Pending Changes windows were not reporting in each IDE were out of step. I also think doing a File | Save All in VS seemed to update the PC window too. Should I have to do that also/instead?

n.b. Sorry to raise all these issues with you guys. I think the product is fantastic but it's just that I want it to be perfect. Our engineers have been very reluctant to convert to ClearCase in the past due to niggly little integration issues and I need to be able to convince them this one is so much better

Thanks

David

6 answers



permanent link
Walter Mansur (63613017) | answered Jul 19 '10, 9:59 a.m.
Hi David,

We rename files here without much of an issue. However, I do remember one file that was renamed from abc.bat to abc.cs (or vise versa, I forget which), which was discussed in Work Item 111382. Other than that we get the expected behavior that you report in your second paragraph below. We haven't seen the "Could not move resource(s) in Jazz, it will be considered as a combination of a delete/add with no history information" here.

Regarding "2" below. Let's start with the Eclipse Client. For that client there are a couple of "switches" that you and your users can set so that "Pending Changes" are detected immediately, if not sooner. The first one is to check a box in the Preferences window:

1. In the RTC Eclipse Client, on the top menu bar, click on Windows->Preferences.

2. In the window labeled Preferences, click on the + sign to the left of General to expand it.

3. Then click on Workspace.

4. In this window, check the box to the left of "Refresh automatically" and set the Workspace save interval (in minutes): field to "1".

The second one is, in the left pane of the Preferences window, go to Team->Jazz Source Control->Local Changes and check the box to the left of "Look for external changes before modifying local changes".

We do both of those here for the users who use the Eclipse client.

However, these options that are available for the Eclipse client are not available for the Visual Studio Client.

Regarding the Visual Studio Client, you do have to manually refresh the workspace (or run an accept action, or do a modification in a solution, or run a load action on it) in order to see "Unresolved files" in the Pending changes view.

We do not run both of the clients here at the same time. The .NET developers here work with the Visual Studio Client exclusively, all of the time. Other teams use the Eclipse client exclusively. I personally do run both at the same time on the same workstation, and for just one reason. The Eclipse Client is currently the only one where you can create new Build Engines and Build Definitions (soon to change - in v3.0).

I am more than happy to discuss our experience using Rational Team Concert here and if you would like to discuss this further, let me know and I will give you my contact information.

I used ClearCase for 15 years (at Sanders, which became Lockheed Sanders, then Lockheed Martin, and then BAE Systems). I LOVED ClearCase. It was great to use at several other companies that I worked at. However, this Team Concert is better. The one hurdle I had with understanding it was that I kept comparing it to ClearCase. Once I got that out of my mind, it was very easy to understand it and work with it.

- Walter

Hi

I'm renaming files in Visual Studio to see if I can identify a common process that the RTC integration uses (renaming files in VS is a current problem area in our current ClearCase / VS 2008 integrations)

It seems sometimes it issues a warning message "Could not move resource(s) in Jazz, it will be considered as a combination of a delete/add with no history information". It then generates a file deletion and a file addition (as warned) in the Pending Changes window.

This seems to happen if I rename a file from (say) File1.cs to (say) File1_renamed.cs.

On other occasions it doesn't issue a warning message and simply generates a basic file rename. This seems to happen if I rename (say) File1.cs to (say) file1.cs e.g. just a case change.

Ideally I'd like the simple file rename option taken each time rather than delete a file with all its history from the repository

Can you explain why it seems to behave differently for each type of rename (are there any more use cases that generate a different reaction)?

While I'm here though, I noticed a couple of things:-

1. When I checked the renamed file in the second example into the repository, the pending changes window in the Eclipse client listed the outgoing change and against the file it had "(Renamed from File.cs)". In the VS Pending Changes window it didn't have this helpful comment

2. Do I have to manually refresh the Eclipse project to bring the Pending Changes windows on both Eclipse and VS up to date each time I make a change? For a time the Pending Changes windows were not reporting in each IDE were out of step. I also think doing a File | Save All in VS seemed to update the PC window too. Should I have to do that also/instead?

n.b. Sorry to raise all these issues with you guys. I think the product is fantastic but it's just that I want it to be perfect. Our engineers have been very reluctant to convert to ClearCase in the past due to niggly little integration issues and I need to be able to convince them this one is so much better

Thanks

David

permanent link
David Dulling (13731212) | answered Jul 19 '10, 10:28 a.m.
Hi, Walter.

Thanks for the prompt and informative reply. I'll certainly apply those preferences as they should help enormously.

With regards to the 1st rename behaviour, is there any way somebody could look and see if this is normal and under what use case this happens?

Yes, I'm using CC and CQ in a part of BAE Insyte at Christchurch. It was new to me 18 months ago when I joined so it's been a major learning curve for me (as is RTC now) but I'm never happier than when I'm looking at new tools.

permanent link
Sreerupa Sen (1.0k4) | answered Aug 02 '10, 12:25 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
David, till 2.0.0.2, you can only rename files via Visal Studio's Rename menu option in the Solution Explorer, so the RTC Client is restricted by the information it receives from Visual Studio about renames. In the next release, we plan to have a new view called the Sandbox Explorer, which will have menu options that let you perform such operations more easily, directly on the files in your file system, and preserving file history. We will also have the helpful comments that eclipse now provides.

permanent link
David Dulling (13731212) | answered Aug 02 '10, 12:49 p.m.
Hi,

Will this rename function also initiate a rename of the file in Visual Studio's .csproj file too?

Thanks

Dave

permanent link
Sreerupa Sen (1.0k4) | answered Aug 02 '10, 1:02 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
No it won't, unfortunately. That will need to be done manually by the user. Modifying a .csproj file programmatically is tricky.
The Sandbox Explorer looks at files as just files without any VS specific connotations - the basic purpose of Rename from here is to preserve file history in more cases than is currently supported in the Solution Explorer rename.

permanent link
David Dulling (13731212) | answered Aug 02 '10, 3:57 p.m.
Ah. That might get a little confusing then. From what I can see, if I rename a file via VS from (say) TestFile.cs to Testfile.cs (case change only) then it seems to generate a true rename - same file with preserved history.

If I change the file name in VS from TestFile.cs to (say) AnothertestFile.cs then VS seems to delete the old file and create a brand new file and RTC registers the changes (delete and add).

In both scenarios the .csproj file is updated. So, if I want to rename a file in VS as per the second example AND keep the RTC history presumably I'd have to rename the file first via the proposed sandbox explorer and then via VS Solution Explorer?

Doesn't sound that elegant especially as the rename function works via VS and the Clearcase integration so it has been done already (ironically it doesn't seem to work when I rename a file via the first example above)

Anyway, thanks for your response.

Regards

Dave

Your answer


Register or 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.