1 message in com.perforce.perforce-user[p4] Re: Recurring file/dir renaming
FromSent OnAttachments
ste...@vance.com12 May 2004 04:58 
Subject:[p4] Re: Recurring file/dir renaming
From:ste...@vance.com (ste@vance.com)
Date:05/12/2004 04:58:00 AM
List:com.perforce.perforce-user

Simple. As you rename, update the branch spec to map the old name on the release branch to the new name on the reorg branch.

Steve

Marion, Patrick writes:

Hello,

Our project team has decided to rename directories and files throughout a branch AND to release from that same branch in few weeks!

So I have created a subbranch where renaming is performed while the release can progress in the parent branch. Now, the parent branch is a moving target and I have to periodically resync the renaming subbranch with its parents until we have completed the operation.

Of course, files that were renamed before in the child branch, are coming down from the parent integration with their old filename and directory path. Here is the process that I was hoping would work and doesn't.

+ merge from the parent with: p4 integ -b renaming_branch ...@<some_snapshot_of_the_parent>

this brings in files to my client, including files with old names. I had hoped that perforce would remember the fact that the files had been renamed and would follow the renaming path, but it might was a bit simplistic from my part. It doesn't happen that way.

+ find the files with the old name, and try to rename them again to the new name with:

p4 integ -d -t -f //depot/renaming_branch/oldpath/oldname //depot/renaming_branch/newpath/newname

this complains that the oldpath/oldname doesn't exist in the depot which is quite correct. Using a local path (as in "C:/.../oldpath/oldname") gives me the same error, though the oldpath/oldname file does exist on my disk.

What is the correct way to address this problem? I'd rather have a command line solution since I will have to repeat this operation until the parent branch releases, when I will be able merge the renaming branch back up. So, I'd like to script the solution.

Any suggestion is greatly appreciated.

Thanks

==================== Stephen Vance http://www.vance.com