Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view all the P4 changes shelved by a specific user?

Tags:

perforce

Describing my requirement below, just as an example. The main question above in general, can be relevant to much diverse audience under diverse scenarios.

While developing a code, I have a practice of shelving the changes made to the code periodically. For example, if my code intends to achieve 4 different objectives, I shelve my changes each time one of the objective is achieved. That way, if I mess up things while coding for a next objective, I just unshelve the changes from my previously shelved changes. This is a very nice way of cleaning up things.

The problem is when there are large number of shelved changes, it becomes difficult to keep track of all your change-list numbers. In such a case, if there is a single command to retrieve a list all the change-lists shelved by me or any user for that matter, I can do a p4 describe -s <#CL> and get the know what changes does a particular shelved change-list contains. That would definitely help keep things more organised!

like image 763
Anand Avatar asked Feb 06 '18 09:02

Anand


People also ask

How do you find shelved changes?

Unshelve changesPress Ctrl+Shift+U or choose Unshelve from the context menu of the selection. In the Unshelve Changes dialog, specify the changelist you want to restore the unshelved changes to in the Name field.

What does Unshelve do Perforce?

Unshelving copies the shelved files into the user's workspace as they existed when they were shelved. (For example, a file open for edit when shelved will also be open for edit in the unshelving user's workspace.)

What are shelved files in p4?

Shelving is the process of temporarily storing work in progress in Helix Server without submitting a changelist. Shelving is useful when you need to: perform multiple development tasks on the same set of files, such as testing across multiple platforms.

What is a changelist 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.


1 Answers

The command you need is

p4 changes -u USERNAME -s shelved

You can further limit that to a specific workspace etc. (See p4 help changes for your options.)

like image 101
sferencik Avatar answered Oct 05 '22 06:10

sferencik