Select the proper name for the svn branch.

Thanks to Travis B. Hartwell!

* magit.el (magit-get-svn-branch-name): New.
(magit-insert-unpulled-svn-commits, magit-insert-unpushed-svn-commits,
magit-svn-enabled): Use it.
This commit is contained in:
Marius Vollmer 2009-03-08 03:27:19 +02:00
parent 07e316777f
commit a868715885

View file

@ -1771,13 +1771,13 @@ in log buffer."
(magit-git-section 'svn-unpulled
"Unpulled commits (SVN):" 'magit-wash-log
"log" "--pretty=format:* %H %s"
(format "HEAD..remotes/git-svn")))
(format "HEAD..remotes/%s" (magit-get-svn-branch-name))))
(defun magit-insert-unpushed-svn-commits ()
(magit-git-section 'svn-unpushed
"Unpushed commits (SVN):" 'magit-wash-log
"log" "--pretty=format:* %H %s"
(format "remotes/git-svn..HEAD")))
(format "remotes/%s..HEAD" (magit-get-svn-branch-name))))
;;; Status
@ -1995,10 +1995,13 @@ in log buffer."
(magit-run-git-async "svn" "dcommit"))
(defun magit-svn-enabled ()
(or (not (null (find "git-svn" (magit-list-interesting-revisions)
:test 'equal)))
(not (null (find "trunk" (magit-list-interesting-revisions)
:test 'equal)))))
(not (null (magit-get-svn-branch-name))))
(defun magit-get-svn-branch-name ()
(or (find "git-svn" (magit-list-interesting-revisions)
:test 'equal)
(find "trunk" (magit-list-interesting-revisions)
:test 'equal)))
;;; Resetting