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

A workspace object that defines the attributes of an AccuRev workspace. AcWorkspace objects are instantiated during AcWorkspaces construction. More...

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

Public Member Functions

AcStream getBasis ()
 Get the basis (parent) stream for this workspace. More...
 
string ToString (string format, IFormatProvider provider)
 The ToString implementation. More...
 
Equality comparison
bool Equals (AcWorkspace other)
 IEquatable implementation to determine the equality of instances of type AcWorkspace. Uses the workspace ID number and depot to compare instances. More...
 
override bool Equals (object other)
 Overridden to determine equality. More...
 
override int GetHashCode ()
 Override appropriate for type AcWorkspace. More...
 

Internal Functions

 AcWorkspace ()
 Constructor used during AcWorkspaces list construction. It is called internally and not by user code. More...
 

Properties

string Name [get, set]
 Name of the workspace, e.g. MARS_DEV3_barnyrd More...
 
bool Hidden [get, set]
 True if the workspace has been removed (hidden), False if it is active. More...
 
string Location [get, set]
 Here Loc is the workspace location; the path on the machine where the workspace is located. Corresponds to the -l <location> used with the mkws command. Storage is the location on the Host where the elements physically reside. More...
 
string Storage [get, set]
 Location on the Host where the elements physically reside. More...
 
string Host [get, set]
 Machine name where the elements physically reside. More...
 
int ID [get, set]
 Workspace ID number. The same number as AcStream.ID when the stream object is a workspace. More...
 
AcDepot Depot [get, set]
 Depot the workspace is located in. More...
 
int TargetLevel [get, set]
 Current target level of the workspace. Also known as the target transaction level or target x-action. More...
 
int UpdateLevel [get, set]
 Current update level of the workspace. Also known as the workspace transaction level or x-action. More...
 
DateTime FileModTime [get, set]
 This property value is used in AccuRev's update algorithm while processing the update command. The value is stored and updated internally by AccuRev when the update operation succeeds. It is the date and time of the oldest non-member file in the workspace with (modified) status. If no such file exists, it is the date and time the update command was issued. More...
 
WsType Type [get, set]
 Type of workspace: standard, exclusive-file locking, anchor-required, or reference tree. More...
 
WsEOL EOL [get, set]
 End-of-line character in use by the workspace: platform-appropriate, Unix/Linux style, or Windows style. More...
 
AcPrincipal Principal [get, set]
 AccuRev principal who owns the workspace. More...
 

Order comparison

int CompareTo (AcWorkspace other)
 Generic IComparable implementation (default) for comparing AcWorkspace objects to sort by depot name and then workspace name. More...
 
int IComparable. CompareTo (object other)
 Pre-generic interface implementation for code using reflection. More...
 

Detailed Description

A workspace object that defines the attributes of an AccuRev workspace. AcWorkspace objects are instantiated during AcWorkspaces construction.

An AcWorkspace object contains the (additional) attributes of a workspace not found in its corresponding AcStream object when the stream object is a workspace. Unlike AcStreams, AcWorkspace objects are not instantiated during depot creation but done explicitly when needed.

Definition at line 73 of file AcWorkspaces.cs.

Constructor & Destructor Documentation

AcUtils.AcWorkspace.AcWorkspace ( )
inlinepackage

Constructor used during AcWorkspaces list construction. It is called internally and not by user code.

Definition at line 94 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspace.CompareTo().

Member Function Documentation

int AcUtils.AcWorkspace.CompareTo ( AcWorkspace  other)
inline

Generic IComparable implementation (default) for comparing AcWorkspace objects to sort by depot name and then workspace name.

Parameters
otherAn AcWorkspace object to compare with this instance.
Returns
Value indicating the relative order of the AcWorkspace objects being compared.
See also
AcWorkspaces constructor

Definition at line 147 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspace.CompareTo().

int IComparable. AcUtils.AcWorkspace.CompareTo ( object  other)
inlineprivate

Pre-generic interface implementation for code using reflection.

Parameters
otherAn AcWorkspace object to compare with this instance.
Returns
Return value of generic CompareTo(AcWorkspace) version.
Exceptions
ArgumentExceptionthrown if argument is not an AcWorkspace object.

Definition at line 168 of file AcWorkspaces.cs.

bool AcUtils.AcWorkspace.Equals ( AcWorkspace  other)
inline

IEquatable implementation to determine the equality of instances of type AcWorkspace. Uses the workspace ID number and depot to compare instances.

Parameters
otherThe AcWorkspace object being compared to this instance.
Returns
true if AcWorkspace other is the same, false otherwise.

Definition at line 105 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspace.Equals().

override bool AcUtils.AcWorkspace.Equals ( object  other)
inline

Overridden to determine equality.

Returns
Return value of generic Equals(AcWorkspace) version.

Definition at line 118 of file AcWorkspaces.cs.

AcStream AcUtils.AcWorkspace.getBasis ( )
inline

Get the basis (parent) stream for this workspace.

Returns
Basis AcStream object for this workspace or null if not found.

Definition at line 338 of file AcWorkspaces.cs.

override int AcUtils.AcWorkspace.GetHashCode ( )
inline

Override appropriate for type AcWorkspace.

Returns
Hash of workspace ID number and depot.

Definition at line 130 of file AcWorkspaces.cs.

string AcUtils.AcWorkspace.ToString ( string  format,
IFormatProvider  provider 
)
inline

The ToString implementation.

Parameters
formatThe format specifier to use, e.g. Console.WriteLine(workspace.ToString("L"));
providerAllow clients to format output for their own types using ICustomFormatter.
Returns
The formatted string.
Exceptions
FormatExceptionthrown if an invalid format string is specified.
Format specifiers:
  • G Name of the workspace, e.g. MARS_DEV3_barnyrd. Default when not using a format specifier.
  • LV Long version (verbose).
  • I Workspace ID number.
  • L Workspace location.
  • S Location on the host (storage) where the elements physically reside.
  • M Machine name (host) where the elements physically reside.
  • H True if the workspace is hidden, False otherwise.
  • D Depot name.
  • TL Target level: how up-to-date the workspace should be.
  • UL Update level: how up-to-date the workspace actually is.
  • U Time of the oldest non-member file in the workspace with (modified) status, otherwise the time the update command was issued.
  • T Workspace type: standard, exclusive-file locking, anchor-required, or reference tree.
  • E End-of-line character in use by the workspace: platform-appropriate, Unix/Linux style, or Windows style.
  • PI Workspace owner's principal ID number.
  • PN Workspace owner's principal name.

Definition at line 368 of file AcWorkspaces.cs.

Property Documentation

AcDepot AcUtils.AcWorkspace.Depot
getset
WsEOL AcUtils.AcWorkspace.EOL
getset

End-of-line character in use by the workspace: platform-appropriate, Unix/Linux style, or Windows style.

Definition at line 320 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspaces.storeWSpaces().

DateTime AcUtils.AcWorkspace.FileModTime
getset

This property value is used in AccuRev's update algorithm while processing the update command. The value is stored and updated internally by AccuRev when the update operation succeeds. It is the date and time of the oldest non-member file in the workspace with (modified) status. If no such file exists, it is the date and time the update command was issued.

Definition at line 302 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspaces.storeWSpaces().

bool AcUtils.AcWorkspace.Hidden
getset

True if the workspace has been removed (hidden), False if it is active.

Definition at line 191 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspaces.storeWSpaces().

string AcUtils.AcWorkspace.Host
getset

Machine name where the elements physically reside.

See also
AcWorkspace.Location

Definition at line 242 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspaces.storeWSpaces().

int AcUtils.AcWorkspace.ID
getset

Workspace ID number. The same number as AcStream.ID when the stream object is a workspace.

Definition at line 251 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspace.GetHashCode(), and AcUtils.AcWorkspaces.storeWSpaces().

string AcUtils.AcWorkspace.Location
getset

Here Loc is the workspace location; the path on the machine where the workspace is located. Corresponds to the -l <location> used with the mkws command. Storage is the location on the Host where the elements physically reside.

C:\Temp>net use W: \\machine_name_omitted\AcTriggers
C:\Temp>accurev mkws -w winTest -b AcTools -l w:\backup
C:\Temp>accurev show -fvx wspaces
...
<Element
Name="winTest_barnyrd"
Loc="w:/backup" <!-- subfolder of the AcTriggers share -->
Storage="/AcTriggers/backup"
Host="machine_name_omitted"
Stream="19"
depot="AcTools"
Target_trans="0"
Trans="0"
fileModTime="0"
Type="1"
EOL="0"
user_id="74"
user_name="barnyrd"/>

Definition at line 222 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspaces.storeWSpaces().

string AcUtils.AcWorkspace.Name
getset

Name of the workspace, e.g. MARS_DEV3_barnyrd

Definition at line 182 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspace.CompareTo(), and AcUtils.AcWorkspaces.storeWSpaces().

AcPrincipal AcUtils.AcWorkspace.Principal
getset

AccuRev principal who owns the workspace.

Definition at line 329 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspaces.storeWSpaces().

string AcUtils.AcWorkspace.Storage
getset

Location on the Host where the elements physically reside.

See also
AcWorkspace.Location

Definition at line 232 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspaces.storeWSpaces().

int AcUtils.AcWorkspace.TargetLevel
getset

Current target level of the workspace. Also known as the target transaction level or target x-action.

This value indicates how up-to-date the workspace should be; the transaction number of the depot's most recent transaction at the time of the last update operation.

Definition at line 274 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspaces.storeWSpaces().

WsType AcUtils.AcWorkspace.Type
getset

Type of workspace: standard, exclusive-file locking, anchor-required, or reference tree.

Definition at line 311 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspaces.storeWSpaces().

int AcUtils.AcWorkspace.UpdateLevel
getset

Current update level of the workspace. Also known as the workspace transaction level or x-action.

This value indicates how up-to-date the workspace actually is. Normally, it is the transaction number of the depot's most recent transaction at the time of the last update operation, known as the target level. However, if update failed this number will remain the same and not be updated to the same as the target level.

Definition at line 290 of file AcWorkspaces.cs.

Referenced by AcUtils.AcWorkspaces.storeWSpaces().