2

I created a VOB and a snapshot view that loads it. The VOB is empty and I wanted to add some files to initialize it, but I got errors for all files that I wanted to import. Here is the details.

The VOB is created by this command:

ct mkvob -tag /vobs/sqlite -comment "testing VOB for Sqlite" -public /var/clearcase/vobs/sqlite.vbs

The view is created by this command:

ct mkview -tag sqlite-dev -snapshot /home/clearcase/working/sqlite-dev

The config spec is:

element * CHECKEDOUT
element * /main/LATEST 
load /vobs/sqlite

I checked out the "vobs/sqlite".

In the view directory /home/clearcase/working/sqlite-dev, I run clearfsimport to import some files:

clearfsimport -rec /home/clearcase/tmp/sqlite-3.6.23.1/* vobs/sqlite

But I got errors for all files and directories. Fore example, for the file "VERSIONS", I saw errors like:

Creating element "vobs/sqlite/VERSION".
clearfsimport: Error: Unable to lookup "VERSION" in "/vobs/sqlite@@/main/CHECKEDOUT": no version selected in configuration specification.
clearfsimport: Error: Unable to access "/vobs/sqlite/VERSION": no version selected in configuration specification.
clearfsimport: Warning: Trouble updating name "VERSION" in snapshot view: error detected by ClearCase subsystem.
A separate update may need to be performed in order to reflect the results of the operation in the snapshot view.
clearfsimport: Warning: Unable to check if new version of "vobs/sqlite/VERSION" is identical.
clearfsimport: Warning: Element "vobs/sqlite/VERSION" is no longer being loaded and will not be updated as part of this operation.
    version "/main/1".

Can anybody please point out what I did wrong here? Should I change the config spec somehow?


Updates after I tried VonC's answer.

Thanks for the response. I tried to run clearfsimport again and I saw some different errors:

Validating directory "/home/clearcase/working/sqlite-dev/vobs/sqlite/tool".
clearfsimport: Error: Cannot checkout a directory when directory doesn't exist in the snapshot view.
clearfsimport: Error: Could not checkout directory "/home/clearcase/working/sqlite-dev/vobs/sqlite/tool".
Validating element "/home/clearcase/working/sqlite-dev/vobs/sqlite/VERSION".
clearfsimport: Error: Could not access "/home/clearcase/working/sqlite-dev/vobs/sqlite/VERSION".
clearfsimport: Warning: Trouble importing element "/home/clearcase/working/sqlite-dev/vobs/sqlite/VERSION".

tool is a directory and VERSION is a file. The same error happens to all files/directories.

The CC is installed on Linux, so I cannot try the ClearCase explorer.

I tried the full path but I saw the same errors.

I am running these command as root, I guess "-nset" won't help. I tried adding it but still saw the same error.

Are there other ways to add files if I only want to add them once?

evergreen
  • 736
  • 1
  • 9
  • 17
  • The config spec is good, but I suspect a path error in the `clearfsimport` command. See my answer. – VonC Jul 15 '10 at 03:58
  • Try without the '*' just to see how it goes. – VonC Jul 15 '10 at 04:42
  • Still no luck when tried without "*". Is it possible my VOB has problems? – evergreen Jul 15 '10 at 05:17
  • @X. Ma: You vob should be fine, but try with a dynamic view to see if it works better (`/view/MyView/vobs/sqlite`) – VonC Jul 15 '10 at 05:23
  • @X. Ma: also do you have access to the chat? (http://meta.stackoverflow.com/questions/57017/feedback-wanted-three-day-test-run-of-the-chat). If yes, join me in the sandbox room and leave a message to @VonC: I will create a 'clearcase' room then (Note: you must have 20 rep on meta.stackoverflow.com though...) – VonC Jul 15 '10 at 05:27
  • @X. Ma: also make sure you don't have anything checked-out before making the `clearfsimport`. – VonC Jul 15 '10 at 05:57
  • @X. Ma: any news on that `clearfsimport`? Did you check for any checked out file? Did you use a dynamic view? – VonC Jul 16 '10 at 03:58

1 Answers1

1
  • Try the clearfsimport without checkouting the vob first.
  • Try adding a file to the vob through the ClearCase explorer (just to see if it works)
  • Try specifying the full path of the vob when clearfsimporting: /home/clearcase/working/sqlite-dev/vobs/sqlite

Note: you can also use a dynamic view for this kind of operation (that avoid any "update view" error regarding the workspace, since a dynamic view has no need to update its -- network managed -- workspace)

See also "How can I use ClearCase to “add to source control …” recursively?" for more on the clearfsimport options: the '-nset' option might also be needed here.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for the answer! I tried what you suggested but still no luck. I updated my original question with what I did. – evergreen Jul 15 '10 at 04:25