          (newcursorpos-fname)
          (i-fname)
          (current-line svn-start-of-file-list-line-number))
-    (message "%s..." (if set-mark "Marking" "Unmarking"))
     (while st-info
       (when (svn-status-line-info->is-visiblep (car st-info))
         (setq current-line (1+ current-line)))

        (dot-svn-dir)
        (dir-below (expand-file-name default-directory)))
    (setq dot-svn-dir (concat base-dir ".svn"))
    (while (when (file-exists-p dot-svn-dir)
             (setq base-dir (file-name-directory dot-svn-dir))
             (string-match "\\(.+/\\).+/" dir-below)
             (setq dir-below (match-string 1 dir-below))

        (when (svn-status-line-info->is-visiblep (car st-info))
          (when (or (not only-this-line) (string= file-name i-fname))
            (setq newcursorpos-fname i-fname)
            (unless (eq (car (svn-status-line-info->ui-status (car st-info))) set-mark)
              (setcar (svn-status-line-info->ui-status (car st-info)) set-mark)
              (setq mark-count (+ 1 mark-count))
              (save-excursion
                (let ((buffer-read-only nil))
                  (goto-line current-line)
                  (delete-region (point-at-bol) (point-at-eol))
                  (svn-insert-line-in-status-buffer (car st-info))
                  (delete-char 1)))
              (message "%s %s" (if set-mark "Marked" "Unmarked") i-fname)))))
      (setq st-info (cdr st-info)))
    ;;(svn-status-update-buffer)
    (svn-status-goto-file-name newcursorpos-fname)
    (when (> mark-count 1)
      (message "%s %d files" (if set-mark "Marked" "Unmarked") mark-count))))

(defun svn-status-apply-usermark-checked (check-function set-mark)
  "Mark or unmark files, whether a given function returns t.
