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

Re: bringing psvn.el up to 1.7+ working copies

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 25 Feb 2013 13:44:30 +0200

Joseph Schaefer wrote on Sun, Feb 24, 2013 at 19:37:44 -0500:
> Ok here's my latest stab at it. So far everything seems to work as
> expected, even when you have unsaved edits in the same working
> copy but are working in a subdir that doesn't contain unsaved edits.
>
> I will keep testing but am really just looking for some support from
> a full committer so I can commit these changes as I work on them.
>

Is the psvn.el in our tree the canonical one? The version at
http://www.xsteve.at/prg/emacs/psvn.el is different.

If ours is the canonical one, and no one (the current maintainers or any
full committer) objects, I'd be happy to extend your commit access to
include psvn.el.

Daniel

>
> Index: CHANGES
> ===================================================================
> --- CHANGES (revision 1449428)
> +++ CHANGES (working copy)
> @@ -47,6 +47,7 @@
>
> - Other tool improvements and bugfixes:
> * 'svnmucc' promoted to first-class supported utility (issue #3308)
> + * 'psvn.el' now supports 1.7+ working copies
>
> Developer-visible changes:
> - General:
> Index: contrib/client-side/emacs/psvn.el
> ===================================================================
> --- contrib/client-side/emacs/psvn.el (revision 1449428)
> +++ contrib/client-side/emacs/psvn.el (working copy)
> @@ -1127,33 +1127,13 @@
> asks svn to connect to the repository and check to see if there are updates
> there.
>
> -If there is no .svn directory, examine if there is CVS and run
> -`cvs-examine'. Otherwise ask if to run `dired'."
> + Note: psvn.el no longer supports dispatch to cvs nor dired."
> +
> (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
> - ((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 cvs-dir)
> - (fboundp 'cvs-examine))
> - (cvs-examine dir nil))
> - (t
> - (when (y-or-n-p
> - (format
> - (concat
> - "%s "
> - "is not Subversion controlled (missing %s "
> - "directory). "
> - "Run dired instead? ")
> - dir
> - (svn-wc-adm-dir-name)))
> - (dired dir))))))
> + (setq arg (svn-status-possibly-negate-meaning-of-arg arg 'svn-status))
> + (svn-status-1 dir arg))
>
> (defvar svn-status-display-new-status-buffer nil)
> (defun svn-status-1 (dir &optional arg)
> @@ -6039,20 +6019,32 @@
> (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)))
> + (if (or (> (car svn-client-version) 1) (and (= (car svn-client-version) 1) (>= (cadr svn-client-version) 7)))
> + (while (when (and dir-below (not (file-exists-p 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 (file-name-directory dot-svn-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))))
Received on 2013-02-25 13:49:31 CET

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.