问题
I tried to update a clear case view with CCRC tool. Sometimes the view will be locked if last update was aborted for some reason, and couldn't be updated before the lock is broke. Is there anyone could help to tell me how could I unlock this view with CCRC tool?
Here's the error message when i run command update in rcleartool.
CRMAP7009: CCRC command "Update" failed: Error: "com.ibm.rational.clearcase.remote_core.copyarea.CopyAreaLockedException: Copy area "/Users/vizmacmini2/Jenkins/jenBranch941u1_vizmacmini2" is locked by another process. Retry the request once that operation completes. Lock info: last-refreshed:Nov 14, 2013 5:38:02 PM locked-on:Nov 14, 2013 4:41:07 PM user-id:vizmacmini2 hostname:10.197.40.115 process-id:unknown." conflict
回答1:
If the file is locked because of a process keeping an handle on it, it can be as simple as killing that process, and relaunching the update through the CCRC Navigator View
Refresh > Update from Repository
Regarding a ""com.ibm.rational.clearcase.remote_core.copyarea.CopyAreaLockedException
" error message, the IBM help page mentions:
The Copy Area Locked prompt appears when ClearCase encounters a
copyarea.lck
file after a user has attempted to rebase or deliver from a ClearCase Remote Client that resides on the same machine as the ClearCase native client.
So I suspect that your script need to find and remove that copyarea.lck
file, in order to proceed.
But I would also recommend to check why (or if) there is a pending rebase or deliver in progress.
It would be best if that "rebase or deliver" was fully completed before your script runs.
The OP jingxw adds in the comments:
The progress is pending because of last progress is fail due to a timeout or manually quit. So the lock is expected.
来源:https://stackoverflow.com/questions/19974009/clearcase-view-is-locked-by-another-process-how-could-i-break-the-lock-from-ccr