AcUtils
A high performance abstraction layer for AccuRev
|
A container of AcLock objects that define the AccuRev locks that prevent certain users from making changes to streams. More...
Public Member Functions | |
bool | hasLock (string stream) |
Determine if stream has a lock on it. More... | |
async Task< bool > | lockAsync (string stream, string comment, LockKind kind=LockKind.all, AcPrincipal prncpl=null, OnlyExcept onlyexcept=OnlyExcept.Except) |
Put a lock on stream as per lock kind. More... | |
async Task< bool > | unlockAsync (string stream, LockKind kind=LockKind.all) |
Remove lock kind on stream. More... | |
Two-part object construction: | |
AcLocks () | |
A container of AcLock objects that define the AccuRev locks that prevent certain users from making changes to streams. More... | |
async Task< bool > | initAsync (AcDepot depot=null) |
Populate this container with AcLock objects on streams in depot or all AcLock objects in the repository. More... | |
async Task< bool > | initAsync (DepotsCollection depots) |
Populate this container with AcLock objects on streams in depots. More... | |
async Task< bool > | initAsync (StreamsCollection streams) |
Populate this container with AcLock objects on streams. More... | |
Private Member Functions | |
bool | initList (IEnumerable< XElement > query) |
Helper function that populates this container with AcLock objects as per query sent by an initAsync method. More... | |
A container of AcLock objects that define the AccuRev locks that prevent certain users from making changes to streams.
Definition at line 314 of file AcLocks.cs.
|
inline |
A container of AcLock objects that define the AccuRev locks that prevent certain users from making changes to streams.
Definition at line 359 of file AcLocks.cs.
|
inline |
Determine if stream has a lock
on it.
stream | Name of stream to query. |
Definition at line 545 of file AcLocks.cs.
|
inline |
Populate this container with AcLock objects on streams in depot or all AcLock objects in the repository.
depot | Limit the list of locks to those on depot only, otherwise null for all locks in the repository. |
AcUtilsException | caught and logged in %LOCALAPPDATA%\AcTools\Logs\<prog_name>-YYYY-MM-DD.log on show command failure. |
Exception | caught and logged in same on failure to handle a range of exceptions. |
show -fx locks
Definition at line 372 of file AcLocks.cs.
|
inline |
Populate this container with AcLock objects on streams in depots.
depots | Limit the list of locks to those on streams in depots only. Depot names in depots must match their respective AccuRev depot name exactly. |
AcUtilsException | caught and logged in %LOCALAPPDATA%\AcTools\Logs\<prog_name>-YYYY-MM-DD.log on show command failure. |
Exception | caught and logged in same on failure to handle a range of exceptions. |
show -fx locks
Definition at line 417 of file AcLocks.cs.
|
inline |
Populate this container with AcLock objects on streams.
streams | Limit the list of locks to those on streams only. Stream names in streams must match their respective AccuRev stream name exactly. |
AcUtilsException | caught and logged in %LOCALAPPDATA%\AcTools\Logs\<prog_name>-YYYY-MM-DD.log on show command failure. |
Exception | caught and logged in same on failure to handle a range of exceptions. |
show -fx locks
Definition at line 467 of file AcLocks.cs.
|
inlineprivate |
Helper function that populates this container with AcLock objects as per query sent by an initAsync method.
query | The query to iterate. |
Exception | caught and logged in %LOCALAPPDATA%\AcTools\Logs\<prog_name>-YYYY-MM-DD.log on failure to handle a range of exceptions. |
show -fx locks
XML attributes for stream name and LockKind always exist. Other attributes exist only if they have values. Definition at line 507 of file AcLocks.cs.
Referenced by AcUtils.AcLocks.initAsync().
|
inline |
Put a lock
on stream as per lock kind.
stream | Name of stream or workspace to lock. |
comment | Comment to be used for the lock. |
kind | Type of lock to apply: to, from, or all. |
prncpl | AccuRev principal name of user or group in the case of to or from lock. |
onlyexcept | Apply lock to prncpl only or to all except prncpl. |
AcUtilsException | caught and logged in %LOCALAPPDATA%\AcTools\Logs\<prog_name>-YYYY-MM-DD.log on lock command failure. |
lock -c <comment> [-kf [-e|-o prncpl] | -kt [-e|-o prncpl]] <stream>
lock
command can be used on a workspace stream but the same cannot be done using the AccuRev GUI client. AccuRev defect 23850. Definition at line 564 of file AcLocks.cs.
|
inline |
Remove lock
kind on stream.
stream | Name of stream or workspace to unlock. |
kind | Type of lock to remove: to, from, or all. |
AcUtilsException | caught and logged in %LOCALAPPDATA%\AcTools\Logs\<prog_name>-YYYY-MM-DD.log on unlock command failure. |
unlock [-kf | -kt] <stream>
Definition at line 604 of file AcLocks.cs.