In Cygwin bash, how can I list all files opened in the current workspace grouped by pending changelist (ignoring empty or shelved changelists)?
For example, if I've the following files opened in the following changelists, I wish to display it in this (or similar) format:
1234: Changelist 1234's description
//path1/file1 1 add text
//path2/file2 2 edit text
5678: Changelist 5678's description
//path2/file3 3 edit xbinary
p4 opened|sed "s/\([-#()]\|change\)/ /g"|column -t|sort -k 4 sort-of groups them by changelist number:
//path1/file1 1 add 1234 text
//path2/file2 2 edit 1234 text
//path2/file3 3 edit 5678 xbinary
but I'd like to see each changelist number and description as a header.
The easiest approach would be something like this:
p4 changes -s pending -c $P4CLIENT | awk '{print $2}' | p4 -x - describe -s
This lists all pending changes for your current client (aka workspace) and calls p4 describe -s.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With