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 255227 - show current does not work
Summary: show current does not work
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-11 15:09 UTC by everflux
Modified: 2015-09-11 19:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screencast showing the issue (258.43 KB, video/webm)
2015-09-11 16:14 UTC, everflux
Details

Note You need to log in before you can comment on or make changes to this bug.
Description everflux 2015-09-11 15:09:24 UTC
Product Version: NetBeans IDE Dev (Build 201509070002)
Updates: Updates available
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Linux version 3.19.0-28-generic running on amd64; UTF-8; en_US (nb)
User directory: /home/tkruse/.netbeans/dev
Cache directory: /home/tkruse/.cache/netbeans/dev

I have a git php project.
Right click on project -> git -> show history -> search history
I expand a commit, right click a file: select "view current" from the popup. Nothing happens.


Note: If I select "view", the file is shown in the version of the commit correctly.
Comment 1 Ondrej Vrabec 2015-09-11 16:02:22 UTC
Does the file really exist? Could it be a renamed file you're clicking on?
Comment 2 everflux 2015-09-11 16:04:32 UTC
Yes the file exists, was not renamed. (I could open it with ctrl-O, typing the name)

The only thing special: It is a squashed commit.
Comment 3 everflux 2015-09-11 16:14:23 UTC
Created attachment 156111 [details]
screencast showing the issue
Comment 4 everflux 2015-09-11 17:12:42 UTC
Works fine for a different (non-squashed) commit.
Comment 5 Ondrej Vrabec 2015-09-11 17:25:43 UTC
i am able to reproduce only for deleted files - removed/renamed in any of later commits, with existing files it works fine. Is there any message in the IDE log when you click the action?
Comment 6 everflux 2015-09-11 18:06:31 UTC
Re-test with latest build

Product Version: NetBeans IDE Dev (Build 201509110002)
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Linux version 3.19.0-28-generic running on amd64; UTF-8; en_US (nb)
User directory: /home/tkruse/.netbeans/dev
Cache directory: /home/tkruse/.cache/netbeans/dev

Same result. Checked logfile, nothing special stands out, neither in the old ide log.

If you tell me how/which loglevels to increase, I am happy to do so.
Comment 7 Ondrej Vrabec 2015-09-11 18:16:50 UTC
> If you tell me how/which loglevels to increase, I am happy to do so.
sadly, there is no logging that could be enabled. Does it happen for every file in the commit?
Comment 8 everflux 2015-09-11 18:26:56 UTC
Newly added files from that commit: Does not work
Modified files from that commit: Works for some (no idea what is different, different directory level, different casing does not seem to be the root cause, 3 of 9 files work)
Comment 9 everflux 2015-09-11 18:40:53 UTC
Added repo to reproduce the issue: https://github.com/everflux/nb-255227
Comment 10 Ondrej Vrabec 2015-09-11 19:21:50 UTC
Thanks for the repo, i can reproduce. But as i said earlier, the files do not exist.
If you look at the paths inside the commit Squashed commit...:
e.g. language/bg/info_acp_birthdaycontrol.php no longer exists, now its path is actually ext/anavaro/birthdaycontrol/language/bg/info_acp_birthdaycontrol.php
After the squashed commit you did a merge, but i guess as part of the merge you renamed/moved the files to new location.
That's why you can't open the current version if the file, the paths do not match:
language/bg/... vs ext/anavaro/birthdaycontrol/language/bg/...
Comment 11 everflux 2015-09-11 19:28:00 UTC
Now I get the point.

The use case here is to work with sub repositories.

Setup in this case is perfomed using:

git subtree add --prefix ext/anavaro/birthdaycontrol https://github.com/satanasov/birthdaycontrol master --squash

And adding commits
git subtree pull --prefix ext/anavaro/birthdaycontrol https://github.com/satanasov/birthdaycontrol.git master --squash

I don't know how common that scenarios is, but when developing with something like puppet or other software that integrates plugins/modules from third party git repositories it is a very nice workflow from my point of view.

Perhaps the 'view current' could be disabled if it can not be performed?
The best fix would be if Netbeans could work with this, though.
Comment 12 Ondrej Vrabec 2015-09-11 19:38:04 UTC
> Perhaps the 'view current' could be disabled if it can not be performed?
That would probably be too expensive to calculate for all files, i would have to check every file for existence and touch disk for that. Maybe at least display a warning if the file does not exist after the click so you are not confused when you click such a history record.
> The best fix would be if Netbeans could work with this, though.
I'll see what i can do, will have to try the steps with the subrepos, however i am not sure if i have all the info to calculate the correct path. At least it's not in the history (git log).