11.07.2015 Views

Perforce 2007.2 System Administrator's Guide

Perforce 2007.2 System Administrator's Guide

Perforce 2007.2 System Administrator's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 3: Administering <strong>Perforce</strong>: Superuser Tasksaffect any files in the workspace actually used by the workspace’s owner; the files can stillbe accessed by other employees.Reclaiming disk space by obliterating filesWarning!Use p4 obliterate with caution. This is the only command in <strong>Perforce</strong>that actually removes file data.The depot is always growing, which is not always desirable: a user might have createdhundreds of unneeded files by means of an inadvertent branch or submit, or perhapsthere are directories of old files that are no longer in use. Because p4 delete merelymarks files as deleted in their head revisions, it cannot be used to free up disk space on theserver. This is where p4 obliterate can be useful.<strong>Perforce</strong> administrators can use p4 obliterate filename to remove all traces of a filefrom a depot, making the file indistinguishable from one that never existed in the firstplace.NoteThe purpose of a software configuration management system is to enableyour site to maintain a history of what operations were performed onwhich files. The p4 obliterate command defeats this purpose; as such, itis intended only to be used to remove files that never belonged in the depotin the first place, and not as part of a normal software development process.Note also that p4 obliterate is computationally expensive; obliteratingfiles requires that the entire body of metadata be scanned per file argument.Avoid using p4 obliterate during peak usage periods.By default, p4 obliterate filename does nothing; it merely reports on what it woulddo. To actually destroy the files, use p4 obliterate -y filename.To destroy only one revision of a file, specify only the desired revision number on thecommand line. For instance, to destroy revision 5 of a file, use:p4 obliterate -y file#5Revision ranges are also acceptable. To destroy revisions 5 through 7 of a file, use:p4 obliterate -y file#5,7Warning!If you intend to obliterate a revision range, be certain you’ve specified itproperly. If you fail to specify a revision range, all revisions of the file areobliterated.The safest way to use p4 obliterate is to use it without the -y flag untilyou are certain the files and revisions are correctly specified.46 <strong>Perforce</strong> <strong>2007.2</strong> <strong>System</strong> Administrator’s <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!