the future is Supertool...
Keith Hodges
keith_hodges at yahoo.co.uk
Thu Aug 16 04:22:36 UTC 2007
> DeltaStreams does not try to replace the MC-family. It tries to
> complement our toolbox by offering a fine granular "pipe network" for
> enabling a flow of fixes/enhancements between teams/forks/projects.
>
> It could also work as a "commit tool" for grouping changes, temporarily
> hiding or reapplying changes (patch queues) and possibly even replace
> the .changes file eventually. This would then work just fine on top of
> any of the MC-family tools - just like ChangeSets do today.
>
>
Dear Goran, thanks for the explanation I think I am understanding a
little better now.
How about this for a simplish idea:
Use the chunk file format in the traditional manner, where the result of
evaluating one chunk is the reader for the next chunk, however instead
of evaluating the chunk completely, the typical deltaStream reader
places itself as the receiver of each of the messages in the chunk.
! "special first chunk" DeltaStreamContentBrowser asDeltaStreamReader !
! addInstVar: 'test' toClassNamed: 'TestClass' !
! removeInstVar: 'not wanted' fromClassNamed: 'TestClass' !
The first chunk evaluates to the default reader, so that the existing
fileIn support works. However if you ignore the first chunk, you can
supply any reader that you wish.
e.g.
"To browse in a contents browser"
1, (DeltaStreamContentBrowser read: file) open.
2.
"to apply and unnapply a change set"
doSystemEditor := SystemEditor read: file
undoDeltaStream := doSystemEditor antithesis asDeltaStream.
doSystemEditor commit.
(SystemEditor read: undoDeltaStream) commit.
3.
"interworking with other tools"
mySystemEditorPopulatedFromMC asDeltaStream
--
At present the chunk format reader has some state, such as which method
category is being read. If this scheme were to be adopted then I would
group items together in a more human readable and editable form e.g.
!""""!
! inClassNamed: 'MyClass' !
! addInstVar: 'a' !
! addInstVar: 'b' !
!""""!
! inClassNamed: MyClass' !
! inCategory: 'new' !
! addMethod: #myMethod !
#myMethod
^self
!""""!
! inClassNamed: MyClass' inCategory: 'new' addMethod: #myMethod !
#myMethod2
^ self
!""""!
You could also arrange that instead of compiling and evaluating each
chunk, the file could be pre-processed into a single evaluable expression.
For example, any chunks beginning with # are replaced with
! addSource: '"escaped \'code\' here\!" !
Then initial '!' are replaced with 'reader ', and ending '!', with '.'.
Finally for those who dont like the chunk format in their vi or emacs,
just removing all '!' will not distrurb the integrity of this format
since each action is on one line, and each method is started by a # and
terminated by a blank line.
ok if its a silly idea then I really should get some sleep
Keith
More information about the Squeak-dev
mailing list
|