Package Details: git-machete 3.31.1-1

Git Clone URL: https://aur.archlinux.org/git-machete.git (read-only, click to copy)
Package Base: git-machete
Description: Git repository organizer & rebase/merge workflow automation tool
Upstream URL: https://github.com/VirtusLab/git-machete
Keywords: branches git rebase
Licenses: MIT
Submitter: alt0160
Maintainer: ilai
Last Packager: ilai
Votes: 0
Popularity: 0.000000
First Submitted: 2019-05-17 08:04 (UTC)
Last Updated: 2024-12-11 16:47 (UTC)

Dependencies (12)

Required by (0)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3

pmatos commented on 2022-07-25 10:32 (UTC)

@chrislea this patch is not applying anymore. The test is now called test_github.

chrislea commented on 2022-04-26 04:08 (UTC)

Here's a diff that will add a patch file and update the PKGBUILD so that it skips the offending test:

diff --git a/001-skip-remote-push-test.patch b/001-skip-remote-push-test.patch
new file mode 100644
index 0000000..12590b4
--- /dev/null
+++ b/001-skip-remote-push-test.patch
@@ -0,0 +1,11 @@
+diff --color -urN git-machete-3.9.0.orig/git_machete/tests/functional/test_machete.py git-machete-3.9.0/git_machete/tests/functional/test_machete.py
+--- git-machete-3.9.0.orig/git_machete/tests/functional/test_machete.py        2022-04-23 05:04:37.000000000 -0700
++++ git-machete-3.9.0/git_machete/tests/functional/test_machete.py     2022-04-25 20:59:19.151666032 -0700
+@@ -350,6 +350,7 @@
+         self.execute(f'git commit --amend -m "{message}"')
+         return self
+ 
++    @unittest.skip('Skipping remote push test...')
+     def push(self) -> "GitRepositorySandbox":
+         branch = popen("git symbolic-ref -q --short HEAD")
+         self.execute(f"git push -u origin {branch}")
diff --git a/PKGBUILD b/PKGBUILD
index 84477df..7260ada 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,6 +12,11 @@ makedepends=('python-setuptools')
 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/VirtusLab/$pkgname/archive/v$pkgver.tar.gz")
 sha256sums=('4ad7935bb5c7e8eb6b9fa94ed057aad0a7c1f4a6c91b1e69a6694ecffc16a371')

+prepare() {
+  cd "$srcdir/$pkgname-${pkgver}"
+  patch -Np1 < ../../001-skip-remote-push-test.patch
+}
+
 build() {
   cd "$srcdir/$pkgname-${pkgver}"
   python setup.py build

chrislea commented on 2022-04-25 16:55 (UTC)

Building 3.9.0 errors our for me on a check:

==> Starting check()...
........E.......................................
======================================================================
ERROR: test_github_checkout_prs (git_machete.tests.functional.test_machete.MacheteTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/mock.py", line 1369, in patched
    return func(*newargs, **newkeywargs)
  File "/home/chl/AUR/git-machete/src/git-machete-3.9.0/git_machete/tests/functional/test_machete.py", line 2452, in test_github_checkout_prs
    .push()
  File "/home/chl/AUR/git-machete/src/git-machete-3.9.0/git_machete/tests/functional/test_machete.py", line 355, in push
    self.execute(f"git push -u origin {branch}")
  File "/home/chl/AUR/git-machete/src/git-machete-3.9.0/git_machete/tests/functional/test_machete.py", line 321, in execute
    subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True)
  File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.10/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'git push -u origin main' returned non-zero exit status 1.

----------------------------------------------------------------------
Ran 48 tests in 22.553s

FAILED (errors=1)
==> ERROR: A failure occurred in check().
    Aborting...