aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2015-08-31 13:36:58 +0000
committerLinaro Code Review <review@review.linaro.org>2015-08-31 13:36:58 +0000
commit26686688487afbe03f08ed7edb7d3e85147cd864 (patch)
tree5c573813b52cc02d685aa886ad98bc68158ddf2b /lib
parentdba53b67a2d548c5871061cb0689c8dedd4d4d6c (diff)
parent154cd5d8b9e20d7e67efb65844ebece71faa1744 (diff)
Merge "remove unused protocols, svn, br, lp"
Diffstat (limited to 'lib')
-rw-r--r--lib/checkout.sh108
-rw-r--r--lib/common.sh19
-rw-r--r--lib/git-parser.sh28
-rw-r--r--lib/globals.sh4
-rwxr-xr-xlib/make.sh2
-rw-r--r--lib/merge.sh16
6 files changed, 12 insertions, 165 deletions
diff --git a/lib/checkout.sh b/lib/checkout.sh
index 1c3d0f3e..08a170a7 100644
--- a/lib/checkout.sh
+++ b/lib/checkout.sh
@@ -275,32 +275,6 @@ checkout()
srcdir="`get_srcdir $1`" || return 1
case $1 in
- svn*)
- local trunk="`echo $1 |grep -c trunk`"
- if test ${trunk} -gt 0; then
- local dir="`dirname $1`"
- local dir="`basename ${dir}`/trunk"
- fi
- if test x"${force}" = xyes; then
- #rm -fr ${local_snapshots}/${dir}
- echo "Removing existing sources for ${srcdir}"
- fi
- if test x"${usegit}" = xyes; then
- local out="`git svn clone $1 ${srcdir}`"
- else
- if test -e ${srcdir}/.svn; then
- (cd ${srcdir} && svn update)
- # Extract the revision number from the update message
- local revision="`echo ${out} | sed -e 's:.*At revision ::' -e 's:\.::'`"
- else
- svn checkout $1 ${srcdir}
- if test $? -gt 0; then
- error "Failed to check out $1 to ${srcdir}"
- return 1
- fi
- fi
- fi
- ;;
git*|http*|ssh*)
#FIXME: We deliberately ignored error returns from get_git_url,
# because any path with an '@' in will result in errors.
@@ -419,41 +393,6 @@ push ()
# We use git for our copy by importing from the other systems
case $1 in
- bzr*|lp*)
- if test x"${usegit}" = xyes; then
- #out="`git-bzr push $1 ${local_snapshots}/${dir}`"
- echo "FIXME: shouldn't be here!"
- else
- if test -e ${local_snapshots}/${dir}/.bzr; then
- #out="`(cd ${local_snapshots}/${dir} && bzr push)`"
- notice "Pushing ${dir} upstream..."
- notice "bzr push ${url}"
- else
- error "${local_snapshots}/${dir} doesn't exist!"
- return 1
- fi
- fi
- ;;
- svn*)
- local trunk="`echo $1 |grep -c trunk`"
- if test ${trunk} -gt 0; then
- local dir="`dirname $1`"
- local dir="`basename ${dir}`/trunk"
- fi
- if test x"${usegit}" = xyes; then
- #out="`git svn push $1 ${local_snapshots}/${dir}`"
- echo "FIXME: shouldn't be here!"
- else
- if test -e ${local_snapshots}/${dir}/.svn; then
- #out="`(cd ${local_snapshots}/${dir} && svn commit`"
- notice "Pushing ${dir} upstream"
- notice "svn commit ${url}"
- else
- error "${local_snapshots}/${dir} doesn't exist!"
- return 1
- fi
- fi
- ;;
git*|ssh*)
if test x"$3" = x; then
warning "No branch given, so using master or trunk"
@@ -490,53 +429,6 @@ commit ()
# We use git for our copy by importing from the other systems
case $1 in
- bzr*|lp*)
- if test x"${usegit}" = xyes; then
- #out="`git-bzr push $1 ${local_snapshots}/${dir}`"
- echo "FIXME: shouldn't be here!"
- else
- if test x"$2" = x; then
- warning "No file given, so commiting all"
- local files=""
- else
- local files="$2"
- fi
- if test -e ${local_snapshots}/${dir}/.bzr; then
- #out="`(cd ${local_snapshots}/${dir} && bzr commit --file ${local_snapshots}/${dir}/commitmsg.txt ${files}`"
- notice "Committing ${dir} to local repository..."
- notice "bzr commit -m \"`cat ${local_snapshots}/${dir}/commitmsg.txt`\" ${files}"
- else
- error "${local_snapshots}/${dir} doesn't exist!"
- return 1
- fi
- fi
- ;;
- svn*)
- local trunk="`echo $1 |grep -c trunk`"
- if test ${trunk} -gt 0; then
- local dir="`dirname $1`"
- local dir="`basename ${dir}`/trunk"
- fi
- if test x"$2" = x; then
- warning "No file given, so commiting all"
- local files=""
- else
- local files="$2"
- fi
- if test x"${usegit}" = xyes; then
- #out="`git svn push $1 ${local_snapshots}/${dir}`"
- echo "FIXME: shouldn't be here!"
- else
- if test -e ${local_snapshots}/${dir}/.svn; then
- #out="`(cd ${local_snapshots}/${dir} && svn commit --file ${local_snapshots}/${dir}/commitmsg.txt ${files}`"
- notice "Committing ${files} to remote repository"
- notice "svn commit -m \"`cat ${local_snapshots}/${dir}/commitmsg.txt`\" ${files}"
- else
- error "${local_snapshots}/${dir} doesn't exist!"
- return 1
- fi
- fi
- ;;
git*|ssh*)
if test x"$2" = x; then
warning "No files given, so commiting all"
diff --git a/lib/common.sh b/lib/common.sh
index f014998e..e1b33566 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -129,7 +129,7 @@ notice()
#
# $1 - The toolchain component identifier.
#
-# Returns a string that represents the full URL for an svn, lp, or git service
+# Returns a string that represents the full URL for a git service
# that matches the identifier in the sources.conf file.
#
# [Optional] Return a branch and revision number for git if tagged
@@ -235,13 +235,6 @@ normalize_path()
local branch=""
case ${process} in
- lp*)
- local node="`echo ${process} | sed -e 's@lp:@@' -e 's:/:_:'`"
- ;;
- bzr*)
- local node="`echo ${process} | sed -e 's:^.*branch/::'`"
- local node="`echo ${node} | sed -e 's:/:_:'`"
- ;;
git*|http*|ssh*)
if test "`echo ${process} | grep -c "\.tar"`" -gt 0 -o "`echo ${process} | grep -c "\.tgz"`" -gt 0; then
local node="`basename ${process} | sed -e 's:\.tar.*::' -e 's:\.tgz$::'`"
@@ -259,10 +252,6 @@ normalize_path()
revision="`get_git_revision ${process}`" || return 1
fi
;;
- svn*)
- local node="`echo ${process} | sed -e 's@^.*/svn/@@'`"
- local node="`basename ${node}`"
- ;;
*.tar.*)
local node="`echo ${process} | sed -e 's:\.tar.*::' -e 's:\+git:@:' -e 's:\.git/:.git-:'`"
;;
@@ -460,7 +449,7 @@ get_source()
local url=
# If a full URL or git repo identifier isn't passed as an argument,
# assume we want a tarball snapshot
- if test `echo $1 | egrep -c "^svn|^git|^http|^ssh|^bzr|^lp|\.git"` -eq 0; then
+ if test `echo $1 | egrep -c "^git|^http|^ssh|\.git"` -eq 0; then
local snapshot
snapshot=`find_snapshot $1`
if test $? -gt 0; then
@@ -508,7 +497,7 @@ get_source()
fi
else
# This leg captures direct urls that don't start or end in .git.
- # This include svn directories and git identifiers that start with http://.
+ # This includes git identifiers that start with http://.
if test `echo $1 | egrep -c "\.git"` -eq 0 -a `echo $1 | egrep -c "^git"` -eq 0; then
#if test `echo $1 | egrep -c "\.git"` -eq 0; then
local url=$1
@@ -593,7 +582,7 @@ get_source()
# Get the proper source directory
# $1 - The component name, which is one of the following:
#
-# A git, http, ssh, svn, lp URL
+# A git, http, ssh URL
# A repository identifier mapping an entry in sources.conf
# A tarball
#
diff --git a/lib/git-parser.sh b/lib/git-parser.sh
index 330a01fb..7e24b398 100644
--- a/lib/git-parser.sh
+++ b/lib/git-parser.sh
@@ -17,7 +17,7 @@
#
# NOTICE: This service is most reliable when passed a full URL (including
-# service identifier, e.g., lp:, svn://, http://, git://).
+# service identifier, e.g., http://, git://).
#
# The get_git_<part> functions all operate on the same premise:
#
@@ -128,12 +128,7 @@ git_parser()
# Set to '1' if something in ${in} is malformed.
local err=0
- local service="`echo "${in}" | sed -n ' s#\(^git\)://.*#\1#p; s#\(^ssh\)://.*#\1#p; s#\(^http\)://.*#\1#p; s#\(^https\)://.*#\1#p; s#\(^svn\)://.*#\1#p; s#\(^lp\):[/]*.*#\1#p'`"
-
- # An http service with /svn in the url is actually an svn service.
- if test x"${service}" = x"http" -a "`echo ${in} | egrep -c "\/svn"`" -gt 0; then
- service="svn"
- fi
+ local service="`echo "${in}" | sed -n ' s#\(^git\)://.*#\1#p; s#\(^ssh\)://.*#\1#p; s#\(^http\)://.*#\1#p; s#\(^https\)://.*#\1#p; '`"
# Do this early because this is called often and we don't need all that
# other parsing in this case.
@@ -185,25 +180,6 @@ git_parser()
return 0
fi
- # Just bail out early if this is an svn service.
- # This _should_ capture http://<foo>/svn
- if test x"${service}" = x"svn"; then
- case ${part} in
- repo|tool)
- # Strip any trailing branch information.
- local repo="`echo ${in} | sed -e 's:-[0-9].*::' -e 's:/trunk::'`"
- repo="`basename ${repo}`"
- echo "${repo}"
- ;;
- url)
- echo "${in}"
- ;;
- *)
- ;;
- esac
- return 0
- fi
-
# This is tarball and it is unique
if test "`echo ${in} | egrep -c "\.tar"`" -gt 0; then
case ${part} in
diff --git a/lib/globals.sh b/lib/globals.sh
index 685e4cca..53b19f90 100644
--- a/lib/globals.sh
+++ b/lib/globals.sh
@@ -55,10 +55,6 @@ wget_progress_style=
# This doesn't do any real work, just prints the configure options and make commands
dryrun=no
-#
-launchpad_id=
-svn_id=
-
# config values for the build machine
libc_version=
kernel=${kernel:+${kernel}}
diff --git a/lib/make.sh b/lib/make.sh
index cce831d5..923fe5c0 100755
--- a/lib/make.sh
+++ b/lib/make.sh
@@ -349,7 +349,7 @@ build()
# cross-build we only checkout/fetch if this is stage1
if test x"${target}" = x"${build}" \
-o x"${target}" != x"${build}" -a x"$2" != x"stage2"; then
- if test `echo ${gitinfo} | egrep -c "^bzr|^svn|^git|^ssh|^lp|^http|^git|\.git"` -gt 0; then
+ if test `echo ${gitinfo} | egrep -c "^git|^ssh|^http|^git|\.git"` -gt 0; then
# Don't update the compiler sources between stage1 and stage2 builds if this
# is a cross build.
notice "Checking out ${tag}${2:+ $2}"
diff --git a/lib/merge.sh b/lib/merge.sh
index f57625c8..f2ab9193 100644
--- a/lib/merge.sh
+++ b/lib/merge.sh
@@ -27,7 +27,7 @@ merge_diff()
# cleanup leftover files
notice "Making a diff from merge-r$1"
rm -f ${bzr_top}/merge-$1.diff.txt
- diff -ruNp -x '*.patch' -x '*.svn' -x '*~' -x '*.bzr' -x '*.rej' -x '*.orig' -x '*.edited' -x '*diff.txt' -x '*.log' -x 'x' -x '*merge-left*' -x '*merge-right*' -x "*.working" -x '*/.gitignore' 4.8-branch ${merge_top}/merge-r$1 > ${bzr_top}/merge-r$1.diff.txt
+ diff -ruNp -x '*.patch' -x '*.rej' -x '*.orig' -x '*.edited' -x '*diff.txt' -x '*.log' -x 'x' -x '*merge-left*' -x '*merge-right*' -x "*.working" -x '*/.gitignore' 4.8-branch ${merge_top}/merge-r$1 > ${bzr_top}/merge-r$1.diff.txt
# revert the bzr source tree so we get a clean patch
notice "Reverting previous changes"
@@ -48,10 +48,6 @@ merge_diff()
merge_prep()
{
if test ! -e ${merge_top}/merge-r$1; then
-# svn checkout svn+ssh://${svn_id}@gcc.gnu.org/svn/gcc/branches/linaro/gcc-$i-branch $1-branch
-# fi
-
- # svn checkout svn+ssh://${gccsvn_id}@gcc.gnu.org/svn/gcc/branches/gcc-$1-branch $1-branch
notice "Cloning source tree into branch merge-r$1"
cp -r ${merge_top}/4.8-branch ${merge_top}/merge-r$1
fi
@@ -70,12 +66,10 @@ merge_branch()
notice "Merging revision from trunk: $1"
if test ! -e ${merge_top}/merge-r$1/merge.log; then
- #conflicts="`svn merge --accept postpone -c $1 /linaro/src/gnu/gcc/trunk`"
- (cd ${merge_top}/merge-r$1 && svn merge --accept postpone -c $1 ${trunk_top} 2>&1 | tee ${merge_top}/merge-r$1/merge.log)
+ (cd ${merge_top}/merge-r$1 && git merge --accept postpone -c $1 ${trunk_top} 2>&1 | tee ${merge_top}/merge-r$1/merge.log)
fi
notice "Looking for merge conflicts..."
- #conflicts="`svn status | grep "^C"`"
conflicts="`grep "^C" ${merge_top}/merge-r$1/merge.log | sed -e 's:^C *: :' | tr -d '\n'`"
notice "Conflicts: ${conflicts}"
@@ -112,7 +106,7 @@ merge_branch()
# munge the raw patch to the text equivalent, where we manually add
# it to the top of the ChangeLog.linaro file.
if test ! -e ${merge_top}/merge-r$1/diff.txt; then
- svn diff -c $1 ${trunk_top}/$i 2>&1 > ${merge_top}/merge-r$1/diff.txt
+ git diff -c $1 ${trunk_top}/$i 2>&1 > ${merge_top}/merge-r$1/diff.txt
fi
grep "^\+" ${merge_top}/merge-r$1/diff.txt | sed -e 's:^\+::' | grep -v "revision" 2>&1 > ${merge_top}/merge-r$1/body.patch
# So this mess is because if the last commit is by he same person as
@@ -143,7 +137,7 @@ merge_branch()
rm -f ${merge_top}/merge-r$1/*.patch ${merge_top}/merge-r$1/diff.txt
# We can now revert the ChangeLog that was conflicted, as the entry
# is in the proper ChangeLong.linaro file.
- (cd ${merge_top}/merge-r$1 && svn revert $i)
+ (cd ${merge_top}/merge-r$1 && git revert $i)
else
problems=" ${problems} $i"
echo "${merge_top}/merge-r$1/$i" >> ${merge_top}/merge-r$1/problems.txt
@@ -172,5 +166,5 @@ merge_patch()
{
echo $1
- svn diff -c $1 > $i.patch
+ git diff -c $1 > $i.patch
}