problem with checkout -r (with possible solution)
Benoit Maisonny <[email protected]> Fri, 23 Jul 2004 20:01:06 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.javacvs.devel |
|---|---|
| Organization | Synclude |
| Message-ID | <[email protected]> |
Hi, Sorry for the long email, but I thought I should give details of my debugging session to source my problem. I have a problem when using cvslib to checkout a specific revision. After a brand new checkout is completed, CVS/Repository file is not correct. Instead of containing only the module name, it contains [module name]/.cvsignore. ".cvsignore" happens to be the first file updated during the checkout. For a checkout of HEAD, it works all right, provided we don't set the revision flag (which I understand we should avoid anyway, but that's another story). I tracked what is happening with a debugger: For a checkout of HEAD, cvslib Client processes a ClearStickyResponse object before any UpdatedResponse. In ClearStickyResponse.java, line 39, there is a call to services.updateAdminData(...), with a repositoryPath containing the module name only. This creates CVS/Repository file correctly. During a checkout with -r flag, cvslib Client processes a SetStickyResponse object before any UpdatedResponse. SetStickyResponse#process() does not call services.updateAdminData(), however, so the administration files are not created until UpdatedResponses are processed. The first UpdatedResponse to come up is about my file .cvsignore, so UpdatedResponse#process() calls updateAdminData with a repositoryPath of [module name]/.cvsignore. And this is written into CVS/Repository. In SetStickyResponse#process(), line 43, there is actually a call to services.updateAdminData(), but it is commented out. When I uncomment this line, CVS/Repository file is correct. Browsing the history of SetStickyResponse.java seems to tell that this line has always been commented out. So I'm wondering if my uncommenting this line is a good idea or not... Maybe I'm breaking something else that I haven't noticed yet. What do you think? Thanks for any clue, Benoit