Bug 430024 - Shortcuts can break git/svn integration functions
Summary: Shortcuts can break git/svn integration functions
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 20.08.2
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-04 21:36 UTC by Brendon Higgins
Modified: 2020-12-28 15:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brendon Higgins 2020-12-04 21:36:45 UTC
SUMMARY

Suppose the user has a shortcut to a subfolder of a git or svn working copy. If the user starts a fresh instance of Dolphin and then uses that shortcut to navigate to that folder, it seems the git/svn integration fails not realise this location is part of a working copy, and doesn't show status icons or context menu options.

If the user navigates to a location where the git/svn root folder is present in the path/breadcrumb widget (this might be as simple as going to the parent of the shortcut folder), then it starts working. The user can then navigate back to the shortcut location, either manually or by using the shortcut, and the integration continues to work from then on.

It seems like the git/svn integration keeps track of which folders are known to be working copies, but initially it only examines folders up to the highest-level folder that is displayed in path/breadcrumb widget - not the root of the filesystem. This fails in the above situation, where the shortcut name is the highest-level folder shown on the widget, but on the actual filesystem it exists below the root of the working copy.

I tested git and svn, but others might also be affected.

Best,
Brendon
Comment 1 Elvis Angelaccio 2020-12-27 17:18:57 UTC
Git commit c1739d5c4d55401a03462467ed446763924be844 by Elvis Angelaccio, on behalf of Méven Car.
Committed on 27/12/2020 at 17:18.
Pushed by elvisangelaccio into branch 'master'.

Version Control plugin: allow plugins to return repository root

Currently plugins `fileName()` only return path file extension.

This changes allows plugins to return the absolute file path to their repository root.

M  +5    -0    src/views/versioncontrol/kversioncontrolplugin.cpp
M  +6    -0    src/views/versioncontrol/kversioncontrolplugin.h
M  +33   -62   src/views/versioncontrol/versioncontrolobserver.cpp
M  +4    -3    src/views/versioncontrol/versioncontrolobserver.h

https://invent.kde.org/system/dolphin/commit/c1739d5c4d55401a03462467ed446763924be844
Comment 2 Méven Car 2020-12-28 15:41:27 UTC
Git commit 6b9caff21b00282a912da2319affe55fb1595196 by Méven Car.
Committed on 28/12/2020 at 08:08.
Pushed by elvisangelaccio into branch 'master'.

Allow git, hg and svn plugins to detect working copy root

M  +12   -1    git/fileviewgitplugin.cpp
M  +1    -0    git/fileviewgitplugin.h
M  +11   -0    hg/fileviewhgplugin.cpp
M  +1    -0    hg/fileviewhgplugin.h
M  +11   -0    svn/fileviewsvnplugin.cpp
M  +1    -0    svn/fileviewsvnplugin.h

https://invent.kde.org/sdk/dolphin-plugins/commit/6b9caff21b00282a912da2319affe55fb1595196