[p4] Deleting all files in a depot
Jeff A. Bowles
jab at pobox.com
Sat Jun 9 07:46:37 PDT 2007
In geeral, I agree with all of the things I've seen on this thread.
If it's a test-server area, just do a:
cd <<p4root>>
<<then stop the server>>
mkdir old
mv db.* old (or DOS cmd equiv)
Of course, the server's down while you do this.
It's weird (meaning "bad") to do things like this with
the server up.
The "obliterate" advice is good advice, but it's
probably the one command to use sparingly,
since it's utterly irreversible. Keep in mind that
"obliterate" removes files and file contents, but
not (all) changelist info or label info. Using it at the
wrong time can be an awful experience.
(Sort of like being in a college frat and drinking
with the boys, then calling Gramma at 4 AM.
It can be done, but you'll never live it down.)
-Jeff Bowles
Perforce Consulting Partner
On 6/9/07, Mike <lists at michael-amorose.com> wrote:
> I used the obliterate command but it reports there are no records to delete.
>
> I have a depot with a single dir named "Volumes" at the top level.
>
> I have verified that my user and workspace are correct, then I issue the
> obliterate command:
>
> Mikes-Mac-mini-1-83-Ghz:~ mike$ p4 obliterate -y Volumes
> No records to delete.
> Mikes-Mac-mini-1-83-Ghz:~ mike$
>
> The p4 obliterate page on the website is not too helpful in showing the
> exact syntax needed for the command.
>
> Do I have the path wrong? Do I need to preface the path with '//depot/'?
>
> Thanks,
>
> Mike
>
> David Weintraub wrote:
> > Well, the easiest way is to shut down Perforce, and simply delete the
> > P4ROOT directory and start over. Of course, you'll lose the
> > permissions, clients, etc. too (which you might want).
> >
> > The other way is to run the "p4 obliterate" command against the whole
> > depot. That will take longer, but you'll still have all the clients,
> > changelists, etc. from before.
> >
> > I guess it depends how much of the system you really want to clean
> > out. It is also possible to dump the clients, permission table, and
> > other information you want to keep. Delete your P4ROOT, and then write
> > a script to rebuild your clients, and permission table.
> >
> > On 6/8/07, Mike <lists at michael-amorose.com> wrote:
> >> Is there an easy way to remove all files in a depot from the very top
> >> level down?
> >>
> >> I need to essentially reset my depot so that I can re-add the same files
> >> in the same locations again to the server.
> >>
> >> Thanks,
> >>
> >> Mike
> >> _______________________________________________
> >> perforce-user mailing list - perforce-user at perforce.com
> >> http://maillist.perforce.com/mailman/listinfo/perforce-user
> >>
> >
> >
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
--
---
Jeff Bowles - jab at piccoloeng.com
More information about the perforce-user
mailing list