Can you please help me with a command in preface? How do I append a changelist directly to an existing label?
When tagging files with an existing label, specify the changelist number.
For example:
p4 tag -l jam-2.1.0 //depot/release/jam/2.1/src/...#1234
More information and examples of working with labels can be found here:
http://www.perforce.com/perforce/doc.current/manuals/p4guide/chapter.labels.html
Related
I'd like to have a "LAST_KNOWN_GOOD" label that points to the latest database that passed nightly regressions (done automatically by the regression script). The idea being that folks can just sync to that label when the head of tree is broken.
So, the same label spec would get updated over and over. I'm not seeing anything obvious on how to do this in the perforce doc.
p4 labelsync -l LAST_KNOWN_GOOD
It's really as simple as that. As long as the label isn't locked, and the label already exists.
The p4 label command can create a label.
You can always learn more about any command by typing p4 help command
Yes, if the label is not locked, you can change the contents of the label. Have a look at the 'p4 labelsync' command.
I need to append some text to the description of already existing changelist in Perforce using Java.
What would be the most efficient way to do it?
I could think of
1. CL_content = p4 change -o <changelist>
2. Then append the required text to the description
3. p4 change -i CL_content
But, it would not be suitable for very large changelists.
Any other way?
Your solution looks good. No other option to update a bulk of changelists at once.
Perforce should be able to take the load when you are doing one after other. I don't see any issues with it.
I am using p4v windows client and I want to untag files.
On command line it would be
p4 tag -d -l <tagname> <filenames>
How can i do this in p4v?
In response to one of the answers...
There IS a difference between p4 label and p4 tag
Running p4 label allows you to configure the mapping that controls the set of files that are allowed to be included in the label. After configuring the label, use p4 labelsync or p4 tag to tag files with the label.
from http://www.perforce.com/perforce/doc.current/manuals/cmdref/label.html
see also http://www.perforce.com/perforce/doc.current/manuals/cmdref/tag.html
Right click on the file, and go to Label... Then select the file in the Files/Folders: section, and click remove.
Is there a way to duplicate the change list description using p4 command line when integrating from the source change list across branches ?
Details:
For e.g.
p4 integ -t -b branch_a_to_branch_b -s //my/tree/...#2425,#2425
integrates files from changelist 2425 to the default changelist in the target branch branch_b from source branch branch_a
Is it possible to create a new changelist which has the same description as the source changelist ?
Then the target integration can be done on this new changelist.
I don't know of a way to do this in one command, but it seems like it would be easy enough to script up. You might want to look at the commands p4v runs when it integrates, as it has the option to integrate to a new changelist. Then it would simply be a matter of changing the description of the new changelist to match the old one.
How do I get a list of the files checked out by users (including the usernames) using P4V or P4?
I want to provide a depot location and see a list of any files under that location (including sub folders) that are checked out.
From the command line:
p4 opened -a //depot/Your/Location/...
The ... indicates that sub folders should be included.
Seeing as you also asked about P4V and only had command line answers so far, here's what you do for P4V. The "Pending" pane gets you part way to what you want. Ensure the "User" and "Workspace" filters are cleared, and you'll get a list of all files grouped by changelist and client spec. Not as clean as the straight list of files you get when using the P4 command line as suggested by Iain and Mark, but may help in some situations.
An alternative is to create a custom menu in P4V that uses one of the command line solutions suggested. For example:
Tools->Manage Custom Tools
New
Call it something e.g. Open files by user
Check the "Add to applicable context menus"
In Application field, browse to p4.exe
In Arguments, type opened -a %D (the latter takes the currently selected depot path)
Check the box to run in a console.
I'm sure you could fancy this up a bit if needed to filter the output.
You can also restrict the output of p4 opened like so:
p4 opened -C <client-spec> //depot/...
to get a list of files opened on that client-spec
p4 opened //depot/...
will give you a list of files opened by the current P4USER
In case you want to search for a particular user:
p4 opened -u the_user_name
In case you want to search for particular Changelist:
p4 opened -u the_user_name -c cl_number
I just want to point out something about about the command line arguments.
It is important to add the "/..." after the folder you want to look over because it will tell perforce to do it recursively.
So, I was trying this at the beginning :
p4 opened -a //myP4Path/dev_project
Which wasn't working until I did this:
p4 opened -a //myP4Path/dev_project/...
In p4v : try to do a rename of the top directory. You will get a warning and list of the currently checked out files with user names.