snapshot2cvs - GPLed tool to import snapshots of a project into CVS
- History
- ** ** $Log: README,v $ ** Revision 1.4 2001/11/02 22:07:48 jbglaw ** - Add "Feedback" comment ** ** Revision 1.3 2001/11/02 22:04:38 jbglaw ** - Clean up for public release ** - Add GPLv2 copyright info to almost all files ** - Call this "Version 0.0.3" ** **
Download
Fetch the newest version from:
http://lug-owl.de/~jbglaw/software/
Feedback
Feedback is welcome! If you want to contribute, feel free to send me patches. However, flames will be sorted to /dev/null...
Compiling
Just unpack the sources and type "make" it. It's currently a very simple program and this should simply create a binary called 'snapshot2cvs'.
Using
First of all, unpack all your snapshots (or at least two of them) into separate directories. I'll show the usage by creating a CVS version of the linux kernel, versions 2.4.0 to 2.4.10:
# for VERSION in 0 1 2 3 4 5 6 7 8 9 10; do
#> tar xjf /path/to/linux-2.4.${VERSION}.tar.bz2
#> mv linux linux-2.4.${VERSION}
#> done
Now, you've got four kernel source trees on your hard drive. The very first version ever is completely empty, so let's start feeding your CVS repository with an empty directory:
# mkdir empty_dir
# cd empty_dir
# cvs import -m "Initial empty import" linux foo bar
# cd ..
# cvs co linux
# cd linux
Now, you've got an empty "linux" directory, which is at least under CVS control. Now let's feed in all the linux versions, but keep in mind that for now all pathes need to be absolute (I'm not perfect:-)
# snapshot2cvs /path/to/empty_dir /path/to/linux-2.4.0 /path/to/linux # cvs ci -m "Importing linux kernel versin 2.4.0" # cvs tag v_2_4_0
Now let's feed in all other versions:
# for OLDERVERSION in 0 1 2 3 4 5 6 7 8 9; do
#> snapshot2cvs /path/to/linux-2.4.${OLDERVERSION} \
/path/to/linux-2.4.$(expr ${OLDERVERSION} + 1) \
/path/to/linux
#> cvs ci -m "Importing linux kernel version 2.4.`expr ${OLDERVERSION} + 1`"
#> cvs tag "v_2_4_`expr ${OLDERVERSION} + 1`"
#> done
That's it. You should now have a nice repository with all required files:-)
Problems
- All files are checked in with the "-ko" option. I wanted to keep all the "$xxx $" strings. Maybe I should make this an option:-)
- It lstat()s files all over all. That's not that fine...
- There are better ways to achieve the result, but my one is at least working for me
- Sorting all files/directories is less than good. It was written about 5 o'clock in the morning and I should rewrite it (using a better sorting algorithm ot just libc's qsort()...
- I copy too many files (some are copied twice)
- I call 'cp' to copy a file instead of copying it myself
Goodies
- It seems to work
License
This whole hack^Wproject may be used with no charge under the terms of the GNU Public License Version 2. Use it at your own risk and don't blame me if it eats your data. I don't give you any guarantees!
