views:

704

answers:

3

I have a couple of .refresh files that have somehow found their way into my perforce default pending changelist and from there somehow started showing as being in conflict with their depot counterparts.

They are un diffable, unresolvable, I have excluded the files from being compared using the instructions on the perforce website and yet these jobs still appear on the pending changelist.

There are a few other pointless things in there like .sln files and the like which really get in the way of all the proper files which we're actually trying to source control. It's quite annoying to have to let everyone know they should be ignored whenever we're trying to release something or merge branches.

So how the hell do you get rid of these completely bogus changelist items? I've even tried deleting the files to which they refer (as they weren't entirely necessary) but still the job does not offer a resolution.

+1  A: 

After deleting the .refresh files, revert them in your pending changelist. (Perforce needs to be told explicitly about everything you do on the filesystem.) If these files erroneously found their way into your repository, you should consider deleting them. If you don't want to delete them in the repository but want to be able to create your own versions without conflicts, you can sync to #none and Perforce will ignore them.

The discussion on the question "Can you "ignore" a file in Perforce?" proposes a number of solutions to the bigger problem of convincing Perforce to ignore files, including:

  • Add a negative client spec mapping to exclude generated files from Perforce's consideration
  • Add server-side commit triggers that will reject changelists with files that should not be versioned
Commodore Jaeger
Although your answer works admirably for my excess .sln files which were not in conflict, with .refresh files in conflict it's not happening. Handy to know though.
+1  A: 

The answer really depends what end state you want.

A) No copy in perforce, local copy on disk:

  1. Move local copy out of the way
  2. Revert changes with p4 or in P4V
  3. Delete files in perforce, or even better obliterate them
  4. Move local copies back in place
  5. Make sure you don't p4 add the files in future. e.g. With a trigger against submit.

NB: If you delete then other workspaces (e.g. other developers) may lose the files.

B) Default copy in perforce, with local writable copy on disk:

  1. Move local copy out of the way
  2. Revert changes with p4 or in P4V
  3. p4 edit files, change filetype +w
  4. Submit files.
  5. Move backed up copy over writable files.
Douglas Leeder
A: 

Well, it seems that no one has an answer and I don't want wrong answers to be auto-accepted so I'll accept this one.

Shame.