1

We have a huge codebase with around 27000 files in ClearCase UCM. Our build process is as follows:

  1. Copy files from the dynamic view of the stream to the local machine(say directory D:\ABC)
  2. Start compilation

The next time we compile we clean up D:\ABC and repeat the above process. The copying takes around 50 minutes.

The reasons we prefer dynamic views over snapshot views are:

  1. We can always be sure that we are using the latest code
  2. We generate a lot of code and modify a few existing ones during compilation. This may turn snapshot views dirty.
  3. We are saved from the trouble of cleaning up the snapshot views, rebasing it etc...

The troubles with snapshot views are:

  1. We need to clean-up the code we generated for the last build(these are shown as view-private)
  2. We need to undo hijack(we remove read-only for some files as they have to be modified at compile-time)
  3. We have to clean up the output directories and files therein, created by Visual Studio during compilation
  4. We need to rebase the snapshot view every time we intend to compile
  5. We do not trust the snapshot view's cleanliness

My questions:

  1. Are we doing the right thing by copying files from the dynamic views?
  2. I wanted to know if there is some way we can use snapshot views and still be sure about it being clean?
  3. Is there any other option or best practices that we can adopt to improve our process?

Any help would be appreciated.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
msiyer
  • 821
  • 6
  • 20

1 Answers1

1

1/ No:

  • Copying from a dynamic view is waaay longer than using directly a snapshot view that you would simply update (to catch the latest code)
  • Plus, during the copy, a file can be updated (new version checked in), and would then be copied by your process (because the dynamic view would... dynamically pick up said new version). In short: you don't know what you are copying.
  • an update of a snapshot view is an incremental process.
    Copying a dynamic view is not (it will copy everything instead of downloading only the delta)

2/ You would update -overwrite to make sure any hijacked file is removed

3/ Using a Baseline is safer, in order to get a fixed point in time of the code base

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • We create baseline after a successful build. So getting by baseline is not an option. Also, this process is not for the developers but part of the continuous integration. So we need to get the latest source code without relying on any baseline. – msiyer Mar 26 '12 at 13:29
  • Mr VonC, in our process, we lock the stream before we start the copy. So we are sure of what we are copying. We basline only after the build is successful. So a successful build is a prerequisite for baseline. This is, again, not a build process to be followed by developers. This is a continuous integration process of the SCM team. – msiyer Mar 26 '12 at 13:39
  • @msreekant you also can baseline *before* copying. Then, no need to lock the stream. You need to establish a clear link between what has been build and its code, without blocking the stream. – VonC Mar 26 '12 at 13:54