Hi all,
the following snippet
session1 begin. session1 root at: #foo put: #bar. session2 commit: [session2 root at: #foo put: #baz]. session1 commit.
results in a MagmaCommitError, as it should, when the sessions are remote and created with #hostAddress:port: , but runs successfully when the two sessions are created using #openLocal: .
Is this expected, or is it a bug?
Ciao,
Giovanni
Hi Giovanni, that is not the expected behavior. Are you certain session1 and session2 are really two different sessions?
Let's work from a complete script and see if we can find where we diverge. This worked for me, how about for you?
| path session1 session2 | path := 'c:\temp\localCommitTest'. MagmaRepositoryController create: path root: Dictionary new. session1 := MagmaSession openLocal: path. session1 connectAs: 'session1'. session2 := MagmaSession openLocal: path. session2 connectAs: 'session2'. [ session1 begin. session1 root at: #foo put: #bar. session2 commit: [session2 root at: #foo put: #baz]. [ session1 commit ] on: MagmaCommitError do: [ : err | err result explore ] ]
ensure: [ session1 disconnect. session2 disconnect. session2 closeRepository ]
--- Giovanni Corriga giovanni@corriga.net wrote:
Hi all,
the following snippet
session1 begin. session1 root at: #foo put: #bar. session2 commit: [session2 root at: #foo put: #baz]. session1 commit.
results in a MagmaCommitError, as it should, when the sessions are remote and created with #hostAddress:port: , but runs successfully when the two sessions are created using #openLocal: .
Is this expected, or is it a bug?
Ciao,
Giovanni
Il giorno gio, 11/01/2007 alle 17.25 -0800, Chris Muller ha scritto:
Hi Giovanni, that is not the expected behavior. Are you certain session1 and session2 are really two different sessions?
Let's work from a complete script and see if we can find where we diverge. This worked for me, how about for you?
Hi Chris
your script worked. I also remembered that I did modify MagmaRepositoryController class>>open: in orded to support non-absolute paths. My version of #open: is
open: pathString | directory | directory := pathString first = FileDirectory pathNameDelimiter ifTrue: [FileDirectory on: pathString] ifFalse: [FileDirectory default directoryNamed: pathString]. ^ self new open: directory
so the problem must lie here. Could it be because UnixFileDirectory does not implement #= ?
Giovanni
I thought Keith Hodges had relative paths working already. I see it is for create but not open. Perhaps it "slipped through the cracks" because I expected relative paths to be working.
I'll do some digging and see if I can find Keiths fix and put up a new version on SqueakMap within the next few days.
Thanks, Chris
--- Giovanni Corriga giovanni@corriga.net wrote:
Il giorno gio, 11/01/2007 alle 17.25 -0800, Chris Muller ha scritto:
Hi Giovanni, that is not the expected behavior. Are you certain session1 and session2 are really two different sessions?
Let's work from a complete script and see if we can find where we diverge. This worked for me, how about for you?
Hi Chris
your script worked. I also remembered that I did modify MagmaRepositoryController class>>open: in orded to support non-absolute paths. My version of #open: is
open: pathString | directory | directory := pathString first = FileDirectory pathNameDelimiter ifTrue: [FileDirectory on: pathString] ifFalse: [FileDirectory default directoryNamed: pathString]. ^ self new open: directory
so the problem must lie here. Could it be because UnixFileDirectory does not implement #= ?
Giovanni
Chris Muller wrote:
I thought Keith Hodges had relative paths working already. I see it is for create but not open. Perhaps it "slipped through the cracks" because I expected relative paths to be working.
I'll do some digging and see if I can find Keiths fix and put up a new version on SqueakMap within the next few days.
Thanks, Chris
Hello,
I thought I scoured the whole code base to fix relative path stuff!
Keith
Send instant messages to your online friends http://uk.messenger.yahoo.com
Well, I think you did too, I probably missed merging one of your packages..
--- Keith Hodges keith_hodges@yahoo.co.uk wrote:
Chris Muller wrote:
I thought Keith Hodges had relative paths working already. I see
it is
for create but not open. Perhaps it "slipped through the cracks" because I expected relative paths to be working.
I'll do some digging and see if I can find Keiths fix and put up a
new
version on SqueakMap within the next few days.
Thanks, Chris
Hello,
I thought I scoured the whole code base to fix relative path stuff!
Keith
Send instant messages to your online friends http://uk.messenger.yahoo.com _______________________________________________ Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Hi Giovanni, the new r39 works with local paths. Hopefully you can use this version and it clears up your issue.
Let me know if I can help..
--- Giovanni Corriga giovanni@corriga.net wrote:
Il giorno gio, 11/01/2007 alle 17.25 -0800, Chris Muller ha scritto:
Hi Giovanni, that is not the expected behavior. Are you certain session1 and session2 are really two different sessions?
Let's work from a complete script and see if we can find where we diverge. This worked for me, how about for you?
Hi Chris
your script worked. I also remembered that I did modify MagmaRepositoryController class>>open: in orded to support non-absolute paths. My version of #open: is
open: pathString | directory | directory := pathString first = FileDirectory pathNameDelimiter ifTrue: [FileDirectory on: pathString] ifFalse: [FileDirectory default directoryNamed: pathString]. ^ self new open: directory
so the problem must lie here. Could it be because UnixFileDirectory does not implement #= ?
Giovanni
magma@lists.squeakfoundation.org