author | Claus Gittinger <cg@exept.de> |
Tue, 16 Jan 2018 22:26:58 +0100 | |
changeset 1183 | 8af078552bae |
parent 852 | 562b2f7e178d |
permissions | -rw-r--r-- |
734 | 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 |
" |
|
479 | 26 |
"{ Package: 'stx:libsvn' }" |
95 | 27 |
|
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
Command subclass:#WCCommand |
|
31 |
instanceVariableNames:'alreadyCleaned workingCopy' |
|
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
category:'SVN-Private-Commands' |
|
35 |
! |
|
36 |
||
734 | 37 |
!WCCommand 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 |
! ! |
|
67 |
||
68 |
!WCCommand class methodsFor:'others'! |
|
69 |
||
70 |
version_CVS |
|
852
562b2f7e178d
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
734
diff
changeset
|
71 |
^ '$Header$' |
734 | 72 |
! ! |
95 | 73 |
|
74 |
!WCCommand methodsFor:'accessing'! |
|
75 |
||
76 |
workingCopy |
|
77 |
^ workingCopy |
|
78 |
||
79 |
"Created: / 16-03-2008 / 10:10:38 / janfrog" |
|
80 |
! |
|
81 |
||
82 |
workingCopy:aSVNWorkingCopy |
|
83 |
||
84 |
self assert: (aSVNWorkingCopy isKindOf: SVN::WorkingCopy). |
|
85 |
||
86 |
workingCopy := aSVNWorkingCopy. |
|
87 |
||
88 |
"Created: / 16-03-2008 / 10:10:38 / janfrog" |
|
89 |
"Modified: / 19-08-2009 / 11:28:58 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
90 |
! ! |
|
91 |
||
92 |
!WCCommand methodsFor:'executing'! |
|
93 |
||
94 |
execute |
|
95 |
^[super execute] on:SVN::WorkingCopyLockedError do: |
|
96 |
[:ex | |
|
97 |
alreadyCleaned |
|
98 |
ifTrue: |
|
99 |
[ex pass] |
|
100 |
ifFalse: |
|
101 |
[self svnCleanup. |
|
102 |
alreadyCleaned := true. |
|
103 |
self execute]] |
|
104 |
||
105 |
"Created: / 08-11-2008 / 08:30:34 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
106 |
! ! |
|
107 |
||
108 |
!WCCommand methodsFor:'executing - private'! |
|
109 |
||
110 |
svnCleanup |
|
111 |
||
112 |
^CleanupCommand new |
|
113 |
workingCopy: workingCopy; |
|
114 |
execute. |
|
115 |
||
116 |
"Created: / 08-11-2008 / 08:14:29 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
117 |
! |
|
118 |
||
119 |
svnCmdArgumentsOn:arg |
|
120 |
||
121 |
"arg nextPut:'-m'; nextPut: (message ? '')" |
|
122 |
||
123 |
"Created: / 16-03-2008 / 10:18:46 / janfrog" |
|
124 |
"Modified: / 19-03-2008 / 15:58:57 / janfrog" |
|
125 |
! |
|
126 |
||
127 |
svnCmdWorkdir |
|
128 |
"raise an error: must be redefined in concrete subclass(es)" |
|
129 |
||
130 |
^workingCopy path pathName |
|
131 |
||
132 |
"Created: / 16-03-2008 / 10:10:34 / janfrog" |
|
133 |
"Modified: / 19-08-2009 / 11:29:10 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
134 |
! |
|
135 |
||
136 |
svnProcessCommandOutput:out err:err |
|
137 |
^ out contents |
|
138 |
||
139 |
"Created: / 03-10-2008 / 16:31:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
140 |
! ! |
|
141 |
||
142 |
!WCCommand methodsFor:'initialization'! |
|
143 |
||
144 |
initialize |
|
145 |
||
146 |
super initialize. |
|
147 |
alreadyCleaned := false |
|
148 |
||
149 |
"Created: / 08-11-2008 / 08:15:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
150 |
! ! |
|
151 |
||
152 |
!WCCommand class methodsFor:'documentation'! |
|
153 |
||
154 |
version |
|
852
562b2f7e178d
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
734
diff
changeset
|
155 |
^ '$Header$' |
160 | 156 |
! |
157 |
||
158 |
version_SVN |
|
852
562b2f7e178d
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
734
diff
changeset
|
159 |
^ '§Id: SVN__WCCommand.st 363 2011-08-08 13:49:48Z vranyj1 §' |
95 | 160 |
! ! |