Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Issue 1063973002: Fix hook disable logic in gclient_scm (non-atomic os.rename on Windows) (Closed)

Created:
5 years, 8 months ago by Primiano Tucci (use gerrit)
Modified:
5 years, 8 months ago
CC:
chromium-reviews, dpranke+depot_tools_chromium.org, iannucci+depot_tools_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Target Ref:
refs/heads/master
Project:
tools
Visibility:
Public.

Description

Fix 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M gclient_scm.py View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
Primiano Tucci (use gerrit)
5 years, 8 months ago (2015-04-07 09:09:53 UTC) #2
Nico
lgtm
5 years, 8 months ago (2015-04-07 16:56:56 UTC) #3
szager1
lgtm
5 years, 8 months ago (2015-04-07 17:37:50 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1063973002/1
5 years, 8 months ago (2015-04-08 07:48:52 UTC) #6
commit-bot: I haz the power
Presubmit check for 1063973002-1 failed and returned exit status 1. Running presubmit commit checks ...
5 years, 8 months ago (2015-04-08 07:52:00 UTC) #8
jochen (gone - plz use gerrit)
lgtm
5 years, 8 months ago (2015-04-08 09:02:52 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1063973002/1
5 years, 8 months ago (2015-04-08 09:11:41 UTC) #12
commit-bot: I haz the power
5 years, 8 months ago (2015-04-08 09:14:50 UTC) #13
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
http://src.chromium.org/viewvc/chrome?view=rev&revision=294715

Powered by Google App Engine
This is Rietveld 408576698