This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 192951 - Branch action works recursively
Summary: Branch action works recursively
Status: RESOLVED WONTFIX
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-07 01:11 UTC by mperezma
Modified: 2012-06-07 08:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
correctly branched aa package (18.24 KB, image/png)
2011-11-22 12:53 UTC, Ondrej Vrabec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mperezma 2010-12-07 01:11:53 UTC
Steps to reproduce:

- Create package aa and add a class NewClass to it.
- Create package aa.bb and add a class NewClass2 to it.
- Branch the package aa.

Expected: Only aa package and aa.NewClass class are branched.

Result: aa.bb package and aa.bb.NewClass2 are also included in the branch.

Related bugs:
Bug#170758 - Tag action works recursively (fixed)
Bug#170759 - Merge changes from branch action works recursively (fixed)
Comment 1 Jiri Kovalsky 2011-11-22 11:56:21 UTC
CVS tribe from NetCAT 7.1 considers this as critical bug. Ondro, can you please investigate how hard it would be to fix this defect? Thanks a lot!
Comment 2 Ondrej Vrabec 2011-11-22 12:53:41 UTC
Created attachment 113410 [details]
correctly branched aa package

works for me, see the structure after branch on the attached screenshot
1) i selected 'aa' and did CVS -> Branch, entered new_branch2 and clicked on Branch
2) aa and NewClass.java were branched and then switched to the branch
3) aa.bb was not branched and even if i now try to switch to the branch via CVS -> Switch to Branch then there is nothing in the branch list to select - which indicates the package was not yet branched, i think.
If you think this is valid then provide *exact* and *detailed* steps to reproduce. I must admit i do not work with CVS so i might have missed some step or anything else.
Comment 3 Tomas Stupka 2011-11-22 13:16:35 UTC
could not reproduce either. creating a new branch as well as switching to an existing seems to work fine.

why is this a p2? this was a p3 for almost a year, no duplicates or votes but suddenly it is considered critical without any deeper justification? please elaborate ...
Comment 4 mperezma 2011-11-22 13:21:19 UTC
It's working for me now!! :-? I've tried now with the same RC1 build and branching does not act recursively..

This night I will verify again at home, where it failed.

Tomas, this a requeriment for pass CVS sanity tests [1]

[1] http://wiki.netbeans.org/TS_70_CVS
Comment 5 mperezma 2012-06-06 22:46:23 UTC
Sorry, I'm here again. I think I have found the way to reproduce it. In fact, it can't be done as I described because no file can be branched before having commited it. So, the steps to reproduce are:

- Create package aa and add a class NewClass to it.
- Create package aa.bb and add a class NewClass2 to it.
- Commit the package aa by right click it and select cvs->commit
- Branch the package aa.

Expected: Only aa package and aa.NewClass class are branched.

Result: aa.bb package and aa.bb.NewClass2 are also switched to the new branch. If you commit this package now, it will be commited into the branch. Then, if you switch this package aa.bb to the trunk, it will disappear forever!
Comment 6 Ondrej Vrabec 2012-06-07 07:46:57 UTC
But it works correctly, does it not? If a file is not yet committed, it's just floating in your checkout without being bound to the trunk or a branch. It is the same as if you created the package (and the file) right after you had switched to the branch. A file (folder) is *for the first time* committed into the branch its parent is in. Isn't this logical? What would you expect? That we commit the package to trunk even when all its predecessors are from the branch? How could we know that??
Comment 7 mperezma 2012-06-07 08:42:27 UTC
You are right, aa.bb package can't be commited to the trunk because there is no aa "folder" in the trunk on cvs repository. Java packages shouldn't behave as folders, so if you for example rename aa package to ab, the aa.bb package won't change. But it seems that in this case we can't avoid cvs actions to act recursively.
Thanks