Perforce Error "Error translating file contents"

I am trying to add a fairly large number of files to the Perforce repository. When sending, I get the following error, which, I think, means that she had problems creating a file type for one of the files:

  • Locking 16380 files ...
  • Error translating file contents near line 1
  • Submit aborted - fix problems, then use 'p4 submit -c 5851'.
  • Some files cannot be transferred to the client.

How can I get more information about this, in particular, what file does it really encounter? The error is not entirely useful when it comes to fixing the problem.

+6
version-control perforce
source share
3 answers

As a rule, I found the answer 5 minutes after publication. It turns out that the log file from p4v shows more information than the log window. Turn on file logging and the log file will show you where the problem is.

+7
source share

I had this problem. And yes, this is due to a file type problem. But if you have hundreds of thousands of files, finding nasty files is not easy. "p4 open -c pendingchangelist #" lists the files (along with their file types) that are open in the pending list of changes. Execute the output to a text file. On some servers, for example, utf16 is not supported. find "utf16" and retype them into binary (again, for example). You can move the damaged files from the pending change list to another pending change list and re-print the files in one shot using "p4 reopen". Now you can resubmit the original pending list of changes, and then send a new pending list of changes with the corrected file types.

+1
source share

My situation was a little different from Amir, but the solution worked. Unfortunately, I did not know what keyword to look for in the file that opens, so I looked at the output of "p4 submit" on the console and found that the c file was opened as "unicode". After reopening the file as β€œtext," I successfully sent my change list.

Next time I will try to indicate the file type specified in the p4 manual in front of the eye core, here is the list: Basic file types

+1
source share

All Articles