Steve Borho wrote, On 04/15/2009 04:57 AM:
The approach I would like to end up with has three tiers:

I will ask some stupid questions to test how serious you are about the design you propose. Not because I strongly disagree, but in order to see if we can improve on it.

1) In a clean checkout / tarball, the default paths should all just work

That could be by having a very simple paths.py checked in, which declares paths relative to __file__?

2) For frozen builds, there should be special case code that uses relative paths

The freezing is done by a build script. Why can't it overwrite paths.py like other build scripts should? The build script knows where icons are relative to hgtk.exe, but it vould be a layering violation if hgtk.py know where the build script puts the icons.

Having all this logic in one place so it's only done once is a bonus, and
symlinks to hgtk and nautilus-thg.py should just work without touching
the source code.

Shared between hgtk and nautilus-thg? AFAICS they do not share any other code? One of them calls the other, but they don't need to be tightly integrated. I think it is just fine that they are separate tools focusing on being good at different tasks.

I would prefer the paths file to use functions, just in case a packager
needs to include search logic in there.

The search logic would have to be run on _every_ invocation of the binary anyway. If it is put in a function then we might have to cache the result anyway. So why can't the packager just put the search logic in the top level code of paths.py? (With the frozen-handling being one example of that.) And I think it is nice that paths.py in the simple case is declarative configuration in python syntax, so that it can scale to also handle more complex cases.

/Mads

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to