[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Update pre-commit hook to find checkIncludes in its new location
commit 9abbde2c244f40fcf06c34cd72c360a9770fcd7c
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Mon Aug 5 14:11:51 2019 -0400
Update pre-commit hook to find checkIncludes in its new location
Also add a temporary script to redirect the hook, if people don't
upgrade for a bit.
---
scripts/git/pre-commit.git-hook | 4 ++--
scripts/maint/checkIncludes.py | 14 ++++++++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/scripts/git/pre-commit.git-hook b/scripts/git/pre-commit.git-hook
index 2a2983719..7c7cf8857 100755
--- a/scripts/git/pre-commit.git-hook
+++ b/scripts/git/pre-commit.git-hook
@@ -36,8 +36,8 @@ elif [ -d src/common ]; then
src/tools/*.[ch]
fi
-if test -e scripts/maint/checkIncludes.py; then
- python scripts/maint/checkIncludes.py
+if test -e scripts/maint/practracker/includes.py; then
+ python scripts/maint/practracker/includes.py
fi
if [ -e scripts/maint/practracker/practracker.py ]; then
diff --git a/scripts/maint/checkIncludes.py b/scripts/maint/checkIncludes.py
new file mode 100755
index 000000000..926b201b3
--- /dev/null
+++ b/scripts/maint/checkIncludes.py
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+# Copyright 2018 The Tor Project, Inc. See LICENSE file for licensing info.
+
+# This file is no longer here; see practracker/includes.py for this
+# functionality. This is a stub file that exists so that older git
+# hooks will know where to look.
+
+import sys, os
+
+dirname = os.path.split(sys.argv[0])[0]
+new_location = os.path.join(dirname, "practracker", "includes.py")
+python = sys.executable
+
+os.execl(python, python, new_location, *sys.argv[1:])
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits