Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: tools/git_clone_to_google3.sh

Issue 1295213002: Revert of Fix a few bugs in the google3 sync scripts. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/sync_google3.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright 2014 Google Inc. 2 # Copyright 2014 Google Inc.
3 # 3 #
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 # Crude script to clone the git skia repo into the current directory, which 7 # Crude script to clone the git skia repo into the current directory, which
8 # must be a CitC client. 8 # must be a CitC client.
9 # 9 #
10 # Usage: 10 # Usage:
11 # ./tools/git_clone_to_google3.sh 11 # ./tools/git_clone_to_google3.sh
12 12
13 source gbash.sh || exit 13 source gbash.sh || exit
14 DEFINE_string skia_rev "" "Git hash of Skia revision to clone, default LKGR." 14 DEFINE_string skia_rev "" "Git hash of Skia revision to clone, default LKGR."
15 gbash::init_google "$@"
16 15
17 set -x -e 16 set -x -e
18 17
19 # To run this script after making edits, run: 18 # To run this script after making edits, run:
20 # g4 revert -k git_clone_to_google3.sh 19 # g4 revert -k git_clone_to_google3.sh
21 # To get the file back into your CL, run: 20 # To get the file back into your CL, run:
22 # g4 edit git_clone_to_google3.sh 21 # g4 edit git_clone_to_google3.sh
23 #g4 opened | grep -q "//depot" && gbash::die "Must run in a clean client." 22 #g4 opened | grep -q "//depot" && gbash::die "Must run in a clean client."
24 23
25 # Checkout LKGR of Skia in a temp location. 24 # Checkout LKGR of Skia in a temp location.
(...skipping 16 matching lines...) Expand all
42 # Use allwrite to simplify opening the correct files after rsync. 41 # Use allwrite to simplify opening the correct files after rsync.
43 g4 client --set_option allwrite 42 g4 client --set_option allwrite
44 # Filter directories added to CitC. 43 # Filter directories added to CitC.
45 rsync -avzJ \ 44 rsync -avzJ \
46 --delete \ 45 --delete \
47 --delete-excluded \ 46 --delete-excluded \
48 --include=/bench \ 47 --include=/bench \
49 --include=/dm \ 48 --include=/dm \
50 --include=/gm \ 49 --include=/gm \
51 --include=/include \ 50 --include=/include \
51 --include=/src \
52 --exclude=/src/animator \ 52 --exclude=/src/animator \
53 --include=/src \
54 --include=/tests \ 53 --include=/tests \
55 --include=/third_party \ 54 --include=/third_party \
56 --include=/tools \ 55 --include=/tools \
57 --include=/.git \ 56 --include=/.git \
58 '--exclude=/*/' \ 57 '--exclude=/*/' \
59 --include=/third_party/etc1 \ 58 --include=/third_party/etc1 \
60 --include=/third_party/ktx \ 59 --include=/third_party/ktx \
61 --include=/third_party/libwebp \ 60 --include=/third_party/libwebp \
62 '--exclude=/third_party/*/' \ 61 '--exclude=/third_party/*/' \
63 "${TMP}/skia/" \ 62 "${TMP}/skia/" \
(...skipping 10 matching lines...) Expand all
74 -o -name .gitignore \ 73 -o -name .gitignore \
75 \) \ 74 \) \
76 -execdir g4 revert -k \{\} \; 75 -execdir g4 revert -k \{\} \;
77 76
78 # Tell Git to ignore README.google and BUILD. 77 # Tell Git to ignore README.google and BUILD.
79 echo README.google >> .git/info/exclude 78 echo README.google >> .git/info/exclude
80 echo BUILD >> .git/info/exclude 79 echo BUILD >> .git/info/exclude
81 g4 revert README.google 80 g4 revert README.google
82 g4 revert BUILD 81 g4 revert BUILD
83 82
84 # Use google3 version of OWNERS. 83 # Use google3 version of OWNERS, README.google, and BUILD.
85 find . \ 84 find . \
86 -name OWNERS \ 85 \( -name OWNERS -o -name README.google -o -name BUILD \) \
87 -exec git update-index --skip-worktree \{\} \; \ 86 -exec git update-index --skip-worktree \{\} \; \
88 -execdir g4 revert \{\} \; 87 -execdir g4 revert \{\} \;
89 88
90 # Tell git to ignore these files that have Windows line endings, because Piper
91 # will always change them to Unix line endings.
92 git update-index --skip-worktree make.bat
93 git update-index --skip-worktree make.py
94
95 # Tell git to ignore files left out of the rsync (i.e. "deleted" files). 89 # Tell git to ignore files left out of the rsync (i.e. "deleted" files).
96 git status --porcelain | \ 90 git status --porcelain | \
97 grep -e "^ D" | \ 91 grep -e "^ D" | \
98 cut -c 4- | \ 92 cut -c 4- | \
99 xargs git update-index --skip-worktree 93 xargs git update-index --skip-worktree
100 94
OLDNEW
« no previous file with comments | « no previous file | tools/sync_google3.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698