initial checkin
authorfm
Wed, 23 Sep 2009 18:46:30 +0200
changeset 39 e8b70684885f
parent 38 b9b3325a6b5d
child 40 aacce9a6ec9d
initial checkin
SVN__StatusCommand.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SVN__StatusCommand.st	Wed Sep 23 18:46:30 2009 +0200
@@ -0,0 +1,64 @@
+"{ Package: 'cvut:stx/goodies/libsvn' }"
+
+"{ NameSpace: SVN }"
+
+WCPathCommand subclass:#StatusCommand
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'SVN-Private-Commands'
+!
+
+!StatusCommand class methodsFor:'documentation'!
+
+version_SVN
+    ^'$Id$'
+! !
+
+!StatusCommand methodsFor:'executing - private'!
+
+svnCmd
+    "raise an error: must be redefined in concrete subclass(es)"
+
+    ^'status'
+
+    "Created: / 15-03-2008 / 21:56:01 / janfrog"
+!
+
+svnCmdArgumentsOn:arg 
+    "raise an error: must be redefined in concrete subclass(es)"
+
+    arg 
+        nextPut:'--xml';
+        nextPut:'--verbose'
+
+    "Created: / 15-03-2008 / 21:56:01 / janfrog"
+!
+
+svnParseXML: doc
+
+    ^((doc root childNodes anyOne childNodes
+        collect:
+            [:entryNode|
+            (WCEntry readFromXml: entryNode) wc: workingCopy; yourself]) asSortedCollection:[:a :b|a path < b path])
+            asOrderedCollection
+
+    "Created: / 15-03-2008 / 22:05:01 / janfrog"
+    "Modified: / 16-03-2008 / 08:44:49 / janfrog"
+    "Modified: / 18-08-2009 / 14:28:44 / Jan Vrany <vranyj1@fel.cvut.cz>"
+    "Modified: / 27-08-2009 / 09:51:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+svnProcessCommandOutput:out err:err 
+    ^ self svnParseXML:((XML::XMLParser on:out)
+                validate:false;
+                scanDocument)
+
+    "Created: / 03-10-2008 / 16:31:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!StatusCommand class methodsFor:'documentation'!
+
+version
+    ^ '$Header$'
+! !