[p4] Erasing sync history?

Stephen Vance steve at vance.com
Tue Sep 4 19:44:32 PDT 2007


p4 flush #none

(may need to be escaped or quoted depending on your shell) tells 
Perforce that you have no versions but that it doesn't need to worry 
about the disk.

p4 sync #none

Does the same thing but lets Perforce manage the disk space. This is 
safer and what your developer should do in the future because it won't 
delete files that are open for edit or add.

Turning in the "rmdir" option in the client spec will tell Perforce to 
remove any directory that it removes the last element from. That way 
when you sync to none, if there are any directories left, you know that 
you had some uncontrolled files or some files open for edit.

You can force the "rmdir" option to be on by default with a form out 
trigger on the client form.

Steve

Roy Smith wrote:
> A colleague recently removed a workspace by doing "rm -rf" on the  
> root directory.  He thought he was done working on that branch and  
> wanted to free us some disk space.
>
> Some time later, he had to work on that branch again and so he just  
> did a "p4 sync" on that client, and was surprised when only a small  
> number of files appeared.  The answer, of course, is that perforce  
> didn't know he had removed the directory and only updated the files  
> that had changed since his last sync.
>
> I know you can do a "sync -f", and told him to do that, but he's  
> looking for something more.  He's looking for a way to tell perforce  
> that the files no longer exist on local storage, so the next time he  
> does a "p4 sync", (without the -f), they come back.
>
> Is the answer to do the "rm -rf", and then do a "p4 flush"?  It  
> sounds promising, but it's not really clear from the help text what  
> this is supposed to do.
>
> I'm not exactly sure what's motivating him to find something better  
> than "p4 sync -f", but I told him I would research it.  I think he  
> may be worried that keeping track of the metadata about what files  
> he's got in his workspace may be wasting resources on the server.  I  
> told him I thought the storage needed to that was pretty minimal, but  
> that's just a guess.  Is it?
>
> -------------------
> Roy Smith <smith_roy at emc.com>
> Software Guy, EMC Common Management Group
> 44 South Broadway, 7th floor
> White Plains, NY 10601
> (914) 580-3427
> AIM: roysmith649
>
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
>   

-- 
Stephen Vance
www.vance.com


More information about the perforce-user mailing list