[p4] Can integrations work when files are renamed?
Chuck Karish
chuck.karish at gmail.com
Sat Jun 17 09:10:53 PDT 2006
Write a branch spec that maps from the old locations on the branch
to the new locations on the branch:
Branch: proj_refactor
View:
//depot/proj/file.c -> //depot/proj/newlocation/file.c
Then integrate the file moves from main to the branch:
p4 integ -b proj_branch
p4 resolve
p4 submit
Then integrate your changes from the old location to the new location:
p4 integ -b proj_refactor @<change_before_file_moves_integ>
On 6/16/06, Sam Roberts <sroberts at bycast.com> wrote:
> On Fri, Jun 16, 2006 at 03:09:56PM -0600, Colfer, Brian wrote:
> > Maybe I have a fundamental misunderstanding but ...
> > If I integrate
> > .../main/file.c -> .../project/file.c
> > Then integrate
> > .../main/file.c -> .../main/src/file.c
> > Then integrate
> > .../main/src/file.c -> .../project/file.c
> >
> > That will work, either I'll need to try it out or maybe I don't
> > understand what your requirements are. If you want the file movement to
> > be included in the integration well ... that's a completely different
> > type of question...
>
> Of course I need the file move integrated. It doesn't do me any good to
> have a bunch of the files in my project moved to new locations, and just
> the ones I've changed stay in the old locations.
>
> .../main/file.c -> .../project/file.c#1
> .../main/Makefile -> .../project/Makefile#1
>
> Add code to project -> ../project/file.c#2
>
> Somebody else rearrangizes main:
>
> ../main/file.c -> ../main/src/file.c#1
> ../main/Makefile -> ../main/src/Makefile#1
> new files: ../main/src/newstuff.c#1
>
> So, what is my goal? I want to integrate to the "soft" codeline, to make
> sure my project is up-to-date and working with the latest mainline
> before merging my project back to the mainline. I think this
> is good practice, and Practial Perforce suggests it is as well.
>
> I do:
>
> p4 integrate ../main/... to ../project/..., and the result is:
>
> ../project/src/file.c
> ../project/src/Makefile
> ../project/src/newstuff.c
>
> --> All these files will be exact copies of the ones on the mainline.
> Put another way, every single change I made on my project line has been
> lost, its like I never even did any work there. All gone.
>
> Btw, my actual case consists of dozens of trees that have moved around
> in a deep tree on the mainline.
>
> > Then integrate
> > .../main/src/file.c -> .../project/file.c
>
> If I did that, the end result would be:
>
> ../project/file.c
> ../project/src/Makefile
> ../project/src/newstuff.c
>
> Thats not going to build.
>
> Cheers,
> Sam
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
--
Chuck Karish karish at well.com (415) 317-0182
More information about the perforce-user
mailing list