default .smug file

2 views
Skip to first unread message

Jeff Anderson

unread,
Jun 12, 2009, 6:40:57 PM6/12/09
to smug...@googlegroups.com
In keeping with the .htaccess analogy, you can now create the equivalent
with an httpd.conf. simply put .smug directives into
settings.SMUG_DOTSMUG, and it will act as the site-wide master .smug
file. You can now serve repositories with no trace of a .smug file at
all.

I don't particularly like the setting name I chose, but I couldn't think
of anything better at the time.

This is a site-wide configuration settion, so if you are using multiple
repos, it will affect them all. This could be extended to be per-repo if
we make this a dictionary, but I think that's a bit much.

This patch even comes with documentation!


Thanks!

Jeff Anderson

dotsmug_defaults.diff

Andrew McNabb

unread,
Jun 12, 2009, 6:49:12 PM6/12/09
to smug...@googlegroups.com
On Fri, Jun 12, 2009 at 04:40:57PM -0600, Jeff Anderson wrote:
> In keeping with the .htaccess analogy, you can now create the equivalent
> with an httpd.conf. simply put .smug directives into
> settings.SMUG_DOTSMUG, and it will act as the site-wide master .smug
> file. You can now serve repositories with no trace of a .smug file at
> all.

You've convinced me that this is a good feature to have. I'll look at
the specifics in the next day or two.


> This is a site-wide configuration settion, so if you are using multiple
> repos, it will affect them all. This could be extended to be per-repo if
> we make this a dictionary, but I think that's a bit much.

I can see a definite benefit in making it per-repo, but I'll have to
think about the use cases a little more. James, do you have any
thoughts?


> This patch even comes with documentation!

That's what I like to hear. :)


--
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868

Andrew McNabb

unread,
Jul 4, 2009, 9:29:38 PM7/4/09
to smug...@googlegroups.com
On Fri, Jun 12, 2009 at 04:40:57PM -0600, Jeff Anderson wrote:
> In keeping with the .htaccess analogy, you can now create the equivalent
> with an httpd.conf. simply put .smug directives into
> settings.SMUG_DOTSMUG, and it will act as the site-wide master .smug
> file. You can now serve repositories with no trace of a .smug file at
> all.

I've had this floating around in my mind for a while, and it seems to me
that there should be some support for doing more advanced configuration
in the site-wide file. I like the .htaccess analogy, so I'll use that
as an example. The site-wide Apache configuration file isn't the same
as just having a .htaccess in the root directory of your system. With
the Location directive, the Apache configuration file can specify
different settings for different directories. It seems like a site-wide
Smug config would be more useful if it could specify changes at
different directories. What do you think?

James Carroll

unread,
Jul 5, 2009, 8:33:47 AM7/5/09
to smug...@googlegroups.com
That seems like it would be more complex, without adding any real
power, since any such changes could also be made with a local .smug
file yes?

James
--
"And very early in the morning
the first day of the week,
they came unto the sepulchre
at the rising of the sun..." (Mark 16:2)

Web: http://james.jlcarroll.net

Jeff Anderson

unread,
Jul 9, 2009, 2:04:35 AM7/9/09
to smug...@googlegroups.com
Andrew McNabb wrote:
> On Fri, Jun 12, 2009 at 04:40:57PM -0600, Jeff Anderson wrote:
>
>> In keeping with the .htaccess analogy, you can now create the equivalent
>> with an httpd.conf. simply put .smug directives into
>> settings.SMUG_DOTSMUG, and it will act as the site-wide master .smug
>> file. You can now serve repositories with no trace of a .smug file at
>> all.
>>
> I've had this floating around in my mind for a while, and it seems to me
> that there should be some support for doing more advanced configuration
> in the site-wide file. I like the .htaccess analogy, so I'll use that
> as an example. The site-wide Apache configuration file isn't the same
> as just having a .htaccess in the root directory of your system. With
> the Location directive, the Apache configuration file can specify
> different settings for different directories. It seems like a site-wide
> Smug config would be more useful if it could specify changes at
> different directories. What do you think
I'm in favor of having way of making a per-repo default in the config
file. Anything more granular than per repo should go in a .smug file.

With that said, I'd rather have a limit of site-wide defaults rather
than have a messy or awkward way of defining defaults per repo.

Also, if support for per-repo defaults is included, it should not push
out having a site-wide configuration. I'd like to have the directory
index be index.html for all my pages, no matter what repo they are in. I
should only have to define that once, and then only put changes in my
per-repo config.

The method that comes to mind is to use a string for site wide, and a
dict for per-repo. It might look something like:

DOTSMUG_DEFAULT = ""
DOTSMUG['repoone']=""
DOTSMUG['repotwo']=""


Jeff Anderson

signature.asc
Reply all
Reply to author
Forward
0 new messages