#
# File: P4BSMenus
#
# Contains: A script to build a menu of commonly used Perforce P4 commands
#
# Version:
#
# Copyright: 1999 by Andy Bachorski, all rights reserved.
#
# File Ownership:
#
# DRI: Andy Bachorski
#
# Other Contact: xxx put other contact here xxx
#
# Technology: Perforce p4
#
# Writers:
#
# (afb) Andy Bachorski
#
# Change History (most recent first):
#
# <2> 11/24/99 afb Added List Changes menu item
# <1> 11/7/99 afb First checked in.
#
### Delete the current P4 menu (if it exists)
Set debug 0
set exit 0
if {debug}
set echo 1
end
DeleteMenu P4 dev:null
# DeleteMenu "P4" dev:null
### Now add some menus
## First, a Client settings sub-menu
AddMenu P4 'Client Settings' ''
DeleteMenu ClientSub dev:null
AddMenu ClientSub 'Send Settings To Server' "P4 client -i < "{P4BSConfigItems}P4BSClientSettings""
AddMenu ClientSub 'Open Settings File' "open ""{P4BSConfigItems}P4BSClientSettings"""
AddMenu ClientSub 'Show Settings' 'echo "# P4 Client Settings:"; P4 client -o'
Addmenu ClientSub '(-' ''
# AddMenu ClientSub 'Update Settings File' "P4 client -o > ""{P4BSConfigItems}P4BSClientSettings"""
# Addmenu ClientSub '(-' ''
AddMenu ClientSub 'Help - Client Commands' "P4 help client"
## Link sub-menu to main menu
AddMenu -link P4 'Client Settings' ClientSub
## Next, a User settings sub-menu
AddMenu P4 'User Settings' ''
DeleteMenu UserSub dev:null
AddMenu UserSub 'Send Settings To Server' "P4 user -i < "{P4BSConfigItems}P4BSUserSettings""
AddMenu UserSub 'Open Settings File' "open "{P4BSConfigItems}P4BSUserSettings""
AddMenu UserSub 'Show Settings' 'echo "# P4 User Settings:"; P4 user -o'
# Addmenu UserSub '(-' ''
# AddMenu UserSub 'Update Settings File' "P4 user -o > "{P4BSConfigItems}P4BSUserSettings""
Addmenu UserSub '(-' ''
AddMenu UserSub 'Help - User Commands' "P4 help user"
## Link sub-menu to main menu
AddMenu -link P4 'User Settings' UserSub
Addmenu P4 '(-' ''
AddMenu P4 "List Depots" 'echo "# Depot List:"; p4 depots'
AddMenu P4 "List Changes" 'echo "# Change List:"; p4 changes'
Addmenu P4 '(-' ''
## Help menu - should be last in main menu
AddMenu P4 'Help' ''
DeleteMenu HelpSub dev:null
AddMenu HelpSub 'General' "P4 help"
Addmenu HelpSub '(-' ''
AddMenu HelpSub 'Common Commands' "P4 help simple"
AddMenu HelpSub 'All Commands' "P4 help commands"
Addmenu HelpSub "(-" ''
AddMenu HelpSub "File Types" "P4 help filetypes"
AddMenu HelpSub "View Syntax" "P4 help views"
AddMenu HelpSub "Jobview Syntax" "P4 help jobview"
AddMenu HelpSub "Specifying File Revisions" "P4 help revisions"
AddMenu HelpSub "Generic CL Arguments" "P4 help usage"
Addmenu HelpSub "(-" ''
AddMenu HelpSub "Client" "P4 help client"
AddMenu HelpSub "User" "P4 help user"
## Link sub-menu to main menu
AddMenu -link P4 'Help' HelpSub
Addmenu P4 '(-' ''
## A P4BS utility menu
AddMenu P4 'P4 Utilities' ''
DeleteMenu P4BSUtilSub dev:null
AddMenu P4BSUtilSub 'Environment Info' 'echo "# P4 Environment Info"; P4 info'
Addmenu P4BSUtilSub '(-' ''
AddMenu P4BSUtilSub 'Rebuild Menu' "execute "{P4BSConfigItems}P4BSMenus""
## Link sub-menu to main menu
AddMenu -link P4 'P4 Utilities' P4BSUtilSub
if {debug}
set echo 0
end