Reputation: 34113
I am using perforce and I'm merging a parent stream down into a child stream. The child stream contains files that the parent stream does not (and should not yet). When I merge, it's telling me to delete those files in the child (presumably because they don't exist in the parent).
How can I tell it to stop doing this? In past merges I've just been reverting the deletes but now it's becoming a problem because I'm trying to copy back up from child into parent it's giving me a warning stating that there are outstanding changes in the target.
Upvotes: 0
Views: 858
Reputation: 701
This is one of several fundamental flaws in the core Helix/Perforce source control data model, and has caused significant data loss on many occasions.
It appears that you must merge or copy down all "delete file" records before it is safe to add any files of the same name. This means all streams must have the delete (or rename) change merged/copied into them before any stream can safely add (or rename) a file of the old name.
P4V version 2021.3 claims to add some protection, however it's limited and will not cover the OP's situation.
Furthermore, if your Helix server is on Windows then this is case-insensitive (even though filename case is preserved)
Upvotes: 0
Reputation: 71454
I am using perforce and I'm merging a parent stream down into a child stream. The child stream contains files that the parent stream does not (and should not yet). When I merge, it's telling me to delete those files in the child (presumably because they don't exist in the parent).
Files can't be merged from nonexistent sources. Enable the "show deleted files" option and I suspect you'll see that the files exist(ed) in the parent and have been deleted. (Maybe they were mistakenly added and subsequently delete
d instead of being obliterate
d or exclude
d from the stream?) The merge operation wants to propagate that deletion into the child.
How can I tell it to stop doing this?
If you want to leave the target unchanged during a resolve instead of accepting the change(s) from the source, select the "leave target unchanged" option. (This corresponds to the "accept yours" option at the command line.) That will mark the source (in this case a deleted revision) as having been "ignored" and after you submit
the ignore revision (i.e. an integrate
revision with an ignored
resolve action) it won't ever come up for merge again until a new revision is submitted to the source. If you just revert the file, nothing is recorded and so the source revision will remain outstanding for next time.
If these files just flatly should not exist in the parent stream, the stream spec(s) should be updated to reflect that -- exclude
them from the parent stream, or isolate
them in the child stream.
Upvotes: 1