91
|
1 |
"{ Package: 'cvut:stx/goodies/libsvn' }"
|
|
2 |
|
|
3 |
"{ NameSpace: SVN }"
|
|
4 |
|
|
5 |
BranchCommand subclass:#ListCommand
|
|
6 |
instanceVariableNames:'url recursive'
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'SVN-Private-Commands'
|
|
10 |
!
|
|
11 |
|
|
12 |
!ListCommand class methodsFor:'documentation'!
|
|
13 |
|
|
14 |
version_SVN
|
|
15 |
^'$Id$'
|
|
16 |
! !
|
|
17 |
|
|
18 |
!ListCommand class methodsFor:'executing'!
|
|
19 |
|
|
20 |
list: url
|
|
21 |
^ (self new)
|
|
22 |
url: url;
|
|
23 |
execute
|
|
24 |
|
|
25 |
"Created: / 19-03-2008 / 08:27:10 / janfrog"
|
|
26 |
"Modified: / 19-08-2009 / 13:28:59 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
27 |
! !
|
|
28 |
|
|
29 |
!ListCommand methodsFor:'accessing'!
|
|
30 |
|
|
31 |
recursive
|
|
32 |
^ recursive ? false
|
|
33 |
|
|
34 |
"Created: / 15-03-2008 / 20:56:05 / janfrog"
|
|
35 |
!
|
|
36 |
|
|
37 |
recursive:aBoolean
|
|
38 |
recursive := aBoolean.
|
|
39 |
|
|
40 |
"Created: / 15-03-2008 / 20:56:05 / janfrog"
|
|
41 |
!
|
|
42 |
|
|
43 |
url
|
|
44 |
^ url ifNil:[ branch url]
|
|
45 |
|
|
46 |
"Modified: / 19-08-2009 / 13:28:35 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
47 |
!
|
|
48 |
|
|
49 |
url:aString
|
|
50 |
url := aString.
|
|
51 |
! !
|
|
52 |
|
|
53 |
!ListCommand methodsFor:'executing - private'!
|
|
54 |
|
|
55 |
svnCmd
|
|
56 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
57 |
|
|
58 |
^'list'
|
|
59 |
|
|
60 |
"Created: / 15-03-2008 / 21:03:32 / janfrog"
|
|
61 |
!
|
|
62 |
|
|
63 |
svnCmdArgumentsOn: argStream
|
|
64 |
self recursive ifTrue: [ argStream nextPut: '--recursive' ].
|
|
65 |
argStream
|
|
66 |
nextPut: '-r';
|
|
67 |
nextPut: self revision printString;
|
|
68 |
nextPut: '--xml';
|
|
69 |
nextPut: self url asString
|
|
70 |
|
|
71 |
"Created: / 15-03-2008 / 21:21:11 / janfrog"
|
|
72 |
"Modified: / 16-03-2008 / 07:38:11 / janfrog"
|
|
73 |
"Modified: / 19-04-2008 / 13:57:44 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
74 |
!
|
|
75 |
|
|
76 |
svnParseXML: doc
|
|
77 |
^ (doc root / 'list' / 'entry') asCollection
|
|
78 |
collect: [:entryNode | RepositoryEntry readFromXml: entryNode ]
|
|
79 |
|
|
80 |
"Created: / 19-04-2008 / 13:56:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
81 |
"Modified: / 19-08-2009 / 09:05:49 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
82 |
!
|
|
83 |
|
|
84 |
svnProcessCommandOutput:out err:err
|
|
85 |
^ self svnParseXML:((XML::XMLParser on:out)
|
|
86 |
validate:false;
|
|
87 |
scanDocument)
|
|
88 |
|
|
89 |
"Created: / 03-10-2008 / 16:31:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
90 |
! !
|
|
91 |
|
|
92 |
!ListCommand class methodsFor:'documentation'!
|
|
93 |
|
|
94 |
version
|
|
95 |
^ '$Header$'
|
|
96 |
! !
|