author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 02 Jul 2018 08:45:59 +0200 | |
branch | jv |
changeset 1186 | 9e617064233f |
parent 1036 | 0c2d289a9125 |
permissions | -rw-r--r-- |
667 | 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 |
" |
|
439 | 26 |
"{ Package: 'stx:libsvn' }" |
19 | 27 |
|
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
Object subclass:#Entry |
|
31 |
instanceVariableNames:'path kind revision date author' |
|
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
category:'SVN-Core' |
|
35 |
! |
|
36 |
||
667 | 37 |
!Entry class methodsFor:'documentation'! |
38 |
||
39 |
copyright |
|
40 |
" |
|
41 |
Copyright (c) 2007-2010 Jan Vrany |
|
42 |
Copyright (c) 2009-2010 eXept Software AG |
|
43 |
||
44 |
Permission is hereby granted, free of charge, to any person |
|
45 |
obtaining a copy of this software and associated documentation |
|
46 |
files (the 'Software'), to deal in the Software without |
|
47 |
restriction, including without limitation the rights to use, |
|
48 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
49 |
copies of the Software, and to permit persons to whom the |
|
50 |
Software is furnished to do so, subject to the following |
|
51 |
conditions: |
|
52 |
||
53 |
The above copyright notice and this permission notice shall be |
|
54 |
included in all copies or substantial portions of the Software. |
|
55 |
||
56 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
57 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
58 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
59 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
60 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
61 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
62 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
63 |
OTHER DEALINGS IN THE SOFTWARE. |
|
64 |
||
65 |
" |
|
66 |
! ! |
|
67 |
||
68 |
!Entry class methodsFor:'others'! |
|
69 |
||
70 |
version_CVS |
|
875
5148224fa780
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
667
diff
changeset
|
71 |
^ '$Header$' |
667 | 72 |
! ! |
19 | 73 |
|
74 |
!Entry methodsFor:'accessing'! |
|
75 |
||
76 |
author |
|
77 |
^ author |
|
78 |
! |
|
79 |
||
667 | 80 |
className |
81 |
"Guess name of the class contained in this source. Guess is based only |
|
82 |
on file name" |
|
83 |
||
84 |
|name| |
|
85 |
||
86 |
name := path copyFrom:(path lastIndexOf:$/) + 1 |
|
87 |
to:(path size - self programmingLanguage sourceFileSuffix size) - 1. |
|
88 |
name := name replaceAll:$_ with:$:. |
|
89 |
^ name asSymbol |
|
90 |
||
91 |
"Created: / 27-08-2009 / 08:40:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
92 |
! |
|
93 |
||
19 | 94 |
date |
95 |
^ date |
|
96 |
! |
|
97 |
||
98 |
kind |
|
99 |
^ kind |
|
100 |
! |
|
101 |
||
102 |
path |
|
103 |
^ path |
|
104 |
! |
|
105 |
||
106 |
path:aString |
|
107 |
path := aString. |
|
108 |
! |
|
109 |
||
667 | 110 |
programmingLanguage |
111 |
"Guess language of source, nil if not language guessed. Current |
|
112 |
implementation is bit stupid - guess language by file suffix" |
|
113 |
||
114 |
ProgrammingLanguage |
|
115 |
allDo:[:lang | |
|
1036 | 116 |
((path size > (lang sourceFileSuffix size + 1"dot")) |
117 |
and:[(path endsWith:lang sourceFileSuffix) |
|
118 |
and:[(path at: ((path size) - (lang sourceFileSuffix size))) == $.]]) |
|
119 |
ifTrue:[ |
|
120 |
^ lang |
|
121 |
] |
|
667 | 122 |
]. |
123 |
^ nil |
|
124 |
||
125 |
"Created: / 27-08-2009 / 08:42:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
126 |
! |
|
127 |
||
19 | 128 |
revision |
129 |
^ revision |
|
130 |
! ! |
|
131 |
||
667 | 132 |
!Entry methodsFor:'testing'! |
133 |
||
134 |
isSourceEntry |
|
135 |
|dotIndex suffix| |
|
136 |
||
137 |
self kind isFile ifFalse:[ |
|
138 |
^ false |
|
139 |
]. |
|
140 |
dotIndex := path lastIndexOf:$.. |
|
141 |
dotIndex = 0 ifTrue:[ |
|
142 |
^ false |
|
143 |
]. |
|
144 |
suffix := path copyFrom:dotIndex + 1. |
|
145 |
ProgrammingLanguage |
|
146 |
allDo:[:lang | |
|
147 |
(suffix = lang sourceFileSuffix) ifTrue:[ |
|
148 |
^ true |
|
149 |
] |
|
150 |
]. |
|
151 |
^ false |
|
152 |
||
153 |
"Created: / 02-11-2009 / 13:51:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
154 |
"Modified: / 24-11-2009 / 09:22:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
155 |
! ! |
|
156 |
||
19 | 157 |
!Entry class methodsFor:'documentation'! |
158 |
||
159 |
version |
|
875
5148224fa780
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
667
diff
changeset
|
160 |
^ '$Header$' |
194 | 161 |
! |
162 |
||
163 |
version_SVN |
|
875
5148224fa780
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
667
diff
changeset
|
164 |
^ '§Id: SVN__Entry.st 362 2011-08-08 13:07:42Z vranyj1 §' |
19 | 165 |
! ! |