[p4] Can integrations work when files are renamed?

Sam Roberts sroberts at bycast.com
Fri Jun 16 15:51:22 PDT 2006


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


More information about the perforce-user mailing list