Bug 1274531 - replace backslashes in path to slashes; r?gps
MozReview-Commit-ID: FOjpFPOev73
--- a/git/commands/git-mozreview
+++ b/git/commands/git-mozreview
@@ -650,18 +650,18 @@ def configure_command(args):
install_hook = True
with open(source_hook, 'rb') as fh:
source_content = fh.read()
# Not all environments invoke `git` with the user's custom PATH. e.g.
# Xcode. To avoid issues where the environment does have the PATH
# set properly, encode the full path to `git-mozreview` in the hook.
- source_content = re.sub('^git mozreview', __file__, source_content,
- flags=re.MULTILINE)
+ source_content = re.sub('^git mozreview', __file__.replace('\\', '/'),
+ source_content, flags=re.MULTILINE)
if os.path.exists(dest_hook):
with open(dest_hook, 'rb') as fh:
dest_content = fh.read()
if 'MozReview' not in dest_content:
ui.warn('warning: existing commit-msg hook does not appear related '
'to MozReview; unable to install custom hook\n')
ui.warn('(MozReview may lose track of commits when rewriting)\n')