Re: @shadow and what should I put under version control
On Thu, Jun 25, 2009 at 7:15 AM, Ville M. Vainio wrote: > > The thing leo needs to do is really ask the user which node to keep, > when conflicting versions of same node are read. In my experience, this doesn't work well. The user is not likely to be in a position to choose easily. I prefer the simple rule: last file loaded wins. If this isn't good enough, don't use cross-file clones. BTW, clones held in the .leo file itself always load first, so the expected thing happens: externally changed files wins. Edward --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Thu, Jun 25, 2009 at 2:18 PM, Edward K. Ream wrote: > I don't think Leo can, or should, do anything more in this area. Talked about this recently... To quote the Zen (tm), "In the face of ambiguity, refuse the temptation to guess." Simply, I don't trust any "heuristic" on this, e.g. file timestamp doesn't help much (suppose you just pulled leoNotes.txt from bzr). Order in tree structure isn't that trustworthy either. I'm suspicious about some interactions with the hashcaching, for example. The thing leo needs to do is really ask the user which node to keep, when conflicting versions of same node are read. This interrupts the loading for a second, but the cost of not doing that is possible data loss. As importantly, the user needs to be very aware of the conflicts like this, it's easy to overlook these and allow data to be lost silently in the background. -- Ville M. Vainio http://tinyurl.com/vainio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Wed, Jun 24, 2009 at 6:41 PM, James A. Donald wrote: > > Edward K. Ream wrote: > > I have often said that at most one @thin tree should be responsible for > each > > clone. > > doubtless, but there is nothing to mark or record a clone as which @thin > tree is the right one for editing it, should one edit it outside of leo, > or, as is quite likely, someone else edit it outside of leo. I don't think Leo can, or should, do anything more in this area. You should arrange your .leo file so that editing the "master" files externally will have the desired result. For leoPy.leo, this means putting @thin leoProjects.txt before all the other @thin nodes. It's as simple as that. Edward --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
Edward K. Ream wrote: > I have often said that at most one @thin tree should be responsible for each > clone. doubtless, but there is nothing to mark or record a clone as which @thin tree is the right one for editing it, should one edit it outside of leo, or, as is quite likely, someone else edit it outside of leo. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
thyrsus wrote: > * If you've got nodes cloned into multiple @thin or > @file locations, and their contents gets changed > outside of Leo, then the last version encountered > during the reading of the derived files wins. This is a bug, in that it is guaranteed to surprise: "What happened to my changes", cries the user, having long forgotten that the node was cloned into some obscure place for some reason no longer very relevant, perhaps to document a bug long ago fixed and forgotten. The version whose file has the most recent change date should win. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Wed, Jun 24, 2009 at 8:13 AM, Edward K. Ream wrote: > On Mon, Jun 22, 2009 at 7:32 PM, Lucas Thode wrote: > >> >> What do you do about nodes and structure that is shared among multiple >> @thin trees in that scenario? Also, what about things that should be kept >> with the code, but are not part of the code itself? (Leo's clones provide a >> nice facility for associating code and high-level documentation such as >> business requirements.) >> > > I have often said that at most one @thin tree should be responsible for > each clone. For example, in leoPy.leo, the actual source files "own" (not > an official term) each node, while almost all clones end up in @thin > leoProjects.txt. This file uses @all to allow clones to be included without > regard to whether, for example, section definition nodes are actually > referenced. > > I think of this as not so much a technical issue, but a management issue. > Just as two human managers are unlikely to agree to shared responsibility > for a piece of code, so too it is likely to be unwise to have two source > files share cloned nodes. I consider it bad (management) style. YMMV. > > Edward > > > These shared clone nodes are just boilerplate, really. So, it's not a big deal in this case; for actual code, I agree with you. --Lucas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Tue, Jun 23, 2009 at 10:55 PM, thyrsus wrote: > > I do a good bit of clones getting expanded into multiple locations, > and it works well for me. Important things to remember: > > * If you're using @thin, it means the .leo file is thin, and the > derived file is fat. Okiedokie, I'll move the doc-bits in question out of the .leo file into derived files. :) > > > * If you've got nodes cloned into multiple @thin or @file locations, > and their contents gets changed outside of Leo, then the last version > encountered during the reading of the derived files wins. Not a huge deal, the clone nodes are shared boilerplate and won't get touched for much of anything. > > > * If the sentinels are damaged outside of Leo, Leo can sometimes get > confused -- more often with @file than with @thin. I'm just going to make Leo a requirement for editing the code. ;) > > > > * Unless your versioning system is extremely short of disk space, tell > your versioning system that the .leo file is a binary. Trying to do > reconciliations between XML files is close to impossible except in the > very most trivial cases. I've only done it successfully twice; you're > almost always better off abandoning your changes, checking out from a > known coherent version, and redoing the work from there. Good idea. > > > Good luck, > >- Stephen > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Mon, Jun 22, 2009 at 7:32 PM, Lucas Thode wrote: > > What do you do about nodes and structure that is shared among multiple > @thin trees in that scenario? Also, what about things that should be kept > with the code, but are not part of the code itself? (Leo's clones provide a > nice facility for associating code and high-level documentation such as > business requirements.) > I have often said that at most one @thin tree should be responsible for each clone. For example, in leoPy.leo, the actual source files "own" (not an official term) each node, while almost all clones end up in @thin leoProjects.txt. This file uses @all to allow clones to be included without regard to whether, for example, section definition nodes are actually referenced. I think of this as not so much a technical issue, but a management issue. Just as two human managers are unlikely to agree to shared responsibility for a piece of code, so too it is likely to be unwise to have two source files share cloned nodes. I consider it bad (management) style. YMMV. Edward --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
I do a good bit of clones getting expanded into multiple locations, and it works well for me. Important things to remember: * If you're using @thin, it means the .leo file is thin, and the derived file is fat. * If you've got nodes cloned into multiple @thin or @file locations, and their contents gets changed outside of Leo, then the last version encountered during the reading of the derived files wins. * If the sentinels are damaged outside of Leo, Leo can sometimes get confused -- more often with @file than with @thin. * Unless your versioning system is extremely short of disk space, tell your versioning system that the .leo file is a binary. Trying to do reconciliations between XML files is close to impossible except in the very most trivial cases. I've only done it successfully twice; you're almost always better off abandoning your changes, checking out from a known coherent version, and redoing the work from there. Good luck, - Stephen On Jun 22, 8:32 pm, Lucas Thode wrote: > On Mon, Jun 22, 2009 at 1:01 PM, Edward K. Ream wrote: > > > > > > > <> > > >> The .leo file differs from simple project files of various IDEs in > >> that it can have valuable content that's not trivially derived from > >> anywhere else. You may want to have it in version control outside you > >> normal development tree, but it's still handy to have it somewhere. > > > True, but this is not recommended. I recommend the approach discussed at: > > >http://webpages.charter.net/edreamleo/FAQ.html#how-should-i-use-leo-w... > > > where most information is in @thin trees and the "reference" .leo file > > changes only when new @thin nodes are added. > > > Edward > > What do you do about nodes and structure that is shared among multiple @thin > trees in that scenario? Also, what about things that should be kept with > the code, but are not part of the code itself? (Leo's clones provide a nice > facility for associating code and high-level documentation such as business > requirements.) > > --Lucas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Mon, Jun 22, 2009 at 1:01 PM, Edward K. Ream wrote: > > <> > >> >> >> The .leo file differs from simple project files of various IDEs in >> that it can have valuable content that's not trivially derived from >> anywhere else. You may want to have it in version control outside you >> normal development tree, but it's still handy to have it somewhere. > > > True, but this is not recommended. I recommend the approach discussed at: > > > http://webpages.charter.net/edreamleo/FAQ.html#how-should-i-use-leo-with-bzr-git-hg-svn-cvs > > where most information is in @thin trees and the "reference" .leo file > changes only when new @thin nodes are added. > > Edward > What do you do about nodes and structure that is shared among multiple @thin trees in that scenario? Also, what about things that should be kept with the code, but are not part of the code itself? (Leo's clones provide a nice facility for associating code and high-level documentation such as business requirements.) --Lucas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Mon, Jun 22, 2009 at 1:22 PM, Ville M. Vainio wrote: > > On Mon, Jun 22, 2009 at 9:19 PM, Lucas Thode wrote: > > > Yes, and and that is the case for my project. Also, I'll probably go to > > @thin files and make Leo a prerequisite for developing on the project. > (It > > is under GPLv2+an exemption to allow dynamic linking with > GPL-incompatible > > code.) > > Off topic - why not LGPL then? GPL + exemption sounds rather complicated). > > Trying to keep this brief: it's a plugin loaded that eventually gets loaded into a closed-source application as opposed to a general purpose library. --Lucas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Mon, Jun 22, 2009 at 1:01 PM, Edward K. Ream wrote: > > > > True, but this is not recommended. I recommend the approach discussed at: > > > http://webpages.charter.net/edreamleo/FAQ.html#how-should-i-use-leo-with-bzr-git-hg-svn-cvs > > where most information is in @thin trees and the "reference" .leo file > changes only when new @thin nodes are added. > Here's the thing: I have information encoded in the outline structure above the nodes for my derived files. Also, there are clone nodes that are shared among the various derived files with a master copy kept above them. Finally, there is going to be information that is saved directly into the .leo file. --Lucas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Mon, Jun 22, 2009 at 9:19 PM, Lucas Thode wrote: > Yes, and and that is the case for my project. Also, I'll probably go to > @thin files and make Leo a prerequisite for developing on the project. (It > is under GPLv2+an exemption to allow dynamic linking with GPL-incompatible > code.) Off topic - why not LGPL then? GPL + exemption sounds rather complicated). -- Ville M. Vainio http://tinyurl.com/vainio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Mon, Jun 22, 2009 at 12:33 PM, Ville M. Vainio wrote: > > On Mon, Jun 22, 2009 at 8:24 PM, Steve Zatz wrote: > > >> Having the .leo file in version control hurts no one ... > > > But what is the reason to have it in version control? In my mind, > > It's a backup thing. If it contains valuable data, it won't be > permanently scorched by rm -Rf . or equivalent. You can call it > foo_steve.leo or whatever if you wish ;-). > Yes, and and that is the case for my project. Also, I'll probably go to @thin files and make Leo a prerequisite for developing on the project. (It is under GPLv2+an exemption to allow dynamic linking with GPL-incompatible code.) --Lucas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Mon, Jun 22, 2009 at 12:33 PM, Ville M. Vainio wrote: > > On Mon, Jun 22, 2009 at 8:24 PM, Steve Zatz wrote: > > >> Having the .leo file in version control hurts no one ... > > > But what is the reason to have it in version control? In my mind, > > It's a backup thing. If it contains valuable data, it won't be > permanently scorched by rm -Rf . or equivalent. You can call it > foo_steve.leo or whatever if you wish ;-). > > The .leo file differs from simple project files of various IDEs in > that it can have valuable content that's not trivially derived from > anywhere else. You may want to have it in version control outside you > normal development tree, but it's still handy to have it somewhere. True, but this is not recommended. I recommend the approach discussed at: http://webpages.charter.net/edreamleo/FAQ.html#how-should-i-use-leo-with-bzr-git-hg-svn-cvs where most information is in @thin trees and the "reference" .leo file changes only when new @thin nodes are added. Edward --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Mon, Jun 22, 2009 at 8:24 PM, Steve Zatz wrote: >> Having the .leo file in version control hurts no one ... > But what is the reason to have it in version control? In my mind, It's a backup thing. If it contains valuable data, it won't be permanently scorched by rm -Rf . or equivalent. You can call it foo_steve.leo or whatever if you wish ;-). The .leo file differs from simple project files of various IDEs in that it can have valuable content that's not trivially derived from anywhere else. You may want to have it in version control outside you normal development tree, but it's still handy to have it somewhere. -- Ville M. Vainio http://tinyurl.com/vainio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
> Having the .leo file in version control hurts no one ... But what is the reason to have it in version control? In my mind, it's just an extension of the local code viewer/editor (Leo) and therefore not something that would normally be under version control. And if you get multiple people using Leo to edit versioned files, wouldn't they all have individual local .leo files suited to the way they like to view and edit content? Especially if you are committing @thin files, it just seems to be an unnecessary complication with potentially unintended consequences to commit the .leo file. Steve --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Mon, Jun 22, 2009 at 5:02 PM, Lucas Thode wrote: > @thin is an option, yes...although I might be turning my colleagues on to > Leo. :) It might also be that I have no colleagues because the rest of the > people in the group are all busy with other projects. If you have the opportunity to "work in piece" for a while, you can start with @thin and move to @auto / @shadow later when your colleagues start complaining ;-). >> 1. Commit the public files only. > > This is what I have so far. Would I want to commit the .leo file as well in > this case? Yes. Having the .leo file in version control hurts noone, as long as others don't start modifying it extensively. -- Ville M. Vainio http://tinyurl.com/vainio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Mon, Jun 22, 2009 at 2:10 AM, Edward K. Ream wrote: > > > On Sun, Jun 21, 2009 at 9:40 PM, Lucas Thode wrote: > >> Hey all, >> >> I'm putting a fairly new project that's using Leo (@shadow trees) under >> version control (SVN) for the first time. I've already put the derived >> files under VC, so what else do I need to check in? The .leo file? the >> .leo_shadow stuff? Nothing? > > > If you can use @thin trees for sharing, do so. This is by far the best > provided that your colleagues don't mind looking at Leo's sentinels. > Otherwise, you have two main options: > @thin is an option, yes...although I might be turning my colleagues on to Leo. :) It might also be that I have no colleagues because the rest of the people in the group are all busy with other projects. > > > 1. Commit the public files only. > This is what I have so far. Would I want to commit the .leo file as well in this case? > > > 2. Use @auto. > > HTH. > > BTW, I plan a new faq entry to discuss various aspects of sharing external > (derived) files. > Good idea. > > > Edward > > > > > --Lucas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
On Sun, Jun 21, 2009 at 9:40 PM, Lucas Thode wrote: > Hey all, > > I'm putting a fairly new project that's using Leo (@shadow trees) under > version control (SVN) for the first time. I've already put the derived > files under VC, so what else do I need to check in? The .leo file? the > .leo_shadow stuff? Nothing? If you can use @thin trees for sharing, do so. This is by far the best provided that your colleagues don't mind looking at Leo's sentinels. Otherwise, you have two main options: 1. Commit the public files only. 2. Use @auto. HTH. BTW, I plan a new faq entry to discuss various aspects of sharing external (derived) files. Edward --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: @shadow and what should I put under version control
Lucas, I recommend using @thin trees. You need to have the .leo_shadow directories under version control, and could ignore the actual shadow files if you like (leo will load the file in the .leo_shadow directory to recreate the shadow file when needed). I found @shadow files duplicate the size of the repo, and that @thin were easier. Mike Lucas Thode wrote: > Hey all, > > I'm putting a fairly new project that's using Leo (@shadow trees) > under version control (SVN) for the first time. I've already put the > derived files under VC, so what else do I need to check in? The .leo > file? the .leo_shadow stuff? Nothing? > > --Lucas > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
@shadow and what should I put under version control
Hey all, I'm putting a fairly new project that's using Leo (@shadow trees) under version control (SVN) for the first time. I've already put the derived files under VC, so what else do I need to check in? The .leo file? the .leo_shadow stuff? Nothing? --Lucas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---