Perforce Get a list of changelists that have not been integrated into a particular branch

If I have Branch A and Branch B. Branch B was branched from Branch A. Periodically, we integrate changes from Branch B back into Branch A. Is there a p4 command for listing the Branch B changelists that have not yet been integrated into Branch A? I can think of some reasons that this may not be possible given that a changelist's files is not necessarily limited to a single branch, but I'm hoping for the best here. I have found this question: Is it possible to list the changelists that have

Perforce How to push with P4 Sandbox

Summary: What is the equivalent to git pull and git push when using P4Sandbox? Details: I'm more familiar with git so I'm trying out using P4Sandbox with Perforce. I've been able to commit my changes in my local sandbox, but I am having trouble pushing them to the central server. I'd prefer to use P4V, but knowing the command line option to complete this task would be great as well.

Perforce Peforce revert if p4 diff has no changes

I want to revert the file based on the perforce diff condition If there are no changes in perforce diff then i need to perform revert otherwise nothing the following are perforce commands i am using in my code For perforce diff _conn.RunCommand(PerforceCommands.DIFF, "-a", FileDepotLocation); Based on the above command i need to revert the file _conn.RunCommand(PerforceCommands.REVERT, "-a", FileDepotLocation); Right now i have following code public void RevertIfUnchanged() {

Perforce p4 changes actually restricted to certain depot path

I want to list the changes that have committed changes to certain depot paths p4 changes //depot/path/blah/... will not properly restrict changes to those that occurred on the given depot path but will in fact list changes made on a work space with a view path was equal to, or a superset of that path, regardless of whether any of the actual files changed were in the interested path. e.g. changes made in a workspace containing a view on one of these paths: //depot/path/blah/... //depot/path/

How to delete a pending changelist in Perforce from an old workspace and offline machine (by admin access)

Note: I want to delete the changelist only not the client. The answers in the following link doesn't work when the pending changelist is from an old workspace which is in an offline machine Perforce: How can I delete a changelist that p4v refuses to delete? Tried the following command p4 -u <user> -c <client> -H <host> revert -k <file(s)> But I'm not allowed to do as the workspace owner is different.

Perforce Unshelved file needs resolve error

When i try to shelve a change p4 shelve -r -c 1111111 it fails with errors: <file x> - unshelved file for <user y> needs resolve Shelve aborted -- fix problems then use 'p4 shelve -c 1111111'. There used to be conflicts but they are resolved now, and p4 resolve says there are no files to resolve.

Perforce Can't delete a user due to an orphaned changelist

While trying to delete a user through the Perforce Admin program, I think that put us into an odd state where we can't delete the user due to an existing changelist, but we can't revert the changelist because the workspace no longer exists. Here is a chain of command line calls that illustrates the state we are now in: # try to delete the user C:\>p4 user -fd swilson User swilson has file(s) open on 1 client(s) and can't be deleted. # Show files opened for edit by swilson C:\>p4 opened -

Check given perforce label exists or not

I need to check whether a given label exists or not in a given server. For example: label abc exists or not in a perforce server using p4 labels or p4 describe commands or any other relevant commands.

How do I retrieve the size of a directory from Perforce?

I would like to know how much disk space a directory is going to consume before I bring it over from the Perforce server. I don't see any way to do this other than getting the files and looking at the size of the directory in a file manager. This, of course, defeats the purpose. Is there a way to get file size info from Perforce without actually getting the files?

Does perforce track deltas unique to a changeset or does it just store the whole file?

I tried to merge some work that a developer did in a working branch to a stable branch. The files a, b, and c had been changed by at least a dozen changesets since the common ancestor of STABLE and HEAD branches were separated. I expected that since this developer changed five lines in each of file a, b, and c, that when I integrated from the HEAD to the STABLE branch, I would get his changes in my pending changset, which I could then review and commit. Instead, it seems that it has taken eve

Perforce How to remove (not revert) a CL?

I want to entirely remove a CL from perforce. Not revert, but when you look up the "History" of the depot tree, it will be gone. All changes will be permanently removed. Is this possible? I'm using P4V.

Perforce reconcile offline work doesn't notice the changes

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

cruise control.NET perforce all commits ever are modifications

I've got a cruise control server running and successfully building my project. However, my interval trigger (set to IfModificationExists) is registering the entire changelist in the history of the database as modifications every time it tries to build, and therefore builds on every interval regardless of whether there's a new commit. Any suggestions? Here are the relevant bits of my config file: <cruisecontrol> <project name="MyProj"> <artifactDirectory>C:\CCNet\Artifacts\<

Perforce command to set changelist description

I'm looking for the Perforce command to update a non-default changelist's description either on creation, after creation, or on submit. You can set the description on submit using p4 submit <description> only for the default changelist. And when you try something like p4 change <changelistnumber> -i <description>, you're forced to edit then save a text file. I'm looking for something like this (but that works, obviously): p4 change -c <changelistnumber> -d <descrip

How to check if a perforce file is opened using bash script

So I run "p4 opened the_file", it prints the status, but I cannot capture the print: $ a=`p4 opened file1` file1 - file(s) not opened on this client. $ echo $a Variable a is empty. What I want is, I can get hold of the string "file(s) not opened on this client" and search for "not opened". Any way to do that?

Perforce — get the diff of added or/and removed files

I would like to generate a diff for the added and/or removed files. Apparently, p4 diff does not support this. p4 status kind of does the job, but with limitation. For example, I create one file(hello.go), reconcile it, then delete it. p4 stuatus gives - submit change default to add <PATH to hello.go> Much appreciated for any suggestion.

Can one user revert another user's default CL changes in a shared Perforce workarea?

Rev. P4/LINUX26X86_64/2011.1/393975 (2011/12/16). I have a P4 workarea, created by user 1, that is intended to be shared by multiple users. User 2 puts files on the opened default changelist, then abandons the workarea. User 3 comes in and wants to wipe out those changes. "p4 revert ..." fails because it says these opens belong to user 2. The opened file has group rw privs, and user 3 is in that group, so I don't think it's a linux barrier. It should almost go without saying that none of

Determining the last changelist synced to in Perforce

A question that occasionally arises is what is the best way to determine the changelist that you last synced to in Perforce. This is often needed for things like injecting the changelist number into the revision info by the automatic build system.

In Perforce, how do I find the local path for files in a pending changelist?

Given a Perforce changelist number, I want to find the local path of all files in that pending changelist. p4 describe changelist -- gets me the depot path for files in the changelist (method 1) p4 opened -c changelist -- gets me the depot path for files in the changelist (method 2) p4 have -- gets me the depot path and local path for all files that have previously been submitted Using a combination of p4 describe and p4 have, I can find the local paths for all files in the changelist that h

Equivalent of Clearcase streams in Perforce

I come from Clearcase world and am trying to learn Perforce at my new company Clearcase has a concept of streams (which is different than a branch). Likewise Perforce also has a concept of Streams. The Question Is the perforce stream same as Clearcase stream. Thanks Pedro

Perforce how to use p4 diff within P4Command in

Need the correct way to use the diff command in using P4Command class. The following C# code doesn't provide the diff command result DepotPath path = new DepotPath(@"E:\Depot\folderloc"); P4Command cmd = new P4Command(rep, "diff", true, String.Format("{0}/...", path)); P4CommandResult result = cmd.Run(); Instead I get the exception : "An unhandled exception of type 'System.ArgumentNullException' occurred in Additional information: P4Command requires a P4Server".

Perforce changelist vs individual files

What is the main difference between a changelist and submitting changes to individual files? I am used to SVN/GIT idea of submitting changes constantly and reverting if needed on individual files, however this new concept of Changelists is new to me. It looks like so far when I make edits to indiviual files P4 is creating a new change list every time I submit the changes but I also see it as a holder of multiple files that can be submitted (commited/pushed) at once but how do I keep the history

Perforce Locate a file in a stream depot using only task stream spec

In order to get a p4 print of a arbitrary file, i'm looking for a way to locate the correctly 'resolved' file using only a stream spec, not a client one. For example, Main stream have a file //toto/main/file.txt Second stream //toto/test/ is a task stream parented to main stream using the following spec share ... When I try to locate and print toto.txt in the stream test using p4 print //toto/test/file.txt I receive different output depending on different factors. If the file was

Perforce How to efficiently work with a task stream?

Disclaimer: I let the question open, but my slow branching issue was due to the server being overloaded. So this is not the usual Perforce behavior. I now take about 30 seconds to branch 10K files. I am a new Perforce 2014 user. I have created a stream depot, and put the legacy application (about 10,000 cpp files) in a development branch. That was relatively quick for an initial import, about 1 hour to upload everything. Now I want to create a 'lightweight' task stream to work on a new feature

Perforce command to retrieve changelists affecting specific files

I am trying to find all .properties files that have been touched since a specific date (last release) so the i18n team can localize any modified/new strings. I am using the following command: p4 changes @2015/11/01,@now //depot/cloud/sp-main/ui/ However, when I run it like this, I get changes all they way back to 2013, though they do contain only changes that have modified .properties files If I run p4 changes //depot/cloud/sp-main/ui/ @2015/11/01,@now Then I

Perforce streams: Task streams usage

I have a requirement to create a child stream which will pick only specific folders from mainline(parent) stream. While creating child stream, to achieve this I restrict the view by using share/isolate/import successfully able to create the child streams which only the code i am interested in. But, I have gone through some tutorials on streams and found something on lightweight streams (task streams) which is used to create the streams partially from parent. In my scenario do i need to reall

Perforce Cannot view files in default changelist

For some reason when I use p4 opened -c default or p4 opened, it says no files are in the default changelist. However, if I make a new changelist, move a file to it and use p4 opened -c CL_NUMBER, it will then show me the file in there. Why is this?

Perforce Setup Issue

I've got a Perforce server set up, and installed the P4V client. I've created a new depot and a new workspace. Per the documentation, I've mapped the workspace to the depot. So far so good. I now have a .SQL script that was created by an external application that I wish to check in for the first time. I copied the file into my workspace and can see the file in the client's workspace tree window. Yet when I attempt to mark the file for add, I get a "file(s) not opened on this client" error.

Perforce Integrated files disappear from a pending changelist at p4v

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 appea

What's the proper way to refactor a single file into multiple files and maintain version history in Perforce?

I have a file which has gotten too large, and should be refactored into two smaller files. What's the best way to do this in Perforce such that the relationship to the original file is maintained? I'm adding two new files, and deleting the original in this case, but I would expect there to be some general solution to this problem. I think the simplest case would be to add one new file which contains a subset of the content of the original, and delete that content from the original file, but le

perforce shelve examples

I have codelines Foo v1 and Foo v2 checked out from the depot, where v2 was created from v1 by a p4 integrate command. I have some changes to Foo v1 which are not checked in (I don't want them to be checked in) - but rather I want them applied to Foo v2. How do I do this using p4 shelve?

Get changes from the perforce

I am trying to get last changes from the perforce So I go to perforce folder and executing following command, as I found in tuturial p4 changes -m 5 //depot/main//project/ result.txt // should save last five changes to result.txt but gives me the following error result.txt - must create client 'IM000001' to access local files // IM000001 is the name of my computer any ideas?

Is it possible to merge changes from one source to multiple destinations in Perforce?

We have a case where changes were made to a file in a source branch that need to get propagated to multiple destinations? Here is an illustration: I know I could do each one individually, but it seems like with the right wildcards in the filespec this might work. We tried this viewspec: //dev/main/file.txt //dev/r*/file.txt But we got this error: Integration errors: Incompatible wildcards '//dev/main/file.txt' <-> '//dev/r*/file.txt' Is this possible?

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 ign

Perforce Populating a task stream with a revision different than head

I am trying to populate a task stream with an older revision than #head. So I created a task stream, and did not chose to automatically branch any files. Then I try : >p4 populate -r -S //depot/dev //depot/main/...@some_label_vXXXX Label 'some_label_vXXXX' is restricted to use on server 'Edge', not on server 'MASTER'. I am connected to the edge server so I am not quite sure what is the issue there. If I need to have a global label to be able to branch, is there a way to convert an existi

Perforce How to detach from stream?

I'm using Perforce 2015.2. I attached my workspace to a Perforce stream with a command similar to: p4 client -s -S //Product/Main Now I'd like to detach the workspace from the stream. I tried: p4 client -s -S // But got an error: Stream '//' is not the correct format of '//depotname/string' How can I detach from my workspace from the stream?

Change Perforce files' recursive permissions

I have multiple directories that have +w (Always writable in workspace). How do I change all files to keep all permissions as is, and remove the +w if exists. Need the p4 command (I know p4 edit -t is per file type...). Some files are text, some are binaries...

Perforce Grabbing date from p4 changes command

I am trying to grab the date, CL and user of a list of changelists submitted within a given timeframe. p4 changes -s submitted //depot/mainline/... @2020/03/09,@2020/03/14 will give me the changes with a date but too much other information. So you can use -F to strip out the information delivered. p4 -F %change%-%user%-%date% changes -s submitted //depot/mainline/... @2020/03/09,@2020/03/14 But irritatingly -F %date% does not mean "what date was this submitted?" it means "what date is it t

How do I submit new versions of a source file that is in a label in Perforce

Let's say I have a file //depot/Project/com/company/project/ that is labeled with name "version-1.0.0". Suddenly I need to revert back to that label to create a bugfix release. I update to it and then make changes to the Now this is the part I don't understand. How do I submit the fixed to Perforce without overwriting any newer revision of the source tree? With Mercurial or Git I would have a branch that has the fixed source and I would just create t

  1    2   3   4   5   6  ... 下一页 最后一页 共 7 页