This technote explains why the errors checked out but removed or disputed checkout can occur when IBM® Rational® ClearCase® hard links to those files exist from another directory.
The following example explains one way how both errors checkedout but removed and disputed checkout can occur. There are other variants that can cause these errors to occur, but the cause in principle will be the same.
- The file foo.c exists in src directory and a directory named lnk is a parallel directory to src.
- While set in the lnk directory, a hard link to foo.c is created:
cleartool ln ..\src\foo.c foo.c
- The element lnk\foo.c is checked out:
cleartool co -nc foo.c
Note: During checkout, the element foo.c is replaced by a view private file named foo.c.
- A cleartool ls ..\src shows foo.c as checkedout but removed.
Note: Because lnk\foo.c is hard linked to the src\foo.c, ClearCase considers src\foo.c to be checked out, but it does not find a view private file named foo.c in the src directory. This causes ClearCase to think foo.c has been checked out, but the view private file has been removed (deleted). You can see this by running dir ..\src.
- Uncheckout lnk\foo.c
cleartool unco lnk\foo.c
Note: The VOB marks foo.c as checked in. The view private file named foo.c is removed and the element foo.c is copied back into the view as lnk\foo.c.
- Now cleartool ls ..\src shows foo.c as disputed checkout, checkedout but removed.
Note: Now, the view already has cached information that src\foo.c has been checked out. However, when you run cleartool ls ..\src, the view looks at the VOB and realizes that the file is in fact checked in. There seems to be a discrepancy between what the view thinks and what the VOB thinks. Hence the error message disputed checkout.
Review technote 1126974 on how this problem affect the ClearCase Web interface.
Resolving The Problem
Refresh the config spec using the command:
cleartool setcs -current
This will refresh the view cache with information from the VOB.
16 June 2018