SVN__StatusCommand.st
author fm
Mon, 19 Oct 2009 14:52:48 +0200
changeset 492 74ff0960961c
parent 477 76a616efa545
child 742 4843e1571574
permissions -rw-r--r--
*** empty log message ***

"{ Package: 'stx:libsvn' }"

"{ NameSpace: SVN }"

WCPathCommand subclass:#StatusCommand
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'SVN-Private-Commands'
!


!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$'
!

version_CVS
    ^ '$Header$'
!

version_SVN
    ^'§Id: SVN__StatusCommand.st 113 2009-08-28 11:43:01Z vranyj1 §'
! !