Register kdevelop as handler for repo urls, add --fetch argument
ClosedPublic

Authored by kossebau on Nov 15 2017, 5:59 PM.

Details

Summary

Allows to speed-up the import of new projects, just clicking a repo url
would start a kdevelop instance right into the import dialog, with data
prefilled.

Using --ps argument with the handlers allows to keep control with which
session a project should be fetched.

Test Plan

Calling kdevelop --fetch git://anongit.kde.org/kdevelop.git starts last
kdevelop session right into fetch dialog.
Invoking a handler onto a git://anongit.kde.org/kdevelop.git starts
kdevelop, asks for session and then proceeds into fetch dialog.
DnD of repo urls onto the mainwindow works as before

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Nov 15 2017, 5:59 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptNov 15 2017, 5:59 PM
apol accepted this revision.Nov 15 2017, 11:31 PM
apol added a subscriber: apol.

❤ I meant to do this for longtime, never did it, thanks Mr @kossebau.

This revision is now accepted and ready to land.Nov 15 2017, 11:31 PM
In D8830#168225, @apol wrote:

❤ I meant to do this for longtime, never did it, thanks Mr @kossebau.

I still left for you to implement the repo url handling in the KDE provider plugin, so "kdevelop -f kde:kalgebra" will work as well :)

Thanks for review. landing tomorrow.

kfunk accepted this revision.Nov 16 2017, 8:52 AM
kfunk added a subscriber: kfunk.

Nice idea indeed!

kdevplatform/shell/projectcontroller.cpp
859

Could be factored out into a vcsProviderPluginForUrl(...) method.

kossebau added inline comments.Nov 16 2017, 11:23 AM
kdevplatform/shell/projectcontroller.cpp
859

With no other consumers of the method yet, and fetchProjectFromUrl() code still matching into one screen I'd propose to keep it inlined for now.

Follow-up feature would be to turn the Plasma KDevelop session applet into a spring-folder like implementation, so one can drag'n'drop repo urls onto a session and have it started and opening the fetch dialog.

This revision was automatically updated to reflect the committed changes.