DocBook|Search
Class Reference
%Studio.SourceControl.Change
   
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%Studio] >  [SourceControl] >  [Change]
Private  Storage  

persistent class %Studio.SourceControl.Change extends %Persistent

Class for storing changes to environment

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 15 13 1


Summary

Properties
Action ActivelyCommitted BackupName CCR
ChangedBy Committed CommittedTime CommittedTimeDisplay
ExternalName InternalName ItemFile Name
P4Issued Source UpdatedTime

Methods
%%OIDGet %AddToSaveSet %AddToSyncSet %BMEBuilt
%BuildIndices %CheckUnique %ClassIsLatestVersion %ClassName
%ComposeOid %ConstructClone %Delete %DeleteExtent
%DeleteId %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%Exists %ExistsId %Extends %GUID
%GUIDSet %GetLock %GetParameter %GetSwizzleObject
%Id %InsertBatch %IsA %IsModified
%KillExtent %KillExtentData %LoadFromMemory %LockExtent
%LockId %New %NormalizeObject %ObjectModified
%Oid %OnBeforeAddToSync %OnDetermineClass %Open
%OpenId %OriginalNamespace %PackageName %PhysicalAddress
%PurgeIndices %Reload %RemoveFromSaveSet %ResolveConcurrencyConflict
%RollBack %Save %SaveDirect %SaveIndices
%SerializeObject %SetModified %SortBegin %SortEnd
%SyncObjectIn %SyncTransport %UnlockExtent %UnlockId
%ValidateObject DisplayUncommitted GetUncommitted InstanceVersion
IsUncommitted ListUncommitted OpenUncommitted RefreshUncommitted
RemoveAllUncommitted RemoveUncommitted SetUncommitted UpdateUncommitted


Parameters

• parameter MANAGEDEXTENT = 0;
The MANAGEDEXTENT parameter can be set to 0 (zero) to cause the Extent Manager to ignore this class. If set to 1 then the Extent Manager will register globals used by the class and detect collisions. Unmanaged extents (MANAGEDEXTENT = 0) are not checked. Currently, only classes using default storage (%Library.CacheStorage) can be managed. This is required since each Namespace will have it's own Change extent
• parameter SrcVer = "$Id: //dev/2012.2.1/databases/sys/cls/Studio/SourceControl/Change.xml#1 $";
This Parameter should be updated when synced from Perforce
• parameter Version = 18;
Revision number of this class when compiled as part of the //custom_ccrs/_common/config/... branch. This version will not be updated (by design) when the class is integrated to other branches. This allows the user to tell what version of the Studio client tools are in use.

Properties

• property Action as %String(VALUELIST=",add,edit,predelete,delete,revert") [ Required ];
Action for this change
• property ActivelyCommitted as %Boolean [ InitialExpression = 0 ];
Flag indicating whether or not this change was committed to Perforce via Source/Change control tools. If ActivelyCommitted = 0 for a committed change, then it might have been either reverted or committed directly by a Perforce client and the Perforce history should be checked to see whether or not it was committed
• property BackupName as %String [ Calculated ];
Returns the name of the backup file for this Item in the file system
• property CCR as %String;
When this change was first created, this CCR was associated with it for tracking purposes (optional field)
• property ChangedBy as %String;
User who made this change, and for uncommitted changes this is the person who has it "checked out"
• property Committed as %Boolean [ InitialExpression = 0,Required ];
Flag indicating whether or not this change has been committed to Perforce
• property CommittedTime as %TimeStamp [ InitialExpression = $zdt("0,0",3) ];
Time when this change was committed to Perforce (either via an ItemSet, the Studio CheckIn page or through a P4V)

this value should be set in the form $zdt($H,3) (i.e. "0000-00-00 00:00:00" format)

• property CommittedTimeDisplay as %String [ Calculated ];
Display the CommittedTime field, showing "Uncommitted" for changes that have not yet been committed
• property ExternalName as %String [ Calculated ];
Returns the name of this Item in the file system
• property InternalName as %String(MAXLEN=200);
Name used within instance to refer to this changed item
• property ItemFile as %String(MAXLEN=500) [ Required ];
Location where this item is stored on disk
• property Name as %String(MAXLEN=200);
Human readable Name referring to this changed item. This will default to the value if InternalName unless it is explicitly set
• property P4Issued as %TimeStamp;
Time of when the P4 command was issued to Perforce NOTE - a change can have a non-null P4Issued and still have Committed=0 because a 'p4 edit' will check it out but it is not committed until 'p4 submit'
• property Source as %String(VALUELIST=",studio,terminal,trakcare") [ InitialExpression = "studio" ];
Utility by which this change was made
• property UpdatedTime as %TimeStamp [ InitialExpression = $zdt($H,3) ];
Last time this change was saved locally

Methods

• classmethod DisplayUncommitted(UncommittedList, IncludeRevert=0) as %Status
Displays a list of Uncommitted items from the Uncommitted queue to the output device

Only lists items with action of type 'revert' if the IncludeRevert flag is passed as true

• classmethod GetUncommitted(Filename, ByRef Action, ByRef InternalName, ByRef ChangedBy, ByRef Source, ByRef Updated, ByRef P4Issued, ByRef CCR, ByRef Name) as %Status
Retrieves the details from the Uncommitted queue of an Uncommitted item
• classmethod InstanceVersion() as %Numeric
Returns value the Major.Minor version for this instance, so it can be used in comparison code which makes sure certain features are used in appropriate versions
• classmethod IsUncommitted(Filename, ByRef ID) as %Boolean
Returns Boolean value indicating whether or not an item is Uncommitted
• classmethod ListUncommitted(ByRef UncommittedList="", IncludeRevert=0, RefreshUncommitted=1) as %Status
Lists the Uncommitted items from the Uncommitted queue

Only lists items with action of type 'revert' if the IncludeRevert flag is passed as true

• classmethod OpenUncommitted(Filename) as %Studio.SourceControl.Change
Returns uncommited change object
• classmethod RefreshUncommitted(Display=1, IncludeRevert=0) as %Status
Goes through Uncommitted queue and removes any items of action 'edit' or 'add' which are ReadOnly or non-existent on the filesystem
• classmethod RemoveAllUncommitted(Display=1, IncludeRevert=1) as %Status
Removes all Uncommitted items from the Uncommitted queue
• classmethod RemoveUncommitted(FileList, Display=1, Revert=0, ActiveCommit=1, CommitCCR) as %Status
Removes an Uncommitted item from the Uncommitted queue and changes the exported file to Reaonly (except for reverts of Adds, or new CSP files within the Perforce root)

Default assumed behavior is that the the change was not reverted, and that it was actively committed to Perforce

If the method calling does not know whether it was reverted or committed to Perforce, then it should pass Revert = 0 and ActiveCommit = 0, indicating that the change might have been reverted and the Perforce history should be checked for the definitive answer.

The 'Revert', 'ActiveCommit', and CommitCCR arguments only impact the behavior if ^SYS("SourceControl","ChangeConfig","KeepHistory")=1, which means Change objects should have their Committed flag set to 1 and be saved for historical reference, rather than just deleting the Change objects when RemoveUncommitted() is called.

• classmethod SetUncommitted(Filename, Action, InternalName, ChangedBy, Source, P4Issued As %Boolean, CCR, Name, EnforceSourcesPath=1) as %Status
Sets the details for a new Uncommitted item into the Uncommitted queue
• classmethod UpdateUncommitted(Filename, Action, InternalName, ChangedBy, Source, Updated, P4Issued, CCR, Name) as %Status
Update the details for an Uncommitted item in the Uncommitted queue

Indices

• index (ChangeList on ItemFile,CommittedTime) [Data = Action,Unique];