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
Changes to v1:
- do not change output format of req_up (noticed by Johannes Schindelxein)
- test output of the cvs client instead of raw server output
- remove superfluous line from the "cvs co -c" patch
---
git-cvsserver.perl | 34 ++++++++++++++++++++--------------
t/t9400-git-cvsserver-server.sh | 18 ++++++++++++++++++
t/t9600-cvsimport.sh | 1 +
3 files changed, 39 insertions(+), 14 deletions(-)
From: Lars Noschinski <hidden> Date: 2016-06-15 22:44:57
Check that req_update shows refs, even if all refs are packed.
Signed-off-by: Lars Noschinski <redacted>
---
t/t9400-git-cvsserver-server.sh | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
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 | 22 ++++++++--------------
1 files changed, 8 insertions(+), 14 deletions(-)
@@ -947,21 +947,15 @@ 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;-}+my$showref=`git show-ref --heads`;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;+formy$line(split'\n',$showref){+if($line=~m% refs/heads/(.*)$%){+print"E cvs update: New directory `$1'\n";+}+}+print"ok\n";+return1;}
From: Lars Noschinski <hidden> Date: 2016-06-15 22:44:57
From: Fabian Emmes <redacted>
The CVS_SERVER environment variable can 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: 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 | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
@@ -801,6 +801,18 @@ 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";+}+}+print"ok\n";+return1;+}+my$module=$state->{args}[0];$state->{module}=$module;my$checkout_path=$module;