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 155045 - Project and file browsers not updated after using the command line and adding new files in NetBeans doesn't add them to the SubVersion working copy
Summary: Project and file browsers not updated after using the command line and adding...
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Subversion (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker with 4 votes (vote)
Assignee: issues@versioncontrol
URL:
Keywords:
: 170061 207806 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-09 16:01 UTC by voidmain
Modified: 2012-09-19 08:34 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description voidmain 2008-12-09 16:01:36 UTC
If you commit your code, update, revert or take any action via the command line and then switch back to NetBeans, the UI
isn't updated to reflect the changes to the local SubVersion working directory. The classic example is that I don't use
NetBeans to commit code. I always use the command line. After I commit my code and switch back to NetBeans, the UI still
shows the files that I modified in blue and files I added in green.
Comment 1 Tomas Stupka 2008-12-09 16:14:50 UTC
WAD.
please use 'show changes' to refresh the VCS status cache when invoking VCS commands externally.
Comment 2 voidmain 2008-12-09 17:06:40 UTC
My point was that it should do this automatically. Most other IDEs periodically check files on frame activation and
update the display for you. NetBeans should do the same. Having to constantly click something is a productivity loss and
annoying.
Comment 3 Tomas Stupka 2008-12-11 09:42:17 UTC
1.) 
netbeans checks the filesystem for changes. There are some limitations (i'm not going to discuss at this point as that
would be a bit out of scope), but the crucial thing here is the fact that the commit doesn't change a files timestamp so
there is at least in some (probably most) cases no change notification intercepted in the svn plugin and having the VCS
modules to scan all known files/working copies for possible status changes would definitely be a performance killer.
 
2.) 
why don't you use the netbeans commit anyway? In case it shouldn't meet your needs, please don't hesitate and file an
enhencement

3.) 
> Most other IDEs periodically check files on frame activation and
> update the display for you.
i gave one of them a try and it didn't work either...

4.) 
again. this is WAD. closing as wontfix this time. seems more appropriate than invalid
 
Comment 4 voidmain 2008-12-11 15:35:47 UTC
>1.) 
>netbeans checks the filesystem for changes. There are some limitations (i'm not going to discuss at this point as 
>that would be a bit out of scope), but the crucial thing here is the fact that the commit doesn't change a files
>timestamp so there is at least in some (probably most) cases no change notification intercepted in the svn plugin 
>and having the VCS modules to scan all known files/working copies for possible status changes would definitely be
>a performance killer.

The SVN client and working directory understands this information quite well. If you look at IntelliJ, it handles this
just fine with no loss of performance. You might consider looking at the SVNKit tool as that is what they use and it
might help in this situation.
 
>2.) 
>why don't you use the netbeans commit anyway? In case it shouldn't meet your needs, please don't hesitate and file 
>an enhencement

I perform tests, and a number of other operations before a check in. I much prefer the command line for this work and
find that I am much more productive than in an IDE. I also use other tools that might touch the SVN working copy.
Constraining uses to only the IDE is a dangerous plan and large productivity loss. This is one of the huge strengths of
IntelliJ IDEA.


>3.) 
>> Most other IDEs periodically check files on frame activation and
>> update the display for you.
>i gave one of them a try and it didn't work either...

IntelliJ IDEA does this. You obviously didn't check that IDE. I base most of my bugs for NetBeans against IDEA.


>4.) 
>again. this is WAD. closing as wontfix this time. seems more appropriate than invalid

Your choice, but this is definitely an issue that others have solved and I feel it is important for NetBeans to fix it.
I won't re-open it because I'm certain you'll just close it. But I think you should look at the overall productivity of
NetBeans versus IntelliJ IDEA and you'll see many problems, including this one.
Comment 5 voidmain 2008-12-12 21:16:23 UTC
I did some more research into IntelliJ's support for this and I'm going to re-open this issue for further discussion.
IntelliJ updates all files in the project in less than a second on frame activation. I had a project where I modified,
added, moved or deleted 40 files and then performed a commit via the command-line. When I switched back to IntelliJ, it
was able to change the status of all of these files immediately on frame activation.

I also played around with the SubVersion command-line tool and it works the same way that IntelliJ does. If you touch
files in your project like this:

'touch build.xml'

SubVersion does not mark them as modified when you execute 'svn status'. I'm guessing that it uses a hash or a fast
binary diff function to handle this. In addition, the SubVersion command-line tool is capable of checking very large
projects without much overhead.

I'm sure NetBeans can figure out how to do this and I feel that this issue is valid. Again, the SVNKit tools allow you
access to the SubVersion working copy directories and perform the same tasks as the command-line tool. I think you could
probably handle this using that library or looking at how they are doing it.
Comment 6 voidmain 2008-12-12 21:18:32 UTC
I also forgot to mention that using the work-around you can in comment #2 doesn't work.

I hit the "Show Changes" menu item from the "Versioning" menu and it did not update the status of the files in the
"Project" browser or the "Files" browser. They still are colored blue for modified and green for new.
Comment 7 voidmain 2008-12-12 21:23:10 UTC
It appears that you need to use the action "Subversion -> Show Changes" located in the context menu of the current
project in the "Files" browser to get NetBeans to update its cache. The same action from the "Versioning" menu doesn't
really do anything.
Comment 8 Peter Pis 2008-12-15 09:12:20 UTC
"Show Changes" action is context sensitive with no regards whether it's been invoked as a popup menu action or from main
menu. It processes the context that is selected (or in a case of "Versioning" window - the context that was selected
while "Show Changes" was run)  
Comment 9 voidmain 2008-12-15 16:00:50 UTC
I see. That makes some sense, but is also confusing as it isn't apparent to a newcomer that the IDE works in this
fashion. Even still, my currently selected project was the one in question and therefore the menu item should have still
worked properly and it didn't.
Comment 10 voidmain 2009-08-07 22:47:55 UTC
*** Issue 170061 has been marked as a duplicate of this issue. ***
Comment 11 voidmain 2009-08-07 22:53:46 UTC
I marked 170061 as a duplicate of this issue. It was a different problem, but along the same lines. The issue I have NetBeans is that it pretends that the 
command-line and SubVersion working copy don't exist. When you add a new file or class in NetBeans, it should at least ask you if you want to add the file 
to SubVersion. If you answer yes, it should add the file to the working copy. Currently, it does neither.

In addition, the original issue of this bug is still valid. Requiring that developers invoke an action to refresh the IDE is very cumbersome and slow. It is also 
not really necessary with the speed of modern computers and how efficient the modern JDKs are with respect to threading and files. You should be easily 
capable of looking in the SubVersion working copy directories on frame activation to determine if a files SubVersion status has changed.

I suggested on bug 170061 that you guys use svnkit because it works fine and this is what IntelliJ uses. I'd suggest that you serious investigate solving this 
issue as other IDEs are making developers lives simpler with these types of features while NetBeans is still very cumbersome and clunky with keeping the 
project in sync with the outside world.
Comment 12 javydreamercsw 2011-02-21 22:18:16 UTC
Sometimes the you need to submmit to subversion stuff that is not code. For example I have the following structure in most of my projects:

Top Folder
-DB
-Documentation
-Project 1
-Project 2
.
.
.

Netbeans only sees code within the porjects it can open but not the rest of the folder. Because of that sometimes I need to use Subversion client to commit the rest. If on that "external" commit I also commit stuff within the projects that's when the update doesn't happen within the IDE.
Comment 13 Ondrej Vrabec 2012-02-02 13:44:15 UTC
*** Bug 207806 has been marked as a duplicate of this bug. ***
Comment 14 Ondrej Vrabec 2012-09-19 08:34:18 UTC
We won't support external commits and other changes to the WC. In that case refresh the files using Subversion -> Show Changes