summaryrefslogtreecommitdiffstats
path: root/tools/scripts/git_submodule.py
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-07-02 11:34:47 +0200
committerAndras Becsi <andras.becsi@digia.com>2014-07-03 13:14:44 +0200
commitd8245424b814591a4fbc4115c1fabe0a34479bb3 (patch)
treeeec90dda1799b2631f0d99f2c51a2b974c89ac38 /tools/scripts/git_submodule.py
parent5317069f3d0d27ed6192a41b3f7b7e6b74dfbbed (diff)
tools: add reset option to patch_upstream.py
This patch makes it possible to reset the upstream chromium repository to its baseline state. Change-Id: Idff94a0f873e994716f77c83f4c5b79bcd48aec5 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'tools/scripts/git_submodule.py')
-rw-r--r--tools/scripts/git_submodule.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/scripts/git_submodule.py b/tools/scripts/git_submodule.py
index 48913cb7..0505d2ca 100644
--- a/tools/scripts/git_submodule.py
+++ b/tools/scripts/git_submodule.py
@@ -220,6 +220,7 @@ class Submodule:
def initialize(self):
if self.matchesOS():
print '-- initializing ' + self.path + ' --'
+ oldCwd = os.getcwd()
if os.path.isdir(self.path):
self.reset()
@@ -231,6 +232,11 @@ class Submodule:
if self.findShaAndCheckout() != 0:
sys.exit("!!! initialization failed !!!")
+
+ os.chdir(self.path)
+ commit = subprocessCheckOutput(['git', 'rev-list', '--max-count=1', 'HEAD'])
+ subprocessCall(['git', 'commit', '-a', '--allow-empty', '-m', '-- QtWebEngine baseline --\n\ncommit ' + commit])
+ os.chdir(oldCwd)
else:
print '-- skipping ' + self.path + ' for this operating system. --'
@@ -291,5 +297,5 @@ class Submodule:
for submodule in submodules:
submodule.initialize()
if self.ref:
- subprocessCall(['git', 'commit', '-a', '-m', 'initialize submodules'])
+ subprocessCall(['git', 'commit', '-a', '--amend', '--no-edit'])
os.chdir(oldCwd)