Bug 226951 - devel/mercurial: enable "hg view"
Summary: devel/mercurial: enable "hg view"
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords: feature
Depends on:
Blocks:
 
Reported: 2018-03-26 15:24 UTC by Martin Birgmeier
Modified: 2018-03-27 09:28 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2018-03-26 15:24:36 UTC
I would like to use "hg view". I believe the following changes would be necessary:

- Install /usr/local/share/mercurial/contrib/hgk with mode 755 (instead of 644)

- Depend on tk, probably similar to how devel/git does it.

- The previous point will hopefully also correct the interpreter stored in /usr/local/share/mercurial/contrib/hgk from "wish" to "wish8.6". Compare for example /usr/local/bin/gitk.

Anyway, here "hg view" works after making hgk executable and adding a symlink from wish8.6 to wish (not too elegant).

-- Martin
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2018-03-27 07:19:12 UTC
Hi Martin,

I see no major issues with the proposal (all else being equal), though:

1) Re the wish symlink, if it doesn't already, the tk/tcl port(s) (or the framework they use, Uses/tcl.mk) should be installing the foo->fooX.Y versioned symlinks accordingly to the specified (user, or the default) DEFAULT_VERSION for consuming software (ala hg) to reference in their scripts, rather than requiring patching of scripts/shebangs in each of the consuming software ports source files.

2) Given the size of the tcl/tk stack, put the functionality under an appropriately named OPTION, providing a conditional/optional dependency, rather than a compulsory one. I dont think there would be an issue to provide this as an OPTIONS_DEFAULTS so that packages. 

However, I also note that:

https://www.mercurial-scm.org/wiki/HgkExtension

lists hgk as an "unloved feature", and recommends, hgview, which is in FreeBSD Ports here: https://www.freshports.org/devel/hgview/ (and needs a maintainer)
Comment 2 Martin Birgmeier 2018-03-27 08:53:09 UTC
Hi Kubilay,

Thank you for the quick reply.

Following your lead I have now found x11-toolkits/tk-wrapper and lang/tcl-wrapper which should take care of the tcl and wish commands being available.

Also, I'll look into hgview.

-- Martin
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2018-03-27 09:28:24 UTC
(In reply to Martin Birgmeier from comment #2)

You're welcome Martin, don't hesitate to re-open the issue (updating summary accordingly) if anything still needs improvement in the mercurial port