{"thread":{"id":"7547","subject":"[PATCH 4/5] cvsimport: Reorder options in documentation for better understanding","startedAt":"2007-04-06T21:52:38Z","lastAt":"2007-04-06T21:52:43Z","messageCount":6,"participants":["Frank Lichtenheld"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"38806","messageId":"11758963633237-git-send-email-frank@lichtenheld.de","threadId":"7547","inReplyTo":null,"subject":"[PATCH 0/5] cvsimport: Improve documentation","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-06T21:52:38Z","receivedAt":"2007-04-06T21:52:38Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"I played around with git-cvsimport the last days a bit and stumbled\nupon a few inconsistencies in the documentation. This patch\nseries tries to fix them.\n\n Documentation/git-cvsimport.txt |   79 ++++++++++++++++++++--------------------\n git-cvsimport.perl              |   17 ++++----\n 2 files changed, 50 insertions(+), 46 deletions(-)\n"},{"id":"38805","messageId":"11758963634155-git-send-email-frank@lichtenheld.de","threadId":"7547","inReplyTo":"11758963633237-git-send-email-frank@lichtenheld.de","subject":"[PATCH 1/5] cvsimport: sync usage lines with existing options","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-06T21:52:39Z","receivedAt":"2007-04-06T21:52:39Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Sync both the usage lines in the code and the asciidoc\ndocumentation with the real list of options. While\nall options seems to be documented in the asciidoc\ndocument, not all of them were listed in the usage line.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/git-cvsimport.txt |    8 +++++---\n git-cvsimport.perl              |    5 +++--\n 2 files changed, 8 insertions(+), 5 deletions(-)\n\ndiff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt\nindex 0d59c06..8374d90 100644\n--- a/Documentation/git-cvsimport.txt\n+++ b/Documentation/git-cvsimport.txt\n@@ -9,9 +9,11 @@ git-cvsimport - Salvage your data out of another SCM people love to hate\n SYNOPSIS\n --------\n [verse]\n-'git-cvsimport' [-o <branch-for-HEAD>] [-h] [-v] [-d <CVSROOT>] [-s <subst>]\n-\t      [-p <options-for-cvsps>] [-C <git_repository>] [-i] [-P <file>]\n-\t      [-m] [-M regex] [<CVS_module>]\n+'git-cvsimport' [-o <branch-for-HEAD>] [-h] [-v] [-d <CVSROOT>]\n+\t      [-A <author-conv-file>] [-p <options-for-cvsps>] [-P <file>]\n+\t      [-C <git_repository>] [-z <fuzz>] [-i] [-k] [-u] [-s <subst>]\n+\t      [-a] [-m] [-M <regex>] [-S <regex>] [-L <commitlimit>]\n+\t      [<CVS_module>]\n \n \n DESCRIPTION\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex 1a1ba7b..d3fbcbc 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -36,8 +36,9 @@ sub usage() {\n \tprint STDERR <<END;\n Usage: ${\\basename $0}     # fetch/update GIT from CVS\n        [-o branch-for-HEAD] [-h] [-v] [-d CVSROOT] [-A author-conv-file]\n-       [-p opts-for-cvsps] [-C GIT_repository] [-z fuzz] [-i] [-k] [-u]\n-       [-s subst] [-a] [-m] [-M regex] [-S regex] [CVS_module]\n+       [-p opts-for-cvsps] [-P file] [-C GIT_repository] [-z fuzz] [-i] [-k]\n+       [-u] [-s subst] [-a] [-m] [-M regex] [-S regex] [-L commitlimit]\n+       [CVS_module]\n END\n \texit(1);\n }\n-- \n1.5.1\n"},{"id":"38802","messageId":"11758963643049-git-send-email-frank@lichtenheld.de","threadId":"7547","inReplyTo":"11758963634155-git-send-email-frank@lichtenheld.de","subject":"[PATCH 2/5] cvsimport: Improve documentation of CVSROOT and CVS module determination","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-06T21:52:40Z","receivedAt":"2007-04-06T21:52:40Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Document the fact that git-cvsimport tries to find out CVSROOT from\nCVS/Root and $ENV{CVSROOT} and CVS_module from CVS/Repository.\n\nAlso use ` ` syntax for all filenames for consistency.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/git-cvsimport.txt |    8 ++++++--\n 1 files changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt\nindex 8374d90..6a0821a 100644\n--- a/Documentation/git-cvsimport.txt\n+++ b/Documentation/git-cvsimport.txt\n@@ -35,7 +35,9 @@ OPTIONS\n -d <CVSROOT>::\n \tThe root of the CVS archive. May be local (a simple path) or remote;\n \tcurrently, only the :local:, :ext: and :pserver: access methods \n-\tare supported.\n+\tare supported. If not given, git-cvsimport will try to read it\n+\tfrom `CVS/Root`. If no such file exists, it checks for the\n+\t`CVSROOT` environment variable.\n \n -C <target-dir>::\n         The git repository to import to.  If the directory doesn't\n@@ -87,6 +89,8 @@ If you need to pass multiple options, separate them with a comma.\n \n <CVS_module>::\n \tThe CVS module you want to import. Relative to <CVSROOT>.\n+\tIf not given, git-cvsimport tries to read it from\n+\t`CVS/Repository`.\n \n -h::\n \tPrint a short usage message and exit.\n@@ -124,7 +128,7 @@ git-cvsimport will make it appear as those authors had\n their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly\n all along.\n +\n-For convenience, this data is saved to $GIT_DIR/cvs-authors\n+For convenience, this data is saved to `$GIT_DIR/cvs-authors`\n each time the -A option is provided and read from that same\n file each time git-cvsimport is run.\n +\n-- \n1.5.1\n"},{"id":"38803","messageId":"11758963642149-git-send-email-frank@lichtenheld.de","threadId":"7547","inReplyTo":"11758963643049-git-send-email-frank@lichtenheld.de","subject":"[PATCH 3/5] cvsimport: Improve usage error reporting","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-06T21:52:41Z","receivedAt":"2007-04-06T21:52:41Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Actually tell the user what he did wrong in case of usage errors\ninstead of only printing the general usage information.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n git-cvsimport.perl |   10 ++++++----\n 1 files changed, 6 insertions(+), 4 deletions(-)\n\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex d3fbcbc..ac74bc5 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -32,7 +32,9 @@ $ENV{'TZ'}=\"UTC\";\n our ($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_P, $opt_s,$opt_m,$opt_M,$opt_A,$opt_S,$opt_L, $opt_a);\n my (%conv_author_name, %conv_author_email);\n \n-sub usage() {\n+sub usage(;$) {\n+\tmy $msg = shift;\n+\tprint(STDERR \"Error: $msg\\n\") if $msg;\n \tprint STDERR <<END;\n Usage: ${\\basename $0}     # fetch/update GIT from CVS\n        [-o branch-for-HEAD] [-h] [-v] [-d CVSROOT] [-A author-conv-file]\n@@ -117,7 +119,7 @@ read_repo_config($opts);\n getopts($opts) or usage();\n usage if $opt_h;\n \n-@ARGV <= 1 or usage();\n+@ARGV <= 1 or usage(\"You can't specify more than one CVS module\");\n \n if ($opt_d) {\n \t$ENV{\"CVSROOT\"} = $opt_d;\n@@ -130,7 +132,7 @@ if ($opt_d) {\n } elsif ($ENV{\"CVSROOT\"}) {\n \t$opt_d = $ENV{\"CVSROOT\"};\n } else {\n-\tdie \"CVSROOT needs to be set\";\n+\tusage(\"CVSROOT needs to be set\");\n }\n $opt_o ||= \"origin\";\n $opt_s ||= \"-\";\n@@ -149,7 +151,7 @@ if ($#ARGV == 0) {\n \tchomp $cvs_tree;\n \tclose $f;\n } else {\n-\tusage();\n+\tusage(\"CVS module has to be specified\");\n }\n \n our @mergerx = ();\n-- \n1.5.1\n"},{"id":"38801","messageId":"11758963643062-git-send-email-frank@lichtenheld.de","threadId":"7547","inReplyTo":"11758963642149-git-send-email-frank@lichtenheld.de","subject":"[PATCH 4/5] cvsimport: Reorder options in documentation for better understanding","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-06T21:52:42Z","receivedAt":"2007-04-06T21:52:42Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"The current order the options are documented in makes no sense\nat all to me. Reorder them so that similar options are grouped\ntogether and also order them somehwhat by importance.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/git-cvsimport.txt |   54 +++++++++++++++++++-------------------\n 1 files changed, 27 insertions(+), 27 deletions(-)\n\ndiff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt\nindex 6a0821a..a5276f7 100644\n--- a/Documentation/git-cvsimport.txt\n+++ b/Documentation/git-cvsimport.txt\n@@ -32,6 +32,9 @@ any CVS branches, yourself.\n \n OPTIONS\n -------\n+-v::\n+\tVerbosity: let 'cvsimport' report what it is doing.\n+\n -d <CVSROOT>::\n \tThe root of the CVS archive. May be local (a simple path) or remote;\n \tcurrently, only the :local:, :ext: and :pserver: access methods \n@@ -39,10 +42,23 @@ OPTIONS\n \tfrom `CVS/Root`. If no such file exists, it checks for the\n \t`CVSROOT` environment variable.\n \n+<CVS_module>::\n+\tThe CVS module you want to import. Relative to <CVSROOT>.\n+\tIf not given, git-cvsimport tries to read it from\n+\t`CVS/Repository`.\n+\n -C <target-dir>::\n         The git repository to import to.  If the directory doesn't\n         exist, it will be created.  Default is the current directory.\n \n+-o <branch-for-HEAD>::\n+\tThe 'HEAD' branch from CVS is imported to the 'origin' branch within\n+\tthe git repository, as 'HEAD' already has a special meaning for git.\n+\tUse this option if you want to import into a different branch.\n++\n+Use '-o master' for continuing an import that was initially done by\n+the old cvs2git tool.\n+\n -i::\n \tImport-only: don't perform a checkout after importing.  This option\n \tensures the working directory and index remain untouched and will\n@@ -56,13 +72,8 @@ OPTIONS\n -u::\n \tConvert underscores in tag and branch names to dots.\n \n--o <branch-for-HEAD>::\n-\tThe 'HEAD' branch from CVS is imported to the 'origin' branch within\n-\tthe git repository, as 'HEAD' already has a special meaning for git.\n-\tUse this option if you want to import into a different branch.\n-+\n-Use '-o master' for continuing an import that was initially done by\n-the old cvs2git tool.\n+-s <subst>::\n+\tSubstitute the character \"/\" in branch names with <subst>\n \n -p <options-for-cvsps>::\n \tAdditional options for cvsps.\n@@ -70,6 +81,10 @@ the old cvs2git tool.\n +\n If you need to pass multiple options, separate them with a comma.\n \n+-z <fuzz>::\n+\tPass the timestamp fuzz factor to cvsps, in seconds. If unset,\n+\tcvsps defaults to 300s.\n+\n -P <cvsps-output-file>::\n \tInstead of calling cvsps, read the provided cvsps output file. Useful\n \tfor debugging or when cvsps is being handled outside cvsimport.\n@@ -84,31 +99,13 @@ If you need to pass multiple options, separate them with a comma.\n \tregex. It can be used with -m to also see the default regexes. \n \tYou must escape forward slashes. \n \n--v::\n-\tVerbosity: let 'cvsimport' report what it is doing.\n-\n-<CVS_module>::\n-\tThe CVS module you want to import. Relative to <CVSROOT>.\n-\tIf not given, git-cvsimport tries to read it from\n-\t`CVS/Repository`.\n-\n--h::\n-\tPrint a short usage message and exit.\n-\n--z <fuzz>::\n-\tPass the timestamp fuzz factor to cvsps, in seconds. If unset,\n-\tcvsps defaults to 300s.\n-\n--s <subst>::\n-\tSubstitute the character \"/\" in branch names with <subst>\n+-S <regex>::\n+\tSkip paths matching the regex.\n \n -a::\n \tImport all commits, including recent ones. cvsimport by default\n \tskips commits that have a timestamp less than 10 minutes ago.\n \n--S <regex>::\n-\tSkip paths matching the regex.\n-\n -L <limit>::\n \tLimit the number of commits imported. Workaround for cases where\n \tcvsimport leaks memory.\n@@ -136,6 +133,9 @@ It is not recommended to use this feature if you intend to\n export changes back to CVS again later with\n gitlink:git-cvsexportcommit[1].\n \n+-h::\n+\tPrint a short usage message and exit.\n+\n OUTPUT\n ------\n If '-v' is specified, the script reports what it is doing.\n-- \n1.5.1\n"},{"id":"38804","messageId":"11758963644092-git-send-email-frank@lichtenheld.de","threadId":"7547","inReplyTo":"11758963643062-git-send-email-frank@lichtenheld.de","subject":"[PATCH 5/5] cvsimport: Improve formating consistency","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-06T21:52:43Z","receivedAt":"2007-04-06T21:52:43Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Use ' ' syntax for all commandline options mentioned in text.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/git-cvsimport.txt |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt\nindex a5276f7..e0be856 100644\n--- a/Documentation/git-cvsimport.txt\n+++ b/Documentation/git-cvsimport.txt\n@@ -65,7 +65,7 @@ the old cvs2git tool.\n \tnot create them if they do not exist.\n \n -k::\n-\tKill keywords: will extract files with -kk from the CVS archive\n+\tKill keywords: will extract files with '-kk' from the CVS archive\n \tto avoid noisy changesets. Highly recommended, but off by default\n \tto preserve compatibility with early imported trees. \n \n@@ -96,7 +96,7 @@ If you need to pass multiple options, separate them with a comma.\n \n -M <regex>::\n \tAttempt to detect merges based on the commit message with a custom\n-\tregex. It can be used with -m to also see the default regexes. \n+\tregex. It can be used with '-m' to also see the default regexes.\n \tYou must escape forward slashes. \n \n -S <regex>::\n@@ -126,7 +126,7 @@ their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly\n all along.\n +\n For convenience, this data is saved to `$GIT_DIR/cvs-authors`\n-each time the -A option is provided and read from that same\n+each time the '-A' option is provided and read from that same\n file each time git-cvsimport is run.\n +\n It is not recommended to use this feature if you intend to\n-- \n1.5.1\n"}]}