Search code examples
linuxversion-controlclearcase

sync two vobs file (by clearfsimport) without checking in the updated file


I am using following command to sync B vob files from A vob

clearfsimport -master -follow -nsetevent -comment $2 /vobs/A/xxx/*.h /vobs/B/xxx/

It works fine. But it will check in all the changes automatically. Is there a way to do the same task but leave the update files in a check out status?

I want to update the file for B from A. Build my programme, and then re-cover the branch. So if the updated files is an check out status, I can do unco later. Well with my command before, everything is checked in. I cann't re-cover my branch then.

Thanks.


As VonC said, it's impossible to prevent "clearfsimport" to do the check in. And he suggested to use a label to recover back.

For me, the branch where I did "clearfsimport" is branched from a label.Let's call it LABEL_01. So I guess I can use that label for recovery. Is there an easy way (one command) to recover the files under /vobs/B/xxx/ to label LABEL_01 ? I want to do it in my bash script, so the less/easy the command is, the better.

Thanks.


Solution

  • After having a look at the man page for clearfsimport, no, it isn't possible to prevent the checkins.

    I would set a label before the clearfsimport, and modify the config spec for the new version to be created in a branch (similar to this config spec).
    That way, "re-cover" the initial branch would be easy: none of the new version would have been created in it.