* "git cvsimport"
@ 2005-06-07 23:03 Linus Torvalds
2005-06-08 5:32 ` Tommy M. McGuire
2005-06-10 6:22 ` [PATCH] " Tommy M. McGuire
0 siblings, 2 replies; 6+ messages in thread
From: Linus Torvalds @ 2005-06-07 23:03 UTC (permalink / raw)
To: Git Mailing List
Ok,
here's something for testers and/or documentation people: I wrapped a
little script around cvs2git (which I imported from the git tools thing),
and now you can do
git cvsimport <cvsroot> <modulename>
and it might all "just work".
Right now the little sript is actually being anal and checking that
CVSROOT is a directory, even though I think it all _should_ work even if
CVSROOT is remote too. But I don't have any remote things to test, and for
all I know maybe performance is horrible, so for now it artificially
limits it to locally accessible CVS repos.
I'd love it if somebody tested the remote case (and, if it works, sends me
a patch that just removes the anal tests in git-cvsimport-script), and
maybe even updated the information a bit more.. As it is, that
Documentation/cvs-migration.txt file is a bit on the light side.
Finally, I don't know what to do about cvsps options. It seems that the
default time-fuzz is a bit too long for some projects, so at least that
one should be overridable. So my silly script is not exactly wonderful,
but I think it's more approachable than people doing the magic by hand
(and forgetting to set TZ to UTC and the "-A" flag etc etc).
Linus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: "git cvsimport"
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
1 sibling, 0 replies; 6+ messages in thread
From: Tommy M. McGuire @ 2005-06-08 5:32 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Git Mailing List
On Tue, Jun 07, 2005 at 04:03:53PM -0700, Linus Torvalds wrote:
>
> Ok,
> here's something for testers and/or documentation people: I wrapped a
> little script around cvs2git (which I imported from the git tools thing),
> and now you can do
>
> git cvsimport <cvsroot> <modulename>
>
> and it might all "just work".
>
> Right now the little sript is actually being anal and checking that
> CVSROOT is a directory, even though I think it all _should_ work even if
> CVSROOT is remote too. But I don't have any remote things to test, and for
> all I know maybe performance is horrible, so for now it artificially
> limits it to locally accessible CVS repos.
>
> I'd love it if somebody tested the remote case (and, if it works, sends me
> a patch that just removes the anal tests in git-cvsimport-script), and
> maybe even updated the information a bit more.. As it is, that
> Documentation/cvs-migration.txt file is a bit on the light side.
>
> Finally, I don't know what to do about cvsps options. It seems that the
> default time-fuzz is a bit too long for some projects, so at least that
> one should be overridable. So my silly script is not exactly wonderful,
> but I think it's more approachable than people doing the magic by hand
> (and forgetting to set TZ to UTC and the "-A" flag etc etc).
>
> Linus
It seems to work for me. I'm still sanity checking the results.
Performance is indeed horrible for the remote case. I don't know how
horrible it would be for someone in a sane environment, since I'm behind
one of SBC's DSL gateways, which thinks (emphasis on "thinks") it is a
nameserver.
The script produced by cvs2git checks out every revision of every file,
right? Would "cvsps -g -p<dir>" improve cvs2git? I don't think it
would help performance (it checks out the files to generate the patchset
diffs (?)), but making the ugly someone else's problem is always good.
Also, what about -x, to force cvsps to regenerate it's cached idea of
the repository's patchsets?
cvsps seems a little weak on the whole error message idea (misspelling
cvsroot leads to complaints about CVS versions).
--
Tommy McGuire
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Re: "git cvsimport"
2005-06-07 23:03 "git cvsimport" Linus Torvalds
2005-06-08 5:32 ` Tommy M. McGuire
@ 2005-06-10 6:22 ` Tommy M. McGuire
2005-06-10 6:27 ` [PATCH] git cvsimport sanity checking Tommy M. McGuire
` (2 more replies)
1 sibling, 3 replies; 6+ messages in thread
From: Tommy M. McGuire @ 2005-06-10 6:22 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Git Mailing List
On Tue, Jun 07, 2005 at 04:03:53PM -0700, Linus Torvalds wrote:
> I'd love it if somebody tested the remote case (and, if it works, sends me
> a patch that just removes the anal tests in git-cvsimport-script), and
> maybe even updated the information a bit more.. As it is, that
> Documentation/cvs-migration.txt file is a bit on the light side.
>
> Finally, I don't know what to do about cvsps options. It seems that the
> default time-fuzz is a bit too long for some projects, so at least that
> one should be overridable. So my silly script is not exactly wonderful,
> but I think it's more approachable than people doing the magic by hand
> (and forgetting to set TZ to UTC and the "-A" flag etc etc).
>
> Linus
This is the first of a short sequence of patches, which just removes the
tests in in git-cvs-import-script. It does, indeed, just work.
Signed-off-by: Tommy McGuire <mcguire@crsr.net>
Remove unneeded sanity tests, allowing remote CVS repos.
---
commit 21b4b44a5deee7985f14d0f4776ad0d489092a96
tree a48fbf33e90511554077f2c18053f1c000c2edb5
parent 98a96b00b88ee35866cd0b1e94697db76bd5ddf9
author Tommy M. McGuire <mcguire@crsr.net> Thu, 09 Jun 2005 13:12:25 -0500
committer Tommy M. McGuire <mcguire@crsr.net> Thu, 09 Jun 2005 13:12:25 -0500
git-cvsimport-script | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-cvsimport-script b/git-cvsimport-script
--- a/git-cvsimport-script
+++ b/git-cvsimport-script
@@ -7,7 +7,7 @@ fi
export CVSROOT="$1"
export MODULE="$2"
-if [ ! "$CVSROOT" ] || [ ! "$MODULE" ] || [ ! -d $CVSROOT ] || [ ! -d $CVSROOT/CVSROOT ] || [ ! -d $CVSROOT/$MODULE ] ; then
+if [ ! "$CVSROOT" ] || [ ! "$MODULE" ] ; then
echo "Usage: git cvsimport <cvsroot> <module>"
exit 1
fi
\f
!-------------------------------------------------------------flip-
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] git cvsimport sanity checking
2005-06-10 6:22 ` [PATCH] " Tommy M. McGuire
@ 2005-06-10 6:27 ` Tommy M. McGuire
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
2 siblings, 0 replies; 6+ messages in thread
From: Tommy M. McGuire @ 2005-06-10 6:27 UTC (permalink / raw)
To: Tommy M. McGuire; +Cc: Linus Torvalds, Git Mailing List
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] cvs-migration.txt
2005-06-10 6:22 ` [PATCH] " Tommy M. McGuire
2005-06-10 6:27 ` [PATCH] git cvsimport sanity checking Tommy M. McGuire
@ 2005-06-10 6:33 ` Tommy M. McGuire
2005-06-10 6:38 ` [PATCH] git cvsimport fuzz argument Tommy M. McGuire
2 siblings, 0 replies; 6+ messages in thread
From: Tommy M. McGuire @ 2005-06-10 6:33 UTC (permalink / raw)
To: Tommy M. McGuire; +Cc: Linus Torvalds, Git Mailing List
The way I figure it, telling someone why cvsimport is taking so long
will improve their overall user experience. :-)
Signed-off-by: Tommy McGuire <mcguire@crsr.net>
Slightly expand the cvsimport description, and make a couple of syntax edits.
---
commit 9a861c244e79634abf3c8436d720e77140d0e0e3
tree 32155e131933b2e48383644a3e3198f541f6d4b8
parent 2e670826cec5642a11e2e7d6adcb48e02225ba6d
author Tommy M. McGuire <mcguire@crsr.net> Fri, 10 Jun 2005 02:11:14 -0500
committer Tommy M. McGuire <mcguire@crsr.net> Fri, 10 Jun 2005 02:11:14 -0500
Documentation/cvs-migration.txt | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Documentation/cvs-migration.txt b/Documentation/cvs-migration.txt
--- a/Documentation/cvs-migration.txt
+++ b/Documentation/cvs-migration.txt
@@ -14,7 +14,7 @@ does a lot of things differently.
One particular suckage of CVS is very hard to work around: CVS is
basically a tool for tracking _file_ history, while git is a tool for
tracking _project_ history. This sometimes causes problems if you are
-used to doign very strange things in CVS, in particular if you're doing
+used to doing very strange things in CVS, in particular if you're doing
things like making branches of just a subset of the project. Git can't
track that, since git never tracks things on the level of an individual
file, only on the whole project level.
@@ -35,8 +35,8 @@ that you're actually working in (your wo
working directories _are_ the repositories. However, you can easily
emulate the CVS model by having one special "global repository", which
people can synchronize with. See details later, but in the meantime
-just keep in mind that with git, every checked out working tree will be
-a full revision control of its own.
+just keep in mind that with git, every checked out working tree will
+have a full revision control history of its own.
Importing a CVS archive
@@ -69,10 +69,12 @@ which will do exactly what you'd think i
archive of the named CVS module. The new archive will be created in a
subdirectory named <module>.
-It can take some time to actually do the conversion for a large archive,
+It can take some time to actually do the conversion for a large archive
+since it involves checking out from CVS every revision of every file,
and the conversion script can be reasonably chatty, but on some not very
scientific tests it averaged about eight revisions per second, so a
-medium-sized project should not take more than a couple of minutes.
+medium-sized project should not take more than a couple of minutes. For
+larger projects or remote repositories, the process may take longer.
Emulating CVS behaviour
\f
!-------------------------------------------------------------flip-
--
Tommy McGuire
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] git cvsimport fuzz argument
2005-06-10 6:22 ` [PATCH] " Tommy M. McGuire
2005-06-10 6:27 ` [PATCH] git cvsimport sanity checking Tommy M. McGuire
2005-06-10 6:33 ` [PATCH] cvs-migration.txt Tommy M. McGuire
@ 2005-06-10 6:38 ` Tommy M. McGuire
2 siblings, 0 replies; 6+ messages in thread
From: Tommy M. McGuire @ 2005-06-10 6:38 UTC (permalink / raw)
To: Tommy M. McGuire; +Cc: Linus Torvalds, Git Mailing List
Give the user the option of specifying the timestamp fuzz passed to
cvsps. Looking at the other arguments to it, I can't see anything else
that would be sane to play with. Also, use --cvs-direct, which speeds
up cvsps for remote repositories and doesn't seem to do anything bad to
local repositories.
Signed-off-by: Tommy McGuire <mcguire@crsr.net>
Add "-z fuzz" argument, passed to cvsps, and clean up argument processing.
Also, use "cvsps --cvs-direct", which is is somewhat faster.
---
commit 018aee88d1b71f96ce9ecdfba77608566f51c860
tree 623c7a40ea20ef8b68cf896605d55432cd0469ac
parent 9a861c244e79634abf3c8436d720e77140d0e0e3
author Tommy M. McGuire <mcguire@crsr.net> Fri, 10 Jun 2005 02:51:34 -0500
committer Tommy M. McGuire <mcguire@crsr.net> Fri, 10 Jun 2005 02:51:34 -0500
git-cvsimport-script | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/git-cvsimport-script b/git-cvsimport-script
--- a/git-cvsimport-script
+++ b/git-cvsimport-script
@@ -1,15 +1,26 @@
#!/bin/sh
-ARGS=""
-if [ "$1" == "-v" ]; then
- ARGS=$1
+
+usage () {
+ echo "Usage: git cvsimport [-v] [-z fuzz] <cvsroot> <module>"
+ exit 1
+}
+
+CVS2GIT=""
+CVSPS="--cvs-direct -x -A"
+while true; do
+ case "$1" in
+ -v) CVS2GIT="$1" ;;
+ -z) shift; CVSPS="$CVSPS -z $1" ;;
+ -*) usage ;;
+ *) break ;;
+ esac
shift
-fi
+done
export CVSROOT="$1"
export MODULE="$2"
if [ ! "$CVSROOT" ] || [ ! "$MODULE" ] ; then
- echo "Usage: git cvsimport <cvsroot> <module>"
- exit 1
+ usage
fi
cvsps -h 2>&1 | grep -q "cvsps version 2.1" >& /dev/null || {
@@ -20,8 +31,8 @@ cvsps -h 2>&1 | grep -q "cvsps version 2
mkdir "$MODULE" || exit 1
cd "$MODULE"
-TZ=UTC cvsps -x -A $MODULE > .git-cvsps-result
+TZ=UTC cvsps $CVSPS $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
+git-cvs2git $CVS2GIT --cvsroot="$CVSROOT" --module="$MODULE" < .git-cvsps-result > .git-create-script || exit 1
sh .git-create-script
\f
!-------------------------------------------------------------flip-
--
Tommy McGuire
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-06-10 6:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH] git cvsimport sanity checking Tommy M. McGuire
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
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).