{"thread":{"id":"7315","subject":"[PATCH 1/5] cvsserver: Introduce new state variable 'method'","startedAt":"2007-03-19T15:55:56Z","lastAt":"2007-04-13T16:13:42Z","messageCount":23,"participants":["Frank Lichtenheld","Martin Langhoff","Junio C Hamano","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"37511","messageId":"11743197614111-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":null,"subject":"[PATCH/RFC] cvsserver: Make configuration way more flexible","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-19T15:55:56Z","receivedAt":"2007-03-19T15:55:56Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Hi.\n\nThis patch series started with the thought that it is really cumbersome\nto use the pserver access via git-cvsserver without giving the\nnobody user write access to the .git directory itself (especially since\nSQLite seems to insist on creating temporary files in the\nsame directory as the database itself on writes).\n\nThis problem itself is easily fixable with an one-line patch\nto git-cvsserver that uses a gitcvs.dbdir configuration variable.\n\nI tried to abstract the problem a bit more though and created\nmeans to configure all aspects of the database backend in a\nvery flexible manner. I would glad about comments on wether\nI made my solution overly complex on the way...\n\nMost of the changes are tested intensively with test repositories,\nexceptions are noted in the individual patches. More testing welcome\nof course.\n\nThe documentation updates are not yet complete.\n\nGruesse,\n\tFrank Lichtenheld\n\n Documentation/git-cvsserver.txt |   12 ++++++\n git-cvsserver.perl              |   72 ++++++++++++++++++++++++++++------------\n 2 files changed, 63 insertions(+), 21 deletions(-)\n"},{"id":"37507","messageId":"11743197614055-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":"11743197614111-git-send-email-frank@lichtenheld.de","subject":"[PATCH 1/5] cvsserver: Introduce new state variable 'method'","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-19T15:55:57Z","receivedAt":"2007-03-19T15:55:57Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"$state->{method} contains the CVS access method used,\neither 'ext' or 'pserver'\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n git-cvsserver.perl |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex 68aa752..e9d489b 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -91,7 +91,9 @@ $log->debug(\"Temporary directory is '$TEMP_DIR'\");\n # if we are called with a pserver argument,\n # deal with the authentication cat before entering the\n # main loop\n+$state->{method} = 'ext';\n if (@ARGV && $ARGV[0] eq 'pserver') {\n+    $state->{method} = 'pserver';\n     my $line = <STDIN>; chomp $line;\n     unless( $line eq 'BEGIN AUTH REQUEST') {\n        die \"E Do not understand $line - expecting BEGIN AUTH REQUEST\\n\";\n@@ -1026,7 +1028,7 @@ sub req_ci\n \n     $log->info(\"req_ci : \" . ( defined($data) ? $data : \"[NULL]\" ));\n \n-    if ( @ARGV && $ARGV[0] eq 'pserver')\n+    if ( $state->{method} eq 'pserver')\n     {\n         print \"error 1 pserver access cannot commit\\n\";\n         exit;\n-- \n1.5.0.3\n"},{"id":"37512","messageId":"1174319761945-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":"11743197614111-git-send-email-frank@lichtenheld.de","subject":"[PATCH 2/5] cvsserver: Handle three part keys in git config correctly","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-19T15:55:58Z","receivedAt":"2007-03-19T15:55:58Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"This is intended to be used in the form gitcvs.<method>.<var>\nbut this patch doesn't introduce any users yet.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n git-cvsserver.perl |    8 ++++++--\n 1 files changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex e9d489b..4edb796 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -183,8 +183,12 @@ sub req_Root\n     }\n     foreach my $line ( @gitvars )\n     {\n-        next unless ( $line =~ /^(.*?)\\.(.*?)=(.*)$/ );\n-        $cfg->{$1}{$2} = $3;\n+        next unless ( $line =~ /^(.*?)\\.(.*?)(?:\\.(.*?))?=(.*)$/ );\n+        unless ($3) {\n+            $cfg->{$1}{$2} = $4;\n+        } else {\n+            $cfg->{$1}{$2}{$3} = $4;\n+        }\n     }\n \n     unless ( defined ( $cfg->{gitcvs}{enabled} ) and $cfg->{gitcvs}{enabled} =~ /^\\s*(1|true|yes)\\s*$/i )\n-- \n1.5.0.3\n"},{"id":"37509","messageId":"11743197613605-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":"11743197614111-git-send-email-frank@lichtenheld.de","subject":"[PATCH 3/5] cvsserver: Allow to override the configuration per access method","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-19T15:55:59Z","receivedAt":"2007-03-19T15:55:59Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Allow to override the gitcvs.enabled and gitcvs.logfile configuration\nvariables for each access method (i.e. \"ext\" or \"pserver\") in the\nform gitcvs.<method>.<var>\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/git-cvsserver.txt |   12 ++++++++++++\n git-cvsserver.perl              |   10 +++++++---\n 2 files changed, 19 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt\nindex 85d0950..6904aad 100644\n--- a/Documentation/git-cvsserver.txt\n+++ b/Documentation/git-cvsserver.txt\n@@ -68,6 +68,18 @@ Note: you need to ensure each user that is going to invoke git-cvsserver has\n write access to the log file and to the git repository. When offering anon\n access via pserver, this means that the nobody user should have write access\n to at least the sqlite database at the root of the repository.\n+\n+Both configuration variables can also be overriden for a specific method of\n+access. Valid method names are \"ext\" (for SSH access) and \"pserver\". The\n+following example configuration would disable pserver access while still\n+allowing access over SSH.\n+------\n+   [gitcvs]\n+        enabled=0\n+\n+   [gitcvs \"ext\"]\n+        enabled=1\n+------\n --\n 3. On the client machine you need to set the following variables.\n    CVSROOT should be set as per normal, but the directory should point at the\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex 4edb796..5d2b6f3 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -191,7 +191,10 @@ sub req_Root\n         }\n     }\n \n-    unless ( defined ( $cfg->{gitcvs}{enabled} ) and $cfg->{gitcvs}{enabled} =~ /^\\s*(1|true|yes)\\s*$/i )\n+    unless ( ($cfg->{gitcvs}{$state->{method}}{enabled}\n+\t      and $cfg->{gitcvs}{$state->{method}}{enabled} =~ /^\\s*(1|true|yes)\\s*$/i)\n+\t     or ($cfg->{gitcvs}{enabled}\n+\t      and $cfg->{gitcvs}{enabled} =~ /^\\s*(1|true|yes)\\s*$/i) )\n     {\n         print \"E GITCVS emulation needs to be enabled on this repo\\n\";\n         print \"E the repo config file needs a [gitcvs] section added, and the parameter 'enabled' set to 1\\n\";\n@@ -200,9 +203,10 @@ sub req_Root\n         return 0;\n     }\n \n-    if ( defined ( $cfg->{gitcvs}{logfile} ) )\n+    my $logfile = $cfg->{gitcvs}{$state->{method}}{logfile} || $cfg->{gitcvs}{logfile};\n+    if ( $logfile )\n     {\n-        $log->setfile($cfg->{gitcvs}{logfile});\n+        $log->setfile($logfile);\n     } else {\n         $log->nofile();\n     }\n-- \n1.5.0.3\n"},{"id":"37508","messageId":"11743197611364-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":"11743197614111-git-send-email-frank@lichtenheld.de","subject":"[PATCH 4/5] cvsserver: Make the database backend configurable","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-19T15:56:00Z","receivedAt":"2007-03-19T15:56:00Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Make all the different parts of the database backend connection\nconfigurable. This adds the following string configuration variables:\n- gitcvs.dbdriver\n- gitcvs.dbname\n- gitcvs.dbuser\n- gitcvs.dbpass\nThe default values emulate the current behavior exactly for\nbackwards compatibility.\nAll configuration variables can also be specified for a specific\naccess method (i.e. in the form gitcvs.<method>.<var>)\n\nThe dbdriver/dbuser/dbpass variables are added for completness.\nNo other backend than SQLite is tested yet.\nThe dbname variable on the other hand is useful with this backend\nalready (to not discriminate against other possible backends\nit was not splitted in dbdir and dbfile).\n\nBoth dbname and dbuser support dynamic variable substitution where\nthe available variables are:\n%m -- the CVS 'module' (i.e. GIT 'head') worked on\n%a -- CVS access method used (i.e. 'ext' or 'pserver')\n%u -- User name of the user invoking git-cvsserver\n%G -- .git directory name\n%g -- .git directory name, mangled to be used in a filename,\n      currently this substitutes all chars except for [\\w.-]\n      with '_'\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n git-cvsserver.perl |   40 ++++++++++++++++++++++++++++++++++------\n 1 files changed, 34 insertions(+), 6 deletions(-)\n\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex 5d2b6f3..6d10aa3 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -2141,19 +2141,33 @@ sub new\n \n     bless $self, $class;\n \n-    $self->{dbdir} = $config . \"/\";\n-    die \"Database dir '$self->{dbdir}' isn't a directory\" unless ( defined($self->{dbdir}) and -d $self->{dbdir} );\n-\n     $self->{module} = $module;\n-    $self->{file} = $self->{dbdir} . \"/gitcvs.$module.sqlite\";\n-\n     $self->{git_path} = $config . \"/\";\n \n     $self->{log} = $log;\n \n     die \"Git repo '$self->{git_path}' doesn't exist\" unless ( -d $self->{git_path} );\n \n-    $self->{dbh} = DBI->connect(\"dbi:SQLite:dbname=\" . $self->{file},\"\",\"\");\n+    $self->{dbdriver} = $cfg->{gitcvs}{$state->{method}}{dbdriver} ||\n+        $cfg->{gitcvs}{dbdriver} || \"dbi:SQLite\";\n+    $self->{dbname} = $cfg->{gitcvs}{$state->{method}}{dbname} ||\n+        $cfg->{gitcvs}{dbname} || \"%Ggitcvs.%m.sqlite\";\n+    $self->{dbuser} = $cfg->{gitcvs}{$state->{method}}{dbuser} ||\n+        $cfg->{gitcvs}{dbuser} || \"\";\n+    $self->{dbpass} = $cfg->{gitcvs}{$state->{method}}{dbpass} ||\n+        $cfg->{gitcvs}{dbpass} || \"\";\n+    my %mapping = ( m => $module,\n+                    a => $state->{method},\n+                    u => getlogin || getpwuid($<) || $<,\n+                    G => $self->{git_path},\n+                    g => mangle_dirname($self->{git_path}),\n+                    );\n+    $self->{dbname} =~ s/%([mauGg])/$mapping{$1}/eg;\n+    $self->{dbuser} =~ s/%([mauGg])/$mapping{$1}/eg;\n+\n+    $self->{dbh} = DBI->connect(\"$self->{dbdriver}:dbname=$self->{dbname}\",\n+                                $self->{dbuser},\n+                                $self->{dbpass});\n \n     $self->{tables} = {};\n     foreach my $table ( $self->{dbh}->tables )\n@@ -2857,5 +2871,19 @@ sub safe_pipe_capture {\n     return wantarray ? @output : join('',@output);\n }\n \n+=head2 mangle_dirname\n+\n+create a string from a directory name that is suitable to use as\n+part of a filename, mainly by converting all chars except \\w.- to _\n+\n+=cut\n+sub mangle_dirname {\n+    my $dirname = shift;\n+    return unless defined $dirname;\n+\n+    $dirname =~ s/[^\\w.-]/_/g;\n+\n+    return $dirname;\n+}\n \n 1;\n-- \n1.5.0.3\n"},{"id":"37510","messageId":"11743197672771-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":"11743197614111-git-send-email-frank@lichtenheld.de","subject":"[PATCH 5/5] cvsserver: Abort if connect to database fails","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-19T15:56:01Z","receivedAt":"2007-03-19T15:56:01Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Currently all calls to the database backend make no\nerror checking or handling at all. At least abort\nif the connection to the database failed since\nthere is really no way we could do anything useful\nafter that.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n git-cvsserver.perl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex 6d10aa3..941a91b 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -2168,6 +2168,7 @@ sub new\n     $self->{dbh} = DBI->connect(\"$self->{dbdriver}:dbname=$self->{dbname}\",\n                                 $self->{dbuser},\n                                 $self->{dbpass});\n+    die \"Error connecting to database\\n\" unless defined $self->{dbh};\n \n     $self->{tables} = {};\n     foreach my $table ( $self->{dbh}->tables )\n-- \n1.5.0.3\n"},{"id":"37538","messageId":"46a038f90703191247y6b70c272s2473ab28acd63682@mail.gmail.com","threadId":"7315","inReplyTo":"11743197611364-git-send-email-frank@lichtenheld.de","subject":"Re: [PATCH 4/5] cvsserver: Make the database backend configurable","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2007-03-19T19:47:12Z","receivedAt":"2007-03-19T19:47:12Z","isPatch":true,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On 3/20/07, Frank Lichtenheld <frank@lichtenheld.de> wrote:\n> Make all the different parts of the database backend connection\n> configurable. This adds the following string configuration variables:\n\nNice. I guess the hard part of this is going to be creating DB schemas\nthat are reasonably portable. The SQL we use is as vanilla as it gets\n;-)\n\n> Both dbname and dbuser support dynamic variable substitution where\n> the available variables are:\n> %m -- the CVS 'module' (i.e. GIT 'head') worked on\n> %a -- CVS access method used (i.e. 'ext' or 'pserver')\n> %u -- User name of the user invoking git-cvsserver\n> %G -- .git directory name\n> %g -- .git directory name, mangled to be used in a filename,\n>       currently this substitutes all chars except for [\\w.-]\n>       with '_'\n\nIt's missing from the POD though ;-)\n\nGood to see patches coming to cvsserver -- I haven't been able to do\nmuch on it lately, and my pet projects are pretty hard. If anyone\ncares, they are:\n\n - mimic CVS branch support\n - allow skewing version numbers to match an existing repo\n\nwith those 2 in place, we'd have a means of applying a \"vampire tap\"\nto an existing cvs server and take over without anyone noticing. But\ntehy are both hard, hard hard.\n\ncheers.\n\n\nmartin\n"},{"id":"37818","messageId":"20070323151757.GH8017@planck.djpig.de","threadId":"7315","inReplyTo":"46a038f90703191247y6b70c272s2473ab28acd63682@mail.gmail.com","subject":"Re: [PATCH 4/5] cvsserver: Make the database backend configurable","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-23T15:17:58Z","receivedAt":"2007-03-23T15:17:58Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Tue, Mar 20, 2007 at 07:47:12AM +1200, Martin Langhoff wrote:\n> On 3/20/07, Frank Lichtenheld <frank@lichtenheld.de> wrote:\n> >Make all the different parts of the database backend connection\n> >configurable. This adds the following string configuration variables:\n> \n> Nice. I guess the hard part of this is going to be creating DB schemas\n> that are reasonably portable. The SQL we use is as vanilla as it gets\n> ;-)\n\nI've now actually made a quick test to see how we do when using other\nbackends (with PostgreSQL 8.2, will also do one with MySQL later).\n\nSome problems that I saw:\n\n - It would probably cool to be able to tell git-cvsserver that it\n   should use only one database for all modules (i.e. git branches)\n   This way one doesn't need to give the users database creation\n   privileges. Of course pre-creating all databases possibly ever needed\n   is possible but somewhat cumbersome.\n \n - DBI->tables seems to be a portability problem. e.g. with SQLite\n   it returns \"head\", \"commitmsgs\", etc; with PostgreSQL it returns\n   public.head, public.commitmsgs, etc. The output of MySQL might\n   be different, too.\n\n> >Both dbname and dbuser support dynamic variable substitution where\n> >the available variables are:\n> >%m -- the CVS 'module' (i.e. GIT 'head') worked on\n> >%a -- CVS access method used (i.e. 'ext' or 'pserver')\n> >%u -- User name of the user invoking git-cvsserver\n> >%G -- .git directory name\n> >%g -- .git directory name, mangled to be used in a filename,\n> >      currently this substitutes all chars except for [\\w.-]\n> >      with '_'\n> \n> It's missing from the POD though ;-)\n\nYou mean the asciidoc, right?\n\nAnd yeah, I know. Writing English documentation is not actually one of my\npreferred occupations :/ Will do it, though.\n\n[...]\n> with those 2 in place, we'd have a means of applying a \"vampire tap\"\n> to an existing cvs server and take over without anyone noticing. But\n> tehy are both hard, hard hard.\n\nIndeed.\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"37831","messageId":"20070323183931.GK8017@planck.djpig.de","threadId":"7315","inReplyTo":"20070323151757.GH8017@planck.djpig.de","subject":"Re: [PATCH 4/5] cvsserver: Make the database backend configurable","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-23T18:39:31Z","receivedAt":"2007-03-23T18:39:31Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Fri, Mar 23, 2007 at 04:17:58PM +0100, Frank Lichtenheld wrote:\n> On Tue, Mar 20, 2007 at 07:47:12AM +1200, Martin Langhoff wrote:\n> > On 3/20/07, Frank Lichtenheld <frank@lichtenheld.de> wrote:\n> > >Make all the different parts of the database backend connection\n> > >configurable. This adds the following string configuration variables:\n> > \n> > Nice. I guess the hard part of this is going to be creating DB schemas\n> > that are reasonably portable. The SQL we use is as vanilla as it gets\n> > ;-)\n> \n> I've now actually made a quick test to see how we do when using other\n> backends (with PostgreSQL 8.2, will also do one with MySQL later).\n\nDone the MySQL tests, too.\n\n> Some problems that I saw:\n> \n>  - It would probably cool to be able to tell git-cvsserver that it\n>    should use only one database for all modules (i.e. git branches)\n>    This way one doesn't need to give the users database creation\n>    privileges. Of course pre-creating all databases possibly ever needed\n>    is possible but somewhat cumbersome.\n>  \n>  - DBI->tables seems to be a portability problem. e.g. with SQLite\n>    it returns \"head\", \"commitmsgs\", etc; with PostgreSQL it returns\n>    public.head, public.commitmsgs, etc. The output of MySQL might\n>    be different, too.\n\nIt is `head`, and `revision`. Fun ;)\nWhy no etc.? Because pretty much every other used SQL command (than these\ntwo \"create table\") fails with syntax errors. Not that I actually expected\nanything else from MySQL...\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"38435","messageId":"1175349467524-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":"11743197614111-git-send-email-frank@lichtenheld.de","subject":"[PATCH] cvsserver: Use DBI->table_info instead of DBI->tables","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-31T13:57:47Z","receivedAt":"2007-03-31T13:57:47Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"DBI->table_info is portable across different DBD backends,\nDBI->tables is not.\n\nLimit the output to objects of type TABLE.\n---\n git-cvsserver.perl |    4 +---\n 1 files changed, 1 insertions(+), 3 deletions(-)\n\n Obviously to be applied on top of my previous\n patch series.\n \n With this patch I was able to use DBD::Pg as backend.\n It is not very comfortable because of the \"one db for\n each module\" problem, but at least it works.\n\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex 941a91b..5532ae7 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -2171,10 +2171,8 @@ sub new\n     die \"Error connecting to database\\n\" unless defined $self->{dbh};\n \n     $self->{tables} = {};\n-    foreach my $table ( $self->{dbh}->tables )\n+    foreach my $table ( keys %{$self->{dbh}->table_info(undef,undef,undef,'TABLE')->fetchall_hashref('TABLE_NAME')} )\n     {\n-        $table =~ s/^\"//;\n-        $table =~ s/\"$//;\n         $self->{tables}{$table} = 1;\n     }\n \n-- \n1.5.0.3\n"},{"id":"38436","messageId":"20070331140919.GW8017@planck.djpig.de","threadId":"7315","inReplyTo":"1175349467524-git-send-email-frank@lichtenheld.de","subject":"Re: [PATCH] cvsserver: Use DBI->table_info instead of DBI->tables","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-31T14:09:19Z","receivedAt":"2007-03-31T14:09:19Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Sat, Mar 31, 2007 at 03:57:47PM +0200, Frank Lichtenheld wrote:\n> DBI->table_info is portable across different DBD backends,\n> DBI->tables is not.\n> \n> Limit the output to objects of type TABLE.\n> ---\n\nI just noticed I forgot to add the\n\"Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>\"\n\nDoes one resend the patch in such cases?\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"38850","messageId":"11759575342765-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":"11743197614111-git-send-email-frank@lichtenheld.de","subject":"[PATCH 0/3] cvsserver: small corrections and bring documentation up to speed","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-07T14:52:14Z","receivedAt":"2007-04-07T14:52:14Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"This patch series consists mainly of documentation updates for the\nnew features I introduced in my previous series. With all these\npatches applied I would consider this topic in a shape so that it\ncould be included in an official release. It still contains\nsome experimental stuff but since the user has to enable that himself\nand I put a \"here be dragons\" in the documentation I see no problem\nwith that.\n\nProofreading of patch 3 by someone that actually speaks English would\nbe greatly appreciated.\n\n Documentation/git-cvsserver.txt |   97 +++++++++++++++++++++++++++++++++++-----\n git-cvsserver.perl              |    7 +-\n 2 files changed, 91 insertions(+), 13 deletions(-)\n"},{"id":"38852","messageId":"11759578902278-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":"11759575342765-git-send-email-frank@lichtenheld.de","subject":"[PATCH 1/3] cvsserver: small corrections to asciidoc documentation","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-07T14:58:08Z","receivedAt":"2007-04-07T14:58:08Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Fix a typo: s/Not/Note/\n\nSome formating fixes: Use ` ` syntax for all filenames and\n' ' syntax for all commandline switches.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/git-cvsserver.txt |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt\nindex 6904aad..2cf8153 100644\n--- a/Documentation/git-cvsserver.txt\n+++ b/Documentation/git-cvsserver.txt\n@@ -122,12 +122,12 @@ To get a checkout with the Eclipse CVS client:\n Protocol notes: If you are using anonymous access via pserver, just select that.\n Those using SSH access should choose the 'ext' protocol, and configure 'ext'\n access on the Preferences->Team->CVS->ExtConnection pane. Set CVS_SERVER to\n-'git-cvsserver'. Not that password support is not good when using 'ext',\n+'git-cvsserver'. Note that password support is not good when using 'ext',\n you will definitely want to have SSH keys setup.\n \n Alternatively, you can just use the non-standard extssh protocol that Eclipse\n offer. In that case CVS_SERVER is ignored, and you will have to replace\n-the cvs utility on the server with git-cvsserver or manipulate your .bashrc\n+the cvs utility on the server with git-cvsserver or manipulate your `.bashrc`\n so that calling 'cvs' effectively calls git-cvsserver.\n \n Clients known to work\n@@ -146,9 +146,9 @@ checkout, diff, status, update, log, add, remove, commit.\n Legacy monitoring operations are not supported (edit, watch and related).\n Exports and tagging (tags and branches) are not supported at this stage.\n \n-The server should set the -k mode to binary when relevant, however,\n+The server should set the '-k' mode to binary when relevant, however,\n this is not really implemented yet. For now, you can force the server\n-to set `-kb` for all files by setting the `gitcvs.allbinary` config\n+to set '-kb' for all files by setting the `gitcvs.allbinary` config\n variable. In proper GIT tradition, the contents of the files are\n always respected. No keyword expansion or newline munging is supported.\n \n-- \n1.5.1\n"},{"id":"38853","messageId":"11759578901878-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":"11759578902278-git-send-email-frank@lichtenheld.de","subject":"[PATCH 2/3] cvsserver: Corrections to the database backend configuration","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-07T14:58:09Z","receivedAt":"2007-04-07T14:58:09Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Don't include the scheme name in gitcvs.dbdriver, it is\nalways 'dbi' anyway.\n\nDon't allow ':' in driver names nor ';' in database names for\nsanity reasons.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n git-cvsserver.perl |    6 ++++--\n 1 files changed, 4 insertions(+), 2 deletions(-)\n\n I wasn't sure whether I should send this as a new patch or as a new version of my\n older one?\n\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex 5532ae7..7fe7949 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -2149,7 +2149,7 @@ sub new\n     die \"Git repo '$self->{git_path}' doesn't exist\" unless ( -d $self->{git_path} );\n \n     $self->{dbdriver} = $cfg->{gitcvs}{$state->{method}}{dbdriver} ||\n-        $cfg->{gitcvs}{dbdriver} || \"dbi:SQLite\";\n+        $cfg->{gitcvs}{dbdriver} || \"SQLite\";\n     $self->{dbname} = $cfg->{gitcvs}{$state->{method}}{dbname} ||\n         $cfg->{gitcvs}{dbname} || \"%Ggitcvs.%m.sqlite\";\n     $self->{dbuser} = $cfg->{gitcvs}{$state->{method}}{dbuser} ||\n@@ -2165,7 +2165,9 @@ sub new\n     $self->{dbname} =~ s/%([mauGg])/$mapping{$1}/eg;\n     $self->{dbuser} =~ s/%([mauGg])/$mapping{$1}/eg;\n \n-    $self->{dbh} = DBI->connect(\"$self->{dbdriver}:dbname=$self->{dbname}\",\n+    die \"Invalid char ':' in dbdriver\" if $self->{dbdriver} =~ /:/;\n+    die \"Invalid char ';' in dbname\" if $self->{dbname} =~ /;/;\n+    $self->{dbh} = DBI->connect(\"dbi:$self->{dbdriver}:dbname=$self->{dbname}\",\n                                 $self->{dbuser},\n                                 $self->{dbpass});\n     die \"Error connecting to database\\n\" unless defined $self->{dbh};\n-- \n1.5.1\n"},{"id":"38851","messageId":"11759578903791-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":"11759578901878-git-send-email-frank@lichtenheld.de","subject":"[PATCH 3/3] cvsserver: Add asciidoc documentation for new database backend configuration","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-07T14:58:10Z","receivedAt":"2007-04-07T14:58:10Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Documents the new configuration variables and the variable\nsubstitution mechanism.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/git-cvsserver.txt |   87 +++++++++++++++++++++++++++++++++++++--\n 1 files changed, 83 insertions(+), 4 deletions(-)\n\n Proofreading would be greatly appreciated.\n\ndiff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt\nindex 2cf8153..efc7fa6 100644\n--- a/Documentation/git-cvsserver.txt\n+++ b/Documentation/git-cvsserver.txt\n@@ -65,11 +65,12 @@ env variable, you can rename git-cvsserver to cvs.\n \n ------\n Note: you need to ensure each user that is going to invoke git-cvsserver has\n-write access to the log file and to the git repository. When offering anon\n-access via pserver, this means that the nobody user should have write access\n-to at least the sqlite database at the root of the repository.\n+write access to the log file and to the database (see\n+<<dbbackend,Database Backend>>. If you want to offer write access over\n+SSH, the users of course also need write access to the git repository itself.\n \n-Both configuration variables can also be overriden for a specific method of\n+[[configaccessmethod]]\n+All configuration variables can also be overriden for a specific method of\n access. Valid method names are \"ext\" (for SSH access) and \"pserver\". The\n following example configuration would disable pserver access while still\n allowing access over SSH.\n@@ -105,6 +106,84 @@ Example:\n      cvs co -d project-master master\n ------\n \n+[[dbbackend]]\n+Database Backend\n+----------------\n+\n+git-cvsserver uses one database per git head (i.e. CVS module) to\n+store information about the repository for faster access. The\n+database doesn't contain any persitent data and can be completly\n+regenerated from the git repository at any time. The database\n+needs to be updated (i.e. written to) after every commit. That\n+means that even if you offer only read access (e.g. by using\n+the pserver method), git-cvsserver should have write access to\n+the database to work reliably (otherwise you need to make sure\n+that the database if up-to-date all the time git-cvsserver is run).\n+\n+By default it uses SQLite databases in the git directory, named\n+`gitcvs.<module_name>.sqlite`. Note that the SQLite backend creates\n+temporary files in the same directory as the database file on\n+write so it might not be enough to grant the users using\n+git-cvsserver write access to the database file without granting\n+them also write access to the directory.\n+\n+You can configure the database backend with the following\n+configuration variables:\n+\n+Configuring database backend\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+git-cvsserver uses the Perl DBI module. Please also read\n+its documentation if changing these variables, especially\n+about `DBI->connect()`.\n+\n+gitcvs.dbname::\n+\tDatabase name. The exact meaning depends on the\n+\tused database driver, for SQLite this is a filename.\n+\tSupports variable substitution (see below). May\n+\tnot contain semicolons (`;`).\n+\tDefault: '%Ggitcvs.%m.sqlite'\n+\n+gitcvs.dbdriver::\n+\tUsed DBI driver. You can specify any available driver\n+\tfor this here, but it might not work. cvsserver is tested\n+\twith 'DBD::SQLite', reported to work with\n+\t'DBD::Pg', and reported *not* to work with 'DBD::mysql'.\n+\tPlease regard this as an experimental feature. May not\n+\tcontain double colons (`:`).\n+\tDefault: 'SQLite'\n+\n+gitcvs.dbuser::\n+\tDatabase user. Only useful if setting `dbdriver`, since\n+\tSQLite has no concept of database users. Supports variable\n+\tsubstitution (see below).\n+\n+gitcvs.dbpass::\n+\tDatabase password.  Only useful if setting `dbdriver`, since\n+\tSQLite has no concept of database passwords.\n+\n+All variables can also be set per access method, see <<configaccessmethod,above>>.\n+\n+Variable substitution\n+^^^^^^^^^^^^^^^^^^^^^\n+In `dbdriver` and `dbuser` you can use the following variables:\n+\n+%G::\n+\tgit directory name\n+%g::\n+\tgit directory name, where all characters except for\n+\talpha-numeric ones, `.`, and `-` are replaced with\n+\t`_` (this should make it easier to use the directory\n+\tname in a filename if wanted)\n+%m::\n+\tCVS module/git head name\n+%a::\n+\taccess method (one of \"ext\" or \"pserver\")\n+%u::\n+\tName of the user running git-cvsserver.\n+\tIf no name can be determined, the\n+\tnumeric uid is used.\n+\n Eclipse CVS Client Notes\n ------------------------\n \n-- \n1.5.1\n"},{"id":"38878","messageId":"7v64879rwd.fsf@assigned-by-dhcp.cox.net","threadId":"7315","inReplyTo":"11759578903791-git-send-email-frank@lichtenheld.de","subject":"Re: [PATCH 3/3] cvsserver: Add asciidoc documentation for new database backend configuration","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-08T08:44:50Z","receivedAt":"2007-04-08T08:44:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Frank Lichtenheld <frank@lichtenheld.de> writes:\n\n> +[[dbbackend]]\n> +Database Backend\n> +----------------\n> +\n> +git-cvsserver uses one database per git head (i.e. CVS module) to\n\nProbably \"git branch\" is easier to understand than \"git head\".\n\n> +store information about the repository for faster access. The\n> +database doesn't contain any persitent data and can be completly\n> +regenerated from the git repository at any time. The database\n> +needs to be updated (i.e. written to) after every commit. That\n> +means that even if you offer only read access (e.g. by using\n> +the pserver method), git-cvsserver should have write access to\n> +the database to work reliably (otherwise you need to make sure\n> +that the database if up-to-date all the time git-cvsserver is run).\n\nThis rationale for db update is a bit hard to understand.\nImmediately saying that you need a database update \"after every\ncommit\", you say that read-only access still need it.\n\nI think the situation where database update is needed is when a\ncommit on the branch that has not been given to any cvs client\nis given out for the first time, and when somebody adds new\ncommits from git side, the cvsserver session that serves the\ncommit for the first time needs to record the branch\ninformation.\n"},{"id":"39117","messageId":"20070411143402.GB2309@planck.djpig.de","threadId":"7315","inReplyTo":"7v64879rwd.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 3/3] cvsserver: Add asciidoc documentation for new database backend configuration","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-11T14:34:03Z","receivedAt":"2007-04-11T14:34:03Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Sun, Apr 08, 2007 at 01:44:50AM -0700, Junio C Hamano wrote:\n> Frank Lichtenheld <frank@lichtenheld.de> writes:\n> \n> > +[[dbbackend]]\n> > +Database Backend\n> > +----------------\n> > +\n> > +git-cvsserver uses one database per git head (i.e. CVS module) to\n> \n> Probably \"git branch\" is easier to understand than \"git head\".\n\nHmm, should I replace \"git head\" with \"git branch\" everywhere\nin the document or does it make sense sometimes to use \"head\"?\nBecause there are already several places in the current documentation\nwhere head is used.\n\n> > +store information about the repository for faster access. The\n> > +database doesn't contain any persitent data and can be completly\n> > +regenerated from the git repository at any time. The database\n> > +needs to be updated (i.e. written to) after every commit. That\n> > +means that even if you offer only read access (e.g. by using\n> > +the pserver method), git-cvsserver should have write access to\n> > +the database to work reliably (otherwise you need to make sure\n> > +that the database if up-to-date all the time git-cvsserver is run).\n> \n> This rationale for db update is a bit hard to understand.\n> Immediately saying that you need a database update \"after every\n> commit\", you say that read-only access still need it.\n> \n> I think the situation where database update is needed is when a\n> commit on the branch that has not been given to any cvs client\n> is given out for the first time, and when somebody adds new\n> commits from git side, the cvsserver session that serves the\n> commit for the first time needs to record the branch\n> information.\n\nThat's what I meant, yes ;)\nWill try to reword it to actually say it, too.\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"39216","messageId":"11763890161953-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":"7v64879rwd.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH (amend)] cvsserver: Add asciidoc documentation for new database backend configuration","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-12T14:43:36Z","receivedAt":"2007-04-12T14:43:36Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Documents the new configuration variables and the variable\nsubstitution mechanism.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/git-cvsserver.txt |   93 +++++++++++++++++++++++++++++++++++++--\n 1 files changed, 89 insertions(+), 4 deletions(-)\n\n Reworded the section about git-cvsserver needing to update the\n database.\n\ndiff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt\nindex 2cf8153..9fbaf75 100644\n--- a/Documentation/git-cvsserver.txt\n+++ b/Documentation/git-cvsserver.txt\n@@ -65,11 +65,12 @@ env variable, you can rename git-cvsserver to cvs.\n \n ------\n Note: you need to ensure each user that is going to invoke git-cvsserver has\n-write access to the log file and to the git repository. When offering anon\n-access via pserver, this means that the nobody user should have write access\n-to at least the sqlite database at the root of the repository.\n+write access to the log file and to the database (see\n+<<dbbackend,Database Backend>>. If you want to offer write access over\n+SSH, the users of course also need write access to the git repository itself.\n \n-Both configuration variables can also be overriden for a specific method of\n+[[configaccessmethod]]\n+All configuration variables can also be overriden for a specific method of\n access. Valid method names are \"ext\" (for SSH access) and \"pserver\". The\n following example configuration would disable pserver access while still\n allowing access over SSH.\n@@ -105,6 +106,90 @@ Example:\n      cvs co -d project-master master\n ------\n \n+[[dbbackend]]\n+Database Backend\n+----------------\n+\n+git-cvsserver uses one database per git head (i.e. CVS module) to\n+store information about the repository for faster access. The\n+database doesn't contain any persitent data and can be completly\n+regenerated from the git repository at any time. The database\n+needs to be updated (i.e. written to) after every commit.\n+\n+If the commit is done directly by using git (as opposed to\n+using git-cvsserver) the update will need to happen on the\n+next repository access by git-cvsserver, independent of\n+access method and requested operation.\n+\n+That means that even if you offer only read access (e.g. by using\n+the pserver method), git-cvsserver should have write access to\n+the database to work reliably (otherwise you need to make sure\n+that the database if up-to-date all the time git-cvsserver is run).\n+\n+By default it uses SQLite databases in the git directory, named\n+`gitcvs.<module_name>.sqlite`. Note that the SQLite backend creates\n+temporary files in the same directory as the database file on\n+write so it might not be enough to grant the users using\n+git-cvsserver write access to the database file without granting\n+them write access to the directory, too.\n+\n+You can configure the database backend with the following\n+configuration variables:\n+\n+Configuring database backend\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+git-cvsserver uses the Perl DBI module. Please also read\n+its documentation if changing these variables, especially\n+about `DBI->connect()`.\n+\n+gitcvs.dbname::\n+\tDatabase name. The exact meaning depends on the\n+\tused database driver, for SQLite this is a filename.\n+\tSupports variable substitution (see below). May\n+\tnot contain semicolons (`;`).\n+\tDefault: '%Ggitcvs.%m.sqlite'\n+\n+gitcvs.dbdriver::\n+\tUsed DBI driver. You can specify any available driver\n+\tfor this here, but it might not work. cvsserver is tested\n+\twith 'DBD::SQLite', reported to work with\n+\t'DBD::Pg', and reported *not* to work with 'DBD::mysql'.\n+\tPlease regard this as an experimental feature. May not\n+\tcontain double colons (`:`).\n+\tDefault: 'SQLite'\n+\n+gitcvs.dbuser::\n+\tDatabase user. Only useful if setting `dbdriver`, since\n+\tSQLite has no concept of database users. Supports variable\n+\tsubstitution (see below).\n+\n+gitcvs.dbpass::\n+\tDatabase password.  Only useful if setting `dbdriver`, since\n+\tSQLite has no concept of database passwords.\n+\n+All variables can also be set per access method, see <<configaccessmethod,above>>.\n+\n+Variable substitution\n+^^^^^^^^^^^^^^^^^^^^^\n+In `dbdriver` and `dbuser` you can use the following variables:\n+\n+%G::\n+\tgit directory name\n+%g::\n+\tgit directory name, where all characters except for\n+\talpha-numeric ones, `.`, and `-` are replaced with\n+\t`_` (this should make it easier to use the directory\n+\tname in a filename if wanted)\n+%m::\n+\tCVS module/git head name\n+%a::\n+\taccess method (one of \"ext\" or \"pserver\")\n+%u::\n+\tName of the user running git-cvsserver.\n+\tIf no name can be determined, the\n+\tnumeric uid is used.\n+\n Eclipse CVS Client Notes\n ------------------------\n \n-- \n1.5.1\n"},{"id":"39217","messageId":"11763896683800-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":"7v64879rwd.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] cvsserver: Document the GIT branches -> CVS modules mapping more prominently","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-12T14:54:28Z","receivedAt":"2007-04-12T14:54:28Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Add a note about the branches -> modules mapping to LIMITATIONS because\nI really think it should be noted there and not just at the end of\nthe installation step-by-step HOWTO.\n\nI used \"git branches\" there and changed \"heads\" to \"branches\" in\nmy section about database configuration. I'm reluctant to replace\nall occourences of \"head\" with \"branch\" though because you always\nhave to say \"git branch\" because CVS also has the concept of\nbranches. You can say \"head\" though, because there is no such\nconcept in CVS. In all the existing occourences of head other than\nthe one I changed I think \"head\" flows better in the text.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/git-cvsserver.txt |    6 +++++-\n 1 files changed, 5 insertions(+), 1 deletions(-)\n\n Caused by me thinking about Junio's comment.\n Better patches welcome but my motivation to try to write clear\n and concise sentences in English is depleted for now,\n so no critical comments without patches, plz :)\n\ndiff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt\nindex 9fbaf75..3615ce5 100644\n--- a/Documentation/git-cvsserver.txt\n+++ b/Documentation/git-cvsserver.txt\n@@ -31,6 +31,10 @@ over pserver for anonymous CVS access.\n \n CVS clients cannot tag, branch or perform GIT merges.\n \n+git-cvsserver maps GIT branches to CVS modules. This is very different\n+from what most CVS users would expect since in CVS modules usually represent\n+one or more directories.\n+\n INSTALLATION\n ------------\n \n@@ -110,7 +114,7 @@ Example:\n Database Backend\n ----------------\n \n-git-cvsserver uses one database per git head (i.e. CVS module) to\n+git-cvsserver uses one database per git branch (i.e. CVS module) to\n store information about the repository for faster access. The\n database doesn't contain any persitent data and can be completly\n regenerated from the git repository at any time. The database\n-- \n1.5.1\n"},{"id":"39236","messageId":"7v3b35jlj4.fsf@assigned-by-dhcp.cox.net","threadId":"7315","inReplyTo":"11763896683800-git-send-email-frank@lichtenheld.de","subject":"Re: [PATCH] cvsserver: Document the GIT branches -> CVS modules mapping more prominently","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-12T22:05:51Z","receivedAt":"2007-04-12T22:05:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Frank Lichtenheld <frank@lichtenheld.de> writes:\n\n> Add a note about the branches -> modules mapping to LIMITATIONS because\n> I really think it should be noted there and not just at the end of\n> the installation step-by-step HOWTO.\n>\n> I used \"git branches\" there and changed \"heads\" to \"branches\" in\n> my section about database configuration. I'm reluctant to replace\n> all occourences of \"head\" with \"branch\" though because you always\n> have to say \"git branch\" because CVS also has the concept of\n> branches. You can say \"head\" though, because there is no such\n> concept in CVS. In all the existing occourences of head other than\n> the one I changed I think \"head\" flows better in the text.\n\nAh, I tend to agree.  Mind if I applied only the first hunk then?\n\n>\n> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n> ---\n>  Documentation/git-cvsserver.txt |    6 +++++-\n>  1 files changed, 5 insertions(+), 1 deletions(-)\n>\n>  Caused by me thinking about Junio's comment.\n>  Better patches welcome but my motivation to try to write clear\n>  and concise sentences in English is depleted for now,\n>  so no critical comments without patches, plz :)\n>\n> diff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt\n> index 9fbaf75..3615ce5 100644\n> --- a/Documentation/git-cvsserver.txt\n> +++ b/Documentation/git-cvsserver.txt\n> @@ -31,6 +31,10 @@ over pserver for anonymous CVS access.\n>  \n>  CVS clients cannot tag, branch or perform GIT merges.\n>  \n> +git-cvsserver maps GIT branches to CVS modules. This is very different\n> +from what most CVS users would expect since in CVS modules usually represent\n> +one or more directories.\n> +\n>  INSTALLATION\n>  ------------\n>  \n> @@ -110,7 +114,7 @@ Example:\n>  Database Backend\n>  ----------------\n>  \n> -git-cvsserver uses one database per git head (i.e. CVS module) to\n> +git-cvsserver uses one database per git branch (i.e. CVS module) to\n>  store information about the repository for faster access. The\n>  database doesn't contain any persitent data and can be completly\n>  regenerated from the git repository at any time. The database\n> -- \n> 1.5.1\n"},{"id":"39237","messageId":"20070412221940.GH7085@planck.djpig.de","threadId":"7315","inReplyTo":"7v3b35jlj4.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] cvsserver: Document the GIT branches -> CVS modules mapping more prominently","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-12T22:19:40Z","receivedAt":"2007-04-12T22:19:40Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Thu, Apr 12, 2007 at 03:05:51PM -0700, Junio C Hamano wrote:\n> Frank Lichtenheld <frank@lichtenheld.de> writes:\n> \n> > Add a note about the branches -> modules mapping to LIMITATIONS because\n> > I really think it should be noted there and not just at the end of\n> > the installation step-by-step HOWTO.\n> >\n> > I used \"git branches\" there and changed \"heads\" to \"branches\" in\n> > my section about database configuration. I'm reluctant to replace\n> > all occourences of \"head\" with \"branch\" though because you always\n> > have to say \"git branch\" because CVS also has the concept of\n> > branches. You can say \"head\" though, because there is no such\n> > concept in CVS. In all the existing occourences of head other than\n> > the one I changed I think \"head\" flows better in the text.\n> \n> Ah, I tend to agree.  Mind if I applied only the first hunk then?\n\nNot at all. Go ahead.\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"39250","messageId":"evmhot$p0l$2@sea.gmane.org","threadId":"7315","inReplyTo":"11763890161953-git-send-email-frank@lichtenheld.de","subject":"Re: [PATCH (amend)] cvsserver: Add asciidoc documentation for new database backend configuration","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-04-13T00:13:45Z","receivedAt":"2007-04-13T00:13:45Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"[Cc: Frank Lichtenheld <frank@lichtenheld.de>, git@vger.kernel.org]\n\nFrank Lichtenheld wrote:\n\n> Documents the new configuration variables and the variable\n> substitution mechanism.\n> \n> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n> ---\n>  Documentation/git-cvsserver.txt |   93 +++++++++++++++++++++++++++++++++++++--\n>  1 files changed, 89 insertions(+), 4 deletions(-)\n\nCould you also update Documentation/config.txt? TIA.\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"39296","messageId":"11764808223731-git-send-email-frank@lichtenheld.de","threadId":"7315","inReplyTo":"evmhot$p0l$2@sea.gmane.org","subject":"[PATCH] config.txt: Add gitcvs.db* variables","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-04-13T16:13:42Z","receivedAt":"2007-04-13T16:13:42Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Adds documentation for gitcvs.{dbname,dbdriver,dbuser,dbpass}\nTexts are mostly taken from git-cvsserver.txt whith some\nadaptions so that they make more sense out of the context\nof the original man page.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/config.txt |   27 +++++++++++++++++++++++++++\n 1 files changed, 27 insertions(+), 0 deletions(-)\n\n Note that this one is made on top of the cvsserver topic\n branch and my fixes to config.txt (i.e. the description\n for gitcvs.allbinary is in the context of the patch).\n Just saying.\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 62168e6..ad2c1f5 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -425,6 +425,33 @@ gitcvs.allbinary::\n \tfact that there is no way yet to set single files to mode '-kb'.\n \tSee gitlink:git-cvsserver[1].\n \n+gitcvs.dbname::\n+\tDatabase used by git-cvsserver to cache revision information\n+\tderived from the git repository. The exact meaning depends on the\n+\tused database driver, for SQLite (which is the default driver) this\n+\tis a filename. Supports variable substitution (see\n+\tgitlink:git-cvsserver[1] for details). May not contain semicolons (`;`).\n+\tDefault: '%Ggitcvs.%m.sqlite'\n+\n+gitcvs.dbdriver::\n+\tUsed Perl DBI driver. You can specify any available driver\t\n+        for this here, but it might not work. git-cvsserver is tested\n+\twith 'DBD::SQLite', reported to work with 'DBD::Pg', and\n+\treported *not* to work with 'DBD::mysql'. Experimental feature.\n+\tMay not contain double colons (`:`). Default: 'SQLite'.\n+\tSee gitlink:git-cvsserver[1].\n+\n+gitcvs.dbuser, gitcvs.dbpass::\n+\tDatabase user and password. Only useful if setting 'gitcvs.dbdriver',\n+\tsince SQLite has no concept of database users and/or passwords.\n+\t'gitcvs.dbuser' supports variable substitution (see\n+\tgitlink:git-cvsserver[1] for details).\n+\n+All gitcvs variables except for 'gitcvs.allbinary' can also specifed\n+as 'gitcvs.<access_method>.<varname>' (where 'access_method' is one\n+of \"ext\" and \"pserver\") to make them apply only for the given access\n+method.\n+\n http.sslVerify::\n \tWhether to verify the SSL certificate when fetching or pushing\n \tover HTTPS. Can be overridden by the 'GIT_SSL_NO_VERIFY' environment\n-- \n1.5.1.1\n"}]}