getnikola/nikola — pull request #1306 by ccanepa (2014-05-26 05:32:50+00:00)
Title: rought concept in fixing symlinks in windows

# Don't merge

As we know, symlinks are a problem in Windows.

In Nikola 7.0 and later checkouts of master there are more symlinks than near the 6.4 version, and the fix used there ( follow certain directory copies with a call to winutils.fix_git_symlinked ) is not directly applicable now, because some of the files are copied one by one trough tasks (copy_assets.py)

A fix that works when **installing** Nikola is demonstrated in this PR; it overwrites the files with wrong content with the correct one at installation time. Pay no attention to debug prints, it is a draft.

Tested in py 2.7, the demo site looks ok. Works with a nikola clone or a .zip download from github.

A problem with this simple approach is that after running the install the working copy is seen as dirty in git.
A possible workaround I see suggested [0] for this would be to not track (locally) the dst for those symlinks. It is late, so I have not evaluated how feasible this can be.

For maintenance, it would be better to periodically regenerate the list of files that need fixing and store under nikola/data/something.

Before committing more time to this I wanted to ask if anyone sees a clever way to deal with that, or even if the entire issue is of interest.

[0] http://stackoverflow.com/questions/5917249/git-symlinks-in-windows