95
|
1 |
"{ Package: 'cvut:stx/goodies/libsvn' }"
|
|
2 |
|
|
3 |
"{ NameSpace: SVN }"
|
|
4 |
|
|
5 |
Command subclass:#WCCommand
|
|
6 |
instanceVariableNames:'alreadyCleaned workingCopy'
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'SVN-Private-Commands'
|
|
10 |
!
|
|
11 |
|
|
12 |
!WCCommand class methodsFor:'documentation'!
|
|
13 |
|
|
14 |
version_SVN
|
|
15 |
^'$Id$'
|
|
16 |
! !
|
|
17 |
|
|
18 |
!WCCommand methodsFor:'accessing'!
|
|
19 |
|
|
20 |
workingCopy
|
|
21 |
^ workingCopy
|
|
22 |
|
|
23 |
"Created: / 16-03-2008 / 10:10:38 / janfrog"
|
|
24 |
!
|
|
25 |
|
|
26 |
workingCopy:aSVNWorkingCopy
|
|
27 |
|
|
28 |
self assert: (aSVNWorkingCopy isKindOf: SVN::WorkingCopy).
|
|
29 |
|
|
30 |
workingCopy := aSVNWorkingCopy.
|
|
31 |
|
|
32 |
"Created: / 16-03-2008 / 10:10:38 / janfrog"
|
|
33 |
"Modified: / 19-08-2009 / 11:28:58 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
34 |
! !
|
|
35 |
|
|
36 |
!WCCommand methodsFor:'executing'!
|
|
37 |
|
|
38 |
execute
|
|
39 |
^[super execute] on:SVN::WorkingCopyLockedError do:
|
|
40 |
[:ex |
|
|
41 |
alreadyCleaned
|
|
42 |
ifTrue:
|
|
43 |
[ex pass]
|
|
44 |
ifFalse:
|
|
45 |
[self svnCleanup.
|
|
46 |
alreadyCleaned := true.
|
|
47 |
self execute]]
|
|
48 |
|
|
49 |
"Created: / 08-11-2008 / 08:30:34 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
50 |
! !
|
|
51 |
|
|
52 |
!WCCommand methodsFor:'executing - private'!
|
|
53 |
|
|
54 |
svnCleanup
|
|
55 |
|
|
56 |
^CleanupCommand new
|
|
57 |
workingCopy: workingCopy;
|
|
58 |
execute.
|
|
59 |
|
|
60 |
"Created: / 08-11-2008 / 08:14:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
61 |
!
|
|
62 |
|
|
63 |
svnCmdArgumentsOn:arg
|
|
64 |
|
|
65 |
"arg nextPut:'-m'; nextPut: (message ? '')"
|
|
66 |
|
|
67 |
"Created: / 16-03-2008 / 10:18:46 / janfrog"
|
|
68 |
"Modified: / 19-03-2008 / 15:58:57 / janfrog"
|
|
69 |
!
|
|
70 |
|
|
71 |
svnCmdWorkdir
|
|
72 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
73 |
|
|
74 |
^workingCopy path pathName
|
|
75 |
|
|
76 |
"Created: / 16-03-2008 / 10:10:34 / janfrog"
|
|
77 |
"Modified: / 19-08-2009 / 11:29:10 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
78 |
!
|
|
79 |
|
|
80 |
svnProcessCommandOutput:out err:err
|
|
81 |
^ out contents
|
|
82 |
|
|
83 |
"Created: / 03-10-2008 / 16:31:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
84 |
! !
|
|
85 |
|
|
86 |
!WCCommand methodsFor:'initialization'!
|
|
87 |
|
|
88 |
initialize
|
|
89 |
|
|
90 |
super initialize.
|
|
91 |
alreadyCleaned := false
|
|
92 |
|
|
93 |
"Created: / 08-11-2008 / 08:15:55 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
94 |
! !
|
|
95 |
|
|
96 |
!WCCommand class methodsFor:'documentation'!
|
|
97 |
|
|
98 |
version
|
|
99 |
^ '$Header$'
|
|
100 |
! !
|