dubnde
dubnde

Reputation: 4441

In perforce, how do I remove pending changes for NEW/ADDED files not submitted?

I am trying to remove a pending changelist in perforce. All the files (20 old) are new but have not be committed/submitted yet. So in p4Win, they show a RED + cross. I am failing to remove these files from the change list. How do I go about getting rid of these files?

Thanks for the answers to right-click and revert. I have tried that but it fails with the example error strings below.

Operation: user-revert
Librarian digest source/.../foo.c failed.
RCS checkout 1.715484 failed!
RCS no such revision 1.715484!
//source/.../foo.c#1 - was add, reverted

I've also tried the p4 revert command but it fails with same error(s).

Upvotes: 7

Views: 22141

Answers (7)

TomEberhard
TomEberhard

Reputation: 1091

I had the same problem, I had added the .exe files but wanted to exclude them afterwards. The perforce documentation helped:

http://www.perforce.com/perforce/doc.current/manuals/p4eclipse/topics/adding.html

Excluding Files from Source Control

Important: you cannot exclude files after you have placed them under Perforce control. If you have files opened in a changelist and you want to exclude them from Perforce control, revert them from the changelist before excluding them.

Worked like a charm.

Upvotes: 0

Michael Adamission
Michael Adamission

Reputation: 493

In my case this happened because the RCS files (the actual files with ,v extension in the depot that contain all the revision information) were literally missing the information for the revision in question. I was able to restore the files from backup.

Upvotes: 0

Gene Bo
Gene Bo

Reputation: 12073

To remove all added files in current and sub directories:

p4 revert ...

Upvotes: 0

dubnde
dubnde

Reputation: 4441

Fixed with "revert -k" by perforce support group. They suspect it may be due to overlay values in the client workspace but have not been very specific.

Upvotes: 10

Toby Allen
Toby Allen

Reputation: 11213

Maybe try Perforce support at this stage.

Upvotes: 0

ChrisF
ChrisF

Reputation: 137148

How are you trying to remove the files?

It's been a while since I used Perforce in anger but I seem to remember that you just had to right click and revert the file.

I've just tried this and it worked OK for me (the programmer's lament!). It uses the following p4 command:

p4 revert //depot/test.txt

Where test.txt is the name of the test file.

Update

Does the new file still exist locally on your hard drive?

Does the path where the file would be in the depot still exist? ie. what's in the "..." of your path.

Upvotes: 7

stefanB
stefanB

Reputation: 79810

Revert files, right-click on file in change list and select revert, this will remove added files.

Upvotes: 1

Related Questions