[p4] Changelists are Forever?

Robert Cowham robert at vizim.com
Tue Nov 11 15:48:16 PST 2008


> Once submitted, isn't a change list permanent?  This seems to 
> be the case based on my reading of Practical Perforce.  Is 
> there no way to alter a submitted changelist (Note: I'm not 
> asking how to reverse a changelist in a depot, but 
> specifically if a changelist record itself can be altered 
> after submission).

Continuing the Bond theme - Never say never :)

As a general rule of thumb you can't update submitted changelists, but there
are exceptions.

>From p4 help change:

    p4 change [ -s ] [ -f | -u ] [ changelist# ]

        The -f flag can force the update or deletion of other users' pending
        changelists.  -f can also force the deletion of submitted
changelists
        once they have been emptied of files via 'p4 obliterate'.  Normally,
        submitted changelists are immutable.  The -f flag requires 'admin'
        access granted by 'p4 protect'. The -f and -u flags are mutually
        exclusive.

        The -u flag can force the update of a submitted change by the owner
        of the change. Only the Jobs and Description fields can be changed
        using the -u flag. The -f and -u flags cannot be used in the same
        change command.

Note that admins can update fields such as user/client/datetime. The
datetime options is used to adjust dates of imported changelists from other
SCM systems sometimes - it should definitely not be something you do
regularly as most people rely on the chronological ordering of submitted
changelists.

There are a couple of extra even more obscure possibilities:

Obliterate removes files from changelists (and once empty they can be
deleted).

Perfmerge (a utility available from Perforce support for merging 2
repositories) renumbers changelists - again this is a very rare occurrence,
but does happen. With checkpoint surgery in general, many things are
possible, but if you get it wrong you can be royally stuffed - Perforce
support should always be consulted in advance of such situations...



More information about the perforce-user mailing list