[M40] Switch to trunk's webrtc and libjingle_source_talk repo.
authorSeungSeop Park <sns.park@samsung.com>
Mon, 3 Nov 2014 01:51:39 +0000 (10:51 +0900)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Updated .gclient and sync_repo.sh to get newly added trunk repositories
instead of upstream's: s-webrtc.git and s-libjingle_source_talk.git.

In addition, to deal with any future repo additions, patch adds an
additional step to check the existing repo url in target path against
the desired repo url and remove the path if the two urls do not match.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=8410
Reviewed by: Kangil Han, Piotr Tworek, SeungSeop Park

Change-Id: I8b9fd9499a3e1433c43bd4685e9821b60331a5d3
Signed-off-by: SeungSeop Park <sns.park@samsung.com>
tizen_src/.gclient
tizen_src/sync_repos.sh

index dce7689..109f7aa 100644 (file)
@@ -1,12 +1,14 @@
 solutions = [{
   'managed'     : False,
   'name'        : 'src',
-  'url'         : 'ssh://165.213.202.130:29418/webplatform/s-chromium.git@dev/m39_2150',
+  'url'         : 'ssh://165.213.202.130:29418/webplatform/s-chromium.git',
   'custom_deps' : {
     'src/third_party/WebKit':None,
     'src/sbrowser':None,
     'src/third_party/skia':None,
     'src/v8':None,
+    'src/third_party/libjingle/source/talk':None,
+    'src/third_party/webrtc':None,
   },
   'deps_file'   : '.DEPS.git',
   'safesync_url': '',
@@ -15,4 +17,4 @@ solutions = [{
   },
 }]
 cache_dir = None
-target_os = ['android']
+target_os = ['linux']
index 2dc6790..4538113 100755 (executable)
@@ -5,8 +5,23 @@ URLBASE='ssh://165.213.202.130:29418/webplatform'
 REPOS=( "src|$URLBASE/s-chromium.git" \
         "src/third_party/WebKit|$URLBASE/s-blink" \
         "src/third_party/skia|$URLBASE/s-skia.git" \
+        "src/third_party/libjingle/source/talk|$URLBASE/s-libjingle_source_talk.git" \
+        "src/third_party/webrtc|$URLBASE/s-webrtc.git" \
         "src/v8|$URLBASE/s-v8" )
 
+function rmdir_if_not_repo {
+  REPOPATH=$1
+  REPOURL=$2
+  if [ -d $REPOPATH ] ; then
+    isDesiredRepo=$(git --git-dir=$REPOPATH/.git --work-tree=$REPOPATH ls-remote --get-url origin \
+                    | grep -c $REPOURL || :)
+    if [ "$isDesiredRepo" == "0" ] ; then
+      echo "... Deleting ${REPOPATH} (backup: ${REPOPATH}.bak)"
+      mv ${REPOPATH} ${REPOPATH}.bak 2>&1 > /dev/null
+    fi
+  fi
+}
+
 if echo "$@" | grep -c "\-\-reset" &> /dev/null; then
   isReset=1
 fi
@@ -15,6 +30,7 @@ for K in ${REPOS[@]} ; do
   L=(${K//\|/ })
   REPOPATH=${L[0]}
   REPO=${L[1]}
+  rmdir_if_not_repo $REPOPATH $REPO
   if [ -d $REPOPATH ] ; then
     pushd $REPOPATH 2>&1 > /dev/null
     CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`