If you're wondering, most of the original diff comes from merging the latest MC improvements. Below is an edited version showing actual changes vs. Monticello-bf.532.
- Bert -
Bert Freudenberg uploaded a new version of Monticello to project The Inbox: http://source.squeak.org/inbox/Monticello-bf.540.mcz
==================== Summary ====================
Name: Monticello-bf.540 Author: bf Time: 3 May 2013, 12:06:01.01 pm UUID: 759525eb-5ca8-4ab2-9e4a-bddc7d0680dc Ancestors: Monticello-bf.532, Monticello-fbs.539
This is my allow-partial-commits mod, improved to always diff to the target repository, and merged with the latest fbs.359 trunk version.
=============== Diff against Monticello-bf.532 ===============
Item was added: + Notification subclass: #MCRepositoryRequest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Monticello-UI'!
Item was changed: ----- Method: MCSaveVersionDialog>>defaultExtent (in category 'as yet unclassified') ----- defaultExtent + ^ 600@600! - ^ 400@300!
Item was changed: ----- Method: MCWorkingCopy>>parentSnapshot (in category 'private') ----- parentSnapshot + "prefer parent in selected repository" + MCRepositoryRequest signal ifNotNil: [:repo | + self ancestors do: [:ancestor | + (repo versionWithInfo: ancestor) + ifNotNil: [:ver | ^ver snapshot]]]. + "otherwise, look in all repositories" + self ancestors do: [:ancestor | + (self repositoryGroup versionWithInfo: ancestor) + ifNotNil: [:ver | ^ver snapshot]]. + "otherwise" + ^MCSnapshot empty! - ^ self findSnapshotWithVersionInfo: (self ancestors - ifEmpty: [nil] - ifNotEmpty: [self ancestors first])!
Item was changed: ----- Method: MCWorkingCopyBrowser>>saveVersion (in category 'actions') ----- saveVersion | repo | self canSave ifFalse: [^self]. self checkForNewerVersions ifFalse: [^self]. repo := self repository. + (self withRepository: repo do: [workingCopy newVersion]) ifNotNil: - workingCopy newVersion ifNotNil: [:v | (MCVersionInspector new version: v) show. Cursor wait showWhile: [repo storeVersion: v]. MCCacheRepository default cacheAllFileNamesDuring: [repo cacheAllFileNamesDuring: [v allAvailableDependenciesDo: [:dep | (repo includesVersionNamed: dep info name) ifFalse: [repo storeVersion: dep]]]]]!
Item was added: + ----- Method: MCWorkingCopyBrowser>>withRepository:do: (in category 'actions') ----- + withRepository: aRepository do: aBlock + ^aBlock + on: MCRepositoryRequest + do: [:req | req resume: aRepository]!
Ah, thanks for that, Bert.
IIRC the search over the repository group in #parentSnapshot ought to search the default cache repository first, yes?
As a side note, we use delimited dynamic variables [1] a fair bit (MCRepositoryRequest in this case). I wrote the Control package to formalise this idiom. But it's quite an expensive technique, using a "deep binding" in Henry Baker's terminology [2]. But I don't _think_ we can use shallow binding without VM support...? (Because doing so means associating variable->value bindings with ContextParts, and ContextParts are pretty special.)
[1] http://www.lshift.net/blog/2012/06/27/resumable-exceptions-can-macro-express... [2] http://www.pipeline.com/~hbaker1/ShallowBinding.html
On 3 May 2013 11:17, Bert Freudenberg bert@freudenbergs.de wrote:
If you're wondering, most of the original diff comes from merging the latest MC improvements. Below is an edited version showing actual changes vs. Monticello-bf.532.
- Bert -
Bert Freudenberg uploaded a new version of Monticello to project The Inbox: http://source.squeak.org/inbox/Monticello-bf.540.mcz
==================== Summary ====================
Name: Monticello-bf.540 Author: bf Time: 3 May 2013, 12:06:01.01 pm UUID: 759525eb-5ca8-4ab2-9e4a-bddc7d0680dc Ancestors: Monticello-bf.532, Monticello-fbs.539
This is my allow-partial-commits mod, improved to always diff to the target repository, and merged with the latest fbs.359 trunk version.
=============== Diff against Monticello-bf.532 ===============
Item was added:
- Notification subclass: #MCRepositoryRequest
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Monticello-UI'!
Item was changed: ----- Method: MCSaveVersionDialog>>defaultExtent (in category 'as yet unclassified') ----- defaultExtent
^ 600@600!
^ 400@300!
Item was changed: ----- Method: MCWorkingCopy>>parentSnapshot (in category 'private') ----- parentSnapshot
"prefer parent in selected repository"
MCRepositoryRequest signal ifNotNil: [:repo |
self ancestors do: [:ancestor |
(repo versionWithInfo: ancestor)
ifNotNil: [:ver | ^ver snapshot]]].
"otherwise, look in all repositories"
self ancestors do: [:ancestor |
(self repositoryGroup versionWithInfo: ancestor)
ifNotNil: [:ver | ^ver snapshot]].
"otherwise"
^MCSnapshot empty!
^ self findSnapshotWithVersionInfo: (self ancestors
ifEmpty: [nil]
ifNotEmpty: [self ancestors first])!
Item was changed: ----- Method: MCWorkingCopyBrowser>>saveVersion (in category 'actions') ----- saveVersion | repo | self canSave ifFalse: [^self]. self checkForNewerVersions ifFalse: [^self]. repo := self repository.
(self withRepository: repo do: [workingCopy newVersion]) ifNotNil:
workingCopy newVersion ifNotNil: [:v | (MCVersionInspector new version: v) show. Cursor wait showWhile: [repo storeVersion: v]. MCCacheRepository default cacheAllFileNamesDuring: [repo cacheAllFileNamesDuring: [v allAvailableDependenciesDo: [:dep | (repo includesVersionNamed: dep info name) ifFalse: [repo storeVersion: dep]]]]]!
Item was added:
- ----- Method: MCWorkingCopyBrowser>>withRepository:do: (in category 'actions') -----
- withRepository: aRepository do: aBlock
^aBlock
on: MCRepositoryRequest
do: [:req | req resume: aRepository]!
On 2013-05-03, at 12:26, Frank Shearar frank.shearar@gmail.com wrote:
Ah, thanks for that, Bert.
IIRC the search over the repository group in #parentSnapshot ought to search the default cache repository first, yes?
No. We specifically want to see the diff relative to the repository we are storing into.
- Bert -
As a side note, we use delimited dynamic variables [1] a fair bit (MCRepositoryRequest in this case). I wrote the Control package to formalise this idiom. But it's quite an expensive technique, using a "deep binding" in Henry Baker's terminology [2]. But I don't _think_ we can use shallow binding without VM support...? (Because doing so means associating variable->value bindings with ContextParts, and ContextParts are pretty special.)
[1] http://www.lshift.net/blog/2012/06/27/resumable-exceptions-can-macro-express... [2] http://www.pipeline.com/~hbaker1/ShallowBinding.html
On 3 May 2013 11:17, Bert Freudenberg bert@freudenbergs.de wrote:
If you're wondering, most of the original diff comes from merging the latest MC improvements. Below is an edited version showing actual changes vs. Monticello-bf.532.
- Bert -
Bert Freudenberg uploaded a new version of Monticello to project The Inbox: http://source.squeak.org/inbox/Monticello-bf.540.mcz
==================== Summary ====================
Name: Monticello-bf.540 Author: bf Time: 3 May 2013, 12:06:01.01 pm UUID: 759525eb-5ca8-4ab2-9e4a-bddc7d0680dc Ancestors: Monticello-bf.532, Monticello-fbs.539
This is my allow-partial-commits mod, improved to always diff to the target repository, and merged with the latest fbs.359 trunk version.
=============== Diff against Monticello-bf.532 ===============
Item was added:
- Notification subclass: #MCRepositoryRequest
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Monticello-UI'!
Item was changed: ----- Method: MCSaveVersionDialog>>defaultExtent (in category 'as yet unclassified') ----- defaultExtent
^ 600@600!
^ 400@300!
Item was changed: ----- Method: MCWorkingCopy>>parentSnapshot (in category 'private') ----- parentSnapshot
"prefer parent in selected repository"
MCRepositoryRequest signal ifNotNil: [:repo |
self ancestors do: [:ancestor |
(repo versionWithInfo: ancestor)
ifNotNil: [:ver | ^ver snapshot]]].
"otherwise, look in all repositories"
self ancestors do: [:ancestor |
(self repositoryGroup versionWithInfo: ancestor)
ifNotNil: [:ver | ^ver snapshot]].
"otherwise"
^MCSnapshot empty!
^ self findSnapshotWithVersionInfo: (self ancestors
ifEmpty: [nil]
ifNotEmpty: [self ancestors first])!
Item was changed: ----- Method: MCWorkingCopyBrowser>>saveVersion (in category 'actions') ----- saveVersion | repo | self canSave ifFalse: [^self]. self checkForNewerVersions ifFalse: [^self]. repo := self repository.
(self withRepository: repo do: [workingCopy newVersion]) ifNotNil:
workingCopy newVersion ifNotNil: [:v | (MCVersionInspector new version: v) show. Cursor wait showWhile: [repo storeVersion: v]. MCCacheRepository default cacheAllFileNamesDuring: [repo cacheAllFileNamesDuring: [v allAvailableDependenciesDo: [:dep | (repo includesVersionNamed: dep info name) ifFalse: [repo storeVersion: dep]]]]]!
Item was added:
- ----- Method: MCWorkingCopyBrowser>>withRepository:do: (in category 'actions') -----
- withRepository: aRepository do: aBlock
^aBlock
on: MCRepositoryRequest
do: [:req | req resume: aRepository]!
On 3 May 2013 11:31, Bert Freudenberg bert@freudenbergs.de wrote:
On 2013-05-03, at 12:26, Frank Shearar frank.shearar@gmail.com wrote:
Ah, thanks for that, Bert.
IIRC the search over the repository group in #parentSnapshot ought to search the default cache repository first, yes?
No. We specifically want to see the diff relative to the repository we are storing into.
That's not what it looks like: it looks like it _first_ tries the target repo, and then falls back to searching over a group. Since a MCRepositoryGroup has a default cache, I'd imagine it would search that before trying the other repositories (but after first trying the target repository).
frank
- Bert -
As a side note, we use delimited dynamic variables [1] a fair bit (MCRepositoryRequest in this case). I wrote the Control package to formalise this idiom. But it's quite an expensive technique, using a "deep binding" in Henry Baker's terminology [2]. But I don't _think_ we can use shallow binding without VM support...? (Because doing so means associating variable->value bindings with ContextParts, and ContextParts are pretty special.)
[1] http://www.lshift.net/blog/2012/06/27/resumable-exceptions-can-macro-express... [2] http://www.pipeline.com/~hbaker1/ShallowBinding.html
On 3 May 2013 11:17, Bert Freudenberg bert@freudenbergs.de wrote:
If you're wondering, most of the original diff comes from merging the latest MC improvements. Below is an edited version showing actual changes vs. Monticello-bf.532.
- Bert -
Bert Freudenberg uploaded a new version of Monticello to project The Inbox: http://source.squeak.org/inbox/Monticello-bf.540.mcz
==================== Summary ====================
Name: Monticello-bf.540 Author: bf Time: 3 May 2013, 12:06:01.01 pm UUID: 759525eb-5ca8-4ab2-9e4a-bddc7d0680dc Ancestors: Monticello-bf.532, Monticello-fbs.539
This is my allow-partial-commits mod, improved to always diff to the target repository, and merged with the latest fbs.359 trunk version.
=============== Diff against Monticello-bf.532 ===============
Item was added:
- Notification subclass: #MCRepositoryRequest
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Monticello-UI'!
Item was changed: ----- Method: MCSaveVersionDialog>>defaultExtent (in category 'as yet unclassified') ----- defaultExtent
^ 600@600!
^ 400@300!
Item was changed: ----- Method: MCWorkingCopy>>parentSnapshot (in category 'private') ----- parentSnapshot
"prefer parent in selected repository"
MCRepositoryRequest signal ifNotNil: [:repo |
self ancestors do: [:ancestor |
(repo versionWithInfo: ancestor)
ifNotNil: [:ver | ^ver snapshot]]].
"otherwise, look in all repositories"
self ancestors do: [:ancestor |
(self repositoryGroup versionWithInfo: ancestor)
ifNotNil: [:ver | ^ver snapshot]].
"otherwise"
^MCSnapshot empty!
^ self findSnapshotWithVersionInfo: (self ancestors
ifEmpty: [nil]
ifNotEmpty: [self ancestors first])!
Item was changed: ----- Method: MCWorkingCopyBrowser>>saveVersion (in category 'actions') ----- saveVersion | repo | self canSave ifFalse: [^self]. self checkForNewerVersions ifFalse: [^self]. repo := self repository.
(self withRepository: repo do: [workingCopy newVersion]) ifNotNil:
workingCopy newVersion ifNotNil: [:v | (MCVersionInspector new version: v) show. Cursor wait showWhile: [repo storeVersion: v]. MCCacheRepository default cacheAllFileNamesDuring: [repo cacheAllFileNamesDuring: [v allAvailableDependenciesDo: [:dep | (repo includesVersionNamed: dep info name) ifFalse: [repo storeVersion: dep]]]]]!
Item was added:
- ----- Method: MCWorkingCopyBrowser>>withRepository:do: (in category 'actions') -----
- withRepository: aRepository do: aBlock
^aBlock
on: MCRepositoryRequest
do: [:req | req resume: aRepository]!
On 2013-05-03, at 12:55, Frank Shearar frank.shearar@gmail.com wrote:
On 3 May 2013 11:31, Bert Freudenberg bert@freudenbergs.de wrote:
On 2013-05-03, at 12:26, Frank Shearar frank.shearar@gmail.com wrote:
Ah, thanks for that, Bert.
IIRC the search over the repository group in #parentSnapshot ought to search the default cache repository first, yes?
No. We specifically want to see the diff relative to the repository we are storing into.
That's not what it looks like: it looks like it _first_ tries the target repo, and then falls back to searching over a group. Since a MCRepositoryGroup has a default cache, I'd imagine it would search that before trying the other repositories (but after first trying the target repository).
frank
If no ancestor can be found (an unusual case) in the target repo it falls back to the repo group. And that will have the cache repo, yes.
Possibly it shouldn't even fall back, to indicate that you are in fact storing a completely new package? Or am I misunderstanding you?
The parentSnapshot is only used to display the diff, it has no effect on what actually gets stored.
parentSnapshot "prefer parent in selected repository" MCRepositoryRequest signal ifNotNil: [:repo | self ancestors do: [:ancestor | (repo versionWithInfo: ancestor) ifNotNil: [:ver | ^ver snapshot]]]. "otherwise, look in all repositories" self ancestors do: [:ancestor | (self repositoryGroup versionWithInfo: ancestor) ifNotNil: [:ver | ^ver snapshot]]. "otherwise" ^MCSnapshot empty!
- Bert -
On 3 May 2013 12:11, Bert Freudenberg bert@freudenbergs.de wrote:
On 2013-05-03, at 12:55, Frank Shearar frank.shearar@gmail.com wrote:
On 3 May 2013 11:31, Bert Freudenberg bert@freudenbergs.de wrote:
On 2013-05-03, at 12:26, Frank Shearar frank.shearar@gmail.com wrote:
Ah, thanks for that, Bert.
IIRC the search over the repository group in #parentSnapshot ought to search the default cache repository first, yes?
No. We specifically want to see the diff relative to the repository we are storing into.
That's not what it looks like: it looks like it _first_ tries the target repo, and then falls back to searching over a group. Since a MCRepositoryGroup has a default cache, I'd imagine it would search that before trying the other repositories (but after first trying the target repository).
frank
If no ancestor can be found (an unusual case) in the target repo it falls back to the repo group. And that will have the cache repo, yes.
Possibly it shouldn't even fall back, to indicate that you are in fact storing a completely new package? Or am I misunderstanding you?
I'm happy with the fallback; it means things have a better chance of working when off-line. I just wanted to confirm my understanding of the fallback position. I'm happy now :)
The parentSnapshot is only used to display the diff, it has no effect on what actually gets stored.
Yes.
frank
On 2013-05-03, at 13:16, Frank Shearar frank.shearar@gmail.com wrote:
On 3 May 2013 12:11, Bert Freudenberg bert@freudenbergs.de wrote:
On 2013-05-03, at 12:55, Frank Shearar frank.shearar@gmail.com wrote:
On 3 May 2013 11:31, Bert Freudenberg bert@freudenbergs.de wrote:
On 2013-05-03, at 12:26, Frank Shearar frank.shearar@gmail.com wrote:
Ah, thanks for that, Bert.
IIRC the search over the repository group in #parentSnapshot ought to search the default cache repository first, yes?
No. We specifically want to see the diff relative to the repository we are storing into.
That's not what it looks like: it looks like it _first_ tries the target repo, and then falls back to searching over a group. Since a MCRepositoryGroup has a default cache, I'd imagine it would search that before trying the other repositories (but after first trying the target repository).
frank
If no ancestor can be found (an unusual case) in the target repo it falls back to the repo group. And that will have the cache repo, yes.
Possibly it shouldn't even fall back, to indicate that you are in fact storing a completely new package? Or am I misunderstanding you?
I'm happy with the fallback; it means things have a better chance of working when off-line. I just wanted to confirm my understanding of the fallback position. I'm happy now :)
The parentSnapshot is only used to display the diff, it has no effect on what actually gets stored.
Yes.
frank
Actually I misremembered how it works ... this is not looking for any distant ancestor in the repo, but only for direct ancestors. Namely, the ones listed as parents of the working copy. Normally it's only a single parent, in which case it does not matter in which repo it is found. But if this was a merge, we must show the diff relative to the parent in the target repo, not from the other repo, no matter in what order the two are listed as parents. This is to show the changes we're going to make to the selected repository.
Before this change, it would always show a diff relative to the first parent, which was occasionally misleading.
- Bert -
squeak-dev@lists.squeakfoundation.org