[p4] Accidental checkout

Weintraub, David david.weintraub at bofasecurities.com
Tue Aug 29 11:04:42 PDT 2006


Doesn't the "-n" parameter mean that the command only displays the affected file, but doesn't operate on them? If you ran that command from the command line, no files would be reverted.


    revert -- Discard changes from an opened file

    p4 revert [ -a -n -k -c changelist# ] file ...

[...]
        The -a flag tells 'p4 revert' to revert only those files which
        are opened for edit or integrate and are unchanged or missing.
        Files with pending integration records are left open.  With the
        -a flag, the file arguments are optional.

        The -n flag displays what files would be affected but does not
        actually revert them.


-----Original Message-----
From: perforce-user-bounces at perforce.com [mailto:perforce-user-bounces at perforce.com] On Behalf Of Francis Paulin
Sent: Tuesday, August 29, 2006 10:36 AM
To: Robert Cowham; Jeff Desharnais; perforce-user at perforce.com
Subject: Re: [p4] Accidental checkout

Hi,

I'm aware of that option and it's not checked and the p4 revert -an is done anyway

Thanks
Francis

-----Original Message-----
From: Robert Cowham [mailto:robert at vaccaperna.co.uk]
Sent: 29 août 2006 02:24
To: Francis Paulin; 'Jeff Desharnais'; perforce-user at perforce.com
Subject: RE: [p4] Accidental checkout

> Make sure to not use P4Win when reverting that many files. 
> The problem is that P4Win is doing a p4 revert -an before doing the 
> actual revert. It should not. I think it's an old bug.

This behaviour is controlled by Settings > Options > changelists > automatically delselect unchanged files before submit.

While in some circumstances such as with large changelists, this is undesirable, for everyday use I find it invaluable.

> In any cases, I prefer using p4 revert directly on the command line. 
> For big changelists to revert, the command line is often faster.

Absolutely.

Robert

_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com http://maillist.perforce.com/mailman/listinfo/perforce-user



More information about the perforce-user mailing list