2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 # You can obtain one at http://mozilla.org/MPL/2.0/.
6 # First, get a new copy of the tree to play with
7 # They both want to be named 'trunk'...
11 # Note: must be in trunk; won't work with --name (error during sync)
12 gclient config
--name trunk http
://webrtc.googlecode.com
/svn
/trunk
/peerconnection
18 sed -i -e "s/\"webrtc_revision\":.*,/\"webrtc_revision\": \"$1\",/" -e "s/\"libjingle_revision\":.*,/\"libjingle_revision\": \"$2\",/" trunk
/DEPS
24 echo "Updating from $3..."
25 rm -rf trunk
/third_party
/webrtc
27 cp -a $3/webrtc
/* trunk
/src
33 export revision
=`svnversion -n`
35 echo "WebRTC revision overridden from $revision to $1"
38 echo "WebRTC revision = $revision"
43 # safety - make it easy to find our way out of the forest
46 # Ok, now we have a copy of the source. See what changed
47 # (webrtc-import-last is a bookmark)
48 # FIX! verify no changes in webrtc!
49 hg update
--clean webrtc-import-last
52 mv ..
/..
/webrtc_update
/trunk trunk
53 mv -f ..
/..
/webrtc_update
/.g
* .
54 rmdir ..
/..
/webrtc_update
55 (hg addremove
--exclude "**webrtcsessionobserver.h" --exclude "**webrtcjson.h" --exclude "**.svn" --exclude "**.git" --exclude "**.pyc" --exclude "**.yuv" --similarity 70 --dry-run trunk
; hg status
-m; echo "************* Please look at the filenames found by rename and see if they match!!! ***********" ) |
less
57 # FIX! Query user about add-removes better!!
58 echo "Waiting 30 seconds - Hit ^C now to stop addremove and commit!\a\a\a\a"
59 sleep 30 # let them ^C
61 # Add/remove files, detect renames
62 hg addremove
--exclude "**webrtcsessionobserver.h" --exclude "**webrtcjson.h" --exclude "**.svn" --exclude "**.git" --exclude "**.pyc" --exclude "**.yuv" --similarity 70 trunk
63 hg status
-a -r >/tmp
/changed_webrtc_files
65 # leave this for the user for now until we're comfortable it works safely
67 # Commit the vendor branch
68 echo "Commit, merge and push to server - cut and paste"
69 echo "You probably want to do these from another shell so you can look at these"
70 hg commit
-m "Webrtc import $revision"
71 # webrtc-import-last is auto-updated (bookmark)
74 #hg update --clean webrtc-pending
75 #hg merge -r webrtc-import-last
76 #hg commit -m "merge latest import to pending, $revision"
77 # webrtc-pending is auto-updated (bookmark)
80 echo "hg update --clean webrtc-trim"
81 echo "hg merge -r webrtc-import-last"
82 echo "hg commit -m 'merge latest import to trim, $revision'"
83 # webrtc-trim is auto-updated (bookmark)
85 # commands to pull - never do more than echo them for the user
87 echo "Here's how to pull this update into the mozilla repo:"
90 echo "hg pull --bookmark webrtc-trim path-to-webrtc-import-repo"
92 echo "echo '#define WEBRTC_SVNVERSION $revision' >media/webrtc/webrtc_version.h"
93 echo "echo '#define WEBRTC_PULL_DATE \"$date\"' >>media/webrtc/webrtc_version.h"
94 echo "hg commit -m 'Webrtc updated to $revision; pull made on $date'"
96 echo "Please check for added/removed/moved .gyp/.gypi files, and if so update EXTRA_CONFIG_DEPS in client.mk!"
97 echo "possible gyp* file changes:"
98 grep gyp
/tmp
/changed_webrtc_files
100 echo "Once you feel safe:"