author | convert-repo |
Tue, 09 Aug 2016 03:35:30 +0000 | |
changeset 1178 | 3a6dad9479fd |
parent 824 | f8a52ef83887 |
permissions | -rw-r--r-- |
695 | 1 |
" |
2 |
Copyright (c) 2007-2010 Jan Vrany |
|
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
4 |
||
5 |
Permission is hereby granted, free of charge, to any person |
|
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
25 |
" |
|
448 | 26 |
"{ Package: 'stx:libsvn' }" |
91 | 27 |
|
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
BranchCommand subclass:#ListCommand |
|
31 |
instanceVariableNames:'url recursive' |
|
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
category:'SVN-Private-Commands' |
|
35 |
! |
|
36 |
||
695 | 37 |
!ListCommand class methodsFor:'documentation'! |
38 |
||
39 |
copyright |
|
40 |
" |
|
41 |
Copyright (c) 2007-2010 Jan Vrany |
|
42 |
Copyright (c) 2009-2010 eXept Software AG |
|
43 |
||
44 |
Permission is hereby granted, free of charge, to any person |
|
45 |
obtaining a copy of this software and associated documentation |
|
46 |
files (the 'Software'), to deal in the Software without |
|
47 |
restriction, including without limitation the rights to use, |
|
48 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
49 |
copies of the Software, and to permit persons to whom the |
|
50 |
Software is furnished to do so, subject to the following |
|
51 |
conditions: |
|
52 |
||
53 |
The above copyright notice and this permission notice shall be |
|
54 |
included in all copies or substantial portions of the Software. |
|
55 |
||
56 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
57 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
58 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
59 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
60 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
61 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
62 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
63 |
OTHER DEALINGS IN THE SOFTWARE. |
|
64 |
||
65 |
" |
|
66 |
! ! |
|
91 | 67 |
|
68 |
!ListCommand class methodsFor:'executing'! |
|
69 |
||
70 |
list: url |
|
71 |
^ (self new) |
|
72 |
url: url; |
|
73 |
execute |
|
74 |
||
75 |
"Created: / 19-03-2008 / 08:27:10 / janfrog" |
|
76 |
"Modified: / 19-08-2009 / 13:28:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
77 |
! ! |
|
78 |
||
695 | 79 |
!ListCommand class methodsFor:'others'! |
80 |
||
81 |
version_CVS |
|
824
f8a52ef83887
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
695
diff
changeset
|
82 |
^ '$Header$' |
695 | 83 |
! ! |
84 |
||
91 | 85 |
!ListCommand methodsFor:'accessing'! |
86 |
||
87 |
recursive |
|
88 |
^ recursive ? false |
|
89 |
||
90 |
"Created: / 15-03-2008 / 20:56:05 / janfrog" |
|
91 |
! |
|
92 |
||
93 |
recursive:aBoolean |
|
94 |
recursive := aBoolean. |
|
95 |
||
96 |
"Created: / 15-03-2008 / 20:56:05 / janfrog" |
|
97 |
! |
|
98 |
||
99 |
url |
|
100 |
^ url ifNil:[ branch url] |
|
101 |
||
102 |
"Modified: / 19-08-2009 / 13:28:35 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
103 |
! |
|
104 |
||
105 |
url:aString |
|
106 |
url := aString. |
|
107 |
! ! |
|
108 |
||
109 |
!ListCommand methodsFor:'executing - private'! |
|
110 |
||
111 |
svnCmd |
|
112 |
"raise an error: must be redefined in concrete subclass(es)" |
|
113 |
||
114 |
^'list' |
|
115 |
||
116 |
"Created: / 15-03-2008 / 21:03:32 / janfrog" |
|
117 |
! |
|
118 |
||
119 |
svnCmdArgumentsOn: argStream |
|
120 |
self recursive ifTrue: [ argStream nextPut: '--recursive' ]. |
|
121 |
argStream |
|
122 |
nextPut: '-r'; |
|
123 |
nextPut: self revision printString; |
|
124 |
nextPut: '--xml'; |
|
125 |
nextPut: self url asString |
|
126 |
||
127 |
"Created: / 15-03-2008 / 21:21:11 / janfrog" |
|
128 |
"Modified: / 16-03-2008 / 07:38:11 / janfrog" |
|
129 |
"Modified: / 19-04-2008 / 13:57:44 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
130 |
! |
|
131 |
||
132 |
svnParseXML: doc |
|
133 |
^ (doc root / 'list' / 'entry') asCollection |
|
134 |
collect: [:entryNode | RepositoryEntry readFromXml: entryNode ] |
|
135 |
||
136 |
"Created: / 19-04-2008 / 13:56:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
137 |
"Modified: / 19-08-2009 / 09:05:49 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
138 |
! |
|
139 |
||
140 |
svnProcessCommandOutput:out err:err |
|
141 |
^ self svnParseXML:((XML::XMLParser on:out) |
|
142 |
validate:false; |
|
143 |
scanDocument) |
|
144 |
||
145 |
"Created: / 03-10-2008 / 16:31:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
146 |
! ! |
|
147 |
||
148 |
!ListCommand class methodsFor:'documentation'! |
|
149 |
||
150 |
version |
|
824
f8a52ef83887
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
695
diff
changeset
|
151 |
^ '$Header$' |
139 | 152 |
! |
153 |
||
154 |
version_SVN |
|
824
f8a52ef83887
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
695
diff
changeset
|
155 |
^ '§Id: SVN__ListCommand.st 362 2011-08-08 13:07:42Z vranyj1 §' |
91 | 156 |
! ! |