tags:

views:

37

answers:

3

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.

A: 

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.

fbrereto
thanks, but all that deleting and renaming is such a chore, isn't it? and even then, when i move the local version back, P4V still wants to mark these files as special. see edit.
hawbsl
+3  A: 

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.

Peter G.
thanks, i guess there's no simpler way in p4v? anyway it works, that's the main thing.
hawbsl
In p4v, there is an explicit Admin Interface (Tools -> Administration or Ctrl-Shift-A). If you log in as an admin in that interface and navigate to the Depot tab, then you have an "Obliterate" option in the context menu.
jhwist
A: 

Are you looking at your file structure through the Depot tab or the Workspace tab? It looks like it may be your Depot tab.

Try going to your Workspace tab then click on the Filter icon (looks more like a funnel) and ensure that "Show Files Not in Depot" is selected.

Hopefully looking through the Workspace tab, as opposed to Depot, will hide the deleted files, and selecting the appropriate filters will show your non-Perforce files.

Chance