[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Some patch and suggestion for psvn.el

From: Shun-ichi GOTO <gotoh_at_taiyo.co.jp>
Date: 2003-09-11 16:18:01 CEST

Hi,

I have some patch for psvn.el and some suggestions.

Suggestions:

  * Currently keymap of `svn-status-unset-all-usermarks' is * !
    but `svn-status-show-svn-diff-for-marked-files' is assigned to
    C-=. I think * u is better for
    `svn-status-show-svn-diff-for-marked-files'. Or, like other
    dired style mode, I like M-DEL for `svn-status-unset-all-usermarks'.
    I like M-DEL, and attached patch contains this.

  * Currently `svn-prop-edit-done' is run asynchronously. But I think
    it should to be synchronous because it splits operations per
    directories and prompts us for every operations. if asynchronous,
    it show prompt immediately after last prompt although last operation
    is not completed. Then it cause error if we answered while last
    operation is still active.

    My patch attached bellow is trivial one for synchronous
    operation. `svn-prop-edit-done' is still same to original
    (asynchronous) one. New function `svn-prop-edit-do-it' is added and
    it takes 'async' flag argument. Tow function using
    svn-prop-edit-done: `svn-status-property-ignore-file-extension' and
    `svn-status-property-ignore-file' were modified to run as
    synchronous. Other function using `svn-prop-edit-done' is not
    modified yet.

  * Some old emacsen does not support 3rd arg of add-to-list.
    I'm using psvn.el on emacs 20.7 (Meadow 1.15) except this.

  * Known BUG:
    We cannot do operation in hidden mode (hiding unmodified files),
    ex. property setting. I don't have patch yet.

Patch:

  * psvn.el (svn-prop-edit-done): Bug fix of paren.
  (svn-prop-edit-do-it): New function splitted from
  `svn-prop-edit-done' to take arg for async/sync.
  (svn-status-property-ignore-file-extension): Use synchronous operation.
  (svn-status-property-ignore-file): Likewise.
  (svn-status-get-specific-revision): Do not use 3rd arg of add-to-list
  for old emacsen.
  (TOP): Define key M-DEL as `svn-status-unset-all-user-mark'.
  


--- c:/develop/subversion/contrib/client-side/psvn/psvn.el Thu Sep 11 11:55:35 2003
+++ c:/users/gotoh/lisp/psvn.el Thu Sep 11 14:05:12 2003
@@ -471,6 +488,7 @@ (defvar svn-status-mode-property-map ()
   (define-key svn-status-mode-map [?h] 'svn-status-use-history)
   (define-key svn-status-mode-map [?m] 'svn-status-set-user-mark)
   (define-key svn-status-mode-map [?u] 'svn-status-unset-user-mark)
+ (define-key svn-status-mode-map "\M-DEL" 'svn-status-unset-all-user-mark)
   (define-key svn-status-mode-map [(backspace)] 'svn-status-unset-user-mark-backwards)
   (define-key svn-status-mode-map [?.] 'svn-status-goto-root-or-return)
   (define-key svn-status-mode-map [??] 'svn-status-toggle-hide-unknown)
@@ -1123,7 +1141,7 @@ (defun svn-status-get-specific-revision
       (setq file-name (car file-names))
       (setq file-name-with-revision (concat file-name ".~" revision "~"))
       (add-to-list 'svn-status-get-specific-revision-file-info
- (cons file-name file-name-with-revision) t)
+ (cons file-name file-name-with-revision))
       (save-excursion
         (find-file file-name-with-revision)
         (setq buffer-read-only nil)
@@ -1135,6 +1153,8 @@ (defun svn-status-get-specific-revision
         (insert-buffer-substring "*svn-process*")
         (save-buffer))
       (setq file-names (cdr file-names)))
+ (setq svn-status-get-specific-revision-file-info
+ (nreverse svn-status-get-specific-revision-file-info))
     (message "svn-status-get-specific-revision-file-info: %S"
              svn-status-get-specific-revision-file-info)))
 
@@ -1349,7 +1369,7 @@ (defun svn-status-property-ignore-file (
         (when (y-or-n-p (format "Ignore %S for %s? " ext-list dir))
           (svn-status-property-edit
            (list (svn-status-find-info-for-file-name dir)) "svn:ignore" ext-list)
- (svn-prop-edit-done)))
+ (svn-prop-edit-do-it nil))) ; synchronous
       (setq d-list (cdr d-list)))))
 
 (defun svn-status-property-ignore-file-extension ()
@@ -1374,7 +1394,7 @@ (defun svn-status-property-ignore-file-e
           (svn-status-property-edit
            (list (svn-status-find-info-for-file-name dir)) "svn:ignore"
            ext-list)
- (svn-prop-edit-done)))
+ (svn-prop-edit-do-it nil)))
       (setq d-list (cdr d-list)))))
 
 (defun svn-status-property-edit-svn-ignore ()
@@ -1432,6 +1452,9 @@ (defun svn-prop-edit-abort ()
 
 (defun svn-prop-edit-done ()
   (interactive)
+ (svn-prop-edit-do-it t))
+
+(defun svn-prop-edit-do-it (async)
   (message "svn propset %s on %s"
            svn-status-propedit-property-name
            svn-status-propedit-file-list)
@@ -1439,12 +1462,13 @@ (defun svn-prop-edit-done ()
     (set-buffer (get-buffer "*svn-property-edit*"))
     (set-buffer-file-coding-system 'undecided-unix nil)
     (write-region (point-min) (point-max)
- (concat svn-status-temp-dir "svn-prop-edit.txt")) nil 1)
+ (concat svn-status-temp-dir "svn-prop-edit.txt") nil 1))
   (when svn-status-propedit-file-list ; there are files to change properties
     (svn-status-create-arg-file svn-status-temp-arg-file ""
                                 svn-status-propedit-file-list "")
     (setq svn-status-propedit-file-list nil)
- (svn-run-svn t t 'propset "propset" svn-status-propedit-property-name
+ (svn-run-svn async t 'propset "propset"
+ svn-status-propedit-property-name
                  "--targets" svn-status-temp-arg-file
                  "-F" (concat svn-status-temp-dir "svn-prop-edit.txt")))
   (set-window-configuration svn-status-pre-propedit-window-configuration))


--- Regards,
 Shun-ichi Goto <gotoh@taiyo.co.jp>
   R&D Group, TAIYO Corp., Tokyo, JAPAN

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 11 16:18:57 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.