Perforce stream copy wants to delete files - perforce

I just finished merging down some changes from a parent stream into a child stream. Somehow the merge missed a bunch of new files in the parent that needed to be created in the child stream (and I didn't notice). So now the files exist in the parent but not in the child.
Now that I'm copying back up into the parent, it wants to delete all those missing files. I can't re-merge from parent to child because perforce says there are no outstanding changes to merge. How can I fix this?
Update
Here are the settings for force integration in p4v:

It sounds like when you did the merge, you opted to "ignore" (aka "accept yours" or "accept target" depending which UI you're using) the new files. This is essentially the same as if you ignore a changed a file during a merge; the child will retain the original (unmodified) version of the file, and when you copy back to the parent, the child's version will overwrite the parent's version, eliminating the changes that you ignored.
If the ignore was a mistake, you can use p4 integrate -f to force another merge/resolve. Alternatively, if you already know that you just want the child to have an exact copy of what's in the parent (i.e. you aren't trying to merge individual changes), you can use p4 copy -F to copy in the "wrong" direction (from parent to child) so that the child will get the same version of the file that the parent currently has.

Related

How to exclude folder from stream temporarily then include it later on

I want to download a stream to a workspace and exclude certain folder(because it's too large)
then when I am done downloading I want to download it to my workspace
so
1- how to exclude a folder from stream
2- how to include the same folder without messing anything
If you only want to exclude it from your initial sync operation, you don't necessarily need to modify the stream at all. (Modifying the stream may potentially impact other workspaces using the same stream, which you don't want.)
Edit your client to point at the new stream (in this instance you don't want to use p4 switch since that auto-syncs the new stream), and then sync only the folders that you need (i.e. enumerate all the top-level folders except for the big folder in your sync command).
The next time you do an unrestricted sync, it will pick up everything that hasn't been downloaded, including the big folder that you avoided the first time around.

Perforce to ignore revision during integrations

I have created feature branch for one of our projects, and deleted all documentation files there in one changelist. (I know, bad idea).
I want to integrate back everything except given changelist, I tried following to ignore it:
p4 integrate //branch/...#CL,CL //main/...
p4 resolve -at //main/...
However, the files still remain marked for deletion - the resolve ends with
//main/... - no file(s) to resolver.
Is there any way how to tell perforce that given CL is already integrated and ignore it in subsequent integrations?
Note that you need at least a 2011.1 server to do this (if your server is older you'll get an error message on the integrate):
p4 integrate -Rd //branch/...#CL,CL //main/...
p4 resolve -ay
The "-Rd" flag says that files which would normally be opened for delete automatically should be opened for integrate and scheduled for resolve instead. In turn, the "p4 resolve -ay" will say that you want to keep what's in your workspace (an "integrate" with no content change) and submit that as the final result.
The submitted "integrate" revisions will record that you have done this integration (the history will show an "ignore" of the deleted revisions in your branch), but without actually changing the contents of the submitted files.
If you use the "p4 merge" command instead of the "p4 integrate" command (with a more current server version, I think 2013.1 or thereabouts), all files are scheduled for resolve automatically (i.e. including those that would previously have been automatically opened for branch or delete), so with "p4 merge" you always must resolve (and may optionally ignore) any source change.
Relevant p4 blog entries:
http://www.perforce.com/blog/110620/ignoring-branches-deletes
http://www.perforce.com/blog/130812/resolve-face-adversity
It seems like you wanted 'resolve -ay' here, not 'resolve -at'. When integrating back to main, I think that "theirs" is the branch, while "yours" is main.
From 'p4 help resolve':
The resolve process is a classic three-way merge. The participating
files are referred to as follows:
'yours' The target file open in the client workspace
'theirs' The source file in the depot
'base' The common ancestor; the highest revision of the
source file already accounted for in the target.
'merged' The merged result.
Filenames, filetypes, and text file content can be resolved by
accepting 'yours', 'theirs', or 'merged'. Branching, deletion, and
binary file content can be resolved by accepting either 'yours' or
'theirs'.

after a merge down between a parent and child stream,if I rollback a specific folder, I cant see the mergedown option anymore between the two streams

In my local stream workplace, I first did a merge down from a parent stream and then used rollback to revert the merge down on a specific folder.
The rollback worked on that folder, however since the child dev stream and the parent stream are different again, I dont see a merge down option again (say I want to merge down the two streams again).
Why cant I see the merge down option again?

Perforce streams, exclude files from merge/copy

I have following perforce streams structure: main branch and 2 development branches linked to it dev_v1 and dev_v2. Both development streams has some build control files where version specific variables are located. Any change in these files will be reflected in Perforce Streams Graph and the system will ask me to merge them into main and then from main into other development branch.
How to exclude specific set of files in Perforce so that in case of any change the system will no show any difference between streams and will not ask to merge/copy them.
If those build files should never be integrated you should set that path in the stream view to be 'isolate' instead of public. That will add the files to client views for that stream, but will exclude them from any generate branch maps. That will cause them to fall out of the integration calculation and Perforce will stop trying to integrate them.
Isolate was specifically put in streams to handle build files that are unique to each stream, so this is the perfect use.
When you merge you can select which change lists you want to include in the merge, and which you want to exclude. If you are using P4V when you get into the merge window you can choose which changelists to merge into the other code line. Most of our items are set up as streams...if you are a using a standard depot the functionality to should be similar...if you have troubles let me know I can set up another depot on my dev server.

Overwrite from branch

I have two branches _trunk and _dev.
There is a folder (actually it's config) where intensive work is performed in both branches.
Now I need to merge from _trunk to _dev. But I need to merge only the code.
The config should be REPLACED. I'm not sure that replacing it manually is right way. How this operation is called? How do you do similair things?
It's an integration as usual, but during resolve you'll accept the source files without trying to merge them into the destination. This will replace the destination files' content with the source content.
Edit: If there are adds and deletes in the source, make sure you let Perforce propagate those with the appropriate options checked.
You can do an "Integrate/Merge" from _trunk to _dev. Any conflicts will set up in your pending changelist as a "Resolve" for each file.
For code you can let P4V attempt to merge it for you and make changes / do the merge manually. For the config files, in the resolve window do "Accept Source" - this overrides the target with the source regardless.
Likewise, if there's any where you know you don't want to bring your changes forward but still want it to recognise you've checked and accomodated for the changes, use "Accept Target"

Resources