author | Jan Vrany <jan.vrany@labware.com> |
Tue, 11 Jul 2023 12:13:27 +0100 | |
branch | jv |
changeset 1173 | e3dd2050492e |
parent 1095 | 87f223484bc3 |
permissions | -rw-r--r-- |
1095
87f223484bc3
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
636
diff
changeset
|
1 |
"{ Encoding: utf8 }" |
87f223484bc3
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
636
diff
changeset
|
2 |
|
30 | 3 |
"{ Package: 'stx:goodies/monticello' }" |
4 |
||
5 |
MCMczReader subclass:#MCMcdReader |
|
6 |
instanceVariableNames:'baseInfo patch' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
636 | 9 |
category:'SCM-Monticello-Storing' |
30 | 10 |
! |
11 |
||
12 |
||
13 |
!MCMcdReader class methodsFor:'as yet unclassified'! |
|
14 |
||
15 |
extension |
|
16 |
^ 'mcd' |
|
17 |
! ! |
|
18 |
||
19 |
!MCMcdReader methodsFor:'as yet unclassified'! |
|
20 |
||
21 |
baseInfo |
|
22 |
^ baseInfo ifNil: [self loadBaseInfo] |
|
23 |
! |
|
24 |
||
25 |
basicVersion |
|
26 |
^ MCDiffyVersion |
|
27 |
package: self package |
|
28 |
info: self info |
|
29 |
dependencies: self dependencies |
|
30 |
baseInfo: self baseInfo |
|
31 |
patch: self patch |
|
32 |
! |
|
33 |
||
34 |
buildPatchFrom: oldDefinitions to: newDefinitions |
|
35 |
^ MCPatch |
|
36 |
fromBase: (MCSnapshot fromDefinitions: oldDefinitions) |
|
37 |
target: (MCSnapshot fromDefinitions: newDefinitions) |
|
38 |
! |
|
39 |
||
40 |
loadBaseInfo |
|
256 | 41 |
^ baseInfo := self extractInfoFrom: (self parseMember: 'base') |
30 | 42 |
! |
43 |
||
44 |
loadPatch |
|
256 | 45 |
| old new m | |
46 |
(m := self zip memberNamed: 'patch.bin') ifNotNil: |
|
47 |
[[^ patch := (DataStream on: m contentStream) next ] |
|
30 | 48 |
on: Error do: [:fallThrough ]]. |
256 | 49 |
definitions := OrderedCollection new. |
30 | 50 |
(self zip membersMatching: 'old/*') |
51 |
do: [:m | self extractDefinitionsFrom: m]. |
|
256 | 52 |
old := definitions asArray. |
53 |
definitions := OrderedCollection new. |
|
30 | 54 |
(self zip membersMatching: 'new/*') |
55 |
do: [:m | self extractDefinitionsFrom: m]. |
|
256 | 56 |
new := definitions asArray. |
57 |
^ patch := self buildPatchFrom: old to: new. |
|
30 | 58 |
|
59 |
! |
|
60 |
||
61 |
patch |
|
62 |
^ patch ifNil: [self loadPatch] |
|
63 |
! ! |
|
64 |
||
65 |
!MCMcdReader class methodsFor:'documentation'! |
|
66 |
||
67 |
version |
|
636 | 68 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCMcdReader.st,v 1.4 2012-09-11 21:22:45 cg Exp $' |
256 | 69 |
! |
70 |
||
71 |
version_CVS |
|
636 | 72 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCMcdReader.st,v 1.4 2012-09-11 21:22:45 cg Exp $' |
256 | 73 |
! |
74 |
||
75 |
version_SVN |
|
1095
87f223484bc3
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
636
diff
changeset
|
76 |
^ '§Id: MCMcdReader.st 17 2010-10-13 12:07:52Z vranyj1 §' |
30 | 77 |
! ! |