AcUtils
A high performance abstraction layer for AccuRev
Public Member Functions | List of all members
AcUtils.AcStreams Class Reference

A container of AcStream objects that define AccuRev streams. AcStream objects are instantiated during AcDepot and AcDepots construction. More...

Collaboration diagram for AcUtils.AcStreams:
Collaboration graph
[legend]

Public Member Functions

AcStream getStream (string name)
 Get the AcStream object for stream name. More...
 

Internal Functions

Two-part object construction:
 AcStreams (bool dynamicOnly, bool includeHidden)
 A container of AcStream objects that define AccuRev streams. AcStream objects are instantiated during AcDepot and AcDepots construction. This constructor is called internally and not by user code. More...
 
async Task< bool > initAsync (AcDepot depot, string listfile=null)
 Populate this container with AcStream objects as per constructor parameters. AcStream objects are instantiated during AcDepot and AcDepots construction. This function is called internally and not by user code. More...
 

Detailed Description

A container of AcStream objects that define AccuRev streams. AcStream objects are instantiated during AcDepot and AcDepots construction.

Definition at line 375 of file AcStreams.cs.

Constructor & Destructor Documentation

AcUtils.AcStreams.AcStreams ( bool  dynamicOnly,
bool  includeHidden 
)
inlinepackage

A container of AcStream objects that define AccuRev streams. AcStream objects are instantiated during AcDepot and AcDepots construction. This constructor is called internally and not by user code.

Parameters
dynamicOnlytrue for dynamic streams only, false for all stream types.
includeHiddentrue to include hidden (removed) streams, otherwise do not include hidden streams.
// get streams and workspaces in the repository with DEV3 in their name that have a default group
AcDepots depots = new AcDepots(); // two-part object construction
if (!(await depots.initAsync())) return false; // operation failed, check log file
foreach(AcDepot depot in depots.OrderBy(n => n))
{
IEnumerable<AcStream> filter = depot.Streams.Where(n => n.Name.Contains("DEV3") && n.HasDefaultGroup == true);
foreach (AcStream stream in filter.OrderBy(n => n))
Console.WriteLine(stream.ToString("lv") + Environment.NewLine);
}
See also
initAsync, default comparer

Definition at line 406 of file AcStreams.cs.

Member Function Documentation

AcStream AcUtils.AcStreams.getStream ( string  name)
inline

Get the AcStream object for stream name.

Parameters
nameName of stream to query.
Returns
AcStream object for stream name, otherwise null if not found.

Definition at line 497 of file AcStreams.cs.

async Task<bool> AcUtils.AcStreams.initAsync ( AcDepot  depot,
string  listfile = null 
)
inlinepackage

Populate this container with AcStream objects as per constructor parameters. AcStream objects are instantiated during AcDepot and AcDepots construction. This function is called internally and not by user code.

Parameters
depotThe depot for which streams will be created.
listfileList file %APPDATA%\AcTools\<prog_name>\<depot_name>.streams for the show -l <list-file> streams command if found, otherwise null.
Example: "C:\Users\barnyrd\AppData\Roaming\AcTools\FooApp\NEPTUNE.streams".
Returns
true if initialization succeeded, false otherwise.
Exceptions
AcUtilsExceptioncaught and logged in %LOCALAPPDATA%\AcTools\Logs\<prog_name>-YYYY-MM-DD.log on show command failure.
Exceptioncaught and logged in %LOCALAPPDATA%\AcTools\Logs\<prog_name>-YYYY-MM-DD.log on failure to handle a range of exceptions.
See also
AcStreams constructor
show command:
show <-fxig|-fxg> -p <depot> [-l listfile] streams
AccuNote:
The following XML attributes from show -fx -p <depot> streams may exist depending on the version of AccuRev in use. They are used internally by AccuRev and are not intended for customer usage. Micro Focus incident #3132463.
  • eventStream: Efficient way to determine if the server process needs to fire the event trigger processing.
  • eventStreamHWM: Used by GitCentric to track the high watermark for synchronization.
  • hasProperties: Efficient way for the GUI to determine if the property icon is displayed in the StreamBrowser.

Definition at line 435 of file AcStreams.cs.

Referenced by AcUtils.AcDepot.initAsync(), and AcUtils.AcDepots.initAsync().