From: Lars Noschinski <hidden> Date: 2016-06-15 22:44:57
This patch series
- fixes a small bug in the cvsimport testsuite
- adds support for packed-refs to cvsserver
- adds basic support cvs co -c to cvsserver
---
git-cvsserver.perl | 38 ++++++++++++++++++++++----------------
t/t9400-git-cvsserver-server.sh | 25 +++++++++++++++++++++++++
t/t9600-cvsimport.sh | 1 +
3 files changed, 48 insertions(+), 16 deletions(-)
From: Lars Noschinski <hidden> Date: 2016-06-15 22:44:57
Implement cvs checkout's -c option by returning a list of all "modules".
This is more useful than displaying a perl warning if -c is given.
Signed-off-by: Lars Noschinski <redacted>
---
git-cvsserver.perl | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
@@ -801,6 +801,19 @@ sub req_coargsplit("co");+# Provide list of modules, if -c was used.+if(exists$state->{opt}{c}){+my$showref=`git show-ref --heads`;+formy$line(split'\n',$showref){+if($line=~m% refs/heads/(.*)$%){+print"M $1\t$1\n";+}+}+closedirHEADS;+print"ok\n";+return1;+}+my$module=$state->{args}[0];$state->{module}=$module;my$checkout_path=$module;
From: Lars Noschinski <hidden> Date: 2016-06-15 22:44:57
req_update still parses /refs/heads manually. Replace this by
a call to show-ref.
Signed-off-by: Lars Noschinski <redacted>
---
git-cvsserver.perl | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
@@ -947,24 +947,17 @@ sub req_update# projects (heads in this case) to checkout.#if($state->{module}eq''){-my$heads_dir=$state->{CVSROOT}.'/refs/heads';-if(!opendirHEADS,$heads_dir){-print"E [server aborted]: Failed to open directory, "-."$heads_dir: $!\nerror\n";-return0;-}-print"E cvs update: Updating .\n";-while(my$head=readdir(HEADS)){-if(-f$state->{CVSROOT}.'/refs/heads/'.$head){-print"E cvs update: New directory `$head'\n";-}-}-closedirHEADS;-print"ok\n";-return1;+my$showref=`git show-ref --heads`;+formy$line(split'\n',$showref){+if($line=~m% refs/heads/(.*)$%){+print"M $1\t$1\n";+}+}+closedirHEADS;+print"ok\n";+return1;}-# Grab a handle to the SQLite db and do any necessary updatesmy$updater=GITCVS::updater->new($state->{CVSROOT},$state->{module},$log);
From: Lars Noschinski <hidden> Date: 2016-06-15 22:44:57
From: Fabian Emmes <redacted>
The CVS_SERVER environment variable cane cause some of the cvsimport tests
to fail. So unset this variable at the beginning of the test script.
Signed-off-by: Fabian Emmes <redacted>
Signed-off-by: Lars Noschinski <redacted>
---
t/t9600-cvsimport.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:44:57
Hi,
On Thu, 17 Jul 2008, Lars Noschinski wrote:
quoted hunk
req_update still parses /refs/heads manually. Replace this by
a call to show-ref.
Signed-off-by: Lars Noschinski <redacted>
---
git-cvsserver.perl | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
@@ -947,24 +947,17 @@ sub req_update# projects (heads in this case) to checkout.#if($state->{module}eq''){-my$heads_dir=$state->{CVSROOT}.'/refs/heads';-if(!opendirHEADS,$heads_dir){-print"E [server aborted]: Failed to open directory, "-."$heads_dir: $!\nerror\n";-return0;-}-print"E cvs update: Updating .\n";-while(my$head=readdir(HEADS)){-if(-f$state->{CVSROOT}.'/refs/heads/'.$head){-print"E cvs update: New directory `$head'\n";-}-}-closedirHEADS;-print"ok\n";-return1;+my$showref=`git show-ref --heads`;+formy$line(split'\n',$showref){+if($line=~m% refs/heads/(.*)$%){+print"M $1\t$1\n";
In the removed part, I see that this changes behaviour from "E cvs update:
..." to "M ...".
I do not know the CVS protocol well enough to know if that is still
correct.
BTW from the removed part, it seems that the indentation was done with
tabs formerly, and with spaces now; please use tabs instead.
Thanks,
Dscho
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:44:57
Hi,
On Thu, 17 Jul 2008, Lars Noschinski wrote:
+ grep "^M master[ ]\+master$" < out
As I said, I am not versed enough in the Teachings of CVS to know if this
is correct.
If the old behaviour ("E cvs ...") was "more" correct, this needs
changing, too.
Ciao,
Dscho
From: Lars Noschinski <hidden> Date: 2016-06-15 22:44:57
Hello!
* Johannes Schindelin [off-list ref] [08-07-17 14:31]:
On Thu, 17 Jul 2008, Lars Noschinski wrote:
quoted
req_update still parses /refs/heads manually. Replace this by
a call to show-ref.
Signed-off-by: Lars Noschinski <redacted>
---
git-cvsserver.perl | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
@@ -947,24 +947,17 @@ sub req_update# projects (heads in this case) to checkout.#if($state->{module}eq''){-my$heads_dir=$state->{CVSROOT}.'/refs/heads';-if(!opendirHEADS,$heads_dir){-print"E [server aborted]: Failed to open directory, "-."$heads_dir: $!\nerror\n";-return0;-}-print"E cvs update: Updating .\n";-while(my$head=readdir(HEADS)){-if(-f$state->{CVSROOT}.'/refs/heads/'.$head){-print"E cvs update: New directory `$head'\n";-}-}-closedirHEADS;-print"ok\n";-return1;+my$showref=`git show-ref --heads`;+formy$line(split'\n',$showref){+if($line=~m% refs/heads/(.*)$%){+print"M $1\t$1\n";
In the removed part, I see that this changes behaviour from "E cvs update:
..." to "M ...".
Good catch, this part is indeed somewhat busted. The tested clients did
not care, but this should be changed nevertheless to be the same as the
old behaviour.
I do not know the CVS protocol well enough to know if that is still
correct.
BTW from the removed part, it seems that the indentation was done with
tabs formerly, and with spaces now; please use tabs instead.
Actually, the old indetation was wrong. The biggest part of the file
(and the surrounding code) is indented by spaces.
From: Jeff King <hidden> Date: 2016-06-15 22:44:57
On Thu, Jul 17, 2008 at 12:01:13PM +0200, Lars Noschinski wrote:
The CVS_SERVER environment variable cane cause some of the cvsimport tests
to fail. So unset this variable at the beginning of the test script.
This is definitely an improvement. However, the cvs manual lists a
number of CVS* variables. Perhaps it would be better to simply scrub the
environment of any variable matching that pattern? I don't know how
commonly used some of the other ones are.
-Peff