how to check if any changelist of project A is integrated in project B? and also to get corresponding submitted Cl in project B. Please share any perforce command
It's worth pointing out the unit of integration in P4 is files, not changelists, so the p4 commands are mostly focused around telling you which files are integrated or not. You can, however, find out which changelists still have some files that need to be integrated - use the p4 interchanges command. The Perforce docs explain the syntax.
Assuming that you have a branch spec that describes the relationship of project A and project B called projAprojB, then you can get the outstanding changelists with:
p4 interchanges -b projAprojB
You can also get a similar view of outstanding changes in the P4V Merge/Integrate dialog box.
Alternatively, you can use the 'revision graph' in P4V to see the integrations performed on a given file; doing this on a file from the changelist you want to know about will give you the information to work out if it has been integrated into the other project and the changelist for that was.
If this doesn't suit your needs then your only option is to write a script, either with shell scripting using p4 or one of the APIs provided by Perforce
Related
I'm using P4V to view my perforce workspace. I've changed multiple files in multiple directories within the workspace. Is there a way to create a diff that includes all these changes so I can upload it for code review? I apologize if this is a trivial task. I am new to Perforce and I'm still learning the terminology and the tools after spending a few years with Accurev and Git.
The standard mechanism for code review in Perforce is to put all of the work into a changelist and "shelve" it so that it's visible to other Perforce users before being fully committed. Other users can view the diffs and/or "unshelve" your changelist into their own workspaces so that they can test your changes directly.
http://www.perforce.com/resources/tutorials/shelving-operations-p4v
So, I created a new file and copied it over the one in the workspace. Then I selected "reconcile offline work" from the context menu of the directory containing the file, after I've updated the directory and made sure the workspace has the new version of the file - but Perforce says that no files have changed.
There is one more weirdness in this: Despite having the latest version of the program, both the p4 and p4v clients, perhaps, because of the server version, I don't have reconcile command available (I don't know what version is the server, and don't know how to find it out).
So, it would help if you could tell how to do the same thing as reconcile, while not having this command (it seems to be a newish addition, but I cannot imagine a workflow that doesn't require you to use it, or something that does the same thing). The VCS is practically useless if it cannot figure out on its own what files had changed since the last version...
If your server is older, and doesn't support reconcile, there are other ways to accomplish these tasks. Start here for all the details: http://answers.perforce.com/articles/KB_Article/Working-Disconnected-From-The-Perforce-Server
If you added a file to Perforce and copied it to another workspace you will need "p4 sync -k //depot/path/to/file" to reflect the change.
In my primary branch there is a change list with 10 files that I'm trying to integrate into a development branch. All of the outstanding files in the change list should be ignored, and not branched into the target.
What are the steps to do the integration so that Perforce does not create the files in the target branch, and ignores the change list files for all future integrations?
I originally did an integration with -Dt, and then reverted the 10 files I did not want to be created in the target branch. After this, Perforce continues to try and re-integrate these files to the target.
Maybe this is part of the issue or irrelevant, but the source files are not textual edits, but updates to the filetype fields
Integrate the file, then do 'accept yours' when you are resolving. That tells the server that you want to explicitly ignore the change from the other branch, and the server won't subsequently include that change in future integrations.
This worked for me:
p4 integrate -Rb -Rd -b <branch>
Then in P4V, Resolve --> Accept Target.
See here for information on the -Rb and -Rd options.
I am developing an application that is supposed to be integrated with Perforce. In the learning phase of basic Perforce command, I have a question of how 'p4 changes' work. Once a changelist get submitted, say, affecting files at
'//depot/Web/content/main.css'
'//depot/Tool/app/init.py'
If we now issue a command:
'p4 changes //depot/Web/...'
then the changelist will show in the result. So how Perforce manage this information? Does it break down the paths and store? Or does it do an online substring query?
I saw there is a field "common path" in Perforce database schema, in this case, the value should be:
'//depot/...'
So in this case, how does Perforce get the information?
For each change, the Perforce server records which files were affected by that change.
This is one of many pieces of metadata about the changelist which are recorded in the server's database.
That information is used by commands like 'p4 describe' to find the correct set of files.
The Perforce server contains a sophisticated pattern matching engine which can rapidly search through the database to locate the set of changes which affected a certain set of files, as described by a file pattern.
This is a core operation of the server, so it's highly optimized for this behavior.
Our user performed an integration between branches.
Integrated files were placed in a pending changelist but they are invisible when I look
at this changelist in p4v.
I can see them when I look on this changelist when I connected to another workspace, I can also see then in Eclipse.
When I choose to Resolve conflicts on this changelist it works too, but
when I try to submit the changes, there is nothing there.
After I installed a new version of p4v, the problematic pending
changelist appeared with a question mark (red triangle with a question
mark).
Any Ideas?
Thanks.
Answer from Perforce support:
This may be a working and locks out of sync
issue. Can you run the following server command:
p4d -r $P4ROOT -xf 925
Where "$P4ROOT" is the location of the db.* files.
P4V.exe allows the user to specify a filter on his workspace. Perhaps the workspace had a filter applied, such that the GUI did not show the files, where the command line client and others (ie Eclipse) would not be privy to this filter and would show the files.
Another possibility is that the user was logged in under a workspace other than his default, and the files were checked out in his default workspace. It would be easy to then find these files in his default by looking at pending changelists for all users.