On Dec 3, 11:39 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > There are two problems. Consider the errors folder. README.txt would > > > show up in the admin error page. > > > Then find a way to do it - change so that errors does not show either > > README or anything that has the pattern '__.*__'; > > I do not like the idea that I have to modify the code to use > mercurial. > It tells me there is a major design flaw in mercurial. An empty folder > should be treated as a file.
In UNIX historyically a directory is just a file (everything in UNIX is a file - one of unix's breakthroughs) - but you cannot assume that in general for different operating systems. It is a stronger argument to state there is a design improvement in web2py ("flaw" is a loaded term, wanting hard objective evidence). Web2py could be more robust, perform gracefully when needed empty directories are missing: consider problems people have had when they have DELETED errors or database directories in an attempt to restart their applications after bugs - web2py could help here. This (benefits beyond SCM handling) is evidence that this is both desirable, and a responsibility that belongs with web2py. Consider (in general) a module that depends on an empty directory, what does it do when it doesn't have what it expects? What should it do? Throw up it's hands and give up? Make the needed empty directory? Call a utility to handle this? I suggest that web2py will improve by updating it to create missing empty application directories. NOTE: Historically, none of the early versioning systems versioned directories. Perhaps the first was HP when they bought Apollo workstations, and adapted their build systems - which resulted in "ClearCase" (I recall around 1995). SVN later (2000) added directory handling - this is a relatively new thing, and arguable about benefit vs. additional complexity it adds. In fact, file renames, file and directory moves do not correlate well with "directories being first class versioned objects" -- see http://better-scm.berlios.de/comparison/comparison.html#move (and http://en.wikipedia.org/wiki/Comparison_of_revision_control_software). I think it is important to present an objective analysis - suggesting this is a mercurial defect must then lump this as a purported defect of all but about 3 or 4 (?) out of dozens of SCM systems, and of those I think only one is open source. Clearly, this opinion does is not supported by objective data (evidence, arguments). A general approach towards robustness is what is interesting here We are discussing code-level responsibility for ensuring empty directory existence which would [1] eliminate any dependency on SCM versioning, AND [2] ease user operation and development time - "clean recovery". It would be incredibly simple to make web2py more robust and friendly. This topic (empty directories) in and of itself is a small, relatively unimportant point; the general design approach of reducing dependence systematically (decoupling) and focusing on robustness is interesting. > > > It will not break backward compatibility - there are always ways to do > > this, if you want to. > > > > Consider the uploads page. How do I > > > hgingore everything BUT README.txt? > > >http://www.selenic.com/mercurial/hgignore.5.html: > > > I'm not sure how to negate a whole pattern (except for the ugly > > sequence of character class things); if you can't find something > > better, this should do it: > > > ^[^R][^E][^A][^D][^M][^E]$ > > No. this would not exclude every other file by README. You are correct - I guessed; here is what DOES work: syntax: regexp ^(?!README$) This will match "beginning of line" only if it is not followed by "README"+END-OF-LINE; this will match any file (e.g. hg will ignore) except README. > > Anyway, I am trying mercurial right now and posted a project on google > hg: > > http://code.google.com/p/pythonisosurfaces/ > > So far Cons: > 1) the empty folders (they are not version controller) Not a CON: a gift pointing out how to make web2py more generally robust / friendly. > 2) the security model (it assigns me a password instead of letting me > register a public key as in launchpad). Not sure what you are talking about here (hg does not assign you a password; is this something google code is doing? what happens if you use an SSL connection, e.g. https://..... ?) > Pros: > 1) It is faster than lauchpad incredibly faster.... several orders of magnitude... - Yarko -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.