May 15, 2014

Setting Depot Paths - The Easy Way


An administrator can easily change the location of journal and log by setting P4JOURNAL and P4LOG, respectively. Until to now, specifying a different location for the depots was a bit more complicated.

In the new Perforce release 2014.1 you do not need to do this anymore! You now can set the default location for all depots to be different than P4ROOT. Simply set:

p4 configure set server.depot.root=/p4/depots

Now all depots with a relative map (like “acme/…”) will automatically use the new root. All depots with the map set to an absolute path will keep their current location. Don’t forget to disable your form-out trigger on depot if you used this before ☺.

Note that if you have had all your depots in your P4ROOT directory and now want to move them to a new location you can now simply set the new server.depot.root and shutdown the Perforce Server. Move the depots to their new location and restart your server again.

The new Perforce 2014.1 release has many other new features worth exploring. Please check the release notes for details.

Happy hacking.