The issue isn't with perforce, it's that you deleted the files owned by
perforce from your machine without telling the perforce server. One of
the things that gives perforce its speed is that it keeps a database on
the server that knows what clients have versions of what files. When
you do a sync operation, the server compares what it believes your
client has against what you are syncing, and sends you only the files
that have changed. By removing the file(s), you've invalidated the
server's knowledge of your client's state. p4 won't scan your drive
during the sync process like some other version control systems, which
is nice for projects like ours that have 250,000 files per branch.
To remove the file and let perforce know about it, sync the files to #0.
So, "rm my_file" turns into "p4 sync my_file#0". If you've already
removed the files, you could use the sync, or even a flush, to bring the
server's state back into line with what your client contains.
If you have already removed the files and you need to resync them
without telling the server that you've removed them, you can specify the
-f flag to sync. I personally believe that any regular need to sync -f
is indicative of improper use of perforce.
j
-----Original Message-----
From: perforce-user-***@perforce.com
[mailto:perforce-user-***@perforce.com] On Behalf Of
***@smsc.com
Sent: Wednesday, June 15, 2005 10:52 AM
To: perforce-***@perforce.com
Subject: [p4] unable to re-sync after manually deleting files from
workspace
I've noticed that if files are manually removed from a workspace, that
the perforce re-sync does not restore them from
the repository.
e.g.
rm my_file
p4 sync
my_file is NOT restored from the depot.
To get the file back, I need to go through P4 and remove a higher level
of the hierarchy, then do a sync.
Is this a known issue?
Thanks,
Marco