Skip to content

Instantly share code, notes, and snippets.

@patux
Created February 8, 2013 23:46
Show Gist options
  • Save patux/4742920 to your computer and use it in GitHub Desktop.
Save patux/4742920 to your computer and use it in GitHub Desktop.
Media Wiki git-review patch for windows
index 0275f47..335f304 100644
--- "a/C:\\Python26\\Scripts\\git-review"
+++ "b/C:\\Python26\\Scripts\\git-review"
@@ -134,7 +134,10 @@ def set_hooks_commit_msg(remote, target_file):
scp_cmd += hostname
else:
scp_cmd += "%s@%s" % (username, hostname)
- scp_cmd += ":hooks/commit-msg %s" % target_file
+ # msysgit hacks to work around scp.exe (--aaron)
+ rel_target_path = str.replace( ".\%s" % os.path.relpath( target_file ), "\\", "/" )
+ scp_cmd += ":hooks/commit-msg %s" % rel_target_path
+ # end hackery
(status, scp_output) = run_command_status(scp_cmd)
if status != 0:
print "Problems encountered installing commit-msg hook"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment