DescriptionFix hook disable logic in gclient_scm (non-atomic os.rename on Windows)
crrev.com/348703002 has introduced some code into gclient_scm.py which
disables the .git/hooks when gclient is running in managed mode.
The disabling logic renames the individual hook files to hook.disabled
using os.rename. Conversely to what happen on Posix OSs, on Windows
os.rename does not have atomic rename semantics [1] and it fails if the
destination file already exists.
This change improves the hook disable logic.
[1] See https://bugs.python.org/issue8828 and os.replace in Python 3
BUG=474218
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=294715
Patch Set 1 #
Messages
Total messages: 13 (5 generated)
|