author | fm |
Thu, 08 Oct 2009 14:03:59 +0200 | |
changeset 349 | 9d4ff7591589 |
parent 139 | 04fc02f6bb12 |
child 448 | 8c30a64870e5 |
permissions | -rw-r--r-- |
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 |
||
13 |
!ListCommand class methodsFor:'executing'! |
|
14 |
||
15 |
list: url |
|
16 |
^ (self new) |
|
17 |
url: url; |
|
18 |
execute |
|
19 |
||
20 |
"Created: / 19-03-2008 / 08:27:10 / janfrog" |
|
21 |
"Modified: / 19-08-2009 / 13:28:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
22 |
! ! |
|
23 |
||
24 |
!ListCommand methodsFor:'accessing'! |
|
25 |
||
26 |
recursive |
|
27 |
^ recursive ? false |
|
28 |
||
29 |
"Created: / 15-03-2008 / 20:56:05 / janfrog" |
|
30 |
! |
|
31 |
||
32 |
recursive:aBoolean |
|
33 |
recursive := aBoolean. |
|
34 |
||
35 |
"Created: / 15-03-2008 / 20:56:05 / janfrog" |
|
36 |
! |
|
37 |
||
38 |
url |
|
39 |
^ url ifNil:[ branch url] |
|
40 |
||
41 |
"Modified: / 19-08-2009 / 13:28:35 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
42 |
! |
|
43 |
||
44 |
url:aString |
|
45 |
url := aString. |
|
46 |
! ! |
|
47 |
||
48 |
!ListCommand methodsFor:'executing - private'! |
|
49 |
||
50 |
svnCmd |
|
51 |
"raise an error: must be redefined in concrete subclass(es)" |
|
52 |
||
53 |
^'list' |
|
54 |
||
55 |
"Created: / 15-03-2008 / 21:03:32 / janfrog" |
|
56 |
! |
|
57 |
||
58 |
svnCmdArgumentsOn: argStream |
|
59 |
self recursive ifTrue: [ argStream nextPut: '--recursive' ]. |
|
60 |
argStream |
|
61 |
nextPut: '-r'; |
|
62 |
nextPut: self revision printString; |
|
63 |
nextPut: '--xml'; |
|
64 |
nextPut: self url asString |
|
65 |
||
66 |
"Created: / 15-03-2008 / 21:21:11 / janfrog" |
|
67 |
"Modified: / 16-03-2008 / 07:38:11 / janfrog" |
|
68 |
"Modified: / 19-04-2008 / 13:57:44 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
69 |
! |
|
70 |
||
71 |
svnParseXML: doc |
|
72 |
^ (doc root / 'list' / 'entry') asCollection |
|
73 |
collect: [:entryNode | RepositoryEntry readFromXml: entryNode ] |
|
74 |
||
75 |
"Created: / 19-04-2008 / 13:56:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
76 |
"Modified: / 19-08-2009 / 09:05:49 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
77 |
! |
|
78 |
||
79 |
svnProcessCommandOutput:out err:err |
|
80 |
^ self svnParseXML:((XML::XMLParser on:out) |
|
81 |
validate:false; |
|
82 |
scanDocument) |
|
83 |
||
84 |
"Created: / 03-10-2008 / 16:31:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
85 |
! ! |
|
86 |
||
87 |
!ListCommand class methodsFor:'documentation'! |
|
88 |
||
89 |
version |
|
90 |
^ '$Header$' |
|
139 | 91 |
! |
92 |
||
93 |
version_CVS |
|
94 |
^ '$Header$' |
|
95 |
! |
|
96 |
||
97 |
version_SVN |
|
349
9d4ff7591589
update #version_SVN with § as keyword expansion character
fm
parents:
139
diff
changeset
|
98 |
^'§Id: SVN__ListCommand.st 110 2009-08-19 13:21:10Z vranyj1 §' |
91 | 99 |
! ! |