Appwizard plugin. Add more repository information in the project file.
Needs ReviewPublic

Authored by volden on Jul 27 2018, 8:34 PM.

Details

Reviewers
mwolff
Group Reviewers
KDevelop
Summary

KDevelop Project file. Add the possibility to write RepositoryServer,
-User, -Branch and -Path. Should that info be present.

Diff Detail

Repository
R32 KDevelop
Lint
Lint Skipped
Unit
Unit Tests Skipped
volden requested review of this revision.Jul 27 2018, 8:34 PM
volden created this revision.
volden updated this revision to Diff 38626.Jul 27 2018, 8:41 PM
kossebau edited reviewers, added: KDevelop; removed: kdevelop-devel.Aug 6 2018, 2:59 PM

Ping! Anyone?

Curious: why would that be needed? Isn't that metadata which can be queried from the actual VCS? Keeping a copy here runs the challenge of getting out of sync.

So what is the usecase here?

This is for centralized version control. e.g. Perforce. So since the actual VCS resides on a server we need to know which one to contact and with what user etc.

I have tried to break a larger diff into smaller pieces, since that sometimes also makes it easier for the reviewer to go through the changes. But that, of course, comes with a loss of context. Apologies for that.

I should probably also mention that the diff is one in a series that should get the perforceImportMetadataWidget fully functional.

Centralized version control does not exclude that the metadata about accessing the central repo are stored inside local standardized locations. E.g. subversion has the data as part of the local metadata., stored in the .svn.
So is that different with perforce? And any perforce client needs to maintain the metadata about the central repository in their custom way?

Perforce clients can access that metadata in two ways.

  1. from a file in the local repository. Usually that file is called p4config.txt, but it can be named to whatever (Decided by the environment var P4CONFIG).
  2. By environment vars, for example the Repository server URL is stored in P4PORT.

Perforce Plugin in its current form can only work with option 1.

However, we have users for which option 1 is a no-go. So my plan is to make the Plugin work in both scenarios. Therefore I need somewhere to persist those settings if the user is not using option 1

Perforce clients can access that metadata in two ways.

  1. from a file in the local repository. Usually that file is called p4config.txt, but it can be named to whatever (Decided by the environment var P4CONFIG).
  2. By environment vars, for example the Repository server URL is stored in P4PORT.

    Perforce Plugin in its current form can only work with option 1.

    However, we have users for which option 1 is a no-go. So my plan is to make the Plugin work in both scenarios. Therefore I need somewhere to persist those settings if the user is not using option 1

I see, thanks. IMHO we should change the code then to allow the respective vcs plugin used for the new project to write any additional data it wants/needs to store in the config, instead of this generic writing which is only currently needed for one system. No idea yet how this could be done, not looked at the code, just speaking in principle.

arrowd added a subscriber: arrowd.Aug 22 2018, 10:38 AM

IMHO we should change the code then to allow the respective vcs plugin used for the new project to write any additional data it wants/needs to store in the config, instead of this generic writing which is only currently needed for one system. No idea yet how this could be done, not looked at the code, just speaking in principle.

Like this? https://bitbucket.org/arrowd/kdevelop-haskell/src/fe31614f904547ab3f9f36fd87a9915c52d9c6d9/haskellutils.cpp?at=master&fileviewer=file-view-default#haskellutils.cpp-87

There is more declarative approach to this using .kcfg files: https://bitbucket.org/arrowd/kdevelop-haskell/src/fe31614f904547ab3f9f36fd87a9915c52d9c6d9/projectsettings.kcfg?at=master&fileviewer=file-view-default
which can be used like this: https://bitbucket.org/arrowd/kdevelop-haskell/src/fe31614f904547ab3f9f36fd87a9915c52d9c6d9/haskellsupport.cpp?at=master&fileviewer=file-view-default#haskellsupport.cpp-121

plugins/appwizard/appwizardplugin.cpp
406

Not a request, just suggestion. How about renaming "Repository" to "VersionControl", so that these fields names are more aligned with each other.

mwolff resigned from this revision.Jan 24 2019, 3:59 PM