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 205857 - Diff of working copy should not involve network
Summary: Diff of working copy should not involve network
Status: VERIFIED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Subversion (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 206092
  Show dependency tree
 
Reported: 2011-12-02 15:07 UTC by Jesse Glick
Modified: 2012-01-31 14:06 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 Jesse Glick 2011-12-02 15:07:30 UTC
If I have a SVN checkout and make some modifications and then use Team > Diff to see what I have changed locally, the IDE pauses before every file, apparently contacting the repository. But this is unnecessary - SVN specifically keeps a baseline copy of every file in the .svn dir so that 'svn diff' can run quickly offline!
Comment 1 Ondrej Vrabec 2011-12-02 15:14:46 UTC
Do you have 'Local changes only' mode selected (the middle image toggle button in the diff's toolbar)?
Comment 2 Jesse Glick 2011-12-02 15:18:55 UTC
I never noticed such a button before. What else would I be asking for other than local changes?? If I select Team > Diff I expect the result to be comparable to running 'svn diff' from the command line. If there is some other mode of operation, that needs to be invoked using some explicit UI gesture.
Comment 3 Ondrej Vrabec 2011-12-02 15:27:41 UTC
>  What else would I be asking for other than local changes??
Well, for example remote changes so you know there are some and you should do an update.
If you want to see only local changes permanently, just select the respective mode, it will be remembered and next time you do Team -> Diff, it will check only local changes and won't go remote.
Comment 4 Jesse Glick 2011-12-02 15:42:26 UTC
(In reply to comment #3)
> remote changes so you know there are some and you should do an update.

This should be some different action - Team > Incoming or similar. As presented it makes no sense at all. While I might conceivably want to diff the head of remote to the baseline of my working copy (rarely useful but for sake of argument), I would never want to diff the head of remote to my modified working copy - this would just be garbage.

> If you want to see only local changes permanently, just select the respective
> mode, it will be remembered

So I have found. But why is the default not what you would expect?
Comment 5 Ondrej Vrabec 2011-12-02 16:10:19 UTC
> This should be some different action - Team > Incoming or similar. As presented
> it makes no sense at all. While I might conceivably want to diff the head of
> remote to the baseline of my working copy (rarely useful but for sake of
> argument), I would never want to diff the head of remote to my modified working
> copy - this would just be garbage.
I have no strong arguments up my sleeve, please do not get angry at me, i was not the one coming with this behavior. As far as i know, it was designed this way long ago already for the CVS module - long before i inherited the CVS and Subversion modules - and no one has minded until now.
> So I have found. But why is the default not what you would expect?
Because it's been working this way since the beginning and i haven't thought about changing it. If you strongly think the default mode should be just 'Local Changes Only', let me know.
Comment 6 Jesse Glick 2011-12-02 17:15:17 UTC
Yes, I think "Local Changes Only" should be the default. If you run one of the most commonly used actions on the most commonly used VCS from the IDE, you would be surprised to find it doing something (a) slow, (b) different from what the command of the same name would do outside the IDE, (c) possibly wrong (since it is unclear what exactly it is diffing against and why). I do not even think other modes should be the same "Diff" action.

BTW I just tried running diff again on a different SVN-controlled project, with "Show Locally Modified Files" selected; I briefly saw the lower pane say "<Fetching files from the repository. Please wait...>". Not sure if it really meant it was contacting the repository, or that is just a misleading message and it was actually using the baseline. Perhaps the latter since it still works when the network is disconnected, but my computer seems to be making a network connection when online.
Comment 7 Ondrej Vrabec 2011-12-02 18:32:35 UTC
ok, let's change the default mode
Comment 8 Ondrej Vrabec 2011-12-05 09:56:55 UTC
i just noticed that the default mode was set to LOCAL_CHANGES_ONLY long time ago: core-main #db793615b9cd . So you probably changed the mode to all sometimes in the past or still use the same userdir. If you run the IDE with a fresh userdir (or at least delete ~/nb-userdir/config/Preferences/o/n/m/Subversion.properties) diff should automatically open in the local-changes mode.
Comment 9 Ondrej Vrabec 2011-12-05 10:42:30 UTC
fix: http://hg.netbeans.org/core-main/rev/c7f482b69f48
Comment 10 Quality Engineering 2011-12-06 12:14:30 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/c7f482b69f48
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #205857 - Diff of working copy should not involve network
do not call remote status even after clicking on refresh button in Local Changes Diff mode
do not call remote status for Local Changes Mode in Versioning view
Comment 11 Stepan Zebra 2011-12-08 17:26:07 UTC
verified in trunk
Comment 12 Ondrej Vrabec 2012-01-09 11:20:19 UTC
fixed in release71_fixes: http://hg.netbeans.org/releases/rev/592c8d77483a
Comment 13 Stepan Zebra 2012-01-09 15:18:57 UTC
verified in release71_fixes