Search code examples
perforceperforce-streamperforce-helix-core

Perforce has a phantom file due to a failed "p4 duplicate" command. I cannot submit this file anymore


I was duplicating a depot into its new home, that had a slightly different structure.

I duplicated the folder by doing:
p4 duplicate //OldDepot/OldStream/Folder/Folder/... //NewDepot/ProjectStream/...

This worked fine, but I had a .p4ignore file that was outside the original folder, and I wanted to duplicate it inside the new folder

I did something like:
p4 duplicate //OldDepot/OldStream/Folder/.p4ignore //NewDepot/ProjectStream

The messaged suggested that this was a success. However, after refreshing the depot in p4admin, the file was not visible. I thought nothing of it, and just assumed it failed completely and went on with my life.

I started to add the file manually
p4 add //NewDepot/ProjectStream/.p4ignore -c 50 -d "Adding P4Ignore"

which was a success, but when I went to submit, there was an error:

p4 submit -c 50
Cannot add file '//NewDepot/ProjectStream/.p4ignore', filename collides with an existing file //NewDepot/ProjectStream

Neither the depot view in P4V, nor the depot view in P4Admin show any such file.

I have tried:

  • Submitting with P4V and the command line

  • Deleting the local file of .p4ignore and trying again

  • Obliterating the stream

  • Deleting, and recreating the stream (with the option selected to delete stream history)

It feels like perhaps there is a database error with the file/folder in question, but I don't know enough about how to go about fixing it.


Solution

  • I fixed this issue. While I ran obliterate on the stream in P4Admin, the stream folder was not deleted. After running obliterate specifically on the folder through the command line, the issue was resolved. I don't believe I could obliterate the folder in P4Admin, only the files within