delete state-content example
delete state-content example.
Examples
D:\HC2>lscm delete state-content /EclipsePlugin/build.properties 7237
Successfully deleted content of the item state(s).
Successfully deleted content of the item state(s).
Deleting content that is shared by multiple file items or file states:
When you delete the content of a particular state of a file, the command returns an error that the content is referenced and, hence, shared by other files or by other states of the same file. When multiple file items or multiple file states of the same file item have the same content, only one copy of the content is stored in the repository and shared between the files.
For example, there is a file that is called file1.txt. If you copy file1.txt into the same folder and rename it as file1_same.txt or copy the file to another folder, all these file states reference the same content in the repository.
$ scm delete state-content file1.txt <file-state>
The state “<file-state>” content is referenced by 3 items:
/sandbox/folder1/file1.txt
/sandbox/folder1/file1_same.txt
/sandbox/folder_other/file1.txt
Rerun with --force option to delete the content. Deleting this content also removes the content from all files that reference it.
Problem running 'delete state-content': Failed to delete content.
The content is claimed by multiple items.
The state “<file-state>” content is referenced by 3 items:
/sandbox/folder1/file1.txt
/sandbox/folder1/file1_same.txt
/sandbox/folder_other/file1.txt
Rerun with --force option to delete the content. Deleting this content also removes the content from all files that reference it.
Problem running 'delete state-content': Failed to delete content.
The content is claimed by multiple items.
$ scm delete state-content file1.txt <file-state> --force
Successfully deleted content of the item state(s).
Successfully deleted content of the item state(s).