initial checkin
authorfm
Wed, 23 Sep 2009 18:46:17 +0200
changeset 37 731911a0c402
parent 36 d47a62a748e9
child 38 b9b3325a6b5d
initial checkin
SVN__RepositoryEntry.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SVN__RepositoryEntry.st	Wed Sep 23 18:46:17 2009 +0200
@@ -0,0 +1,61 @@
+"{ Package: 'cvut:stx/goodies/libsvn' }"
+
+"{ NameSpace: SVN }"
+
+Entry subclass:#RepositoryEntry
+	instanceVariableNames:'size branch'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'SVN-Repository'
+!
+
+!RepositoryEntry class methodsFor:'documentation'!
+
+version_SVN
+    ^'$Id$'
+! !
+
+!RepositoryEntry class methodsFor:'instance creation'!
+
+readFromXml: anXMLNode
+
+    ^self new readFromXml: anXMLNode
+
+    "Created: / 18-08-2009 / 17:24:10 / Jan Vrany <vranyj1@fel.cvut.cz>"
+    "Modified: / 19-08-2009 / 08:51:48 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!RepositoryEntry methodsFor:'accessing'!
+
+branch
+    ^ branch
+! !
+
+!RepositoryEntry methodsFor:'initialization'!
+
+readFromXml: anXMLNode
+
+    kind := (NodeKind withName: anXMLNode @ 'kind').
+    path := (anXMLNode / 'name') characterData.
+    revision := Revision number: ((anXMLNode / 'commit' ) first @ 'revision').
+    date := Timestamp readISO8601From: (anXMLNode / 'commit' / 'date') characterData.
+    author := (anXMLNode / 'commit' / 'author') characterData.
+    size := (anXMLNode / 'size') characterData.
+    size isNilOrEmptyCollection ifFalse:[size := size asInteger]
+
+    "Created: / 19-08-2009 / 08:52:10 / Jan Vrany <vranyj1@fel.cvut.cz>"
+    "Modified: / 19-08-2009 / 15:07:46 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
+setBranch: aBranch
+
+    branch := aBranch
+
+    "Created: / 18-08-2009 / 13:15:16 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!RepositoryEntry class methodsFor:'documentation'!
+
+version
+    ^ '$Header$'
+! !