Ian Ringrose
Ian Ringrose

Reputation: 51927

How do I tell perforce retrospectively about a folder rename?

We have a folder that was copied outside of perforce then checked in with the old folder deleted. Therefore perforce does not know what the common base is for an integration from another branch.

Is there some way to tell perforce retrospectively the relationship between the two folders?

Upvotes: 2

Views: 369

Answers (2)

randy-wandisco
randy-wandisco

Reputation: 3659

The simplest method is simply running:

p4 integ -i <original folder>@<pre-delete revision> <dest folder>
p4 resolve -ay

The first line forces an integration between two paths that share no common ancestor. The second line resolves the merge without any actual content merging. So basically you're drawing the integration arrow retroactively.

The only hiccup is that you drew the merge arrow pointing to the latest revision of the copy, rather than its starting point. That might make future merges a bit more complex, but the integration engine should handle it well enough.

Were you actually just trying to rename the folder? The p4 move command does write some metadata that lets the merge engine follow renames. There's not much you can do in this case in addition to what I've already described, unless you want to recover the deleted folder, move it to yet another name, and then replay any changes you made to the copied files. Probably not worth the hassle though.

Upvotes: 5

PhiLho
PhiLho

Reputation: 41162

From memory (I am far from office and therefore from Perforce...), I think an integration might do the trick.

Upvotes: 0

Related Questions