initial checkin
authorClaus Gittinger <cg@exept.de>
Wed, 22 Nov 2006 13:45:37 +0100
changeset 3 42cf15cf22a9
parent 2 af9d766a7b67
child 4 3638e3e1e224
initial checkin
MCWorkingAncestry.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MCWorkingAncestry.st	Wed Nov 22 13:45:37 2006 +0100
@@ -0,0 +1,53 @@
+"{ Package: 'stx:goodies/monticello' }"
+
+MCAncestry subclass:#MCWorkingAncestry
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Monticello-Versioning'
+!
+
+MCWorkingAncestry comment:'The interim record of ancestry for a working copy, gets merged version added to the ancestry, and is used to create the VersionInfo when the working copy becomes a version. '
+!
+
+
+!MCWorkingAncestry methodsFor:'as yet unclassified'!
+
+addAncestor: aNode
+	ancestors _ (self ancestors reject: [:each | aNode hasAncestor: each])
+		copyWith: aNode
+!
+
+addStepChild: aVersionInfo
+	stepChildren _ stepChildren copyWith: aVersionInfo
+!
+
+date
+	^ Date today
+!
+
+infoWithName: nameString message: messageString
+	^ MCVersionInfo
+		name: nameString
+		id: UUID new
+		message: messageString
+		date: Date today
+		time: Time now
+		author: Utilities authorInitials
+		ancestors: ancestors asArray
+		stepChildren: self stepChildren asArray
+!
+
+name
+	^ '<working copy>'
+!
+
+summary
+	^ 'Ancestors: ', self ancestorString
+! !
+
+!MCWorkingAncestry class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCWorkingAncestry.st,v 1.1 2006-11-22 12:45:37 cg Exp $'
+! !