Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Actually, Perforce I don't want you tracking that file after all ..." how do I get Perforce to listen?

Tags:

perforce

p4v

Sometimes I "Mark for Add" and add files to Perforce which I actually didn't want Perforce to worry about.

Is there a way to revert it so it just goes back to showing in P4V as an "untracked" item?

See my example:

I've added mil.ico and mil3.ico by mistake. I just want them to go back to looking like test.ico, ie. ignored by Perforce:

alt text

Even if I save a copy of the files, then delete, then put them back (all of which is a serious bore), P4V still knows they have a history and marks them as shown:

alt text

I just want Perforce to leave a file alone when I tell it to.

like image 586
hawbsl Avatar asked Oct 20 '10 18:10

hawbsl


2 Answers

If you want to remove the last traces of the files from perforce, your only chance is through p4 obliterate. This will irreversibly remove file revisions or even file's complete history from perforce and will only work with administrator privileges. I don't know if obliterate is available through p4v, on the command line you would issue:

cd directory_of_accident
p4 obliterate accidentally_submitted_file

and if it looks like you and perforce agree on the file to forget

p4 obliterate -y accidentally_submitted_file

to seal the issue.

like image 114
Peter G. Avatar answered Sep 20 '22 01:09

Peter G.


You can delete the items from the Perforce depot. Keep in mind Perforce will want to delete your local copy of that file so you should save it off in a different location, delete the file in Perforce and move the local version back.

like image 34
fbrereto Avatar answered Sep 20 '22 01:09

fbrereto