3 messages in com.perforce.perforce-user[p4] renaming/moving files in the sam...
FromSent OnAttachments
Jerjiss, Allen22 Nov 1999 11:08 
David Jeske22 Nov 1999 13:33 
Michael Cook23 Nov 1999 07:23 
Subject:[p4] renaming/moving files in the same branch
From:Michael Cook (co@sightpath.com)
Date:11/23/1999 07:23:05 AM
List:com.perforce.perforce-user

"Jerjiss, Allen" <Allen_Jerjiss at intuit.com> writes:

First of all, why did perforce make renaming/moving so complicated,

I wouldn't be surprised if a future version of p4 were to have a `p4 rename' command. But the `p4 integrate' approach is actually a more general mechanism for this kind of operation. For example, to breakup a file into multiple smaller files, you might do this:

p4 integrate foo.cpp foo1.cpp p4 integrate foo.cpp foo2.cpp p4 integrate foo.cpp foo3.cpp p4 delete foo.cpp

Then edit the files so that each fooX.cpp contains only one third of the original foo.cpp.

I think it's unlikely that there will ever be a `p4 breakup' command.

but on to the real question: When I try this I loose revision history. Does anybody know how to achieve this without loosing history?

There's a tech note on the Perforce web site, "How do you rename a file?" <http://www.perforce.com/perforce/technotes/note007.html>. It says

To see the complete change history of bar, including changes that affected it when it was named foo, use:

p4 changes -i bar

So, the history is not loost, you just need to know how to extract it.

There is `p4 help rename', but it doesn't mention this `p4 changes -i' thing. It probably should.

M.