Promote shelved changelists
Changelists shelved on an Edge Server, which would normally be inaccessible from other Edge Servers, can be automatically or explicitly promoted to the Commit Server. Promoted shelved changelists are available to any Edge Server.
- In a shared archive configuration, where the Commit Server and Edge Servers have access to the same storage device for the archive content, shelves are automatically promoted to the Commit Server. See Automatically promote shelves.
- You must explicitly promote a shelf when the Commit and Edge Servers do not share the archive. See Explicitly promote shelves.
You can view a shelf’s promotion status using the -ztag
output of the p4 describe
, p4 changes
, or p4 change -o
commands.
For limitations, see Working with promoted shelves.
Automatically promote shelves
When the Edge Server and Commit Server are configured to access the same
archive contents, shelf promotion occurs automatically, and promoting
shelved files with p4 shelve -p
is not required.
To configure the Edge Server and Commit Server to access the same
archive contents, set server.depot.root
to the
same path for both the Commit and Edge Server, and set the
lbr.replication
configurable to shared
for the
Edge Server. For example:
p4 configure set commit#server.depot.root=/p4/depot/root
p4 configure set edge#server.depot.root=/p4/depot/root
p4 configure set edge#lbr.replication=shared
Explicitly promote shelves
You can explicitly promotes shelves by setting a configurable or by using a command.
Configurable | Command |
---|---|
Setting the This does NOT transfer shelves created on the Commit Server to the Edge Servers automatically. If you are using Helix Swarm on an Edge Server, automatic promotion is necessary. See "Configure the Helix Server to promote all shelved changes" under Helix Core Server configuration for Swarm in the Helix Swarm Guide. Setting |
Using the For example, given two Edge Servers,
|
Promotion is only required once
Subsequent p4 shelve
commands automatically
update the shelved changelist on the Commit Server and use server lock
protection.
For example, on edge1
, make changes and
refresh the shelved changelist by running:
p4 shelve -r -c 89
The updates can now be seen on edge2
by running:
p4 describe -S 89
Promoting shelves when unloading clients
Use the -p
option for the p4 unload
command to promote any non-promoted shelves belonging to the specified
client that is being unloaded. The shelf is promoted to the Commit Server
where it can be accessed by other Edge Servers.
Working with promoted shelves
You can:
- Delete the shelved files from the changelist, but you cannot unpromote a shelved changelist.
-
Unshelve a promoted shelf into open files and branches on a server other than the server where the shelf originated.
- Run
p4 submit -e
on a promoted shelf only on the server that owns the change. - Move a promoted shelf from one Edge Server to another using the
p4 unshelve
command.