Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "tampered with before resolve" mean on file resolve?

Tags:

perforce

I'm trying to merge main stream to development stream and some files need to be resolved. On resolve I have an error:

filepath tampered with before resolve - edit or revert.

I tried to solve it as described here, but without success. This is what verify command shows me:

for the target
filepath - branch change 9070 (text) A3269695246A89D21F341D8A5BB70B5B

for the source
filepath - edit change 22793 (text) 171BA2F3E0FFCEF3F7A34FDB7A2CEF69
filepath - add change 9049 (text) A3269695246A89D21F341D8A5BB70B5B

What do branch change, edit change, add change mean? Why is the MD5 identical but I still have an error? How to solve?

like image 585
nikitablack Avatar asked Oct 21 '15 07:10

nikitablack


2 Answers

I also have faced this issue while executing p4 resolve -am for some file. the solution is to do p4 edit <filename> and then execute p4 resolve -am for that file.

like image 179
Sandeep Varshney Avatar answered Oct 20 '22 22:10

Sandeep Varshney


Perforce's client-server architecture is confusing you a bit here: the 'verify' command is reporting on the state of the files on the server, but the 'tampered with before resolve' message from 'p4 resolve' is alerting you to a problem with the state of the files on your client.

It appears, from the little bit of information that you provided, that:

  1. Change 9049 added the source file, with digest A3269...
  2. Change 9070 branched that source file to the target. Of course, the digest is the same for source and target, since the branch was a perfect copy of the file.
  3. Change 22793 modified the source file, and hence its digest changed
  4. You are then trying to integrate change 22793 from the source to the target.

This integration would be a straightforward "safe resolve" in most cases, because the file was changed only in the source, and the target was a perfect copy of the previous revision of the source.

However, the resolve command looked on your actual workstation copy of the target file, and discovered that the file that you have there is not a file with digest A3269...

Since the 'resolve' command was just about to replace your copy of the target file on your workstation with the merged result, it doesn't want to do that if there is a possibility that you made changes to that file (without opening the file for edit) that you don't want to lose.

So 'resolve' is trying to tell you to have a look at the copy of the target file that is currently on your workstation (using your text editor, e.g.), and see if you actually made changes to that file.

If you did, and you want to save those changes, then you can't perform this integration at this time; you need to instead open the file for edit (using 'edit -k' to retain your modified copy of the file, of course) so that Perforce can merge your edited copy with the changes from change 22793.

If you didn't make changes to the target file, or if you made changes but you don't want them, then you need to discard those changes explicitly, for example by:

  1. reverting the pending integration to the target file
  2. Running 'p4 sync -f target-file'

This is the sort of information that 'resolve' is trying to communicate in that very terse

filepath tampered with before resolve - edit or revert.
like image 45
Bryan Pendleton Avatar answered Oct 20 '22 21:10

Bryan Pendleton