cyaninc/git-fat — pull request #31 by CzarekTomczak (2014-12-24 17:59:24+00:00)
Title: Support for Windows.

Fixed issues with logging. The test_git_fat_no_dotgitfat test was
failing. Also there were problems with seeing log messages on
Windows. Always use logger.xxx() functions instead of the
logging.xxx().

Improvements to logging. Introduced the GIT_FAT_LOG_LEVEL and
GIT_FAT_LOG_FILE environment variables to ease debugging. Also
improved error detection in unit tests. Some of the errors may
be thrown by sub-subprocesses and the only way to catch them
is to check the log file for errors. This will catch problems
like the one reported in Issue #30.

Fixed 'Permission denied' issues when moving or deleting
files on Windows. Always use the new functions move_file() and
delete_file() when renaming or deleting file. In unit tests
also fixed a 'Access is denied' issue when deleting the temp
git repository directory.

On Linux files are opened in binary mode by default. But on Windows
the text mode is the default. Always specify "rb" or "wb" mode
when opening files for reading/writing. Additionaly it was also
required to change mode to binary for sys.stdin and sys.stdout.

On Windows rsync/awk tools are not available. It is required
to ship these tools. It is also required to ship a custom ssh
executable that works with rsync. These dependencies are
included in the Python Wheel binary package. Use the
win32/setup_wheel.bat to create a .whl package. This package
can be be uploaded to PyPI so that the pip package manager
can be used to install git-fat on Windows.

Fixed issues with deleting files that had been previously opened
for reading (and not closed). On Linux such code works fine, but
on Windows it throws exceptions. Avoid code such as this:

with open(fname) as f:
if get_digest(fname):
delete_file(fname)

Fixed error when executing command "git fat". A help should appear,
but instead an error was thrown.

Fixed issue when git init.templatedir option is set (Issue #30).
Before running each test this option is unset and restored after
the test was completed.

The FileTypeTestCase.test_symlink_74bytes() won't be run on
Windows, as symbolic links are not supported by git on Windows.

Fixed issue with temp files not being deleted in the
GeneralTestCase.test_index_filter() test.