diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-01-31 16:27:44 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-03 17:50:35 +0100 |
commit | ecaab295f96e3d12fc952c49d35a6eb32f72aba1 (patch) | |
tree | 0274229243a57462c2a24f4162b597235ce9b755 /patches/chromium/tools/grit/0001-GRIT-Allow-grd-files-outside-of-chromium-source-dir.patch | |
parent | a4b0e2183c23c0173167833c75f0e2970f3ab524 (diff) |
Make it easier to update patches and apply them manually
Clean the way that we maintain patches by keeping them ordered by
their number and let the shell order them when giving the list to
git am.
Provide a update-patches.sh that maintains the proper command lines
to use and run a cleaning script on the resulting patch to avoid
the SHA1 to be added to the file as it changes every time the patch
is applied.
Change-Id: Ia93cf4b35f5f847a8723a31fc476443864242737
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'patches/chromium/tools/grit/0001-GRIT-Allow-grd-files-outside-of-chromium-source-dir.patch')
-rw-r--r-- | patches/chromium/tools/grit/0001-GRIT-Allow-grd-files-outside-of-chromium-source-dir.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/patches/chromium/tools/grit/0001-GRIT-Allow-grd-files-outside-of-chromium-source-dir.patch b/patches/chromium/tools/grit/0001-GRIT-Allow-grd-files-outside-of-chromium-source-dir.patch new file mode 100644 index 000000000..9da214cc2 --- /dev/null +++ b/patches/chromium/tools/grit/0001-GRIT-Allow-grd-files-outside-of-chromium-source-dir.patch @@ -0,0 +1,43 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zeno Albisser <zeno.albisser@digia.com> +Date: Wed, 24 Jul 2013 15:54:50 +0200 +Subject: GRIT: Allow grd files outside of chromium source dir. + +When replacing substrings with values from a dictionary, +the replacements should not be truncated to the length of src_root_dir. + +If the basename does not exist as a key in the resource_ids file, +then fall back to an absolute path. + +The precedence is like: +file in chromium > file basename > absolute file name. + +THIS SHOULD BE UPSTREAMABLE. +--- + grit/node/misc.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/grit/node/misc.py b/grit/node/misc.py +index 734c57a..33848b2 100755 +--- a/grit/node/misc.py ++++ b/grit/node/misc.py +@@ -49,7 +49,7 @@ def _ReadFirstIdsFromFile(filename, defines): + def ReplaceVariable(matchobj): + for key, value in defines.iteritems(): + if matchobj.group(1) == key: +- value = os.path.abspath(value)[len(src_root_dir) + 1:] ++ value = os.path.abspath(value) + return value + return '' + +@@ -427,6 +427,10 @@ class GritNode(base.Node): + abs_filename = os.path.abspath(filename_or_stream) + if abs_filename[:len(src_root_dir)] != src_root_dir: + filename = os.path.basename(filename_or_stream) ++ # If the file is not within src_root_dir and the basename is not ++ # found as a key, fall back to using the absolute file name. ++ if not filename in first_ids: ++ filename = abs_filename + else: + filename = abs_filename[len(src_root_dir) + 1:] + filename = filename.replace('\\', '/') |