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 --pretty="%h %s" $prev_hash..$hash)" | 76 pretty_git_log="$(git log --no-merges --topo-order --pretty="%h %s" $prev_hash ..$hash)" |
Tom Finegan
2014/09/09 20:09:10
This should be wrapped.
| |
77 if [ -z "$pretty_git_log" ]; then | 77 if [ -z "$pretty_git_log" ]; then |
78 echo "No log found. Checking for reverts." | 78 echo "No log found. Checking for reverts." |
79 pretty_git_log="$(git log --no-merges --pretty="%h %s" $hash..$prev_hash)" | 79 pretty_git_log="$(git log --no-merges --topo-order --pretty="%h %s" $hash..$ prev_hash)" |
80 fi | 80 fi |
Tom Finegan
2014/09/09 20:09:10
here too
| |
81 echo "$pretty_git_log" | 81 echo "$pretty_git_log" |
82 fi | 82 fi |
83 | 83 |
84 # Git is useless now, remove the local git repo. | 84 # Git is useless now, remove the local git repo. |
85 rm -rf .git | 85 rm -rf .git |
86 | 86 |
87 # Update SVN with the added and deleted files. | 87 # Update SVN with the added and deleted files. |
88 echo "$add" | xargs -I {} svn add --parents {} | 88 echo "$add" | xargs -I {} svn add --parents {} |
89 echo "$delete" | xargs -I {} svn rm {} | 89 echo "$delete" | xargs -I {} svn rm {} |
90 | 90 |
91 # Find empty directories and remove them from SVN. | 91 # Find empty directories and remove them from SVN. |
92 find . -type d -empty -not -iwholename '*.svn*' -exec svn rm {} \; | 92 find . -type d -empty -not -iwholename '*.svn*' -exec svn rm {} \; |
93 | 93 |
94 chmod 755 build/make/*.sh build/make/*.pl configure | 94 chmod 755 build/make/*.sh build/make/*.pl configure |
95 | 95 |
96 cd $BASE_DIR | 96 cd $BASE_DIR |
OLD | NEW |