Page 1 of 1

CVS question

Posted: Tue Aug 08, 2006 8:23 pm
by Chris Corbyn
New to this CVS stuff so I am :)

I accidentally imported a directory into itself and now I can't get rid of the damn thing.

I've got rid of all the files successfully but the directories are sticking around. What am I doing wrong.

Here's a copy of what I'm doing (apologies if this is blatantly wrong... I'm a bit lost)

Code: Select all

d11wtq@w3style:~/CVS_Test$ cvs co swift-php5
d11wtq@swiftmailer.cvs.sourceforge.net's password:
cvs checkout: Updating swift-php5
U swift-php5/CREDITS
U swift-php5/LICENSE
U swift-php5/README
U swift-php5/Swift.php
U swift-php5/VERSION
cvs checkout: Updating swift-php5/CVSROOT
U swift-php5/CVSROOT/modules
cvs checkout: Updating swift-php5/Swift
cvs checkout: Updating swift-php5/Swift/Authenticator
U swift-php5/Swift/Authenticator/CRAMMD5.php
U swift-php5/Swift/Authenticator/LOGIN.php
U swift-php5/Swift/Authenticator/PLAIN.php
U swift-php5/Swift/Authenticator/POP3SMTP_.php
U swift-php5/Swift/Authenticator/README
cvs checkout: Updating swift-php5/Swift/Connection
U swift-php5/Swift/Connection/Multi.php
U swift-php5/Swift/Connection/Rotator.php
U swift-php5/Swift/Connection/SMTP.php
U swift-php5/Swift/Connection/Sendmail.php
cvs checkout: Updating swift-php5/Swift/Plugin
U swift-php5/Swift/Plugin/AntiFlood.php
U swift-php5/Swift/Plugin/ConnectionRotator.php
U swift-php5/Swift/Plugin/Errors.php
U swift-php5/Swift/Plugin/Example.php
U swift-php5/Swift/Plugin/Template.php
cvs checkout: Updating swift-php5/compat
U swift-php5/compat/README
U swift-php5/compat/Swift_CRAM_MD5_Authenticator.php
U swift-php5/compat/Swift_LOGIN_Authenticator.php
U swift-php5/compat/Swift_PLAIN_Authenticator.php
U swift-php5/compat/Swift_POP3_SMTP_Authenticator_.php
U swift-php5/compat/Swift_SMTP_Connection.php
U swift-php5/compat/Swift_Sendmail_Connection.php
cvs checkout: Updating swift-php5/compat/plugins
U swift-php5/compat/plugins/Swift_Anti_Flood_Plugin.php
U swift-php5/compat/plugins/Swift_Errors_Plugin.php
cvs checkout: Updating swift-php5/docs
U swift-php5/docs/Authenticator_API
U swift-php5/docs/Connection_API
U swift-php5/docs/Plugin_API
U swift-php5/docs/README-FIRST
U swift-php5/docs/Swift_IAuthenticator.php
U swift-php5/docs/Swift_IConnection.php
U swift-php5/docs/Swift_IPlugin.php
U swift-php5/docs/Swift_docs.txt
U swift-php5/docs/rfc2076.txt
U swift-php5/docs/rfc2487.txt
U swift-php5/docs/rfc2554.txt
U swift-php5/docs/rfc2821.txt
U swift-php5/docs/rfc_info.txt
cvs checkout: Updating swift-php5/docs/examples
U swift-php5/docs/examples/attachment_smtp.php
U swift-php5/docs/examples/basic_sendmail.php
U swift-php5/docs/examples/basic_smtp.php
U swift-php5/docs/examples/basic_smtp_multipart.php
U swift-php5/docs/examples/batch_smtp_multipart.php
U swift-php5/docs/examples/cc_smtp.php
U swift-php5/docs/examples/embedded_image.php
U swift-php5/docs/examples/loading_plugin.php
U swift-php5/docs/examples/rotating_connections.php
U swift-php5/docs/examples/smtp_authentication.php
U swift-php5/docs/examples/smtp_ssl.php
U swift-php5/docs/examples/smtp_tls_gmail.php
cvs checkout: Updating swift-php5/files
U swift-php5/files/durham.jpg
cvs checkout: Updating swift-php5/swift         <------- Shouldn't be here!!!
cvs checkout: Updating swift-php5/swift/php5
cvs checkout: Updating swift-php5/swift/php5/Swift
cvs checkout: Updating swift-php5/swift/php5/Swift/Authenticator
cvs checkout: Updating swift-php5/swift/php5/Swift/Connection
cvs checkout: Updating swift-php5/swift/php5/Swift/Plugin
cvs checkout: Updating swift-php5/swift/php5/compat
cvs checkout: Updating swift-php5/swift/php5/compat/plugins
cvs checkout: Updating swift-php5/swift/php5/docs
cvs checkout: Updating swift-php5/swift/php5/docs/examples
cvs checkout: Updating swift-php5/swift/php5/files

d11wtq@w3style:~/CVS_Test$ cd swift-php5/

d11wtq@w3style:~/CVS_Test/swift-php5$ ls
compat  CREDITS  CVS  CVSROOT  docs  files  LICENSE  README  swift  Swift  Swift.php  VERSION

#THIS LOOKS GOOD YEAH?

d11wtq@w3style:~/CVS_Test/swift-php5$ cvs remove -R swift
d11wtq@swiftmailer.cvs.sourceforge.net's password:
cvs remove: Removing swift
cvs remove: Removing swift/php5
cvs remove: Removing swift/php5/Swift
cvs remove: Removing swift/php5/Swift/Authenticator
cvs remove: Removing swift/php5/Swift/Connection
cvs remove: Removing swift/php5/Swift/Plugin
cvs remove: Removing swift/php5/compat
cvs remove: Removing swift/php5/compat/plugins
cvs remove: Removing swift/php5/docs
cvs remove: Removing swift/php5/docs/examples
cvs remove: Removing swift/php5/files

d11wtq@w3style:~/CVS_Test/swift-php5$ rm -rf swift   <---- That dir I don't want!

#JUST CHECKING

d11wtq@w3style:~/CVS_Test/swift-php5$ cvs commit -m 'whatever'
cvs commit: Examining .
cvs commit: Examining CVSROOT
cvs commit: Examining Swift
cvs commit: Examining Swift/Authenticator
cvs commit: Examining Swift/Connection
cvs commit: Examining Swift/Plugin
cvs commit: Examining compat
cvs commit: Examining compat/plugins
cvs commit: Examining docs
cvs commit: Examining docs/examples
cvs commit: Examining files
d11wtq@w3style:~/CVS_Test/swift-php5$

d11wtq@w3style:~/CVS_Test/swift-php5$ cd ..

d11wtq@w3style:~/CVS_Test$ cvs release -d swift-php5
d11wtq@swiftmailer.cvs.sourceforge.net's password:
You have [0] altered files in this repository.
Are you sure you want to release (and delete) directory `swift-php5': yes

d11wtq@w3style:~/CVS_Test$ ls -l
total 0

#OK SO LETS TRY CHECKING OUT AGAIN

d11wtq@w3style:~/CVS_Test$ cvs co swift-php5
d11wtq@swiftmailer.cvs.sourceforge.net's password:
cvs checkout: Updating swift-php5
U swift-php5/CREDITS
U swift-php5/LICENSE
U swift-php5/README
U swift-php5/Swift.php
U swift-php5/VERSION
cvs checkout: Updating swift-php5/CVSROOT
U swift-php5/CVSROOT/modules
cvs checkout: Updating swift-php5/Swift
cvs checkout: Updating swift-php5/Swift/Authenticator
U swift-php5/Swift/Authenticator/CRAMMD5.php
U swift-php5/Swift/Authenticator/LOGIN.php
U swift-php5/Swift/Authenticator/PLAIN.php
U swift-php5/Swift/Authenticator/POP3SMTP_.php
U swift-php5/Swift/Authenticator/README
cvs checkout: Updating swift-php5/Swift/Connection
U swift-php5/Swift/Connection/Multi.php
U swift-php5/Swift/Connection/Rotator.php
U swift-php5/Swift/Connection/SMTP.php
U swift-php5/Swift/Connection/Sendmail.php
cvs checkout: Updating swift-php5/Swift/Plugin
U swift-php5/Swift/Plugin/AntiFlood.php
U swift-php5/Swift/Plugin/ConnectionRotator.php
U swift-php5/Swift/Plugin/Errors.php
U swift-php5/Swift/Plugin/Example.php
U swift-php5/Swift/Plugin/Template.php
cvs checkout: Updating swift-php5/compat
U swift-php5/compat/README
U swift-php5/compat/Swift_CRAM_MD5_Authenticator.php
U swift-php5/compat/Swift_LOGIN_Authenticator.php
U swift-php5/compat/Swift_PLAIN_Authenticator.php
U swift-php5/compat/Swift_POP3_SMTP_Authenticator_.php
U swift-php5/compat/Swift_SMTP_Connection.php
U swift-php5/compat/Swift_Sendmail_Connection.php
cvs checkout: Updating swift-php5/compat/plugins
U swift-php5/compat/plugins/Swift_Anti_Flood_Plugin.php
U swift-php5/compat/plugins/Swift_Errors_Plugin.php
cvs checkout: Updating swift-php5/docs
U swift-php5/docs/Authenticator_API
U swift-php5/docs/Connection_API
U swift-php5/docs/Plugin_API
U swift-php5/docs/README-FIRST
U swift-php5/docs/Swift_IAuthenticator.php
U swift-php5/docs/Swift_IConnection.php
U swift-php5/docs/Swift_IPlugin.php
U swift-php5/docs/Swift_docs.txt
U swift-php5/docs/rfc2076.txt
U swift-php5/docs/rfc2487.txt
U swift-php5/docs/rfc2554.txt
U swift-php5/docs/rfc2821.txt
U swift-php5/docs/rfc_info.txt
cvs checkout: Updating swift-php5/docs/examples
U swift-php5/docs/examples/attachment_smtp.php
U swift-php5/docs/examples/basic_sendmail.php
U swift-php5/docs/examples/basic_smtp.php
U swift-php5/docs/examples/basic_smtp_multipart.php
U swift-php5/docs/examples/batch_smtp_multipart.php
U swift-php5/docs/examples/cc_smtp.php
U swift-php5/docs/examples/embedded_image.php
U swift-php5/docs/examples/loading_plugin.php
U swift-php5/docs/examples/rotating_connections.php
U swift-php5/docs/examples/smtp_authentication.php
U swift-php5/docs/examples/smtp_ssl.php
U swift-php5/docs/examples/smtp_tls_gmail.php
cvs checkout: Updating swift-php5/files
U swift-php5/files/durham.jpg
cvs checkout: Updating swift-php5/swift         <------- GAHHHH ITS STILL THERE!!??
cvs checkout: Updating swift-php5/swift/php5
cvs checkout: Updating swift-php5/swift/php5/Swift
cvs checkout: Updating swift-php5/swift/php5/Swift/Authenticator
cvs checkout: Updating swift-php5/swift/php5/Swift/Connection
cvs checkout: Updating swift-php5/swift/php5/Swift/Plugin
cvs checkout: Updating swift-php5/swift/php5/compat
cvs checkout: Updating swift-php5/swift/php5/compat/plugins
cvs checkout: Updating swift-php5/swift/php5/docs
cvs checkout: Updating swift-php5/swift/php5/docs/examples
cvs checkout: Updating swift-php5/swift/php5/files

d11wtq@w3style:~/CVS_Test$  #Urge to kill!!
Can someone point out my blatant mistake to me? :(

Thanks,

d11

Posted: Tue Aug 08, 2006 8:28 pm
by Weirdan
HOWTO wrote: The way that you remove a directory is to remove all the files in it. You don't remove the directory itself; there is no way to do that. Instead you specify the `-P' option to cvs update, cvs checkout, or cvs export, which will cause CVS to remove empty directories from working directories. Probably the best way to do this is to always specify `-P'; if you want an empty directory then put a dummy file (for example `.keepme') in it to prevent `-P' from removing it.

Posted: Tue Aug 08, 2006 8:43 pm
by Chris Corbyn
Ohhh.... :)

Hmm... that's weird... so the directories will always appear in the CVS tree? :(

Thanks.

Posted: Tue Aug 08, 2006 8:51 pm
by Weirdan
That's one of the annoying CVS quirks... it's possible to remove the directory altogether, but only if you have direct access to the repository (which, I guess, you don't)

Posted: Tue Aug 08, 2006 9:06 pm
by feyd
mmm I love you Subversion. Image

Posted: Wed Aug 09, 2006 2:22 am
by Chris Corbyn
Weirdan wrote:That's one of the annoying CVS quirks... it's possible to remove the directory altogether, but only if you have direct access to the repository (which, I guess, you don't)
Yeah it's on SF. I considered running my own but figured I may as well make use of the facilities I have at SF.net. Oh well, no worries.

~feyd, I'm gonna have a look at subversion too, I just wanted to get CVS understood first since I'm lead to believe SVN takes more learning :)

Posted: Wed Aug 09, 2006 2:56 am
by Chris Corbyn
I'm just experimenting and I create a new branch. Then I checked out the old branch and tried to add a file.

Code: Select all

cvs add: cannot add file on non-branch tag v2_1_6
? :(

v2-1_6 is the old branch, v2_1_7 is the new branch. I just wanted to add test.php to the v2_1_6 branch then commit it and make sure when I check out each branch, that they differ. I'm googling for that error but it's all just mailing lists that make it sound like a bug :(

EDIT | Never mind... I can add files to v2_1_7 and anything I make after that... obviously v2_1_6 which I tagged at import time isn't actually considered a branch or something? Thats fine :)