Jump to content


I renamed a file in Unreal, now I have TWO files in Perforce!


  • Please log in to reply
4 replies to this topic

#1 roberteker

roberteker

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 18 December 2018 - 02:33 PM

  • Check out file A

  • Rename file A to B

  • Submit file B
Result:

Server now contains file A and file B.

Expected result:

Server should only contain file B.




What a mess! :wacko:


Is there a command that compares my workspace files to the ones on the depot and removes any files on the depot not found in my workspace?

#2 Lennart Kjellén

Lennart Kjellén

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts
  • LocationSweden

Posted 18 December 2018 - 03:16 PM

How do you rename A to B? If you rename the file in the workspace and then add B to Perforce by "p4 add" (Mark for Add) you have added B as a new file besides A. If you use "p4 move" or "p4 rename" (Rename/Move) you will have the file renamed in Perforce.

The command to compare files in your workspace to what is in the depot is "p4 reconcile" (Reconcile Offline Work...)

#3 roberteker

roberteker

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 18 December 2018 - 03:51 PM

As I said, I renamed it in Unreal, and then submitted.

The resulting behavior is bad.

Worse, when I used "get latest version" on a different machine, I received this pop up:

Capture.JPG

That's filename A, the old name.

This is a really horrible user experience. :(

#4 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 684 posts

Posted 18 December 2018 - 06:23 PM

Yeah, that's pretty bad.  The tool should be just doing "p4 reconcile" + "p4 submit" if it can't keep track of renames on its own, since "p4 reconcile" will detect renamed files automatically.  Unfortunately if the Unreal plugin or P4V or whatever already said it wanted to 'add' the 'new' file then it's too late to fix it the easy way; you can't rename into a file that's already been created by some other means.

Maybe "delete" the erroneously added file, submit, redo the rename, and then do "reconcile" on your own?

On the other machine that's having trouble syncing, I'd try "p4 clean" since that'll scan your local files and get rid of any that aren't supposed to be there (it sounds like that's what's blocking your sync).

(I'd like to make a plug here for anyone still developing editor plugins for Perforce and struggling to get add/edit/delete/move workflows to work -- just use "reconcile".  Let the server do the work!)

#5 roberteker

roberteker

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 20 December 2018 - 11:28 AM

Ok, so apparently this is the fault of Unreal and not Perforce, because I found several people on Unreal forums experiencing the same thing.

Thank you both for the additional tips!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users