author | Claus Gittinger <cg@exept.de> |
Fri, 18 Nov 2016 16:14:26 +0100 | |
changeset 1180 | 92753f6cc822 |
parent 1118 | 4fa4b3885ed4 |
child 1162 | 6558c17e1a7f |
permissions | -rw-r--r-- |
679 | 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 |
" |
|
411 | 26 |
"{ Package: 'stx:libsvn' }" |
28 | 27 |
|
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
BranchCommand subclass:#UpdateLikeCommand |
|
679 | 31 |
instanceVariableNames:'workingCopy depth' |
28 | 32 |
classVariableNames:'' |
33 |
poolDictionaries:'' |
|
34 |
category:'SVN-Private-Commands' |
|
35 |
! |
|
36 |
||
679 | 37 |
!UpdateLikeCommand 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 |
!UpdateLikeCommand class methodsFor:'others'! |
|
69 |
||
70 |
version_CVS |
|
906
206a0f5cb6c9
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
679
diff
changeset
|
71 |
^ '$Header$' |
679 | 72 |
! ! |
28 | 73 |
|
74 |
!UpdateLikeCommand methodsFor:'accessing'! |
|
75 |
||
679 | 76 |
depth:aString |
77 |
||
78 |
self assert: |
|
79 |
(#('empty' 'files' 'immediates' 'infinity') includes: aString). |
|
80 |
||
81 |
depth := aString. |
|
82 |
||
83 |
"Modified: / 23-04-2011 / 18:50:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
84 |
! |
|
85 |
||
28 | 86 |
workingCopy |
87 |
^ workingCopy |
|
88 |
||
89 |
"Created: / 19-03-2008 / 12:44:24 / janfrog" |
|
90 |
! |
|
91 |
||
92 |
workingCopy:aSVNWorkingCopy |
|
93 |
||
94 |
self assert: (aSVNWorkingCopy isKindOf: SVN::WorkingCopy). |
|
95 |
||
96 |
workingCopy := aSVNWorkingCopy. |
|
97 |
branch := aSVNWorkingCopy branch. |
|
98 |
||
99 |
"Created: / 19-03-2008 / 12:44:24 / janfrog" |
|
100 |
"Modified: / 19-08-2009 / 12:22:34 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
101 |
! ! |
|
102 |
||
103 |
!UpdateLikeCommand methodsFor:'executing'! |
|
104 |
||
105 |
execute |
|
106 |
^[super execute] on:SVN::WorkingCopyLockedError do: |
|
107 |
[:ex | |
|
108 |
alreadyCleaned |
|
109 |
ifTrue: |
|
110 |
[ex pass] |
|
111 |
ifFalse: |
|
112 |
[self svnCleanup. |
|
113 |
alreadyCleaned := true. |
|
114 |
self execute]] |
|
115 |
||
116 |
"Created: / 08-11-2008 / 08:39:02 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
117 |
! ! |
|
118 |
||
119 |
!UpdateLikeCommand methodsFor:'executing - private'! |
|
120 |
||
121 |
svnCleanup |
|
122 |
||
123 |
^CleanupCommand new |
|
124 |
workingCopy: workingCopy; |
|
125 |
execute. |
|
126 |
||
127 |
"Created: / 08-11-2008 / 08:39:15 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
128 |
! |
|
129 |
||
130 |
svnCmdArgumentsOn:arg |
|
131 |
"raise an error: must be redefined in concrete subclass(es)" |
|
132 |
||
133 |
arg |
|
679 | 134 |
nextPut: '-r'; nextPut: self revision printString. |
135 |
arg |
|
136 |
nextPut: '--depth'; nextPut: depth ? 'infinity'. |
|
28 | 137 |
|
138 |
"Created: / 16-03-2008 / 10:00:34 / janfrog" |
|
679 | 139 |
"Modified: / 23-04-2011 / 18:48:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
28 | 140 |
! |
141 |
||
142 |
svnCmdWorkdir |
|
143 |
||
144 |
^workingCopy path pathName |
|
145 |
||
146 |
"Created: / 19-03-2008 / 12:43:21 / janfrog" |
|
147 |
"Modified: / 19-08-2009 / 12:47:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
148 |
! |
|
149 |
||
679 | 150 |
svnProcessCommandOutput: stdout err: stderr |
28 | 151 |
"Superclass says that I am responsible to implement this method" |
679 | 152 |
|
153 |
| notifications | |
|
154 |
notifications := OrderedCollection new: 8. |
|
155 |
stdout contents asStringCollection do: |
|
156 |
[:line| |
|
157 |
line isEmpty ifFalse:[ |
|
158 |
(line startsWith:'Summary of conflicts') |
|
159 |
ifTrue:[^notifications]. |
|
1118
4fa4b3885ed4
changed: #svnProcessCommandOutput:err:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
906
diff
changeset
|
160 |
((line startsWith:'--- Merging') |
4fa4b3885ed4
changed: #svnProcessCommandOutput:err:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
906
diff
changeset
|
161 |
or:[(line startsWith:'Fetching external item into') |
4fa4b3885ed4
changed: #svnProcessCommandOutput:err:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
906
diff
changeset
|
162 |
or:[(line startsWith:'External at revision')]]) |
679 | 163 |
ifFalse:[notifications add: ((WCActionNotification readFromString: line) wc: workingCopy; yourself)]]]. |
164 |
^notifications. |
|
28 | 165 |
|
166 |
"Created: / 03-10-2008 / 16:31:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
167 |
"Modified: / 18-08-2009 / 14:38:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1118
4fa4b3885ed4
changed: #svnProcessCommandOutput:err:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
906
diff
changeset
|
168 |
"Modified: / 30-07-2012 / 23:55:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
28 | 169 |
! ! |
170 |
||
171 |
!UpdateLikeCommand class methodsFor:'documentation'! |
|
172 |
||
173 |
version |
|
906
206a0f5cb6c9
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
679
diff
changeset
|
174 |
^ '$Header$' |
181 | 175 |
! |
176 |
||
177 |
version_SVN |
|
906
206a0f5cb6c9
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
679
diff
changeset
|
178 |
^ '§Id: SVN__UpdateLikeCommand.st 362 2011-08-08 13:07:42Z vranyj1 §' |
28 | 179 |
! ! |