SVN__InfoCommand.st
author fm
Mon, 19 Oct 2009 14:22:51 +0200
changeset 421 1dc9839f6fa3
parent 295 674f3df5ac0f
child 492 74ff0960961c
permissions -rw-r--r--
*** empty log message ***

"{ Package: 'stx:libsvn' }"

"{ NameSpace: SVN }"

nil subclass:#InfoCommand
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'SVN-Private-Commands'
!


!InfoCommand methodsFor:'executing - private'!

svnCmd
    "raise an error: must be redefined in concrete subclass(es)"

    ^'info'

    "Created: / 15-03-2008 / 21:56:01 / janfrog"
    "Modified: / 15-06-2009 / 12:06:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

svnCmdArgumentsOn:arg 
    "raise an error: must be redefined in concrete subclass(es)"

    arg 
        nextPut:'--xml'

    "Created: / 15-03-2008 / 21:56:01 / janfrog"
    "Modified: / 15-06-2009 / 12:18:12 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

svnParseXML: doc 
    ^ ((doc root childNodes 
        collect: [:entryNode | WCEntryInfo readFromXml: entryNode ]) 
            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: / 15-06-2009 / 12:23:17 / Jan Vrany <vranyj1@fel.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>"
! !

!InfoCommand class methodsFor:'documentation'!

version
    ^ '$Header$'
!

version_CVS
    ^ '$Header$'
!

version_SVN
    ^'§Id: SVN__InfoCommand.st 110 2009-08-19 13:21:10Z vranyj1 §'
! !