From: "Tommy M. McGuire" <mcguire@crsr.net>
To: "Tommy M. McGuire" <mcguire@crsr.net>
Cc: Linus Torvalds <torvalds@osdl.org>,
Git Mailing List <git@vger.kernel.org>
Subject: [PATCH] git cvsimport sanity checking
Date: Fri, 10 Jun 2005 01:27:47 -0500 [thread overview]
Message-ID: <20050610062747.GA4763@immutable.crsr.net> (raw)
In-Reply-To: <20050610062206.GA3992@immutable.crsr.net>
This patch adds some sanity checking to git-cvsimport-script,
specifically forcing the use of cvsps -x (to get the latest information
from the repository, rather than whatever is in the cache) and aborting
early if cvsps does not produce any output.
I debated removing the $MODULE directory following an abort, but I
eventually decided leaving stuff behind would make debugging easier. On
the other hand, this patch should help with the "cvsimport left me with
an empty repository" complaints.
Signed-off-by: Tommy McGuire <mcguire@crsr.net>
Call cvsps with the -x flag, to get the current state of the repository,
and abort the cvs import early if cvsps does not produce any output.
---
commit 2e670826cec5642a11e2e7d6adcb48e02225ba6d
tree 25e4f590772b9c0bc8ac37f8a57f4a08435ed5c6
parent 21b4b44a5deee7985f14d0f4776ad0d489092a96
author Tommy M. McGuire <mcguire@crsr.net> Fri, 10 Jun 2005 01:38:42 -0500
committer Tommy M. McGuire <mcguire@crsr.net> Fri, 10 Jun 2005 01:38:42 -0500
git-cvsimport-script | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/git-cvsimport-script b/git-cvsimport-script
--- a/git-cvsimport-script
+++ b/git-cvsimport-script
@@ -20,6 +20,8 @@ cvsps -h 2>&1 | grep -q "cvsps version 2
mkdir "$MODULE" || exit 1
cd "$MODULE"
-TZ=UTC cvsps -A $MODULE | git-cvs2git $ARGS --cvsroot="$CVSROOT" --module="$MODULE" > .git-create-script || exit 1
+TZ=UTC cvsps -x -A $MODULE > .git-cvsps-result
+[ -s .git-cvsps-result ] || exit 1
+git-cvs2git $ARGS --cvsroot="$CVSROOT" --module="$MODULE" < .git-cvsps-result > .git-create-script || exit 1
sh .git-create-script
\f
!-------------------------------------------------------------flip-
--
Tommy McGuire
next prev parent reply other threads:[~2005-06-10 6:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-07 23:03 "git cvsimport" Linus Torvalds
2005-06-08 5:32 ` Tommy M. McGuire
2005-06-10 6:22 ` [PATCH] " Tommy M. McGuire
2005-06-10 6:27 ` Tommy M. McGuire [this message]
2005-06-10 6:33 ` [PATCH] cvs-migration.txt Tommy M. McGuire
2005-06-10 6:38 ` [PATCH] git cvsimport fuzz argument Tommy M. McGuire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050610062747.GA4763@immutable.crsr.net \
--to=mcguire@crsr.net \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).