Compare commits

..

8 Commits
rawhide ... f16

Author SHA1 Message Date
Joe Orton b6c7f3af7d more hashorder fixes 2012-04-30 15:14:15 +01:00
Joe Orton 4aa480d07c work around hash order fixes 2012-04-30 15:13:04 +01:00
Joe Orton 6290022554 relax test suite conditions. 2012-04-30 10:37:37 +01:00
Joe Orton b216094629 note #810861 fix/workaround 2012-04-30 09:52:01 +01:00
Joe Orton 1230952c6a - possible fix/workaround for 810861 2012-04-30 09:51:29 +01:00
Joe Orton c9c954ec29 ignore more 2012-04-30 09:50:13 +01:00
Joe Orton 04cca1e12e update to 1.6.18 2012-04-30 09:49:39 +01:00
Joe Orton 6f3e81155c revert to 1.6.x for f16, 84ce3d5836 2012-04-30 09:43:05 +01:00
28 changed files with 2224 additions and 1238 deletions

29
.gitignore vendored
View File

@ -1,3 +1,26 @@
/subversion-*.tar.bz2
/subversion-1\.[0-9]*\.[0-9]*/
/results_subversion/
subversion-1.6.12.tar.bz2
*.rpm
/subversion-1.6.13.tar.bz2.asc
/subversion-1.6.13.tar.bz2
/subversion-1.6.15.tar.bz2
/subversion-1.6.16.tar.bz2
/subversion-1.6.17.tar.bz2
/subversion-1.6.18.tar.bz2
subversion-1.6.12.tar.bz2
*.rpm
/subversion-1.6.13.tar.bz2.asc
/subversion-1.6.13.tar.bz2
/subversion-1.6.15.tar.bz2
/subversion-1.6.16.tar.bz2
/subversion-1.6.17.tar.bz2
/subversion-1.7.0.tar.bz2
/subversion-1.7.0
/clog
/subversion-1.7.1.tar.bz2
/subversion-1.7.2.tar.bz2
/subversion-1.7.3.tar.bz2
/subversion
/subversion-1.?.?
/*.asc
/subversion-1.?.??
/subversion-1.7.4.tar.bz2

View File

@ -1,27 +0,0 @@
#!/bin/sh
version=$1
echo "This update includes the latest stable release of _Apache Subversion_, version **${1}**".
echo
curl --silent -n "http://svn.apache.org/repos/asf/subversion/tags/$1/CHANGES" | \
sed -n "
/^#/d;
/^Version ${1/-rc*/}/,/^Version /{
/, from \/branches/d;
/repos\/asf\/subversion\/tags/d;
s,#\([0-9]*\),[SVN-\1](https://issues.apache.org/jira/browse/SVN-\1),;
s/(r[0-9, retal]+)\*//g;
s/^ *//;
s/ +/ /g;
s/^ *- \(.*\)$/#### \1/;
s/\(.*visible changes.*:\)$/### \1/;
/^ *$/d;
/Windows/d
/^Version /d
s,(r1.*),,g
s,\(@[0-9]*\),\\\1,g
p;
}
" -

303
psvn.el
View File

@ -1,9 +1,8 @@
;;; psvn.el --- Subversion interface for emacs
;; Copyright (C) 2002-2015 by Stefan Reichoer
;; Copyright (C) 2002-2009 by Stefan Reichoer
;; Author: Stefan Reichoer <stefan@xsteve.at>
;; Note: This version is currently not under svn control
;; For the revision date see svn-psvn-revision below
;; $Id: psvn.el 40299 2009-10-29 19:38:54Z xsteve $
;; psvn.el is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@ -23,7 +22,7 @@
;;; Commentary
;; psvn.el is tested with GNU Emacs 21.3 on windows, debian linux,
;; freebsd5, red hat el4, ubuntu 11.10 with svn 1.6.12
;; freebsd5, red hat el4, ubuntu intrepid with svn 1.5.1
;; psvn.el needs at least svn 1.1.0
;; if you upgrade to a higher version, you need to do a fresh checkout
@ -138,6 +137,8 @@
;; The latest version of psvn.el can be found at:
;; http://www.xsteve.at/prg/emacs/psvn.el
;; Or you can check it out from the subversion repository:
;; svn co http://svn.collab.net/repos/svn/trunk/contrib/client-side/emacs emacs-svn
;; TODO:
;; * shortcut for svn propset svn:keywords "Date" psvn.el
@ -241,9 +242,6 @@
;;; Code:
(defconst svn-psvn-revision "2015-07-20, 21:42:00" "The revision date of psvn.")
(require 'easymenu)
(eval-when-compile (require 'dired))
@ -258,6 +256,8 @@
(require 'diff-mode))
(error nil))
(defconst svn-psvn-revision "$Id: psvn.el 40299 2009-10-29 19:38:54Z xsteve $"
"The revision number of psvn.")
;;; user setable variables
(defcustom svn-status-verbose t
@ -360,11 +360,6 @@ Possible values are: commit, revert."
:type 'boolean
:group 'psvn)
(defcustom svn-status-indentation 2
"*Indenation per directory level in the `svn-status-buffer-name' buffer."
:type 'integer
:group 'psvn)
(defcustom svn-status-negate-meaning-of-arg-commands '()
"*List of operations that should use a negated meaning of the prefix argument.
The supported functions are `svn-status' and `svn-status-set-user-mark'."
@ -671,7 +666,7 @@ See psvn.el for an example function.")
(defvar svn-process-cmd nil)
(defvar svn-status-info nil)
(defvar svn-status-filename-to-buffer-position-cache (make-hash-table :test 'equal :weakness t))
(defvar svn-status-base-info nil "The parsed result from the svn info command as a plist.")
(defvar svn-status-base-info nil "The parsed result from the svn info command.")
(defvar svn-status-initial-window-configuration nil)
(defvar svn-status-default-column 23)
(defvar svn-status-default-revision-width 4)
@ -701,16 +696,14 @@ This is nil if the log entry is for a new commit.")
(defvar svn-status-update-previous-process-output nil)
(defvar svn-pre-run-asynch-recent-keys nil)
(defvar svn-pre-run-mode-line-process nil)
(defvar svn-arg-file-content nil)
(defvar svn-status-temp-dir
(file-name-as-directory
(expand-file-name
(or
(when (boundp 'temporary-file-directory) temporary-file-directory) ;emacs
;; XEmacs 21.4.17 can return "/tmp/kalle" from (temp-directory).
;; `file-name-as-directory' adds a slash so we can append a file name.
(when (fboundp 'temp-directory) (temp-directory))
"/tmp/"))) "The directory that is used to store temporary files for psvn.")
(expand-file-name
(or
(when (boundp 'temporary-file-directory) temporary-file-directory) ;emacs
;; XEmacs 21.4.17 can return "/tmp/kalle" from (temp-directory).
;; `file-name-as-directory' adds a slash so we can append a file name.
(when (fboundp 'temp-directory) (file-name-as-directory (temp-directory)))
"/tmp/")) "The directory that is used to store temporary files for psvn.")
;; Because `temporary-file-directory' is not a risky local variable in
;; GNU Emacs 22.0.51, we don't mark `svn-status-temp-dir' as such either.
(defvar svn-temp-suffix (make-temp-name "."))
@ -1119,18 +1112,12 @@ inside loops."
(defun svn-checkout (repos-url path)
"Run svn checkout REPOS-URL PATH."
(interactive (list (read-string "Checkout from repository Url: ")
(expand-file-name
(svn-read-directory-name "Checkout to directory: "))))
(svn-read-directory-name "Checkout to directory: ")))
(svn-run t t 'checkout "checkout" repos-url (expand-file-name path)))
;;;###autoload (defalias 'svn-examine 'svn-status)
(defalias 'svn-examine 'svn-status)
;;;###autoload
(defun svn-version-controlled-dir-p (dir)
"Return t if DIR is part of a Subversion workarea."
(= 0 (call-process svn-status-svn-executable nil nil nil "info" dir)))
;;;###autoload
(defun svn-status (dir &optional arg)
"Examine the status of Subversion working copy in directory DIR.
@ -1140,17 +1127,20 @@ For every other non nil ARG pass the -u argument to `svn status', which
asks svn to connect to the repository and check to see if there are updates
there.
If DIR is not an SVN working copy, examine if there is CVS and run
If there is no .svn directory, examine if there is CVS and run
`cvs-examine'. Otherwise ask if to run `dired'."
(interactive (list (expand-file-name
(svn-read-directory-name "SVN status directory: "
nil default-directory nil))
(interactive (list (svn-read-directory-name "SVN status directory: "
nil default-directory nil)
current-prefix-arg))
(let ((svn-dir (format "%s%s"
(file-name-as-directory dir)
(svn-wc-adm-dir-name)))
(cvs-dir (format "%sCVS" (file-name-as-directory dir))))
(cond
((svn-version-controlled-dir-p (expand-file-name dir))
((file-directory-p svn-dir)
(setq arg (svn-status-possibly-negate-meaning-of-arg arg 'svn-status))
(svn-status-1 dir arg))
((and (file-directory-p (concat (file-name-as-directory dir) "CVS"))
((and (file-directory-p cvs-dir)
(fboundp 'cvs-examine))
(cvs-examine dir nil))
(t
@ -1163,7 +1153,7 @@ If DIR is not an SVN working copy, examine if there is CVS and run
"Run dired instead? ")
dir
(svn-wc-adm-dir-name)))
(dired dir)))))
(dired dir))))))
(defvar svn-status-display-new-status-buffer nil)
(defun svn-status-1 (dir &optional arg)
@ -1199,6 +1189,7 @@ If DIR is not an SVN working copy, examine if there is CVS and run
(set-buffer proc-buf)
(setq default-directory dir
svn-status-remote (when arg t))
(set-buffer cur-buf)
(if want-edit
(let ((svn-status-edit-svn-command t))
(svn-run t t 'status "status" svn-status-default-status-arguments status-option))
@ -1298,15 +1289,16 @@ The hook svn-pre-run-hook allows to monitor/modify the ARGLIST."
(setq svn-pre-run-mode-line-process mode-line-process)
(setq mode-line-process 'svn-status-mode-line-process))
(setq svn-status-pre-run-svn-buffer (current-buffer))
(let* ((pre-run-buffer-default-directory default-directory)
(proc-buf (get-buffer-create svn-process-buffer-name))
(let* ((proc-buf (get-buffer-create svn-process-buffer-name))
(svn-exe svn-status-svn-executable)
(svn-proc))
(when (listp (car arglist))
(setq arglist (car arglist)))
(save-excursion
(set-buffer proc-buf)
(setq default-directory pre-run-buffer-default-directory)
(unless (file-executable-p default-directory)
(message "psvn: workaround in %s needed: %s no longer exists" (current-buffer) default-directory)
(cd (expand-file-name "~")))
(setq buffer-read-only nil)
(buffer-disable-undo)
(fundamental-mode)
@ -1318,9 +1310,7 @@ The hook svn-pre-run-hook allows to monitor/modify the ARGLIST."
(setq svn-status-mode-line-process-status (format " running %s" cmdtype))
(svn-status-update-mode-line)
(save-excursion (sit-for 0.1))
(ring-insert svn-last-cmd-ring (list (current-time-string) arglist default-directory svn-arg-file-content))
(setq svn-arg-file-content nil)
(setq svn-process-handle-error-msg nil)
(ring-insert svn-last-cmd-ring (list (current-time-string) arglist default-directory))
(if run-asynchron
(progn
;;(message "running asynchron: %s %S" svn-exe arglist)
@ -1518,11 +1508,11 @@ The hook svn-pre-run-hook allows to monitor/modify the ARGLIST."
When this function resets `svn-process-handle-error-msg' to nil, the default error handling
(just show the error message) is not executed.")
(defun svn-process-handle-error (error-msg)
(setq svn-process-handle-error-msg error-msg)
(when (functionp svn-handle-error-function)
(funcall svn-handle-error-function error-msg))
(when svn-process-handle-error-msg
(electric-helpify 'svn-process-help-with-error-msg)))
(let ((svn-process-handle-error-msg error-msg))
(when (functionp svn-handle-error-function)
(funcall svn-handle-error-function error-msg))
(when svn-process-handle-error-msg
(electric-helpify 'svn-process-help-with-error-msg))))
(defun svn-process-help-with-error-msg ()
(interactive)
@ -2894,8 +2884,8 @@ Symbolic links to directories count as directories (see `file-directory-p')."
dir-name))
'svn-status-directory-face)
;; showing all files, so add indentation
(make-string (* svn-status-indentation (svn-status-count-/
(svn-status-line-info->filename line-info)))
(make-string (* 2 (svn-status-count-/
(svn-status-line-info->filename line-info)))
32))
;;symlinks get a different face
(let ((target (svn-status-line-info->symlink-p line-info)))
@ -3092,27 +3082,32 @@ non-interactive use."
(defun svn-status-parse-info-result ()
"Parse the result from the svn info command.
Put the found values in `svn-status-base-info'."
(save-excursion
(setq svn-status-base-info ())
(set-buffer svn-process-buffer-name)
(goto-char (point-min))
(let ((case-fold-search t)
(key)
(val))
(loop while (looking-at "\\(.*?\\)\\s-*:\\s-*\\(.*\\)$")
do (setq key (intern (concat ":" (downcase (subst-char-in-string ?\ ?- (match-string 1))))))
(setq val (match-string 2))
(setq svn-status-base-info (plist-put svn-status-base-info
key val))
until (< 0 (forward-line))))))
(let ((url)
(repository-root)
(last-changed-author))
(save-excursion
(set-buffer svn-process-buffer-name)
(goto-char (point-min))
(let ((case-fold-search t))
(search-forward "url: ")
(setq url (buffer-substring-no-properties (point) (svn-point-at-eol)))
(when (search-forward "repository root: " nil t)
(setq repository-root (buffer-substring-no-properties (point) (svn-point-at-eol))))
(when (search-forward "last changed author: " nil t)
(setq last-changed-author (buffer-substring-no-properties (point) (svn-point-at-eol))))))
(setq svn-status-base-info `((url ,url) (repository-root ,repository-root) (last-changed-author ,last-changed-author)))))
(defun svn-status-base-info->url ()
"Extract the url part from `svn-status-base-info'."
(plist-get svn-status-base-info :url))
(if svn-status-base-info
(cadr (assoc 'url svn-status-base-info))
""))
(defun svn-status-base-info->repository-root ()
"Extract the repository-root part from `svn-status-base-info'."
(plist-get svn-status-base-info :repository-root))
(if svn-status-base-info
(cadr (assoc 'repository-root svn-status-base-info))
""))
(defun svn-status-checkout-prefix-path ()
"When only a part of the svn repository is checked out, return the file path for this checkout."
@ -3648,18 +3643,20 @@ if no files have been marked."
svn-status-ui-information))
(defun svn-status-create-arg-file (file-info-list)
(defun svn-status-create-arg-file (file-name prefix file-info-list postfix)
"Create an svn client argument file"
;; create the arg file on the remote host when we will run svn on this host!
(let ((file-name (svn-expand-filename-for-remote-access svn-status-temp-arg-file)))
;; (message "svn-status-create-arg-file %s: %s" default-directory file-name)
(with-temp-file file-name
(let ((st-info file-info-list))
(while st-info
(insert (svn-status-line-info->filename (car st-info)))
(insert "\n")
(setq st-info (cdr st-info)))
(setq svn-arg-file-content (buffer-substring-no-properties (point-min) (point-max)))))))
(setq file-name (svn-expand-filename-for-remote-access file-name))
;; (message "svn-status-create-arg-file %s: %s" default-directory file-name)
(with-temp-file file-name
(insert prefix)
(let ((st-info file-info-list))
(while st-info
(insert (svn-status-line-info->filename (car st-info)))
(insert "\n")
(setq st-info (cdr st-info)))
(insert postfix))))
(defun svn-status-show-process-buffer-internal (&optional scroll-to-top)
(let ((cur-buff (current-buffer)))
@ -3725,7 +3722,7 @@ See `svn-status-marked-files' for what counts as selected."
(let ((switches (svn-status-svn-log-switches arg))
(svn-status-get-line-information-for-file t))
;; (message "svn-status-show-svn-log %S" arg)
(svn-status-create-arg-file (svn-status-marked-files))
(svn-status-create-arg-file svn-status-temp-arg-file "" (svn-status-marked-files) "")
(svn-run t t 'log "log" "--targets" svn-status-temp-arg-file switches)))
(defun svn-status-version ()
@ -3742,7 +3739,7 @@ The version number of the client is cached in `svn-client-version'."
(with-current-buffer svn-status-last-output-buffer-name
(goto-char (point-min))
(setq svn-client-version
(when (re-search-forward "svn, version \\([0-9\.]+\\)" nil t)
(when (re-search-forward "svn, version \\([0-9\.]+\\) " nil t)
(mapcar 'string-to-number (split-string (match-string 1) "\\."))))
(let ((buffer-read-only nil))
(goto-char (point-min))
@ -3754,16 +3751,11 @@ The version number of the client is cached in `svn-client-version'."
(set-window-configuration window-conf)
version-string))))
(defun svn-compute-svn-client-version ()
"Ensure that svn-client-version is available."
(unless svn-client-version
(svn-status-version)))
(defun svn-status-info ()
"Run `svn info' on all selected files.
See `svn-status-marked-files' for what counts as selected."
(interactive)
(svn-status-create-arg-file (svn-status-marked-files))
(svn-status-create-arg-file svn-status-temp-arg-file "" (svn-status-marked-files) "")
(svn-run t t 'info "info" "--targets" svn-status-temp-arg-file))
(defun svn-status-info-for-path (path)
@ -3970,7 +3962,7 @@ See `svn-status-marked-files' for what counts as selected.
When this function is called with a prefix argument, use the actual file instead."
(interactive "P")
(message "adding: %S" (svn-status-get-file-list-names (not arg)))
(svn-status-create-arg-file (svn-status-get-file-list (not arg)))
(svn-status-create-arg-file svn-status-temp-arg-file "" (svn-status-get-file-list (not arg)) "")
(svn-run t t 'add "add" "--targets" svn-status-temp-arg-file))
(defun svn-status-add-file (arg)
@ -3981,7 +3973,7 @@ See `svn-status-marked-files' for what counts as selected.
When this function is called with a prefix argument, use the actual file instead."
(interactive "P")
(message "adding: %S" (svn-status-get-file-list-names (not arg)))
(svn-status-create-arg-file (svn-status-get-file-list (not arg)))
(svn-status-create-arg-file svn-status-temp-arg-file "" (svn-status-get-file-list (not arg)) "")
(svn-run t t 'add "add" "--non-recursive" "--targets" svn-status-temp-arg-file))
(defun svn-status-lock (arg)
@ -3989,7 +3981,7 @@ When this function is called with a prefix argument, use the actual file instead
See `svn-status-marked-files' for what counts as selected."
(interactive "P")
(message "locking: %S" (svn-status-get-file-list-names t))
(svn-status-create-arg-file (svn-status-get-file-list t))
(svn-status-create-arg-file svn-status-temp-arg-file "" (svn-status-get-file-list t) "")
(svn-run t t 'lock "lock" "--targets" svn-status-temp-arg-file))
(defun svn-status-unlock (arg)
@ -3997,7 +3989,7 @@ See `svn-status-marked-files' for what counts as selected."
See `svn-status-marked-files' for what counts as selected."
(interactive "P")
(message "unlocking: %S" (svn-status-get-file-list-names t))
(svn-status-create-arg-file (svn-status-get-file-list t))
(svn-status-create-arg-file svn-status-temp-arg-file "" (svn-status-get-file-list t) "")
(svn-run t t 'unlock "unlock" "--targets" svn-status-temp-arg-file))
(defun svn-status-make-directory (dir)
@ -4055,10 +4047,9 @@ user can enter a new file name, or an existing directory: this is used as the ar
(svn-status-line-info->full-path (car marked-files))))
;;TODO: (when file-exists-p but-no-dir-p dest (error "%s already exists" dest))
;;multiple files selected, so prompt for existing directory to mv them into.
(setq dest (expand-file-name
(svn-read-directory-name
(format "%s %d files to directory: " manyprompt num-of-files)
(svn-status-directory-containing-point t) nil t)))
(setq dest (svn-read-directory-name
(format "%s %d files to directory: " manyprompt num-of-files)
(svn-status-directory-containing-point t) nil t))
(unless (file-directory-p dest)
(error "%s is not a directory" dest)))
(when (string= dest "")
@ -4164,7 +4155,7 @@ See `svn-status-marked-files' for what counts as selected."
(format "Revert %s? " (svn-status-line-info->filename (car marked-files)))
(format "Revert %d files? " num-of-files)))
(message "reverting: %S" (svn-status-marked-file-names))
(svn-status-create-arg-file (svn-status-marked-files))
(svn-status-create-arg-file svn-status-temp-arg-file "" (svn-status-marked-files) "")
(svn-run t t 'revert "revert" "--targets" svn-status-temp-arg-file))))
(defun svn-file-revert ()
@ -4187,7 +4178,7 @@ Forcing the deletion can also be used to delete files not under svn control."
(format "%sRemove %s? " (if force "Force " "") (svn-status-line-info->filename (car marked-files)))
(format "%sRemove %d files? " (if force "Force " "") num-of-files)))
(message "removing: %S" (svn-status-marked-file-names))
(svn-status-create-arg-file (svn-status-marked-files))
(svn-status-create-arg-file svn-status-temp-arg-file "" (svn-status-marked-files) "")
(if force
(save-excursion
(svn-run t t 'rm "rm" "--force" "--targets" svn-status-temp-arg-file)
@ -4211,7 +4202,8 @@ When called with a negative prefix argument, only update the selected files."
(format "Selected entries: Run svn update -r ")
(format "Directory: %s: Run svn update -r " default-directory))
(if selective-update "HEAD" nil)))))
(svn-compute-svn-client-version)
(unless svn-client-version
(svn-status-version))
(if (and (<= (car svn-client-version) 1) (< (cadr svn-client-version) 5))
(setq update-extra-arg (list "--non-interactive")) ;; svn version < 1.5
(setq update-extra-arg (list "--accept" "postpone"))) ;; svn version >= 1.5
@ -4321,7 +4313,7 @@ See `svn-status-marked-files' for what counts as selected."
(format "Resolve %s? " (svn-status-line-info->filename (car marked-files)))
(format "Resolve %d files? " num-of-files)))
(message "resolving: %S" (svn-status-marked-file-names))
(svn-status-create-arg-file (svn-status-marked-files))
(svn-status-create-arg-file svn-status-temp-arg-file "" (svn-status-marked-files) "")
(svn-run t t 'resolved "resolved" "--targets" svn-status-temp-arg-file))))
@ -4574,12 +4566,9 @@ names are relative to the directory where `svn-status' was run."
(progn
(message "Getting revision %s of %s, target: %s" revision file-name
(expand-file-name(concat default-directory file-name-with-revision)))
(svn-compute-svn-client-version)
(let ((content
(with-temp-buffer
(if (and (and (<= (car svn-client-version) 1) (< (cadr svn-client-version) 7))
(string= revision "BASE"))
;; Shortcut: Take the file from the file system when using svn client < v1.7
(if (string= revision "BASE")
(insert-file-contents (concat (svn-wc-adm-dir-name)
"/text-base/"
(file-name-nondirectory file-name)
@ -5077,7 +5066,8 @@ Commands:
(setq svn-status-temp-file-to-remove (svn-expand-filename-for-remote-access svn-propedit-file-name))
(write-region (point-min) (point-max) svn-status-temp-file-to-remove nil 1)
(when svn-status-propedit-file-list ; there are files to change properties
(svn-status-create-arg-file svn-status-propedit-file-list)
(svn-status-create-arg-file svn-status-temp-arg-file ""
svn-status-propedit-file-list "")
(setq svn-status-propedit-file-list nil)
(svn-run async t 'propset "propset"
svn-status-propedit-property-name
@ -5204,7 +5194,7 @@ Commands:
(setq svn-status-operated-on-dot
(and (= 1 (length svn-status-files-to-commit))
(string= "." (svn-status-line-info->filename (car svn-status-files-to-commit)))))
(svn-status-create-arg-file svn-status-files-to-commit)
(svn-status-create-arg-file svn-status-temp-arg-file "" svn-status-files-to-commit "")
(svn-run t t 'commit "commit"
(unless svn-status-recursive-commit "--non-recursive")
"--targets" svn-status-temp-arg-file
@ -5812,6 +5802,9 @@ Currently is the output from the svn update command known."
"Toggle svn blame minor mode.
With ARG, turn svn blame minor mode on if ARG is positive, off otherwise.
Note: This mode does not yet work on XEmacs...
It is probably because the revisions are in 'before-string properties of overlays
Key bindings:
\\{svn-blame-mode-map}"
(interactive "P")
@ -5841,12 +5834,12 @@ The current buffer must contain a valid output from svn blame"
;; (when (overlay-get ov 'svn-blame-line-info)
;; (delete-overlay ov)))
(while (and (not (eobp)) (< (point) limit))
(setq s (buffer-substring-no-properties (svn-point-at-bol) (+ (svn-point-at-bol) info-end-col)))
(delete-region (svn-point-at-bol) (+ (svn-point-at-bol) info-end-col))
(setq ov (make-overlay (point) (point)))
(overlay-put ov 'svn-blame-line-info t)
(setq s (buffer-substring-no-properties (svn-point-at-bol) (+ (svn-point-at-bol) info-end-col)))
(overlay-put ov 'before-string (propertize s 'face 'svn-status-blame-rev-number-face))
(overlay-put ov 'rev-info (delete "" (split-string s " ")))
(delete-region (svn-point-at-bol) (+ (svn-point-at-bol) info-end-col))
(forward-line)
(setq line (1+ line)))))
(let* ((buf-name (format "*svn-blame: %s <%s>*"
@ -6016,12 +6009,18 @@ You can send raw data to the process via \\[svn-process-send-string]."
(with-current-buffer (get-buffer-create svn-process-buffer-name)
(setq old-process-default-dir default-directory)
(setq default-directory directory)) ;; update the default-directory for the *svn-process* buffer
(svn-status-parse-info t)
(or (plist-get svn-status-base-info :repository-root)
(if (plist-get svn-status-base-info :repository-uuid)
(concat "Svn Repo UUID: " (plist-get svn-status-base-info :repository-uuid))
(svn-run nil t 'parse-info "info" ".")
(with-current-buffer svn-process-buffer-name
;; (message "svn-status-repo-for-path: %s: default-directory: %s directory: %s old-process-default-dir: %s" svn-process-buffer-name default-directory directory old-process-default-dir)
(setq default-directory old-process-default-dir)
(goto-char (point-min))
(let ((case-fold-search t))
(if (search-forward "repository root: " nil t)
(buffer-substring-no-properties (point) (svn-point-at-eol))
(when (search-forward "repository uuid: " nil t)
(message "psvn.el: Detected an old svn working copy in '%s'. Please check it out again to get a 'Repository Root' entry in the svn info output."
default-directory)))))
default-directory)
(concat "Svn Repo UUID: " (buffer-substring-no-properties (point) (svn-point-at-eol)))))))))
(defun svn-status-base-dir (&optional start-directory)
"Find the svn root directory for the current working copy.
@ -6032,61 +6031,31 @@ Return nil, if not in a svn working copy."
(if (not (eq base-dir 'not-found))
base-dir
;; (message "calculating base-dir for %s" start-dir)
(svn-compute-svn-client-version)
;; (message "repository-root: %s start-dir: %s" repository-root start-dir)
(cond
((and (<= (car svn-client-version) 1) (< (cadr svn-client-version) 3))
(setq base-dir (svn-status-base-dir-for-ancient-svn-client start-dir))) ;; svn version < 1.3
((and (<= (car svn-client-version) 1) (< (cadr svn-client-version) 7))
(setq base-dir (svn-status-base-dir-for-old-svn-client start-dir))) ;; svn version < 1.7
(t
(setq base-dir (svn-status-base-dir-1 start-dir))))
(when base-dir
(svn-puthash start-dir base-dir svn-status-base-dir-cache))
(svn-status-message 7 "svn-status-base-dir %s => %s" start-dir base-dir)
base-dir)))
(defun svn-status-base-dir-1 (&optional start-directory)
"Find the svn root directory for the current working copy.
Return nil, if not in a svn working copy.
This function is used for svn clients version 1.7 and up."
(let ((default-directory (if start-directory
(expand-file-name start-directory)
(symbol-value 'default-directory)))
parent
wc-root)
(when (svn-version-controlled-dir-p default-directory)
(svn-status-parse-info t)
(setq wc-root (file-name-as-directory (plist-get svn-status-base-info :working-copy-root-path)))
(when wc-root
;; traversing up the hierarchy shortens the path name. Stop if
;; it doesn't, e.g we reached / already.
(setq parent (expand-file-name (concat wc-root "..")))
(or (and (< (length parent) (length wc-root))
(svn-status-base-dir-1 (expand-file-name (concat wc-root ".."))))
wc-root)))))
(defun svn-status-base-dir-for-old-svn-client (&optional start-directory)
"Find the svn root directory for the current working copy.
Return nil, if not in a svn working copy.
This function is used for svn clients version 1.6 and below."
(let* ((base-dir (expand-file-name (or start-directory default-directory)))
(repository-root (svn-status-repo-for-path base-dir))
(dot-svn-dir (concat base-dir (svn-wc-adm-dir-name)))
(in-tree (and repository-root (file-exists-p dot-svn-dir)))
(dir-below (expand-file-name base-dir)))
(while (when (and dir-below (file-exists-p dot-svn-dir))
(setq base-dir (file-name-directory dot-svn-dir))
(string-match "\\(.+/\\).+/" dir-below)
(setq dir-below
(and (string-match "\\(.*/\\)[^/]+/" dir-below)
(match-string 1 dir-below)))
;; (message "base-dir: %s, dir-below: %s, dot-svn-dir: %s in-tree: %s" base-dir dir-below dot-svn-dir in-tree)
(when dir-below
(if (string= (svn-status-repo-for-path dir-below) repository-root)
(setq dot-svn-dir (concat dir-below (svn-wc-adm-dir-name)))
(setq dir-below nil)))))
(and in-tree base-dir)))
(unless svn-client-version
(svn-status-version))
(let* ((base-dir start-dir)
(repository-root (svn-status-repo-for-path base-dir))
(dot-svn-dir (concat base-dir (svn-wc-adm-dir-name)))
(in-tree (and repository-root (file-exists-p dot-svn-dir)))
(dir-below (expand-file-name base-dir)))
;; (message "repository-root: %s start-dir: %s" repository-root start-dir)
(if (and (<= (car svn-client-version) 1) (< (cadr svn-client-version) 3))
(setq base-dir (svn-status-base-dir-for-ancient-svn-client start-dir)) ;; svn version < 1.3
(while (when (and dir-below (file-exists-p dot-svn-dir))
(setq base-dir (file-name-directory dot-svn-dir))
(string-match "\\(.+/\\).+/" dir-below)
(setq dir-below
(and (string-match "\\(.*/\\)[^/]+/" dir-below)
(match-string 1 dir-below)))
;; (message "base-dir: %s, dir-below: %s, dot-svn-dir: %s in-tree: %s" base-dir dir-below dot-svn-dir in-tree)
(when dir-below
(if (string= (svn-status-repo-for-path dir-below) repository-root)
(setq dot-svn-dir (concat dir-below (svn-wc-adm-dir-name)))
(setq dir-below nil)))))
(setq base-dir (and in-tree base-dir)))
(svn-puthash start-dir base-dir svn-status-base-dir-cache)
(svn-status-message 7 "svn-status-base-dir %s => %s" start-dir base-dir)
base-dir))))
(defun svn-status-base-dir-for-ancient-svn-client (&optional start-directory)
"Find the svn root directory for the current working copy.
@ -6478,11 +6447,7 @@ working directory."
(setq string-prefix ""))
(with-output-to-string
(dolist (e (ring-elements svn-last-cmd-ring))
(princ (format "%s%s: svn %s <%s>\n" string-prefix (nth 0 e) (mapconcat 'concat (nth 1 e) " ") (nth 2 e)))
(when (nth 3 e)
(princ (format "%s<arg-file-content>\n" string-prefix))
(princ (nth 3 e))
(princ (format "%s</arg-file-content>\n" string-prefix))))))
(princ (format "%s%s: svn %s <%s>\n" string-prefix (nth 0 e) (mapconcat 'concat (nth 1 e) " ") (nth 2 e))))))
;; --------------------------------------------------------------------------------
;; reporting bugs
@ -6509,9 +6474,6 @@ working directory."
(dolist (elem (svn-process-environment))
(when (member (car (split-string elem "=")) '("LC_MESSAGES" "LC_ALL" "LANG"))
(insert (format " %s\n" elem))))
(when svn-process-handle-error-msg
(insert "\nsvn client error message:\n")
(svn-insert-indented-lines svn-process-handle-error-msg))
(insert "\nLast svn commands:\n")
(svn-insert-indented-lines (svn-status-last-commands))
(insert (format "\nContent of the <%s> buffer:\n" last-output-buffer-name))
@ -6557,6 +6519,5 @@ A variable will keep its value, if it is specified in `svn-prepare-for-reload-do
;; Local Variables:
;; indent-tabs-mode: nil
;; time-stamp-pattern: "300/(defconst svn-psvn-revision \"%:y-%02m-%02d, %02H:%02M:%02S\" \"The revision date of psvn.\")$"
;; End:
;;; psvn.el ends here

View File

@ -1,53 +0,0 @@
#!/bin/sh -e
if [ $# -lt 1 ]; then
echo "What?"
exit 1
fi
repo="https://svn.apache.org/repos/asf/subversion/trunk"
#repo="https://svn.apache.org/repos/asf/subversion/branches/1.11.x"
prefix=`rpmspec -q --queryformat='%{name}-%{version}\n' ./subversion.spec | sed 1q`
suffix="r$1${2:++}"
fn="${prefix}-${suffix}.patch"
vcurl="http://svn.apache.org/viewvc?view=revision&revision="
if test -f ${fn}; then
mv -v -f ${fn} ${fn}\~
echo "# $0 $*" > ${fn}
sed '1{/#.*pullrev/d;};/^--- /,$d' < ${fn}\~ >> ${fn}
else
echo "# $0 $*" > ${fn}
fi
new=0
for r in $*; do
if ! grep -q "${vcurl}${r}" ${fn}; then
echo "${vcurl}${r}"
new=1
fi
done >> ${fn}
[ $new -eq 0 ] || echo >> ${fn}
prev=/dev/null
for r in $*; do
echo "+ fetching ${r}"
this=`mktemp /tmp/pullrevXXXXXX`
svn diff -c ${r} ${repo} | filterdiff --remove-timestamps --clean -x 'CHANGES' -x 'next-number' -x 'STATUS' \
--addprefix="${prefix}/" > ${this}
next=`mktemp /tmp/pullrevXXXXXX`
combinediff --quiet ${prev} ${this} > ${next}
rm -f "${this}"
[ "${prev}" = "/dev/null" ] || rm -f "${prev}"
prev=${next}
done
cat ${prev} >> ${fn}
vi "${fn}"
echo "+ git add ${fn}"
git add "${fn}"
echo "+ spec template:"
echo "PatchN: ${fn}"
echo "%patchN -p1 -b .${suffix}"

View File

@ -1 +1 @@
SHA512 (subversion-1.14.2.tar.bz2) = 20ada4688ca07d9fb8da4b7d53b5084568652a3b9418c65e688886bae950a16a3ff37710fcfc9c29ef14a89e75b2ceec4e9cf35d5876a7896ebc2b512cfb9ecc
c5c662a5d19d047256fa333bd890a925 subversion-1.6.18.tar.bz2

View File

@ -1,84 +0,0 @@
Fix the way libtool is used to match standard practice:
a) link ONLY libraries using -rpath $(libdir), not executables
.. this avoids adding an RPATH for $libdir to executables
b) link non-installable test binaries using -no-install
.. only for convenience but should speed up builds slightly(?)
--- subversion-1.12.0/build.conf.linking
+++ subversion-1.12.0/build.conf
@@ -572,7 +572,7 @@
path = subversion/bindings/swig/python/libsvn_swig_py
libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr
apriconv apr python swig
-link-cmd = $(LINK)
+link-cmd = $(LINK_LIB)
install = swig-py-lib
# need special build rule to include -DSWIGPYTHON
compile-cmd = $(COMPILE_SWIG_PY)
@@ -598,7 +598,7 @@
lang = ruby
path = subversion/bindings/swig/ruby/libsvn_swig_ruby
libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr ruby swig
-link-cmd = $(LINK) $(SWIG_RB_LIBS)
+link-cmd = $(LINK_LIB) $(SWIG_RB_LIBS)
install = swig-rb-lib
# need special build rule to include
compile-cmd = $(COMPILE_SWIG_RB)
@@ -769,6 +769,7 @@
libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr aprutil apriconv apr
msvc-static = yes
undefined-lib-symbols = yes
+link-cmd = $(LINK_TEST_LIB)
# ----------------------------------------------------------------------------
# Tests for libsvn_fs_base
--- subversion-1.12.0/build/generator/gen_base.py.linking
+++ subversion-1.12.0/build/generator/gen_base.py
@@ -599,7 +599,7 @@
self.install = options.get('install')
self.compile_cmd = options.get('compile-cmd')
self.sources = options.get('sources', '*.c *.cpp')
- self.link_cmd = options.get('link-cmd', '$(LINK)')
+ self.link_cmd = options.get('link-cmd', '$(LINK_LIB)')
self.external_lib = options.get('external-lib')
self.external_project = options.get('external-project')
@@ -659,6 +659,14 @@
self.msvc_force_static = options.get('msvc-force-static') == 'yes'
+ if self.install in ['test', 'bdb-test', 'sub-test', ]:
+ self.link_cmd = '$(LINK_TEST)'
+ elif self.install in ['bin', 'tools']:
+ self.link_cmd = '$(LINK_EXE)'
+ elif self.link_cmd == '$(LINK_LIB)':
+ raise GenError('ERROR: Unknown executable link type for ' + self.name + \
+ ': ' + self.link_cmd + ' (' + self.install + ')')
+
def add_dependencies(self):
TargetLinked.add_dependencies(self)
--- subversion-1.12.0/Makefile.in.linking
+++ subversion-1.12.0/Makefile.in
@@ -268,11 +268,14 @@
COMPILE_SVNXX = $(LT_COMPILE_CXX) $(SVNXX_INCLUDES) -o $@ -c
COMPILE_SVNXX_TEST = $(LT_COMPILE_CXX) $(SVNXX_INCLUDES) $(BOOST_TEST_CPPFLAGS) -o $@ -c
-LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
-LINK_LIB = $(LINK) $(LT_SO_VERSION)
-LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
-LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION)
-LINK_SVNXX_TEST = $(LINK_CXX) $(BOOST_TEST_LDFLAGS)
+LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
+LINK_LIB = $(LINK) $(LT_SO_VERSION) -rpath $(libdir)
+LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS)
+LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION) -rpath $(libdir)
+LINK_SVNXX_TEST = $(LINK_CXX) $(BOOST_TEST_LDFLAGS) -no-install
+LINK_TEST = $(LINK) -no-install
+LINK_TEST_LIB = $(LINK_TEST) -avoid-version
+LINK_EXE = $(LINK)
# special link rule for mod_dav_svn
LINK_APACHE_MOD = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(APACHE_LIBEXECDIR) -avoid-version -module $(APACHE_LDFLAGS) -shared

View File

@ -1,14 +0,0 @@
Suppress gcc 10 warning.
--- subversion-1.14.0/subversion/tests/svn_test.h.testwarn
+++ subversion-1.14.0/subversion/tests/svn_test.h
@@ -128,7 +128,7 @@
return svn_error_createf(SVN_ERR_TEST_FAILED, NULL, \
"Strings not equal\n Expected: '%s'\n Found: '%s'" \
"\n at %s:%d", \
- tst_str2, tst_str1, __FILE__, __LINE__); \
+ tst_str2 ? tst_str2 : "(NULL)", tst_str1 ? tst_str1 : "(NULL)", __FILE__, __LINE__); \
} while(0)
/** Handy macro for testing integer equality.

View File

@ -1,30 +0,0 @@
See upstream dev@subversion thread. Fixes intermittent failure of
javahl tests, particularly reproducible on aarch64.
Message-ID: <11de5f5c-5059-b973-95a1-385e7913a63a@syntevo.com>
From: Alexandr Miloslavskiy
--- subversion-1.14.1/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java.fixjavatests
+++ subversion-1.14.1/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
@@ -4676,7 +4676,19 @@
// RuntimeException("Test exception") is expected here
}
- tunnelAgent.joinAndTest();
+ // In this test, there is a race condition that sometimes results in
+ // IOException when 'WAIT_TUNNEL' tries to read from a pipe that
+ // already has its read end closed. This is not an error, but
+ // it's hard to distinguish this case from other IOException which
+ // indicate a problem. To reproduce, simply wrap this test's body in
+ // a loop. The workaround is to ignore any detected IOException.
+ //
+ // tunnelAgent.joinAndTest();
+ try {
+ tunnelAgent.join();
+ } catch (InterruptedException e) {
+ e.printStackTrace ();
+ }
}
/**

View File

@ -1,14 +0,0 @@
Use read_file instead of deprecated readfp - removed in Python 3.11
diff -ur subversion-1.14.1/build/generator/gen_base.py subversion-1.14.1-patched/build/generator/gen_base.py
--- subversion-1.14.1/build/generator/gen_base.py 2019-11-04 06:59:36.000000000 +0100
+++ subversion-1.14.1-patched/build/generator/gen_base.py 2021-12-15 14:04:50.041649320 +0100
@@ -76,7 +76,7 @@
# Now read and parse build.conf
parser = configparser.ConfigParser()
- parser.readfp(open(fname))
+ parser.read_file(open(fname))
self.conf = build_path(os.path.abspath(fname))

View File

@ -1,14 +0,0 @@
Fix intermittent failures when "svn add" guesses a near-empty file is binary and hence
the output is different.
--- subversion-1.14.1/subversion/tests/cmdline/svntest/main.py.testnoautoprops
+++ subversion-1.14.1/subversion/tests/cmdline/svntest/main.py
@@ -691,6 +691,7 @@
[miscellany]
interactive-conflicts = false
+enable-magic-file = no
"""
if exclusive_wc_locks:
config_contents += """

View File

@ -1,23 +0,0 @@
Subversion libraries don't get properly versioned so the library
names are always "libsvn_foo-1.so.0.0.0". Provide proper
versioning information to libtool *without* changing the soname
for compatibility with upstream, so on-disk filenames are
unique across different releases.
--- subversion-1.14.2/configure.ac.soversion
+++ subversion-1.14.2/configure.ac
@@ -112,7 +112,12 @@
SVN_APR_MAJOR_VERSION=1
fi
AC_SUBST(SVN_APR_MAJOR_VERSION)
-SVN_LT_SOVERSION="-version-info $svn_lib_ver"
+
+m4_define([svn_ver_minor], m4_bpatsubst(AC_PACKAGE_VERSION, [[0-9]*\.\([0-9]*\)\.[0-9]*], [\1]))
+m4_define([svn_ver_patch], m4_bpatsubst(AC_PACKAGE_VERSION, [[0-9]*\.[0-9]*\.\([0-9]*\)], [\1]))
+svn_ver_current="`expr $svn_lib_ver + svn_ver_minor`"
+
+SVN_LT_SOVERSION="-version-info $svn_ver_current:svn_ver_patch:svn_ver_minor"
AC_SUBST(SVN_LT_SOVERSION)
AC_DEFINE_UNQUOTED(SVN_SOVERSION, $svn_lib_ver,
[Subversion library major verson])

View File

@ -0,0 +1,30 @@
--- subversion-1.6.0/build/ac-macros/apr.m4.deplibs
+++ subversion-1.6.0/build/ac-macros/apr.m4
@@ -76,9 +76,9 @@ AC_DEFUN(SVN_LIB_APR,
dnl When APR stores the dependent libs in the .la file, we don't need
dnl --libs.
- SVN_APR_LIBS="`$apr_config --link-libtool --libs`"
+ SVN_APR_LIBS="`$apr_config --link-libtool`"
if test $? -ne 0; then
- AC_MSG_ERROR([apr-config --link-libtool --libs failed])
+ AC_MSG_ERROR([apr-config --link-libtool failed])
fi
SVN_APR_EXPORT_LIBS="`$apr_config --link-ld --libs`"
--- subversion-1.6.0/build/ac-macros/aprutil.m4.deplibs
+++ subversion-1.6.0/build/ac-macros/aprutil.m4
@@ -77,11 +77,9 @@ AC_DEFUN(SVN_LIB_APRUTIL,
AC_MSG_ERROR([apu-config --prefix failed])
fi
- dnl When APR stores the dependent libs in the .la file, we don't need
- dnl --libs.
- SVN_APRUTIL_LIBS="`$apu_config --link-libtool --libs`"
+ SVN_APRUTIL_LIBS="`$apu_config --link-libtool`"
if test $? -ne 0; then
- AC_MSG_ERROR([apu-config --link-libtool --libs failed])
+ AC_MSG_ERROR([apu-config --link-libtool failed])
fi
SVN_APRUTIL_EXPORT_LIBS="`$apu_config --link-ld --libs`"

View File

@ -0,0 +1,54 @@
Libraries should be linked with -rpath $libdir but programs should not.
Doing so for the latter means that a redundant RPATH entry of $libdir
will end up in the binaries.
The redundant RPATH can also cause obscure build failures by causing
in-build binaries to pick up libraries from the system environment,
which libtool will otherwise avoid.
--- subversion-1.6.1/build.conf.rpath
+++ subversion-1.6.1/build.conf
@@ -472,7 +472,7 @@ type = swig_lib
lang = python
path = subversion/bindings/swig/python/libsvn_swig_py
libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr apriconv apr
-link-cmd = $(LINK) $(SWIG_PY_LIBS)
+link-cmd = $(LINK_LIB) $(SWIG_PY_LIBS)
install = swig-py-lib
# need special build rule to include -DSWIGPYTHON
compile-cmd = $(COMPILE_SWIG_PY)
@@ -495,7 +495,7 @@ type = swig_lib
lang = ruby
path = subversion/bindings/swig/ruby/libsvn_swig_ruby
libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr
-link-cmd = $(LINK) $(SWIG_RB_LIBS)
+link-cmd = $(LINK_LIB) $(SWIG_RB_LIBS)
install = swig-rb-lib
# need special build rule to include
compile-cmd = $(COMPILE_SWIG_RB)
--- subversion-1.6.1/build/generator/gen_base.py.rpath
+++ subversion-1.6.1/build/generator/gen_base.py
@@ -455,6 +455,10 @@ class TargetLib(TargetLinked):
self.msvc_fake = options.get('msvc-fake') == 'yes' # has fake target
self.msvc_export = options.get('msvc-export', '').split()
+ ### hmm. this is Makefile-specific
+ if self.link_cmd == '$(LINK)':
+ self.link_cmd = '$(LINK_LIB)'
+
class TargetApacheMod(TargetLib):
def __init__(self, name, options, gen_obj):
--- subversion-1.6.1/Makefile.in.rpath
+++ subversion-1.6.1/Makefile.in
@@ -184,7 +184,8 @@ COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXF
COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS)
COMPILE_JAVAHL_JAVAH = $(JAVAH)
-LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
+LINK_LIB = $(LINK) -rpath $(libdir)
+LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
# special link rule for mod_dav_svn

View File

@ -0,0 +1,60 @@
diff -up subversion-1.6.12/build/generator/gen_base.py.pie subversion-1.6.12/build/generator/gen_base.py
--- subversion-1.6.12/build/generator/gen_base.py.pie 2010-09-07 14:05:29.307274005 +0100
+++ subversion-1.6.12/build/generator/gen_base.py 2010-09-07 14:05:29.313274265 +0100
@@ -357,7 +357,7 @@ class TargetLinked(Target):
self.install = options.get('install')
self.compile_cmd = options.get('compile-cmd')
self.sources = options.get('sources', '*.c *.cpp')
- self.link_cmd = options.get('link-cmd', '$(LINK)')
+ self.link_cmd = options.get('link-cmd', '$(LINK_LIB)')
self.external_lib = options.get('external-lib')
self.external_project = options.get('external-project')
@@ -413,6 +413,11 @@ class TargetExe(TargetLinked):
self.manpages = options.get('manpages', '')
self.testing = options.get('testing')
+ if self.install == 'test' or self.install == 'bdb-test':
+ self.link_cmd = '$(LINK_TEST)'
+ else:
+ self.link_cmd = '$(LINK_EXE)'
+
def add_dependencies(self):
TargetLinked.add_dependencies(self)
@@ -456,8 +461,8 @@ class TargetLib(TargetLinked):
self.msvc_export = options.get('msvc-export', '').split()
### hmm. this is Makefile-specific
- if self.link_cmd == '$(LINK)':
- self.link_cmd = '$(LINK_LIB)'
+ if self.install == 'test':
+ self.link_cmd = '$(LINK_TEST_LIB)'
class TargetApacheMod(TargetLib):
diff -up subversion-1.6.12/Makefile.in.pie subversion-1.6.12/Makefile.in
--- subversion-1.6.12/Makefile.in.pie 2010-09-07 14:05:29.308274305 +0100
+++ subversion-1.6.12/Makefile.in 2010-09-07 14:14:28.795274233 +0100
@@ -184,8 +184,11 @@ COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXF
COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS)
COMPILE_JAVAHL_JAVAH = $(JAVAH)
-LINK_LIB = $(LINK) -rpath $(libdir)
LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
+LINK_LIB = $(LINK) -rpath $(libdir)
+LINK_TEST = $(LINK) -no-install
+LINK_TEST_LIB = $(LINK) -avoid-version
+LINK_EXE = $(LINK) -pie
LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
# special link rule for mod_dav_svn
@@ -600,7 +603,7 @@ schema-clean:
$(top_srcdir)/build/transform_sql.sh $< < $< > $(top_srcdir)/$@
.c.o:
- $(COMPILE) -o $@ -c $<
+ $(COMPILE) -fpie -o $@ -c $<
.cpp.o:
$(COMPILE_CXX) -o $@ -c $<

View File

@ -0,0 +1,11 @@
diff -up subversion-1.6.12/subversion/bindings/swig/python/tests/run_all.py.disable-client-test subversion-1.6.12/subversion/bindings/swig/python/tests/run_all.py
--- subversion-1.6.12/subversion/bindings/swig/python/tests/run_all.py.disable-client-test 2010-07-23 09:30:31.951996475 -0400
+++ subversion-1.6.12/subversion/bindings/swig/python/tests/run_all.py 2010-07-23 09:30:46.953930404 -0400
@@ -9,7 +9,6 @@ def suite():
suite = unittest.TestSuite()
suite.addTest(core.suite())
suite.addTest(mergeinfo.suite())
- suite.addTest(client.suite())
suite.addTest(delta.suite())
suite.addTest(pool.suite())
suite.addTest(ra.suite())

View File

@ -0,0 +1,729 @@
Add APR hashorder fixes from upstream.
--- subversion-1.6.18/subversion/bindings/swig/python/tests/repository.py.hashorder
+++ subversion-1.6.18/subversion/bindings/swig/python/tests/repository.py
@@ -133,9 +133,11 @@ class SubversionRepositoryTestCase(unitt
repos.dir_delta(prev_root, '', '', this_root, '', e_ptr, e_baton,
_authz_callback, 1, 1, 0, 0)
- # Check results
- self.assertEqual(editor.textdeltas[0].new_data, "This is a test.\n")
- self.assertEqual(editor.textdeltas[1].new_data, "A test.\n")
+ # Check results.
+ # Ignore the order in which the editor delivers the two sibling files.
+ self.assertEqual(set([editor.textdeltas[0].new_data,
+ editor.textdeltas[1].new_data]),
+ set(["This is a test.\n", "A test.\n"]))
self.assertEqual(len(editor.textdeltas),2)
def test_retrieve_and_change_rev_prop(self):
--- subversion-1.6.18/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py.hashorder
+++ subversion-1.6.18/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
@@ -224,30 +224,50 @@ class SubversionRepositoryTestCase(unitt
def test_diff_dir_different_revs(self):
diffs = self.repos.get_deltas('trunk', 4, 'trunk', 8)
- self._cmp_diff((None, ('trunk/dir1/dir2', 8),
- (Node.DIRECTORY, Changeset.ADD)), diffs.next())
- self._cmp_diff((None, ('trunk/dir1/dir3', 8),
- (Node.DIRECTORY, Changeset.ADD)), diffs.next())
- self._cmp_diff((None, ('trunk/README2.txt', 6),
- (Node.FILE, Changeset.ADD)), diffs.next())
- self._cmp_diff((('trunk/dir2', 4), None,
- (Node.DIRECTORY, Changeset.DELETE)), diffs.next())
- self._cmp_diff((('trunk/dir3', 4), None,
- (Node.DIRECTORY, Changeset.DELETE)), diffs.next())
+ expected = [
+ (None, ('trunk/README2.txt', 6),
+ (Node.FILE, Changeset.ADD)),
+ (None, ('trunk/dir1/dir2', 8),
+ (Node.DIRECTORY, Changeset.ADD)),
+ (None, ('trunk/dir1/dir3', 8),
+ (Node.DIRECTORY, Changeset.ADD)),
+ (('trunk/dir2', 4), None,
+ (Node.DIRECTORY, Changeset.DELETE)),
+ (('trunk/dir3', 4), None,
+ (Node.DIRECTORY, Changeset.DELETE)),
+ ]
+ actual = [diffs.next() for i in range(5)]
+ actual = sorted(actual,
+ key=lambda diff: ((diff[0] or diff[1]).path,
+ (diff[0] or diff[1]).rev))
+ self.assertEqual(len(expected), len(actual))
+ for e,a in zip(expected, actual):
+ self._cmp_diff(e,a)
self.assertRaises(StopIteration, diffs.next)
def test_diff_dir_different_dirs(self):
diffs = self.repos.get_deltas('trunk', 1, 'branches/v1x', 12)
- self._cmp_diff((None, ('branches/v1x/dir1', 12),
- (Node.DIRECTORY, Changeset.ADD)), diffs.next())
- self._cmp_diff((None, ('branches/v1x/dir1/dir2', 12),
- (Node.DIRECTORY, Changeset.ADD)), diffs.next())
- self._cmp_diff((None, ('branches/v1x/dir1/dir3', 12),
- (Node.DIRECTORY, Changeset.ADD)), diffs.next())
- self._cmp_diff((None, ('branches/v1x/README.txt', 12),
- (Node.FILE, Changeset.ADD)), diffs.next())
- self._cmp_diff((None, ('branches/v1x/README2.txt', 12),
- (Node.FILE, Changeset.ADD)), diffs.next())
+ expected = [
+ (None, ('branches/v1x/README.txt', 12),
+ (Node.FILE, Changeset.ADD)),
+ (None, ('branches/v1x/README2.txt', 12),
+ (Node.FILE, Changeset.ADD)),
+ (None, ('branches/v1x/dir1', 12),
+ (Node.DIRECTORY, Changeset.ADD)),
+ (None, ('branches/v1x/dir1/dir2', 12),
+ (Node.DIRECTORY, Changeset.ADD)),
+ (None, ('branches/v1x/dir1/dir3', 12),
+ (Node.DIRECTORY, Changeset.ADD)),
+ ]
+ actual = [diffs.next() for i in range(5)]
+ actual = sorted(actual, key=lambda diff: (diff[1].path, diff[1].rev))
+ # for e,a in zip(expected, actual):
+ # t.write("%r\n" % (e,))
+ # t.write("%r\n" % ((None, (a[1].path, a[1].rev), (a[2], a[3])),) )
+ # t.write('\n')
+ self.assertEqual(len(expected), len(actual))
+ for e,a in zip(expected, actual):
+ self._cmp_diff(e,a)
self.assertRaises(StopIteration, diffs.next)
def test_diff_dir_no_change(self):
--- subversion-1.6.18/subversion/bindings/swig/python/tests/wc.py.hashorder
+++ subversion-1.6.18/subversion/bindings/swig/python/tests/wc.py
@@ -193,8 +193,9 @@ class SubversionWorkingCopyTestCase(unit
def test_entries_read(self):
entries = wc.entries_read(self.wc, True)
-
- self.assertEqual(['', 'tags', 'branches', 'trunk'], list(entries.keys()))
+ keys = list(entries.keys())
+ keys.sort()
+ self.assertEqual(['', 'branches', 'tags', 'trunk'], keys)
def test_get_ignores(self):
self.assert_(isinstance(wc.get_ignores(None, self.wc), list))
--- subversion-1.6.18/subversion/tests/cmdline/diff_tests.py.hashorder
+++ subversion-1.6.18/subversion/tests/cmdline/diff_tests.py
@@ -1024,8 +1024,10 @@ def diff_base_to_repos(sbox):
if not re_infoline.match(line):
list2.append(line)
- if list1 != list2:
- raise svntest.Failure
+ # Two files in diff may be in any order.
+ list1 = svntest.verify.UnorderedOutput(list1)
+
+ svntest.verify.compare_and_display_lines('', '', list1, list2)
#----------------------------------------------------------------------
--- subversion-1.6.18/subversion/tests/cmdline/lock_tests.py.hashorder
+++ subversion-1.6.18/subversion/tests/cmdline/lock_tests.py
@@ -1164,6 +1164,8 @@ def repos_lock_with_info(sbox):
raise svntest.Failure
#----------------------------------------------------------------------
+@Issue(4126)
+@Skip(svntest.main.is_ra_type_dav_serf) # Issue 4126 unpredictable result
def unlock_already_unlocked_files(sbox):
"(un)lock set of files, one already (un)locked"
--- subversion-1.6.18/subversion/tests/cmdline/stat_tests.py.hashorder
+++ subversion-1.6.18/subversion/tests/cmdline/stat_tests.py
@@ -781,38 +781,13 @@ def status_in_xml(sbox):
else:
raise svntest.Failure
- template = ["<?xml version=\"1.0\"?>\n",
- "<status>\n",
- "<target\n",
- " path=\"%s\">\n" % (file_path),
- "<entry\n",
- " path=\"%s\">\n" % (file_path),
- "<wc-status\n",
- " props=\"none\"\n",
- " item=\"modified\"\n",
- " revision=\"1\">\n",
- "<commit\n",
- " revision=\"1\">\n",
- "<author>%s</author>\n" % svntest.main.wc_author,
- time_str,
- "</commit>\n",
- "</wc-status>\n",
- "</entry>\n",
- "<against\n",
- " revision=\"1\"/>\n",
- "</target>\n",
- "</status>\n",
- ]
+ expected_entries = {file_path : {'wcprops' : 'none',
+ 'wcitem' : 'modified',
+ 'wcrev' : '1',
+ 'crev' : '1',
+ 'author' : svntest.main.wc_author}}
- exit_code, output, error = svntest.actions.run_and_verify_svn(None, None, [],
- 'status',
- file_path,
- '--xml', '-u')
-
- for i in range(0, len(output)):
- if output[i] != template[i]:
- print("ERROR: expected: %s actual: %s" % (template[i], output[i]))
- raise svntest.Failure
+ svntest.actions.run_and_verify_status_xml(expected_entries, file_path, '-u')
#----------------------------------------------------------------------
@@ -1049,53 +1024,23 @@ def status_update_with_incoming_props(sb
else:
raise svntest.Failure
- xout = ["<?xml version=\"1.0\"?>\n",
- "<status>\n",
- "<target\n",
- " path=\"%s\">\n" % (wc_dir),
- "<entry\n",
- " path=\"%s\">\n" % (A_path),
- "<wc-status\n",
- " props=\"none\"\n",
- " item=\"normal\"\n",
- " revision=\"1\">\n",
- "<commit\n",
- " revision=\"1\">\n",
- "<author>%s</author>\n" % svntest.main.wc_author,
- time_str,
- "</commit>\n",
- "</wc-status>\n",
- "<repos-status\n",
- " props=\"modified\"\n",
- " item=\"none\">\n",
- "</repos-status>\n",
- "</entry>\n",
- "<entry\n",
- " path=\"%s\">\n" % (wc_dir),
- "<wc-status\n",
- " props=\"none\"\n",
- " item=\"normal\"\n",
- " revision=\"1\">\n",
- "<commit\n",
- " revision=\"1\">\n",
- "<author>%s</author>\n" % svntest.main.wc_author,
- time_str,
- "</commit>\n",
- "</wc-status>\n",
- "<repos-status\n",
- " props=\"modified\"\n",
- " item=\"none\">\n",
- "</repos-status>\n",
- "</entry>\n",
- "<against\n",
- " revision=\"2\"/>\n",
- "</target>\n",
- "</status>\n",]
-
- exit_code, output, error = svntest.actions.run_and_verify_svn(None, xout, [],
- 'status',
- wc_dir,
- '--xml', '-uN')
+ expected_entries ={wc_dir : {'wcprops' : 'none',
+ 'wcitem' : 'normal',
+ 'wcrev' : '1',
+ 'crev' : '1',
+ 'author' : svntest.main.wc_author,
+ 'rprops' : 'modified',
+ 'ritem' : 'none'},
+ A_path : {'wcprops' : 'none',
+ 'wcitem' : 'normal',
+ 'wcrev' : '1',
+ 'crev' : '1',
+ 'author' : svntest.main.wc_author,
+ 'rprops' : 'modified',
+ 'ritem' : 'none'},
+ }
+
+ svntest.actions.run_and_verify_status_xml(expected_entries, wc_dir, '-uN')
# more incoming prop updates.
def status_update_verbose_with_incoming_props(sbox):
--- subversion-1.6.18/subversion/tests/cmdline/svnlook_tests.py.hashorder
+++ subversion-1.6.18/subversion/tests/cmdline/svnlook_tests.py
@@ -105,35 +105,39 @@ def test_misc(sbox):
# the 'svnlook tree --full-paths' output if demanding the whole repository
treelist = run_svnlook('tree', repo_dir)
treelistfull = run_svnlook('tree', '--full-paths', repo_dir)
+
path = ''
- n = 0
+ treelistexpand = []
for entry in treelist:
len1 = len(entry)
len2 = len(entry.lstrip())
- path = path[0:2*(len1-len2)-1] + entry.strip()
- test = treelistfull[n].rstrip()
- if n != 0:
- test = "/" + test
- if not path == test:
- print("Unexpected result from tree with --full-paths:")
- print(" entry : %s" % entry.rstrip())
- print(" with --full-paths: %s" % treelistfull[n].rstrip())
- raise svntest.Failure
- n = n + 1
+ path = path[0:2*(len1-len2)-1] + entry.strip() + '\n'
+ if path == '/\n':
+ treelistexpand.append(path)
+ else:
+ treelistexpand.append(path[1:])
+
+ treelistexpand = svntest.verify.UnorderedOutput(treelistexpand)
+ svntest.verify.compare_and_display_lines('Unexpected result from tree', '',
+ treelistexpand, treelistfull)
# check if the 'svnlook tree' output is the ending of
# the 'svnlook tree --full-paths' output if demanding
# any part of the repository
- n = 0
treelist = run_svnlook('tree', repo_dir, '/A/B')
treelistfull = run_svnlook('tree', '--full-paths', repo_dir, '/A/B')
+
+ path = ''
+ treelistexpand = []
for entry in treelist:
- if not treelistfull[n].endswith(entry.lstrip()):
- print("Unexpected result from tree with --full-paths:")
- print(" entry : %s" % entry.rstrip())
- print(" with --full-paths: %s" % treelistfull[n].rstrip())
- raise svntest.Failure
- n = n + 1
+ len1 = len(entry)
+ len2 = len(entry.lstrip())
+ path = path[0:2*(len1-len2)] + entry.strip() + '\n'
+ treelistexpand.append('/A/' + path)
+
+ treelistexpand = svntest.verify.UnorderedOutput(treelistexpand)
+ svntest.verify.compare_and_display_lines('Unexpected result from tree', '',
+ treelistexpand, treelistfull)
treelist = run_svnlook('tree', repo_dir, '/')
if treelist[0] != '/\n':
@@ -621,7 +625,7 @@ fp.close()"""
# internal property, not really expected
' svn:check-locks\n',
' bogus_rev_prop\n', ' svn:date\n']
- verify_logfile(logfilepath, expected_data)
+ verify_logfile(logfilepath, svntest.verify.UnorderedOutput(expected_data))
########################################################################
# Run the tests
--- subversion-1.6.18/subversion/tests/cmdline/svnsync_tests.py.hashorder
+++ subversion-1.6.18/subversion/tests/cmdline/svnsync_tests.py
@@ -179,7 +179,7 @@ or another dump file."""
else:
exp_master_dumpfile_contents = master_dumpfile_contents
- svntest.verify.compare_and_display_lines(
+ svntest.verify.compare_dump_files(
"Dump files", "DUMP", exp_master_dumpfile_contents, dest_dump)
--- subversion-1.6.18/subversion/tests/cmdline/svntest/actions.py.hashorder
+++ subversion-1.6.18/subversion/tests/cmdline/svntest/actions.py
@@ -448,7 +448,8 @@ class LogEntry:
self.revprops = revprops
def assert_changed_paths(self, changed_paths):
- """Not implemented, so just raises svntest.Failure.
+ """Assert that changed_paths is the same as this entry's changed_paths
+ Raises svntest.Failure if not.
"""
raise Failure('NOT IMPLEMENTED')
@@ -902,13 +903,21 @@ def run_and_verify_merge2(dir, rev1, rev
if dry_run and out != out_dry:
# Due to the way ra_serf works, it's possible that the dry-run and
# real merge operations did the same thing, but the output came in
- # a different order. Let's see if maybe that's the case.
+ # a different order. Let's see if maybe that's the case by comparing
+ # the outputs as unordered sets rather than as lists.
+ #
+ # This now happens for other RA layers with modern APR because the
+ # hash order now varies.
#
- # NOTE: Would be nice to limit this dance to serf tests only, but...
- out_copy = out[:]
- out_dry_copy = out_dry[:]
- out_copy.sort()
- out_dry_copy.sort()
+ # The different orders of the real and dry-run merges may cause
+ # the "Merging rX through rY into" lines to be duplicated a
+ # different number of times in the two outputs. The list-set
+ # conversion removes duplicates so these differences are ignored.
+ # It also removes "U some/path" duplicate lines. Perhaps we
+ # should avoid that?
+ out_copy = set(merge_diff_out[:])
+ out_dry_copy = set(out_dry[:])
+
if out_copy != out_dry_copy:
print("=============================================================")
print("Merge outputs differ")
@@ -1193,6 +1202,56 @@ def run_and_verify_unquiet_status(wc_dir
tree.dump_tree_script(actual, wc_dir_name + os.sep)
raise
+def run_and_verify_status_xml(expected_entries = [],
+ *args):
+ """ Run 'status --xml' with arguments *ARGS. If successful the output
+ is parsed into an XML document and will be verified by comparing against
+ EXPECTED_ENTRIES.
+ """
+
+ exit_code, output, errput = run_and_verify_svn(None, None, [],
+ 'status', '--xml', *args)
+
+ if len(errput) > 0:
+ raise Failure
+
+ doc = parseString(''.join(output))
+ entries = doc.getElementsByTagName('entry')
+
+ def getText(nodelist):
+ rc = []
+ for node in nodelist:
+ if node.nodeType == node.TEXT_NODE:
+ rc.append(node.data)
+ return ''.join(rc)
+
+ actual_entries = {}
+ for entry in entries:
+ wcstatus = entry.getElementsByTagName('wc-status')[0]
+ commit = entry.getElementsByTagName('commit')
+ author = entry.getElementsByTagName('author')
+ rstatus = entry.getElementsByTagName('repos-status')
+
+ actual_entry = {'wcprops' : wcstatus.getAttribute('props'),
+ 'wcitem' : wcstatus.getAttribute('item'),
+ }
+ if wcstatus.hasAttribute('revision'):
+ actual_entry['wcrev'] = wcstatus.getAttribute('revision')
+ if (commit):
+ actual_entry['crev'] = commit[0].getAttribute('revision')
+ if (author):
+ actual_entry['author'] = getText(author[0].childNodes)
+ if (rstatus):
+ actual_entry['rprops'] = rstatus[0].getAttribute('props')
+ actual_entry['ritem'] = rstatus[0].getAttribute('item')
+
+ actual_entries[entry.getAttribute('path')] = actual_entry
+
+ if expected_entries != actual_entries:
+ raise Failure('\n' + '\n'.join(difflib.ndiff(
+ pprint.pformat(expected_entries).splitlines(),
+ pprint.pformat(actual_entries).splitlines())))
+
def run_and_verify_diff_summarize_xml(error_re_string = [],
expected_prefix = None,
expected_paths = [],
--- subversion-1.6.18/subversion/tests/cmdline/svntest/verify.py.hashorder
+++ subversion-1.6.18/subversion/tests/cmdline/svntest/verify.py
@@ -17,6 +17,8 @@
######################################################################
import re, sys
+from difflib import ndiff
+import pprint
import main, tree, wc # general svntest routines in this module.
from svntest import Failure
@@ -59,6 +61,10 @@ class SVNIncorrectDatatype(SVNUnexpected
run_and_verify_* API"""
pass
+class SVNDumpParseError(Failure):
+ """Exception raised if parsing a dump file fails"""
+ pass
+
######################################################################
# Comparison of expected vs. actual output
@@ -359,3 +365,193 @@ def verify_exit_code(message, actual, ex
display_lines(message, "Exit Code",
str(expected) + '\n', str(actual) + '\n')
raise raisable
+
+# A simple dump file parser. While sufficient for the current
+# testsuite it doesn't cope with all valid dump files.
+class DumpParser:
+ def __init__(self, lines):
+ self.current = 0
+ self.lines = lines
+ self.parsed = {}
+
+ def parse_line(self, regex, required=True):
+ m = re.match(regex, self.lines[self.current])
+ if not m:
+ if required:
+ raise SVNDumpParseError("expected '%s' at line %d\n%s"
+ % (regex, self.current,
+ self.lines[self.current]))
+ else:
+ return None
+ self.current += 1
+ return m.group(1)
+
+ def parse_blank(self, required=True):
+ if self.lines[self.current] != '\n': # Works on Windows
+ if required:
+ raise SVNDumpParseError("expected blank at line %d\n%s"
+ % (self.current, self.lines[self.current]))
+ else:
+ return False
+ self.current += 1
+ return True
+
+ def parse_format(self):
+ return self.parse_line('SVN-fs-dump-format-version: ([0-9]+)$')
+
+ def parse_uuid(self):
+ return self.parse_line('UUID: ([0-9a-z-]+)$')
+
+ def parse_revision(self):
+ return self.parse_line('Revision-number: ([0-9]+)$')
+
+ def parse_prop_length(self, required=True):
+ return self.parse_line('Prop-content-length: ([0-9]+)$', required)
+
+ def parse_content_length(self, required=True):
+ return self.parse_line('Content-length: ([0-9]+)$', required)
+
+ def parse_path(self):
+ path = self.parse_line('Node-path: (.+)$', required=False)
+ if not path and self.lines[self.current] == 'Node-path: \n':
+ self.current += 1
+ path = ''
+ return path
+
+ def parse_kind(self):
+ return self.parse_line('Node-kind: (.+)$', required=False)
+
+ def parse_action(self):
+ return self.parse_line('Node-action: ([0-9a-z-]+)$')
+
+ def parse_copyfrom_rev(self):
+ return self.parse_line('Node-copyfrom-rev: ([0-9]+)$', required=False)
+
+ def parse_copyfrom_path(self):
+ path = self.parse_line('Node-copyfrom-path: (.+)$', required=False)
+ if not path and self.lines[self.current] == 'Node-copyfrom-path: \n':
+ self.current += 1
+ path = ''
+ return path
+
+ def parse_copy_md5(self):
+ return self.parse_line('Text-copy-source-md5: ([0-9a-z]+)$', required=False)
+
+ def parse_copy_sha1(self):
+ return self.parse_line('Text-copy-source-sha1: ([0-9a-z]+)$', required=False)
+
+ def parse_text_md5(self):
+ return self.parse_line('Text-content-md5: ([0-9a-z]+)$', required=False)
+
+ def parse_text_sha1(self):
+ return self.parse_line('Text-content-sha1: ([0-9a-z]+)$', required=False)
+
+ def parse_text_length(self):
+ return self.parse_line('Text-content-length: ([0-9]+)$', required=False)
+
+ # One day we may need to parse individual property name/values into a map
+ def get_props(self):
+ props = []
+ while not re.match('PROPS-END$', self.lines[self.current]):
+ props.append(self.lines[self.current])
+ self.current += 1
+ self.current += 1
+ return props
+
+ def get_content(self, length):
+ content = ''
+ while len(content) < length:
+ content += self.lines[self.current]
+ self.current += 1
+ if len(content) == length + 1:
+ content = content[:-1]
+ elif len(content) != length:
+ raise SVNDumpParseError("content length expected %d actual %d at line %d"
+ % (length, len(content), self.current))
+ return content
+
+ def parse_one_node(self):
+ node = {}
+ node['kind'] = self.parse_kind()
+ action = self.parse_action()
+ node['copyfrom_rev'] = self.parse_copyfrom_rev()
+ node['copyfrom_path'] = self.parse_copyfrom_path()
+ node['copy_md5'] = self.parse_copy_md5()
+ node['copy_sha1'] = self.parse_copy_sha1()
+ node['prop_length'] = self.parse_prop_length(required=False)
+ node['text_length'] = self.parse_text_length()
+ node['text_md5'] = self.parse_text_md5()
+ node['text_sha1'] = self.parse_text_sha1()
+ node['content_length'] = self.parse_content_length(required=False)
+ self.parse_blank()
+ if node['prop_length']:
+ node['props'] = self.get_props()
+ if node['text_length']:
+ node['content'] = self.get_content(int(node['text_length']))
+ # Hard to determine how may blanks is 'correct' (a delete that is
+ # followed by an add that is a replace and a copy has one fewer
+ # than expected but that can't be predicted until seeing the add)
+ # so allow arbitrary number
+ blanks = 0
+ while self.current < len(self.lines) and self.parse_blank(required=False):
+ blanks += 1
+ node['blanks'] = blanks
+ return action, node
+
+ def parse_all_nodes(self):
+ nodes = {}
+ while True:
+ if self.current >= len(self.lines):
+ break
+ path = self.parse_path()
+ if not path and not path is '':
+ break
+ if not nodes.get(path):
+ nodes[path] = {}
+ action, node = self.parse_one_node()
+ if nodes[path].get(action):
+ raise SVNDumpParseError("duplicate action '%s' for node '%s' at line %d"
+ % (action, path, self.current))
+ nodes[path][action] = node
+ return nodes
+
+ def parse_one_revision(self):
+ revision = {}
+ number = self.parse_revision()
+ revision['prop_length'] = self.parse_prop_length()
+ revision['content_length'] = self.parse_content_length()
+ self.parse_blank()
+ revision['props'] = self.get_props()
+ self.parse_blank()
+ revision['nodes'] = self.parse_all_nodes()
+ return number, revision
+
+ def parse_all_revisions(self):
+ while self.current < len(self.lines):
+ number, revision = self.parse_one_revision()
+ if self.parsed.get(number):
+ raise SVNDumpParseError("duplicate revision %d at line %d"
+ % (number, self.current))
+ self.parsed[number] = revision
+
+ def parse(self):
+ self.parsed['format'] = self.parse_format()
+ self.parse_blank()
+ self.parsed['uuid'] = self.parse_uuid()
+ self.parse_blank()
+ self.parse_all_revisions()
+ return self.parsed
+
+def compare_dump_files(message, label, expected, actual):
+ """Parse two dump files EXPECTED and ACTUAL, both of which are lists
+ of lines as returned by run_and_verify_dump, and check that the same
+ revisions, nodes, properties, etc. are present in both dumps.
+ """
+
+ parsed_expected = DumpParser(expected).parse()
+ parsed_actual = DumpParser(actual).parse()
+
+ if parsed_expected != parsed_actual:
+ raise svntest.Failure('\n' + '\n'.join(ndiff(
+ pprint.pformat(parsed_expected).splitlines(),
+ pprint.pformat(parsed_actual).splitlines())))
--- subversion-1.6.18/subversion/tests/cmdline/switch_tests.py.hashorder
+++ subversion-1.6.18/subversion/tests/cmdline/switch_tests.py
@@ -1541,33 +1541,29 @@ def mergeinfo_switch_elision(sbox):
beta_path = os.path.join(wc_dir, "A", "B", "E", "beta")
# Make branches A/B_COPY_1 and A/B_COPY_2
- svntest.actions.run_and_verify_svn(
- None,
- ["A " + os.path.join(wc_dir, "A", "B_COPY_1", "lambda") + "\n",
+ expected_stdout = verify.UnorderedOutput([
+ "A " + os.path.join(wc_dir, "A", "B_COPY_1", "lambda") + "\n",
"A " + os.path.join(wc_dir, "A", "B_COPY_1", "E") + "\n",
"A " + os.path.join(wc_dir, "A", "B_COPY_1", "E", "alpha") + "\n",
"A " + os.path.join(wc_dir, "A", "B_COPY_1", "E", "beta") + "\n",
"A " + os.path.join(wc_dir, "A", "B_COPY_1", "F") + "\n",
"Checked out revision 1.\n",
- "A " + B_COPY_1_path + "\n"],
- [],
- 'copy',
- sbox.repo_url + "/A/B",
- B_COPY_1_path)
-
- svntest.actions.run_and_verify_svn(
- None,
- ["A " + os.path.join(wc_dir, "A", "B_COPY_2", "lambda") + "\n",
+ "A " + B_COPY_1_path + "\n",
+ ])
+ svntest.actions.run_and_verify_svn(None, expected_stdout, [], 'copy',
+ sbox.repo_url + "/A/B", B_COPY_1_path)
+
+ expected_stdout = verify.UnorderedOutput([
+ "A " + os.path.join(wc_dir, "A", "B_COPY_2", "lambda") + "\n",
"A " + os.path.join(wc_dir, "A", "B_COPY_2", "E") + "\n",
"A " + os.path.join(wc_dir, "A", "B_COPY_2", "E", "alpha") + "\n",
"A " + os.path.join(wc_dir, "A", "B_COPY_2", "E", "beta") + "\n",
"A " + os.path.join(wc_dir, "A", "B_COPY_2", "F") + "\n",
"Checked out revision 1.\n",
- "A " + B_COPY_2_path + "\n"],
- [],
- 'copy',
- sbox.repo_url + "/A/B",
- B_COPY_2_path)
+ "A " + B_COPY_2_path + "\n",
+ ])
+ svntest.actions.run_and_verify_svn(None, expected_stdout, [], 'copy',
+ sbox.repo_url + "/A/B", B_COPY_2_path)
expected_output = svntest.wc.State(wc_dir, {
'A/B_COPY_1' : Item(verb='Adding'),
--- subversion-1.6.18/subversion/tests/cmdline/update_tests.py.hashorder
+++ subversion-1.6.18/subversion/tests/cmdline/update_tests.py
@@ -1101,6 +1101,7 @@ def another_hudson_problem(sbox):
# Sigh, I can't get run_and_verify_update to work (but not because
# of issue 919 as far as I can tell)
+ expected_output = svntest.verify.UnorderedOutput(expected_output)
svntest.actions.run_and_verify_svn(None,
['D '+G_path+'\n',
'Updated to revision 3.\n',
@@ -2849,19 +2850,17 @@ def mergeinfo_update_elision(sbox):
lambda_path = os.path.join(wc_dir, "A", "B", "lambda")
# Make a branch A/B_COPY
- svntest.actions.run_and_verify_svn(
- None,
- ["A " + os.path.join(wc_dir, "A", "B_COPY", "lambda") + "\n",
+ expected_stdout = verify.UnorderedOutput([
+ "A " + os.path.join(wc_dir, "A", "B_COPY", "lambda") + "\n",
"A " + os.path.join(wc_dir, "A", "B_COPY", "E") + "\n",
"A " + os.path.join(wc_dir, "A", "B_COPY", "E", "alpha") + "\n",
"A " + os.path.join(wc_dir, "A", "B_COPY", "E", "beta") + "\n",
"A " + os.path.join(wc_dir, "A", "B_COPY", "F") + "\n",
"Checked out revision 1.\n",
- "A " + B_COPY_path + "\n"],
- [],
- 'copy',
- sbox.repo_url + "/A/B",
- B_COPY_path)
+ "A " + B_COPY_path + "\n",
+ ])
+ svntest.actions.run_and_verify_svn(None, expected_stdout, [], 'copy',
+ sbox.repo_url + "/A/B", B_COPY_path)
expected_output = wc.State(wc_dir, {'A/B_COPY' : Item(verb='Adding')})
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)

View File

@ -0,0 +1,273 @@
diff -up svn2cl-0.11/svn2cl.xsl~ svn2cl-0.11/svn2cl.xsl
--- svn2cl-0.11/svn2cl.xsl~ 2008-12-21 17:41:20.000000000 +0200
+++ svn2cl-0.11/svn2cl.xsl 2009-11-02 22:29:34.000000000 +0200
@@ -55,12 +55,6 @@
-->
-<!DOCTYPE xsl:stylesheet [
- <!ENTITY tab "&#9;">
- <!ENTITY newl "&#38;#xA;">
- <!ENTITY space "&#32;">
-]>
-
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
@@ -119,7 +113,7 @@
</xsl:otherwise>
</xsl:choose>
<!-- add newlines at the end of the changelog -->
- <xsl:text>&newl;</xsl:text>
+ <xsl:text>&#10;</xsl:text>
</xsl:template>
<!-- format one entry from the log -->
@@ -149,33 +143,33 @@
<xsl:if test="($prevdate!=$date) or ($prevauthor!=$author)">
<!-- add newline -->
<xsl:if test="not(position()=1)">
- <xsl:text>&newl;</xsl:text>
+ <xsl:text>&#10;</xsl:text>
</xsl:if>
<!-- date -->
<xsl:value-of select="$date" />
<!-- two spaces -->
- <xsl:text>&space;&space;</xsl:text>
+ <xsl:text>&#32;&#32;</xsl:text>
<!-- author's name -->
<xsl:apply-templates select="author" />
<!-- two newlines -->
- <xsl:text>&newl;</xsl:text>
- <xsl:if test="$separate-daylogs!='yes'"><xsl:text>&newl;</xsl:text></xsl:if>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:if test="$separate-daylogs!='yes'"><xsl:text>&#10;</xsl:text></xsl:if>
</xsl:if>
</xsl:when>
<!-- write the log header -->
<xsl:otherwise>
<!-- add newline -->
<xsl:if test="not(position()=1)">
- <xsl:text>&newl;</xsl:text>
+ <xsl:text>&#10;</xsl:text>
</xsl:if>
<!-- date -->
<xsl:apply-templates select="date" />
<!-- two spaces -->
- <xsl:text>&space;&space;</xsl:text>
+ <xsl:text>&#32;&#32;</xsl:text>
<!-- author's name -->
<xsl:apply-templates select="author" />
<!-- two newlines -->
- <xsl:text>&newl;&newl;</xsl:text>
+ <xsl:text>&#10;&#10;</xsl:text>
</xsl:otherwise>
</xsl:choose>
<!-- get paths string -->
@@ -187,7 +181,7 @@
<xsl:if test="$include-rev='yes'">
<xsl:text>[r</xsl:text>
<xsl:value-of select="@revision" />
- <xsl:text>]&space;</xsl:text>
+ <xsl:text>]&#32;</xsl:text>
</xsl:if>
</xsl:variable>
<!-- trim trailing newlines -->
@@ -195,7 +189,7 @@
<!-- add a line break before the log message -->
<xsl:choose>
<xsl:when test="$breakbeforemsg='yes'">
- <xsl:text>&newl;</xsl:text>
+ <xsl:text>&#10;</xsl:text>
</xsl:when>
<xsl:when test="number($breakbeforemsg)&gt;0">
<xsl:call-template name="newlines">
@@ -208,14 +202,14 @@
</xsl:call-template>
</xsl:variable>
<!-- add newline here if separate-daylogs is in effect -->
- <xsl:if test="$groupbyday='yes' and $separate-daylogs='yes'"><xsl:text>&newl;</xsl:text></xsl:if>
+ <xsl:if test="$groupbyday='yes' and $separate-daylogs='yes'"><xsl:text>&#10;</xsl:text></xsl:if>
<!-- first line is indented (other indents are done in wrap template) -->
- <xsl:text>&tab;*&space;</xsl:text>
+ <xsl:text>&#9;*&#32;</xsl:text>
<!-- set up the text to wrap -->
<xsl:variable name="txt">
<xsl:value-of select="$rev" />
<xsl:if test="$paths!=''">
- <xsl:value-of select="concat($paths,':&space;')" />
+ <xsl:value-of select="concat($paths,':&#32;')" />
</xsl:if>
<xsl:value-of select="$msg" />
</xsl:variable>
@@ -232,7 +226,7 @@
<xsl:value-of select="substring($date,1,10)" />
<!-- output time part -->
<xsl:if test="$groupbyday!='yes'">
- <xsl:text>&space;</xsl:text>
+ <xsl:text>&#32;</xsl:text>
<xsl:value-of select="substring($date,12,5)" />
</xsl:if>
</xsl:template>
@@ -306,7 +300,7 @@
<xsl:sort select="normalize-space(.)" data-type="text" />
<!-- unless we are the first entry, add a comma -->
<xsl:if test="not(position()=1)">
- <xsl:text>,&space;</xsl:text>
+ <xsl:text>,&#32;</xsl:text>
</xsl:if>
<!-- print the path name -->
<xsl:call-template name="printpath">
@@ -324,7 +318,7 @@
<xsl:sort select="normalize-space(.)" data-type="text" />
<!-- unless we are the first entry, add a comma -->
<xsl:if test="not(position()=1)">
- <xsl:text>,&space;</xsl:text>
+ <xsl:text>,&#32;</xsl:text>
</xsl:if>
<!-- print the path name -->
<xsl:value-of select="normalize-space(.)" />
@@ -382,23 +376,23 @@
<xsl:param name="txt" />
<xsl:variable name="normtxt" select="normalize-space($txt)" />
<xsl:choose>
- <xsl:when test="contains($txt,'&newl;')">
+ <xsl:when test="contains($txt,'&#10;')">
<!-- text contains newlines, do the first line -->
<xsl:call-template name="wrap">
- <xsl:with-param name="txt" select="substring-before($txt,'&newl;')" />
+ <xsl:with-param name="txt" select="substring-before($txt,'&#10;')" />
</xsl:call-template>
<!-- print tab -->
- <xsl:text>&tab;&space;&space;</xsl:text>
+ <xsl:text>&#9;&#32;&#32;</xsl:text>
<!-- wrap the rest of the text -->
<xsl:call-template name="wrap">
- <xsl:with-param name="txt" select="substring-after($txt,'&newl;')" />
+ <xsl:with-param name="txt" select="substring-after($txt,'&#10;')" />
</xsl:call-template>
</xsl:when>
<xsl:when test="(string-length($normtxt) &lt; (($linelen)-9)) or not(contains($normtxt,' '))">
<!-- this is easy, nothing to do -->
<xsl:value-of select="$normtxt" />
<!-- add newline -->
- <xsl:text>&newl;</xsl:text>
+ <xsl:text>&#10;</xsl:text>
</xsl:when>
<xsl:otherwise>
<!-- find the first line -->
@@ -420,7 +414,7 @@
<!-- print line -->
<xsl:value-of select="$line" />
<!-- print newline and tab -->
- <xsl:text>&newl;&tab;&space;&space;</xsl:text>
+ <xsl:text>&#10;&#9;&#32;&#32;</xsl:text>
<!-- wrap the rest of the text -->
<xsl:call-template name="wrap">
<xsl:with-param name="txt" select="normalize-space(substring($normtxt,string-length($line)+1))" />
@@ -449,26 +443,26 @@
<xsl:param name="txt" />
<xsl:choose>
<!-- find starting newlines -->
- <xsl:when test="substring($txt,1,1) = '&newl;'">
+ <xsl:when test="substring($txt,1,1) = '&#10;'">
<xsl:call-template name="trim-newln">
<xsl:with-param name="txt" select="substring($txt,2)" />
</xsl:call-template>
</xsl:when>
<!-- find trailing newlines -->
- <xsl:when test="substring($txt,string-length($txt),1) = '&newl;'">
+ <xsl:when test="substring($txt,string-length($txt),1) = '&#10;'">
<xsl:call-template name="trim-newln">
<xsl:with-param name="txt" select="substring($txt,1,string-length($txt)-1)" />
</xsl:call-template>
</xsl:when>
<!-- if the message has paragrapgs, find the first one -->
- <xsl:when test="$reparagraph='yes' and contains($txt,'&newl;&newl;')">
+ <xsl:when test="$reparagraph='yes' and contains($txt,'&#10;&#10;')">
<!-- remove newlines from first paragraph -->
- <xsl:value-of select="normalize-space(substring-before($txt,'&newl;&newl;'))" />
+ <xsl:value-of select="normalize-space(substring-before($txt,'&#10;&#10;'))" />
<!-- paragraph separator -->
- <xsl:text>&newl;&newl;</xsl:text>
+ <xsl:text>&#10;&#10;</xsl:text>
<!-- do the rest of the text -->
<xsl:call-template name="trim-newln">
- <xsl:with-param name="txt" select="substring-after($txt,'&newl;&newl;')" />
+ <xsl:with-param name="txt" select="substring-after($txt,'&#10;&#10;')" />
</xsl:call-template>
</xsl:when>
<!-- remove more single newlines -->
@@ -485,7 +479,7 @@
<!-- insert a number of newlines -->
<xsl:template name="newlines">
<xsl:param name="count" />
- <xsl:text>&newl;</xsl:text>
+ <xsl:text>&#10;</xsl:text>
<xsl:if test="$count&gt;1">
<xsl:call-template name="newlines">
<xsl:with-param name="count" select="($count)-1" />
diff -up svn2cl-0.11/svn2html.xsl~ svn2cl-0.11/svn2html.xsl
--- svn2cl-0.11/svn2html.xsl~ 2008-12-21 17:41:20.000000000 +0200
+++ svn2cl-0.11/svn2html.xsl 2009-11-02 22:30:11.000000000 +0200
@@ -47,11 +47,6 @@
-->
-<!DOCTYPE xsl:stylesheet [
- <!ENTITY newl "&#38;#xA;">
- <!ENTITY space "&#32;">
-]>
-
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -134,7 +129,7 @@
<li class="changelog_entry">
<!-- date -->
<span class="changelog_date"><xsl:value-of select="$date" /></span>
- <xsl:text>&space;</xsl:text>
+ <xsl:text>&#32;</xsl:text>
<!-- author's name -->
<span class="changelog_author"><xsl:apply-templates select="author" /></span>
</li>
@@ -145,7 +140,7 @@
<li class="changelog_entry">
<!-- date -->
<span class="changelog_date"><xsl:apply-templates select="date" /></span>
- <xsl:text>&space;</xsl:text>
+ <xsl:text>&#32;</xsl:text>
<!-- author's name -->
<span class="changelog_author"><xsl:apply-templates select="author" /></span>
</li>
@@ -167,10 +162,10 @@
<span class="changelog_revision">
<a id="r{@revision}" href="{$revlink}">[r<xsl:value-of select="@revision" />]</a>
</span>
- <xsl:text>&space;</xsl:text>
+ <xsl:text>&#32;</xsl:text>
<!-- get paths string -->
<span class="changelog_files"><xsl:apply-templates select="paths" /></span>
- <xsl:text>&space;</xsl:text>
+ <xsl:text>&#32;</xsl:text>
<!-- get message text -->
<xsl:variable name="msg">
<xsl:call-template name="trim-newln">
@@ -189,14 +184,14 @@
<xsl:template name="newlinestobr">
<xsl:param name="txt" />
<xsl:choose>
- <xsl:when test="contains($txt,'&newl;')">
+ <xsl:when test="contains($txt,'&#10;')">
<!-- text contains newlines, do the first line -->
- <xsl:value-of select="substring-before($txt,'&newl;')" />
+ <xsl:value-of select="substring-before($txt,'&#10;')" />
<!-- print new line -->
<br />
<!-- wrap the rest of the text -->
<xsl:call-template name="newlinestobr">
- <xsl:with-param name="txt" select="substring-after($txt,'&newl;')" />
+ <xsl:with-param name="txt" select="substring-after($txt,'&#10;')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>

View File

@ -0,0 +1,25 @@
The first half of this is certainly upstream-worthy, but the second half is presumably
some Fedora-specific KDE packaging thing. It's not obvious how to get
kde4-config to report the directory which contains the .so files.
--- subversion-1.6.6/build/ac-macros/kwallet.m4.kwallet
+++ subversion-1.6.6/build/ac-macros/kwallet.m4
@@ -47,14 +47,14 @@ AC_DEFUN(SVN_LIB_KWALLET,
fi
done
qt_include_dirs="`$PKG_CONFIG --cflags-only-I QtCore QtDBus QtGui`"
- kde_dir="`$kde4_config --prefix`"
- SVN_KWALLET_INCLUDES="$DBUS_CPPFLAGS $qt_include_dirs -I$kde_dir/include"
+ kde_include_dirs="-I`$kde4_config --path include`"
+ SVN_KWALLET_INCLUDES="$DBUS_CPPFLAGS $qt_include_dirs $kde_include_dirs"
qt_libs_other_options="`$PKG_CONFIG --libs-only-other QtCore QtDBus QtGui`"
SVN_KWALLET_LIBS="$DBUS_LIBS -lQtCore -lQtDBus -lQtGui -lkdecore -lkdeui $qt_libs_other_options"
CXXFLAGS="$CXXFLAGS $SVN_KWALLET_INCLUDES"
LIBS="$LIBS $SVN_KWALLET_LIBS"
qt_lib_dirs="`$PKG_CONFIG --libs-only-L QtCore QtDBus QtGui`"
- LDFLAGS="$old_LDFLAGS $qt_lib_dirs -L$kde_dir/lib`$kde4_config --libsuffix`"
+ LDFLAGS="$old_LDFLAGS $qt_lib_dirs -L$libdir/kde4/devel"
AC_LANG(C++)
AC_LINK_IFELSE([
#include <kwallet.h>

View File

@ -0,0 +1,16 @@
Possible fix/workaround for dubious pointer derefs in #810861.
--- subversion-1.7.4/subversion/libsvn_auth_kwallet/kwallet.cpp.kwallet
+++ subversion-1.7.4/subversion/libsvn_auth_kwallet/kwallet.cpp
@@ -175,6 +175,10 @@ kwallet_terminate(void *data)
"kwallet-initialized",
APR_HASH_KEY_STRING,
NULL);
+ apr_hash_set(parameters,
+ "kwallet-wallet",
+ APR_HASH_KEY_STRING,
+ NULL);
}
return APR_SUCCESS;
}

View File

@ -1,24 +0,0 @@
Try a little harder to avoid svnserve() bind failures.
--- subversion-1.8.0/subversion/bindings/swig/ruby/test/util.rb.rubybind
+++ subversion-1.8.0/subversion/bindings/swig/ruby/test/util.rb
@@ -39,7 +39,8 @@ module SvnTestUtil
@realm = "sample realm"
@svnserve_host = "127.0.0.1"
- @svnserve_ports = (64152..64282).collect{|x| x.to_s}
+ sport = (50000 + rand(100) * 100)
+ @svnserve_ports = (sport..sport + 99).collect{|x| x.to_s}
@tmp_path = Dir.mktmpdir
@wc_path = File.join(@tmp_path, "wc")
@@ -252,6 +253,8 @@ realm = #{@realm}
"--listen-port", port,
"-d", "--foreground")
}
+ # wait a while for svnserve to attempt a bind() and possibly fail
+ sleep(1)
pid, status = Process.waitpid2(@svnserve_pid, Process::WNOHANG)
if status and status.exited?
if $DEBUG

View File

@ -1,16 +0,0 @@
Don't drop -Wall in the swig Perl bindings, otherwise building with
e.g. -Wformat-security might break.
https://bugzilla.redhat.com/show_bug.cgi?id=1037341
--- subversion-1.8.5/subversion/bindings/swig/perl/native/Makefile.PL.in.swigplWall
+++ subversion-1.8.5/subversion/bindings/swig/perl/native/Makefile.PL.in
@@ -54,7 +54,6 @@ my $includes = ' -I/usr/include/apr-1
# SWIG is using C++ style comments in an extern "C" code.
$cflags =~ s/-ansi\s+//g;
$cflags =~ s/-std=c89\s+//g;
-$cflags =~ s/-Wall//g;
$cflags =~ s/-Wunused//g;
$cflags =~ s/-Wshadow//g;
$cflags =~ s/-Wstrict-prototypes//g;

View File

@ -0,0 +1,12 @@
diff -up subversion-1.6.17/subversion/bindings/swig/perl/native/Makefile.PL.in.eemm subversion-1.6.17/subversion/bindings/swig/perl/native/Makefile.PL.in
--- subversion-1.6.17/subversion/bindings/swig/perl/native/Makefile.PL.in.eemm 2011-07-01 17:56:05.861063423 +0200
+++ subversion-1.6.17/subversion/bindings/swig/perl/native/Makefile.PL.in 2011-07-01 17:56:28.675942207 +0200
@@ -43,7 +43,7 @@ chomp $apr_shlib_path_var;
my %config = (
ABSTRACT => 'Perl bindings for Subversion',
DEFINE => $cppflags,
- CCFLAGS => $cflags,
+ CCFLAGS => join(' ', $cflags, $Config{ccflags}),
INC => join(' ',$apr_cflags, $apu_cflags,
" -I$swig_srcdir/perl/libsvn_swig_perl",
" -I$svnlib_srcdir/include",

View File

@ -1,7 +1,6 @@
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule dontdothat_module modules/mod_dontdothat.so
#
# Example configuration to enable HTTP access for a directory
@ -20,7 +19,7 @@ LoadModule dontdothat_module modules/mod_dontdothat.so
#
# # cd /var/www/svn
# # svnadmin create stuff
# # chown -R apache:apache stuff
# # chown -R apache.apache stuff
# # chcon -R -t httpd_sys_content_t stuff
#

File diff suppressed because it is too large Load Diff

109
svnserve.init Normal file
View File

@ -0,0 +1,109 @@
#!/bin/bash
#
# svnserve Startup script for the Subversion svnserve daemon
#
# chkconfig: - 85 15
# description: The svnserve daemon allows access to Subversion repositories \
# using the svn network protocol.
# processname: svnserve
# config: /etc/sysconfig/svnserve
# pidfile: /var/run/svnserve.pid
#
### BEGIN INIT INFO
# Provides: svnserve
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Short-Description: start and stop the svnserve daemon
# Description: The svnserve daemon allows access to Subversion
# repositories using the svn network protocol.
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
if [ -f /etc/sysconfig/svnserve ]; then
. /etc/sysconfig/svnserve
fi
exec=/usr/bin/svnserve
prog=svnserve
pidfile=${PIDFILE-/var/run/svnserve.pid}
lockfile=${LOCKFILE-/var/lock/subsys/svnserve}
args="--daemon --pid-file=${pidfile} $OPTIONS"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
lockfile=/var/lock/subsys/$prog
start() {
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "
daemon --pidfile=${pidfile} $exec $args
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc -p ${pidfile} $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
rh_status() {
# run checks to determine if the service is running or use generic status
status -p ${pidfile} $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?

View File

@ -1,13 +0,0 @@
[Unit]
Description=Subversion protocol daemon
After=syslog.target network.target
Documentation=man:svnserve(8)
[Service]
Type=forking
EnvironmentFile=/etc/sysconfig/svnserve
ExecStart=/usr/bin/svnserve --daemon --pid-file=/run/svnserve/svnserve.pid $OPTIONS
PrivateTmp=yes
[Install]
WantedBy=multi-user.target

View File

@ -1,4 +0,0 @@
# OPTIONS is used to pass command-line arguments to svnserve.
#
# Specify the repository location in -r parameter:
OPTIONS="-r /var/svn"

View File

@ -1 +0,0 @@
D /run/svnserve 0700 root root -