Sphinx uses os.path.getmtime to retrieve a file's 'last modified' time and 
checks that against a cached mtime in the pickled environment to determine 
if a file has changed: touch(1) will affect the mtime of a file, unless 
specifically told not to. I don't know how git behaves with files that 
remain unchanged across git branches, but I wouldn't be surprised if both 
the atime and mtime of files get changed.

Another possibility -- if you use globbing in toctree directives, it seems 
from the source that this can cause Sphinx to re-read files containing 
those directives (and presumably the documents that match against the 
globbed expressions in them). This probably won't prompt a re-read of your 
config, but it might prompt a wider rebuild of documents.

The most likely cause, I suspect, is that somewhere/how the mtime of your 
config is is getting touched and modified from the one stored in the 
pickled env.

I don't /know/ this for certain, but this is what occurs to me after 
looking at the sources for 15 minutes or so.

v.

On Wednesday, 25 April 2012 16:43:34 UTC-4, tycho garen wrote:
>
> I suspect that what's happening is that a changed environment variable 
> confuses Sphinx into thinking that the config has changed and/o*or* that 
> when 
> the file is touched (as in the case when changing the git branch,) it 
> thinks that the config has changed, when in fact it has not. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sphinx-dev/-/wUZ3l8wCqQoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to