Jump to content

Cannot delete changelist with 'phantom' shelved files


  • Please log in to reply
2 replies to this topic

#1 SnakeNuts



  • Members
  • Pip
  • 4 posts

Posted 13 January 2020 - 09:38 AM

I've got a situation where a user needs to be deleted from our server, but they have a changelist with shelved files that cannot be deleted somehow.

The cause is probably because the shelved files are files from a depot that has been archived off the sever a while ago. a 'p4 shelve -d -f -c xxx' results in a 'No shelved files in changelist to delete', even though the changelist itself still shows the shelved files.

Any idea what to do in this case?

#2 Sambwise


    Advanced Member

  • Members
  • PipPipPip
  • 1121 posts

Posted 13 January 2020 - 04:18 PM

Worst case scenario, you could grep the checkpoint for that changelist number, find the db records that correspond to the shelved files, and apply a journal patch to zap 'em.

I've never heard of this "phantom shelf" scenario before, though.  I'd be interested in seeing the output from:

p4 describe CHANGE
p4 change -d CHANGE
p4 files @=CHANGE
p4 user -d -f USER

#3 Matt Janulewicz

Matt Janulewicz

    Advanced Member

  • Members
  • PipPipPip
  • 223 posts
  • LocationSan Diego, CA

Posted 21 January 2020 - 01:55 AM

I have occasionally come across a similar problem in a distributed environment, where we had shelves defaulting to global, and someone submitting a shelf to an edge server broke out of the operation at juuuuuuust the right moment, leaving shelve records on the edge server where they shouldn't be.

I'm not sure this will work, but a quick and dirty way to do a slash and burn on the whole thing might be to delete the client, ignoring the shelved files/records:

p4 client -df -Fs <client name>

I don't recall if this will also ditch the changeless records, but I this has gotten me out of a few scenarios where a user couldn't be deleted.

This might ditch more than you really want (open file records, other shelves) but it came in handy when there was nothing else we wanted to preserve and I didn't want to do db patching.

One other thing you could try is to unload the client. Not sure that will work but that got me out of a few similar jams over the years. You can't technically unload a client with shelve records, but sometimes a command like unload uses different criteria to evaluate what it can and can't do (vs deleting a user) and you can inadvertently trick Perforce into doing things it doesn't want to do. :)
-Matt Janulewicz
Currently unemployed, looking for work in Boise, ID!

Also tagged with one or more of these keywords: shelving

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users