packaging: convert to UNIX line endings
authorGregory Szorc <gregory.szorc@gmail.com>
Thu, 14 Nov 2019 20:40:54 -0800
changeset 43660 303bf312d5ed
parent 43659 99e231afc29c
child 43661 32048206e7be
packaging: convert to UNIX line endings I must have my editor on Windows configured incorrectly because I submitted patches with Windows line endings :( # skip-blame whitespace only line ending changes Differential Revision: https://phab.mercurial-scm.org/D7421
contrib/packaging/packaging.py
contrib/packaging/requirements.txt
contrib/packaging/requirements.txt.in
contrib/packaging/wix/requirements.txt.in
--- a/contrib/packaging/packaging.py	Thu Nov 14 20:35:11 2019 -0800
+++ b/contrib/packaging/packaging.py	Thu Nov 14 20:40:54 2019 -0800
@@ -1,74 +1,74 @@
-#!/usr/bin/env python3
-#
-# packaging.py - Mercurial packaging functionality
-#
-# Copyright 2019 Gregory Szorc <gregory.szorc@gmail.com>
-#
-# This software may be used and distributed according to the terms of the
-# GNU General Public License version 2 or any later version.
-
-import os
-import pathlib
-import subprocess
-import sys
-import venv
-
-
-HERE = pathlib.Path(os.path.abspath(__file__)).parent
-REQUIREMENTS_TXT = HERE / "requirements.txt"
-SOURCE_DIR = HERE.parent.parent
-VENV = SOURCE_DIR / "build" / "venv-packaging"
-
-
-def bootstrap():
-    venv_created = not VENV.exists()
-
-    VENV.parent.mkdir(exist_ok=True)
-
-    venv.create(VENV, with_pip=True)
-
-    if os.name == "nt":
-        venv_bin = VENV / "Scripts"
-        pip = venv_bin / "pip.exe"
-        python = venv_bin / "python.exe"
-    else:
-        venv_bin = VENV / "bin"
-        pip = venv_bin / "pip"
-        python = venv_bin / "python"
-
-    args = [
-        str(pip),
-        "install",
-        "-r",
-        str(REQUIREMENTS_TXT),
-        "--disable-pip-version-check",
-    ]
-
-    if not venv_created:
-        args.append("-q")
-
-    subprocess.run(args, check=True)
-
-    os.environ["HGPACKAGING_BOOTSTRAPPED"] = "1"
-    os.environ["PATH"] = "%s%s%s" % (venv_bin, os.pathsep, os.environ["PATH"])
-
-    subprocess.run([str(python), __file__] + sys.argv[1:], check=True)
-
-
-def run():
-    import hgpackaging.cli as cli
-
-    # Need to strip off main Python executable.
-    cli.main()
-
-
-if __name__ == "__main__":
-    try:
-        if "HGPACKAGING_BOOTSTRAPPED" not in os.environ:
-            bootstrap()
-        else:
-            run()
-    except subprocess.CalledProcessError as e:
-        sys.exit(e.returncode)
-    except KeyboardInterrupt:
-        sys.exit(1)
+#!/usr/bin/env python3
+#
+# packaging.py - Mercurial packaging functionality
+#
+# Copyright 2019 Gregory Szorc <gregory.szorc@gmail.com>
+#
+# This software may be used and distributed according to the terms of the
+# GNU General Public License version 2 or any later version.
+
+import os
+import pathlib
+import subprocess
+import sys
+import venv
+
+
+HERE = pathlib.Path(os.path.abspath(__file__)).parent
+REQUIREMENTS_TXT = HERE / "requirements.txt"
+SOURCE_DIR = HERE.parent.parent
+VENV = SOURCE_DIR / "build" / "venv-packaging"
+
+
+def bootstrap():
+    venv_created = not VENV.exists()
+
+    VENV.parent.mkdir(exist_ok=True)
+
+    venv.create(VENV, with_pip=True)
+
+    if os.name == "nt":
+        venv_bin = VENV / "Scripts"
+        pip = venv_bin / "pip.exe"
+        python = venv_bin / "python.exe"
+    else:
+        venv_bin = VENV / "bin"
+        pip = venv_bin / "pip"
+        python = venv_bin / "python"
+
+    args = [
+        str(pip),
+        "install",
+        "-r",
+        str(REQUIREMENTS_TXT),
+        "--disable-pip-version-check",
+    ]
+
+    if not venv_created:
+        args.append("-q")
+
+    subprocess.run(args, check=True)
+
+    os.environ["HGPACKAGING_BOOTSTRAPPED"] = "1"
+    os.environ["PATH"] = "%s%s%s" % (venv_bin, os.pathsep, os.environ["PATH"])
+
+    subprocess.run([str(python), __file__] + sys.argv[1:], check=True)
+
+
+def run():
+    import hgpackaging.cli as cli
+
+    # Need to strip off main Python executable.
+    cli.main()
+
+
+if __name__ == "__main__":
+    try:
+        if "HGPACKAGING_BOOTSTRAPPED" not in os.environ:
+            bootstrap()
+        else:
+            run()
+    except subprocess.CalledProcessError as e:
+        sys.exit(e.returncode)
+    except KeyboardInterrupt:
+        sys.exit(1)
--- a/contrib/packaging/requirements.txt	Thu Nov 14 20:35:11 2019 -0800
+++ b/contrib/packaging/requirements.txt	Thu Nov 14 20:40:54 2019 -0800
@@ -1,12 +1,12 @@
-#
-# This file is autogenerated by pip-compile
-# To update, run:
-#
-#    pip-compile --generate-hashes --output-file=contrib/packaging/requirements.txt contrib/packaging/requirements.txt.in
-#
+#
+# This file is autogenerated by pip-compile
+# To update, run:
+#
+#    pip-compile --generate-hashes --output-file=contrib/packaging/requirements.txt contrib/packaging/requirements.txt.in
+#
 jinja2==2.10.3 \
     --hash=sha256:74320bb91f31270f9551d46522e33af46a80c3d619f4a4bf42b3164d30b5911f \
-    --hash=sha256:9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de
+    --hash=sha256:9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de
 markupsafe==1.1.1 \
     --hash=sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473 \
     --hash=sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161 \
@@ -36,4 +36,4 @@
     --hash=sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f \
     --hash=sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f \
     --hash=sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7 \
-    # via jinja2
+    # via jinja2
--- a/contrib/packaging/requirements.txt.in	Thu Nov 14 20:35:11 2019 -0800
+++ b/contrib/packaging/requirements.txt.in	Thu Nov 14 20:40:54 2019 -0800
@@ -1,1 +1,1 @@
-jinja2
+jinja2
--- a/contrib/packaging/wix/requirements.txt.in	Thu Nov 14 20:35:11 2019 -0800
+++ b/contrib/packaging/wix/requirements.txt.in	Thu Nov 14 20:40:54 2019 -0800
@@ -1,2 +1,2 @@
-docutils
-pygments
+docutils
+pygments