author | Claus Gittinger <cg@exept.de> |
Fri, 18 Nov 2016 16:14:26 +0100 | |
changeset 1180 | 92753f6cc822 |
parent 853 | c07c59dcfcac |
permissions | -rw-r--r-- |
699 | 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 |
" |
|
433 | 26 |
"{ Package: 'stx:libsvn' }" |
71 | 27 |
|
28 |
"{ NameSpace: SVN }" |
|
29 |
||
492 | 30 |
WCPathCommand subclass:#CommitCommand |
71 | 31 |
instanceVariableNames:'message url username password noAuthCache' |
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
category:'SVN-Private-Commands' |
|
35 |
! |
|
36 |
||
699 | 37 |
!CommitCommand 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 |
!CommitCommand class methodsFor:'others'! |
|
69 |
||
70 |
version_CVS |
|
853
c07c59dcfcac
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
699
diff
changeset
|
71 |
^ '$Header$' |
699 | 72 |
! ! |
71 | 73 |
|
74 |
!CommitCommand methodsFor:'accessing'! |
|
75 |
||
76 |
message |
|
77 |
^ message |
|
78 |
||
79 |
"Created: / 19-03-2008 / 15:59:36 / janfrog" |
|
80 |
! |
|
81 |
||
82 |
message:aString |
|
83 |
message := aString. |
|
84 |
||
85 |
"Created: / 19-03-2008 / 15:59:36 / janfrog" |
|
86 |
"Modified: / 31-03-2008 / 14:20:11 / janfrog" |
|
87 |
! |
|
88 |
||
89 |
url |
|
90 |
^ url |
|
91 |
||
92 |
"Created: / 03-10-2008 / 18:19:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
93 |
! |
|
94 |
||
95 |
url:something |
|
96 |
url := something. |
|
97 |
||
98 |
"Created: / 03-10-2008 / 18:19:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
99 |
! ! |
|
100 |
||
101 |
!CommitCommand methodsFor:'executing'! |
|
102 |
||
103 |
execute |
|
104 |
^ [ super execute ] on:SVN::AuthorizationError |
|
699 | 105 |
do:[:ex | |
71 | 106 |
|credentials dialog| |
107 |
||
108 |
credentials := Credentials new username:OperatingSystem getLoginName. |
|
699 | 109 |
((dialog := CredentialsDialog new) |
110 |
model:credentials; |
|
111 |
subtitle: workingCopy url; |
|
112 |
open) |
|
113 |
ifFalse: |
|
114 |
[ex pass] |
|
115 |
ifTrue: |
|
116 |
[username := credentials username. |
|
117 |
password := credentials password. |
|
118 |
noAuthCache := dialog savePassword not. |
|
119 |
self execute]] |
|
71 | 120 |
|
121 |
"Created: / 03-10-2008 / 18:22:52 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
122 |
"Modified: / 15-07-2009 / 12:09:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
699 | 123 |
"Modified: / 01-02-2010 / 12:21:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
71 | 124 |
! ! |
125 |
||
126 |
!CommitCommand methodsFor:'executing - private'! |
|
127 |
||
128 |
svnCmd |
|
129 |
"raise an error: must be redefined in concrete subclass(es)" |
|
130 |
||
131 |
^'commit' |
|
132 |
||
133 |
"Created: / 16-03-2008 / 07:47:00 / janfrog" |
|
134 |
! |
|
135 |
||
492 | 136 |
svnCmdArgumentsOn:arg |
71 | 137 |
|
138 |
arg nextPut:'--message'; nextPut: (message ? ''). |
|
139 |
super svnCmdArgumentsOn:arg |
|
140 |
||
141 |
"Created: / 19-03-2008 / 15:59:13 / janfrog" |
|
142 |
"Modified: / 31-03-2008 / 14:13:03 / janfrog" |
|
143 |
! |
|
144 |
||
145 |
svnGlobalArgumentsOn: argStream |
|
146 |
||
147 |
super svnGlobalArgumentsOn: argStream. |
|
148 |
||
149 |
"/argStream nextPut:'--config-dir'; nextPut:'/tmp/.svn'; nextPut:'--no-auth-cache'. |
|
150 |
||
151 |
username ifNotNil: |
|
492 | 152 |
[argStream |
153 |
nextPut: '--username'; |
|
154 |
nextPut: username]. |
|
71 | 155 |
password ifNotNil: |
492 | 156 |
[argStream |
157 |
nextPut: '--password'; |
|
158 |
nextPut: password]. |
|
71 | 159 |
noAuthCache == true ifTrue: |
492 | 160 |
[argStream |
161 |
nextPutAll:'--no-auth-cache'] |
|
71 | 162 |
|
163 |
"Created: / 31-10-2008 / 09:30:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
164 |
! |
|
165 |
||
492 | 166 |
svnProcessCommandOutput:arg1 err:arg2 |
71 | 167 |
"Superclass says that I am responsible to implement this method" |
492 | 168 |
|
71 | 169 |
^ arg1 contents |
170 |
||
171 |
"Created: / 03-10-2008 / 16:31:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
172 |
! ! |
|
173 |
||
174 |
!CommitCommand class methodsFor:'documentation'! |
|
175 |
||
176 |
version |
|
853
c07c59dcfcac
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
699
diff
changeset
|
177 |
^ '$Header$' |
175 | 178 |
! |
179 |
||
180 |
version_SVN |
|
853
c07c59dcfcac
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
699
diff
changeset
|
181 |
^ '§Id: SVN__CommitCommand.st 362 2011-08-08 13:07:42Z vranyj1 §' |
71 | 182 |
! ! |