## p4sudo ## Aaron Bockelie function p4sudo {param($depot,$depotxml) if (!$depotxml) { $depotxml = $env:depotsxml } else { $depotxml = ".\depots.xml" } try { $xml = [xml](gc $depotxml) } catch { $message = "Cound not find depot xml file `'" + $depotxml + "`'. Edit function to static define location or specify manually with -depotxml switch." write-error $message -category ObjectNotFound -ErrorAction Stop } if ($depot) { if ($xml) { $depot = $xml.perforce.depot | ?{$_.name -eq $depot} if ($depot) { p4loginhash -server $depot.name -port $depot.port -username $depot.username -password $depot.passwordhash } else { write-error "The requested depot is not valid." } } } else { if ($xml) { write-host "This is a list of depots you may log into:`r`n`r`n" write-host (" " + ($xml.perforce.depot | %{$_.name + "`r`n"})) } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 8423 | Aaron Bockelie |
Fixes and changes. Ported from a private depot, not listing specific changes at this point. |
||
#1 | 8410 | Aaron Bockelie |
Root checkin, Perforce Powershell wrapper. Still lots of work to be done, namely documentation and deployment tools, for instance, get-help needs work on the majority of these tools. Additionally, the /lib structure needs a little bit of condensation, probably into major groups (depot, userspec, clientspec, group management, and so on) that way function family can exist under each resource. |