Patchwork D7169: packaging: remove hg-ssh.8.html from Inno installer

login
register
mail settings
Submitter phabricator
Date Oct. 24, 2019, 1:56 a.m.
Message ID <differential-rev-PHID-DREV-bszhl2dgfnpwqlufb6v3-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42557/
State Superseded
Headers show

Comments

phabricator - Oct. 24, 2019, 1:56 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We don't ship hg-ssh because it requires a python.exe to
  run, which we don't ship. So it doesn't make sense to ship
  the HTML documentation for this tool.
  
  This change makes the Inno install layout more consistent
  with WiX, which doesn't ship this file.
  
  Functionality for removing files has been made generic,
  in anticipation of future expansion.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7169

AFFECTED FILES
  contrib/packaging/hgpackaging/py2exe.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/contrib/packaging/hgpackaging/py2exe.py b/contrib/packaging/hgpackaging/py2exe.py
--- a/contrib/packaging/hgpackaging/py2exe.py
+++ b/contrib/packaging/hgpackaging/py2exe.py
@@ -52,6 +52,11 @@ 
     ('COPYING', 'Copying.txt'),
 ]
 
+# List of paths to exclude from the staging area.
+STAGING_EXCLUDES = [
+    'doc/hg-ssh.8.html',
+]
+
 
 def build_py2exe(
     source_dir: pathlib.Path,
@@ -218,3 +223,10 @@ 
     # See https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-redirection.
     with (staging_dir / 'hg.exe.local').open('ab'):
         pass
+
+    # Purge any files we don't want to be there.
+    for f in STAGING_EXCLUDES:
+        p = staging_dir / f
+        if p.exists():
+            print('removing %s' % p)
+            p.unlink()