{"thread":{"id":"857","subject":"\"git cvsimport\"","startedAt":"2005-06-07T23:03:53Z","lastAt":"2005-06-10T06:38:32Z","messageCount":6,"participants":["Linus Torvalds","Tommy M. McGuire"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"4681","messageId":"Pine.LNX.4.58.0506071556000.2286@ppc970.osdl.org","threadId":"857","inReplyTo":null,"subject":"\"git cvsimport\"","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-06-07T23:03:53Z","receivedAt":"2005-06-07T23:03:53Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\nOk,\n here's something for testers and/or documentation people: I wrapped a \nlittle script around cvs2git (which I imported from the git tools thing), \nand now you can do\n\n\tgit cvsimport <cvsroot> <modulename>\n\nand it might all \"just work\".\n\nRight now the little sript is actually being anal and checking that \nCVSROOT is a directory, even though I think it all _should_ work even if \nCVSROOT is remote too. But I don't have any remote things to test, and for \nall I know maybe performance is horrible, so for now it artificially \nlimits it to locally accessible CVS repos.\n\nI'd love it if somebody tested the remote case (and, if it works, sends me\na patch that just removes the anal tests in git-cvsimport-script), and\nmaybe even updated the information a bit more.. As it is, that\nDocumentation/cvs-migration.txt file is a bit on the light side.\n\nFinally, I don't know what to do about cvsps options. It seems that the \ndefault time-fuzz is a bit too long for some projects, so at least that \none should be overridable. So my silly script is not exactly wonderful, \nbut I think it's more approachable than people doing the magic by hand \n(and forgetting to set TZ to UTC and the \"-A\" flag etc etc).\n\n\t\tLinus\n"},{"id":"4685","messageId":"20050608053240.GA28007@immutable.crsr.net","threadId":"857","inReplyTo":"Pine.LNX.4.58.0506071556000.2286@ppc970.osdl.org","subject":"Re: \"git cvsimport\"","fromName":"Tommy M. McGuire","fromEmail":"mcguire@crsr.net","sentAt":"2005-06-08T05:32:40Z","receivedAt":"2005-06-08T05:32:40Z","isPatch":false,"sender":{"key":"mcguire@crsr.net","avatar":null},"body":"On Tue, Jun 07, 2005 at 04:03:53PM -0700, Linus Torvalds wrote:\n> \n> Ok,\n>  here's something for testers and/or documentation people: I wrapped a \n> little script around cvs2git (which I imported from the git tools thing), \n> and now you can do\n> \n> \tgit cvsimport <cvsroot> <modulename>\n> \n> and it might all \"just work\".\n> \n> Right now the little sript is actually being anal and checking that \n> CVSROOT is a directory, even though I think it all _should_ work even if \n> CVSROOT is remote too. But I don't have any remote things to test, and for \n> all I know maybe performance is horrible, so for now it artificially \n> limits it to locally accessible CVS repos.\n> \n> I'd love it if somebody tested the remote case (and, if it works, sends me\n> a patch that just removes the anal tests in git-cvsimport-script), and\n> maybe even updated the information a bit more.. As it is, that\n> Documentation/cvs-migration.txt file is a bit on the light side.\n> \n> Finally, I don't know what to do about cvsps options. It seems that the \n> default time-fuzz is a bit too long for some projects, so at least that \n> one should be overridable. So my silly script is not exactly wonderful, \n> but I think it's more approachable than people doing the magic by hand \n> (and forgetting to set TZ to UTC and the \"-A\" flag etc etc).\n> \n> \t\tLinus\n\nIt seems to work for me.  I'm still sanity checking the results.\n\nPerformance is indeed horrible for the remote case.  I don't know how\nhorrible it would be for someone in a sane environment, since I'm behind\none of SBC's DSL gateways, which thinks (emphasis on \"thinks\") it is a\nnameserver.\n\nThe script produced by cvs2git checks out every revision of every file,\nright?  Would \"cvsps -g -p<dir>\" improve cvs2git?  I don't think it\nwould help performance (it checks out the files to generate the patchset\ndiffs (?)), but making the ugly someone else's problem is always good.\nAlso, what about -x, to force cvsps to regenerate it's cached idea of\nthe repository's patchsets?\n\ncvsps seems a little weak on the whole error message idea (misspelling\ncvsroot leads to complaints about CVS versions).  \n\n-- \nTommy McGuire\n"},{"id":"4815","messageId":"20050610062206.GA3992@immutable.crsr.net","threadId":"857","inReplyTo":"Pine.LNX.4.58.0506071556000.2286@ppc970.osdl.org","subject":"[PATCH] Re: \"git cvsimport\"","fromName":"Tommy M. McGuire","fromEmail":"mcguire@crsr.net","sentAt":"2005-06-10T06:22:06Z","receivedAt":"2005-06-10T06:22:06Z","isPatch":true,"sender":{"key":"mcguire@crsr.net","avatar":null},"body":"On Tue, Jun 07, 2005 at 04:03:53PM -0700, Linus Torvalds wrote:\n> I'd love it if somebody tested the remote case (and, if it works, sends me\n> a patch that just removes the anal tests in git-cvsimport-script), and\n> maybe even updated the information a bit more.. As it is, that\n> Documentation/cvs-migration.txt file is a bit on the light side.\n> \n> Finally, I don't know what to do about cvsps options. It seems that the \n> default time-fuzz is a bit too long for some projects, so at least that \n> one should be overridable. So my silly script is not exactly wonderful, \n> but I think it's more approachable than people doing the magic by hand \n> (and forgetting to set TZ to UTC and the \"-A\" flag etc etc).\n> \n> \t\tLinus\n\nThis is the first of a short sequence of patches, which just removes the\ntests in in git-cvs-import-script.  It does, indeed, just work.\n\nSigned-off-by: Tommy McGuire <mcguire@crsr.net>\n\nRemove unneeded sanity tests, allowing remote CVS repos.\n\n---\ncommit 21b4b44a5deee7985f14d0f4776ad0d489092a96\ntree a48fbf33e90511554077f2c18053f1c000c2edb5\nparent 98a96b00b88ee35866cd0b1e94697db76bd5ddf9\nauthor Tommy M. McGuire <mcguire@crsr.net> Thu, 09 Jun 2005 13:12:25 -0500\ncommitter Tommy M. McGuire <mcguire@crsr.net> Thu, 09 Jun 2005 13:12:25 -0500\n\n git-cvsimport-script |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-cvsimport-script b/git-cvsimport-script\n--- a/git-cvsimport-script\n+++ b/git-cvsimport-script\n@@ -7,7 +7,7 @@ fi\n \n export CVSROOT=\"$1\"\n export MODULE=\"$2\"\n-if [ ! \"$CVSROOT\" ] || [ ! \"$MODULE\" ] || [ ! -d $CVSROOT ] || [ ! -d $CVSROOT/CVSROOT ] || [ ! -d $CVSROOT/$MODULE ] ; then\n+if [ ! \"$CVSROOT\" ] || [ ! \"$MODULE\" ] ; then\n \techo \"Usage: git cvsimport <cvsroot> <module>\"\n \texit 1\n fi\n\n\n\f\n!-------------------------------------------------------------flip-\n\n\n"},{"id":"4816","messageId":"20050610062747.GA4763@immutable.crsr.net","threadId":"857","inReplyTo":"20050610062206.GA3992@immutable.crsr.net","subject":"[PATCH] git cvsimport sanity checking","fromName":"Tommy M. McGuire","fromEmail":"mcguire@crsr.net","sentAt":"2005-06-10T06:27:47Z","receivedAt":"2005-06-10T06:27:47Z","isPatch":true,"sender":{"key":"mcguire@crsr.net","avatar":null},"body":"This patch adds some sanity checking to git-cvsimport-script,\nspecifically forcing the use of cvsps -x (to get the latest information\nfrom the repository, rather than whatever is in the cache) and aborting\nearly if cvsps does not produce any output.\n\nI debated removing the $MODULE directory following an abort, but I\neventually decided leaving stuff behind would make debugging easier.  On\nthe other hand, this patch should help with the \"cvsimport left me with\nan empty repository\" complaints.\n\nSigned-off-by: Tommy McGuire <mcguire@crsr.net>\n\nCall cvsps with the -x flag, to get the current state of the repository,\nand abort the cvs import early if cvsps does not produce any output.\n\n---\ncommit 2e670826cec5642a11e2e7d6adcb48e02225ba6d\ntree 25e4f590772b9c0bc8ac37f8a57f4a08435ed5c6\nparent 21b4b44a5deee7985f14d0f4776ad0d489092a96\nauthor Tommy M. McGuire <mcguire@crsr.net> Fri, 10 Jun 2005 01:38:42 -0500\ncommitter Tommy M. McGuire <mcguire@crsr.net> Fri, 10 Jun 2005 01:38:42 -0500\n\n git-cvsimport-script |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/git-cvsimport-script b/git-cvsimport-script\n--- a/git-cvsimport-script\n+++ b/git-cvsimport-script\n@@ -20,6 +20,8 @@ cvsps -h 2>&1 | grep -q \"cvsps version 2\n mkdir \"$MODULE\" || exit 1\n cd \"$MODULE\"\n \n-TZ=UTC cvsps -A $MODULE | git-cvs2git $ARGS --cvsroot=\"$CVSROOT\" --module=\"$MODULE\" > .git-create-script || exit 1\n+TZ=UTC cvsps -x -A $MODULE > .git-cvsps-result\n+[ -s .git-cvsps-result ] || exit 1\n+git-cvs2git $ARGS --cvsroot=\"$CVSROOT\" --module=\"$MODULE\" < .git-cvsps-result > .git-create-script || exit 1\n sh .git-create-script\n \n\n\n\f\n!-------------------------------------------------------------flip-\n\n\n-- \nTommy McGuire\n"},{"id":"4817","messageId":"20050610063344.GB4763@immutable.crsr.net","threadId":"857","inReplyTo":"20050610062206.GA3992@immutable.crsr.net","subject":"[PATCH] cvs-migration.txt","fromName":"Tommy M. McGuire","fromEmail":"mcguire@crsr.net","sentAt":"2005-06-10T06:33:44Z","receivedAt":"2005-06-10T06:33:44Z","isPatch":true,"sender":{"key":"mcguire@crsr.net","avatar":null},"body":"The way I figure it, telling someone why cvsimport is taking so long\nwill improve their overall user experience.  :-)\n\nSigned-off-by: Tommy McGuire <mcguire@crsr.net>\n\nSlightly expand the cvsimport description, and make a couple of syntax edits.\n\n---\ncommit 9a861c244e79634abf3c8436d720e77140d0e0e3\ntree 32155e131933b2e48383644a3e3198f541f6d4b8\nparent 2e670826cec5642a11e2e7d6adcb48e02225ba6d\nauthor Tommy M. McGuire <mcguire@crsr.net> Fri, 10 Jun 2005 02:11:14 -0500\ncommitter Tommy M. McGuire <mcguire@crsr.net> Fri, 10 Jun 2005 02:11:14 -0500\n\n Documentation/cvs-migration.txt |   12 +++++++-----\n 1 files changed, 7 insertions(+), 5 deletions(-)\n\ndiff --git a/Documentation/cvs-migration.txt b/Documentation/cvs-migration.txt\n--- a/Documentation/cvs-migration.txt\n+++ b/Documentation/cvs-migration.txt\n@@ -14,7 +14,7 @@ does a lot of things differently. \n One particular suckage of CVS is very hard to work around: CVS is\n basically a tool for tracking _file_ history, while git is a tool for\n tracking _project_ history.  This sometimes causes problems if you are\n-used to doign very strange things in CVS, in particular if you're doing\n+used to doing very strange things in CVS, in particular if you're doing\n things like making branches of just a subset of the project.  Git can't\n track that, since git never tracks things on the level of an individual\n file, only on the whole project level. \n@@ -35,8 +35,8 @@ that you're actually working in (your wo\n working directories _are_ the repositories.  However, you can easily\n emulate the CVS model by having one special \"global repository\", which\n people can synchronize with.  See details later, but in the meantime\n-just keep in mind that with git, every checked out working tree will be\n-a full revision control of its own. \n+just keep in mind that with git, every checked out working tree will\n+have a full revision control history of its own.\n \n \n Importing a CVS archive\n@@ -69,10 +69,12 @@ which will do exactly what you'd think i\n archive of the named CVS module. The new archive will be created in a\n subdirectory named <module>.\n \n-It can take some time to actually do the conversion for a large archive,\n+It can take some time to actually do the conversion for a large archive\n+since it involves checking out from CVS every revision of every file,\n and the conversion script can be reasonably chatty, but on some not very\n scientific tests it averaged about eight revisions per second, so a\n-medium-sized project should not take more than a couple of minutes.\n+medium-sized project should not take more than a couple of minutes.  For\n+larger projects or remote repositories, the process may take longer.\n \n \n Emulating CVS behaviour\n\n\n\f\n!-------------------------------------------------------------flip-\n\n\n-- \nTommy McGuire\n"},{"id":"4818","messageId":"20050610063832.GC4763@immutable.crsr.net","threadId":"857","inReplyTo":"20050610062206.GA3992@immutable.crsr.net","subject":"[PATCH] git cvsimport fuzz argument","fromName":"Tommy M. McGuire","fromEmail":"mcguire@crsr.net","sentAt":"2005-06-10T06:38:32Z","receivedAt":"2005-06-10T06:38:32Z","isPatch":true,"sender":{"key":"mcguire@crsr.net","avatar":null},"body":"Give the user the option of specifying the timestamp fuzz passed to\ncvsps.  Looking at the other arguments to it, I can't see anything else\nthat would be sane to play with.  Also, use --cvs-direct, which speeds\nup cvsps for remote repositories and doesn't seem to do anything bad to\nlocal repositories.\n\nSigned-off-by: Tommy McGuire <mcguire@crsr.net>\n\nAdd \"-z fuzz\" argument, passed to cvsps, and clean up argument processing.\nAlso, use \"cvsps --cvs-direct\", which is is somewhat faster.\n\n---\ncommit 018aee88d1b71f96ce9ecdfba77608566f51c860\ntree 623c7a40ea20ef8b68cf896605d55432cd0469ac\nparent 9a861c244e79634abf3c8436d720e77140d0e0e3\nauthor Tommy M. McGuire <mcguire@crsr.net> Fri, 10 Jun 2005 02:51:34 -0500\ncommitter Tommy M. McGuire <mcguire@crsr.net> Fri, 10 Jun 2005 02:51:34 -0500\n\n git-cvsimport-script |   27 +++++++++++++++++++--------\n 1 files changed, 19 insertions(+), 8 deletions(-)\n\ndiff --git a/git-cvsimport-script b/git-cvsimport-script\n--- a/git-cvsimport-script\n+++ b/git-cvsimport-script\n@@ -1,15 +1,26 @@\n #!/bin/sh\n-ARGS=\"\"\n-if [ \"$1\" == \"-v\" ]; then\n-\tARGS=$1\n+\n+usage () {\n+\techo \"Usage: git cvsimport [-v] [-z fuzz] <cvsroot> <module>\"\n+\texit 1\n+}\n+\n+CVS2GIT=\"\"\n+CVSPS=\"--cvs-direct -x -A\"\n+while true; do\n+\tcase \"$1\" in\n+\t-v) CVS2GIT=\"$1\" ;;\n+\t-z) shift; CVSPS=\"$CVSPS -z $1\" ;;\n+\t-*) usage ;;\n+\t*)  break ;;\n+\tesac\n \tshift\n-fi\n+done\n \n export CVSROOT=\"$1\"\n export MODULE=\"$2\"\n if [ ! \"$CVSROOT\" ] || [ ! \"$MODULE\" ] ; then\n-\techo \"Usage: git cvsimport <cvsroot> <module>\"\n-\texit 1\n+\tusage\n fi\n \n cvsps -h 2>&1 | grep -q \"cvsps version 2.1\" >& /dev/null || {\n@@ -20,8 +31,8 @@ cvsps -h 2>&1 | grep -q \"cvsps version 2\n mkdir \"$MODULE\" || exit 1\n cd \"$MODULE\"\n \n-TZ=UTC cvsps -x -A $MODULE > .git-cvsps-result\n+TZ=UTC cvsps $CVSPS $MODULE > .git-cvsps-result\n [ -s .git-cvsps-result ] || exit 1\n-git-cvs2git $ARGS --cvsroot=\"$CVSROOT\" --module=\"$MODULE\" < .git-cvsps-result > .git-create-script || exit 1\n+git-cvs2git $CVS2GIT --cvsroot=\"$CVSROOT\" --module=\"$MODULE\" < .git-cvsps-result > .git-create-script || exit 1\n sh .git-create-script\n \n\n\n\f\n!-------------------------------------------------------------flip-\n\n\n-- \nTommy McGuire\n"}]}