tags:

views:

45

answers:

1

I have two dynamic views in ClearCase which, as far as I know, are supposed to be "equal".
One is supposed to look at the "Main branch" and one at some other branch (let's call it A).

I did a merge from A to Main (in the Main view) and for some reason the code at the A view compiles while Main does not.
Is there a way to compare the views for differences?

+1  A: 

The simplest way is to use an external diff tool on those two views (like WinMerge or BeyondCompare on Windows, KDiff3 on Unix or Windows, ...).

I would actually create two new views (with the same config spec than the two initial views), to remove any "cache" effect, and start the comparison there.
Once that initial examen is done, I would start the compilation in those two views, and see if one of them still don't compile.

Don't forget that merging A to Main will not always result in the same set of files after the Merge.
It would be the same only if no evolution has taken place in Main since A started (or since the last merge from A to Main).


The setcs -current you mention will:

–cur/rent

causes the view_server to flush its caches and reevaluate the current config spec, which is stored in file config_spec in the view storage directory. This includes:

  • Evaluating time rules with nonabsolute specifications (for example, now, Tuesday)
  • Reevaluating –config rules, possibly selecting different derived objects than previously
  • Re-reading files named in include rules

If you depend within your config spec on an "include file" which was at the wrong version, the first setcs would set it at the right version, and the second one would read its content and set the right version for the rest.

VonC
@VonC How do I use KDiff3 for this, seeing as the files are in the same location, only under different views?
Amir Rachum
@Amir: if the files are under different (dynamic) views, that means two different paths (`M:\MyView_onMain` vs. `M:\MyView_onA` on Windows, or `/view/MyView_onMain` vs. `/view/MyView_onA` on Unix). All those diff tools know how to compare directories.
VonC
@VonC the diff didn't help - I couldn't find any differences other than `.contrib` files, etc. Do views consume much disk space? Is is accustomed to create new views in such "trigger happy" manner?
Amir Rachum
@Amir: dynamic views don't take space. That is the point of dynamic views: network access. You can create as many of those without worrying about disk space. See http://stackoverflow.com/questions/2923328/what-are-the-differences-between-a-snapshot-view-and-a-dynamic-view/2925378#2925378 for the difference between dynamic and snapshot views.
VonC
@Amir: what is the compilation error you get on the "Main" view?
VonC