In perforce, how do I remove pending changes for NEW/ADDED files not submitted?
Solution 1
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.
Solution 2
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.
Solution 3
Revert files, right-click on file in change list and select revert, this will remove added files.
Related videos on Youtube
dubnde
Software engineer with experience in embedded SW, telecoms specialising in mobile consumer devices and network infrastructure. Software and Hardware integration, build management and quality processes. C/C++/Java/XML
Updated on June 04, 2022Comments
-
dubnde almost 2 years
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).
-
ChrisF almost 15 yearsThe final comment would seem to indicate that the revert worked, but I assume that the file is still on the changelist.
-
-
dubnde almost 15 yearsYes. The new file stil exists locally on the hard drive
-
ChrisF almost 15 yearsI'm running out of ideas :(. Does the depot location still exist?
-
ChrisF almost 15 yearsI was thinking of the path where it would exist - but Perforce should be able to cope with that not existing, so my question is meaningless - sorry. Is the number the same every time? I don't understand where that's come from.
-
dubnde almost 15 yearsYou mean the number "1.715484", right? Yes it is the same even for different files
-
ChrisF almost 15 yearsI'd take this up with Perforce support. When we used it in the past their support was very good. I'm still using an old version so anything else I suggest may well be out of date.
-
undeniablyrob about 8 yearsWorked like a charm for me. From "p4 help revert": "The -k flag marks the file as reverted in server metadata without altering files in the client workspace."