[p4] Erasing sync history?

Qazwart qazwart at gmail.com
Wed Sep 5 20:31:58 PDT 2007


You're right. This only removes the current directory tree which is  
usually more useful than removing in the entire client work area. To  
remove everything, it would be:

$ p4 sync //...#none

However, I was thinking of an equivalent of "rm -rf *" which is what  
the user did.

On Sep 5, 2007, at 9:05 AM, Stephen Vance wrote:

> Actually, this command will only remove from the current directory  
> down. If the current directory is the client root, then it will do  
> what is being requested. If it's outside the workspace, it won't  
> work at all. If it's in another directory in the workspace, it will  
> only remove a subset.
>
> Steve
>
> Qazwart wrote:
>> Actually, it is:
>>
>>      $ p4 sync ...#none
>>
>> This will remove the files from the client's workspace while telling
>> the Perforce client database that you no longer have these files in
>> your workspace.
>>
>> The "p4 flush" does a "p4 sync" without updating the client. It is an
>> alias to "p4 sync -k". You rarely use "p4 flush" or "p4 sync -k" for
>> anything since it gets your client out of sync with the server.
>>
>> On Sep 4, 2007, at 9:57 PM, 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
>>>
>> David Weintraub
>> david at weintraub.name
>> qazwart at gmail.com
>>
>> _______________________________________________
>> perforce-user mailing list  -  perforce-user at perforce.com
>> http://maillist.perforce.com/mailman/listinfo/perforce-user
>>
>>
>
> -- 
> Stephen Vance
> www.vance.com

David Weintraub
david at weintraub.name
qazwart at gmail.com




More information about the perforce-user mailing list