summary refs log tree commit diff
path: root/gnu/packages/version-control.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/version-control.scm')
-rw-r--r--gnu/packages/version-control.scm109
1 files changed, 54 insertions, 55 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9d0786d2d9..a43382e94f 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -139,44 +139,6 @@
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1))
 
-(define-public bazaar
-  (package
-    (name "bazaar")
-    (version "2.7.0")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (string-append "https://launchpad.net/bzr/"
-                          (version-major+minor version) "/" version
-                          "/+download/bzr-" version ".tar.gz"))
-      (patches (search-patches "bazaar-CVE-2017-14176.patch"))
-      (sha256
-       (base32
-        "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d"))))
-    (build-system python-build-system)
-    (inputs
-     ;; Note: 'tools/packaging/lp-upload-release' and 'tools/weavemerge.sh'
-     ;; require Zsh.
-     `(("gettext" ,gettext-minimal)))
-    (arguments
-     `(#:tests? #f ; no test target
-       #:python ,python-2   ; Python 3 apparently not yet supported, see
-                            ; https://answers.launchpad.net/bzr/+question/229048
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-mandir
-           (lambda _
-             (substitute* "setup.py"
-                          (("man/man1") "share/man/man1"))
-             #t)))))
-    (home-page "https://gnu.org/software/bazaar")
-    (synopsis "Version control system supporting both distributed and centralized workflows")
-    (description
-     "GNU Bazaar is a version control system that allows you to record
-changes to project files over time.  It supports both a distributed workflow
-as well as the classic centralized workflow.")
-    (license license:gpl2+)))
-
 (define-public breezy
   (package
     (name "breezy")
@@ -187,33 +149,70 @@ as well as the classic centralized workflow.")
        (uri (string-append "https://launchpad.net/brz/"
                            (version-major+minor version) "/" version
                            "/+download/breezy-" version ".tar.gz"))
+       (modules '((guix build utils)))
+       ;; Delete pre-generated Cython C files.
+       (snippet '(for-each delete-file (find-files "." "\\pyx.c$")))
        (sha256
-        (base32 "1md4b6ajawf5h50fqizmjj0g833ihc674dh7fn0mvl4d412nwyhq"))))
+        (base32
+         "1md4b6ajawf5h50fqizmjj0g833ihc674dh7fn0mvl4d412nwyhq"))
+       (patches (search-patches "breezy-fix-gio.patch"))))
     (build-system python-build-system)
-    ;; TODO: Maybe regenerate C files with Cython?
-    (inputs
-     `(("gettext" ,gettext-minimal)
-       ("python-configobj" ,python-configobj)
-       ("python-dulwich" ,python-dulwich)
-       ("python-fastbencode" ,python-fastbencode)
-       ("python-fastimport" ,python-fastimport)
-       ("python-paramiko" ,python-paramiko)
-       ("python-patiencediff" ,python-patiencediff)
-       ("python-pycryptodome" ,python-pycryptodome)
-       ("python-pygpgme" ,python-pygpgme)))
     (arguments
-     `(#:tests? #f))                    ; no tests in release tarball
+     (list
+      #:tests? #f                       ;FIXME: the test suite hangs
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-test-shebangs
+            (lambda _
+              (substitute* (append (find-files "breezy/bzr/tests")
+                                   (find-files "breezy/tests"))
+                (("#!/bin/sh")
+                 (format #f "#!~a" (which "sh"))))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                ;; The test_read_bundle tests fails with "TypeError: a
+                ;; bytes-like object is required, not '_ResultTuple'" (see:
+                ;; https://bugs.launchpad.net/brz/+bug/1968415/comments/4).
+                (substitute* "breezy/bzr/tests/__init__.py"
+                  (("'test_read_bundle'," all)
+                   (string-append "# " all)))
+                (setenv "BZR_EDITOR" "nano")
+                (setenv "HOME" "/tmp")
+                (invoke "testr" "init")
+                (invoke "testr" "run")))))))
+    (native-inputs
+     (list nano                         ;for tests
+           python-cython
+           python-docutils
+           python-subunit
+           python-testrepository))
+    (inputs
+     (list gettext-minimal
+           python-configobj
+           python-dulwich
+           python-fastbencode
+           python-fastimport
+           python-launchpadlib
+           python-paramiko
+           python-patiencediff
+           python-pycryptodome
+           python-pygobject
+           python-pygpgme))
     (home-page "https://www.breezy-vcs.org/")
     (synopsis "Decentralized revision control system")
     (description
      "Breezy (@command{brz}) is a decentralized revision control system.  By
 default, Breezy provides support for both the
-@uref{https://www.bazaar-vcs.org, Bazaar} and @uref{https://www.git-scm.com,
-Git} file formats.  Breezy is backwards compatible with Bazaar's disk format
+@uref{https://bazaar.canonical.com/, Bazaar} and @uref{https://www.git-scm.com,
+Git} file formats.  Breezy is backwabrds compatible with Bazaar's disk format
 and protocols.  One of the key differences with Bazaar is that Breezy runs on
 Python 3.3 and later, rather than on Python 2.")
     (license license:gpl2+)))
 
+(define-public bazaar
+  (deprecated-package "bazaar" breezy))
+
 (define git-cross-configure-flags
   '("ac_cv_fread_reads_directories=yes"
     "ac_cv_snprintf_returns_bogus=no"
@@ -1651,7 +1650,7 @@ visualize your public Git repositories on a web interface.")
 (define-public pre-commit
   (package
     (name "pre-commit")
-    (version "2.18.1")
+    (version "2.19.0")
     (source
      (origin
        (method git-fetch)               ; no tests in PyPI release
@@ -1660,7 +1659,7 @@ visualize your public Git repositories on a web interface.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "08c1nxqyqmy5sbmfnpvc8z82cx1rv9q290w7x2mrm0nd718s9yvp"))))
+        (base32 "102z1n6wjrmk5h4p59l929bi0r91bl3vz62j4k6sz2j7k0a791g5"))))
     (build-system python-build-system)
     (arguments
      `(#:phases