[p4] How to resolve conflicts between same filename added by two different clients?

tmcsweeney <[email protected]>
Newsgroups gmane.comp.version-control.perforce
Message-ID <[email protected]>
Posted on behalf of forum user 'tmcsweeney'.

Because of our workflow, (Unity3D generating files (lightmaps and so forth) with
predictable names and checking them in to Perforce) we quite often get the case
where two users can have the same file marked for Add.

The first user to submit is fine, they win the race, but the other user is left
in a pickle, as they can't submit the add unless they revert their changes,
sync, and then re-generate the file (which can take a long time if it is a
lightmap bake)

I'd like to give my users the option to upgrade the add to an edit that is
marked as needing a resolve and then they have the normal choice to either
accept their target or overwrite it with the source from the first user.

However I can't work out the correct sequence of operations to upgrade the
add without overwriting their copy of the file.

The closest I've got:
p4 revert -k SomeFile.txt // Undo the add but leave the file in place p4 sync -k
Somefile.txt //Sync to head, but leave the local file untouched p4 edit -k
SomeFile.txt //reopen for edit   
at this point the file is opened for edit, but has the second users local
changes preserved, but it is not marked as needing a resolve.  I could
go with this if I was happy for the file to always be overwritten by the second
user, but just because they were the last to submit does not mean that they were
the last to bake light-maps.

I tried  p4 sync -k SomeFile.txt#0   hoping that it would then let me schedule a
resolve but I get  SomeFile.txt is opened for edit and can't be deleted 
which doesn't make sense as the -k flag is supposed to be preserving the
local file, not deleting it.



--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/5453-how-to-resolve-conflicts-between-same-filename-added-by-two-different-clients
_______________________________________________
perforce-user mailing list  -  [email protected]
http://maillist.perforce.com/mailman/listinfo/perforce-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.