[p4] Prevent a sync from deleting files...

Greg Whitfield greg at familywhitfield.co.uk
Thu Jun 8 14:35:08 PDT 2006


Do you really need the overlay mapping? What are you trying to achieve with
that?

The behaviour you see is exactly what I would expect given what the "+"
modifier does. Do you really have a lot of files where the name in Tree B
should take precedence over that in Tree A? Can you get away with simply:
//Depot/Tree A/...   //clientspace/Tree A/...
//Depot/Tree B/Foo/... //clientspace/Tree A/Foo/...

One of my teams once reported similar issues and it came down to them trying
to use the overlay operator for something to which it was not really suited.
A slight restructuring of the code folders fixed the problem, and made for
generally better source code layout.

As a general rule, if you are having to use forced syncs, then you are
fighting against the system rather than with it. It's worth taking a step
back to address why that is first.

Greg
~~~~ 

-----Original Message-----
From: Chris Weiss [mailto:chris.weiss at gmail.com] 
Sent: 08 June 2006 17:15
To: Perforce Users
Subject: [p4] Prevent a sync from deleting files...

So this has happened to us a couple of times:

We have a mapping that looks like:
//Depot/Tree A/...   //clientspace/Tree A/...
+//Depot/Tree B/Foo/... //clientspace/Tree A/Foo/...

Now, our problem is that we've got a file: //Depot/Tree A/Foo/File1.txt and
we also have the file //Depot/Tree B/Foo/File1.txt. We do the following:
Sync, delete //Depot/Tree B/File1.txt, then sync again. P4 first syncs
File1.txt from Tree A, then see's that it was deleted and syncs the delete
action from //Depot/Tree B/Foo/File1.txt and deletes the file from the disk.

Is there any way to prevent this from happening other than doing a Sync -f
that will allow us to update //Depot/Tree A/Foo/File1.txt, but not then
delete it when syncing to Tree B? There's a large number of files involved
and the specific files in question change, so we can't do specific
exclusions in the workspace spec.

We'd be happy if we could just find a way to prevent p4 sync from deleting
files on a particular sync.

--
-Chris
_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user






More information about the perforce-user mailing list