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
|
|
71 |
^ '$ÂHeader: /cvs/stx/stx/libsvn/SVN__Entry.st,v 1.4 2009/10/19 12:23:27 fm Exp Â$'
|
|
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 |
|
|
116 |
(path endsWith:lang sourceFileSuffix) ifTrue:[
|
|
117 |
^ lang
|
|
118 |
]
|
|
119 |
].
|
|
120 |
^ nil
|
|
121 |
|
|
122 |
"Created: / 27-08-2009 / 08:42:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
123 |
!
|
|
124 |
|
19
|
125 |
revision
|
|
126 |
^ revision
|
|
127 |
! !
|
|
128 |
|
667
|
129 |
!Entry methodsFor:'testing'!
|
|
130 |
|
|
131 |
isSourceEntry
|
|
132 |
|dotIndex suffix|
|
|
133 |
|
|
134 |
self kind isFile ifFalse:[
|
|
135 |
^ false
|
|
136 |
].
|
|
137 |
dotIndex := path lastIndexOf:$..
|
|
138 |
dotIndex = 0 ifTrue:[
|
|
139 |
^ false
|
|
140 |
].
|
|
141 |
suffix := path copyFrom:dotIndex + 1.
|
|
142 |
ProgrammingLanguage
|
|
143 |
allDo:[:lang |
|
|
144 |
(suffix = lang sourceFileSuffix) ifTrue:[
|
|
145 |
^ true
|
|
146 |
]
|
|
147 |
].
|
|
148 |
^ false
|
|
149 |
|
|
150 |
"Created: / 02-11-2009 / 13:51:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
151 |
"Modified: / 24-11-2009 / 09:22:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
152 |
! !
|
|
153 |
|
19
|
154 |
!Entry class methodsFor:'documentation'!
|
|
155 |
|
|
156 |
version
|
667
|
157 |
^ '$Id$'
|
194
|
158 |
!
|
|
159 |
|
|
160 |
version_SVN
|
667
|
161 |
^ '§Id: SVN__Entry.st 350 2011-07-07 18:42:56Z vranyj1 §'
|
19
|
162 |
! !
|