Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I list P4 changes since a specific changelist

Tags:

perforce

Is there a way get the list of changelists after a particular changelist for a particular branch?

p4 changes (some flag ?) (CL#) //depot/project
like image 693
jbemt48 Avatar asked Aug 21 '12 14:08

jbemt48


People also ask

What is a change list in perforce?

When you check out a file, Perforce adds information about the file to a changelist and changes the writable attribute of the file in your local workspace from read-only to read/write. A changelist defines a logical grouping of work across a set of files and folders.

How do I change the description of submitted Changelist in perforce?

If you don't want to do this via command-line, you can edit a changelist description in P4V. Open the changelist (right-click, "View Changelist"), and there's an "Edit" button at the bottom which makes the Description field editable, allowing you to fix a typo or confusing description for a changelist.

What is p4 reconcile?

p4 reconcile. Open files for add, delete, or edit to reconcile a workspace with changes made outside of Helix Server. You might need to use this command after working offline from Helix Server. p4 rec is a synonym for p4 reconcile .

What does p4 add do?

p4 add opens files within the client workspace for addition to the depot. The specified files are linked to a changelist. The command can add files to a new, empty depot or to a depot that already contains files. The files are added to the depot when the changelist is committed with p4 submit .


3 Answers

This can be done with the following syntax (assuming you want to see all the changes submitted to this branch since changelist 12345 inclusive):

p4 changes //depot/project/...@12345,#head



To successfully use Perforce it is crucial to understand the intricacies of the Perforce File Specifications or filespecs. Think of it as the query language of Perforce.

For example, if you want to do something with a branch between two points you would need a filespec similar to below:

  • //depot/branches/branch_name/...@12345,#head specifies a range between changelist 12345 and head/latest.

  • //depot/branches/branch_name/...@12345,23456 specifies a range between changelist 12345 and 23456.

  • //depot/branches/branch_name/...@2012/08/01,@2012/08/21 specifies a range between two dates.

like image 156
Dennis Avatar answered Oct 06 '22 01:10

Dennis


p4 changes "//depot/project/...@>nnn"

where nnn is your CL#.

like image 30
user1054341 Avatar answered Oct 06 '22 00:10

user1054341


If you're into Perforce Integration, and you need to get the next CL to Integrate (the CL right after the last one you've integrated, say @12345), try this:

p4 changes "//depot/branches/branch_name/...@>12345" | tail -1 | cut -d ' ' -f 2
like image 21
Noam Manos Avatar answered Oct 06 '22 01:10

Noam Manos