Bug 82920

Summary: cvsroot isn't passed to cvs commit
Product: [Developer tools] kdevplatform Reporter: Imre Péntek <pentek.imre>
Component: cvsAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 0.9.94   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Imre Péntek 2004-06-06 00:59:53 UTC
Version:           3.0.1 (using KDE KDE 3.2.1KDE 1.2)
Installed from:    Unlisted Binary PackageUnlisted Binary Package
Compiler:          gcc version 3.3.2 Configured with: /var/uhubuild/work/compile/configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,objc,java,f77,pascal --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --host=i386-pc-linux-gnu
OS:                Linux

I tried to create a c++ console project with cvs. The cvs was initialized (as I see) correctly, but then when I tried to commit using Tools -> Version control -> CVS -> Commit this was appeared in the cvs log:
cd '/tmp/probacvs' && cvs -f commit -m 'boo ;)  ' 'src/probacvs.cpp'
cvs commit: in directory .:
cvs commit: ignoring CVS/Root because it does not contain an absolute pathname.
cvs commit: No CVSROOT specified! Please use the `-d' option
cvs [commit aborted]: or set then CVSROOT environment variable.
*** Exited with status: 1 ***
And as I said it succeeded to initialize CVS at the beginning, when created the project I gave an absolute path as a CVS root.
Comment 1 Christian Loose 2004-06-07 12:54:59 UTC
Hi Péntek,

Could you please add the content of the Root file in the CVS directory to this report?

Thanks!
Christian
Comment 2 Imre Péntek 2004-06-07 20:02:31 UTC
Hello Christian,

My first name is Imre.
Which one is the root file?
But anyway download this: http://people.inf.elte.hu/pentek_i/hello.tar.bz2
Comment 3 Simon Ejsing 2004-06-08 09:20:42 UTC
The root file is located in your src directory, like this:
src/CVS/Root

Inside that file should be something like:
user@host:/path/to/cvs
Comment 4 Imre Péntek 2004-06-08 14:33:05 UTC
This file contains only one \n but it isn't my fault, this file was created by KDEvelop.
Comment 5 Christian Loose 2004-06-08 23:34:39 UTC
I could reproduce it with the following steps:

a. Create a repository in your home directory with cvs init. (e.g. /home/user/cvsroot)
b. Create a new project in KDevelop with the location on the same level as the CVS repository. (e.g. /home/user/project_name)
c. Choose 'CvsService' as version control system
d. The field 'server path' should contain the path of the CVS repository. (e.g. /home/user/cvsroot)
e. The field 'module' should be empty.

The module field on the VCS page seems to be a mandatory field. Creating several projects with an empty module field will result in a messed up CVS repository where several files from different projects will be in the same subdirectory (e.g. src)
Comment 6 Imre Péntek 2004-06-09 00:25:45 UTC
Check out for the link posted by me some days before. It contains both the source and both the cvs root.
Do that:
cd /tmp
tar -xvjf filename.tar.bz
and what you get is exactly the state when I compressed them (from the /tmp)
Comment 7 Mario Scalas 2004-06-09 16:42:28 UTC
I've tried #5's steps and got to the same solution: I've locally replaced the current CvsPartImpl::createNewProject() code with something using cervisia's import() method and got a similar error:

Started job: cd /home/mario/helloprova && cvs -f -d /home/mario/cvsroot import -m "new project"  vendor start 
Usage: cvs import [-d] [-k subst] [-I ign] [-m msg] [-b branch]
    [-W spec] repository vendor-tag release-tags...
	-d	Use the file's modification time as the time of import.
	-k sub	Set default RCS keyword substitution mode.
	-I ign	More files to ignore (! to reset).
	-b bra	Vendor branch id.
	-m msg	Log message.
	-W spec	Wrappers specification line.
(Specify the --help global option for a list of other help options)
Job finished with exitCode == 1

(No scattered files though ;-)) So I think that the simplest solution is to make the module field mandatory and to fill it with the project name, just for user convenience. Better ideas?
Comment 8 Andreas Pakulat 2007-11-30 19:23:56 UTC
This is fixed as far as KDevelop is concerned, the module field is pre-populated. If you purposefully clear the module line you should know what you do.