LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-02-2010, 07:49 AM   #1
fernfrancis
Member
 
Registered: Feb 2009
Location: Goa(India)-Sharjah(UAE)
Distribution: RHEL,centos,fedora,ubuntu
Posts: 229

Rep: Reputation: 18
cvs


i am trying to upload project to a cvs repository installed on centos 5.4
the problem i am facing is that certain folders from the repository dont get uploaded to the cvs
i dont know the exact reason why?
i checked the permission on the folder and the file under the hierarchy but there was no issue , all other projects were sucessfully uploaded
can anyone tell me the cause of this and how to solve such a situation
 
Old 09-02-2010, 09:55 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,476

Rep: Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020
Are there spaces in the directory (or file) names? That'll cause problems.

Do you have "garbage" directories or files in the source tree (these are fumble-finger "invisible" files that can get created). You can check whether there are any by doing ls -al | more. Been known to happen, causes havoc. You can also get to the parent directory and use find dirname -type f -print | more to see if there are any junk or unreadable files present (that'll find blanks in names for you).

Are your directories mode 755 and your files mode 644? Do you own 'em? For initial import it's "safest" to use those modes and change them later to read-only (restricting users from making changes without committing).

Just in case, if you do have spaces in directory or file names, this will fix them for you (the spaces are changed to underscore):
Code:
cat blank-rename.sh
#!/bin/bash
#ident  "$Id$"
#
#       This program is free software; you can redistribute it and/or
#       modify it under the terms of version 2 of the GNU General
#       Public License as published by the Free Software Foundation.
#
#       This program is distributed in the hope that it will be useful,
#       but WITHOUT ANY WARRANTY; without even the implied warranty of
#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#       General Public License for more details.
#
#       You should have received a copy of the GNU General Public
#       License along with this program; if not, write to the Free
#       Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
#       MA 02111-1307, USA.
#
#       Name:           $Source$
#       Version:        $Revision$
#       Modified:       $Date$
#       Purpose:        Replace blanks in file names with underscores
#       Author:         Unknown
#       Date:           28 Feb 2010
#       $Log$

ONE=1                           # For getting singular/plural right (see below).
number=0                        # Keeps track of how many files actually renamed.
FOUND=0                         # Successful return value.

for filename in *               # Traverse all files in directory.
do
     echo "$filename" | grep -q " "         #  Check whether filename
     if [ $? -eq $FOUND ]                   #+ contains space(s).
     then
       fname=$filename                      # Yes, this filename needs work.                        
       n=`echo $fname | sed -e "s/ /_/g"`   # Substitute underscore for blank.                      
       mv "$fname" "$n"                     # Do the actual renaming.                               
       let "number += 1"                                                                            
     fi                                                                                             
done   

if [ "${number}" -eq "$ONE" ]                 # For correct grammar.
then
        echo "${number} file renamed."
else 
        echo "${number} files renamed."
fi 

exit 0
Save the above as "blank-rename.sh" then "make blank-rename" and you've got a handy quick-fix utility.

Hope this helps some.

Last edited by tronayne; 09-02-2010 at 09:56 AM.
 
Old 09-02-2010, 02:16 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Have the files been added to the repository before you
tried to submit them?
Code:
man cvs
/^add
 
Old 09-05-2010, 02:35 AM   #4
fernfrancis
Member
 
Registered: Feb 2009
Location: Goa(India)-Sharjah(UAE)
Distribution: RHEL,centos,fedora,ubuntu
Posts: 229

Original Poster
Rep: Reputation: 18
No, I have just recieved the source code from a third party which need to be developed by our software team
i am trying to import this source code to the repository in the process three such folder in the source code does not get added to the repository , i check the permissions they seem to be fine, also there are no spaces in the folder name and no garbbage files

Last edited by fernfrancis; 09-05-2010 at 03:23 AM.
 
Old 09-05-2010, 03:21 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Please tell us HOW you're trying to "add" them to the
repository ...
 
Old 09-05-2010, 03:29 AM   #6
fernfrancis
Member
 
Registered: Feb 2009
Location: Goa(India)-Sharjah(UAE)
Distribution: RHEL,centos,fedora,ubuntu
Posts: 229

Original Poster
Rep: Reputation: 18
I am using these commands to import the new project to the cvs repo

cvs -d server:"ffernandes"@"10.200.22.57":"/cvsroot/AACVS" login
cvs -d repository_path_name import name_of_project vendor_tag release_tag


using these two commands the project gets added to the repo but as i said certain folders dont get imported to the repository
 
Old 09-05-2010, 09:44 AM   #7
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,476

Rep: Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020
This may seem trivial but, essentially, what CVS does is copy your source tree to the repository tree; it makes entries in its log files and some other accounting stuff, but basically it's just a recursive copy of a directory tree.

So, try something (quick and easy): get into some directory where you've got some space and
Code:
cd /tmp                    (or wherever)
cp -pr source_directory .
and see if you've got a problem. You could use "-prv" to see the copy as it happens. If that fails, you've got a place to start looking in detail. You could also tar the source tree; e.g.,
Code:
cd /tmp
tar -cvf name.tar source_directory
If either of those don't work, they'll at least give you a hint why not.

This kind of stuff happens (especially with third-party source) when the source comes from a "foreign" operating system (like, say, Windows) where really screwy characters can get embedded in file names. I've seen back slants, carets (^), asterisks, vertical bars, you name it in some junk received from Windows boxes and most of those will really cause havoc on the Unix/Linux side of the world. I've also see stuff from Windows where the mode of files and directories is, well, really a problem. I've fixed those with a simple
Code:
cd dir
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
to put things in a sane condition. If either of those fail, you'll get an indication why so you can fix it.

CVS doesn't do anything exotic on import. If you don't get some folders, there's a good reason why not and it may just be one of the above that will tell you what to fix.

Hope this helps some.
 
Old 09-05-2010, 06:25 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hmmm ... I guess what I was trying to say is this.

cvs doesn't allow you to add directories recursively.
You need to create the directories, then add the files
within those directories. Once they're added to the
repo you can THEN go and commit changes. If someone
created new local files, or new local directories you
need to make CVS aware of those with an explicit "add".

Code:
mkdir subdir
touch subdir/newfile.c
cvs add subdir
cvs add subdir/newfile.c
cvs commit -m "my new file" subdir/newfile.c

Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to setup CVS server in Fedora11 and CVS client in Windows Xp? smh Linux - Networking 1 09-12-2009 06:07 AM
How to setup CVS server in Fedora11 and CVS client in Windows Xp? smh Linux - Server 1 09-12-2009 06:05 AM
How to setup CVS server in Fedora7 and CVS client in Windows Xp? yashavanth_kumar Linux - Newbie 2 01-28-2008 09:48 PM
cvs repository cvs-1.11.21.tar.gz installation problem on redhat 5 linux version ajaytiwary Linux - Newbie 1 09-30-2007 01:58 PM


All times are GMT -5. The time now is 02:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration