1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- (define-module (guix build svn)
- #:use-module (guix build utils)
- #:use-module (srfi srfi-34)
- #:use-module (ice-9 format)
- #:export (svn-fetch))
- (define* (svn-fetch url revision directory
- #:key (svn-command "svn")
- (recursive? #t)
- (user-name #f)
- (password #f))
- "Fetch REVISION from URL into DIRECTORY. REVISION must be an integer, and a
- valid Subversion revision. Return #t on success, #f otherwise."
- (guard (c ((invoke-error? c)
- (report-invoke-error c)
- #f))
- (apply invoke svn-command
- "export" "--non-interactive"
-
-
-
- "--trust-server-cert" "-r" (number->string revision)
- `(,@(if (and user-name password)
- (list (string-append "--username=" user-name)
- (string-append "--password=" password))
- '())
- ,@(if recursive?
- '()
- (list "--ignore-externals"))
- ,url ,directory))
- #t))
|