svn commit: r244084 - user/uqs/git_conv
Ulrich Spoerlein
uqs at FreeBSD.org
Mon Dec 10 14:02:40 UTC 2012
Author: uqs
Date: Mon Dec 10 14:02:39 2012
New Revision: 244084
URL: http://svnweb.freebsd.org/changeset/base/244084
Log:
Really abort the whole run when pushing to the remote repos fails (only github currently)
Modified:
user/uqs/git_conv/git_conv
Modified: user/uqs/git_conv/git_conv
==============================================================================
--- user/uqs/git_conv/git_conv Mon Dec 10 14:01:41 2012 (r244083)
+++ user/uqs/git_conv/git_conv Mon Dec 10 14:02:39 2012 (r244084)
@@ -42,7 +42,7 @@ fi
svn2git()
{
- local rules source target dest
+ local rules source target dest d
rules=$1; shift
source=$1; shift
dest="$@"
@@ -64,16 +64,14 @@ svn2git()
fi
echo "Pushing $target to $dest"
- cd $target && for d in $dest; do git push $d || break; done
- if [ $? != 0 ]; then
- echo "Error in pushing to $dest" >&2
- exit 1
- fi
+ cd $target && for d in $dest; do
+ git push $d || { echo "Error in pushing to $dest" >&2; exit 1; }
+ done
}
gitsvn()
{
- local target dest
+ local target dest d
target=$1; shift
dest="$@"
@@ -87,11 +85,9 @@ gitsvn()
fi
echo "Pushing $target to $dest"
- for d in $dest; do git push $d || break; done
- if [ $? != 0 ]; then
- echo "Error in pushing to $dest" >&2
- exit 1
- fi
+ for d in $dest; do
+ git push $d || { echo "Error in pushing to $dest" >&2; exit 1; }
+ done
}
gitsvn src-head.git github
More information about the svn-src-user
mailing list