0s autopkgtest [21:03:58]: starting date and time: 2025-06-05 21:03:58+0000 0s autopkgtest [21:03:58]: git checkout: 9986aa8c Merge branch 'skia/fix_network_interface' into 'ubuntu/production' 0s autopkgtest [21:03:58]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.ld7thcl5/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:python3-defaults --apt-upgrade git-revise --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=python3-defaults/3.13.4-1 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-s390x --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@sto01-s390x-1.secgroup --name adt-questing-s390x-git-revise-20250605-210358-juju-7f2275-prod-proposed-migration-environment-2-032f603c-825e-478b-9b20-198558346c01 --image adt/ubuntu-questing-s390x-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-autopkgtest-workers-s390x -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 63s autopkgtest [21:05:01]: testbed dpkg architecture: s390x 63s autopkgtest [21:05:01]: testbed apt version: 3.1.0ubuntu3 64s autopkgtest [21:05:02]: @@@@@@@@@@@@@@@@@@@@ test bed setup 64s autopkgtest [21:05:02]: testbed release detected to be: None 65s autopkgtest [21:05:03]: updating testbed package index (apt update) 66s Get:1 http://ftpmaster.internal/ubuntu questing-proposed InRelease [249 kB] 66s Hit:2 http://ftpmaster.internal/ubuntu questing InRelease 66s Hit:3 http://ftpmaster.internal/ubuntu questing-updates InRelease 66s Hit:4 http://ftpmaster.internal/ubuntu questing-security InRelease 66s Get:5 http://ftpmaster.internal/ubuntu questing-proposed/main Sources [55.3 kB] 66s Get:6 http://ftpmaster.internal/ubuntu questing-proposed/restricted Sources [3168 B] 66s Get:7 http://ftpmaster.internal/ubuntu questing-proposed/multiverse Sources [13.0 kB] 66s Get:8 http://ftpmaster.internal/ubuntu questing-proposed/universe Sources [438 kB] 66s Get:9 http://ftpmaster.internal/ubuntu questing-proposed/main s390x Packages [72.9 kB] 66s Get:10 http://ftpmaster.internal/ubuntu questing-proposed/restricted s390x Packages [716 B] 66s Get:11 http://ftpmaster.internal/ubuntu questing-proposed/universe s390x Packages [351 kB] 66s Get:12 http://ftpmaster.internal/ubuntu questing-proposed/multiverse s390x Packages [4128 B] 66s Fetched 1187 kB in 1s (1501 kB/s) 69s Reading package lists... 69s autopkgtest [21:05:07]: upgrading testbed (apt dist-upgrade and autopurge) 70s Reading package lists... 70s Building dependency tree... 70s Reading state information... 70s Calculating upgrade... 70s The following packages will be upgraded: 70s libpython3-stdlib libpython3.13 libpython3.13-minimal libpython3.13-stdlib 70s python3 python3-minimal python3.13 python3.13-gdbm python3.13-minimal 70s 9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 70s Need to get 8670 kB of archives. 70s After this operation, 12.3 kB of additional disk space will be used. 70s Get:1 http://ftpmaster.internal/ubuntu questing/main s390x libpython3.13 s390x 3.13.4-1 [2522 kB] 70s Get:2 http://ftpmaster.internal/ubuntu questing/main s390x python3.13 s390x 3.13.4-1 [744 kB] 70s Get:3 http://ftpmaster.internal/ubuntu questing/main s390x python3.13-minimal s390x 3.13.4-1 [2375 kB] 70s Get:4 http://ftpmaster.internal/ubuntu questing/main s390x libpython3.13-minimal s390x 3.13.4-1 [883 kB] 70s Get:5 http://ftpmaster.internal/ubuntu questing/main s390x libpython3.13-stdlib s390x 3.13.4-1 [2053 kB] 70s Get:6 http://ftpmaster.internal/ubuntu questing-proposed/main s390x python3-minimal s390x 3.13.4-1 [27.9 kB] 70s Get:7 http://ftpmaster.internal/ubuntu questing-proposed/main s390x python3 s390x 3.13.4-1 [24.0 kB] 70s Get:8 http://ftpmaster.internal/ubuntu questing-proposed/main s390x libpython3-stdlib s390x 3.13.4-1 [10.5 kB] 70s Get:9 http://ftpmaster.internal/ubuntu questing/main s390x python3.13-gdbm s390x 3.13.4-1 [31.9 kB] 71s Fetched 8670 kB in 1s (14.5 MB/s) 71s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 60226 files and directories currently installed.) 71s Preparing to unpack .../libpython3.13_3.13.4-1_s390x.deb ... 71s Unpacking libpython3.13:s390x (3.13.4-1) over (3.13.3-4) ... 71s Preparing to unpack .../python3.13_3.13.4-1_s390x.deb ... 71s Unpacking python3.13 (3.13.4-1) over (3.13.3-4) ... 71s Preparing to unpack .../python3.13-minimal_3.13.4-1_s390x.deb ... 71s Unpacking python3.13-minimal (3.13.4-1) over (3.13.3-4) ... 71s Preparing to unpack .../libpython3.13-minimal_3.13.4-1_s390x.deb ... 71s Unpacking libpython3.13-minimal:s390x (3.13.4-1) over (3.13.3-4) ... 71s Preparing to unpack .../libpython3.13-stdlib_3.13.4-1_s390x.deb ... 71s Unpacking libpython3.13-stdlib:s390x (3.13.4-1) over (3.13.3-4) ... 71s Setting up libpython3.13-minimal:s390x (3.13.4-1) ... 71s Setting up python3.13-minimal (3.13.4-1) ... 72s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 60226 files and directories currently installed.) 72s Preparing to unpack .../python3-minimal_3.13.4-1_s390x.deb ... 72s Unpacking python3-minimal (3.13.4-1) over (3.13.3-1) ... 72s Setting up python3-minimal (3.13.4-1) ... 72s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 60226 files and directories currently installed.) 72s Preparing to unpack .../python3_3.13.4-1_s390x.deb ... 72s Unpacking python3 (3.13.4-1) over (3.13.3-1) ... 72s Preparing to unpack .../libpython3-stdlib_3.13.4-1_s390x.deb ... 72s Unpacking libpython3-stdlib:s390x (3.13.4-1) over (3.13.3-1) ... 72s Preparing to unpack .../python3.13-gdbm_3.13.4-1_s390x.deb ... 72s Unpacking python3.13-gdbm (3.13.4-1) over (3.13.3-4) ... 72s Setting up libpython3.13-stdlib:s390x (3.13.4-1) ... 72s Setting up python3.13-gdbm (3.13.4-1) ... 72s Setting up libpython3-stdlib:s390x (3.13.4-1) ... 72s Setting up libpython3.13:s390x (3.13.4-1) ... 72s Setting up python3.13 (3.13.4-1) ... 73s Setting up python3 (3.13.4-1) ... 74s Processing triggers for man-db (2.13.1-1) ... 74s Processing triggers for libc-bin (2.41-6ubuntu2) ... 74s Processing triggers for systemd (257.4-1ubuntu3) ... 75s Reading package lists... 75s Building dependency tree... 75s Reading state information... 75s Solving dependencies... 75s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 77s autopkgtest [21:05:15]: testbed running kernel: Linux 6.14.0-15-generic #15-Ubuntu SMP Sun Apr 6 13:39:00 UTC 2025 77s autopkgtest [21:05:15]: @@@@@@@@@@@@@@@@@@@@ apt-source git-revise 79s Get:1 http://ftpmaster.internal/ubuntu questing/universe git-revise 0.7.0-1ubuntu1 (dsc) [2136 B] 79s Get:2 http://ftpmaster.internal/ubuntu questing/universe git-revise 0.7.0-1ubuntu1 (tar) [35.6 kB] 79s Get:3 http://ftpmaster.internal/ubuntu questing/universe git-revise 0.7.0-1ubuntu1 (diff) [4588 B] 79s gpgv: Signature made Sat Mar 1 02:54:44 2025 UTC 79s gpgv: using RSA key 5C7ABEA20F8630459CC8C8B5E27F2CF8458C2FA4 79s gpgv: Can't check signature: No public key 79s dpkg-source: warning: cannot verify inline signature for ./git-revise_0.7.0-1ubuntu1.dsc: no acceptable signature found 79s autopkgtest [21:05:17]: testing package git-revise version 0.7.0-1ubuntu1 79s autopkgtest [21:05:17]: build not needed 79s autopkgtest [21:05:17]: test command1: preparing testbed 80s Reading package lists... 80s Building dependency tree... 80s Reading state information... 80s Solving dependencies... 80s The following NEW packages will be installed: 80s autoconf automake autopoint autotools-dev build-essential cpp cpp-14 80s cpp-14-s390x-linux-gnu cpp-s390x-linux-gnu debhelper debugedit dh-autoreconf 80s dh-python dh-strip-nondeterminism dwz g++ g++-14 g++-14-s390x-linux-gnu 80s g++-s390x-linux-gnu gcc gcc-14 gcc-14-s390x-linux-gnu gcc-s390x-linux-gnu 80s gettext git git-man git-revise intltool-debian libarchive-zip-perl libasan8 80s libcc1-0 libdebhelper-perl liberror-perl libexpat1-dev 80s libfile-stripnondeterminism-perl libgcc-14-dev libgomp1 libisl23 libitm1 80s libmpc3 libpython3-dev libpython3.13-dev libstdc++-14-dev libtool libubsan1 80s m4 mypy po-debconf pypy3 pypy3-dev pypy3-lib python3-all python3-iniconfig 80s python3-mypy python3-mypy-extensions python3-pluggy python3-psutil 80s python3-pytest zlib1g-dev 80s 0 upgraded, 59 newly installed, 0 to remove and 0 not upgraded. 80s Need to get 94.1 MB of archives. 80s After this operation, 360 MB of additional disk space will be used. 80s Get:1 http://ftpmaster.internal/ubuntu questing/universe s390x pypy3-lib s390x 7.3.19+dfsg-2 [2872 kB] 80s Get:2 http://ftpmaster.internal/ubuntu questing/universe s390x pypy3 s390x 7.3.19+dfsg-2 [14.9 MB] 81s Get:3 http://ftpmaster.internal/ubuntu questing/main s390x m4 s390x 1.4.19-8 [259 kB] 81s Get:4 http://ftpmaster.internal/ubuntu questing/main s390x autoconf all 2.72-3.1ubuntu1 [384 kB] 81s Get:5 http://ftpmaster.internal/ubuntu questing/main s390x autotools-dev all 20240727.1 [43.4 kB] 81s Get:6 http://ftpmaster.internal/ubuntu questing/main s390x automake all 1:1.17-3ubuntu1 [572 kB] 81s Get:7 http://ftpmaster.internal/ubuntu questing/main s390x autopoint all 0.23.1-2build1 [619 kB] 81s Get:8 http://ftpmaster.internal/ubuntu questing/main s390x libisl23 s390x 0.27-1 [704 kB] 81s Get:9 http://ftpmaster.internal/ubuntu questing/main s390x libmpc3 s390x 1.3.1-1build2 [57.8 kB] 81s Get:10 http://ftpmaster.internal/ubuntu questing/main s390x cpp-14-s390x-linux-gnu s390x 14.3.0-1ubuntu1 [9568 kB] 81s Get:11 http://ftpmaster.internal/ubuntu questing/main s390x cpp-14 s390x 14.3.0-1ubuntu1 [1028 B] 81s Get:12 http://ftpmaster.internal/ubuntu questing/main s390x cpp-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [5556 B] 81s Get:13 http://ftpmaster.internal/ubuntu questing/main s390x cpp s390x 4:14.2.0-1ubuntu1 [22.4 kB] 81s Get:14 http://ftpmaster.internal/ubuntu questing/main s390x libcc1-0 s390x 15.1.0-5ubuntu1 [49.8 kB] 81s Get:15 http://ftpmaster.internal/ubuntu questing/main s390x libgomp1 s390x 15.1.0-5ubuntu1 [154 kB] 81s Get:16 http://ftpmaster.internal/ubuntu questing/main s390x libitm1 s390x 15.1.0-5ubuntu1 [31.1 kB] 81s Get:17 http://ftpmaster.internal/ubuntu questing/main s390x libasan8 s390x 15.1.0-5ubuntu1 [2970 kB] 81s Get:18 http://ftpmaster.internal/ubuntu questing/main s390x libubsan1 s390x 15.1.0-5ubuntu1 [1210 kB] 81s Get:19 http://ftpmaster.internal/ubuntu questing/main s390x libgcc-14-dev s390x 14.3.0-1ubuntu1 [1036 kB] 81s Get:20 http://ftpmaster.internal/ubuntu questing/main s390x gcc-14-s390x-linux-gnu s390x 14.3.0-1ubuntu1 [18.7 MB] 81s Get:21 http://ftpmaster.internal/ubuntu questing/main s390x gcc-14 s390x 14.3.0-1ubuntu1 [538 kB] 81s Get:22 http://ftpmaster.internal/ubuntu questing/main s390x gcc-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [1204 B] 81s Get:23 http://ftpmaster.internal/ubuntu questing/main s390x gcc s390x 4:14.2.0-1ubuntu1 [5004 B] 81s Get:24 http://ftpmaster.internal/ubuntu questing/main s390x libstdc++-14-dev s390x 14.3.0-1ubuntu1 [2935 kB] 82s Get:25 http://ftpmaster.internal/ubuntu questing/main s390x g++-14-s390x-linux-gnu s390x 14.3.0-1ubuntu1 [11.0 MB] 82s Get:26 http://ftpmaster.internal/ubuntu questing/main s390x g++-14 s390x 14.3.0-1ubuntu1 [27.4 kB] 82s Get:27 http://ftpmaster.internal/ubuntu questing/main s390x g++-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [956 B] 82s Get:28 http://ftpmaster.internal/ubuntu questing/main s390x g++ s390x 4:14.2.0-1ubuntu1 [1080 B] 82s Get:29 http://ftpmaster.internal/ubuntu questing/main s390x build-essential s390x 12.12ubuntu1 [5090 B] 82s Get:30 http://ftpmaster.internal/ubuntu questing/main s390x libdebhelper-perl all 13.24.1ubuntu2 [95.4 kB] 82s Get:31 http://ftpmaster.internal/ubuntu questing/main s390x libtool all 2.5.4-4 [168 kB] 82s Get:32 http://ftpmaster.internal/ubuntu questing/main s390x dh-autoreconf all 20 [16.1 kB] 82s Get:33 http://ftpmaster.internal/ubuntu questing/main s390x libarchive-zip-perl all 1.68-1 [90.2 kB] 82s Get:34 http://ftpmaster.internal/ubuntu questing/main s390x libfile-stripnondeterminism-perl all 1.14.1-2 [20.3 kB] 82s Get:35 http://ftpmaster.internal/ubuntu questing/main s390x dh-strip-nondeterminism all 1.14.1-2 [5064 B] 82s Get:36 http://ftpmaster.internal/ubuntu questing/main s390x debugedit s390x 1:5.1-2 [50.1 kB] 82s Get:37 http://ftpmaster.internal/ubuntu questing/main s390x dwz s390x 0.15-1build6 [122 kB] 82s Get:38 http://ftpmaster.internal/ubuntu questing/main s390x gettext s390x 0.23.1-2build1 [1518 kB] 82s Get:39 http://ftpmaster.internal/ubuntu questing/main s390x intltool-debian all 0.35.0+20060710.6 [23.2 kB] 82s Get:40 http://ftpmaster.internal/ubuntu questing/main s390x po-debconf all 1.0.21+nmu1 [233 kB] 82s Get:41 http://ftpmaster.internal/ubuntu questing/main s390x debhelper all 13.24.1ubuntu2 [895 kB] 82s Get:42 http://ftpmaster.internal/ubuntu questing/universe s390x dh-python all 6.20250414 [119 kB] 82s Get:43 http://ftpmaster.internal/ubuntu questing/main s390x liberror-perl all 0.17030-1 [23.5 kB] 82s Get:44 http://ftpmaster.internal/ubuntu questing/main s390x git-man all 1:2.48.1-0ubuntu1 [1148 kB] 82s Get:45 http://ftpmaster.internal/ubuntu questing/main s390x git s390x 1:2.48.1-0ubuntu1 [4284 kB] 82s Get:46 http://ftpmaster.internal/ubuntu questing/universe s390x git-revise all 0.7.0-1ubuntu1 [32.0 kB] 82s Get:47 http://ftpmaster.internal/ubuntu questing/main s390x libexpat1-dev s390x 2.7.1-1 [148 kB] 82s Get:48 http://ftpmaster.internal/ubuntu questing/main s390x zlib1g-dev s390x 1:1.3.dfsg+really1.3.1-1ubuntu1 [898 kB] 82s Get:49 http://ftpmaster.internal/ubuntu questing/main s390x libpython3.13-dev s390x 3.13.4-1 [5590 kB] 82s Get:50 http://ftpmaster.internal/ubuntu questing-proposed/main s390x libpython3-dev s390x 3.13.4-1 [10.8 kB] 82s Get:51 http://ftpmaster.internal/ubuntu questing/universe s390x python3-mypy-extensions all 1.0.0-1 [6148 B] 82s Get:52 http://ftpmaster.internal/ubuntu questing/main s390x python3-psutil s390x 5.9.8-2build3 [195 kB] 82s Get:53 http://ftpmaster.internal/ubuntu questing/universe s390x python3-mypy s390x 1.15.0-5 [9260 kB] 82s Get:54 http://ftpmaster.internal/ubuntu questing/universe s390x mypy all 1.15.0-5 [25.4 kB] 82s Get:55 http://ftpmaster.internal/ubuntu questing/universe s390x pypy3-dev all 7.3.19+dfsg-2 [80.0 kB] 82s Get:56 http://ftpmaster.internal/ubuntu questing-proposed/main s390x python3-all s390x 3.13.4-1 [880 B] 82s Get:57 http://ftpmaster.internal/ubuntu questing/universe s390x python3-iniconfig all 1.1.1-2 [6024 B] 82s Get:58 http://ftpmaster.internal/ubuntu questing/universe s390x python3-pluggy all 1.5.0-1 [21.0 kB] 82s Get:59 http://ftpmaster.internal/ubuntu questing/universe s390x python3-pytest all 8.3.5-2 [252 kB] 83s Fetched 94.1 MB in 3s (37.6 MB/s) 83s Selecting previously unselected package pypy3-lib:s390x. 83s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 60226 files and directories currently installed.) 83s Preparing to unpack .../pypy3-lib_7.3.19+dfsg-2_s390x.deb ... 83s Unpacking pypy3-lib:s390x (7.3.19+dfsg-2) ... 83s Setting up pypy3-lib:s390x (7.3.19+dfsg-2) ... 83s Selecting previously unselected package pypy3. 83s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 61476 files and directories currently installed.) 83s Preparing to unpack .../00-pypy3_7.3.19+dfsg-2_s390x.deb ... 83s Unpacking pypy3 (7.3.19+dfsg-2) ... 83s Selecting previously unselected package m4. 83s Preparing to unpack .../01-m4_1.4.19-8_s390x.deb ... 83s Unpacking m4 (1.4.19-8) ... 83s Selecting previously unselected package autoconf. 83s Preparing to unpack .../02-autoconf_2.72-3.1ubuntu1_all.deb ... 83s Unpacking autoconf (2.72-3.1ubuntu1) ... 83s Selecting previously unselected package autotools-dev. 83s Preparing to unpack .../03-autotools-dev_20240727.1_all.deb ... 83s Unpacking autotools-dev (20240727.1) ... 83s Selecting previously unselected package automake. 83s Preparing to unpack .../04-automake_1%3a1.17-3ubuntu1_all.deb ... 83s Unpacking automake (1:1.17-3ubuntu1) ... 83s Selecting previously unselected package autopoint. 83s Preparing to unpack .../05-autopoint_0.23.1-2build1_all.deb ... 83s Unpacking autopoint (0.23.1-2build1) ... 83s Selecting previously unselected package libisl23:s390x. 83s Preparing to unpack .../06-libisl23_0.27-1_s390x.deb ... 83s Unpacking libisl23:s390x (0.27-1) ... 83s Selecting previously unselected package libmpc3:s390x. 83s Preparing to unpack .../07-libmpc3_1.3.1-1build2_s390x.deb ... 83s Unpacking libmpc3:s390x (1.3.1-1build2) ... 83s Selecting previously unselected package cpp-14-s390x-linux-gnu. 83s Preparing to unpack .../08-cpp-14-s390x-linux-gnu_14.3.0-1ubuntu1_s390x.deb ... 83s Unpacking cpp-14-s390x-linux-gnu (14.3.0-1ubuntu1) ... 84s Selecting previously unselected package cpp-14. 84s Preparing to unpack .../09-cpp-14_14.3.0-1ubuntu1_s390x.deb ... 84s Unpacking cpp-14 (14.3.0-1ubuntu1) ... 84s Selecting previously unselected package cpp-s390x-linux-gnu. 84s Preparing to unpack .../10-cpp-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 84s Unpacking cpp-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 84s Selecting previously unselected package cpp. 84s Preparing to unpack .../11-cpp_4%3a14.2.0-1ubuntu1_s390x.deb ... 84s Unpacking cpp (4:14.2.0-1ubuntu1) ... 84s Selecting previously unselected package libcc1-0:s390x. 84s Preparing to unpack .../12-libcc1-0_15.1.0-5ubuntu1_s390x.deb ... 84s Unpacking libcc1-0:s390x (15.1.0-5ubuntu1) ... 84s Selecting previously unselected package libgomp1:s390x. 84s Preparing to unpack .../13-libgomp1_15.1.0-5ubuntu1_s390x.deb ... 84s Unpacking libgomp1:s390x (15.1.0-5ubuntu1) ... 84s Selecting previously unselected package libitm1:s390x. 84s Preparing to unpack .../14-libitm1_15.1.0-5ubuntu1_s390x.deb ... 84s Unpacking libitm1:s390x (15.1.0-5ubuntu1) ... 84s Selecting previously unselected package libasan8:s390x. 84s Preparing to unpack .../15-libasan8_15.1.0-5ubuntu1_s390x.deb ... 84s Unpacking libasan8:s390x (15.1.0-5ubuntu1) ... 84s Selecting previously unselected package libubsan1:s390x. 84s Preparing to unpack .../16-libubsan1_15.1.0-5ubuntu1_s390x.deb ... 84s Unpacking libubsan1:s390x (15.1.0-5ubuntu1) ... 84s Selecting previously unselected package libgcc-14-dev:s390x. 84s Preparing to unpack .../17-libgcc-14-dev_14.3.0-1ubuntu1_s390x.deb ... 84s Unpacking libgcc-14-dev:s390x (14.3.0-1ubuntu1) ... 84s Selecting previously unselected package gcc-14-s390x-linux-gnu. 84s Preparing to unpack .../18-gcc-14-s390x-linux-gnu_14.3.0-1ubuntu1_s390x.deb ... 84s Unpacking gcc-14-s390x-linux-gnu (14.3.0-1ubuntu1) ... 84s Selecting previously unselected package gcc-14. 84s Preparing to unpack .../19-gcc-14_14.3.0-1ubuntu1_s390x.deb ... 84s Unpacking gcc-14 (14.3.0-1ubuntu1) ... 84s Selecting previously unselected package gcc-s390x-linux-gnu. 84s Preparing to unpack .../20-gcc-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 84s Unpacking gcc-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 84s Selecting previously unselected package gcc. 84s Preparing to unpack .../21-gcc_4%3a14.2.0-1ubuntu1_s390x.deb ... 84s Unpacking gcc (4:14.2.0-1ubuntu1) ... 84s Selecting previously unselected package libstdc++-14-dev:s390x. 84s Preparing to unpack .../22-libstdc++-14-dev_14.3.0-1ubuntu1_s390x.deb ... 84s Unpacking libstdc++-14-dev:s390x (14.3.0-1ubuntu1) ... 84s Selecting previously unselected package g++-14-s390x-linux-gnu. 84s Preparing to unpack .../23-g++-14-s390x-linux-gnu_14.3.0-1ubuntu1_s390x.deb ... 84s Unpacking g++-14-s390x-linux-gnu (14.3.0-1ubuntu1) ... 84s Selecting previously unselected package g++-14. 84s Preparing to unpack .../24-g++-14_14.3.0-1ubuntu1_s390x.deb ... 84s Unpacking g++-14 (14.3.0-1ubuntu1) ... 84s Selecting previously unselected package g++-s390x-linux-gnu. 84s Preparing to unpack .../25-g++-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 84s Unpacking g++-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 84s Selecting previously unselected package g++. 84s Preparing to unpack .../26-g++_4%3a14.2.0-1ubuntu1_s390x.deb ... 84s Unpacking g++ (4:14.2.0-1ubuntu1) ... 84s Selecting previously unselected package build-essential. 84s Preparing to unpack .../27-build-essential_12.12ubuntu1_s390x.deb ... 84s Unpacking build-essential (12.12ubuntu1) ... 84s Selecting previously unselected package libdebhelper-perl. 85s Preparing to unpack .../28-libdebhelper-perl_13.24.1ubuntu2_all.deb ... 85s Unpacking libdebhelper-perl (13.24.1ubuntu2) ... 85s Selecting previously unselected package libtool. 85s Preparing to unpack .../29-libtool_2.5.4-4_all.deb ... 85s Unpacking libtool (2.5.4-4) ... 85s Selecting previously unselected package dh-autoreconf. 85s Preparing to unpack .../30-dh-autoreconf_20_all.deb ... 85s Unpacking dh-autoreconf (20) ... 85s Selecting previously unselected package libarchive-zip-perl. 85s Preparing to unpack .../31-libarchive-zip-perl_1.68-1_all.deb ... 85s Unpacking libarchive-zip-perl (1.68-1) ... 85s Selecting previously unselected package libfile-stripnondeterminism-perl. 85s Preparing to unpack .../32-libfile-stripnondeterminism-perl_1.14.1-2_all.deb ... 85s Unpacking libfile-stripnondeterminism-perl (1.14.1-2) ... 85s Selecting previously unselected package dh-strip-nondeterminism. 85s Preparing to unpack .../33-dh-strip-nondeterminism_1.14.1-2_all.deb ... 85s Unpacking dh-strip-nondeterminism (1.14.1-2) ... 85s Selecting previously unselected package debugedit. 85s Preparing to unpack .../34-debugedit_1%3a5.1-2_s390x.deb ... 85s Unpacking debugedit (1:5.1-2) ... 85s Selecting previously unselected package dwz. 85s Preparing to unpack .../35-dwz_0.15-1build6_s390x.deb ... 85s Unpacking dwz (0.15-1build6) ... 85s Selecting previously unselected package gettext. 85s Preparing to unpack .../36-gettext_0.23.1-2build1_s390x.deb ... 85s Unpacking gettext (0.23.1-2build1) ... 85s Selecting previously unselected package intltool-debian. 85s Preparing to unpack .../37-intltool-debian_0.35.0+20060710.6_all.deb ... 85s Unpacking intltool-debian (0.35.0+20060710.6) ... 85s Selecting previously unselected package po-debconf. 85s Preparing to unpack .../38-po-debconf_1.0.21+nmu1_all.deb ... 85s Unpacking po-debconf (1.0.21+nmu1) ... 85s Selecting previously unselected package debhelper. 85s Preparing to unpack .../39-debhelper_13.24.1ubuntu2_all.deb ... 85s Unpacking debhelper (13.24.1ubuntu2) ... 85s Selecting previously unselected package dh-python. 85s Preparing to unpack .../40-dh-python_6.20250414_all.deb ... 85s Unpacking dh-python (6.20250414) ... 85s Selecting previously unselected package liberror-perl. 85s Preparing to unpack .../41-liberror-perl_0.17030-1_all.deb ... 85s Unpacking liberror-perl (0.17030-1) ... 85s Selecting previously unselected package git-man. 85s Preparing to unpack .../42-git-man_1%3a2.48.1-0ubuntu1_all.deb ... 85s Unpacking git-man (1:2.48.1-0ubuntu1) ... 85s Selecting previously unselected package git. 85s Preparing to unpack .../43-git_1%3a2.48.1-0ubuntu1_s390x.deb ... 85s Unpacking git (1:2.48.1-0ubuntu1) ... 85s Selecting previously unselected package git-revise. 85s Preparing to unpack .../44-git-revise_0.7.0-1ubuntu1_all.deb ... 85s Unpacking git-revise (0.7.0-1ubuntu1) ... 85s Selecting previously unselected package libexpat1-dev:s390x. 85s Preparing to unpack .../45-libexpat1-dev_2.7.1-1_s390x.deb ... 85s Unpacking libexpat1-dev:s390x (2.7.1-1) ... 85s Selecting previously unselected package zlib1g-dev:s390x. 85s Preparing to unpack .../46-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_s390x.deb ... 85s Unpacking zlib1g-dev:s390x (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 85s Selecting previously unselected package libpython3.13-dev:s390x. 85s Preparing to unpack .../47-libpython3.13-dev_3.13.4-1_s390x.deb ... 85s Unpacking libpython3.13-dev:s390x (3.13.4-1) ... 85s Selecting previously unselected package libpython3-dev:s390x. 85s Preparing to unpack .../48-libpython3-dev_3.13.4-1_s390x.deb ... 85s Unpacking libpython3-dev:s390x (3.13.4-1) ... 85s Selecting previously unselected package python3-mypy-extensions. 85s Preparing to unpack .../49-python3-mypy-extensions_1.0.0-1_all.deb ... 85s Unpacking python3-mypy-extensions (1.0.0-1) ... 85s Selecting previously unselected package python3-psutil. 85s Preparing to unpack .../50-python3-psutil_5.9.8-2build3_s390x.deb ... 85s Unpacking python3-psutil (5.9.8-2build3) ... 85s Selecting previously unselected package python3-mypy. 85s Preparing to unpack .../51-python3-mypy_1.15.0-5_s390x.deb ... 85s Unpacking python3-mypy (1.15.0-5) ... 86s Selecting previously unselected package mypy. 86s Preparing to unpack .../52-mypy_1.15.0-5_all.deb ... 86s Unpacking mypy (1.15.0-5) ... 86s Selecting previously unselected package pypy3-dev. 86s Preparing to unpack .../53-pypy3-dev_7.3.19+dfsg-2_all.deb ... 86s Unpacking pypy3-dev (7.3.19+dfsg-2) ... 86s Selecting previously unselected package python3-all. 86s Preparing to unpack .../54-python3-all_3.13.4-1_s390x.deb ... 86s Unpacking python3-all (3.13.4-1) ... 86s Selecting previously unselected package python3-iniconfig. 86s Preparing to unpack .../55-python3-iniconfig_1.1.1-2_all.deb ... 86s Unpacking python3-iniconfig (1.1.1-2) ... 86s Selecting previously unselected package python3-pluggy. 86s Preparing to unpack .../56-python3-pluggy_1.5.0-1_all.deb ... 86s Unpacking python3-pluggy (1.5.0-1) ... 86s Selecting previously unselected package python3-pytest. 86s Preparing to unpack .../57-python3-pytest_8.3.5-2_all.deb ... 86s Unpacking python3-pytest (8.3.5-2) ... 86s Setting up dh-python (6.20250414) ... 86s Setting up python3-iniconfig (1.1.1-2) ... 87s Setting up libarchive-zip-perl (1.68-1) ... 87s Setting up python3-mypy-extensions (1.0.0-1) ... 87s Setting up libdebhelper-perl (13.24.1ubuntu2) ... 87s Setting up m4 (1.4.19-8) ... 87s Setting up python3-all (3.13.4-1) ... 87s Setting up libgomp1:s390x (15.1.0-5ubuntu1) ... 87s Setting up pypy3 (7.3.19+dfsg-2) ... 90s running pypy3 rtupdate hooks for 7.3 109s running pypy3 post-rtupdate hooks for 7.3 109s Setting up python3-psutil (5.9.8-2build3) ... 110s Setting up liberror-perl (0.17030-1) ... 110s Setting up autotools-dev (20240727.1) ... 110s Setting up libexpat1-dev:s390x (2.7.1-1) ... 110s Setting up libmpc3:s390x (1.3.1-1build2) ... 110s Setting up python3-mypy (1.15.0-5) ... 112s Setting up autopoint (0.23.1-2build1) ... 112s Setting up pypy3-dev (7.3.19+dfsg-2) ... 112s Setting up autoconf (2.72-3.1ubuntu1) ... 112s Setting up python3-pluggy (1.5.0-1) ... 113s Setting up libubsan1:s390x (15.1.0-5ubuntu1) ... 113s Setting up zlib1g-dev:s390x (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 113s Setting up dwz (0.15-1build6) ... 113s Setting up libasan8:s390x (15.1.0-5ubuntu1) ... 113s Setting up debugedit (1:5.1-2) ... 113s Setting up mypy (1.15.0-5) ... 113s Setting up git-man (1:2.48.1-0ubuntu1) ... 113s Setting up libisl23:s390x (0.27-1) ... 113s Setting up libcc1-0:s390x (15.1.0-5ubuntu1) ... 113s Setting up libitm1:s390x (15.1.0-5ubuntu1) ... 113s Setting up automake (1:1.17-3ubuntu1) ... 113s update-alternatives: using /usr/bin/automake-1.17 to provide /usr/bin/automake (automake) in auto mode 113s Setting up libfile-stripnondeterminism-perl (1.14.1-2) ... 113s Setting up gettext (0.23.1-2build1) ... 113s Setting up python3-pytest (8.3.5-2) ... 113s Setting up intltool-debian (0.35.0+20060710.6) ... 113s Setting up libpython3.13-dev:s390x (3.13.4-1) ... 113s Setting up git (1:2.48.1-0ubuntu1) ... 113s Setting up cpp-14-s390x-linux-gnu (14.3.0-1ubuntu1) ... 113s Setting up cpp-14 (14.3.0-1ubuntu1) ... 113s Setting up dh-strip-nondeterminism (1.14.1-2) ... 113s Setting up git-revise (0.7.0-1ubuntu1) ... 113s Setting up libgcc-14-dev:s390x (14.3.0-1ubuntu1) ... 113s Setting up libstdc++-14-dev:s390x (14.3.0-1ubuntu1) ... 113s Setting up libpython3-dev:s390x (3.13.4-1) ... 113s Setting up cpp-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 113s Setting up po-debconf (1.0.21+nmu1) ... 113s Setting up gcc-14-s390x-linux-gnu (14.3.0-1ubuntu1) ... 113s Setting up gcc-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 113s Setting up g++-14-s390x-linux-gnu (14.3.0-1ubuntu1) ... 113s Setting up cpp (4:14.2.0-1ubuntu1) ... 113s Setting up g++-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 113s Setting up gcc-14 (14.3.0-1ubuntu1) ... 113s Setting up g++-14 (14.3.0-1ubuntu1) ... 113s Setting up libtool (2.5.4-4) ... 113s Setting up gcc (4:14.2.0-1ubuntu1) ... 113s Setting up dh-autoreconf (20) ... 113s Setting up g++ (4:14.2.0-1ubuntu1) ... 113s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 113s Setting up build-essential (12.12ubuntu1) ... 113s Setting up debhelper (13.24.1ubuntu2) ... 113s Processing triggers for install-info (7.1.1-1) ... 113s Processing triggers for libc-bin (2.41-6ubuntu2) ... 113s Processing triggers for man-db (2.13.1-1) ... 115s autopkgtest [21:05:53]: test command1: pytest-3 115s autopkgtest [21:05:53]: test command1: [----------------------- 116s ============================= test session starts ============================== 116s platform linux -- Python 3.13.4, pytest-8.3.5, pluggy-1.5.0 116s rootdir: /tmp/autopkgtest.jHwc8S/build.WTl/src 116s plugins: typeguard-4.4.2 116s collected 38 items 116s 116s tests/test_cut.py FF [ 5%] 118s tests/test_fixup.py ....FFF....... [ 42%] 118s tests/test_gpgsign.py . [ 44%] 121s tests/test_interactive.py FFFFFFFFFF [ 71%] 122s tests/test_rerere.py FFFF. [ 84%] 123s tests/test_reword.py FFF... [100%] 123s 123s =================================== FAILURES =================================== 123s ___________________________________ test_cut ___________________________________ 123s 123s repo = 123s 123s def test_cut(repo): 123s bash( 123s """ 123s echo "Hello, World" >> file1 123s git add file1 123s git commit -m "commit 1" 123s 123s echo "Append f1" >> file1 123s echo "Make f2" >> file2 123s git add file1 file2 123s git commit -m "commit 2" 123s 123s echo "Append f3" >> file2 123s git add file2 123s git commit -m "commit 3" 123s """ 123s ) 123s 123s prev = repo.get_commit("HEAD") 123s prev_u = prev.parent() 123s prev_uu = prev_u.parent() 123s 123s with editor_main(["--cut", "HEAD~"], input=b"y\nn\n") as ed: 123s > with ed.next_file() as f: 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_cut.py:29: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = b'y\nn\n', capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '--cut', 'HEAD~'],) 123s kwargs = {'stdin': -1} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '--cut', 'HEAD~']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 7e4c160] commit 1 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master ffbe77d] commit 2 123s Author: Bash Author 123s 2 files changed, 2 insertions(+) 123s create mode 100644 file2 123s [master 59f98d3] commit 3 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '--cut', 'HEAD~'] {'input': b'y\nn\n', 'check': True} 123s diff --git b/file1 a/file1 123s index 3fa0d4b..ada44cf 100644 123s --- b/file1 123s +++ a/file1 123s @@ -1 +1,2 @@ 123s Hello, World 123s +Append f1 123s (1/1) Apply this hunk to index [y,n,q,a,d,e,p,?]? 123s diff --git b/file2 a/file2 123s new file mode 100644 123s index 0000000..93350fe 123s --- /dev/null 123s +++ a/file2 123s @@ -0,0 +1 @@ 123s +Make f2 123s (1/1) Apply addition to index [y,n,q,a,d,e,p,?]? 123s Cutting commit ffbe77d7e082 123s Select changes to be included in part [1]: 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:37595/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:37595/', 'COMMIT_EDITMSG']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ________________________________ test_cut_root _________________________________ 123s 123s repo = 123s 123s def test_cut_root(repo): 123s bash( 123s """ 123s echo "Hello, World" >> file1 123s echo "Make f2" >> file2 123s git add file1 file2 123s git commit -m "root commit" 123s """ 123s ) 123s 123s prev = repo.get_commit("HEAD") 123s assert prev.is_root 123s assert len(prev.parent_oids) == 0 123s 123s with editor_main(["--cut", "HEAD"], input=b"y\nn\n") as ed: 123s > with ed.next_file() as f: 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_cut.py:64: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = b'y\nn\n', capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '--cut', 'HEAD'],) 123s kwargs = {'stdin': -1} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '--cut', 'HEAD']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 0f76953] root commit 123s Author: Bash Author 123s 2 files changed, 2 insertions(+) 123s create mode 100644 file1 123s create mode 100644 file2 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '--cut', 'HEAD'] {'input': b'y\nn\n', 'check': True} 123s diff --git b/file1 a/file1 123s new file mode 100644 123s index 0000000..3fa0d4b 123s --- /dev/null 123s +++ a/file1 123s @@ -0,0 +1 @@ 123s +Hello, World 123s (1/1) Apply addition to index [y,n,q,a,d,e,p,?]? 123s diff --git b/file2 a/file2 123s new file mode 100644 123s index 0000000..93350fe 123s --- /dev/null 123s +++ a/file2 123s @@ -0,0 +1 @@ 123s +Make f2 123s (1/1) Apply addition to index [y,n,q,a,d,e,p,?]? 123s Cutting commit 0f769538d035 123s Select changes to be included in part [1]: 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:33849/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:33849/', 'COMMIT_EDITMSG']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ____________________________ test_fixup_head_editor ____________________________ 123s 123s basic_repo = 123s 123s def test_fixup_head_editor(basic_repo): 123s old = basic_repo.get_commit("HEAD") 123s newmsg = "fixup_head_editor test\n\nanother line\n" 123s 123s with fixup_helper_editor(basic_repo, ["-e"], "HEAD", newmsg) as ed: 123s > with ed.next_file() as f: 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_fixup.py:99: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-e', 'HEAD'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-e', 'HEAD']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ---------------------------- Captured stdout setup ----------------------------- 123s [master (root-commit) 593ae2e] commit1 123s Author: Bash Author 123s 1 file changed, 2 insertions(+) 123s create mode 100644 file1 123s [master efccd1e] commit2 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s ----------------------------- Captured stdout call ----------------------------- 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-e', 'HEAD'] {'check': True} 123s Applying staged changes to 'HEAD' 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:43005/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:43005/', 'COMMIT_EDITMSG']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s __________________________ test_fixup_nonhead_editor ___________________________ 123s 123s basic_repo = 123s 123s def test_fixup_nonhead_editor(basic_repo): 123s old = basic_repo.get_commit("HEAD~") 123s newmsg = "fixup_nonhead_editor test\n\nanother line\n" 123s 123s with fixup_helper_editor(basic_repo, ["-e"], "HEAD~", newmsg) as ed: 123s > with ed.next_file() as f: 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_fixup.py:109: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-e', 'HEAD~'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-e', 'HEAD~']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ---------------------------- Captured stdout setup ----------------------------- 123s [master (root-commit) 593ae2e] commit1 123s Author: Bash Author 123s 1 file changed, 2 insertions(+) 123s create mode 100644 file1 123s [master efccd1e] commit2 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s ----------------------------- Captured stdout call ----------------------------- 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-e', 'HEAD~'] {'check': True} 123s Applying staged changes to 'HEAD~' 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:42295/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:42295/', 'COMMIT_EDITMSG']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s _________________________ test_fixup_nonhead_conflict __________________________ 123s 123s basic_repo = 123s 123s def test_fixup_nonhead_conflict(basic_repo): 123s bash('echo "conflict" > file1') 123s bash("git add file1") 123s 123s old = basic_repo.get_commit("HEAD~") 123s assert old.persisted 123s 123s with editor_main(["HEAD~"], input=b"y\ny\ny\ny\n") as ed: 123s > with ed.next_file() as f: 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_fixup.py:122: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = b'y\ny\ny\ny\n', capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', 'HEAD~'],) 123s kwargs = {'stdin': -1} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', 'HEAD~']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ---------------------------- Captured stdout setup ----------------------------- 123s [master (root-commit) 593ae2e] commit1 123s Author: Bash Author 123s 1 file changed, 2 insertions(+) 123s create mode 100644 file1 123s [master efccd1e] commit2 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s ----------------------------- Captured stdout call ----------------------------- 123s Running ['/usr/bin/python3', '-m', 'gitrevise', 'HEAD~'] {'input': b'y\ny\ny\ny\n', 'check': True} 123s Applying staged changes to 'HEAD~' 123s Conflict applying '' 123s Path: '/file1' 123s Edit conflicted file? (Y/n) editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:44759/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:44759/', 'file1']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ___________________________ test_interactive_reorder ___________________________ 123s 123s repo = 123s 123s def test_interactive_reorder(repo): 123s > interactive_reorder_helper(repo, cwd=repo.workdir) 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:62: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:29: in interactive_reorder_helper 123s with ed.next_file() as f: 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'],) 123s kwargs = {'cwd': PosixPath('/tmp/pytest-of-ubuntu/pytest-0/workdir17')} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 594c1e1] commit one 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master a6e7b83] commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file2 123s [master 0e886bf] commit three 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'] {'cwd': PosixPath('/tmp/pytest-of-ubuntu/pytest-0/workdir17'), 'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:44849/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:44849/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s _______________________ test_interactive_reorder_subdir ________________________ 123s 123s repo = 123s 123s def test_interactive_reorder_subdir(repo): 123s bash("mkdir subdir") 123s > interactive_reorder_helper(repo, cwd=repo.workdir / "subdir") 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:67: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:29: in interactive_reorder_helper 123s with ed.next_file() as f: 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'],) 123s kwargs = {'cwd': PosixPath('/tmp/pytest-of-ubuntu/pytest-0/workdir18/subdir')} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 594c1e1] commit one 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master a6e7b83] commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file2 123s [master 0e886bf] commit three 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'] {'cwd': PosixPath('/tmp/pytest-of-ubuntu/pytest-0/workdir18/subdir'), 'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:36505/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:36505/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ___________________________ test_interactive_on_root ___________________________ 123s 123s repo = 123s 123s def test_interactive_on_root(repo): 123s bash( 123s """ 123s echo "hello, world" > file1 123s git add file1 123s git commit -m "commit one" 123s 123s echo "second file" > file2 123s git add file2 123s git commit -m "commit two" 123s 123s echo "new line!" >> file1 123s git add file1 123s git commit -m "commit three" 123s """ 123s ) 123s 123s orig_commit3 = prev = repo.get_commit("HEAD") 123s orig_commit2 = prev_u = prev.parent() 123s orig_commit1 = prev_u.parent() 123s 123s index_tree = repo.index.tree() 123s 123s with editor_main(["-i", "--root"]) as ed: 123s > with ed.next_file() as f: 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:94: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-i', '--root'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-i', '--root']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 594c1e1] commit one 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master a6e7b83] commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file2 123s [master 0e886bf] commit three 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-i', '--root'] {'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:41969/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:41969/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ____________________________ test_interactive_fixup ____________________________ 123s 123s repo = 123s 123s def test_interactive_fixup(repo): 123s bash( 123s """ 123s echo "hello, world" > file1 123s git add file1 123s git commit -m "commit one" 123s 123s echo "second file" > file2 123s git add file2 123s git commit -m "commit two" 123s 123s echo "new line!" >> file1 123s git add file1 123s git commit -m "commit three" 123s 123s echo "extra" >> file3 123s git add file3 123s """ 123s ) 123s 123s prev = repo.get_commit("HEAD") 123s prev_u = prev.parent() 123s prev_uu = prev_u.parent() 123s 123s index_tree = repo.index.tree() 123s 123s with editor_main(["-i", "HEAD~~"]) as ed: 123s > with ed.next_file() as f: 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:156: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 594c1e1] commit one 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master a6e7b83] commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file2 123s [master 0e886bf] commit three 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'] {'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:36605/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:36605/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ___________________ test_autosquash_config[None-None-False] ____________________ 123s 123s repo = , rebase_config = None 123s revise_config = None, expected = False 123s 123s @pytest.mark.parametrize( 123s "rebase_config,revise_config,expected", 123s [ 123s (None, None, False), 123s ("1", "0", False), 123s ("0", "1", True), 123s ("1", None, True), 123s (None, "1", True), 123s ], 123s ) 123s def test_autosquash_config(repo, rebase_config, revise_config, expected): 123s bash( 123s """ 123s echo "hello, world" > file1 123s git add file1 123s git commit -m "commit one" 123s 123s echo "second file" > file2 123s git add file2 123s git commit -m "commit two" 123s 123s echo "new line!" >> file1 123s git add file1 123s git commit -m "commit three" 123s 123s echo "extra line" >> file2 123s git add file2 123s git commit --fixup=HEAD~ 123s """ 123s ) 123s 123s if rebase_config is not None: 123s bash(f"git config rebase.autoSquash '{rebase_config}'") 123s if revise_config is not None: 123s bash(f"git config revise.autoSquash '{revise_config}'") 123s 123s head = repo.get_commit("HEAD") 123s headu = head.parent() 123s headuu = headu.parent() 123s 123s disabled = f"""\ 123s pick {headuu.oid.short()} commit two 123s pick {headu.oid.short()} commit three 123s pick {head.oid.short()} fixup! commit two 123s 123s """ 123s enabled = f"""\ 123s pick {headuu.oid.short()} commit two 123s fixup {head.oid.short()} fixup! commit two 123s pick {headu.oid.short()} commit three 123s 123s """ 123s 123s def subtest(args, expected_todos): 123s with editor_main(args + ["-i", "HEAD~3"]) as ed: 123s with ed.next_file() as f: 123s assert f.startswith_dedent(expected_todos) 123s f.replace_dedent(disabled) # don't mutate state 123s 123s assert repo.get_commit("HEAD") == head 123s 123s > subtest([], enabled if expected else disabled) 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:264: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:258: in subtest 123s with ed.next_file() as f: 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 594c1e1] commit one 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master a6e7b83] commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file2 123s [master 0e886bf] commit three 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s [master f42cd51] fixup! commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3'] {'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:40969/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:40969/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ______________________ test_autosquash_config[1-0-False] _______________________ 123s 123s repo = , rebase_config = '1' 123s revise_config = '0', expected = False 123s 123s @pytest.mark.parametrize( 123s "rebase_config,revise_config,expected", 123s [ 123s (None, None, False), 123s ("1", "0", False), 123s ("0", "1", True), 123s ("1", None, True), 123s (None, "1", True), 123s ], 123s ) 123s def test_autosquash_config(repo, rebase_config, revise_config, expected): 123s bash( 123s """ 123s echo "hello, world" > file1 123s git add file1 123s git commit -m "commit one" 123s 123s echo "second file" > file2 123s git add file2 123s git commit -m "commit two" 123s 123s echo "new line!" >> file1 123s git add file1 123s git commit -m "commit three" 123s 123s echo "extra line" >> file2 123s git add file2 123s git commit --fixup=HEAD~ 123s """ 123s ) 123s 123s if rebase_config is not None: 123s bash(f"git config rebase.autoSquash '{rebase_config}'") 123s if revise_config is not None: 123s bash(f"git config revise.autoSquash '{revise_config}'") 123s 123s head = repo.get_commit("HEAD") 123s headu = head.parent() 123s headuu = headu.parent() 123s 123s disabled = f"""\ 123s pick {headuu.oid.short()} commit two 123s pick {headu.oid.short()} commit three 123s pick {head.oid.short()} fixup! commit two 123s 123s """ 123s enabled = f"""\ 123s pick {headuu.oid.short()} commit two 123s fixup {head.oid.short()} fixup! commit two 123s pick {headu.oid.short()} commit three 123s 123s """ 123s 123s def subtest(args, expected_todos): 123s with editor_main(args + ["-i", "HEAD~3"]) as ed: 123s with ed.next_file() as f: 123s assert f.startswith_dedent(expected_todos) 123s f.replace_dedent(disabled) # don't mutate state 123s 123s assert repo.get_commit("HEAD") == head 123s 123s > subtest([], enabled if expected else disabled) 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:264: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:258: in subtest 123s with ed.next_file() as f: 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 594c1e1] commit one 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master a6e7b83] commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file2 123s [master 0e886bf] commit three 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s [master f42cd51] fixup! commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3'] {'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:36289/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:36289/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s _______________________ test_autosquash_config[0-1-True] _______________________ 123s 123s repo = , rebase_config = '0' 123s revise_config = '1', expected = True 123s 123s @pytest.mark.parametrize( 123s "rebase_config,revise_config,expected", 123s [ 123s (None, None, False), 123s ("1", "0", False), 123s ("0", "1", True), 123s ("1", None, True), 123s (None, "1", True), 123s ], 123s ) 123s def test_autosquash_config(repo, rebase_config, revise_config, expected): 123s bash( 123s """ 123s echo "hello, world" > file1 123s git add file1 123s git commit -m "commit one" 123s 123s echo "second file" > file2 123s git add file2 123s git commit -m "commit two" 123s 123s echo "new line!" >> file1 123s git add file1 123s git commit -m "commit three" 123s 123s echo "extra line" >> file2 123s git add file2 123s git commit --fixup=HEAD~ 123s """ 123s ) 123s 123s if rebase_config is not None: 123s bash(f"git config rebase.autoSquash '{rebase_config}'") 123s if revise_config is not None: 123s bash(f"git config revise.autoSquash '{revise_config}'") 123s 123s head = repo.get_commit("HEAD") 123s headu = head.parent() 123s headuu = headu.parent() 123s 123s disabled = f"""\ 123s pick {headuu.oid.short()} commit two 123s pick {headu.oid.short()} commit three 123s pick {head.oid.short()} fixup! commit two 123s 123s """ 123s enabled = f"""\ 123s pick {headuu.oid.short()} commit two 123s fixup {head.oid.short()} fixup! commit two 123s pick {headu.oid.short()} commit three 123s 123s """ 123s 123s def subtest(args, expected_todos): 123s with editor_main(args + ["-i", "HEAD~3"]) as ed: 123s with ed.next_file() as f: 123s assert f.startswith_dedent(expected_todos) 123s f.replace_dedent(disabled) # don't mutate state 123s 123s assert repo.get_commit("HEAD") == head 123s 123s > subtest([], enabled if expected else disabled) 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:264: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:258: in subtest 123s with ed.next_file() as f: 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 594c1e1] commit one 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master a6e7b83] commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file2 123s [master 0e886bf] commit three 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s [master f42cd51] fixup! commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3'] {'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:34739/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:34739/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s _____________________ test_autosquash_config[1-None-True] ______________________ 123s 123s repo = , rebase_config = '1' 123s revise_config = None, expected = True 123s 123s @pytest.mark.parametrize( 123s "rebase_config,revise_config,expected", 123s [ 123s (None, None, False), 123s ("1", "0", False), 123s ("0", "1", True), 123s ("1", None, True), 123s (None, "1", True), 123s ], 123s ) 123s def test_autosquash_config(repo, rebase_config, revise_config, expected): 123s bash( 123s """ 123s echo "hello, world" > file1 123s git add file1 123s git commit -m "commit one" 123s 123s echo "second file" > file2 123s git add file2 123s git commit -m "commit two" 123s 123s echo "new line!" >> file1 123s git add file1 123s git commit -m "commit three" 123s 123s echo "extra line" >> file2 123s git add file2 123s git commit --fixup=HEAD~ 123s """ 123s ) 123s 123s if rebase_config is not None: 123s bash(f"git config rebase.autoSquash '{rebase_config}'") 123s if revise_config is not None: 123s bash(f"git config revise.autoSquash '{revise_config}'") 123s 123s head = repo.get_commit("HEAD") 123s headu = head.parent() 123s headuu = headu.parent() 123s 123s disabled = f"""\ 123s pick {headuu.oid.short()} commit two 123s pick {headu.oid.short()} commit three 123s pick {head.oid.short()} fixup! commit two 123s 123s """ 123s enabled = f"""\ 123s pick {headuu.oid.short()} commit two 123s fixup {head.oid.short()} fixup! commit two 123s pick {headu.oid.short()} commit three 123s 123s """ 123s 123s def subtest(args, expected_todos): 123s with editor_main(args + ["-i", "HEAD~3"]) as ed: 123s with ed.next_file() as f: 123s assert f.startswith_dedent(expected_todos) 123s f.replace_dedent(disabled) # don't mutate state 123s 123s assert repo.get_commit("HEAD") == head 123s 123s > subtest([], enabled if expected else disabled) 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:264: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:258: in subtest 123s with ed.next_file() as f: 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 594c1e1] commit one 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master a6e7b83] commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file2 123s [master 0e886bf] commit three 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s [master f42cd51] fixup! commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3'] {'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:41121/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:41121/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s _____________________ test_autosquash_config[None-1-True] ______________________ 123s 123s repo = , rebase_config = None 123s revise_config = '1', expected = True 123s 123s @pytest.mark.parametrize( 123s "rebase_config,revise_config,expected", 123s [ 123s (None, None, False), 123s ("1", "0", False), 123s ("0", "1", True), 123s ("1", None, True), 123s (None, "1", True), 123s ], 123s ) 123s def test_autosquash_config(repo, rebase_config, revise_config, expected): 123s bash( 123s """ 123s echo "hello, world" > file1 123s git add file1 123s git commit -m "commit one" 123s 123s echo "second file" > file2 123s git add file2 123s git commit -m "commit two" 123s 123s echo "new line!" >> file1 123s git add file1 123s git commit -m "commit three" 123s 123s echo "extra line" >> file2 123s git add file2 123s git commit --fixup=HEAD~ 123s """ 123s ) 123s 123s if rebase_config is not None: 123s bash(f"git config rebase.autoSquash '{rebase_config}'") 123s if revise_config is not None: 123s bash(f"git config revise.autoSquash '{revise_config}'") 123s 123s head = repo.get_commit("HEAD") 123s headu = head.parent() 123s headuu = headu.parent() 123s 123s disabled = f"""\ 123s pick {headuu.oid.short()} commit two 123s pick {headu.oid.short()} commit three 123s pick {head.oid.short()} fixup! commit two 123s 123s """ 123s enabled = f"""\ 123s pick {headuu.oid.short()} commit two 123s fixup {head.oid.short()} fixup! commit two 123s pick {headu.oid.short()} commit three 123s 123s """ 123s 123s def subtest(args, expected_todos): 123s with editor_main(args + ["-i", "HEAD~3"]) as ed: 123s with ed.next_file() as f: 123s assert f.startswith_dedent(expected_todos) 123s f.replace_dedent(disabled) # don't mutate state 123s 123s assert repo.get_commit("HEAD") == head 123s 123s > subtest([], enabled if expected else disabled) 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:264: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:258: in subtest 123s with ed.next_file() as f: 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 594c1e1] commit one 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master a6e7b83] commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file2 123s [master 0e886bf] commit three 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s [master f42cd51] fixup! commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~3'] {'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:45413/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:45413/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ___________________________ test_interactive_reword ____________________________ 123s 123s repo = 123s 123s def test_interactive_reword(repo): 123s bash( 123s """ 123s echo "hello, world" > file1 123s git add file1 123s git commit -m "commit one" -m "extended1" 123s 123s echo "second file" > file2 123s git add file2 123s git commit -m "commit two" -m "extended2" 123s 123s echo "new line!" >> file1 123s git add file1 123s git commit -m "commit three" -m "extended3" 123s """ 123s ) 123s 123s prev = repo.get_commit("HEAD") 123s prev_u = prev.parent() 123s prev_uu = prev_u.parent() 123s 123s with editor_main(["-ie", "HEAD~~"]) as ed: 123s > with ed.next_file() as f: 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_interactive.py:291: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-ie', 'HEAD~~'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-ie', 'HEAD~~']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 8ac616b] commit one 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master 28ea97a] commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file2 123s [master 0ecbace] commit three 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-ie', 'HEAD~~'] {'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:43463/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:43463/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ________________________ test_reuse_recorded_resolution ________________________ 123s 123s repo = 123s 123s def test_reuse_recorded_resolution(repo): 123s history_with_two_conflicting_commits(autoUpdate=True) 123s 123s with editor_main(("-i", "HEAD~~"), input=b"y\ny\ny\ny\n") as ed: 123s > flip_last_two_commits(repo, ed) 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_rerere.py:25: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_rerere.py:351: in flip_last_two_commits 123s with ed.next_file() as f: 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = b'y\ny\ny\ny\n', capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'],) 123s kwargs = {'stdin': -1} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) d72132e] initial commit 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file 123s [master 698fe81] commit one 123s Author: Bash Author 123s 1 file changed, 1 insertion(+), 1 deletion(-) 123s [master b1efb1b] commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+), 1 deletion(-) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'] {'input': b'y\ny\ny\ny\n', 'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:38361/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:38361/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s __________________________ test_rerere_no_autoupdate ___________________________ 123s 123s repo = 123s 123s def test_rerere_no_autoupdate(repo): 123s history_with_two_conflicting_commits(autoUpdate=False) 123s 123s with editor_main(("-i", "HEAD~~"), input=b"y\ny\ny\ny\n") as ed: 123s > flip_last_two_commits(repo, ed) 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_rerere.py:63: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_rerere.py:351: in flip_last_two_commits 123s with ed.next_file() as f: 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = b'y\ny\ny\ny\n', capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'],) 123s kwargs = {'stdin': -1} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) d72132e] initial commit 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file 123s [master 698fe81] commit one 123s Author: Bash Author 123s 1 file changed, 1 insertion(+), 1 deletion(-) 123s [master b1efb1b] commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+), 1 deletion(-) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'] {'input': b'y\ny\ny\ny\n', 'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:46751/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:46751/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ______________________________ test_rerere_merge _______________________________ 123s 123s repo = 123s 123s def test_rerere_merge(repo): 123s (repo.workdir / "file").write_bytes(10 * b"x\n") 123s bash( 123s """ 123s git config rerere.enabled true 123s git config rerere.autoUpdate true 123s git add file; git commit -m 'initial commit' 123s """ 123s ) 123s changeline("file", 0, b"original1\n") 123s bash("git commit -am 'commit 1'") 123s changeline("file", 0, b"original2\n") 123s bash("git commit -am 'commit 2'") 123s 123s # Record a resolution for changing the order of two commits. 123s with editor_main(("-i", "HEAD~~"), input=b"y\ny\ny\ny\n") as ed: 123s > flip_last_two_commits(repo, ed) 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_rerere.py:115: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_rerere.py:351: in flip_last_two_commits 123s with ed.next_file() as f: 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = b'y\ny\ny\ny\n', capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'],) 123s kwargs = {'stdin': -1} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 78ab633] initial commit 123s Author: Bash Author 123s 1 file changed, 10 insertions(+) 123s create mode 100644 file 123s [master bc4398a] commit 1 123s Author: Bash Author 123s 1 file changed, 1 insertion(+), 1 deletion(-) 123s [master 8ede3c3] commit 2 123s Author: Bash Author 123s 1 file changed, 1 insertion(+), 1 deletion(-) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'] {'input': b'y\ny\ny\ny\n', 'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:40355/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:40355/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ____________________ test_replay_resolution_recorded_by_git ____________________ 123s 123s repo = 123s 123s def test_replay_resolution_recorded_by_git(repo): 123s history_with_two_conflicting_commits(autoUpdate=True) 123s # Switch the order of the last two commits, recording the conflict 123s # resolution with Git itself. 123s bash( 123s r""" 123s one=$(git rev-parse HEAD~) 123s two=$(git rev-parse HEAD) 123s git reset --hard HEAD~~ 123s git cherry-pick "$two" 2>&1 | grep 'could not apply' 123s echo resolved two > file; git add file; GIT_EDITOR=: git cherry-pick --continue 123s git cherry-pick "$one" 2>&1 | grep 'could not apply' 123s echo resolved one > file; git add file; GIT_EDITOR=: git cherry-pick --continue --no-edit 123s git reset --hard "$two" 123s """ 123s ) 123s 123s # Now let's try to do the same thing with git-revise, reusing the recorded resolution. 123s with editor_main(("-i", "HEAD~~")) as ed: 123s > flip_last_two_commits(repo, ed) 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_rerere.py:172: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_rerere.py:351: in flip_last_two_commits 123s with ed.next_file() as f: 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) d72132e] initial commit 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file 123s [master 698fe81] commit one 123s Author: Bash Author 123s 1 file changed, 1 insertion(+), 1 deletion(-) 123s [master b1efb1b] commit two 123s Author: Bash Author 123s 1 file changed, 1 insertion(+), 1 deletion(-) 123s HEAD is now at d72132e initial commit 123s error: could not apply b1efb1b... commit two 123s [master 4a30f41] commit two 123s Author: Bash Author 123s Date: Thu Jul 13 21:40:00 2017 -0500 123s 1 file changed, 1 insertion(+), 1 deletion(-) 123s error: could not apply 698fe81... commit one 123s [master 73083a0] commit one 123s Author: Bash Author 123s Date: Thu Jul 13 21:40:00 2017 -0500 123s 1 file changed, 1 insertion(+), 1 deletion(-) 123s HEAD is now at b1efb1b commit two 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '-i', 'HEAD~~'] {'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:45743/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:45743/', 'git-revise-todo']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Recorded resolution for 'file'. 123s Recorded resolution for 'file'. 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ____________________________ test_reword[True-HEAD] ____________________________ 123s 123s repo = , target = 'HEAD' 123s use_editor = True 123s 123s @pytest.mark.parametrize("target", ["HEAD", "HEAD~", "HEAD~~"]) 123s @pytest.mark.parametrize("use_editor", [True, False]) 123s def test_reword(repo, target, use_editor): 123s bash( 123s """ 123s echo "hello, world" > file1 123s git add file1 123s git commit -m "commit 1" 123s echo "new line!" >> file1 123s git add file1 123s git commit -m "commit 2" 123s echo "yet another line!" >> file1 123s git add file1 123s git commit -m "commit 3" 123s """ 123s ) 123s 123s message = textwrap.dedent( 123s """\ 123s reword test 123s 123s another line 123s """ 123s ).encode() 123s 123s old = repo.get_commit(target) 123s assert old.message != message 123s assert old.persisted 123s 123s if use_editor: 123s with editor_main(["--no-index", "-e", target]) as ed: 123s > with ed.next_file() as f: 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_reword.py:38: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '--no-index', '-e', 'HEAD'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '--no-index', '-e', 'HEAD']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 4cf9097] commit 1 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master 1697281] commit 2 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s [master 67cdb39] commit 3 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '--no-index', '-e', 'HEAD'] {'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:46275/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:46275/', 'COMMIT_EDITMSG']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ___________________________ test_reword[True-HEAD~] ____________________________ 123s 123s repo = , target = 'HEAD~' 123s use_editor = True 123s 123s @pytest.mark.parametrize("target", ["HEAD", "HEAD~", "HEAD~~"]) 123s @pytest.mark.parametrize("use_editor", [True, False]) 123s def test_reword(repo, target, use_editor): 123s bash( 123s """ 123s echo "hello, world" > file1 123s git add file1 123s git commit -m "commit 1" 123s echo "new line!" >> file1 123s git add file1 123s git commit -m "commit 2" 123s echo "yet another line!" >> file1 123s git add file1 123s git commit -m "commit 3" 123s """ 123s ) 123s 123s message = textwrap.dedent( 123s """\ 123s reword test 123s 123s another line 123s """ 123s ).encode() 123s 123s old = repo.get_commit(target) 123s assert old.message != message 123s assert old.persisted 123s 123s if use_editor: 123s with editor_main(["--no-index", "-e", target]) as ed: 123s > with ed.next_file() as f: 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_reword.py:38: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '--no-index', '-e', 'HEAD~'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '--no-index', '-e', 'HEAD~']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 4cf9097] commit 1 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master 1697281] commit 2 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s [master 67cdb39] commit 3 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '--no-index', '-e', 'HEAD~'] {'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:46395/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:46395/', 'COMMIT_EDITMSG']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s ___________________________ test_reword[True-HEAD~~] ___________________________ 123s 123s repo = , target = 'HEAD~~' 123s use_editor = True 123s 123s @pytest.mark.parametrize("target", ["HEAD", "HEAD~", "HEAD~~"]) 123s @pytest.mark.parametrize("use_editor", [True, False]) 123s def test_reword(repo, target, use_editor): 123s bash( 123s """ 123s echo "hello, world" > file1 123s git add file1 123s git commit -m "commit 1" 123s echo "new line!" >> file1 123s git add file1 123s git commit -m "commit 2" 123s echo "yet another line!" >> file1 123s git add file1 123s git commit -m "commit 3" 123s """ 123s ) 123s 123s message = textwrap.dedent( 123s """\ 123s reword test 123s 123s another line 123s """ 123s ).encode() 123s 123s old = repo.get_commit(target) 123s assert old.message != message 123s assert old.persisted 123s 123s if use_editor: 123s with editor_main(["--no-index", "-e", target]) as ed: 123s > with ed.next_file() as f: 123s 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/test_reword.py:38: 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:246: in next_file 123s raise self.exception 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:140: in main_wrapper 123s return main(args, **kwargs) 123s /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/conftest.py:122: in main 123s return subprocess.run(cmd, **kwargs) 123s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 123s 123s input = None, capture_output = False, timeout = None, check = True 123s popenargs = (['/usr/bin/python3', '-m', 'gitrevise', '--no-index', '-e', 'HEAD~~'],) 123s kwargs = {} 123s process = 123s stdout = None, stderr = None, retcode = 1 123s 123s def run(*popenargs, 123s input=None, capture_output=False, timeout=None, check=False, **kwargs): 123s """Run command with arguments and return a CompletedProcess instance. 123s 123s The returned instance will have attributes args, returncode, stdout and 123s stderr. By default, stdout and stderr are not captured, and those attributes 123s will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, 123s or pass capture_output=True to capture both. 123s 123s If check is True and the exit code was non-zero, it raises a 123s CalledProcessError. The CalledProcessError object will have the return code 123s in the returncode attribute, and output & stderr attributes if those streams 123s were captured. 123s 123s If timeout (seconds) is given and the process takes too long, 123s a TimeoutExpired exception will be raised. 123s 123s There is an optional argument "input", allowing you to 123s pass bytes or a string to the subprocess's stdin. If you use this argument 123s you may not also use the Popen constructor's "stdin" argument, as 123s it will be used internally. 123s 123s By default, all communication is in bytes, and therefore any "input" should 123s be bytes, and the stdout and stderr will be bytes. If in text mode, any 123s "input" should be a string, and stdout and stderr will be strings decoded 123s according to locale encoding, or by "encoding" if set. Text mode is 123s triggered by setting any of text, encoding, errors or universal_newlines. 123s 123s The other arguments are the same as for the Popen constructor. 123s """ 123s if input is not None: 123s if kwargs.get('stdin') is not None: 123s raise ValueError('stdin and input arguments may not both be used.') 123s kwargs['stdin'] = PIPE 123s 123s if capture_output: 123s if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: 123s raise ValueError('stdout and stderr arguments may not be used ' 123s 'with capture_output.') 123s kwargs['stdout'] = PIPE 123s kwargs['stderr'] = PIPE 123s 123s with Popen(*popenargs, **kwargs) as process: 123s try: 123s stdout, stderr = process.communicate(input, timeout=timeout) 123s except TimeoutExpired as exc: 123s process.kill() 123s if _mswindows: 123s # Windows accumulates the output in a single blocking 123s # read() call run on child threads, with the timeout 123s # being done in a join() on those threads. communicate() 123s # _after_ kill() is required to collect that and add it 123s # to the exception. 123s exc.stdout, exc.stderr = process.communicate() 123s else: 123s # POSIX _communicate already populated the output so 123s # far into the TimeoutExpired exception. 123s process.wait() 123s raise 123s except: # Including KeyboardInterrupt, communicate handled that. 123s process.kill() 123s # We don't call process.wait() as .__exit__ does that for us. 123s raise 123s retcode = process.poll() 123s if check and retcode: 123s > raise CalledProcessError(retcode, process.args, 123s output=stdout, stderr=stderr) 123s E subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'gitrevise', '--no-index', '-e', 'HEAD~~']' returned non-zero exit status 1. 123s 123s /usr/lib/python3.13/subprocess.py:577: CalledProcessError 123s ----------------------------- Captured stdout call ----------------------------- 123s [master (root-commit) 4cf9097] commit 1 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s create mode 100644 file1 123s [master 1697281] commit 2 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s [master 67cdb39] commit 3 123s Author: Bash Author 123s 1 file changed, 1 insertion(+) 123s Running ['/usr/bin/python3', '-m', 'gitrevise', '--no-index', '-e', 'HEAD~~'] {'check': True} 123s editor error: Editor exited with status Command '['/bin/sh', '-ec', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:44209/ "$@"', '/usr/bin/python3 /tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py http://127.0.0.1:44209/', 'COMMIT_EDITMSG']' returned non-zero exit status 1. 123s ----------------------------- Captured stderr call ----------------------------- 123s Traceback (most recent call last): 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 17, in 123s run_editor(url=sys.argv[1], path=Path(sys.argv[2]).resolve()) 123s ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/tmp/autopkgtest.jHwc8S/build.WTl/src/tests/dummy_editor.py", line 8, in run_editor 123s with urlopen(url, data=path.read_bytes(), timeout=10) as r: 123s ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 189, in urlopen 123s return opener.open(url, data, timeout) 123s ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 495, in open 123s response = meth(req, response) 123s File "/usr/lib/python3.13/urllib/request.py", line 604, in http_response 123s response = self.parent.error( 123s 'http', request, response, code, msg, hdrs) 123s File "/usr/lib/python3.13/urllib/request.py", line 533, in error 123s return self._call_chain(*args) 123s ~~~~~~~~~~~~~~~~^^^^^^^ 123s File "/usr/lib/python3.13/urllib/request.py", line 466, in _call_chain 123s result = func(*args) 123s File "/usr/lib/python3.13/urllib/request.py", line 613, in http_error_default 123s raise HTTPError(req.full_url, code, msg, hdrs, fp) 123s urllib.error.HTTPError: HTTP Error 503: Service Unavailable 123s =========================== short test summary info ============================ 123s FAILED tests/test_cut.py::test_cut - subprocess.CalledProcessError: Command '... 123s FAILED tests/test_cut.py::test_cut_root - subprocess.CalledProcessError: Comm... 123s FAILED tests/test_fixup.py::test_fixup_head_editor - subprocess.CalledProcess... 123s FAILED tests/test_fixup.py::test_fixup_nonhead_editor - subprocess.CalledProc... 123s FAILED tests/test_fixup.py::test_fixup_nonhead_conflict - subprocess.CalledPr... 123s FAILED tests/test_interactive.py::test_interactive_reorder - subprocess.Calle... 123s FAILED tests/test_interactive.py::test_interactive_reorder_subdir - subproces... 123s FAILED tests/test_interactive.py::test_interactive_on_root - subprocess.Calle... 123s FAILED tests/test_interactive.py::test_interactive_fixup - subprocess.CalledP... 123s FAILED tests/test_interactive.py::test_autosquash_config[None-None-False] - s... 123s FAILED tests/test_interactive.py::test_autosquash_config[1-0-False] - subproc... 123s FAILED tests/test_interactive.py::test_autosquash_config[0-1-True] - subproce... 123s FAILED tests/test_interactive.py::test_autosquash_config[1-None-True] - subpr... 123s FAILED tests/test_interactive.py::test_autosquash_config[None-1-True] - subpr... 123s FAILED tests/test_interactive.py::test_interactive_reword - subprocess.Called... 123s FAILED tests/test_rerere.py::test_reuse_recorded_resolution - subprocess.Call... 123s FAILED tests/test_rerere.py::test_rerere_no_autoupdate - subprocess.CalledPro... 123s FAILED tests/test_rerere.py::test_rerere_merge - subprocess.CalledProcessErro... 123s FAILED tests/test_rerere.py::test_replay_resolution_recorded_by_git - subproc... 123s FAILED tests/test_reword.py::test_reword[True-HEAD] - subprocess.CalledProces... 123s FAILED tests/test_reword.py::test_reword[True-HEAD~] - subprocess.CalledProce... 123s FAILED tests/test_reword.py::test_reword[True-HEAD~~] - subprocess.CalledProc... 123s ======================== 22 failed, 16 passed in 7.28s ========================= 133s autopkgtest [21:06:11]: test command1: -----------------------] 133s command1 FAIL non-zero exit status 1 133s autopkgtest [21:06:11]: test command1: - - - - - - - - - - results - - - - - - - - - - 134s autopkgtest [21:06:12]: @@@@@@@@@@@@@@@@@@@@ summary 134s command1 FAIL non-zero exit status 1 150s nova [W] Using flock in prodstack7-s390x 150s Creating nova instance adt-questing-s390x-git-revise-20250605-210358-juju-7f2275-prod-proposed-migration-environment-2-032f603c-825e-478b-9b20-198558346c01 from image adt/ubuntu-questing-s390x-server-20250605.img (UUID d4380d2b-8b01-41e5-a7a5-52ada3daeeb8)... 150s nova [W] Timed out waiting for 58780dbb-9c56-4f5c-88a2-3a0db65a3dfb to get deleted.