#!/usr/bin/env python #============================================================================== # Copyright and license info is available in the LICENSE file included with # the Server Deployment Package (SDP), and also available online: # https://swarm.workshop.perforce.com/projects/perforce-software-sdp/view/main/LICENSE #------------------------------------------------------------------------------ """ Usage: setlabelopts form-out label "/p4/common/bin/triggers/SetLabelOptions.py %formfile%" setlabelopts form-in label "/p4/common/bin/triggers/SetLabelOptions.py %formfile%" This script is designed to run as a form-in and form-out trigger on the server. It sets the autoreload option for static labels and doesn't allow the user to change it. """ from __future__ import print_function import sys def set_label_autoreload(formfile): with open(formfile) as f: content = f.read() content = content.replace("noautoreload", "autoreload") with open(formfile, "w") as f: f.write(content) if __name__ == "__main__": if len(sys.argv) < 2: print("Usage: SetLabelOptions.py <formfile>") sys.exit(0) set_label_autoreload(sys.argv[1]) sys.exit(0)
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 27331 | C. Thomas Tyler |
Released SDP 2020.1.27325 (2021/01/29). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#4 | 15856 | C. Thomas Tyler |
Replaced the big license comment block with a shortened form referencing the LICENSE file included with the SDP package, and also by the URL for the license file in The Workshop. |
||
#3 | 12974 | Russell C. Jackson (Rusty) | Changed all Python calls to use env | ||
#2 | 12104 | Russell C. Jackson (Rusty) | Updated date to 2015 | ||
#1 | 10148 | C. Thomas Tyler | Promoted the Perforce Server Deployment Package to The Workshop. |