inqlude-data icon indicating copy to clipboard operation
inqlude-data copied to clipboard

Can url/vcs always points to a true VCS repo ?

Open oliviermaridat opened this issue 10 years ago • 3 comments

Hi there!

I am wondering about the content of the field url/vcs of the manifest files. I though it would contain a link to a usable VCS repository (to be able to do "git clone url" for example), but apparently it depends of the projects.

For example:

  • liblastfm url/vcs is pointing to a Git repository https://github.com/lastfm/liblastfm
  • But Karchive url/vcs is pointing to "https://projects.kde.org/projects/frameworks/karchive/repository", which is not the "real" VCS repository. This page allows to browse the repository and actually said the "real" VCS repository is http://anongit.kde.org/karchive

Is it on purpose?

oliviermaridat avatar Jun 05 '15 10:06 oliviermaridat

The idea is to have this field link to a web page with information about how the repository can be accessed. In some cases this can double as the actual clone URL (in the case of GitHub for example), but in general the page should be accessible by a browser.

Adding information about how a version control can check out the code might be nice to add, but this would need a little bit more structure, especially to support the generic case of different version control systems.

cornelius avatar Jun 05 '15 14:06 cornelius

Ok thanks, I understand better your vision here. I suppose that the "inqlude-client" is only using source URL ("packages/source"), and this is why it does not have any issue with that. Am I wrong?

If you intend to add this information, one solution may be to add a new "git"/"svn"/"hg" field in "packages". For example with Git:

 "packages": {
    "source": "https://github.com/lastfm/liblastfm/archive/1.0.8.tar.gz",
    "git": "https://github.com/lastfm/liblastfm"
  }

Or with SVN (some additional fields may be required for some project, because SVN does not support branch, tags, etc natively)

 "packages": {
    "source": "https://svnhub.com/lastfm/liblastfm/archive/1.0.8.tar.gz",
    "svn": "https://svnhub.com/lastfm/liblastfm",
    "trunk-path": "Trunk",
    "branches-path": "Branches",
    "tags-path": "Tags"
  }

Actually, it is usually possible to guess the VSC type (Git, SVN, ...) using the URL (github, ...). So a "vcs" field could be the default one, and for some project "git", "svn" or any other can be used instead.

What do you think?

oliviermaridat avatar Jun 09 '15 11:06 oliviermaridat

Yes, I think we need some explicit fields for the version control system. There actually is an item in the todo list for that: https://github.com/cornelius/inqlude/blob/master/TODO#L24

Figuring out what the best structure is needs a little bit more thought. Maybe we need an extra section as it's neither links to web pages nor actual packages.

cornelius avatar Jul 19 '15 21:07 cornelius