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 256650 - Remote Git -shows wrong status for files modified from outside IDE
Summary: Remote Git -shows wrong status for files modified from outside IDE
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote VCS (show other bugs)
Version: 8.2
Hardware: PC All
: P2 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-17 18:03 UTC by Alexander Pepin
Modified: 2015-12-21 18:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
I would propose the following additional fix. (5.24 KB, patch)
2015-11-24 10:20 UTC, Vladimir Kvashin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2015-11-17 18:03:02 UTC

    
Comment 1 Alexander Pepin 2015-11-17 18:08:30 UTC
Steps to reproduce:
- clone a project from git repository on the remote host
- open just cloned full remote project
- make any changes in any source file in the project and save the file
- call "Remote Git -> Show Changes" on the file node, it's displayed in Git versioning view as -/Modified
- commit the file from the console
- call again "Remote Git -> Show Changes" on the file node
Result: The file is still displayed in Git versioning view as -/Modified as well as in the editor and Files/Projects view.
Comment 2 Alexander Simon 2015-11-18 14:36:02 UTC
Command in console changed only "administrative metadata" in .git repository.
Remote file system does not track changes in .git folder and do not send notification.

Use button "Refresh Statuses" in Remote Git "Show Changes" panel to work around this problem.
Comment 3 Alexander Simon 2015-11-19 15:33:30 UTC
fixed in enum, change set:
347a847cc15e
Comment 4 Quality Engineering 2015-11-24 02:30:53 UTC
Integrated into 'main-silver', will be available in build *201511240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/89f6cd61eb78
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #256650 Remote Git -shows wrong status for files modified from outside IDE
(transplanted from 347a847cc15e66bb00d2dce0c57c09342983ebfe)
Comment 5 Vladimir Kvashin 2015-11-24 10:20:55 UTC
Created attachment 157473 [details]
I would propose the following additional fix.

I would propose the following additional fix. It's just a refactoring. Without it the code in RemoteDirecotry is impossible to understand. We cannot change this strange listFiles() (which seems to be rather a recursive refresh) signature in core vcs, let's at least name methods in our code properly.

There is one more usage of MiscOperations.listFiles - in RecursiveListener.init. I don't quite understand, should it be changed to new method as well...
Comment 6 Alexander Simon 2015-11-24 10:50:30 UTC
(In reply to Vladimir Kvashin from comment #5)
> Created attachment 157473 [details]
> I would propose the following additional fix.
> 
> I would propose the following additional fix. It's just a refactoring.
> Without it the code in RemoteDirecotry is impossible to understand. We
> cannot change this strange listFiles() (which seems to be rather a recursive
> refresh) signature in core vcs, let's at least name methods in our code
> properly.
> 
> There is one more usage of MiscOperations.listFiles - in
> RecursiveListener.init. I don't quite understand, should it be changed to
> new method as well...

In general I do not understand why your introduce new method.
The method MiscOperations.listFiles fits the method VCSInterceptor.refreshRecursively.

You suggest to broke relation with two interfaces and introduce a new method directoryChanged.
IMHO it is superfluously.

Creating private method with good name in the class RemoteDirectory is enough.
Comment 7 Vladimir Kvashin 2015-11-24 15:08:35 UTC
Agreed. Introducing new method is not the right thing to do. 
So we finally agreed on renaming the old listFiles method to refreshRecursively.
I pushed this additional fix to enum repo:
73b3725ee56b
Comment 8 Quality Engineering 2015-12-03 02:24:28 UTC
Integrated into 'main-silver', will be available in build *201512030002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/cd0db74d2f6c
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: renamed  listFiles to refreshRecursively  (additional fix for #256650 - Remote Git -shows wrong status for files modified from outside IDE)
(transplanted from 73b3725ee56baf32fd3567dc68c14ff6ce0e032b)
Comment 9 Alexander Pepin 2015-12-21 18:22:43 UTC
verified in build 20151215.