History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-16326
Type: Bug Bug
Status: Open Open
Assignee: Michael Gerasimov
Reporter: Gilles Philippart
Votes: 2
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Clearcase : properly manage activities

Created: 13 Nov 07 17:44   Updated: 19 Nov 07 17:11
Component/s: Version Control Integration. ClearCase

Environment: Win XP

Build: 7,549
Severity: Extreme


 Description  « Hide
Following my comment in http://www.jetbrains.net/jira/browse/IDEADEV-22890 :

Hello Michael,
I have done some tests with #7549, so here are the results.
Before going on, i'd like to thank you for your hard work and your responsiveness . I think we're on the right path, and soon Clearcase support will rock in IntelliJ.

Suppose that i have the following clearcase setup :

  • ViewA
    • "Bugfix 1" <== current
    • "Bugfix 2"
    • "Bugfix 3" (obsolete)
  • ViewB
    • "Bugfix 4" <== current
    • "Bugfix 5"
    • "Bugfix 6" (locked)
    • "Bugfix 2" (same headline than the one in ViewA)

I also assume i don't have any files checked out.

Issue #1

IntelliJ currently lists (as of #7549):

  • "Bugfix 1"
  • "Bugfix 4"

It should list :

  • "Bugfix 1"
  • "Bugfix 2"
  • "Bugfix 4"
  • "Bugfix 5"
  • "Bugfix 6"

Issue #2

Let's assume "Bugfix 1" is selected as active changelist in IntelliJ.
The way it works right now :

  1. I checkout a file in ViewB. CC lists the checkout under activity "Bugfix 4", which is normal since this is the current one. In IntelliJ the changelist is updated immediatly, and the file is listed under changelist "BugFix 1".
  2. I click "Refresh VCS Changes", nothing happens, still listed under changelist "Bugfix 1".
  3. I click "Synchronize Activities", the file is now listed under changelist "Bugfix 4".
  4. Restarting from 2. if i commit changes, the file is checked in CC under activity "Bugfix 4".

I see 3 problems :

  • At #1, mismatch between CC and IntelliJ : CC says "Bugfix 4", IntelliJ says "Bugfix 1".
  • At #2 and #3 : Clicking "Refresh VCS Changes" should synchronize the activities as well. Remember, since i just want to see my activities in the project views (and not all branches, as what's done in TeamCity ), it's not a lengthy process at all (as long as you obsolete your own activities from time to time which is considered best practice). So i don't think "Synchronize activities" is useful anymore. Keep it simple : "Refresh VCS Changes" should synchronize everything with Clearcase.
  • At #4 : It seems the active changelist has no effect on the underlying activities.

Now, I'm expecting to see the following :

  • At #1 IntelliJ should create a "Bugfix 1" activity in CC. So you don't have a mismatch. As a side not, before creating a CC activity, you should check if an activity with the same name is already in CC and is not listed in IntelliJ, which can happen if you haven't refreshed VCS since a long time. In that case, you should reuse that one (or ask to reuse that one).
  • In addition, renaming a changelist should rename the associated activities if any (so you don't have mismatch)
  • "Bugfix 2" changelist matches 2 CC activities (one in ViewA, one in ViewB, see the setup above). If i rename both in CC for example "Bugfix 2 renamed", and click "Synchronize Activities", a new changelist appears with the correct name, but the old one still stays here. And i can't make a difference between "CC changelist" and "only-in-intellij" changelist. So maybe you should provide a way to tell if a changelist is associated or not with CC activities. For example : "Bugfix 1" (n activities), where n>0. For example, in the setup from above, you should have : "Bugfix 2" 2 activities.
  • "Bugfix 6" should have some icon, indicating that it's locked so you can't checkout anything.

Let me know if i can help, browsing the plugin source code or maybe submitting patches.

Gilles



 All   Comments   Work Log   Change History      Sort Order:
Gilles Philippart - 14 Nov 07 10:54
Another thoughts :

changelist - activites management

When you create some view in clearcase, there is absolutely no activity set on it. If you want to checkout a file you have to create an activity first (which CC explorer or eclipse proposes with a dialog). IntelliJ must create an activity when checkouting file if none exists. So, this underlines the necessity to reflect changelist changes as immediate as possible in CC. So :

  • There's a one to many relationship between changelist and activity (2 activities with the same name are shown like a unique changelist). We can say a changelist and an activity are "linked" when they have the same name.
  • You start working in IntelliJ on a freshly created view by creating an empty changelist. This will be used to create the activity once you begin to do checkouts.
  • If you rename the changelists, it must rename linked activities as well.
  • If you delete the changelist, it should undo checkout files on all linked activities and obsolete the activity, or else at "next synchronize activities", the changelist will come back.
  • If you move changes from one list to another, you must move them from one activity to another activity, if it's a new activity, create it.
  • Hijacked files must be on their own, non-linked changelist (no relation between a hijacked file and an activity)

comment management

At checkouting file, i like to log a comment, that's already available via a dialog today. If any IntelliJ action asks to checkout more than one file, a refactoring for example, let's say 30 files, i'll get 30 dialogs .

  • I'd like to be able to specify the same comment for all files in one step. The dialog should be enhanced with an "Ok for all" button.
  • When commiting files (checkin), be sure that the comments are preserved, unless you want to override them all at once with some new comment. (this is basic functionality in clearcase explorer, but extremely useful !!).

Gilles


Michael Gerasimov - 15 Nov 07 15:05 - edited
At #1, mismatch between CC and IntelliJ : CC says "Bugfix 4", IntelliJ says "Bugfix 1".

fixed

At #2 and #3 : Clicking "Refresh VCS Changes" should synchronize the activities as well. Remember, since i just want to see my activities in the project views (and not all branches, as what's done in TeamCity ), it's not a lengthy process at all (as long as you obsolete your own activities from time to time which is considered best practice). So i don't think "Synchronize activities" is useful anymore. Keep it simple : "Refresh VCS Changes" should synchronize everything with Clearcase.

Now that I optimized the retrieval of activities from CC (one command per view), I'm able to do that. I also like this idea.

In addition, renaming a changelist should rename the associated activities if any (so you don't have mismatch)

The problem here lies in the nature of IDEA-CC interaction design. We do not perform state-changing actions (like checkin, deletion or activities rename) on demand. Rather we perform everything in one determined step, like committing. Thus I suppose that activity rename will be performed right before the changelist commit.

"Bugfix 6" should have some icon, indicating that it's locked so you can't checkout anything.
Agreed. Same is true for changelist which do not correspond to any activity at all. While it is not proper to remove them automatically, there should be a clear indication of their current status.


Gilles Philippart - 16 Nov 07 01:02
Me: In addition, renaming a changelist should rename the associated activities if any (so you don't have mismatch)

You : The problem here lies in the nature of IDEA-CC interaction design. We do not perform state-changing actions (like checkin, deletion or activities rename) on demand. Rather we perform everything in one determined step, like committing. Thus I suppose that activity rename will be performed right before the changelist commit.

Can it be changed ? A plugin can't add behavior on those events (checkout, activities rename etc...) ? You have to, because it leads to inconsistencies, and that's the one thing you don't want. As a side note, when i create branches on my project (new CC streams, so new CC views) there isn't any activity on the stream. So IntelliJ pops up dialogs saying so, plus info messages in the messages window saying that there isn't any activity, and i can have problems if i check out things !!!! That's really weird. IntelliJ should list nothing in the changes view and that's all. Please, please, i really insist on this, we must be able to have those changes on changelist drive the activity creation/update/ obsoletion... It really feels awkward right now...


Dave Wallace - 16 Nov 07 14:59
I have one more thing to add, its to do with views -> modules -> activities.

I have multiple modules in the same view but IDEA asks each module for its list of activities, This can be very slow indeed for an action thats pointless as it returns the same result.
Maybe you should do as 'lsview' on the module first and if its the same as one thats already been added then it can be ignored. (or make it an option in the configuration to always use single view).

Also when working in offline mode IDEA still attempts to do some activity management if the UCM checkbox in the configuration is active. If I am in offline mode then it should ignore the state of the UCM box and just do nothing. (I assume this was the intention as changing to offline mode grays out the UCM box.)


Gilles Philippart - 16 Nov 07 15:39 - edited
I have multiple modules in the same view but IDEA asks each module for its list of activities, This can be very slow indeed for an action thats pointless as it returns the same result. Maybe you should do as 'lsview' on the module first and if its the same as one thats already been added then it can be ignored. (or make it an option in the configuration to always use single view)

I agree, detect this automatically, no need for an option here.


Michael Gerasimov - 19 Nov 07 10:29
Optimization of getting the activities per view and not per module is already done.

Michael Gerasimov - 19 Nov 07 14:24
At #2 and #3 : Clicking "Refresh VCS Changes" should synchronize the activities as well. Remember, since i just want to see my activities in the project views (and not all branches, as what's done in TeamCity ), it's not a lengthy process at all (as long as you obsolete your own activities from time to time which is considered best practice). So i don't think "Synchronize activities" is useful anymore. Keep it simple : "Refresh VCS Changes" should synchronize everything with Clearcase.

When "Synch activities on refresh" is on, IDEA will synch activities on refresh, otherwise an on-demand menu item in "Version Control" menu will be available. Thus we have a good compromise between convenience and performance.


Michael Gerasimov - 19 Nov 07 14:26
"Bugfix 6" should have some icon, indicating that it's locked so you can't checkout anything.

While we have rather limited possibilities to graphically decorate changelists, locked lists will be highlighted with bold suffix "(LOCKED)" and obsolete changelists will disappear from the "Changes" view.


Gilles Philippart - 19 Nov 07 14:22
When "Synch activities on refresh" is on, IDEA will synch activities on refresh, otherwise an on-demand menu item in "Version Control" menu will be available. Thus we have a good compromise between convenience and performance.
Ok for me.

While we have rather limited possibilities to graphically decorate changelists, locked lists will be highlighted with bold suffix "(LOCKED)" and obsolete changelists will disappear from the "Changes" view.
Ok too.

What about the "activity creation from checkouting in a changelist", and "renaming one changelist should rename the associated activities" ? Do you have any news for that matter ?


Michael Gerasimov - 19 Nov 07 15:31
I'm currently think of that. Since there is no cleartool graphical commnd for that (I wanted to issue ct so that is manages its activities itself), I need to implement this dialog by myself. I plan to integrate the activity assignment into the cc checkout dialog (not the "clear offline status" dialog).

Gilles Philippart - 19 Nov 07 16:14
How would this new dialog work ?

Michael Gerasimov - 19 Nov 07 17:11
I think this way:
If there is no associate activity for a view where the affected file is located, then the checkout dialog will show a combobox with available activities for a view. It will be possible to choose the existing one or type the heading name for a new one.