Importing My Magento Theme into CVS (Concurrent Versions System)


I’m pretty much just adapting/ copying an old internal wiki entry out here. I’ve used CVS for years and years, but only once in a great while do I add whole new directories of source code. More typically, I’m simply adding a module or 2, so “cvs add” does the trick. So here it goes, so future me and current you have a quick and dirty reference going forward.

Importing Directories into CVS

If the directory in which your source code resides has never been in CVS at all, you’ll need to import it. Here I’m importing my new Magento theme into my repository.

cd /magento/app/design/frontend/MXWestInterface/MXWestTheme
cvs import -m "Imported sources" magento/app/design/frontend/MXWestInterface/MXWestTheme MAGENTO_1_3_2_1 MXWEST_1

Notice that I don’t have a leading / in my import command.

I don’t have any use (yet? ever?) for vendorTag (MAGENTO_1_3_2_1) or releaseTag (MXWEST_1) in my context, but CVS requires them – they must be present. For details about what they mean, click here for the CVS documentation.

Checking your Source Back Out

To work with the newly imported files, you’ll need to checkout the files you just imported. If you want a working copy in the same directory from which you just imported, you’ll need to (re)move the existing files first. I strongly recommend a backup!

cd /magento/app/design/frontend/MXWestInterface
tar cvf ~/myBackup.tar ./MXWestTheme # back me up to a tar bundle
rm -rf ./MXWestTheme # remove existing files
cvs co -d ./MXWestTheme magento/app/design/frontend/MXWestInterface/MXWestTheme # checkout a working copy

The -d specifies the destination directory. Otherwise you’ll end up with a lot of sub sub sub directories!

Facebook comments: