Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm just messing around in a local Perforce database, trying to figure out how I can reset Perforce back to a previous state without journaling or deleting and recreating the database files.

I have some depots without files, one of them is called "sandbox". I created it with the p4 depot command either from the command line or using the P4Python API (at this point I don't remember which).

When I type: p4 depot -d sandbox I get this:

Depot sandbox isn't empty. To delete a depot, all file revisions must be removed and all lazy copy references from other depots must be severed. Use 'p4 obliterate' or 'p4 snap' to break file linkages from other depots, then clear this depot with 'p4 obliterate', then retry the deletion.

I tried p4 obliterate -y //sandbox/... which just says No records to delete. which is expectable as the depot is empty. Anyway it doesn't change the result from p4 depot -d. There are also no connections from other depots as the error message suggests.

Any idea what is happening and is there a foolproof way to force a depot to be deleted without deleting the server files altogether? Ultimately I want to do this automatically from P4Python.

EDIT: FWIW, here's the server log during the obliterate operation:

2012/04/11 09:30:18 pid 6916 username@machinename 127.0.0.1 [p4/2011.1/NTX86
/370818] 'user-obliterate -y //sandbox/...'
--- lapse .561s
--- rpc msgs/size in+out 0+1/0mb+0mb himarks 64836/64836
--- db.counters
---   pages in+out+cached 2+0+1
---   locks read/write 0/1 rows get+pos+scan put+del 0+0+0 0+0
---   total lock wait+held read/write 0ms+0ms/0ms+436ms
--- db.user
---   pages in+out+cached 2+0+1
---   locks read/write 1/0 rows get+pos+scan put+del 1+0+0 0+0
--- db.group
---   pages in+out+cached 2+0+1
---   locks read/write 1/0 rows get+pos+scan put+del 0+1+1 0+0
--- db.domain
---   pages in+out+cached 3+0+1
---   locks read/write 2/0 rows get+pos+scan put+del 1+2+8 0+0
---   total lock wait+held read/write 0ms+436ms/0ms+0ms
---   max lock wait+held read/write 0ms+436ms/0ms+0ms
--- db.view
---   pages in+out+cached 3+0+1
---   locks read/write 2/0 rows get+pos+scan put+del 0+2+6 0+0
---   total lock wait+held read/write 0ms+436ms/0ms+0ms
---   max lock wait+held read/write 0ms+436ms/0ms+0ms
--- db.integed
---   pages in+out+cached 3+0+2
---   locks read/write 0/1 rows get+pos+scan put+del 0+1+1 0+0
---   total lock wait+held read/write 0ms+0ms/0ms+390ms
--- db.resolve
---   pages in+out+cached 2+0+1
---   locks read/write 0/1 rows get+pos+scan put+del 0+0+0 0+0
---   total lock wait+held read/write 0ms+0ms/0ms+343ms
--- db.have
---   pages in+out+cached 3+0+2
---   locks read/write 0/1 rows get+pos+scan put+del 0+1+1 0+0
---   total lock wait+held read/write 0ms+0ms/0ms+296ms
--- db.label
---   pages in+out+cached 2+0+1
---   locks read/write 0/1 rows get+pos+scan put+del 0+0+0 0+0
---   total lock wait+held read/write 0ms+0ms/0ms+249ms
--- db.locks
---   pages in+out+cached 3+0+2
---   locks read/write 0/1 rows get+pos+scan put+del 0+1+1 0+0
---   total lock wait+held read/write 0ms+0ms/0ms+171ms
--- db.archmap
---   pages in+out+cached 2+0+1
---   locks read/write 1/0 rows get+pos+scan put+del 0+1+1 0+0
--- db.rev
---   pages in+out+cached 4+0+2
---   locks read/write 1/1 rows get+pos+scan put+del 0+2+2 0+0
---   total lock wait+held read/write 0ms+16ms/0ms+171ms
--- db.revcx
---   pages in+out+cached 2+0+1
---   locks read/write 0/1 rows get+pos+scan put+del 0+0+0 0+0
---   total lock wait+held read/write 0ms+0ms/0ms+140ms
--- db.revdx
---   pages in+out+cached 2+0+1
---   locks read/write 0/1 rows get+pos+scan put+del 0+0+0 0+0
---   total lock wait+held read/write 0ms+0ms/0ms+93ms
--- db.revhx
---   pages in+out+cached 2+0+1
---   locks read/write 0/1 rows get+pos+scan put+del 0+0+0 0+0
---   total lock wait+held read/write 0ms+0ms/0ms+62ms
--- db.revsx
---   pages in+out+cached 2+0+1
---   locks read/write 0/1 rows get+pos+scan put+del 0+0+0 0+0
---   total lock wait+held read/write 0ms+0ms/0ms+46ms
--- db.working
---   pages in+out+cached 2+0+1
---   locks read/write 0/1 rows get+pos+scan put+del 0+0+0 0+0
---   total lock wait+held read/write 0ms+0ms/0ms+31ms
--- db.traits
---   pages in+out+cached 4+3+2
---   locks read/write 0/1 rows get+pos+scan put+del 0+0+0 0+0
---   total lock wait+held read/write 0ms+0ms/0ms+31ms
--- db.protect
---   pages in+out+cached 2+0+1
---   locks read/write 1/0 rows get+pos+scan put+del 0+1+1 0+0
share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.