[p4] Pending Changelist Size
perforce-user-forum at forums.perforce.com
Wed Jul 24 07:40:02 PDT 2013
Posted on behalf of forum user 'G Barthelemy'.
Elliott Lock, on 2013/07/24 12:06:12 UTC, said:
> OS: Windows 7
> Access: Client side via P4V and/or Command Line.
> I'm looking for the entire size of a pending changelist. Not a single file within a changelist, but the sum of all files within a changelist.
So as mentioned in previous posts, a pending changelist is by definition
client-sided, thus its size is unknown to the Perforce server and therefore no
Perforce command can be run against the server that is going to return that
information. I can think of 2 solutions:
- Michael's solution above is the most straight forward and could be ported
to any operating system. Basically you get a list of the files in the
changelist by querying the server (that's the p4 opened part), you find
out where they are mapped on your local system (that's the p4 where
part) and you add those file sizes.
- You could try this: shelve your changelist (here to 123456), and run p4
sizes -s @=123456 then delete the shelve.
What you are not saying is why do you need to do this. Are you trying to preempt
the impact on your server storage, or the size of the changelist when someone
syncs it to a client after it has been submitted ?
The reason for this question is that there are other considerations that would
skew your result for either scenario:
- You could have 10MB worth of files opened in a changelist, but only 1MB of
those files has actually been modified. If you client SubmitOptions
is set to "revertunchanged", or if you run p4 revert -a before
submitting, then the real size of the changelist is 1MB, not 10.
- If what you want to measure is the impact on the server, then files open for
branch count as 0 size since they would just be lazy copies once submitted,
for example. You could use the shelve method with the "-z" flag to
omit lazy copies in the calculation.
Please click here to see the post in its original format:
More information about the perforce-user