[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Moving Repository
From: |
Peter Toft |
Subject: |
Re: Moving Repository |
Date: |
Mon, 7 Aug 2006 21:51:51 +0200 (CEST) |
On Mon, 7 Aug 2006, Ray Booysen wrote:
> Hi all
>
> I have a module in my repository... Let us call it MyProject.
>
> In Myproject, I have all my source code for the project. However, I want to
> include documentation and other files in the repository.
> Essentially what I want to do is change the repository to look like this:
>
>
> MyProject/
> -> Documentation
> -> Code
>
> Can I create a new folder (via CVS commands) in the MyProject module and then
> move (via mv command in the shell) the files there to the /Code folder? I'm
> needing to do this to preserve file histories.
Yep - I guess the easy way is to
cd Myproject
mkdir Documentation
mkdir Code
cvs add Documentation Code
cvs commit Documentation Code
pushd $CVSROOT/Myproject
find . -maxdepth 1 -name "*,v" -exec cp {} Code \;
popd
cd Code
cvs update -A
Now you should have an exact copy of your files in Code.
Now have fun by deleting each code files in Myproject
If you have .c/.h files you can do something like
find . -maxdepth 1 -name "*.c" > TMPFILE
find . -maxdepth 1 -name "*.h" >> TMPFILE
rm -f `cat TMPFILE | xargs`
cvs delete `cat TMPFILE | xargs`
Then tell the others to do "cvs update -A -d"
Have fun
Peter Toft, Ph.D. address@hidden http://pto.linux.dk
"First they ignore you, then they ridicule you, then they fight you, then you
win."
-- Mahatma Gandhi