Bug 159480 - [Doc] Pruning always happens when checking out from a branch
Summary: [Doc] Pruning always happens when checking out from a branch
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 RC2   Edit
Assignee: platform-cvs-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: faq
Depends on:
Blocks:
 
Reported: 2006-10-02 14:09 EDT by Bruce CLA
Modified: 2007-05-25 10:00 EDT (History)
0 users

See Also:


Attachments
CVS Trace for checking out an empty directory with CVS 1.11.6 (11.15 KB, text/plain)
2006-10-03 10:16 EDT, Bruce CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bruce CLA 2006-10-02 14:09:22 EDT
In Eclipse 3.2, empty folders do not appear in the navigator view when a projected is checked out. "Prune empty directories" is turned off. 

Team -> Synchronize also fails to bring in the empty directory. This was a problem in Eclipse 3.1. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=117515

The only way I found to get empty directories from CVS is to check out the project and then use "Replace with latest" from branch.
Comment 1 Michael Valenta CLA 2006-10-02 14:20:07 EDT
In 3.2.1, I performed a checkout with pruning turned off and the empty directories were included. If this doesn't work for you, please provide the exact steps to reproduce (and please use 3.2.1 as it is the latest release).
Comment 2 Bruce CLA 2006-10-02 15:10:07 EDT
This does not work for me using Eclipse 3.2.1. 

Start with a project in CVS containing at least one folder that has an empty sub-folder. i.e. myProject/xmlFolder/emptyFolder. The project should not be in your workspace. If it is in your workspace, delete your project and all contents. 

Check out the project from CVS. 
The project exists in your workspace. The subfolders (xmlFolder) exist. But the empty folder (emptyFolder) does not exist. 

Right click on the project or parent folder (xmlFolder) and replace the project or parent folder with latest from CVS. The empty folder will appear. 
Comment 3 Michael Valenta CLA 2006-10-02 15:36:51 EDT
Here's what I did:

1) Turned off pruning (i.e. unchecked the Prune empty directories preference on the Files and Folders tab of the Team/CVS preference page.

2) Perform an Import and chose Projects from CVS

3) Selected an appropriate repository and project

4) Resulting project in my workspace had empty directories present at both the root and nested within other directories

These steps work for me in both 3.2.1 and 3.3 M2. Are you doing something different?
Comment 4 Bruce CLA 2006-10-02 17:12:07 EDT
Mike, 

Thanks for trying to reproduce this. 

Step 1 is the same. But I used the CVS perspective to check out the project. 

After seeing your response, I tried File -> Import -> CVS -> Projects form CVS as you describe in step 2. I did not get the empty folder.  

I wonder if it is a problem with our version of CVS. We are using version 1.11. 

Here are the log messages from the CVS console. 
cvs co -d "XisTestDoc3" -r "i0ptd92" "/iDev/Publications/XmlInformationSystem/XisTestDocProjects/Source/XMLdoc/en/XisTestDoc3"
    cvs server: Updating XisTestDoc3
    U XisTestDoc3/.project
    cvs server: Updating XisTestDoc3/image
    U XisTestDoc3/image/Apple.tif
    U XisTestDoc3/image/Apple.tif.generated.gif
    U XisTestDoc3/image/lemon.tif
    U XisTestDoc3/image/lemon.tif.generated.gif
    U XisTestDoc3/image/menuArrow.eps
    U XisTestDoc3/image/menuArrow.eps.generated.gif
    cvs server: Updating XisTestDoc3/xml
    U XisTestDoc3/xml/DSF-eDocNickSimple.xml
    U XisTestDoc3/xml/DSFdog1.xml
    U XisTestDoc3/xml/DSFdog2.xml
    U XisTestDoc3/xml/DSFeDocNickTest1.xml
    U XisTestDoc3/xml/DSFnickHelp1.xml
    U XisTestDoc3/xml/DSFsandie1.xml
    U XisTestDoc3/xml/DSFstandaloneBook.xml
    U XisTestDoc3/xml/DSFstandaloneEdoc.xml
    U XisTestDoc3/xml/IndexExamples.xml
    U XisTestDoc3/xml/TopicCollectionFragment1.xml
    U XisTestDoc3/xml/TopicCollectionFragment2.xml
    U XisTestDoc3/xml/TopicCollectionFragment3.xml
    U XisTestDoc3/xml/XisTestDoc1.xml
    U XisTestDoc3/xml/XisTestDoc3.xml
    U XisTestDoc3/xml/bookTest1.xml
    U XisTestDoc3/xml/dogTopic4.xml
    U XisTestDoc3/xml/dogTopic77.xml
    U XisTestDoc3/xml/dogTopicCollection.xml
    U XisTestDoc3/xml/dogTopicContent.xml
    U XisTestDoc3/xml/jp_DSFstandaloneBook.xml
    U XisTestDoc3/xml/jp_DSFstandaloneEdoc.xml
    U XisTestDoc3/xml/nestedErrorMessageBlock.xml
    U XisTestDoc3/xml/pl_DSFstandaloneBook.xml
    U XisTestDoc3/xml/pl_DSFstandaloneEdoc.xml
    U XisTestDoc3/xml/refClassCollectionNick1.xml
    U XisTestDoc3/xml/refClassNick1.xml
    U XisTestDoc3/xml/topic4.xml
    U XisTestDoc3/xml/topic77.xml
    cvs server: Updating XisTestDoc3/xml/test
ok (took 0:01.718)
***

    cvs server: Updating xml/test
Comment 5 Bruce CLA 2006-10-02 17:23:30 EDT
cvs -v

Concurrent Versions System (CVS) 1.11.6 (client/server) [SAS Enhanced]

Copyright (c) 1989-2003 Brian Berliner, david d `zoo' zuhn, 
                        Jeff Polk, and other authors

CVS may be copied only under the terms of the GNU General Public License,
a copy of which can be found with the CVS distribution kit.
Comment 6 Michael Valenta CLA 2006-10-03 09:20:06 EDT
1.11.6 is a supported version. Can you try the steps at this URL to get a protocol trace?

http://wiki.eclipse.org/index.php/CVS_FAQ#Is_there_any_equivalent_to_CVS_CLIENT_LOG_is_Eclipse.3F

That may tell us if there is something different happening with your "SAS enhanced" server.
Comment 7 Bruce CLA 2006-10-03 10:16:38 EDT
Created attachment 51336 [details]
CVS Trace for checking out an empty directory with CVS 1.11.6

The trace captured the information returned from CVS for the empty directory (XisTestDoc3/xml/test/). Earlier information was not captured. Let me know if you need more information.
Comment 8 Michael Valenta CLA 2006-10-03 11:44:21 EDT
It would appear that there is extra information provided for folders in your customized folders:

Set-sticky XisTestDoc3/xml/
/cvs/cvs_vertical/iDev/Publications/XmlInformationSystem/XisTestDocProjects/Sour
ce/XMLdoc/en/XisTestDoc3/xml/
Ti0ptd92

The 3rd line (Ti0ptd92) is not standard CVS. This must be throwing off the empty directory creation. We generally do not support these types of customizations but would be happy to accept a patch that improves the robustness of the parser to properly ignore the extra information.
Comment 9 Bruce CLA 2006-10-03 17:46:41 EDT
Mike, 

Are you checking out projects from HEAD or from a branch? I found that checking out a project from HEAD does return empty directories. I am checking out a project from branch i0ptd92. The branch is the information returned in the third line. 

I followed up with our CVS support team and reviewed the CVS documentation. I found that prune empty directories is the default when you checkout a project and specify a branch with the -r option. There appears to be no option to turn off pruning. http://ximbiot.com/cvs/wiki/index.php?title=CVS--Concurrent_Versions_System_v1.12.12.1:_Guide_to_CVS_commands#SEC172

Can you confirm that you do not get empty directories when checking out a project from a branch? 

This behavior is not documented in the CVS preference documentation for the prune empty directory option. Let me know if you want me to open a defect for the documentation. 
Comment 10 Michael Valenta CLA 2006-10-04 09:42:20 EDT
It's all coming back to me now. That is exactly the case. We have code that will always prune if -D or -r is specified. we will update our doc to reflect this.
Comment 11 Michael Valenta CLA 2007-01-12 13:15:12 EST
*** Bug 170321 has been marked as a duplicate of this bug. ***
Comment 12 Michael Valenta CLA 2007-05-18 11:04:52 EDT
I've added a note to the preference doc and updated the FAQ.
Comment 13 Michael Valenta CLA 2007-05-25 10:00:02 EDT
Verified in I20070525-0010