Mercurial > hg
view tests/test-narrow-clone-nonlinear.t @ 44763:94f4f2ec7dee stable
packaging: support building Inno installer with PyOxidizer
We want to start distributing Mercurial on Python 3 on
Windows. PyOxidizer will be our vehicle for achieving that.
This commit implements basic support for producing Inno
installers using PyOxidizer.
While it is an eventual goal of PyOxidizer to produce
installers, those features aren't yet implemented. So our
strategy for producing Mercurial installers is similar to
what we've been doing with py2exe: invoke a build system to
produce files then stage those files into a directory so they
can be turned into an installer.
We had to make significant alterations to the pyoxidizer.bzl
config file to get it to produce the files that we desire for
a Windows install. This meant differentiating the build targets
so we can target Windows specifically.
We've added a new module to hgpackaging to deal with interacting
with PyOxidizer. It is similar to pyexe: we invoke a build process
then copy files to a staging directory. Ideally these extra
files would be defined in pyoxidizer.bzl. But I don't think it
is worth doing at this time, as PyOxidizer's config files are
lacking some features to make this turnkey.
The rest of the change is introducing a variant of the
Inno installer code that invokes PyOxidizer instead of
py2exe.
Comparing the Python 2.7 based Inno installers with this
one, the following changes were observed:
* No lib/*.{pyd, dll} files
* No Microsoft.VC90.CRT.manifest
* No msvc{m,p,r}90.dll files
* python27.dll replaced with python37.dll
* Add vcruntime140.dll file
The disappearance of the .pyd and .dll files is acceptable, as
PyOxidizer has embedded these in hg.exe and loads them from
memory.
The disappearance of the *90* files is acceptable because those
provide the Visual C++ 9 runtime, as required by Python 2.7.
Similarly, the appearance of vcruntime140.dll is a requirement
of Python 3.7.
Differential Revision: https://phab.mercurial-scm.org/D8473
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 23 Apr 2020 18:06:02 -0700 |
parents | a2a6e724d61a |
children |
line wrap: on
line source
Testing narrow clones when changesets modifying a matching file exist on multiple branches $ . "$TESTDIR/narrow-library.sh" $ hg init master $ cd master $ cat >> .hg/hgrc <<EOF > [narrow] > serveellipses=True > EOF $ hg branch default marked working directory as branch default (branches are permanent and global, did you want a bookmark?) $ for x in `$TESTDIR/seq.py 10`; do > echo $x > "f$x" > hg add "f$x" > hg commit -m "Add $x" > done $ hg branch release-v1 marked working directory as branch release-v1 (branches are permanent and global, did you want a bookmark?) $ hg commit -m "Start release for v1" $ hg update default 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ for x in `$TESTDIR/seq.py 10`; do > echo "$x v2" > "f$x" > hg commit -m "Update $x to v2" > done $ hg update release-v1 10 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg branch release-v1 marked working directory as branch release-v1 $ for x in `$TESTDIR/seq.py 1 5`; do > echo "$x v1 hotfix" > "f$x" > hg commit -m "Hotfix $x in v1" > done $ hg update default 10 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg branch release-v2 marked working directory as branch release-v2 $ hg commit -m "Start release for v2" $ hg update default 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg branch default marked working directory as branch default $ for x in `$TESTDIR/seq.py 10`; do > echo "$x v3" > "f$x" > hg commit -m "Update $x to v3" > done $ hg update release-v2 10 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg branch release-v2 marked working directory as branch release-v2 $ for x in `$TESTDIR/seq.py 4 9`; do > echo "$x v2 hotfix" > "f$x" > hg commit -m "Hotfix $x in v2" > done $ hg heads -T '{rev} <- {p1rev} ({branch}): {desc}\n' 42 <- 41 (release-v2): Hotfix 9 in v2 36 <- 35 (default): Update 10 to v3 25 <- 24 (release-v1): Hotfix 5 in v1 $ cd .. We now have 3 branches: default, which has v3 of all files, release-v1 which has v1 of all files, and release-v2 with v2 of all files. Narrow clone which should get all branches $ hg clone --narrow ssh://user@dummy/master narrow --include "f5" requesting all changes adding changesets adding manifests adding file changes added 12 changesets with 5 changes to 1 files (+2 heads) new changesets *:* (glob) updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd narrow $ hg log -G -T "{if(ellipsis, '...')}{node|short} ({branch}): {desc}\n" o ...031f516143fe (release-v2): Hotfix 9 in v2 | o 9cd7f7bb9ca1 (release-v2): Hotfix 5 in v2 | o ...37bbc88f3ef0 (release-v2): Hotfix 4 in v2 | | @ ...dae2f368ca07 (default): Update 10 to v3 | | | o 9c224e89cb31 (default): Update 5 to v3 | | | o ...04fb59c7c9dc (default): Update 4 to v3 |/ | o b2253e82401f (release-v1): Hotfix 5 in v1 | | | o ...960ac37d74fd (release-v1): Hotfix 4 in v1 | | o | 986298e3f347 (default): Update 5 to v2 | | o | ...75d539c667ec (default): Update 4 to v2 |/ o 04c71bd5707f (default): Add 5 | o ...881b3891d041 (default): Add 4 Narrow clone the first file, hitting edge condition where unaligned changeset and manifest revnums cross branches. $ hg clone --narrow ssh://user@dummy/master narrow --include "f1" requesting all changes adding changesets adding manifests adding file changes added 10 changesets with 4 changes to 1 files (+2 heads) new changesets *:* (glob) updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd narrow $ hg log -G -T "{if(ellipsis, '...')}{node|short} ({branch}): {desc}\n" o ...031f516143fe (release-v2): Hotfix 9 in v2 | | @ ...dae2f368ca07 (default): Update 10 to v3 | | | o 1f5d184b8e96 (default): Update 1 to v3 |/ | o ...b2253e82401f (release-v1): Hotfix 5 in v1 | | | o 133502f6b7e5 (release-v1): Hotfix 1 in v1 | | o | ...79165c83d644 (default): Update 10 to v2 | | o | c7b7a5f2f088 (default): Update 1 to v2 | | | o ...f0531a3db7a9 (release-v1): Start release for v1 |/ o ...6a3f0f0abef3 (default): Add 10 | o e012ac15eaaa (default): Add 1