## p4get-replicationtopology ## aaron bockelie function p4get-replicationTopology {param($clusterName,[switch]$all) if (!$env:depotsxml) { write-error "Could not locate depots.xml configuration file." break } $static = ([xml](gc $env:depotsxml)) if ($all) { $static.perforce.cluster } else { if ($clusterName) { $result = $static.perforce.cluster | ?{$_.name -match $clusterName} if ($result) { $result } else { write-error "No cluster found named $clusterName" } } else { if ($env:p4server) { $result = $static.perforce.cluster | ?{$_.name -eq ($static.perforce.depot | ?{$_.name -eq $env:p4server}).clusterName} if ($result) { $result } } else { write-warning "Not logged in via p4login. Returning topology of all replica groups." $static.perforce.cluster } } } }
# | 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. |