Hi Richard,

> If a global config setting for autosync is not present when fossil new
> is issued, line 1009 of db.c will set autosync to 1 in the local 
config.

> "if( !db_is_global("autosync") ) db_set_int("autosync", 1, 0);"

What's the reason behind this?

- Altu

-----Original Message-----
From: James Turner <[email protected]>
To: [email protected]
Sent: Thu, Nov 4, 2010 8:27 pm
Subject: Re: [fossil-users] Question about global settings

On Thu, Nov 04, 2010 at 04:33:51AM +0100, chi wrote:
> James Turner wrote:
>
> > Quick question, if I have autosync set to off globally but the
> > repository has it set to on...who wins?
>
> If there is no locally defined setting, it takes the global one. If
> there is a local setting defined, it will beats the global one.
>

Yeah, this makes perfect sense now that I think about it. Local should
always win over global if present.

>
> > From what I see the repository wins, so what does setting it
> > globally get you?
>
> That you have not to set it for every new created repository 
explictly.
> Only if it divert from your global policy.
>
> For me for instance: autosync, localauth and editor are set globally
> only. Only for a few reository, I did change one or another setting 
locally.
>

Let me try to explain the problem a little better...

If a global config setting for autosync is not present when fossil new
is issued, line 1009 of db.c will set autosync to 1 in the local config.

"if( !db_is_global("autosync") ) db_set_int("autosync", 1, 0);"

If I later want to set autosync to 0 globally, any previously created
repository has to be manually changed since a local setting is present.
If I create a new repository after globally setting autosync, autosync
is not set in the local config per line 1009.

My question is why is autosync and also localauth explicitly set in the
local repository upon creation? Couldn't they be treated like the other
settings and just have some default in the code base that gets used if
locally or globally they are not set?

Hopefully this will clear things up.

> Ciao,
> chi.
>
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to