views:

119

answers:

5

I recently sent an email to my colleagues explaining that I need to make some changes in our shared ClearCase view which will mean that our project will be in a non-compilable state for a day or two.

One guy is complaining about this. What can I do to prevent his complaining?

+9  A: 

Make your changes in a separate branch, and take responsibility for merging your changes when you're done.

I can certainly understand why your colleague might complain about this - you're essentially preventing him/her from doing the work that they had otherwise planned to do.

Greg Hewgill
How do I do this in a ClearCase shared view?
Ariel Bold
If you are sharing a view, you are using ClearCase wrong. You should each have your own view. Regard views as disposable; they are. Not the cspec - that's crucial. But the actual view is something you create, use for a (short) while, and then drop. I have a 'rebuild.view' script that rebuilds a view with the same name and cspec; I use it on most of my views every week or two. But there is no reason (other than bloody-minded parsimony by management who won't buy you enough disk space) to share a view. (If there are important view private files to worry about, you are doing it wrong again!).
Jonathan Leffler
Sorry, I don't know the exact procedure to do that with ClearCase. I guess you'll need to contact your ClearCase administrator for assistance.
Greg Hewgill
It is not "bloody-minded parsimony". Our codebase is simply too big for everyone to have their own copy of the code.
Ariel Bold
How much (in money) is the time for all developers *other than you* for a couple of days worth? How many 1 TB drives can you buy with that money? You might find that a single drive is an hour or two's worth of salary for *one person*.
Greg Hewgill
@Ariel: views are intended for one person at a time to use. Abusing them by sharing them leads to problems. I'm amazed it works for you normally. And how big is your code base that it is too big for you each to have your own copy? Or your code base is not appropriately partitioned.
Jonathan Leffler
Haven't had to use ClearCase in years, but I recall a view requiring disk space proportional to the size of its *uncommitted changes*, not the size of what would be a full checkout in other version control systems. In fact, I thought this was one of ClearCase's few real virtues.
Zack
@Zack: you also need enough space for all the view private files - the object files etc. But disk space is cheap - programmers' time is not.
Jonathan Leffler
A: 

Either

  • Explain to him why you have to do it and he will understand if there is no better solution

or

  • Do the better solution

Edit:

I don't know why I got a down vote for this. Basically, I'm saying you should not try to "prevent him from complaining". Either he doesn't appreciate why what you are doing is the best solution, or what you're doing isn't the best solution. Just walk over and chat to the guy about it and discuss the problem until you both agree with each other.

One of you is right and one of you is wrong, I'm not saying which, I don't have enough information.

mattburns
"Better solution"?
Ariel Bold
We all know that devs shouldn't break the build. However in the real world sometimes temporary large breaking changes are needed (or can't easily be subdivided). A coworker of mine recently had to break automated unit tests for a couple of days to make a large major improvement. We decided in the long run it was worth it.
seand
So basically "either persuade the other person or do what they ask"? - This is pretty generic (and obvious) advice that applies to any dispute - I don't see how this helps answer the posters question.
Kragen
A: 

If you're using SVN this should be a simple Branch. Else you might want to consider a copy/past operation and merge yourself at the end.

Personally I think telling others that stuff their working on will be in a non compilable state for a couple of days is kinda outrageous. You're essentially telling your peers two things.

  1. Your changes are much more important than theirs
  2. You won't be able to work for a couple of days.
griegs
We are not using SVN.
Ariel Bold
Hmmm, tricky. i think you really do need to find a way of allowing the other developer to keep working while you do your changes. or maybe you could get him to help you thus making him part of the overall solution.
griegs
@Ariel: ...you may not be using SVN - yet. But one possibility is to make a copy of the view and push everything into SVN or GIT. Then, do your changes in the alternative copy, using the alternative VCS to manage your changes. Then, when it is all working in the copy, go and check out everything you need from the CC view and merge the changes back from the alternative VCS to CC. But it would be much better to have your own views - that you are sharing a view at all is ridiculous.
Jonathan Leffler
+2  A: 

You can prevent his complaining by not breaking the build!

The build isn't just someone nightly process that happens over in the corner somewhere that nobody cares about - it happens on every developers machine every time they want to debug or test anything!

If the build is broken on the build machine its broken on every developers machine - To developers the build should be sacred as a broken build means other people aren't able to do their work.

In terms of what you can do to prevent your changes from breaking the build, it depends a lot on what it is that you are changing, however some generic suggestions are:

  • Make your change on a separate branch and merge it in once its finished
  • Avoid making large changes, and instead split your change into many smaller non-breaking commits.
Kragen
The difficulty is that the poor guy is expected to share his view with his co-coder. So, there is no separation possible - the two coders not only have to share the same branch, but they both have to have each others files checked out. They're in a lose-lose situation; how any work ever gets done is something of a mystery.
Jonathan Leffler
A: 

The ClearCase way to handle this kind of situation (which can happen when doing a long and complicated merge for instance) is:

  • first put a label to identify the situation before any changes
  • start the modifications
  • if the process takes too long and the other users are affected (either because their dynamic views reflect * immediately* the new versions, or because they need to update their snapshot view, or because you are using the same view, which is possible with dynamic view), then:

    • at least stop sharing the same view, and create your own: if this is a snapshot view, you can use the same config spec. Don't checkin until it compiles again
    • ideally, create it with your own branch, starting from the label: that way you can make intermediate checkins, and then merge it back at the end.

A config spec for using your own branch, starting from the label you would have put before making any dangerous changes would look like:

    element * .../MyBranch LATEST
    element * MY_LABEL -mkbranch myBranch
    element /main/LATEST
VonC
Thanks! I will try this.
Ariel Bold