52
|
1 |
"{ Package: 'cvut:stx/goodies/libsvn' }"
|
|
2 |
|
|
3 |
"{ NameSpace: SVN }"
|
|
4 |
|
|
5 |
WCPathCommand subclass:#InfoCommand
|
|
6 |
instanceVariableNames:''
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'SVN-Private-Commands'
|
|
10 |
!
|
|
11 |
|
|
12 |
!InfoCommand class methodsFor:'documentation'!
|
|
13 |
|
|
14 |
version_SVN
|
|
15 |
^'$Id$'
|
|
16 |
! !
|
|
17 |
|
|
18 |
!InfoCommand methodsFor:'executing - private'!
|
|
19 |
|
|
20 |
svnCmd
|
|
21 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
22 |
|
|
23 |
^'info'
|
|
24 |
|
|
25 |
"Created: / 15-03-2008 / 21:56:01 / janfrog"
|
|
26 |
"Modified: / 15-06-2009 / 12:06:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
27 |
!
|
|
28 |
|
|
29 |
svnCmdArgumentsOn:arg
|
|
30 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
31 |
|
|
32 |
arg
|
|
33 |
nextPut:'--xml'
|
|
34 |
|
|
35 |
"Created: / 15-03-2008 / 21:56:01 / janfrog"
|
|
36 |
"Modified: / 15-06-2009 / 12:18:12 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
37 |
!
|
|
38 |
|
|
39 |
svnParseXML: doc
|
|
40 |
^ ((doc root childNodes
|
|
41 |
collect: [:entryNode | WCEntryInfo readFromXml: entryNode ])
|
|
42 |
asSortedCollection: [:a :b | a path < b path ]) asOrderedCollection
|
|
43 |
|
|
44 |
"Created: / 15-03-2008 / 22:05:01 / janfrog"
|
|
45 |
"Modified: / 16-03-2008 / 08:44:49 / janfrog"
|
|
46 |
"Modified: / 15-06-2009 / 12:23:17 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
47 |
!
|
|
48 |
|
|
49 |
svnProcessCommandOutput:out err:err
|
|
50 |
^ self svnParseXML:((XML::XMLParser on:out)
|
|
51 |
validate:false;
|
|
52 |
scanDocument)
|
|
53 |
|
|
54 |
"Created: / 03-10-2008 / 16:31:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
55 |
! !
|
|
56 |
|
|
57 |
!InfoCommand class methodsFor:'documentation'!
|
|
58 |
|
|
59 |
version
|
|
60 |
^ '$Header$'
|
|
61 |
! !
|