0s autopkgtest [18:39:49]: starting date and time: 2024-03-16 18:39:49+0000 0s autopkgtest [18:39:49]: git checkout: b506e79c ssh-setup/nova: fix ARCH having two lines of data 0s autopkgtest [18:39:49]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.ehag6zz2/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:r-base,src:curl,src:glib2.0,src:libpng1.6,src:libpsl,src:libtirpc,src:libxt,src:openssl,src:orthanc-python,src:readline,src:wp2latex --apt-upgrade r-cran-git2r --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=r-base/4.3.3-2build1 curl/8.5.0-2ubuntu7 glib2.0/2.79.3-3ubuntu5 libpng1.6/1.6.43-3 libpsl/0.21.2-1.1 libtirpc/1.3.4+ds-1.1 libxt/1:1.2.1-1.2 openssl/3.0.13-0ubuntu1 orthanc-python/4.1+ds-2build3 readline/8.2-3.1 wp2latex/4.4~ds-1build1' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@bos03-arm64-23.secgroup --name adt-noble-arm64-r-cran-git2r-20240316-183949-juju-7f2275-prod-proposed-migration-environment-2 --image adt/ubuntu-noble-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-proposed-migration -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 263s autopkgtest [18:44:12]: testbed dpkg architecture: arm64 264s autopkgtest [18:44:13]: testbed apt version: 2.7.12 264s autopkgtest [18:44:13]: @@@@@@@@@@@@@@@@@@@@ test bed setup 264s Get:1 http://ftpmaster.internal/ubuntu noble-proposed InRelease [117 kB] 264s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main Sources [474 kB] 265s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/restricted Sources [6540 B] 265s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/multiverse Sources [51.4 kB] 265s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/universe Sources [3682 kB] 265s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 Packages [646 kB] 265s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 c-n-f Metadata [3144 B] 265s Get:8 http://ftpmaster.internal/ubuntu noble-proposed/restricted arm64 Packages [33.6 kB] 265s Get:9 http://ftpmaster.internal/ubuntu noble-proposed/restricted arm64 c-n-f Metadata [116 B] 265s Get:10 http://ftpmaster.internal/ubuntu noble-proposed/universe arm64 Packages [4006 kB] 265s Get:11 http://ftpmaster.internal/ubuntu noble-proposed/universe arm64 c-n-f Metadata [8528 B] 265s Get:12 http://ftpmaster.internal/ubuntu noble-proposed/multiverse arm64 Packages [55.5 kB] 265s Get:13 http://ftpmaster.internal/ubuntu noble-proposed/multiverse arm64 c-n-f Metadata [116 B] 267s Fetched 9084 kB in 2s (4962 kB/s) 267s Reading package lists... 270s Reading package lists... 270s Building dependency tree... 270s Reading state information... 271s Calculating upgrade... 272s The following packages will be REMOVED: 272s libglib2.0-0 libssl3 272s The following NEW packages will be installed: 272s libglib2.0-0t64 libssl3t64 xdg-user-dirs 272s The following packages have been kept back: 272s curl 272s The following packages will be upgraded: 272s gir1.2-glib-2.0 libglib2.0-data libtirpc-common openssl readline-common 272s ubuntu-minimal ubuntu-standard 272s 7 upgraded, 3 newly installed, 2 to remove and 1 not upgraded. 272s Need to get 4613 kB of archives. 272s After this operation, 211 kB of additional disk space will be used. 272s Get:1 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 gir1.2-glib-2.0 arm64 2.79.3-3ubuntu5 [182 kB] 272s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libglib2.0-0t64 arm64 2.79.3-3ubuntu5 [1527 kB] 272s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 openssl arm64 3.0.13-0ubuntu1 [983 kB] 272s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libssl3t64 arm64 3.0.13-0ubuntu1 [1770 kB] 272s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libglib2.0-data all 2.79.3-3ubuntu5 [46.6 kB] 272s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libtirpc-common all 1.3.4+ds-1.1 [8018 B] 272s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 readline-common all 8.2-3.1 [56.4 kB] 272s Get:8 http://ftpmaster.internal/ubuntu noble/main arm64 ubuntu-minimal arm64 1.536 [10.7 kB] 272s Get:9 http://ftpmaster.internal/ubuntu noble/main arm64 xdg-user-dirs arm64 0.18-1 [18.1 kB] 272s Get:10 http://ftpmaster.internal/ubuntu noble/main arm64 ubuntu-standard arm64 1.536 [10.7 kB] 273s Fetched 4613 kB in 1s (6668 kB/s) 273s (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 ... 74758 files and directories currently installed.) 273s Preparing to unpack .../gir1.2-glib-2.0_2.79.3-3ubuntu5_arm64.deb ... 273s Unpacking gir1.2-glib-2.0:arm64 (2.79.3-3ubuntu5) over (2.79.2-1~ubuntu1) ... 273s dpkg: libglib2.0-0:arm64: dependency problems, but removing anyway as you requested: 273s udisks2 depends on libglib2.0-0 (>= 2.77.0). 273s shared-mime-info depends on libglib2.0-0 (>= 2.75.3). 273s python3-gi depends on libglib2.0-0 (>= 2.77.0). 273s python3-dbus depends on libglib2.0-0 (>= 2.16.0). 273s netplan.io depends on libglib2.0-0 (>= 2.70.0). 273s netplan-generator depends on libglib2.0-0 (>= 2.70.0). 273s libxmlb2:arm64 depends on libglib2.0-0 (>= 2.54.0). 273s libvolume-key1:arm64 depends on libglib2.0-0 (>= 2.18.0). 273s libudisks2-0:arm64 depends on libglib2.0-0 (>= 2.75.3). 273s libqrtr-glib0:arm64 depends on libglib2.0-0 (>= 2.56). 273s libqmi-proxy depends on libglib2.0-0 (>= 2.30.0). 273s libqmi-glib5:arm64 depends on libglib2.0-0 (>= 2.54.0). 273s libpolkit-gobject-1-0:arm64 depends on libglib2.0-0 (>= 2.38.0). 273s libpolkit-agent-1-0:arm64 depends on libglib2.0-0 (>= 2.38.0). 273s libnetplan0:arm64 depends on libglib2.0-0 (>= 2.75.3). 273s libmm-glib0:arm64 depends on libglib2.0-0 (>= 2.62.0). 273s libmbim-proxy depends on libglib2.0-0 (>= 2.56). 273s libmbim-glib4:arm64 depends on libglib2.0-0 (>= 2.56). 273s libjson-glib-1.0-0:arm64 depends on libglib2.0-0 (>= 2.75.3). 273s libjcat1:arm64 depends on libglib2.0-0 (>= 2.75.3). 273s libgusb2:arm64 depends on libglib2.0-0 (>= 2.75.3). 273s libgudev-1.0-0:arm64 depends on libglib2.0-0 (>= 2.38.0). 273s libgirepository-1.0-1:arm64 depends on libglib2.0-0 (>= 2.79.0). 273s libfwupd2:arm64 depends on libglib2.0-0 (>= 2.79.0). 273s libblockdev3:arm64 depends on libglib2.0-0 (>= 2.42.2). 273s libblockdev-utils3:arm64 depends on libglib2.0-0 (>= 2.75.3). 273s libblockdev-swap3:arm64 depends on libglib2.0-0 (>= 2.42.2). 273s libblockdev-part3:arm64 depends on libglib2.0-0 (>= 2.42.2). 273s libblockdev-nvme3:arm64 depends on libglib2.0-0 (>= 2.42.2). 273s libblockdev-mdraid3:arm64 depends on libglib2.0-0 (>= 2.42.2). 273s libblockdev-loop3:arm64 depends on libglib2.0-0 (>= 2.42.2). 273s libblockdev-fs3:arm64 depends on libglib2.0-0 (>= 2.42.2). 273s libblockdev-crypto3:arm64 depends on libglib2.0-0 (>= 2.42.2). 273s fwupd depends on libglib2.0-0 (>= 2.79.0). 273s bolt depends on libglib2.0-0 (>= 2.56.0). 273s 273s (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 ... 74758 files and directories currently installed.) 273s Removing libglib2.0-0:arm64 (2.79.2-1~ubuntu1) ... 273s Selecting previously unselected package libglib2.0-0t64:arm64. 274s (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 ... 74733 files and directories currently installed.) 274s Preparing to unpack .../libglib2.0-0t64_2.79.3-3ubuntu5_arm64.deb ... 274s libglib2.0-0t64.preinst: Removing /var/lib/dpkg/info/libglib2.0-0:arm64.postrm to avoid loss of /usr/share/glib-2.0/schemas/gschemas.compiled... 274s removed '/var/lib/dpkg/info/libglib2.0-0:arm64.postrm' 274s Unpacking libglib2.0-0t64:arm64 (2.79.3-3ubuntu5) ... 274s Preparing to unpack .../openssl_3.0.13-0ubuntu1_arm64.deb ... 274s Unpacking openssl (3.0.13-0ubuntu1) over (3.0.10-1ubuntu4) ... 274s dpkg: libssl3:arm64: dependency problems, but removing anyway as you requested: 274s wget depends on libssl3 (>= 3.0.0). 274s u-boot-tools depends on libssl3 (>= 3.0.0). 274s tnftp depends on libssl3 (>= 3.0.0). 274s tcpdump depends on libssl3 (>= 3.0.0). 274s systemd-resolved depends on libssl3 (>= 3.0.0). 274s systemd depends on libssl3 (>= 3.0.0). 274s sudo depends on libssl3 (>= 3.0.0). 274s sbsigntool depends on libssl3 (>= 3.0.0). 274s rsync depends on libssl3 (>= 3.0.0). 274s python3-cryptography depends on libssl3 (>= 3.0.0). 274s openssh-server depends on libssl3 (>= 3.0.10). 274s openssh-client depends on libssl3 (>= 3.0.10). 274s mtd-utils depends on libssl3 (>= 3.0.0). 274s mokutil depends on libssl3 (>= 3.0.0). 274s linux-headers-6.8.0-11-generic depends on libssl3 (>= 3.0.0). 274s libsystemd-shared:arm64 depends on libssl3 (>= 3.0.0). 274s libssh-4:arm64 depends on libssl3 (>= 3.0.0). 274s libsasl2-modules:arm64 depends on libssl3 (>= 3.0.0). 274s libsasl2-2:arm64 depends on libssl3 (>= 3.0.0). 274s libpython3.12-minimal:arm64 depends on libssl3 (>= 3.0.0). 274s libnvme1 depends on libssl3 (>= 3.0.0). 274s libkrb5-3:arm64 depends on libssl3 (>= 3.0.0). 274s libkmod2:arm64 depends on libssl3 (>= 3.0.0). 274s libfido2-1:arm64 depends on libssl3 (>= 3.0.0). 274s libcurl4:arm64 depends on libssl3 (>= 3.0.0). 274s libcryptsetup12:arm64 depends on libssl3 (>= 3.0.0). 274s kmod depends on libssl3 (>= 3.0.0). 274s dhcpcd-base depends on libssl3 (>= 3.0.0). 274s bind9-libs:arm64 depends on libssl3 (>= 3.0.0). 274s 274s (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 ... 74758 files and directories currently installed.) 274s Removing libssl3:arm64 (3.0.10-1ubuntu4) ... 274s Selecting previously unselected package libssl3t64:arm64. 274s (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 ... 74747 files and directories currently installed.) 274s Preparing to unpack .../0-libssl3t64_3.0.13-0ubuntu1_arm64.deb ... 274s Unpacking libssl3t64:arm64 (3.0.13-0ubuntu1) ... 274s Preparing to unpack .../1-libglib2.0-data_2.79.3-3ubuntu5_all.deb ... 274s Unpacking libglib2.0-data (2.79.3-3ubuntu5) over (2.79.2-1~ubuntu1) ... 274s Preparing to unpack .../2-libtirpc-common_1.3.4+ds-1.1_all.deb ... 274s Unpacking libtirpc-common (1.3.4+ds-1.1) over (1.3.4+ds-1build1) ... 274s Preparing to unpack .../3-readline-common_8.2-3.1_all.deb ... 274s Unpacking readline-common (8.2-3.1) over (8.2-3) ... 274s Preparing to unpack .../4-ubuntu-minimal_1.536_arm64.deb ... 274s Unpacking ubuntu-minimal (1.536) over (1.535) ... 274s Selecting previously unselected package xdg-user-dirs. 274s Preparing to unpack .../5-xdg-user-dirs_0.18-1_arm64.deb ... 274s Unpacking xdg-user-dirs (0.18-1) ... 274s Preparing to unpack .../6-ubuntu-standard_1.536_arm64.deb ... 274s Unpacking ubuntu-standard (1.536) over (1.535) ... 274s Setting up ubuntu-minimal (1.536) ... 274s Setting up xdg-user-dirs (0.18-1) ... 274s Setting up libssl3t64:arm64 (3.0.13-0ubuntu1) ... 274s Setting up libtirpc-common (1.3.4+ds-1.1) ... 274s Setting up ubuntu-standard (1.536) ... 274s Setting up libglib2.0-0t64:arm64 (2.79.3-3ubuntu5) ... 274s No schema files found: doing nothing. 274s Setting up libglib2.0-data (2.79.3-3ubuntu5) ... 274s Setting up gir1.2-glib-2.0:arm64 (2.79.3-3ubuntu5) ... 274s Setting up openssl (3.0.13-0ubuntu1) ... 274s Setting up readline-common (8.2-3.1) ... 274s Processing triggers for man-db (2.12.0-3) ... 275s Processing triggers for install-info (7.1-3) ... 275s Processing triggers for libc-bin (2.39-0ubuntu2) ... 276s Reading package lists... 276s Building dependency tree... 276s Reading state information... 277s 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 278s Hit:1 http://ftpmaster.internal/ubuntu noble InRelease 278s Hit:2 http://ftpmaster.internal/ubuntu noble-updates InRelease 278s Hit:3 http://ftpmaster.internal/ubuntu noble-security InRelease 278s Hit:4 http://ftpmaster.internal/ubuntu noble-proposed InRelease 280s Reading package lists... 280s Reading package lists... 280s Building dependency tree... 280s Reading state information... 281s Calculating upgrade... 282s The following packages have been kept back: 282s curl 282s 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 282s Reading package lists... 282s Building dependency tree... 282s Reading state information... 283s 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 286s autopkgtest [18:44:35]: testbed running kernel: Linux 6.8.0-11-generic #11-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 14 02:53:31 UTC 2024 286s autopkgtest [18:44:35]: @@@@@@@@@@@@@@@@@@@@ apt-source r-cran-git2r 288s Get:1 http://ftpmaster.internal/ubuntu noble/universe r-cran-git2r 0.33.0+dfsg-1 (dsc) [2136 B] 288s Get:2 http://ftpmaster.internal/ubuntu noble/universe r-cran-git2r 0.33.0+dfsg-1 (tar) [217 kB] 288s Get:3 http://ftpmaster.internal/ubuntu noble/universe r-cran-git2r 0.33.0+dfsg-1 (diff) [2984 B] 289s gpgv: Signature made Mon Jan 8 17:56:55 2024 UTC 289s gpgv: using RSA key F1F007320A035541F0A663CA578A0494D1C646D1 289s gpgv: issuer "tille@debian.org" 289s gpgv: Can't check signature: No public key 289s dpkg-source: warning: cannot verify inline signature for ./r-cran-git2r_0.33.0+dfsg-1.dsc: no acceptable signature found 289s autopkgtest [18:44:38]: testing package r-cran-git2r version 0.33.0+dfsg-1 290s autopkgtest [18:44:39]: build not needed 291s autopkgtest [18:44:40]: test run-unit-test: preparing testbed 292s Reading package lists... 292s Building dependency tree... 292s Reading state information... 293s Starting pkgProblemResolver with broken count: 0 294s Starting 2 pkgProblemResolver with broken count: 0 294s Done 294s The following additional packages will be installed: 294s curl fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono 294s libblas3 libcairo2 libcurl4t64 libdatrie1 libdeflate0 libfontconfig1 294s libgfortran5 libgit2-1.7 libgomp1 libgraphite2-3 libharfbuzz0b 294s libhttp-parser2.9 libice6 libjbig0 libjpeg-turbo8 libjpeg8 liblapack3 294s liblerc4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils 294s libpaper1 libpixman-1-0 libpng16-16t64 libpsl5t64 libreadline8t64 294s libsharpyuv0 libsm6 libssh2-1 libtcl8.6 libthai-data libthai0 libtiff6 294s libtirpc3t64 libtk8.6 libwebp7 libxcb-render0 libxcb-shm0 libxft2 294s libxrender1 libxss1 libxt6t64 r-base-core r-cran-git2r unzip x11-common 294s xdg-utils zip 294s Suggested packages: 294s tcl8.6 tk8.6 elpa-ess r-doc-info | r-doc-pdf r-mathlib r-base-html 294s Recommended packages: 294s r-recommended r-base-dev r-doc-html libfile-mimeinfo-perl libnet-dbus-perl 294s libx11-protocol-perl x11-utils x11-xserver-utils 295s The following packages will be REMOVED: 295s libcurl4 libpng16-16 libpsl5 libreadline8 libtirpc3 295s The following NEW packages will be installed: 295s autopkgtest-satdep fontconfig fontconfig-config fonts-dejavu-core 295s fonts-dejavu-mono libblas3 libcairo2 libcurl4t64 libdatrie1 libdeflate0 295s libfontconfig1 libgfortran5 libgit2-1.7 libgomp1 libgraphite2-3 295s libharfbuzz0b libhttp-parser2.9 libice6 libjbig0 libjpeg-turbo8 libjpeg8 295s liblapack3 liblerc4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 295s libpaper-utils libpaper1 libpixman-1-0 libpng16-16t64 libpsl5t64 295s libreadline8t64 libsharpyuv0 libsm6 libssh2-1 libtcl8.6 libthai-data 295s libthai0 libtiff6 libtirpc3t64 libtk8.6 libwebp7 libxcb-render0 libxcb-shm0 295s libxft2 libxrender1 libxss1 libxt6t64 r-base-core r-cran-git2r unzip 295s x11-common xdg-utils zip 295s The following packages will be upgraded: 295s curl 295s 1 upgraded, 54 newly installed, 5 to remove and 0 not upgraded. 295s Need to get 38.8 MB/38.8 MB of archives. 295s After this operation, 78.0 MB of additional disk space will be used. 295s Get:1 /tmp/autopkgtest.PKiqgp/1-autopkgtest-satdep.deb autopkgtest-satdep arm64 0 [708 B] 295s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libpsl5t64 arm64 0.21.2-1.1 [57.4 kB] 295s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 curl arm64 8.5.0-2ubuntu7 [222 kB] 295s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libcurl4t64 arm64 8.5.0-2ubuntu7 [332 kB] 295s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libpng16-16t64 arm64 1.6.43-3 [185 kB] 295s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libreadline8t64 arm64 8.2-3.1 [153 kB] 295s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libtirpc3t64 arm64 1.3.4+ds-1.1 [83.5 kB] 296s Get:8 http://ftpmaster.internal/ubuntu noble/main arm64 fonts-dejavu-mono all 2.37-8 [502 kB] 296s Get:9 http://ftpmaster.internal/ubuntu noble/main arm64 fonts-dejavu-core all 2.37-8 [835 kB] 296s Get:10 http://ftpmaster.internal/ubuntu noble/main arm64 fontconfig-config arm64 2.15.0-1ubuntu1 [37.0 kB] 296s Get:11 http://ftpmaster.internal/ubuntu noble/main arm64 libfontconfig1 arm64 2.15.0-1ubuntu1 [142 kB] 296s Get:12 http://ftpmaster.internal/ubuntu noble/main arm64 fontconfig arm64 2.15.0-1ubuntu1 [190 kB] 296s Get:13 http://ftpmaster.internal/ubuntu noble/main arm64 libblas3 arm64 3.12.0-3 [143 kB] 296s Get:14 http://ftpmaster.internal/ubuntu noble/main arm64 libpixman-1-0 arm64 0.42.2-1 [193 kB] 296s Get:15 http://ftpmaster.internal/ubuntu noble/main arm64 libxcb-render0 arm64 1.15-1 [16.1 kB] 296s Get:16 http://ftpmaster.internal/ubuntu noble/main arm64 libxcb-shm0 arm64 1.15-1 [5780 B] 296s Get:17 http://ftpmaster.internal/ubuntu noble/main arm64 libxrender1 arm64 1:0.9.10-1.1 [19.1 kB] 296s Get:18 http://ftpmaster.internal/ubuntu noble/main arm64 libcairo2 arm64 1.18.0-1 [550 kB] 296s Get:19 http://ftpmaster.internal/ubuntu noble/main arm64 libdatrie1 arm64 0.2.13-3 [21.7 kB] 296s Get:20 http://ftpmaster.internal/ubuntu noble/main arm64 libdeflate0 arm64 1.19-1 [43.4 kB] 296s Get:21 http://ftpmaster.internal/ubuntu noble/main arm64 libgfortran5 arm64 14-20240303-1ubuntu1 [444 kB] 296s Get:22 http://ftpmaster.internal/ubuntu noble/main arm64 libhttp-parser2.9 arm64 2.9.4-6 [21.4 kB] 296s Get:23 http://ftpmaster.internal/ubuntu noble/main arm64 libssh2-1 arm64 1.11.0-4 [140 kB] 296s Get:24 http://ftpmaster.internal/ubuntu noble/main arm64 libgit2-1.7 arm64 1.7.2+ds-1ubuntu1 [527 kB] 296s Get:25 http://ftpmaster.internal/ubuntu noble/main arm64 libgomp1 arm64 14-20240303-1ubuntu1 [144 kB] 296s Get:26 http://ftpmaster.internal/ubuntu noble/main arm64 libgraphite2-3 arm64 1.3.14-2 [81.5 kB] 296s Get:27 http://ftpmaster.internal/ubuntu noble/main arm64 libharfbuzz0b arm64 8.3.0-2 [463 kB] 296s Get:28 http://ftpmaster.internal/ubuntu noble/main arm64 x11-common all 1:7.7+23ubuntu2 [23.4 kB] 296s Get:29 http://ftpmaster.internal/ubuntu noble/main arm64 libice6 arm64 2:1.0.10-1build2 [41.7 kB] 296s Get:30 http://ftpmaster.internal/ubuntu noble/main arm64 libjpeg-turbo8 arm64 2.1.5-2ubuntu1 [160 kB] 296s Get:31 http://ftpmaster.internal/ubuntu noble/main arm64 libjpeg8 arm64 8c-2ubuntu11 [2148 B] 296s Get:32 http://ftpmaster.internal/ubuntu noble/main arm64 liblapack3 arm64 3.12.0-3 [2241 kB] 296s Get:33 http://ftpmaster.internal/ubuntu noble/main arm64 liblerc4 arm64 4.0.0+ds-4ubuntu1 [153 kB] 296s Get:34 http://ftpmaster.internal/ubuntu noble/main arm64 libthai-data all 0.1.29-2 [158 kB] 296s Get:35 http://ftpmaster.internal/ubuntu noble/main arm64 libthai0 arm64 0.1.29-2 [18.1 kB] 296s Get:36 http://ftpmaster.internal/ubuntu noble/main arm64 libpango-1.0-0 arm64 1.51.0+ds-4 [226 kB] 296s Get:37 http://ftpmaster.internal/ubuntu noble/main arm64 libpangoft2-1.0-0 arm64 1.51.0+ds-4 [41.2 kB] 296s Get:38 http://ftpmaster.internal/ubuntu noble/main arm64 libpangocairo-1.0-0 arm64 1.51.0+ds-4 [27.6 kB] 296s Get:39 http://ftpmaster.internal/ubuntu noble/main arm64 libpaper1 arm64 1.1.29 [13.1 kB] 296s Get:40 http://ftpmaster.internal/ubuntu noble/main arm64 libpaper-utils arm64 1.1.29 [8480 B] 296s Get:41 http://ftpmaster.internal/ubuntu noble/main arm64 libsharpyuv0 arm64 1.3.2-0.4 [14.4 kB] 296s Get:42 http://ftpmaster.internal/ubuntu noble/main arm64 libsm6 arm64 2:1.2.3-1build2 [16.1 kB] 296s Get:43 http://ftpmaster.internal/ubuntu noble/main arm64 libtcl8.6 arm64 8.6.13+dfsg-2 [980 kB] 296s Get:44 http://ftpmaster.internal/ubuntu noble/main arm64 libjbig0 arm64 2.1-6.1ubuntu1 [28.9 kB] 296s Get:45 http://ftpmaster.internal/ubuntu noble/main arm64 libwebp7 arm64 1.3.2-0.4 [191 kB] 296s Get:46 http://ftpmaster.internal/ubuntu noble/main arm64 libtiff6 arm64 4.5.1+git230720-3ubuntu1 [226 kB] 296s Get:47 http://ftpmaster.internal/ubuntu noble/main arm64 libxft2 arm64 2.3.6-1 [43.3 kB] 296s Get:48 http://ftpmaster.internal/ubuntu noble/main arm64 libxss1 arm64 1:1.2.3-1build2 [8252 B] 296s Get:49 http://ftpmaster.internal/ubuntu noble/main arm64 libtk8.6 arm64 8.6.13-2 [760 kB] 296s Get:50 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libxt6t64 arm64 1:1.2.1-1.2 [168 kB] 296s Get:51 http://ftpmaster.internal/ubuntu noble/main arm64 zip arm64 3.0-13 [172 kB] 296s Get:52 http://ftpmaster.internal/ubuntu noble/main arm64 unzip arm64 6.0-28ubuntu3 [171 kB] 296s Get:53 http://ftpmaster.internal/ubuntu noble/main arm64 xdg-utils all 1.1.3-4.1ubuntu3 [62.0 kB] 296s Get:54 http://ftpmaster.internal/ubuntu noble-proposed/universe arm64 r-base-core arm64 4.3.3-2build1 [26.8 MB] 297s Get:55 http://ftpmaster.internal/ubuntu noble/universe arm64 r-cran-git2r arm64 0.33.0+dfsg-1 [437 kB] 297s Preconfiguring packages ... 298s Fetched 38.8 MB in 2s (20.2 MB/s) 298s dpkg: libpsl5:arm64: dependency problems, but removing anyway as you requested: 298s wget depends on libpsl5 (>= 0.16.0). 298s libcurl4:arm64 depends on libpsl5 (>= 0.16.0). 298s libcurl3-gnutls:arm64 depends on libpsl5 (>= 0.16.0). 298s 298s (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 ... 74774 files and directories currently installed.) 298s Removing libpsl5:arm64 (0.21.2-1build1) ... 298s Selecting previously unselected package libpsl5t64:arm64. 298s (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 ... 74769 files and directories currently installed.) 298s Preparing to unpack .../libpsl5t64_0.21.2-1.1_arm64.deb ... 298s Unpacking libpsl5t64:arm64 (0.21.2-1.1) ... 298s Preparing to unpack .../curl_8.5.0-2ubuntu7_arm64.deb ... 298s Unpacking curl (8.5.0-2ubuntu7) over (8.5.0-2ubuntu2) ... 298s (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 ... 74775 files and directories currently installed.) 298s Removing libcurl4:arm64 (8.5.0-2ubuntu2) ... 298s Selecting previously unselected package libcurl4t64:arm64. 298s (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 ... 74770 files and directories currently installed.) 298s Preparing to unpack .../libcurl4t64_8.5.0-2ubuntu7_arm64.deb ... 298s Unpacking libcurl4t64:arm64 (8.5.0-2ubuntu7) ... 298s dpkg: libpng16-16:arm64: dependency problems, but removing anyway as you requested: 298s libplymouth5:arm64 depends on libpng16-16 (>= 1.6.2). 298s libfreetype6:arm64 depends on libpng16-16 (>= 1.6.2-1). 298s 298s (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 ... 74776 files and directories currently installed.) 298s Removing libpng16-16:arm64 (1.6.43-1) ... 298s Selecting previously unselected package libpng16-16t64:arm64. 298s (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 ... 74766 files and directories currently installed.) 298s Preparing to unpack .../libpng16-16t64_1.6.43-3_arm64.deb ... 298s Unpacking libpng16-16t64:arm64 (1.6.43-3) ... 298s dpkg: libreadline8:arm64: dependency problems, but removing anyway as you requested: 298s parted depends on libreadline8 (>= 6.0). 298s libpython3.12-stdlib:arm64 depends on libreadline8 (>= 7.0~beta). 298s gpgsm depends on libreadline8 (>= 6.0). 298s gpgconf depends on libreadline8 (>= 6.0). 298s gpg depends on libreadline8 (>= 6.0). 298s gawk depends on libreadline8 (>= 6.0). 298s fdisk depends on libreadline8 (>= 6.0). 298s 298s (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 ... 74777 files and directories currently installed.) 298s Removing libreadline8:arm64 (8.2-3) ... 298s Selecting previously unselected package libreadline8t64:arm64. 298s (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 ... 74765 files and directories currently installed.) 298s Preparing to unpack .../libreadline8t64_8.2-3.1_arm64.deb ... 298s Adding 'diversion of /lib/aarch64-linux-gnu/libhistory.so.8 to /lib/aarch64-linux-gnu/libhistory.so.8.usr-is-merged by libreadline8t64' 298s Adding 'diversion of /lib/aarch64-linux-gnu/libhistory.so.8.2 to /lib/aarch64-linux-gnu/libhistory.so.8.2.usr-is-merged by libreadline8t64' 298s Adding 'diversion of /lib/aarch64-linux-gnu/libreadline.so.8 to /lib/aarch64-linux-gnu/libreadline.so.8.usr-is-merged by libreadline8t64' 298s Adding 'diversion of /lib/aarch64-linux-gnu/libreadline.so.8.2 to /lib/aarch64-linux-gnu/libreadline.so.8.2.usr-is-merged by libreadline8t64' 298s Unpacking libreadline8t64:arm64 (8.2-3.1) ... 299s dpkg: libtirpc3:arm64: dependency problems, but removing anyway as you requested: 299s lsof depends on libtirpc3 (>= 1.0.2). 299s libpython3.12-stdlib:arm64 depends on libtirpc3 (>= 1.0.2). 299s libnss-nisplus:arm64 depends on libtirpc3 (>= 1.0.2). 299s libnsl2:arm64 depends on libtirpc3 (>= 1.0.2). 299s iproute2 depends on libtirpc3 (>= 1.0.2). 299s 299s (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 ... 74785 files and directories currently installed.) 299s Removing libtirpc3:arm64 (1.3.4+ds-1build1) ... 299s Selecting previously unselected package libtirpc3t64:arm64. 299s (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 ... 74779 files and directories currently installed.) 299s Preparing to unpack .../00-libtirpc3t64_1.3.4+ds-1.1_arm64.deb ... 299s Adding 'diversion of /lib/aarch64-linux-gnu/libtirpc.so.3 to /lib/aarch64-linux-gnu/libtirpc.so.3.usr-is-merged by libtirpc3t64' 299s Adding 'diversion of /lib/aarch64-linux-gnu/libtirpc.so.3.0.0 to /lib/aarch64-linux-gnu/libtirpc.so.3.0.0.usr-is-merged by libtirpc3t64' 299s Unpacking libtirpc3t64:arm64 (1.3.4+ds-1.1) ... 299s Selecting previously unselected package fonts-dejavu-mono. 299s Preparing to unpack .../01-fonts-dejavu-mono_2.37-8_all.deb ... 299s Unpacking fonts-dejavu-mono (2.37-8) ... 299s Selecting previously unselected package fonts-dejavu-core. 299s Preparing to unpack .../02-fonts-dejavu-core_2.37-8_all.deb ... 299s Unpacking fonts-dejavu-core (2.37-8) ... 299s Selecting previously unselected package fontconfig-config. 299s Preparing to unpack .../03-fontconfig-config_2.15.0-1ubuntu1_arm64.deb ... 299s Unpacking fontconfig-config (2.15.0-1ubuntu1) ... 299s Selecting previously unselected package libfontconfig1:arm64. 299s Preparing to unpack .../04-libfontconfig1_2.15.0-1ubuntu1_arm64.deb ... 299s Unpacking libfontconfig1:arm64 (2.15.0-1ubuntu1) ... 299s Selecting previously unselected package fontconfig. 299s Preparing to unpack .../05-fontconfig_2.15.0-1ubuntu1_arm64.deb ... 299s Unpacking fontconfig (2.15.0-1ubuntu1) ... 299s Selecting previously unselected package libblas3:arm64. 299s Preparing to unpack .../06-libblas3_3.12.0-3_arm64.deb ... 299s Unpacking libblas3:arm64 (3.12.0-3) ... 299s Selecting previously unselected package libpixman-1-0:arm64. 299s Preparing to unpack .../07-libpixman-1-0_0.42.2-1_arm64.deb ... 299s Unpacking libpixman-1-0:arm64 (0.42.2-1) ... 299s Selecting previously unselected package libxcb-render0:arm64. 299s Preparing to unpack .../08-libxcb-render0_1.15-1_arm64.deb ... 299s Unpacking libxcb-render0:arm64 (1.15-1) ... 299s Selecting previously unselected package libxcb-shm0:arm64. 299s Preparing to unpack .../09-libxcb-shm0_1.15-1_arm64.deb ... 299s Unpacking libxcb-shm0:arm64 (1.15-1) ... 300s Selecting previously unselected package libxrender1:arm64. 300s Preparing to unpack .../10-libxrender1_1%3a0.9.10-1.1_arm64.deb ... 300s Unpacking libxrender1:arm64 (1:0.9.10-1.1) ... 300s Selecting previously unselected package libcairo2:arm64. 300s Preparing to unpack .../11-libcairo2_1.18.0-1_arm64.deb ... 300s Unpacking libcairo2:arm64 (1.18.0-1) ... 300s Selecting previously unselected package libdatrie1:arm64. 300s Preparing to unpack .../12-libdatrie1_0.2.13-3_arm64.deb ... 300s Unpacking libdatrie1:arm64 (0.2.13-3) ... 300s Selecting previously unselected package libdeflate0:arm64. 300s Preparing to unpack .../13-libdeflate0_1.19-1_arm64.deb ... 300s Unpacking libdeflate0:arm64 (1.19-1) ... 300s Selecting previously unselected package libgfortran5:arm64. 300s Preparing to unpack .../14-libgfortran5_14-20240303-1ubuntu1_arm64.deb ... 300s Unpacking libgfortran5:arm64 (14-20240303-1ubuntu1) ... 300s Selecting previously unselected package libhttp-parser2.9:arm64. 300s Preparing to unpack .../15-libhttp-parser2.9_2.9.4-6_arm64.deb ... 300s Unpacking libhttp-parser2.9:arm64 (2.9.4-6) ... 300s Selecting previously unselected package libssh2-1:arm64. 300s Preparing to unpack .../16-libssh2-1_1.11.0-4_arm64.deb ... 300s Unpacking libssh2-1:arm64 (1.11.0-4) ... 300s Selecting previously unselected package libgit2-1.7:arm64. 300s Preparing to unpack .../17-libgit2-1.7_1.7.2+ds-1ubuntu1_arm64.deb ... 300s Unpacking libgit2-1.7:arm64 (1.7.2+ds-1ubuntu1) ... 300s Selecting previously unselected package libgomp1:arm64. 300s Preparing to unpack .../18-libgomp1_14-20240303-1ubuntu1_arm64.deb ... 300s Unpacking libgomp1:arm64 (14-20240303-1ubuntu1) ... 300s Selecting previously unselected package libgraphite2-3:arm64. 300s Preparing to unpack .../19-libgraphite2-3_1.3.14-2_arm64.deb ... 300s Unpacking libgraphite2-3:arm64 (1.3.14-2) ... 300s Selecting previously unselected package libharfbuzz0b:arm64. 300s Preparing to unpack .../20-libharfbuzz0b_8.3.0-2_arm64.deb ... 300s Unpacking libharfbuzz0b:arm64 (8.3.0-2) ... 300s Selecting previously unselected package x11-common. 300s Preparing to unpack .../21-x11-common_1%3a7.7+23ubuntu2_all.deb ... 300s Unpacking x11-common (1:7.7+23ubuntu2) ... 300s Selecting previously unselected package libice6:arm64. 300s Preparing to unpack .../22-libice6_2%3a1.0.10-1build2_arm64.deb ... 300s Unpacking libice6:arm64 (2:1.0.10-1build2) ... 300s Selecting previously unselected package libjpeg-turbo8:arm64. 300s Preparing to unpack .../23-libjpeg-turbo8_2.1.5-2ubuntu1_arm64.deb ... 300s Unpacking libjpeg-turbo8:arm64 (2.1.5-2ubuntu1) ... 300s Selecting previously unselected package libjpeg8:arm64. 300s Preparing to unpack .../24-libjpeg8_8c-2ubuntu11_arm64.deb ... 300s Unpacking libjpeg8:arm64 (8c-2ubuntu11) ... 300s Selecting previously unselected package liblapack3:arm64. 300s Preparing to unpack .../25-liblapack3_3.12.0-3_arm64.deb ... 300s Unpacking liblapack3:arm64 (3.12.0-3) ... 300s Selecting previously unselected package liblerc4:arm64. 300s Preparing to unpack .../26-liblerc4_4.0.0+ds-4ubuntu1_arm64.deb ... 300s Unpacking liblerc4:arm64 (4.0.0+ds-4ubuntu1) ... 300s Selecting previously unselected package libthai-data. 300s Preparing to unpack .../27-libthai-data_0.1.29-2_all.deb ... 300s Unpacking libthai-data (0.1.29-2) ... 300s Selecting previously unselected package libthai0:arm64. 301s Preparing to unpack .../28-libthai0_0.1.29-2_arm64.deb ... 301s Unpacking libthai0:arm64 (0.1.29-2) ... 301s Selecting previously unselected package libpango-1.0-0:arm64. 301s Preparing to unpack .../29-libpango-1.0-0_1.51.0+ds-4_arm64.deb ... 301s Unpacking libpango-1.0-0:arm64 (1.51.0+ds-4) ... 301s Selecting previously unselected package libpangoft2-1.0-0:arm64. 301s Preparing to unpack .../30-libpangoft2-1.0-0_1.51.0+ds-4_arm64.deb ... 301s Unpacking libpangoft2-1.0-0:arm64 (1.51.0+ds-4) ... 301s Selecting previously unselected package libpangocairo-1.0-0:arm64. 301s Preparing to unpack .../31-libpangocairo-1.0-0_1.51.0+ds-4_arm64.deb ... 301s Unpacking libpangocairo-1.0-0:arm64 (1.51.0+ds-4) ... 301s Selecting previously unselected package libpaper1:arm64. 301s Preparing to unpack .../32-libpaper1_1.1.29_arm64.deb ... 301s Unpacking libpaper1:arm64 (1.1.29) ... 301s Selecting previously unselected package libpaper-utils. 301s Preparing to unpack .../33-libpaper-utils_1.1.29_arm64.deb ... 301s Unpacking libpaper-utils (1.1.29) ... 301s Selecting previously unselected package libsharpyuv0:arm64. 301s Preparing to unpack .../34-libsharpyuv0_1.3.2-0.4_arm64.deb ... 301s Unpacking libsharpyuv0:arm64 (1.3.2-0.4) ... 301s Selecting previously unselected package libsm6:arm64. 301s Preparing to unpack .../35-libsm6_2%3a1.2.3-1build2_arm64.deb ... 301s Unpacking libsm6:arm64 (2:1.2.3-1build2) ... 301s Selecting previously unselected package libtcl8.6:arm64. 301s Preparing to unpack .../36-libtcl8.6_8.6.13+dfsg-2_arm64.deb ... 301s Unpacking libtcl8.6:arm64 (8.6.13+dfsg-2) ... 301s Selecting previously unselected package libjbig0:arm64. 301s Preparing to unpack .../37-libjbig0_2.1-6.1ubuntu1_arm64.deb ... 301s Unpacking libjbig0:arm64 (2.1-6.1ubuntu1) ... 301s Selecting previously unselected package libwebp7:arm64. 301s Preparing to unpack .../38-libwebp7_1.3.2-0.4_arm64.deb ... 301s Unpacking libwebp7:arm64 (1.3.2-0.4) ... 301s Selecting previously unselected package libtiff6:arm64. 302s Preparing to unpack .../39-libtiff6_4.5.1+git230720-3ubuntu1_arm64.deb ... 302s Unpacking libtiff6:arm64 (4.5.1+git230720-3ubuntu1) ... 302s Selecting previously unselected package libxft2:arm64. 302s Preparing to unpack .../40-libxft2_2.3.6-1_arm64.deb ... 302s Unpacking libxft2:arm64 (2.3.6-1) ... 302s Selecting previously unselected package libxss1:arm64. 302s Preparing to unpack .../41-libxss1_1%3a1.2.3-1build2_arm64.deb ... 302s Unpacking libxss1:arm64 (1:1.2.3-1build2) ... 302s Selecting previously unselected package libtk8.6:arm64. 302s Preparing to unpack .../42-libtk8.6_8.6.13-2_arm64.deb ... 302s Unpacking libtk8.6:arm64 (8.6.13-2) ... 302s Selecting previously unselected package libxt6t64:arm64. 302s Preparing to unpack .../43-libxt6t64_1%3a1.2.1-1.2_arm64.deb ... 302s Unpacking libxt6t64:arm64 (1:1.2.1-1.2) ... 302s Selecting previously unselected package zip. 302s Preparing to unpack .../44-zip_3.0-13_arm64.deb ... 302s Unpacking zip (3.0-13) ... 302s Selecting previously unselected package unzip. 302s Preparing to unpack .../45-unzip_6.0-28ubuntu3_arm64.deb ... 302s Unpacking unzip (6.0-28ubuntu3) ... 302s Selecting previously unselected package xdg-utils. 302s Preparing to unpack .../46-xdg-utils_1.1.3-4.1ubuntu3_all.deb ... 302s Unpacking xdg-utils (1.1.3-4.1ubuntu3) ... 302s Selecting previously unselected package r-base-core. 302s Preparing to unpack .../47-r-base-core_4.3.3-2build1_arm64.deb ... 302s Unpacking r-base-core (4.3.3-2build1) ... 302s Selecting previously unselected package r-cran-git2r. 303s Preparing to unpack .../48-r-cran-git2r_0.33.0+dfsg-1_arm64.deb ... 303s Unpacking r-cran-git2r (0.33.0+dfsg-1) ... 303s Selecting previously unselected package autopkgtest-satdep. 303s Preparing to unpack .../49-1-autopkgtest-satdep.deb ... 303s Unpacking autopkgtest-satdep (0) ... 303s Setting up libgraphite2-3:arm64 (1.3.14-2) ... 303s Setting up libpixman-1-0:arm64 (0.42.2-1) ... 303s Setting up libsharpyuv0:arm64 (1.3.2-0.4) ... 303s Setting up libpaper1:arm64 (1.1.29) ... 303s 303s Creating config file /etc/papersize with new version 303s Setting up liblerc4:arm64 (4.0.0+ds-4ubuntu1) ... 303s Setting up libxrender1:arm64 (1:0.9.10-1.1) ... 303s Setting up libdatrie1:arm64 (0.2.13-3) ... 303s Setting up libtirpc3t64:arm64 (1.3.4+ds-1.1) ... 303s Setting up libxcb-render0:arm64 (1.15-1) ... 303s Setting up unzip (6.0-28ubuntu3) ... 303s Setting up x11-common (1:7.7+23ubuntu2) ... 304s Setting up libpsl5t64:arm64 (0.21.2-1.1) ... 304s Setting up libdeflate0:arm64 (1.19-1) ... 304s Setting up libxcb-shm0:arm64 (1.15-1) ... 304s Setting up libpaper-utils (1.1.29) ... 304s Setting up libgomp1:arm64 (14-20240303-1ubuntu1) ... 304s Setting up libjbig0:arm64 (2.1-6.1ubuntu1) ... 304s Setting up zip (3.0-13) ... 304s Setting up libblas3:arm64 (3.12.0-3) ... 304s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/aarch64-linux-gnu/libblas.so.3 (libblas.so.3-aarch64-linux-gnu) in auto mode 304s Setting up fonts-dejavu-mono (2.37-8) ... 304s Setting up libpng16-16t64:arm64 (1.6.43-3) ... 304s Setting up libtcl8.6:arm64 (8.6.13+dfsg-2) ... 304s Setting up fonts-dejavu-core (2.37-8) ... 304s Setting up libjpeg-turbo8:arm64 (2.1.5-2ubuntu1) ... 304s Setting up libgfortran5:arm64 (14-20240303-1ubuntu1) ... 304s Setting up libwebp7:arm64 (1.3.2-0.4) ... 304s Setting up libreadline8t64:arm64 (8.2-3.1) ... 304s Setting up libharfbuzz0b:arm64 (8.3.0-2) ... 304s Setting up libthai-data (0.1.29-2) ... 304s Setting up libssh2-1:arm64 (1.11.0-4) ... 304s Setting up libxss1:arm64 (1:1.2.3-1build2) ... 304s Setting up xdg-utils (1.1.3-4.1ubuntu3) ... 304s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 304s Setting up libhttp-parser2.9:arm64 (2.9.4-6) ... 304s Setting up libjpeg8:arm64 (8c-2ubuntu11) ... 304s Setting up libice6:arm64 (2:1.0.10-1build2) ... 304s Setting up liblapack3:arm64 (3.12.0-3) ... 304s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/aarch64-linux-gnu/liblapack.so.3 (liblapack.so.3-aarch64-linux-gnu) in auto mode 304s Setting up libcurl4t64:arm64 (8.5.0-2ubuntu7) ... 304s Setting up fontconfig-config (2.15.0-1ubuntu1) ... 305s Setting up libthai0:arm64 (0.1.29-2) ... 305s Setting up libtiff6:arm64 (4.5.1+git230720-3ubuntu1) ... 305s Setting up libgit2-1.7:arm64 (1.7.2+ds-1ubuntu1) ... 305s Setting up curl (8.5.0-2ubuntu7) ... 305s Setting up libfontconfig1:arm64 (2.15.0-1ubuntu1) ... 305s Setting up libsm6:arm64 (2:1.2.3-1build2) ... 305s Setting up fontconfig (2.15.0-1ubuntu1) ... 307s Regenerating fonts cache... done. 307s Setting up libxft2:arm64 (2.3.6-1) ... 307s Setting up libtk8.6:arm64 (8.6.13-2) ... 307s Setting up libpango-1.0-0:arm64 (1.51.0+ds-4) ... 307s Setting up libcairo2:arm64 (1.18.0-1) ... 307s Setting up libxt6t64:arm64 (1:1.2.1-1.2) ... 307s Setting up libpangoft2-1.0-0:arm64 (1.51.0+ds-4) ... 307s Setting up libpangocairo-1.0-0:arm64 (1.51.0+ds-4) ... 307s Setting up r-base-core (4.3.3-2build1) ... 307s 307s Creating config file /etc/R/Renviron with new version 307s Setting up r-cran-git2r (0.33.0+dfsg-1) ... 307s Setting up autopkgtest-satdep (0) ... 307s Processing triggers for man-db (2.12.0-3) ... 308s Processing triggers for install-info (7.1-3) ... 308s Processing triggers for libc-bin (2.39-0ubuntu2) ... 313s (Reading database ... 76885 files and directories currently installed.) 313s Removing autopkgtest-satdep (0) ... 314s autopkgtest [18:45:03]: test run-unit-test: [----------------------- 314s BEGIN TEST add-force.R 314s 314s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 314s Copyright (C) 2024 The R Foundation for Statistical Computing 314s Platform: aarch64-unknown-linux-gnu (64-bit) 314s 314s R is free software and comes with ABSOLUTELY NO WARRANTY. 314s You are welcome to redistribute it under certain conditions. 314s Type 'license()' or 'licence()' for distribution details. 314s 314s R is a collaborative project with many contributors. 314s Type 'contributors()' for more information and 314s 'citation()' on how to cite R or R packages in publications. 314s 314s Type 'demo()' for some demos, 'help()' for on-line help, or 314s 'help.start()' for an HTML browser interface to help. 314s Type 'q()' to quit R. 314s 315s > ## git2r, R bindings to the libgit2 library. 315s > ## Copyright (C) 2013-2023 The git2r contributors 315s > ## 315s > ## This program is free software; you can redistribute it and/or modify 315s > ## it under the terms of the GNU General Public License, version 2, 315s > ## as published by the Free Software Foundation. 315s > ## 315s > ## git2r is distributed in the hope that it will be useful, 315s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 315s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 315s > ## GNU General Public License for more details. 315s > ## 315s > ## You should have received a copy of the GNU General Public License along 315s > ## with this program; if not, write to the Free Software Foundation, Inc., 315s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 315s > 315s > library(git2r) 315s > source("util/check.R") 315s > 315s > ## For debugging 315s > sessionInfo() 315s R version 4.3.3 (2024-02-29) 315s Platform: aarch64-unknown-linux-gnu (64-bit) 315s Running under: Ubuntu Noble Numbat (development branch) 315s 315s Matrix products: default 315s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 315s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 315s 315s locale: 315s [1] C 315s 315s time zone: Etc/UTC 315s tzcode source: system (glibc) 315s 315s attached base packages: 315s [1] stats graphics grDevices utils datasets methods base 315s 315s other attached packages: 315s [1] git2r_0.33.0 315s 315s loaded via a namespace (and not attached): 315s [1] compiler_4.3.3 315s > libgit2_version() 315s $major 315s [1] 1 315s 315s $minor 315s [1] 7 315s 315s $rev 315s [1] 2 315s 315s > libgit2_features() 315s $threads 315s [1] TRUE 315s 315s $https 315s [1] TRUE 315s 315s $ssh 315s [1] TRUE 315s 315s > 315s > ## Create a directory in tempdir 315s > path <- tempfile(pattern = "git2r-") 315s > dir.create(path) 315s > 315s > ## Initialize a repository 315s > repo <- init(path) 315s > config(repo, user.name = "Alice", user.email = "alice@example.org") 315s > 315s > ## Create a '.gitignore' file 315s > writeLines("test.txt", file.path(path, ".gitignore")) 315s > add(repo, ".gitignore") 315s > commit(repo, "First commit message") 315s [c50546b] 2024-03-16: First commit message 315s > 315s > ## Create a file 315s > writeLines("Hello world!", file.path(path, "test.txt")) 315s > 315s > ## Check status 315s > s_1 <- structure(list(staged = empty_named_list(), 315s + unstaged = empty_named_list(), 315s + untracked = empty_named_list(), 315s + ignored = list(ignored = "test.txt")), 315s + class = "git_status") 315s > stopifnot(identical(status(repo, ignored = TRUE), s_1)) 315s > 315s > ## The file is ignored and should not be added 315s > add(repo, "test.txt") 315s > stopifnot(identical(status(repo, ignored = TRUE), s_1)) 315s > 315s > ## The file is ignored but should be added with force 315s > s_2 <- structure(list(staged = list(new = "test.txt"), 315s + unstaged = empty_named_list(), 315s + untracked = empty_named_list(), 315s + ignored = empty_named_list()), 315s + class = "git_status") 315s > 315s > add(repo, "test.txt", force = TRUE) 315s > stopifnot(identical(status(repo, ignored = TRUE), s_2)) 315s > 315s > ## Commit and check status 315s > s_3 <- structure(list(staged = empty_named_list(), 315s + unstaged = empty_named_list(), 315s + untracked = empty_named_list(), 315s + ignored = empty_named_list()), 315s + class = "git_status") 315s > 315s > commit(repo, "Second commit message") 315s [2df4d3a] 2024-03-16: Second commit message 315s > stopifnot(identical(status(repo, ignored = TRUE), s_3)) 315s > 315s > ## Cleanup 315s > unlink(path, recursive = TRUE) 315s > 315s BEGIN TEST bare_repository.R 316s 316s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 316s Copyright (C) 2024 The R Foundation for Statistical Computing 316s Platform: aarch64-unknown-linux-gnu (64-bit) 316s 316s R is free software and comes with ABSOLUTELY NO WARRANTY. 316s You are welcome to redistribute it under certain conditions. 316s Type 'license()' or 'licence()' for distribution details. 316s 316s R is a collaborative project with many contributors. 316s Type 'contributors()' for more information and 316s 'citation()' on how to cite R or R packages in publications. 316s 316s Type 'demo()' for some demos, 'help()' for on-line help, or 316s 'help.start()' for an HTML browser interface to help. 316s Type 'q()' to quit R. 316s 316s > ## git2r, R bindings to the libgit2 library. 316s > ## Copyright (C) 2013-2023 The git2r contributors 316s > ## 316s > ## This program is free software; you can redistribute it and/or modify 316s > ## it under the terms of the GNU General Public License, version 2, 316s > ## as published by the Free Software Foundation. 316s > ## 316s > ## git2r is distributed in the hope that it will be useful, 316s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 316s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 316s > ## GNU General Public License for more details. 316s > ## 316s > ## You should have received a copy of the GNU General Public License along 316s > ## with this program; if not, write to the Free Software Foundation, Inc., 316s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 316s > 316s > library("git2r") 316s > 316s > ## For debugging 316s > sessionInfo() 316s R version 4.3.3 (2024-02-29) 316s Platform: aarch64-unknown-linux-gnu (64-bit) 316s Running under: Ubuntu Noble Numbat (development branch) 316s 316s Matrix products: default 316s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 316s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 316s 316s locale: 316s [1] C 316s 316s time zone: Etc/UTC 316s tzcode source: system (glibc) 316s 316s attached base packages: 316s [1] stats graphics grDevices utils datasets methods base 316s 316s other attached packages: 316s [1] git2r_0.33.0 316s 316s loaded via a namespace (and not attached): 316s [1] compiler_4.3.3 316s > libgit2_version() 316s $major 316s [1] 1 316s 316s $minor 316s [1] 7 316s 316s $rev 316s [1] 2 316s 316s > libgit2_features() 316s $threads 316s [1] TRUE 316s 316s $https 316s [1] TRUE 316s 316s $ssh 316s [1] TRUE 316s 316s > 316s > 316s > ## Create a directory in tempdir 316s > path <- tempfile(pattern = "git2r-") 316s > dir.create(path) 316s > 316s > ## Initialize a bare repository 316s > repo <- init(path, bare = TRUE) 316s > 316s > ## Check that the state of the repository 316s > stopifnot(identical(is_bare(repo), TRUE)) 316s > stopifnot(identical(is_empty(repo), TRUE)) 316s > 316s > ## Check that workdir is NULL for a bare repository 316s > stopifnot(is.null(workdir(repo))) 316s > 316s > ## Check with missing repo argument 316s > setwd(path) 316s > stopifnot(identical(is_bare(), TRUE)) 316s > 316s > ## Cleanup 316s > unlink(path, recursive = TRUE) 316s > 316s BEGIN TEST blame.R 316s sh: 0: getcwd() failed: No such file or directory 316s 316s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 316s Copyright (C) 2024 The R Foundation for Statistical Computing 316s Platform: aarch64-unknown-linux-gnu (64-bit) 316s 316s R is free software and comes with ABSOLUTELY NO WARRANTY. 316s You are welcome to redistribute it under certain conditions. 316s Type 'license()' or 'licence()' for distribution details. 316s 316s R is a collaborative project with many contributors. 316s Type 'contributors()' for more information and 316s 'citation()' on how to cite R or R packages in publications. 316s 316s Type 'demo()' for some demos, 'help()' for on-line help, or 316s 'help.start()' for an HTML browser interface to help. 316s Type 'q()' to quit R. 316s 316s > ## git2r, R bindings to the libgit2 library. 316s > ## Copyright (C) 2013-2023 The git2r contributors 316s > ## 316s > ## This program is free software; you can redistribute it and/or modify 316s > ## it under the terms of the GNU General Public License, version 2, 316s > ## as published by the Free Software Foundation. 316s > ## 316s > ## git2r is distributed in the hope that it will be useful, 316s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 316s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 316s > ## GNU General Public License for more details. 316s > ## 316s > ## You should have received a copy of the GNU General Public License along 316s > ## with this program; if not, write to the Free Software Foundation, Inc., 316s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 316s > 316s > library(git2r) 316s > 316s > ## For debugging 316s > sessionInfo() 316s R version 4.3.3 (2024-02-29) 316s Platform: aarch64-unknown-linux-gnu (64-bit) 316s Running under: Ubuntu Noble Numbat (development branch) 316s 316s Matrix products: default 316s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 316s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 316s 316s locale: 316s [1] C 316s 316s time zone: Etc/UTC 316s tzcode source: system (glibc) 316s 316s attached base packages: 316s [1] stats graphics grDevices utils datasets methods base 316s 316s other attached packages: 316s [1] git2r_0.33.0 316s 316s loaded via a namespace (and not attached): 316s [1] compiler_4.3.3 316s > libgit2_version() 316s $major 316s [1] 1 316s 316s $minor 316s [1] 7 316s 316s $rev 316s [1] 2 316s 316s > libgit2_features() 316s $threads 316s [1] TRUE 316s 316s $https 316s [1] TRUE 316s 316s $ssh 316s [1] TRUE 316s 316s > 316s > 316s > ## Create a directory in tempdir 316s > path <- tempfile(pattern = "git2r-") 316s > dir.create(path) 316s > 316s > ## Initialize a repository 316s > repo <- init(path) 316s > config(repo, user.name = "Alice", user.email = "alice@example.org") 316s > 316s > ## Create a file and commit 316s > writeLines("Hello world!", file.path(path, "test.txt")) 316s > add(repo, "test.txt") 316s > commit_1 <- commit(repo, "First commit message") 316s > 316s > ## Create new user and change file 316s > config(repo, user.name = "Bob", user.email = "bob@example.org") 316s > writeLines(c("Hello world!", "HELLO WORLD!", "HOLA"), 316s + file.path(path, "test.txt")) 316s > add(repo, "test.txt") 316s > commit_2 <- commit(repo, "Second commit message") 316s > 316s > ## Check blame 316s > b <- blame(repo, "test.txt") 316s > stopifnot(identical(length(b$hunks), 2L)) 316s > 316s > ## Hunk: 1 316s > stopifnot(identical(b$hunks[[1]]$lines_in_hunk, 1L)) 316s > stopifnot(identical(b$hunks[[1]]$final_commit_id, sha(commit_1))) 316s > stopifnot(identical(b$hunks[[1]]$final_start_line_number, 1L)) 316s > stopifnot(identical(b$hunks[[1]]$final_signature$name, "Alice")) 316s > stopifnot(identical(b$hunks[[1]]$final_signature$email, "alice@example.org")) 316s > stopifnot(identical(b$hunks[[1]]$orig_commit_id, sha(commit_1))) 316s > stopifnot(identical(b$hunks[[1]]$orig_start_line_number, 1L)) 316s > stopifnot(identical(b$hunks[[1]]$orig_signature$name, "Alice")) 316s > stopifnot(identical(b$hunks[[1]]$orig_signature$email, "alice@example.org")) 316s > stopifnot(identical(b$hunks[[1]]$orig_path, "test.txt")) 316s > stopifnot(identical(b$hunks[[1]]$boundary, TRUE)) 316s > 316s > ## Hunk: 2 316s > stopifnot(identical(b$hunks[[2]]$lines_in_hunk, 2L)) 316s > stopifnot(identical(b$hunks[[2]]$final_commit_id, sha(commit_2))) 316s > stopifnot(identical(b$hunks[[2]]$final_start_line_number, 2L)) 316s > stopifnot(identical(b$hunks[[2]]$final_signature$name, "Bob")) 316s > stopifnot(identical(b$hunks[[2]]$final_signature$email, "bob@example.org")) 316s > stopifnot(identical(b$hunks[[2]]$orig_commit_id, sha(commit_2))) 316s > stopifnot(identical(b$hunks[[2]]$orig_start_line_number, 2L)) 316s > stopifnot(identical(b$hunks[[2]]$orig_signature$name, "Bob")) 316s > stopifnot(identical(b$hunks[[2]]$orig_signature$email, "bob@example.org")) 316s > stopifnot(identical(b$hunks[[2]]$orig_path, "test.txt")) 316s > stopifnot(identical(b$hunks[[2]]$boundary, FALSE)) 316s > 316s > ## Cleanup 316s > unlink(path, recursive = TRUE) 316s > 316s BEGIN TEST blob.R 316s 316s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 316s Copyright (C) 2024 The R Foundation for Statistical Computing 316s Platform: aarch64-unknown-linux-gnu (64-bit) 316s 316s R is free software and comes with ABSOLUTELY NO WARRANTY. 316s You are welcome to redistribute it under certain conditions. 316s Type 'license()' or 'licence()' for distribution details. 316s 316s R is a collaborative project with many contributors. 316s Type 'contributors()' for more information and 316s 'citation()' on how to cite R or R packages in publications. 316s 316s Type 'demo()' for some demos, 'help()' for on-line help, or 316s 'help.start()' for an HTML browser interface to help. 316s Type 'q()' to quit R. 316s 316s > ## git2r, R bindings to the libgit2 library. 316s > ## Copyright (C) 2013-2023 The git2r contributors 316s > ## 316s > ## This program is free software; you can redistribute it and/or modify 316s > ## it under the terms of the GNU General Public License, version 2, 316s > ## as published by the Free Software Foundation. 316s > ## 316s > ## git2r is distributed in the hope that it will be useful, 316s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 316s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 316s > ## GNU General Public License for more details. 316s > ## 316s > ## You should have received a copy of the GNU General Public License along 316s > ## with this program; if not, write to the Free Software Foundation, Inc., 316s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 316s > 316s > library(git2r) 316s > library(tools) 316s > source("util/check.R") 316s > 316s > ## For debugging 316s > sessionInfo() 316s R version 4.3.3 (2024-02-29) 316s Platform: aarch64-unknown-linux-gnu (64-bit) 316s Running under: Ubuntu Noble Numbat (development branch) 316s 316s Matrix products: default 316s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 316s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 316s 316s locale: 316s [1] C 316s 316s time zone: Etc/UTC 316s tzcode source: system (glibc) 316s 316s attached base packages: 316s [1] tools stats graphics grDevices utils datasets methods 316s [8] base 316s 316s other attached packages: 316s [1] git2r_0.33.0 316s 316s loaded via a namespace (and not attached): 316s [1] compiler_4.3.3 316s > libgit2_version() 316s $major 316s [1] 1 316s 316s $minor 316s [1] 7 316s 316s $rev 316s [1] 2 316s 316s > libgit2_features() 316s $threads 316s [1] TRUE 316s 316s $https 316s [1] TRUE 316s 316s $ssh 316s [1] TRUE 316s 316s > 316s > 316s > ## Create a directory in tempdir 316s > path <- tempfile(pattern = "git2r-") 316s > dir.create(path) 316s > 316s > ## Initialize a repository 316s > repo <- init(path) 316s > config(repo, user.name = "Alice", user.email = "alice@example.org") 316s > 316s > ## Create a file 316s > f <- file(file.path(path, "test.txt"), "wb") 316s > writeChar("Hello world!\n", f, eos = NULL) 316s > close(f) 316s > 316s > ## add and commit 316s > add(repo, "test.txt") 316s > new_commit <- commit(repo, "Commit message") 316s > 316s > ## Lookup blob 316s > blob <- lookup(repo, "cd0875583aabe89ee197ea133980a9085d08e497") 316s > stopifnot(isTRUE(is_blob(blob))) 316s > stopifnot(identical(sha(blob), "cd0875583aabe89ee197ea133980a9085d08e497")) 316s > stopifnot(identical(is_binary(blob), FALSE)) 316s > stopifnot(identical(blob, lookup(repo, "cd0875"))) 316s > stopifnot(identical(length(blob), 13L)) 316s > stopifnot(identical(content(blob), "Hello world!")) 316s > stopifnot(identical(print(blob), blob)) 316s blob: cd0875583aabe89ee197ea133980a9085d08e497 316s size: 13 bytes 316s > 316s > ## Add one more commit 316s > f <- file(file.path(path, "test.txt"), "wb") 316s > writeChar("Hello world!\nHELLO WORLD!\nHeLlO wOrLd!\n", f, eos = NULL) 316s > close(f) 316s > add(repo, "test.txt") 316s > blob <- lookup(repo, tree(commit(repo, "New commit message"))$id[1]) 316s > stopifnot(identical(content(blob), 316s + c("Hello world!", "HELLO WORLD!", "HeLlO wOrLd!"))) 316s > stopifnot(identical(rawToChar(content(blob, raw = TRUE)), 316s + content(blob, split = FALSE))) 316s > 316s > ## Check content of binary file 316s > set.seed(42) 316s > x <- as.raw((sample(0:255, 1000, replace = TRUE))) 316s > writeBin(x, con = file.path(path, "test.bin")) 316s > add(repo, "test.bin") 316s > commit(repo, "Add binary file") 316s [b7db95b] 2024-03-16: Add binary file 316s > blob <- tree(last_commit(repo))["test.bin"] 316s > stopifnot(identical(content(blob), NA_character_)) 316s > stopifnot(identical(x, content(blob, raw = TRUE))) 316s > 316s > ## Hash 316s > stopifnot(identical(hash("Hello, world!\n"), 316s + "af5626b4a114abcb82d63db7c8082c3c4756e51b")) 316s > stopifnot(identical(hash("test content\n"), 316s + "d670460b4b4aece5915caf5c68d12f560a9fe3e4")) 316s > stopifnot(identical(hash(c("Hello, world!\n", 316s + "test content\n")), 316s + c("af5626b4a114abcb82d63db7c8082c3c4756e51b", 316s + "d670460b4b4aece5915caf5c68d12f560a9fe3e4"))) 316s > stopifnot(identical(hash(c("Hello, world!\n", 316s + NA_character_, 316s + "test content\n")), 316s + c("af5626b4a114abcb82d63db7c8082c3c4756e51b", 316s + NA_character_, 316s + "d670460b4b4aece5915caf5c68d12f560a9fe3e4"))) 316s > stopifnot(identical(hash(character(0)), character(0))) 316s > 316s > ## Hash file 316s > test_1_txt <- file(file.path(path, "test-1.txt"), "wb") 316s > writeChar("Hello, world!\n", test_1_txt, eos = NULL) 316s > close(test_1_txt) 316s > test_2_txt <- file(file.path(path, "test-2.txt"), "wb") 316s > writeChar("test content\n", test_2_txt, eos = NULL) 316s > close(test_2_txt) 316s > stopifnot(identical(hash("Hello, world!\n"), 316s + hashfile(file.path(path, "test-1.txt")))) 316s > stopifnot(identical(hash("test content\n"), 316s + hashfile(file.path(path, "test-2.txt")))) 316s > stopifnot(identical(hash(c("Hello, world!\n", 316s + "test content\n")), 316s + hashfile(c(file.path(path, "test-1.txt"), 316s + file.path(path, "test-2.txt"))))) 316s > assertError(hashfile(c(file.path(path, "test-1.txt"), 316s + NA_character_, 316s + file.path(path, "test-2.txt")))) 316s > stopifnot(identical(hashfile(character(0)), character(0))) 316s > 316s > ## Create blob from disk 316s > tmp_file_1 <- tempfile() 316s > tmp_file_2 <- tempfile() 316s > f1 <- file(tmp_file_1, "wb") 316s > writeChar("Hello, world!\n", f1, eos = NULL) 316s > close(f1) 316s > f2 <- file(tmp_file_2, "wb") 316s > writeChar("test content\n", f2, eos = NULL) 316s > close(f2) 316s > blob_list_1 <- blob_create(repo, c(tmp_file_1, tmp_file_2), relative = FALSE) 316s > unlink(tmp_file_1) 316s > unlink(tmp_file_2) 316s > stopifnot(identical(sapply(blob_list_1, "[[", "sha"), 316s + c("af5626b4a114abcb82d63db7c8082c3c4756e51b", 316s + "d670460b4b4aece5915caf5c68d12f560a9fe3e4"))) 316s > 316s > ## Create blob from workdir 316s > tmp_file_3 <- file.path(path, "test-workdir-1.txt") 316s > tmp_file_4 <- file.path(path, "test-workdir-2.txt") 316s > f3 <- file(tmp_file_3, "wb") 316s > writeChar("Hello, world!\n", f3, eos = NULL) 316s > close(f3) 316s > f4 <- file(tmp_file_4, "wb") 316s > writeChar("test content\n", f4, eos = NULL) 316s > close(f4) 316s > blob_list_2 <- blob_create(repo, c("test-workdir-1.txt", 316s + "test-workdir-2.txt")) 316s > stopifnot(identical(sapply(blob_list_2, "[[", "sha"), 316s + c("af5626b4a114abcb82d63db7c8082c3c4756e51b", 316s + "d670460b4b4aece5915caf5c68d12f560a9fe3e4"))) 316s > 316s > ## Test arguments 316s > check_error(assertError(.Call(git2r:::git2r_blob_content, NULL, FALSE)), 316s + "'blob' must be an S3 class git_blob") 316s > check_error(assertError(.Call(git2r:::git2r_blob_content, 3, FALSE)), 316s + "'blob' must be an S3 class git_blob") 316s > check_error(assertError(.Call(git2r:::git2r_blob_content, repo, FALSE)), 316s + "'blob' must be an S3 class git_blob") 316s > 316s > b <- blob_list_1[[1]] 316s > b$sha <- NA_character_ 316s > check_error(assertError(.Call(git2r:::git2r_blob_content, b, FALSE)), 316s + "'blob' must be an S3 class git_blob") 316s > 316s > check_error(assertError(hashfile(NA)), "invalid 'path' argument") 316s > 316s > ## Cleanup 316s > unlink(path, recursive = TRUE) 316s > 316s BEGIN TEST branch.R 316s 316s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 316s Copyright (C) 2024 The R Foundation for Statistical Computing 316s Platform: aarch64-unknown-linux-gnu (64-bit) 316s 316s R is free software and comes with ABSOLUTELY NO WARRANTY. 316s You are welcome to redistribute it under certain conditions. 316s Type 'license()' or 'licence()' for distribution details. 316s 316s R is a collaborative project with many contributors. 316s Type 'contributors()' for more information and 316s 'citation()' on how to cite R or R packages in publications. 316s 316s Type 'demo()' for some demos, 'help()' for on-line help, or 316s 'help.start()' for an HTML browser interface to help. 316s Type 'q()' to quit R. 316s 317s > ## git2r, R bindings to the libgit2 library. 317s > ## Copyright (C) 2013-2023 The git2r contributors 317s > ## 317s > ## This program is free software; you can redistribute it and/or modify 317s > ## it under the terms of the GNU General Public License, version 2, 317s > ## as published by the Free Software Foundation. 317s > ## 317s > ## git2r is distributed in the hope that it will be useful, 317s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 317s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 317s > ## GNU General Public License for more details. 317s > ## 317s > ## You should have received a copy of the GNU General Public License along 317s > ## with this program; if not, write to the Free Software Foundation, Inc., 317s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 317s > 317s > library(git2r) 317s > 317s > ## For debugging 317s > sessionInfo() 317s R version 4.3.3 (2024-02-29) 317s Platform: aarch64-unknown-linux-gnu (64-bit) 317s Running under: Ubuntu Noble Numbat (development branch) 317s 317s Matrix products: default 317s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 317s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 317s 317s locale: 317s [1] C 317s 317s time zone: Etc/UTC 317s tzcode source: system (glibc) 317s 317s attached base packages: 317s [1] stats graphics grDevices utils datasets methods base 317s 317s other attached packages: 317s [1] git2r_0.33.0 317s 317s loaded via a namespace (and not attached): 317s [1] compiler_4.3.3 317s > libgit2_version() 317s $major 317s [1] 1 317s 317s $minor 317s [1] 7 317s 317s $rev 317s [1] 2 317s 317s > libgit2_features() 317s $threads 317s [1] TRUE 317s 317s $https 317s [1] TRUE 317s 317s $ssh 317s [1] TRUE 317s 317s > 317s > 317s > ## Create a directory in tempdir 317s > path <- tempfile(pattern = "git2r-") 317s > dir.create(path) 317s > 317s > ## Initialize a repository 317s > repo <- init(path, branch = "main") 317s > config(repo, user.name = "Alice", user.email = "alice@example.org") 317s > 317s > ## Create a file 317s > writeLines("Hello world!", file.path(path, "test.txt")) 317s > 317s > ## add and commit 317s > add(repo, "test.txt") 317s > commit_1 <- commit(repo, "Commit message") 317s > 317s > ## Check branch 317s > stopifnot(identical(length(branches(repo)), 1L)) 317s > stopifnot(identical(is_head(branches(repo)[[1]]), TRUE)) 317s > stopifnot(identical(is_local(branches(repo)[[1]]), TRUE)) 317s > stopifnot(identical(branches(repo)[[1]]$name, "main")) 317s > stopifnot(identical(branches(repo)[[1]], repository_head(repo))) 317s > stopifnot(identical(branches(repo)$main, repository_head(repo))) 317s > 317s > ## Check branch argument 317s > res <- tools::assertError(is_local(1)) 317s > stopifnot(length(grep("argument 'branch' must be a 'git_branch' object", 317s + res[[1]]$message)) > 0) 317s > 317s > ## Check branch name argument 317s > res <- tools::assertError(branch_set_upstream()) 317s > stopifnot(length(grep("Missing argument name", 317s + res[[1]]$message)) > 0) 317s > 317s > ## Print branch 317s > b <- repository_head(repo) 317s > stopifnot(identical(print(b), b)) 317s [aec880] (Local) (HEAD) main 317s > 317s > ## Create a branch 317s > b <- branch_create(commit_1, name = "test") 317s > stopifnot(identical(b$name, "test")) 317s > stopifnot(identical(b$type, 1L)) 317s > stopifnot(identical(sha(b), branch_target(b))) 317s > stopifnot(identical(length(branches(repo)), 2L)) 317s > stopifnot(identical(branch_target(branches(repo)[[1]]), 317s + branch_target(branches(repo)[[2]]))) 317s > 317s > ## Check is_branch 317s > stopifnot(identical(is_branch(b), TRUE)) 317s > stopifnot(identical(is_branch(5), FALSE)) 317s > 317s > ## Add one more commit 317s > writeLines(c("Hello world!", "HELLO WORLD!"), file.path(path, "test.txt")) 317s > add(repo, "test.txt") 317s > commit_2 <- commit(repo, "Another commit message") 317s > 317s > ## Now the first branch should have moved on 317s > stopifnot(!identical(branch_target(branches(repo)[[1]]), 317s + branch_target(branches(repo)[[2]]))) 317s > 317s > ## Create a branch with the same name should fail 317s > tools::assertError(branch_create(commit_2, name = "test")) 317s > 317s > ## Force it and check the branches are identical again 317s > b <- branch_create(commit_2, name = "test", force = TRUE) 317s > stopifnot(identical(branch_target(branches(repo)[[1]]), 317s + branch_target(branches(repo)[[2]]))) 317s > 317s > ## Test arguments 317s > res <- tools::assertError(.Call(git2r:::git2r_branch_delete, NULL)) 317s > stopifnot(length(grep("'branch' must be an S3 class git_branch", 317s + res[[1]]$message)) > 0) 317s > res <- tools::assertError(.Call(git2r:::git2r_branch_delete, 3)) 317s > stopifnot(length(grep("'branch' must be an S3 class git_branch", 317s + res[[1]]$message)) > 0) 317s > res <- tools::assertError(.Call(git2r:::git2r_branch_delete, repo)) 317s > stopifnot(length(grep("'branch' must be an S3 class git_branch", 317s + res[[1]]$message)) > 0) 317s > b_tmp <- b 317s > b_tmp$name <- NA_character_ 317s > res <- tools::assertError(.Call(git2r:::git2r_branch_delete, b_tmp)) 317s > stopifnot(length(grep("'branch' must be an S3 class git_branch", 317s + res[[1]]$message)) > 0) 317s > b_tmp <- b 317s > b_tmp$type <- NA_integer_ 317s > res <- tools::assertError(.Call(git2r:::git2r_branch_delete, b_tmp)) 317s > stopifnot(length(grep("'branch' must be an S3 class git_branch", 317s + res[[1]]$message)) > 0) 317s > b_tmp$type <- 3L 317s > res <- tools::assertError(.Call(git2r:::git2r_branch_delete, b_tmp)) 317s > stopifnot(length(grep("'branch' must be an S3 class git_branch", 317s + res[[1]]$message)) > 0) 317s > 317s > ## Delete branch 317s > branch_delete(b) 317s > stopifnot(identical(length(branches(repo)), 1L)) 317s > 317s > ## Add one more commit 317s > writeLines(c("Hello world!", "HELLO WORLD!", "hello world"), 317s + file.path(path, "test.txt")) 317s > add(repo, "test.txt") 317s > commit_3 <- commit(repo, "Another third commit message") 317s > 317s > ## Create and test renaming of branches 317s > b_1 <- branch_create(commit_1, name = "test-1") 317s > b_2 <- branch_create(commit_2, name = "test-2") 317s > b_3 <- branch_create(commit_3, name = "test-3") 317s > stopifnot(identical(length(branches(repo)), 4L)) 317s > b_1 <- branch_rename(b_1, name = "test-1-new-name") 317s > stopifnot(identical(length(branches(repo)), 4L)) 317s > stopifnot(identical(b_1$name, "test-1-new-name")) 317s > tools::assertError(branch_rename(b_1, name = "test-2")) 317s > branch_rename(b_1, name = "test-2", force = TRUE) 317s > stopifnot(identical(length(branches(repo)), 3L)) 317s > 317s > ## Check branches method with missing repo argument 317s > wd <- setwd(path) 317s > stopifnot(identical(length(branches()), 3L)) 317s > if (!is.null(wd)) 317s + setwd(wd) 317s > 317s > ## Cleanup 317s > unlink(path, recursive = TRUE) 317s > 317s BEGIN TEST bundle.R 317s 317s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 317s Copyright (C) 2024 The R Foundation for Statistical Computing 317s Platform: aarch64-unknown-linux-gnu (64-bit) 317s 317s R is free software and comes with ABSOLUTELY NO WARRANTY. 317s You are welcome to redistribute it under certain conditions. 317s Type 'license()' or 'licence()' for distribution details. 317s 317s R is a collaborative project with many contributors. 317s Type 'contributors()' for more information and 317s 'citation()' on how to cite R or R packages in publications. 317s 317s Type 'demo()' for some demos, 'help()' for on-line help, or 317s 'help.start()' for an HTML browser interface to help. 317s Type 'q()' to quit R. 317s 317s > ## git2r, R bindings to the libgit2 library. 317s > ## Copyright (C) 2013-2023 The git2r contributors 317s > ## 317s > ## This program is free software; you can redistribute it and/or modify 317s > ## it under the terms of the GNU General Public License, version 2, 317s > ## as published by the Free Software Foundation. 317s > ## 317s > ## git2r is distributed in the hope that it will be useful, 317s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 317s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 317s > ## GNU General Public License for more details. 317s > ## 317s > ## You should have received a copy of the GNU General Public License along 317s > ## with this program; if not, write to the Free Software Foundation, Inc., 317s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 317s > 317s > library("git2r") 317s > 317s > ## For debugging 317s > sessionInfo() 317s R version 4.3.3 (2024-02-29) 317s Platform: aarch64-unknown-linux-gnu (64-bit) 317s Running under: Ubuntu Noble Numbat (development branch) 317s 317s Matrix products: default 317s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 317s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 317s 317s locale: 317s [1] C 317s 317s time zone: Etc/UTC 317s tzcode source: system (glibc) 317s 317s attached base packages: 317s [1] stats graphics grDevices utils datasets methods base 317s 317s other attached packages: 317s [1] git2r_0.33.0 317s 317s loaded via a namespace (and not attached): 317s [1] compiler_4.3.3 317s > libgit2_version() 317s $major 317s [1] 1 317s 317s $minor 317s [1] 7 317s 317s $rev 317s [1] 2 317s 317s > libgit2_features() 317s $threads 317s [1] TRUE 317s 317s $https 317s [1] TRUE 317s 317s $ssh 317s [1] TRUE 317s 317s > 317s > 317s > ## Create a directory in tempdir 317s > path <- tempfile(pattern = "git2r-") 317s > dir.create(file.path(path, "bundle", "R"), recursive = TRUE) 317s > 317s > ## Initialize a repository 317s > repo <- init(file.path(path, "bundle")) 317s > config(repo, user.name = "Alice", user.email = "alice@example.org") 317s > 317s > ## Create a DESCRIPTION file 317s > writeLines(c( 317s + "package: bundle", 317s + "Title: Bundle Git Repository", 317s + "Description: Bundle a bare repository of the code in the 'inst' folder.", 317s + "Version: 0.1", 317s + "License: GPL-2", 317s + "Authors@R: person('Alice', role = c('aut', 'cre'),", 317s + " email = 'alice@example.org')"), 317s + con = file.path(path, "bundle", "DESCRIPTION")) 317s > add(repo, file.path(path, "bundle", "DESCRIPTION")) 317s > commit(repo, "Add DESCRIPTION file") 317s [716d832] 2024-03-16: Add DESCRIPTION file 317s > 317s > ## Create R file 317s > writeLines("f <- function(x, y) x+y", 317s + con = file.path(path, "bundle", "R", "bundle.R")) 317s > add(repo, file.path(path, "bundle", "R", "bundle.R")) 317s > commit(repo, "Add R file") 317s [7e68997] 2024-03-16: Add R file 317s > 317s > ## Bundle package 317s > bundle_r_package(repo) 317s cloning into '/tmp/RtmpfkFhIe/git2r-dff28217a6e/bundle/inst/bundle.git'... 317s > 317s > ## Fails if bundled package exists 317s > tools::assertError(bundle_r_package(repo)) 317s > 317s > ## Cleanup 317s > unlink(path, recursive = TRUE) 317s > 317s BEGIN TEST checkout-named-branch.R 317s 317s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 317s Copyright (C) 2024 The R Foundation for Statistical Computing 317s Platform: aarch64-unknown-linux-gnu (64-bit) 317s 317s R is free software and comes with ABSOLUTELY NO WARRANTY. 317s You are welcome to redistribute it under certain conditions. 317s Type 'license()' or 'licence()' for distribution details. 317s 317s R is a collaborative project with many contributors. 317s Type 'contributors()' for more information and 317s 'citation()' on how to cite R or R packages in publications. 317s 317s Type 'demo()' for some demos, 'help()' for on-line help, or 317s 'help.start()' for an HTML browser interface to help. 317s Type 'q()' to quit R. 317s 317s > ## git2r, R bindings to the libgit2 library. 317s > ## Copyright (C) 2013-2023 The git2r contributors 317s > ## 317s > ## This program is free software; you can redistribute it and/or modify 317s > ## it under the terms of the GNU General Public License, version 2, 317s > ## as published by the Free Software Foundation. 317s > ## 317s > ## git2r is distributed in the hope that it will be useful, 317s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 317s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 317s > ## GNU General Public License for more details. 317s > ## 317s > ## You should have received a copy of the GNU General Public License along 317s > ## with this program; if not, write to the Free Software Foundation, Inc., 317s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 317s > 317s > library(git2r) 317s > 317s > ## For debugging 317s > sessionInfo() 317s R version 4.3.3 (2024-02-29) 317s Platform: aarch64-unknown-linux-gnu (64-bit) 317s Running under: Ubuntu Noble Numbat (development branch) 317s 317s Matrix products: default 317s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 317s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 317s 317s locale: 317s [1] C 317s 317s time zone: Etc/UTC 317s tzcode source: system (glibc) 317s 317s attached base packages: 317s [1] stats graphics grDevices utils datasets methods base 317s 317s other attached packages: 317s [1] git2r_0.33.0 317s 317s loaded via a namespace (and not attached): 317s [1] compiler_4.3.3 317s > libgit2_version() 317s $major 317s [1] 1 317s 317s $minor 317s [1] 7 317s 317s $rev 317s [1] 2 317s 317s > libgit2_features() 317s $threads 317s [1] TRUE 317s 317s $https 317s [1] TRUE 317s 317s $ssh 317s [1] TRUE 317s 317s > 317s > 317s > ## Create directories for repositories in tempdir 317s > path_bare <- tempfile(pattern = "git2r-") 317s > path_repo_1 <- tempfile(pattern = "git2r-") 317s > path_repo_2 <- tempfile(pattern = "git2r-") 317s > 317s > dir.create(path_bare) 317s > dir.create(path_repo_1) 317s > dir.create(path_repo_2) 317s > 317s > ## Create bare repository 317s > bare_repo <- init(path_bare, bare = TRUE) 317s > 317s > ## Clone to repo 1 317s > repo_1 <- clone(path_bare, path_repo_1) 317s cloning into '/tmp/RtmpkfBqYH/git2r-e0b47c14ff5'... 317s > config(repo_1, user.name = "Alice", user.email = "alice@example.org") 317s > 317s > ## Add changes to repo 1 and push to bare 317s > writeLines( 317s + "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 317s + con = file.path(path_repo_1, "test.txt")) 317s > add(repo_1, "test.txt") 317s > commit(repo_1, "First commit message") 317s [9688664] 2024-03-16: First commit message 317s > branch_name <- branches(repo_1)[[1]]$name 317s > push(repo_1, "origin", paste0("refs/heads/", branch_name)) 317s > 317s > ## Test checkout branch argument 317s > tools::assertError(checkout(repo_1)) 317s > tools::assertError(checkout(repo_1, c("master", "master"))) 317s > tools::assertError(checkout(repo_1, "dev")) 317s > 317s > ## Create and checkout dev branch in repo 1 317s > checkout(repo_1, "dev", create = TRUE) 317s > 317s > ## Add changes to dev branch in repo 1 and push to bare 317s > writeLines( 317s + c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 317s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 317s + con = file.path(path_repo_1, "test.txt")) 317s > add(repo_1, "test.txt") 317s > commit(repo_1, "Second commit message") 317s [18ec071] 2024-03-16: Second commit message 317s > push(repo_1, "origin", "refs/heads/dev") 317s > 317s > ## Clone to repo 2 317s > repo_2 <- clone(path_bare, path_repo_2) 317s cloning into '/tmp/RtmpkfBqYH/git2r-e0b2c49fb3e'... 317s > config(repo_2, user.name = "Bob", user.email = "bob@example.org") 317s > 317s > stopifnot(identical( 317s + "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 317s + readLines(file.path(path_repo_2, "test.txt")))) 317s > 317s > ## Checkout dev branch 317s > checkout(repo_2, "dev") 317s > 317s > ## Check content of file 317s > stopifnot(identical( 317s + c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 317s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 317s + readLines(file.path(path_repo_2, "test.txt")))) 317s > 317s > ## Checkout previous branch 317s > checkout(repo_2, "-") 317s > stopifnot(identical(repository_head(repo_2)$name, branch_name)) 317s > 317s > ## Cleanup 317s > unlink(path_bare, recursive = TRUE) 317s > unlink(path_repo_1, recursive = TRUE) 317s > unlink(path_repo_2, recursive = TRUE) 317s > 317s BEGIN TEST checkout.R 317s 317s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 317s Copyright (C) 2024 The R Foundation for Statistical Computing 317s Platform: aarch64-unknown-linux-gnu (64-bit) 317s 317s R is free software and comes with ABSOLUTELY NO WARRANTY. 317s You are welcome to redistribute it under certain conditions. 317s Type 'license()' or 'licence()' for distribution details. 317s 317s R is a collaborative project with many contributors. 317s Type 'contributors()' for more information and 317s 'citation()' on how to cite R or R packages in publications. 317s 317s Type 'demo()' for some demos, 'help()' for on-line help, or 317s 'help.start()' for an HTML browser interface to help. 317s Type 'q()' to quit R. 317s 318s > ## git2r, R bindings to the libgit2 library. 318s > ## Copyright (C) 2013-2023 The git2r contributors 318s > ## 318s > ## This program is free software; you can redistribute it and/or modify 318s > ## it under the terms of the GNU General Public License, version 2, 318s > ## as published by the Free Software Foundation. 318s > ## 318s > ## git2r is distributed in the hope that it will be useful, 318s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 318s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 318s > ## GNU General Public License for more details. 318s > ## 318s > ## You should have received a copy of the GNU General Public License along 318s > ## with this program; if not, write to the Free Software Foundation, Inc., 318s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 318s > 318s > library(git2r) 318s > 318s > ## For debugging 318s > sessionInfo() 318s R version 4.3.3 (2024-02-29) 318s Platform: aarch64-unknown-linux-gnu (64-bit) 318s Running under: Ubuntu Noble Numbat (development branch) 318s 318s Matrix products: default 318s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 318s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 318s 318s locale: 318s [1] C 318s 318s time zone: Etc/UTC 318s tzcode source: system (glibc) 318s 318s attached base packages: 318s [1] stats graphics grDevices utils datasets methods base 318s 318s other attached packages: 318s [1] git2r_0.33.0 318s 318s loaded via a namespace (and not attached): 318s [1] compiler_4.3.3 318s > libgit2_version() 318s $major 318s [1] 1 318s 318s $minor 318s [1] 7 318s 318s $rev 318s [1] 2 318s 318s > libgit2_features() 318s $threads 318s [1] TRUE 318s 318s $https 318s [1] TRUE 318s 318s $ssh 318s [1] TRUE 318s 318s > 318s > 318s > ## Create a directory in tempdir 318s > path <- tempfile(pattern = "git2r-") 318s > dir.create(path) 318s > 318s > ## Initialize a repository 318s > repo <- init(path, branch = "main") 318s > config(repo, user.name = "Alice", user.email = "alice@example.org") 318s > 318s > ## Create first commit 318s > writeLines("Hello world!", file.path(path, "test.txt")) 318s > add(repo, "test.txt") 318s > commit_1 <- commit(repo, "First commit message") 318s > 318s > ## Edit file and checkout 318s > writeLines(c("Hello world!", "Hello world!"), file.path(path, "test.txt")) 318s > status_exp_1 <- structure(list(staged = structure(list(), 318s + .Names = character(0)), 318s + unstaged = structure(list(modified = "test.txt"), 318s + .Names = "modified"), 318s + untracked = structure(list(), 318s + .Names = character(0))), 318s + .Names = c("staged", "unstaged", "untracked"), 318s + class = "git_status") 318s > status_obs_1 <- status(repo) 318s > str(status_exp_1) 318s List of 3 318s $ staged : Named list() 318s $ unstaged :List of 1 318s ..$ modified: chr "test.txt" 318s $ untracked: Named list() 318s - attr(*, "class")= chr "git_status" 318s > str(status_obs_1) 318s List of 3 318s $ staged : Named list() 318s $ unstaged :List of 1 318s ..$ modified: chr "test.txt" 318s $ untracked: Named list() 318s - attr(*, "class")= chr "git_status" 318s > stopifnot(identical(status_obs_1, status_exp_1)) 318s > checkout(repo, path = "test.txt") 318s > status_exp_2 <- structure(list(staged = structure(list(), 318s + .Names = character(0)), 318s + unstaged = structure(list(), 318s + .Names = character(0)), 318s + untracked = structure(list(), 318s + .Names = character(0))), 318s + .Names = c("staged", "unstaged", "untracked"), 318s + class = "git_status") 318s > status_obs_2 <- status(repo) 318s > str(status_exp_2) 318s List of 3 318s $ staged : Named list() 318s $ unstaged : Named list() 318s $ untracked: Named list() 318s - attr(*, "class")= chr "git_status" 318s > str(status_obs_2) 318s List of 3 318s $ staged : Named list() 318s $ unstaged : Named list() 318s $ untracked: Named list() 318s - attr(*, "class")= chr "git_status" 318s > stopifnot(identical(status_obs_2, status_exp_2)) 318s > 318s > ## Create second commit 318s > writeLines(c("Hello world!", "HELLO WORLD!"), file.path(path, "test.txt")) 318s > add(repo, "test.txt") 318s > commit_2 <- commit(repo, "Second commit message") 318s > tag(repo, "commit_2", "Tag message") 318s > 318s > ## Create third commit 318s > writeLines(c("Hello world!", "HELLO WORLD!", "HeLlO wOrLd!"), 318s + file.path(path, "test.txt")) 318s > add(repo, "test.txt") 318s > commit_3 <- commit(repo, "Third commit message") 318s > 318s > ## Check HEAD 318s > stopifnot(identical(is_detached(repo), FALSE)) 318s > stopifnot(identical(repository_head(repo)$name, "main")) 318s > 318s > ## Check show and summary 318s > repo 318s Local: main /tmp/RtmpjE0x0t/git2r-e1716be370d 318s Head: [2457cb3] 2024-03-16: Third commit message 318s > summary(repo) 318s Local: main /tmp/RtmpjE0x0t/git2r-e1716be370d 318s Head: [2457cb3] 2024-03-16: Third commit message 318s 318s Branches: 1 318s Tags: 1 318s Commits: 3 318s Contributors: 1 318s Stashes: 0 318s Ignored files: 0 318s Untracked files: 0 318s Unstaged files: 0 318s Staged files: 0 318s 318s Latest commits: 318s [2457cb3] 2024-03-16: Third commit message 318s [3e02da0] 2024-03-16: Second commit message 318s [9b6cb79] 2024-03-16: First commit message 318s > 318s > ## Checkout first commit 318s > checkout(commit_1, TRUE) 318s > stopifnot(identical(is_detached(repo), TRUE)) 318s > stopifnot(identical(repository_head(repo), commit_1)) 318s > stopifnot(identical(readLines(file.path(path, "test.txt")), "Hello world!")) 318s > 318s > ## Check show and summary 318s > repo 318s Local: (detached) /tmp/RtmpjE0x0t/git2r-e1716be370d 318s Head: [9b6cb79] 2024-03-16: First commit message 318s > summary(repo) 318s Local: (detached) /tmp/RtmpjE0x0t/git2r-e1716be370d 318s Head: [9b6cb79] 2024-03-16: First commit message 318s 318s Branches: 1 318s Tags: 1 318s Commits: 1 318s Contributors: 1 318s Stashes: 0 318s Ignored files: 0 318s Untracked files: 0 318s Unstaged files: 0 318s Staged files: 0 318s 318s Latest commits: 318s [9b6cb79] 2024-03-16: First commit message 318s > 318s > ## Checkout tag 318s > checkout(tags(repo)[[1]], TRUE) 318s > stopifnot(identical(is_detached(repo), TRUE)) 318s > stopifnot(identical(readLines(file.path(path, "test.txt")), 318s + c("Hello world!", "HELLO WORLD!"))) 318s > 318s > ## Check is_detached with missing repo argument 318s > wd <- setwd(path) 318s > stopifnot(identical(is_detached(), TRUE)) 318s > if (!is.null(wd)) 318s + setwd(wd) 318s > 318s > ## Cleanup 318s > unlink(path, recursive = TRUE) 318s > 318s BEGIN TEST checkout_branch.R 318s 318s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 318s Copyright (C) 2024 The R Foundation for Statistical Computing 318s Platform: aarch64-unknown-linux-gnu (64-bit) 318s 318s R is free software and comes with ABSOLUTELY NO WARRANTY. 318s You are welcome to redistribute it under certain conditions. 318s Type 'license()' or 'licence()' for distribution details. 318s 318s R is a collaborative project with many contributors. 318s Type 'contributors()' for more information and 318s 'citation()' on how to cite R or R packages in publications. 318s 318s Type 'demo()' for some demos, 'help()' for on-line help, or 318s 'help.start()' for an HTML browser interface to help. 318s Type 'q()' to quit R. 318s 318s > ## git2r, R bindings to the libgit2 library. 318s > ## Copyright (C) 2013-2023 The git2r contributors 318s > ## 318s > ## This program is free software; you can redistribute it and/or modify 318s > ## it under the terms of the GNU General Public License, version 2, 318s > ## as published by the Free Software Foundation. 318s > ## 318s > ## git2r is distributed in the hope that it will be useful, 318s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 318s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 318s > ## GNU General Public License for more details. 318s > ## 318s > ## You should have received a copy of the GNU General Public License along 318s > ## with this program; if not, write to the Free Software Foundation, Inc., 318s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 318s > 318s > library(git2r) 318s > 318s > ## For debugging 318s > sessionInfo() 318s R version 4.3.3 (2024-02-29) 318s Platform: aarch64-unknown-linux-gnu (64-bit) 318s Running under: Ubuntu Noble Numbat (development branch) 318s 318s Matrix products: default 318s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 318s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 318s 318s locale: 318s [1] C 318s 318s time zone: Etc/UTC 318s tzcode source: system (glibc) 318s 318s attached base packages: 318s [1] stats graphics grDevices utils datasets methods base 318s 318s other attached packages: 318s [1] git2r_0.33.0 318s 318s loaded via a namespace (and not attached): 318s [1] compiler_4.3.3 318s > libgit2_version() 318s $major 318s [1] 1 318s 318s $minor 318s [1] 7 318s 318s $rev 318s [1] 2 318s 318s > libgit2_features() 318s $threads 318s [1] TRUE 318s 318s $https 318s [1] TRUE 318s 318s $ssh 318s [1] TRUE 318s 318s > 318s > 318s > ## Create a directory in tempdir 318s > path <- tempfile(pattern = "git2r-") 318s > dir.create(path) 318s > 318s > ## Initialize a repository 318s > repo <- init(path, branch = "main") 318s > config(repo, user.name = "Alice", user.email = "alice@example.org") 318s > 318s > ## Create first commit 318s > writeLines("Hello world!", file.path(path, "test-1.txt")) 318s > add(repo, "test-1.txt") 318s > commit(repo, "First commit message") 318s [45e2b67] 2024-03-16: First commit message 318s > 318s > ## Create and checkout dev branch in repo 318s > checkout(repo, "dev", create = TRUE) 318s > 318s > ## Create second commit 318s > writeLines(c("Hello world!", "HELLO WORLD!"), file.path(path, "test-2.txt")) 318s > add(repo, "test-2.txt") 318s > commit(repo, "Second commit message") 318s [f34bc0c] 2024-03-16: Second commit message 318s > 318s > ## Check files 318s > stopifnot(identical(list.files(path), c("test-1.txt", "test-2.txt"))) 318s > 318s > ## Checkout master branch and check files 318s > checkout(repo, "main") 318s > stopifnot(identical(list.files(path), "test-1.txt")) 318s > 318s > ## Cleanup 318s > unlink(path, recursive = TRUE) 318s > 318s > ## Checkout branch in empty repository 318s > 318s > ## Create a directory in tempdir 318s > path <- tempfile(pattern = "git2r-") 318s > dir.create(path) 318s > 318s > ## Initialize a repository 318s > repo <- init(path) 318s > config(repo, user.name = "Alice", user.email = "alice@example.org") 318s > 318s > ## Create and checkout dev branch in repo 318s > checkout(repo, "dev", create = TRUE) 318s > 318s > ## Create first commit 318s > writeLines("Hello world!", file.path(path, "test-1.txt")) 318s > add(repo, "test-1.txt") 318s > commit(repo, "First commit message") 318s [45e2b67] 2024-03-16: First commit message 318s > 318s > stopifnot(identical(length(branches(repo)), 1L)) 318s > stopifnot(identical(branches(repo)[[1]]$name, "dev")) 318s > 318s > ## Cleanup 318s > unlink(path, recursive = TRUE) 318s > 318s BEGIN TEST checkout_commit.R 318s 318s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 318s Copyright (C) 2024 The R Foundation for Statistical Computing 318s Platform: aarch64-unknown-linux-gnu (64-bit) 318s 318s R is free software and comes with ABSOLUTELY NO WARRANTY. 318s You are welcome to redistribute it under certain conditions. 318s Type 'license()' or 'licence()' for distribution details. 318s 318s R is a collaborative project with many contributors. 318s Type 'contributors()' for more information and 318s 'citation()' on how to cite R or R packages in publications. 318s 318s Type 'demo()' for some demos, 'help()' for on-line help, or 318s 'help.start()' for an HTML browser interface to help. 318s Type 'q()' to quit R. 318s 318s > ## git2r, R bindings to the libgit2 library. 318s > ## Copyright (C) 2013-2023 The git2r contributors 318s > ## 318s > ## This program is free software; you can redistribute it and/or modify 318s > ## it under the terms of the GNU General Public License, version 2, 318s > ## as published by the Free Software Foundation. 318s > ## 318s > ## git2r is distributed in the hope that it will be useful, 318s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 318s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 318s > ## GNU General Public License for more details. 318s > ## 318s > ## You should have received a copy of the GNU General Public License along 318s > ## with this program; if not, write to the Free Software Foundation, Inc., 318s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 318s > 318s > library("git2r") 318s > 318s > ## For debugging 318s > sessionInfo() 318s R version 4.3.3 (2024-02-29) 318s Platform: aarch64-unknown-linux-gnu (64-bit) 318s Running under: Ubuntu Noble Numbat (development branch) 318s 318s Matrix products: default 318s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 318s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 318s 318s locale: 318s [1] C 318s 318s time zone: Etc/UTC 318s tzcode source: system (glibc) 318s 318s attached base packages: 318s [1] stats graphics grDevices utils datasets methods base 318s 318s other attached packages: 318s [1] git2r_0.33.0 318s 318s loaded via a namespace (and not attached): 318s [1] compiler_4.3.3 318s > libgit2_version() 318s $major 318s [1] 1 318s 318s $minor 318s [1] 7 318s 318s $rev 318s [1] 2 318s 318s > libgit2_features() 318s $threads 318s [1] TRUE 318s 318s $https 318s [1] TRUE 318s 318s $ssh 318s [1] TRUE 318s 318s > 318s > 318s > ## Create a directory in tempdir 318s > path <- tempfile(pattern = "git2r-") 318s > dir.create(path) 318s > 318s > ## Initialize a repository 318s > repo <- init(path) 318s > config(repo, user.name = "Alice", user.email = "alice@example.org") 318s > 318s > ## Create first commit 318s > writeLines("Hello world!", file.path(path, "test-1.txt")) 318s > add(repo, "test-1.txt") 318s > commit_1 <- commit(repo, "First commit message") 318s > 318s > ## Create and checkout dev branch in repo 318s > checkout(repo, "dev", create = TRUE) 318s > 318s > ## Create second commit 318s > writeLines(c("Hello world!", "HELLO WORLD!"), file.path(path, "test-2.txt")) 318s > add(repo, "test-2.txt") 318s > commit_2 <- commit(repo, "Second commit message") 318s > 318s > ## Check files 318s > stopifnot(identical(list.files(path), c("test-1.txt", "test-2.txt"))) 318s > 318s > ## Checkout commit_1 and check files 318s > checkout(commit_1) 318s > stopifnot(identical(list.files(path), "test-1.txt")) 318s > 318s > ## Checkout commit_2 and check files 318s > checkout(commit_2) 318s > stopifnot(identical(list.files(path), c("test-1.txt", "test-2.txt"))) 318s > 318s > ## Cleanup 318s > unlink(path, recursive = TRUE) 318s > 318s BEGIN TEST checkout_tag.R 319s 319s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 319s Copyright (C) 2024 The R Foundation for Statistical Computing 319s Platform: aarch64-unknown-linux-gnu (64-bit) 319s 319s R is free software and comes with ABSOLUTELY NO WARRANTY. 319s You are welcome to redistribute it under certain conditions. 319s Type 'license()' or 'licence()' for distribution details. 319s 319s R is a collaborative project with many contributors. 319s Type 'contributors()' for more information and 319s 'citation()' on how to cite R or R packages in publications. 319s 319s Type 'demo()' for some demos, 'help()' for on-line help, or 319s 'help.start()' for an HTML browser interface to help. 319s Type 'q()' to quit R. 319s 319s > ## git2r, R bindings to the libgit2 library. 319s > ## Copyright (C) 2013-2023 The git2r contributors 319s > ## 319s > ## This program is free software; you can redistribute it and/or modify 319s > ## it under the terms of the GNU General Public License, version 2, 319s > ## as published by the Free Software Foundation. 319s > ## 319s > ## git2r is distributed in the hope that it will be useful, 319s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 319s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 319s > ## GNU General Public License for more details. 319s > ## 319s > ## You should have received a copy of the GNU General Public License along 319s > ## with this program; if not, write to the Free Software Foundation, Inc., 319s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 319s > 319s > library(git2r) 319s > 319s > ## For debugging 319s > sessionInfo() 319s R version 4.3.3 (2024-02-29) 319s Platform: aarch64-unknown-linux-gnu (64-bit) 319s Running under: Ubuntu Noble Numbat (development branch) 319s 319s Matrix products: default 319s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 319s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 319s 319s locale: 319s [1] C 319s 319s time zone: Etc/UTC 319s tzcode source: system (glibc) 319s 319s attached base packages: 319s [1] stats graphics grDevices utils datasets methods base 319s 319s other attached packages: 319s [1] git2r_0.33.0 319s 319s loaded via a namespace (and not attached): 319s [1] compiler_4.3.3 319s > libgit2_version() 319s $major 319s [1] 1 319s 319s $minor 319s [1] 7 319s 319s $rev 319s [1] 2 319s 319s > libgit2_features() 319s $threads 319s [1] TRUE 319s 319s $https 319s [1] TRUE 319s 319s $ssh 319s [1] TRUE 319s 319s > 319s > 319s > ## Create a directory in tempdir 319s > path <- tempfile(pattern = "git2r-") 319s > dir.create(path) 319s > 319s > ## Initialize a repository 319s > repo <- init(path) 319s > config(repo, user.name = "Alice", user.email = "alice@example.org") 319s > 319s > ## Create first commit 319s > writeLines("Hello world!", file.path(path, "test-1.txt")) 319s > add(repo, "test-1.txt") 319s > commit_1 <- commit(repo, "First commit message") 319s > tag_1 <- tag(repo, "Tag1", "First tag message") 319s > 319s > ## Create and checkout dev branch in repo 319s > checkout(repo, "dev", create = TRUE) 319s > 319s > ## Create second commit 319s > writeLines(c("Hello world!", "HELLO WORLD!"), file.path(path, "test-2.txt")) 319s > add(repo, "test-2.txt") 319s > commit_2 <- commit(repo, "Second commit message") 319s > tag_2 <- tag(repo, "Tag2", "Second tag message") 319s > 319s > ## Check files 319s > stopifnot(identical(list.files(path), c("test-1.txt", "test-2.txt"))) 319s > 319s > ## Checkout tag_1 and check files 319s > checkout(tag_1) 319s > stopifnot(identical(list.files(path), "test-1.txt")) 319s > 319s > ## Checkout tag_2 and check files 319s > checkout(tag_2) 319s > stopifnot(identical(list.files(path), c("test-1.txt", "test-2.txt"))) 319s > 319s > ## Checkout "Tag1" and check files 319s > checkout(repo, "Tag1") 319s > stopifnot(identical(list.files(path), "test-1.txt")) 319s > 319s > ## Cleanup 319s > unlink(path, recursive = TRUE) 319s > 319s BEGIN TEST clone_bare.R 319s 319s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 319s Copyright (C) 2024 The R Foundation for Statistical Computing 319s Platform: aarch64-unknown-linux-gnu (64-bit) 319s 319s R is free software and comes with ABSOLUTELY NO WARRANTY. 319s You are welcome to redistribute it under certain conditions. 319s Type 'license()' or 'licence()' for distribution details. 319s 319s R is a collaborative project with many contributors. 319s Type 'contributors()' for more information and 319s 'citation()' on how to cite R or R packages in publications. 319s 319s Type 'demo()' for some demos, 'help()' for on-line help, or 319s 'help.start()' for an HTML browser interface to help. 319s Type 'q()' to quit R. 319s 319s > ## git2r, R bindings to the libgit2 library. 319s > ## Copyright (C) 2013-2023 The git2r contributors 319s > ## 319s > ## This program is free software; you can redistribute it and/or modify 319s > ## it under the terms of the GNU General Public License, version 2, 319s > ## as published by the Free Software Foundation. 319s > ## 319s > ## git2r is distributed in the hope that it will be useful, 319s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 319s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 319s > ## GNU General Public License for more details. 319s > ## 319s > ## You should have received a copy of the GNU General Public License along 319s > ## with this program; if not, write to the Free Software Foundation, Inc., 319s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 319s > 319s > library("git2r") 319s > 319s > ## For debugging 319s > sessionInfo() 319s R version 4.3.3 (2024-02-29) 319s Platform: aarch64-unknown-linux-gnu (64-bit) 319s Running under: Ubuntu Noble Numbat (development branch) 319s 319s Matrix products: default 319s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 319s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 319s 319s locale: 319s [1] C 319s 319s time zone: Etc/UTC 319s tzcode source: system (glibc) 319s 319s attached base packages: 319s [1] stats graphics grDevices utils datasets methods base 319s 319s other attached packages: 319s [1] git2r_0.33.0 319s 319s loaded via a namespace (and not attached): 319s [1] compiler_4.3.3 319s > libgit2_version() 319s $major 319s [1] 1 319s 319s $minor 319s [1] 7 319s 319s $rev 319s [1] 2 319s 319s > libgit2_features() 319s $threads 319s [1] TRUE 319s 319s $https 319s [1] TRUE 319s 319s $ssh 319s [1] TRUE 319s 319s > 319s > 319s > ## Create 2 directories in tempdir 319s > path_bare <- tempfile(pattern = "git2r-") 319s > path_repo <- tempfile(pattern = "git2r-") 319s > dir.create(path_bare) 319s > dir.create(path_repo) 319s > 319s > ## Initialize a repository 319s > repo <- init(path_repo) 319s > config(repo, user.name = "Alice", user.email = "alice@example.org") 319s > 319s > ## Add commit to repo 319s > writeLines("Hello world", con = file.path(path_repo, "test.txt")) 319s > add(repo, "test.txt") 319s > commit_1 <- commit(repo, "Commit message") 319s > 319s > ## Check bare argument 319s > tools::assertError(clone(path_repo, path_bare, bare = c(TRUE, TRUE))) 319s > tools::assertError(clone(path_repo, path_bare, bare = 1)) 319s > tools::assertError(clone(path_repo, path_bare, bare = 1L)) 319s > tools::assertError(clone(path_repo, path_bare, bare = "test")) 319s > 319s > ## Clone repo to bare repository 319s > bare_repo <- clone(path_repo, path_bare, bare = TRUE) 319s cloning into '/tmp/RtmpddybXI/git2r-e473c70781c'... 319s > 319s > ## Check the repositores 319s > stopifnot(identical(is_bare(bare_repo), TRUE)) 319s > stopifnot(identical(is_bare(repo), FALSE)) 319s > 319s > ## Check result in bare repository 319s > stopifnot(identical(length(commits(bare_repo)), 1L)) 319s > bare_commit_1 <- commits(bare_repo)[[1]] 319s > stopifnot(identical(sha(commit_1), sha(bare_commit_1))) 319s > stopifnot(identical(commit_1$author, bare_commit_1$author)) 319s > stopifnot(identical(commit_1$committer, bare_commit_1$committer)) 319s > stopifnot(identical(commit_1$summary, bare_commit_1$summary)) 319s > stopifnot(identical(commit_1$message, bare_commit_1$message)) 319s > stopifnot(!identical(commit_1$repo, bare_commit_1$repo)) 319s > 319s > ## Cleanup 319s > unlink(path_bare, recursive = TRUE) 319s > unlink(path_repo, recursive = TRUE) 319s > 319s BEGIN TEST clone_branch.R 319s 319s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 319s Copyright (C) 2024 The R Foundation for Statistical Computing 319s Platform: aarch64-unknown-linux-gnu (64-bit) 319s 319s R is free software and comes with ABSOLUTELY NO WARRANTY. 319s You are welcome to redistribute it under certain conditions. 319s Type 'license()' or 'licence()' for distribution details. 319s 319s R is a collaborative project with many contributors. 319s Type 'contributors()' for more information and 319s 'citation()' on how to cite R or R packages in publications. 319s 319s Type 'demo()' for some demos, 'help()' for on-line help, or 319s 'help.start()' for an HTML browser interface to help. 319s Type 'q()' to quit R. 319s 320s > ## git2r, R bindings to the libgit2 library. 320s > ## Copyright (C) 2013-2023 The git2r contributors 320s > ## 320s > ## This program is free software; you can redistribute it and/or modify 320s > ## it under the terms of the GNU General Public License, version 2, 320s > ## as published by the Free Software Foundation. 320s > ## 320s > ## git2r is distributed in the hope that it will be useful, 320s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 320s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 320s > ## GNU General Public License for more details. 320s > ## 320s > ## You should have received a copy of the GNU General Public License along 320s > ## with this program; if not, write to the Free Software Foundation, Inc., 320s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 320s > 320s > library(git2r) 320s > 320s > ## For debugging 320s > sessionInfo() 320s R version 4.3.3 (2024-02-29) 320s Platform: aarch64-unknown-linux-gnu (64-bit) 320s Running under: Ubuntu Noble Numbat (development branch) 320s 320s Matrix products: default 320s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 320s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 320s 320s locale: 320s [1] C 320s 320s time zone: Etc/UTC 320s tzcode source: system (glibc) 320s 320s attached base packages: 320s [1] stats graphics grDevices utils datasets methods base 320s 320s other attached packages: 320s [1] git2r_0.33.0 320s 320s loaded via a namespace (and not attached): 320s [1] compiler_4.3.3 320s > libgit2_version() 320s $major 320s [1] 1 320s 320s $minor 320s [1] 7 320s 320s $rev 320s [1] 2 320s 320s > libgit2_features() 320s $threads 320s [1] TRUE 320s 320s $https 320s [1] TRUE 320s 320s $ssh 320s [1] TRUE 320s 320s > 320s > 320s > ## Create directories for repositories in tempdir 320s > path_bare <- tempfile(pattern = "git2r-") 320s > path_repo_1 <- tempfile(pattern = "git2r-") 320s > path_repo_2 <- tempfile(pattern = "git2r-") 320s > 320s > dir.create(path_bare) 320s > dir.create(path_repo_1) 320s > dir.create(path_repo_2) 320s > 320s > ## Create bare repository 320s > bare_repo <- init(path_bare, bare = TRUE) 320s > 320s > ## Clone to repo 1 320s > repo_1 <- clone(path_bare, path_repo_1) 320s cloning into '/tmp/Rtmp8BSHiY/git2r-e5336c91ab7'... 320s > config(repo_1, user.name = "Alice", user.email = "alice@example.org") 320s > 320s > ## Add changes to repo 1 320s > writeLines("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 320s + con = file.path(path_repo_1, "test-1.txt")) 320s > add(repo_1, "test-1.txt") 320s > commit_1 <- commit(repo_1, "First commit message") 320s > branch_name <- branches(repo_1)[[1]]$name 320s > 320s > ## Create 'dev' branch 320s > checkout(branch_create(commit_1, name = "dev")) 320s > 320s > ## Add more changes to repo 1 320s > writeLines(c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 320s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 320s + con = file.path(path_repo_1, "test-1.txt")) 320s > add(repo_1, "test-1.txt") 320s > commit(repo_1, "Second commit message") 320s [2cd8ae8] 2024-03-16: Second commit message 320s > 320s > ## Add more changes to repo 1 320s > writeLines( 320s + c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 320s + "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad", 320s + "minim veniam, quis nostrud exercitation ullamco laboris nisi ut"), 320s + con = file.path(path_repo_1, "test-1.txt")) 320s > add(repo_1, "test-1.txt") 320s > commit(repo_1, "Third commit message") 320s [8144c2f] 2024-03-16: Third commit message 320s > 320s > ## Push to bare 320s > push(repo_1, "origin", paste0("refs/heads/", branch_name)) 320s > push(repo_1, "origin", "refs/heads/dev") 320s > 320s > ## Print branch 320s > branches(repo_1)[[paste0("origin/", branch_name)]] 320s [76727b] (origin @ /tmp/Rtmp8BSHiY/git2r-e5365d590ef) master 320s > 320s > ## Clone to repo 2 320s > repo_2 <- clone(url = path_bare, local_path = path_repo_2, branch = "dev") 320s cloning into '/tmp/Rtmp8BSHiY/git2r-e53586f25df'... 320s > config(repo_2, user.name = "Bob", user.email = "bob@example.org") 320s > 320s > ## Check branch and commits 320s > stopifnot(identical(length(commits(repo_2)), 3L)) 320s > stopifnot(identical(repository_head(repo_2)$name, "dev")) 320s > 320s > ## Cleanup 320s > unlink(path_bare, recursive = TRUE) 320s > unlink(path_repo_1, recursive = TRUE) 320s > unlink(path_repo_2, recursive = TRUE) 320s > 320s BEGIN TEST clone_checkout.R 320s 320s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 320s Copyright (C) 2024 The R Foundation for Statistical Computing 320s Platform: aarch64-unknown-linux-gnu (64-bit) 320s 320s R is free software and comes with ABSOLUTELY NO WARRANTY. 320s You are welcome to redistribute it under certain conditions. 320s Type 'license()' or 'licence()' for distribution details. 320s 320s R is a collaborative project with many contributors. 320s Type 'contributors()' for more information and 320s 'citation()' on how to cite R or R packages in publications. 320s 320s Type 'demo()' for some demos, 'help()' for on-line help, or 320s 'help.start()' for an HTML browser interface to help. 320s Type 'q()' to quit R. 320s 320s > ## git2r, R bindings to the libgit2 library. 320s > ## Copyright (C) 2013-2023 The git2r contributors 320s > ## 320s > ## This program is free software; you can redistribute it and/or modify 320s > ## it under the terms of the GNU General Public License, version 2, 320s > ## as published by the Free Software Foundation. 320s > ## 320s > ## git2r is distributed in the hope that it will be useful, 320s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 320s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 320s > ## GNU General Public License for more details. 320s > ## 320s > ## You should have received a copy of the GNU General Public License along 320s > ## with this program; if not, write to the Free Software Foundation, Inc., 320s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 320s > 320s > library("git2r") 320s > 320s > ## For debugging 320s > sessionInfo() 320s R version 4.3.3 (2024-02-29) 320s Platform: aarch64-unknown-linux-gnu (64-bit) 320s Running under: Ubuntu Noble Numbat (development branch) 320s 320s Matrix products: default 320s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 320s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 320s 320s locale: 320s [1] C 320s 320s time zone: Etc/UTC 320s tzcode source: system (glibc) 320s 320s attached base packages: 320s [1] stats graphics grDevices utils datasets methods base 320s 320s other attached packages: 320s [1] git2r_0.33.0 320s 320s loaded via a namespace (and not attached): 320s [1] compiler_4.3.3 320s > libgit2_version() 320s $major 320s [1] 1 320s 320s $minor 320s [1] 7 320s 320s $rev 320s [1] 2 320s 320s > libgit2_features() 320s $threads 320s [1] TRUE 320s 320s $https 320s [1] TRUE 320s 320s $ssh 320s [1] TRUE 320s 320s > 320s > 320s > ## Create 2 directories in tempdir 320s > path_src <- tempfile(pattern = "git2r-") 320s > path_tgt <- tempfile(pattern = "git2r-") 320s > dir.create(path_tgt) 320s > dir.create(path_src) 320s > 320s > ## Initialize a repository 320s > repo_src <- init(path_src) 320s > config(repo_src, user.name = "Alice", user.email = "alice@example.org") 320s > 320s > ## Add commit to repo 320s > filename <- "test.txt" 320s > writeLines("Hello world", con = file.path(path_src, filename)) 320s > add(repo_src, "test.txt") 320s > commit_src <- commit(repo_src, "Commit message") 320s > 320s > ## Check checkout argument 320s > tools::assertError(clone(path_src, path_tgt, checkout = c(FALSE, TRUE))) 320s > tools::assertError(clone(path_src, path_tgt, checkout = 1)) 320s > tools::assertError(clone(path_src, path_tgt, checkout = 1L)) 320s > tools::assertError(clone(path_src, path_tgt, checkout = "test")) 320s > 320s > ## Clone source to target repository without checking out any files 320s > repo_tgt <- clone(path_src, path_tgt, checkout = FALSE) 320s cloning into '/tmp/RtmpCHWuMO/git2r-e5f615ebfad'... 320s > 320s > ## List files in the repositores 320s > stopifnot(identical(list.files(path_src), filename)) 320s > stopifnot(identical(list.files(path_tgt), character(0))) 320s > 320s > ## Compare commits 320s > stopifnot(identical(length(commits(repo_tgt)), 1L)) 320s > commit_tgt <- last_commit(repo_tgt) 320s > stopifnot(identical(sha(last_commit(path_tgt)), sha(commit_tgt))) 320s > stopifnot(identical(sha(commit_src), sha(commit_tgt))) 320s > stopifnot(identical(commit_src$author, commit_tgt$author)) 320s > stopifnot(identical(commit_src$committer, commit_tgt$committer)) 320s > stopifnot(identical(commit_src$summary, commit_tgt$summary)) 320s > stopifnot(identical(commit_src$message, commit_tgt$message)) 320s > stopifnot(!identical(commit_src$repo, commit_tgt$repo)) 320s > 320s > ## Cleanup 320s > unlink(path_tgt, recursive = TRUE) 320s > unlink(path_src, recursive = TRUE) 320s > 320s BEGIN TEST commit.R 320s 320s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 320s Copyright (C) 2024 The R Foundation for Statistical Computing 320s Platform: aarch64-unknown-linux-gnu (64-bit) 320s 320s R is free software and comes with ABSOLUTELY NO WARRANTY. 320s You are welcome to redistribute it under certain conditions. 320s Type 'license()' or 'licence()' for distribution details. 320s 320s R is a collaborative project with many contributors. 320s Type 'contributors()' for more information and 320s 'citation()' on how to cite R or R packages in publications. 320s 320s Type 'demo()' for some demos, 'help()' for on-line help, or 320s 'help.start()' for an HTML browser interface to help. 320s Type 'q()' to quit R. 320s 320s > ## git2r, R bindings to the libgit2 library. 320s > ## Copyright (C) 2013-2023 The git2r contributors 320s > ## 320s > ## This program is free software; you can redistribute it and/or modify 320s > ## it under the terms of the GNU General Public License, version 2, 320s > ## as published by the Free Software Foundation. 320s > ## 320s > ## git2r is distributed in the hope that it will be useful, 320s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 320s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 320s > ## GNU General Public License for more details. 320s > ## 320s > ## You should have received a copy of the GNU General Public License along 320s > ## with this program; if not, write to the Free Software Foundation, Inc., 320s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 320s > 320s > library(git2r) 321s > source("util/check.R") 321s > 321s > ## For debugging 321s > sessionInfo() 321s R version 4.3.3 (2024-02-29) 321s Platform: aarch64-unknown-linux-gnu (64-bit) 321s Running under: Ubuntu Noble Numbat (development branch) 321s 321s Matrix products: default 321s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 321s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 321s 321s locale: 321s [1] C 321s 321s time zone: Etc/UTC 321s tzcode source: system (glibc) 321s 321s attached base packages: 321s [1] stats graphics grDevices utils datasets methods base 321s 321s other attached packages: 321s [1] git2r_0.33.0 321s 321s loaded via a namespace (and not attached): 321s [1] compiler_4.3.3 321s > libgit2_version() 321s $major 321s [1] 1 321s 321s $minor 321s [1] 7 321s 321s $rev 321s [1] 2 321s 321s > libgit2_features() 321s $threads 321s [1] TRUE 321s 321s $https 321s [1] TRUE 321s 321s $ssh 321s [1] TRUE 321s 321s > 321s > 321s > ## Create a directory in tempdir 321s > path <- tempfile(pattern = "git2r-") 321s > dir.create(path) 321s > 321s > ## Initialize a repository 321s > repo <- init(path) 321s > config(repo, user.name = "Alice", user.email = "alice@example.org") 321s > 321s > ## Commit without adding changes should produce an error 321s > tools::assertError(commit(repo, "Test to commit")) 321s > 321s > ## Create a file 321s > writeLines("Hello world!", file.path(path, "test.txt")) 321s > 321s > ## Commit without adding changes should produce an error 321s > tools::assertError(commit(repo, "Test to commit")) 321s > 321s > ## Add 321s > add(repo, "test.txt") 321s > 321s > ## Commit with empty message should produce an error 321s > tools::assertError(commit(repo, "")) 321s > 321s > ## Commit 321s > commit_1 <- commit(repo, "Commit message", session = TRUE) 321s > summary(commit_1) 321s Commit: 4292f095929394caf8380d86833f5ac9bc08b365 321s Author: Alice 321s When: 2024-03-16 18:45:10 GMT 321s 321s Commit message 321s 321s sessionInfo: 321s R version 4.3.3 (2024-02-29) 321s Platform: aarch64-unknown-linux-gnu (64-bit) 321s Running under: Ubuntu Noble Numbat (development branch) 321s 321s Matrix products: default 321s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 321s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 321s 321s locale: 321s [1] C 321s 321s time zone: Etc/UTC 321s tzcode source: system (glibc) 321s 321s attached base packages: 321s [1] stats graphics grDevices utils datasets methods base 321s 321s other attached packages: 321s [1] git2r_0.33.0 321s 321s loaded via a namespace (and not attached): 321s [1] compiler_4.3.3 tools_4.3.3 321s > tag_1 <- tag(repo, "Tagname1", "Tag message 1") 321s > 321s > ## Check commit 321s > stopifnot(identical(commit_1$author$name, "Alice")) 321s > stopifnot(identical(commit_1$author$email, "alice@example.org")) 321s > stopifnot(identical(lookup(repo, sha(commit_1)), commit_1)) 321s > stopifnot(identical(length(commits(repo)), 1L)) 321s > stopifnot(identical(commits(repo)[[1]]$author$name, "Alice")) 321s > stopifnot(identical(commits(repo)[[1]]$author$email, "alice@example.org")) 321s > stopifnot(identical(parents(commit_1), list())) 321s > stopifnot(identical(print(commit_1), commit_1)) 321s [4292f09] 2024-03-16: Commit message 321s > 321s > ## Check is_commit 321s > stopifnot(identical(is_commit(commit_1), TRUE)) 321s > stopifnot(identical(is_commit(5), FALSE)) 321s > 321s > ## Commit without adding changes should produce an error 321s > tools::assertError(commit(repo, "Test to commit")) 321s > 321s > ## Add another commit 321s > writeLines(c("Hello world!", "HELLO WORLD!"), file.path(path, "test.txt")) 321s > add(repo, "test.txt") 321s > commit_2 <- commit(repo, "Commit message 2") 321s > summary(commit_2) 321s Commit: 29ef9706b4d57ed11d33b8ce70f451f283026e00 321s Author: Alice 321s When: 2024-03-16 18:45:10 GMT 321s 321s Commit message 2 321s 1 file changed, 1 insertions, 0 deletions 321s test.txt | -0 +1 in 1 hunk 321s 321s > tag_2 <- tag(repo, "Tagname2", "Tag message 2") 321s > 321s > ## Check relationship 321s > stopifnot(identical(descendant_of(commit_2, commit_1), TRUE)) 321s > stopifnot(identical(descendant_of(commit_1, commit_2), FALSE)) 321s > stopifnot(identical(descendant_of(tag_2, tag_1), TRUE)) 321s > stopifnot(identical(descendant_of(tag_1, tag_2), FALSE)) 321s > stopifnot(identical(descendant_of(branches(repo)[[1]], commit_1), TRUE)) 321s > stopifnot(identical(descendant_of(commit_1, branches(repo)[[1]]), FALSE)) 321s > stopifnot(identical(length(parents(commit_2)), 1L)) 321s > stopifnot(identical(parents(commit_2)[[1]], commit_1)) 321s > 321s > ## Check contributions 321s > stopifnot(identical( 321s + colnames(contributions(repo, by = "author", breaks = "day")), 321s + c("when", "author", "n"))) 321s > stopifnot(identical(colnames(contributions(repo)), 321s + c("when", "n"))) 321s > stopifnot(identical(nrow(contributions(repo)), 1L)) 321s > stopifnot(identical(contributions(repo)$n, 2L)) 321s > stopifnot(identical(contributions(repo, by = "author", breaks = "day")$n, 2L)) 321s > 321s > ## Add another commit with 'all' argument 321s > writeLines(c("Hello world!", "HELLO WORLD!", "HeLlO wOrLd!"), 321s + file.path(path, "test.txt")) 321s > commit(repo, "Commit message 3", all = TRUE) 321s [a72d1d9] 2024-03-16: Commit message 3 321s > 321s > status_clean <- structure(list(staged = empty_named_list(), 321s + unstaged = empty_named_list(), 321s + untracked = empty_named_list()), 321s + class = "git_status") 321s > stopifnot(identical(status(repo), status_clean)) 321s > 321s > ## Delete file and commit with 'all' argument 321s > file.remove(file.path(path, "test.txt")) 321s [1] TRUE 321s > commit(repo, "Commit message 4", all = TRUE) 321s [e809db8] 2024-03-16: Commit message 4 321s > 321s > stopifnot(identical(status(repo), status_clean)) 321s > 321s > ## Add and commit multiple tracked files with 'all' argument 321s > writeLines(sample(letters, 3), file.path(path, "test2.txt")) 321s > add(repo, "test2.txt") 321s > writeLines(sample(letters, 3), file.path(path, "test3.txt")) 321s > add(repo, "test3.txt") 321s > writeLines(sample(letters, 3), file.path(path, "test4.txt")) 321s > add(repo, "test4.txt") 321s > commit(repo, "Commit message 5") 321s [2fea86e] 2024-03-16: Commit message 5 321s > 321s > stopifnot(identical(status(repo), status_clean)) 321s > 321s > writeLines(sample(letters, 3), file.path(path, "test2.txt")) 321s > writeLines(sample(letters, 3), file.path(path, "test3.txt")) 321s > writeLines(sample(letters, 3), file.path(path, "test4.txt")) 321s > commit(repo, "Commit message 6", all = TRUE) 321s [7071087] 2024-03-16: Commit message 6 321s > 321s > stopifnot(identical(status(repo), status_clean)) 321s > 321s > ## Add one tracked file and delete another with 'all' argument 321s > writeLines(sample(letters, 3), file.path(path, "test2.txt")) 321s > file.remove(file.path(path, "test4.txt")) 321s [1] TRUE 321s > commit(repo, "Commit message 7", all = TRUE) 321s [dbca4a6] 2024-03-16: Commit message 7 321s > 321s > stopifnot(identical(status(repo), status_clean)) 321s > 321s > ## Delete multiple tracked files with 'all' argument 321s > file.remove(file.path(path, "test2.txt")) 321s [1] TRUE 321s > file.remove(file.path(path, "test3.txt")) 321s [1] TRUE 321s > commit(repo, "Commit message 8", all = TRUE) 321s [0b28146] 2024-03-16: Commit message 8 321s > 321s > stopifnot(identical(status(repo), status_clean)) 321s > 321s > ## Check max number of commits in output 321s > stopifnot(identical(length(commits(repo)), 8L)) 321s > stopifnot(identical(length(commits(repo, n = -1)), 8L)) 321s > stopifnot(identical(length(commits(repo, n = 2)), 2L)) 321s > tools::assertError(commits(repo, n = 2.2)) 321s > tools::assertError(commits(repo, n = "2")) 321s > tools::assertError(commits(repo, n = 1:2)) 321s > 321s > ## Check to coerce repository to data.frame 321s > df <- as.data.frame(repo) 321s > stopifnot(identical(dim(df), c(8L, 6L))) 321s > stopifnot(identical(names(df), c("sha", "summary", "message", 321s + "author", "email", "when"))) 321s > 321s > ## Set working directory to path and check commits 321s > setwd(path) 321s > stopifnot(identical(sha(last_commit()), sha(commits(repo, n = 1)[[1]]))) 321s > stopifnot(identical(length(commits()), 8L)) 321s > stopifnot(identical(length(commits(n = -1)), 8L)) 321s > stopifnot(identical(length(commits(n = 2)), 2L)) 321s > tools::assertError(commits(n = 2.2)) 321s > tools::assertError(commits(n = "2")) 321s > 321s > ## Check plot method 321s > plot_file <- tempfile(fileext = ".pdf") 321s > pdf(plot_file) 321s > plot(repo) 321s > dev.off() 321s null device 321s 1 321s > stopifnot(file.exists(plot_file)) 321s > unlink(plot_file) 321s > 321s > ## Check punch card plot method 321s > punch_card_plot_file <- tempfile(fileext = ".pdf") 321s > pdf(punch_card_plot_file) 321s > punch_card(repo) 321s > dev.off() 321s null device 321s 1 321s > stopifnot(file.exists(punch_card_plot_file)) 321s > unlink(punch_card_plot_file) 321s > 321s > ## Check that 'git2r_arg_check_commit' raise error 321s > res <- tools::assertError(.Call(git2r:::git2r_commit_tree, NULL)) 321s > stopifnot(length(grep("'commit' must be an S3 class git_commit", 321s + res[[1]]$message)) > 0) 321s > res <- tools::assertError(.Call(git2r:::git2r_commit_tree, 3)) 321s > stopifnot(length(grep("'commit' must be an S3 class git_commit", 321s + res[[1]]$message)) > 0) 321s > res <- tools::assertError(.Call(git2r:::git2r_commit_tree, repo)) 321s > stopifnot(length(grep("'commit' must be an S3 class git_commit", 321s + res[[1]]$message)) > 0) 321s > commit_1$sha <- NA_character_ 321s > res <- tools::assertError(.Call(git2r:::git2r_commit_tree, commit_1)) 321s > stopifnot(length(grep("'commit' must be an S3 class git_commit", 321s + res[[1]]$message)) > 0) 321s > 321s > ## Cleanup 321s > unlink(path, recursive = TRUE) 321s > 321s > if (identical(Sys.getenv("NOT_CRAN"), "true") || 321s + identical(Sys.getenv("R_COVR"), "true")) { 321s + path <- tempfile(pattern = "git2r-") 321s + dir.create(path) 321s + setwd(path) 321s + system("git clone --depth 2 https://github.com/ropensci/git2r.git") 321s + 321s + ## Check the number of commits in the shallow clone. 321s + stopifnot(identical(length(commits(repository("git2r"))), 2L)) 321s + stopifnot(identical(length(commits(repository("git2r"), n = 1)), 1L)) 321s + 321s + ## Cleanup 321s + unlink(path, recursive = TRUE) 321s + } 321s > 321s sh: 0: getcwd() failed: No such file or directory 321s BEGIN TEST commits_path.R 321s 321s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 321s Copyright (C) 2024 The R Foundation for Statistical Computing 321s Platform: aarch64-unknown-linux-gnu (64-bit) 321s 321s R is free software and comes with ABSOLUTELY NO WARRANTY. 321s You are welcome to redistribute it under certain conditions. 321s Type 'license()' or 'licence()' for distribution details. 321s 321s R is a collaborative project with many contributors. 321s Type 'contributors()' for more information and 321s 'citation()' on how to cite R or R packages in publications. 321s 321s Type 'demo()' for some demos, 'help()' for on-line help, or 321s 'help.start()' for an HTML browser interface to help. 321s Type 'q()' to quit R. 321s 321s > ## git2r, R bindings to the libgit2 library. 321s > ## Copyright (C) 2013-2023 The git2r contributors 321s > ## 321s > ## This program is free software; you can redistribute it and/or modify 321s > ## it under the terms of the GNU General Public License, version 2, 321s > ## as published by the Free Software Foundation. 321s > ## 321s > ## git2r is distributed in the hope that it will be useful, 321s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 321s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 321s > ## GNU General Public License for more details. 321s > ## 321s > ## You should have received a copy of the GNU General Public License along 321s > ## with this program; if not, write to the Free Software Foundation, Inc., 321s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 321s > 321s > library(git2r) 321s > 321s > ## For debugging 321s > sessionInfo() 321s R version 4.3.3 (2024-02-29) 321s Platform: aarch64-unknown-linux-gnu (64-bit) 321s Running under: Ubuntu Noble Numbat (development branch) 321s 321s Matrix products: default 321s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 321s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 321s 321s locale: 321s [1] C 321s 321s time zone: Etc/UTC 321s tzcode source: system (glibc) 321s 321s attached base packages: 321s [1] stats graphics grDevices utils datasets methods base 321s 321s other attached packages: 321s [1] git2r_0.33.0 321s 321s loaded via a namespace (and not attached): 321s [1] compiler_4.3.3 321s > libgit2_version() 321s $major 321s [1] 1 321s 321s $minor 321s [1] 7 321s 321s $rev 321s [1] 2 321s 321s > libgit2_features() 321s $threads 321s [1] TRUE 321s 321s $https 321s [1] TRUE 321s 321s $ssh 321s [1] TRUE 321s 321s > 321s > 321s > ## Create a directory in tempdir 321s > path <- tempfile(pattern = "git2r-") 321s > dir.create(path) 321s > 321s > ## Initialize a repository 321s > repo <- init(path, branch = "main") 321s > config(repo, user.name = "Alice", user.email = "alice@example.org") 321s > 321s > ## Create two files and alternate commits 321s > writeLines("1", file.path(path, "odd.txt")) 321s > add(repo, "odd.txt") 321s > c1 <- commit(repo, "commit 1") 321s > 321s > writeLines("2", file.path(path, "even.txt")) 321s > add(repo, "even.txt") 321s > c2 <- commit(repo, "commit 2") 321s > 321s > writeLines("3", file.path(path, "odd.txt")) 321s > add(repo, "odd.txt") 321s > c3 <- commit(repo, "commit 3") 321s > 321s > writeLines("4", file.path(path, "even.txt")) 321s > add(repo, "even.txt") 321s > c4 <- commit(repo, "commit 4") 321s > 321s > writeLines("5", file.path(path, "odd.txt")) 321s > add(repo, "odd.txt") 321s > c5 <- commit(repo, "commit 5") 321s > 321s > writeLines("6", file.path(path, "even.txt")) 321s > add(repo, "even.txt") 321s > c6 <- commit(repo, "commit 6") 321s > 321s > commits_all <- commits(repo) 321s > stopifnot(length(commits_all) == 6) 321s > 321s > ## Test path 321s > commits_odd <- commits(repo, path = "odd.txt") 321s > stopifnot(length(commits_odd) == 3) 321s > stopifnot(commits_odd[[1]]$sha == c5$sha) 321s > stopifnot(commits_odd[[2]]$sha == c3$sha) 321s > stopifnot(commits_odd[[3]]$sha == c1$sha) 321s > 321s > commits_even <- commits(repo, path = "even.txt") 321s > stopifnot(length(commits_even) == 3) 321s > stopifnot(commits_even[[1]]$sha == c6$sha) 321s > stopifnot(commits_even[[2]]$sha == c4$sha) 321s > stopifnot(commits_even[[3]]$sha == c2$sha) 321s > 321s > ## Test reverse 321s > commits_odd_rev <- commits(repo, reverse = TRUE, path = "odd.txt") 321s > stopifnot(length(commits_odd_rev) == 3) 321s > stopifnot(commits_odd_rev[[1]]$sha == c1$sha) 321s > stopifnot(commits_odd_rev[[2]]$sha == c3$sha) 321s > stopifnot(commits_odd_rev[[3]]$sha == c5$sha) 321s > 321s > commits_even_rev <- commits(repo, reverse = TRUE, path = "even.txt") 321s > stopifnot(length(commits_even_rev) == 3) 321s > stopifnot(commits_even_rev[[1]]$sha == c2$sha) 321s > stopifnot(commits_even_rev[[2]]$sha == c4$sha) 321s > stopifnot(commits_even_rev[[3]]$sha == c6$sha) 321s > 321s > ## Test n 321s > commits_odd_n <- commits(repo, n = 2, path = "odd.txt") 321s > stopifnot(length(commits_odd_n) == 2) 321s > stopifnot(commits_odd_n[[1]]$sha == c5$sha) 321s > stopifnot(commits_odd_n[[2]]$sha == c3$sha) 321s > 321s > commits_even_n <- commits(repo, n = 2, path = "even.txt") 321s > stopifnot(length(commits_even_n) == 2) 321s > stopifnot(commits_even_n[[1]]$sha == c6$sha) 321s > stopifnot(commits_even_n[[2]]$sha == c4$sha) 321s > 321s > commits_odd_0 <- commits(repo, n = 0, path = "odd.txt") 321s > stopifnot(length(commits_odd_0) == 0) 321s > stopifnot(identical(commits_odd_0, list())) 321s > 321s > commits_even_0 <- commits(repo, n = 0, path = "even.txt") 321s > stopifnot(length(commits_even_0) == 0) 321s > stopifnot(identical(commits_even_0, list())) 321s > 321s > ## Test ref 321s > checkout(repo, branch = "test-ref", create = TRUE) 321s > 321s > writeLines("7", file.path(path, "odd.txt")) 321s > add(repo, "odd.txt") 321s > c7 <- commit(repo, "commit 7") 321s > 321s > writeLines("8", file.path(path, "even.txt")) 321s > add(repo, "even.txt") 321s > c8 <- commit(repo, "commit 8") 321s > 321s > commits_odd_ref <- commits(repo, ref = "main", path = "odd.txt") 321s > stopifnot(length(commits_odd_ref) == 3) 321s > stopifnot(commits_odd_ref[[1]]$sha == c5$sha) 321s > stopifnot(commits_odd_ref[[2]]$sha == c3$sha) 321s > stopifnot(commits_odd_ref[[3]]$sha == c1$sha) 321s > 321s > commits_even_ref <- commits(repo, ref = "main", path = "even.txt") 321s > stopifnot(length(commits_even_ref) == 3) 321s > stopifnot(commits_even_ref[[1]]$sha == c6$sha) 321s > stopifnot(commits_even_ref[[2]]$sha == c4$sha) 321s > stopifnot(commits_even_ref[[3]]$sha == c2$sha) 321s > 321s > checkout(repo, branch = "main") 321s > 321s > ## Test renaming a file (path does not support --follow) 321s > writeLines("a file to be renamed", file.path(path, "original.txt")) 321s > add(repo, "original.txt") 321s > c_original <- commit(repo, "commit original") 321s > 321s > commits_original <- commits(repo, path = "original.txt") 321s > stopifnot(length(commits_original) == 1) 321s > stopifnot(commits_original[[1]]$sha == c_original$sha) 321s > 321s > file.rename(file.path(path, "original.txt"), file.path(path, "new.txt")) 321s [1] TRUE 321s > add(repo, c("original.txt", "new.txt")) 321s > c_new <- commit(repo, "commit new") 321s > 321s > commits_new <- commits(repo, path = "new.txt") 321s > stopifnot(length(commits_new) == 1) 321s > stopifnot(commits_new[[1]]$sha == c_new$sha) 321s > 321s > ## Test merge commits 321s > writeLines(letters[1:5], file.path(path, "merge.txt")) 321s > add(repo, "merge.txt") 321s > c_merge_1 <- commit(repo, "commit merge 1") 321s > 321s > checkout(repo, branch = "test-merge", create = TRUE) 321s > cat("z", file = file.path(path, "merge.txt"), append = TRUE) 321s > add(repo, "merge.txt") 321s > c_merge_2 <- commit(repo, "commit merge 2") 321s > 321s > checkout(repo, branch = "main") 321s > writeLines(c("A", letters[2:5]), file.path(path, "merge.txt")) 321s > add(repo, "merge.txt") 321s > c_merge_3 <- commit(repo, "commit merge 3") 321s > 321s > c_merge_4 <- merge(repo, "test-merge") 321s > stopifnot(class(c_merge_4) == "git_merge_result") 321s > 321s > commits_merge <- commits(repo, path = "merge.txt") 321s > stopifnot(length(commits_merge) == 4) 321s > stopifnot(commits_merge[[1]]$sha == c_merge_4$sha) 321s > stopifnot(commits_merge[[2]]$sha == c_merge_3$sha) 321s > stopifnot(commits_merge[[3]]$sha == c_merge_2$sha) 321s > stopifnot(commits_merge[[4]]$sha == c_merge_1$sha) 321s > 321s > ## Test absolute path 321s > writeLines("absolute", file.path(path, "abs.txt")) 321s > add(repo, "abs.txt") 321s > c_abs <- commit(repo, "commit absolute") 321s > 321s > commits_abs <- commits(repo, path = file.path(path, "abs.txt")) 321s > stopifnot(length(commits_abs) == 1) 321s > stopifnot(commits_abs[[1]]$sha == c_abs$sha) 321s > 321s > ## Test topological and time 321s > ## Strategy: 321s > ## - Commit a new file test-time.txt 321s > ## - Commit a change on branch test-time-1 (a) 321s > ## - Commit a change on branch test-time-2 (c) 321s > ## - Commit a change on branch test-time-1 (b) 321s > ## - Commit a change on branch test-time-2 (d) 321s > ## - Merge branch test-time-2 into main (fast-forward) 321s > ## - Merge branch test-time-1 into main (merge commit) 321s > ## 321s > ## $ git log --all --decorate --oneline --graph -n 6 321s > ## * 79e6880 (HEAD -> main) merge test-time-1 321s > ## |\ 321s > ## | * e2f18f1 (test-time-1) commit b 321s > ## | * 5f34820 commit a 321s > ## * | b954ec9 (test-time-2) commit d 321s > ## * | 7ae2fd5 commit c 321s > ## |/ 321s > ## * 923f3ea commit base 321s > Sys.sleep(1) 322s > writeLines(as.character(1:100), file.path(path, "test-time.txt")) 322s > add(repo, "test-time.txt") 322s > c_base <- commit(repo, "commit base") 322s > Sys.sleep(1) 323s > branch_create(commit = c_base, name = "test-time-1") 323s > branch_create(commit = c_base, name = "test-time-2") 323s > 323s > checkout(repo, branch = "test-time-1") 323s > writeLines(c("edit", 2:100), file.path(path, "test-time.txt")) 323s > add(repo, "test-time.txt") 323s > c_a <- commit(repo, "commit a") 324s > Sys.sleep(1) 324s > 324s > checkout(repo, branch = "test-time-2") 324s > writeLines(c(1:25, "edit", 27:100), file.path(path, "test-time.txt")) 324s > add(repo, "test-time.txt") 324s > c_c <- commit(repo, "commit c") 324s > Sys.sleep(1) 325s > 325s > checkout(repo, branch = "test-time-1") 325s > writeLines(c(1:50, "edit", 52:100), file.path(path, "test-time.txt")) 325s > add(repo, "test-time.txt") 325s > c_b <- commit(repo, "commit b") 325s > Sys.sleep(1) 326s > 326s > checkout(repo, branch = "test-time-2") 326s > writeLines(c(1:75, "edit", 77:100), file.path(path, "test-time.txt")) 327s > add(repo, "test-time.txt") 327s > c_d <- commit(repo, "commit d") 327s > Sys.sleep(1) 328s > 328s > checkout(repo, branch = "main") 328s > merge(repo, "test-time-2") # Fast-forward 328s Merge: Fast-forward 328s > merge(repo, "test-time-1") # Merge commit 328s Merge 328s > c_merge_time <- commits(repo, n = 1)[[1]] 328s > 328s > ## topological - commits in test-time-2 come first because it was 328s > ## merged first 328s > stopifnot(identical( 328s + commits(repo, topological = TRUE, time = FALSE, path = "test-time.txt"), 328s + list(c_merge_time, c_b, c_a, c_d, c_c, c_base) 328s + )) 328s > stopifnot(identical( 328s + commits(repo, topological = TRUE, time = FALSE, path = "test-time.txt"), 328s + commits(repo, topological = TRUE, time = FALSE)[1:6] 328s + )) 328s > 328s > ## time - commits ordered by time they were created, not merged into 328s > ## main 328s > stopifnot(identical( 328s + commits(repo, topological = FALSE, time = TRUE, path = "test-time.txt"), 328s + list(c_merge_time, c_d, c_b, c_c, c_a, c_base) 328s + )) 328s > stopifnot(identical( 328s + commits(repo, topological = FALSE, time = TRUE, path = "test-time.txt"), 328s + commits(repo, topological = FALSE, time = TRUE)[1:6] 328s + )) 328s > 328s > ## topological and time - dominated by time 328s > stopifnot(identical( 328s + commits(repo, topological = TRUE, time = TRUE, path = "test-time.txt"), 328s + list(c_merge_time, c_d, c_b, c_c, c_a, c_base) 328s + )) 328s > stopifnot(identical( 328s + commits(repo, topological = TRUE, time = TRUE, path = "test-time.txt"), 328s + commits(repo, topological = TRUE, time = TRUE)[1:6] 328s + )) 328s > 328s > ## reverse with topological and/or time 328s > stopifnot(identical( 328s + commits(repo, topological = TRUE, time = FALSE, reverse = TRUE, 328s + path = "test-time.txt"), 328s + rev(list(c_merge_time, c_b, c_a, c_d, c_c, c_base)) 328s + )) 328s > stopifnot(identical( 328s + commits(repo, topological = FALSE, time = TRUE, reverse = TRUE, 328s + path = "test-time.txt"), 328s + rev(list(c_merge_time, c_d, c_b, c_c, c_a, c_base)) 328s + )) 328s > stopifnot(identical( 328s + commits(repo, topological = TRUE, time = TRUE, reverse = TRUE, 328s + path = "test-time.txt"), 328s + rev(list(c_merge_time, c_d, c_b, c_c, c_a, c_base)) 328s + )) 328s > 328s > ## Cleanup 328s > unlink(path, recursive = TRUE) 328s > 328s BEGIN TEST config.R 328s 328s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 328s Copyright (C) 2024 The R Foundation for Statistical Computing 328s Platform: aarch64-unknown-linux-gnu (64-bit) 328s 328s R is free software and comes with ABSOLUTELY NO WARRANTY. 328s You are welcome to redistribute it under certain conditions. 328s Type 'license()' or 'licence()' for distribution details. 328s 328s R is a collaborative project with many contributors. 328s Type 'contributors()' for more information and 328s 'citation()' on how to cite R or R packages in publications. 328s 328s Type 'demo()' for some demos, 'help()' for on-line help, or 328s 'help.start()' for an HTML browser interface to help. 328s Type 'q()' to quit R. 328s 328s > ## git2r, R bindings to the libgit2 library. 328s > ## Copyright (C) 2013-2023 The git2r contributors 328s > ## 328s > ## This program is free software; you can redistribute it and/or modify 328s > ## it under the terms of the GNU General Public License, version 2, 328s > ## as published by the Free Software Foundation. 328s > ## 328s > ## git2r is distributed in the hope that it will be useful, 328s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 328s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 328s > ## GNU General Public License for more details. 328s > ## 328s > ## You should have received a copy of the GNU General Public License along 328s > ## with this program; if not, write to the Free Software Foundation, Inc., 328s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 328s > 328s > library("git2r") 328s > 328s > ## For debugging 328s > sessionInfo() 328s R version 4.3.3 (2024-02-29) 328s Platform: aarch64-unknown-linux-gnu (64-bit) 328s Running under: Ubuntu Noble Numbat (development branch) 328s 328s Matrix products: default 328s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 328s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 328s 328s locale: 328s [1] C 328s 328s time zone: Etc/UTC 328s tzcode source: system (glibc) 328s 328s attached base packages: 328s [1] stats graphics grDevices utils datasets methods base 328s 328s other attached packages: 328s [1] git2r_0.33.0 328s 328s loaded via a namespace (and not attached): 328s [1] compiler_4.3.3 328s > libgit2_version() 328s $major 328s [1] 1 328s 328s $minor 328s [1] 7 328s 328s $rev 328s [1] 2 328s 328s > libgit2_features() 328s $threads 328s [1] TRUE 328s 328s $https 328s [1] TRUE 328s 328s $ssh 328s [1] TRUE 328s 328s > 328s > 328s > ## Create a directory in tempdir 328s > path <- tempfile(pattern = "git2r-") 328s > dir.create(path) 328s > 328s > ## Initialize a repository 328s > repo <- init(path) 328s > 328s > ## Config repository 328s > cfg <- config(repo, user.name = "Alice", user.email = "alice@example.org") 328s > 328s > ## Check configuration 328s > stopifnot(identical(print(cfg), cfg)) 328s local: 328s core.bare=false 328s core.filemode=true 328s core.logallrefupdates=true 328s core.repositoryformatversion=0 328s user.email=alice@example.org 328s user.name=Alice 328s > stopifnot("local" %in% names(cfg)) 328s > stopifnot("user.name" %in% names(cfg$local)) 328s > stopifnot(identical(cfg$local$user.name, "Alice")) 328s > stopifnot(identical(cfg$local$user.email, "alice@example.org")) 328s > 328s > ## Check that config fails for non-character entry. 328s > tools::assertError(config(repo, test = 5)) 328s > 328s > ## Check config method with missing repo argument 328s > wd <- setwd(path) 328s > cfg <- config(user.name = "Alice", user.email = "alice@example.org") 328s > stopifnot("local" %in% names(cfg)) 328s > stopifnot("user.name" %in% names(cfg$local)) 328s > stopifnot(identical(cfg$local$user.name, "Alice")) 328s > stopifnot(identical(cfg$local$user.email, "alice@example.org")) 328s > stopifnot(identical(git_config_files(repo = repo)$local, 328s + git_config_files(repo = NULL)$local)) 328s > stopifnot(identical(git_config_files(repo = repo)$local, 328s + git_config_files(repo = repo$path)$local)) 328s > if (!is.null(wd)) 328s + setwd(wd) 328s > 328s > ## Delete entries 328s > cfg <- config(repo, user.name = NULL, user.email = NULL) 328s > 328s > ## Check configuration 328s > stopifnot(is.null(cfg$local$user.name)) 328s > stopifnot(is.null(cfg$local$user.email)) 328s > 328s > ## Supply values as objects 328s > user_name <- "Alice" 328s > user_email <- "alice@example.org" 328s > cfg <- config(repo, user.name = user_name, user.email = "alice@example.org") 328s > stopifnot(identical(cfg$local$user.name, user_name)) 328s > stopifnot(identical(cfg$local$user.email, "alice@example.org")) 328s > cfg <- config(repo, user.name = "Alice", user.email = user_email) 328s > stopifnot(identical(cfg$local$user.name, "Alice")) 328s > stopifnot(identical(cfg$local$user.email, user_email)) 328s > 328s > ## Check git config files 328s > cfg <- git_config_files(repo) 328s > stopifnot(identical(nrow(cfg), 4L)) 328s > stopifnot(identical(names(cfg), c("file", "path"))) 328s > stopifnot(identical(cfg$file, c("system", "xdg", "global", "local"))) 328s > stopifnot(!is.na(cfg$path[4])) 328s > 328s > ## Check that the local config file is NA for an invalid repo 328s > ## argument. 328s > stopifnot(is.na(git_config_files(5)$local)) 328s > 328s > ## Check location of .gitconfig on Windows 328s > if (identical(Sys.getenv("APPVEYOR"), "True")) { 328s + 328s + ## AppVeyor diagnostics 328s + str(Sys.getenv("USERPROFILE")) 328s + str(Sys.getenv("HOMEDRIVE")) 328s + str(normalizePath("~")) 328s + str(git_config_files()) 328s + 328s + ## Temporarily move AppVeyor .gitconfig 328s + gitconfig_appveyor <- "C:/Users/appveyor/.gitconfig" 328s + gitconfig_tmp <- file.path(tempdir(), ".gitconfig") 328s + file.rename(gitconfig_appveyor, gitconfig_tmp) 328s + 328s + ## Test config() on Windows 328s + gitconfig_expected <- file.path(Sys.getenv("USERPROFILE"), ".gitconfig") 328s + ## .gitconfig should not be created if no configuration options specified 328s + config(global = TRUE) 328s + stopifnot(!file.exists(gitconfig_expected)) 328s + ## .gitconfig should be created in the user's home directory 328s + config(global = TRUE, user.name = "name", user.email = "email") 328s + stopifnot(file.exists(gitconfig_expected)) 328s + unlink(gitconfig_expected) 328s + ## .gitconfig should be created if user specifies option other than user.name 328s + ## and user.email 328s + config(global = TRUE, core.editor = "nano") 328s + stopifnot(file.exists(gitconfig_expected)) 328s + unlink(gitconfig_expected) 328s + ## .gitconfig should not create a new .gitconfig if the user already has one 328s + ## in Documents/ 328s + gitconfig_documents <- "~/.gitconfig" 328s + file.create(gitconfig_documents) 328s + config(global = TRUE, core.editor = "nano") 328s + stopifnot(!file.exists(gitconfig_expected)) 328s + unlink(gitconfig_documents) 328s + 328s + ## Return AppVeyor .gitconfig 328s + file.rename(gitconfig_tmp, gitconfig_appveyor) 328s + } 328s > 328s > ## Cleanup 328s > unlink(path, recursive = TRUE) 328s > 328s BEGIN TEST diff.R 328s 328s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 328s Copyright (C) 2024 The R Foundation for Statistical Computing 328s Platform: aarch64-unknown-linux-gnu (64-bit) 328s 328s R is free software and comes with ABSOLUTELY NO WARRANTY. 328s You are welcome to redistribute it under certain conditions. 328s Type 'license()' or 'licence()' for distribution details. 328s 328s R is a collaborative project with many contributors. 328s Type 'contributors()' for more information and 328s 'citation()' on how to cite R or R packages in publications. 328s 328s Type 'demo()' for some demos, 'help()' for on-line help, or 328s 'help.start()' for an HTML browser interface to help. 328s Type 'q()' to quit R. 328s 328s > ## git2r, R bindings to the libgit2 library. 328s > ## Copyright (C) 2013-2023 The git2r contributors 328s > ## 328s > ## This program is free software; you can redistribute it and/or modify 328s > ## it under the terms of the GNU General Public License, version 2, 328s > ## as published by the Free Software Foundation. 328s > ## 328s > ## git2r is distributed in the hope that it will be useful, 328s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 328s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 328s > ## GNU General Public License for more details. 328s > ## 328s > ## You should have received a copy of the GNU General Public License along 328s > ## with this program; if not, write to the Free Software Foundation, Inc., 328s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 328s > 328s > library("git2r") 328s > 328s > ## For debugging 328s > sessionInfo() 328s R version 4.3.3 (2024-02-29) 328s Platform: aarch64-unknown-linux-gnu (64-bit) 328s Running under: Ubuntu Noble Numbat (development branch) 328s 328s Matrix products: default 328s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 328s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 328s 328s locale: 328s [1] C 328s 328s time zone: Etc/UTC 328s tzcode source: system (glibc) 328s 328s attached base packages: 328s [1] stats graphics grDevices utils datasets methods base 328s 328s other attached packages: 328s [1] git2r_0.33.0 328s 328s loaded via a namespace (and not attached): 328s [1] compiler_4.3.3 328s > libgit2_version() 328s $major 328s [1] 1 328s 328s $minor 328s [1] 7 328s 328s $rev 328s [1] 2 328s 328s > libgit2_features() 328s $threads 328s [1] TRUE 328s 328s $https 328s [1] TRUE 328s 328s $ssh 328s [1] TRUE 328s 328s > 328s > 328s > ## Create a directory in tempdir 328s > path <- tempfile(pattern = "git2r-") 328s > dir.create(path) 328s > 328s > ## Initialize a repository 328s > repo <- init(path) 328s > config(repo, user.name = "Alice", user.email = "alice@example.org") 328s > 328s > ## Create a file, add, commit 328s > writeLines("Hello world!", file.path(path, "test.txt")) 328s > add(repo, "test.txt") 328s > commit(repo, "Commit message") 328s [350f423] 2024-03-16: Commit message 328s > 328s > ## Change the file, diff between index and workdir 328s > writeLines("Hello again!\nHere is a second line\nAnd a third", 328s + file.path(path, "test.txt")) 328s > diff_1 <- diff(repo) 328s > diff(repo, as_char = TRUE) 328s [1] "diff --git a/test.txt b/test.txt\nindex cd08755..cf48daf 100644\n--- a/test.txt\n+++ b/test.txt\n@@ -1 +1,3 @@\n-Hello world!\n+Hello again!\n+Here is a second line\n+And a third\n" 328s > diff(repo, as_char = TRUE, filename = file.path(path, "test.diff")) 328s NULL 328s > 328s > stopifnot(identical(diff_1$old, "index")) 328s > stopifnot(identical(diff_1$new, "workdir")) 328s > stopifnot(identical(length(diff_1$files), 1L)) 328s > stopifnot(identical(diff_1$files[[1]]$old_file, "test.txt")) 328s > stopifnot(identical(diff_1$files[[1]]$new_file, "test.txt")) 328s > stopifnot(identical(length(diff_1$files[[1]]$hunks), 1L)) 328s > stopifnot(identical(length(diff_1$files[[1]]$hunks[[1]]$lines), 4L)) 328s > ## TODO: check actual diff 328s > 328s > ## Diff between index and HEAD is empty 328s > diff_2 <- diff(repo, index = TRUE) 328s > diff(repo, as_char = TRUE) 328s [1] "diff --git a/test.txt b/test.txt\nindex cd08755..cf48daf 100644\n--- a/test.txt\n+++ b/test.txt\n@@ -1 +1,3 @@\n-Hello world!\n+Hello again!\n+Here is a second line\n+And a third\n" 328s > diff(repo, as_char = TRUE, filename = file.path(path, "test.diff")) 328s NULL 328s > 328s > stopifnot(identical(diff_2$old, "HEAD")) 328s > stopifnot(identical(diff_2$new, "index")) 328s > stopifnot(identical(diff_2$files, list())) 328s > 328s > ## Diff between tree and working dir, same as diff_1 328s > diff_3 <- diff(tree(commits(repo)[[1]])) 328s > diff(repo, as_char = TRUE) 328s [1] "diff --git a/test.txt b/test.txt\nindex cd08755..cf48daf 100644\n--- a/test.txt\n+++ b/test.txt\n@@ -1 +1,3 @@\n-Hello world!\n+Hello again!\n+Here is a second line\n+And a third\n" 328s > diff(repo, as_char = TRUE, filename = file.path(path, "test.diff")) 328s NULL 328s > 328s > stopifnot(identical(diff_3$old, tree(commits(repo)[[1]]))) 328s > stopifnot(identical(diff_3$new, "workdir")) 328s > stopifnot(identical(diff_3$files, diff_1$files)) 328s > stopifnot(identical(print(diff_3), diff_3)) 328s Old: tree: a0b0b9e615e9e433eb5f11859e9feac4564c58c5 328s 328s mode type sha name 328s 1 100644 blob cd0875583aabe89ee197ea133980a9085d08e497 test.txt 328s New: workdir 328s > 328s > ## Add changes, diff between index and HEAD is the same as diff_1 328s > add(repo, "test.txt") 328s > diff_4 <- diff(repo, index = TRUE) 328s > diff(repo, as_char = TRUE) 328s [1] "" 328s > diff(repo, as_char = TRUE, filename = file.path(path, "test.diff")) 328s NULL 328s > 328s > stopifnot(identical(diff_4$old, "HEAD")) 328s > stopifnot(identical(diff_4$new, "index")) 328s > stopifnot(identical(diff_4$files, diff_1$files)) 328s > 328s > ## Diff between tree and index 328s > diff_5 <- diff(tree(commits(repo)[[1]]), index = TRUE) 328s > diff(repo, as_char = TRUE) 328s [1] "" 328s > diff(repo, as_char = TRUE, filename = file.path(path, "test.diff")) 328s NULL 328s > 328s > stopifnot(identical(diff_5$old, tree(commits(repo)[[1]]))) 328s > stopifnot(identical(diff_5$new, "index")) 328s > stopifnot(identical(diff_5$files, diff_1$files)) 328s > 328s > ## Diff between two trees 328s > commit(repo, "Second commit") 328s [7b9c870] 2024-03-16: Second commit 328s > tree_1 <- tree(commits(repo)[[2]]) 328s > tree_2 <- tree(commits(repo)[[1]]) 328s > diff_6 <- diff(tree_1, tree_2) 328s > diff(repo, as_char = TRUE) 328s [1] "" 328s > diff(repo, as_char = TRUE, filename = file.path(path, "test.diff")) 328s NULL 328s > 328s > stopifnot(identical(diff_6$old, tree_1)) 328s > stopifnot(identical(diff_6$new, tree_2)) 328s > stopifnot(identical(diff_6$files, diff_1$files)) 328s > 328s > ## Length of a diff 328s > stopifnot(identical(length(diff_1), 1L)) 328s > stopifnot(identical(length(diff_2), 0L)) 328s > stopifnot(identical(length(diff_3), 1L)) 328s > stopifnot(identical(length(diff_4), 1L)) 328s > stopifnot(identical(length(diff_5), 1L)) 328s > stopifnot(identical(length(diff_6), 1L)) 328s > 328s > ## Binary files 328s > set.seed(42) 328s > writeBin(as.raw((sample(0:255, 1000, replace = TRUE))), 328s + con = file.path(path, "test.bin")) 328s > add(repo, "test.bin") 328s > diff_7 <- diff(repo, index = TRUE) 328s > diff(repo, as_char = TRUE) 328s [1] "" 328s > diff(repo, as_char = TRUE, filename = file.path(path, "test.diff")) 328s NULL 328s > 328s > stopifnot(any(grepl("binary file", capture.output(summary(diff_7))))) 328s > 328s > ## TODO: errors 328s > ## Check non-logical index argument 328s > res <- tools::assertError( 328s + .Call(git2r:::git2r_diff, NULL, NULL, NULL, "FALSE", 328s + NULL, 3L, 0L, "a", "b", NULL, NULL, NULL)) 328s > stopifnot(length(grep(paste0("Error in 'git2r_diff': 'index' must be logical ", 328s + "vector of length one with non NA value\n"), 328s + res[[1]]$message)) > 0) 328s > 328s > ## Check various combinations of diff arguments 328s > res <- tools::assertError( 328s + .Call(git2r:::git2r_diff, NULL, NULL, 328s + tree(commits(repo)[[1]]), 328s + FALSE, NULL, 3L, 0L, "a", "b", NULL, NULL, NULL)) 328s > stopifnot(length(grep("Error in 'git2r_diff': Invalid diff parameters", 328s + res[[1]]$message)) > 0) 328s > 328s > res <- tools::assertError( 328s + .Call(git2r:::git2r_diff, NULL, NULL, 328s + tree(commits(repo)[[1]]), 328s + TRUE, NULL, 3L, 0L, "a", "b", NULL, NULL, NULL)) 328s > stopifnot(length(grep("Error in 'git2r_diff': Invalid diff parameters", 328s + res[[1]]$message)) > 0) 328s > 328s > res <- tools::assertError( 328s + .Call(git2r:::git2r_diff, repo, tree(commits(repo)[[1]]), 328s + NULL, FALSE, NULL, 3L, 0L, "a", "b", NULL, NULL, NULL)) 328s > stopifnot(length(grep("Error in 'git2r_diff': Invalid diff parameters", 328s + res[[1]]$message)) > 0) 328s > 328s > res <- tools::assertError( 328s + .Call(git2r:::git2r_diff, repo, tree(commits(repo)[[1]]), 328s + NULL, TRUE, NULL, 3L, 0L, "a", "b", NULL, NULL, NULL)) 328s > stopifnot(length(grep("Error in 'git2r_diff': Invalid diff parameters", 328s + res[[1]]$message)) > 0) 328s > 328s > res <- tools::assertError( 328s + .Call(git2r:::git2r_diff, repo, tree(commits(repo)[[1]]), 328s + tree(commits(repo)[[2]]), FALSE, NULL, 3L, 0L, "a", 328s + "b", NULL, NULL, NULL)) 328s > stopifnot(length(grep("Error in 'git2r_diff': Invalid diff parameters", 328s + res[[1]]$message)) > 0) 328s > 328s > res <- tools::assertError( 328s + .Call(git2r:::git2r_diff, repo, tree(commits(repo)[[1]]), 328s + tree(commits(repo)[[2]]), TRUE, NULL, 3L, 0L, "a", 328s + "b", NULL, NULL, NULL)) 328s > stopifnot(length(grep("Error in 'git2r_diff': Invalid diff parameters", 328s + res[[1]]$message)) > 0) 328s > 328s > ## TODO: printing 328s > 328s > ## Cleanup 328s > unlink(path, recursive = TRUE) 328s > 328s BEGIN TEST fast_forward_merge.R 329s 329s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 329s Copyright (C) 2024 The R Foundation for Statistical Computing 329s Platform: aarch64-unknown-linux-gnu (64-bit) 329s 329s R is free software and comes with ABSOLUTELY NO WARRANTY. 329s You are welcome to redistribute it under certain conditions. 329s Type 'license()' or 'licence()' for distribution details. 329s 329s R is a collaborative project with many contributors. 329s Type 'contributors()' for more information and 329s 'citation()' on how to cite R or R packages in publications. 329s 329s Type 'demo()' for some demos, 'help()' for on-line help, or 329s 'help.start()' for an HTML browser interface to help. 329s Type 'q()' to quit R. 329s 329s > ## git2r, R bindings to the libgit2 library. 329s > ## Copyright (C) 2013-2023 The git2r contributors 329s > ## 329s > ## This program is free software; you can redistribute it and/or modify 329s > ## it under the terms of the GNU General Public License, version 2, 329s > ## as published by the Free Software Foundation. 329s > ## 329s > ## git2r is distributed in the hope that it will be useful, 329s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 329s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 329s > ## GNU General Public License for more details. 329s > ## 329s > ## You should have received a copy of the GNU General Public License along 329s > ## with this program; if not, write to the Free Software Foundation, Inc., 329s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 329s > 329s > library(git2r) 329s > 329s > ## For debugging 329s > sessionInfo() 329s R version 4.3.3 (2024-02-29) 329s Platform: aarch64-unknown-linux-gnu (64-bit) 329s Running under: Ubuntu Noble Numbat (development branch) 329s 329s Matrix products: default 329s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 329s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 329s 329s locale: 329s [1] C 329s 329s time zone: Etc/UTC 329s tzcode source: system (glibc) 329s 329s attached base packages: 329s [1] stats graphics grDevices utils datasets methods base 329s 329s other attached packages: 329s [1] git2r_0.33.0 329s 329s loaded via a namespace (and not attached): 329s [1] compiler_4.3.3 329s > libgit2_version() 329s $major 329s [1] 1 329s 329s $minor 329s [1] 7 329s 329s $rev 329s [1] 2 329s 329s > libgit2_features() 329s $threads 329s [1] TRUE 329s 329s $https 329s [1] TRUE 329s 329s $ssh 329s [1] TRUE 329s 329s > 329s > 329s > ## Create directory for repository in tempdir 329s > path <- tempfile(pattern = "git2r-") 329s > dir.create(path) 329s > 329s > ## Create repository 329s > repo <- init(path, branch = "main") 329s > config(repo, user.name = "Alice", user.email = "alice@example.org") 329s > 329s > ## Add changes to repo 329s > writeLines("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 329s + con = file.path(path, "test-1.txt")) 329s > add(repo, "test-1.txt") 329s > commit_1 <- commit(repo, "First commit message") 329s > 329s > ## Create branch and checkout 329s > checkout(branch_create(commit_1, name = "test")) 329s > 329s > ## Add changes to test branch 329s > writeLines(c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 329s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 329s + con = file.path(path, "test-1.txt")) 329s > add(repo, "test-1.txt") 329s > commit_2 <- commit(repo, "Second commit message") 329s > 329s > # Checkout main and merge 329s > b <- branches(repo) 329s > checkout(b[sapply(b, "[", "name") == "main"][[1]], force = TRUE) 329s > m <- merge(b[sapply(b, "[", "name") == "test"][[1]]) 329s > 329s > # Check merge 329s > stopifnot(inherits(m, "git_merge_result")) 329s > stopifnot(identical(m$up_to_date, FALSE)) 329s > stopifnot(identical(m$fast_forward, TRUE)) 329s > stopifnot(identical(m$conflicts, FALSE)) 329s > stopifnot(identical(sha(m), NA_character_)) 329s > stopifnot(identical(length(commits(repo)), 2L)) 329s > 329s > # Check reflog 329s > r <- reflog(repo) 329s > stopifnot(identical(r[[1]]$message, "merge test: Fast-forward")) 329s > 329s > ## Cleanup 329s > unlink(path, recursive = TRUE) 329s > 329s BEGIN TEST fetch.R 329s 329s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 329s Copyright (C) 2024 The R Foundation for Statistical Computing 329s Platform: aarch64-unknown-linux-gnu (64-bit) 329s 329s R is free software and comes with ABSOLUTELY NO WARRANTY. 329s You are welcome to redistribute it under certain conditions. 329s Type 'license()' or 'licence()' for distribution details. 329s 329s R is a collaborative project with many contributors. 329s Type 'contributors()' for more information and 329s 'citation()' on how to cite R or R packages in publications. 329s 329s Type 'demo()' for some demos, 'help()' for on-line help, or 329s 'help.start()' for an HTML browser interface to help. 329s Type 'q()' to quit R. 329s 329s > ## git2r, R bindings to the libgit2 library. 329s > ## Copyright (C) 2013-2023 The git2r contributors 329s > ## 329s > ## This program is free software; you can redistribute it and/or modify 329s > ## it under the terms of the GNU General Public License, version 2, 329s > ## as published by the Free Software Foundation. 329s > ## 329s > ## git2r is distributed in the hope that it will be useful, 329s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 329s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 329s > ## GNU General Public License for more details. 329s > ## 329s > ## You should have received a copy of the GNU General Public License along 329s > ## with this program; if not, write to the Free Software Foundation, Inc., 329s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 329s > 329s > library(git2r) 329s > 329s > ## For debugging 329s > sessionInfo() 329s R version 4.3.3 (2024-02-29) 329s Platform: aarch64-unknown-linux-gnu (64-bit) 329s Running under: Ubuntu Noble Numbat (development branch) 329s 329s Matrix products: default 329s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 329s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 329s 329s locale: 329s [1] C 329s 329s time zone: Etc/UTC 329s tzcode source: system (glibc) 329s 329s attached base packages: 329s [1] stats graphics grDevices utils datasets methods base 329s 329s other attached packages: 329s [1] git2r_0.33.0 329s 329s loaded via a namespace (and not attached): 329s [1] compiler_4.3.3 329s > libgit2_version() 329s $major 329s [1] 1 329s 329s $minor 329s [1] 7 329s 329s $rev 329s [1] 2 329s 329s > libgit2_features() 329s $threads 329s [1] TRUE 329s 329s $https 329s [1] TRUE 329s 329s $ssh 329s [1] TRUE 329s 329s > 329s > 329s > ## Create 2 directories in tempdir 329s > path_bare <- tempfile(pattern = "git2r-") 329s > path_repo_1 <- tempfile(pattern = "git2r-") 329s > path_repo_2 <- tempfile(pattern = "git2r-") 329s > 329s > dir.create(path_bare) 329s > dir.create(path_repo_1) 329s > dir.create(path_repo_2) 329s > 329s > ## Create repositories 329s > bare_repo <- init(path_bare, bare = TRUE) 329s > repo_1 <- clone(path_bare, path_repo_1) 329s cloning into '/tmp/RtmpQCVLlv/git2r-ea729a27347'... 329s > repo_2 <- clone(path_bare, path_repo_2) 329s cloning into '/tmp/RtmpQCVLlv/git2r-ea75f807d21'... 329s > 329s > ## Config repositories 329s > config(repo_1, user.name = "Alice", user.email = "alice@example.org") 329s > config(repo_2, user.name = "Bob", user.email = "bob@example.org") 329s > 329s > ## Add changes to repo 1 329s > writeLines("Hello world", con = file.path(path_repo_1, "test.txt")) 329s > add(repo_1, "test.txt") 329s > commit_1 <- commit(repo_1, "Commit message") 329s > branch_name <- branches(repo_1)[[1]]$name 329s > 329s > ## Push changes from repo 1 to origin 329s > push(repo_1, "origin", paste0("refs/heads/", branch_name)) 329s > 329s > ## Check result in bare repository 329s > stopifnot(identical(length(commits(bare_repo)), 1L)) 329s > bare_commit_1 <- commits(bare_repo)[[1]] 329s > stopifnot(identical(sha(commit_1), sha(bare_commit_1))) 329s > stopifnot(identical(commit_1$author, bare_commit_1$author)) 329s > stopifnot(identical(commit_1$committer, bare_commit_1$committer)) 329s > stopifnot(identical(commit_1$summary, bare_commit_1$summary)) 329s > stopifnot(identical(commit_1$message, bare_commit_1$message)) 329s > stopifnot(!identical(commit_1$repo, bare_commit_1$repo)) 329s > 329s > ## Fetch 329s > fetch(repo_2, "origin") 329s [new] ded075045fad8ff33d09 refs/remotes/origin/master 329s > fh <- fetch_heads(repo_2)[[1]] 329s > stopifnot(identical(sha(fh), fh$sha)) 329s > 329s > ## Test show method of non-empty repository where head is null 329s > show(repo_2) 329s Local: /tmp/RtmpQCVLlv/git2r-ea75f807d21 329s Head: nothing commited (yet) 329s > 329s > ## Check that 'git2r_arg_check_credentials' raise error 329s > res <- tools::assertError( 329s + .Call(git2r:::git2r_remote_fetch, repo_1, "origin", 329s + 3, "fetch", FALSE, NULL)) 329s > stopifnot(length(grep("'credentials' must be an S3 class with credentials", 329s + res[[1]]$message)) > 0) 329s > 329s > res <- tools::assertError( 329s + .Call(git2r:::git2r_remote_fetch, repo_1, "origin", repo_1, 329s + "fetch", FALSE, NULL)) 329s > stopifnot(length(grep("'credentials' must be an S3 class with credentials", 329s + res[[1]]$message)) > 0) 329s > 329s > credentials <- cred_env(c("username", "username"), "password") 329s > res <- tools::assertError( 329s + .Call(git2r:::git2r_remote_fetch, repo_1, "origin", credentials, 329s + "fetch", FALSE, NULL)) 329s > stopifnot(length(grep("'credentials' must be an S3 class with credentials", 329s + res[[1]]$message)) > 0) 329s > 329s > credentials <- cred_env("username", c("password", "passowrd")) 329s > res <- tools::assertError( 329s + .Call(git2r:::git2r_remote_fetch, repo_1, "origin", credentials, 329s + "fetch", FALSE, NULL)) 329s > stopifnot(length(grep("'credentials' must be an S3 class with credentials", 329s + res[[1]]$message)) > 0) 329s > 329s > credentials <- cred_user_pass(c("username", "username"), "password") 329s > res <- tools::assertError( 329s + .Call(git2r:::git2r_remote_fetch, repo_1, "origin", credentials, 329s + "fetch", FALSE, NULL)) 329s > stopifnot(length(grep("'credentials' must be an S3 class with credentials", 329s + res[[1]]$message)) > 0) 329s > 329s > credentials <- cred_user_pass("username", c("password", "passowrd")) 329s > res <- tools::assertError( 329s + .Call(git2r:::git2r_remote_fetch, repo_1, "origin", credentials, 329s + "fetch", FALSE, NULL)) 329s > stopifnot(length(grep("'credentials' must be an S3 class with credentials", 329s + res[[1]]$message)) > 0) 329s > 329s > credentials <- cred_token(c("GITHUB_PAT", "GITHUB_PAT")) 329s > res <- tools::assertError( 329s + .Call(git2r:::git2r_remote_fetch, repo_1, "origin", credentials, 329s + "fetch", FALSE, NULL)) 329s > stopifnot(length(grep("'credentials' must be an S3 class with credentials", 329s + res[[1]]$message)) > 0) 329s > 329s > credentials <- structure(list(publickey = c("id_rsa.pub", "id_rsa.pub"), 329s + privatekey = "id_rsa", 329s + passphrase = character(0)), 329s + class = "cred_ssh_key") 329s > res <- tools::assertError( 329s + .Call(git2r:::git2r_remote_fetch, repo_1, "origin", credentials, 329s + "fetch", FALSE, NULL)) 329s > stopifnot(length(grep("'credentials' must be an S3 class with credentials", 329s + res[[1]]$message)) > 0) 329s > 329s > credentials <- structure(list(publickey = "id_rsa.pub", 329s + privatekey = c("id_rsa", "id_rsa"), 329s + passphrase = character(0)), 329s + class = "cred_ssh_key") 329s > res <- tools::assertError( 329s + .Call(git2r:::git2r_remote_fetch, repo_1, "origin", credentials, 329s + "fetch", FALSE, NULL)) 329s > stopifnot(length(grep("'credentials' must be an S3 class with credentials", 329s + res[[1]]$message)) > 0) 329s > 329s > credentials <- structure(list(publickey = "id_rsa.pub", 329s + privatekey = "id_rsa", 329s + passphrase = NA_character_), 329s + class = "cred_ssh_key") 329s > res <- tools::assertError( 329s + .Call(git2r:::git2r_remote_fetch, repo_1, "origin", credentials, 329s + "fetch", FALSE, NULL)) 329s > stopifnot(length(grep("'credentials' must be an S3 class with credentials", 329s + res[[1]]$message)) > 0) 329s > 329s > credentials <- structure(list(publickey = "id_rsa.pub", 329s + privatekey = "id_rsa", 329s + passphrase = c("passphrase", "passphrase")), 329s + class = "cred_ssh_key") 329s > res <- tools::assertError( 329s + .Call(git2r:::git2r_remote_fetch, repo_1, "origin", credentials, 329s + "fetch", FALSE, NULL)) 329s > stopifnot(length(grep("'credentials' must be an S3 class with credentials", 329s + res[[1]]$message)) > 0) 329s > 329s > ## Cleanup 329s > unlink(path_bare, recursive = TRUE) 329s > unlink(path_repo_1, recursive = TRUE) 329s > unlink(path_repo_2, recursive = TRUE) 329s > 329s BEGIN TEST graph.R 329s 329s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 329s Copyright (C) 2024 The R Foundation for Statistical Computing 329s Platform: aarch64-unknown-linux-gnu (64-bit) 329s 329s R is free software and comes with ABSOLUTELY NO WARRANTY. 329s You are welcome to redistribute it under certain conditions. 329s Type 'license()' or 'licence()' for distribution details. 329s 329s R is a collaborative project with many contributors. 329s Type 'contributors()' for more information and 329s 'citation()' on how to cite R or R packages in publications. 329s 329s Type 'demo()' for some demos, 'help()' for on-line help, or 329s 'help.start()' for an HTML browser interface to help. 329s Type 'q()' to quit R. 329s 329s > ## git2r, R bindings to the libgit2 library. 329s > ## Copyright (C) 2013-2023 The git2r contributors 329s > ## 329s > ## This program is free software; you can redistribute it and/or modify 329s > ## it under the terms of the GNU General Public License, version 2, 329s > ## as published by the Free Software Foundation. 329s > ## 329s > ## git2r is distributed in the hope that it will be useful, 329s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 329s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 329s > ## GNU General Public License for more details. 329s > ## 329s > ## You should have received a copy of the GNU General Public License along 329s > ## with this program; if not, write to the Free Software Foundation, Inc., 329s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 329s > 329s > library("git2r") 330s > 330s > ## For debugging 330s > sessionInfo() 330s R version 4.3.3 (2024-02-29) 330s Platform: aarch64-unknown-linux-gnu (64-bit) 330s Running under: Ubuntu Noble Numbat (development branch) 330s 330s Matrix products: default 330s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 330s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 330s 330s locale: 330s [1] C 330s 330s time zone: Etc/UTC 330s tzcode source: system (glibc) 330s 330s attached base packages: 330s [1] stats graphics grDevices utils datasets methods base 330s 330s other attached packages: 330s [1] git2r_0.33.0 330s 330s loaded via a namespace (and not attached): 330s [1] compiler_4.3.3 330s > libgit2_version() 330s $major 330s [1] 1 330s 330s $minor 330s [1] 7 330s 330s $rev 330s [1] 2 330s 330s > libgit2_features() 330s $threads 330s [1] TRUE 330s 330s $https 330s [1] TRUE 330s 330s $ssh 330s [1] TRUE 330s 330s > 330s > 330s > ## Create a directory in tempdir 330s > path <- tempfile(pattern = "git2r-") 330s > dir.create(path) 330s > 330s > ## Initialize a repository 330s > repo <- init(path) 330s > config(repo, user.name = "Alice", user.email = "alice@example.org") 330s > 330s > ## Create a file and commit 330s > writeLines("Hello world!", file.path(path, "test.txt")) 330s > add(repo, "test.txt") 330s > commit_1 <- commit(repo, "First commit message") 330s > tag_1 <- tag(repo, "Tagname1", "Tag message 1") 330s > 330s > ## Change file and commit 330s > writeLines(c("Hello world!", "HELLO WORLD!"), 330s + file.path(path, "test.txt")) 330s > add(repo, "test.txt") 330s > commit_2 <- commit(repo, "Second commit message") 330s > tag_2 <- tag(repo, "Tagname2", "Tag message 2") 330s > 330s > ## Check ahead behind 330s > stopifnot(identical(ahead_behind(commit_1, commit_2), c(0L, 1L))) 330s > stopifnot(identical(ahead_behind(tag_1, tag_2), c(0L, 1L))) 330s > stopifnot(identical(ahead_behind(tag_2, tag_1), c(1L, 0L))) 330s > stopifnot(identical(ahead_behind(commit_1, branches(repo)[[1]]), c(0L, 1L))) 330s > stopifnot(identical(ahead_behind(branches(repo)[[1]], commit_1), c(1L, 0L))) 330s > 330s > ## Cleanup 330s > unlink(path, recursive = TRUE) 330s > 330s BEGIN TEST index.R 330s 330s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 330s Copyright (C) 2024 The R Foundation for Statistical Computing 330s Platform: aarch64-unknown-linux-gnu (64-bit) 330s 330s R is free software and comes with ABSOLUTELY NO WARRANTY. 330s You are welcome to redistribute it under certain conditions. 330s Type 'license()' or 'licence()' for distribution details. 330s 330s R is a collaborative project with many contributors. 330s Type 'contributors()' for more information and 330s 'citation()' on how to cite R or R packages in publications. 330s 330s Type 'demo()' for some demos, 'help()' for on-line help, or 330s 'help.start()' for an HTML browser interface to help. 330s Type 'q()' to quit R. 330s 330s > ## git2r, R bindings to the libgit2 library. 330s > ## Copyright (C) 2013-2023 The git2r contributors 330s > ## 330s > ## This program is free software; you can redistribute it and/or modify 330s > ## it under the terms of the GNU General Public License, version 2, 330s > ## as published by the Free Software Foundation. 330s > ## 330s > ## git2r is distributed in the hope that it will be useful, 330s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 330s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 330s > ## GNU General Public License for more details. 330s > ## 330s > ## You should have received a copy of the GNU General Public License along 330s > ## with this program; if not, write to the Free Software Foundation, Inc., 330s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 330s > 330s > library(git2r) 330s > source("util/check.R") 330s > 330s > ## For debugging 330s > sessionInfo() 330s R version 4.3.3 (2024-02-29) 330s Platform: aarch64-unknown-linux-gnu (64-bit) 330s Running under: Ubuntu Noble Numbat (development branch) 330s 330s Matrix products: default 330s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 330s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 330s 330s locale: 330s [1] C 330s 330s time zone: Etc/UTC 330s tzcode source: system (glibc) 330s 330s attached base packages: 330s [1] stats graphics grDevices utils datasets methods base 330s 330s other attached packages: 330s [1] git2r_0.33.0 330s 330s loaded via a namespace (and not attached): 330s [1] compiler_4.3.3 330s > libgit2_version() 330s $major 330s [1] 1 330s 330s $minor 330s [1] 7 330s 330s $rev 330s [1] 2 330s 330s > libgit2_features() 330s $threads 330s [1] TRUE 330s 330s $https 330s [1] TRUE 330s 330s $ssh 330s [1] TRUE 330s 330s > 330s > 330s > ## Create a directory in tempdir 330s > path <- tempfile(pattern = "git2r-") 330s > dir.create(path) 330s > 330s > ## Initialize a repository 330s > repo <- init(path) 330s > config(repo, user.name = "Alice", user.email = "alice@example.org") 330s > 330s > ## Create directories 330s > dir.create(file.path(path, "sub-folder")); 330s > dir.create(file.path(path, "sub-folder", "sub-sub-folder")); 330s > 330s > ## Create files 330s > writeLines("Hello world!", 330s + file.path(path, "file-1.txt")) 330s > writeLines("Hello world!", 330s + file.path(path, "sub-folder", "file-2.txt")) 330s > writeLines("Hello world!", 330s + file.path(path, "sub-folder", "file-3.txt")) 330s > writeLines("Hello world!", 330s + file.path(path, "sub-folder", "sub-sub-folder", "file-4.txt")) 330s > writeLines("Hello world!", 330s + file.path(path, "sub-folder", "sub-sub-folder", "file-5.txt")) 330s > 330s > ## Add 330s > add(repo, "file-1.txt") 330s > status_exp <- structure(list(staged = list(new = "file-1.txt"), 330s + unstaged = empty_named_list(), 330s + untracked = list(untracked = "sub-folder/")), 330s + class = "git_status") 330s > status_obs <- status(repo) 330s > stopifnot(identical(status_obs, status_exp)) 330s > 330s > ## Index remove by path 330s > index_remove_bypath(repo, "file-1.txt") 330s > status_exp <- structure(list(staged = empty_named_list(), 330s + unstaged = empty_named_list(), 330s + untracked = list(untracked = "file-1.txt", 330s + untracked = "sub-folder/")), 330s + class = "git_status") 330s > status_obs <- status(repo) 330s > stopifnot(identical(status_obs, status_exp)) 330s > 330s > ## Add 330s > add(repo, "sub-folder") 330s > status_exp <- structure(list(staged = list( 330s + new = "sub-folder/file-2.txt", 330s + new = "sub-folder/file-3.txt", 330s + new = "sub-folder/sub-sub-folder/file-4.txt", 330s + new = "sub-folder/sub-sub-folder/file-5.txt"), 330s + unstaged = empty_named_list(), 330s + untracked = list(untracked = "file-1.txt")), 330s + class = "git_status") 330s > status_obs <- status(repo) 330s > stopifnot(identical(status_obs, status_exp)) 330s > 330s > ## Commit 330s > commit(repo, "First commit message") 330s [9786eb0] 2024-03-16: First commit message 330s > 330s > ## It should fail to remove non-existing, untracked and ignored files 330s > tools::assertError(rm_file(repo, c("file-1.txt", "file-2.txt"))) 330s > tools::assertError(rm_file(repo, c("file-1.txt", ""))) 330s > tools::assertError(rm_file(repo, c("file-1.txt"))) 330s > writeLines("/file-1.txt", file.path(path, ".gitignore")) 330s > tools::assertError(rm_file(repo, "file-1.txt")) 330s > 330s > ## It should fail to remove files with staged changes 330s > file.remove(file.path(path, ".gitignore")) 330s [1] TRUE 330s > add(repo, "file-1.txt") 330s > tools::assertError(rm_file(repo, "file-1.txt")) 330s > 330s > ## It should fail to remove files with unstaged changes 330s > commit(repo, "Second commit message") 330s [a68c02f] 2024-03-16: Second commit message 330s > writeLines(c("Hello world!", "Hello world!"), 330s + file.path(path, "file-1.txt")) 330s > tools::assertError(rm_file(repo, "file-1.txt")) 330s > 330s > ## Remove file 330s > add(repo, "file-1.txt") 330s > commit(repo, "Third commit message") 330s [65285e1] 2024-03-16: Third commit message 330s > rm_file(repo, "file-1.txt") 330s > status_exp <- structure(list(staged = list(deleted = "file-1.txt"), 330s + unstaged = empty_named_list(), 330s + untracked = empty_named_list()), 330s + class = "git_status") 330s > status_obs <- status(repo) 330s > stopifnot(identical(status_obs, status_exp)) 330s > 330s > ## Cleanup 330s > unlink(path, recursive = TRUE) 330s > 330s BEGIN TEST invalid-conf-var.R 330s 330s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 330s Copyright (C) 2024 The R Foundation for Statistical Computing 330s Platform: aarch64-unknown-linux-gnu (64-bit) 330s 330s R is free software and comes with ABSOLUTELY NO WARRANTY. 330s You are welcome to redistribute it under certain conditions. 330s Type 'license()' or 'licence()' for distribution details. 330s 330s R is a collaborative project with many contributors. 330s Type 'contributors()' for more information and 330s 'citation()' on how to cite R or R packages in publications. 330s 330s Type 'demo()' for some demos, 'help()' for on-line help, or 330s 'help.start()' for an HTML browser interface to help. 330s Type 'q()' to quit R. 330s 330s > ## git2r, R bindings to the libgit2 library. 330s > ## Copyright (C) 2013-2023 The git2r contributors 330s > ## 330s > ## This program is free software; you can redistribute it and/or modify 330s > ## it under the terms of the GNU General Public License, version 2, 330s > ## as published by the Free Software Foundation. 330s > ## 330s > ## git2r is distributed in the hope that it will be useful, 330s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 330s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 330s > ## GNU General Public License for more details. 330s > ## 330s > ## You should have received a copy of the GNU General Public License along 330s > ## with this program; if not, write to the Free Software Foundation, Inc., 330s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 330s > 330s > library("git2r") 330s > 330s > ## For debugging 330s > sessionInfo() 330s R version 4.3.3 (2024-02-29) 330s Platform: aarch64-unknown-linux-gnu (64-bit) 330s Running under: Ubuntu Noble Numbat (development branch) 330s 330s Matrix products: default 330s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 330s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 330s 330s locale: 330s [1] C 330s 330s time zone: Etc/UTC 330s tzcode source: system (glibc) 330s 330s attached base packages: 330s [1] stats graphics grDevices utils datasets methods base 330s 330s other attached packages: 330s [1] git2r_0.33.0 330s 330s loaded via a namespace (and not attached): 330s [1] compiler_4.3.3 330s > libgit2_version() 330s $major 330s [1] 1 330s 330s $minor 330s [1] 7 330s 330s $rev 330s [1] 2 330s 330s > libgit2_features() 330s $threads 330s [1] TRUE 330s 330s $https 330s [1] TRUE 330s 330s $ssh 330s [1] TRUE 330s 330s > 330s > 330s > ## Create a directory in tempdir 330s > path <- tempfile(pattern = "git2r-") 330s > dir.create(path) 330s > 330s > ## Initialize a repository 330s > repo <- init(path) 330s > 330s > ## Config repository 330s > config(repo, user.name = "Alice") 330s > 330s > ## Let's set one valid and one with variable with invalid format 330s > res <- tools::assertWarning(config(repo, 330s + user.email = "alice@example.org", 330s + lol = "wut")) 330s > stopifnot(length(grep("Variable was not in a valid format: 'lol'", 330s + res[[1]]$message)) > 0) 330s > 330s > cfg_exp <- structure(list(user.name = "Alice", 330s + user.email = "alice@example.org", 330s + "NA" = NULL), 330s + .Names = c("user.name", "user.email", NA)) 330s > 330s > cfg_obs <- config(repo)$local 330s > cfg_obs <- cfg_obs[c("user.name", "user.email", "lol")] 330s > stopifnot(identical(cfg_obs, cfg_exp)) 330s > 330s > ## Cleanup 330s > unlink(path, recursive = TRUE) 330s > 330s BEGIN TEST libgit2.R 330s 330s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 330s Copyright (C) 2024 The R Foundation for Statistical Computing 330s Platform: aarch64-unknown-linux-gnu (64-bit) 330s 330s R is free software and comes with ABSOLUTELY NO WARRANTY. 330s You are welcome to redistribute it under certain conditions. 330s Type 'license()' or 'licence()' for distribution details. 330s 330s R is a collaborative project with many contributors. 330s Type 'contributors()' for more information and 330s 'citation()' on how to cite R or R packages in publications. 330s 330s Type 'demo()' for some demos, 'help()' for on-line help, or 330s 'help.start()' for an HTML browser interface to help. 330s Type 'q()' to quit R. 330s 330s > ## git2r, R bindings to the libgit2 library. 330s > ## Copyright (C) 2013-2023 The git2r contributors 330s > ## 330s > ## This program is free software; you can redistribute it and/or modify 330s > ## it under the terms of the GNU General Public License, version 2, 330s > ## as published by the Free Software Foundation. 330s > ## 330s > ## git2r is distributed in the hope that it will be useful, 330s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 330s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 330s > ## GNU General Public License for more details. 330s > ## 330s > ## You should have received a copy of the GNU General Public License along 330s > ## with this program; if not, write to the Free Software Foundation, Inc., 330s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 330s > 330s > library("git2r") 330s > 330s > ## For debugging 330s > sessionInfo() 330s R version 4.3.3 (2024-02-29) 330s Platform: aarch64-unknown-linux-gnu (64-bit) 330s Running under: Ubuntu Noble Numbat (development branch) 330s 330s Matrix products: default 330s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 330s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 330s 330s locale: 330s [1] C 330s 330s time zone: Etc/UTC 330s tzcode source: system (glibc) 330s 330s attached base packages: 330s [1] stats graphics grDevices utils datasets methods base 330s 330s other attached packages: 330s [1] git2r_0.33.0 330s 330s loaded via a namespace (and not attached): 330s [1] compiler_4.3.3 330s > libgit2_version() 330s $major 330s [1] 1 330s 330s $minor 330s [1] 7 330s 330s $rev 330s [1] 2 330s 330s > libgit2_features() 330s $threads 330s [1] TRUE 330s 330s $https 330s [1] TRUE 330s 330s $ssh 330s [1] TRUE 330s 330s > 330s > 330s > stopifnot(identical(names(libgit2_features()), 330s + c("threads", "https", "ssh"))) 330s > 330s > stopifnot(identical(names(libgit2_version()), 330s + c("major", "minor", "rev"))) 330s > 330s > tools::assertError(ssl_cert_locations()) 330s > 330s > if (identical(Sys.getenv("R_COVR"), "true")) { 330s + if (isTRUE(libgit2_features()$https)) { 330s + ## Create a directory in tempdir 330s + path <- tempfile(pattern = "git2r-") 330s + dir.create(path) 330s + stopifnot(is.null(ssl_cert_locations(path = path))) 330s + unlink(path) 330s + } 330s + } 330s > 330s BEGIN TEST ls_tree.R 331s 331s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 331s Copyright (C) 2024 The R Foundation for Statistical Computing 331s Platform: aarch64-unknown-linux-gnu (64-bit) 331s 331s R is free software and comes with ABSOLUTELY NO WARRANTY. 331s You are welcome to redistribute it under certain conditions. 331s Type 'license()' or 'licence()' for distribution details. 331s 331s R is a collaborative project with many contributors. 331s Type 'contributors()' for more information and 331s 'citation()' on how to cite R or R packages in publications. 331s 331s Type 'demo()' for some demos, 'help()' for on-line help, or 331s 'help.start()' for an HTML browser interface to help. 331s Type 'q()' to quit R. 331s 331s > ## git2r, R bindings to the libgit2 library. 331s > ## Copyright (C) 2013-2023 The git2r contributors 331s > ## 331s > ## This program is free software; you can redistribute it and/or modify 331s > ## it under the terms of the GNU General Public License, version 2, 331s > ## as published by the Free Software Foundation. 331s > ## 331s > ## git2r is distributed in the hope that it will be useful, 331s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 331s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 331s > ## GNU General Public License for more details. 331s > ## 331s > ## You should have received a copy of the GNU General Public License along 331s > ## with this program; if not, write to the Free Software Foundation, Inc., 331s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 331s > 331s > library("git2r") 331s > 331s > ## For debugging 331s > sessionInfo() 331s R version 4.3.3 (2024-02-29) 331s Platform: aarch64-unknown-linux-gnu (64-bit) 331s Running under: Ubuntu Noble Numbat (development branch) 331s 331s Matrix products: default 331s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 331s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 331s 331s locale: 331s [1] C 331s 331s time zone: Etc/UTC 331s tzcode source: system (glibc) 331s 331s attached base packages: 331s [1] stats graphics grDevices utils datasets methods base 331s 331s other attached packages: 331s [1] git2r_0.33.0 331s 331s loaded via a namespace (and not attached): 331s [1] compiler_4.3.3 331s > libgit2_version() 331s $major 331s [1] 1 331s 331s $minor 331s [1] 7 331s 331s $rev 331s [1] 2 331s 331s > libgit2_features() 331s $threads 331s [1] TRUE 331s 331s $https 331s [1] TRUE 331s 331s $ssh 331s [1] TRUE 331s 331s > 331s > 331s > ## Initialize a temporary repository 331s > path <- tempfile(pattern = "git2r-") 331s > dir.create(path) 331s > dir.create(file.path(path, "subfolder")) 331s > repo <- init(path) 331s > 331s > ## Create a user 331s > config(repo, user.name = "Alice", user.email = "alice@example.org") 331s > 331s > ## Create three files and commit 331s > writeLines("First file", file.path(path, "example-1.txt")) 331s > writeLines("Second file", file.path(path, "subfolder/example-2.txt")) 331s > writeLines("Third file", file.path(path, "example-3.txt")) 331s > add(repo, c("example-1.txt", "subfolder/example-2.txt", "example-3.txt")) 331s > commit(repo, "Commit message") 331s [f7f1f2a] 2024-03-16: Commit message 331s > 331s > ## Traverse tree entries and its subtrees. 331s > ## Various approaches that give identical result. 331s > stopifnot(identical(ls_tree(tree = tree(last_commit(path))), 331s + ls_tree(tree = tree(last_commit(repo))))) 331s > stopifnot(identical(ls_tree(repo = path), ls_tree(repo = repo))) 331s > 331s > ## ls_tree(repo = repo) should match `git ls-tree -lr HEAD` 331s > ls_tree_result <- ls_tree(repo = repo) 331s > stopifnot(identical(ls_tree_result$name, 331s + c("example-1.txt", "example-3.txt", "example-2.txt"))) 331s > 331s > # Argument `tree` can be a 'character that identifies a tree in the repository' 331s > ls_tree(tree = tree(last_commit(path))$sha, repo = repo) 331s mode type sha path name 331s 1 100644 blob 4c5fd919d52e3c1b08f7924cfa05d6de100912fd example-1.txt 331s 2 100644 blob f89598da398eb016c504a5e272cb3eb1a31e2687 example-3.txt 331s 3 100644 blob 20d5b672a347112783818b3fc8cc7cd66ade3008 subfolder/ example-2.txt 331s len 331s 1 11 331s 2 11 331s 3 12 331s > 331s > ## Skip content in subfolder 331s > ls_tree_toplevel <- ls_tree(repo = repo, recursive = FALSE) 331s > stopifnot(nrow(ls_tree_toplevel) == 3) 331s > stopifnot(identical(ls_tree_toplevel$name, 331s + c("example-1.txt", "example-3.txt", "subfolder"))) 331s > 331s > ## Start in subfolder 331s > ls_tree_subfolder <- ls_tree(tree = "HEAD:subfolder", repo = repo) 331s > stopifnot(nrow(ls_tree_subfolder) == 1) 331s > stopifnot(identical(ls_tree_subfolder$name, "example-2.txt")) 331s > 331s > ## Cleanup 331s > unlink(path, recursive = TRUE) 331s > 331s BEGIN TEST merge.R 331s 331s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 331s Copyright (C) 2024 The R Foundation for Statistical Computing 331s Platform: aarch64-unknown-linux-gnu (64-bit) 331s 331s R is free software and comes with ABSOLUTELY NO WARRANTY. 331s You are welcome to redistribute it under certain conditions. 331s Type 'license()' or 'licence()' for distribution details. 331s 331s R is a collaborative project with many contributors. 331s Type 'contributors()' for more information and 331s 'citation()' on how to cite R or R packages in publications. 331s 331s Type 'demo()' for some demos, 'help()' for on-line help, or 331s 'help.start()' for an HTML browser interface to help. 331s Type 'q()' to quit R. 331s 331s > ## git2r, R bindings to the libgit2 library. 331s > ## Copyright (C) 2013-2023 The git2r contributors 331s > ## 331s > ## This program is free software; you can redistribute it and/or modify 331s > ## it under the terms of the GNU General Public License, version 2, 331s > ## as published by the Free Software Foundation. 331s > ## 331s > ## git2r is distributed in the hope that it will be useful, 331s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 331s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 331s > ## GNU General Public License for more details. 331s > ## 331s > ## You should have received a copy of the GNU General Public License along 331s > ## with this program; if not, write to the Free Software Foundation, Inc., 331s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 331s > 331s > library(git2r) 331s > source("util/check.R") 331s > 331s > ## For debugging 331s > sessionInfo() 331s R version 4.3.3 (2024-02-29) 331s Platform: aarch64-unknown-linux-gnu (64-bit) 331s Running under: Ubuntu Noble Numbat (development branch) 331s 331s Matrix products: default 331s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 331s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 331s 331s locale: 331s [1] C 331s 331s time zone: Etc/UTC 331s tzcode source: system (glibc) 331s 331s attached base packages: 331s [1] stats graphics grDevices utils datasets methods base 331s 331s other attached packages: 331s [1] git2r_0.33.0 331s 331s loaded via a namespace (and not attached): 331s [1] compiler_4.3.3 331s > libgit2_version() 331s $major 331s [1] 1 331s 331s $minor 331s [1] 7 331s 331s $rev 331s [1] 2 331s 331s > libgit2_features() 331s $threads 331s [1] TRUE 331s 331s $https 331s [1] TRUE 331s 331s $ssh 331s [1] TRUE 331s 331s > 331s > 331s > ## Create a directory in tempdir 331s > path <- tempfile(pattern = "git2r-") 331s > dir.create(path) 331s > 331s > ## Initialize a repository 331s > repo <- init(path, branch = "main") 331s > config(repo, user.name = "Alice", user.email = "alice@example.org") 331s > 331s > ## Create a file, add and commit 331s > writeLines("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 331s + con = file.path(path, "test.txt")) 331s > add(repo, "test.txt") 331s > commit_1 <- commit(repo, "Commit message 1") 331s > 331s > ## Create first branch, checkout, add file and commit 331s > b_1 <- branch_create(commit_1, "branch1") 331s > checkout(b_1) 331s > writeLines("Branch 1", file.path(path, "branch-1.txt")) 331s > add(repo, "branch-1.txt") 331s > commit_2 <- commit(repo, "Commit message branch 1") 331s > 331s > ## Create second branch, checkout, add file and commit 331s > b_2 <- branch_create(commit_1, "branch2") 331s > checkout(b_2) 331s > writeLines("Branch 2", file.path(path, "branch-2.txt")) 331s > add(repo, "branch-2.txt") 331s > commit_3 <- commit(repo, "Commit message branch 2") 331s > writeLines(c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 331s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 331s + con = file.path(path, "test.txt")) 331s > add(repo, "test.txt") 331s > commit_4 <- commit(repo, "Second commit message branch 2") 331s > 331s > ## Check that merge base equals commit_1 331s > stopifnot(identical(merge_base(commit_2, commit_3), commit_1)) 331s > 331s > ## Checkout main 331s > b <- branches(repo) 331s > checkout(b[sapply(b, "[", "name") == "main"][[1]], force = TRUE) 331s > 331s > ## Merge branch 1 331s > m_1 <- merge(b[sapply(b, "[", "name") == "branch1"][[1]]) 331s > stopifnot(identical(m_1$fast_forward, TRUE)) 331s > stopifnot(identical(m_1$conflicts, FALSE)) 331s > stopifnot(identical(sha(m_1), NA_character_)) 331s > stopifnot(identical(print(m_1), m_1)) 331s Merge: Fast-forward 331s > 331s > ## Merge branch 1 again 331s > m_1_again <- merge(b[sapply(b, "[", "name") == "branch1"][[1]]) 331s > stopifnot(identical(m_1_again$up_to_date, TRUE)) 331s > stopifnot(identical(m_1_again$fast_forward, FALSE)) 331s > stopifnot(identical(m_1_again$conflicts, FALSE)) 331s > stopifnot(identical(sha(m_1_again), NA_character_)) 331s > 331s > ## Merge branch 2 331s > m_2 <- merge(b[sapply(b, "[", "name") == "branch2"][[1]]) 331s > stopifnot(identical(m_2$fast_forward, FALSE)) 331s > stopifnot(identical(m_2$conflicts, FALSE)) 331s > stopifnot(identical(sha(m_2), sha(commits(repo)[[1]]))) 331s > 331s > ## Create third branch, checkout, change file and commit 331s > b_3 <- branch_create(lookup(repo, sha(m_2)), "branch3") 331s > checkout(b_3) 331s > writeLines(c("Lorem ipsum dolor amet sit, consectetur adipisicing elit, sed do", 331s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 331s + con = file.path(path, "test.txt")) 331s > add(repo, "test.txt") 331s > commit(repo, "Commit message branch 3") 331s [ccec15c] 2024-03-16: Commit message branch 3 331s > 331s > ## Checkout main and create a change that creates a conflict on 331s > ## merge 331s > b <- branches(repo) 331s > checkout(b[sapply(b, "[", "name") == "main"][[1]], force = TRUE) 331s > writeLines(c("Lorem ipsum dolor sit amet, adipisicing consectetur elit, sed do", 331s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 331s + con = file.path(path, "test.txt")) 331s > add(repo, "test.txt") 331s > commit(repo, "Some commit message branch 1") 331s [a17eeee] 2024-03-16: Some commit message branch 1 331s > 331s > ## Merge branch 3 with fail = TRUE 331s > m_3 <- merge(b[sapply(b, "[", "name") == "branch3"][[1]], fail = TRUE) 331s > stopifnot(identical(m_3$up_to_date, FALSE)) 331s > stopifnot(identical(m_3$fast_forward, FALSE)) 331s > stopifnot(identical(m_3$conflicts, TRUE)) 331s > stopifnot(identical(sha(m_3), NA_character_)) 331s > m_3 331s Merge: Conflicts 331s > 331s > ## Check status; Expect to have a clean working directory 331s > wd <- structure(list(staged = empty_named_list(), 331s + unstaged = empty_named_list(), 331s + untracked = empty_named_list()), 331s + class = "git_status") 331s > stopifnot(identical(status(repo), wd)) 331s > 331s > ## Merge branch 3 331s > m_3 <- merge(b[sapply(b, "[", "name") == "branch3"][[1]]) 331s > stopifnot(identical(m_3$up_to_date, FALSE)) 331s > stopifnot(identical(m_3$fast_forward, FALSE)) 331s > stopifnot(identical(m_3$conflicts, TRUE)) 331s > stopifnot(identical(sha(m_3), NA_character_)) 331s > m_3 331s Merge: Conflicts 331s > 331s > ## Check status; Expect to have one unstaged unmerged conflict. 331s > stopifnot(identical(status(repo), 331s + structure(list(staged = empty_named_list(), 331s + unstaged = list(conflicted = "test.txt"), 331s + untracked = empty_named_list()), 331s + class = "git_status"))) 331s > 331s > ## Cleanup 331s > unlink(path, recursive = TRUE) 331s > 331s BEGIN TEST merge_named_branch.R 331s 331s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 331s Copyright (C) 2024 The R Foundation for Statistical Computing 331s Platform: aarch64-unknown-linux-gnu (64-bit) 331s 331s R is free software and comes with ABSOLUTELY NO WARRANTY. 331s You are welcome to redistribute it under certain conditions. 331s Type 'license()' or 'licence()' for distribution details. 331s 331s R is a collaborative project with many contributors. 331s Type 'contributors()' for more information and 331s 'citation()' on how to cite R or R packages in publications. 331s 331s Type 'demo()' for some demos, 'help()' for on-line help, or 331s 'help.start()' for an HTML browser interface to help. 331s Type 'q()' to quit R. 331s 331s > ## git2r, R bindings to the libgit2 library. 331s > ## Copyright (C) 2013-2023 The git2r contributors 331s > ## 331s > ## This program is free software; you can redistribute it and/or modify 331s > ## it under the terms of the GNU General Public License, version 2, 331s > ## as published by the Free Software Foundation. 331s > ## 331s > ## git2r is distributed in the hope that it will be useful, 331s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 331s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 331s > ## GNU General Public License for more details. 331s > ## 331s > ## You should have received a copy of the GNU General Public License along 331s > ## with this program; if not, write to the Free Software Foundation, Inc., 331s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 331s > 331s > library(git2r) 331s > source("util/check.R") 331s > 331s > ## For debugging 331s > sessionInfo() 331s R version 4.3.3 (2024-02-29) 331s Platform: aarch64-unknown-linux-gnu (64-bit) 331s Running under: Ubuntu Noble Numbat (development branch) 331s 331s Matrix products: default 331s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 331s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 331s 331s locale: 331s [1] C 331s 331s time zone: Etc/UTC 331s tzcode source: system (glibc) 331s 331s attached base packages: 331s [1] stats graphics grDevices utils datasets methods base 331s 331s other attached packages: 331s [1] git2r_0.33.0 331s 331s loaded via a namespace (and not attached): 331s [1] compiler_4.3.3 331s > libgit2_version() 331s $major 331s [1] 1 331s 331s $minor 331s [1] 7 331s 331s $rev 331s [1] 2 331s 331s > libgit2_features() 331s $threads 331s [1] TRUE 331s 331s $https 331s [1] TRUE 331s 331s $ssh 331s [1] TRUE 331s 331s > 331s > 331s > ## Create a directory in tempdir 331s > path <- tempfile(pattern = "git2r-") 331s > dir.create(path) 331s > 331s > ## Initialize a repository 331s > repo <- init(path, branch = "main") 332s > config(repo, user.name = "Alice", user.email = "alice@example.org") 332s > 332s > ## Create a file, add and commit 332s > writeLines("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 332s + con = file.path(path, "test.txt")) 332s > add(repo, "test.txt") 332s > commit_1 <- commit(repo, "Commit message 1") 332s > 332s > ## Create first branch, checkout, add file and commit 332s > checkout(repo, "branch1", create = TRUE) 332s > writeLines("Branch 1", file.path(path, "branch-1.txt")) 332s > add(repo, "branch-1.txt") 332s > commit_2 <- commit(repo, "Commit message branch 1") 332s > 332s > ## Create second branch, checkout, add file and commit 332s > b_2 <- branch_create(commit_1, "branch2") 332s > checkout(b_2) 332s > writeLines("Branch 2", file.path(path, "branch-2.txt")) 332s > add(repo, "branch-2.txt") 332s > commit_3 <- commit(repo, "Commit message branch 2") 332s > writeLines(c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 332s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 332s + con = file.path(path, "test.txt")) 332s > add(repo, "test.txt") 332s > commit_4 <- commit(repo, "Second commit message branch 2") 332s > 332s > ## Check that merge base equals commit_1 332s > stopifnot(identical(merge_base(commit_2, commit_3), commit_1)) 332s > 332s > ## Checkout main 332s > b <- branches(repo) 332s > checkout(b[sapply(b, "[", "name") == "main"][[1]], force = TRUE) 332s > 332s > ## Merge branch 1 332s > m_1 <- merge(repo, "branch1") 332s > stopifnot(identical(m_1$fast_forward, TRUE)) 332s > stopifnot(identical(m_1$conflicts, FALSE)) 332s > stopifnot(identical(sha(m_1), NA_character_)) 332s > 332s > ## Merge branch 2 332s > m_2 <- merge(path, "branch2") 332s > stopifnot(identical(m_2$fast_forward, FALSE)) 332s > stopifnot(identical(m_2$conflicts, FALSE)) 332s > stopifnot(identical(sha(m_2), sha(commits(repo)[[1]]))) 332s > 332s > ## Create third branch, checkout, change file and commit 332s > checkout(repo, "branch3", create = TRUE) 332s > writeLines(c("Lorem ipsum dolor amet sit, consectetur adipisicing elit, sed do", 332s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 332s + con = file.path(path, "test.txt")) 332s > add(repo, "test.txt") 332s > commit(repo, "Commit message branch 3") 332s [76fd877] 2024-03-16: Commit message branch 3 332s > 332s > ## Checkout main and create a change that creates a merge conflict 332s > checkout(repo, "main", force = TRUE) 332s > writeLines(c("Lorem ipsum dolor sit amet, adipisicing consectetur elit, sed do", 332s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 332s + con = file.path(path, "test.txt")) 332s > add(repo, "test.txt") 332s > commit(repo, "Some commit message branch 1") 332s [959d9f4] 2024-03-16: Some commit message branch 1 332s > 332s > ## Merge branch 3 332s > m_3 <- merge(repo, "branch3") 332s > stopifnot(identical(m_3$up_to_date, FALSE)) 332s > stopifnot(identical(m_3$fast_forward, FALSE)) 332s > stopifnot(identical(m_3$conflicts, TRUE)) 332s > stopifnot(identical(sha(m_3), NA_character_)) 332s > 332s > ## Check status; Expect to have one unstaged unmerged conflict. 332s > stopifnot(identical(status(repo), 332s + structure(list(staged = empty_named_list(), 332s + unstaged = list(conflicted = "test.txt"), 332s + untracked = empty_named_list()), 332s + class = "git_status"))) 332s > 332s > ## Cleanup 332s > unlink(path, recursive = TRUE) 332s > 332s BEGIN TEST normal_merge.R 332s 332s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 332s Copyright (C) 2024 The R Foundation for Statistical Computing 332s Platform: aarch64-unknown-linux-gnu (64-bit) 332s 332s R is free software and comes with ABSOLUTELY NO WARRANTY. 332s You are welcome to redistribute it under certain conditions. 332s Type 'license()' or 'licence()' for distribution details. 332s 332s R is a collaborative project with many contributors. 332s Type 'contributors()' for more information and 332s 'citation()' on how to cite R or R packages in publications. 332s 332s Type 'demo()' for some demos, 'help()' for on-line help, or 332s 'help.start()' for an HTML browser interface to help. 332s Type 'q()' to quit R. 332s 332s > ## git2r, R bindings to the libgit2 library. 332s > ## Copyright (C) 2013-2023 The git2r contributors 332s > ## 332s > ## This program is free software; you can redistribute it and/or modify 332s > ## it under the terms of the GNU General Public License, version 2, 332s > ## as published by the Free Software Foundation. 332s > ## 332s > ## git2r is distributed in the hope that it will be useful, 332s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 332s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 332s > ## GNU General Public License for more details. 332s > ## 332s > ## You should have received a copy of the GNU General Public License along 332s > ## with this program; if not, write to the Free Software Foundation, Inc., 332s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 332s > 332s > library(git2r) 332s > 332s > ## For debugging 332s > sessionInfo() 332s R version 4.3.3 (2024-02-29) 332s Platform: aarch64-unknown-linux-gnu (64-bit) 332s Running under: Ubuntu Noble Numbat (development branch) 332s 332s Matrix products: default 332s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 332s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 332s 332s locale: 332s [1] C 332s 332s time zone: Etc/UTC 332s tzcode source: system (glibc) 332s 332s attached base packages: 332s [1] stats graphics grDevices utils datasets methods base 332s 332s other attached packages: 332s [1] git2r_0.33.0 332s 332s loaded via a namespace (and not attached): 332s [1] compiler_4.3.3 332s > libgit2_version() 332s $major 332s [1] 1 332s 332s $minor 332s [1] 7 332s 332s $rev 332s [1] 2 332s 332s > libgit2_features() 332s $threads 332s [1] TRUE 332s 332s $https 332s [1] TRUE 332s 332s $ssh 332s [1] TRUE 332s 332s > 332s > 332s > ## Initialize a temporary repository 332s > path <- tempfile(pattern = "git2r-") 332s > dir.create(path) 332s > repo <- init(path, branch = "main") 332s > 332s > ## Create a user and commit a file 332s > config(repo, user.name = "Author", user.email = "author@example.org") 332s > writeLines(c("First line in file 1.", "Second line in file 1."), 332s + file.path(path, "example-1.txt")) 332s > add(repo, "example-1.txt") 332s > commit(repo, "First commit message") 332s [261b70c] 2024-03-16: First commit message 332s > 332s > ## Create and add one more file 332s > writeLines(c("First line in file 2.", "Second line in file 2."), 332s + file.path(path, "example-2.txt")) 332s > add(repo, "example-2.txt") 332s > commit(repo, "Second commit message") 332s [c1a6e86] 2024-03-16: Second commit message 332s > 332s > ## Create a new branch 'fix' 332s > checkout(repo, "fix", create = TRUE) 332s > 332s > ## Update 'example-1.txt' (swap words in first line) and commit 332s > writeLines(c("line First in file 1.", "Second line in file 1."), 332s + file.path(path, "example-1.txt")) 332s > add(repo, "example-1.txt") 332s > commit(repo, "Third commit message") 332s [0f03178] 2024-03-16: Third commit message 332s > 332s > checkout(repo, "main") 332s > 332s > ## Update 'example-2.txt' (swap words in second line) and commit 332s > writeLines(c("First line in file 2.", "line Second in file 2."), 332s + file.path(path, "example-2.txt")) 332s > add(repo, "example-2.txt") 332s > commit(repo, "Fourth commit message") 332s [3f8f0a1] 2024-03-16: Fourth commit message 332s > 332s > # Missing branch to merge with should throw an error 332s > tools::assertError(merge(repo)) 332s > 332s > ## Merge 'fix' 332s > m <- merge(repo, "fix", TRUE, default_signature(repo)) 332s > stopifnot(identical(format(m), "Merge")) 332s > 332s > ## Merge 'fix' again 332s > m <- merge(repo, "fix", TRUE, default_signature(repo)) 332s > stopifnot(identical(format(m), "Already up-to-date")) 332s > 332s > ## Check number of parents of each commit 332s > stopifnot(identical(sapply(commits(repo), function(x) length(parents(x))), 332s + c(2L, 1L, 1L, 1L, 0L))) 332s > 332s > ## Check that last commit is a merge 332s > stopifnot(is_merge(last_commit(repo))) 332s > summary(last_commit(repo)) 332s Commit: e160ca0b2068015b2802b1394cb1d68c82bb2db5 332s Merge: 3f8f0a1556b5583fbf1cede1f07e78571e9e3d64 332s 0f031789dc3138ff3d088a84a466217b64da50ee 332s Author: Author 332s When: 2024-03-16 18:45:21 GMT 332s 332s merge fix 332s 332s Commit message: 3f8f0a1556b5583fbf1cede1f07e78571e9e3d64 332s Fourth commit message 332s 332s Commit message: 0f031789dc3138ff3d088a84a466217b64da50ee 332s Third commit message 332s 332s > 332s > ## Check that metadata associated with merge is removed 332s > stopifnot(!file.exists(file.path(path, ".git", "MERGE_HEAD"))) 332s > 332s > ## Cleanup 332s > unlink(path, recursive = TRUE) 332s > 332s BEGIN TEST note.R 332s 332s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 332s Copyright (C) 2024 The R Foundation for Statistical Computing 332s Platform: aarch64-unknown-linux-gnu (64-bit) 332s 332s R is free software and comes with ABSOLUTELY NO WARRANTY. 332s You are welcome to redistribute it under certain conditions. 332s Type 'license()' or 'licence()' for distribution details. 332s 332s R is a collaborative project with many contributors. 332s Type 'contributors()' for more information and 332s 'citation()' on how to cite R or R packages in publications. 332s 332s Type 'demo()' for some demos, 'help()' for on-line help, or 332s 'help.start()' for an HTML browser interface to help. 332s Type 'q()' to quit R. 332s 332s > ## git2r, R bindings to the libgit2 library. 332s > ## Copyright (C) 2013-2023 The git2r contributors 332s > ## 332s > ## This program is free software; you can redistribute it and/or modify 332s > ## it under the terms of the GNU General Public License, version 2, 332s > ## as published by the Free Software Foundation. 332s > ## 332s > ## git2r is distributed in the hope that it will be useful, 332s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 332s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 332s > ## GNU General Public License for more details. 332s > ## 332s > ## You should have received a copy of the GNU General Public License along 332s > ## with this program; if not, write to the Free Software Foundation, Inc., 332s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 332s > 332s > library("git2r") 332s > 332s > ## For debugging 332s > sessionInfo() 332s R version 4.3.3 (2024-02-29) 332s Platform: aarch64-unknown-linux-gnu (64-bit) 332s Running under: Ubuntu Noble Numbat (development branch) 332s 332s Matrix products: default 332s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 332s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 332s 332s locale: 332s [1] C 332s 332s time zone: Etc/UTC 332s tzcode source: system (glibc) 332s 332s attached base packages: 332s [1] stats graphics grDevices utils datasets methods base 332s 332s other attached packages: 332s [1] git2r_0.33.0 332s 332s loaded via a namespace (and not attached): 332s [1] compiler_4.3.3 332s > libgit2_version() 332s $major 332s [1] 1 332s 332s $minor 332s [1] 7 332s 332s $rev 332s [1] 2 332s 332s > libgit2_features() 332s $threads 332s [1] TRUE 332s 332s $https 332s [1] TRUE 332s 332s $ssh 332s [1] TRUE 332s 332s > 332s > 332s > ## Create a directory in tempdir 332s > path <- tempfile(pattern = "git2r-") 332s > dir.create(path) 332s > 332s > ## Initialize a repository 332s > repo <- init(path) 332s > config(repo, user.name = "Alice", user.email = "alice@example.org") 332s > 332s > ## Create a file, add and commit 332s > writeLines("Hello world!", file.path(path, "test.txt")) 332s > add(repo, "test.txt") 332s > commit_1 <- commit(repo, "Commit message 1") 332s > 332s > ## Create another commit 332s > writeLines(c("Hello world!", 332s + "HELLO WORLD!"), 332s + file.path(path, "test.txt")) 332s > add(repo, "test.txt") 332s > commit_2 <- commit(repo, "Commit message 2") 332s > 332s > ## Check default ref 332s > stopifnot(identical(note_default_ref(repo), 332s + "refs/notes/commits")) 332s > 332s > ## Check that an invalid object argument in note_create produce an 332s > ## error. 332s > tools::assertError(note_create(object = NULL, message = "test")) 332s > tools::assertError(note_create(object = 1, message = "test")) 332s > 332s > ## Check that notes is an empty list 332s > stopifnot(identical(notes(repo), list())) 332s > 332s > ## Create note in default namespace 332s > note_1 <- note_create(commit_1, "Note-1") 332s > stopifnot(identical(print(note_1), note_1)) 332s note: a801dfb10a85d13bc8ab304a9255b5cf180f94dd 332s > stopifnot(identical(length(notes(repo)), 1L)) 332s > stopifnot(identical(sha(note_1), note_1$sha)) 332s > tools::assertError(note_create(commit_1, "Note-2")) 332s > note_2 <- note_create(commit_1, "Note-2", force = TRUE) 332s > stopifnot(identical(length(notes(repo)), 1L)) 332s > 332s > ## Check that an invalid note argument in note_remove produce an 332s > ## error. 332s > tools::assertError(note_remove(note = 1)) 332s > 332s > ## Create note in named (review) namespace 332s > note_3 <- note_create(commit_1, "Note-3", ref = "refs/notes/review") 332s > note_4 <- note_create(commit_2, "Note-4", ref = "refs/notes/review") 332s > stopifnot(identical(length(notes(repo, ref = "refs/notes/review")), 2L)) 332s > note_remove(note_3) 332s > note_remove(note_4) 332s > stopifnot(identical(notes(repo, ref = "refs/notes/review"), list())) 332s > note_5 <- note_create(commit_1, "Note-5", ref = "review") 332s > note_6 <- note_create(commit_2, "Note-6", ref = "review") 332s > stopifnot(identical(length(notes(repo, ref = "review")), 2L)) 332s > note_remove(note_5) 332s > note_remove(note_6) 332s > stopifnot(identical(length(notes(repo, ref = "review")), 0L)) 332s > 332s > ## Create note on blob and tree 332s > tree_1 <- tree(commit_1) 332s > note_7 <- note_create(tree_1, "Note-7") 332s > stopifnot(is(object = lookup(repo, note_7$annotated), class2 = "git_tree")) 332s > stopifnot(identical(length(notes(repo)), 2L)) 332s > blob_1 <- lookup(repo, tree_1$id[1]) 332s > note_8 <- note_create(blob_1, "Note-8") 332s > stopifnot(is(object = lookup(repo, note_8$annotated), class2 = "git_blob")) 332s > stopifnot(identical(length(notes(repo)), 3L)) 332s > 332s > ## Cleanup 332s > unlink(path, recursive = TRUE) 332s > 332s BEGIN TEST odb_blobs.R 332s 332s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 332s Copyright (C) 2024 The R Foundation for Statistical Computing 332s Platform: aarch64-unknown-linux-gnu (64-bit) 332s 332s R is free software and comes with ABSOLUTELY NO WARRANTY. 332s You are welcome to redistribute it under certain conditions. 332s Type 'license()' or 'licence()' for distribution details. 332s 332s R is a collaborative project with many contributors. 332s Type 'contributors()' for more information and 332s 'citation()' on how to cite R or R packages in publications. 332s 332s Type 'demo()' for some demos, 'help()' for on-line help, or 332s 'help.start()' for an HTML browser interface to help. 332s Type 'q()' to quit R. 332s 332s > ## git2r, R bindings to the libgit2 library. 332s > ## Copyright (C) 2013-2023 The git2r contributors 332s > ## 332s > ## This program is free software; you can redistribute it and/or modify 332s > ## it under the terms of the GNU General Public License, version 2, 332s > ## as published by the Free Software Foundation. 332s > ## 332s > ## git2r is distributed in the hope that it will be useful, 332s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 332s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 332s > ## GNU General Public License for more details. 332s > ## 332s > ## You should have received a copy of the GNU General Public License along 332s > ## with this program; if not, write to the Free Software Foundation, Inc., 332s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 332s > 332s > library("git2r") 332s > 332s > ## For debugging 332s > sessionInfo() 332s R version 4.3.3 (2024-02-29) 332s Platform: aarch64-unknown-linux-gnu (64-bit) 332s Running under: Ubuntu Noble Numbat (development branch) 332s 332s Matrix products: default 332s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 332s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 332s 332s locale: 332s [1] C 332s 332s time zone: Etc/UTC 332s tzcode source: system (glibc) 332s 332s attached base packages: 332s [1] stats graphics grDevices utils datasets methods base 332s 332s other attached packages: 332s [1] git2r_0.33.0 332s 332s loaded via a namespace (and not attached): 332s [1] compiler_4.3.3 332s > libgit2_version() 332s $major 332s [1] 1 332s 332s $minor 332s [1] 7 332s 332s $rev 332s [1] 2 332s 332s > libgit2_features() 332s $threads 332s [1] TRUE 332s 332s $https 332s [1] TRUE 332s 332s $ssh 332s [1] TRUE 332s 332s > 332s > 332s > ## Create a directory in tempdir 332s > path <- tempfile(pattern = "git2r-") 332s > dir.create(path) 332s > 332s > ## Initialize a repository 332s > repo <- init(path) 332s > config(repo, user.name = "Alice", user.email = "alice@@example.org") 332s > 332s > ## Create a file, add and commit 332s > writeLines("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 332s + con = file.path(path, "test.txt")) 332s > add(repo, "test.txt") 332s > commit(repo, "Commit message 1") 332s [eda9822] 2024-03-16: Commit message 1 332s > 332s > ## Change file and commit 332s > writeLines(c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 332s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 332s + con = file.path(path, "test.txt")) 332s > add(repo, "test.txt") 332s > commit(repo, "Commit message 2") 332s [dbcef27] 2024-03-16: Commit message 2 332s > 332s > ## Commit same content under different name in a sub-directory 332s > dir.create(file.path(path, "sub-directory")) 332s > file.copy(file.path(path, "test.txt"), 332s + file.path(path, "sub-directory", "copy.txt")) 332s [1] TRUE 332s > add(repo, "sub-directory/copy.txt") 332s > commit(repo, "Commit message 3") 332s [5b8520f] 2024-03-16: Commit message 3 332s > 332s > ## List blobs 332s > b <- odb_blobs(repo) 332s > 332s > ## Order the data.frame before checking 332s > b <- b[order(b$name), ] 332s > 332s > ## Check blobs 332s > stopifnot(identical(nrow(b), 3L)) 332s > stopifnot(identical( 332s + colnames(b), 332s + c("sha", "path", "name", "len", "commit", "author", "when"))) 332s > stopifnot(identical(b$path, c("sub-directory", "", ""))) 332s > stopifnot(identical(b$name, c("copy.txt", "test.txt", "test.txt"))) 332s > stopifnot(identical(b$author, c("Alice", "Alice", "Alice"))) 332s > 332s > ## Cleanup 332s > unlink(path, recursive = TRUE) 332s > 333s BEGIN TEST pre-process-path.R 333s 333s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 333s Copyright (C) 2024 The R Foundation for Statistical Computing 333s Platform: aarch64-unknown-linux-gnu (64-bit) 333s 333s R is free software and comes with ABSOLUTELY NO WARRANTY. 333s You are welcome to redistribute it under certain conditions. 333s Type 'license()' or 'licence()' for distribution details. 333s 333s R is a collaborative project with many contributors. 333s Type 'contributors()' for more information and 333s 'citation()' on how to cite R or R packages in publications. 333s 333s Type 'demo()' for some demos, 'help()' for on-line help, or 333s 'help.start()' for an HTML browser interface to help. 333s Type 'q()' to quit R. 333s 333s > ## git2r, R bindings to the libgit2 library. 333s > ## Copyright (C) 2013-2023 The git2r contributors 333s > ## 333s > ## This program is free software; you can redistribute it and/or modify 333s > ## it under the terms of the GNU General Public License, version 2, 333s > ## as published by the Free Software Foundation. 333s > ## 333s > ## git2r is distributed in the hope that it will be useful, 333s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 333s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 333s > ## GNU General Public License for more details. 333s > ## 333s > ## You should have received a copy of the GNU General Public License along 333s > ## with this program; if not, write to the Free Software Foundation, Inc., 333s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 333s > 333s > library(git2r) 333s > source("util/check.R") 333s > 333s > ## For debugging 333s > sessionInfo() 333s R version 4.3.3 (2024-02-29) 333s Platform: aarch64-unknown-linux-gnu (64-bit) 333s Running under: Ubuntu Noble Numbat (development branch) 333s 333s Matrix products: default 333s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 333s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 333s 333s locale: 333s [1] C 333s 333s time zone: Etc/UTC 333s tzcode source: system (glibc) 333s 333s attached base packages: 333s [1] stats graphics grDevices utils datasets methods base 333s 333s other attached packages: 333s [1] git2r_0.33.0 333s 333s loaded via a namespace (and not attached): 333s [1] compiler_4.3.3 333s > libgit2_version() 333s $major 333s [1] 1 333s 333s $minor 333s [1] 7 333s 333s $rev 333s [1] 2 333s 333s > libgit2_features() 333s $threads 333s [1] TRUE 333s 333s $https 333s [1] TRUE 333s 333s $ssh 333s [1] TRUE 333s 333s > 333s > 333s > ## Create a directory in tempdir 333s > path <- tempfile(pattern = "git2r-") 333s > dir.create(path) 333s > setwd(path) 333s > 333s > ## Initialize a repository 333s > repo <- init(path) 333s > config(repo, user.name = "Alice", user.email = "alice@example.org") 333s > 333s > ## Test to add file with a leading './' 333s > writeLines("foo-1", file.path(path, "foo-1")) 333s > add(repo, "./foo-1") 333s > status_exp <- structure(list(staged = list(new = "foo-1"), 333s + unstaged = empty_named_list(), 333s + untracked = empty_named_list()), 333s + class = "git_status") 333s > status_obs <- status(repo) 333s > str(status_exp) 333s List of 3 333s $ staged :List of 1 333s ..$ new: chr "foo-1" 333s $ unstaged : Named list() 333s $ untracked: Named list() 333s - attr(*, "class")= chr "git_status" 333s > str(status_obs) 333s List of 3 333s $ staged :List of 1 333s ..$ new: chr "foo-1" 333s $ unstaged : Named list() 333s $ untracked: Named list() 333s - attr(*, "class")= chr "git_status" 333s > stopifnot(identical(status_obs, status_exp)) 333s > 333s > ## Test to add file in sub-folder with sub-folder as working directory 333s > writeLines("foo-2", file.path(path, "foo-2")) 333s > dir.create(file.path(path, "foo_dir")) 333s > writeLines("foo-2", file.path(path, "foo_dir/foo-2")) 333s > setwd("./foo_dir") 333s > add(repo, "foo-2") 333s > status_exp <- structure(list(staged = list(new = "foo-1", 333s + new = "foo_dir/foo-2"), 333s + unstaged = empty_named_list(), 333s + untracked = list(untracked = "foo-2")), 333s + class = "git_status") 333s > status_obs <- status(repo) 333s > str(status_exp) 333s List of 3 333s $ staged :List of 2 333s ..$ new: chr "foo-1" 333s ..$ new: chr "foo_dir/foo-2" 333s $ unstaged : Named list() 333s $ untracked:List of 1 333s ..$ untracked: chr "foo-2" 333s - attr(*, "class")= chr "git_status" 333s > str(status_obs) 333s List of 3 333s $ staged :List of 2 333s ..$ new: chr "foo-1" 333s ..$ new: chr "foo_dir/foo-2" 333s $ unstaged : Named list() 333s $ untracked:List of 1 333s ..$ untracked: chr "foo-2" 333s - attr(*, "class")= chr "git_status" 333s > stopifnot(identical(status_obs, status_exp)) 333s > 333s > ## Test glob expansion 333s > setwd(tempdir()) 333s > dir.create(file.path(path, "glob_dir")) 333s > writeLines("a", file.path(path, "glob_dir/a.txt")) 333s > writeLines("b", file.path(path, "glob_dir/b.txt")) 333s > writeLines("c", file.path(path, "glob_dir/c.txt")) 333s > writeLines("d", file.path(path, "glob_dir/d.md")) 333s > add(repo, "glob_dir/*txt") 333s > status_exp <- structure(list(staged = list(new = "foo-1", 333s + new = "foo_dir/foo-2", 333s + new = "glob_dir/a.txt", 333s + new = "glob_dir/b.txt", 333s + new = "glob_dir/c.txt"), 333s + unstaged = empty_named_list(), 333s + untracked = list(untracked = "foo-2", 333s + untracked = "glob_dir/d.md")), 333s + class = "git_status") 333s > status_obs <- status(repo) 333s > str(status_exp) 333s List of 3 333s $ staged :List of 5 333s ..$ new: chr "foo-1" 333s ..$ new: chr "foo_dir/foo-2" 333s ..$ new: chr "glob_dir/a.txt" 333s ..$ new: chr "glob_dir/b.txt" 333s ..$ new: chr "glob_dir/c.txt" 333s $ unstaged : Named list() 333s $ untracked:List of 2 333s ..$ untracked: chr "foo-2" 333s ..$ untracked: chr "glob_dir/d.md" 333s - attr(*, "class")= chr "git_status" 333s > str(status_obs) 333s List of 3 333s $ staged :List of 5 333s ..$ new: chr "foo-1" 333s ..$ new: chr "foo_dir/foo-2" 333s ..$ new: chr "glob_dir/a.txt" 333s ..$ new: chr "glob_dir/b.txt" 333s ..$ new: chr "glob_dir/c.txt" 333s $ unstaged : Named list() 333s $ untracked:List of 2 333s ..$ untracked: chr "foo-2" 333s ..$ untracked: chr "glob_dir/d.md" 333s - attr(*, "class")= chr "git_status" 333s > stopifnot(identical(status_obs, status_exp)) 333s > 333s > ## Test glob expansion with relative path 333s > setwd(path) 333s > add(repo, "./glob_dir/*md") 333s > status_exp <- structure(list(staged = list(new = "foo-1", 333s + new = "foo_dir/foo-2", 333s + new = "glob_dir/a.txt", 333s + new = "glob_dir/b.txt", 333s + new = "glob_dir/c.txt", 333s + new = "glob_dir/d.md"), 333s + unstaged = empty_named_list(), 333s + untracked = list(untracked = "foo-2")), 333s + class = "git_status") 333s > status_obs <- status(repo) 333s > str(status_exp) 333s List of 3 333s $ staged :List of 6 333s ..$ new: chr "foo-1" 333s ..$ new: chr "foo_dir/foo-2" 333s ..$ new: chr "glob_dir/a.txt" 333s ..$ new: chr "glob_dir/b.txt" 333s ..$ new: chr "glob_dir/c.txt" 333s ..$ new: chr "glob_dir/d.md" 333s $ unstaged : Named list() 333s $ untracked:List of 1 333s ..$ untracked: chr "foo-2" 333s - attr(*, "class")= chr "git_status" 333s > str(status_obs) 333s List of 3 333s $ staged :List of 6 333s ..$ new: chr "foo-1" 333s ..$ new: chr "foo_dir/foo-2" 333s ..$ new: chr "glob_dir/a.txt" 333s ..$ new: chr "glob_dir/b.txt" 333s ..$ new: chr "glob_dir/c.txt" 333s ..$ new: chr "glob_dir/d.md" 333s $ unstaged : Named list() 333s $ untracked:List of 1 333s ..$ untracked: chr "foo-2" 333s - attr(*, "class")= chr "git_status" 333s > stopifnot(identical(status_obs, status_exp)) 333s > 333s > ## Test to add file in root of workdir when the file also exists in 333s > ## current workdir. 333s > setwd(tempdir()) 333s > writeLines("e", file.path(path, "e.txt")) 333s > writeLines("e", file.path(tempdir(), "e.txt")) 333s > add(repo, "e.txt") 333s > status_exp <- structure(list(staged = list(new = "e.txt", 333s + new = "foo-1", 333s + new = "foo_dir/foo-2", 333s + new = "glob_dir/a.txt", 333s + new = "glob_dir/b.txt", 333s + new = "glob_dir/c.txt", 333s + new = "glob_dir/d.md"), 333s + unstaged = empty_named_list(), 333s + untracked = list(untracked = "foo-2")), 333s + class = "git_status") 333s > status_obs <- status(repo) 333s > str(status_exp) 333s List of 3 333s $ staged :List of 7 333s ..$ new: chr "e.txt" 333s ..$ new: chr "foo-1" 333s ..$ new: chr "foo_dir/foo-2" 333s ..$ new: chr "glob_dir/a.txt" 333s ..$ new: chr "glob_dir/b.txt" 333s ..$ new: chr "glob_dir/c.txt" 333s ..$ new: chr "glob_dir/d.md" 333s $ unstaged : Named list() 333s $ untracked:List of 1 333s ..$ untracked: chr "foo-2" 333s - attr(*, "class")= chr "git_status" 333s > str(status_obs) 333s List of 3 333s $ staged :List of 7 333s ..$ new: chr "e.txt" 333s ..$ new: chr "foo-1" 333s ..$ new: chr "foo_dir/foo-2" 333s ..$ new: chr "glob_dir/a.txt" 333s ..$ new: chr "glob_dir/b.txt" 333s ..$ new: chr "glob_dir/c.txt" 333s ..$ new: chr "glob_dir/d.md" 333s $ unstaged : Named list() 333s $ untracked:List of 1 333s ..$ untracked: chr "foo-2" 333s - attr(*, "class")= chr "git_status" 333s > stopifnot(identical(status_obs, status_exp)) 333s > 333s > ## Cleanup 333s > unlink(path, recursive = TRUE) 333s > 333s BEGIN TEST pull.R 333s 333s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 333s Copyright (C) 2024 The R Foundation for Statistical Computing 333s Platform: aarch64-unknown-linux-gnu (64-bit) 333s 333s R is free software and comes with ABSOLUTELY NO WARRANTY. 333s You are welcome to redistribute it under certain conditions. 333s Type 'license()' or 'licence()' for distribution details. 333s 333s R is a collaborative project with many contributors. 333s Type 'contributors()' for more information and 333s 'citation()' on how to cite R or R packages in publications. 333s 333s Type 'demo()' for some demos, 'help()' for on-line help, or 333s 'help.start()' for an HTML browser interface to help. 333s Type 'q()' to quit R. 333s 333s > ## git2r, R bindings to the libgit2 library. 333s > ## Copyright (C) 2013-2023 The git2r contributors 333s > ## 333s > ## This program is free software; you can redistribute it and/or modify 333s > ## it under the terms of the GNU General Public License, version 2, 333s > ## as published by the Free Software Foundation. 333s > ## 333s > ## git2r is distributed in the hope that it will be useful, 333s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 333s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 333s > ## GNU General Public License for more details. 333s > ## 333s > ## You should have received a copy of the GNU General Public License along 333s > ## with this program; if not, write to the Free Software Foundation, Inc., 333s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 333s > 333s > library(git2r) 333s > 333s > ## For debugging 333s > sessionInfo() 333s R version 4.3.3 (2024-02-29) 333s Platform: aarch64-unknown-linux-gnu (64-bit) 333s Running under: Ubuntu Noble Numbat (development branch) 333s 333s Matrix products: default 333s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 333s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 333s 333s locale: 333s [1] C 333s 333s time zone: Etc/UTC 333s tzcode source: system (glibc) 333s 333s attached base packages: 333s [1] stats graphics grDevices utils datasets methods base 333s 333s other attached packages: 333s [1] git2r_0.33.0 333s 333s loaded via a namespace (and not attached): 333s [1] compiler_4.3.3 333s > libgit2_version() 333s $major 333s [1] 1 333s 333s $minor 333s [1] 7 333s 333s $rev 333s [1] 2 333s 333s > libgit2_features() 333s $threads 333s [1] TRUE 333s 333s $https 333s [1] TRUE 333s 333s $ssh 333s [1] TRUE 333s 333s > 333s > 333s > ## Create directories for repositories in tempdir 333s > path_bare <- tempfile(pattern = "git2r-") 333s > path_repo_1 <- tempfile(pattern = "git2r-") 333s > path_repo_2 <- tempfile(pattern = "git2r-") 333s > 333s > dir.create(path_bare) 333s > dir.create(path_repo_1) 333s > dir.create(path_repo_2) 333s > 333s > ## Create bare repository 333s > bare_repo <- init(path_bare, bare = TRUE) 333s > 333s > ## Clone to repo 1 333s > repo_1 <- clone(path_bare, path_repo_1) 333s cloning into '/tmp/RtmpHm5qFZ/git2r-f3768ec8874'... 333s > config(repo_1, user.name = "Alice", user.email = "alice@example.org") 333s > 333s > ## Add changes to repo 1 and push to bare 333s > writeLines("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 333s + con = file.path(path_repo_1, "test-1.txt")) 333s > add(repo_1, "test-1.txt") 333s > commit_1 <- commit(repo_1, "First commit message") 333s > branch_name <- branches(repo_1)[[1]]$name 333s > push(repo_1, "origin", paste0("refs/heads/", branch_name)) 333s > 333s > ## Clone to repo 2 333s > repo_2 <- clone(path_bare, path_repo_2) 333s cloning into '/tmp/RtmpHm5qFZ/git2r-f37331cee62'... 333s > config(repo_2, user.name = "Bob", user.email = "bob@example.org") 333s > 333s > ## Add more changes to repo 1 and push to bare 333s > writeLines(c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 333s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 333s + con = file.path(path_repo_1, "test-1.txt")) 333s > add(repo_1, "test-1.txt") 333s > commit_2 <- commit(repo_1, "Second commit message") 333s > push(repo_1, "origin", paste0("refs/heads/", branch_name)) 333s > 333s > ## Pull changes to repo_2 333s > pull(repo_2) 333s [updated] 987e553306..c0d4c7277b refs/remotes/origin/master 333s Merge: Fast-forward 333s > stopifnot(identical(length(commits(repo_2)), 2L)) 333s > 333s > ## Check remote url of repo_2 333s > stopifnot(identical( 333s + branch_remote_url(branch_get_upstream(repository_head(repo_2))), 333s + path_bare)) 333s > 333s > ## Unset remote remote tracking branch 333s > branch_set_upstream(repository_head(repo_2), NULL) 333s > stopifnot(is.null(branch_get_upstream(repository_head(repo_2)))) 333s > tools::assertError(pull(repo_2)) 333s > tools::assertError(branch_set_upstream(repository_head(repo_2), NULL)) 333s > 333s > ## Add more changes to repo 1 and push to bare 333s > writeLines( 333s + c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 333s + "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad", 333s + "minim veniam, quis nostrud exercitation ullamco laboris nisi ut"), 333s + con = file.path(path_repo_1, "test-1.txt")) 333s > add(repo_1, "test-1.txt") 333s > commit_3 <- commit(repo_1, "Third commit message") 333s > push(repo_1) 333s > 333s > ## Set remote tracking branch 333s > branch_set_upstream(repository_head(repo_2), 333s + paste0("origin/", branch_name)) 333s > stopifnot(identical( 333s + branch_remote_url(branch_get_upstream(repository_head(repo_2))), 333s + path_bare)) 333s > 333s > ## Pull changes to repo_2 333s > pull(repo_2) 333s [updated] c0d4c7277b..1835db62af refs/remotes/origin/master 333s Merge: Fast-forward 333s > stopifnot(identical(length(commits(repo_2)), 3L)) 333s > 333s > ## Check references in repo_1 and repo_2. Must clear the repo item 333s > ## since the repositories have different paths. 333s > stopifnot(identical(length(references(repo_1)), 2L)) 333s > 333s > ref_1 <- references(repo_1) 333s > lapply(seq_len(length(ref_1)), function(i) { 333s + ref_1[[i]]$repo <<- NULL 333s + }) 333s [[1]] 333s NULL 333s 333s [[2]] 333s NULL 333s 333s > 333s > ref_2 <- references(repo_2) 333s > lapply(seq_len(length(ref_2)), function(i) { 333s + ref_2[[i]]$repo <<- NULL 333s + }) 333s [[1]] 333s NULL 333s 333s [[2]] 333s NULL 333s 333s [[3]] 333s NULL 333s 333s > 333s > name <- paste0("refs/heads/", branch_name) 333s > stopifnot(identical(ref_1[[name]], ref_2[[name]])) 333s > 333s > name <- paste0("refs/remotes/", branch_name) 333s > stopifnot(identical(ref_1[[name]], ref_2[[name]])) 333s > 333s > ref_1 <- references(repo_1)[[paste0("refs/heads/", branch_name)]] 333s > stopifnot(identical(ref_1$name, paste0("refs/heads/", branch_name))) 333s > stopifnot(identical(ref_1$type, 1L)) 333s > stopifnot(identical(sha(ref_1), sha(commit_3))) 333s > stopifnot(identical(ref_1$target, NA_character_)) 333s > stopifnot(identical(ref_1$shorthand, branch_name)) 333s > 333s > ref_2 <- references(repo_1)[[paste0("refs/remotes/origin/", branch_name)]] 333s > stopifnot(identical(ref_2$name, paste0("refs/remotes/origin/", branch_name))) 333s > stopifnot(identical(ref_2$type, 1L)) 333s > stopifnot(identical(sha(ref_2), sha(commit_3))) 333s > stopifnot(identical(ref_2$target, NA_character_)) 333s > stopifnot(identical(ref_2$shorthand, paste0("origin/", branch_name))) 333s > 333s > ## Check references with missing repo argument 333s > wd <- setwd(path_repo_1) 333s > stopifnot(identical(length(references()), 2L)) 333s > if (!is.null(wd)) 333s + setwd(wd) 333s > 333s > ## Cleanup 333s > unlink(path_bare, recursive = TRUE) 333s > unlink(path_repo_1, recursive = TRUE) 333s > unlink(path_repo_2, recursive = TRUE) 333s > 333s BEGIN TEST push-force.R 333s 333s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 333s Copyright (C) 2024 The R Foundation for Statistical Computing 333s Platform: aarch64-unknown-linux-gnu (64-bit) 333s 333s R is free software and comes with ABSOLUTELY NO WARRANTY. 333s You are welcome to redistribute it under certain conditions. 333s Type 'license()' or 'licence()' for distribution details. 333s 333s R is a collaborative project with many contributors. 333s Type 'contributors()' for more information and 333s 'citation()' on how to cite R or R packages in publications. 333s 333s Type 'demo()' for some demos, 'help()' for on-line help, or 333s 'help.start()' for an HTML browser interface to help. 333s Type 'q()' to quit R. 333s 333s > ## git2r, R bindings to the libgit2 library. 333s > ## Copyright (C) 2013-2023 The git2r contributors 333s > ## 333s > ## This program is free software; you can redistribute it and/or modify 333s > ## it under the terms of the GNU General Public License, version 2, 333s > ## as published by the Free Software Foundation. 333s > ## 333s > ## git2r is distributed in the hope that it will be useful, 333s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 333s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 333s > ## GNU General Public License for more details. 333s > ## 333s > ## You should have received a copy of the GNU General Public License along 333s > ## with this program; if not, write to the Free Software Foundation, Inc., 333s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 333s > 333s > library(git2r) 334s > 334s > ## For debugging 334s > sessionInfo() 334s R version 4.3.3 (2024-02-29) 334s Platform: aarch64-unknown-linux-gnu (64-bit) 334s Running under: Ubuntu Noble Numbat (development branch) 334s 334s Matrix products: default 334s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 334s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 334s 334s locale: 334s [1] C 334s 334s time zone: Etc/UTC 334s tzcode source: system (glibc) 334s 334s attached base packages: 334s [1] stats graphics grDevices utils datasets methods base 334s 334s other attached packages: 334s [1] git2r_0.33.0 334s 334s loaded via a namespace (and not attached): 334s [1] compiler_4.3.3 334s > libgit2_version() 334s $major 334s [1] 1 334s 334s $minor 334s [1] 7 334s 334s $rev 334s [1] 2 334s 334s > libgit2_features() 334s $threads 334s [1] TRUE 334s 334s $https 334s [1] TRUE 334s 334s $ssh 334s [1] TRUE 334s 334s > 334s > 334s > ## Create directories for repositories in tempdir 334s > path_bare <- tempfile(pattern = "git2r-") 334s > path_repo_1 <- tempfile(pattern = "git2r-") 334s > path_repo_2 <- tempfile(pattern = "git2r-") 334s > 334s > dir.create(path_bare) 334s > dir.create(path_repo_1) 334s > dir.create(path_repo_2) 334s > 334s > ## Create bare repository 334s > bare_repo <- init(path_bare, bare = TRUE) 334s > 334s > ## Clone to repo 1 334s > repo_1 <- clone(path_bare, path_repo_1) 334s cloning into '/tmp/RtmplO5o8S/git2r-f45577ff2f3'... 334s > config(repo_1, user.name = "Alice", user.email = "alice@example.org") 334s > 334s > ## Add changes to repo 1 and push to bare 334s > writeLines("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 334s + con = file.path(path_repo_1, "test-1.txt")) 334s > add(repo_1, "test-1.txt") 334s > commit_1 <- commit(repo_1, "First commit message") 334s > branch_name <- branches(repo_1)[[1]]$name 334s > push(repo_1, "origin", paste0("refs/heads/", branch_name)) 334s > 334s > ## Clone to repo 2 334s > repo_2 <- clone(path_bare, path_repo_2) 334s cloning into '/tmp/RtmplO5o8S/git2r-f454bd30034'... 334s > config(repo_2, user.name = "Bob", user.email = "bob@example.org") 334s > 334s > ## Add more changes to repo 1 and push to bare 334s > writeLines(c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 334s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 334s + con = file.path(path_repo_1, "test-1.txt")) 334s > add(repo_1, "test-1.txt") 334s > commit_2 <- commit(repo_1, "Second commit message") 334s > push(repo_1, "origin", paste0("refs/heads/", branch_name)) 334s > 334s > ## Add changes to repo 2 and push to bare 334s > writeLines( 334s + c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 334s + "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad", 334s + "minim veniam, quis nostrud exercitation ullamco laboris nisi ut"), 334s + con = file.path(path_repo_2, "test-1.txt")) 334s > add(repo_2, "test-1.txt") 334s > commit_3 <- commit(repo_2, "Third commit message") 334s > 334s > ## We are behind, so this should fail 334s > tools::assertError(push(repo_2)) 334s > 334s > ## Push with force = TRUE 334s > push(repo_2, force = TRUE) 334s > 334s > ## Check commits 334s > stopifnot(identical(length(commits(bare_repo)), 2L)) 334s > stopifnot(identical(sha(commits(repo_2)[[1]]), sha(commits(bare_repo)[[1]]))) 334s > stopifnot(identical(sha(commits(repo_2)[[2]]), sha(commits(bare_repo)[[2]]))) 334s > 334s > ## Cleanup 334s > unlink(path_bare, recursive = TRUE) 334s > unlink(path_repo_1, recursive = TRUE) 334s > unlink(path_repo_2, recursive = TRUE) 334s > 334s BEGIN TEST push.R 334s 334s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 334s Copyright (C) 2024 The R Foundation for Statistical Computing 334s Platform: aarch64-unknown-linux-gnu (64-bit) 334s 334s R is free software and comes with ABSOLUTELY NO WARRANTY. 334s You are welcome to redistribute it under certain conditions. 334s Type 'license()' or 'licence()' for distribution details. 334s 334s R is a collaborative project with many contributors. 334s Type 'contributors()' for more information and 334s 'citation()' on how to cite R or R packages in publications. 334s 334s Type 'demo()' for some demos, 'help()' for on-line help, or 334s 'help.start()' for an HTML browser interface to help. 334s Type 'q()' to quit R. 334s 334s > ## git2r, R bindings to the libgit2 library. 334s > ## Copyright (C) 2013-2023 The git2r contributors 334s > ## 334s > ## This program is free software; you can redistribute it and/or modify 334s > ## it under the terms of the GNU General Public License, version 2, 334s > ## as published by the Free Software Foundation. 334s > ## 334s > ## git2r is distributed in the hope that it will be useful, 334s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 334s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 334s > ## GNU General Public License for more details. 334s > ## 334s > ## You should have received a copy of the GNU General Public License along 334s > ## with this program; if not, write to the Free Software Foundation, Inc., 334s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 334s > 334s > library(git2r) 334s > 334s > ## For debugging 334s > sessionInfo() 334s R version 4.3.3 (2024-02-29) 334s Platform: aarch64-unknown-linux-gnu (64-bit) 334s Running under: Ubuntu Noble Numbat (development branch) 334s 334s Matrix products: default 334s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 334s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 334s 334s locale: 334s [1] C 334s 334s time zone: Etc/UTC 334s tzcode source: system (glibc) 334s 334s attached base packages: 334s [1] stats graphics grDevices utils datasets methods base 334s 334s other attached packages: 334s [1] git2r_0.33.0 334s 334s loaded via a namespace (and not attached): 334s [1] compiler_4.3.3 334s > libgit2_version() 334s $major 334s [1] 1 334s 334s $minor 334s [1] 7 334s 334s $rev 334s [1] 2 334s 334s > libgit2_features() 334s $threads 334s [1] TRUE 334s 334s $https 334s [1] TRUE 334s 334s $ssh 334s [1] TRUE 334s 334s > 334s > 334s > ## Create 2 directories in tempdir 334s > path_bare <- tempfile(pattern = "git2r-") 334s > path_repo <- tempfile(pattern = "git2r-") 334s > 334s > dir.create(path_bare) 334s > dir.create(path_repo) 334s > 334s > ## Create repositories 334s > bare_repo <- init(path_bare, bare = TRUE) 334s > repo <- clone(path_bare, path_repo) 334s cloning into '/tmp/RtmpQU8Csx/git2r-f51775ff5e7'... 334s > 334s > ## Check the repositores 334s > stopifnot(identical(is_bare(bare_repo), TRUE)) 334s > stopifnot(identical(is_bare(repo), FALSE)) 334s > 334s > ## Config repositories 334s > config(repo, user.name = "Alice", user.email = "alice@example.org") 334s > 334s > ## Add changes to repo 334s > writeLines("Hello world", con = file.path(path_repo, "test.txt")) 334s > add(repo, "test.txt") 334s > commit_1 <- commit(repo, "Commit message") 334s > branch_name <- branches(repo)[[1]]$name 334s > 334s > ## Check commit 334s > stopifnot(identical(commit_1$author$name, "Alice")) 334s > stopifnot(identical(commit_1$author$email, "alice@example.org")) 334s > stopifnot(identical(length(commits(repo)), 1L)) 334s > stopifnot(identical(commits(repo)[[1]]$author$name, "Alice")) 334s > stopifnot(identical(commits(repo)[[1]]$author$email, "alice@example.org")) 334s > 334s > ## Check push arguments 334s > tools::assertError(push(repo, character(0), paste0("refs/heads/", branch_name))) 334s > tools::assertError(push(repo, NA_character_, paste0("refs/heads/", branch_name))) 334s > tools::assertError(push(repo, c("origin", "origin"), paste0("refs/heads/", branch_name))) 334s > tools::assertError(push(repo, "origin")) 334s > tools::assertError(push(repo, name = "origin")) 334s > push(repo, "origin", character(0)) 334s > push(repo, "origin", NA_character_) 334s > push(repo, "origin", c(NA_character_, NA_character_)) 334s > stopifnot(identical(reflog(repo, paste0("refs/remotes/origin/", branch_name)), 334s + structure(list(), class = "git_reflog"))) 334s > 334s > ## No tracking branch assigned to master 334s > tools::assertError(push(branches(repo)[[1]])) 334s > 334s > ## Push changes from repo to origin 334s > push(repo, "origin", paste0("refs/heads/", branch_name)) 334s > r <- reflog(repo, paste0("refs/remotes/origin/", branch_name)) 334s > stopifnot(identical(length(r), 1L)) 334s > r <- r[[1]] 334s > stopifnot(identical(sha(r), sha(commit_1))) 334s > stopifnot(identical(r$message, "update by push")) 334s > stopifnot(identical(r$index, 0L)) 334s > stopifnot(identical(r$committer$name, "Alice")) 334s > stopifnot(identical(r$committer$email, "alice@example.org")) 334s > stopifnot(identical(r$refname, paste0("refs/remotes/origin/", branch_name))) 334s > stopifnot(identical(r$repo$path, repo$path)) 334s > push(branches(repo)[[1]]) 334s > 334s > ## Check result in bare repository 334s > stopifnot(identical(length(commits(bare_repo)), 1L)) 334s > bare_commit_1 <- commits(bare_repo)[[1]] 334s > stopifnot(identical(sha(commit_1), sha(bare_commit_1))) 334s > stopifnot(identical(commit_1$author, bare_commit_1$author)) 334s > stopifnot(identical(commit_1$committer, bare_commit_1$committer)) 334s > stopifnot(identical(commit_1$summary, bare_commit_1$summary)) 334s > stopifnot(identical(commit_1$message, bare_commit_1$message)) 334s > stopifnot(!identical(commit_1$repo, bare_commit_1$repo)) 334s > 334s > ## Add changes to repo and push head 334s > writeLines(c("Hello world", "HELLO WORLD"), 334s + con = file.path(path_repo, "test.txt")) 334s > add(repo, "test.txt") 334s > commit_2 <- commit(repo, "Commit message 2") 334s > push(repo) 334s > bare_commit_2 <- lookup(bare_repo, sha(commit_2)) 334s > stopifnot(identical(sha(commit_2), sha(bare_commit_2))) 334s > stopifnot(identical(commit_2$author, bare_commit_2$author)) 334s > stopifnot(identical(commit_2$committer, bare_commit_2$committer)) 334s > stopifnot(identical(commit_2$summary, bare_commit_2$summary)) 334s > stopifnot(identical(commit_2$message, bare_commit_2$message)) 334s > stopifnot(!identical(commit_2$repo, bare_commit_2$repo)) 334s > 334s > ## Check 'set_upstream' 334s > branch_set_upstream(repository_head(repo), NULL) 334s > push(repo, "origin", paste0("refs/heads/", branch_name)) 334s > stopifnot(is.null(branch_get_upstream(repository_head(repo)))) 334s > push(repo, "origin", paste0("refs/heads/", branch_name), set_upstream = TRUE) 334s > stopifnot(!is.null(branch_get_upstream(repository_head(repo)))) 334s > 334s > ## Cleanup 334s > unlink(path_bare, recursive = TRUE) 334s > unlink(path_repo, recursive = TRUE) 334s > 334s BEGIN TEST reference.R 334s 334s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 334s Copyright (C) 2024 The R Foundation for Statistical Computing 334s Platform: aarch64-unknown-linux-gnu (64-bit) 334s 334s R is free software and comes with ABSOLUTELY NO WARRANTY. 334s You are welcome to redistribute it under certain conditions. 334s Type 'license()' or 'licence()' for distribution details. 334s 334s R is a collaborative project with many contributors. 334s Type 'contributors()' for more information and 334s 'citation()' on how to cite R or R packages in publications. 334s 334s Type 'demo()' for some demos, 'help()' for on-line help, or 334s 'help.start()' for an HTML browser interface to help. 334s Type 'q()' to quit R. 334s 334s > ## git2r, R bindings to the libgit2 library. 334s > ## Copyright (C) 2013-2023 The git2r contributors 334s > ## 334s > ## This program is free software; you can redistribute it and/or modify 334s > ## it under the terms of the GNU General Public License, version 2, 334s > ## as published by the Free Software Foundation. 334s > ## 334s > ## git2r is distributed in the hope that it will be useful, 334s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 334s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 334s > ## GNU General Public License for more details. 334s > ## 334s > ## You should have received a copy of the GNU General Public License along 334s > ## with this program; if not, write to the Free Software Foundation, Inc., 334s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 334s > 334s > library(git2r) 334s > 334s > ## For debugging 334s > sessionInfo() 334s R version 4.3.3 (2024-02-29) 334s Platform: aarch64-unknown-linux-gnu (64-bit) 334s Running under: Ubuntu Noble Numbat (development branch) 334s 334s Matrix products: default 334s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 334s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 334s 334s locale: 334s [1] C 334s 334s time zone: Etc/UTC 334s tzcode source: system (glibc) 334s 334s attached base packages: 334s [1] stats graphics grDevices utils datasets methods base 334s 334s other attached packages: 334s [1] git2r_0.33.0 334s 334s loaded via a namespace (and not attached): 334s [1] compiler_4.3.3 334s > libgit2_version() 334s $major 334s [1] 1 334s 334s $minor 334s [1] 7 334s 334s $rev 334s [1] 2 334s 334s > libgit2_features() 334s $threads 334s [1] TRUE 334s 334s $https 334s [1] TRUE 334s 334s $ssh 334s [1] TRUE 334s 334s > 334s > 334s > ## Create a directory in tempdir 334s > path <- tempfile(pattern = "git2r-") 334s > dir.create(path) 334s > 334s > ## Initialize a repository 334s > repo <- init(path, branch = "main") 334s > config(repo, user.name = "Alice", user.email = "alice@example.org") 334s > 334s > ## Create a file 334s > writeLines("Hello world!", file.path(path, "test.txt")) 334s > 334s > ## add and commit 334s > add(repo, "test.txt") 334s > commit(repo, "Commit message") 334s [f0dce60] 2024-03-16: Commit message 334s > 334s > ## Check dwim of reference shorthand 334s > stopifnot(identical(.Call(git2r:::git2r_reference_dwim, repo, "")$name, 334s + "refs/heads/main")) 334s > stopifnot(identical(.Call(git2r:::git2r_reference_dwim, repo, "main")$name, 334s + "refs/heads/main")) 334s > stopifnot(identical( 334s + .Call(git2r:::git2r_reference_dwim, repo, "refs/heads/main")$name, 334s + "refs/heads/main")) 334s > 334s > ## print reference 334s > r <- .Call(git2r:::git2r_reference_dwim, repo, "refs/heads/main") 334s > stopifnot(identical(print(r), r)) 334s [f0dce6] main 334s > 334s > ## Cleanup 334s > unlink(path, recursive = TRUE) 334s > 334s BEGIN TEST reflog.R 334s 334s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 334s Copyright (C) 2024 The R Foundation for Statistical Computing 334s Platform: aarch64-unknown-linux-gnu (64-bit) 334s 334s R is free software and comes with ABSOLUTELY NO WARRANTY. 334s You are welcome to redistribute it under certain conditions. 334s Type 'license()' or 'licence()' for distribution details. 334s 334s R is a collaborative project with many contributors. 334s Type 'contributors()' for more information and 334s 'citation()' on how to cite R or R packages in publications. 334s 334s Type 'demo()' for some demos, 'help()' for on-line help, or 334s 'help.start()' for an HTML browser interface to help. 334s Type 'q()' to quit R. 334s 334s > ## git2r, R bindings to the libgit2 library. 334s > ## Copyright (C) 2013-2023 The git2r contributors 334s > ## 334s > ## This program is free software; you can redistribute it and/or modify 334s > ## it under the terms of the GNU General Public License, version 2, 334s > ## as published by the Free Software Foundation. 334s > ## 334s > ## git2r is distributed in the hope that it will be useful, 334s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 334s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 334s > ## GNU General Public License for more details. 334s > ## 334s > ## You should have received a copy of the GNU General Public License along 334s > ## with this program; if not, write to the Free Software Foundation, Inc., 334s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 334s > 334s > library("git2r") 335s > 335s > ## For debugging 335s > sessionInfo() 335s R version 4.3.3 (2024-02-29) 335s Platform: aarch64-unknown-linux-gnu (64-bit) 335s Running under: Ubuntu Noble Numbat (development branch) 335s 335s Matrix products: default 335s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 335s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 335s 335s locale: 335s [1] C 335s 335s time zone: Etc/UTC 335s tzcode source: system (glibc) 335s 335s attached base packages: 335s [1] stats graphics grDevices utils datasets methods base 335s 335s other attached packages: 335s [1] git2r_0.33.0 335s 335s loaded via a namespace (and not attached): 335s [1] compiler_4.3.3 335s > libgit2_version() 335s $major 335s [1] 1 335s 335s $minor 335s [1] 7 335s 335s $rev 335s [1] 2 335s 335s > libgit2_features() 335s $threads 335s [1] TRUE 335s 335s $https 335s [1] TRUE 335s 335s $ssh 335s [1] TRUE 335s 335s > 335s > 335s > ## Create a directory in tempdir 335s > path <- tempfile(pattern = "git2r-") 335s > dir.create(path) 335s > 335s > ## Initialize a repository 335s > repo <- init(path) 335s > config(repo, user.name = "Alice", user.email = "alice@example.org") 335s > 335s > ## Check that reflog is empty 335s > stopifnot(identical(reflog(repo), structure(list(), class = "git_reflog"))) 335s > 335s > ## Create a file 335s > writeLines("Hello world!", file.path(path, "test.txt")) 335s > 335s > ## add and commit 335s > add(repo, "test.txt") 335s > commit_1 <- commit(repo, "Commit message") 335s > 335s > ## Check that reflog is not empry 335s > stopifnot(identical(length(reflog(repo)), 1L)) 335s > reflog_entry <- reflog(repo)[[1]] 335s > stopifnot(identical(sha(reflog_entry), sha(commit_1))) 335s > stopifnot(identical(reflog_entry$refname, "HEAD")) 335s > stopifnot(identical(reflog_entry$index, 0L)) 335s > stopifnot(identical(reflog_entry$committer$email, "alice@example.org")) 335s > stopifnot(identical(reflog_entry$message, "commit (initial): Commit message")) 335s > 335s > ## Check printing 335s > r <- reflog(repo) 335s > stopifnot(identical(print(r), r)) 335s [a6db7bf] HEAD@{0}: commit (initial): Commit message 335s > 335s > ## Cleanup 335s > unlink(path, recursive = TRUE) 335s > 335s BEGIN TEST refspec.R 335s 335s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 335s Copyright (C) 2024 The R Foundation for Statistical Computing 335s Platform: aarch64-unknown-linux-gnu (64-bit) 335s 335s R is free software and comes with ABSOLUTELY NO WARRANTY. 335s You are welcome to redistribute it under certain conditions. 335s Type 'license()' or 'licence()' for distribution details. 335s 335s R is a collaborative project with many contributors. 335s Type 'contributors()' for more information and 335s 'citation()' on how to cite R or R packages in publications. 335s 335s Type 'demo()' for some demos, 'help()' for on-line help, or 335s 'help.start()' for an HTML browser interface to help. 335s Type 'q()' to quit R. 335s 335s > ## git2r, R bindings to the libgit2 library. 335s > ## Copyright (C) 2013-2023 The git2r contributors 335s > ## 335s > ## This program is free software; you can redistribute it and/or modify 335s > ## it under the terms of the GNU General Public License, version 2, 335s > ## as published by the Free Software Foundation. 335s > ## 335s > ## git2r is distributed in the hope that it will be useful, 335s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 335s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 335s > ## GNU General Public License for more details. 335s > ## 335s > ## You should have received a copy of the GNU General Public License along 335s > ## with this program; if not, write to the Free Software Foundation, Inc., 335s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 335s > 335s > library("git2r") 335s > 335s > ## For debugging 335s > sessionInfo() 335s R version 4.3.3 (2024-02-29) 335s Platform: aarch64-unknown-linux-gnu (64-bit) 335s Running under: Ubuntu Noble Numbat (development branch) 335s 335s Matrix products: default 335s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 335s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 335s 335s locale: 335s [1] C 335s 335s time zone: Etc/UTC 335s tzcode source: system (glibc) 335s 335s attached base packages: 335s [1] stats graphics grDevices utils datasets methods base 335s 335s other attached packages: 335s [1] git2r_0.33.0 335s 335s loaded via a namespace (and not attached): 335s [1] compiler_4.3.3 335s > libgit2_version() 335s $major 335s [1] 1 335s 335s $minor 335s [1] 7 335s 335s $rev 335s [1] 2 335s 335s > libgit2_features() 335s $threads 335s [1] TRUE 335s 335s $https 335s [1] TRUE 335s 335s $ssh 335s [1] TRUE 335s 335s > 335s > 335s > ## Create directories for repositories in tempdir 335s > path_bare <- tempfile(pattern = "git2r-") 335s > path_repo <- tempfile(pattern = "git2r-") 335s > 335s > dir.create(path_bare) 335s > dir.create(path_repo) 335s > 335s > ## Create bare repository 335s > bare_repo <- init(path_bare, bare = TRUE) 335s > 335s > ## Clone to repo 335s > repo <- clone(path_bare, path_repo) 335s cloning into '/tmp/RtmpnRpocw/git2r-f753cbb317'... 335s > config(repo, user.name = "Alice", user.email = "alice@example.org") 335s > 335s > ## Add changes to repo 335s > writeLines("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 335s + con = file.path(path_repo, "test.txt")) 335s > add(repo, "test.txt") 335s > commit_1 <- commit(repo, "First commit message") 335s > 335s > ## Add more changes to repo 335s > writeLines(c("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do", 335s + "eiusmod tempor incididunt ut labore et dolore magna aliqua."), 335s + con = file.path(path_repo, "test.txt")) 335s > add(repo, "test.txt") 335s > commit_2 <- commit(repo, "Second commit message") 335s > 335s > ## Check remote 335s > stopifnot(identical( 335s + git2r:::get_refspec(repo, spec = "master")$remote, 335s + "origin")) 335s > 335s > ## Detach 335s > checkout(commit_1) 335s > tools::assertError(git2r:::get_refspec(repo)) 335s > 335s > ## Cleanup 335s > unlink(path_bare, recursive = TRUE) 335s > unlink(path_repo, recursive = TRUE) 335s > 335s BEGIN TEST remotes.R 335s 335s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 335s Copyright (C) 2024 The R Foundation for Statistical Computing 335s Platform: aarch64-unknown-linux-gnu (64-bit) 335s 335s R is free software and comes with ABSOLUTELY NO WARRANTY. 335s You are welcome to redistribute it under certain conditions. 335s Type 'license()' or 'licence()' for distribution details. 335s 335s R is a collaborative project with many contributors. 335s Type 'contributors()' for more information and 335s 'citation()' on how to cite R or R packages in publications. 335s 335s Type 'demo()' for some demos, 'help()' for on-line help, or 335s 'help.start()' for an HTML browser interface to help. 335s Type 'q()' to quit R. 335s 335s > ## git2r, R bindings to the libgit2 library. 335s > ## Copyright (C) 2013-2023 The git2r contributors 335s > ## 335s > ## This program is free software; you can redistribute it and/or modify 335s > ## it under the terms of the GNU General Public License, version 2, 335s > ## as published by the Free Software Foundation. 335s > ## 335s > ## git2r is distributed in the hope that it will be useful, 335s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 335s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 335s > ## GNU General Public License for more details. 335s > ## 335s > ## You should have received a copy of the GNU General Public License along 335s > ## with this program; if not, write to the Free Software Foundation, Inc., 335s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 335s > 335s > library("git2r") 335s > 335s > ## For debugging 335s > sessionInfo() 335s R version 4.3.3 (2024-02-29) 335s Platform: aarch64-unknown-linux-gnu (64-bit) 335s Running under: Ubuntu Noble Numbat (development branch) 335s 335s Matrix products: default 335s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 335s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 335s 335s locale: 335s [1] C 335s 335s time zone: Etc/UTC 335s tzcode source: system (glibc) 335s 335s attached base packages: 335s [1] stats graphics grDevices utils datasets methods base 335s 335s other attached packages: 335s [1] git2r_0.33.0 335s 335s loaded via a namespace (and not attached): 335s [1] compiler_4.3.3 335s > libgit2_version() 335s $major 335s [1] 1 335s 335s $minor 335s [1] 7 335s 335s $rev 335s [1] 2 335s 335s > libgit2_features() 335s $threads 335s [1] TRUE 335s 335s $https 335s [1] TRUE 335s 335s $ssh 335s [1] TRUE 335s 335s > 335s > 335s > ## Create a directory in tempdir 335s > path <- tempfile(pattern = "git2r-") 335s > dir.create(path) 335s > 335s > ## Initialize a repository 335s > repo <- init(path) 335s > config(repo, user.name = "Alice", user.email = "alice@example.org") 335s > 335s > ## Create a file 335s > writeLines("Hello world!", file.path(path, "test.txt")) 335s > 335s > ## Add and commit 335s > add(repo, "test.txt") 335s > commit_1 <- commit(repo, "Commit message") 335s > 335s > ## Add a remote 335s > remote_add(repo, "playground", 335s + "https://github.com/gaborcsardi/playground") 335s > 335s > stopifnot(identical(remotes(repo), "playground")) 335s > stopifnot(identical(remote_url(repo, "playground"), 335s + "https://github.com/gaborcsardi/playground")) 335s > stopifnot(identical(remote_url(repo), 335s + "https://github.com/gaborcsardi/playground")) 335s > 335s > ## Rename a remote 335s > remote_rename(repo, "playground", "foobar") 335s > 335s > stopifnot(identical(remotes(repo), "foobar")) 335s > stopifnot(identical(remote_url(repo, "foobar"), 335s + "https://github.com/gaborcsardi/playground")) 335s > 335s > ## Set remote url 335s > remote_set_url(repo, "foobar", "https://github.com/stewid/playground") 335s > stopifnot(identical(remote_url(repo, "foobar"), 335s + "https://github.com/stewid/playground")) 335s > 335s > ## Remove a remote 335s > remote_remove(repo, "foobar") 335s > 335s > stopifnot(identical(remotes(repo), character(0))) 335s > 335s > if (identical(Sys.getenv("NOT_CRAN"), "true")) { 335s + if (isTRUE(libgit2_features()$https)) { 335s + refs <- remote_ls("https://github.com/ropensci/git2r") 335s + stopifnot(length(refs) > 0) 335s + stopifnot(names(refs) > 0) 335s + stopifnot(any(names(refs) == "HEAD")) 335s + } 335s + } 335s > 335s > # an invalid URL should throw an error 335s > tools::assertError(remote_ls("bad")) 335s > 335s > ## Cleanup 335s > unlink(path, recursive = TRUE) 335s > 335s BEGIN TEST remove.R 335s 335s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 335s Copyright (C) 2024 The R Foundation for Statistical Computing 335s Platform: aarch64-unknown-linux-gnu (64-bit) 335s 335s R is free software and comes with ABSOLUTELY NO WARRANTY. 335s You are welcome to redistribute it under certain conditions. 335s Type 'license()' or 'licence()' for distribution details. 335s 335s R is a collaborative project with many contributors. 335s Type 'contributors()' for more information and 335s 'citation()' on how to cite R or R packages in publications. 335s 335s Type 'demo()' for some demos, 'help()' for on-line help, or 335s 'help.start()' for an HTML browser interface to help. 335s Type 'q()' to quit R. 335s 335s > ## git2r, R bindings to the libgit2 library. 335s > ## Copyright (C) 2013-2023 The git2r contributors 335s > ## 335s > ## This program is free software; you can redistribute it and/or modify 335s > ## it under the terms of the GNU General Public License, version 2, 335s > ## as published by the Free Software Foundation. 335s > ## 335s > ## git2r is distributed in the hope that it will be useful, 335s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 335s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 335s > ## GNU General Public License for more details. 335s > ## 335s > ## You should have received a copy of the GNU General Public License along 335s > ## with this program; if not, write to the Free Software Foundation, Inc., 335s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 335s > 335s > library("git2r") 335s > 335s > ## For debugging 335s > sessionInfo() 335s R version 4.3.3 (2024-02-29) 335s Platform: aarch64-unknown-linux-gnu (64-bit) 335s Running under: Ubuntu Noble Numbat (development branch) 335s 335s Matrix products: default 335s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 335s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 335s 335s locale: 335s [1] C 335s 335s time zone: Etc/UTC 335s tzcode source: system (glibc) 335s 335s attached base packages: 335s [1] stats graphics grDevices utils datasets methods base 335s 335s other attached packages: 335s [1] git2r_0.33.0 335s 335s loaded via a namespace (and not attached): 335s [1] compiler_4.3.3 335s > libgit2_version() 335s $major 335s [1] 1 335s 335s $minor 335s [1] 7 335s 335s $rev 335s [1] 2 335s 335s > libgit2_features() 335s $threads 335s [1] TRUE 335s 335s $https 335s [1] TRUE 335s 335s $ssh 335s [1] TRUE 335s 335s > 335s > 335s > ## Create a directory in tempdir 335s > path <- tempfile(pattern = "git2r-") 335s > dir.create(path) 335s > 335s > ## Initialize a repository 335s > repo <- init(path) 335s > config(repo, user.name = "Alice", user.email = "alice@example.org") 335s > 335s > ## Add files 335s > invisible(lapply(file.path(path, letters[1:4]), writeLines, text = "")) 335s > add(repo, letters) 335s > commit(repo, "init") 335s [ba25dbf] 2024-03-16: init 335s > 335s > ## Remove one file 335s > rm_file(repo, letters[1]) 335s > commit(repo, "remove") 335s [b64ab6f] 2024-03-16: remove 335s > 335s > ## Remove two files. Don't raise warnings 335s > withCallingHandlers(rm_file(repo, letters[2:3]), warning = function(w) stop(w)) 335s > 335s > ## Remove one file using the absolute path to the file. 335s > rm_file(repo, file.path(path, letters[4])) 335s > 335s > ## Cleanup 335s > unlink(path, recursive = TRUE) 335s > 335s BEGIN TEST repository.R 335s 335s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 335s Copyright (C) 2024 The R Foundation for Statistical Computing 335s Platform: aarch64-unknown-linux-gnu (64-bit) 335s 335s R is free software and comes with ABSOLUTELY NO WARRANTY. 335s You are welcome to redistribute it under certain conditions. 335s Type 'license()' or 'licence()' for distribution details. 335s 335s R is a collaborative project with many contributors. 335s Type 'contributors()' for more information and 335s 'citation()' on how to cite R or R packages in publications. 335s 335s Type 'demo()' for some demos, 'help()' for on-line help, or 335s 'help.start()' for an HTML browser interface to help. 335s Type 'q()' to quit R. 335s 336s > ## git2r, R bindings to the libgit2 library. 336s > ## Copyright (C) 2013-2023 The git2r contributors 336s > ## 336s > ## This program is free software; you can redistribute it and/or modify 336s > ## it under the terms of the GNU General Public License, version 2, 336s > ## as published by the Free Software Foundation. 336s > ## 336s > ## git2r is distributed in the hope that it will be useful, 336s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 336s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 336s > ## GNU General Public License for more details. 336s > ## 336s > ## You should have received a copy of the GNU General Public License along 336s > ## with this program; if not, write to the Free Software Foundation, Inc., 336s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 336s > 336s > library(git2r) 336s > source("util/check.R") 336s > 336s > ## For debugging 336s > sessionInfo() 336s R version 4.3.3 (2024-02-29) 336s Platform: aarch64-unknown-linux-gnu (64-bit) 336s Running under: Ubuntu Noble Numbat (development branch) 336s 336s Matrix products: default 336s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 336s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 336s 336s locale: 336s [1] C 336s 336s time zone: Etc/UTC 336s tzcode source: system (glibc) 336s 336s attached base packages: 336s [1] stats graphics grDevices utils datasets methods base 336s 336s other attached packages: 336s [1] git2r_0.33.0 336s 336s loaded via a namespace (and not attached): 336s [1] compiler_4.3.3 336s > libgit2_version() 336s $major 336s [1] 1 336s 336s $minor 336s [1] 7 336s 336s $rev 336s [1] 2 336s 336s > libgit2_features() 336s $threads 336s [1] TRUE 336s 336s $https 336s [1] TRUE 336s 336s $ssh 336s [1] TRUE 336s 336s > 336s > 336s > ## Create a directory in tempdir 336s > path <- tempfile(pattern = "git2r-") 336s > dir.create(path) 336s > 336s > ## is_bare: "Invalid repository" 336s > tools::assertError(is_bare(new("git_repository"))) 336s > 336s > ## is_empty: "Invalid repository" 336s > tools::assertError(is_empty(new("git_repository"))) 336s > 336s > ## Check that open an invalid repository fails 336s > tools::assertError(repository(path)) 336s > tools::assertError(repository(path, discover = FALSE)) 336s > 336s > ## Check that it fails to open/init a repository with a path to a 336s > ## file. 336s > writeLines("test", file.path(path, "test.txt")) 336s > tools::assertError(repository(file.path(path, "test.txt"), 336s + discover = FALSE)) 336s > tools::assertError(init(file.path(path, "test.txt"))) 336s > unlink(file.path(path, "test.txt")) 336s > 336s > ## Initialize a repository 336s > repo <- init(path) 336s > stopifnot(identical(print(repo), repo)) 336s Local: /tmp/RtmpBoicAW/git2r-f996fd5d3ba 336s Head: nothing commited (yet) 336s > 336s > ## Check the state of the repository 336s > stopifnot(identical(is_bare(repo), FALSE)) 336s > stopifnot(identical(is_empty(repo), TRUE)) 336s > stopifnot(identical(is_shallow(repo), FALSE)) 336s > stopifnot(identical(branches(repo), empty_named_list())) 336s > stopifnot(identical(references(repo), empty_named_list())) 336s > stopifnot(identical(commits(repo), list())) 336s > stopifnot(identical(repository_head(repo), NULL)) 336s > 336s > # check that we can find repository from a path 336s > wd <- sub(paste0("[", .Platform$file.sep, "]$"), "", workdir(repo)) 336s > writeLines("test file", con = file.path(wd, "myfile.txt")) 336s > stopifnot(identical(discover_repository(file.path(wd, "myfile.txt")), 336s + file.path(wd, ".git"))) 336s > stopifnot(identical(discover_repository(file.path(wd, "doesntexist.txt")), 336s + NULL)) 336s > 336s > # Check that we can use ceiling in discover repostiory 336s > dir.create(file.path(wd, "temp")) 336s > stopifnot(identical(discover_repository(file.path(wd, "temp"), 0), NULL)) 336s > stopifnot(identical(discover_repository(file.path(wd, "temp"), 1), 336s + file.path(wd, ".git"))) 336s Warning message: 336s > tools::assertError(discover_repository(file.path(wd, "temp"), 2)) 336s In normalizePath(path) : 336s path[1]="/tmp/RtmpBoicAW/git2r-f996fd5d3ba/doesntexist.txt": No such file or directory 336s > 336s > ## Check that lookup with a sha of less than 4 characters or more than 336s > ## 40 characters fail. 336s > tools::assertError(lookup(repo, paste0(rep("a", 3), collapse = ""))) 336s > tools::assertError(lookup(repo, paste0(rep("a", 41), collapse = ""))) 336s > 336s > ## Check in_repository 336s > stopifnot(identical(in_repository(path), TRUE)) 336s > 336s > ## Check: 336s > ## - in_repository method with missing path argument 336s > ## - repository method with missing path argument 336s > ## - workdir method with missing path argument 336s > ## - is_empty method with missing repo argument 336s > ## - is_shallow method with missing repo argument 336s > wd <- setwd(path) 336s > stopifnot(identical(in_repository(), TRUE)) 336s > stopifnot(identical(workdir(repository(path)), workdir(repository()))) 336s > stopifnot(identical(workdir(repository(path)), workdir())) 336s > stopifnot(identical(is_empty(), TRUE)) 336s > stopifnot(identical(is_shallow(), FALSE)) 336s > if (!is.null(wd)) 336s + setwd(wd) 336s > 336s > ## Cleanup 336s > unlink(path, recursive = TRUE) 336s > 336s BEGIN TEST reset.R 336s 336s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 336s Copyright (C) 2024 The R Foundation for Statistical Computing 336s Platform: aarch64-unknown-linux-gnu (64-bit) 336s 336s R is free software and comes with ABSOLUTELY NO WARRANTY. 336s You are welcome to redistribute it under certain conditions. 336s Type 'license()' or 'licence()' for distribution details. 336s 336s R is a collaborative project with many contributors. 336s Type 'contributors()' for more information and 336s 'citation()' on how to cite R or R packages in publications. 336s 336s Type 'demo()' for some demos, 'help()' for on-line help, or 336s 'help.start()' for an HTML browser interface to help. 336s Type 'q()' to quit R. 336s 336s > ## git2r, R bindings to the libgit2 library. 336s > ## Copyright (C) 2013-2023 The git2r contributors 336s > ## 336s > ## This program is free software; you can redistribute it and/or modify 336s > ## it under the terms of the GNU General Public License, version 2, 336s > ## as published by the Free Software Foundation. 336s > ## 336s > ## git2r is distributed in the hope that it will be useful, 336s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 336s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 336s > ## GNU General Public License for more details. 336s > ## 336s > ## You should have received a copy of the GNU General Public License along 336s > ## with this program; if not, write to the Free Software Foundation, Inc., 336s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 336s > 336s > library(git2r) 336s > source("util/check.R") 336s > 336s > ## For debugging 336s > sessionInfo() 337s R version 4.3.3 (2024-02-29) 337s Platform: aarch64-unknown-linux-gnu (64-bit) 337s Running under: Ubuntu Noble Numbat (development branch) 337s 337s Matrix products: default 337s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 337s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 337s 337s locale: 337s [1] C 337s 337s time zone: Etc/UTC 337s tzcode source: system (glibc) 337s 337s attached base packages: 337s [1] stats graphics grDevices utils datasets methods base 337s 337s other attached packages: 337s [1] git2r_0.33.0 337s 337s loaded via a namespace (and not attached): 337s [1] compiler_4.3.3 337s > libgit2_version() 337s $major 337s [1] 1 337s 337s $minor 337s [1] 7 337s 337s $rev 337s [1] 2 337s 337s > libgit2_features() 337s $threads 337s [1] TRUE 337s 337s $https 337s [1] TRUE 337s 337s $ssh 337s [1] TRUE 337s 337s > 337s > 337s > ## Create a directory in tempdir 337s > path <- tempfile(pattern = "git2r-") 337s > dir.create(path) 337s > 337s > ## Initialize a repository 337s > repo <- init(path) 337s > config(repo, user.name = "Alice", user.email = "alice@example.org") 337s > 337s > ## Create a file 337s > writeLines("Hello world!", file.path(path, "test-1.txt")) 337s > 337s > ## Add and reset an empty repository using a path 337s > add(repo, "test-1.txt") 337s > stopifnot(identical( 337s + status(repo), 337s + structure(list(staged = list(new = "test-1.txt"), 337s + unstaged = empty_named_list(), 337s + untracked = empty_named_list()), 337s + class = "git_status"))) 337s > reset(repo, path = "test-1.txt") 337s > stopifnot(identical( 337s + status(repo), 337s + structure(list(staged = empty_named_list(), 337s + unstaged = empty_named_list(), 337s + untracked = list(untracked = "test-1.txt")), 337s + class = "git_status"))) 337s > 337s > ## Add and reset a non-empty repository using a path 337s > add(repo, "test-1.txt") 337s > commit(repo, "First commit") 337s [448d162] 2024-03-16: First commit 337s > writeLines(c("Hello world!", "HELLO WORLD!"), file.path(path, "test-1.txt")) 337s > add(repo, "test-1.txt") 337s > stopifnot(identical( 337s + status(repo), 337s + structure(list(staged = list(modified = "test-1.txt"), 337s + unstaged = empty_named_list(), 337s + untracked = empty_named_list()), 337s + class = "git_status"))) 337s > reset(repo, path = "test-1.txt") 337s > stopifnot(identical( 337s + status(repo), 337s + structure(list(staged = empty_named_list(), 337s + unstaged = list(modified = "test-1.txt"), 337s + untracked = empty_named_list()), 337s + class = "git_status"))) 337s > 337s > ## add and commit 337s > add(repo, "test-1.txt") 337s > commit_1 <- commit(repo, "Commit message") 337s > 337s > ## Make one more commit 337s > writeLines(c("Hello world!", "HELLO WORLD!", "hello world!"), 337s + file.path(path, "test-1.txt")) 337s > add(repo, "test-1.txt") 337s > commit(repo, "Next commit message") 337s [2c45fa3] 2024-03-16: Next commit message 337s > 337s > ## Create one more file 337s > writeLines("Hello world!", file.path(path, "test-2.txt")) 337s > 337s > ## 'soft' reset to first commit 337s > reset(commit_1) 337s > soft_exp <- structure(list(staged = list(modified = "test-1.txt"), 337s + unstaged = empty_named_list(), 337s + untracked = list(untracked = "test-2.txt")), 337s + class = "git_status") 337s > soft_obs <- status(repo) 337s > stopifnot(identical(soft_obs, soft_exp)) 337s > stopifnot(identical(length(commits(repo)), 2L)) 337s > stopifnot(identical(commits(repo)[[1]], commit_1)) 337s > 337s > ## 'mixed' reset to first commit 337s > commit(repo, "Next commit message") 337s [2c45fa3] 2024-03-16: Next commit message 337s > reset(commit_1, "mixed") 337s > mixed_exp <- structure(list(staged = empty_named_list(), 337s + unstaged = list(modified = "test-1.txt"), 337s + untracked = list(untracked = "test-2.txt")), 337s + class = "git_status") 337s > mixed_obs <- status(repo) 337s > stopifnot(identical(mixed_obs, mixed_exp)) 337s > stopifnot(identical(length(commits(repo)), 2L)) 337s > stopifnot(identical(commits(repo)[[1]], commit_1)) 337s > 337s > ## 'hard' reset to first commit 337s > add(repo, "test-1.txt") 337s > commit(repo, "Next commit message") 337s [2c45fa3] 2024-03-16: Next commit message 337s > reset(commit_1, "hard") 337s > hard_exp <- structure(list(staged = empty_named_list(), 337s + unstaged = empty_named_list(), 337s + untracked = list(untracked = "test-2.txt")), 337s + class = "git_status") 337s > hard_obs <- status(repo) 337s > stopifnot(identical(hard_obs, hard_exp)) 337s > stopifnot(identical(length(commits(repo)), 2L)) 337s > stopifnot(identical(commits(repo)[[1]], commit_1)) 337s > 337s > ## Cleanup 337s > unlink(path, recursive = TRUE) 337s > 337s BEGIN TEST revparse.R 337s 337s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 337s Copyright (C) 2024 The R Foundation for Statistical Computing 337s Platform: aarch64-unknown-linux-gnu (64-bit) 337s 337s R is free software and comes with ABSOLUTELY NO WARRANTY. 337s You are welcome to redistribute it under certain conditions. 337s Type 'license()' or 'licence()' for distribution details. 337s 337s R is a collaborative project with many contributors. 337s Type 'contributors()' for more information and 337s 'citation()' on how to cite R or R packages in publications. 337s 337s Type 'demo()' for some demos, 'help()' for on-line help, or 337s 'help.start()' for an HTML browser interface to help. 337s Type 'q()' to quit R. 337s 337s > ## git2r, R bindings to the libgit2 library. 337s > ## Copyright (C) 2013-2023 The git2r contributors 337s > ## 337s > ## This program is free software; you can redistribute it and/or modify 337s > ## it under the terms of the GNU General Public License, version 2, 337s > ## as published by the Free Software Foundation. 337s > ## 337s > ## git2r is distributed in the hope that it will be useful, 337s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 337s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 337s > ## GNU General Public License for more details. 337s > ## 337s > ## You should have received a copy of the GNU General Public License along 337s > ## with this program; if not, write to the Free Software Foundation, Inc., 337s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 337s > 337s > library("git2r") 337s > 337s > ## For debugging 337s > sessionInfo() 337s R version 4.3.3 (2024-02-29) 337s Platform: aarch64-unknown-linux-gnu (64-bit) 337s Running under: Ubuntu Noble Numbat (development branch) 337s 337s Matrix products: default 337s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 337s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 337s 337s locale: 337s [1] C 337s 337s time zone: Etc/UTC 337s tzcode source: system (glibc) 337s 337s attached base packages: 337s [1] stats graphics grDevices utils datasets methods base 337s 337s other attached packages: 337s [1] git2r_0.33.0 337s 337s loaded via a namespace (and not attached): 337s [1] compiler_4.3.3 337s > libgit2_version() 337s $major 337s [1] 1 337s 337s $minor 337s [1] 7 337s 337s $rev 337s [1] 2 337s 337s > libgit2_features() 337s $threads 337s [1] TRUE 337s 337s $https 337s [1] TRUE 337s 337s $ssh 337s [1] TRUE 337s 337s > 337s > 337s > ## Create a directory in tempdir 337s > path <- tempfile(pattern = "git2r-") 337s > dir.create(path) 337s > 337s > ## Initialize a repository 337s > repo <- init(path) 337s > config(repo, user.name = "Alice", user.email = "alice@example.org") 337s > 337s > ## Create a file 337s > writeLines("Hello world!", file.path(path, "test.txt")) 337s > 337s > ## Add and commit 337s > add(repo, "test.txt") 337s > commit_1 <- commit(repo, "First commit message") 337s > 337s > tools::assertError(revparse_single(repo, "HEAD^")) 337s > 337s > ## Add another commit 337s > writeLines(c("Hello world!", "HELLO WORLD!"), file.path(path, "test.txt")) 337s > add(repo, "test.txt") 337s > commit(repo, "Second commit message") 337s [44a4c22] 2024-03-16: Second commit message 337s > 337s > stopifnot(identical(revparse_single(repo, "HEAD^"), commit_1)) 337s > stopifnot(is_blob(revparse_single(repo, "HEAD:test.txt"))) 337s > 337s > ## Cleanup 337s > unlink(path, recursive = TRUE) 337s > 337s BEGIN TEST signature.R 337s 337s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 337s Copyright (C) 2024 The R Foundation for Statistical Computing 337s Platform: aarch64-unknown-linux-gnu (64-bit) 337s 337s R is free software and comes with ABSOLUTELY NO WARRANTY. 337s You are welcome to redistribute it under certain conditions. 337s Type 'license()' or 'licence()' for distribution details. 337s 337s R is a collaborative project with many contributors. 337s Type 'contributors()' for more information and 337s 'citation()' on how to cite R or R packages in publications. 337s 337s Type 'demo()' for some demos, 'help()' for on-line help, or 337s 'help.start()' for an HTML browser interface to help. 337s Type 'q()' to quit R. 337s 338s > ## git2r, R bindings to the libgit2 library. 338s > ## Copyright (C) 2013-2023 The git2r contributors 338s > ## 338s > ## This program is free software; you can redistribute it and/or modify 338s > ## it under the terms of the GNU General Public License, version 2, 338s > ## as published by the Free Software Foundation. 338s > ## 338s > ## git2r is distributed in the hope that it will be useful, 338s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 338s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 338s > ## GNU General Public License for more details. 338s > ## 338s > ## You should have received a copy of the GNU General Public License along 338s > ## with this program; if not, write to the Free Software Foundation, Inc., 338s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 338s > 338s > library("git2r") 338s > 338s > ## For debugging 338s > sessionInfo() 338s R version 4.3.3 (2024-02-29) 338s Platform: aarch64-unknown-linux-gnu (64-bit) 338s Running under: Ubuntu Noble Numbat (development branch) 338s 338s Matrix products: default 338s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 338s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 338s 338s locale: 338s [1] C 338s 338s time zone: Etc/UTC 338s tzcode source: system (glibc) 338s 338s attached base packages: 338s [1] stats graphics grDevices utils datasets methods base 338s 338s other attached packages: 338s [1] git2r_0.33.0 338s 338s loaded via a namespace (and not attached): 338s [1] compiler_4.3.3 338s > libgit2_version() 338s $major 338s [1] 1 338s 338s $minor 338s [1] 7 338s 338s $rev 338s [1] 2 338s 338s > libgit2_features() 338s $threads 338s [1] TRUE 338s 338s $https 338s [1] TRUE 338s 338s $ssh 338s [1] TRUE 338s 338s > 338s > 338s > ## Check printing of a class git_signature 338s > when <- structure(list(time = 1395567947, offset = 60), 338s + class = "git_time") 338s > 338s > signature <- structure(list(name = "Alice", 338s + email = "alice@example.org", 338s + when = when), 338s + class = "git_signature") 338s > stopifnot(identical(print(signature), signature)) 338s name: Alice 338s email: alice@example.org 338s when: 2014-03-23 09:45:47 GMT 338s > 338s BEGIN TEST stash.R 338s 338s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 338s Copyright (C) 2024 The R Foundation for Statistical Computing 338s Platform: aarch64-unknown-linux-gnu (64-bit) 338s 338s R is free software and comes with ABSOLUTELY NO WARRANTY. 338s You are welcome to redistribute it under certain conditions. 338s Type 'license()' or 'licence()' for distribution details. 338s 338s R is a collaborative project with many contributors. 338s Type 'contributors()' for more information and 338s 'citation()' on how to cite R or R packages in publications. 338s 338s Type 'demo()' for some demos, 'help()' for on-line help, or 338s 'help.start()' for an HTML browser interface to help. 338s Type 'q()' to quit R. 338s 338s > ## git2r, R bindings to the libgit2 library. 338s > ## Copyright (C) 2013-2023 The git2r contributors 338s > ## 338s > ## This program is free software; you can redistribute it and/or modify 338s > ## it under the terms of the GNU General Public License, version 2, 338s > ## as published by the Free Software Foundation. 338s > ## 338s > ## git2r is distributed in the hope that it will be useful, 338s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 338s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 338s > ## GNU General Public License for more details. 338s > ## 338s > ## You should have received a copy of the GNU General Public License along 338s > ## with this program; if not, write to the Free Software Foundation, Inc., 338s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 338s > 338s > library("git2r") 338s > 338s > ## For debugging 338s > sessionInfo() 338s R version 4.3.3 (2024-02-29) 338s Platform: aarch64-unknown-linux-gnu (64-bit) 338s Running under: Ubuntu Noble Numbat (development branch) 338s 338s Matrix products: default 338s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 338s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 338s 338s locale: 338s [1] C 338s 338s time zone: Etc/UTC 338s tzcode source: system (glibc) 338s 338s attached base packages: 338s [1] stats graphics grDevices utils datasets methods base 338s 338s other attached packages: 338s [1] git2r_0.33.0 338s 338s loaded via a namespace (and not attached): 338s [1] compiler_4.3.3 338s > libgit2_version() 338s $major 338s [1] 1 338s 338s $minor 338s [1] 7 338s 338s $rev 338s [1] 2 338s 338s > libgit2_features() 338s $threads 338s [1] TRUE 338s 338s $https 338s [1] TRUE 338s 338s $ssh 338s [1] TRUE 338s 338s > 338s > 338s > ## Create a directory in tempdir 338s > path <- tempfile(pattern = "git2r-") 338s > dir.create(path) 338s > 338s > ## Initialize a repository 338s > repo <- init(path) 338s > config(repo, user.name = "Alice", user.email = "alice@example.org") 338s > 338s > ## Create a file 338s > writeLines("Hello world!", file.path(path, "test-1.txt")) 338s > 338s > ## add and commit 338s > add(repo, "test-1.txt") 338s > commit(repo, "Commit message") 338s [6e70e59] 2024-03-16: Commit message 338s > 338s > ## Pop stash 338s > writeLines(c("Hello world!", "HELLO WORLD!"), file.path(path, "test-1.txt")) 338s > stash(repo) 338s > stopifnot(identical("Hello world!", 338s + readLines(file.path(path, "test-1.txt")))) 338s > stash_pop(repo) 338s > stopifnot(identical(c("Hello world!", "HELLO WORLD!"), 338s + readLines(file.path(path, "test-1.txt")))) 338s > 338s > ## Make one more commit 338s > add(repo, "test-1.txt") 338s > commit(repo, "Next commit message") 338s [19d67e0] 2024-03-16: Next commit message 338s > 338s > ## Check that there are no stashes 338s > stopifnot(identical(stash_list(repo), list())) 338s > 338s > ## Apply stash 338s > writeLines(c("Hello world!", "HELLO WORLD!", "hello world!"), 338s + file.path(path, "test-1.txt")) 338s > stash(repo) 338s > stopifnot(identical(c("Hello world!", "HELLO WORLD!"), 338s + readLines(file.path(path, "test-1.txt")))) 338s > stash_apply(repo) 338s > stopifnot(identical(c("Hello world!", "HELLO WORLD!", "hello world!"), 338s + readLines(file.path(path, "test-1.txt")))) 338s > stopifnot(identical(length(stash_list(repo)), 1L)) 338s > stash_drop(repo, 1) 338s > stopifnot(identical(stash_list(repo), list())) 338s > 338s > ## Make one more commit 338s > add(repo, "test-1.txt") 338s > commit(repo, "Apply stash commit message") 338s [1bff5f5] 2024-03-16: Apply stash commit message 338s > 338s > ## Create one more file 338s > writeLines("Hello world!", file.path(path, "test-2.txt")) 338s > 338s > ## Check that there are no stashes 338s > stopifnot(identical(stash_list(repo), list())) 338s > 338s > ## Stash 338s > stash(repo) 338s > stopifnot(identical(stash_list(repo), list())) 338s > s <- stash(repo, untracked = TRUE) 338s > stopifnot(identical(print(s), s)) 338s On master: 2024-03-16 18:45:27.830988 338s 338s > summary(s) 338s message: On master: 2024-03-16 18:45:27.830988 338s stasher: Alice 338s when: 2024-03-16 18:45:27 GMT 338s sha: 1c24835e9bbd4ba55e8e9f447f0777aa97523171 338s 338s > stopifnot(identical(length(stash_list(repo)), 1L)) 338s > tree(stash_list(repo)[[1]]) 338s tree: af5711badde07055d853088e98c6d988bfdd139f 338s 338s mode type sha name 338s 1 100644 blob 5b168e5ff4e9eeff020b99a3c1c83c4979294e76 test-1.txt 338s > 338s > ## Drop stash 338s > stash_drop(repo, 1) 338s > stopifnot(identical(stash_list(repo), list())) 338s > 338s > ## Check stash_drop argument 338s > tools::assertError(stash_drop(repo)) 338s > tools::assertError(stash_drop(repo, -1)) 338s > tools::assertError(stash_drop(repo, 0.5)) 338s > 338s > ## Create one more file 338s > writeLines("Hello world!", file.path(path, "test-3.txt")) 338s > 338s > ## Create stash in repository 338s > stash(repo, untracked = TRUE) 338s > stopifnot(identical(length(stash_list(repo)), 1L)) 338s > 338s > ## Check stash_list method with missing repo argument 338s > wd <- setwd(path) 338s > stopifnot(identical(length(stash_list()), 1L)) 338s > if (!is.null(wd)) 338s + setwd(wd) 338s > 338s > ## Drop git_stash object in repository 338s > stash_drop(stash_list(repo)[[1]]) 338s > 338s > ## Cleanup 338s > unlink(path, recursive = TRUE) 338s > 338s BEGIN TEST status.R 339s 339s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 339s Copyright (C) 2024 The R Foundation for Statistical Computing 339s Platform: aarch64-unknown-linux-gnu (64-bit) 339s 339s R is free software and comes with ABSOLUTELY NO WARRANTY. 339s You are welcome to redistribute it under certain conditions. 339s Type 'license()' or 'licence()' for distribution details. 339s 339s R is a collaborative project with many contributors. 339s Type 'contributors()' for more information and 339s 'citation()' on how to cite R or R packages in publications. 339s 339s Type 'demo()' for some demos, 'help()' for on-line help, or 339s 'help.start()' for an HTML browser interface to help. 339s Type 'q()' to quit R. 339s 339s > ## git2r, R bindings to the libgit2 library. 339s > ## Copyright (C) 2013-2023 The git2r contributors 339s > ## 339s > ## This program is free software; you can redistribute it and/or modify 339s > ## it under the terms of the GNU General Public License, version 2, 339s > ## as published by the Free Software Foundation. 339s > ## 339s > ## git2r is distributed in the hope that it will be useful, 339s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 339s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 339s > ## GNU General Public License for more details. 339s > ## 339s > ## You should have received a copy of the GNU General Public License along 339s > ## with this program; if not, write to the Free Software Foundation, Inc., 339s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 339s > 339s > library(git2r) 339s > source("util/check.R") 339s > 339s > ## For debugging 339s > sessionInfo() 339s R version 4.3.3 (2024-02-29) 339s Platform: aarch64-unknown-linux-gnu (64-bit) 339s Running under: Ubuntu Noble Numbat (development branch) 339s 339s Matrix products: default 339s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 339s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 339s 339s locale: 339s [1] C 339s 339s time zone: Etc/UTC 339s tzcode source: system (glibc) 339s 339s attached base packages: 339s [1] stats graphics grDevices utils datasets methods base 339s 339s other attached packages: 339s [1] git2r_0.33.0 339s 339s loaded via a namespace (and not attached): 339s [1] compiler_4.3.3 339s > libgit2_version() 339s $major 339s [1] 1 339s 339s $minor 339s [1] 7 339s 339s $rev 339s [1] 2 339s 339s > libgit2_features() 339s $threads 339s [1] TRUE 339s 339s $https 339s [1] TRUE 339s 339s $ssh 339s [1] TRUE 339s 339s > 339s > 339s > ## Create a directory in tempdir 339s > path <- tempfile(pattern = "git2r-") 339s > dir.create(path) 339s > 339s > ## Initialize a repository 339s > repo <- init(path) 339s > config(repo, user.name = "Alice", user.email = "alice@example.org") 339s > 339s > ## Status case 1 339s > status_exp_1 <- structure(list(staged = empty_named_list(), 339s + unstaged = empty_named_list(), 339s + untracked = empty_named_list()), 339s + class = "git_status") 339s > status_obs_1 <- status(repo) 339s > stopifnot(identical(print(status_obs_1), status_obs_1)) 339s working directory clean 339s > str(status_exp_1) 339s List of 3 339s $ staged : Named list() 339s $ unstaged : Named list() 339s $ untracked: Named list() 339s - attr(*, "class")= chr "git_status" 339s > str(status_obs_1) 339s List of 3 339s $ staged : Named list() 339s $ unstaged : Named list() 339s $ untracked: Named list() 339s - attr(*, "class")= chr "git_status" 339s > stopifnot(identical(status_obs_1, status_exp_1)) 339s > stopifnot(identical(capture.output(status(repo)), 339s + "working directory clean")) 339s > 339s > ## Status case 2, include ignored files 339s > status_exp_2 <- structure(list(staged = empty_named_list(), 339s + unstaged = empty_named_list(), 339s + untracked = empty_named_list(), 339s + ignored = empty_named_list()), 339s + class = "git_status") 339s > status_obs_2 <- status(repo, ignored = TRUE) 339s > status_obs_2 339s working directory clean 339s > str(status_exp_2) 339s List of 4 339s $ staged : Named list() 339s $ unstaged : Named list() 339s $ untracked: Named list() 339s $ ignored : Named list() 339s - attr(*, "class")= chr "git_status" 339s > str(status_obs_2) 339s List of 4 339s $ staged : Named list() 339s $ unstaged : Named list() 339s $ untracked: Named list() 339s $ ignored : Named list() 339s - attr(*, "class")= chr "git_status" 339s > stopifnot(identical(status_obs_2, status_exp_2)) 339s > stopifnot(identical(capture.output(status(repo, ignored = TRUE)), 339s + "working directory clean")) 339s > 339s > ## Create 4 files 339s > writeLines("File-1", file.path(path, "test-1.txt")) 339s > writeLines("File-2", file.path(path, "test-2.txt")) 339s > writeLines("File-3", file.path(path, "test-3.txt")) 339s > writeLines("File-4", file.path(path, "test-4.txt")) 339s > 339s > ## Status case 3: 4 untracked files 339s > status_exp_3 <- structure(list(staged = empty_named_list(), 339s + unstaged = empty_named_list(), 339s + untracked = list(untracked = "test-1.txt", 339s + untracked = "test-2.txt", 339s + untracked = "test-3.txt", 339s + untracked = "test-4.txt")), 339s + class = "git_status") 339s > status_obs_3 <- status(repo) 339s > status_obs_3 339s Untracked files: 339s Untracked: test-1.txt 339s Untracked: test-2.txt 339s Untracked: test-3.txt 339s Untracked: test-4.txt 339s 339s > str(status_exp_3) 339s List of 3 339s $ staged : Named list() 339s $ unstaged : Named list() 339s $ untracked:List of 4 339s ..$ untracked: chr "test-1.txt" 339s ..$ untracked: chr "test-2.txt" 339s ..$ untracked: chr "test-3.txt" 339s ..$ untracked: chr "test-4.txt" 339s - attr(*, "class")= chr "git_status" 339s > str(status_obs_3) 339s List of 3 339s $ staged : Named list() 339s $ unstaged : Named list() 339s $ untracked:List of 4 339s ..$ untracked: chr "test-1.txt" 339s ..$ untracked: chr "test-2.txt" 339s ..$ untracked: chr "test-3.txt" 339s ..$ untracked: chr "test-4.txt" 339s - attr(*, "class")= chr "git_status" 339s > stopifnot(identical(status_obs_3, status_exp_3)) 339s > 339s > ## Add file 1 and 2 to the repository and commit 339s > add(repo, c("test-1.txt", "test-2.txt")) 339s > commit(repo, "Commit message") 339s [9754879] 2024-03-16: Commit message 339s > 339s > ## Status case 4: 2 untracked files 339s > status_exp_4 <- structure(list(staged = empty_named_list(), 339s + unstaged = empty_named_list(), 339s + untracked = list(untracked = "test-3.txt", 339s + untracked = "test-4.txt")), 339s + class = "git_status") 339s > status_obs_4 <- status(repo) 339s > status_obs_4 339s Untracked files: 339s Untracked: test-3.txt 339s Untracked: test-4.txt 339s 339s > str(status_exp_4) 339s List of 3 339s $ staged : Named list() 339s $ unstaged : Named list() 339s $ untracked:List of 2 339s ..$ untracked: chr "test-3.txt" 339s ..$ untracked: chr "test-4.txt" 339s - attr(*, "class")= chr "git_status" 339s > str(status_obs_4) 339s List of 3 339s $ staged : Named list() 339s $ unstaged : Named list() 339s $ untracked:List of 2 339s ..$ untracked: chr "test-3.txt" 339s ..$ untracked: chr "test-4.txt" 339s - attr(*, "class")= chr "git_status" 339s > stopifnot(identical(status_obs_4, status_exp_4)) 339s > 339s > ## Update file 1 & 2 339s > writeLines(c("File-1", "Hello world"), file.path(path, "test-1.txt")) 339s > writeLines(c("File-2", "Hello world"), file.path(path, "test-2.txt")) 339s > 339s > ## Add file 1 339s > add(repo, "test-1.txt") 339s > 339s > ## Status case 5: 1 staged file, 1 unstaged file and 2 untracked files 339s > status_exp_5 <- structure(list(staged = list(modified = "test-1.txt"), 339s + unstaged = list(modified = "test-2.txt"), 339s + untracked = list(untracked = "test-3.txt", 339s + untracked = "test-4.txt")), 339s + class = "git_status") 339s > status_obs_5 <- status(repo) 339s > status_obs_5 339s Untracked files: 339s Untracked: test-3.txt 339s Untracked: test-4.txt 339s 339s Unstaged changes: 339s Modified: test-2.txt 339s 339s Staged changes: 339s Modified: test-1.txt 339s 339s > str(status_exp_5) 339s List of 3 339s $ staged :List of 1 339s ..$ modified: chr "test-1.txt" 339s $ unstaged :List of 1 339s ..$ modified: chr "test-2.txt" 339s $ untracked:List of 2 339s ..$ untracked: chr "test-3.txt" 339s ..$ untracked: chr "test-4.txt" 339s - attr(*, "class")= chr "git_status" 339s > str(status_obs_5) 339s List of 3 339s $ staged :List of 1 339s ..$ modified: chr "test-1.txt" 339s $ unstaged :List of 1 339s ..$ modified: chr "test-2.txt" 339s $ untracked:List of 2 339s ..$ untracked: chr "test-3.txt" 339s ..$ untracked: chr "test-4.txt" 339s - attr(*, "class")= chr "git_status" 339s > stopifnot(identical(status_obs_5, status_exp_5)) 339s > 339s > ## Add .gitignore file with file test-4.txt 339s > writeLines("test-4.txt", file.path(path, ".gitignore")) 339s > 339s > ## Status case 6: 1 staged file, 1 unstaged file, 2 untracked files 339s > ## and 1 ignored file 339s > status_exp_6 <- structure(list(staged = list(modified = "test-1.txt"), 339s + unstaged = list(modified = "test-2.txt"), 339s + untracked = list(untracked = ".gitignore", 339s + untracked = "test-3.txt"), 339s + ignored = list(ignored = "test-4.txt")), 339s + class = "git_status") 339s > status_obs_6 <- status(repo, ignore = TRUE) 339s > status_obs_6 339s Ignored files: 339s Ignored: test-4.txt 339s 339s Untracked files: 339s Untracked: .gitignore 339s Untracked: test-3.txt 339s 339s Unstaged changes: 339s Modified: test-2.txt 339s 339s Staged changes: 339s Modified: test-1.txt 339s 339s > str(status_exp_6) 339s List of 4 339s $ staged :List of 1 339s ..$ modified: chr "test-1.txt" 339s $ unstaged :List of 1 339s ..$ modified: chr "test-2.txt" 339s $ untracked:List of 2 339s ..$ untracked: chr ".gitignore" 339s ..$ untracked: chr "test-3.txt" 339s $ ignored :List of 1 339s ..$ ignored: chr "test-4.txt" 339s - attr(*, "class")= chr "git_status" 339s > str(status_obs_6) 339s List of 4 339s $ staged :List of 1 339s ..$ modified: chr "test-1.txt" 339s $ unstaged :List of 1 339s ..$ modified: chr "test-2.txt" 339s $ untracked:List of 2 339s ..$ untracked: chr ".gitignore" 339s ..$ untracked: chr "test-3.txt" 339s $ ignored :List of 1 339s ..$ ignored: chr "test-4.txt" 339s - attr(*, "class")= chr "git_status" 339s > stopifnot(identical(status_obs_6, status_exp_6)) 339s > 339s > ## Cleanup 339s > unlink(path, recursive = TRUE) 339s > 339s BEGIN TEST tag.R 339s 339s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 339s Copyright (C) 2024 The R Foundation for Statistical Computing 339s Platform: aarch64-unknown-linux-gnu (64-bit) 339s 339s R is free software and comes with ABSOLUTELY NO WARRANTY. 339s You are welcome to redistribute it under certain conditions. 339s Type 'license()' or 'licence()' for distribution details. 339s 339s R is a collaborative project with many contributors. 339s Type 'contributors()' for more information and 339s 'citation()' on how to cite R or R packages in publications. 339s 339s Type 'demo()' for some demos, 'help()' for on-line help, or 339s 'help.start()' for an HTML browser interface to help. 339s Type 'q()' to quit R. 339s 339s > ## git2r, R bindings to the libgit2 library. 339s > ## Copyright (C) 2013-2023 The git2r contributors 339s > ## 339s > ## This program is free software; you can redistribute it and/or modify 339s > ## it under the terms of the GNU General Public License, version 2, 339s > ## as published by the Free Software Foundation. 339s > ## 339s > ## git2r is distributed in the hope that it will be useful, 339s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 339s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 339s > ## GNU General Public License for more details. 339s > ## 339s > ## You should have received a copy of the GNU General Public License along 339s > ## with this program; if not, write to the Free Software Foundation, Inc., 339s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 339s > 339s > library(git2r) 339s > source("util/check.R") 339s > 339s > ## For debugging 339s > sessionInfo() 339s R version 4.3.3 (2024-02-29) 339s Platform: aarch64-unknown-linux-gnu (64-bit) 339s Running under: Ubuntu Noble Numbat (development branch) 339s 339s Matrix products: default 339s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 339s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 339s 339s locale: 339s [1] C 339s 339s time zone: Etc/UTC 339s tzcode source: system (glibc) 339s 339s attached base packages: 339s [1] stats graphics grDevices utils datasets methods base 339s 339s other attached packages: 339s [1] git2r_0.33.0 339s 339s loaded via a namespace (and not attached): 339s [1] compiler_4.3.3 339s > libgit2_version() 339s $major 339s [1] 1 339s 339s $minor 339s [1] 7 339s 339s $rev 339s [1] 2 339s 339s > libgit2_features() 339s $threads 339s [1] TRUE 339s 339s $https 339s [1] TRUE 339s 339s $ssh 339s [1] TRUE 339s 339s > 339s > 339s > ## Create a directory in tempdir 339s > path <- tempfile(pattern = "git2r-") 339s > dir.create(path) 339s > 339s > ## Initialize a repository 339s > repo <- init(path) 339s > config(repo, user.name = "Alice", user.email = "alice@example.org") 339s > 339s > ## Create a file 339s > writeLines("Hello world!", file.path(path, "test.txt")) 339s > 339s > ## add and commit 339s > add(repo, "test.txt") 339s > commit(repo, "Commit message") 339s [217e5f3] 2024-03-16: Commit message 339s > 339s > ## Check tags, no tag added 339s > stopifnot(identical(tags(repo), empty_named_list())) 339s > 339s > ## Create tag 339s > new_tag <- tag(repo, "Tagname", "Tag message") 339s > stopifnot(identical(print(new_tag), new_tag)) 339s [217e5f] Tagname 339s > summary(new_tag) 339s name: Tagname 339s target: 217e5f349427931fb2d506ea87c56e05507a3146 339s tagger: Alice 339s when: 2024-03-16 18:45:28 GMT 339s message: Tag message 339s > 339s > ## Check tag 339s > stopifnot(identical(lookup(repo, sha(new_tag)), new_tag)) 339s > stopifnot(identical(new_tag$name, "Tagname")) 339s > stopifnot(identical(new_tag$message, "Tag message")) 339s > stopifnot(identical(new_tag$tagger$name, "Alice")) 339s > stopifnot(identical(new_tag$tagger$email, "alice@example.org")) 339s > stopifnot(identical(length(tags(repo)), 1L)) 339s > stopifnot(identical(tags(repo)[[1]]$name, "Tagname")) 339s > stopifnot(identical(tags(repo)[[1]]$message, "Tag message")) 339s > stopifnot(identical(tags(repo)[[1]]$tagger$name, "Alice")) 339s > stopifnot(identical(tags(repo)[[1]]$tagger$email, "alice@example.org")) 339s > 339s > ## Check objects in object database 339s > stopifnot(identical(table(odb_objects(repo)$type), 339s + structure(c(1L, 1L, 1L, 1L), 339s + .Dim = 4L, 339s + .Dimnames = structure(list( 339s + c("blob", "commit", "tag", "tree")), 339s + .Names = ""), 339s + class = "table"))) 339s > 339s > ## Delete tag 339s > tag_delete(new_tag) 339s > stopifnot(identical(length(tags(repo)), 0L)) 339s > 339s > ## Create tag with session info 339s > tag(repo, "Tagname", "Tag message", session = TRUE) 339s > stopifnot(grep("git2r", tags(repo)[[1]]$message) > 0) 339s > 339s > ## Check tags method with default repo argument 339s > wd <- setwd(path) 339s > stopifnot(identical(length(tags()), 1L)) 339s > tag_delete(name = "Tagname") 339s > stopifnot(identical(length(tags()), 0L)) 339s > if (!is.null(wd)) 339s + setwd(wd) 339s > 339s > ## Cleanup 339s > unlink(path, recursive = TRUE) 339s > 339s BEGIN TEST time.R 339s 339s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 339s Copyright (C) 2024 The R Foundation for Statistical Computing 339s Platform: aarch64-unknown-linux-gnu (64-bit) 339s 339s R is free software and comes with ABSOLUTELY NO WARRANTY. 339s You are welcome to redistribute it under certain conditions. 339s Type 'license()' or 'licence()' for distribution details. 339s 339s R is a collaborative project with many contributors. 339s Type 'contributors()' for more information and 339s 'citation()' on how to cite R or R packages in publications. 339s 339s Type 'demo()' for some demos, 'help()' for on-line help, or 339s 'help.start()' for an HTML browser interface to help. 339s Type 'q()' to quit R. 339s 340s > ## git2r, R bindings to the libgit2 library. 340s > ## Copyright (C) 2013-2023 The git2r contributors 340s > ## 340s > ## This program is free software; you can redistribute it and/or modify 340s > ## it under the terms of the GNU General Public License, version 2, 340s > ## as published by the Free Software Foundation. 340s > ## 340s > ## git2r is distributed in the hope that it will be useful, 340s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 340s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 340s > ## GNU General Public License for more details. 340s > ## 340s > ## You should have received a copy of the GNU General Public License along 340s > ## with this program; if not, write to the Free Software Foundation, Inc., 340s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 340s > 340s > library(git2r) 340s > 340s > ## For debugging 340s > sessionInfo() 340s R version 4.3.3 (2024-02-29) 340s Platform: aarch64-unknown-linux-gnu (64-bit) 340s Running under: Ubuntu Noble Numbat (development branch) 340s 340s Matrix products: default 340s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 340s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 340s 340s locale: 340s [1] C 340s 340s time zone: Etc/UTC 340s tzcode source: system (glibc) 340s 340s attached base packages: 340s [1] stats graphics grDevices utils datasets methods base 340s 340s other attached packages: 340s [1] git2r_0.33.0 340s 340s loaded via a namespace (and not attached): 340s [1] compiler_4.3.3 340s > libgit2_version() 340s $major 340s [1] 1 340s 340s $minor 340s [1] 7 340s 340s $rev 340s [1] 2 340s 340s > libgit2_features() 340s $threads 340s [1] TRUE 340s 340s $https 340s [1] TRUE 340s 340s $ssh 340s [1] TRUE 340s 340s > 340s > 340s > ## Test to coerce 340s > git_t <- structure(list(time = 1395567947, offset = 60), 340s + class = "git_time") 340s > stopifnot(identical(as.character(git_t), "2014-03-23 09:45:47 GMT")) 340s > stopifnot(identical(as.character(git_t, usetz = FALSE), "2014-03-23 09:45:47")) 340s > stopifnot(identical(as.POSIXct(git_t), 340s + as.POSIXct(1395567947, tz = "GMT", origin = "1970-01-01"))) 340s > stopifnot(identical(print(git_t), git_t)) 340s 2014-03-23 09:45:47 GMT 340s > 340s > as.POSIXct(1395567947, origin = "1970-01-01", tz = "-03") 340s [1] "2014-03-23 09:45:47" 340s > 340s > ## Test that origin/tz can be passed to as.POSIXct 340s > stopifnot(identical(as.POSIXct(git_t, tz = "Europe/Stockholm", 340s + origin = "1980-02-02"), 340s + as.POSIXct(1395567947, tz = "Europe/Stockholm", 340s + origin = "1980-02-02"))) 340s > 340s > ## Test that origin/tz can be passed to as.character 340s > stopifnot(identical(as.character(git_t, tz = "Europe/Stockholm", 340s + origin = "1980-02-02"), 340s + "2024-04-23 11:45:47 CEST")) 340s > stopifnot(identical(as.character(git_t, tz = "Europe/Stockholm", 340s + origin = "1980-02-02", usetz = FALSE), 340s + "2024-04-23 11:45:47")) 340s > 340s > ## Test that origin/tz can be passed to print 340s > stopifnot(identical( 340s + utils::capture.output(print(git_t, tz = "Europe/Stockholm", 340s + origin = "1980-02-02")), 340s + "2024-04-23 11:45:47 CEST" 340s + )) 340s > stopifnot(identical( 340s + utils::capture.output(print(git_t, tz = "Europe/Stockholm", 340s + origin = "1980-02-02", usetz = FALSE)), 340s + "2024-04-23 11:45:47" 340s + )) 340s > 340s BEGIN TEST tree.R 340s 340s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 340s Copyright (C) 2024 The R Foundation for Statistical Computing 340s Platform: aarch64-unknown-linux-gnu (64-bit) 340s 340s R is free software and comes with ABSOLUTELY NO WARRANTY. 340s You are welcome to redistribute it under certain conditions. 340s Type 'license()' or 'licence()' for distribution details. 340s 340s R is a collaborative project with many contributors. 340s Type 'contributors()' for more information and 340s 'citation()' on how to cite R or R packages in publications. 340s 340s Type 'demo()' for some demos, 'help()' for on-line help, or 340s 'help.start()' for an HTML browser interface to help. 340s Type 'q()' to quit R. 340s 340s > ## git2r, R bindings to the libgit2 library. 340s > ## Copyright (C) 2013-2023 The git2r contributors 340s > ## 340s > ## This program is free software; you can redistribute it and/or modify 340s > ## it under the terms of the GNU General Public License, version 2, 340s > ## as published by the Free Software Foundation. 340s > ## 340s > ## git2r is distributed in the hope that it will be useful, 340s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 340s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 340s > ## GNU General Public License for more details. 340s > ## 340s > ## You should have received a copy of the GNU General Public License along 340s > ## with this program; if not, write to the Free Software Foundation, Inc., 340s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 340s > 340s > library("git2r") 340s > 340s > ## For debugging 340s > sessionInfo() 340s R version 4.3.3 (2024-02-29) 340s Platform: aarch64-unknown-linux-gnu (64-bit) 340s Running under: Ubuntu Noble Numbat (development branch) 340s 340s Matrix products: default 340s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 340s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 340s 340s locale: 340s [1] C 340s 340s time zone: Etc/UTC 340s tzcode source: system (glibc) 340s 340s attached base packages: 340s [1] stats graphics grDevices utils datasets methods base 340s 340s other attached packages: 340s [1] git2r_0.33.0 340s 340s loaded via a namespace (and not attached): 340s [1] compiler_4.3.3 340s > libgit2_version() 340s $major 340s [1] 1 340s 340s $minor 340s [1] 7 340s 340s $rev 340s [1] 2 340s 340s > libgit2_features() 340s $threads 340s [1] TRUE 340s 340s $https 340s [1] TRUE 340s 340s $ssh 340s [1] TRUE 340s 340s > 340s > 340s > ## Create a directory in tempdir 340s > path <- tempfile(pattern = "git2r-") 340s > dir.create(path) 340s > 340s > ## Initialize a repository 340s > repo <- init(path) 340s > config(repo, user.name = "Alice", user.email = "alice@example.org") 340s > 340s > ## Create a file 340s > f <- file(file.path(path, "test.txt"), "wb") 340s > writeChar("Hello world!\n", f, eos = NULL) 340s > close(f) 340s > 340s > ## add and commit 340s > add(repo, "test.txt") 340s > commit(repo, "Commit message") 340s [e0f4748] 2024-03-16: Commit message 340s > 340s > ## Check tree 340s > stopifnot(is_tree(lookup(repo, "a0b0b9e615e9e433eb5f11859e9feac4564c58c5"))) 340s > stopifnot(identical( 340s + sha(lookup(repo, "a0b0b9e615e9e433eb5f11859e9feac4564c58c5")), 340s + "a0b0b9e615e9e433eb5f11859e9feac4564c58c5")) 340s > stopifnot(is_tree(tree(commits(repo)[[1]]))) 340s > stopifnot(identical(lookup(repo, "a0b0b9e615e9e433eb5f11859e9feac4564c58c5"), 340s + tree(commits(repo)[[1]]))) 340s > stopifnot(identical(length(tree(commits(repo)[[1]])), 1L)) 340s > 340s > ## Coerce to a data.frame and check column names 340s > stopifnot(identical(names(as.data.frame(tree(commits(repo)[[1]]))), 340s + c("mode", "type", "sha", "name"))) 340s > 340s > ## Coerce to list and check length 340s > stopifnot(identical(length(as.list(tree(last_commit(repo)))), 1L)) 340s > 340s > ## Print and summary 340s > stopifnot(identical(print(tree(last_commit(repo))), tree(last_commit(repo)))) 340s tree: a0b0b9e615e9e433eb5f11859e9feac4564c58c5 340s 340s mode type sha name 340s 1 100644 blob cd0875583aabe89ee197ea133980a9085d08e497 test.txt 340s > summary(tree(last_commit(repo))) 340s mode type sha name 340s 1 100644 blob cd0875583aabe89ee197ea133980a9085d08e497 test.txt 340s > 340s > ## Check indexing 340s > stopifnot(is_blob(tree(last_commit(repo))[TRUE])) 340s > stopifnot(is_blob(tree(last_commit(repo))["test.txt"])) 340s > res <- tools::assertError(tree(last_commit(repo))[data.frame()]) 340s > stopifnot(length(grep("Invalid index", res[[1]]$message)) > 0) 340s > 340s > ## Check ls_tree 340s > stopifnot(identical(ls_tree(repo = repo), ls_tree(repo = path))) 340s > stopifnot(identical(ls_tree(tree = sha(tree(last_commit(repo))), repo = repo), 340s + ls_tree(repo = repo))) 340s > 340s > ## Cleanup 340s > unlink(path, recursive = TRUE) 340s > 340s BEGIN TEST when.R 340s 340s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 340s Copyright (C) 2024 The R Foundation for Statistical Computing 340s Platform: aarch64-unknown-linux-gnu (64-bit) 340s 340s R is free software and comes with ABSOLUTELY NO WARRANTY. 340s You are welcome to redistribute it under certain conditions. 340s Type 'license()' or 'licence()' for distribution details. 340s 340s R is a collaborative project with many contributors. 340s Type 'contributors()' for more information and 340s 'citation()' on how to cite R or R packages in publications. 340s 340s Type 'demo()' for some demos, 'help()' for on-line help, or 340s 'help.start()' for an HTML browser interface to help. 340s Type 'q()' to quit R. 340s 340s > ## git2r, R bindings to the libgit2 library. 340s > ## Copyright (C) 2013-2023 The git2r contributors 340s > ## 340s > ## This program is free software; you can redistribute it and/or modify 340s > ## it under the terms of the GNU General Public License, version 2, 340s > ## as published by the Free Software Foundation. 340s > ## 340s > ## git2r is distributed in the hope that it will be useful, 340s > ## but WITHOUT ANY WARRANTY; without even the implied warranty of 340s > ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 340s > ## GNU General Public License for more details. 340s > ## 340s > ## You should have received a copy of the GNU General Public License along 340s > ## with this program; if not, write to the Free Software Foundation, Inc., 340s > ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 340s > 340s > library("git2r") 340s > 340s > ## For debugging 340s > sessionInfo() 340s R version 4.3.3 (2024-02-29) 340s Platform: aarch64-unknown-linux-gnu (64-bit) 340s Running under: Ubuntu Noble Numbat (development branch) 340s 340s Matrix products: default 340s BLAS: /usr/lib/aarch64-linux-gnu/blas/libblas.so.3.12.0 340s LAPACK: /usr/lib/aarch64-linux-gnu/lapack/liblapack.so.3.12.0 340s 340s locale: 340s [1] C 340s 340s time zone: Etc/UTC 340s tzcode source: system (glibc) 340s 340s attached base packages: 340s [1] stats graphics grDevices utils datasets methods base 340s 340s other attached packages: 340s [1] git2r_0.33.0 340s 340s loaded via a namespace (and not attached): 340s [1] compiler_4.3.3 340s > libgit2_version() 340s $major 340s [1] 1 340s 340s $minor 340s [1] 7 340s 340s $rev 340s [1] 2 340s 340s > libgit2_features() 340s $threads 340s [1] TRUE 340s 340s $https 340s [1] TRUE 340s 340s $ssh 340s [1] TRUE 340s 340s > 340s > 340s > ## Check when method 340s > w1 <- structure(list(time = 1395567947, offset = 60), 340s + class = "git_time") 340s > stopifnot(identical(when(w1), "2014-03-23 09:45:47 GMT")) 340s > stopifnot(identical(when(w1, usetz = FALSE), "2014-03-23 09:45:47")) 340s > stopifnot(identical(when(w1, tz = "Europe/Stockholm", origin = "1980-02-02"), 340s + "2024-04-23 11:45:47 CEST")) 340s > 340s > s1 <- structure(list(name = "Alice", email = "alice@example.org", when = w1), 340s + class = "git_signature") 340s > stopifnot(identical(when(s1), "2014-03-23 09:45:47 GMT")) 340s > stopifnot(identical(when(s1, usetz = FALSE), "2014-03-23 09:45:47")) 340s > stopifnot(identical(when(s1, tz = "Europe/Stockholm", origin = "1980-02-02"), 340s + "2024-04-23 11:45:47 CEST")) 340s > 340s > w2 <- structure(list(time = 1395567950, offset = 60), 340s + class = "git_time") 340s > s2 <- structure(list(name = "Alice", email = "alice@example.org", when = w2), 340s + class = "git_signature") 340s > c1 <- structure(list(sha = "166f3f779fd7e4165aaa43f2828050ce040052b0", 340s + author = s1, 340s + committer = s2, 340s + summary = "A commit summary", 340s + message = "A commit message"), 340s + class = "git_commit") 340s > stopifnot(identical(when(c1), "2014-03-23 09:45:47 GMT")) 340s > stopifnot(identical(when(c1, usetz = FALSE), "2014-03-23 09:45:47")) 340s > stopifnot(identical(when(c1, tz = "Europe/Stockholm", origin = "1980-02-02"), 340s + "2024-04-23 11:45:47 CEST")) 340s > 340s > t1 <- structure(list(sha = "166f3f779fd7e4165aaa43f2828050ce040052b0", 340s + message = "A tag message", 340s + name = "A tage name", 340s + tagger = s1, 340s + target = "166f3f779fd7e4165aaa43f2828050ce040052b0"), 340s + class = "git_tag") 340s > stopifnot(identical(when(t1), "2014-03-23 09:45:47 GMT")) 340s > stopifnot(identical(when(t1, usetz = FALSE), "2014-03-23 09:45:47")) 340s > stopifnot(identical(when(t1, tz = "Europe/Stockholm", origin = "1980-02-02"), 340s + "2024-04-23 11:45:47 CEST")) 340s > 341s autopkgtest [18:45:30]: test run-unit-test: -----------------------] 342s run-unit-test PASS 342s autopkgtest [18:45:31]: test run-unit-test: - - - - - - - - - - results - - - - - - - - - - 342s autopkgtest [18:45:31]: test pkg-r-autopkgtest: preparing testbed 344s Reading package lists... 344s Building dependency tree... 344s Reading state information... 345s Starting pkgProblemResolver with broken count: 0 345s Starting 2 pkgProblemResolver with broken count: 0 345s Done 347s The following additional packages will be installed: 347s build-essential cpp cpp-13 cpp-13-aarch64-linux-gnu cpp-aarch64-linux-gnu 347s dctrl-tools g++ g++-13 g++-13-aarch64-linux-gnu g++-aarch64-linux-gnu gcc 347s gcc-13 gcc-13-aarch64-linux-gnu gcc-aarch64-linux-gnu gfortran gfortran-13 347s gfortran-13-aarch64-linux-gnu gfortran-aarch64-linux-gnu icu-devtools 347s libasan8 libatomic1 libblas-dev libbz2-dev libc-dev-bin libc6-dev libcc1-0 347s libcrypt-dev libgcc-13-dev libgfortran-13-dev libhwasan0 libicu-dev libisl23 347s libitm1 libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev liblapack-dev liblsan0 347s liblzma-dev libmpc3 libncurses-dev libnsl-dev libpcre2-16-0 libpcre2-32-0 347s libpcre2-dev libpcre2-posix3 libpkgconf3 libpng-dev libreadline-dev 347s libstdc++-13-dev libtirpc-dev libtsan2 libubsan1 linux-libc-dev pkg-config 347s pkg-r-autopkgtest pkgconf pkgconf-bin r-base-dev rpcsvc-proto zlib1g-dev 347s Suggested packages: 347s cpp-doc gcc-13-locales cpp-13-doc debtags gcc-13-doc gcc-multilib 347s manpages-dev autoconf automake libtool flex bison gdb gcc-doc 347s gdb-aarch64-linux-gnu gfortran-doc gfortran-13-doc libcoarrays-dev 347s liblapack-doc glibc-doc icu-doc liblzma-doc ncurses-doc readline-doc 347s libstdc++-13-doc texlive-base texlive-latex-base texlive-plain-generic 347s texlive-fonts-recommended texlive-fonts-extra texlive-extra-utils 347s texlive-latex-recommended texlive-latex-extra texinfo 347s Recommended packages: 347s bzip2-doc manpages manpages-dev libc-devtools libpng-tools 348s The following NEW packages will be installed: 348s autopkgtest-satdep build-essential cpp cpp-13 cpp-13-aarch64-linux-gnu 348s cpp-aarch64-linux-gnu dctrl-tools g++ g++-13 g++-13-aarch64-linux-gnu 348s g++-aarch64-linux-gnu gcc gcc-13 gcc-13-aarch64-linux-gnu 348s gcc-aarch64-linux-gnu gfortran gfortran-13 gfortran-13-aarch64-linux-gnu 348s gfortran-aarch64-linux-gnu icu-devtools libasan8 libatomic1 libblas-dev 348s libbz2-dev libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libgcc-13-dev 348s libgfortran-13-dev libhwasan0 libicu-dev libisl23 libitm1 libjpeg-dev 348s libjpeg-turbo8-dev libjpeg8-dev liblapack-dev liblsan0 liblzma-dev libmpc3 348s libncurses-dev libnsl-dev libpcre2-16-0 libpcre2-32-0 libpcre2-dev 348s libpcre2-posix3 libpkgconf3 libpng-dev libreadline-dev libstdc++-13-dev 348s libtirpc-dev libtsan2 libubsan1 linux-libc-dev pkg-config pkg-r-autopkgtest 348s pkgconf pkgconf-bin r-base-dev rpcsvc-proto zlib1g-dev 348s 0 upgraded, 62 newly installed, 0 to remove and 0 not upgraded. 348s Need to get 92.8 MB/92.8 MB of archives. 348s After this operation, 343 MB of additional disk space will be used. 348s Get:1 /tmp/autopkgtest.PKiqgp/2-autopkgtest-satdep.deb autopkgtest-satdep arm64 0 [720 B] 348s Get:2 http://ftpmaster.internal/ubuntu noble/main arm64 libc-dev-bin arm64 2.39-0ubuntu2 [19.7 kB] 349s Get:3 http://ftpmaster.internal/ubuntu noble/main arm64 linux-libc-dev arm64 6.8.0-11.11 [1569 kB] 349s Get:4 http://ftpmaster.internal/ubuntu noble/main arm64 libcrypt-dev arm64 1:4.4.36-4 [136 kB] 349s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libtirpc-dev arm64 1.3.4+ds-1.1 [201 kB] 349s Get:6 http://ftpmaster.internal/ubuntu noble/main arm64 libnsl-dev arm64 1.3.0-3 [71.9 kB] 349s Get:7 http://ftpmaster.internal/ubuntu noble/main arm64 rpcsvc-proto arm64 1.4.2-0ubuntu6 [65.4 kB] 349s Get:8 http://ftpmaster.internal/ubuntu noble/main arm64 libc6-dev arm64 2.39-0ubuntu2 [1596 kB] 349s Get:9 http://ftpmaster.internal/ubuntu noble/main arm64 libisl23 arm64 0.26-3 [713 kB] 349s Get:10 http://ftpmaster.internal/ubuntu noble/main arm64 libmpc3 arm64 1.3.1-1 [55.3 kB] 349s Get:11 http://ftpmaster.internal/ubuntu noble/main arm64 cpp-13-aarch64-linux-gnu arm64 13.2.0-17ubuntu2 [10.3 MB] 349s Get:12 http://ftpmaster.internal/ubuntu noble/main arm64 cpp-13 arm64 13.2.0-17ubuntu2 [1028 B] 349s Get:13 http://ftpmaster.internal/ubuntu noble/main arm64 cpp-aarch64-linux-gnu arm64 4:13.2.0-7ubuntu1 [5316 B] 349s Get:14 http://ftpmaster.internal/ubuntu noble/main arm64 cpp arm64 4:13.2.0-7ubuntu1 [22.4 kB] 349s Get:15 http://ftpmaster.internal/ubuntu noble/main arm64 libcc1-0 arm64 14-20240303-1ubuntu1 [44.7 kB] 349s Get:16 http://ftpmaster.internal/ubuntu noble/main arm64 libitm1 arm64 14-20240303-1ubuntu1 [27.7 kB] 349s Get:17 http://ftpmaster.internal/ubuntu noble/main arm64 libatomic1 arm64 14-20240303-1ubuntu1 [11.4 kB] 349s Get:18 http://ftpmaster.internal/ubuntu noble/main arm64 libasan8 arm64 14-20240303-1ubuntu1 [2919 kB] 349s Get:19 http://ftpmaster.internal/ubuntu noble/main arm64 liblsan0 arm64 14-20240303-1ubuntu1 [1282 kB] 349s Get:20 http://ftpmaster.internal/ubuntu noble/main arm64 libtsan2 arm64 14-20240303-1ubuntu1 [2687 kB] 349s Get:21 http://ftpmaster.internal/ubuntu noble/main arm64 libubsan1 arm64 14-20240303-1ubuntu1 [1151 kB] 349s Get:22 http://ftpmaster.internal/ubuntu noble/main arm64 libhwasan0 arm64 14-20240303-1ubuntu1 [1597 kB] 349s Get:23 http://ftpmaster.internal/ubuntu noble/main arm64 libgcc-13-dev arm64 13.2.0-17ubuntu2 [2464 kB] 349s Get:24 http://ftpmaster.internal/ubuntu noble/main arm64 gcc-13-aarch64-linux-gnu arm64 13.2.0-17ubuntu2 [20.1 MB] 350s Get:25 http://ftpmaster.internal/ubuntu noble/main arm64 gcc-13 arm64 13.2.0-17ubuntu2 [467 kB] 350s Get:26 http://ftpmaster.internal/ubuntu noble/main arm64 gcc-aarch64-linux-gnu arm64 4:13.2.0-7ubuntu1 [1198 B] 350s Get:27 http://ftpmaster.internal/ubuntu noble/main arm64 gcc arm64 4:13.2.0-7ubuntu1 [5018 B] 350s Get:28 http://ftpmaster.internal/ubuntu noble/main arm64 libstdc++-13-dev arm64 13.2.0-17ubuntu2 [2322 kB] 350s Get:29 http://ftpmaster.internal/ubuntu noble/main arm64 g++-13-aarch64-linux-gnu arm64 13.2.0-17ubuntu2 [11.7 MB] 350s Get:30 http://ftpmaster.internal/ubuntu noble/main arm64 g++-13 arm64 13.2.0-17ubuntu2 [14.4 kB] 350s Get:31 http://ftpmaster.internal/ubuntu noble/main arm64 g++-aarch64-linux-gnu arm64 4:13.2.0-7ubuntu1 [962 B] 350s Get:32 http://ftpmaster.internal/ubuntu noble/main arm64 g++ arm64 4:13.2.0-7ubuntu1 [1082 B] 350s Get:33 http://ftpmaster.internal/ubuntu noble/main arm64 build-essential arm64 12.10ubuntu1 [4932 B] 350s Get:34 http://ftpmaster.internal/ubuntu noble/main arm64 dctrl-tools arm64 2.24-3build2 [65.2 kB] 350s Get:35 http://ftpmaster.internal/ubuntu noble/main arm64 libgfortran-13-dev arm64 13.2.0-17ubuntu2 [478 kB] 350s Get:36 http://ftpmaster.internal/ubuntu noble/main arm64 gfortran-13-aarch64-linux-gnu arm64 13.2.0-17ubuntu2 [10.8 MB] 351s Get:37 http://ftpmaster.internal/ubuntu noble/main arm64 gfortran-13 arm64 13.2.0-17ubuntu2 [10.3 kB] 351s Get:38 http://ftpmaster.internal/ubuntu noble/main arm64 gfortran-aarch64-linux-gnu arm64 4:13.2.0-7ubuntu1 [1022 B] 351s Get:39 http://ftpmaster.internal/ubuntu noble/main arm64 gfortran arm64 4:13.2.0-7ubuntu1 [1164 B] 351s Get:40 http://ftpmaster.internal/ubuntu noble/main arm64 icu-devtools arm64 74.2-1ubuntu1 [209 kB] 351s Get:41 http://ftpmaster.internal/ubuntu noble/main arm64 libblas-dev arm64 3.12.0-3 [111 kB] 351s Get:42 http://ftpmaster.internal/ubuntu noble/main arm64 libbz2-dev arm64 1.0.8-5ubuntu1 [35.8 kB] 351s Get:43 http://ftpmaster.internal/ubuntu noble/main arm64 libicu-dev arm64 74.2-1ubuntu1 [11.9 MB] 351s Get:44 http://ftpmaster.internal/ubuntu noble/main arm64 libjpeg-turbo8-dev arm64 2.1.5-2ubuntu1 [304 kB] 351s Get:45 http://ftpmaster.internal/ubuntu noble/main arm64 libjpeg8-dev arm64 8c-2ubuntu11 [1484 B] 351s Get:46 http://ftpmaster.internal/ubuntu noble/main arm64 libjpeg-dev arm64 8c-2ubuntu11 [1482 B] 351s Get:47 http://ftpmaster.internal/ubuntu noble/main arm64 liblapack-dev arm64 3.12.0-3 [4293 kB] 351s Get:48 http://ftpmaster.internal/ubuntu noble/main arm64 libncurses-dev arm64 6.4+20240113-1ubuntu1 [385 kB] 351s Get:49 http://ftpmaster.internal/ubuntu noble/main arm64 libpcre2-16-0 arm64 10.42-4ubuntu1 [195 kB] 351s Get:50 http://ftpmaster.internal/ubuntu noble/main arm64 libpcre2-32-0 arm64 10.42-4ubuntu1 [183 kB] 351s Get:51 http://ftpmaster.internal/ubuntu noble/main arm64 libpcre2-posix3 arm64 10.42-4ubuntu1 [6654 B] 351s Get:52 http://ftpmaster.internal/ubuntu noble/main arm64 libpcre2-dev arm64 10.42-4ubuntu1 [679 kB] 351s Get:53 http://ftpmaster.internal/ubuntu noble/main arm64 libpkgconf3 arm64 1.8.1-2 [31.2 kB] 351s Get:54 http://ftpmaster.internal/ubuntu noble/main arm64 zlib1g-dev arm64 1:1.3.dfsg-3ubuntu1 [895 kB] 351s Get:55 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libpng-dev arm64 1.6.43-3 [267 kB] 351s Get:56 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libreadline-dev arm64 8.2-3.1 [177 kB] 351s Get:57 http://ftpmaster.internal/ubuntu noble/main arm64 pkgconf-bin arm64 1.8.1-2 [20.4 kB] 351s Get:58 http://ftpmaster.internal/ubuntu noble/main arm64 pkgconf arm64 1.8.1-2 [16.7 kB] 351s Get:59 http://ftpmaster.internal/ubuntu noble/main arm64 pkg-config arm64 1.8.1-2 [7170 B] 351s Get:60 http://ftpmaster.internal/ubuntu noble/main arm64 liblzma-dev arm64 5.4.5-0.3 [209 kB] 351s Get:61 http://ftpmaster.internal/ubuntu noble-proposed/universe arm64 r-base-dev all 4.3.3-2build1 [4334 B] 351s Get:62 http://ftpmaster.internal/ubuntu noble/universe arm64 pkg-r-autopkgtest all 20231212ubuntu1 [6448 B] 353s Fetched 92.8 MB in 3s (29.8 MB/s) 353s Selecting previously unselected package libc-dev-bin. 353s (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 ... 76885 files and directories currently installed.) 353s Preparing to unpack .../00-libc-dev-bin_2.39-0ubuntu2_arm64.deb ... 353s Unpacking libc-dev-bin (2.39-0ubuntu2) ... 353s Selecting previously unselected package linux-libc-dev:arm64. 353s Preparing to unpack .../01-linux-libc-dev_6.8.0-11.11_arm64.deb ... 353s Unpacking linux-libc-dev:arm64 (6.8.0-11.11) ... 353s Selecting previously unselected package libcrypt-dev:arm64. 353s Preparing to unpack .../02-libcrypt-dev_1%3a4.4.36-4_arm64.deb ... 353s Unpacking libcrypt-dev:arm64 (1:4.4.36-4) ... 353s Selecting previously unselected package libtirpc-dev:arm64. 353s Preparing to unpack .../03-libtirpc-dev_1.3.4+ds-1.1_arm64.deb ... 353s Unpacking libtirpc-dev:arm64 (1.3.4+ds-1.1) ... 353s Selecting previously unselected package libnsl-dev:arm64. 353s Preparing to unpack .../04-libnsl-dev_1.3.0-3_arm64.deb ... 353s Unpacking libnsl-dev:arm64 (1.3.0-3) ... 353s Selecting previously unselected package rpcsvc-proto. 353s Preparing to unpack .../05-rpcsvc-proto_1.4.2-0ubuntu6_arm64.deb ... 353s Unpacking rpcsvc-proto (1.4.2-0ubuntu6) ... 353s Selecting previously unselected package libc6-dev:arm64. 354s Preparing to unpack .../06-libc6-dev_2.39-0ubuntu2_arm64.deb ... 354s Unpacking libc6-dev:arm64 (2.39-0ubuntu2) ... 354s Selecting previously unselected package libisl23:arm64. 354s Preparing to unpack .../07-libisl23_0.26-3_arm64.deb ... 354s Unpacking libisl23:arm64 (0.26-3) ... 354s Selecting previously unselected package libmpc3:arm64. 354s Preparing to unpack .../08-libmpc3_1.3.1-1_arm64.deb ... 354s Unpacking libmpc3:arm64 (1.3.1-1) ... 354s Selecting previously unselected package cpp-13-aarch64-linux-gnu. 354s Preparing to unpack .../09-cpp-13-aarch64-linux-gnu_13.2.0-17ubuntu2_arm64.deb ... 354s Unpacking cpp-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 355s Selecting previously unselected package cpp-13. 355s Preparing to unpack .../10-cpp-13_13.2.0-17ubuntu2_arm64.deb ... 355s Unpacking cpp-13 (13.2.0-17ubuntu2) ... 355s Selecting previously unselected package cpp-aarch64-linux-gnu. 355s Preparing to unpack .../11-cpp-aarch64-linux-gnu_4%3a13.2.0-7ubuntu1_arm64.deb ... 355s Unpacking cpp-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 355s Selecting previously unselected package cpp. 355s Preparing to unpack .../12-cpp_4%3a13.2.0-7ubuntu1_arm64.deb ... 355s Unpacking cpp (4:13.2.0-7ubuntu1) ... 355s Selecting previously unselected package libcc1-0:arm64. 355s Preparing to unpack .../13-libcc1-0_14-20240303-1ubuntu1_arm64.deb ... 355s Unpacking libcc1-0:arm64 (14-20240303-1ubuntu1) ... 355s Selecting previously unselected package libitm1:arm64. 356s Preparing to unpack .../14-libitm1_14-20240303-1ubuntu1_arm64.deb ... 356s Unpacking libitm1:arm64 (14-20240303-1ubuntu1) ... 356s Selecting previously unselected package libatomic1:arm64. 356s Preparing to unpack .../15-libatomic1_14-20240303-1ubuntu1_arm64.deb ... 356s Unpacking libatomic1:arm64 (14-20240303-1ubuntu1) ... 356s Selecting previously unselected package libasan8:arm64. 356s Preparing to unpack .../16-libasan8_14-20240303-1ubuntu1_arm64.deb ... 356s Unpacking libasan8:arm64 (14-20240303-1ubuntu1) ... 356s Selecting previously unselected package liblsan0:arm64. 356s Preparing to unpack .../17-liblsan0_14-20240303-1ubuntu1_arm64.deb ... 356s Unpacking liblsan0:arm64 (14-20240303-1ubuntu1) ... 356s Selecting previously unselected package libtsan2:arm64. 356s Preparing to unpack .../18-libtsan2_14-20240303-1ubuntu1_arm64.deb ... 356s Unpacking libtsan2:arm64 (14-20240303-1ubuntu1) ... 356s Selecting previously unselected package libubsan1:arm64. 356s Preparing to unpack .../19-libubsan1_14-20240303-1ubuntu1_arm64.deb ... 356s Unpacking libubsan1:arm64 (14-20240303-1ubuntu1) ... 356s Selecting previously unselected package libhwasan0:arm64. 356s Preparing to unpack .../20-libhwasan0_14-20240303-1ubuntu1_arm64.deb ... 356s Unpacking libhwasan0:arm64 (14-20240303-1ubuntu1) ... 357s Selecting previously unselected package libgcc-13-dev:arm64. 357s Preparing to unpack .../21-libgcc-13-dev_13.2.0-17ubuntu2_arm64.deb ... 357s Unpacking libgcc-13-dev:arm64 (13.2.0-17ubuntu2) ... 357s Selecting previously unselected package gcc-13-aarch64-linux-gnu. 357s Preparing to unpack .../22-gcc-13-aarch64-linux-gnu_13.2.0-17ubuntu2_arm64.deb ... 357s Unpacking gcc-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 358s Selecting previously unselected package gcc-13. 358s Preparing to unpack .../23-gcc-13_13.2.0-17ubuntu2_arm64.deb ... 358s Unpacking gcc-13 (13.2.0-17ubuntu2) ... 358s Selecting previously unselected package gcc-aarch64-linux-gnu. 358s Preparing to unpack .../24-gcc-aarch64-linux-gnu_4%3a13.2.0-7ubuntu1_arm64.deb ... 358s Unpacking gcc-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 358s Selecting previously unselected package gcc. 358s Preparing to unpack .../25-gcc_4%3a13.2.0-7ubuntu1_arm64.deb ... 358s Unpacking gcc (4:13.2.0-7ubuntu1) ... 358s Selecting previously unselected package libstdc++-13-dev:arm64. 359s Preparing to unpack .../26-libstdc++-13-dev_13.2.0-17ubuntu2_arm64.deb ... 359s Unpacking libstdc++-13-dev:arm64 (13.2.0-17ubuntu2) ... 359s Selecting previously unselected package g++-13-aarch64-linux-gnu. 359s Preparing to unpack .../27-g++-13-aarch64-linux-gnu_13.2.0-17ubuntu2_arm64.deb ... 359s Unpacking g++-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 359s Selecting previously unselected package g++-13. 359s Preparing to unpack .../28-g++-13_13.2.0-17ubuntu2_arm64.deb ... 359s Unpacking g++-13 (13.2.0-17ubuntu2) ... 359s Selecting previously unselected package g++-aarch64-linux-gnu. 359s Preparing to unpack .../29-g++-aarch64-linux-gnu_4%3a13.2.0-7ubuntu1_arm64.deb ... 359s Unpacking g++-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 359s Selecting previously unselected package g++. 359s Preparing to unpack .../30-g++_4%3a13.2.0-7ubuntu1_arm64.deb ... 359s Unpacking g++ (4:13.2.0-7ubuntu1) ... 359s Selecting previously unselected package build-essential. 359s Preparing to unpack .../31-build-essential_12.10ubuntu1_arm64.deb ... 359s Unpacking build-essential (12.10ubuntu1) ... 359s Selecting previously unselected package dctrl-tools. 359s Preparing to unpack .../32-dctrl-tools_2.24-3build2_arm64.deb ... 359s Unpacking dctrl-tools (2.24-3build2) ... 359s Selecting previously unselected package libgfortran-13-dev:arm64. 360s Preparing to unpack .../33-libgfortran-13-dev_13.2.0-17ubuntu2_arm64.deb ... 360s Unpacking libgfortran-13-dev:arm64 (13.2.0-17ubuntu2) ... 360s Selecting previously unselected package gfortran-13-aarch64-linux-gnu. 360s Preparing to unpack .../34-gfortran-13-aarch64-linux-gnu_13.2.0-17ubuntu2_arm64.deb ... 360s Unpacking gfortran-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 360s Selecting previously unselected package gfortran-13. 360s Preparing to unpack .../35-gfortran-13_13.2.0-17ubuntu2_arm64.deb ... 360s Unpacking gfortran-13 (13.2.0-17ubuntu2) ... 360s Selecting previously unselected package gfortran-aarch64-linux-gnu. 360s Preparing to unpack .../36-gfortran-aarch64-linux-gnu_4%3a13.2.0-7ubuntu1_arm64.deb ... 360s Unpacking gfortran-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 360s Selecting previously unselected package gfortran. 360s Preparing to unpack .../37-gfortran_4%3a13.2.0-7ubuntu1_arm64.deb ... 360s Unpacking gfortran (4:13.2.0-7ubuntu1) ... 360s Selecting previously unselected package icu-devtools. 360s Preparing to unpack .../38-icu-devtools_74.2-1ubuntu1_arm64.deb ... 360s Unpacking icu-devtools (74.2-1ubuntu1) ... 360s Selecting previously unselected package libblas-dev:arm64. 360s Preparing to unpack .../39-libblas-dev_3.12.0-3_arm64.deb ... 360s Unpacking libblas-dev:arm64 (3.12.0-3) ... 360s Selecting previously unselected package libbz2-dev:arm64. 360s Preparing to unpack .../40-libbz2-dev_1.0.8-5ubuntu1_arm64.deb ... 360s Unpacking libbz2-dev:arm64 (1.0.8-5ubuntu1) ... 361s Selecting previously unselected package libicu-dev:arm64. 361s Preparing to unpack .../41-libicu-dev_74.2-1ubuntu1_arm64.deb ... 361s Unpacking libicu-dev:arm64 (74.2-1ubuntu1) ... 361s Selecting previously unselected package libjpeg-turbo8-dev:arm64. 361s Preparing to unpack .../42-libjpeg-turbo8-dev_2.1.5-2ubuntu1_arm64.deb ... 361s Unpacking libjpeg-turbo8-dev:arm64 (2.1.5-2ubuntu1) ... 361s Selecting previously unselected package libjpeg8-dev:arm64. 361s Preparing to unpack .../43-libjpeg8-dev_8c-2ubuntu11_arm64.deb ... 361s Unpacking libjpeg8-dev:arm64 (8c-2ubuntu11) ... 361s Selecting previously unselected package libjpeg-dev:arm64. 361s Preparing to unpack .../44-libjpeg-dev_8c-2ubuntu11_arm64.deb ... 361s Unpacking libjpeg-dev:arm64 (8c-2ubuntu11) ... 361s Selecting previously unselected package liblapack-dev:arm64. 361s Preparing to unpack .../45-liblapack-dev_3.12.0-3_arm64.deb ... 361s Unpacking liblapack-dev:arm64 (3.12.0-3) ... 361s Selecting previously unselected package libncurses-dev:arm64. 361s Preparing to unpack .../46-libncurses-dev_6.4+20240113-1ubuntu1_arm64.deb ... 361s Unpacking libncurses-dev:arm64 (6.4+20240113-1ubuntu1) ... 361s Selecting previously unselected package libpcre2-16-0:arm64. 361s Preparing to unpack .../47-libpcre2-16-0_10.42-4ubuntu1_arm64.deb ... 361s Unpacking libpcre2-16-0:arm64 (10.42-4ubuntu1) ... 361s Selecting previously unselected package libpcre2-32-0:arm64. 361s Preparing to unpack .../48-libpcre2-32-0_10.42-4ubuntu1_arm64.deb ... 361s Unpacking libpcre2-32-0:arm64 (10.42-4ubuntu1) ... 361s Selecting previously unselected package libpcre2-posix3:arm64. 361s Preparing to unpack .../49-libpcre2-posix3_10.42-4ubuntu1_arm64.deb ... 361s Unpacking libpcre2-posix3:arm64 (10.42-4ubuntu1) ... 362s Selecting previously unselected package libpcre2-dev:arm64. 362s Preparing to unpack .../50-libpcre2-dev_10.42-4ubuntu1_arm64.deb ... 362s Unpacking libpcre2-dev:arm64 (10.42-4ubuntu1) ... 362s Selecting previously unselected package libpkgconf3:arm64. 362s Preparing to unpack .../51-libpkgconf3_1.8.1-2_arm64.deb ... 362s Unpacking libpkgconf3:arm64 (1.8.1-2) ... 362s Selecting previously unselected package zlib1g-dev:arm64. 362s Preparing to unpack .../52-zlib1g-dev_1%3a1.3.dfsg-3ubuntu1_arm64.deb ... 362s Unpacking zlib1g-dev:arm64 (1:1.3.dfsg-3ubuntu1) ... 362s Selecting previously unselected package libpng-dev:arm64. 362s Preparing to unpack .../53-libpng-dev_1.6.43-3_arm64.deb ... 362s Unpacking libpng-dev:arm64 (1.6.43-3) ... 362s Selecting previously unselected package libreadline-dev:arm64. 362s Preparing to unpack .../54-libreadline-dev_8.2-3.1_arm64.deb ... 362s Unpacking libreadline-dev:arm64 (8.2-3.1) ... 362s Selecting previously unselected package pkgconf-bin. 362s Preparing to unpack .../55-pkgconf-bin_1.8.1-2_arm64.deb ... 362s Unpacking pkgconf-bin (1.8.1-2) ... 362s Selecting previously unselected package pkgconf:arm64. 362s Preparing to unpack .../56-pkgconf_1.8.1-2_arm64.deb ... 362s Unpacking pkgconf:arm64 (1.8.1-2) ... 362s Selecting previously unselected package pkg-config:arm64. 362s Preparing to unpack .../57-pkg-config_1.8.1-2_arm64.deb ... 362s Unpacking pkg-config:arm64 (1.8.1-2) ... 363s Selecting previously unselected package liblzma-dev:arm64. 363s Preparing to unpack .../58-liblzma-dev_5.4.5-0.3_arm64.deb ... 363s Unpacking liblzma-dev:arm64 (5.4.5-0.3) ... 363s Selecting previously unselected package r-base-dev. 363s Preparing to unpack .../59-r-base-dev_4.3.3-2build1_all.deb ... 363s Unpacking r-base-dev (4.3.3-2build1) ... 363s Selecting previously unselected package pkg-r-autopkgtest. 363s Preparing to unpack .../60-pkg-r-autopkgtest_20231212ubuntu1_all.deb ... 363s Unpacking pkg-r-autopkgtest (20231212ubuntu1) ... 363s Selecting previously unselected package autopkgtest-satdep. 363s Preparing to unpack .../61-2-autopkgtest-satdep.deb ... 363s Unpacking autopkgtest-satdep (0) ... 363s Setting up linux-libc-dev:arm64 (6.8.0-11.11) ... 363s Setting up libpcre2-16-0:arm64 (10.42-4ubuntu1) ... 363s Setting up libpcre2-32-0:arm64 (10.42-4ubuntu1) ... 363s Setting up libtirpc-dev:arm64 (1.3.4+ds-1.1) ... 363s Setting up libpkgconf3:arm64 (1.8.1-2) ... 363s Setting up rpcsvc-proto (1.4.2-0ubuntu6) ... 363s Setting up libmpc3:arm64 (1.3.1-1) ... 363s Setting up libatomic1:arm64 (14-20240303-1ubuntu1) ... 363s Setting up icu-devtools (74.2-1ubuntu1) ... 363s Setting up pkgconf-bin (1.8.1-2) ... 363s Setting up liblzma-dev:arm64 (5.4.5-0.3) ... 363s Setting up libubsan1:arm64 (14-20240303-1ubuntu1) ... 363s Setting up libpcre2-posix3:arm64 (10.42-4ubuntu1) ... 363s Setting up libnsl-dev:arm64 (1.3.0-3) ... 363s Setting up libhwasan0:arm64 (14-20240303-1ubuntu1) ... 363s Setting up libcrypt-dev:arm64 (1:4.4.36-4) ... 363s Setting up libasan8:arm64 (14-20240303-1ubuntu1) ... 363s Setting up libtsan2:arm64 (14-20240303-1ubuntu1) ... 363s Setting up libisl23:arm64 (0.26-3) ... 363s Setting up libc-dev-bin (2.39-0ubuntu2) ... 363s Setting up libcc1-0:arm64 (14-20240303-1ubuntu1) ... 363s Setting up liblsan0:arm64 (14-20240303-1ubuntu1) ... 363s Setting up libblas-dev:arm64 (3.12.0-3) ... 363s update-alternatives: using /usr/lib/aarch64-linux-gnu/blas/libblas.so to provide /usr/lib/aarch64-linux-gnu/libblas.so (libblas.so-aarch64-linux-gnu) in auto mode 363s Setting up dctrl-tools (2.24-3build2) ... 363s Setting up libitm1:arm64 (14-20240303-1ubuntu1) ... 363s Setting up cpp-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 363s Setting up pkgconf:arm64 (1.8.1-2) ... 363s Setting up cpp-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 363s Setting up liblapack-dev:arm64 (3.12.0-3) ... 363s update-alternatives: using /usr/lib/aarch64-linux-gnu/lapack/liblapack.so to provide /usr/lib/aarch64-linux-gnu/liblapack.so (liblapack.so-aarch64-linux-gnu) in auto mode 363s Setting up pkg-config:arm64 (1.8.1-2) ... 363s Setting up libgcc-13-dev:arm64 (13.2.0-17ubuntu2) ... 363s Setting up libc6-dev:arm64 (2.39-0ubuntu2) ... 363s Setting up libgfortran-13-dev:arm64 (13.2.0-17ubuntu2) ... 363s Setting up libicu-dev:arm64 (74.2-1ubuntu1) ... 363s Setting up libstdc++-13-dev:arm64 (13.2.0-17ubuntu2) ... 363s Setting up libbz2-dev:arm64 (1.0.8-5ubuntu1) ... 363s Setting up libjpeg-turbo8-dev:arm64 (2.1.5-2ubuntu1) ... 363s Setting up libncurses-dev:arm64 (6.4+20240113-1ubuntu1) ... 363s Setting up libpcre2-dev:arm64 (10.42-4ubuntu1) ... 363s Setting up cpp-13 (13.2.0-17ubuntu2) ... 363s Setting up gcc-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 363s Setting up libreadline-dev:arm64 (8.2-3.1) ... 363s Setting up gcc-13 (13.2.0-17ubuntu2) ... 363s Setting up zlib1g-dev:arm64 (1:1.3.dfsg-3ubuntu1) ... 363s Setting up cpp (4:13.2.0-7ubuntu1) ... 363s Setting up libjpeg8-dev:arm64 (8c-2ubuntu11) ... 363s Setting up g++-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 363s Setting up gcc-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 363s Setting up g++-13 (13.2.0-17ubuntu2) ... 363s Setting up libpng-dev:arm64 (1.6.43-3) ... 363s Setting up libjpeg-dev:arm64 (8c-2ubuntu11) ... 363s Setting up gfortran-13-aarch64-linux-gnu (13.2.0-17ubuntu2) ... 363s Setting up gcc (4:13.2.0-7ubuntu1) ... 363s Setting up gfortran-13 (13.2.0-17ubuntu2) ... 363s Setting up g++-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 363s Setting up gfortran-aarch64-linux-gnu (4:13.2.0-7ubuntu1) ... 363s Setting up gfortran (4:13.2.0-7ubuntu1) ... 363s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 363s update-alternatives: warning: skip creation of /usr/share/man/man1/f95.1.gz because associated file /usr/share/man/man1/gfortran.1.gz (of link group f95) doesn't exist 363s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 363s update-alternatives: warning: skip creation of /usr/share/man/man1/f77.1.gz because associated file /usr/share/man/man1/gfortran.1.gz (of link group f77) doesn't exist 363s Setting up g++ (4:13.2.0-7ubuntu1) ... 363s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 363s Setting up build-essential (12.10ubuntu1) ... 363s Setting up r-base-dev (4.3.3-2build1) ... 363s Setting up pkg-r-autopkgtest (20231212ubuntu1) ... 363s Setting up autopkgtest-satdep (0) ... 363s Processing triggers for man-db (2.12.0-3) ... 365s Processing triggers for install-info (7.1-3) ... 365s Processing triggers for libc-bin (2.39-0ubuntu2) ... 369s (Reading database ... 80444 files and directories currently installed.) 369s Removing autopkgtest-satdep (0) ... 371s autopkgtest [18:45:59]: test pkg-r-autopkgtest: /usr/share/dh-r/pkg-r-autopkgtest 371s autopkgtest [18:45:59]: test pkg-r-autopkgtest: [----------------------- 371s Test: Try to load the R library git2r 371s 371s R version 4.3.3 (2024-02-29) -- "Angel Food Cake" 371s Copyright (C) 2024 The R Foundation for Statistical Computing 371s Platform: aarch64-unknown-linux-gnu (64-bit) 371s 371s R is free software and comes with ABSOLUTELY NO WARRANTY. 371s You are welcome to redistribute it under certain conditions. 371s Type 'license()' or 'licence()' for distribution details. 371s 371s R is a collaborative project with many contributors. 371s Type 'contributors()' for more information and 371s 'citation()' on how to cite R or R packages in publications. 371s 371s Type 'demo()' for some demos, 'help()' for on-line help, or 371s 'help.start()' for an HTML browser interface to help. 371s Type 'q()' to quit R. 371s 371s > library('git2r') 371s > 371s > 372s Other tests are currently unsupported! 372s They will be progressively added. 372s autopkgtest [18:46:01]: test pkg-r-autopkgtest: -----------------------] 372s pkg-r-autopkgtest PASS 372s autopkgtest [18:46:01]: test pkg-r-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 373s autopkgtest [18:46:02]: @@@@@@@@@@@@@@@@@@@@ summary 373s run-unit-test PASS 373s pkg-r-autopkgtest PASS 391s Creating nova instance adt-noble-arm64-r-cran-git2r-20240316-183949-juju-7f2275-prod-proposed-migration-environment-2 from image adt/ubuntu-noble-arm64-server-20240314.img (UUID 7faf5f09-d335-4346-a441-4eab2f9c04fe)...