Page MenuHomeFreeBSD


Authored by mat on Dec 11 2015, 11:11 AM.
Referenced Files
Unknown Object (File)
Fri, Dec 2, 10:13 PM
Unknown Object (File)
Mar 22 2017, 12:52 PM
Unknown Object (File)
Dec 14 2016, 7:55 PM
Unknown Object (File)
Dec 14 2016, 1:45 PM
Unknown Object (File)
Nov 19 2016, 2:13 PM
Unknown Object (File)
Sep 7 2016, 10:53 AM
Unknown Object (File)
Sep 3 2016, 5:45 AM
Unknown Object (File)
Aug 29 2016, 4:00 PM


Group Reviewers
rP409898: Introduce GH_TUPLE.


Version changed to make it work with fmake.

Diff Detail

rP FreeBSD ports repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

mat retitled this revision from to Add GH_TUPLE.
mat updated this object.
mat edited the test plan for this revision. (Show Details)

Matt, the modified targets don't work.

mat edited edge metadata.
  • Actually make it work, removing all the make code that does not work.

Can you describe how the targets fit into maintainer's workflow? It seems they try to facilitate update, only to leave error-prone copy-pasting to a human. In-place update of revisions/tags would be more reliable provided maintainer reviews svn diff output and reverts unnecessary hunks. For example, git add and git reset has -p option to edit what would end up in a commit, otherwise one would have to use an editor with diff-mode.

540 ↗(On Diff #11230)

Why not use GitHub API ? For example,

$ git ls-remote HEAD |
  sed -E 's/^(.{7}).*/\1/'

$ HTTP_USER_AGENT=curl fetch -qo- \ |
  sed -En '/sha/ { s/.*"(.{7}).*/\1/p; q; }'

With tags it'd be slightly longer.

$ git ls-remote |
  awk -F/ '/tags/ && !/{}/ { print $3 }' | sort -nr | head -1

$ HTTP_USER_AGENT=curl fetch -qo- \ |
  awk -F: '/name/ { gsub("[\", ]",""); print $2 }' | sort -nr | head -1
551 ↗(On Diff #11230)

Why not combine the targets?

gh-get-latest-revisions gh-get-changed-revisions:
	case ${.TARGET} in \
		*changed*) \
		[ $$3 != "$$rev" ] && \

@jbeich These targets were originally meant for information only, to avoid going into each individual project and compare last revisions.

Here we can only work with git's 'ls-remote' command which doesn't fetch much information. I don't believe it can even fetch dates/logs of tags. Git lacks API that allows more in-depth data retrieval from the remote repository. Even for 'git log https://...' it for some reason looks for the local repository.

I am going to rename them into gh-show-latest, gh-show-changed. And will add an interactive gh-import-latest that will patch them one by one.

@jbeich The problem with parsing json with awk is that this is generally not a proper way to parse json. The right way is to use textproc/jq utility, but ports framework doesn't have access to jq. When you parse with awk, you don't rely only on GitHub API, you also rely on the particular way how they format their json output, which might change any time. Please keep in mind that they may also expand their json output any time, and this won't be considered the violation of API as long as all parts of the older structure are still present. And awk expressions will just fail.

I also generally think of this as access to "git" repository, not necessarily to "github". It is probably a bad idea to be too GitHub-centric. I was actually going to propose to generalize all GH_ tags to GIT_ tags, because I believe people will be using their private "githubs": see the Gogs project The upcoming port for Gogs is also dependent on GH_TUPLE patch.

So I would be leaning towards keeping it simple andn not venture into using the GitHub API extensively.

I think phabricator workflow is broken, doesn't allow me to add a new patch. It first says "Update patch for D4514", but when I upload the patch it only offers me to create or update the new diff number.

So I created the new one:

This revision was automatically updated to reflect the committed changes.