Reputation: 1412
In Perforce, is it possible to rename a depot?
I would imagine that you could integrate across different named depots, but I do not think that would carry over the full depot's history.
I have seen this Renaming Depot Directories article, but this applies only to directories under a depot (and not the depot itself).
Upvotes: 4
Views: 4145
Reputation: 2040
Disclosure: I work for Perforce.
Whatever you plan to do - do test it before putting your data at risk. :)
Supported version (online):
http://answers.perforce.com/articles/KB_Article/Renaming-Depot-Directories
Unsupported version (offline):
Get http://swarm.public.perforce.com/files/guest/tony_smith/perforce/utils/rename_depot.pl
Run it as:
perl rename_depot.pl olddepot newdepot checkpoint.NNN > checkpoint.NNN.new
Restore from checkpoint.
Move the archive location and the depot map by editing the "Map" field in the (renamed) depot spec.
Unsupported version (online):
p4 duplicate //olddepot/... //newdepot/...
p4 snap //newdepot/... //olddepot/...
p4 verify -q //newdepot/...
(check for any error, stop and contact support if in doubt)
p4 obliterate //olddepot/...
May Perforce be with you.
Upvotes: 0
Reputation: 18145
No. You can't rename a depot because Perforce won't let you move files from depot A to depot B unless depot B already exists. If you wish to rename depot A to depot B, do the following:
It used to be that moving files to a new location in Perforce meant you lost their history. The old file was deleted and then added again in the new location as though it had never been under version control. That is no longer the case. I don't recall exactly when they did it (perhaps in the 2008.x series?), but they finally made it so that file history is maintained across a move/rename/integration.
Edit: In the comments below, Greg Whitfield informs me that Perforce has been maintaining file history across integrations all along. I guess it was off by default and turned on in a fairly recent version of P4V?
Upvotes: 2
Reputation: 2343
Contact Perforce support. They can guide and support you through the process of actually renaming a depot, which involves manipulating the metadata.
Upvotes: 1