From owner-svn-src-user@freebsd.org Tue Nov 10 13:08:05 2015 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D124A2BF8F for ; Tue, 10 Nov 2015 13:08:05 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1ED31075; Tue, 10 Nov 2015 13:08:04 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAAD84KA036785; Tue, 10 Nov 2015 13:08:04 GMT (envelope-from uqs@FreeBSD.org) Received: (from uqs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAAD84YL036784; Tue, 10 Nov 2015 13:08:04 GMT (envelope-from uqs@FreeBSD.org) Message-Id: <201511101308.tAAD84YL036784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: uqs set sender to uqs@FreeBSD.org using -f From: Ulrich Spoerlein Date: Tue, 10 Nov 2015 13:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r290653 - user/uqs/git_conv X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 13:08:05 -0000 Author: uqs Date: Tue Nov 10 13:08:03 2015 New Revision: 290653 URL: https://svnweb.freebsd.org/changeset/base/290653 Log: Add some flags to the converter script to only do one type of conversion and/or run them without pushing to remote sites. Useful for testing local converter runs. Stupid svn 1.9 ... Modified: user/uqs/git_conv/git_conv Modified: user/uqs/git_conv/git_conv ============================================================================== --- user/uqs/git_conv/git_conv Tue Nov 10 13:03:55 2015 (r290652) +++ user/uqs/git_conv/git_conv Tue Nov 10 13:08:03 2015 (r290653) @@ -34,6 +34,31 @@ : ${DOC_REPO=/home/svn/doc} : ${PORTS_REPO=/home/svn/ports} +usage() +{ + exit 1 +} + +do_gitsvn=1 +do_svn2git=1 +run_local= + +# These options are ass-backwards, but default should be to do both. +while getopts "gls" OPT; do + case "$OPT" in + g) + do_svn2git= + ;; + l) + run_local=1 + ;; + s) + do_gitsvn= + ;; + esac +done +shift $(($OPTIND - 1)) + case "$1" in base) ;; @@ -81,7 +106,7 @@ svn2git() fi touch $target/git-daemon-export-ok - if [ -z "$dest" ]; then + if [ -z "$dest" -o -n "$run_local" ]; then return fi @@ -106,7 +131,7 @@ gitsvn() exit 1 fi - if [ -z "$dest" ]; then + if [ -z "$dest" -o -n "$run_local" ]; then return fi @@ -116,26 +141,18 @@ gitsvn() done } -case "$TYPE" in - base) - gitsvn src-head.git github - ;; - doc) - gitsvn doc-head.git github - ;; - ports) - gitsvn ports-head.git github - ;; -esac +if [ -n "$do_gitsvn" ]; then + case "$TYPE" in + base) gitsvn src-head.git github ;; + doc) gitsvn doc-head.git github ;; + ports) gitsvn ports-head.git github ;; + esac +fi -case "$TYPE" in - base) - svn2git $RULES_DIR/freebsd-base.rules ${SRC_REPO} github bitbucket #googlecode - ;; - doc) - svn2git $RULES_DIR/freebsd-doc.rules ${DOC_REPO} github - ;; - ports) - svn2git $RULES_DIR/freebsd-ports.rules ${PORTS_REPO} github - ;; -esac +if [ -n "$do_svn2git" ]; then + case "$TYPE" in + base) svn2git $RULES_DIR/freebsd-base.rules ${SRC_REPO} github bitbucket ;; + doc) svn2git $RULES_DIR/freebsd-doc.rules ${DOC_REPO} github ;; + ports) svn2git $RULES_DIR/freebsd-ports.rules ${PORTS_REPO} github ;; + esac +fi