sphinx-doc / sphinx-autobuild

Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a hot-reload web server.
MIT License
524 stars 75 forks source link

Build fires five times for after saving a file #25

Closed montefra closed 8 years ago

montefra commented 9 years ago

Somehow following #24. When I save a file, the sphinx is run 5 times, but only the first one does something. Is this to be expected?

This is what is printed on screen:

+--------- source/4913 changed --------------------------------------------------
| Running Sphinx v1.2.3
| loading pickled environment... done
| building [html]: targets for 1 source files that are out of date
| updating environment: 0 added, 1 changed, 0 removed
| reading sources... [100%] contributions
| 
| looking for now-outdated files... none found
| pickling environment... done
| checking consistency... done
| preparing documents... done
| writing output... [ 50%] contributions
| writing output... [100%] index
| 
| writing additional files... (2 module code pages) _modules/index genindex py-modindex search
| copying static files... done
| copying extra files... done
| dumping search index... done
| dumping object inventory... done
| build succeeded.
+--------------------------------------------------------------------------------

+--------- source/4913 changed --------------------------------------------------
| Running Sphinx v1.2.3
| loading pickled environment... done
| building [html]: targets for 0 source files that are out of date
| updating environment: 0 added, 0 changed, 0 removed
| looking for now-outdated files... none found
| no targets are out of date.
+--------------------------------------------------------------------------------

+--------- source/4913 changed --------------------------------------------------
| Running Sphinx v1.2.3
| loading pickled environment... done
| building [html]: targets for 0 source files that are out of date
| updating environment: 0 added, 0 changed, 0 removed
| looking for now-outdated files... none found
| no targets are out of date.
+--------------------------------------------------------------------------------

+--------- source/contributions.rst changed -------------------------------------
| Running Sphinx v1.2.3
| loading pickled environment... done
| building [html]: targets for 0 source files that are out of date
| updating environment: 0 added, 0 changed, 0 removed
| looking for now-outdated files... none found
| no targets are out of date.
+--------------------------------------------------------------------------------

+--------- source/contributions.rst changed -------------------------------------
| Running Sphinx v1.2.3
| loading pickled environment... done
| building [html]: targets for 0 source files that are out of date
| updating environment: 0 added, 0 changed, 0 removed
| looking for now-outdated files... none found
| no targets are out of date.
+--------------------------------------------------------------------------------

[I 150306 16:22:10 handlers:62] Ignore: source/contributions.rst
mikanbako commented 9 years ago

I encountered the same problem, too.

Vim creates file named "4913" when the editing file saves for backup. The file named "4913" is actually the file that renamed the editing file. So sphinx-autobuild will build "4913". See https://bugzilla.redhat.com/show_bug.cgi?id=427711 for detail.

To resolve this issue, please try to set "backupcopy" option of Vim to "yes".

montefra commented 9 years ago

I'll test it. Thank for the info