1

In my current working environment, I make use of eclipsed files extensively for testing purposes. When it comes time to formalize things, I have a script which generates a diff by comparing the file with a backup saved by my eclipse script.

I'd like to be able to work without the backup of the original file; is there any way I can retrieve the current version of the file that I can pass to diff? Even though the file is view-private, I see I can enter foo@@/ and see a list of versions, but I'm not sure how to find which version is the latest. Everything I've tried using cleartool ls or describe with the file name tells me that it's not a VOB object (which is true, although cleartool ls does show it as eclipsed, so it must know, somehow, that there is an element there)

Thanks

Mikeage
  • 6,424
  • 4
  • 36
  • 54

1 Answers1

2

Eclipsed file means dynamic view.

The simplest solution would to make a second dynamic view based on the same config spec.
Considering how cheap and quick those views are, this isn't an issue.

On that second dynamic view, you can do a

cleartool descr -fmt "%Xn" /path/to/element

In order to get the extended pathname of the file (see fmt_ccase for more on the %Xn syntax).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Or you can use simply the path of the same file on the second view for your diff. No need for the extended pathname in that case, actually. – VonC Jul 30 '12 at 11:22
  • Good idea; I never thought about that! I know our CC admins are always warning us about creating too many unneeded views, but I assume what they really mean is too many streams (and I just confirmed with them that this was their intention). – Mikeage Jul 31 '12 at 07:30
  • 2
    @Mikeage too many dynamic views could be harmful too (so, no just "unneeded streams"), if their associated view storages grow without control (because of large amount of private files), but in your case, for consultation purpose only, there is no such limitation. – VonC Jul 31 '12 at 07:39