Patchwork [3,of,5,osx] osx: include chg by default

login
register
mail settings
Submitter Augie Fackler
Date May 27, 2017, 12:27 a.m.
Message ID <599d022d2d51320b2d59.1495844850@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/20953/
State Accepted
Headers show

Comments

Augie Fackler - May 27, 2017, 12:27 a.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1490046631 14400
#      Mon Mar 20 17:50:31 2017 -0400
# Node ID 599d022d2d51320b2d593152e6d87650ceaf1c06
# Parent  6bf80f254aac0c1238e6cd8c54d5a9f23dfc73fa
osx: include chg by default
Yuya Nishihara - May 27, 2017, 1:39 p.m.
On Fri, 26 May 2017 20:27:30 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1490046631 14400
> #      Mon Mar 20 17:50:31 2017 -0400
> # Node ID 599d022d2d51320b2d593152e6d87650ceaf1c06
> # Parent  6bf80f254aac0c1238e6cd8c54d5a9f23dfc73fa
> osx: include chg by default
> 
> diff --git a/Makefile b/Makefile
> --- a/Makefile
> +++ b/Makefile
> @@ -176,6 +176,14 @@ osx:
>          # location of our own.
>  	install -d build/mercurial/usr/local/hg/contrib/
>  	install -m 0644 contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash
> +	make -C contrib/chg \
> +	  HGPATH=/usr/local/bin/hg \
> +	  PYTHON=/usr/bin/python2.7 \
> +	  HG=/usr/local/bin/hg \
> +	  HGEXTDIR=/Library/Python/2.7/site-packages/hgext \

Perhaps PYTHON, HG and HGEXTDIR can be removed, but they are harmless anyway.

> +	  DESTDIR=../../build/mercurial \
> +	  PREFIX=/usr/local \
> +	  clean install
>  	mkdir -p $${OUTPUTDIR:-dist}
>  	HGVER=$$((cat build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py; echo 'print(version)') | python) && \
>  	OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \

Patch

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -176,6 +176,14 @@  osx:
         # location of our own.
 	install -d build/mercurial/usr/local/hg/contrib/
 	install -m 0644 contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash
+	make -C contrib/chg \
+	  HGPATH=/usr/local/bin/hg \
+	  PYTHON=/usr/bin/python2.7 \
+	  HG=/usr/local/bin/hg \
+	  HGEXTDIR=/Library/Python/2.7/site-packages/hgext \
+	  DESTDIR=../../build/mercurial \
+	  PREFIX=/usr/local \
+	  clean install
 	mkdir -p $${OUTPUTDIR:-dist}
 	HGVER=$$((cat build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py; echo 'print(version)') | python) && \
 	OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
diff --git a/tests/test-mac-packages.t b/tests/test-mac-packages.t
--- a/tests/test-mac-packages.t
+++ b/tests/test-mac-packages.t
@@ -35,6 +35,7 @@  Spot-check some randomly selected files:
   ./usr/local/hg/contrib/hg-completion.bash	100644	0/0
   $ egrep 'man[15]' boms.txt | cut -d '	' -f 1,2,3
   ./usr/local/share/man/man1	40755	0/0
+  ./usr/local/share/man/man1/chg.1	100644	0/0
   ./usr/local/share/man/man1/hg.1	100644	0/0
   ./usr/local/share/man/man5	40755	0/0
   ./usr/local/share/man/man5/hgignore.5	100644	0/0
@@ -48,7 +49,8 @@  Spot-check some randomly selected files:
   ./Library/Python/2.7/site-packages/mercurial/localrepo.py	100644	0/0
   ./Library/Python/2.7/site-packages/mercurial/localrepo.pyc	100644	0/0
   ./Library/Python/2.7/site-packages/mercurial/localrepo.pyo	100644	0/0
-  $ grep 'bin/hg	' boms.txt | cut -d '	' -f 1,2,3
+  $ egrep 'bin/' boms.txt | cut -d '	' -f 1,2,3
+  ./usr/local/bin/chg	100755	0/0
   ./usr/local/bin/hg	100755	0/0
 
 Make sure the built binary uses the system Python interpreter