author | convert-repo |
Tue, 09 Aug 2016 03:35:30 +0000 | |
changeset 1178 | 3a6dad9479fd |
parent 1134 | fe4583e45210 |
permissions | -rw-r--r-- |
702 | 1 |
" |
2 |
Copyright (c) 2007-2010 Jan Vrany |
|
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
4 |
||
5 |
Permission is hereby granted, free of charge, to any person |
|
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
25 |
" |
|
435 | 26 |
"{ Package: 'stx:libsvn' }" |
98 | 27 |
|
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
Object subclass:#Revision |
|
31 |
instanceVariableNames:'' |
|
1028
bad176b72269
- added compare against HEAD & compare against BASE
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
967
diff
changeset
|
32 |
classVariableNames:'Head Base' |
98 | 33 |
poolDictionaries:'' |
34 |
category:'SVN-Core' |
|
35 |
! |
|
36 |
||
702 | 37 |
!Revision class methodsFor:'documentation'! |
38 |
||
39 |
copyright |
|
40 |
" |
|
41 |
Copyright (c) 2007-2010 Jan Vrany |
|
42 |
Copyright (c) 2009-2010 eXept Software AG |
|
43 |
||
44 |
Permission is hereby granted, free of charge, to any person |
|
45 |
obtaining a copy of this software and associated documentation |
|
46 |
files (the 'Software'), to deal in the Software without |
|
47 |
restriction, including without limitation the rights to use, |
|
48 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
49 |
copies of the Software, and to permit persons to whom the |
|
50 |
Software is furnished to do so, subject to the following |
|
51 |
conditions: |
|
52 |
||
53 |
The above copyright notice and this permission notice shall be |
|
54 |
included in all copies or substantial portions of the Software. |
|
55 |
||
56 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
57 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
58 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
59 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
60 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
61 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
62 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
63 |
OTHER DEALINGS IN THE SOFTWARE. |
|
64 |
||
65 |
" |
|
66 |
! ! |
|
98 | 67 |
|
68 |
!Revision class methodsFor:'instance creation'! |
|
69 |
||
1028
bad176b72269
- added compare against HEAD & compare against BASE
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
967
diff
changeset
|
70 |
base |
bad176b72269
- added compare against HEAD & compare against BASE
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
967
diff
changeset
|
71 |
|
bad176b72269
- added compare against HEAD & compare against BASE
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
967
diff
changeset
|
72 |
Base ifNil:[Base := SVN::RevisionBase new]. |
bad176b72269
- added compare against HEAD & compare against BASE
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
967
diff
changeset
|
73 |
^Base |
bad176b72269
- added compare against HEAD & compare against BASE
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
967
diff
changeset
|
74 |
|
bad176b72269
- added compare against HEAD & compare against BASE
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
967
diff
changeset
|
75 |
"Created: / 15-03-2008 / 23:27:16 / janfrog" |
bad176b72269
- added compare against HEAD & compare against BASE
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
967
diff
changeset
|
76 |
"Modified: / 16-03-2008 / 08:56:14 / janfrog" |
bad176b72269
- added compare against HEAD & compare against BASE
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
967
diff
changeset
|
77 |
"Modified: / 24-03-2009 / 15:18:19 / Jan Vrany <vranyj1@fel.cvut.cz>" |
bad176b72269
- added compare against HEAD & compare against BASE
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
967
diff
changeset
|
78 |
"Created: / 10-02-2012 / 09:54:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
bad176b72269
- added compare against HEAD & compare against BASE
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
967
diff
changeset
|
79 |
! |
bad176b72269
- added compare against HEAD & compare against BASE
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
967
diff
changeset
|
80 |
|
98 | 81 |
date: aDate |
82 |
||
702 | 83 |
^SVN::RevisionDate new date: aDate |
98 | 84 |
|
85 |
"Created: / 15-03-2008 / 23:27:05 / janfrog" |
|
86 |
"Modified: / 16-03-2008 / 08:56:23 / janfrog" |
|
702 | 87 |
"Modified: / 03-02-2011 / 20:41:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
98 | 88 |
! |
89 |
||
90 |
head |
|
91 |
||
702 | 92 |
Head ifNil:[Head := SVN::RevisionHead new]. |
98 | 93 |
^Head |
94 |
||
95 |
"Created: / 15-03-2008 / 23:27:16 / janfrog" |
|
96 |
"Modified: / 16-03-2008 / 08:56:14 / janfrog" |
|
97 |
"Modified: / 24-03-2009 / 15:18:19 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
98 |
! |
|
99 |
||
100 |
number: aNumberOrString |
|
101 |
||
702 | 102 |
^SVN::RevisionNumber new number: aNumberOrString asNumber |
98 | 103 |
|
104 |
"Modified: / 16-03-2008 / 08:56:27 / janfrog" |
|
105 |
"Created: / 18-08-2009 / 13:50:56 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
702 | 106 |
"Modified: / 03-02-2011 / 20:41:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
107 |
! |
|
108 |
||
109 |
readFrom: aStringOrStream onError: aBlock |
|
110 |
||
111 |
| revString | |
|
112 |
revString := aStringOrStream isStream |
|
113 |
ifTrue:[aStringOrStream contents asString] |
|
114 |
ifFalse:[aStringOrStream asString]. |
|
115 |
||
116 |
revString = 'HEAD' ifTrue:[^Revision head]. |
|
117 |
revString = '0' ifTrue:[^Revision head]."kludge" |
|
118 |
((revString first = ${) and:[revString last = $}]) ifTrue: |
|
119 |
[^Revision date: |
|
120 |
(Date readFrom: (revString copyFrom: 2 to: revString size - 1) |
|
121 |
onError: aBlock)]. |
|
122 |
(revString allSatisfy:[:e|e isDigit]) ifTrue: |
|
123 |
[^Revision number:(Integer readFrom: revString onError: aBlock)]. |
|
124 |
"invalid revision string" |
|
125 |
^aBlock value |
|
126 |
||
127 |
" |
|
128 |
SVN::Revision readFrom:'234' |
|
129 |
SVN::Revision readFrom:'HEAD' |
|
130 |
SVN::Revision readFrom:'{2010-01-02}' |
|
131 |
SVN::Revision readFrom:'{Malformed' |
|
132 |
" |
|
133 |
||
134 |
"Created: / 02-01-2010 / 12:00:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
98 | 135 |
! |
136 |
||
137 |
revision: aNumberOrString |
|
138 |
||
139 |
<resource: #obsolete> |
|
140 |
self obsoleteMethodWarning: 'Use #number: instead'. |
|
141 |
^self number: aNumberOrString |
|
142 |
||
143 |
"Created: / 15-03-2008 / 23:26:51 / janfrog" |
|
144 |
"Modified: / 16-03-2008 / 08:56:27 / janfrog" |
|
145 |
"Modified: / 18-08-2009 / 13:51:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
146 |
! ! |
|
147 |
||
702 | 148 |
!Revision class methodsFor:'others'! |
149 |
||
150 |
version_CVS |
|
900
8016cee1d9c8
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
702
diff
changeset
|
151 |
^ '$Header$' |
702 | 152 |
! ! |
153 |
||
1134 | 154 |
!Revision methodsFor:'accessing'! |
155 |
||
156 |
number |
|
157 |
^nil |
|
158 |
||
159 |
"Created: / 14-11-2012 / 20:07:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
160 |
! ! |
|
161 |
||
967 | 162 |
!Revision methodsFor:'instance creation'! |
163 |
||
164 |
to: rev2 |
|
165 |
||
166 |
^RevisionRange from: self to: rev2 |
|
167 |
||
168 |
"Created: / 15-10-2011 / 17:15:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
169 |
! ! |
|
170 |
||
98 | 171 |
!Revision methodsFor:'printing & storing'! |
172 |
||
173 |
printOn: stream |
|
174 |
||
175 |
self subclassResponsibility |
|
176 |
||
177 |
"Created: / 15-03-2008 / 23:21:59 / janfrog" |
|
178 |
! ! |
|
179 |
||
180 |
!Revision class methodsFor:'documentation'! |
|
181 |
||
182 |
version |
|
900
8016cee1d9c8
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
702
diff
changeset
|
183 |
^ '$Header$' |
173 | 184 |
! |
185 |
||
186 |
version_SVN |
|
900
8016cee1d9c8
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
702
diff
changeset
|
187 |
^ '§Id: SVN__Revision.st 362 2011-08-08 13:07:42Z vranyj1 §' |
98 | 188 |
! ! |