summaryrefslogtreecommitdiffstats
path: root/tools/scripts/git_submodule.py
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-07-17 17:03:39 +0200
committerAndras Becsi <andras.becsi@digia.com>2014-07-18 10:19:19 +0200
commit4a0b046fc87a60bbbb037125a2eb31ae3548d34d (patch)
tree0ceef8bbd6f246931edf3be854d0fc5e5a8d4a59 /tools/scripts/git_submodule.py
parent8a19129da13ac4a0da49fd9e5317631b7f40d896 (diff)
init-repository: pass regexp in raw string to git log --grep
This prevents python from escaping the special characters that resulted in git not finding the proper shasum for the git-svn-id regular expression line. Change-Id: Ic5449db6319b638cf692d2b4427ce5de7cbac66e Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Adam Kallai <kadam@inf.u-szeged.hu>
Diffstat (limited to 'tools/scripts/git_submodule.py')
-rw-r--r--tools/scripts/git_submodule.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/scripts/git_submodule.py b/tools/scripts/git_submodule.py
index fa5e9691..5376e877 100644
--- a/tools/scripts/git_submodule.py
+++ b/tools/scripts/git_submodule.py
@@ -171,8 +171,8 @@ class Submodule:
error = subprocessCall(['git', 'checkout', 'FETCH_HEAD']);
if self.revision:
- search_string = '\"git-svn-id: .*@' + str(self.revision) + '\"'
- line = subprocessCheckOutput(['git', 'log', '-n1', '--pretty=oneline', '--grep=' + search_string])
+ search_string = 'git-svn-id:.*@%d' % self.revision
+ line = subprocessCheckOutput(['git', 'log', '-n1', '--pretty=oneline', r'--grep=%s' % search_string])
if line:
self.shasum = line.split()[0]