author | Claus Gittinger <cg@exept.de> |
Mon, 25 Feb 2002 20:58:35 +0100 | |
changeset 1138 | aa7687ec256f |
parent 1136 | 6ebfad528813 |
child 1141 | 9f0bd4f3d482 |
permissions | -rw-r--r-- |
130 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
807
f84a9377278e
Fix .stxCvsDummy / import stuff.
Stefan Vogel <sv@exept.de>
parents:
806
diff
changeset
|
3 |
All Rights Reserved |
130 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
13 |
"{ Package: 'stx:libbasic3' }" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
14 |
|
130 | 15 |
AbstractSourceCodeManager subclass:#CVSSourceCodeManager |
811 | 16 |
instanceVariableNames:'' |
17 |
classVariableNames:'Verbose CVSRoot CVSWorkDirectory RemoteCVS CVSBinDir |
|
1014
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
18 |
CVSModuleRoots CMD_checkout CVSTempDir DisabledModules' |
811 | 19 |
poolDictionaries:'' |
20 |
category:'System-SourceCodeManagement' |
|
130 | 21 |
! |
22 |
||
502 | 23 |
!CVSSourceCodeManager class methodsFor:'documentation'! |
130 | 24 |
|
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
807
f84a9377278e
Fix .stxCvsDummy / import stuff.
Stefan Vogel <sv@exept.de>
parents:
806
diff
changeset
|
28 |
All Rights Reserved |
130 | 29 |
|
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
134 | 41 |
SourceCodeManager which accesses the sourcecode through cvs. |
130 | 42 |
It requires the shell environment variable CVSROOT to be set |
526 | 43 |
to the top of the repository tree. (or alternatively, the CVSRoot |
44 |
variable being set by a private.rc file). |
|
45 |
Under that top, for each module (especially the stx module itself), |
|
46 |
a subdirectory containing that modules directories must exist. |
|
130 | 47 |
|
48 |
If not specified otherwise, the module defaults to 'stx'. |
|
49 |
If a class has its home in another module, it has to be compiled |
|
50 |
with a corresponding entry in the package string (see below). |
|
51 |
Within a module, classes are organized in classlibraries, and the corresponding |
|
52 |
source code is found in various subdirectories of CVSROOT. The directories |
|
53 |
name can also be provided by the package string - if not, it defaults to the |
|
54 |
libraries name. |
|
55 |
The package string controls all this, and is REQUIRED in order for the sourceCodeManager |
|
56 |
to be able to retrieve a classes source. |
|
57 |
The package strings format is: |
|
236 | 58 |
'...any infotext....(sourceCodeInfo)' |
130 | 59 |
the sourceCOdeInfo consists of multiple entries, separated by colons. |
60 |
The following formats are allowed: |
|
236 | 61 |
(libraryName) - module defaults to 'stx'; directory to the name of the library |
62 |
(foo/bar/x) - module defaults to 'stx'; dir is 'foo/bar/x'; library name defaults to x |
|
63 |
(module:directory:libname) - specifies all components |
|
130 | 64 |
The first formats are intermediate, for backward compatibility. We urge everyone |
65 |
to use the last format (by changing the Make.proto files and add a -P flag to |
|
66 |
the stc compiler flags (see libbasic/Make.proto as an example). |
|
67 |
||
68 |
Notice, that the sourceCodeManager is (currently) only consulted, if no |
|
69 |
source subdirectory exists, or no source file is found there. If it does exist, |
|
70 |
that one is supposed to contain an up-to-date version of the classes source |
|
71 |
(this is temporary - in the future the probe order will be reversed, trying |
|
72 |
the source repository first). |
|
73 |
The source directory is required for systems which do NO source code control. |
|
74 |
||
75 |
Setup: |
|
236 | 76 |
- make certain, that the commands 'cvs' and 'co' are available on your system. |
77 |
- add setup for the CVSROOT environment variable to your .bashrc / .login / .profile |
|
78 |
- Make certain that either no local source directory exists, or it is empty or it contains |
|
79 |
only source code for files NOT found in the repository (this will not be required in future versions). |
|
130 | 80 |
|
81 |
Caveat: |
|
236 | 82 |
currently, the rcs container is accessed directly, since cvs mangles the files ident-string and |
83 |
thus does not correctly recreate the original file (all source is offset by some characters w.r.t. the |
|
84 |
compiled file). |
|
85 |
Therefore, sevrer-mode CVS is not supported. |
|
86 |
||
680 | 87 |
[class variables:] |
88 |
CVSTempDir <String | nil> where a directory tree is |
|
89 |
generated temporarily for checkin/checkout |
|
90 |
(default is nil -> current dir) |
|
91 |
||
92 |
CVSRoot <String> the CVS root. Imported from the |
|
93 |
CVSROOT shell variable. |
|
94 |
||
95 |
RemoteCVS <Boolean> if true, remote CVS access is used |
|
96 |
(i.e. via a socket to a CVS server). |
|
97 |
if false, disk access is used; |
|
98 |
files in CVSRoot must be accessable. |
|
99 |
||
100 |
CVSWorkDirectory not yet supported/implemented. |
|
101 |
PLANNED: name of a directory hierarchy, |
|
102 |
which is kept in sync with the current |
|
103 |
version. |
|
104 |
||
105 |
CVSBinDir where the CVS commands are found |
|
106 |
||
107 |
CVSModuleRoots <Directory> per-module roots. |
|
108 |
If empty, or no entry is found for a |
|
109 |
module is found, CVSRoot is used. |
|
110 |
Otherwise, specifies a per-module CVSRoot. |
|
111 |
(allows multiple CVS hierarchies) |
|
112 |
||
236 | 113 |
[author:] |
114 |
Claus Gittinger |
|
115 |
||
116 |
[see also:] |
|
117 |
( cvs manual page :man: cvs ) |
|
118 |
( Coding style used in Smalltalk/X classes :html: programming/codingStyle.html ) |
|
119 |
||
433
273920a11e41
sourceCodeManagement is only enabled in the commercial release
Claus Gittinger <cg@exept.de>
parents:
380
diff
changeset
|
120 |
[restrictions:] |
526 | 121 |
commercial version only |
130 | 122 |
" |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
123 |
! |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
124 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
125 |
examples |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
126 |
" |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
127 |
Default setup: |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
128 |
This setup accesses all sources from a single repository: /files/CVS. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
129 |
Actually, this is the setup as used within eXept for development. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
130 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
131 |
CVSSourceCodeManager initializeForRepository:'/files/CVS'. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
132 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
133 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
134 |
Dual repository setup: |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
135 |
This accesses all ST/X standard classes' source from the /files/CVS |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
136 |
repository, while your private classes are created in and accessed from |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
137 |
'/files/myCVS'. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
138 |
This setup is useful, if you need revision management on the |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
139 |
ST/X standard classes as well as for your own classes. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
140 |
In order to do this, you should (manually) check in all ST/X classes |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
141 |
into a private repository WHILE preserving the original revision numbers. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
142 |
A shell-procedure similar to: |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
143 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
144 |
for i in lib*/*.st |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
145 |
do |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
146 |
id=`ident $i` |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
147 |
set $id |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
148 |
rev=$3 |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
149 |
ci -r$rev <CVSDIR>/$i $i |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
150 |
done |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
151 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
152 |
should acomplish this. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
153 |
Now, that you have all ST/X files in your own repository (and with the |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
154 |
original revision numbers), access is possible by defining CVSROOT |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
155 |
as above. However, in order to have your own files being stored in |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
156 |
another repository, you have to give a per-module repository. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
157 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
158 |
This defines the default repository (for your containers): |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
159 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
160 |
CVSSourceCodeManager initializeForRepository:'/files/myCVS'. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
161 |
|
657 | 162 |
and this specifies a repository for all standard ST/X classes (in the stx module): |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
163 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
164 |
CVSSourceCodeManager repositoryName:'/files/CVS' forModule:'stx' |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
165 |
|
1023 | 166 |
Dual repository setup for eXept customers with a full licence |
167 |
(these can access our in-house master repository, for convenient software update |
|
168 |
and uploading): |
|
169 |
All class sourcees under the 'stx' module (i.e. packageID is 'stx:*') can be accessed |
|
170 |
from the eXept cvs server (i.e. CVSROOT for them is :pserver:userName@exept.de:/files/CVS/stc). |
|
171 |
All local classes should be maintained in and accessed from a local cvs repository |
|
172 |
such as '/files/myCVS'. |
|
173 |
||
174 |
Then, tell the CVSSourceCodeManager about this; |
|
175 |
first the default repository: |
|
176 |
||
177 |
CVSSourceCodeManager initializeForRepository:'/files/myCVS'. |
|
178 |
||
179 |
and the repository for all standard ST/X classes (in the stx module): |
|
180 |
||
181 |
CVSSourceCodeManager repositoryName:':pserver:userName@exept.de:/files/CVS' forModule:'stx' |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
182 |
" |
130 | 183 |
! ! |
184 |
||
502 | 185 |
!CVSSourceCodeManager class methodsFor:'initialization'! |
130 | 186 |
|
1014
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
187 |
forgetDisabledModules |
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
188 |
DisabledModules := nil. |
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
189 |
! |
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
190 |
|
617
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
191 |
initCommands |
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
192 |
CMD_checkout := 'cvs -n checkout %1'. |
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
193 |
! |
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
194 |
|
130 | 195 |
initialize |
472 | 196 |
"check if $CVSROOT (the shell variable) or CVSRoot (the smalltalk global) |
197 |
is set, check if cvs commands can be executed and install myself as the |
|
198 |
SourceCodeManager if this works out ok" |
|
199 |
||
1119 | 200 |
| s f top ok triedPath cvsCmd cmdName | |
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
157
diff
changeset
|
201 |
|
1014
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
202 |
DisabledModules := nil. |
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
203 |
|
680 | 204 |
"/ where a temporary directory hierarchy is |
205 |
"/ created for checkin/checkout |
|
206 |
||
1059
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
207 |
CVSTempDir ifNil:[ |
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
208 |
CVSTempDir := Filename tempDirectory pathName |
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
209 |
]. |
680 | 210 |
|
130 | 211 |
"/ |
212 |
"/ if CVSROOT is non-empty and both cvs and co are available |
|
213 |
"/ as commands, assume this system uses a cvs source code management. |
|
214 |
"/ |
|
1059
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
215 |
CVSRoot ifNil:[ |
445
c085b7d46bc8
added access to CVSRoot directory (can now be set late in the private.rc file)
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
216 |
CVSRoot := OperatingSystem getEnvironment:'CVSROOT' |
c085b7d46bc8
added access to CVSRoot directory (can now be set late in the private.rc file)
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
217 |
]. |
c085b7d46bc8
added access to CVSRoot directory (can now be set late in the private.rc file)
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
218 |
|
1059
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
219 |
CVSRoot ifNil:[ |
681 | 220 |
'CVSSourceCodeManager [info]: disabled since $CVSROOT is not set' infoPrintCR. |
526 | 221 |
^ self |
222 |
]. |
|
489
c3c3e7fe3584
check for 'co' and 'rlog' commands. Give a message if not present.
Claus Gittinger <cg@exept.de>
parents:
488
diff
changeset
|
223 |
|
1119 | 224 |
OperatingSystem isMSDOSlike ifTrue:[ |
1124 | 225 |
cvsCmd := 'cvs' |
1119 | 226 |
] ifFalse:[ |
227 |
cvsCmd := 'cvs' |
|
228 |
]. |
|
229 |
||
1064 | 230 |
CVSBinDir size > 0 ifTrue:[ |
1116
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
231 |
OperatingSystem isMSDOSlike ifTrue:[ |
1119 | 232 |
cmdName := CVSBinDir asFilename constructString:cvsCmd. |
1116
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
233 |
(OperatingSystem canExecuteCommand:cmdName) ifFalse:[ |
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
234 |
CVSBinDir := ''. |
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
235 |
] ifTrue:[ |
1119 | 236 |
CVSBinDir := CVSBinDir asFilename pathName |
1116
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
237 |
] |
1064 | 238 |
] |
239 |
]. |
|
240 |
||
241 |
CVSBinDir size == 0 ifTrue:[ |
|
242 |
CVSBinDir := ''. |
|
1123 | 243 |
(ok := OperatingSystem canExecuteCommand:cvsCmd) ifFalse:[ |
1119 | 244 |
"/ mhmh - no cvs; |
1064 | 245 |
|
246 |
OperatingSystem isUNIXlike ifTrue:[ |
|
1119 | 247 |
triedPath := #( '/usr/local/bin' ). |
1064 | 248 |
] ifFalse:[ |
249 |
OperatingSystem isMSDOSlike ifTrue:[ |
|
1119 | 250 |
triedPath := Array with:'c:\bin' |
251 |
with:(Filename currentDirectory pathName) |
|
1124 | 252 |
with:(OperatingSystem stxBinDirPath ? 'c:\windows'). |
1119 | 253 |
] ifFalse:[ |
254 |
triedPath := #() |
|
255 |
] |
|
256 |
]. |
|
257 |
||
258 |
triedPath do:[:eachTriedDir | |
|
259 |
ok ifFalse:[ |
|
260 |
(OperatingSystem canExecuteCommand:(eachTriedDir asFilename constructString:cvsCmd)) ifTrue:[ |
|
811 | 261 |
ok := true. |
1119 | 262 |
CVSBinDir := eachTriedDir. |
263 |
] |
|
264 |
] |
|
1064 | 265 |
]. |
595
73cca1ff3252
added a hook to specify the cvs-binary directory
Claus Gittinger <cg@exept.de>
parents:
578
diff
changeset
|
266 |
]. |
1119 | 267 |
] ifFalse:[ |
268 |
ok := OperatingSystem canExecuteCommand:(CVSBinDir asFilename constructString:cvsCmd). |
|
269 |
]. |
|
270 |
||
271 |
ok ifFalse:[ |
|
272 |
'CVSSourceCodeManager [warning]: disabled since no >> cvs << command found' infoPrintCR. |
|
273 |
^ self |
|
526 | 274 |
]. |
701 | 275 |
|
748
96180f5613ae
dont check for 'co' and 'rlog' commands.
Claus Gittinger <cg@exept.de>
parents:
747
diff
changeset
|
276 |
"/ (OperatingSystem canExecuteCommand:(CVSBinDir , 'co')) ifFalse:[ |
96180f5613ae
dont check for 'co' and 'rlog' commands.
Claus Gittinger <cg@exept.de>
parents:
747
diff
changeset
|
277 |
"/ 'CVSSourceCodeManager [warning]: limited functionality - no >> co << command found' infoPrintCR. |
96180f5613ae
dont check for 'co' and 'rlog' commands.
Claus Gittinger <cg@exept.de>
parents:
747
diff
changeset
|
278 |
"/ ]. |
96180f5613ae
dont check for 'co' and 'rlog' commands.
Claus Gittinger <cg@exept.de>
parents:
747
diff
changeset
|
279 |
"/ (OperatingSystem canExecuteCommand:(CVSBinDir , 'rlog')) ifFalse:[ |
96180f5613ae
dont check for 'co' and 'rlog' commands.
Claus Gittinger <cg@exept.de>
parents:
747
diff
changeset
|
280 |
"/ 'CVSSourceCodeManager [warning]: limited functionality - no >> rlog << command found' infoPrintCR. |
96180f5613ae
dont check for 'co' and 'rlog' commands.
Claus Gittinger <cg@exept.de>
parents:
747
diff
changeset
|
281 |
"/ ]. |
791 | 282 |
"/ (OperatingSystem canExecuteCommand:(CVSBinDir , 'patch')) ifFalse:[ |
283 |
"/ 'CVSSourceCodeManager [warning]: limited functionality - no >> patch << command found' infoPrintCR. |
|
284 |
"/ ]. |
|
176
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
285 |
|
526 | 286 |
RemoteCVS := true. |
287 |
UseWorkTree := false. |
|
288 |
||
1059
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
289 |
CacheDirectoryName ifNil:[ |
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
290 |
self initCacheDirPath. |
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
291 |
]. |
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
292 |
CachingSources ifNil:[ |
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
293 |
CachingSources := true. |
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
294 |
]. |
176
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
295 |
|
526 | 296 |
"/ |
297 |
"/ check if there is an stx directory there |
|
298 |
"/ |
|
299 |
((f := CVSRoot asFilename) exists |
|
300 |
and:[f isDirectory |
|
301 |
and:[(top := f construct:'stx') exists |
|
302 |
and:[top isDirectory |
|
303 |
and:[top isReadable]]]]) ifTrue:[ |
|
304 |
RemoteCVS := false |
|
305 |
]. |
|
176
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
306 |
|
526 | 307 |
Smalltalk at:#SourceCodeManager put:self. |
308 |
DefaultManager := self. |
|
176
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
309 |
|
681 | 310 |
('CVSSourceCodeManager [info]: repository CVSROOT is ''' , CVSRoot , '''.') infoPrintCR. |
608 | 311 |
RemoteCVS ifTrue:[ |
681 | 312 |
'CVSSourceCodeManager [info]: assume remote CVS mode (no stx found in CVSROOT)' infoPrintCR. |
608 | 313 |
^ self |
314 |
]. |
|
526 | 315 |
|
316 |
"/ |
|
317 |
"/ optionally set the WorkTreeDirectoryName from $STX_WORKTREE; |
|
318 |
"/ if non-nil, a working tree is kept there |
|
319 |
"/ and updated/commited files are not removed. |
|
320 |
"/ If you use a regular (make-) tree, |
|
321 |
"/ set WorkTreeDirectoryName (or the environment variable) to that. |
|
322 |
"/ |
|
323 |
"/ this is not yet finished. |
|
324 |
"/ |
|
325 |
s := OperatingSystem getEnvironment:'STX_WORKTREE'. |
|
326 |
s notNil ifTrue:[ |
|
327 |
WorkTreeDirectoryName := s. |
|
328 |
UseWorkTree := true. |
|
130 | 329 |
] |
330 |
||
331 |
" |
|
158
27f76f9d8a25
preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents:
157
diff
changeset
|
332 |
AbstractSourceCodeManager initialize |
130 | 333 |
CVSSourceCodeManager initialize |
334 |
" |
|
335 |
||
527 | 336 |
" |
337 |
CVSRoot := '/files/CVS'. |
|
338 |
AbstractSourceCodeManager initialize. |
|
339 |
CVSSourceCodeManager initialize. |
|
340 |
" |
|
341 |
||
681 | 342 |
"Created: / 4.11.1995 / 19:14:38 / cg" |
343 |
"Modified: / 19.12.1995 / 14:25:46 / stefan" |
|
1124 | 344 |
"Modified: / 5.12.2001 / 18:52:00 / cg" |
482
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
477
diff
changeset
|
345 |
! |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
477
diff
changeset
|
346 |
|
602 | 347 |
initializeForRepository:aDirectoryName |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
348 |
"set the global CVSROOT directory (i.e. the repositories name). |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
349 |
And reinitialize. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
350 |
Can be used from the launcher to change/configure the repository." |
602 | 351 |
|
620
084fd1b48952
#cvsRootDirectory replaced by #repositoryName.
Stefan Vogel <sv@exept.de>
parents:
618
diff
changeset
|
352 |
self repositoryName:aDirectoryName. |
602 | 353 |
AbstractSourceCodeManager initialize. |
354 |
CVSSourceCodeManager initialize. |
|
355 |
||
356 |
" |
|
357 |
CVSSourceCodeManager initializeForRepository:'/files/CVS' |
|
630 | 358 |
CVSSourceCodeManager initializeForRepository:'ibm:/files/CVS' |
602 | 359 |
" |
360 |
||
630 | 361 |
"Created: / 13.8.1997 / 17:20:57 / cg" |
362 |
"Modified: / 25.9.1997 / 12:28:05 / stefan" |
|
363 |
"Modified: / 2.11.1997 / 17:08:27 / cg" |
|
603 | 364 |
! ! |
365 |
||
366 |
!CVSSourceCodeManager class methodsFor:'accessing'! |
|
367 |
||
1116
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
368 |
cvsBinDirectory |
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
369 |
"return the name of the bin repository. |
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
370 |
Thats the directory, where the cvs / cvs.exe command is found." |
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
371 |
|
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
372 |
^ CVSBinDir |
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
373 |
! |
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
374 |
|
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
375 |
cvsBinDirectory:aString |
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
376 |
"set the name of the bin repository. |
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
377 |
Thats the directory, where the cvs / cvs.exe command is found." |
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
378 |
|
1119 | 379 |
CVSBinDir := aString asFilename pathName. |
380 |
(CVSBinDir endsWith:Filename separator) ifTrue:[ |
|
381 |
CVSBinDir := CVSBinDir copyWithoutLast:1. |
|
382 |
] |
|
1116
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
383 |
! |
70936e07cadd
allow for cvsBinDir to be specified
Claus Gittinger <cg@exept.de>
parents:
1094
diff
changeset
|
384 |
|
482
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
477
diff
changeset
|
385 |
repositoryName |
1023 | 386 |
"return the name of the global repository. |
387 |
This is used, if no per-module repository is defined." |
|
482
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
477
diff
changeset
|
388 |
|
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
477
diff
changeset
|
389 |
^ CVSRoot |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
477
diff
changeset
|
390 |
|
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
477
diff
changeset
|
391 |
"Created: 14.9.1996 / 13:22:05 / cg" |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
392 |
"Modified: 19.9.1997 / 06:12:02 / cg" |
482
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
477
diff
changeset
|
393 |
! |
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
477
diff
changeset
|
394 |
|
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
477
diff
changeset
|
395 |
repositoryName:aDirectoryName |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
396 |
"set the name of the repository; |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
397 |
thats the name of the global CVSROOT directory, which is used |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
398 |
if no specific repository was defined for a module. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
399 |
Can be used from an rc-script, to override the CVSROOT shell |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
400 |
variable setting." |
482
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
477
diff
changeset
|
401 |
|
1014
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
402 |
DisabledModules := nil. |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
403 |
CVSRoot := aDirectoryName. |
482
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
477
diff
changeset
|
404 |
|
ab073539c01e
allow change of the repository
Claus Gittinger <cg@exept.de>
parents:
477
diff
changeset
|
405 |
"Created: 14.9.1996 / 13:22:24 / cg" |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
406 |
"Modified: 19.9.1997 / 06:10:31 / cg" |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
407 |
! |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
408 |
|
1025 | 409 |
repositoryName:aRepositoryName forModule:aModuleName |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
410 |
"set the CVSROOT directory which provides the sources for all |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
411 |
classes in a particular module. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
412 |
This can be used from an rc-script, to specify a repository |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
413 |
for a particular module. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
414 |
If left unspecified, the global (i.e. fallBack) repository is used." |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
415 |
|
1014
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
416 |
DisabledModules := nil. |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
417 |
CVSModuleRoots isNil ifTrue:[ |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
418 |
CVSModuleRoots := Dictionary new. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
419 |
]. |
1025 | 420 |
CVSModuleRoots at:aModuleName put:aRepositoryName |
866 | 421 |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
422 |
"Modified: 19.9.1997 / 06:09:40 / cg" |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
423 |
! |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
424 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
425 |
repositoryNameForModule:aModuleName |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
426 |
"return the CVSROOT directory which provides the sources for all |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
427 |
classes in a particular module. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
428 |
Nil is returned for unspecified moduleRoots; in this case, |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
429 |
the global (i.e. fallBack) repository will be used for source access." |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
430 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
431 |
CVSModuleRoots isNil ifTrue:[^nil]. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
432 |
^ CVSModuleRoots at:aModuleName ifAbsent:nil. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
433 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
434 |
"Modified: 19.9.1997 / 06:09:40 / cg" |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
435 |
"Created: 19.9.1997 / 06:13:06 / cg" |
1025 | 436 |
! |
437 |
||
438 |
repositoryNamesPerModule |
|
439 |
"return the dictionary, which associates CVSRoots to module names. |
|
440 |
If no entry is contained in this dictionary for some module, |
|
441 |
the default cvsRoot (CVSRoot) will be used." |
|
442 |
||
443 |
^ CVSModuleRoots ? (Dictionary new) |
|
444 |
! |
|
445 |
||
446 |
repositoryNamesPerModule:aDictionary |
|
447 |
"set the dictionary, which associates CVSRoots to module names. |
|
448 |
If no entry is contained in this dictionary for some module, |
|
449 |
the default cvsRoot (CVSRoot) will be used." |
|
450 |
||
451 |
CVSModuleRoots := aDictionary |
|
130 | 452 |
! ! |
453 |
||
502 | 454 |
!CVSSourceCodeManager class methodsFor:'private'! |
130 | 455 |
|
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
456 |
checkOut:relativeFilename module:moduleDir in:tempdir |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
457 |
"checkout realtiveFilename in tempdir" |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
458 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
459 |
|cmd| |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
460 |
|
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
461 |
cmd := 'checkout -l ' , relativeFilename. |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
462 |
^ self |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
463 |
executeCVSCommand:cmd |
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
464 |
module:moduleDir |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
465 |
inDirectory:tempdir name |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
466 |
log:false |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
467 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
468 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
469 |
" |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
470 |
self checkOut:'stx/libbasic/Integer.st' asFilename in:'/tmp' asFilename |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
471 |
" |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
472 |
|
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
473 |
"Created: / 18.1.2000 / 20:30:01 / cg" |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
474 |
"Modified: / 18.1.2000 / 20:35:06 / cg" |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
475 |
! |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
476 |
|
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
477 |
checkinTroubleDialog:title message:message log:log abortable:abortable option:optionTitle |
472 | 478 |
"trouble checking in - open a dialog" |
479 |
||
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
480 |
^ self |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
481 |
checkinTroubleDialog:title |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
482 |
message:message |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
483 |
log:log |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
484 |
abortable:abortable |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
485 |
option:optionTitle |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
486 |
option2:nil |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
487 |
|
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
488 |
"Created: 10.12.1995 / 17:34:33 / cg" |
472 | 489 |
"Modified: 12.9.1996 / 02:39:06 / cg" |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
490 |
! |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
491 |
|
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
492 |
checkinTroubleDialog:title message:message log:log abortable:abortable option:optionTitle option2:optionTitle2 |
472 | 493 |
"trouble checking in - open a dialog" |
494 |
||
501 | 495 |
|l box list listView optionPressed option2Pressed| |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
496 |
|
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
497 |
l := log collect:[:line | line withTabsExpanded]. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
498 |
list := SelectionInList with:l. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
499 |
|
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
500 |
box := Dialog new. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
501 |
box label:(title). |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
502 |
|
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
503 |
(box addTextLabel:message) borderWidth:0. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
504 |
|
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
505 |
listView := SelectionInListView on:list. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
506 |
listView disable. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
507 |
listView height:200. |
749
c91f5a3fc9c0
do not make log-list tabbable (in MERGE-dialog)
Claus Gittinger <cg@exept.de>
parents:
748
diff
changeset
|
508 |
box addComponent:(HVScrollableView forView:listView miniScrollerH:true) tabable:false. |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
509 |
box addVerticalSpace. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
510 |
|
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
511 |
abortable ifTrue:[ |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
512 |
box addAbortButton |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
513 |
]. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
514 |
optionTitle notNil ifTrue:[ |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
515 |
box addOkButton:(Button label:optionTitle action:[optionPressed := true. box hide]). |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
516 |
]. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
517 |
optionTitle2 notNil ifTrue:[ |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
518 |
box addOkButton:(Button label:optionTitle2 action:[option2Pressed := true. box hide]). |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
519 |
]. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
520 |
box addOkButton. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
521 |
|
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
522 |
box extent:(box preferredExtent). |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
523 |
box minExtent:box extent. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
524 |
box maxExtent:box extent. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
525 |
|
1079
afa524b130f1
dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents:
1074
diff
changeset
|
526 |
box open. |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
527 |
|
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
528 |
box destroy. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
529 |
optionPressed == true ifTrue:[^ #option]. |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
530 |
option2Pressed == true ifTrue:[^ #option2]. |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
531 |
^ box accepted |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
532 |
|
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
533 |
"Created: 9.9.1996 / 19:12:45 / cg" |
472 | 534 |
"Modified: 12.9.1996 / 02:39:10 / cg" |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
535 |
! |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
536 |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
537 |
createEntryFor:pathInRepository module:aModule in:aDirectory revision:rev date:date special:special overwrite:overwrite |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
538 |
"create an CVS/Repository and CVS/Entries entry for filename. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
539 |
If the path does not exist, it will be created |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
540 |
If overwrite is true, an existing Entry will be overwritten. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
541 |
" |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
542 |
|
710
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
543 |
|filename cvsRoot cvsDir name entries firstPart s path| |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
544 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
545 |
filename := pathInRepository asFilename. |
167 | 546 |
cvsDir := (aDirectory asFilename construct:'CVS') recursiveMakeDirectory. |
547 |
entries := cvsDir construct:'Entries'. |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
548 |
name := filename baseName. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
549 |
firstPart := '/', name, '/'. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
550 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
551 |
s := entries readStream. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
552 |
s isNil ifTrue:[ |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
553 |
"/ |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
554 |
"/ no Repository yet, create one |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
555 |
"/ |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
556 |
|index root| |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
557 |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
558 |
cvsRoot := self getCVSROOTForModule:aModule. |
639
9072415bbeb1
Fixes: grok new CVSROOT=:pserver:hostname:/pathname syntax.
Stefan Vogel <sv@exept.de>
parents:
638
diff
changeset
|
559 |
"/ |
9072415bbeb1
Fixes: grok new CVSROOT=:pserver:hostname:/pathname syntax.
Stefan Vogel <sv@exept.de>
parents:
638
diff
changeset
|
560 |
"/ match for first '/', to get the path portion without :pserver:host: |
9072415bbeb1
Fixes: grok new CVSROOT=:pserver:hostname:/pathname syntax.
Stefan Vogel <sv@exept.de>
parents:
638
diff
changeset
|
561 |
"/ |
9072415bbeb1
Fixes: grok new CVSROOT=:pserver:hostname:/pathname syntax.
Stefan Vogel <sv@exept.de>
parents:
638
diff
changeset
|
562 |
index := cvsRoot indexOf:$/. |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
563 |
index > 0 ifTrue:[ |
639
9072415bbeb1
Fixes: grok new CVSROOT=:pserver:hostname:/pathname syntax.
Stefan Vogel <sv@exept.de>
parents:
638
diff
changeset
|
564 |
root := cvsRoot copyFrom:(index). |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
565 |
] ifFalse:[ |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
566 |
root := cvsRoot. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
567 |
]. |
710
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
568 |
"/ create Repository |
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
569 |
"/ (notice, contents must be a Unix filename ... |
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
570 |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
571 |
s := (cvsDir construct:'Repository') writeStream. |
710
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
572 |
path := Filename components:filename directory name. |
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
573 |
path := path asStringWith:$/. |
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
574 |
s nextPutLine:(root, '/', path). |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
575 |
s close. |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
576 |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
577 |
"/ make new Entries file. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
578 |
s := entries writeStream. |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
579 |
] ifFalse:[ |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
580 |
|newName newStream line| |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
581 |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
582 |
newName := Filename newTemporaryIn:cvsDir. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
583 |
newStream := newName writeStream. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
584 |
[(line := s nextLine) notNil] whileTrue:[ |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
585 |
(line findString:firstPart) ~= 1 ifTrue:[ |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
586 |
"/ we have found an entry for ourself. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
587 |
"/ If we do not want to overwrite it, clean up everything and return. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
588 |
overwrite ifFalse:[ |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
589 |
newName remove. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
590 |
newStream close. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
591 |
s close. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
592 |
^ self |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
593 |
]. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
594 |
newStream nextPutLine:line |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
595 |
]. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
596 |
]. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
597 |
newName renameTo:entries. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
598 |
s close. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
599 |
s := newStream. |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
600 |
]. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
601 |
s nextPutLine:firstPart, rev, '/', date, '/', special, '/'. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
602 |
s close. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
603 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
604 |
" |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
605 |
self createEntryFor:'foo/xxx/yyy' in:'foo/xxx' revision:'1.22' date:'dummy' special:'' |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
606 |
self createEntryFor:'foo/xxx/yyy' in:'foo/xxx' revision:'3.44' date:'new dummy' special:'special' |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
607 |
" |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
608 |
|
639
9072415bbeb1
Fixes: grok new CVSROOT=:pserver:hostname:/pathname syntax.
Stefan Vogel <sv@exept.de>
parents:
638
diff
changeset
|
609 |
"Created: / 19.9.1997 / 06:21:02 / cg" |
9072415bbeb1
Fixes: grok new CVSROOT=:pserver:hostname:/pathname syntax.
Stefan Vogel <sv@exept.de>
parents:
638
diff
changeset
|
610 |
"Modified: / 7.1.1998 / 14:15:35 / stefan" |
710
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
611 |
"Modified: / 20.8.1998 / 00:12:11 / cg" |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
612 |
! |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
613 |
|
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
614 |
createLocalDirectory:packageDir inModule:moduleDir |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
615 |
"create a local working directory for module/package. |
806 | 616 |
To speed up things, we checkout a file '__stxCvsDummy__', to create |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
617 |
the whole tree. If the file is not present, we will create it. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
618 |
Return the name of a temporary directory containing the package" |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
619 |
|
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
620 |
^ self |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
621 |
createLocalDirectory:packageDir |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
622 |
inModule:moduleDir |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
623 |
with:'.stxCvsDummy' |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
624 |
|
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
625 |
" |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
626 |
self createLocalDirectory:'libbasic' inModule:'stx' |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
627 |
" |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
628 |
|
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
629 |
"Created: / 23.7.1999 / 19:14:28 / stefan" |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
630 |
"Modified: / 26.7.1999 / 17:43:35 / stefan" |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
631 |
"Modified: / 18.1.2000 / 20:56:19 / cg" |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
632 |
! |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
633 |
|
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
634 |
createLocalDirectory:packageDir inModule:moduleDir with:fileToCheckout |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
635 |
"create a local working directory for module/package, and checkout the |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
636 |
given file there. |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
637 |
Return the name of a temporary directory containing the package, or nil" |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
638 |
|
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
639 |
|path absolutePath tempdir unixPath| |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
640 |
|
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
641 |
path := (moduleDir asFilename construct:packageDir) construct:fileToCheckout. |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
642 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
643 |
tempdir := self createTempDirectory:nil forModule:nil. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
644 |
tempdir isNil ifTrue:[ |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
645 |
('CVSSourceCodeManager [error]: no tempDir - cannot checkout') errorPrintCR. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
646 |
^ nil |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
647 |
]. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
648 |
|
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
649 |
OperatingSystem isUNIXlike ifTrue:[ |
892 | 650 |
unixPath := path name. |
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
651 |
] ifFalse:[ |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
652 |
OperatingSystem isVMSlike ifTrue:[ |
939 | 653 |
self halt:'VMS case not yet implemented' |
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
654 |
]. |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
655 |
unixPath := path name copy replaceAll:$\ with:$/ |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
656 |
]. |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
657 |
|
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
658 |
(self checkOut:unixPath module:moduleDir in:tempdir) ifFalse:[ |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
659 |
"dummy file does not exist, so create it" |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
660 |
absolutePath := tempdir construct:path. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
661 |
absolutePath directory recursiveMakeDirectory. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
662 |
"now create the file" |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
663 |
(absolutePath writeStream close) isNil ifTrue:[ |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
664 |
('CVSSourceCodeManager [error]: cannot create dummy') errorPrintCR. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
665 |
tempdir recursiveRemove. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
666 |
^ nil. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
667 |
]. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
668 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
669 |
"now create the dummy file in the repository" |
892 | 670 |
(self import:moduleDir in:tempdir) ifFalse:[ |
671 |
('CVSSourceCodeManager [error]: cannot import dummy') errorPrintCR. |
|
672 |
]. |
|
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
673 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
674 |
"remove the path, so that checkout works" |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
675 |
(tempdir construct:moduleDir) recursiveRemove. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
676 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
677 |
"checkout the dummy, the intermediate directories will be created" |
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
678 |
(self checkOut:unixPath module:moduleDir in:tempdir) ifFalse:[ |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
679 |
('CVSSourceCodeManager [error]: cannot create working dir') errorPrintCR. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
680 |
tempdir recursiveRemove. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
681 |
^ nil. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
682 |
]. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
683 |
]. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
684 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
685 |
^ tempdir. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
686 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
687 |
" |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
688 |
self createLocalDirectory:'libbasic' inModule:'stx' |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
689 |
" |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
690 |
|
807
f84a9377278e
Fix .stxCvsDummy / import stuff.
Stefan Vogel <sv@exept.de>
parents:
806
diff
changeset
|
691 |
"Modified: / 26.7.1999 / 17:43:35 / stefan" |
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
692 |
"Created: / 18.1.2000 / 20:55:52 / cg" |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
693 |
"Modified: / 18.1.2000 / 20:56:45 / cg" |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
694 |
! |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
695 |
|
130 | 696 |
createTempDirectory:packageDir forModule:moduleDir |
472 | 697 |
"create a temp directory for checking out" |
698 |
||
130 | 699 |
|tempdir dir| |
700 |
||
680 | 701 |
"/ if CVSTempDir isNil, use current. |
702 |
tempdir := Filename newTemporaryIn:CVSTempDir. |
|
130 | 703 |
tempdir exists ifTrue:[ |
267 | 704 |
tempdir recursiveRemove. |
130 | 705 |
]. |
606
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
706 |
OperatingSystem errorSignal handle:[:ex | |
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
707 |
'SourceCodemanager [error]: cannot create temporary directory' errorPrintCR. |
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
708 |
^ nil. |
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
709 |
] do:[ |
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
710 |
tempdir makeDirectory. |
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
711 |
]. |
130 | 712 |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
713 |
moduleDir notNil ifTrue:[ |
267 | 714 |
dir := tempdir construct:moduleDir. |
715 |
dir makeDirectory. |
|
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
716 |
|
267 | 717 |
packageDir notNil ifTrue:[ |
718 |
dir := dir construct:packageDir. |
|
719 |
dir recursiveMakeDirectory. |
|
720 |
]. |
|
721 |
dir exists ifFalse:[ |
|
722 |
tempdir recursiveRemove. |
|
535 | 723 |
'SourceCodemanager [error]: cannot create temporary directory' errorPrintCR. |
267 | 724 |
^ nil. |
725 |
]. |
|
130 | 726 |
]. |
727 |
^ tempdir |
|
728 |
||
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
729 |
"self createTempDirectory:'fooPackage' forModule:'fooModule'" |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
730 |
|
130 | 731 |
"Created: 9.12.1995 / 19:14:35 / cg" |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
732 |
"Modified: 19.12.1995 / 16:13:02 / stefan" |
606
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
733 |
"Modified: 18.8.1997 / 19:06:52 / cg" |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
734 |
! |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
735 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
736 |
cvsTimeString:absoluteTime |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
737 |
"convert an absoluteTime to a string suitable for the CVS/Entries file: |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
738 |
|
807
f84a9377278e
Fix .stxCvsDummy / import stuff.
Stefan Vogel <sv@exept.de>
parents:
806
diff
changeset
|
739 |
123456789012345678901234 |
f84a9377278e
Fix .stxCvsDummy / import stuff.
Stefan Vogel <sv@exept.de>
parents:
806
diff
changeset
|
740 |
Tue Dec 19 20:56:26 1995 |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
741 |
" |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
742 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
743 |
|date time stream| |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
744 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
745 |
date := absoluteTime asDate. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
746 |
time := absoluteTime asTime. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
747 |
stream := WriteStream on:(String new:24). |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
748 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
749 |
(#('Mon' 'Tue' 'Wed' 'Thu' 'Fri' 'Sat' 'Sun') at:(date dayInWeek)) printOn:stream. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
750 |
stream space. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
751 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
752 |
(#('Jan' 'Feb' 'Mar' 'Apr' 'May' 'Jun' 'Jul' 'Aug' 'Sep' 'Oct' 'Nov' 'Dec') |
807
f84a9377278e
Fix .stxCvsDummy / import stuff.
Stefan Vogel <sv@exept.de>
parents:
806
diff
changeset
|
753 |
at:(date month)) printOn:stream. |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
754 |
stream space. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
755 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
756 |
date day printOn:stream. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
757 |
stream space. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
758 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
759 |
time print24HourFormatOn: stream. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
760 |
stream space. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
761 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
762 |
date year printOn:stream. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
763 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
764 |
^ stream contents |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
765 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
766 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
767 |
" |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
768 |
CVSSourceCodeManager cvsTimeString:(AbsoluteTime now) |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
769 |
" |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
770 |
|
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
771 |
"Modified: 20.12.1995 / 11:03:32 / stefan" |
130 | 772 |
! |
773 |
||
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
774 |
executeCVSCommand:cvsCommand module:moduleName inDirectory:dir |
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
775 |
"execute command and prepend cvs command name and global options. |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
776 |
if dir ~= nil, execute command in that directory. |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
777 |
This also leads to a log-entry to be added to cvs's logfile." |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
778 |
|
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
779 |
^ self |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
780 |
executeCVSCommand:cvsCommand |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
781 |
module:moduleName |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
782 |
inDirectory:dir |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
783 |
log:true |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
784 |
|
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
785 |
"Modified: / 20.5.1998 / 16:07:28 / cg" |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
786 |
! |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
787 |
|
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
788 |
executeCVSCommand:cvsCommand module:moduleName inDirectory:dir log:doLog |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
789 |
"execute command and prepend cvs command name and global options. |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
790 |
if dir ~= nil, execute command in that directory. |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
791 |
The doLog argument, if false supresses a logEntry to be added |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
792 |
in the cvs log file (used when reading / extracting history)" |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
793 |
|
1119 | 794 |
^ self |
795 |
executeCVSCommand:cvsCommand module:moduleName inDirectory:dir log:doLog |
|
796 |
pipe:false |
|
797 |
! |
|
798 |
||
799 |
executeCVSCommand:cvsCommand module:moduleName inDirectory:dir log:doLog pipe:doPipe |
|
800 |
"execute command and prepend cvs command name and global options. |
|
801 |
if dir ~= nil, execute command in that directory. |
|
802 |
The doLog argument, if false supresses a logEntry to be added |
|
803 |
in the cvs log file (used when reading / extracting history)" |
|
804 |
||
805 |
|command cvsRoot rslt ok pathOfDir p| |
|
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
806 |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
807 |
cvsRoot := self getCVSROOTForModule:moduleName. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
808 |
|
1119 | 809 |
command := CVSBinDir. |
810 |
command size > 0 ifTrue:[ |
|
811 |
(command endsWith:Filename separator) ifFalse:[ |
|
812 |
command := command , (Filename separator asString) |
|
813 |
] |
|
814 |
]. |
|
815 |
||
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
816 |
doLog ifFalse:[ |
1119 | 817 |
command := command , 'cvs -l -d "', cvsRoot, '" ', cvsCommand. |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
818 |
] ifTrue:[ |
1119 | 819 |
command := command , 'cvs -d "', cvsRoot, '" ', cvsCommand. |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
820 |
]. |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
821 |
|
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
822 |
Verbose == true ifTrue:[ |
1119 | 823 |
('CVSSourceCodeManager [info]: executing: ' , command , '[in ' , dir , ']') infoPrintCR. |
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
824 |
]. |
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
825 |
|
767 | 826 |
pathOfDir := dir asFilename pathName. |
1119 | 827 |
|
828 |
doPipe ifTrue:[ |
|
829 |
rslt := PipeStream readingFrom:command inDirectory:pathOfDir. |
|
830 |
ok := rslt notNil. |
|
831 |
] ifFalse:[ |
|
832 |
Processor isDispatching ifFalse:[ |
|
833 |
rslt := ok := OperatingSystem executeCommand:command inDirectory:pathOfDir. |
|
834 |
] ifTrue:[ |
|
835 |
p := [ |
|
836 |
rslt := ok := OperatingSystem executeCommand:command inDirectory:pathOfDir. |
|
837 |
] fork. |
|
838 |
||
839 |
(p waitUntilTerminatedWithTimeout:300) ifTrue:[ |
|
840 |
('CVSSourceCodeManager [info]: command timeout: ' , command) errorPrintCR. |
|
841 |
^ false |
|
842 |
]. |
|
843 |
]. |
|
929 | 844 |
]. |
831
9f359f49fbf1
time watchdog added to cvs command execution
Claus Gittinger <cg@exept.de>
parents:
830
diff
changeset
|
845 |
|
1119 | 846 |
ok ifFalse:[ |
847 |
('CVSSourceCodeManager [info]: command failed: ' , command) errorPrintCR. |
|
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
848 |
]. |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
849 |
^ rslt |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
850 |
|
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
851 |
"Modified: / 23.4.1996 / 15:24:00 / stefan" |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
852 |
"Created: / 20.5.1998 / 16:06:34 / cg" |
767 | 853 |
"Modified: / 19.5.1999 / 10:43:57 / cg" |
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
854 |
! |
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
855 |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
856 |
getCVSROOTForModule:aModuleName |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
857 |
"internal: used when accessing a source repository. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
858 |
Return the CVSROOT which provides the sources for a particular module. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
859 |
If no specific root was defined for that module, return the value of |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
860 |
the global (fallBack) CVSRoot. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
861 |
Nil is returned if no repository is available." |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
862 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
863 |
|root| |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
864 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
865 |
CVSModuleRoots isNil ifTrue:[^ CVSRoot]. |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
866 |
aModuleName isNil ifTrue:[^ CVSRoot]. |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
867 |
root := CVSModuleRoots at:aModuleName ifAbsent:nil. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
868 |
^ root ? CVSRoot |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
869 |
|
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
870 |
"Created: / 19.9.1997 / 06:18:07 / cg" |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
871 |
"Modified: / 20.5.1998 / 16:30:12 / cg" |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
872 |
! |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
873 |
|
1025 | 874 |
getCVSROOTsPerModule |
875 |
"return a dictionary, which associates CVSRoots to modules" |
|
876 |
||
877 |
^ CVSModuleRoots ? #() |
|
878 |
! |
|
879 |
||
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
880 |
import:moduleDir in:tempdir |
807
f84a9377278e
Fix .stxCvsDummy / import stuff.
Stefan Vogel <sv@exept.de>
parents:
806
diff
changeset
|
881 |
"import the existing tree in tempdir as repository" |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
882 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
883 |
|cmd| |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
884 |
|
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
885 |
cmd := 'import -m "checkin from stx browser" . initialV initialR'. |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
886 |
^ self |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
887 |
executeCVSCommand:cmd |
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
888 |
module:moduleDir |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
889 |
inDirectory:tempdir name |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
890 |
log:false |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
891 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
892 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
893 |
" |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
894 |
|f d| |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
895 |
f := 'stefan/dummy/fasel'. |
807
f84a9377278e
Fix .stxCvsDummy / import stuff.
Stefan Vogel <sv@exept.de>
parents:
806
diff
changeset
|
896 |
d := '/tmp/tt' asFilename construct:f. |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
897 |
d directory recursiveMakeDirectory. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
898 |
d writeStream close. |
807
f84a9377278e
Fix .stxCvsDummy / import stuff.
Stefan Vogel <sv@exept.de>
parents:
806
diff
changeset
|
899 |
self import:'stefan' in:'/tmp/tt/stefan' asFilename |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
900 |
" |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
901 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
902 |
"Created: / 23.7.1999 / 19:19:34 / stefan" |
807
f84a9377278e
Fix .stxCvsDummy / import stuff.
Stefan Vogel <sv@exept.de>
parents:
806
diff
changeset
|
903 |
"Modified: / 26.7.1999 / 17:46:29 / stefan" |
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
904 |
"Modified: / 18.1.2000 / 20:21:32 / cg" |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
905 |
! |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
906 |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
907 |
releaseAndRemove:tempdir module:moduleDir outputTo:outputFilename |
472 | 908 |
"cleanup; release tree towards cvs and remove the temporary tree" |
909 |
||
136
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
910 |
|cmd redirect| |
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
911 |
|
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
912 |
outputFilename isNil ifTrue:[ |
822 | 913 |
OperatingSystem isMSDOSlike ifTrue:[ |
914 |
redirect := 'NUL' |
|
915 |
] ifFalse:[ |
|
916 |
redirect := '/dev/null' |
|
917 |
] |
|
136
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
918 |
] ifFalse:[ |
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
919 |
redirect := outputFilename name |
136
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
920 |
]. |
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
921 |
|
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
922 |
"/ |
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
923 |
"/ release it towards cvs |
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
924 |
"/ |
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
925 |
cmd := '-l release > ' , redirect. |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
926 |
(self |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
927 |
executeCVSCommand:cmd |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
928 |
module:moduleDir |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
929 |
inDirectory:tempdir name |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
930 |
log:false |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
931 |
) ifFalse:[ |
136
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
932 |
"/ 'CVSMGR: failed to release: ' errorPrint. cmd errorPrintNL. |
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
933 |
]. |
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
934 |
|
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
935 |
tempdir recursiveRemove. |
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
936 |
|
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
937 |
"Modified: / 23.4.1996 / 14:29:49 / stefan" |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
938 |
"Created: / 19.9.1997 / 06:28:02 / cg" |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
939 |
"Modified: / 20.5.1998 / 16:44:07 / cg" |
822 | 940 |
"Modified: / 3.9.1999 / 14:51:29 / ps" |
136
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
941 |
! |
81d824f327d8
-l flag added to all cvs commands which do not update the repository (no one is interrested in this)
Claus Gittinger <cg@exept.de>
parents:
134
diff
changeset
|
942 |
|
130 | 943 |
repositoryTopDirectory |
472 | 944 |
"return the top of the repository. This handles remote CVS connections |
945 |
as well" |
|
946 |
||
758 | 947 |
CVSRoot isNil ifTrue:[^ nil]. |
753
0454b00e1de5
fixed checkForExistingModule / checkForExistingPackage
Claus Gittinger <cg@exept.de>
parents:
749
diff
changeset
|
948 |
^ self repositoryTopDirectory:CVSRoot. |
130 | 949 |
|
950 |
" |
|
951 |
CVSSourceCodeManager repositoryTopDirectory |
|
952 |
" |
|
953 |
||
640 | 954 |
"Created: / 25.11.1995 / 18:39:19 / cg" |
641
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
955 |
"Modified: / 16.1.1998 / 17:33:31 / stefan" |
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
956 |
! |
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
957 |
|
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
958 |
repositoryTopDirectory:aString |
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
959 |
"return the top of the repository (without remote prefix)" |
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
960 |
|
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
961 |
|idx| |
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
962 |
|
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
963 |
idx := aString indexOf:$/. |
753
0454b00e1de5
fixed checkForExistingModule / checkForExistingPackage
Claus Gittinger <cg@exept.de>
parents:
749
diff
changeset
|
964 |
idx <= 1 ifTrue:[ |
641
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
965 |
^ aString. |
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
966 |
]. |
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
967 |
^ aString copyFrom:idx. |
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
968 |
|
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
969 |
" |
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
970 |
CVSSourceCodeManager repositoryTopDirectory:':pserver:stefan@ibm.exept.de:/archiv/cvs' |
753
0454b00e1de5
fixed checkForExistingModule / checkForExistingPackage
Claus Gittinger <cg@exept.de>
parents:
749
diff
changeset
|
971 |
CVSSourceCodeManager repositoryTopDirectory:'exept:/files/CVS' |
641
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
972 |
CVSSourceCodeManager repositoryTopDirectory:'/archiv/cvs' |
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
973 |
" |
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
974 |
|
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
975 |
"Modified: / 16.1.1998 / 17:32:03 / stefan" |
130 | 976 |
! |
977 |
||
486 | 978 |
revisionStringFromLog:log entry:entry forClass:aClass |
472 | 979 |
"given a log entry, extract a revision string" |
980 |
||
486 | 981 |
|oldRev idx special| |
982 |
||
983 |
oldRev := aClass revisionString. |
|
984 |
special := ''. |
|
985 |
||
554 | 986 |
oldRev notNil ifTrue:[ |
987 |
idx := oldRev lastIndexOf:$[. |
|
486 | 988 |
idx ~~ 0 ifTrue:[ |
554 | 989 |
idx := oldRev indexOf:$[ startingAt:idx+1. |
990 |
idx ~~ 0 ifTrue:[ |
|
991 |
special := ' ' , (oldRev copyFrom:idx). |
|
992 |
] |
|
993 |
]. |
|
486 | 994 |
]. |
995 |
||
130 | 996 |
^ '$Header: ' , (log at:#container) , |
997 |
' ' , (entry at:#revision) , |
|
998 |
' ' , (entry at:#date) , |
|
999 |
' ' , (entry at:#author) , |
|
1000 |
' ' , (entry at:#state) , |
|
486 | 1001 |
' $' , |
1002 |
special |
|
130 | 1003 |
|
486 | 1004 |
"Created: 16.9.1996 / 20:24:14 / cg" |
554 | 1005 |
"Modified: 3.3.1997 / 22:31:51 / cg" |
130 | 1006 |
! |
1007 |
||
1008 |
updatedRevisionStringOf:aClass forRevision:newRevision with:originalVersionString |
|
472 | 1009 |
"update a revision string" |
1010 |
||
130 | 1011 |
|idx leftPart rightPart vsnString newVsn| |
1012 |
||
1013 |
"/ search for ,v |
|
1014 |
idx := originalVersionString indexOfSubCollection:'.st,v'. |
|
151
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1015 |
idx == 0 ifTrue:[^ nil]. |
485 | 1016 |
|
130 | 1017 |
leftPart := originalVersionString copyTo:(idx - 1 + 5). |
1018 |
rightPart := (originalVersionString copyFrom:(idx + 5)) withoutSpaces. |
|
1019 |
idx := rightPart indexOfSeparator. |
|
151
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1020 |
idx == 0 ifTrue:[^ nil]. |
485 | 1021 |
|
130 | 1022 |
vsnString := rightPart copyTo:idx - 1. |
1023 |
rightPart := rightPart copyFrom:idx + 1. |
|
1024 |
||
1025 |
newRevision isNil ifTrue:[ |
|
472 | 1026 |
(vsnString endsWith:'m') ifTrue:[ |
1027 |
"/ alread a modified class |
|
130 | 1028 |
"/ ('already modified: ' , vsnString) printNL. |
472 | 1029 |
^ nil |
1030 |
]. |
|
1031 |
newVsn := vsnString , 'm' |
|
130 | 1032 |
] ifFalse:[ |
472 | 1033 |
newVsn := newRevision |
130 | 1034 |
]. |
486 | 1035 |
|
130 | 1036 |
^ leftPart , ' ' , newVsn , ' ' , rightPart |
1037 |
||
1038 |
"Created: 7.12.1995 / 20:23:38 / cg" |
|
486 | 1039 |
"Modified: 16.9.1996 / 20:24:28 / cg" |
130 | 1040 |
! ! |
1041 |
||
502 | 1042 |
!CVSSourceCodeManager class methodsFor:'source code access'! |
130 | 1043 |
|
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1044 |
checkin:containerFilename text:someText directory:packageDir module:moduleDir logMessage:logMessage force:force |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1045 |
"enter some (source) code (which is someText) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1046 |
into the source repository. If the force argument is true, no merge is done; |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1047 |
instead, the code is checked in as given (Dangerous). |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1048 |
Return true if ok, false if not." |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1049 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1050 |
|tempdir cmd checkoutName logMsg revision logTmp |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1051 |
cmdOut whatHappened s idx changeLog changesAsLogged l |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1052 |
newRevision newString binRevision msg answer didMerge |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1053 |
mySource mergedSource modulePath time |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1054 |
editor checkInRepaired didAccept emphasizedText repairedText out |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1055 |
emSep comment how| |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1056 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1057 |
revision := self newestRevisionInFile:containerFilename directory:packageDir module:moduleDir. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1058 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1059 |
logMsg := logMessage. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1060 |
(logMsg isNil or:[logMsg isEmpty]) ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1061 |
logMsg := 'checkin from browser'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1062 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1063 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1064 |
cmdOut := Filename newTemporary. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1065 |
cmdOut exists ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1066 |
cmdOut remove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1067 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1068 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1069 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1070 |
"/ in CVS, we have to checkout the file first, in order |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1071 |
"/ to get up-to-date CVS entries, and also to be able to merge in |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1072 |
"/ other users changes. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1073 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1074 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1075 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1076 |
"/ first, create a temporary work tree |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1077 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1078 |
tempdir := self createTempDirectory:nil forModule:nil. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1079 |
tempdir isNil ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1080 |
('CVSSourceCodeManager [error]: no tempDir - cannot checkin ' , containerFilename) errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1081 |
^ false |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1082 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1083 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1084 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1085 |
"/ next, create CVS/Entries and CVS/Repository with version information of current version |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1086 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1087 |
modulePath := moduleDir , '/' , packageDir. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1088 |
checkoutName := modulePath , '/' , containerFilename. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1089 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1090 |
revision isNil ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1091 |
"/ a new file ... |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1092 |
^ self |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1093 |
createContainerForText:someText inModule:moduleDir package:packageDir container:containerFilename |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1094 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1095 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1096 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1097 |
"/ correct our current time, so that converting it will give us UTC |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1098 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1099 |
time := AbsoluteTime now subtractSeconds:1. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1100 |
time := time addSeconds:(time utcOffset). |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1101 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1102 |
self createEntryFor:checkoutName |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1103 |
module:moduleDir |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1104 |
in:(tempdir construct:modulePath) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1105 |
revision:revision |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1106 |
date:(self cvsTimeString:time) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1107 |
special:'' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1108 |
overwrite:true. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1109 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1110 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1111 |
"/ copy-over our current version |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1112 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1113 |
Stream errorSignal handle:[:ex| |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1114 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1115 |
'CVSSourceCodeManager [error]: cannot copy-over filedOut class source' errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1116 |
^ false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1117 |
] do:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1118 |
s := (tempdir construct:checkoutName) writeStream. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1119 |
s nextPutAll:someText. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1120 |
s close. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1121 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1122 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1123 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1124 |
"/ synchronize i.e. merge in any changes |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1125 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1126 |
self activityNotification:'merging ' , containerFilename , ' with repository version ...'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1127 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1128 |
cmd := 'update ', containerFilename, ' >', cmdOut name. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1129 |
(self |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1130 |
executeCVSCommand:cmd |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1131 |
module:moduleDir |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1132 |
inDirectory:((tempdir construct:moduleDir) constructString:packageDir) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1133 |
) ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1134 |
force ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1135 |
'CVSSourceCodeManager [error]: failed to execute: ' errorPrint. cmd errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1136 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1137 |
cmdOut remove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1138 |
'CVSSourceCodeManager [error]: cannot merge current source with repository version' errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1139 |
^ false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1140 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1141 |
] ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1142 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1143 |
"/ check what happened - the contents of the cmdOut file may be: |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1144 |
"/ empty -> nothing changed |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1145 |
"/ M xxx -> merged-in changes from other users |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1146 |
"/ C xxx -> a conflict occured and the differences have been merged into the source |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1147 |
"/ needs special action |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1148 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1149 |
(cmdOut exists and:[cmdOut fileSize > 0]) ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1150 |
whatHappened := cmdOut contentsOfEntireFile asString. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1151 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1152 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1153 |
cmdOut remove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1154 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1155 |
(whatHappened isNil or:[whatHappened isEmpty]) ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1156 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1157 |
"/ no change |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1158 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1159 |
"/ Transcript showCR:'no change in ' , containerFilename , ' (repository unchanged)'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1160 |
force ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1161 |
self information:'nothing changed in ' , containerFilename , ' (repository unchanged)'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1162 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1163 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1164 |
^ true |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1165 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1166 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1167 |
Verbose == true ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1168 |
('CVSMGR: result is: ' , whatHappened) infoPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1169 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1170 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1171 |
force ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1172 |
revision isNil ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1173 |
changeLog := self revisionLogOfContainer:containerFilename directory:packageDir module:moduleDir. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1174 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1175 |
changeLog := self revisionLogOfContainer:containerFilename module:moduleDir package:packageDir fromRevision:(self revisionAfter:revision) toRevision:nil. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1176 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1177 |
changeLog notNil ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1178 |
s := WriteStream on:String new. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1179 |
self writeRevisionLogMessagesFrom:changeLog withHeader:false to:s. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1180 |
changesAsLogged := s contents. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1181 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1182 |
"/ mhmh - that should not happen |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1183 |
changesAsLogged := ''. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1184 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1185 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1186 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1187 |
didMerge := false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1188 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1189 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1190 |
"/ cvs above rel10 returns a multiline info ... |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1191 |
"/ we have to extract the one line which states what happened. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1192 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1193 |
whatHappened := whatHappened asCollectionOfLines asStringCollection. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1194 |
whatHappened := whatHappened select:[:line | |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1195 |
(line startsWith:'RCS file') not |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1196 |
and:[(line startsWith:'retrieving') not |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1197 |
and:[(line startsWith:'Merging') not |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1198 |
and:[line size > 0]]] |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1199 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1200 |
whatHappened := whatHappened asString. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1201 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1202 |
(force or:[whatHappened startsWith:'M ']) ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1203 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1204 |
"/ merged in changes |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1205 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1206 |
(force |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1207 |
or:[changeLog isNil |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1208 |
or:[(changeLog at:#revisions) isEmpty]]) ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1209 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1210 |
"/ pretty good - nothing has changed in the meanwhile |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1211 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1212 |
Transcript showCR:'checking in ' , containerFilename , ' ...' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1213 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1214 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1215 |
"/ someone else has changed things in the meanwhile, but there is no conflict |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1216 |
"/ and version have been merged. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1217 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1218 |
didMerge := true. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1219 |
changesAsLogged := changesAsLogged asCollectionOfLines. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1220 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1221 |
s := WriteStream on:String new. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1222 |
s nextPutAll:someText. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1223 |
mySource := s contents asString. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1224 |
mergedSource := (tempdir construct:checkoutName) readStream contents asString. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1225 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1226 |
mySource = mergedSource ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1227 |
msg := 'The source of ' , containerFilename , ' has been changed in the meanwhile as listed below. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1228 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1229 |
I have merged your version with the newest repository version, |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1230 |
and found no differences between the result and your current version |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1231 |
(i.e. your version seemed up-to-date).'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1232 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1233 |
self checkinTroubleDialog:'Merging versions' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1234 |
message:msg |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1235 |
log:changesAsLogged |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1236 |
abortable:false |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1237 |
option:nil. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1238 |
didMerge := false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1239 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1240 |
msg := 'The source of ' , containerFilename , ' has been changed in the meanwhile as listed below. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1241 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1242 |
If you continue, your new changes (based upon rev. ' , revision printString , ') will be MERGED |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1243 |
into the newest revision. This will combine the other version with your changes |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1244 |
into a new common revision which may be different from both. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1245 |
Although this is a nice feature, it may fail to create the expected result in certain situations. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1246 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1247 |
You should carefully check the result - by comparing the current version with the |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1248 |
most recent version in the repository. If that does not contain an acceptable version, |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1249 |
change methods as required and check in again. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1250 |
Be aware, that after that, the actual repository version is different from your current classes, |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1251 |
and you should update your class from the repository. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1252 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1253 |
Continue ?'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1254 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1255 |
answer := self checkinTroubleDialog:'Merging versions' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1256 |
message:msg |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1257 |
log:changesAsLogged |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1258 |
abortable:true |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1259 |
option:'stop - see first'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1260 |
answer ~~ true ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1261 |
answer == #option ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1262 |
DiffTextView |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1263 |
openOn:mySource |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1264 |
label:'current version' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1265 |
and:mergedSource |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1266 |
label:'merged version'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1267 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1268 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1269 |
Transcript showCR:'checkin aborted - (no merge; repository unchanged)'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1270 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1271 |
^ false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1272 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1273 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1274 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1275 |
"/ changesAsLogged := (changesAsLogged asStringCollection collect:[:line | line withTabsExpanded]) asString. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1276 |
"/ msg := 'The source of ' , containerFilename , ' has been changed in the meanwhile as follows: |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1277 |
"/' , changesAsLogged , ' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1278 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1279 |
"/If you continue, your new changes (based upon rev. ' , revision , ') will be MERGED |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1280 |
"/into the newest revision. This will combine the other version with your changes |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1281 |
"/into a new common revision which is different from both. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1282 |
"/Although convenient, it may fail to create the expected result in certain situations. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1283 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1284 |
"/You should carefully check the result - by comparing the current version with the |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1285 |
"/most recent version in the repository. If that does not contain an acceptable version, |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1286 |
"/change methods as required and check in again. Be aware, that the actual repository version |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1287 |
"/is different from your current classes. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1288 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1289 |
"/Continue ?'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1290 |
"/ (self confirm:msg) ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1291 |
"/ Transcript showCR:'checkin aborted - (no merge; repository unchanged)'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1292 |
"/ tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1293 |
"/ ^ false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1294 |
"/ ]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1295 |
Transcript showCR:'checking in ' , containerFilename , ' (merged other changes) ...' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1296 |
] |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1297 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1298 |
(whatHappened startsWith:'C ') ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1299 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1300 |
"/ conflict; someone else checked in something in the meanwhile, |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1301 |
"/ and there is a conflict between this version and the checked in version. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1302 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1303 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1304 |
changesAsLogged := changesAsLogged asCollectionOfLines. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1305 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1306 |
msg := 'The source of ' , containerFilename , ' has been changed in the meanwhile as listed below. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1307 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1308 |
Your new changes (based upon rev. ' , revision printString , ') CONFLICT with those changes. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1309 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1310 |
You should fix things by comparing your class with the most recent repository version |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1311 |
and change your methods avoiding conflicts. The checkin again. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1312 |
'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1313 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1314 |
answer := self checkinTroubleDialog:'Version conflict' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1315 |
message:msg |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1316 |
log:changesAsLogged |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1317 |
abortable:false |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1318 |
option:'show conflicts' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1319 |
option2:'resolve conflicts'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1320 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1321 |
answer == #option ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1322 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1323 |
"/ show conflicts in a 3-way DiffTextView ... |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1324 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1325 |
Diff3TextView |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1326 |
openOnMergedText:(tempdir construct:checkoutName) readStream contents |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1327 |
label:'your version (checkin attempt)' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1328 |
label:'original (base version)' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1329 |
label:'newest repository version'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1330 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1331 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1332 |
checkInRepaired := false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1333 |
answer == #option2 ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1334 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1335 |
"/ allow checkin of repair version |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1336 |
"/ this is error prone ... |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1337 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1338 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1339 |
"/ show merged version in an editor ... |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1340 |
"/ ... accept will check it in. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1341 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1342 |
emphasizedText := (tempdir construct:checkoutName) readStream contents. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1343 |
emSep := (Array with:(#color->Color black) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1344 |
with:(#backgroundColor->Color green)). |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1345 |
emphasizedText := Diff3TextView |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1346 |
emphasizeMergedDiff3Text:emphasizedText |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1347 |
emphasize1:(Array with:(#color->Color white) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1348 |
with:(#backgroundColor->Color blue)) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1349 |
emphasize2:(Array with:(#color->Color white) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1350 |
with:(#backgroundColor->Color red)) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1351 |
emphasizeSep:emSep. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1352 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1353 |
comment := |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1354 |
'"/ *************************************************************** |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1355 |
"/ This text contains your current versions code (blue) |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1356 |
"/ merged with the conflicting code as found in the repository (red) which resulted |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1357 |
"/ from some other checkin. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1358 |
"/ Each such conflict is surrounded by green text (like this paragraph). |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1359 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1360 |
"/ Please have a look at ALL the conflicts and fix things as appropriate. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1361 |
"/ Delete the green lines as a confirmation - I will not checkin the changed text, |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1362 |
"/ unless no more green parts are present. This includes this comment at the top. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1363 |
"/ *************************************************************** |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1364 |
'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1365 |
comment := (Text string:comment emphasis:emSep) asStringCollection. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1366 |
emphasizedText := comment , emphasizedText. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1367 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1368 |
didAccept := false. checkInRepaired := true. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1369 |
[didAccept not and:[checkInRepaired]] whileTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1370 |
editor := RCSConflictEditTextView |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1371 |
setupWith:emphasizedText |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1372 |
title:'Resolve conflicts in ' , containerFilename , ', then accept & close to checkin'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1373 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1374 |
editor acceptAction:[:dummy | |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1375 |
repairedText := editor list. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1376 |
didAccept := true. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1377 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1378 |
didAccept := false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1379 |
editor topView openModal. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1380 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1381 |
didAccept ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1382 |
(Dialog confirm:'You did not accept the new text. Edit again ?') |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1383 |
ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1384 |
checkInRepaired := false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1385 |
] |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1386 |
] ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1387 |
"/ check if all green-stuff (separators) have been removed |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1388 |
(repairedText findFirst:[:line | line notNil and:[line notEmpty and:[(line emphasisAt:1) = emSep]]]) ~~ 0 ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1389 |
self warn:'You have to look at ALL conflicts, and remove ALL green lines as a confirmation !!'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1390 |
didAccept := false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1391 |
] |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1392 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1393 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1394 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1395 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1396 |
checkInRepaired ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1397 |
out := (tempdir construct:checkoutName) writeStream. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1398 |
out isNil ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1399 |
self warn:'could not write file ' , (tempdir constructString:checkoutName). |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1400 |
checkInRepaired := false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1401 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1402 |
out nextPutAll:(repairedText asString string). |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1403 |
didAccept := true. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1404 |
out close. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1405 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1406 |
] |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1407 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1408 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1409 |
checkInRepaired ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1410 |
Transcript showCR:'checking in ' , containerFilename , ' (manually repaired version) ...' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1411 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1412 |
'CVSSourceCodeManager [warning]: cannot (for now) checkin; conflicts found' infoPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1413 |
Transcript showCR:'checkin of ' , containerFilename , ' aborted (conflicting changes; repository unchanged)'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1414 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1415 |
^ false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1416 |
] |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1417 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1418 |
(whatHappened startsWith:'U ') ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1419 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1420 |
"/ nothing changed here, but the repository already contains |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1421 |
"/ a newer version. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1422 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1423 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1424 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1425 |
self information:'nothing changed in your ''' , containerFilename , '''; |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1426 |
but repository already contains a newer version (repository unchanged).'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1427 |
^ true. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1428 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1429 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1430 |
"/ unexpected |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1431 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1432 |
self warn:'unexpected message from CVS: |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1433 |
' , whatHappened , ' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1434 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1435 |
No checkin performed.'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1436 |
Transcript showCR:'*** cannot checkin ' , containerFilename , ' (unexpected CVS response; repository unchanged)'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1437 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1438 |
^ false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1439 |
] |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1440 |
] |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1441 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1442 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1443 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1444 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1445 |
"/ now check it in again |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1446 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1447 |
self activityNotification:'saving ' , containerFilename , ' in repository ...'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1448 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1449 |
logMsg := logMsg replChar:$" withString:'\"'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1450 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1451 |
OperatingSystem isUNIXlike ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1452 |
"/ save the log message into another tempFile ... |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1453 |
logTmp := Filename newTemporaryIn:tempdir. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1454 |
s := logTmp writeStream. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1455 |
s nextPutAll:logMsg. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1456 |
s close. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1457 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1458 |
cmd := 'commit -F "', logTmp baseName, '" ', checkoutName, ' >', cmdOut name. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1459 |
] ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1460 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1461 |
"/ CVS up to V1.9.14 prints the 'new revision' to stderr, |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1462 |
"/ CVS V1.9.16 to stdout. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1463 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1464 |
cmd := 'commit -m "', logMsg, '" ', checkoutName, ' >', cmdOut name , ' 2>&1'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1465 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1466 |
(self |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1467 |
executeCVSCommand:cmd |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1468 |
module:moduleDir |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1469 |
inDirectory:tempdir name |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1470 |
) ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1471 |
'CVSSourceCodeManager [error]: failed to execute: ' errorPrint. cmd errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1472 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1473 |
(cmdOut exists and:[cmdOut fileSize > 0]) ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1474 |
whatHappened := cmdOut contentsOfEntireFile asString. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1475 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1476 |
whatHappened := '<< no message >>' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1477 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1478 |
self warn:'The following problem was reported by cvs: |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1479 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1480 |
' , whatHappened , ' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1481 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1482 |
The class has NOT been checked into the repository.'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1483 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1484 |
'CVSSourceCodeManager [error]: cannot checkin modified class source' errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1485 |
logTmp notNil ifTrue:[logTmp remove]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1486 |
cmdOut remove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1487 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1488 |
^ false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1489 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1490 |
logTmp notNil ifTrue:[logTmp remove]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1491 |
(cmdOut exists and:[cmdOut fileSize > 0]) ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1492 |
whatHappened := cmdOut contentsOfEntireFile asString. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1493 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1494 |
whatHappened := nil |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1495 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1496 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1497 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1498 |
cmdOut remove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1499 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1500 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1501 |
"/ fetch the new revision nr as found in the commit commands output |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1502 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1503 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1504 |
(whatHappened isNil or:[whatHappened isEmpty]) ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1505 |
'CVSSourceCodeManager [error]: unexpected empty checkin command output' errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1506 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1507 |
whatHappened := whatHappened asCollectionOfLines asStringCollection. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1508 |
idx := whatHappened indexOfLineStartingWith:'new revision:'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1509 |
idx == 0 ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1510 |
'CVSSourceCodeManager [error]: unexpected checkin command output (no new-revision info)' errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1511 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1512 |
l := whatHappened at:idx. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1513 |
newRevision := (l copyFrom:14 to:(l indexOf:$; startingAt:14)-1) withoutSpaces. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1514 |
] |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1515 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1516 |
^ true |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1517 |
! |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1518 |
|
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1519 |
checkinClass:cls fileName:classFileName directory:packageDir module:moduleDir source:sourceFileName logMessage:logMessage force:force |
130 | 1520 |
"enter a classes source code (which has been already filed out into sourceFileName) |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1521 |
into the source repository. If the force argument is true, no merge is done; |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1522 |
instead, the code is checked in as given (Dangerous). |
130 | 1523 |
Return true if ok, false if not." |
1524 |
||
710
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
1525 |
|tempdir cmd checkoutName logMsg revision logTmp |
501 | 1526 |
cmdOut whatHappened s entry idx changeLog changesAsLogged l |
151
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1527 |
newRevision newString binRevision className msg answer didMerge |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1528 |
mySource mergedSource modulePath time |
830
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
822
diff
changeset
|
1529 |
editor checkInRepaired didAccept emphasizedText repairedText out |
c788d0c93635
allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents:
822
diff
changeset
|
1530 |
emSep comment how| |
814 | 1531 |
|
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1532 |
className := cls name. |
938 | 1533 |
cls isPrivate ifTrue:[ |
1534 |
self error:'refuse to check in private classes.'. |
|
1535 |
]. |
|
209 | 1536 |
revision := cls revision. |
1537 |
revision isNil ifTrue:[ |
|
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1538 |
force ifFalse:[ |
681 | 1539 |
('CVSSourceCodeManager [warning]: class ' , className, ' has no revision string') errorPrintCR. |
1138
aa7687ec256f
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1540 |
(cls theMetaclass includesSelector:#version) ifTrue:[ |
1074
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1541 |
answer := Dialog |
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1542 |
confirm:('Class %1 has no (usable) revision string.\\Check in as newest ?' bindWith:className) withCRs |
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1543 |
noLabel:'Cancel'. |
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1544 |
] ifFalse:[ |
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1545 |
answer := OptionBox |
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1546 |
request:('Class %1 has no revision string.\\Check in as newest ?' bindWith:className) withCRs |
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1547 |
label:'Confirm' |
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1548 |
buttonLabels:#('Cancel' 'CheckIn' 'Create & CheckIn') |
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1549 |
values:#(false #checkIn #create) |
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1550 |
default:#create. |
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1551 |
]. |
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1552 |
answer == false ifTrue:[ ^ false ]. |
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1553 |
answer == #create ifTrue:[ |
69c3722f7238
ask if version method should be created (when checking in new ones)
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
1554 |
cls theNonMetaclass updateVersionMethodFor:'$' , 'Header' , '$'. "/ concatenated to avoid RCS expansion |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1555 |
]. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1556 |
] |
995 | 1557 |
] ifFalse:[ |
1558 |
(revision endsWith:$m) ifTrue:[ |
|
1559 |
"/ this class has already been checked in with a merge, |
|
1560 |
"/ but not reloaded from the repository. |
|
1561 |
"/ must use the original revision string. |
|
1562 |
revision := revision copyWithoutLast:1. |
|
1563 |
] |
|
209 | 1564 |
]. |
1565 |
(binRevision := cls binaryRevision) notNil ifTrue:[ |
|
1566 |
revision ~= binRevision ifTrue:[ |
|
1126 | 1567 |
('CVSSourceCodeManager [info]: class ' , className , ' is based upon ' , binRevision , ' but has revision ' , (revision ? '?')) infoPrintCR |
179 | 1568 |
] |
130 | 1569 |
]. |
209 | 1570 |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
1571 |
revision isNil ifTrue:[ |
208
943b0ed2fa1d
use newestRevision if checking into an existing container AND class has no valid info
Claus Gittinger <cg@exept.de>
parents:
195
diff
changeset
|
1572 |
revision := self newestRevisionOf:cls. |
943b0ed2fa1d
use newestRevision if checking into an existing container AND class has no valid info
Claus Gittinger <cg@exept.de>
parents:
195
diff
changeset
|
1573 |
revision isNil ifTrue:[ |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1574 |
force ifTrue:[ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1575 |
revision := self newestRevisionInFile:classFileName directory:packageDir module:moduleDir. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1576 |
] ifFalse:[ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1577 |
revision := '1.0' |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1578 |
] |
208
943b0ed2fa1d
use newestRevision if checking into an existing container AND class has no valid info
Claus Gittinger <cg@exept.de>
parents:
195
diff
changeset
|
1579 |
] |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
1580 |
]. |
130 | 1581 |
|
1582 |
logMsg := logMessage. |
|
1583 |
(logMsg isNil or:[logMsg isEmpty]) ifTrue:[ |
|
179 | 1584 |
logMsg := 'checkin from browser'. |
130 | 1585 |
]. |
1586 |
||
1587 |
cmdOut := Filename newTemporary. |
|
1588 |
cmdOut exists ifTrue:[ |
|
179 | 1589 |
cmdOut remove. |
130 | 1590 |
]. |
1591 |
||
1592 |
"/ |
|
1593 |
"/ in CVS, we have to checkout the file first, in order |
|
1594 |
"/ to get up-to-date CVS entries, and also to be able to merge in |
|
1595 |
"/ other users changes. |
|
1596 |
"/ |
|
1597 |
||
1598 |
"/ |
|
1599 |
"/ first, create a temporary work tree |
|
1600 |
"/ |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
1601 |
tempdir := self createTempDirectory:nil forModule:nil. |
606
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
1602 |
tempdir isNil ifTrue:[ |
681 | 1603 |
('CVSSourceCodeManager [error]: no tempDir - cannot checkin ' , className) errorPrintCR. |
606
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
1604 |
^ false |
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
1605 |
]. |
130 | 1606 |
|
1607 |
"/ |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
1608 |
"/ next, create CVS/Entries and CVS/Repository with version information of current version |
130 | 1609 |
"/ |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
1610 |
modulePath := moduleDir , '/' , packageDir. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
1611 |
checkoutName := modulePath , '/' , classFileName. |
166
dc8e56916049
Correct UTC-Time computation for CVS/Entries.
Stefan Vogel <sv@exept.de>
parents:
165
diff
changeset
|
1612 |
|
dc8e56916049
Correct UTC-Time computation for CVS/Entries.
Stefan Vogel <sv@exept.de>
parents:
165
diff
changeset
|
1613 |
"/ |
dc8e56916049
Correct UTC-Time computation for CVS/Entries.
Stefan Vogel <sv@exept.de>
parents:
165
diff
changeset
|
1614 |
"/ correct our current time, so that converting it will give us UTC |
dc8e56916049
Correct UTC-Time computation for CVS/Entries.
Stefan Vogel <sv@exept.de>
parents:
165
diff
changeset
|
1615 |
"/ |
dc8e56916049
Correct UTC-Time computation for CVS/Entries.
Stefan Vogel <sv@exept.de>
parents:
165
diff
changeset
|
1616 |
time := AbsoluteTime now subtractSeconds:1. |
dc8e56916049
Correct UTC-Time computation for CVS/Entries.
Stefan Vogel <sv@exept.de>
parents:
165
diff
changeset
|
1617 |
time := time addSeconds:(time utcOffset). |
dc8e56916049
Correct UTC-Time computation for CVS/Entries.
Stefan Vogel <sv@exept.de>
parents:
165
diff
changeset
|
1618 |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
1619 |
self createEntryFor:checkoutName |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
1620 |
module:moduleDir |
179 | 1621 |
in:(tempdir construct:modulePath) |
1622 |
revision:revision |
|
1623 |
date:(self cvsTimeString:time) |
|
1624 |
special:'' |
|
1625 |
overwrite:true. |
|
130 | 1626 |
|
1627 |
"/ |
|
1628 |
"/ copy-over our current version |
|
1629 |
"/ |
|
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
1630 |
Object errorSignal handle:[:ex| |
179 | 1631 |
tempdir recursiveRemove. |
681 | 1632 |
'CVSSourceCodeManager [error]: cannot copy-over filedOut class source' errorPrintCR. |
179 | 1633 |
^ false. |
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
1634 |
] do:[ |
617
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1635 |
sourceFileName asFilename copyTo:(tempdir construct:checkoutName). |
130 | 1636 |
]. |
1637 |
||
1638 |
"/ |
|
1639 |
"/ synchronize i.e. merge in any changes |
|
1640 |
"/ |
|
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1641 |
self activityNotification:'merging ' , cls name , ' with repository version ...'. |
159 | 1642 |
|
738 | 1643 |
cmd := 'update ', classFileName, ' >', cmdOut name. |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
1644 |
(self |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
1645 |
executeCVSCommand:cmd |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
1646 |
module:moduleDir |
738 | 1647 |
inDirectory:((tempdir construct:moduleDir) constructString:packageDir) |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
1648 |
) ifFalse:[ |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1649 |
force ifFalse:[ |
681 | 1650 |
'CVSSourceCodeManager [error]: failed to execute: ' errorPrint. cmd errorPrintCR. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1651 |
tempdir recursiveRemove. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1652 |
cmdOut remove. |
681 | 1653 |
'CVSSourceCodeManager [error]: cannot merge current source with repository version' errorPrintCR. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1654 |
^ false. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1655 |
]. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1656 |
] ifTrue:[ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1657 |
"/ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1658 |
"/ check what happened - the contents of the cmdOut file may be: |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1659 |
"/ empty -> nothing changed |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1660 |
"/ M xxx -> merged-in changes from other users |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1661 |
"/ C xxx -> a conflict occured and the differences have been merged into the source |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1662 |
"/ needs special action |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1663 |
"/ |
719
31c656290287
care for cmdOut file to exists after cvs command;
Claus Gittinger <cg@exept.de>
parents:
715
diff
changeset
|
1664 |
(cmdOut exists and:[cmdOut fileSize > 0]) ifTrue:[ |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1665 |
whatHappened := cmdOut contentsOfEntireFile asString. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1666 |
]. |
179 | 1667 |
]. |
380 | 1668 |
cmdOut remove. |
130 | 1669 |
|
179 | 1670 |
(whatHappened isNil or:[whatHappened isEmpty]) ifTrue:[ |
1671 |
"/ |
|
1672 |
"/ no change |
|
1673 |
"/ |
|
257 | 1674 |
"/ Transcript showCR:'no change in ' , className , ' (repository unchanged)'. |
188 | 1675 |
tempdir recursiveRemove. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1676 |
|
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1677 |
force ifFalse:[ |
1094 | 1678 |
"/ (ChangeSet current includesChangeForClass:cls) ifTrue:[ |
1679 |
"/ (self confirm:('Nothing changed in %1 (repository unchanged).\\Remove entries from changeSet ?' bindWith:className) withCRs) ifTrue:[ |
|
1680 |
"/ ChangeSet current condenseChangesForClass:cls. |
|
1681 |
"/ ]. |
|
1682 |
"/ ] ifFalse:[ |
|
1683 |
self information:('Nothing changed in %1 (repository unchanged)' bindWith:className). |
|
1684 |
"/ ]. |
|
1091
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1079
diff
changeset
|
1685 |
self postCheckInClass:cls. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1686 |
] ifTrue:[ |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
1687 |
changeLog := self revisionLogOfContainerclassFileName directory:packageDir module:moduleDir. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1688 |
(changeLog isNil or:[(changeLog at:#revisions) size ~~ 1]) ifTrue:[ |
681 | 1689 |
'CVSSourceCodeManager [error]: failed to update revisionString (no log)' errorPrintCR. |
522 | 1690 |
cls updateVersionMethodFor:'$' , 'Header' , '$'. "/ concatenated to avoid RCS expansion |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1691 |
] ifFalse:[ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1692 |
entry := (changeLog at:#revisions) first. |
486 | 1693 |
newString := self revisionStringFromLog:changeLog entry:entry forClass:cls. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1694 |
cls updateVersionMethodFor:newString. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1695 |
cls revision ~= newRevision ifTrue:[ |
681 | 1696 |
'CVSSourceCodeManager [error]: failed to update revisionString' errorPrintCR |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1697 |
] |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1698 |
] |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1699 |
]. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1700 |
|
179 | 1701 |
^ true |
1702 |
]. |
|
1703 |
||
130 | 1704 |
Verbose == true ifTrue:[ |
267 | 1705 |
('CVSMGR: result is: ' , whatHappened) infoPrintCR. |
143
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
1706 |
]. |
130 | 1707 |
|
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1708 |
force ifFalse:[ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1709 |
revision isNil ifTrue:[ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1710 |
changeLog := self revisionLogOf:cls. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1711 |
] ifFalse:[ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1712 |
changeLog := self revisionLogOf:cls fromRevision:(self revisionAfter:revision) toRevision:nil. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1713 |
]. |
710
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
1714 |
changeLog notNil ifTrue:[ |
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
1715 |
s := WriteStream on:String new. |
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
1716 |
self writeRevisionLogMessagesFrom:changeLog withHeader:false to:s. |
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
1717 |
changesAsLogged := s contents. |
725 | 1718 |
] ifFalse:[ |
1719 |
"/ mhmh - that should not happen |
|
1720 |
changesAsLogged := ''. |
|
1721 |
]. |
|
151
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1722 |
]. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1723 |
|
143
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
1724 |
didMerge := false. |
1002 | 1725 |
checkInRepaired := false. |
143
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
1726 |
|
726 | 1727 |
"/ |
1728 |
"/ cvs above rel10 returns a multiline info ... |
|
1729 |
"/ we have to extract the one line which states what happened. |
|
1730 |
"/ |
|
1731 |
whatHappened := whatHappened asCollectionOfLines asStringCollection. |
|
1732 |
whatHappened := whatHappened select:[:line | |
|
1733 |
(line startsWith:'RCS file') not |
|
1734 |
and:[(line startsWith:'retrieving') not |
|
1735 |
and:[(line startsWith:'Merging') not |
|
1736 |
and:[line size > 0]]] |
|
1737 |
]. |
|
1738 |
whatHappened := whatHappened asString. |
|
1739 |
||
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1740 |
(force or:[whatHappened startsWith:'M ']) ifTrue:[ |
179 | 1741 |
"/ |
1742 |
"/ merged in changes |
|
1743 |
"/ |
|
710
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
1744 |
(force |
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
1745 |
or:[changeLog isNil |
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
1746 |
or:[(changeLog at:#revisions) isEmpty]]) ifTrue:[ |
179 | 1747 |
"/ |
1748 |
"/ pretty good - nothing has changed in the meanwhile |
|
1749 |
"/ |
|
257 | 1750 |
Transcript showCR:'checking in ' , className , ' ...' |
179 | 1751 |
] ifFalse:[ |
1752 |
"/ |
|
1753 |
"/ someone else has changed things in the meanwhile, but there is no conflict |
|
1754 |
"/ and version have been merged. |
|
1755 |
"/ |
|
1756 |
didMerge := true. |
|
1757 |
changesAsLogged := changesAsLogged asCollectionOfLines. |
|
130 | 1758 |
|
179 | 1759 |
s := WriteStream on:String new. |
1760 |
cls fileOutOn:s withTimeStamp:false. |
|
1761 |
mySource := s contents asString. |
|
617
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1762 |
mergedSource := (tempdir construct:checkoutName) readStream contents asString. |
151
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1763 |
|
179 | 1764 |
mySource = mergedSource ifTrue:[ |
1765 |
msg := 'The source of ' , className , ' has been changed in the meanwhile as listed below. |
|
151
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1766 |
|
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1767 |
I have merged your version with the newest repository version, |
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1768 |
and found no differences between the result and your current version |
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1769 |
(i.e. your version seemed up-to-date).'. |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1770 |
|
179 | 1771 |
self checkinTroubleDialog:'Merging versions' |
1772 |
message:msg |
|
1773 |
log:changesAsLogged |
|
1774 |
abortable:false |
|
1775 |
option:nil. |
|
1776 |
didMerge := false. |
|
1777 |
] ifFalse:[ |
|
1778 |
msg := 'The source of ' , className , ' has been changed in the meanwhile as listed below. |
|
151
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1779 |
|
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1780 |
If you continue, your new changes (based upon rev. ' , revision printString , ') will be MERGED |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1781 |
into the newest revision. This will combine the other version with your changes |
151
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1782 |
into a new common revision which may be different from both. |
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1783 |
Although this is a nice feature, it may fail to create the expected result in certain situations. |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1784 |
|
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1785 |
You should carefully check the result - by comparing the current version with the |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1786 |
most recent version in the repository. If that does not contain an acceptable version, |
151
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1787 |
change methods as required and check in again. |
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1788 |
Be aware, that after that, the actual repository version is different from your current classes, |
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1789 |
and you should update your class from the repository. |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1790 |
|
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1791 |
Continue ?'. |
130 | 1792 |
|
179 | 1793 |
answer := self checkinTroubleDialog:'Merging versions' |
1794 |
message:msg |
|
1795 |
log:changesAsLogged |
|
1796 |
abortable:true |
|
1797 |
option:'stop - see first'. |
|
1798 |
answer ~~ true ifTrue:[ |
|
1799 |
answer == #option ifTrue:[ |
|
1800 |
DiffTextView |
|
1801 |
openOn:mySource |
|
1802 |
label:'current version' |
|
1803 |
and:mergedSource |
|
1804 |
label:'merged version'. |
|
151
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1805 |
|
179 | 1806 |
]. |
257 | 1807 |
Transcript showCR:'checkin aborted - (no merge; repository unchanged)'. |
179 | 1808 |
tempdir recursiveRemove. |
1809 |
^ false. |
|
1810 |
]. |
|
1811 |
]. |
|
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1812 |
|
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1813 |
"/ changesAsLogged := (changesAsLogged asStringCollection collect:[:line | line withTabsExpanded]) asString. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1814 |
"/ msg := 'The source of ' , className , ' has been changed in the meanwhile as follows: |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1815 |
"/' , changesAsLogged , ' |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1816 |
"/ |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1817 |
"/If you continue, your new changes (based upon rev. ' , revision , ') will be MERGED |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1818 |
"/into the newest revision. This will combine the other version with your changes |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1819 |
"/into a new common revision which is different from both. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1820 |
"/Although convenient, it may fail to create the expected result in certain situations. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1821 |
"/ |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1822 |
"/You should carefully check the result - by comparing the current version with the |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1823 |
"/most recent version in the repository. If that does not contain an acceptable version, |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1824 |
"/change methods as required and check in again. Be aware, that the actual repository version |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1825 |
"/is different from your current classes. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1826 |
"/ |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1827 |
"/Continue ?'. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1828 |
"/ (self confirm:msg) ifFalse:[ |
257 | 1829 |
"/ Transcript showCR:'checkin aborted - (no merge; repository unchanged)'. |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1830 |
"/ tempdir recursiveRemove. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1831 |
"/ ^ false. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1832 |
"/ ]. |
257 | 1833 |
Transcript showCR:'checking in ' , className , ' (merged other changes) ...' |
179 | 1834 |
] |
143
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
1835 |
] ifFalse:[ |
179 | 1836 |
(whatHappened startsWith:'C ') ifTrue:[ |
1837 |
"/ |
|
1838 |
"/ conflict; someone else checked in something in the meanwhile, |
|
1839 |
"/ and there is a conflict between this version and the checked in version. |
|
1840 |
"/ |
|
130 | 1841 |
|
179 | 1842 |
changesAsLogged := changesAsLogged asCollectionOfLines. |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1843 |
|
179 | 1844 |
msg := 'The source of ' , className , ' has been changed in the meanwhile as listed below. |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1845 |
|
151
2ecdebacc512
more for merging (classes which have no valid revision string)
Claus Gittinger <cg@exept.de>
parents:
147
diff
changeset
|
1846 |
Your new changes (based upon rev. ' , revision printString , ') CONFLICT with those changes. |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1847 |
|
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1848 |
You should fix things by comparing your class with the most recent repository version |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1849 |
and change your methods avoiding conflicts. The checkin again. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1850 |
'. |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1851 |
|
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1852 |
answer := self checkinTroubleDialog:'Version conflict' |
179 | 1853 |
message:msg |
1854 |
log:changesAsLogged |
|
1855 |
abortable:false |
|
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1856 |
option:'show conflicts' |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1857 |
option2:'resolve conflicts'. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1858 |
|
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1859 |
answer == #option ifTrue:[ |
179 | 1860 |
"/ |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1861 |
"/ show conflicts in a 3-way DiffTextView ... |
179 | 1862 |
"/ |
1863 |
Diff3TextView |
|
617
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1864 |
openOnMergedText:(tempdir construct:checkoutName) readStream contents |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1865 |
label:'your version (checkin attempt)' |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1866 |
label:'original (base version)' |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1867 |
label:'newest repository version'. |
179 | 1868 |
]. |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1869 |
|
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1870 |
answer == #option2 ifTrue:[ |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1871 |
"/ |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1872 |
"/ allow checkin of repair version |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1873 |
"/ this is error prone ... |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1874 |
"/ |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1875 |
"/ |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1876 |
"/ show merged version in an editor ... |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1877 |
"/ ... accept will check it in. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1878 |
"/ |
617
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1879 |
emphasizedText := (tempdir construct:checkoutName) readStream contents. |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1880 |
emSep := (Array with:(#color->Color black) |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1881 |
with:(#backgroundColor->Color green)). |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1882 |
emphasizedText := Diff3TextView |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1883 |
emphasizeMergedDiff3Text:emphasizedText |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1884 |
emphasize1:(Array with:(#color->Color white) |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1885 |
with:(#backgroundColor->Color blue)) |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1886 |
emphasize2:(Array with:(#color->Color white) |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1887 |
with:(#backgroundColor->Color red)) |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1888 |
emphasizeSep:emSep. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1889 |
|
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1890 |
comment := |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1891 |
'"/ *************************************************************** |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1892 |
"/ This text contains your current versions code (blue) |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1893 |
"/ merged with the conflicting code as found in the repository (red) which resulted |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1894 |
"/ from some other checkin. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1895 |
"/ Each such conflict is surrounded by green text (like this paragraph). |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1896 |
"/ |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1897 |
"/ Please have a look at ALL the conflicts and fix things as appropriate. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1898 |
"/ Delete the green lines as a confirmation - I will not checkin the changed text, |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1899 |
"/ unless no more green parts are present. This includes this comment at the top. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1900 |
"/ *************************************************************** |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1901 |
'. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1902 |
comment := (Text string:comment emphasis:emSep) asStringCollection. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1903 |
emphasizedText := comment , emphasizedText. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1904 |
|
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1905 |
didAccept := false. checkInRepaired := true. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1906 |
[didAccept not and:[checkInRepaired]] whileTrue:[ |
692 | 1907 |
editor := RCSConflictEditTextView |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1908 |
setupWith:emphasizedText |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1909 |
title:'Resolve conflicts in ' , className , ', then accept & close to checkin'. |
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1910 |
|
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1911 |
editor acceptAction:[:dummy | |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1912 |
repairedText := editor list. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1913 |
didAccept := true. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1914 |
]. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1915 |
didAccept := false. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1916 |
editor topView openModal. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1917 |
|
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1918 |
didAccept ifFalse:[ |
854 | 1919 |
(Dialog confirm:'You did not accept the new text. Edit again ?') |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1920 |
ifFalse:[ |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1921 |
checkInRepaired := false. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1922 |
] |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1923 |
] ifTrue:[ |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1924 |
"/ check if all green-stuff (separators) have been removed |
578 | 1925 |
(repairedText findFirst:[:line | line notNil and:[line notEmpty and:[(line emphasisAt:1) = emSep]]]) ~~ 0 ifTrue:[ |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1926 |
self warn:'You have to look at ALL conflicts, and remove ALL green lines as a confirmation !!'. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1927 |
didAccept := false. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1928 |
] |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1929 |
]. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1930 |
|
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1931 |
]. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1932 |
|
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1933 |
checkInRepaired ifTrue:[ |
617
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1934 |
out := (tempdir construct:checkoutName) writeStream. |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1935 |
out isNil ifTrue:[ |
617
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1936 |
self warn:'could not write file ' , (tempdir constructString:checkoutName). |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1937 |
checkInRepaired := false. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1938 |
] ifFalse:[ |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1939 |
out nextPutAll:(repairedText asString string). |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1940 |
didAccept := true. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1941 |
out close. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1942 |
]. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1943 |
] |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1944 |
]. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1945 |
|
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1946 |
checkInRepaired ifTrue:[ |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1947 |
Transcript showCR:'checking in ' , className , ' (manually repaired version) ...' |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1948 |
] ifFalse:[ |
681 | 1949 |
'CVSSourceCodeManager [warning]: cannot (for now) checkin; conflicts found' infoPrintCR. |
447
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1950 |
Transcript showCR:'checkin of ' , className , ' aborted (conflicting changes; repository unchanged)'. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1951 |
tempdir recursiveRemove. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1952 |
^ false. |
4914760f1461
added mechanism to resolve conflicts
Claus Gittinger <cg@exept.de>
parents:
445
diff
changeset
|
1953 |
] |
179 | 1954 |
] ifFalse:[ |
1047 | 1955 |
((whatHappened startsWith:'U ') |
1956 |
or:[ (whatHappened startsWith:'P ') ]) ifTrue:[ |
|
629 | 1957 |
"/ |
1958 |
"/ nothing changed here, but the repository already contains |
|
1959 |
"/ a newer version. |
|
1960 |
"/ |
|
1961 |
tempdir recursiveRemove. |
|
1962 |
||
1963 |
self information:'nothing changed in your ''' , className , '''; |
|
1964 |
but repository already contains a newer version (repository unchanged).'. |
|
1965 |
^ true. |
|
1966 |
] ifFalse:[ |
|
1967 |
"/ |
|
1968 |
"/ unexpected |
|
1969 |
"/ |
|
1970 |
self warn:'unexpected message from CVS: |
|
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1971 |
' , whatHappened , ' |
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1972 |
|
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
1973 |
No checkin performed.'. |
629 | 1974 |
Transcript showCR:'*** cannot checkin ' , className , ' (unexpected CVS response; repository unchanged)'. |
1975 |
tempdir recursiveRemove. |
|
1976 |
^ false. |
|
1977 |
] |
|
179 | 1978 |
] |
130 | 1979 |
]. |
209 | 1980 |
|
130 | 1981 |
|
1982 |
"/ |
|
1983 |
"/ now check it in again |
|
1984 |
"/ |
|
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
1985 |
self activityNotification:'saving ' , cls name , ' in repository ...'. |
159 | 1986 |
|
152
56747cda83bd
escape doubleQuote with backslash in log message
Claus Gittinger <cg@exept.de>
parents:
151
diff
changeset
|
1987 |
logMsg := logMsg replChar:$" withString:'\"'. |
655
94cba977cb39
Fixes for CVS V1.9.16 (prints revision info to stdout instead stderr)
Stefan Vogel <sv@exept.de>
parents:
641
diff
changeset
|
1988 |
|
711
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
1989 |
OperatingSystem isUNIXlike ifFalse:[ |
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
1990 |
"/ save the log message into another tempFile ... |
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
1991 |
logTmp := Filename newTemporaryIn:tempdir. |
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
1992 |
s := logTmp writeStream. |
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
1993 |
s nextPutAll:logMsg. |
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
1994 |
s close. |
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
1995 |
|
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
1996 |
cmd := 'commit -F "', logTmp baseName, '" ', checkoutName, ' >', cmdOut name. |
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
1997 |
] ifTrue:[ |
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
1998 |
"/ |
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
1999 |
"/ CVS up to V1.9.14 prints the 'new revision' to stderr, |
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
2000 |
"/ CVS V1.9.16 to stdout. |
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
2001 |
"/ |
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
2002 |
cmd := 'commit -m "', logMsg, '" ', checkoutName, ' >', cmdOut name , ' 2>&1'. |
706414b66b8e
oops - no additional newline in logMsg (win32)
Claus Gittinger <cg@exept.de>
parents:
710
diff
changeset
|
2003 |
]. |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2004 |
(self |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2005 |
executeCVSCommand:cmd |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2006 |
module:moduleDir |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2007 |
inDirectory:tempdir name |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2008 |
) ifFalse:[ |
681 | 2009 |
'CVSSourceCodeManager [error]: failed to execute: ' errorPrint. cmd errorPrintCR. |
535 | 2010 |
|
719
31c656290287
care for cmdOut file to exists after cvs command;
Claus Gittinger <cg@exept.de>
parents:
715
diff
changeset
|
2011 |
(cmdOut exists and:[cmdOut fileSize > 0]) ifTrue:[ |
179 | 2012 |
whatHappened := cmdOut contentsOfEntireFile asString. |
2013 |
] ifFalse:[ |
|
2014 |
whatHappened := '<< no message >>' |
|
2015 |
]. |
|
2016 |
self warn:'The following problem was reported by cvs: |
|
130 | 2017 |
|
2018 |
' , whatHappened , ' |
|
2019 |
||
2020 |
The class has NOT been checked into the repository.'. |
|
2021 |
||
681 | 2022 |
'CVSSourceCodeManager [error]: cannot checkin modified class source' errorPrintCR. |
710
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
2023 |
logTmp notNil ifTrue:[logTmp remove]. |
179 | 2024 |
cmdOut remove. |
2025 |
tempdir recursiveRemove. |
|
2026 |
^ false. |
|
130 | 2027 |
]. |
710
aa590bc6895e
fixes for WIN32 (checkin & revLog)
Claus Gittinger <cg@exept.de>
parents:
706
diff
changeset
|
2028 |
logTmp notNil ifTrue:[logTmp remove]. |
719
31c656290287
care for cmdOut file to exists after cvs command;
Claus Gittinger <cg@exept.de>
parents:
715
diff
changeset
|
2029 |
(cmdOut exists and:[cmdOut fileSize > 0]) ifTrue:[ |
179 | 2030 |
whatHappened := cmdOut contentsOfEntireFile asString. |
2031 |
] ifFalse:[ |
|
2032 |
whatHappened := nil |
|
2033 |
]. |
|
130 | 2034 |
|
166
dc8e56916049
Correct UTC-Time computation for CVS/Entries.
Stefan Vogel <sv@exept.de>
parents:
165
diff
changeset
|
2035 |
tempdir recursiveRemove. |
dc8e56916049
Correct UTC-Time computation for CVS/Entries.
Stefan Vogel <sv@exept.de>
parents:
165
diff
changeset
|
2036 |
cmdOut remove. |
130 | 2037 |
|
2038 |
"/ |
|
2039 |
"/ fetch the new revision nr as found in the commit commands output |
|
2040 |
"/ |
|
2041 |
||
2042 |
(whatHappened isNil or:[whatHappened isEmpty]) ifTrue:[ |
|
681 | 2043 |
'CVSSourceCodeManager [error]: unexpected empty checkin command output' errorPrintCR. |
130 | 2044 |
] ifFalse:[ |
179 | 2045 |
whatHappened := whatHappened asCollectionOfLines asStringCollection. |
2046 |
idx := whatHappened indexOfLineStartingWith:'new revision:'. |
|
2047 |
idx == 0 ifTrue:[ |
|
681 | 2048 |
'CVSSourceCodeManager [error]: unexpected checkin command output (no new-revision info)' errorPrintCR. |
179 | 2049 |
] ifFalse:[ |
2050 |
l := whatHappened at:idx. |
|
2051 |
newRevision := (l copyFrom:14 to:(l indexOf:$; startingAt:14)-1) withoutSpaces. |
|
2052 |
] |
|
130 | 2053 |
]. |
2054 |
||
2055 |
"/ |
|
143
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
2056 |
"/ if there was no merge (i.e. the current version has been checked in unchanged): |
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
2057 |
"/ patch the classes revisionInfo (but keep binaryRevision unchanged) to the new revision |
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
2058 |
"/ this makes everyone here believe, that the incore version of the class is based upon |
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
2059 |
"/ the newly checked in version. |
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
2060 |
"/ (however, the binaryRevision must remain as it is - we will need it to fetch the sourceCode |
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
2061 |
"/ correctly for all unchanged methodss) |
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
2062 |
"/ |
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
2063 |
"/ if there was a merge (i.e. the repository now contains a merge of the current and some |
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
2064 |
"/ other version): |
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
2065 |
"/ patch the classes revisionInfo (again, keep the binaryRevision) to the old revision |
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
2066 |
"/ and add a 'm' (for merged). |
f4bad586eded
dont patch classes revision string to newest in case of a merge
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
2067 |
"/ If we later checkin again, the new checkin will be again based on the current revision |
130 | 2068 |
"/ |
2069 |
newRevision notNil ifTrue:[ |
|
179 | 2070 |
didMerge ifFalse:[ |
211
da3daf8c87d7
show class name in activity notification
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
2071 |
self activityNotification:'fetch new revision number of ', cls name. |
159 | 2072 |
|
179 | 2073 |
changeLog := self revisionLogOf:cls fromRevision:newRevision toRevision:newRevision. |
2074 |
(changeLog isNil or:[(changeLog at:#revisions) size ~~ 1]) ifTrue:[ |
|
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
2075 |
force ifTrue:[ |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2076 |
changeLog := self revisionLogOfContainer:classFileName directory:packageDir module:moduleDir. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
2077 |
]. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
2078 |
]. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
2079 |
(changeLog isNil or:[(changeLog at:#revisions) size ~~ 1]) ifTrue:[ |
681 | 2080 |
'CVSSourceCodeManager [error]: failed to update revisionString (no log)' errorPrintCR. |
522 | 2081 |
cls updateVersionMethodFor:'$' , 'Header' , '$'. "/ concatenated to avoid RCS expansion |
179 | 2082 |
] ifFalse:[ |
2083 |
entry := (changeLog at:#revisions) first. |
|
486 | 2084 |
newString := self revisionStringFromLog:changeLog entry:entry forClass:cls. |
179 | 2085 |
cls updateVersionMethodFor:newString. |
2086 |
cls revision ~= newRevision ifTrue:[ |
|
681 | 2087 |
'CVSSourceCodeManager [error]: failed to update revisionString' errorPrintCR |
179 | 2088 |
] |
2089 |
] |
|
2090 |
] ifTrue:[ |
|
2091 |
newString := self updatedRevisionStringOf:cls forRevision:nil with:cls revisionString. |
|
2092 |
cls updateVersionMethodFor:newString. |
|
2093 |
]. |
|
130 | 2094 |
]. |
2095 |
||
2096 |
Class addChangeRecordForClassCheckIn:cls. |
|
1091
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1079
diff
changeset
|
2097 |
self postCheckInClass:cls. |
1002 | 2098 |
|
2099 |
checkInRepaired ifTrue:[ |
|
2100 |
self information:'Now the repository contains a merge between your and the other changes. |
|
2101 |
However, the class in your image does NOT contain the other changes. |
|
2102 |
This will lead to more conflict-resolving whenever you check this class in again later, |
|
2103 |
unless you load the newest (merged) version of the class from the repository. |
|
2104 |
||
1003 | 2105 |
I recomment doing this as soon as possible via your browsers checkout function.' |
1002 | 2106 |
]. |
130 | 2107 |
^ true |
2108 |
||
2109 |
" |
|
2110 |
SourceCodeManager checkinClass:Array logMessage:'testing only' |
|
2111 |
" |
|
139
c40ea6aacacb
better merge/conflict dialog; optionally display conflicts
Claus Gittinger <cg@exept.de>
parents:
137
diff
changeset
|
2112 |
|
655
94cba977cb39
Fixes for CVS V1.9.16 (prints revision info to stdout instead stderr)
Stefan Vogel <sv@exept.de>
parents:
641
diff
changeset
|
2113 |
"Created: / 11.9.1996 / 16:16:11 / cg" |
94cba977cb39
Fixes for CVS V1.9.16 (prints revision info to stdout instead stderr)
Stefan Vogel <sv@exept.de>
parents:
641
diff
changeset
|
2114 |
"Modified: / 26.2.1998 / 17:34:16 / stefan" |
1091
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1079
diff
changeset
|
2115 |
"Modified: / 5.11.2001 / 14:35:38 / cg" |
115
b37d7975d9e2
fully update revisionMethod when checking in
Claus Gittinger <cg@exept.de>
parents:
113
diff
changeset
|
2116 |
! |
b37d7975d9e2
fully update revisionMethod when checking in
Claus Gittinger <cg@exept.de>
parents:
113
diff
changeset
|
2117 |
|
760 | 2118 |
checkoutModule:aModule package:aPackage andDo:aBlock |
2119 |
"check out everything from a package into a temporary directory. |
|
2120 |
Then evaluate aBlock, passing the name of that temp-directory. |
|
2121 |
Afterwards, the tempDir is removed. |
|
2122 |
Return true, if OK, false if any error occurred." |
|
2123 |
||
1136 | 2124 |
|cvsRoot containers moduleDir packageDir tempdir cmdOut cmd dirName listOfFiles| |
760 | 2125 |
|
2126 |
cvsRoot := self getCVSROOTForModule:aModule. |
|
1136 | 2127 |
cvsRoot isNil ifTrue:[^ false ]. |
760 | 2128 |
|
1049 | 2129 |
aPackage notNil ifTrue:[ |
2130 |
dirName := aModule , '/' , aPackage. |
|
2131 |
] ifFalse:[ |
|
2132 |
dirName := aModule. |
|
2133 |
]. |
|
760 | 2134 |
|
2135 |
self activityNotification:'checking out everything in ' , dirName , ' ...'. |
|
2136 |
||
2137 |
tempdir := self createTempDirectory:nil forModule:nil. |
|
2138 |
tempdir isNil ifTrue:[ |
|
2139 |
('CVSSourceCodeManager [error]: no tempDir - cannot checkout') errorPrintCR. |
|
2140 |
^ false |
|
2141 |
]. |
|
2142 |
||
2143 |
cmd := '-l checkout ', dirName. |
|
2144 |
OperatingSystem isUNIXlike ifTrue:[ |
|
2145 |
"/ can redirect output |
|
2146 |
cmdOut := Filename newTemporary. |
|
2147 |
cmdOut exists ifTrue:[ |
|
2148 |
cmdOut remove. |
|
2149 |
]. |
|
2150 |
cmd := cmd , ' > ' , cmdOut name. |
|
2151 |
]. |
|
2152 |
||
2153 |
(self |
|
2154 |
executeCVSCommand:cmd |
|
2155 |
module:aModule |
|
2156 |
inDirectory:tempdir name |
|
2157 |
) ifFalse:[ |
|
2158 |
'CVSSourceCodeManager [error]: failed to execute: ' errorPrint. cmd errorPrintCR. |
|
2159 |
cmdOut notNil ifTrue:[cmdOut remove]. |
|
2160 |
tempdir recursiveRemove. |
|
2161 |
^ false |
|
2162 |
]. |
|
2163 |
||
1136 | 2164 |
cmdOut notNil ifTrue:[ |
2165 |
"/ listOfFiles := cmdOut contents. |
|
2166 |
cmdOut remove |
|
2167 |
]. |
|
760 | 2168 |
|
2169 |
packageDir := (tempdir construct:dirName). |
|
2170 |
(packageDir exists |
|
2171 |
and:[packageDir isDirectory]) ifFalse:[ |
|
2172 |
'CVSSourceCodeManager [error]: checkout failed (no dir)' errorPrintCR. |
|
2173 |
tempdir recursiveRemove. |
|
2174 |
^ false |
|
2175 |
]. |
|
2176 |
||
2177 |
"/ now, invoke the block ... |
|
2178 |
[ |
|
2179 |
aBlock value:packageDir |
|
761 | 2180 |
] valueNowOrOnUnwindDo:[ |
760 | 2181 |
tempdir recursiveRemove. |
2182 |
]. |
|
2183 |
||
2184 |
^ true |
|
2185 |
||
761 | 2186 |
"Modified: / 28.4.1999 / 12:21:10 / cg" |
760 | 2187 |
! |
2188 |
||
179 | 2189 |
streamForClass:cls fileName:fileName revision:revision directory:packageDir module:moduleDir cache:cacheIt |
130 | 2190 |
"extract a source file and return an open readStream on it, |
477 | 2191 |
or nil if the extract failed. If revision is nil or (#newest), take |
2192 |
the latest; otherwise, a specific revisions source is extracted. |
|
2193 |
The cls argument is currently ignored, but may be used in future versions, |
|
2194 |
to validate the correct container against the class." |
|
107 | 2195 |
|
501 | 2196 |
|dir cachedSourceFilename cachedFile cmd fullName revisionArg stream |
791 | 2197 |
checkoutDir checkoutName checkoutNameLocal fullTempName fullCachedName tempdir cmdOut |
703 | 2198 |
classFileName cvsRoot tempFile| |
130 | 2199 |
|
1130 | 2200 |
(DisabledModules notNil and:[DisabledModules includes:moduleDir]) ifTrue:[ |
2201 |
Transcript showCR:'cvs access for module ' , moduleDir , ' has been disabled (due to previous failure)'. |
|
2202 |
Transcript showCR:'reenable using the launchers source&debugger dialog'. |
|
2203 |
||
2204 |
^ nil |
|
2205 |
]. |
|
1014
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
2206 |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2207 |
cvsRoot := self getCVSROOTForModule:moduleDir. |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2208 |
cvsRoot isNil ifTrue:[^ nil]. |
130 | 2209 |
|
2210 |
"/ if not already existing, create a cache directory |
|
2211 |
"/ where we deposit sources. |
|
2212 |
"/ this is used as a cache for further requests, since |
|
2213 |
"/ accessing the repository may be slow. |
|
2214 |
"/ (if cvs uses a remote connection via ppp, for example) |
|
2215 |
"/ |
|
2216 |
||
836 | 2217 |
revision ~~ #newest ifTrue:[ |
2218 |
(dir := self sourceCacheDirectory) isNil ifTrue:[ |
|
2219 |
'CVSSourceCodeManager [warning]: no source cache directory' errorPrintCR. |
|
2220 |
] |
|
179 | 2221 |
]. |
2222 |
||
2223 |
classFileName := fileName. |
|
2224 |
(classFileName endsWith:',v') ifTrue:[ |
|
2225 |
classFileName := classFileName copyWithoutLast:2. |
|
2226 |
]. |
|
2227 |
(classFileName endsWith:'.st') ifTrue:[ |
|
2228 |
classFileName := classFileName copyWithoutLast:3. |
|
130 | 2229 |
]. |
2230 |
||
2231 |
fullName := moduleDir , '/' , packageDir , '/' , classFileName , '.st'. |
|
2232 |
||
2233 |
(revision isNil or:[revision == #newest]) ifTrue:[ |
|
179 | 2234 |
cachedSourceFilename := classFileName. |
130 | 2235 |
] ifFalse:[ |
179 | 2236 |
cachedSourceFilename := classFileName , '_' , revision. |
130 | 2237 |
]. |
2238 |
||
535 | 2239 |
dir notNil ifTrue:[ |
617
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
2240 |
cachedFile := dir construct:cachedSourceFilename. |
535 | 2241 |
cachedFile exists ifTrue:[ |
2242 |
cachedFile fileSize < 10 ifTrue:[ |
|
681 | 2243 |
('CVSSourceCodeManager [warning]: existing: ', cachedFile name , ' seems corrupted.') errorPrintCR. |
535 | 2244 |
cachedFile remove |
2245 |
] ifFalse:[ |
|
681 | 2246 |
"/ ('CVSSourceCodeManager [info]: found existing: ', cachedFile name) infoPrintCR. |
535 | 2247 |
^ cachedFile readStream |
2248 |
] |
|
2249 |
]. |
|
130 | 2250 |
]. |
2251 |
||
2252 |
"/ |
|
2253 |
"/ first, create a temporary work tree |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
2254 |
"/ Do not make module and package directories, their existence cause cvs checkout to fail in server mode |
130 | 2255 |
"/ |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
2256 |
tempdir := self createTempDirectory:nil forModule:nil. |
606
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
2257 |
tempdir isNil ifTrue:[ |
681 | 2258 |
('CVSSourceCodeManager [error]: no tempDir - cannot checkout ' , classFileName) errorPrintCR. |
606
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
2259 |
^ nil |
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
2260 |
]. |
130 | 2261 |
|
2262 |
"/ tempdir := Filename newTemporaryIn:nil. |
|
2263 |
"/ tempdir exists ifTrue:[ |
|
2264 |
"/ tempdir recursiveRemove. |
|
2265 |
"/ ]. |
|
2266 |
"/ tempdir makeDirectory. |
|
2267 |
"/ dir := tempdir construct:moduleDir. |
|
2268 |
"/ dir makeDirectory. |
|
2269 |
"/ dir := dir construct:packageDir. |
|
2270 |
"/ dir recursiveMakeDirectory. |
|
2271 |
"/ dir exists ifFalse:[ |
|
2272 |
"/ tempdir recursiveRemove. |
|
267 | 2273 |
"/ 'CVSMGR: cannot create temporary directory' infoPrintCR. |
130 | 2274 |
"/ ^ nil. |
2275 |
"/ ]. |
|
2276 |
||
2277 |
"/ |
|
2278 |
"/ check it out there |
|
2279 |
"/ |
|
2280 |
checkoutDir := moduleDir , '/' , packageDir. |
|
2281 |
checkoutName := checkoutDir , '/' , classFileName , '.st'. |
|
791 | 2282 |
checkoutNameLocal := (moduleDir asFilename construct:packageDir) constructString:(classFileName , '.st'). |
130 | 2283 |
|
2284 |
(revision isNil or:[revision == #newest]) ifTrue:[ |
|
179 | 2285 |
cachedSourceFilename := classFileName. |
2286 |
revisionArg := ''. |
|
130 | 2287 |
] ifFalse:[ |
179 | 2288 |
cachedSourceFilename := classFileName , '_' , revision. |
2289 |
revisionArg := ' -r ' , revision. |
|
130 | 2290 |
]. |
2291 |
||
175 | 2292 |
self activityNotification:'checking out source ' , checkoutName. |
703 | 2293 |
OperatingSystem isUNIXlike ifTrue:[ |
2294 |
"/ can redirect output |
|
2295 |
cmdOut := Filename newTemporary. |
|
2296 |
cmdOut exists ifTrue:[ |
|
2297 |
cmdOut remove. |
|
2298 |
]. |
|
2299 |
cmd := '-l checkout' , revisionArg , ' ', checkoutName , ' > ' , cmdOut name. |
|
2300 |
] ifFalse:[ |
|
2301 |
cmd := '-l checkout' , revisionArg , ' ', checkoutName. |
|
2302 |
]. |
|
2303 |
||
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2304 |
(self |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2305 |
executeCVSCommand:cmd |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2306 |
module:moduleDir |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2307 |
inDirectory:tempdir name |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2308 |
) ifFalse:[ |
681 | 2309 |
'CVSSourceCodeManager [error]: failed to execute: ' errorPrint. cmd errorPrintCR. |
703 | 2310 |
cmdOut notNil ifTrue:[cmdOut remove]. |
179 | 2311 |
tempdir recursiveRemove. |
681 | 2312 |
('CVSSourceCodeManager [error]: cannot checkout ' , checkoutName) errorPrintCR. |
1014
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
2313 |
"/ see if there is CVS access at all ... |
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
2314 |
(self checkForExistingModule:moduleDir) ifFalse:[ |
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
2315 |
"/ disable |
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
2316 |
DisabledModules isNil ifTrue:[ |
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
2317 |
DisabledModules := Set new. |
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
2318 |
]. |
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
2319 |
DisabledModules add:moduleDir. |
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
2320 |
('CVSSourceCodeManager [warning]: disabled repository access for module ' , moduleDir) errorPrintCR. |
adf578f3bd16
remember unaccessable repository modules and disable access.
Claus Gittinger <cg@exept.de>
parents:
1005
diff
changeset
|
2321 |
]. |
179 | 2322 |
^ nil. |
130 | 2323 |
]. |
2324 |
||
703 | 2325 |
cmdOut notNil ifTrue:[cmdOut remove]. |
1063 | 2326 |
fullTempName := tempdir construct:checkoutNameLocal. |
791 | 2327 |
fullCachedName := CacheDirectoryName asFilename constructString:cachedSourceFilename. |
2328 |
||
1063 | 2329 |
fullTempName exists ifFalse:[ |
2330 |
('CVSSourceCodeManager [error]: failed to checkout ', fullTempName pathName, ' (file does not exists after cvs co)') errorPrintCR. |
|
791 | 2331 |
tempdir recursiveRemove. |
2332 |
^ nil |
|
2333 |
]. |
|
130 | 2334 |
|
1059
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2335 |
(cacheIt |
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2336 |
and:[cachedFile notNil |
1063 | 2337 |
and:[fullTempName exists]]) |
1059
f5d8cdd9433e
care for bad(missing or disabled) cacheDirectory
Claus Gittinger <cg@exept.de>
parents:
1049
diff
changeset
|
2338 |
ifTrue:[ |
179 | 2339 |
(OperatingSystem errorSignal catch:[ |
1063 | 2340 |
fullTempName moveTo:fullCachedName |
179 | 2341 |
]) ifTrue:[ |
1063 | 2342 |
('CVSSourceCodeManager [error]: failed to rename ', fullTempName pathName, ' to ', cachedSourceFilename) errorPrintCR. |
179 | 2343 |
tempdir recursiveRemove. |
2344 |
^ nil |
|
2345 |
]. |
|
1067 | 2346 |
fullCachedName asFilename exists ifTrue:[ |
2347 |
stream := fullCachedName asFilename readStream. |
|
2348 |
]. |
|
130 | 2349 |
] ifFalse:[ |
703 | 2350 |
OperatingSystem isUNIXlike ifFalse:[ |
2351 |
"/ cannot remove files which are still open ... |
|
2352 |
"/ sigh - need a delete-on-close flag in FileStream. |
|
2353 |
"/ |
|
2354 |
tempFile := Filename newTemporary. |
|
1063 | 2355 |
fullTempName copyTo:tempFile. |
706
5149cb0621bd
use removeOnClose feature on non-unix systems.
Claus Gittinger <cg@exept.de>
parents:
703
diff
changeset
|
2356 |
stream := tempFile readStream. |
791 | 2357 |
stream notNil ifTrue:[ |
2358 |
stream removeOnClose:true. |
|
2359 |
]. |
|
703 | 2360 |
] ifTrue:[ |
1063 | 2361 |
stream := fullTempName readStream. |
703 | 2362 |
] |
130 | 2363 |
]. |
2364 |
||
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2365 |
self releaseAndRemove:tempdir module:moduleDir outputTo:nil. |
130 | 2366 |
^ stream |
2367 |
||
681 | 2368 |
"Created: / 4.11.1995 / 19:46:20 / cg" |
2369 |
"Modified: / 20.8.1997 / 16:37:11 / stefan" |
|
1064 | 2370 |
"Modified: / 23.8.2001 / 12:28:59 / cg" |
130 | 2371 |
! ! |
2372 |
||
502 | 2373 |
!CVSSourceCodeManager class methodsFor:'source code administration'! |
130 | 2374 |
|
2375 |
checkForExistingContainerInModule:moduleDir package:packageDir container:fileName |
|
472 | 2376 |
"check for a container to exist" |
2377 |
||
1117
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2378 |
|fullName ret cvsRoot cmd tempDir| |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2379 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2380 |
cvsRoot := self getCVSROOTForModule:moduleDir. |
130 | 2381 |
|
2382 |
fullName := moduleDir , '/' , packageDir , '/' , fileName. |
|
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
2383 |
|
176
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2384 |
RemoteCVS ifFalse:[ |
1133
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2385 |
cvsRoot asFilename exists ifTrue:[ |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2386 |
"/ |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2387 |
"/ with local CVS - simply check if that file exists |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2388 |
"/ |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2389 |
(fullName endsWith:',v') ifFalse:[ |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2390 |
fullName := fullName , ',v'. |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2391 |
]. |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2392 |
^ (cvsRoot , '/' , fullName) asFilename exists. |
179 | 2393 |
]. |
176
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2394 |
]. |
130 | 2395 |
|
1117
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2396 |
tempDir := self createTempDirectory:nil forModule:nil. |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2397 |
|
803 | 2398 |
"With remote CVS, do a no-op rtag command, which doesn't |
2399 |
need a working directory, but reports missing files" |
|
2400 |
||
179 | 2401 |
(fullName endsWith:',v') ifTrue:[ |
2402 |
fullName := fullName copyWithoutLast:2. |
|
2403 |
]. |
|
491 | 2404 |
|
803 | 2405 |
cmd := '-n rtag -l -F dummy '. |
1117
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2406 |
[ |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2407 |
ret := self |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2408 |
executeCVSCommand:cmd , fullName |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2409 |
module:moduleDir |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2410 |
"/ cg; cannot do it in current dir, in case it contains a CVS subDirectory, |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2411 |
"/ with a different CVSRoot in its CVS/Root file ... |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2412 |
"/ cvs would complain then. |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2413 |
inDirectory:(tempDir pathName) |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2414 |
log:false. |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2415 |
] valueNowOrOnUnwindDo:[ |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2416 |
tempDir recursiveRemove. |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2417 |
]. |
491 | 2418 |
^ ret |
130 | 2419 |
|
176
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2420 |
" |
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2421 |
CVSSourceCodeManager |
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2422 |
checkForExistingContainerInModule:'stx' |
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2423 |
package:'libbasic' |
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2424 |
container:'Integer.st' |
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2425 |
|
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2426 |
CVSSourceCodeManager |
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2427 |
checkForExistingContainerInModule:'stx' |
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2428 |
package:'libtool' |
179 | 2429 |
container:'AboutBox.st' |
2430 |
||
2431 |
CVSSourceCodeManager |
|
2432 |
checkForExistingContainerInModule:'stx' |
|
2433 |
package:'libtool' |
|
2434 |
container:'AboutBox.st,v' |
|
176
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2435 |
|
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2436 |
CVSSourceCodeManager |
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2437 |
checkForExistingContainerInModule:'stx' |
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2438 |
package:'libtool' |
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2439 |
container:'FooBar.st' |
491 | 2440 |
|
2441 |
CVSSourceCodeManager |
|
2442 |
checkForExistingContainerInModule:'DPU' |
|
2443 |
package:'test' |
|
2444 |
container:'marks' |
|
176
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2445 |
" |
130 | 2446 |
|
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
2447 |
"Created: / 9.12.1995 / 19:13:37 / cg" |
737 | 2448 |
"Modified: / 1.3.1999 / 19:32:55 / cg" |
803 | 2449 |
"Modified: / 23.7.1999 / 17:36:58 / stefan" |
130 | 2450 |
! |
2451 |
||
2452 |
checkForExistingModule:moduleDir |
|
472 | 2453 |
"check for a module to exist" |
130 | 2454 |
|
1117
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2455 |
|ret cvsRoot cmd tempDir| |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2456 |
|
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
2457 |
self activityNotification:'checking for existing module ' , moduleDir. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
2458 |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2459 |
cvsRoot := self getCVSROOTForModule:moduleDir. |
753
0454b00e1de5
fixed checkForExistingModule / checkForExistingPackage
Claus Gittinger <cg@exept.de>
parents:
749
diff
changeset
|
2460 |
cvsRoot isNil ifTrue:[^ false]. |
491 | 2461 |
|
176
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2462 |
RemoteCVS ifFalse:[ |
1133
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2463 |
cvsRoot asFilename exists ifTrue:[ |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2464 |
"/ |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2465 |
"/ with local CVS - simply check if that directory exists |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2466 |
"/ |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2467 |
^ (cvsRoot , '/' , moduleDir) asFilename isDirectory. |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2468 |
] |
176
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2469 |
]. |
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2470 |
|
1117
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2471 |
tempDir := self createTempDirectory:nil forModule:nil. |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2472 |
|
803 | 2473 |
"With remote CVS, do a no-op rtag command, which doesn't |
2474 |
need a working directory, but reports missing files" |
|
2475 |
||
2476 |
cmd := '-n rtag -l dummy '. |
|
1117
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2477 |
[ |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2478 |
ret := self |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2479 |
executeCVSCommand:cmd , moduleDir |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2480 |
module:moduleDir |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2481 |
"/ cg; cannot do it in current dir, in case it contains a CVS subDirectory, |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2482 |
"/ with a different CVSRoot in its CVS/Root file ... |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2483 |
"/ cvs would complain then. |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2484 |
inDirectory:(tempDir pathName) |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2485 |
log:false. |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2486 |
] valueNowOrOnUnwindDo:[ |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2487 |
tempDir recursiveRemove. |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2488 |
]. |
491 | 2489 |
^ ret |
130 | 2490 |
|
179 | 2491 |
" |
2492 |
CVSSourceCodeManager checkForExistingModule:'stx' |
|
491 | 2493 |
CVSSourceCodeManager checkForExistingModule:'DPU' |
179 | 2494 |
CVSSourceCodeManager checkForExistingModule:'cg' |
2495 |
CVSSourceCodeManager checkForExistingModule:'aeg' |
|
2496 |
CVSSourceCodeManager checkForExistingModule:'foo' |
|
2497 |
" |
|
130 | 2498 |
|
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
2499 |
"Created: / 9.12.1995 / 19:13:37 / cg" |
737 | 2500 |
"Modified: / 1.3.1999 / 19:32:59 / cg" |
803 | 2501 |
"Modified: / 23.7.1999 / 17:38:59 / stefan" |
130 | 2502 |
! |
2503 |
||
2504 |
checkForExistingModule:moduleDir package:packageDir |
|
472 | 2505 |
"check for a package to exist" |
2506 |
||
1117
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2507 |
|fullName ret cvsRoot cmd tempDir| |
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
2508 |
|
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
2509 |
self activityNotification:'checking for existing package ' , packageDir. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
2510 |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
2511 |
fullName := moduleDir , '/' , packageDir. |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2512 |
cvsRoot := self getCVSROOTForModule:moduleDir. |
130 | 2513 |
|
176
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2514 |
RemoteCVS ifFalse:[ |
1133
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2515 |
cvsRoot asFilename exists ifTrue:[ |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2516 |
"/ |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2517 |
"/ with local CVS - simply check if that directory exists |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2518 |
"/ |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2519 |
^ (cvsRoot , '/' , fullName) asFilename isDirectory. |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
2520 |
]. |
176
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2521 |
]. |
3b634e568759
oops - checkForExistingXXX did no longer work locally ?!
ah
parents:
175
diff
changeset
|
2522 |
|
1117
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2523 |
tempDir := self createTempDirectory:nil forModule:nil. |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2524 |
|
803 | 2525 |
"With remote CVS, do a no-op rtag command, which doesn't |
2526 |
need a working directory, but reports missing files" |
|
2527 |
||
2528 |
cmd := '-n rtag -l -F dummy '. |
|
1117
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2529 |
[ |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2530 |
ret := self |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2531 |
executeCVSCommand:cmd, fullName |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2532 |
module:moduleDir |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2533 |
"/ cg; cannot do it in current dir, in case it contains a CVS subDirectory, |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2534 |
"/ with a different CVSRoot in its CVS/Root file ... |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2535 |
"/ cvs would complain then. |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2536 |
inDirectory:(tempDir pathName) |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2537 |
log:false. |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2538 |
|
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2539 |
] valueNowOrOnUnwindDo:[ |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2540 |
tempDir recursiveRemove. |
403504d4d8d0
checkForExisting* fixed for WIN32.
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
2541 |
]. |
491 | 2542 |
^ ret |
130 | 2543 |
|
179 | 2544 |
" |
2545 |
CVSSourceCodeManager checkForExistingModule:'stx' package:'libbasic' |
|
2546 |
CVSSourceCodeManager checkForExistingModule:'aeg' package:'libProgram' |
|
2547 |
CVSSourceCodeManager checkForExistingModule:'foo' package:'libbasic' |
|
2548 |
CVSSourceCodeManager checkForExistingModule:'foo' package:'bar' |
|
2549 |
CVSSourceCodeManager checkForExistingModule:'cg' package:'private' |
|
2550 |
" |
|
130 | 2551 |
|
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
2552 |
"Created: / 9.12.1995 / 19:13:37 / cg" |
737 | 2553 |
"Modified: / 1.3.1999 / 19:33:04 / cg" |
803 | 2554 |
"Modified: / 23.7.1999 / 17:39:21 / stefan" |
130 | 2555 |
! |
2556 |
||
2557 |
createContainerFor:aClass inModule:moduleDir package:packageDir container:fileName |
|
179 | 2558 |
"create a container - this does an initial checkin |
2559 |
(i.e. cvs add & cvs commit)" |
|
2560 |
||
130 | 2561 |
|fullName tempdir checkoutName cmdOut cmd tempFile idx aStream whatHappened l newRevision |
724
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2562 |
changeLog entry newString startIdx endIdx checkInDir logTmp s| |
130 | 2563 |
|
2564 |
||
2565 |
cmdOut := Filename newTemporary. |
|
2566 |
cmdOut exists ifTrue:[ |
|
179 | 2567 |
cmdOut remove. |
130 | 2568 |
]. |
2569 |
||
2570 |
fullName := moduleDir , '/' , packageDir , '/' , fileName. |
|
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
2571 |
checkoutName := moduleDir , '/' , packageDir. |
130 | 2572 |
|
2573 |
"/ |
|
2574 |
"/ first, check out everything there - this creates the CVS helpfiles |
|
2575 |
"/ required later. |
|
2576 |
"/ |
|
2577 |
||
193
8605ef9dcb44
give activityNotifications when creating a container
Claus Gittinger <cg@exept.de>
parents:
188
diff
changeset
|
2578 |
self activityNotification:'checking for directory ' , checkoutName. |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
2579 |
tempdir := self createLocalDirectory:packageDir inModule:moduleDir. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
2580 |
tempdir isNil ifTrue:[ |
681 | 2581 |
('CVSSourceCodeManager [error]: cannot checkout ' , checkoutName) errorPrintCR. |
179 | 2582 |
^ false. |
130 | 2583 |
]. |
2584 |
||
2585 |
"/ |
|
2586 |
"/ create the source there |
|
2587 |
"/ |
|
617
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
2588 |
tempFile := (tempdir construct:checkoutName) construct:fileName. |
130 | 2589 |
aStream := tempFile writeStream. |
2590 |
aStream isNil ifTrue:[ |
|
681 | 2591 |
('CVSSourceCodeManager [error]: temporary fileout failed -> ', tempFile name) errorPrintCR. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
2592 |
tempdir recursiveRemove. |
179 | 2593 |
^ false |
130 | 2594 |
]. |
2595 |
||
2596 |
Class fileOutErrorSignal handle:[:ex | |
|
681 | 2597 |
'CVSSourceCodeManager [error]: fileout failed' errorPrintCR. |
179 | 2598 |
aStream close. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
2599 |
tempdir recursiveRemove. |
179 | 2600 |
^ false |
130 | 2601 |
] do:[ |
179 | 2602 |
aClass fileOutOn:aStream withTimeStamp:false. |
130 | 2603 |
]. |
2604 |
aStream close. |
|
2605 |
||
2606 |
tempFile exists ifFalse:[ |
|
681 | 2607 |
'CVSSourceCodeManager [error]: temporary fileout failed' errorPrintCR. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
2608 |
tempdir recursiveRemove. |
179 | 2609 |
^ false |
130 | 2610 |
]. |
2611 |
||
2612 |
"/ |
|
2613 |
"/ and add it to the repository |
|
2614 |
"/ |
|
193
8605ef9dcb44
give activityNotifications when creating a container
Claus Gittinger <cg@exept.de>
parents:
188
diff
changeset
|
2615 |
self activityNotification:'adding ' , fileName. |
8605ef9dcb44
give activityNotifications when creating a container
Claus Gittinger <cg@exept.de>
parents:
188
diff
changeset
|
2616 |
|
724
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2617 |
OperatingSystem isUNIXlike ifTrue:[ |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2618 |
checkInDir := tempdir constructString:checkoutName. |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2619 |
] ifFalse:[ |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2620 |
OperatingSystem isMSDOSlike ifTrue:[ |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2621 |
checkInDir := tempdir constructString:(checkoutName copyReplaceAll:$/ with:$\). |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2622 |
] ifFalse:[ |
939 | 2623 |
self halt:'VMS case not yet implemented'. "/ add code for VMS ... |
724
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2624 |
] |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2625 |
]. |
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
2626 |
cmd := 'add ' , fileName , ' > ' , cmdOut name. |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2627 |
(self |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2628 |
executeCVSCommand:cmd |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2629 |
module:moduleDir |
724
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2630 |
inDirectory:checkInDir |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2631 |
) ifFalse:[ |
681 | 2632 |
'CVSSourceCodeManager [error]: failed to execute: ' errorPrint. cmd errorPrintCR. |
130 | 2633 |
|
179 | 2634 |
cmdOut remove. |
2635 |
tempdir recursiveRemove. |
|
681 | 2636 |
('CVSSourceCodeManager [error]: cannot checkout ' , checkoutName) errorPrintCR. |
179 | 2637 |
^ false. |
130 | 2638 |
]. |
2639 |
cmdOut remove. |
|
2640 |
||
2641 |
"/ |
|
2642 |
"/ commit |
|
2643 |
"/ |
|
211
da3daf8c87d7
show class name in activity notification
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
2644 |
self activityNotification:'comitting ' , fileName. |
193
8605ef9dcb44
give activityNotifications when creating a container
Claus Gittinger <cg@exept.de>
parents:
188
diff
changeset
|
2645 |
|
724
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2646 |
OperatingSystem isUNIXlike ifFalse:[ |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2647 |
"/ save the log message into another tempFile ... |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2648 |
logTmp := Filename newTemporaryIn:checkInDir. |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2649 |
s := logTmp writeStream. |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2650 |
s nextPutAll:'initial checkin'. |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2651 |
s close. |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2652 |
|
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2653 |
cmd := 'commit -F "', logTmp baseName, '" ', fileName, ' >', cmdOut name. |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2654 |
] ifTrue:[ |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2655 |
"/ |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2656 |
"/ CVS up to V1.9.14 prints the 'new revision' to stderr, |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2657 |
"/ CVS V1.9.16 to stdout. |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2658 |
"/ |
841
a026be83dc21
output a message to the transcript, when adding a new container.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2659 |
cmd := 'commit -m "initial checkin" ' , fileName , ' > ' , cmdOut name, ' 2>&1'. |
719
31c656290287
care for cmdOut file to exists after cvs command;
Claus Gittinger <cg@exept.de>
parents:
715
diff
changeset
|
2660 |
]. |
31c656290287
care for cmdOut file to exists after cvs command;
Claus Gittinger <cg@exept.de>
parents:
715
diff
changeset
|
2661 |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2662 |
(self |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2663 |
executeCVSCommand:cmd |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2664 |
module:moduleDir |
724
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2665 |
inDirectory:checkInDir "tempdir name" |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2666 |
) ifFalse:[ |
179 | 2667 |
Verbose == true ifTrue:[ |
267 | 2668 |
'CVSMGR: failed to execute: ' infoPrint. cmd infoPrintCR. |
179 | 2669 |
]. |
2670 |
cmdOut fileSize > 0 ifTrue:[ |
|
2671 |
whatHappened := cmdOut contentsOfEntireFile asString. |
|
2672 |
] ifFalse:[ |
|
2673 |
whatHappened := '<< no message >>' |
|
2674 |
]. |
|
2675 |
self warn:'The following problem was reported by cvs: |
|
130 | 2676 |
|
2677 |
' , whatHappened , ' |
|
2678 |
||
2679 |
The class has NOT been checked into the repository.'. |
|
2680 |
||
681 | 2681 |
'CVSSourceCodeManager [error]: cannot checkin modified class source' errorPrintCR. |
179 | 2682 |
cmdOut remove. |
2683 |
tempdir recursiveRemove. |
|
2684 |
^ false. |
|
130 | 2685 |
]. |
2686 |
whatHappened := cmdOut contentsOfEntireFile asString. |
|
605
db13f9acfdc3
oops - temporary file was not removed in createContainer
Claus Gittinger <cg@exept.de>
parents:
604
diff
changeset
|
2687 |
cmdOut remove. |
130 | 2688 |
|
2689 |
"/ |
|
2690 |
"/ release it towards cvs |
|
2691 |
"/ |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2692 |
self releaseAndRemove:tempdir module:moduleDir outputTo:nil. |
130 | 2693 |
|
2694 |
"/ |
|
2695 |
"/ good - its in the CVS repository; now, we need the updated RCS header |
|
2696 |
"/ |
|
2697 |
(whatHappened isNil or:[whatHappened isEmpty]) ifTrue:[ |
|
681 | 2698 |
'CVSSourceCodeManager [warning]: unexpected empty commit command output' errorPrintCR. |
724
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2699 |
"/ TODO: scan the file for $Header ... |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2700 |
"/ and extract the revision manually |
f9fe7098ef3c
fixed create-container on win32
Claus Gittinger <cg@exept.de>
parents:
723
diff
changeset
|
2701 |
|
130 | 2702 |
] ifFalse:[ |
179 | 2703 |
whatHappened := whatHappened asCollectionOfLines asStringCollection. |
2704 |
idx := whatHappened indexOfLineStartingWith:'initial revision:'. |
|
2705 |
idx ~~ 0 ifTrue:[ |
|
2706 |
startIdx := 18 |
|
2707 |
] ifFalse:[ |
|
2708 |
idx := whatHappened indexOfLineStartingWith:'new revision:'. |
|
2709 |
idx ~~ 0 ifTrue:[ |
|
681 | 2710 |
'CVSSourceCodeManager [warning]: container existed before' errorPrintCR. |
179 | 2711 |
startIdx := 14. |
2712 |
] ifFalse:[ |
|
681 | 2713 |
'CVSSourceCodeManager [warning]: unexpected commit command output (no new-revision info)' errorPrintCR. |
179 | 2714 |
] |
2715 |
]. |
|
2716 |
idx ~~ 0 ifTrue:[ |
|
2717 |
l := whatHappened at:idx. |
|
628
78456d8ff546
CVS 1.9 has changed message format when creating new containers
tz
parents:
627
diff
changeset
|
2718 |
endIdx := (l indexOf:$; startingAt:startIdx) - 1. |
78456d8ff546
CVS 1.9 has changed message format when creating new containers
tz
parents:
627
diff
changeset
|
2719 |
endIdx < 0 ifTrue:[ |
78456d8ff546
CVS 1.9 has changed message format when creating new containers
tz
parents:
627
diff
changeset
|
2720 |
endIdx := l size |
78456d8ff546
CVS 1.9 has changed message format when creating new containers
tz
parents:
627
diff
changeset
|
2721 |
]. |
78456d8ff546
CVS 1.9 has changed message format when creating new containers
tz
parents:
627
diff
changeset
|
2722 |
newRevision := (l copyFrom:startIdx to:endIdx) withoutSpaces. |
78456d8ff546
CVS 1.9 has changed message format when creating new containers
tz
parents:
627
diff
changeset
|
2723 |
(Number fromString:newRevision onError:nil) isNil ifTrue:[ |
78456d8ff546
CVS 1.9 has changed message format when creating new containers
tz
parents:
627
diff
changeset
|
2724 |
newRevision := '1.1' |
78456d8ff546
CVS 1.9 has changed message format when creating new containers
tz
parents:
627
diff
changeset
|
2725 |
] |
179 | 2726 |
] |
130 | 2727 |
]. |
2728 |
||
847 | 2729 |
Transcript showCR:'created new sourceContainer for ' , aClass name , '.'. |
841
a026be83dc21
output a message to the transcript, when adding a new container.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2730 |
|
130 | 2731 |
"/ |
2732 |
"/ patch the classes revisionInfo (but keep binaryRevision unchanged) |
|
2733 |
"/ this makes everyone here believe, that the incore version of the class is based upon |
|
2734 |
"/ the newly checked in version. |
|
2735 |
"/ (however, the binaryRevision must remain as it is - we will need it to fetch the sourceCode |
|
2736 |
"/ correctly for all unchanged methodss) |
|
2737 |
"/ |
|
133 | 2738 |
|
130 | 2739 |
newRevision notNil ifTrue:[ |
179 | 2740 |
changeLog := self |
2741 |
revisionLogOf:aClass |
|
2742 |
fromRevision:newRevision |
|
2743 |
toRevision:newRevision |
|
2744 |
fileName:fileName |
|
2745 |
directory:packageDir |
|
2746 |
module:moduleDir. |
|
133 | 2747 |
|
179 | 2748 |
(changeLog isNil or:[(changeLog at:#revisions) size ~~ 1]) ifTrue:[ |
681 | 2749 |
'CVSSourceCodeManager [error]: failed to update revisionString (no log)' errorPrintCR |
179 | 2750 |
] ifFalse:[ |
2751 |
entry := (changeLog at:#revisions) first. |
|
486 | 2752 |
newString := self revisionStringFromLog:changeLog entry:entry forClass:aClass. |
179 | 2753 |
aClass updateVersionMethodFor:newString. |
681 | 2754 |
('CVSSourceCodeManager [info]: updated revisionString to:',newString) infoPrintCR |
179 | 2755 |
] |
130 | 2756 |
]. |
2757 |
||
2758 |
tempdir recursiveRemove. |
|
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
539
diff
changeset
|
2759 |
|
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
539
diff
changeset
|
2760 |
Class addChangeRecordForClassCheckIn:aClass. |
1091
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1079
diff
changeset
|
2761 |
self postCheckInClass:aClass. |
130 | 2762 |
^ true |
2763 |
||
655
94cba977cb39
Fixes for CVS V1.9.16 (prints revision info to stdout instead stderr)
Stefan Vogel <sv@exept.de>
parents:
641
diff
changeset
|
2764 |
"Created: / 9.12.1995 / 19:13:37 / cg" |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
2765 |
"Modified: / 23.7.1999 / 19:47:59 / stefan" |
1091
577e196eb240
condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents:
1079
diff
changeset
|
2766 |
"Modified: / 5.11.2001 / 14:22:56 / cg" |
130 | 2767 |
! |
2768 |
||
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2769 |
createContainerForText:someText inModule:moduleDir package:packageDir container:fileName |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2770 |
"create a container - this does an initial checkin |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2771 |
(i.e. cvs add & cvs commit)" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2772 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2773 |
|fullName tempdir checkoutName cmdOut cmd tempFile idx aStream whatHappened l newRevision |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2774 |
changeLog entry newString startIdx endIdx checkInDir logTmp s| |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2775 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2776 |
cmdOut := Filename newTemporary. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2777 |
cmdOut exists ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2778 |
cmdOut remove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2779 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2780 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2781 |
fullName := moduleDir , '/' , packageDir , '/' , fileName. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2782 |
checkoutName := moduleDir , '/' , packageDir. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2783 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2784 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2785 |
"/ first, check out everything there - this creates the CVS helpfiles |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2786 |
"/ required later. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2787 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2788 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2789 |
self activityNotification:'checking for directory ' , checkoutName. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2790 |
tempdir := self createLocalDirectory:packageDir inModule:moduleDir. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2791 |
tempdir isNil ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2792 |
('CVSSourceCodeManager [error]: cannot checkout ' , checkoutName) errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2793 |
^ false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2794 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2795 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2796 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2797 |
"/ create the source there |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2798 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2799 |
tempFile := (tempdir construct:checkoutName) construct:fileName. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2800 |
aStream := tempFile writeStream. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2801 |
aStream isNil ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2802 |
('CVSSourceCodeManager [error]: temporary fileout failed -> ', tempFile name) errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2803 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2804 |
^ false |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2805 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2806 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2807 |
aStream nextPutAll:someText. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2808 |
aStream close. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2809 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2810 |
tempFile exists ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2811 |
'CVSSourceCodeManager [error]: temporary fileout failed' errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2812 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2813 |
^ false |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2814 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2815 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2816 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2817 |
"/ and add it to the repository |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2818 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2819 |
self activityNotification:'adding ' , fileName. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2820 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2821 |
OperatingSystem isUNIXlike ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2822 |
checkInDir := tempdir constructString:checkoutName. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2823 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2824 |
OperatingSystem isMSDOSlike ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2825 |
checkInDir := tempdir constructString:(checkoutName copyReplaceAll:$/ with:$\). |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2826 |
] ifFalse:[ |
939 | 2827 |
self halt:'VMS case not yet implemented'. "/ add code for VMS ... |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2828 |
] |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2829 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2830 |
cmd := 'add ' , fileName , ' > ' , cmdOut name. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2831 |
(self |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2832 |
executeCVSCommand:cmd |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2833 |
module:moduleDir |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2834 |
inDirectory:checkInDir |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2835 |
) ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2836 |
'CVSSourceCodeManager [error]: failed to execute: ' errorPrint. cmd errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2837 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2838 |
cmdOut remove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2839 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2840 |
('CVSSourceCodeManager [error]: cannot checkout ' , checkoutName) errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2841 |
^ false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2842 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2843 |
cmdOut remove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2844 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2845 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2846 |
"/ commit |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2847 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2848 |
self activityNotification:'comitting ' , fileName. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2849 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2850 |
OperatingSystem isUNIXlike ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2851 |
"/ save the log message into another tempFile ... |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2852 |
logTmp := Filename newTemporaryIn:checkInDir. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2853 |
s := logTmp writeStream. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2854 |
s nextPutAll:'initial checkin'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2855 |
s close. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2856 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2857 |
cmd := 'commit -F "', logTmp baseName, '" ', fileName, ' >', cmdOut name. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2858 |
] ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2859 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2860 |
"/ CVS up to V1.9.14 prints the 'new revision' to stderr, |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2861 |
"/ CVS V1.9.16 to stdout. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2862 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2863 |
cmd := 'commit -m "initial checkin" ' , fileName , ' > ' , cmdOut name, ' 2>&1'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2864 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2865 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2866 |
(self |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2867 |
executeCVSCommand:cmd |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2868 |
module:moduleDir |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2869 |
inDirectory:checkInDir "tempdir name" |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2870 |
) ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2871 |
Verbose == true ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2872 |
'CVSMGR: failed to execute: ' infoPrint. cmd infoPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2873 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2874 |
cmdOut fileSize > 0 ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2875 |
whatHappened := cmdOut contentsOfEntireFile asString. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2876 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2877 |
whatHappened := '<< no message >>' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2878 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2879 |
self warn:'The following problem was reported by cvs: |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2880 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2881 |
' , whatHappened , ' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2882 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2883 |
The class has NOT been checked into the repository.'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2884 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2885 |
'CVSSourceCodeManager [error]: cannot checkin modified class source' errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2886 |
cmdOut remove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2887 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2888 |
^ false. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2889 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2890 |
whatHappened := cmdOut contentsOfEntireFile asString. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2891 |
cmdOut remove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2892 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2893 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2894 |
"/ release it towards cvs |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2895 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2896 |
self releaseAndRemove:tempdir module:moduleDir outputTo:nil. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2897 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2898 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2899 |
"/ good - its in the CVS repository; now, we need the updated RCS header |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2900 |
"/ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2901 |
(whatHappened isNil or:[whatHappened isEmpty]) ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2902 |
'CVSSourceCodeManager [warning]: unexpected empty commit command output' errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2903 |
"/ TODO: scan the file for $Header ... |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2904 |
"/ and extract the revision manually |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2905 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2906 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2907 |
whatHappened := whatHappened asCollectionOfLines asStringCollection. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2908 |
idx := whatHappened indexOfLineStartingWith:'initial revision:'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2909 |
idx ~~ 0 ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2910 |
startIdx := 18 |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2911 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2912 |
idx := whatHappened indexOfLineStartingWith:'new revision:'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2913 |
idx ~~ 0 ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2914 |
'CVSSourceCodeManager [warning]: container existed before' errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2915 |
startIdx := 14. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2916 |
] ifFalse:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2917 |
'CVSSourceCodeManager [warning]: unexpected commit command output (no new-revision info)' errorPrintCR. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2918 |
] |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2919 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2920 |
idx ~~ 0 ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2921 |
l := whatHappened at:idx. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2922 |
endIdx := (l indexOf:$; startingAt:startIdx) - 1. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2923 |
endIdx < 0 ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2924 |
endIdx := l size |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2925 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2926 |
newRevision := (l copyFrom:startIdx to:endIdx) withoutSpaces. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2927 |
(Number fromString:newRevision onError:nil) isNil ifTrue:[ |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2928 |
newRevision := '1.1' |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2929 |
] |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2930 |
] |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2931 |
]. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2932 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2933 |
Transcript showCR:'created new sourceContainer for ' , fileName , '.'. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2934 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2935 |
tempdir recursiveRemove. |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2936 |
|
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2937 |
^ true |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2938 |
! |
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
2939 |
|
130 | 2940 |
createModule:moduleName |
472 | 2941 |
"create a module directory" |
2942 |
||
141
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2943 |
|tempdir moduleDir cmdOut cmd| |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2944 |
|
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2945 |
"/ |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2946 |
"/ first, create a temporary work tree |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2947 |
"/ |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2948 |
tempdir := self createTempDirectory:nil forModule:moduleName. |
606
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
2949 |
tempdir isNil ifTrue:[ |
681 | 2950 |
('CVSSourceCodeManager [error]: no tempDir - cannot create moduleDirectory') errorPrintCR. |
606
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
2951 |
^ false |
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
2952 |
]. |
141
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2953 |
|
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2954 |
cmdOut := Filename newTemporary. |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2955 |
cmdOut exists ifTrue:[ |
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
2956 |
cmdOut remove. |
141
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2957 |
]. |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2958 |
|
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2959 |
"/ |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2960 |
"/ create the module directory |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2961 |
"/ |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2962 |
moduleDir := tempdir construct:moduleName. |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2963 |
moduleDir exists ifFalse:[ |
681 | 2964 |
'CVSSourceCodeManager [error]: failed to create: ' errorPrint. moduleDir name errorPrintCR. |
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
2965 |
tempdir recursiveRemove. |
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
2966 |
^ false. |
141
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2967 |
]. |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2968 |
|
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2969 |
"/ |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2970 |
"/ then import it into CVS |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2971 |
"/ |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2972 |
|
639
9072415bbeb1
Fixes: grok new CVSROOT=:pserver:hostname:/pathname syntax.
Stefan Vogel <sv@exept.de>
parents:
638
diff
changeset
|
2973 |
cmd := 'import -m "created from browser" ' , moduleName , ' initialV initialR > ' , cmdOut name. |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2974 |
(self |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2975 |
executeCVSCommand:cmd |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2976 |
module:moduleName |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2977 |
inDirectory:tempdir name |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
2978 |
) ifFalse:[ |
681 | 2979 |
'CVSSourceCodeManager [error]: failed to execute: ' errorPrint. cmd errorPrintCR. |
141
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2980 |
|
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
2981 |
cmdOut remove. |
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
2982 |
tempdir recursiveRemove. |
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
2983 |
^ false. |
141
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2984 |
]. |
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2985 |
|
681 | 2986 |
'CVSSourceCodeManager [info]: created new module: ' infoPrint. moduleName infoPrintCR. |
141
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2987 |
tempdir recursiveRemove. |
605
db13f9acfdc3
oops - temporary file was not removed in createContainer
Claus Gittinger <cg@exept.de>
parents:
604
diff
changeset
|
2988 |
cmdOut remove. |
141
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
2989 |
^ true |
130 | 2990 |
|
639
9072415bbeb1
Fixes: grok new CVSROOT=:pserver:hostname:/pathname syntax.
Stefan Vogel <sv@exept.de>
parents:
638
diff
changeset
|
2991 |
"Created: / 9.12.1995 / 19:53:51 / cg" |
9072415bbeb1
Fixes: grok new CVSROOT=:pserver:hostname:/pathname syntax.
Stefan Vogel <sv@exept.de>
parents:
638
diff
changeset
|
2992 |
"Modified: / 7.1.1998 / 14:18:57 / stefan" |
681 | 2993 |
"Modified: / 6.6.1998 / 16:15:34 / cg" |
130 | 2994 |
! |
2995 |
||
2996 |
createModule:moduleDirName package:packageDirName |
|
472 | 2997 |
"create a package directory" |
2998 |
||
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
2999 |
|tempdir cmdOut cmd packageDir moduleDir where relativePath| |
130 | 3000 |
|
3001 |
"/ |
|
3002 |
"/ first, create a temporary work tree |
|
3003 |
"/ |
|
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3004 |
tempdir := self createTempDirectory:packageDirName forModule:moduleDirName. |
606
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
3005 |
tempdir isNil ifTrue:[ |
681 | 3006 |
('CVSSourceCodeManager [error]: no tempDir - cannot create moduleDirectory') errorPrintCR. |
606
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
3007 |
^ false |
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
3008 |
]. |
130 | 3009 |
|
3010 |
cmdOut := Filename newTemporary. |
|
3011 |
cmdOut exists ifTrue:[ |
|
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
3012 |
cmdOut remove. |
130 | 3013 |
]. |
3014 |
||
3015 |
moduleDir := tempdir construct:moduleDirName. |
|
3016 |
moduleDir isDirectory ifFalse:[ |
|
681 | 3017 |
'CVSSourceCodeManager [error]: command failed: ' errorPrint. cmd errorPrintCR. |
130 | 3018 |
|
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
3019 |
tempdir recursiveRemove. |
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
3020 |
^ false. |
130 | 3021 |
]. |
3022 |
||
3023 |
"/ |
|
3024 |
"/ create the package directory there |
|
3025 |
"/ |
|
3026 |
packageDir := moduleDir construct:packageDirName. |
|
3027 |
OperatingSystem errorSignal catch:[ |
|
502 | 3028 |
packageDir recursiveMakeDirectory. |
130 | 3029 |
]. |
3030 |
packageDir isDirectory ifFalse:[ |
|
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
3031 |
tempdir recursiveRemove. |
681 | 3032 |
('CVSSourceCodeManager [error]: cannot create new directory: ' , packageDir pathName) errorPrintCR. |
224
8480651d8772
Pass CVSRoot to cvs with -d option.
Stefan Vogel <sv@exept.de>
parents:
218
diff
changeset
|
3033 |
^ false. |
130 | 3034 |
]. |
3035 |
||
3036 |
"/ |
|
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3037 |
"/ then import it into CVS |
574
a3c4ee494a46
when creating new packageDir: walk over directory components,
Claus Gittinger <cg@exept.de>
parents:
554
diff
changeset
|
3038 |
"/ |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3039 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3040 |
relativePath := moduleDirName asFilename constructString:packageDirName. |
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
3041 |
cmd := 'import -m "created from browser" . initialV initialR > ' , cmdOut name. |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3042 |
(self |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3043 |
executeCVSCommand:cmd |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3044 |
module:moduleDirName |
892 | 3045 |
inDirectory:tempdir name |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3046 |
) ifFalse:[ |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3047 |
'CVSSourceCodeManager [error]: failed to execute: ' errorPrint. cmd errorPrintCR. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3048 |
|
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3049 |
cmdOut remove. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3050 |
tempdir recursiveRemove. |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3051 |
^ false. |
130 | 3052 |
]. |
3053 |
||
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3054 |
tempdir recursiveRemove. |
130 | 3055 |
cmdOut remove. |
141
1419f5d68ca0
fixed creation of new modules/packages
Claus Gittinger <cg@exept.de>
parents:
139
diff
changeset
|
3056 |
^ true |
130 | 3057 |
|
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3058 |
" |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3059 |
self createModule:'stefan' package:'dummy1' |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3060 |
" |
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3061 |
|
639
9072415bbeb1
Fixes: grok new CVSROOT=:pserver:hostname:/pathname syntax.
Stefan Vogel <sv@exept.de>
parents:
638
diff
changeset
|
3062 |
"Created: / 9.12.1995 / 20:09:33 / cg" |
804
210040657004
Speedup creation of new containers in the repository.
Stefan Vogel <sv@exept.de>
parents:
803
diff
changeset
|
3063 |
"Modified: / 23.7.1999 / 18:40:49 / stefan" |
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
3064 |
"Modified: / 18.1.2000 / 20:14:01 / cg" |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3065 |
! |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3066 |
|
678
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3067 |
getExistingContainersInModule:aModule package:aPackage |
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3068 |
"return a list of existing containers. |
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3069 |
This does not work with remote-CVS" |
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3070 |
|
756 | 3071 |
|cvsRoot containers moduleDir packageDir tempdir cmdOut cmd dirName| |
678
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3072 |
|
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3073 |
cvsRoot := self getCVSROOTForModule:aModule. |
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3074 |
cvsRoot isNil ifTrue:[^ #() ]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3075 |
|
756 | 3076 |
dirName := aModule , '/' , aPackage. |
3077 |
||
3078 |
self activityNotification:'getting list of containers in ' , dirName , ' ...'. |
|
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3079 |
|
1133
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
3080 |
(RemoteCVS |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
3081 |
or:[cvsRoot asFilename exists not]) ifTrue:[ |
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3082 |
"/ remote CVS |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3083 |
"/ filter the output of the history command |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3084 |
"/ (sigh - there ought to be some cvs-command for that) |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3085 |
"/ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3086 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3087 |
tempdir := self createTempDirectory:nil forModule:nil. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3088 |
tempdir isNil ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3089 |
('CVSSourceCodeManager [error]: no tempDir - cannot checkout') errorPrintCR. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3090 |
^ #() |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3091 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3092 |
|
756 | 3093 |
cmd := '-l checkout ', dirName. |
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3094 |
OperatingSystem isUNIXlike ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3095 |
"/ can redirect output |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3096 |
cmdOut := Filename newTemporary. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3097 |
cmdOut exists ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3098 |
cmdOut remove. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3099 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3100 |
cmd := cmd , ' > ' , cmdOut name. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3101 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3102 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3103 |
(self |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3104 |
executeCVSCommand:cmd |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3105 |
module:aModule |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3106 |
inDirectory:tempdir name |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3107 |
) ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3108 |
'CVSSourceCodeManager [error]: failed to execute: ' errorPrint. cmd errorPrintCR. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3109 |
cmdOut notNil ifTrue:[cmdOut remove]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3110 |
tempdir recursiveRemove. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3111 |
^ #() |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3112 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3113 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3114 |
cmdOut notNil ifTrue:[cmdOut remove]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3115 |
|
756 | 3116 |
packageDir := (tempdir construct:dirName). |
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3117 |
(packageDir exists |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3118 |
and:[packageDir isDirectory]) ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3119 |
'CVSSourceCodeManager [error]: checkout failed (no dir)' errorPrintCR. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3120 |
tempdir recursiveRemove. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3121 |
^ #() |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3122 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3123 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3124 |
"/ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3125 |
"/ enumerate the checkedOut directory, looking for plain files |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3126 |
"/ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3127 |
containers := OrderedCollection new. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3128 |
packageDir directoryContents do:[:aFilenameString | |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3129 |
|fn| |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3130 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3131 |
(packageDir construct:aFilenameString) isDirectory ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3132 |
containers add:aFilenameString |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3133 |
] |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3134 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3135 |
tempdir recursiveRemove. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3136 |
] ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3137 |
(cvsRoot := cvsRoot asFilename) exists ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3138 |
^ #() |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3139 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3140 |
((moduleDir := cvsRoot construct:aModule) exists |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3141 |
and:[moduleDir isDirectory]) ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3142 |
self warn:'No such module'. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3143 |
^ #() |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3144 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3145 |
((packageDir := moduleDir construct:aPackage) exists |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3146 |
and:[packageDir isDirectory]) ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3147 |
self warn:'No such package'. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3148 |
^ #() |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3149 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3150 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3151 |
"/ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3152 |
"/ enumerate the package directory, looking for container files |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3153 |
"/ strip off the ,v ending. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3154 |
"/ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3155 |
containers := OrderedCollection new. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3156 |
packageDir directoryContents do:[:aFilenameString | |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3157 |
|fn| |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3158 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3159 |
(aFilenameString endsWith:',v') ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3160 |
containers add:(aFilenameString copyWithoutLast:2) |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3161 |
] |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3162 |
]. |
678
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3163 |
]. |
679 | 3164 |
^ containers sort |
678
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3165 |
|
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3166 |
" |
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3167 |
CVSSourceCodeManager getExistingContainersInModule:'stx' package:'libhtml' |
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3168 |
CVSSourceCodeManager getExistingContainersInModule:'cg' package:'java' |
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3169 |
CVSSourceCodeManager getExistingContainersInModule:'sel' package:'bmti' |
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3170 |
" |
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3171 |
|
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3172 |
"Created: / 20.5.1998 / 19:48:59 / cg" |
679 | 3173 |
"Modified: / 20.5.1998 / 22:08:29 / cg" |
678
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3174 |
! |
4d1de0639e2e
added #getExistingContainersInModule:package:
Claus Gittinger <cg@exept.de>
parents:
675
diff
changeset
|
3175 |
|
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3176 |
getExistingModules |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3177 |
"return a list of existing modules. |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3178 |
This does not work with remote-CVS" |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3179 |
|
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3180 |
|cvsRoot modules inStream list| |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3181 |
|
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3182 |
cvsRoot := self getCVSROOTForModule:nil. |
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3183 |
cvsRoot isNil ifTrue:[^ #() ]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3184 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3185 |
self activityNotification:'getting list of modules...'. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3186 |
|
1133
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
3187 |
(RemoteCVS |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
3188 |
or:[cvsRoot asFilename exists not]) ifTrue:[ |
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3189 |
"/ remote CVS |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3190 |
"/ filter the output of the history command |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3191 |
"/ (sigh - there ought to be some cvs-command for that) |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3192 |
"/ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3193 |
inStream := PipeStream readingFrom:'cvs -d ' , cvsRoot , ' history -x A'. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3194 |
inStream isNil ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3195 |
self warn:'This operation is not possible with this remoteCVS server'. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3196 |
^ #(). |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3197 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3198 |
list := inStream contents asStringCollection. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3199 |
inStream close. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3200 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3201 |
modules := Set new. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3202 |
list do:[:line | |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3203 |
|idx items entry| |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3204 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3205 |
items := line asCollectionOfWords. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3206 |
"/ #( 'A' '10/29' '17:47' '+0000' 'cg' '1.1' '.cvsignore' 'stx' '==' '~/work/stx' ) |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3207 |
"/ fetch the word before '==' |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3208 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3209 |
idx := items indexOf:'=='. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3210 |
idx > 1 ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3211 |
entry := items at:idx-1. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3212 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3213 |
"/ extract the first directory component ... |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3214 |
idx := entry indexOf:$/. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3215 |
idx ~~ 0 ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3216 |
entry := entry copyTo:idx-1 |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3217 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3218 |
modules add:entry. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3219 |
] |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3220 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3221 |
modules := modules asArray |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3222 |
] ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3223 |
"/ local CVS |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3224 |
"/ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3225 |
"/ enumerate the root directory, looking for subdirs |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3226 |
"/ which contain a CVS subdir. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3227 |
"/ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3228 |
(cvsRoot := cvsRoot asFilename) exists ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3229 |
^ #() |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3230 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3231 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3232 |
modules := OrderedCollection new. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3233 |
cvsRoot directoryContents do:[:aFilenameString | |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3234 |
|fn| |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3235 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3236 |
(aFilenameString endsWith:',v') ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3237 |
(#('CVS' 'CVSROOT' 'Attic') includes:aFilenameString) ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3238 |
(fn := (cvsRoot construct:aFilenameString)) isDirectory ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3239 |
modules add:aFilenameString |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3240 |
] |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3241 |
] |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3242 |
] |
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3243 |
]. |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3244 |
]. |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3245 |
|
679 | 3246 |
^ modules sort |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3247 |
|
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3248 |
" |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3249 |
CVSSourceCodeManager getExistingModules |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3250 |
" |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3251 |
|
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3252 |
"Created: / 20.5.1998 / 19:28:43 / cg" |
679 | 3253 |
"Modified: / 20.5.1998 / 22:07:07 / cg" |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3254 |
! |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3255 |
|
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3256 |
getExistingPackagesInModule:aModule |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3257 |
"return a list of existing packages. |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3258 |
This does not work with remote-CVS" |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3259 |
|
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3260 |
|cvsRoot packages moduleDir inStream list| |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3261 |
|
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3262 |
cvsRoot := self getCVSROOTForModule:aModule. |
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3263 |
|
756 | 3264 |
self activityNotification:'getting list of packages in ' , aModule , ' ...'. |
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3265 |
|
1133
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
3266 |
(RemoteCVS |
9ff43ad49dbd
oops - RemoteCVS flag is only valid for the default module
james
parents:
1130
diff
changeset
|
3267 |
or:[cvsRoot asFilename exists not]) ifTrue:[ |
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3268 |
"/ remote CVS |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3269 |
"/ filter the output of the history command |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3270 |
"/ (sigh - there ought to be some cvs-command for that) |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3271 |
"/ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3272 |
inStream := PipeStream readingFrom:'cvs -d ' , cvsRoot , ' history -x A'. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3273 |
inStream isNil ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3274 |
self warn:'This operation is not possible with this remoteCVS server'. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3275 |
^ #(). |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3276 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3277 |
list := inStream contents asStringCollection. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3278 |
inStream close. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3279 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3280 |
packages := Set new. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3281 |
list do:[:line | |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3282 |
|items idx entry| |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3283 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3284 |
items := line asCollectionOfWords. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3285 |
"/ #( 'A' '10/29' '17:47' '+0000' 'cg' '1.1' '.cvsignore' 'stx' '==' '~/work/stx' ) |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3286 |
"/ fetch the word before '==' |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3287 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3288 |
idx := items indexOf:'=='. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3289 |
idx > 1 ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3290 |
entry := items at:idx-1. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3291 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3292 |
"/ extract the first directory component ... |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3293 |
(entry startsWith:aModule) ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3294 |
idx := entry indexOf:$/. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3295 |
idx ~~ 0 ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3296 |
(entry copyTo:idx-1) = aModule ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3297 |
packages add:(entry copyFrom:idx+1). |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3298 |
] |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3299 |
]. |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3300 |
] |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3301 |
] |
755
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3302 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3303 |
packages := packages asArray |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3304 |
] ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3305 |
"/ local CVS |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3306 |
"/ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3307 |
"/ enumerate the module directory, looking for subdirs |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3308 |
"/ which contain a CVS subdir. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3309 |
"/ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3310 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3311 |
(cvsRoot := cvsRoot asFilename) exists ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3312 |
^ #() |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3313 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3314 |
((moduleDir := cvsRoot construct:aModule) exists |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3315 |
and:[moduleDir isDirectory]) ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3316 |
self warn:'No such module'. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3317 |
^ #() |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3318 |
]. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3319 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3320 |
packages := OrderedCollection new. |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3321 |
moduleDir directoryContents do:[:aFilenameString | |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3322 |
|fn| |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3323 |
|
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3324 |
(aFilenameString endsWith:',v') ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3325 |
(#('CVS' 'CVSROOT' 'Attic') includes:aFilenameString) ifFalse:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3326 |
(fn := (moduleDir construct:aFilenameString)) isDirectory ifTrue:[ |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3327 |
packages add:aFilenameString |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3328 |
] |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3329 |
] |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3330 |
] |
35fa25c262a6
added load-from-repository support for remoteCVS
Claus Gittinger <cg@exept.de>
parents:
754
diff
changeset
|
3331 |
]. |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3332 |
]. |
679 | 3333 |
^ packages sort |
675
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3334 |
|
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3335 |
" |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3336 |
CVSSourceCodeManager getExistingPackagesInModule:'stx' |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3337 |
CVSSourceCodeManager getExistingPackagesInModule:'cg' |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3338 |
CVSSourceCodeManager getExistingPackagesInModule:'sel' |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3339 |
" |
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3340 |
|
f7c08bb12bd7
added #getExistingModules & #getExistingPackagesInModule:
Claus Gittinger <cg@exept.de>
parents:
669
diff
changeset
|
3341 |
"Created: / 20.5.1998 / 19:28:43 / cg" |
679 | 3342 |
"Modified: / 20.5.1998 / 22:07:13 / cg" |
130 | 3343 |
! |
3344 |
||
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
539
diff
changeset
|
3345 |
initialRevisionStringFor:aClass inModule:moduleDir package:packageDir container:fileName |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
539
diff
changeset
|
3346 |
"return a string usable as initial revision string" |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
539
diff
changeset
|
3347 |
|
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3348 |
|cvsRoot| |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3349 |
|
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3350 |
cvsRoot := self getCVSROOTForModule:moduleDir. |
641
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
3351 |
cvsRoot := self repositoryTopDirectory:cvsRoot. |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
539
diff
changeset
|
3352 |
^ self |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
539
diff
changeset
|
3353 |
initialRCSRevisionStringFor:aClass |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3354 |
in:(cvsRoot , '/' , moduleDir , '/' , packageDir) |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
539
diff
changeset
|
3355 |
container:fileName |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
539
diff
changeset
|
3356 |
|
641
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
3357 |
"Modified: / 19.9.1997 / 06:34:10 / cg" |
539406d77877
Fix initial rcs string for remote CVS
Stefan Vogel <sv@exept.de>
parents:
640
diff
changeset
|
3358 |
"Modified: / 16.1.1998 / 17:34:13 / stefan" |
545
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
539
diff
changeset
|
3359 |
! |
198957db4e32
restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents:
539
diff
changeset
|
3360 |
|
1005
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3361 |
newestRevisionInFile:classFileName directory:packageDir module:moduleDir |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3362 |
"return the newest revision found in a container. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3363 |
Return nil on failure. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3364 |
Uses 'cvs status', which is much faster than 'cvs log'" |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3365 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3366 |
|info| |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3367 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3368 |
info := self |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3369 |
statusOf:nil |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3370 |
fileName:classFileName |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3371 |
directory:packageDir |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3372 |
module:moduleDir. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3373 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3374 |
info isNil ifTrue:[^ nil]. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3375 |
^ info at:#newestRevision ifAbsent:nil |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3376 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3377 |
" |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3378 |
SourceCodeManager newestRevisionInFile:'Array.st' directory:'libbasic' module:'stx' |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3379 |
" |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3380 |
! |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
3381 |
|
935
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3382 |
readRevisionLogEntryFromStream:inStream |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3383 |
"read and parse a single revision info-entry from the cvs log output. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3384 |
Return nil on end. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3385 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3386 |
The returned information is a structure (IdentityDictionary) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3387 |
filled with: |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3388 |
#revision -> the revision string |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3389 |
#author -> who checked that revision into the repository |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3390 |
#date -> when was it checked in |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3391 |
#state -> the RCS state |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3392 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3393 |
#logMessage -> the checkIn log message |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3394 |
" |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3395 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3396 |
|revLine1 revLine2 record s line atEnd| |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3397 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3398 |
atEnd := false. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3399 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3400 |
revLine1 := inStream nextLine. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3401 |
[revLine1 notNil and:[(revLine1 startsWith:'revision ') not]] |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3402 |
whileTrue:[inStream atEnd ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3403 |
revLine1 := nil |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3404 |
] ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3405 |
revLine1 := inStream nextLine. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3406 |
] |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3407 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3408 |
revLine2 := inStream nextLine. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3409 |
(revLine1 notNil and:[revLine2 notNil]) ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3410 |
record := IdentityDictionary new. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3411 |
record at:#revision put:(revLine1 asCollectionOfWords at:2). |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3412 |
"/ decompose date/author/state etc. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3413 |
(revLine2 asCollectionOfSubstringsSeparatedBy:$;) do:[:info | |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3414 |
|subEntry| |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3415 |
subEntry := info withoutSeparators. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3416 |
#('date:' #date |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3417 |
'author:' #author |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3418 |
'state:' #state |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3419 |
'lines:' #numberOfChangedLines |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3420 |
) pairWiseDo:[:word :key | |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3421 |
s := subEntry restAfter:word withoutSeparators:true. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3422 |
s notNil ifTrue:[record at:key put:s.]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3423 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3424 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3425 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3426 |
"first revision does not hav a 'lines:' entry" |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3427 |
(record includesKey:#numberOfChangedLines) ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3428 |
record at:#numberOfChangedLines put:'' |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3429 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3430 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3431 |
s := nil. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3432 |
line := inStream nextLine. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3433 |
[atEnd or:[line isNil or:[line startsWith:'--------']]] whileFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3434 |
(line startsWith:'==========') ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3435 |
atEnd := true. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3436 |
] ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3437 |
(line withoutSpaces = '.') ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3438 |
line := '*** empty log message ***' |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3439 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3440 |
s isNil ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3441 |
s := line |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3442 |
] ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3443 |
s := s , Character cr asString , line. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3444 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3445 |
line := inStream nextLine. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3446 |
] |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3447 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3448 |
record at:#logMessage put:s. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3449 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3450 |
^record. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3451 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3452 |
! |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3453 |
|
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3454 |
removeContainerFor:aClass inModule:moduleDir package:packageDir container:fileName |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3455 |
"remove a container" |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3456 |
|
818
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3457 |
(self removeContainerInModule:moduleDir package:packageDir container:fileName) ifFalse:[ |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3458 |
^ false |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3459 |
]. |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3460 |
|
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3461 |
"/ |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3462 |
"/ patch the classes revisionInfo (but keep binaryRevision unchanged) |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3463 |
"/ this makes everyone here believe, that the incore version of the class is based upon |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3464 |
"/ some container-less class. |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3465 |
"/ (however, the binaryRevision must remain as it is - we will need it to fetch the sourceCode |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3466 |
"/ correctly for all unchanged methodss) |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3467 |
"/ |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3468 |
|
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3469 |
aClass updateVersionMethodFor:'no longer in repository'. |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3470 |
Class addChangeRecordForClassContainerRemove:aClass. |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3471 |
^ true |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3472 |
! |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3473 |
|
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3474 |
removeContainerInModule:moduleDir package:packageDir container:fileName |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3475 |
"remove a container" |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3476 |
|
501 | 3477 |
|fullName tempdir checkoutName cmdOut cmd tempFile whatHappened| |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3478 |
|
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3479 |
fullName := moduleDir , '/' , packageDir , '/' , fileName. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3480 |
checkoutName := moduleDir , '/' , packageDir. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3481 |
|
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
3482 |
(tempdir := self createLocalDirectory:packageDir inModule:moduleDir with:fileName) isNil ifTrue:[ |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
3483 |
'CVSSourceCodeManager [error]: failed to checkout: ' errorPrint. checkoutName errorPrintCR. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3484 |
tempdir recursiveRemove. |
681 | 3485 |
('CVSSourceCodeManager [error]: cannot checkout ' , checkoutName) errorPrintCR. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3486 |
^ false. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3487 |
]. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3488 |
|
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3489 |
"/ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3490 |
"/ and remove it to the repository |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3491 |
"/ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3492 |
self activityNotification:'removing ' , fileName. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3493 |
|
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3494 |
"/ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3495 |
"/ check presence of source there |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3496 |
"/ |
617
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
3497 |
tempFile := (tempdir construct:checkoutName) construct:fileName. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3498 |
tempFile exists ifFalse:[ |
681 | 3499 |
'CVSSourceCodeManager [error]: temporary fileout failed' errorPrintCR. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3500 |
tempdir recursiveRemove. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3501 |
^ false |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3502 |
]. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3503 |
|
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
3504 |
tempFile exists ifTrue:[ |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
3505 |
tempFile remove. |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
3506 |
]. |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
3507 |
|
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
3508 |
cmdOut := Filename newTemporary. |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
3509 |
cmdOut exists ifTrue:[ |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
3510 |
cmdOut remove. |
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
3511 |
]. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3512 |
|
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3513 |
cmd := 'remove ' , fileName , ' > ' , cmdOut name. |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3514 |
(self |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3515 |
executeCVSCommand:cmd |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3516 |
module:moduleDir |
617
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
3517 |
inDirectory:(tempdir constructString:checkoutName) |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3518 |
) ifFalse:[ |
681 | 3519 |
'CVSSourceCodeManager [error]: failed to execute: ' errorPrint. cmd errorPrintCR. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3520 |
|
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3521 |
cmdOut remove. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3522 |
tempdir recursiveRemove. |
681 | 3523 |
('CVSSourceCodeManager [error]: cannot remove ' , checkoutName) errorPrintCR. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3524 |
^ false. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3525 |
]. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3526 |
cmdOut remove. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3527 |
|
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3528 |
"/ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3529 |
"/ commit |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3530 |
"/ |
655
94cba977cb39
Fixes for CVS V1.9.16 (prints revision info to stdout instead stderr)
Stefan Vogel <sv@exept.de>
parents:
641
diff
changeset
|
3531 |
self activityNotification:'comitting removal of ' , fileName. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3532 |
|
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3533 |
cmd := 'commit -m "removed container" -l ' , fileName , ' 2> ' , cmdOut name. |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3534 |
(self |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3535 |
executeCVSCommand:cmd |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3536 |
module:moduleDir |
617
96c14afeeb9d
use Filename protocol to construct subDir names (prep for VMS)
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
3537 |
inDirectory:(tempdir constructString:checkoutName) |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3538 |
) ifFalse:[ |
681 | 3539 |
'CVSSourceCodeManager [error]: failed to execute: ' errorPrint. cmd errorPrintCR. |
539
017889159bcd
newStyle info & error messages
Claus Gittinger <cg@exept.de>
parents:
535
diff
changeset
|
3540 |
|
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3541 |
cmdOut fileSize > 0 ifTrue:[ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3542 |
whatHappened := cmdOut contentsOfEntireFile asString. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3543 |
] ifFalse:[ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3544 |
whatHappened := '<< no message >>' |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3545 |
]. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3546 |
self warn:'The following problem was reported by cvs: |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3547 |
|
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3548 |
' , whatHappened , ' |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3549 |
|
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3550 |
The container has NOT been removed into the repository.'. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3551 |
|
681 | 3552 |
'CVSSourceCodeManager [error]: cannot remove container' errorPrintCR. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3553 |
cmdOut remove. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3554 |
tempdir recursiveRemove. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3555 |
^ false. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3556 |
]. |
605
db13f9acfdc3
oops - temporary file was not removed in createContainer
Claus Gittinger <cg@exept.de>
parents:
604
diff
changeset
|
3557 |
cmdOut remove. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3558 |
|
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3559 |
"/ |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3560 |
"/ release the temporary tree towards cvs |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3561 |
"/ |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3562 |
self releaseAndRemove:tempdir module:moduleDir outputTo:nil. |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3563 |
|
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3564 |
tempdir recursiveRemove. |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3565 |
^ true |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3566 |
|
818
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3567 |
" |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3568 |
CVSSourceCodeManager removeContainerInModule:'stx' package:'private' container:'WorldPO.st' |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3569 |
" |
47f8d0b4b035
extra entry to remove a container (without existsing class)
tm
parents:
814
diff
changeset
|
3570 |
|
655
94cba977cb39
Fixes for CVS V1.9.16 (prints revision info to stdout instead stderr)
Stefan Vogel <sv@exept.de>
parents:
641
diff
changeset
|
3571 |
"Modified: / 26.2.1998 / 17:33:57 / stefan" |
885
f0a7be47b53a
fixed (hopefully) creation of new package dirs
Claus Gittinger <cg@exept.de>
parents:
869
diff
changeset
|
3572 |
"Modified: / 18.1.2000 / 21:02:30 / cg" |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3573 |
! |
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3574 |
|
1037 | 3575 |
reportHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter filterRepository:filterRep filterModules:filterModules inTo:aBlock |
856
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3576 |
"process a full historyLog, evaluate aBlock for each entry, passing |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3577 |
the logs info in a dictionary. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3578 |
This walks over all possible repositories. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3579 |
filterRep may be a collection of repository names |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3580 |
(i.e. 'stc', 'exept', 'phx' etc.) to only report changes made to one |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3581 |
of those repositories. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3582 |
filterUser, if non-nil, will filter only changes made by that user." |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3583 |
|
1037 | 3584 |
|inStream line words recordType fileName user date time rev pkgDir module idx |
856
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3585 |
clsName cls clsRev roots info tempDir endReached| |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3586 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3587 |
CVSRoot isNil ifTrue:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3588 |
'CVSSourceCodeManager [info]: CVSROOT not set' infoPrintCR. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3589 |
^ nil |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3590 |
]. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3591 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3592 |
CVSModuleRoots notNil ifTrue:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3593 |
roots := Set withAll:(CVSModuleRoots values) |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3594 |
] ifFalse:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3595 |
roots := Set new. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3596 |
]. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3597 |
roots add:CVSRoot. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3598 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3599 |
"/ must do it in a tempDir, to avoid cvs validating the -D arg |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3600 |
"/ against any info found in CVS/Root |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3601 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3602 |
tempDir := self createTempDirectory:nil forModule:nil. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3603 |
tempDir isNil ifTrue:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3604 |
('CVSSourceCodeManager [error]: no tempDir - cannot extract log') errorPrintCR. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3605 |
^ nil. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3606 |
]. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3607 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3608 |
roots do:[:aCVSRoot | |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3609 |
|root host cmd| |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3610 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3611 |
cmd := 'cvs -d ' , aCVSRoot. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3612 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3613 |
"/ workaround a CVS bug ... |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3614 |
"/ cvs crashes with: |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3615 |
"/ cvs -d exept:/files/CVS history -x WARM -a -D "yesterday" |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3616 |
"/ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3617 |
"/ but works ok, when doing: |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3618 |
"/ rsh exept cvs -d /files/CVS history -x WARM -a -D "yesterday" |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3619 |
"/ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3620 |
(aCVSRoot startsWith:':') ifFalse:[ |
905 | 3621 |
OperatingSystem isUNIXlike ifTrue:[ |
3622 |
host := aCVSRoot copyTo:(aCVSRoot indexOf:$:)-1. |
|
3623 |
(host size > 0 and:[(host includes:Character space) not]) ifTrue:[ |
|
3624 |
root := aCVSRoot copyFrom:(aCVSRoot indexOf:$:)+1. |
|
3625 |
cmd := 'rsh ' , host , ' cvs -d ' , root |
|
3626 |
] |
|
856
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3627 |
] |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3628 |
]. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3629 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3630 |
cmd := cmd , ' history -x WARM -a'. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3631 |
(timeGoal notNil and:[timeGoal notEmpty]) ifTrue:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3632 |
cmd := cmd , ' -D "' , timeGoal , '"'. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3633 |
]. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3634 |
filterRep notNil ifTrue:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3635 |
filterRep do:[:aRepository | |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3636 |
cmd := cmd , ' -p "' , aRepository , '"'. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3637 |
]. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3638 |
]. |
1037 | 3639 |
"/ either I dont understand CVS, or it does not work correctly... |
3640 |
"/ in any case, the -m option does NOT filter modules. (sigh) |
|
3641 |
"/ |
|
3642 |
"/ filterModules notNil ifTrue:[ |
|
3643 |
"/ filterModules do:[:aModule | |
|
3644 |
"/ cmd := cmd , ' -m "' , aModule , '"'. |
|
3645 |
"/ ]. |
|
3646 |
"/ ]. |
|
856
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3647 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3648 |
Transcript showCR:cmd. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3649 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3650 |
inStream := PipeStream readingFrom:cmd inDirectory:tempDir. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3651 |
inStream isNil ifTrue:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3652 |
('CVSSourceCodeManager [error]: cannot open pipe to ''cvs history''') errorPrintCR. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3653 |
] ifFalse:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3654 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3655 |
inStream class streamErrorSignal handle:[:ex | |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3656 |
('CVSSourceCodeManager [error]: pipe read error (''cvs history'')') errorPrintCR. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3657 |
ex return. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3658 |
] do:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3659 |
"/ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3660 |
"/ read the commands pipe output and reformat the lines |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3661 |
"/ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3662 |
endReached := false. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3663 |
[endReached] whileFalse:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3664 |
inStream readWait. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3665 |
line := inStream nextLine. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3666 |
(endReached := line isNil) ifFalse:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3667 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3668 |
"/ cvs history line is of the following format: |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3669 |
"/ [Ma] date time +xxx user rev name module/package .... |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3670 |
words := line asCollectionOfWords. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3671 |
words size >= 8 ifFalse:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3672 |
"/ something like 'No records selected' ... |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3673 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3674 |
] ifTrue:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3675 |
recordType := words at:1. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3676 |
fileName := words at:7. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3677 |
user := words at:5. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3678 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3679 |
(filter not |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3680 |
or:[fileName endsWith:'.st']) ifTrue:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3681 |
(userFilter isNil |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3682 |
or:[userFilter = user]) ifTrue:[ |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3683 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3684 |
date := words at:2. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3685 |
time := words at:3. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3686 |
rev := words at:6. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3687 |
pkgDir := words at:8. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3688 |
|
1037 | 3689 |
module := pkgDir copy. |
3690 |
(module startsWith:'./') ifTrue:[ |
|
3691 |
module := module copyFrom:3. |
|
3692 |
]. |
|
3693 |
idx := module indexOf:$/. |
|
3694 |
idx ~~ 0 ifTrue:[ |
|
3695 |
module at:idx put:$: |
|
856
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3696 |
]. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3697 |
|
1037 | 3698 |
(filterModules isNil |
3699 |
or:[filterModules includes:module]) ifTrue:[ |
|
3700 |
||
3701 |
recordType = 'M' ifTrue:[ |
|
3702 |
recordType := ' ' |
|
3703 |
] ifFalse:[ |
|
3704 |
recordType = 'A' ifTrue:[ |
|
3705 |
recordType := '+' |
|
3706 |
] ifFalse:[ |
|
3707 |
(recordType = 'R' or:[recordType = 'W']) ifTrue:[ |
|
3708 |
recordType := '-' |
|
3709 |
] |
|
3710 |
] |
|
856
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3711 |
]. |
1037 | 3712 |
|
3713 |
info := Dictionary new. |
|
3714 |
info at:#cvsRecordType put:recordType. |
|
3715 |
info at:#date put:date. |
|
3716 |
info at:#time put:time. |
|
3717 |
info at:#user put:user. |
|
3718 |
info at:#fileName put:fileName. |
|
3719 |
info at:#revision put:rev. |
|
3720 |
info at:#directory put:pkgDir. |
|
3721 |
info at:#className put:(Smalltalk classNameForFile:fileName). |
|
3722 |
||
3723 |
"/ |
|
3724 |
"/ for your convenience: |
|
3725 |
"/ check what the actual version is in the image |
|
3726 |
"/ |
|
3727 |
clsName := Smalltalk classNameForFile:fileName. |
|
3728 |
clsName notNil ifTrue:[ |
|
3729 |
cls := Smalltalk classNamed:clsName. |
|
3730 |
(cls notNil and:[(clsRev := cls revision) notNil]) ifTrue:[ |
|
3731 |
info at:#classesRevision put:clsRev. |
|
3732 |
]. |
|
3733 |
]. |
|
3734 |
aBlock value:info |
|
3735 |
] |
|
856
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3736 |
] |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3737 |
] |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3738 |
] |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3739 |
] |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3740 |
]. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3741 |
]. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3742 |
inStream close. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3743 |
] |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3744 |
]. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3745 |
|
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3746 |
tempDir recursiveRemove. |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3747 |
|
1037 | 3748 |
"Created: / 17.1.2001 / 13:11:20 / cg" |
3749 |
"Modified: / 17.1.2001 / 13:41:22 / cg" |
|
3750 |
! |
|
3751 |
||
3752 |
reportHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter filterRepository:filterRep inTo:aBlock |
|
3753 |
"process a full historyLog, evaluate aBlock for each entry, passing |
|
3754 |
the logs info in a dictionary. |
|
3755 |
This walks over all possible repositories. |
|
3756 |
filterRep may be a collection of repository names |
|
3757 |
(i.e. 'stc', 'exept', 'phx' etc.) to only report changes made to one |
|
3758 |
of those repositories. |
|
3759 |
filterUser, if non-nil, will filter only changes made by that user." |
|
3760 |
||
3761 |
^self |
|
3762 |
reportHistoryLogSince:timeGoal |
|
3763 |
filterSTSources:filter |
|
3764 |
filterUser:userFilter |
|
3765 |
filterRepository:filterRep |
|
3766 |
filterModules:nil |
|
3767 |
inTo:aBlock |
|
3768 |
||
3769 |
"Modified: / 17.1.2001 / 13:12:15 / cg" |
|
856
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3770 |
! |
795e1b535a9d
made cvs-history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3771 |
|
550
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3772 |
revisionInfoFromString:aString |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3773 |
"{ Pragma: +optSpace }" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3774 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3775 |
"return a dictionary filled with revision info. |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3776 |
This extracts the relevant info from aString." |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3777 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3778 |
^ self revisionInfoFromRCSString:aString |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3779 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3780 |
" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3781 |
self revisionInfoFromString:(Array version) |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3782 |
" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3783 |
|
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3784 |
"Modified: 29.1.1997 / 19:00:35 / cg" |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3785 |
! |
3ddcec87d591
the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents:
549
diff
changeset
|
3786 |
|
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
3787 |
revisionLogOf:clsOrNil fromRevision:rev1 toRevision:rev2 fileName:classFileName directory:packageDir module:moduleDir |
130 | 3788 |
"return info about the repository container and |
3789 |
(part of) the revisionlog as a collection of revision entries. |
|
3790 |
Return nil on failure. |
|
3791 |
||
3792 |
The returned information is a structure (IdentityDictionary) |
|
3793 |
filled with: |
|
1025 | 3794 |
#container -> the RCS/CVS container file name |
3795 |
#cvsRoot -> the CVS root (repository) |
|
179 | 3796 |
#filename -> the actual source file name |
3797 |
#newestRevision -> the revisionString of the newest revision |
|
1069 | 3798 |
#numberOfRevisions -> the number of revisions in the container (nil for all) |
179 | 3799 |
#revisions -> collection of per-revision info (see below) |
130 | 3800 |
|
179 | 3801 |
rev1 / rev2 specify from which revisions a logEntry is wanted: |
3802 |
-If rev1 is nil, the first revision is the initial revision |
|
3803 |
otherwise, the log starts with that revision. |
|
3804 |
-If rev2 is nil, the last revision is the newest revision |
|
3805 |
otherwise, the log ends with that revision. |
|
130 | 3806 |
|
179 | 3807 |
-If both are nil, all logEntries are extracted. |
3808 |
-If both are 0 (not nil), no logEntries are extracted (i.e. only the header). |
|
130 | 3809 |
|
179 | 3810 |
per revision info consists of one record per revision: |
130 | 3811 |
|
179 | 3812 |
#revision -> the revision string |
3813 |
#author -> who checked that revision into the repository |
|
3814 |
#date -> when was it checked in |
|
3815 |
#state -> the RCS state |
|
3816 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
|
130 | 3817 |
|
179 | 3818 |
revisions are ordered newest first |
3819 |
(i.e. the last entry is for the initial revision; the first for the most recent one) |
|
3820 |
" |
|
130 | 3821 |
|
1119 | 3822 |
|tempDir fullName modulePath inStream inHeaderInfo atEnd line revArg idx |
3823 |
info record revisionRecords s headerOnly msg | |
|
130 | 3824 |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
3825 |
modulePath := moduleDir , '/' , packageDir. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
3826 |
fullName := modulePath , '/' , classFileName. |
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
3827 |
tempDir := self createTempDirectory:nil forModule:nil. |
606
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
3828 |
tempDir isNil ifTrue:[ |
681 | 3829 |
('CVSSourceCodeManager [error]: no tempDir - cannot extract log') errorPrintCR. |
606
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
3830 |
^ nil. |
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
3831 |
]. |
855597464034
graceful handling of errors while creating the tempDir.
Claus Gittinger <cg@exept.de>
parents:
605
diff
changeset
|
3832 |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
3833 |
[ |
179 | 3834 |
self createEntryFor:fullName |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3835 |
module:moduleDir |
179 | 3836 |
in:(tempDir construct:modulePath) |
3837 |
revision:'1.1' |
|
3838 |
date:'dummy' |
|
3839 |
special:'' |
|
3840 |
overwrite:false. |
|
160 | 3841 |
|
179 | 3842 |
revArg := ''. |
3843 |
headerOnly := false. |
|
3844 |
(rev1 notNil or:[rev2 notNil]) ifTrue:[ |
|
3845 |
(rev1 == 0 and:[rev2 == 0]) ifTrue:[ |
|
3846 |
revArg := '-h'. |
|
3847 |
headerOnly := true. |
|
3848 |
] ifFalse:[ |
|
3849 |
revArg := '-r'. |
|
3850 |
rev1 notNil ifTrue:[ |
|
3851 |
revArg := revArg , rev1 |
|
3852 |
]. |
|
3853 |
revArg := revArg , ':'. |
|
3854 |
rev2 notNil ifTrue:[ |
|
3855 |
revArg := revArg , rev2 |
|
3856 |
]. |
|
3857 |
] |
|
3858 |
]. |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
3859 |
|
533 | 3860 |
headerOnly ifTrue:[ |
3861 |
msg := 'fetching revision info ' |
|
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3862 |
] ifFalse:[ |
533 | 3863 |
msg := 'reading revision log ' |
461
4c4d42662239
added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents:
449
diff
changeset
|
3864 |
]. |
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
3865 |
clsOrNil isNil ifTrue:[ |
533 | 3866 |
msg := msg , 'in ' , fullName. |
3867 |
] ifFalse:[ |
|
922
24cfcd3043a2
file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents:
905
diff
changeset
|
3868 |
msg := msg , 'of ', clsOrNil name. |
533 | 3869 |
]. |
3870 |
self activityNotification:msg. |
|
3871 |
||
1119 | 3872 |
inStream := self |
3873 |
executeCVSCommand:('log ' , revArg , ' ' , fullName) |
|
3874 |
module:moduleDir |
|
3875 |
inDirectory:tempDir |
|
3876 |
log:true |
|
3877 |
pipe:true. |
|
3878 |
||
179 | 3879 |
inStream isNil ifTrue:[ |
681 | 3880 |
('CVSSourceCodeManager [error]: cannot open pipe to cvs log ', fullName) errorPrintCR. |
179 | 3881 |
^ nil |
3882 |
]. |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
3883 |
|
179 | 3884 |
"/ |
3885 |
"/ read the commands pipe output and extract the container info |
|
3886 |
"/ |
|
3887 |
info := IdentityDictionary new. |
|
3888 |
inHeaderInfo := true. |
|
3889 |
[inHeaderInfo and:[inStream atEnd not]] whileTrue:[ |
|
3890 |
line:= inStream nextLine. |
|
3891 |
line notNil ifTrue:[ |
|
3892 |
|gotIt| |
|
130 | 3893 |
|
179 | 3894 |
gotIt := false. |
616
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3895 |
#('RCS file:' #container |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3896 |
'Working file:' #filename |
c8ba3d8df1ab
support for per-module CVSROOT; allows customers to have
Claus Gittinger <cg@exept.de>
parents:
614
diff
changeset
|
3897 |
'head:' #newestRevision |
179 | 3898 |
'total revisions:' #numberOfRevisions |
3899 |
) pairWiseDo:[:word :key | |
|
3900 |
gotIt ifFalse:[ |
|
3901 |
s := line restAfter:word withoutSeparators:true. |
|
3902 |
s notNil ifTrue:[info at:key put:s. gotIt := true]. |
|
3903 |
] |
|
3904 |
]. |
|
3905 |
gotIt ifFalse:[ |
|
3906 |
(line startsWith:'description:') ifTrue:[inHeaderInfo := false]. |
|
3907 |
] |
|
3908 |
] |
|
3909 |
]. |
|
3910 |
inStream nextLine. "/ skip separating line after description. |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
3911 |
|
179 | 3912 |
info isEmpty ifTrue:[ |
681 | 3913 |
('CVSSourceCodeManager [warning]: no log for ', fullName) errorPrintCR. |
179 | 3914 |
^ nil |
3915 |
]. |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
3916 |
|
179 | 3917 |
"/ strip selected revisions from the total-revisions entry |
3918 |
s := info at:#numberOfRevisions. |
|
3919 |
(idx := s indexOf:$;) ~~ 0 ifTrue:[ |
|
3920 |
info at:#numberOfRevisions put:(Integer readFrom:(s copyTo:idx - 1)) |
|
935
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3921 |
] ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3922 |
info at:#numberOfRevisions put:(Integer readFrom:s onError:[1]) |
179 | 3923 |
]. |
3924 |
headerOnly ifFalse:[ |
|
3925 |
"/ |
|
3926 |
"/ continue to read the commands pipe output |
|
3927 |
"/ and extract revision info records |
|
3928 |
"/ |
|
3929 |
revisionRecords := OrderedCollection new:(info at:#numberOfRevisions). |
|
3930 |
info at:#revisions put:revisionRecords. |
|
130 | 3931 |
|
179 | 3932 |
atEnd := false. |
3933 |
[atEnd or:[inStream atEnd]] whileFalse:[ |
|
935
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3934 |
record := self readRevisionLogEntryFromStream:inStream. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3935 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3936 |
"/ revLine1 := inStream nextLine. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3937 |
"/ [revLine1 notNil and:[(revLine1 startsWith:'revision ') not]] |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3938 |
"/ whileTrue:[inStream atEnd ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3939 |
"/ revLine1 := nil |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3940 |
"/ ] ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3941 |
"/ revLine1 := inStream nextLine.]]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3942 |
"/ revLine2 := inStream nextLine. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3943 |
"/ (revLine1 notNil and:[revLine2 notNil]) ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3944 |
"/ record := IdentityDictionary new. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3945 |
"/ record at:#revision put:(revLine1 asCollectionOfWords at:2). |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3946 |
"/ "/ decompose date/author/state etc. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3947 |
"/ (revLine2 asCollectionOfSubstringsSeparatedBy:$;) do:[:info | |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3948 |
"/ |subEntry| |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3949 |
"/ subEntry := info withoutSeparators. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3950 |
"/ #('date:' #date |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3951 |
"/ 'author:' #author |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3952 |
"/ 'state:' #state |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3953 |
"/ 'lines:' #numberOfChangedLines |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3954 |
"/ ) pairWiseDo:[:word :key | |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3955 |
"/ s := subEntry restAfter:word withoutSeparators:true. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3956 |
"/ s notNil ifTrue:[record at:key put:s.]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3957 |
"/ ]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3958 |
"/ ]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3959 |
"/ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3960 |
"/ "first revision does not hav a 'lines:' entry" |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3961 |
"/ (record includesKey:#numberOfChangedLines) ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3962 |
"/ record at:#numberOfChangedLines put:'' |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3963 |
"/ ]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3964 |
"/ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3965 |
"/ s := nil. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3966 |
"/ line := inStream nextLine. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3967 |
"/ [atEnd or:[line isNil or:[line startsWith:'--------']]] whileFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3968 |
"/ (line startsWith:'==========') ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3969 |
"/ atEnd := true. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3970 |
"/ ] ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3971 |
"/ (line withoutSpaces = '.') ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3972 |
"/ line := '*** empty log message ***' |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3973 |
"/ ]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3974 |
"/ s isNil ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3975 |
"/ s := line |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3976 |
"/ ] ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3977 |
"/ s := s , Character cr asString , line. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3978 |
"/ ]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3979 |
"/ line := inStream nextLine. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3980 |
"/ ] |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3981 |
"/ ]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3982 |
"/ record at:#logMessage put:s. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3983 |
"/ revisionRecords add:record. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3984 |
"/ ] |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3985 |
record isNil ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3986 |
atEnd := true. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
3987 |
] ifFalse:[ |
179 | 3988 |
revisionRecords add:record. |
3989 |
] |
|
3990 |
]. |
|
3991 |
]. |
|
165
375583357309
checkout, checkin and log works with server version
Stefan Vogel <sv@exept.de>
parents:
163
diff
changeset
|
3992 |
] valueNowOrOnUnwindDo:[ |
529 | 3993 |
inStream notNil ifTrue:[inStream close]. |
179 | 3994 |
tempDir recursiveRemove |
130 | 3995 |
]. |
3996 |
^ info |
|
3997 |
||
3998 |
" |
|
3999 |
SourceCodeManager revisionLogOf:Array |
|
4000 |
SourceCodeManager revisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' |
|
4001 |
SourceCodeManager revisionLogOf:Array fromRevision:'1.40' toRevision:nil |
|
4002 |
SourceCodeManager revisionLogOf:Array fromRevision:nil toRevision:'1.3' |
|
4003 |
SourceCodeManager revisionLogOf:Array fromRevision:nil toRevision:nil |
|
4004 |
SourceCodeManager revisionLogOf:Array fromRevision:0 toRevision:0 |
|
4005 |
" |
|
4006 |
||
669
f6606693a1be
care for CVSBinDir when reading revisionLog
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
4007 |
"Created: / 16.11.1995 / 13:25:30 / cg" |
f6606693a1be
care for CVSBinDir when reading revisionLog
Claus Gittinger <cg@exept.de>
parents:
657
diff
changeset
|
4008 |
"Modified: / 29.1.1997 / 16:51:30 / stefan" |
715
c656fcf2af04
check for EOF while skipping log entry lines (req'd for win32)
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
4009 |
"Modified: / 27.8.1998 / 12:40:59 / cg" |
935
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4010 |
! |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4011 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4012 |
revisionLogOf:clsOrNil numberOfRevisions:numRevisions fileName:classFileName directory:packageDir module:moduleDir |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4013 |
"return info about the repository container and |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4014 |
(part of) the revisionlog (numRevisions newest revisions) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4015 |
as a collection of revision entries. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4016 |
Return nil on failure. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4017 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4018 |
The returned information is a structure (IdentityDictionary) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4019 |
filled with: |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4020 |
#container -> the RCS container file name |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4021 |
#filename -> the actual source file name |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4022 |
#newestRevision -> the revisionString of the newest revision |
1069 | 4023 |
#numberOfRevisions -> the number of revisions in the container (nil for all) |
935
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4024 |
#revisions -> collection of per-revision info (see below) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4025 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4026 |
rev1 / rev2 specify from which revisions a logEntry is wanted: |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4027 |
-If rev1 is nil, the first revision is the initial revision |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4028 |
otherwise, the log starts with that revision. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4029 |
-If rev2 is nil, the last revision is the newest revision |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4030 |
otherwise, the log ends with that revision. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4031 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4032 |
-If both are nil, all logEntries are extracted. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4033 |
-If both are 0 (not nil), no logEntries are extracted (i.e. only the header). |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4034 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4035 |
per revision info consists of one record per revision: |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4036 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4037 |
#revision -> the revision string |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4038 |
#author -> who checked that revision into the repository |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4039 |
#date -> when was it checked in |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4040 |
#state -> the RCS state |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4041 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4042 |
#logMessage -> the checkIn log message |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4043 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4044 |
revisions are ordered newest first |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4045 |
(i.e. the last entry is for the initial revision; the first for the most recent one) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4046 |
" |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4047 |
|
1119 | 4048 |
|tempDir fullName modulePath inStream inHeaderInfo atEnd line revArg idx |
4049 |
info record revisionRecords s msg| |
|
935
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4050 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4051 |
modulePath := moduleDir , '/' , packageDir. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4052 |
fullName := modulePath , '/' , classFileName. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4053 |
tempDir := self createTempDirectory:nil forModule:nil. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4054 |
tempDir isNil ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4055 |
('CVSSourceCodeManager [error]: no tempDir - cannot extract log') errorPrintCR. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4056 |
^ nil. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4057 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4058 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4059 |
[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4060 |
self createEntryFor:fullName |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4061 |
module:moduleDir |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4062 |
in:(tempDir construct:modulePath) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4063 |
revision:'1.1' |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4064 |
date:'dummy' |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4065 |
special:'' |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4066 |
overwrite:false. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4067 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4068 |
revArg := ''. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4069 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4070 |
msg := 'reading revision log '. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4071 |
clsOrNil isNil ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4072 |
msg := msg , 'in ' , fullName. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4073 |
] ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4074 |
msg := msg , 'of ', clsOrNil name. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4075 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4076 |
self activityNotification:msg. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4077 |
|
1119 | 4078 |
inStream := self |
4079 |
executeCVSCommand:('log ' , revArg , ' ' , fullName) |
|
4080 |
module:moduleDir |
|
4081 |
inDirectory:tempDir |
|
4082 |
log:true |
|
4083 |
pipe:true. |
|
4084 |
||
935
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4085 |
inStream isNil ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4086 |
('CVSSourceCodeManager [error]: cannot open pipe to cvs log ', fullName) errorPrintCR. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4087 |
^ nil |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4088 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4089 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4090 |
"/ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4091 |
"/ read the commands pipe output and extract the container info |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4092 |
"/ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4093 |
info := IdentityDictionary new. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4094 |
inHeaderInfo := true. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4095 |
[inHeaderInfo and:[inStream atEnd not]] whileTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4096 |
line:= inStream nextLine. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4097 |
line notNil ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4098 |
|gotIt| |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4099 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4100 |
gotIt := false. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4101 |
#('RCS file:' #container |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4102 |
'Working file:' #filename |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4103 |
'head:' #newestRevision |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4104 |
'total revisions:' #numberOfRevisions |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4105 |
) pairWiseDo:[:word :key | |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4106 |
gotIt ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4107 |
s := line restAfter:word withoutSeparators:true. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4108 |
s notNil ifTrue:[info at:key put:s. gotIt := true]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4109 |
] |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4110 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4111 |
gotIt ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4112 |
(line startsWith:'description:') ifTrue:[inHeaderInfo := false]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4113 |
] |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4114 |
] |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4115 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4116 |
inStream nextLine. "/ skip separating line after description. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4117 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4118 |
info isEmpty ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4119 |
('CVSSourceCodeManager [warning]: no log for ', fullName) errorPrintCR. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4120 |
^ nil |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4121 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4122 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4123 |
"/ strip selected revisions from the total-revisions entry |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4124 |
s := info at:#numberOfRevisions. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4125 |
(idx := s indexOf:$;) ~~ 0 ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4126 |
info at:#numberOfRevisions put:(Integer readFrom:(s copyTo:idx - 1)) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4127 |
] ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4128 |
info at:#numberOfRevisions put:(Integer readFrom:s onError:[1]) |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4129 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4130 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4131 |
"/ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4132 |
"/ continue to read the commands pipe output |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4133 |
"/ and extract revision-info records |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4134 |
"/ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4135 |
revisionRecords := OrderedCollection new:(info at:#numberOfRevisions). |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4136 |
info at:#revisions put:revisionRecords. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4137 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4138 |
atEnd := false. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4139 |
[atEnd or:[inStream atEnd]] whileFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4140 |
record := self readRevisionLogEntryFromStream:inStream. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4141 |
record isNil ifTrue:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4142 |
atEnd := true. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4143 |
] ifFalse:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4144 |
revisionRecords add:record. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4145 |
]. |
1069 | 4146 |
(numRevisions notNil and:[revisionRecords size >= numRevisions]) ifTrue:[ |
935
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4147 |
atEnd := true |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4148 |
] |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4149 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4150 |
] valueNowOrOnUnwindDo:[ |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4151 |
inStream notNil ifTrue:[inStream close]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4152 |
tempDir recursiveRemove |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4153 |
]. |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4154 |
^ info |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4155 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4156 |
" |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4157 |
SourceCodeManager revisionLogOf:Array |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4158 |
SourceCodeManager revisionLogOf:Array numberOfRevisions:5 |
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4159 |
|
f5a8e98c8730
added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents:
929
diff
changeset
|
4160 |
" |
1005
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4161 |
! |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4162 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4163 |
statusOf:clsOrNil fileName:classFileName directory:packageDir module:moduleDir |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4164 |
"return info about the status repository container. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4165 |
Return nil on failure. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4166 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4167 |
The returned information is a structure (IdentityDictionary) |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4168 |
filled with: |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4169 |
#newestRevision -> the revisionString of the newest revision |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4170 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4171 |
This is much faster than revisionLog info (especially, if there are many revisions), |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4172 |
and all we need is a classes newest version number. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4173 |
" |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4174 |
|
1119 | 4175 |
|tempDir fullName modulePath inStream line |
4176 |
info s msg| |
|
1005
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4177 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4178 |
modulePath := moduleDir , '/' , packageDir. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4179 |
fullName := modulePath , '/' , classFileName. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4180 |
tempDir := self createTempDirectory:nil forModule:nil. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4181 |
tempDir isNil ifTrue:[ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4182 |
('CVSSourceCodeManager [error]: no tempDir - cannot extract log') errorPrintCR. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4183 |
^ nil. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4184 |
]. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4185 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4186 |
[ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4187 |
self createEntryFor:fullName |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4188 |
module:moduleDir |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4189 |
in:(tempDir construct:modulePath) |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4190 |
revision:'1.1' |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4191 |
date:'dummy' |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4192 |
special:'' |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4193 |
overwrite:false. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4194 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4195 |
msg := 'fetching status info of '. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4196 |
clsOrNil isNil ifTrue:[ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4197 |
msg := msg , fullName. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4198 |
] ifFalse:[ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4199 |
msg := msg , clsOrNil name. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4200 |
]. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4201 |
self activityNotification:msg. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4202 |
|
1119 | 4203 |
inStream := self |
4204 |
executeCVSCommand:('status ' , fullName) |
|
4205 |
module:moduleDir |
|
4206 |
inDirectory:tempDir |
|
4207 |
log:true |
|
4208 |
pipe:true. |
|
4209 |
||
1005
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4210 |
inStream isNil ifTrue:[ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4211 |
('CVSSourceCodeManager [error]: cannot open pipe to cvs log ', fullName) errorPrintCR. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4212 |
^ nil |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4213 |
]. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4214 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4215 |
"/ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4216 |
"/ read the commands pipe output and extract the container info |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4217 |
"/ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4218 |
info := IdentityDictionary new. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4219 |
[inStream atEnd] whileFalse:[ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4220 |
line:= inStream nextLine. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4221 |
line notNil ifTrue:[ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4222 |
line := line withoutSeparators. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4223 |
]. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4224 |
line size > 0 ifTrue:[ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4225 |
|gotIt i| |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4226 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4227 |
gotIt := false. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4228 |
#( |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4229 |
'Repository revision:' #newestRevision |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4230 |
) pairWiseDo:[:word :key | |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4231 |
gotIt ifFalse:[ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4232 |
s := line restAfter:word withoutSeparators:true. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4233 |
s notNil ifTrue:[ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4234 |
i := s indexOfSeparator. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4235 |
i ~~ 0 ifTrue:[ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4236 |
s := s copyTo:i-1 |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4237 |
]. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4238 |
info at:key put:s. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4239 |
gotIt := true. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4240 |
]. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4241 |
] |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4242 |
]. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4243 |
] |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4244 |
]. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4245 |
info isEmpty ifTrue:[ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4246 |
('CVSSourceCodeManager [warning]: no status for ', fullName) errorPrintCR. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4247 |
^ nil |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4248 |
]. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4249 |
] valueNowOrOnUnwindDo:[ |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4250 |
inStream notNil ifTrue:[inStream close]. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4251 |
tempDir recursiveRemove |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4252 |
]. |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4253 |
^ info |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4254 |
|
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4255 |
" |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4256 |
SourceCodeManager statusOf:Array |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4257 |
SourceCodeManager statusOf:Array fileName:'Array.st' directory:'libbasic' module:'stx' |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4258 |
SourceCodeManager statusOf:Filename fileName:'Filename.st' directory:'libbasic' module:'stx' |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4259 |
SourceCodeManager statusOf:NewSystemBrowser fileName:'NewSystemBrowser.st' directory:'libtool' module:'stx' |
5f595dc604e0
use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents:
1003
diff
changeset
|
4260 |
" |
130 | 4261 |
! ! |
4262 |
||
502 | 4263 |
!CVSSourceCodeManager class methodsFor:'documentation'! |
89
a6730f6832b6
log bug fix (synchronize on first revision line)
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
4264 |
|
a6730f6832b6
log bug fix (synchronize on first revision line)
Claus Gittinger <cg@exept.de>
parents:
87
diff
changeset
|
4265 |
version |
1138
aa7687ec256f
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
4266 |
^ '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.249 2002-02-25 19:58:35 cg Exp $' |
117 | 4267 |
! ! |
130 | 4268 |
CVSSourceCodeManager initialize! |