OLD | NEW |
1 #!/bin/bash -e | 1 #!/bin/bash -e |
2 # | 2 # |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This tool is used to update libvpx source code with the latest git | 7 # This tool is used to update libvpx source code with the latest git |
8 # repository. | 8 # repository. |
9 # | 9 # |
10 # Make sure you run this in a svn checkout of deps/third_party/libvpx! | 10 # Make sure you run this in a svn checkout of deps/third_party/libvpx! |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 # Switch the content to the latest git repo. | 66 # Switch the content to the latest git repo. |
67 git checkout -b tot $GIT_BRANCH | 67 git checkout -b tot $GIT_BRANCH |
68 | 68 |
69 # Output the current commit hash. | 69 # Output the current commit hash. |
70 hash=$(git log -1 --format="%H") | 70 hash=$(git log -1 --format="%H") |
71 echo "Current HEAD: $hash" | 71 echo "Current HEAD: $hash" |
72 | 72 |
73 # Output log for upstream from current hash. | 73 # Output log for upstream from current hash. |
74 if [ -n "$prev_hash" ]; then | 74 if [ -n "$prev_hash" ]; then |
75 echo "git log from upstream:" | 75 echo "git log from upstream:" |
76 pretty_git_log="$(git log --no-merges --topo-order --pretty="%h %s" $prev_hash
..$hash)" | 76 pretty_git_log="$(git log \ |
| 77 --no-merges \ |
| 78 --topo-order \ |
| 79 --pretty="%h %s" \ |
| 80 $prev_hash..$hash)" |
77 if [ -z "$pretty_git_log" ]; then | 81 if [ -z "$pretty_git_log" ]; then |
78 echo "No log found. Checking for reverts." | 82 echo "No log found. Checking for reverts." |
79 pretty_git_log="$(git log --no-merges --topo-order --pretty="%h %s" $hash..$
prev_hash)" | 83 pretty_git_log="$(git log \ |
| 84 --no-merges \ |
| 85 --topo-order \ |
| 86 --pretty="%h %s" \ |
| 87 $hash..$prev_hash)" |
80 fi | 88 fi |
81 echo "$pretty_git_log" | 89 echo "$pretty_git_log" |
82 fi | 90 fi |
83 | 91 |
84 # Git is useless now, remove the local git repo. | 92 # Git is useless now, remove the local git repo. |
85 rm -rf .git | 93 rm -rf .git |
86 | 94 |
87 # Update SVN with the added and deleted files. | 95 # Update SVN with the added and deleted files. |
88 echo "$add" | xargs -I {} svn add --parents {} | 96 echo "$add" | xargs -I {} svn add --parents {} |
89 echo "$delete" | xargs -I {} svn rm {} | 97 echo "$delete" | xargs -I {} svn rm {} |
90 | 98 |
91 # Find empty directories and remove them from SVN. | 99 # Find empty directories and remove them from SVN. |
92 find . -type d -empty -not -iwholename '*.svn*' -exec svn rm {} \; | 100 find . -type d -empty -not -iwholename '*.svn*' -exec svn rm {} \; |
93 | 101 |
94 chmod 755 build/make/*.sh build/make/*.pl configure | 102 chmod 755 build/make/*.sh build/make/*.pl configure |
95 | 103 |
96 cd $BASE_DIR | 104 cd $BASE_DIR |
OLD | NEW |