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 183698 - having trunk and branch of the same project in two working folders, if I commit on branch the file shows wrongly committed in trunk
Summary: having trunk and branch of the same project in two working folders, if I comm...
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS (show other bugs)
Version: 6.x
Hardware: PC Linux
: P1 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-08 10:27 UTC by pietrofedex
Modified: 2010-04-14 04:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot1 (43.16 KB, image/png)
2010-04-13 10:38 UTC, pietrofedex
Details
screenshot2 (29.81 KB, image/png)
2010-04-13 10:39 UTC, pietrofedex
Details
screenshot3 (48.14 KB, image/png)
2010-04-13 10:39 UTC, pietrofedex
Details
screenshot4 (62.49 KB, image/png)
2010-04-13 10:40 UTC, pietrofedex
Details
screenshot5 (43.96 KB, image/png)
2010-04-13 10:40 UTC, pietrofedex
Details
screenshot6 (42.75 KB, image/png)
2010-04-13 10:45 UTC, pietrofedex
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pietrofedex 2010-04-08 10:27:52 UTC
We have a project that at some point has been branched.
We need to work on trunk and on the branch simultaneously.
To do this after creating the branch of the project I have checked out the branched version into a different working folder.

Summarizing: I have 'project_trunk' folder containing the trunk head revision of the project and 'project_branch' folder containing the branched last revision.

The bug:

- Suppose that I have a file called 'file.txt' that was present into the project before the branch.

- Change the file on the two working folders without committing

- Commit the file in 'project_branch'

The file in 'project_branch' remains marked as not committed and the file in 'project_trunks' is marked as committed! Even if it isn't.

In other words the wrong working folder 'Entries' file is changed.
Comment 1 Ondrej Vrabec 2010-04-08 12:20:41 UTC
I just tried and had no problems. Where did you commit from (versioning view, projects view, main menu, was the right file selected)?
Could you please try once more commit the file in the branch, check in the commit dialog that there's a blue message saying "Committing to project_branch branch" in the lower left corner of the dialog? If not, please check once again you're committing the right file.
Could you also enable versioning labels (View > Show Versioning Labels), make screenshots during the commit process and attach them here?
Comment 2 pietrofedex 2010-04-13 10:37:25 UTC
Sorry for late reply,
the bug is difficult to reproduce, it happens in our development ambient.

To reproduce it do this:

1) create a folder with a netbeans project into it to be imported later with cvs:
    - mkdir test-container
    - create project into test-container (see attached 001.png)
    - close project

2) import into cvs
  - cd test-container
  - cvs -d :pserver:pfederico@pamelita:/opt/cvs/rep import test-container vtag rtag

3) simulate a developer that checkouts only the project from module
  - mkdir working-folder 
  - cd working-folder
  - cvs -d :pserver:pfederico@pamelita:/opt/cvs/rep checkout test-container/test-project

4) create a branch named 'alternative' on the project (see 003.png)

5) do checkout of the branched project in a different folder into working-folder
   - cvs -d :pserver:pfederico@pamelita:/opt/cvs/rep checkout -d alternative-project -r alternative test-container/test-project
   - open alternative branch project in netbeans
   - modify Main.java in trunk project and branch project (see 004.png)

6) commit Main.java for the branched version (see 006.png)
7) see the bug: Main.java marked as committed instead of the branched version, see also the color of the file name and changes marked (see 007.png)

The file is correctly committed into branch but netbeans marks the wrong file as 'current', 
The file in the trunk is wrongly marked into the 'Entries' file and also other cvs clients see this situation: file different from repository version but 'not changed'

Hope this makes the thing clearer
Comment 3 pietrofedex 2010-04-13 10:38:25 UTC
Created attachment 97160 [details]
screenshot1
Comment 4 pietrofedex 2010-04-13 10:39:01 UTC
Created attachment 97161 [details]
screenshot2
Comment 5 pietrofedex 2010-04-13 10:39:27 UTC
Created attachment 97162 [details]
screenshot3
Comment 6 pietrofedex 2010-04-13 10:40:11 UTC
Created attachment 97163 [details]
screenshot4
Comment 7 pietrofedex 2010-04-13 10:40:50 UTC
Created attachment 97165 [details]
screenshot5
Comment 8 pietrofedex 2010-04-13 10:45:42 UTC
Created attachment 97166 [details]
screenshot6

final result with not consistend status
Comment 9 Ondrej Vrabec 2010-04-13 15:45:13 UTC
fix: http://hg.netbeans.org/cdev/rev/8827de9e5a1d
Comment 10 Ondrej Vrabec 2010-04-13 15:56:38 UTC
Thanks very much for the thoroughly described steps to reproduce the bug. I wish there were more users like you who can willingly spend some time on describing the bug and explaining the problem, others are usually not that capable and it takes much more time for us (developers) to understand and reproduce the bug.
Please try the latest development build with the fix integrated (you'll be notified about the integration in this issue) and verify the fix.
Once more thanks for the exemplary cooperation.
Comment 11 pietrofedex 2010-04-13 16:05:56 UTC
Thanks to you,
I use successfully netbeans in my work since years,  I'm very glad to help making it a little better.
Comment 12 Quality Engineering 2010-04-14 04:41:07 UTC
Integrated into 'main-golden', will be available in build *201004140201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8827de9e5a1d
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #183698 - having trunk and branch of the same project in two working folders, if I commit on branch the file shows wrongly committed in trunk